summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AconfigFlags.bp34
-rw-r--r--Android.bp1
-rw-r--r--BAL_OWNERS2
-rw-r--r--apct-tests/perftests/multiuser/Android.bp7
-rw-r--r--apct-tests/perftests/packagemanager/src/android/os/PackageManagerPerfTest.java3
-rw-r--r--apex/jobscheduler/service/java/com/android/server/alarm/AlarmManagerService.java6
-rw-r--r--apex/jobscheduler/service/java/com/android/server/alarm/UserWakeupStore.java12
-rw-r--r--api/Android.bp50
-rw-r--r--api/StubLibraries.bp1
-rw-r--r--api/api.go44
-rw-r--r--api/api_test.go254
-rw-r--r--api/coverage/tools/ExtractFlaggedApis.kt18
-rw-r--r--api/go.work6
-rw-r--r--cmds/bootanimation/BootAnimation.cpp2
-rw-r--r--core/api/current.txt23
-rw-r--r--core/api/module-lib-current.txt8
-rw-r--r--core/api/test-current.txt19
-rw-r--r--core/java/android/animation/AnimatorSet.java12
-rw-r--r--core/java/android/animation/OWNERS1
-rw-r--r--core/java/android/app/Activity.java36
-rw-r--r--core/java/android/app/ActivityOptions.java18
-rw-r--r--core/java/android/app/ActivityThread.java15
-rw-r--r--core/java/android/app/ComponentOptions.java54
-rw-r--r--core/java/android/app/Dialog.java4
-rw-r--r--core/java/android/app/IApplicationThread.aidl1
-rw-r--r--core/java/android/app/Instrumentation.java2
-rw-r--r--core/java/android/app/Notification.java12
-rw-r--r--core/java/android/app/OWNERS2
-rw-r--r--core/java/android/app/PictureInPictureParams.java27
-rw-r--r--core/java/android/app/SystemServiceRegistry.java5
-rw-r--r--core/java/android/app/TaskInfo.java22
-rw-r--r--core/java/android/app/admin/DevicePolicyManager.java54
-rw-r--r--core/java/android/app/admin/IDevicePolicyManager.aidl3
-rw-r--r--core/java/android/app/admin/OWNERS1
-rw-r--r--core/java/android/app/admin/flags/flags.aconfig10
-rw-r--r--core/java/android/app/assist/OWNERS3
-rw-r--r--core/java/android/app/servertransaction/ClientTransactionListenerController.java11
-rw-r--r--core/java/android/app/servertransaction/ObjectPool.java67
-rw-r--r--core/java/android/app/servertransaction/ObjectPoolItem.java8
-rw-r--r--core/java/android/audio/policy/configuration/V7_0/package-info.java23
-rw-r--r--core/java/android/companion/CompanionDeviceManager.java6
-rw-r--r--core/java/android/companion/virtual/flags/flags.aconfig7
-rw-r--r--core/java/android/content/ClipDescription.java8
-rw-r--r--core/java/android/content/ContentProvider.java13
-rw-r--r--core/java/android/content/Intent.java18
-rw-r--r--core/java/android/content/IntentSender.java83
-rw-r--r--core/java/android/content/pm/ActivityInfo.java31
-rw-r--r--core/java/android/content/pm/ShortcutServiceInternal.java3
-rw-r--r--core/java/android/content/pm/multiuser.aconfig30
-rw-r--r--core/java/android/content/res/flags.aconfig10
-rw-r--r--core/java/android/database/CursorWindow.java4
-rw-r--r--core/java/android/hardware/Camera.java2
-rw-r--r--core/java/android/hardware/OWNERS2
-rw-r--r--core/java/android/hardware/camera2/CameraDevice.java37
-rw-r--r--core/java/android/hardware/camera2/CameraManager.java24
-rw-r--r--core/java/android/hardware/camera2/params/StreamConfigurationMap.java8
-rw-r--r--core/java/android/hardware/devicestate/DeviceStateManager.java8
-rw-r--r--core/java/android/hardware/display/DisplayManager.java42
-rw-r--r--core/java/android/hardware/display/DisplayManagerGlobal.java27
-rw-r--r--core/java/android/hardware/display/DisplayManagerInternal.java6
-rw-r--r--core/java/android/hardware/display/IDisplayManager.aidl8
-rw-r--r--core/java/android/hardware/input/InputManager.java18
-rw-r--r--core/java/android/hardware/input/InputSettings.java62
-rw-r--r--core/java/android/hardware/input/VirtualRotaryEncoderScrollEvent.java3
-rw-r--r--core/java/android/hardware/input/input_framework.aconfig14
-rw-r--r--core/java/android/hardware/location/ContextHubInfo.java50
-rw-r--r--core/java/android/hardware/location/NanoAppMessage.java33
-rw-r--r--core/java/android/hardware/usb/flags/system_sw_usb_flags.aconfig7
-rw-r--r--core/java/android/inputmethodservice/AbstractInputMethodService.java5
-rw-r--r--core/java/android/inputmethodservice/ImsConfigurationTracker.java8
-rw-r--r--core/java/android/inputmethodservice/InputMethodService.java13
-rw-r--r--core/java/android/inputmethodservice/NavigationBarController.java16
-rw-r--r--core/java/android/inputmethodservice/navigationbar/KeyButtonView.java37
-rw-r--r--core/java/android/inputmethodservice/navigationbar/NavigationBarView.java52
-rw-r--r--core/java/android/net/NetworkPolicyManager.java38
-rw-r--r--core/java/android/net/flags.aconfig10
-rw-r--r--core/java/android/os/AggregateBatteryConsumer.java2
-rw-r--r--core/java/android/os/BatteryConsumer.java445
-rw-r--r--core/java/android/os/BatteryUsageStats.java140
-rw-r--r--core/java/android/os/BatteryUsageStatsQuery.java30
-rw-r--r--core/java/android/os/IBinder.java37
-rw-r--r--core/java/android/os/INetworkManagementService.aidl86
-rw-r--r--core/java/android/os/IVibratorManagerService.aidl2
-rw-r--r--core/java/android/os/PowerComponents.java404
-rw-r--r--core/java/android/os/PowerManager.java9
-rw-r--r--core/java/android/os/ServiceManager.java4
-rw-r--r--core/java/android/os/ServiceManagerNative.java6
-rw-r--r--core/java/android/os/StrictMode.java28
-rw-r--r--core/java/android/os/SystemVibrator.java5
-rw-r--r--core/java/android/os/SystemVibratorManager.java12
-rw-r--r--core/java/android/os/TEST_MAPPING2
-rw-r--r--core/java/android/os/UidBatteryConsumer.java50
-rw-r--r--core/java/android/os/UserBatteryConsumer.java8
-rw-r--r--core/java/android/os/UserManager.java41
-rw-r--r--core/java/android/os/Vibrator.java13
-rw-r--r--core/java/android/os/VibratorManager.java12
-rw-r--r--core/java/android/os/vibrator/flags.aconfig1
-rw-r--r--core/java/android/provider/Settings.java19
-rw-r--r--core/java/android/security/flags.aconfig7
-rw-r--r--core/java/android/service/chooser/flags.aconfig8
-rw-r--r--core/java/android/service/dreams/DreamService.java9
-rw-r--r--core/java/android/service/dreams/utils/DreamAccessibility.java44
-rw-r--r--core/java/android/text/ClientFlags.java7
-rw-r--r--core/java/android/text/TextFlags.java2
-rw-r--r--core/java/android/text/flags/flags.aconfig20
-rw-r--r--core/java/android/text/format/DateIntervalFormat.java11
-rw-r--r--core/java/android/tracing/flags.aconfig8
-rw-r--r--core/java/android/util/FeatureFlagUtils.java7
-rw-r--r--core/java/android/util/SequenceUtils.java23
-rw-r--r--core/java/android/util/StateSet.java3
-rw-r--r--core/java/android/view/Choreographer.java9
-rw-r--r--core/java/android/view/HapticFeedbackConstants.java29
-rw-r--r--core/java/android/view/IWindowManager.aidl8
-rw-r--r--core/java/android/view/IWindowSession.aidl4
-rw-r--r--core/java/android/view/ImeInsetsSourceConsumer.java18
-rw-r--r--core/java/android/view/InputMonitor.java13
-rw-r--r--core/java/android/view/InsetsController.java2
-rw-r--r--core/java/android/view/InsetsFrameProvider.java6
-rw-r--r--core/java/android/view/InsetsSourceConsumer.java16
-rw-r--r--core/java/android/view/KeyboardShortcutGroup.aidl3
-rw-r--r--core/java/android/view/KeyboardShortcutInfo.java19
-rw-r--r--core/java/android/view/SurfaceControlRegistry.java32
-rw-r--r--core/java/android/view/SurfaceView.java9
-rw-r--r--core/java/android/view/View.java162
-rw-r--r--core/java/android/view/ViewGroup.java7
-rw-r--r--core/java/android/view/ViewRootImpl.java107
-rw-r--r--core/java/android/view/Window.java4
-rw-r--r--core/java/android/view/WindowInsets.java2
-rw-r--r--core/java/android/view/WindowManager.java9
-rw-r--r--core/java/android/view/WindowManagerImpl.java10
-rw-r--r--core/java/android/view/WindowlessWindowManager.java6
-rw-r--r--core/java/android/view/accessibility/AccessibilityNodeInfo.java173
-rw-r--r--core/java/android/view/accessibility/a11ychecker/Android.bp7
-rw-r--r--core/java/android/view/accessibility/flags/accessibility_flags.aconfig14
-rw-r--r--core/java/android/view/autofill/AutofillFeatureFlags.java2
-rw-r--r--core/java/android/view/inputmethod/IInputMethodManagerGlobalInvoker.java14
-rw-r--r--core/java/android/view/inputmethod/InputMethodInfo.java13
-rw-r--r--core/java/android/view/inputmethod/InputMethodManager.java47
-rw-r--r--core/java/android/view/inputmethod/flags.aconfig9
-rw-r--r--core/java/android/webkit/WebViewFactory.java9
-rw-r--r--core/java/android/webkit/WebViewProviderInfo.java32
-rw-r--r--core/java/android/widget/RemoteViews.java3
-rw-r--r--core/java/android/window/ActivityWindowInfo.java13
-rw-r--r--core/java/android/window/BackProgressAnimator.java6
-rw-r--r--core/java/android/window/ITaskFragmentOrganizerController.aidl19
-rw-r--r--core/java/android/window/SnapshotDrawerUtils.java8
-rw-r--r--core/java/android/window/TaskFragmentOrganizer.java46
-rw-r--r--core/java/android/window/TransitionInfo.java2
-rw-r--r--core/java/android/window/TransitionRequestInfo.java2
-rw-r--r--core/java/android/window/WindowContainerTransaction.java61
-rw-r--r--core/java/android/window/WindowMetricsController.java4
-rw-r--r--core/java/android/window/WindowOnBackInvokedDispatcher.java1
-rw-r--r--core/java/android/window/flags/large_screen_experiences_app_compat.aconfig14
-rw-r--r--core/java/android/window/flags/lse_desktop_experience.aconfig60
-rw-r--r--core/java/android/window/flags/responsible_apis.aconfig7
-rw-r--r--core/java/android/window/flags/windowing_frontend.aconfig47
-rw-r--r--core/java/android/window/flags/windowing_sdk.aconfig10
-rw-r--r--core/java/com/android/internal/accessibility/AccessibilityShortcutController.java44
-rw-r--r--core/java/com/android/internal/app/SuspendedAppActivity.java4
-rw-r--r--core/java/com/android/internal/display/RefreshRateSettingsUtils.java28
-rw-r--r--core/java/com/android/internal/inputmethod/IInputMethodPrivilegedOperations.aidl1
-rw-r--r--core/java/com/android/internal/inputmethod/InputMethodPrivilegedOperations.java16
-rw-r--r--core/java/com/android/internal/jank/Cuj.java70
-rw-r--r--core/java/com/android/internal/os/PowerStats.java7
-rw-r--r--core/java/com/android/internal/os/TEST_MAPPING2
-rw-r--r--core/java/com/android/internal/os/flags.aconfig2
-rw-r--r--core/java/com/android/internal/pm/pkg/component/AconfigFlags.java23
-rw-r--r--core/java/com/android/internal/policy/DecorView.java19
-rw-r--r--core/java/com/android/internal/policy/FoldLockSettingsObserver.java128
-rw-r--r--core/java/com/android/internal/protolog/IProtoLogClient.aidl29
-rw-r--r--core/java/com/android/internal/protolog/IProtoLogService.aidl51
-rw-r--r--core/java/com/android/internal/protolog/LegacyProtoLogImpl.java40
-rw-r--r--core/java/com/android/internal/protolog/LogcatOnlyProtoLogImpl.java87
-rw-r--r--core/java/com/android/internal/protolog/PerfettoProtoLogImpl.java680
-rw-r--r--core/java/com/android/internal/protolog/ProtoLog.java97
-rw-r--r--core/java/com/android/internal/protolog/ProtoLogDataSource.java33
-rw-r--r--core/java/com/android/internal/protolog/ProtoLogImpl.java63
-rw-r--r--core/java/com/android/internal/protolog/ProtoLogViewerConfigReader.java125
-rw-r--r--core/java/com/android/internal/protolog/ViewerConfigInputStreamProvider.java2
-rw-r--r--core/java/com/android/internal/protolog/common/IProtoLog.java18
-rw-r--r--core/java/com/android/internal/view/IInputMethodManager.aidl13
-rw-r--r--core/java/com/android/internal/widget/LockPatternUtils.java10
-rw-r--r--core/java/com/android/internal/widget/MaxHeightFrameLayout.java98
-rw-r--r--core/jni/android_hardware_Camera.cpp16
-rw-r--r--core/jni/android_media_AudioSystem.cpp77
-rw-r--r--core/jni/android_util_Process.cpp57
-rw-r--r--core/jni/android_view_InputChannel.cpp19
-rw-r--r--core/jni/android_view_MotionEvent.cpp2
-rw-r--r--core/jni/platform/host/HostRuntime.cpp310
-rw-r--r--core/proto/android/server/inputmethod/inputmethodmanagerservice.proto3
-rw-r--r--core/proto/android/server/vibrator/vibratormanagerservice.proto1
-rw-r--r--core/res/res/drawable/ic_ime_switcher_new.xml26
-rw-r--r--core/res/res/drawable/input_method_switch_button.xml42
-rw-r--r--core/res/res/drawable/input_method_switch_item_background.xml37
-rw-r--r--core/res/res/layout/input_method_switch_dialog_new.xml70
-rw-r--r--core/res/res/layout/input_method_switch_item_new.xml88
-rw-r--r--core/res/res/values-af/strings.xml44
-rw-r--r--core/res/res/values-am/strings.xml62
-rw-r--r--core/res/res/values-ar/strings.xml55
-rw-r--r--core/res/res/values-as/strings.xml44
-rw-r--r--core/res/res/values-az/strings.xml62
-rw-r--r--core/res/res/values-b+sr+Latn/strings.xml62
-rw-r--r--core/res/res/values-be/strings.xml53
-rw-r--r--core/res/res/values-bg/strings.xml62
-rw-r--r--core/res/res/values-bn/strings.xml62
-rw-r--r--core/res/res/values-bs/strings.xml62
-rw-r--r--core/res/res/values-ca/strings.xml62
-rw-r--r--core/res/res/values-cs/strings.xml64
-rw-r--r--core/res/res/values-da/strings.xml64
-rw-r--r--core/res/res/values-de/strings.xml68
-rw-r--r--core/res/res/values-el/strings.xml66
-rw-r--r--core/res/res/values-en-rAU/strings.xml62
-rw-r--r--core/res/res/values-en-rCA/strings.xml26
-rw-r--r--core/res/res/values-en-rGB/strings.xml62
-rw-r--r--core/res/res/values-en-rIN/strings.xml62
-rw-r--r--core/res/res/values-en-rXC/strings.xml26
-rw-r--r--core/res/res/values-es-rUS/strings.xml62
-rw-r--r--core/res/res/values-es/strings.xml64
-rw-r--r--core/res/res/values-et/strings.xml62
-rw-r--r--core/res/res/values-eu/strings.xml64
-rw-r--r--core/res/res/values-fa/strings.xml64
-rw-r--r--core/res/res/values-fi/strings.xml62
-rw-r--r--core/res/res/values-fr-rCA/strings.xml692
-rw-r--r--core/res/res/values-fr/strings.xml62
-rw-r--r--core/res/res/values-gl/strings.xml44
-rw-r--r--core/res/res/values-gu/strings.xml53
-rw-r--r--core/res/res/values-hi/strings.xml52
-rw-r--r--core/res/res/values-hr/strings.xml62
-rw-r--r--core/res/res/values-hu/strings.xml62
-rw-r--r--core/res/res/values-hy/strings.xml62
-rw-r--r--core/res/res/values-in/strings.xml62
-rw-r--r--core/res/res/values-is/strings.xml62
-rw-r--r--core/res/res/values-it/strings.xml57
-rw-r--r--core/res/res/values-iw/strings.xml53
-rw-r--r--core/res/res/values-ja/strings.xml53
-rw-r--r--core/res/res/values-ka/strings.xml44
-rw-r--r--core/res/res/values-kk/strings.xml62
-rw-r--r--core/res/res/values-km/strings.xml62
-rw-r--r--core/res/res/values-kn/strings.xml44
-rw-r--r--core/res/res/values-ko/strings.xml64
-rw-r--r--core/res/res/values-ky/strings.xml62
-rw-r--r--core/res/res/values-lo/strings.xml62
-rw-r--r--core/res/res/values-lt/strings.xml62
-rw-r--r--core/res/res/values-lv/strings.xml44
-rw-r--r--core/res/res/values-mk/strings.xml44
-rw-r--r--core/res/res/values-ml/strings.xml62
-rw-r--r--core/res/res/values-mn/strings.xml62
-rw-r--r--core/res/res/values-mr/strings.xml44
-rw-r--r--core/res/res/values-ms/strings.xml46
-rw-r--r--core/res/res/values-my/strings.xml53
-rw-r--r--core/res/res/values-nb/strings.xml66
-rw-r--r--core/res/res/values-ne/strings.xml53
-rw-r--r--core/res/res/values-nl/strings.xml62
-rw-r--r--core/res/res/values-or/strings.xml68
-rw-r--r--core/res/res/values-pa/strings.xml62
-rw-r--r--core/res/res/values-pl/strings.xml44
-rw-r--r--core/res/res/values-pt-rBR/strings.xml53
-rw-r--r--core/res/res/values-pt-rPT/strings.xml48
-rw-r--r--core/res/res/values-pt/strings.xml53
-rw-r--r--core/res/res/values-ro/strings.xml62
-rw-r--r--core/res/res/values-ru/strings.xml62
-rw-r--r--core/res/res/values-si/strings.xml62
-rw-r--r--core/res/res/values-sk/strings.xml66
-rw-r--r--core/res/res/values-sl/strings.xml53
-rw-r--r--core/res/res/values-sq/strings.xml62
-rw-r--r--core/res/res/values-sr/strings.xml62
-rw-r--r--core/res/res/values-sv/strings.xml62
-rw-r--r--core/res/res/values-sw/strings.xml62
-rw-r--r--core/res/res/values-ta/strings.xml66
-rw-r--r--core/res/res/values-te/strings.xml53
-rw-r--r--core/res/res/values-th/strings.xml53
-rw-r--r--core/res/res/values-tl/strings.xml53
-rw-r--r--core/res/res/values-tr/strings.xml62
-rw-r--r--core/res/res/values-uk/strings.xml62
-rw-r--r--core/res/res/values-ur/strings.xml53
-rw-r--r--core/res/res/values-uz/strings.xml53
-rw-r--r--core/res/res/values-vi/strings.xml64
-rw-r--r--core/res/res/values-zh-rCN/strings.xml62
-rw-r--r--core/res/res/values-zh-rHK/strings.xml53
-rw-r--r--core/res/res/values-zh-rTW/strings.xml66
-rw-r--r--core/res/res/values-zu/strings.xml62
-rw-r--r--core/res/res/values/attrs.xml7
-rw-r--r--core/res/res/values/attrs_manifest.xml13
-rw-r--r--core/res/res/values/config.xml6
-rw-r--r--core/res/res/values/config_telephony.xml6
-rw-r--r--core/res/res/values/public-staging.xml2
-rw-r--r--core/res/res/values/strings.xml21
-rw-r--r--core/res/res/values/symbols.xml17
-rw-r--r--core/res/res/values/themes_device_defaults.xml6
-rw-r--r--core/res/res/xml/power_profile.xml6
-rw-r--r--core/tests/InputMethodCoreTests/src/android/view/inputmethod/CursorAnchorInfoTest.java2
-rw-r--r--core/tests/InputMethodCoreTests/src/android/view/inputmethod/DeleteRangeGestureTest.java2
-rw-r--r--core/tests/InputMethodCoreTests/src/android/view/inputmethod/EditorInfoTest.java2
-rw-r--r--core/tests/InputMethodCoreTests/src/android/view/inputmethod/InputMethodInfoTest.java8
-rw-r--r--core/tests/InputMethodCoreTests/src/android/view/inputmethod/InputMethodManagerTest.java4
-rw-r--r--core/tests/InputMethodCoreTests/src/android/view/inputmethod/InputMethodSubtypeArrayTest.java2
-rw-r--r--core/tests/InputMethodCoreTests/src/android/view/inputmethod/InputMethodSubtypeTest.java2
-rw-r--r--core/tests/InputMethodCoreTests/src/android/view/inputmethod/InsertGestureTest.java2
-rw-r--r--core/tests/InputMethodCoreTests/src/android/view/inputmethod/InsertModeGestureTest.java2
-rw-r--r--core/tests/InputMethodCoreTests/src/android/view/inputmethod/SelectGestureTest.java2
-rw-r--r--core/tests/InputMethodCoreTests/src/android/view/inputmethod/SelectRangeGestureTest.java2
-rw-r--r--core/tests/InputMethodCoreTests/src/android/view/inputmethod/SparseRectFArrayTest.java2
-rw-r--r--core/tests/InputMethodCoreTests/src/com/android/internal/inputmethod/InputConnectionWrapperTest.java2
-rw-r--r--core/tests/InputMethodCoreTests/src/com/android/internal/inputmethod/InputMethodDebugTest.java2
-rw-r--r--core/tests/InputMethodCoreTests/src/com/android/internal/inputmethod/SubtypeLocaleUtilsTest.java2
-rw-r--r--core/tests/batterystatstests/BatteryUsageStatsProtoTests/Android.bp30
-rw-r--r--core/tests/coretests/Android.bp1
-rw-r--r--core/tests/coretests/src/android/animation/AnimatorSetCallsTest.java39
-rw-r--r--core/tests/coretests/src/android/animation/OWNERS1
-rw-r--r--core/tests/coretests/src/android/app/activity/ActivityThreadTest.java13
-rw-r--r--core/tests/coretests/src/android/app/servertransaction/ClientTransactionItemTest.java8
-rw-r--r--core/tests/coretests/src/android/app/servertransaction/ClientTransactionListenerControllerTest.java10
-rw-r--r--core/tests/coretests/src/android/app/servertransaction/ObjectPoolTests.java57
-rw-r--r--core/tests/coretests/src/android/app/servertransaction/TransactionExecutorTests.java9
-rw-r--r--core/tests/coretests/src/android/inputmethodservice/ImsConfigurationTrackerTest.java32
-rw-r--r--core/tests/coretests/src/android/text/format/DateIntervalFormatTest.java9
-rw-r--r--core/tests/coretests/src/android/util/SequenceUtilsTest.java47
-rw-r--r--core/tests/coretests/src/android/view/ImeInsetsSourceConsumerTest.java12
-rw-r--r--core/tests/coretests/src/android/view/ViewFrameRateTest.java117
-rw-r--r--core/tests/coretests/src/android/view/ViewRootImplTest.java10
-rw-r--r--core/tests/coretests/src/android/view/WindowInfoTest.java2
-rw-r--r--core/tests/coretests/src/android/view/WindowInsetsTest.java18
-rw-r--r--core/tests/coretests/src/android/view/WindowManagerTests.java2
-rw-r--r--core/tests/coretests/src/android/view/WindowMetricsTest.java2
-rw-r--r--core/tests/coretests/src/android/view/accessibility/AccessibilityNodeInfoTest.java2
-rw-r--r--core/tests/coretests/src/android/view/accessibility/a11ychecker/OWNERS5
-rw-r--r--core/tests/coretests/src/android/window/SystemPerformanceHinterTests.java13
-rw-r--r--core/tests/coretests/src/android/window/TaskFpsCallbackTest.java2
-rw-r--r--core/tests/coretests/src/android/window/WindowContextControllerTest.java11
-rw-r--r--core/tests/coretests/src/android/window/WindowContextTest.java2
-rw-r--r--core/tests/coretests/src/android/window/WindowMetricsHelperTest.java2
-rw-r--r--core/tests/coretests/src/android/window/WindowOnBackInvokedDispatcherTest.java16
-rw-r--r--core/tests/coretests/src/android/window/WindowTokenClientControllerTest.java8
-rw-r--r--core/tests/coretests/src/android/window/flags/WindowFlagsTest.java2
-rw-r--r--core/tests/coretests/src/com/android/internal/policy/FoldLockSettingsObserverTest.java110
-rw-r--r--core/tests/overlaytests/handle_config_change/Android.bp45
-rw-r--r--core/tests/overlaytests/handle_config_change/AndroidTest.xml35
-rw-r--r--core/tests/overlaytests/handle_config_change/src/com/android/overlaytest/HandleConfigChangeHostTests.java47
-rw-r--r--core/tests/overlaytests/handle_config_change/test-apps/OverlayResApp/Android.bp43
-rw-r--r--core/tests/overlaytests/handle_config_change/test-apps/OverlayResApp/AndroidManifest.xml33
-rw-r--r--core/tests/overlaytests/handle_config_change/test-apps/OverlayResApp/res/values/integers.xml20
-rw-r--r--core/tests/overlaytests/handle_config_change/test-apps/OverlayResApp/res/values/strings.xml21
-rw-r--r--core/tests/overlaytests/handle_config_change/test-apps/OverlayResApp/src/com/android/overlaytest/overlayresapp/OverlayResActivity.java50
-rw-r--r--core/tests/overlaytests/handle_config_change/test-apps/OverlayResApp/src/com/android/overlaytest/overlayresapp/OverlayResTest.java148
-rw-r--r--core/tests/resourceflaggingtests/Android.bp75
-rw-r--r--core/tests/resourceflaggingtests/AndroidManifest.xml31
-rw-r--r--core/tests/resourceflaggingtests/OWNERS1
-rw-r--r--core/tests/resourceflaggingtests/TestAppAndroidManifest.xml4
-rw-r--r--core/tests/resourceflaggingtests/flagged_resources_res/values/bools.xml8
-rw-r--r--core/tests/resourceflaggingtests/src/com/android/resourceflaggingtests/ResourceFlaggingTest.java81
-rw-r--r--data/etc/OWNERS1
-rw-r--r--data/etc/platform.xml2
-rw-r--r--errorprone/java/com/google/errorprone/bugpatterns/android/RequiresPermissionChecker.java144
-rw-r--r--errorprone/tests/java/com/google/errorprone/bugpatterns/android/RequiresPermissionCheckerTest.java13
-rw-r--r--errorprone/tests/res/android/content/Context.java11
-rw-r--r--errorprone/tests/res/android/content/Intent.java4
-rw-r--r--graphics/java/android/graphics/Paint.java29
-rw-r--r--keystore/java/android/security/KeyChain.java8
-rw-r--r--libs/WindowManager/Jetpack/src/androidx/window/common/RawFoldingFeatureProducer.java2
-rw-r--r--libs/WindowManager/Jetpack/src/androidx/window/extensions/WindowExtensionsImpl.java33
-rw-r--r--libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/DividerPresenter.java4
-rw-r--r--libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/JetpackTaskFragmentOrganizer.java23
-rw-r--r--libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/SplitController.java38
-rw-r--r--libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/SplitPresenter.java17
-rw-r--r--libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/TaskFragmentAnimationAdapter.java224
-rw-r--r--libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/TaskFragmentAnimationController.java79
-rw-r--r--libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/TaskFragmentAnimationRunner.java309
-rw-r--r--libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/TaskFragmentAnimationSpec.java267
-rw-r--r--libs/WindowManager/Jetpack/src/androidx/window/util/AcceptOnceConsumer.java2
-rw-r--r--libs/WindowManager/Jetpack/src/androidx/window/util/BaseDataProducer.java21
-rw-r--r--libs/WindowManager/Jetpack/src/androidx/window/util/DataProducer.java44
-rw-r--r--libs/WindowManager/Jetpack/tests/unittest/Android.bp1
-rw-r--r--libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/WindowExtensionsTest.java5
-rw-r--r--libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/JetpackTaskFragmentOrganizerTest.java20
-rw-r--r--libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/OverlayPresentationTest.java122
-rw-r--r--libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/SplitControllerTest.java14
-rw-r--r--libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/TaskFragmentAnimationControllerTest.java88
-rw-r--r--libs/WindowManager/Shell/Android.bp17
-rw-r--r--libs/WindowManager/Shell/AndroidManifest.xml2
-rw-r--r--libs/WindowManager/Shell/aconfig/multitasking.aconfig10
-rw-r--r--libs/WindowManager/Shell/multivalentScreenshotTests/goldens/robolectric/phone/dark_portrait_bubbles_education.pngbin56309 -> 56741 bytes
-rw-r--r--libs/WindowManager/Shell/multivalentScreenshotTests/goldens/robolectric/phone/light_portrait_bubbles_education.pngbin56309 -> 56741 bytes
-rw-r--r--libs/WindowManager/Shell/res/drawable/desktop_mode_ic_handle_menu_open_in_browser.xml19
-rw-r--r--libs/WindowManager/Shell/res/layout/desktop_mode_window_decor_handle_menu.xml29
-rw-r--r--libs/WindowManager/Shell/res/values-af/strings.xml2
-rw-r--r--libs/WindowManager/Shell/res/values-am/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-ar/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-as/strings.xml7
-rw-r--r--libs/WindowManager/Shell/res/values-az/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-b+sr+Latn/strings.xml7
-rw-r--r--libs/WindowManager/Shell/res/values-be/strings.xml7
-rw-r--r--libs/WindowManager/Shell/res/values-bg/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-bn/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-bs/strings.xml7
-rw-r--r--libs/WindowManager/Shell/res/values-ca/strings.xml7
-rw-r--r--libs/WindowManager/Shell/res/values-cs/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-da/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-de/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-el/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-en-rAU/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-en-rCA/strings.xml1
-rw-r--r--libs/WindowManager/Shell/res/values-en-rGB/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-en-rIN/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-en-rXC/strings.xml1
-rw-r--r--libs/WindowManager/Shell/res/values-es-rUS/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-es/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-et/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-eu/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-fa/strings.xml12
-rw-r--r--libs/WindowManager/Shell/res/values-fi/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-fr-rCA/strings.xml36
-rw-r--r--libs/WindowManager/Shell/res/values-fr/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-gl/strings.xml1
-rw-r--r--libs/WindowManager/Shell/res/values-gu/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-hi/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-hr/strings.xml7
-rw-r--r--libs/WindowManager/Shell/res/values-hu/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-hy/strings.xml7
-rw-r--r--libs/WindowManager/Shell/res/values-in/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-is/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-it/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-iw/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-ja/strings.xml7
-rw-r--r--libs/WindowManager/Shell/res/values-ka/strings.xml7
-rw-r--r--libs/WindowManager/Shell/res/values-kk/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-km/strings.xml7
-rw-r--r--libs/WindowManager/Shell/res/values-kn/strings.xml7
-rw-r--r--libs/WindowManager/Shell/res/values-ko/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-ky/strings.xml7
-rw-r--r--libs/WindowManager/Shell/res/values-lo/strings.xml7
-rw-r--r--libs/WindowManager/Shell/res/values-lt/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-lv/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-mk/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-ml/strings.xml7
-rw-r--r--libs/WindowManager/Shell/res/values-mn/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-mr/strings.xml7
-rw-r--r--libs/WindowManager/Shell/res/values-ms/strings.xml7
-rw-r--r--libs/WindowManager/Shell/res/values-my/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-nb/strings.xml10
-rw-r--r--libs/WindowManager/Shell/res/values-ne/strings.xml7
-rw-r--r--libs/WindowManager/Shell/res/values-nl/strings.xml7
-rw-r--r--libs/WindowManager/Shell/res/values-or/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-pa/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-pl/strings.xml7
-rw-r--r--libs/WindowManager/Shell/res/values-pt-rBR/strings.xml7
-rw-r--r--libs/WindowManager/Shell/res/values-pt-rPT/strings.xml7
-rw-r--r--libs/WindowManager/Shell/res/values-pt/strings.xml7
-rw-r--r--libs/WindowManager/Shell/res/values-ro/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-ru/strings.xml7
-rw-r--r--libs/WindowManager/Shell/res/values-si/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-sk/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-sl/strings.xml7
-rw-r--r--libs/WindowManager/Shell/res/values-sq/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-sr/strings.xml7
-rw-r--r--libs/WindowManager/Shell/res/values-sv/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-sw/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-ta/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-te/strings.xml7
-rw-r--r--libs/WindowManager/Shell/res/values-th/strings.xml7
-rw-r--r--libs/WindowManager/Shell/res/values-tl/strings.xml7
-rw-r--r--libs/WindowManager/Shell/res/values-tr/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-uk/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-ur/strings.xml7
-rw-r--r--libs/WindowManager/Shell/res/values-uz/strings.xml7
-rw-r--r--libs/WindowManager/Shell/res/values-vi/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-zh-rCN/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-zh-rHK/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-zh-rTW/strings.xml8
-rw-r--r--libs/WindowManager/Shell/res/values-zu/strings.xml7
-rw-r--r--libs/WindowManager/Shell/res/values/dimen.xml19
-rw-r--r--libs/WindowManager/Shell/res/values/strings.xml2
-rw-r--r--libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/animation/PhysicsAnimatorTestUtils.kt10
-rw-r--r--libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/desktopmode/DesktopModeFlags.kt77
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/ShellTaskOrganizer.java16
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/back/BackAnimation.java20
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/back/BackAnimationController.java25
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/back/CrossActivityBackAnimation.kt9
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/back/CrossTaskBackAnimation.java2
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/back/CustomCrossActivityBackAnimation.kt8
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/back/DefaultCrossActivityBackAnimation.kt6
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java12
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleData.java35
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleExpandedView.java5
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleTaskViewHelper.java5
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/Bubbles.java3
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/IBubbles.aidl2
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/shortcut/CreateBubbleShortcutActivity.kt4
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/shortcut/ShowBubblesActivity.kt4
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/common/HandlerExecutor.java7
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/common/LaunchAdjacentController.kt12
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/common/MultiInstanceHelper.kt12
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/common/ShellExecutor.java7
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/common/pip/PipBoundsState.java89
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/common/split/DividerView.java5
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java11
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitWindowManager.java3
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/compatui/api/CompatUIRepository.kt39
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/compatui/api/CompatUISpec.kt26
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/compatui/impl/DefaultCompatUIHandler.kt5
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/compatui/impl/DefaultCompatUIRepository.kt41
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellBaseModule.java13
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellModule.java30
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/dagger/pip/Pip1Module.java28
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/dagger/pip/Pip2Module.java10
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/dagger/pip/PipModule.java17
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeEventLogger.kt12
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeLoggerTransitionObserver.kt11
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeTaskRepository.kt77
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeUtils.kt8
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt216
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksLimiter.kt16
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksTransitionObserver.kt29
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopWallpaperActivity.kt4
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DragToDesktopTransitionHandler.kt22
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/EnterDesktopTaskTransitionHandler.java10
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/docs/debugging.md21
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/draganddrop/DragAndDropController.java32
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/draganddrop/DragAndDropPolicy.java53
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/draganddrop/DragLayout.java12
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/draganddrop/DragSession.java35
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/draganddrop/DragUtils.java47
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/draganddrop/DropZoneView.java12
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipAnimationController.java1
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTaskOrganizer.java8
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransition.java10
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransitionController.java6
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipController.java32
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/pip2/animation/PipEnterExitAnimator.java150
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipController.java91
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipMotionHelper.java20
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipTouchHandler.java37
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipTransition.java54
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentTasksController.java28
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreen.java3
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreenController.java93
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreenTransitions.java32
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java210
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/tv/TvSplitScreenController.java4
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/tv/TvStageCoordinator.java2
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/WindowlessSnapshotWindowCreator.java2
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/WindowlessSplashWindowCreator.java4
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/sysui/ShellInit.java2
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/taskview/TaskViewTaskController.java3
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultMixedHandler.java2
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultTransitionHandler.java17
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/transition/TransitionAnimationHelper.java43
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java64
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/util/KtProtoLog.kt74
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecorViewModel.java111
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecoration.java77
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java128
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java197
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DragDetector.java58
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DragResizeInputListener.java3
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DragResizeWindowGeometry.java37
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenu.java516
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenu.kt499
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenuAnimator.kt93
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/VeiledResizeTaskPositioner.java16
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/WindowDecoration.java17
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/additionalviewcontainer/AdditionalSystemViewContainer.kt27
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/extension/TaskInfo.kt11
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/AppHandleViewHolder.kt89
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/AppHeaderViewHolder.kt9
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/WindowDecorationViewHolder.kt9
-rw-r--r--libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/desktopmode/flicker/DesktopModeFlickerScenarios.kt136
-rw-r--r--libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/desktopmode/scenarios/DragAppWindowMultiWindow.kt66
-rw-r--r--libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/desktopmode/scenarios/DragAppWindowScenarioTestBase.kt55
-rw-r--r--libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/desktopmode/scenarios/DragAppWindowSingleWindow.kt53
-rw-r--r--libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/desktopmode/scenarios/EnterDesktopWithAppHandleMenu.kt59
-rw-r--r--libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/desktopmode/scenarios/ExitDesktopWithDragToTopDragZone.kt68
-rw-r--r--libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/desktopmode/scenarios/SwitchToOverviewFromDesktop.kt70
-rw-r--r--libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/SwitchAppByDoubleTapDivider.kt5
-rw-r--r--libs/WindowManager/Shell/tests/flicker/splitscreen/Android.bp4
-rw-r--r--libs/WindowManager/Shell/tests/unittest/Android.bp1
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/activityembedding/ActivityEmbeddingAnimationRunnerTests.java134
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/back/CustomCrossActivityBackAnimationTest.kt7
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/bubbles/BubbleDataTest.java46
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/common/split/DividerViewTest.java2
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/compatui/impl/DefaultCompatUIRepositoryTest.kt89
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/compatui/impl/FakeCompatUIRepository.kt39
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopModeTaskRepositoryTest.kt64
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopTasksControllerTest.kt763
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DragToDesktopTransitionHandlerTest.kt6
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/draganddrop/DragAndDropPolicyTest.java21
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/shared/desktopmode/DesktopModeFlagsTest.kt153
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/splitscreen/SplitScreenControllerTests.java36
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/splitscreen/SplitTestUtils.java5
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/splitscreen/SplitTransitionTests.java32
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/splitscreen/StageCoordinatorTests.java9
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/transition/DefaultTransitionHandlerTest.java74
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/transition/TransitionAnimationHelperTest.kt126
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/CaptionWindowDecorationTests.kt107
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModelTests.kt43
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorationTests.java87
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DragDetectorTest.kt63
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DragResizeWindowGeometryTests.java38
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/HandleMenuTest.kt108
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/WindowDecorationTests.java53
-rw-r--r--libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/additionalviewcontainer/AdditionalSystemViewContainerTest.kt4
-rw-r--r--libs/hwui/Android.bp10
-rw-r--r--libs/hwui/apex/LayoutlibLoader.cpp21
-rw-r--r--libs/hwui/hwui/DrawTextFunctor.h13
-rw-r--r--libs/hwui/jni/MeshSpecification.cpp2
-rw-r--r--libs/hwui/jni/android_graphics_HardwareBufferRenderer.cpp2
-rw-r--r--libs/hwui/tests/common/TestUtils.cpp1
-rw-r--r--libs/hwui/tests/common/TestUtils.h15
-rw-r--r--libs/hwui/tests/unit/RenderNodeTests.cpp5
-rw-r--r--libs/hwui/tests/unit/SkiaDisplayListTests.cpp4
-rw-r--r--libs/hwui/tests/unit/WebViewFunctorManagerTests.cpp14
-rw-r--r--location/Android.bp3
-rw-r--r--location/java/android/location/flags/location.aconfig14
-rw-r--r--location/java/com/android/internal/location/package-info.java22
-rw-r--r--media/java/android/media/AudioManager.java15
-rw-r--r--media/java/android/media/AudioSystem.java11
-rw-r--r--media/java/android/media/AudioTrack.java1
-rw-r--r--media/java/android/media/IAudioService.aidl10
-rw-r--r--media/java/android/media/VolumePolicy.java19
-rw-r--r--media/java/android/media/projection/MediaProjection.java20
-rw-r--r--media/java/android/media/projection/MediaProjectionManager.java45
-rw-r--r--media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/helpers/CameraTestUtils.java2
-rw-r--r--media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraBinderTest.java7
-rw-r--r--media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraDeviceBinderTest.java4
-rw-r--r--media/tests/mediatestutils/java/com/android/media/mediatestutils/TestUtils.java77
-rw-r--r--nfc/Android.bp3
-rw-r--r--nfc/java/android/nfc/AvailableNfcAntenna.java8
-rw-r--r--nfc/java/android/nfc/INfcAdapter.aidl1
-rw-r--r--nfc/java/android/nfc/NfcAdapter.java465
-rw-r--r--nfc/java/android/nfc/NfcAntennaInfo.java4
-rw-r--r--packages/BackupRestoreConfirmation/res/values-el/strings.xml2
-rw-r--r--packages/CarrierDefaultApp/res/values-fr-rCA/strings.xml2
-rw-r--r--packages/CompanionDeviceManager/res/values-fr-rCA/strings.xml34
-rw-r--r--packages/CompanionDeviceManager/src/com/android/companiondevicemanager/CompanionAssociationActivity.java18
-rw-r--r--packages/CrashRecovery/aconfig/flags.aconfig8
-rw-r--r--packages/CredentialManager/res/values-el/strings.xml2
-rw-r--r--packages/CredentialManager/res/values-fr-rCA/strings.xml4
-rw-r--r--packages/CredentialManager/res/values-iw/strings.xml2
-rw-r--r--packages/CredentialManager/res/values-pa/strings.xml2
-rw-r--r--packages/CredentialManager/wear/res/values-af/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-am/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-ar/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-as/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-az/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-b+sr+Latn/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-be/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-bg/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-bn/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-bs/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-ca/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-cs/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-da/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-de/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-el/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-en-rAU/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-en-rCA/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-en-rGB/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-en-rIN/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-en-rXC/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-es-rUS/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-es/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-et/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-eu/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-fa/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-fi/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-fr-rCA/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-fr/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-gl/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-gu/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-hi/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-hr/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-hu/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-hy/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-in/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-is/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-it/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-iw/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-ja/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-ka/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-kk/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-km/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-kn/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-ko/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-ky/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-lo/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-lt/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-lv/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-mk/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-ml/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-mn/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-mr/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-ms/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-my/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-nb/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-ne/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-nl/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-or/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-pa/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-pl/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-pt-rPT/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-pt/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-ro/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-ru/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-si/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-sk/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-sl/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-sq/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-sr/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-sv/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-sw/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-ta/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-te/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-th/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-tl/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-tr/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-uk/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-ur/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-uz/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-vi/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-zh-rCN/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-zh-rHK/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-zh-rTW/strings.xml34
-rw-r--r--packages/CredentialManager/wear/res/values-zu/strings.xml34
-rw-r--r--packages/InputDevices/res/values-am/strings.xml6
-rw-r--r--packages/InputDevices/res/values-ar/strings.xml6
-rw-r--r--packages/InputDevices/res/values-as/strings.xml6
-rw-r--r--packages/InputDevices/res/values-az/strings.xml6
-rw-r--r--packages/InputDevices/res/values-b+sr+Latn/strings.xml6
-rw-r--r--packages/InputDevices/res/values-be/strings.xml6
-rw-r--r--packages/InputDevices/res/values-bg/strings.xml6
-rw-r--r--packages/InputDevices/res/values-bn/strings.xml6
-rw-r--r--packages/InputDevices/res/values-bs/strings.xml6
-rw-r--r--packages/InputDevices/res/values-ca/strings.xml6
-rw-r--r--packages/InputDevices/res/values-cs/strings.xml6
-rw-r--r--packages/InputDevices/res/values-da/strings.xml6
-rw-r--r--packages/InputDevices/res/values-de/strings.xml6
-rw-r--r--packages/InputDevices/res/values-el/strings.xml6
-rw-r--r--packages/InputDevices/res/values-en-rAU/strings.xml6
-rw-r--r--packages/InputDevices/res/values-en-rGB/strings.xml6
-rw-r--r--packages/InputDevices/res/values-en-rIN/strings.xml6
-rw-r--r--packages/InputDevices/res/values-es-rUS/strings.xml6
-rw-r--r--packages/InputDevices/res/values-es/strings.xml6
-rw-r--r--packages/InputDevices/res/values-et/strings.xml6
-rw-r--r--packages/InputDevices/res/values-eu/strings.xml6
-rw-r--r--packages/InputDevices/res/values-fa/strings.xml6
-rw-r--r--packages/InputDevices/res/values-fi/strings.xml6
-rw-r--r--packages/InputDevices/res/values-fr-rCA/strings.xml6
-rw-r--r--packages/InputDevices/res/values-fr/strings.xml6
-rw-r--r--packages/InputDevices/res/values-gu/strings.xml6
-rw-r--r--packages/InputDevices/res/values-hi/strings.xml6
-rw-r--r--packages/InputDevices/res/values-hr/strings.xml6
-rw-r--r--packages/InputDevices/res/values-hu/strings.xml6
-rw-r--r--packages/InputDevices/res/values-hy/strings.xml6
-rw-r--r--packages/InputDevices/res/values-in/strings.xml6
-rw-r--r--packages/InputDevices/res/values-is/strings.xml6
-rw-r--r--packages/InputDevices/res/values-it/strings.xml6
-rw-r--r--packages/InputDevices/res/values-iw/strings.xml6
-rw-r--r--packages/InputDevices/res/values-ja/strings.xml6
-rw-r--r--packages/InputDevices/res/values-ka/strings.xml6
-rw-r--r--packages/InputDevices/res/values-kk/strings.xml6
-rw-r--r--packages/InputDevices/res/values-km/strings.xml6
-rw-r--r--packages/InputDevices/res/values-kn/strings.xml6
-rw-r--r--packages/InputDevices/res/values-ko/strings.xml6
-rw-r--r--packages/InputDevices/res/values-ky/strings.xml6
-rw-r--r--packages/InputDevices/res/values-lo/strings.xml6
-rw-r--r--packages/InputDevices/res/values-lt/strings.xml6
-rw-r--r--packages/InputDevices/res/values-lv/strings.xml6
-rw-r--r--packages/InputDevices/res/values-mk/strings.xml6
-rw-r--r--packages/InputDevices/res/values-ml/strings.xml6
-rw-r--r--packages/InputDevices/res/values-mn/strings.xml6
-rw-r--r--packages/InputDevices/res/values-mr/strings.xml6
-rw-r--r--packages/InputDevices/res/values-ms/strings.xml6
-rw-r--r--packages/InputDevices/res/values-my/strings.xml6
-rw-r--r--packages/InputDevices/res/values-nb/strings.xml6
-rw-r--r--packages/InputDevices/res/values-ne/strings.xml6
-rw-r--r--packages/InputDevices/res/values-nl/strings.xml6
-rw-r--r--packages/InputDevices/res/values-or/strings.xml6
-rw-r--r--packages/InputDevices/res/values-pa/strings.xml6
-rw-r--r--packages/InputDevices/res/values-pl/strings.xml6
-rw-r--r--packages/InputDevices/res/values-pt-rBR/strings.xml6
-rw-r--r--packages/InputDevices/res/values-pt-rPT/strings.xml6
-rw-r--r--packages/InputDevices/res/values-pt/strings.xml6
-rw-r--r--packages/InputDevices/res/values-ro/strings.xml6
-rw-r--r--packages/InputDevices/res/values-ru/strings.xml6
-rw-r--r--packages/InputDevices/res/values-si/strings.xml6
-rw-r--r--packages/InputDevices/res/values-sk/strings.xml6
-rw-r--r--packages/InputDevices/res/values-sl/strings.xml6
-rw-r--r--packages/InputDevices/res/values-sq/strings.xml6
-rw-r--r--packages/InputDevices/res/values-sr/strings.xml6
-rw-r--r--packages/InputDevices/res/values-sv/strings.xml6
-rw-r--r--packages/InputDevices/res/values-sw/strings.xml6
-rw-r--r--packages/InputDevices/res/values-ta/strings.xml6
-rw-r--r--packages/InputDevices/res/values-te/strings.xml6
-rw-r--r--packages/InputDevices/res/values-th/strings.xml6
-rw-r--r--packages/InputDevices/res/values-tl/strings.xml6
-rw-r--r--packages/InputDevices/res/values-tr/strings.xml6
-rw-r--r--packages/InputDevices/res/values-uk/strings.xml6
-rw-r--r--packages/InputDevices/res/values-ur/strings.xml6
-rw-r--r--packages/InputDevices/res/values-uz/strings.xml6
-rw-r--r--packages/InputDevices/res/values-vi/strings.xml6
-rw-r--r--packages/InputDevices/res/values-zh-rCN/strings.xml6
-rw-r--r--packages/InputDevices/res/values-zh-rHK/strings.xml6
-rw-r--r--packages/InputDevices/res/values-zh-rTW/strings.xml6
-rw-r--r--packages/InputDevices/res/values-zu/strings.xml6
-rw-r--r--packages/PackageInstaller/res/values-fr-rCA/strings.xml110
-rw-r--r--packages/PackageInstaller/src/com/android/packageinstaller/v2/model/InstallRepository.kt61
-rw-r--r--packages/PackageInstaller/src/com/android/packageinstaller/v2/model/InstallStages.kt22
-rw-r--r--packages/PackageInstaller/src/com/android/packageinstaller/v2/model/PackageUtil.kt4
-rw-r--r--packages/PackageInstaller/src/com/android/packageinstaller/v2/ui/InstallLaunch.kt13
-rw-r--r--packages/PrintSpooler/res/values-fr-rCA/strings.xml2
-rw-r--r--packages/SettingsLib/AppPreference/res/values-fr-rCA/strings.xml2
-rw-r--r--packages/SettingsLib/CollapsingToolbarBaseActivity/Android.bp1
-rw-r--r--packages/SettingsLib/CollapsingToolbarBaseActivity/src/com/android/settingslib/collapsingtoolbar/CollapsingToolbarAppCompatActivity.java1
-rw-r--r--packages/SettingsLib/CollapsingToolbarBaseActivity/src/com/android/settingslib/collapsingtoolbar/CollapsingToolbarBaseActivity.java1
-rw-r--r--packages/SettingsLib/CollapsingToolbarBaseActivity/src/com/android/settingslib/collapsingtoolbar/EdgeToEdgeUtils.java62
-rw-r--r--packages/SettingsLib/IllustrationPreference/src/com/android/settingslib/widget/IllustrationPreference.java10
-rw-r--r--packages/SettingsLib/LayoutPreference/res/layout/settings_entity_header.xml27
-rw-r--r--packages/SettingsLib/LayoutPreference/res/values/styles.xml35
-rw-r--r--packages/SettingsLib/SettingsTheme/res/values-v35/themes.xml3
-rw-r--r--packages/SettingsLib/Spa/build.gradle.kts2
-rw-r--r--packages/SettingsLib/Spa/gallery/AndroidManifest.xml14
-rw-r--r--packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/GallerySpaEnvironment.kt3
-rw-r--r--packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/preference/PreferencePageProvider.kt93
-rw-r--r--packages/SettingsLib/Spa/gradle/libs.versions.toml2
-rw-r--r--packages/SettingsLib/Spa/gradle/wrapper/gradle-8.9-bin.zip (renamed from packages/SettingsLib/Spa/gradle/wrapper/gradle-8.8-bin.zip)bin138039528 -> 136114148 bytes
-rw-r--r--packages/SettingsLib/Spa/gradle/wrapper/gradle-wrapper.jarbin43453 -> 43504 bytes
-rw-r--r--packages/SettingsLib/Spa/gradle/wrapper/gradle-wrapper.properties2
-rwxr-xr-xpackages/SettingsLib/Spa/gradlew5
-rw-r--r--packages/SettingsLib/Spa/spa/Android.bp3
-rw-r--r--packages/SettingsLib/Spa/spa/build.gradle.kts13
-rw-r--r--packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/debug/DebugActivity.kt23
-rw-r--r--packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/debug/DebugFormat.kt1
-rw-r--r--packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/common/EntrySliceData.kt58
-rw-r--r--packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/common/SettingsEntry.kt15
-rw-r--r--packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/common/SettingsEntryBuilder.kt12
-rw-r--r--packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/common/SettingsPageProvider.kt4
-rw-r--r--packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/common/SpaEnvironment.kt8
-rw-r--r--packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/util/SpaIntent.kt1
-rw-r--r--packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/search/SpaSearchContract.kt5
-rw-r--r--packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/search/SpaSearchProvider.kt12
-rw-r--r--packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/slice/SettingsSliceDataRepository.kt57
-rw-r--r--packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/slice/SliceUtil.kt150
-rw-r--r--packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/slice/SpaSliceBroadcastReceiver.kt31
-rw-r--r--packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/slice/SpaSliceProvider.kt77
-rw-r--r--packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/slice/presenter/Demo.kt47
-rw-r--r--packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/slice/provider/Demo.kt60
-rw-r--r--packages/SettingsLib/Spa/tests/src/com/android/settingslib/spa/framework/common/SettingsEntryTest.kt31
-rw-r--r--packages/SettingsLib/Spa/tests/src/com/android/settingslib/spa/slice/SettingsSliceDataRepositoryTest.kt97
-rw-r--r--packages/SettingsLib/Spa/tests/src/com/android/settingslib/spa/slice/SliceUtilTest.kt106
-rw-r--r--packages/SettingsLib/Spa/tests/src/com/android/settingslib/spa/tests/testutils/SpaEnvironmentForTest.kt18
-rw-r--r--packages/SettingsLib/SpaPrivileged/res/values-fr-rCA/strings.xml2
-rw-r--r--packages/SettingsLib/SpaPrivileged/src/com/android/settingslib/spaprivileged/template/preference/RestrictedSwitchPreferenceModel.kt2
-rw-r--r--packages/SettingsLib/Tile/src/com/android/settingslib/drawer/TileUtils.java39
-rw-r--r--packages/SettingsLib/aconfig/settingslib.aconfig10
-rw-r--r--packages/SettingsLib/res/layout/zen_mode_duration_dialog.xml4
-rw-r--r--packages/SettingsLib/res/values-af/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-am/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-ar/strings.xml4
-rw-r--r--packages/SettingsLib/res/values-as/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-az/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-b+sr+Latn/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-be/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-bg/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-bn/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-bs/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-ca/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-cs/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-da/arrays.xml4
-rw-r--r--packages/SettingsLib/res/values-da/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-de/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-el/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-en-rAU/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-en-rCA/strings.xml4
-rw-r--r--packages/SettingsLib/res/values-en-rGB/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-en-rIN/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-en-rXC/strings.xml4
-rw-r--r--packages/SettingsLib/res/values-es-rUS/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-es/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-et/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-eu/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-fa/strings.xml24
-rw-r--r--packages/SettingsLib/res/values-fi/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-fr-rCA/strings.xml102
-rw-r--r--packages/SettingsLib/res/values-fr/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-gl/strings.xml4
-rw-r--r--packages/SettingsLib/res/values-gu/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-hi/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-hr/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-hu/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-hy/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-in/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-is/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-it/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-iw/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-ja/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-ka/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-kk/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-km/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-kn/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-ko/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-ky/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-lo/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-lt/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-lv/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-mk/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-ml/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-mn/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-mr/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-ms/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-my/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-nb/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-ne/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-nl/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-or/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-pa/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-pl/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-pt-rBR/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-pt-rPT/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-pt/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-ro/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-ru/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-si/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-sk/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-sl/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-sq/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-sr/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-sv/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-sw/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-ta/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-te/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-th/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-tl/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-tr/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-uk/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-ur/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-uz/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-vi/strings.xml24
-rw-r--r--packages/SettingsLib/res/values-zh-rCN/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-zh-rHK/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-zh-rTW/strings.xml22
-rw-r--r--packages/SettingsLib/res/values-zu/strings.xml22
-rw-r--r--packages/SettingsLib/res/values/strings.xml6
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManagerExt.kt39
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothLeBroadcastAssistantCallbackExt.kt85
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/bluetooth/ProfileConnectionState.kt23
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/fuelgauge/BatterySaverUtils.java39
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/fuelgauge/BatteryUtils.java6
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/media/RouterInfoMediaManager.java23
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/mobile/dataservice/DataServiceUtils.java134
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/mobile/dataservice/MobileNetworkDatabase.java14
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/mobile/dataservice/SubscriptionInfoDao.java9
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/mobile/dataservice/SubscriptionInfoEntity.java136
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/mobile/dataservice/UiccInfoDao.java12
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/mobile/dataservice/UiccInfoEntity.java74
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/notification/data/repository/FakeZenModeRepository.kt47
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/notification/data/repository/ZenModeRepository.kt114
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/notification/modes/TestModeBuilder.java183
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/notification/modes/ZenMode.java6
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/volume/data/repository/AudioSharingRepository.kt169
-rw-r--r--packages/SettingsLib/tests/integ/src/com/android/settingslib/inputmethod/InputMethodPreferenceTest.java9
-rw-r--r--packages/SettingsLib/tests/integ/src/com/android/settingslib/inputmethod/InputMethodSubtypePreferenceTest.java6
-rw-r--r--packages/SettingsLib/tests/integ/src/com/android/settingslib/volume/data/repository/AudioSharingRepositoryTest.kt324
-rw-r--r--packages/SettingsLib/tests/robotests/src/com/android/settingslib/fuelgauge/BatterySaverUtilsTest.java63
-rw-r--r--packages/SettingsLib/tests/robotests/src/com/android/settingslib/fuelgauge/BatteryUtilsTest.java22
-rw-r--r--packages/SettingsLib/tests/robotests/src/com/android/settingslib/notification/data/repository/ZenModeRepositoryTest.kt114
-rw-r--r--packages/SettingsLib/tests/robotests/src/com/android/settingslib/notification/modes/ZenModeTest.java2
-rw-r--r--packages/SettingsProvider/src/android/provider/settings/backup/SecureSettings.java2
-rw-r--r--packages/SettingsProvider/src/android/provider/settings/validators/SecureSettingsValidators.java3
-rw-r--r--packages/SettingsProvider/src/com/android/providers/settings/DeviceConfigService.java28
-rw-r--r--packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java20
-rw-r--r--packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java16
-rw-r--r--packages/SettingsProvider/src/com/android/providers/settings/device_config_service.aconfig11
-rw-r--r--packages/SettingsProvider/test/src/com/android/providers/settings/DeviceConfigServiceTest.java17
-rw-r--r--packages/SettingsProvider/test/src/com/android/providers/settings/SettingsStateTest.java35
-rw-r--r--packages/Shell/res/values-fr-rCA/strings.xml2
-rw-r--r--packages/Shell/res/values-nb/strings.xml2
-rw-r--r--packages/SimAppDialog/res/values-fr-rCA/strings.xml6
-rw-r--r--packages/SystemUI/Android.bp14
-rw-r--r--packages/SystemUI/accessibility/accessibilitymenu/res/values-bn/strings.xml2
-rw-r--r--packages/SystemUI/accessibility/accessibilitymenu/res/values-fr-rCA/strings.xml2
-rw-r--r--packages/SystemUI/accessibility/accessibilitymenu/res/values-hi/strings.xml2
-rw-r--r--packages/SystemUI/accessibility/accessibilitymenu/res/values-hr/strings.xml4
-rw-r--r--packages/SystemUI/accessibility/accessibilitymenu/res/values-nb/strings.xml2
-rw-r--r--packages/SystemUI/accessibility/accessibilitymenu/res/values-nl/strings.xml2
-rw-r--r--packages/SystemUI/accessibility/accessibilitymenu/res/values-sk/strings.xml4
-rw-r--r--packages/SystemUI/aconfig/communal.aconfig9
-rw-r--r--packages/SystemUI/aconfig/systemui.aconfig107
-rw-r--r--packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/BouncerContent.kt24
-rw-r--r--packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalContainer.kt4
-rw-r--r--packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalHub.kt162
-rw-r--r--packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/DragAndDropTargetState.kt126
-rw-r--r--packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/section/CommunalPopupSection.kt21
-rw-r--r--packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/LockscreenContent.kt11
-rw-r--r--packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/LockscreenLongPress.kt2
-rw-r--r--packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/blueprint/DefaultBlueprint.kt7
-rw-r--r--packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/blueprint/ShortcutsBesideUdfpsBlueprint.kt7
-rw-r--r--packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/NotificationSection.kt20
-rw-r--r--packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/StatusBarSection.kt38
-rw-r--r--packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/TopAreaSection.kt25
-rw-r--r--packages/SystemUI/compose/features/src/com/android/systemui/media/controls/ui/composable/MediaCarousel.kt77
-rw-r--r--packages/SystemUI/compose/features/src/com/android/systemui/media/controls/ui/composable/MediaScenePicker.kt72
-rw-r--r--packages/SystemUI/compose/features/src/com/android/systemui/notifications/ui/composable/Notifications.kt10
-rw-r--r--packages/SystemUI/compose/features/src/com/android/systemui/qs/ui/composable/QuickSettingsScene.kt5
-rw-r--r--packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/transitions/ToShadeTransition.kt13
-rw-r--r--packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/ShadeScene.kt30
-rw-r--r--packages/SystemUI/compose/features/src/com/android/systemui/statusbar/ui/composable/StatusBar.kt43
-rw-r--r--packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/AnimateToScene.kt4
-rw-r--r--packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/DraggableHandler.kt113
-rw-r--r--packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/EdgeDetector.kt24
-rw-r--r--packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/MultiPointerDraggable.kt88
-rw-r--r--packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/NestedScrollToScene.kt129
-rw-r--r--packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/PredictiveBackHandler.kt21
-rw-r--r--packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/PunchHole.kt178
-rw-r--r--packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/Scene.kt6
-rw-r--r--packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayout.kt132
-rw-r--r--packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayoutImpl.kt19
-rw-r--r--packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayoutState.kt178
-rw-r--r--packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SwipeToScene.kt78
-rw-r--r--packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/EdgeTranslate.kt10
-rw-r--r--packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transition/link/StateLink.kt4
-rw-r--r--packages/SystemUI/compose/scene/src/com/android/systemui/communal/ui/compose/CommunalSwipeDetector.kt (renamed from packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/CommunalSwipeDetector.kt)12
-rw-r--r--packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/DraggableHandlerTest.kt82
-rw-r--r--packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/ElementTest.kt56
-rw-r--r--packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/MultiPointerDraggableTest.kt102
-rw-r--r--packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/NestedScrollToSceneTest.kt269
-rw-r--r--packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/ObservableTransitionStateTest.kt19
-rw-r--r--packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/PredictiveBackHandlerTest.kt159
-rw-r--r--packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/SceneTransitionLayoutStateTest.kt12
-rw-r--r--packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/SceneTransitionLayoutTest.kt147
-rw-r--r--packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/SwipeToSceneTest.kt152
-rw-r--r--packages/SystemUI/compose/scene/tests/utils/src/com/android/compose/animation/scene/TestSceneScope.kt10
-rw-r--r--packages/SystemUI/compose/scene/tests/utils/src/com/android/compose/animation/scene/TestTransition.kt56
-rw-r--r--packages/SystemUI/customization/src/com/android/systemui/shared/clocks/ClockRegistry.kt9
-rw-r--r--packages/SystemUI/customization/src/com/android/systemui/shared/clocks/DefaultClockProvider.kt13
-rw-r--r--packages/SystemUI/lint-baseline.xml33
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/ambient/touch/ShadeTouchHandlerTest.java187
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/ambient/touch/ShadeTouchHandlerTest.kt188
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/bouncer/domain/interactor/PrimaryBouncerInteractorTest.kt6
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/bouncer/ui/viewmodel/BouncerMessageViewModelTest.kt20
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/communal/CommunalBackupRestoreStartableTest.kt81
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/communal/CommunalDreamStartableTest.kt6
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/communal/CommunalOngoingContentStartableTest.kt89
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/communal/CommunalSceneStartableTest.kt51
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/communal/data/db/DefaultWidgetPopulationTest.kt157
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/communal/data/repository/CommunalMediaRepositoryImplTest.kt35
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/communal/data/repository/CommunalPrefsRepositoryImplTest.kt18
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/communal/data/repository/CommunalSettingsRepositoryImplTest.kt32
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/communal/data/repository/CommunalSmartspaceRepositoryImplTest.kt319
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/communal/data/repository/CommunalWidgetRepositoryImplTest.kt259
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/communal/domain/interactor/CommunalInteractorTest.kt91
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/communal/domain/interactor/CommunalPrefsInteractorTest.kt34
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/communal/domain/interactor/CommunalSceneTransitionInteractorTest.kt685
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/communal/domain/interactor/CommunalSettingsInteractorTest.kt126
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/communal/smartspace/SmartspaceInteractionHandlerTest.kt60
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/communal/view/viewmodel/CommunalEditModeViewModelTest.kt57
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/communal/view/viewmodel/CommunalViewModelTest.kt74
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/communal/widgets/CommunalTransitionAnimatorControllerTest.kt128
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/communal/widgets/WidgetInteractionHandlerTest.kt61
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/deviceentry/data/repository/DeviceEntryFaceAuthRepositoryTest.kt25
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryInteractorTest.kt240
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/deviceentry/domain/interactor/DeviceUnlockedInteractorTest.kt258
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/dreams/DreamOverlayAnimationsControllerTest.kt8
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/dreams/DreamOverlayServiceTest.kt22
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/education/data/repository/ContextualEducationRepositoryTest.kt107
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/education/domain/interactor/KeyboardTouchpadStatsInteractorTest.kt63
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/haptics/qs/QSLongPressEffectTest.kt128
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/domain/interactor/FromDozingTransitionInteractorTest.kt64
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/domain/interactor/KeyguardClockInteractorTest.kt39
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTouchHandlingInteractorTest.kt9
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionScenariosTest.kt (renamed from packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionScenariosTest.kt)389
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/AodAlphaViewModelTest.kt7
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/AodBurnInViewModelTest.kt68
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenContentViewModelTest.kt123
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenSceneViewModelTest.kt9
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/PrimaryBouncerToGoneTransitionViewModelTest.kt5
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/ui/viewmodel/MediaCarouselViewModelTest.kt67
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/qs/SettingObserverTest.kt117
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/data/repository/QSPreferencesRepositoryTest.kt78
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/domain/interactor/GridConsistencyInteractorTest.kt27
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/domain/interactor/IconTilesInteractorTest.kt86
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/domain/interactor/InfiniteGridConsistencyInteractorTest.kt26
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/ui/compose/DragAndDropStateTest.kt14
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/ui/compose/InfiniteGridLayoutTest.kt12
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/ui/compose/PartitionedGridLayoutTest.kt12
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/ui/viewmodel/QuickQuickSettingsViewModelTest.kt27
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/airplane/domain/interactor/AirplaneModeTileDataInteractorTest.kt (renamed from packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/airplate/domain/interactor/AirplaneModeTileDataInteractorTest.kt)3
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/airplane/domain/interactor/AirplaneModeTileUserActionInteractorTest.kt (renamed from packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/airplate/domain/interactor/AirplaneModeTileUserActionInteractorTest.kt)5
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/modes/domain/interactor/ModesTileDataInteractorTest.kt93
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/modes/domain/interactor/ModesTileUserActionInteractorTest.kt84
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/modes/ui/ModesTileMapperTest.kt74
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/reducebrightness/domain/interactor/ReduceBrightColorsTileDataInteractorTest.kt4
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/reducebrightness/domain/interactor/ReduceBrightColorsTileUserActionInteractorTest.kt72
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/qs/ui/adapter/QSSceneAdapterImplTest.kt5
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/scene/domain/interactor/SceneInteractorTest.kt4
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/scene/domain/startable/SceneContainerStartableTest.kt67
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/scene/ui/viewmodel/GoneSceneViewModelTest.kt5
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/shade/domain/interactor/ShadeInteractorImplTest.kt45
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/shade/domain/interactor/ShadeInteractorSceneContainerImplTest.kt18
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/shade/ui/viewmodel/ShadeSceneViewModelTest.kt14
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/collection/coordinator/LockScreenMinimalismCoordinatorTest.kt510
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/collection/coordinator/OriginalUnseenKeyguardCoordinatorTest.kt683
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/collection/coordinator/VisualStabilityCoordinatorTest.java73
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/domain/interactor/HeadsUpNotificationInteractorTest.kt1
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/row/ui/viewmodel/TimerViewModelTest.kt7
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/stack/domain/interactor/NotificationStackAppearanceInteractorTest.kt5
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationListViewModelTest.kt5
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModelTest.kt31
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/phone/ActivityStarterImplTest.kt1
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/phone/LegacyActivityStarterInternalImplTest.kt148
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/policy/AvalancheControllerTest.kt17
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/policy/HeadsUpManagerPhoneTest.java243
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/policy/HeadsUpManagerPhoneTest.kt472
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/policy/ui/dialog/viewmodel/ModesDialogViewModelTest.kt164
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/util/service/PersistentConnectionManagerTest.kt236
-rw-r--r--packages/SystemUI/multivalentTests/src/com/android/systemui/volume/domain/interactor/AudioSharingInteractorTest.kt100
-rw-r--r--packages/SystemUI/plugin/src/com/android/systemui/plugins/VolumeDialog.java1
-rw-r--r--packages/SystemUI/plugin/src/com/android/systemui/plugins/clocks/ClockProviderPlugin.kt26
-rw-r--r--packages/SystemUI/res-product/values-fr-rCA/strings.xml6
-rw-r--r--packages/SystemUI/res-product/values-or/strings.xml2
-rw-r--r--packages/SystemUI/res/drawable/checkbox_circle_shape.xml32
-rw-r--r--packages/SystemUI/res/drawable/ic_check_circle_filled_24dp.xml27
-rw-r--r--packages/SystemUI/res/drawable/ic_circle_outline_24dp.xml27
-rw-r--r--packages/SystemUI/res/layout/app_clips_screenshot.xml3
-rw-r--r--packages/SystemUI/res/layout/clipboard_overlay.xml32
-rw-r--r--packages/SystemUI/res/layout/clipboard_overlay2.xml202
-rw-r--r--packages/SystemUI/res/layout/keyboard_shortcuts_search_view.xml2
-rw-r--r--packages/SystemUI/res/layout/overlay_action_chip.xml47
-rw-r--r--packages/SystemUI/res/layout/rich_ongoing_timer_notification.xml20
-rw-r--r--packages/SystemUI/res/layout/screen_share_dialog.xml2
-rw-r--r--packages/SystemUI/res/layout/screenshot.xml40
-rw-r--r--packages/SystemUI/res/layout/screenshot_static.xml162
-rw-r--r--packages/SystemUI/res/layout/window_magnification_settings_view.xml8
-rw-r--r--packages/SystemUI/res/values-af/strings.xml71
-rw-r--r--packages/SystemUI/res/values-af/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-am/strings.xml85
-rw-r--r--packages/SystemUI/res/values-am/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-ar/strings.xml80
-rw-r--r--packages/SystemUI/res/values-ar/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-as/strings.xml84
-rw-r--r--packages/SystemUI/res/values-as/tiles_states_strings.xml5
-rw-r--r--packages/SystemUI/res/values-az/strings.xml85
-rw-r--r--packages/SystemUI/res/values-az/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-b+sr+Latn/strings.xml92
-rw-r--r--packages/SystemUI/res/values-b+sr+Latn/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-be/strings.xml87
-rw-r--r--packages/SystemUI/res/values-be/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-bg/strings.xml85
-rw-r--r--packages/SystemUI/res/values-bg/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-bn/strings.xml84
-rw-r--r--packages/SystemUI/res/values-bn/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-bs/strings.xml92
-rw-r--r--packages/SystemUI/res/values-bs/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-ca/strings.xml93
-rw-r--r--packages/SystemUI/res/values-ca/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-cs/strings.xml89
-rw-r--r--packages/SystemUI/res/values-cs/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-da/strings.xml85
-rw-r--r--packages/SystemUI/res/values-da/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-de/strings.xml97
-rw-r--r--packages/SystemUI/res/values-de/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-el/strings.xml85
-rw-r--r--packages/SystemUI/res/values-el/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-en-rAU/strings.xml85
-rw-r--r--packages/SystemUI/res/values-en-rAU/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-en-rCA/strings.xml37
-rw-r--r--packages/SystemUI/res/values-en-rCA/tiles_states_strings.xml5
-rw-r--r--packages/SystemUI/res/values-en-rGB/strings.xml85
-rw-r--r--packages/SystemUI/res/values-en-rGB/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-en-rIN/strings.xml85
-rw-r--r--packages/SystemUI/res/values-en-rIN/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-en-rXC/strings.xml37
-rw-r--r--packages/SystemUI/res/values-en-rXC/tiles_states_strings.xml5
-rw-r--r--packages/SystemUI/res/values-es-rUS/strings.xml99
-rw-r--r--packages/SystemUI/res/values-es-rUS/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-es/strings.xml87
-rw-r--r--packages/SystemUI/res/values-es/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-et/strings.xml85
-rw-r--r--packages/SystemUI/res/values-et/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-eu/strings.xml87
-rw-r--r--packages/SystemUI/res/values-eu/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-fa/strings.xml84
-rw-r--r--packages/SystemUI/res/values-fa/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-fi/strings.xml85
-rw-r--r--packages/SystemUI/res/values-fi/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-fr-rCA-ldrtl/strings.xml2
-rw-r--r--packages/SystemUI/res/values-fr-rCA/strings.xml281
-rw-r--r--packages/SystemUI/res/values-fr-rCA/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-fr/strings.xml85
-rw-r--r--packages/SystemUI/res/values-fr/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-gl/strings.xml50
-rw-r--r--packages/SystemUI/res/values-gl/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-gu/strings.xml82
-rw-r--r--packages/SystemUI/res/values-gu/tiles_states_strings.xml5
-rw-r--r--packages/SystemUI/res/values-hi/strings.xml76
-rw-r--r--packages/SystemUI/res/values-hi/tiles_states_strings.xml5
-rw-r--r--packages/SystemUI/res/values-hr/strings.xml93
-rw-r--r--packages/SystemUI/res/values-hr/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-hu/strings.xml97
-rw-r--r--packages/SystemUI/res/values-hu/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-hy/strings.xml93
-rw-r--r--packages/SystemUI/res/values-hy/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-in/strings.xml85
-rw-r--r--packages/SystemUI/res/values-in/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-is/strings.xml87
-rw-r--r--packages/SystemUI/res/values-is/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-it/strings.xml80
-rw-r--r--packages/SystemUI/res/values-it/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-iw/strings.xml82
-rw-r--r--packages/SystemUI/res/values-iw/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-ja/strings.xml87
-rw-r--r--packages/SystemUI/res/values-ja/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-ka/strings.xml84
-rw-r--r--packages/SystemUI/res/values-ka/tiles_states_strings.xml5
-rw-r--r--packages/SystemUI/res/values-kk/strings.xml85
-rw-r--r--packages/SystemUI/res/values-kk/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-km/strings.xml93
-rw-r--r--packages/SystemUI/res/values-km/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-kn/strings.xml84
-rw-r--r--packages/SystemUI/res/values-kn/tiles_states_strings.xml7
-rw-r--r--packages/SystemUI/res/values-ko/strings.xml89
-rw-r--r--packages/SystemUI/res/values-ko/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-ky/strings.xml93
-rw-r--r--packages/SystemUI/res/values-ky/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-lo/strings.xml93
-rw-r--r--packages/SystemUI/res/values-lo/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-lt/strings.xml85
-rw-r--r--packages/SystemUI/res/values-lt/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-lv/strings.xml87
-rw-r--r--packages/SystemUI/res/values-lv/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-mk/strings.xml97
-rw-r--r--packages/SystemUI/res/values-mk/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-ml/strings.xml92
-rw-r--r--packages/SystemUI/res/values-ml/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-mn/strings.xml87
-rw-r--r--packages/SystemUI/res/values-mn/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-mr/strings.xml84
-rw-r--r--packages/SystemUI/res/values-mr/tiles_states_strings.xml5
-rw-r--r--packages/SystemUI/res/values-ms/strings.xml84
-rw-r--r--packages/SystemUI/res/values-ms/tiles_states_strings.xml5
-rw-r--r--packages/SystemUI/res/values-my/strings.xml78
-rw-r--r--packages/SystemUI/res/values-my/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-nb/strings.xml87
-rw-r--r--packages/SystemUI/res/values-nb/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-ne/strings.xml86
-rw-r--r--packages/SystemUI/res/values-ne/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-nl/strings.xml94
-rw-r--r--packages/SystemUI/res/values-nl/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-or/strings.xml87
-rw-r--r--packages/SystemUI/res/values-or/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-pa/strings.xml85
-rw-r--r--packages/SystemUI/res/values-pa/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-pl/strings.xml87
-rw-r--r--packages/SystemUI/res/values-pl/tiles_states_strings.xml5
-rw-r--r--packages/SystemUI/res/values-pt-rBR/strings.xml86
-rw-r--r--packages/SystemUI/res/values-pt-rBR/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-pt-rPT/strings.xml84
-rw-r--r--packages/SystemUI/res/values-pt-rPT/tiles_states_strings.xml5
-rw-r--r--packages/SystemUI/res/values-pt/strings.xml86
-rw-r--r--packages/SystemUI/res/values-pt/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-ro/strings.xml85
-rw-r--r--packages/SystemUI/res/values-ro/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-ru/strings.xml93
-rw-r--r--packages/SystemUI/res/values-ru/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-si/strings.xml85
-rw-r--r--packages/SystemUI/res/values-si/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-sk/strings.xml85
-rw-r--r--packages/SystemUI/res/values-sk/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-sl/strings.xml90
-rw-r--r--packages/SystemUI/res/values-sl/tiles_states_strings.xml5
-rw-r--r--packages/SystemUI/res/values-sq/strings.xml97
-rw-r--r--packages/SystemUI/res/values-sq/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-sr/strings.xml92
-rw-r--r--packages/SystemUI/res/values-sr/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-sv/strings.xml85
-rw-r--r--packages/SystemUI/res/values-sv/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-sw/strings.xml85
-rw-r--r--packages/SystemUI/res/values-sw/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-ta/strings.xml93
-rw-r--r--packages/SystemUI/res/values-ta/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-te/strings.xml86
-rw-r--r--packages/SystemUI/res/values-te/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-th/strings.xml91
-rw-r--r--packages/SystemUI/res/values-th/tiles_states_strings.xml5
-rw-r--r--packages/SystemUI/res/values-tl/strings.xml91
-rw-r--r--packages/SystemUI/res/values-tl/tiles_states_strings.xml5
-rw-r--r--packages/SystemUI/res/values-tr/strings.xml85
-rw-r--r--packages/SystemUI/res/values-tr/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-uk/strings.xml97
-rw-r--r--packages/SystemUI/res/values-uk/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-ur/strings.xml90
-rw-r--r--packages/SystemUI/res/values-ur/tiles_states_strings.xml5
-rw-r--r--packages/SystemUI/res/values-uz/strings.xml87
-rw-r--r--packages/SystemUI/res/values-uz/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-vi/strings.xml85
-rw-r--r--packages/SystemUI/res/values-vi/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-zh-rCN/strings.xml85
-rw-r--r--packages/SystemUI/res/values-zh-rCN/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-zh-rHK/strings.xml79
-rw-r--r--packages/SystemUI/res/values-zh-rHK/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-zh-rTW/strings.xml85
-rw-r--r--packages/SystemUI/res/values-zh-rTW/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values-zu/strings.xml93
-rw-r--r--packages/SystemUI/res/values-zu/tiles_states_strings.xml3
-rw-r--r--packages/SystemUI/res/values/config.xml5
-rw-r--r--packages/SystemUI/res/values/dimens.xml1
-rw-r--r--packages/SystemUI/res/values/flags.xml5
-rw-r--r--packages/SystemUI/res/values/strings.xml106
-rw-r--r--packages/SystemUI/res/values/styles.xml1
-rw-r--r--packages/SystemUI/res/values/tiles_states_strings.xml10
-rw-r--r--packages/SystemUI/res/xml/large_screen_shade_header.xml1
-rw-r--r--packages/SystemUI/schemas/com.android.systemui.communal.data.db.CommunalDatabase/2.json81
-rw-r--r--packages/SystemUI/shared/src/com/android/systemui/shared/education/GestureType.kt21
-rw-r--r--packages/SystemUI/shared/src/com/android/systemui/shared/pip/PipSurfaceTransactionHelper.java11
-rw-r--r--packages/SystemUI/shared/src/com/android/systemui/shared/recents/ISystemUiProxy.aidl9
-rw-r--r--packages/SystemUI/shared/src/com/android/systemui/shared/system/ActivityManagerWrapper.java2
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardPinBasedInputViewController.java6
-rw-r--r--packages/SystemUI/src/com/android/systemui/Dependency.java3
-rw-r--r--packages/SystemUI/src/com/android/systemui/accessibility/MagnificationImpl.java15
-rw-r--r--packages/SystemUI/src/com/android/systemui/accessibility/MagnificationSettingsController.java8
-rw-r--r--packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnificationController.java49
-rw-r--r--packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnificationFrameSizePrefs.java40
-rw-r--r--packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnificationFrameSpec.kt46
-rw-r--r--packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnificationSettings.java52
-rw-r--r--packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnifierCallback.java7
-rw-r--r--packages/SystemUI/src/com/android/systemui/accessibility/floatingmenu/MenuViewLayer.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/accessibility/hearingaid/HearingDevicesDialogDelegate.java23
-rw-r--r--packages/SystemUI/src/com/android/systemui/ambient/touch/ShadeTouchHandler.java11
-rw-r--r--packages/SystemUI/src/com/android/systemui/ambient/touch/TouchMonitor.java9
-rw-r--r--packages/SystemUI/src/com/android/systemui/assist/ui/DefaultUiController.java9
-rw-r--r--packages/SystemUI/src/com/android/systemui/authentication/data/repository/AuthenticationRepository.kt1
-rw-r--r--packages/SystemUI/src/com/android/systemui/battery/BatteryMeterView.java11
-rw-r--r--packages/SystemUI/src/com/android/systemui/battery/BatteryMeterViewController.java3
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleController.kt182
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/FaceHelpMessageDebouncer.kt125
-rw-r--r--packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/BiometricViewBinder.kt10
-rw-r--r--packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/AlternateBouncerInteractor.kt7
-rw-r--r--packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/PrimaryBouncerInteractor.kt66
-rw-r--r--packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/BouncerMessageViewModel.kt10
-rw-r--r--packages/SystemUI/src/com/android/systemui/clipboardoverlay/ClipboardOverlayView.java106
-rw-r--r--packages/SystemUI/src/com/android/systemui/clipboardoverlay/DraggableConstraintLayout.java (renamed from packages/SystemUI/src/com/android/systemui/screenshot/DraggableConstraintLayout.java)0
-rw-r--r--packages/SystemUI/src/com/android/systemui/clipboardoverlay/dagger/ClipboardOverlayModule.java11
-rw-r--r--packages/SystemUI/src/com/android/systemui/common/ui/view/LongPressHandlingView.kt56
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/CommunalBackupRestoreStartable.kt58
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/CommunalDreamStartable.kt5
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/CommunalOngoingContentStartable.kt58
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/CommunalSceneStartable.kt34
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/dagger/CommunalModule.kt14
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/dagger/CommunalStartableModule.kt62
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/data/backup/CommunalBackupUtils.kt6
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/data/db/CommunalDatabase.kt27
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/data/db/CommunalEntities.kt23
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/data/db/CommunalWidgetDao.kt106
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/data/model/CommunalSmartspaceTimer.kt29
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalMediaRepository.kt53
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalPrefsRepository.kt16
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalSceneRepository.kt6
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalSceneTransitionRepository.kt32
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalSettingsRepository.kt20
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalSmartspaceRepository.kt123
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalSmartspaceRepositoryModule.kt (renamed from packages/SystemUI/src/com/android/systemui/smartspace/data/repository/SmartspaceRepositoryModule.kt)11
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalWidgetRepository.kt85
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/domain/interactor/CommunalInteractor.kt116
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/domain/interactor/CommunalPrefsInteractor.kt22
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/domain/interactor/CommunalSceneInteractor.kt56
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/domain/interactor/CommunalSceneTransitionInteractor.kt293
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/domain/interactor/CommunalSettingsInteractor.kt27
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/proto/communal_hub_state.proto3
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/smartspace/SmartspaceInteractionHandler.kt20
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/BaseCommunalViewModel.kt47
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalEditModeViewModel.kt52
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalViewModel.kt20
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/util/InteractionHandlerDelegate.kt14
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/widgets/CommunalTransitionAnimatorController.kt58
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/widgets/CommunalWidgetModule.kt6
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/widgets/EditWidgetsActivity.kt6
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/widgets/WidgetInteractionHandler.kt3
-rw-r--r--packages/SystemUI/src/com/android/systemui/controls/ui/DetailDialog.kt6
-rw-r--r--packages/SystemUI/src/com/android/systemui/dagger/FrameworkServicesModule.java29
-rw-r--r--packages/SystemUI/src/com/android/systemui/dagger/SystemUICoreStartableModule.kt98
-rw-r--r--packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java6
-rw-r--r--packages/SystemUI/src/com/android/systemui/deviceentry/data/repository/DeviceEntryFaceAuthRepository.kt26
-rw-r--r--packages/SystemUI/src/com/android/systemui/deviceentry/data/repository/DeviceEntryRepository.kt33
-rw-r--r--packages/SystemUI/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryFaceAuthStatusInteractor.kt95
-rw-r--r--packages/SystemUI/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryInteractor.kt131
-rw-r--r--packages/SystemUI/src/com/android/systemui/deviceentry/domain/interactor/DeviceUnlockedInteractor.kt124
-rw-r--r--packages/SystemUI/src/com/android/systemui/deviceentry/domain/interactor/SystemUIDeviceEntryFaceAuthInteractor.kt7
-rw-r--r--packages/SystemUI/src/com/android/systemui/display/data/repository/DisplayRepository.kt18
-rw-r--r--packages/SystemUI/src/com/android/systemui/doze/DozeHost.java3
-rw-r--r--packages/SystemUI/src/com/android/systemui/doze/DozeSensors.java16
-rw-r--r--packages/SystemUI/src/com/android/systemui/doze/DozeUi.java11
-rw-r--r--packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayAnimationsController.kt1
-rw-r--r--packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayService.java7
-rw-r--r--packages/SystemUI/src/com/android/systemui/dreams/homecontrols/TaskFragmentComponent.kt1
-rw-r--r--packages/SystemUI/src/com/android/systemui/education/dagger/ContextualEducationModule.kt102
-rw-r--r--packages/SystemUI/src/com/android/systemui/education/data/model/GestureEduModel.kt29
-rw-r--r--packages/SystemUI/src/com/android/systemui/education/data/repository/ContextualEducationRepository.kt66
-rw-r--r--packages/SystemUI/src/com/android/systemui/education/data/repository/UserContextualEducationRepository.kt142
-rw-r--r--packages/SystemUI/src/com/android/systemui/education/domain/interactor/ContextualEducationInteractor.kt54
-rw-r--r--packages/SystemUI/src/com/android/systemui/education/domain/interactor/KeyboardTouchpadEduStatsInteractor.kt55
-rw-r--r--packages/SystemUI/src/com/android/systemui/flags/FlagDependencies.kt11
-rw-r--r--packages/SystemUI/src/com/android/systemui/flags/Flags.kt6
-rw-r--r--packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java17
-rw-r--r--packages/SystemUI/src/com/android/systemui/haptics/qs/QSLongPressEffect.kt119
-rw-r--r--packages/SystemUI/src/com/android/systemui/inputdevice/data/repository/InputDeviceRepository.kt95
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyboard/data/repository/KeyboardRepository.kt54
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyboard/shortcut/ShortcutHelperModule.kt14
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/repository/ShortcutHelperCategoriesRepository.kt162
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/repository/ShortcutHelperKeys.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/source/AppCategoriesShortcutsSource.kt44
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/source/CurrentAppShortcutsSource.kt34
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/source/InputShortcutsSource.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyboard/shortcut/domain/interactor/ShortcutHelperCategoriesInteractor.kt16
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyboard/shortcut/extensions/KeyboardShortcutGroupExtensions.kt27
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyboard/shortcut/qualifiers/AppCategoriesShortcuts.kt21
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyboard/shortcut/qualifiers/CurrentAppShortcuts.kt21
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyboard/shortcut/shared/model/Shortcut.kt6
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyboard/shortcut/shared/model/ShortcutCategory.kt14
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyboard/shortcut/shared/model/ShortcutIcon.kt19
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyboard/shortcut/ui/composable/ShortcutHelper.kt147
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyboard/shortcut/ui/model/IconSource.kt22
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyboard/shortcut/ui/viewmodel/ShortcutHelperViewModel.kt17
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/KeyguardService.java9
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt21
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewConfigurator.kt18
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java72
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ResourceTrimmer.kt21
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/dagger/KeyguardModule.java6
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardRepository.kt31
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardTransitionRepository.kt5
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromAodTransitionInteractor.kt20
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromDozingTransitionInteractor.kt88
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromDreamingTransitionInteractor.kt61
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromGlanceableHubTransitionInteractor.kt117
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromLockscreenTransitionInteractor.kt18
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromOccludedTransitionInteractor.kt16
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromPrimaryBouncerTransitionInteractor.kt39
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardBlueprintInteractor.kt13
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardClockInteractor.kt16
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissActionInteractor.kt36
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardEnabledInteractor.kt14
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractor.kt20
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardOcclusionInteractor.kt4
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardSurfaceBehindInteractor.kt12
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardTouchHandlingInteractor.kt9
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardWakeDirectlyToGoneInteractor.kt372
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/TransitionInteractor.kt20
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/WindowManagerLockscreenVisibilityInteractor.kt59
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/shared/model/KeyguardState.kt16
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/DeviceEntryIconViewBinder.kt4
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardLongPressViewBinder.kt14
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardRootViewBinder.kt44
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/preview/KeyguardPreviewRenderer.kt1
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/preview/KeyguardRemotePreviewManager.kt11
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/view/SideFpsProgressBar.kt5
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/AccessibilityActionsSection.kt11
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/ClockSection.kt7
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/AlternateBouncerToGoneTransitionViewModel.kt1
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/BouncerToGoneFlows.kt19
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/DreamingToAodTransitionViewModel.kt8
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/GoneToGlanceableHubTransitionViewModel.kt3
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardClockViewModel.kt22
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModel.kt6
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardTouchHandlingViewModel.kt9
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenContentViewModel.kt58
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/PrimaryBouncerToGlanceableHubTransitionViewModel.kt6
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/PrimaryBouncerToGoneTransitionViewModel.kt4
-rw-r--r--packages/SystemUI/src/com/android/systemui/log/SessionTracker.java25
-rw-r--r--packages/SystemUI/src/com/android/systemui/log/dagger/LogModule.java14
-rw-r--r--packages/SystemUI/src/com/android/systemui/log/dagger/MediaLog.kt23
-rw-r--r--packages/SystemUI/src/com/android/systemui/log/dagger/VisualStabilityLog.kt (renamed from packages/SystemUI/src/com/android/systemui/log/dagger/MediaLoadingLog.kt)5
-rw-r--r--packages/SystemUI/src/com/android/systemui/media/RingtonePlayer.java29
-rw-r--r--packages/SystemUI/src/com/android/systemui/media/controls/domain/pipeline/MediaDataFilterImpl.kt32
-rw-r--r--packages/SystemUI/src/com/android/systemui/media/controls/shared/MediaLogger.kt (renamed from packages/SystemUI/src/com/android/systemui/media/controls/domain/pipeline/MediaLoadingLogger.kt)44
-rw-r--r--packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/MediaCarouselController.kt33
-rw-r--r--packages/SystemUI/src/com/android/systemui/media/controls/ui/viewmodel/MediaCarouselViewModel.kt12
-rw-r--r--packages/SystemUI/src/com/android/systemui/mediaprojection/MediaProjectionLog.kt25
-rw-r--r--packages/SystemUI/src/com/android/systemui/mediaprojection/MediaProjectionModule.kt13
-rw-r--r--packages/SystemUI/src/com/android/systemui/mediaprojection/data/model/MediaProjectionState.kt20
-rw-r--r--packages/SystemUI/src/com/android/systemui/mediaprojection/data/repository/MediaProjectionManagerRepository.kt106
-rw-r--r--packages/SystemUI/src/com/android/systemui/mediaprojection/permission/BaseMediaProjectionPermissionDialogDelegate.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/mediaprojection/permission/MediaProjectionPermissionActivity.java81
-rw-r--r--packages/SystemUI/src/com/android/systemui/mediaprojection/permission/MediaProjectionPermissionDialogDelegate.kt32
-rw-r--r--packages/SystemUI/src/com/android/systemui/mediarouter/MediaRouterLog.kt (renamed from packages/SystemUI/src/com/android/systemui/qs/panels/shared/model/IconLabelVisibilityLog.kt)5
-rw-r--r--packages/SystemUI/src/com/android/systemui/mediarouter/MediaRouterModule.kt13
-rw-r--r--packages/SystemUI/src/com/android/systemui/mediarouter/data/repository/MediaRouterRepository.kt28
-rw-r--r--packages/SystemUI/src/com/android/systemui/navigationbar/gestural/BackPanelController.kt5
-rw-r--r--packages/SystemUI/src/com/android/systemui/navigationbar/gestural/EdgeBackGestureHandler.java17
-rw-r--r--packages/SystemUI/src/com/android/systemui/navigationbar/views/NavigationBar.java37
-rw-r--r--packages/SystemUI/src/com/android/systemui/navigationbar/views/NavigationBarView.java19
-rw-r--r--packages/SystemUI/src/com/android/systemui/navigationbar/views/buttons/KeyButtonView.java3
-rw-r--r--packages/SystemUI/src/com/android/systemui/people/widget/PeopleBackupHelper.java12
-rw-r--r--packages/SystemUI/src/com/android/systemui/people/widget/PeopleSpaceWidgetManager.java74
-rw-r--r--packages/SystemUI/src/com/android/systemui/power/shared/model/WakeSleepReason.kt6
-rw-r--r--packages/SystemUI/src/com/android/systemui/process/ProcessWrapper.java8
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/ReduceBrightColorsController.java17
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/ReduceBrightColorsControllerImpl.java62
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/SettingObserver.java17
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java5
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/flags/NewQsUI.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/flags/QSComposeFragment.kt53
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/panels/dagger/PanelsModule.kt25
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/panels/data/repository/DefaultLargeTilesRepository.kt (renamed from packages/SystemUI/src/com/android/systemui/qs/panels/data/repository/IconTilesRepository.kt)29
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/panels/data/repository/QSPreferencesRepository.kt27
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/panels/data/repository/StockTilesRepository.kt6
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/panels/domain/interactor/GridConsistencyInteractor.kt4
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/panels/domain/interactor/IconLabelVisibilityInteractor.kt4
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/panels/domain/interactor/IconTilesInteractor.kt50
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/panels/domain/interactor/QSPreferencesInteractor.kt6
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/panels/shared/model/PanelsLog.kt (renamed from packages/SystemUI/src/com/android/systemui/qs/panels/shared/model/GridConsistencyLog.kt)5
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/DragAndDropState.kt51
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/EditTileListState.kt12
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/InfiniteGridLayout.kt9
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/PartitionedGridLayout.kt21
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/StretchedGridLayout.kt3
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/Tile.kt316
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/panels/ui/viewmodel/EditModeViewModel.kt23
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/panels/ui/viewmodel/IconTilesViewModel.kt4
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/panels/ui/viewmodel/QuickQuickSettingsViewModel.kt26
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/panels/ui/viewmodel/TileUiState.kt10
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/panels/ui/viewmodel/TileViewModel.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/pipeline/domain/autoaddable/ReduceBrightColorsAutoAddable.kt13
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSIconViewImpl.java5
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt33
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tileimpl/SubtitleArrayMapping.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/ModesTile.kt119
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/ReduceBrightColorsTile.java34
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogController.java7
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogDelegate.java6
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/impl/modes/domain/interactor/ModesTileDataInteractor.kt51
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/impl/modes/domain/interactor/ModesTileUserActionInteractor.kt79
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/impl/modes/domain/model/ModesTileModel.kt18
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/impl/modes/ui/ModesTileMapper.kt64
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/impl/reducebrightness/domain/interactor/ReduceBrightColorsTileDataInteractor.kt6
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/impl/reducebrightness/domain/interactor/ReduceBrightColorsTileUserActionInteractor.kt23
-rw-r--r--packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java22
-rw-r--r--packages/SystemUI/src/com/android/systemui/recordissue/IssueRecordingService.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/recordissue/IssueRecordingState.kt17
-rw-r--r--packages/SystemUI/src/com/android/systemui/recordissue/RecordIssueDialogDelegate.kt5
-rw-r--r--packages/SystemUI/src/com/android/systemui/recordissue/TraceurMessageSender.kt45
-rw-r--r--packages/SystemUI/src/com/android/systemui/scene/domain/interactor/SceneContainerOcclusionInteractor.kt13
-rw-r--r--packages/SystemUI/src/com/android/systemui/scene/domain/startable/SceneContainerStartable.kt22
-rw-r--r--packages/SystemUI/src/com/android/systemui/screenrecord/RecordingController.java22
-rw-r--r--packages/SystemUI/src/com/android/systemui/screenrecord/RecordingControllerLog.kt28
-rw-r--r--packages/SystemUI/src/com/android/systemui/screenrecord/RecordingControllerLogger.kt77
-rw-r--r--packages/SystemUI/src/com/android/systemui/screenrecord/ScreenRecordModule.kt12
-rw-r--r--packages/SystemUI/src/com/android/systemui/screenshot/ActionExecutor.kt4
-rw-r--r--packages/SystemUI/src/com/android/systemui/screenshot/LegacyScreenshotViewProxy.kt242
-rw-r--r--packages/SystemUI/src/com/android/systemui/screenshot/MessageContainerController.kt6
-rw-r--r--packages/SystemUI/src/com/android/systemui/screenshot/OverlayActionChip.java144
-rw-r--r--packages/SystemUI/src/com/android/systemui/screenshot/SaveImageInBackgroundTask.java76
-rw-r--r--packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotController.java332
-rw-r--r--packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotShelfViewProxy.kt70
-rw-r--r--packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotView.java1126
-rw-r--r--packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotViewProxy.kt76
-rw-r--r--packages/SystemUI/src/com/android/systemui/screenshot/TakeScreenshotExecutor.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/screenshot/appclips/AppClipsViewModel.java20
-rw-r--r--packages/SystemUI/src/com/android/systemui/screenshot/dagger/ScreenshotModule.java16
-rw-r--r--packages/SystemUI/src/com/android/systemui/screenshot/policy/PolicyRequestProcessor.kt9
-rw-r--r--packages/SystemUI/src/com/android/systemui/settings/brightness/BrightnessController.java18
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/GlanceableHubContainerController.kt91
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java3
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/QuickSettingsControllerImpl.java24
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/ShadeControllerSceneImpl.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/data/repository/ShadeRepository.kt28
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractor.kt20
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractorEmptyImpl.kt1
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractorImpl.kt24
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractorLegacyImpl.kt3
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractorSceneContainerImpl.kt5
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/domain/startable/ShadeStartable.kt24
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/shared/model/ShadeMode.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/smartspace/dagger/SmartspaceModule.kt32
-rw-r--r--packages/SystemUI/src/com/android/systemui/smartspace/data/repository/SmartspaceRepository.kt77
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java10
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/ImmersiveModeConfirmation.java5
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcutListSearch.java168
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcuts.java140
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/StatusBarStateControllerImpl.java13
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/chips/StatusBarChipsLog.kt25
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/chips/StatusBarChipsModule.kt35
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/chips/call/domain/interactor/CallChipInteractor.kt23
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/chips/call/ui/viewmodel/CallChipViewModel.kt11
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/chips/casttootherdevice/domain/interactor/MediaRouterChipInteractor.kt12
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/chips/casttootherdevice/domain/model/MediaRouterCastModel.kt8
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/chips/casttootherdevice/ui/view/EndCastScreenToOtherDeviceDialogDelegate.kt58
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/chips/casttootherdevice/ui/view/EndGenericCastToOtherDeviceDialogDelegate.kt22
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/chips/casttootherdevice/ui/viewmodel/CastToOtherDeviceChipViewModel.kt74
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/chips/mediaprojection/domain/interactor/MediaProjectionChipInteractor.kt23
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/chips/mediaprojection/ui/view/EndMediaProjectionDialogHelper.kt79
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/chips/screenrecord/domain/interactor/ScreenRecordChipInteractor.kt28
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/chips/screenrecord/ui/view/EndScreenRecordingDialogDelegate.kt25
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/chips/screenrecord/ui/viewmodel/ScreenRecordChipViewModel.kt42
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/chips/sharetoapp/ui/view/EndShareToAppDialogDelegate.kt44
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/chips/sharetoapp/ui/viewmodel/ShareToAppChipViewModel.kt56
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/model/ColorsModel.kt8
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/model/OngoingActivityChipModel.kt27
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/viewmodel/ChipTransitionHelper.kt97
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipViewModel.kt14
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipsViewModel.kt143
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/domain/interactor/StatusBarKeyguardViewManagerInteractor.kt4
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationSectionsFeatureManager.kt7
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinator.kt22
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinatorLogger.kt25
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationEntry.java12
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/KeyguardCoordinator.kt446
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/LockScreenMinimalismCoordinator.kt295
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/LockScreenMinimalismCoordinatorLogger.kt99
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/NotifCoordinators.kt29
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/OriginalUnseenKeyguardCoordinator.kt389
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/VisualStabilityCoordinator.java51
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/VisualStabilityCoordinatorLogger.kt56
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/provider/VisualStabilityProvider.kt6
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java9
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/domain/interactor/HeadsUpNotificationInteractor.kt86
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/domain/interactor/SeenNotificationsInteractor.kt28
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java10
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableView.java5
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/row/RichOngoingNotificationContentExtractor.kt58
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/row/shared/RichOngoingClock.kt10
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ui/view/TimerButtonView.kt10
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ui/view/TimerView.kt10
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ui/viewbinder/TimerViewBinder.kt37
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ui/viewmodel/TimerViewModel.kt62
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/shared/NotificationMinimalismPrototype.kt137
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/AmbientState.java30
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ExpandableViewState.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java79
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java22
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackSizeCalculator.kt14
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ScrollViewFields.kt3
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java90
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/view/NotificationScrollView.kt3
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewbinder/SharedNotificationContainerBinder.kt7
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationListViewModel.kt8
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationsPlaceholderViewModel.kt5
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModel.kt1
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/ui/viewbinder/HeadsUpNotificationViewBinder.kt4
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/ActivityStarterImpl.kt9
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/ActivityStarterInternalImpl.kt565
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/AutoTileManager.java8
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java35
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeParameters.java42
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeServiceHost.java22
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpManagerPhone.java63
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpTouchHelper.java1
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBypassController.kt3
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/LegacyActivityStarterInternalImpl.kt56
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java1
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java36
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragment.java5
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/ongoingcall/shared/model/OngoingCallModel.kt8
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconInteractor.kt16
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/pipeline/shared/ui/binder/CollapsedStatusBarViewBinder.kt33
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/AvalancheController.kt59
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/BaseHeadsUpManager.java13
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/CastControllerImpl.java54
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/CastControllerLogger.kt141
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/CastDevice.kt31
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/PolicyModule.kt58
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/SplitShadeStateController.kt4
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/dagger/CastControllerLog.kt28
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/dagger/StatusBarPolicyModule.java8
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/data/repository/DeviceProvisioningRepository.kt15
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/domain/interactor/DeviceProvisioningInteractor.kt6
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/domain/interactor/ZenModeInteractor.kt24
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/ui/dialog/ModesDialogDelegate.kt84
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/ui/dialog/composable/ModeTile.kt91
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/ui/dialog/composable/ModeTileGrid.kt50
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/ui/dialog/viewmodel/ModeTileViewModel.kt35
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/ui/dialog/viewmodel/ModesDialogViewModel.kt87
-rw-r--r--packages/SystemUI/src/com/android/systemui/touchpad/tutorial/ui/composable/BackGestureTutorialScreen.kt (renamed from packages/SystemUI/src/com/android/systemui/touchpad/tutorial/ui/view/BackGestureTutorialScreen.kt)2
-rw-r--r--packages/SystemUI/src/com/android/systemui/touchpad/tutorial/ui/composable/TutorialComponents.kt (renamed from packages/SystemUI/src/com/android/systemui/touchpad/tutorial/ui/view/TutorialComponents.kt)2
-rw-r--r--packages/SystemUI/src/com/android/systemui/touchpad/tutorial/ui/composable/TutorialSelectionScreen.kt (renamed from packages/SystemUI/src/com/android/systemui/touchpad/tutorial/ui/view/TutorialSelectionScreen.kt)2
-rw-r--r--packages/SystemUI/src/com/android/systemui/touchpad/tutorial/ui/view/TouchpadTutorialActivity.kt10
-rw-r--r--packages/SystemUI/src/com/android/systemui/touchpad/tutorial/ui/viewmodel/TouchpadTutorialViewModel.kt (renamed from packages/SystemUI/src/com/android/systemui/touchpad/tutorial/ui/TouchpadTutorialViewModel.kt)4
-rw-r--r--packages/SystemUI/src/com/android/systemui/tuner/TunablePadding.java104
-rw-r--r--packages/SystemUI/src/com/android/systemui/util/ConvenienceExtensions.kt6
-rw-r--r--packages/SystemUI/src/com/android/systemui/util/kotlin/ReduceBrightColorsControllerExt.kt14
-rw-r--r--packages/SystemUI/src/com/android/systemui/util/service/PersistentConnectionManager.java84
-rw-r--r--packages/SystemUI/src/com/android/systemui/util/settings/SettingsProxy.kt83
-rw-r--r--packages/SystemUI/src/com/android/systemui/util/settings/UserSettingsProxy.kt25
-rw-r--r--packages/SystemUI/src/com/android/systemui/volume/CsdWarningDialog.java149
-rw-r--r--packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java79
-rw-r--r--packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java48
-rw-r--r--packages/SystemUI/src/com/android/systemui/volume/dagger/AudioModule.kt11
-rw-r--r--packages/SystemUI/src/com/android/systemui/volume/dagger/AudioSharingEmptyImplModule.kt (renamed from packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/data/repository/HeadsUpNotificationsRepositoryExt.kt)17
-rw-r--r--packages/SystemUI/src/com/android/systemui/volume/dagger/AudioSharingModule.kt40
-rw-r--r--packages/SystemUI/src/com/android/systemui/volume/dagger/VolumeModule.java1
-rw-r--r--packages/SystemUI/src/com/android/systemui/volume/domain/interactor/AudioSharingInteractor.kt90
-rw-r--r--packages/SystemUI/src/com/android/systemui/wmshell/WMShell.java5
-rw-r--r--packages/SystemUI/tests/src/com/android/keyguard/ClockEventControllerTest.kt3
-rw-r--r--packages/SystemUI/tests/src/com/android/keyguard/KeyguardClockSwitchControllerTest.java44
-rw-r--r--packages/SystemUI/tests/src/com/android/keyguard/KeyguardClockSwitchTest.java4
-rw-r--r--packages/SystemUI/tests/src/com/android/keyguard/LegacyLockIconViewControllerBaseTest.java1
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/accessibility/MagnificationTest.java10
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/accessibility/TestableWindowManager.java6
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/accessibility/WindowMagnificationControllerWindowlessMagnifierTest.java54
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/accessibility/WindowMagnificationFrameSizePrefsTest.java49
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/accessibility/WindowMagnificationFrameSpecTest.kt51
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/accessibility/floatingmenu/MenuViewLayerTest.java3
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/accessibility/hearingaid/HearingDevicesDialogDelegateTest.java133
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/ambient/touch/TouchMonitorTest.java29
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/battery/BatteryMeterViewControllerTest.java24
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/battery/BatteryMeterViewTest.kt141
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthRippleControllerTest.kt196
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/biometrics/FaceHelpMessageDebouncerTest.kt221
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/biometrics/ui/viewmodel/PromptViewModelTest.kt362
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/communal/data/backup/CommunalBackupHelperTest.kt23
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/communal/data/backup/CommunalBackupUtilsTest.kt35
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/communal/data/db/CommunalDatabaseMigrationsTest.kt149
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/communal/data/db/CommunalWidgetDaoTest.kt38
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/controls/ui/DetailDialogTest.kt3
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/deviceentry/domain/interactor/BiometricMessageInteractorTest.kt13
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryFaceAuthInteractorTest.kt2
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryFaceAuthStatusInteractorTest.kt160
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/display/data/repository/DisplayRepositoryTest.kt22
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/globalactions/GlobalActionsDialogLiteTest.java3
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyboard/data/repository/KeyboardRepositoryTest.kt10
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/data/repository/ShortcutHelperCategoriesRepositoryTest.kt90
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/data/source/AppCategoriesShortcutsSourceTest.kt81
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/data/source/CurrentAppShortcutsSourceTest.kt93
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/data/source/InputShortcutsSourceTest.kt94
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/data/source/TestShortcuts.kt18
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/domain/interactor/ShortcutHelperCategoriesInteractorTest.kt22
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/ui/ShortcutHelperActivityStarterTest.kt59
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/ui/viewmodel/ShortcutHelperViewModelTest.kt37
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java7
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/ResourceTrimmerTest.kt2
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/FromDreamingTransitionInteractorTest.kt3
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/InWindowLauncherUnlockAnimationInteractorTest.kt86
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardBlueprintInteractorTest.kt7
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissActionInteractorTest.kt2
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardWakeDirectlyToGoneInteractorTest.kt378
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/binder/InWindowLauncherUnlockAnimationManagerTest.kt54
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/view/layout/sections/ClockSectionTest.kt29
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultDeviceEntrySectionTest.kt3
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/view/layout/sections/SmartspaceSectionTest.kt3
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardBottomAreaViewModelTest.kt1
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardClockViewModelTest.kt19
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardQuickAffordancesCombinedViewModelTest.kt1
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/log/SessionTrackerTest.java7
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/media/controls/domain/pipeline/MediaDataFilterImplTest.kt103
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/mediaprojection/data/repository/MediaProjectionManagerRepositoryTest.kt125
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/mediaprojection/permission/MediaProjectionPermissionDialogDelegateTest.kt87
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/mediaprojection/taskswitcher/data/repository/FakeTasksRepository.kt46
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/navigationbar/gestural/BackPanelControllerTest.kt5
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/navigationbar/views/NavigationBarTest.java45
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/people/widget/PeopleSpaceWidgetManagerTest.java4
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/qs/tileimpl/QSTileImplTest.java7
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/qs/tileimpl/QSTileViewImplTest.kt22
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/qs/tiles/ModesTileTest.kt180
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/qs/tiles/ReduceBrightColorsTileTest.java3
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/qs/tiles/dialog/InternetDialogDelegateControllerTest.java8
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/screenrecord/RecordingControllerTest.java7
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/screenrecord/ScreenRecordPermissionDialogDelegateTest.kt6
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/screenshot/SaveImageInBackgroundTaskTest.kt3
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/screenshot/TakeScreenshotExecutorTest.kt12
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/screenshot/appclips/AppClipsViewModelTest.java12
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/screenshot/policy/PolicyRequestProcessorTest.kt43
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/shade/GlanceableHubContainerControllerTest.kt239
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerBaseTest.java11
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerTest.java100
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerWithCoroutinesTest.kt4
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowViewControllerTest.kt27
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowViewTest.kt3
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/shade/data/repository/ShadeRepositoryImplTest.kt45
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/shared/clocks/ClockRegistryTest.kt40
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/shared/clocks/DefaultClockProviderTest.kt6
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyboardShortcutListSearchTest.java4
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyboardShortcutsTest.java3
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeTransitionControllerTest.kt700
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/casttootherdevice/domian/interactor/MediaRouterChipInteractorTest.kt14
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/casttootherdevice/ui/view/EndCastScreenToOtherDeviceDialogDelegateTest.kt137
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/casttootherdevice/ui/view/EndGenericCastToOtherDeviceDialogDelegateTest.kt29
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/casttootherdevice/ui/viewmodel/CastToOtherDeviceChipViewModelTest.kt143
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/mediaprojection/domain/interactor/MediaProjectionChipInteractorTest.kt7
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/mediaprojection/ui/view/EndMediaProjectionDialogHelperTest.kt107
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/screenrecord/domain/interactor/ScreenRecordChipInteractorTest.kt6
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/screenrecord/ui/view/EndScreenRecordingDialogDelegateTest.kt14
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/screenrecord/ui/viewmodel/ScreenRecordChipViewModelTest.kt83
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/sharetoapp/ui/view/EndShareToAppDialogDelegateTest.kt82
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/sharetoapp/ui/viewmodel/ShareToAppChipViewModelTest.kt73
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/ui/viewmodel/ChipTransitionHelperTest.kt154
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipViewModelTest.kt31
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipsViewModelTest.kt105
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationSectionsFeatureManagerTest.kt2
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/coordinator/KeyguardCoordinatorTest.kt690
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/icon/domain/interactor/NotificationIconsInteractorTest.kt219
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/icon/ui/viewmodel/NotificationIconContainerAlwaysOnDisplayViewModelTest.kt144
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowTest.java15
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java21
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithmTest.kt156
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/BiometricsUnlockControllerTest.java10
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/DozeParametersTest.java6
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/LegacyNotificationIconAreaControllerImplTest.java2
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java85
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragmentTest.java22
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconInteractorTest.kt22
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/ui/viewmodel/MobileIconViewModelTest.kt32
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/shared/ui/viewmodel/CollapsedStatusBarViewModelImplTest.kt2
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/shared/ui/viewmodel/FakeCollapsedStatusBarViewModel.kt2
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/CastControllerImplTest.java5
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/CastDeviceTest.kt20
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/ui/viewmodel/KeyguardStatusBarViewModelTest.kt4
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/touchpad/tutorial/ui/gesture/FakeMotionEvent.kt22
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/touchpad/tutorial/ui/viewmodel/TouchpadTutorialViewModelTest.kt (renamed from packages/SystemUI/tests/src/com/android/systemui/touchpad/tutorial/ui/TouchpadTutorialViewModelTest.kt)2
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/tuner/TunablePaddingTest.java126
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/util/service/PersistentConnectionManagerTest.java178
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/util/settings/SettingsProxyTest.kt159
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/util/settings/UserSettingsProxyTest.kt259
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/volume/CsdWarningDialogTest.java106
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/volume/VolumeDialogControllerImplTest.java98
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/volume/VolumeDialogImplTest.java50
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/wmshell/BubblesTest.java36
-rw-r--r--packages/SystemUI/tests/utils/src/android/app/admin/AlarmManagerKosmos.kt (renamed from packages/SystemUI/tests/utils/src/com/android/systemui/smartspace/data/repository/SmartspaceRepositoryKosmos.kt)9
-rw-r--r--packages/SystemUI/tests/utils/src/android/hardware/display/DisplayManagerKosmos.kt22
-rw-r--r--packages/SystemUI/tests/utils/src/android/view/WindowManagerKosmos.kt4
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/app/admin/DevicePolicyManagerKosmos.kt22
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/internal/widget/LockPatternUtilsKosmos.kt9
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/TestMocksModule.kt6
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/accessibility/FakeReduceBrightColorsController.kt18
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/bouncer/ui/viewmodel/BouncerMessageViewModelKosmos.kt4
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/communal/data/db/DefaultWidgetPopulationKosmos.kt23
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/communal/data/repository/CommunalSceneTransitionRepositoryKosmos.kt22
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/communal/data/repository/CommunalSmartspaceRepositoryKosmos.kt24
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/communal/data/repository/FakeCommunalMediaRepository.kt14
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/communal/data/repository/FakeCommunalPrefsRepository.kt9
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/communal/data/repository/FakeCommunalSceneRepository.kt6
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/communal/data/repository/FakeCommunalSmartspaceRepository.kt45
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/communal/domain/interactor/CommunalInteractorKosmos.kt16
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/communal/domain/interactor/CommunalSceneTransitionInteractorKosmos.kt37
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/deviceentry/data/repository/FakeDeviceEntryRepository.kt19
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryFaceAuthInteractorKosmos.kt1
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryFaceAuthStatusInteractorKosmos.kt34
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryInteractorKosmos.kt7
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/deviceentry/domain/interactor/DeviceUnlockedInteractorKosmos.kt4
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/education/data/repository/ContextualEducationRepositoryKosmos.kt26
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/education/data/repository/FakeContextualEducationRepository.kt53
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/education/data/repository/FakeEduClock.kt37
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/education/domain/interactor/ContextualEducationInteractorKosmos.kt31
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/education/domain/interactor/KeyboardTouchpadEduInteractorKosmos.kt28
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/flags/FeatureFlagsClassicKosmos.kt1
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/haptics/qs/QSLongPressEffectKosmos.kt3
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/keyboard/shortcut/KeyboardShortcutHelperKosmos.kt21
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/keyboard/shortcut/data/repository/ShortcutHelperTestHelper.kt17
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/FakeKeyguardRepository.kt7
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/FromAodTransitionInteractorKosmos.kt1
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/FromDozingTransitionInteractorKosmos.kt9
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/FromDreamingTransitionInteractorKosmos.kt6
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/FromGlanceableHubTransitionInteractorKosmos.kt14
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/FromLockscreenTransitionInteractorKosmos.kt2
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/FromOccludedTransitionInteractorKosmos.kt2
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/KeyguardBlueprintInteractorKosmos.kt5
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissActionInteractorKosmos.kt2
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/KeyguardWakeDirectlyToGoneInteractorKosmos.kt45
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/WindowManagerLockscreenVisibilityInteractorKosmos.kt3
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/ui/viewmodel/DreamingToAodTransitionViewModelKosmos.kt32
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModelKosmos.kt1
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenContentViewModelKosmos.kt2
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/domain/pipeline/MediaDataFilterKosmos.kt3
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/shared/MediaLoggerKosmos.kt (renamed from packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/domain/pipeline/MediaLoadingLoggerKosmos.kt)7
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/ui/viewmodel/MediaCarouselViewModelKosmos.kt2
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/mediaprojection/data/repository/MediaProjectionRepositoryKosmos.kt4
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/mediarouter/data/repository/MediaRouterRepositoryKosmos.kt2
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/qs/panels/data/repository/DefaultLargeTilesRepositoryKosmos.kt (renamed from packages/SystemUI/tests/utils/src/com/android/systemui/qs/panels/data/repository/IconTilesRepositoryKosmos.kt)3
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/qs/panels/data/repository/QSPreferencesRepositoryKosmos.kt9
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/qs/panels/domain/interactor/IconTilesInteractorKosmos.kt14
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/shade/data/repository/FakeShadeRepository.kt49
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/shade/domain/interactor/ShadeInteractorKosmos.kt1
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/smartspace/data/repository/FakeSmartspaceRepository.kt21
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/StatusBarChipsLogKosmos.kt22
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/call/domain/interactor/CallChipInteractorKosmos.kt10
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/call/ui/viewmodel/CallChipViewModelKosmos.kt2
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/casttootherdevice/domain/interactor/MediaRouterChipInteractorKosmos.kt2
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/casttootherdevice/ui/viewmodel/CastToOtherDeviceChipViewModelKosmos.kt5
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/mediaprojection/domain/interactor/MediaProjectionChipInteractorKosmos.kt2
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/mediaprojection/ui/view/EndMediaProjectionDialogHelperKosmos.kt4
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/screenrecord/domain/interactor/ScreenRecordChipInteractorKosmos.kt2
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/screenrecord/ui/viewmodel/ScreenRecordChipViewModelKosmos.kt6
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/sharetoapp/ui/viewmodel/ShareToAppChipViewModelKosmos.kt4
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipsViewModelKosmos.kt2
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/collection/EntryUtil.kt7
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/collection/coordinator/LockScreenMinimalismCoordinatorKosmos.kt42
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/collection/coordinator/LockScreenMinimalismCoordinatorLoggerKosmos.kt23
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/data/repository/HeadsUpNotificationRepositoryKosmos.kt19
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/policy/data/repository/FakeDeviceProvisioningRepository.kt5
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/volume/data/repository/FakeAudioSharingRepository.kt24
-rw-r--r--packages/SystemUI/tests/utils/src/com/android/systemui/volume/domain/interactor/AudioSharingInteractorKosmos.kt29
-rw-r--r--packages/VpnDialogs/res/values-fr-rCA/strings.xml2
-rw-r--r--packages/overlays/AvoidAppsInCutoutOverlay/res/values-fr-rCA/strings.xml2
-rw-r--r--ravenwood/coretest/test/com/android/ravenwoodtest/coretest/methodvalidation/RavenwoodTestMethodValidation_Fail01_Test.java51
-rw-r--r--ravenwood/coretest/test/com/android/ravenwoodtest/coretest/methodvalidation/RavenwoodTestMethodValidation_Fail02_Test.java51
-rw-r--r--ravenwood/coretest/test/com/android/ravenwoodtest/coretest/methodvalidation/RavenwoodTestMethodValidation_Fail03_Test.java51
-rw-r--r--ravenwood/coretest/test/com/android/ravenwoodtest/coretest/methodvalidation/RavenwoodTestMethodValidation_OkTest.java56
-rw-r--r--ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodRuleImpl.java22
-rw-r--r--ravenwood/runtime-helper-src/libcore-fake/android/system/Os.java13
-rw-r--r--ravenwood/runtime-helper-src/libcore-fake/android/system/StructStat.java121
-rw-r--r--ravenwood/runtime-helper-src/libcore-fake/android/system/StructTimespec.java79
-rw-r--r--ravenwood/runtime-helper-src/libcore-fake/com/android/ravenwood/common/RavenwoodRuntimeNative.java (renamed from ravenwood/runtime-common-src/com/android/ravenwood/common/RavenwoodRuntimeNative.java)31
-rw-r--r--ravenwood/runtime-helper-src/libcore-fake/libcore/util/Objects.java85
-rw-r--r--ravenwood/runtime-jni/ravenwood_runtime.cpp96
-rw-r--r--ravenwood/runtime-test/test/com/android/ravenwood/runtimetest/OsTest.java123
-rw-r--r--services/Android.bp26
-rw-r--r--services/accessibility/Android.bp13
-rw-r--r--services/accessibility/accessibility.aconfig7
-rw-r--r--services/accessibility/java/com/android/server/accessibility/AccessibilityInputFilter.java22
-rw-r--r--services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java43
-rw-r--r--services/accessibility/java/com/android/server/accessibility/AccessibilityUserState.java12
-rw-r--r--services/accessibility/java/com/android/server/accessibility/FlashNotificationsController.java2
-rw-r--r--services/accessibility/java/com/android/server/accessibility/MouseKeysInterceptor.java499
-rw-r--r--services/accessibility/java/com/android/server/accessibility/a11ychecker/AccessibilityCheckerUtils.java218
-rw-r--r--services/accessibility/java/com/android/server/accessibility/a11ychecker/AccessibilityNodePathBuilder.java (renamed from core/java/android/view/accessibility/a11ychecker/AccessibilityNodePathBuilder.java)2
-rw-r--r--services/accessibility/java/com/android/server/accessibility/a11ychecker/OWNERS (renamed from core/java/android/view/accessibility/a11ychecker/OWNERS)0
-rw-r--r--services/accessibility/java/com/android/server/accessibility/a11ychecker/proto/a11ychecker.proto73
-rw-r--r--services/autofill/java/com/android/server/autofill/Helper.java48
-rw-r--r--services/autofill/java/com/android/server/autofill/PresentationStatsEventLogger.java25
-rw-r--r--services/autofill/java/com/android/server/autofill/Session.java39
-rw-r--r--services/autofill/java/com/android/server/autofill/ui/AutoFillUI.java8
-rw-r--r--services/companion/java/com/android/server/companion/CompanionDeviceShellCommand.java16
-rw-r--r--services/companion/java/com/android/server/companion/virtual/VirtualDeviceImpl.java6
-rw-r--r--services/core/Android.bp1
-rw-r--r--services/core/java/android/app/usage/UsageStatsManagerInternal.java12
-rw-r--r--services/core/java/com/android/server/CertBlocklister.java (renamed from services/core/java/com/android/server/CertBlacklister.java)106
-rw-r--r--services/core/java/com/android/server/ExplicitHealthCheckController.java42
-rw-r--r--services/core/java/com/android/server/PackageWatchdog.java30
-rw-r--r--services/core/java/com/android/server/TelephonyRegistry.java5
-rw-r--r--services/core/java/com/android/server/Watchdog.java1
-rw-r--r--services/core/java/com/android/server/accounts/AccountManagerService.java7
-rw-r--r--services/core/java/com/android/server/am/ActivityManagerService.java38
-rw-r--r--services/core/java/com/android/server/am/AppErrors.java62
-rw-r--r--services/core/java/com/android/server/am/ApplicationThreadDeferred.java186
-rw-r--r--services/core/java/com/android/server/am/BatteryStatsService.java395
-rw-r--r--services/core/java/com/android/server/am/BroadcastQueueModernImpl.java9
-rw-r--r--services/core/java/com/android/server/am/CachedAppOptimizer.java5
-rw-r--r--services/core/java/com/android/server/am/OomAdjuster.java5
-rw-r--r--services/core/java/com/android/server/am/ProcessRecord.java13
-rw-r--r--services/core/java/com/android/server/am/SettingsToPropertiesMapper.java1
-rw-r--r--services/core/java/com/android/server/am/flags.aconfig12
-rw-r--r--services/core/java/com/android/server/app/GameManagerService.java3
-rw-r--r--services/core/java/com/android/server/app/GameManagerShellCommand.java55
-rw-r--r--services/core/java/com/android/server/audio/AudioDeviceBroker.java13
-rw-r--r--services/core/java/com/android/server/audio/AudioDeviceInventory.java9
-rw-r--r--services/core/java/com/android/server/audio/AudioService.java88
-rw-r--r--services/core/java/com/android/server/audio/AudioSystemAdapter.java4
-rw-r--r--services/core/java/com/android/server/audio/BtHelper.java142
-rw-r--r--services/core/java/com/android/server/biometrics/BiometricService.java116
-rw-r--r--services/core/java/com/android/server/biometrics/PreAuthInfo.java4
-rw-r--r--services/core/java/com/android/server/biometrics/sensors/BiometricSchedulerOperation.java45
-rw-r--r--services/core/java/com/android/server/clipboard/ClipboardService.java64
-rw-r--r--services/core/java/com/android/server/compat/PlatformCompat.java19
-rw-r--r--services/core/java/com/android/server/crashrecovery/CrashRecoveryHelper.java32
-rw-r--r--services/core/java/com/android/server/crashrecovery/CrashRecoveryModule.java55
-rw-r--r--services/core/java/com/android/server/crashrecovery/TEST_MAPPING3
-rw-r--r--services/core/java/com/android/server/display/BrightnessRangeController.java3
-rw-r--r--services/core/java/com/android/server/display/DisplayBrightnessState.java37
-rw-r--r--services/core/java/com/android/server/display/DisplayDeviceConfig.java297
-rw-r--r--services/core/java/com/android/server/display/DisplayManagerService.java39
-rw-r--r--services/core/java/com/android/server/display/DisplayManagerShellCommand.java21
-rw-r--r--services/core/java/com/android/server/display/DisplayPowerController.java78
-rw-r--r--services/core/java/com/android/server/display/HighBrightnessModeController.java2
-rw-r--r--services/core/java/com/android/server/display/LogicalDisplayMapper.java115
-rw-r--r--services/core/java/com/android/server/display/brightness/BrightnessEvent.java85
-rw-r--r--services/core/java/com/android/server/display/brightness/BrightnessUtils.java8
-rw-r--r--services/core/java/com/android/server/display/brightness/clamper/BrightnessClamperController.java92
-rw-r--r--services/core/java/com/android/server/display/brightness/clamper/HdrBrightnessModifier.java340
-rw-r--r--services/core/java/com/android/server/display/brightness/clamper/HdrClamper.java16
-rw-r--r--services/core/java/com/android/server/display/brightness/strategy/AutoBrightnessFallbackStrategy.java1
-rw-r--r--services/core/java/com/android/server/display/brightness/strategy/AutomaticBrightnessStrategy.java1
-rw-r--r--services/core/java/com/android/server/display/brightness/strategy/BoostBrightnessStrategy.java1
-rw-r--r--services/core/java/com/android/server/display/brightness/strategy/DozeBrightnessStrategy.java1
-rw-r--r--services/core/java/com/android/server/display/brightness/strategy/FallbackBrightnessStrategy.java1
-rw-r--r--services/core/java/com/android/server/display/brightness/strategy/FollowerBrightnessStrategy.java2
-rw-r--r--services/core/java/com/android/server/display/brightness/strategy/InvalidBrightnessStrategy.java3
-rw-r--r--services/core/java/com/android/server/display/brightness/strategy/OffloadBrightnessStrategy.java1
-rw-r--r--services/core/java/com/android/server/display/brightness/strategy/OverrideBrightnessStrategy.java3
-rw-r--r--services/core/java/com/android/server/display/brightness/strategy/ScreenOffBrightnessStrategy.java1
-rw-r--r--services/core/java/com/android/server/display/brightness/strategy/TemporaryBrightnessStrategy.java1
-rw-r--r--services/core/java/com/android/server/display/config/DisplayDeviceConfigUtils.java63
-rw-r--r--services/core/java/com/android/server/display/config/HdrBrightnessData.java191
-rw-r--r--services/core/java/com/android/server/display/config/HighBrightnessModeData.java157
-rw-r--r--services/core/java/com/android/server/display/config/SensorData.java41
-rw-r--r--services/core/java/com/android/server/display/feature/DisplayManagerFlags.java22
-rw-r--r--services/core/java/com/android/server/display/feature/display_flags.aconfig16
-rw-r--r--services/core/java/com/android/server/flags/services.aconfig10
-rw-r--r--services/core/java/com/android/server/hdmi/HdmiCecNetwork.java6
-rw-r--r--services/core/java/com/android/server/input/InputManagerService.java9
-rw-r--r--services/core/java/com/android/server/inputmethod/AdditionalSubtypeMapRepository.java141
-rw-r--r--services/core/java/com/android/server/inputmethod/DefaultImeVisibilityApplier.java8
-rw-r--r--services/core/java/com/android/server/inputmethod/IInputMethodManagerImpl.java11
-rw-r--r--services/core/java/com/android/server/inputmethod/InputMethodBindingController.java3
-rw-r--r--services/core/java/com/android/server/inputmethod/InputMethodDrawsNavBarResourceMonitor.java89
-rw-r--r--services/core/java/com/android/server/inputmethod/InputMethodManagerInternal.java60
-rw-r--r--services/core/java/com/android/server/inputmethod/InputMethodManagerService.java1000
-rw-r--r--services/core/java/com/android/server/inputmethod/InputMethodMenuController.java4
-rw-r--r--services/core/java/com/android/server/inputmethod/InputMethodMenuControllerNew.java356
-rw-r--r--services/core/java/com/android/server/inputmethod/InputMethodSettingsRepository.java56
-rw-r--r--services/core/java/com/android/server/inputmethod/InputMethodSubtypeSwitchingController.java422
-rw-r--r--services/core/java/com/android/server/inputmethod/OverlayableSystemBooleanResourceWrapper.java159
-rw-r--r--services/core/java/com/android/server/inputmethod/SecureSettingsWrapper.java40
-rw-r--r--services/core/java/com/android/server/inputmethod/UserData.java155
-rw-r--r--services/core/java/com/android/server/inputmethod/UserDataRepository.java182
-rw-r--r--services/core/java/com/android/server/inputmethod/ZeroJankProxy.java6
-rw-r--r--services/core/java/com/android/server/locales/LocaleManagerService.java7
-rw-r--r--services/core/java/com/android/server/location/LocationManagerService.java5
-rw-r--r--services/core/java/com/android/server/location/altitude/AltitudeService.java5
-rw-r--r--services/core/java/com/android/server/location/contexthub/ContextHubEventLogger.java36
-rw-r--r--services/core/java/com/android/server/location/contexthub/ContextHubService.java17
-rw-r--r--services/core/java/com/android/server/location/contexthub/ContextHubServiceTransaction.java18
-rw-r--r--services/core/java/com/android/server/location/contexthub/ContextHubTestModeManager.java75
-rw-r--r--services/core/java/com/android/server/location/contexthub/ContextHubTransactionManager.java9
-rw-r--r--services/core/java/com/android/server/location/contexthub/IContextHubWrapper.java45
-rw-r--r--services/core/java/com/android/server/locksettings/LockSettingsShellCommand.java5
-rw-r--r--services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java4
-rw-r--r--services/core/java/com/android/server/media/projection/MediaProjectionManagerService.java61
-rw-r--r--services/core/java/com/android/server/net/NetworkManagementService.java173
-rw-r--r--services/core/java/com/android/server/net/NetworkPolicyManagerService.java2
-rw-r--r--services/core/java/com/android/server/notification/NotificationAttentionHelper.java6
-rw-r--r--services/core/java/com/android/server/notification/NotificationManagerService.java41
-rw-r--r--services/core/java/com/android/server/notification/ShortcutHelper.java162
-rw-r--r--services/core/java/com/android/server/notification/TimeToLiveHelper.java15
-rw-r--r--services/core/java/com/android/server/notification/ZenModeEventLogger.java50
-rw-r--r--services/core/java/com/android/server/notification/ZenModeHelper.java17
-rw-r--r--services/core/java/com/android/server/om/OverlayManagerService.java2
-rw-r--r--services/core/java/com/android/server/pdb/PersistentDataBlockService.java23
-rw-r--r--services/core/java/com/android/server/pm/BackgroundUserSoundNotifier.java12
-rw-r--r--services/core/java/com/android/server/pm/InstallPackageHelper.java59
-rw-r--r--services/core/java/com/android/server/pm/LauncherAppsService.java9
-rw-r--r--services/core/java/com/android/server/pm/OWNERS1
-rw-r--r--services/core/java/com/android/server/pm/PackageArchiver.java10
-rw-r--r--services/core/java/com/android/server/pm/PackageInstallerService.java15
-rw-r--r--services/core/java/com/android/server/pm/PackageInstallerSession.java20
-rw-r--r--services/core/java/com/android/server/pm/PackageManagerService.java20
-rw-r--r--services/core/java/com/android/server/pm/PackageManagerServiceUtils.java42
-rw-r--r--services/core/java/com/android/server/pm/PackageSetting.java93
-rw-r--r--services/core/java/com/android/server/pm/RemovePackageHelper.java7
-rw-r--r--services/core/java/com/android/server/pm/SaferIntentUtils.java6
-rw-r--r--services/core/java/com/android/server/pm/ScanPackageUtils.java4
-rw-r--r--services/core/java/com/android/server/pm/Settings.java54
-rw-r--r--services/core/java/com/android/server/pm/ShortcutService.java13
-rw-r--r--services/core/java/com/android/server/pm/UserManagerService.java33
-rw-r--r--services/core/java/com/android/server/pm/pkg/PackageState.java8
-rw-r--r--services/core/java/com/android/server/policy/ModifierShortcutManager.java202
-rw-r--r--services/core/java/com/android/server/policy/PhoneWindowManager.java87
-rw-r--r--services/core/java/com/android/server/policy/WindowManagerPolicy.java14
-rw-r--r--services/core/java/com/android/server/power/LowPowerStandbyController.java5
-rw-r--r--services/core/java/com/android/server/power/Notifier.java4
-rw-r--r--services/core/java/com/android/server/power/PowerManagerService.java16
-rw-r--r--services/core/java/com/android/server/power/WakefulnessSessionObserver.java285
-rw-r--r--services/core/java/com/android/server/power/hint/HintManagerService.java335
-rw-r--r--services/core/java/com/android/server/power/stats/BatteryStatsDumpHelperImpl.java5
-rw-r--r--services/core/java/com/android/server/power/stats/BatteryStatsImpl.java1
-rw-r--r--services/core/java/com/android/server/power/stats/BatteryUsageStatsProvider.java5
-rw-r--r--services/core/java/com/android/server/power/stats/CustomEnergyConsumerPowerStatsCollector.java9
-rw-r--r--services/core/java/com/android/server/power/stats/EnergyConsumerPowerStatsCollector.java10
-rw-r--r--services/core/java/com/android/server/power/stats/PowerStatsCollector.java5
-rw-r--r--services/core/java/com/android/server/power/stats/PowerStatsExporter.java161
-rw-r--r--services/core/java/com/android/server/power/stats/WifiPowerStatsCollector.java26
-rw-r--r--services/core/java/com/android/server/power/stats/flags.aconfig21
-rw-r--r--services/core/java/com/android/server/stats/pull/RawSettingsTelemetryUtils.java83
-rw-r--r--services/core/java/com/android/server/stats/pull/SettingsStatsUtil.java4
-rw-r--r--services/core/java/com/android/server/stats/pull/StatsPullAtomService.java15
-rw-r--r--services/core/java/com/android/server/trust/TrustManagerService.java23
-rw-r--r--services/core/java/com/android/server/updates/Android.bp11
-rw-r--r--services/core/java/com/android/server/updates/CertificateTransparencyLogInstallReceiver.java112
-rw-r--r--services/core/java/com/android/server/updates/flags.aconfig10
-rw-r--r--services/core/java/com/android/server/vibrator/HapticFeedbackVibrationProvider.java39
-rw-r--r--services/core/java/com/android/server/vibrator/Vibration.java1
-rw-r--r--services/core/java/com/android/server/vibrator/VibratorManagerService.java50
-rw-r--r--services/core/java/com/android/server/webkit/SystemImpl.java46
-rw-r--r--services/core/java/com/android/server/webkit/SystemInterface.java36
-rw-r--r--services/core/java/com/android/server/webkit/WebViewUpdateService.java4
-rw-r--r--services/core/java/com/android/server/webkit/WebViewUpdateServiceImpl.java29
-rw-r--r--services/core/java/com/android/server/webkit/WebViewUpdateServiceImpl2.java31
-rw-r--r--services/core/java/com/android/server/wm/AbsAppSnapshotController.java7
-rw-r--r--services/core/java/com/android/server/wm/AccessibilityController.java2
-rw-r--r--services/core/java/com/android/server/wm/ActivityRecord.java556
-rw-r--r--services/core/java/com/android/server/wm/ActivityRefresher.java4
-rw-r--r--services/core/java/com/android/server/wm/ActivitySnapshotController.java6
-rw-r--r--services/core/java/com/android/server/wm/ActivityTaskManagerInternal.java9
-rw-r--r--services/core/java/com/android/server/wm/ActivityTaskManagerService.java92
-rw-r--r--services/core/java/com/android/server/wm/ActivityTaskSupervisor.java34
-rw-r--r--services/core/java/com/android/server/wm/AppCompatAspectRatioOverrides.java312
-rw-r--r--services/core/java/com/android/server/wm/AppCompatAspectRatioPolicy.java379
-rw-r--r--services/core/java/com/android/server/wm/AppCompatCameraOverrides.java10
-rw-r--r--services/core/java/com/android/server/wm/AppCompatCameraPolicy.java4
-rw-r--r--services/core/java/com/android/server/wm/AppCompatConfiguration.java (renamed from services/core/java/com/android/server/wm/LetterboxConfiguration.java)121
-rw-r--r--services/core/java/com/android/server/wm/AppCompatConfigurationPersister.java (renamed from services/core/java/com/android/server/wm/LetterboxConfigurationPersister.java)20
-rw-r--r--services/core/java/com/android/server/wm/AppCompatController.java25
-rw-r--r--services/core/java/com/android/server/wm/AppCompatOrientationOverrides.java8
-rw-r--r--services/core/java/com/android/server/wm/AppCompatOrientationPolicy.java30
-rw-r--r--services/core/java/com/android/server/wm/AppCompatOverrides.java91
-rw-r--r--services/core/java/com/android/server/wm/AppCompatUtils.java25
-rw-r--r--services/core/java/com/android/server/wm/AppTransitionController.java69
-rw-r--r--services/core/java/com/android/server/wm/BackNavigationController.java15
-rw-r--r--services/core/java/com/android/server/wm/BackgroundActivityStartController.java58
-rw-r--r--services/core/java/com/android/server/wm/BackgroundLaunchProcessController.java10
-rw-r--r--services/core/java/com/android/server/wm/CameraCompatFreeformPolicy.java40
-rw-r--r--services/core/java/com/android/server/wm/CameraStateMonitor.java73
-rw-r--r--services/core/java/com/android/server/wm/ConfigurationContainer.java116
-rw-r--r--services/core/java/com/android/server/wm/DesktopModeBoundsCalculator.java357
-rw-r--r--services/core/java/com/android/server/wm/DesktopModeHelper.java66
-rw-r--r--services/core/java/com/android/server/wm/DesktopModeLaunchParamsModifier.java116
-rw-r--r--services/core/java/com/android/server/wm/DisplayContent.java130
-rw-r--r--services/core/java/com/android/server/wm/DisplayPolicy.java2
-rw-r--r--services/core/java/com/android/server/wm/DisplayRotation.java3
-rw-r--r--services/core/java/com/android/server/wm/DisplayRotationCompatPolicy.java54
-rw-r--r--services/core/java/com/android/server/wm/DisplayRotationImmersiveAppCompatPolicy.java16
-rw-r--r--services/core/java/com/android/server/wm/DragDropController.java23
-rw-r--r--services/core/java/com/android/server/wm/DragState.java112
-rw-r--r--services/core/java/com/android/server/wm/EnsureActivitiesVisibleHelper.java3
-rw-r--r--services/core/java/com/android/server/wm/ImmersiveModeConfirmation.java5
-rw-r--r--services/core/java/com/android/server/wm/InputMonitor.java4
-rw-r--r--services/core/java/com/android/server/wm/InsetsStateController.java8
-rw-r--r--services/core/java/com/android/server/wm/LetterboxUiController.java331
-rw-r--r--services/core/java/com/android/server/wm/RecentTasks.java7
-rw-r--r--services/core/java/com/android/server/wm/RemoteAnimationController.java7
-rw-r--r--services/core/java/com/android/server/wm/RootWindowContainer.java30
-rw-r--r--services/core/java/com/android/server/wm/SafeActivityOptions.java5
-rw-r--r--services/core/java/com/android/server/wm/ScreenRotationAnimation.java2
-rw-r--r--services/core/java/com/android/server/wm/Session.java65
-rw-r--r--services/core/java/com/android/server/wm/StartingSurfaceController.java5
-rw-r--r--services/core/java/com/android/server/wm/Task.java79
-rw-r--r--services/core/java/com/android/server/wm/TaskFragmentOrganizerController.java83
-rw-r--r--services/core/java/com/android/server/wm/TaskPositioner.java500
-rw-r--r--services/core/java/com/android/server/wm/TaskPositioningController.java250
-rw-r--r--services/core/java/com/android/server/wm/TaskSnapshotController.java4
-rw-r--r--services/core/java/com/android/server/wm/Transition.java161
-rw-r--r--services/core/java/com/android/server/wm/TransitionController.java47
-rw-r--r--services/core/java/com/android/server/wm/TransparentPolicy.java14
-rw-r--r--services/core/java/com/android/server/wm/WindowContainer.java12
-rw-r--r--services/core/java/com/android/server/wm/WindowManagerDebugConfig.java1
-rw-r--r--services/core/java/com/android/server/wm/WindowManagerFlags.java3
-rw-r--r--services/core/java/com/android/server/wm/WindowManagerInternal.java16
-rw-r--r--services/core/java/com/android/server/wm/WindowManagerService.java134
-rw-r--r--services/core/java/com/android/server/wm/WindowManagerShellCommand.java246
-rw-r--r--services/core/java/com/android/server/wm/WindowOrganizerController.java14
-rw-r--r--services/core/java/com/android/server/wm/WindowProcessController.java38
-rw-r--r--services/core/java/com/android/server/wm/WindowState.java77
-rw-r--r--services/core/java/com/android/server/wm/WindowStateAnimator.java185
-rw-r--r--services/core/java/com/android/server/wm/WindowSurfaceController.java237
-rw-r--r--services/core/java/com/android/server/wm/WindowTracing.java302
-rw-r--r--services/core/java/com/android/server/wm/WindowTracingDataSource.java204
-rw-r--r--services/core/java/com/android/server/wm/WindowTracingLegacy.java276
-rw-r--r--services/core/java/com/android/server/wm/WindowTracingPerfetto.java163
-rw-r--r--services/core/java/com/android/server/wm/utils/DesktopModeFlagsUtil.java133
-rw-r--r--services/core/java/com/android/server/wm/utils/DimenPxIntSupplier.java54
-rw-r--r--services/core/jni/com_android_server_UsbDeviceManager.cpp207
-rw-r--r--services/core/jni/com_android_server_companion_virtual_InputController.cpp3
-rw-r--r--services/core/jni/com_android_server_input_InputManagerService.cpp26
-rw-r--r--services/core/jni/onload.cpp4
-rw-r--r--services/core/xsd/display-device-config/display-device-config.xsd55
-rw-r--r--services/core/xsd/display-device-config/schema/current.txt17
-rw-r--r--services/devicepolicy/java/com/android/server/devicepolicy/ActiveAdmin.java34
-rw-r--r--services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java53
-rw-r--r--services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerServiceShellCommand.java47
-rw-r--r--services/devicepolicy/java/com/android/server/devicepolicy/EnterpriseSpecificIdCalculator.java14
-rw-r--r--services/java/com/android/server/SystemServer.java43
-rw-r--r--services/manifest_services.xml5
-rw-r--r--services/manifest_services_android.frameworks.vibrator.xml7
-rw-r--r--services/net/Android.bp1
-rw-r--r--services/permission/java/com/android/server/permission/access/util/AtomicFileExtensions.kt9
-rw-r--r--services/profcollect/src/com/android/server/profcollect/ProfcollectForwardingService.java10
-rw-r--r--services/tests/InputMethodSystemServerTests/src/com/android/inputmethodservice/InputMethodServiceTest.java197
-rw-r--r--services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/AdditionalSubtypeUtilsTest.java5
-rw-r--r--services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/InputMethodManagerServiceTestBase.java89
-rw-r--r--services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/InputMethodManagerServiceWindowGainedFocusTest.java4
-rw-r--r--services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/InputMethodSubtypeSwitchingControllerTest.java767
-rw-r--r--services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/InputMethodUtilsTest.java2
-rw-r--r--services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/UserDataRepositoryTest.java87
-rw-r--r--services/tests/InputMethodSystemServerTests/test-apps/SimpleTestIme/src/com/android/apps/inputmethod/simpleime/ims/InputMethodServiceWrapper.java15
-rw-r--r--services/tests/PackageManagerServiceTests/server/src/com/android/server/pm/PackageManagerSettingsTests.java90
-rw-r--r--services/tests/displayservicetests/src/com/android/server/display/BrightnessThrottlerTest.java4
-rw-r--r--services/tests/displayservicetests/src/com/android/server/display/DisplayBrightnessStateTest.java12
-rw-r--r--services/tests/displayservicetests/src/com/android/server/display/DisplayDeviceConfigTest.java74
-rw-r--r--services/tests/displayservicetests/src/com/android/server/display/DisplayManagerServiceTest.java3
-rw-r--r--services/tests/displayservicetests/src/com/android/server/display/DisplayPowerControllerTest.java48
-rw-r--r--services/tests/displayservicetests/src/com/android/server/display/DisplayPowerProximityStateControllerTest.java12
-rw-r--r--services/tests/displayservicetests/src/com/android/server/display/HighBrightnessModeControllerTest.java7
-rw-r--r--services/tests/displayservicetests/src/com/android/server/display/HighBrightnessModeMetadataMapperTest.java4
-rw-r--r--services/tests/displayservicetests/src/com/android/server/display/LogicalDisplayMapperTest.java47
-rw-r--r--services/tests/displayservicetests/src/com/android/server/display/brightness/BrightnessEventTest.java19
-rw-r--r--services/tests/displayservicetests/src/com/android/server/display/brightness/clamper/BrightnessClamperControllerTest.java51
-rw-r--r--services/tests/displayservicetests/src/com/android/server/display/brightness/clamper/BrightnessThermalClamperTest.java4
-rw-r--r--services/tests/displayservicetests/src/com/android/server/display/brightness/clamper/ClamperTestUtils.kt44
-rw-r--r--services/tests/displayservicetests/src/com/android/server/display/brightness/clamper/HdrBrightnessModifierTest.kt405
-rw-r--r--services/tests/displayservicetests/src/com/android/server/display/brightness/clamper/HdrClamperTest.java16
-rw-r--r--services/tests/displayservicetests/src/com/android/server/display/brightness/clamper/LightSensorControllerTest.kt3
-rw-r--r--services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/AutoBrightnessFallbackStrategyTest.java1
-rw-r--r--services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/AutomaticBrightnessStrategyTest.java4
-rw-r--r--services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/BoostBrightnessStrategyTest.java1
-rw-r--r--services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/DozeBrightnessStrategyTest.java1
-rw-r--r--services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/FallbackBrightnessStrategyTest.java1
-rw-r--r--services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/FollowerBrightnessStrategyTest.java1
-rw-r--r--services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/OffloadBrightnessStrategyTest.java1
-rw-r--r--services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/OverrideBrightnessStrategyTest.java1
-rw-r--r--services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/ScreenOffBrightnessStrategyTest.java1
-rw-r--r--services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/TemporaryBrightnessStrategyTest.java1
-rw-r--r--services/tests/displayservicetests/src/com/android/server/display/config/DisplayDeviceConfigTestUtils.kt186
-rw-r--r--services/tests/displayservicetests/src/com/android/server/display/config/HdrBrightnessDataTest.kt169
-rw-r--r--services/tests/displayservicetests/src/com/android/server/display/mode/BrightnessObserverTest.kt1
-rw-r--r--services/tests/displayservicetests/src/com/android/server/display/mode/SettingsObserverTest.kt1
-rw-r--r--services/tests/displayservicetests/src/com/android/server/display/mode/TestUtils.kt15
-rw-r--r--services/tests/displayservicetests/src/com/android/server/display/utils/SensorUtilsTest.java6
-rw-r--r--services/tests/dreamservicetests/src/com/android/server/dreams/DreamAccessibilityTest.java83
-rw-r--r--services/tests/mockingservicestests/Android.bp1
-rw-r--r--services/tests/mockingservicestests/src/com/android/server/alarm/UserWakeupStoreTest.java10
-rw-r--r--services/tests/mockingservicestests/src/com/android/server/am/ActivityManagerServiceTest.java5
-rw-r--r--services/tests/mockingservicestests/src/com/android/server/am/ApplicationThreadDeferredTest.java99
-rw-r--r--services/tests/mockingservicestests/src/com/android/server/am/AsyncProcessStartTest.java2
-rw-r--r--services/tests/mockingservicestests/src/com/android/server/am/BroadcastQueueTest.java6
-rw-r--r--services/tests/mockingservicestests/src/com/android/server/am/CacheOomRankerTest.java2
-rw-r--r--services/tests/mockingservicestests/src/com/android/server/am/MockingOomAdjusterTests.java9
-rw-r--r--services/tests/mockingservicestests/src/com/android/server/am/ProcessObserverTest.java2
-rw-r--r--services/tests/mockingservicestests/src/com/android/server/am/ServiceBindingOomAdjPolicyTest.java2
-rw-r--r--services/tests/mockingservicestests/src/com/android/server/am/ServiceTimeoutTest.java2
-rw-r--r--services/tests/mockingservicestests/src/com/android/server/backup/utils/TarBackupReaderTest.java47
-rw-r--r--services/tests/mockingservicestests/src/com/android/server/crashrecovery/Android.bp58
-rw-r--r--services/tests/mockingservicestests/src/com/android/server/crashrecovery/AndroidManifest.xml (renamed from core/tests/batterystatstests/BatteryUsageStatsProtoTests/AndroidManifest.xml)16
-rw-r--r--services/tests/mockingservicestests/src/com/android/server/crashrecovery/AndroidTest.xml34
-rw-r--r--services/tests/mockingservicestests/src/com/android/server/crashrecovery/CrashRecoveryModuleTest.java105
-rw-r--r--services/tests/mockingservicestests/src/com/android/server/crashrecovery/OWNERS1
-rw-r--r--services/tests/mockingservicestests/src/com/android/server/trust/TrustManagerServiceTest.java59
-rw-r--r--services/tests/powerstatstests/Android.bp1
-rw-r--r--services/tests/powerstatstests/src/com/android/server/power/stats/BatteryUsageStatsAtomTest.java (renamed from core/tests/batterystatstests/BatteryUsageStatsProtoTests/src/com/android/internal/os/BatteryUsageStatsPulledTest.java)267
-rw-r--r--services/tests/powerstatstests/src/com/android/server/power/stats/BatteryUsageStatsRule.java6
-rw-r--r--services/tests/powerstatstests/src/com/android/server/power/stats/BatteryUsageStatsTest.java176
-rw-r--r--services/tests/powerstatstests/src/com/android/server/power/stats/CpuPowerStatsCollectorValidationTest.java2
-rw-r--r--services/tests/powerstatstests/src/com/android/server/power/stats/CustomEnergyConsumerPowerStatsTest.java12
-rw-r--r--services/tests/powerstatstests/src/com/android/server/power/stats/PowerStatsExporterTest.java30
-rw-r--r--services/tests/powerstatstests/src/com/android/server/power/stats/WifiPowerStatsCollectorTest.java2
-rw-r--r--services/tests/servicestests/Android.bp2
-rw-r--r--services/tests/servicestests/src/com/android/server/accessibility/AccessibilityUserStateTest.java14
-rw-r--r--services/tests/servicestests/src/com/android/server/accessibility/MouseKeysInterceptorTest.kt295
-rw-r--r--services/tests/servicestests/src/com/android/server/accessibility/a11ychecker/AccessibilityCheckerUtilsTest.java187
-rw-r--r--services/tests/servicestests/src/com/android/server/accessibility/a11ychecker/AccessibilityNodePathBuilderTest.java (renamed from core/tests/coretests/src/android/view/accessibility/a11ychecker/AccessibilityNodePathBuilderTest.java)32
-rw-r--r--services/tests/servicestests/src/com/android/server/accessibility/a11ychecker/MockAccessibilityNodeInfoBuilder.java (renamed from core/tests/coretests/src/android/view/accessibility/a11ychecker/MockAccessibilityNodeInfoBuilder.java)18
-rw-r--r--services/tests/servicestests/src/com/android/server/accessibility/a11ychecker/OWNERS1
-rw-r--r--services/tests/servicestests/src/com/android/server/accessibility/a11ychecker/TestUtils.java74
-rw-r--r--services/tests/servicestests/src/com/android/server/audio/AbsoluteVolumeBehaviorTest.java2
-rw-r--r--services/tests/servicestests/src/com/android/server/audio/AudioDeviceVolumeManagerTest.java2
-rw-r--r--services/tests/servicestests/src/com/android/server/audio/AudioServiceTest.java2
-rw-r--r--services/tests/servicestests/src/com/android/server/audio/DeviceVolumeBehaviorTest.java2
-rw-r--r--services/tests/servicestests/src/com/android/server/audio/VolumeHelperTest.java2
-rw-r--r--services/tests/servicestests/src/com/android/server/autofill/HelperTest.java113
-rw-r--r--services/tests/servicestests/src/com/android/server/biometrics/BiometricServiceTest.java9
-rw-r--r--services/tests/servicestests/src/com/android/server/biometrics/PreAuthInfoTest.java3
-rw-r--r--services/tests/servicestests/src/com/android/server/biometrics/sensors/BiometricSchedulerOperationTest.java113
-rw-r--r--services/tests/servicestests/src/com/android/server/devicepolicy/NetworkEventTest.java2
-rw-r--r--services/tests/servicestests/src/com/android/server/hdmi/HdmiCecNetworkTest.java9
-rw-r--r--services/tests/servicestests/src/com/android/server/location/contexthub/ContextHubEventLoggerTest.java70
-rw-r--r--services/tests/servicestests/src/com/android/server/media/projection/MediaProjectionManagerServiceTest.java120
-rw-r--r--services/tests/servicestests/src/com/android/server/pm/UserManagerTest.java36
-rw-r--r--services/tests/servicestests/src/com/android/server/power/WakefulnessSessionObserverTest.java222
-rw-r--r--services/tests/servicestests/src/com/android/server/power/hint/HintManagerServiceTest.java7
-rw-r--r--services/tests/servicestests/src/com/android/server/webkit/TestSystemImpl.java18
-rw-r--r--services/tests/servicestests/src/com/android/server/webkit/WebViewUpdateServiceTest.java49
-rw-r--r--services/tests/uiservicestests/src/com/android/server/notification/NotificationAttentionHelperTest.java34
-rw-r--r--services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java43
-rw-r--r--services/tests/uiservicestests/src/com/android/server/notification/ShortcutHelperTest.java212
-rw-r--r--services/tests/uiservicestests/src/com/android/server/notification/TimeToLiveHelperTest.java47
-rw-r--r--services/tests/uiservicestests/src/com/android/server/notification/ZenModeEventLoggerFake.java5
-rw-r--r--services/tests/uiservicestests/src/com/android/server/notification/ZenModeHelperTest.java151
-rw-r--r--services/tests/vibrator/src/com/android/server/vibrator/HapticFeedbackVibrationProviderTest.java29
-rw-r--r--services/tests/vibrator/src/com/android/server/vibrator/VibrationThreadTest.java4
-rw-r--r--services/tests/vibrator/src/com/android/server/vibrator/VibratorManagerServiceTest.java35
-rw-r--r--services/tests/wmtests/AndroidManifest.xml1
-rw-r--r--services/tests/wmtests/OWNERS5
-rw-r--r--services/tests/wmtests/res/xml/bookmarks.xml76
-rw-r--r--services/tests/wmtests/src/com/android/server/policy/CombinationKeyTests.java2
-rw-r--r--services/tests/wmtests/src/com/android/server/policy/ModifierShortcutManagerTests.java203
-rw-r--r--services/tests/wmtests/src/com/android/server/policy/ModifierShortcutTests.java4
-rw-r--r--services/tests/wmtests/src/com/android/server/policy/PhoneWindowManagerTests.java11
-rw-r--r--services/tests/wmtests/src/com/android/server/policy/ShortcutKeyTestBase.java4
-rw-r--r--services/tests/wmtests/src/com/android/server/policy/TestPhoneWindowManager.java14
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java31
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/ActivityRefresherTests.java16
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/AppCompatActivityRobot.java17
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/AppCompatAspectRatioOverridesTest.java316
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/AppCompatCameraOverridesTest.java91
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/AppCompatCameraPolicyTest.java4
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/AppCompatComponentPropRobot.java18
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/AppCompatConfigurationPersisterTest.java (renamed from services/tests/wmtests/src/com/android/server/wm/LetterboxConfigurationPersisterTest.java)40
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/AppCompatConfigurationRobot.java (renamed from services/tests/wmtests/src/com/android/server/wm/AppCompatLetterboxConfigurationRobot.java)28
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/AppCompatConfigurationTest.java (renamed from services/tests/wmtests/src/com/android/server/wm/LetterboxConfigurationTest.java)164
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/AppCompatOrientationOverridesTest.java2
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/AppCompatOrientationPolicyTest.java2
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/AppCompatRobotBase.java8
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/AppTransitionControllerTest.java371
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/BackNavigationControllerTests.java23
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/BackgroundLaunchProcessControllerTests.java69
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/CameraCompatFreeformPolicyTests.java44
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/CameraStateMonitorTests.java15
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/DesktopModeLaunchParamsModifierTests.java274
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java48
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/DisplayRotationCompatPolicyTests.java22
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/DisplayRotationImmersiveAppCompatPolicyTests.java12
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/DragDropControllerTests.java6
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/DualDisplayAreaGroupPolicyTest.java36
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/LetterboxUiControllerTest.java351
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/ProtoLogIntegrationTest.java5
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/RecentTasksTest.java28
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/RecentsAnimationControllerTest.java2
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/RemoteAnimationControllerTest.java9
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/RootWindowContainerTests.java22
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/SizeCompatTests.java521
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/SurfaceControlTests.java2
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/SystemServicesTestRule.java3
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/TaskFragmentOrganizerControllerTest.java14
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/TaskFragmentTest.java12
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/TaskPositionerTests.java526
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/TaskPositioningControllerTests.java152
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/TaskTests.java20
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/TestWindowManagerPolicy.java11
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/TransitionTests.java238
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/TransparentPolicyTest.java2
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/WallpaperControllerTests.java6
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/WindowContainerTests.java32
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/WindowContainerTraversalTests.java21
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/WindowManagerServiceTests.java28
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/WindowOrganizerTests.java36
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/WindowProcessControllerTests.java2
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/WindowTestsBase.java20
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/WindowTracingLegacyTest.java (renamed from services/tests/wmtests/src/com/android/server/wm/WindowTracingTest.java)4
-rw-r--r--services/tests/wmtests/src/com/android/server/wm/utils/DesktopModeFlagsUtilTest.java349
-rw-r--r--services/usage/java/com/android/server/usage/UsageStatsService.java18
-rw-r--r--services/usb/java/com/android/server/usb/UsbDeviceManager.java68
-rw-r--r--telecomm/java/android/telecom/CallAudioState.java2
-rw-r--r--telephony/OWNERS2
-rw-r--r--telephony/common/android/telephony/LocationAccessPolicy.java18
-rw-r--r--telephony/java/android/telephony/satellite/ProvisionSubscriberId.java28
-rw-r--r--telephony/java/android/telephony/satellite/SatelliteManager.java19
-rw-r--r--telephony/java/android/telephony/satellite/stub/ProvisionSubscriberId.aidl3
-rw-r--r--telephony/java/com/android/internal/telephony/ITelephony.aidl2
-rw-r--r--tests/BatteryStatsPerfTest/src/com/android/internal/os/BatteryUsageStatsPerfTest.java2
-rw-r--r--tests/FlickerTests/IME/Android.bp19
-rw-r--r--tests/FlickerTests/test-apps/app-helpers/src/com/android/server/wm/flicker/helpers/DesktopModeAppHelper.kt99
-rw-r--r--tests/Input/Android.bp1
-rw-r--r--tests/Input/AndroidTest.xml8
-rw-r--r--tests/Input/src/com/android/test/input/PointerIconLoadingTest.kt17
-rw-r--r--tests/InputMethodStressTest/src/com/android/inputmethod/stresstest/AutoShowTest.java8
-rw-r--r--tests/InputMethodStressTest/src/com/android/inputmethod/stresstest/DefaultImeVisibilityTest.java2
-rw-r--r--tests/InputMethodStressTest/src/com/android/inputmethod/stresstest/ImeOpenCloseStressTest.java2
-rw-r--r--tests/InputMethodStressTest/src/com/android/inputmethod/stresstest/ImeStressTestRule.java2
-rw-r--r--tests/Internal/src/com/android/internal/protolog/LegacyProtoLogImplTest.java19
-rw-r--r--tests/Internal/src/com/android/internal/protolog/LegacyProtoLogViewerConfigReaderTest.java114
-rw-r--r--tests/Internal/src/com/android/internal/protolog/PerfettoProtoLogImplTest.java173
-rw-r--r--tests/Internal/src/com/android/internal/protolog/ProtoLogImplTest.java25
-rw-r--r--tests/Internal/src/com/android/internal/protolog/ProtoLogViewerConfigReaderTest.java137
-rw-r--r--tests/Internal/src/com/android/internal/protolog/ProtologDataSourceTest.java4
-rw-r--r--tests/PackageWatchdog/src/com/android/server/PackageWatchdogTest.java18
-rw-r--r--tests/TrustTests/src/android/trust/test/UnlockAttemptTest.kt9
-rw-r--r--tests/inputmethod/ConcurrentMultiSessionImeTest/src/com/android/server/inputmethod/multisessiontest/ConcurrentMultiUserTest.java111
-rw-r--r--tests/inputmethod/ConcurrentMultiSessionImeTest/src/com/android/server/inputmethod/multisessiontest/MainActivity.java93
-rw-r--r--tests/inputmethod/ConcurrentMultiSessionImeTest/src/com/android/server/inputmethod/multisessiontest/TestRequestConstants.java10
-rw-r--r--tools/aapt2/Resource.h2
-rw-r--r--tools/aapt2/ResourceParser.cpp28
-rw-r--r--tools/aapt2/ResourceParser.h3
-rw-r--r--tools/aapt2/ResourceTable.cpp55
-rw-r--r--tools/aapt2/ResourceTable.h7
-rw-r--r--tools/aapt2/Resources.proto1
-rw-r--r--tools/aapt2/SdkConstants.cpp6
-rw-r--r--tools/aapt2/cmd/Compile.cpp1
-rw-r--r--tools/aapt2/cmd/Optimize.h4
-rw-r--r--tools/aapt2/cmd/Util.cpp9
-rw-r--r--tools/aapt2/cmd/Util_test.cpp8
-rw-r--r--tools/aapt2/format/proto/ProtoDeserialize.cpp3
-rw-r--r--tools/aapt2/format/proto/ProtoSerialize.cpp1
-rw-r--r--tools/aapt2/link/ManifestFixer.cpp64
-rw-r--r--tools/aapt2/link/ManifestFixer.h2
-rw-r--r--tools/aapt2/link/ManifestFixer_test.cpp113
-rw-r--r--tools/aapt2/util/Files.cpp2
-rw-r--r--tools/aapt2/util/Files.h2
-rw-r--r--tools/aapt2/xml/XmlPullParser.cpp9
-rw-r--r--tools/aapt2/xml/XmlPullParser.h7
-rw-r--r--tools/app_metadata_bundles/src/lib/java/com/android/asllib/AslConverter.java14
-rw-r--r--tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/AndroidSafetyLabel.java24
-rw-r--r--tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/AndroidSafetyLabelFactory.java96
-rw-r--r--tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/AppInfo.java168
-rw-r--r--tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/AppInfoFactory.java221
-rw-r--r--tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/AslMarshallable.java9
-rw-r--r--tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/AslMarshallableFactory.java10
-rw-r--r--tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/DataCategory.java10
-rw-r--r--tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/DataCategoryFactory.java8
-rw-r--r--tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/DataLabels.java13
-rw-r--r--tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/DataLabelsFactory.java10
-rw-r--r--tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/DataType.java7
-rw-r--r--tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/DataTypeFactory.java3
-rw-r--r--tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/DeveloperInfo.java167
-rw-r--r--tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/DeveloperInfoFactory.java89
-rw-r--r--tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/SafetyLabels.java42
-rw-r--r--tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/SafetyLabelsFactory.java105
-rw-r--r--tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/SecurityLabels.java12
-rw-r--r--tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/SecurityLabelsFactory.java12
-rw-r--r--tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/SystemAppSafetyLabel.java35
-rw-r--r--tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/SystemAppSafetyLabelFactory.java63
-rw-r--r--tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/ThirdPartyVerification.java12
-rw-r--r--tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/ThirdPartyVerificationFactory.java12
-rw-r--r--tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/TransparencyInfo.java32
-rw-r--r--tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/TransparencyInfoFactory.java69
-rw-r--r--tools/app_metadata_bundles/src/lib/java/com/android/asllib/util/XmlUtils.java173
-rw-r--r--tools/app_metadata_bundles/src/test/java/com/android/asllib/AllTests.java8
-rw-r--r--tools/app_metadata_bundles/src/test/java/com/android/asllib/AslgenTests.java12
-rw-r--r--tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/AndroidSafetyLabelTest.java105
-rw-r--r--tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/AppInfoTest.java153
-rw-r--r--tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/DataLabelsTest.java56
-rw-r--r--tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/DeveloperInfoTest.java139
-rw-r--r--tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/SafetyLabelsTest.java74
-rw-r--r--tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/SecurityLabelsTest.java102
-rw-r--r--tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/SystemAppSafetyLabelTest.java101
-rw-r--r--tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/ThirdPartyVerificationTest.java111
-rw-r--r--tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/TransparencyInfoTest.java101
-rw-r--r--tools/app_metadata_bundles/src/test/java/com/android/asllib/testutils/TestUtils.java114
-rw-r--r--tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/hr/missing-version.xml16
-rw-r--r--tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/hr/valid-empty.xml18
-rw-r--r--tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/hr/with-safety-labels.xml17
-rw-r--r--tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/hr/with-system-app-safety-label.xml4
-rw-r--r--tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/hr/with-transparency-info.xml15
-rw-r--r--tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/od/missing-version.xml18
-rw-r--r--tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/od/valid-empty.xml20
-rw-r--r--tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/od/valid-v1.xml8
-rw-r--r--tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/od/with-safety-labels.xml23
-rw-r--r--tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/od/with-system-app-safety-label.xml6
-rw-r--r--tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/od/with-transparency-info.xml16
-rw-r--r--tools/app_metadata_bundles/src/test/resources/com/android/asllib/appinfo/hr/all-fields-valid.xml2
-rw-r--r--tools/app_metadata_bundles/src/test/resources/com/android/asllib/appinfo/od/all-fields-valid-v1.xml24
-rw-r--r--tools/app_metadata_bundles/src/test/resources/com/android/asllib/appinfo/od/all-fields-valid.xml4
-rw-r--r--tools/app_metadata_bundles/src/test/resources/com/android/asllib/appinfo/od/unrecognized-v1.xml25
-rw-r--r--tools/app_metadata_bundles/src/test/resources/com/android/asllib/safetylabels/od/valid-v1.xml9
-rw-r--r--tools/app_metadata_bundles/src/test/resources/com/android/asllib/systemappsafetylabel/od/valid-v1.xml3
-rw-r--r--tools/app_metadata_bundles/src/test/resources/com/android/asllib/transparencyinfo/hr/with-app-info.xml2
-rw-r--r--tools/app_metadata_bundles/src/test/resources/com/android/asllib/transparencyinfo/hr/with-developer-info.xml11
-rw-r--r--tools/app_metadata_bundles/src/test/resources/com/android/asllib/transparencyinfo/od/valid-dev-info-v1.xml (renamed from tools/app_metadata_bundles/src/test/resources/com/android/asllib/transparencyinfo/od/with-developer-info.xml)0
-rw-r--r--tools/app_metadata_bundles/src/test/resources/com/android/asllib/transparencyinfo/od/valid-empty-v1.xml (renamed from tools/app_metadata_bundles/src/test/resources/com/android/asllib/transparencyinfo/od/valid-empty.xml)0
-rw-r--r--tools/app_metadata_bundles/src/test/resources/com/android/asllib/transparencyinfo/od/with-app-info-v2-and-dev-info-v1.xml25
-rw-r--r--tools/app_metadata_bundles/src/test/resources/com/android/asllib/transparencyinfo/od/with-app-info.xml4
-rw-r--r--tools/app_metadata_bundles/src/test/resources/com/android/asllib/validmappings/general-v1/od.xml70
-rw-r--r--tools/app_metadata_bundles/src/test/resources/com/android/asllib/validmappings/general/hr.xml17
-rw-r--r--tools/app_metadata_bundles/src/test/resources/com/android/asllib/validmappings/general/od.xml6
-rw-r--r--tools/lint/fix/README.md4
-rw-r--r--tools/protologtool/src/com/android/protolog/tool/ProtoLogCallProcessorImpl.kt2
-rw-r--r--tools/protologtool/src/com/android/protolog/tool/ProtoLogTool.kt4
-rw-r--r--tools/protologtool/src/com/android/protolog/tool/SourceTransformer.kt19
-rw-r--r--tools/protologtool/tests/com/android/protolog/tool/EndToEndTest.kt2
-rw-r--r--tools/protologtool/tests/com/android/protolog/tool/SourceTransformerTest.kt54
-rw-r--r--wifi/wifi.aconfig10
2444 files changed, 73615 insertions, 35317 deletions
diff --git a/AconfigFlags.bp b/AconfigFlags.bp
index a16aa2dea25b..7a1add3eb57e 100644
--- a/AconfigFlags.bp
+++ b/AconfigFlags.bp
@@ -98,6 +98,7 @@ aconfig_declarations_group {
"framework-jobscheduler-job.flags-aconfig-java",
"framework_graphics_flags_java_lib",
"hwui_flags_java_lib",
+ "libcore_exported_aconfig_flags_lib",
"power_flags_lib",
"sdk_sandbox_flags_lib",
"surfaceflinger_flags_java_lib",
@@ -140,6 +141,14 @@ java_aconfig_library {
defaults: ["framework-minus-apex-aconfig-java-defaults"],
}
+// Core Libraries / libcore
+java_aconfig_library {
+ name: "libcore_exported_aconfig_flags_lib",
+ aconfig_declarations: "libcore-aconfig-flags",
+ mode: "exported",
+ defaults: ["framework-minus-apex-aconfig-java-defaults"],
+}
+
// Telecom
java_aconfig_library {
name: "telecom_flags_core_java_lib",
@@ -233,6 +242,12 @@ cc_aconfig_library {
aconfig_declarations: "com.android.text.flags-aconfig",
}
+rust_aconfig_library {
+ name: "libandroid_text_flags_rust",
+ crate_name: "android_text_flags",
+ aconfig_declarations: "com.android.text.flags-aconfig",
+}
+
// Location
aconfig_declarations {
name: "android.location.flags-aconfig",
@@ -363,6 +378,7 @@ java_aconfig_library {
min_sdk_version: "30",
apex_available: [
"//apex_available:platform",
+ "com.android.btservices",
"com.android.mediaprovider",
"com.android.permission",
],
@@ -403,17 +419,6 @@ java_aconfig_library {
cc_aconfig_library {
name: "android.companion.virtualdevice.flags-aconfig-cc",
aconfig_declarations: "android.companion.virtualdevice.flags-aconfig",
-}
-
-cc_aconfig_library {
- name: "android.companion.virtualdevice.flags-aconfig-cc-host",
- aconfig_declarations: "android.companion.virtualdevice.flags-aconfig",
- host_supported: true,
-}
-
-cc_aconfig_library {
- name: "android.companion.virtualdevice.flags-aconfig-cc-test",
- aconfig_declarations: "android.companion.virtualdevice.flags-aconfig",
host_supported: true,
mode: "test",
}
@@ -1490,6 +1495,13 @@ java_aconfig_library {
defaults: ["framework-minus-apex-aconfig-java-defaults"],
}
+java_aconfig_library {
+ name: "backstage_power_flags_lib-host",
+ aconfig_declarations: "backstage_power_flags",
+ host_supported: true,
+ defaults: ["framework-minus-apex-aconfig-java-defaults"],
+}
+
// Dropbox data
aconfig_declarations {
name: "dropbox_flags",
diff --git a/Android.bp b/Android.bp
index f0aa62cc37ae..eabd9c7565da 100644
--- a/Android.bp
+++ b/Android.bp
@@ -417,7 +417,6 @@ java_defaults {
"modules-utils-fastxmlserializer",
"modules-utils-preconditions",
"modules-utils-statemachine",
- "modules-utils-synchronous-result-receiver",
"modules-utils-os",
"modules-utils-uieventlogger-interface",
"framework-permission-aidl-java",
diff --git a/BAL_OWNERS b/BAL_OWNERS
index d56a1d4634df..ec779e76fa3b 100644
--- a/BAL_OWNERS
+++ b/BAL_OWNERS
@@ -2,4 +2,6 @@ brufino@google.com
achim@google.com
topjohnwu@google.com
lus@google.com
+haok@google.com
+wnan@google.com
diff --git a/apct-tests/perftests/multiuser/Android.bp b/apct-tests/perftests/multiuser/Android.bp
index 1653edc77de9..856dba3f804c 100644
--- a/apct-tests/perftests/multiuser/Android.bp
+++ b/apct-tests/perftests/multiuser/Android.bp
@@ -38,3 +38,10 @@ android_test {
],
certificate: "platform",
}
+
+filegroup {
+ name: "multi_user_trace_config",
+ srcs: [
+ "trace_configs/trace_config_multi_user.textproto",
+ ],
+}
diff --git a/apct-tests/perftests/packagemanager/src/android/os/PackageManagerPerfTest.java b/apct-tests/perftests/packagemanager/src/android/os/PackageManagerPerfTest.java
index 4bcc8c499f0d..f302033dee0f 100644
--- a/apct-tests/perftests/packagemanager/src/android/os/PackageManagerPerfTest.java
+++ b/apct-tests/perftests/packagemanager/src/android/os/PackageManagerPerfTest.java
@@ -31,6 +31,7 @@ import android.content.pm.PackageInstaller;
import android.content.pm.PackageManager;
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
+import android.permission.PermissionManager;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.LargeTest;
@@ -107,6 +108,8 @@ public class PackageManagerPerfTest {
public void setup() {
PackageManager.disableApplicationInfoCache();
PackageManager.disablePackageInfoCache();
+ PermissionManager.disablePermissionCache();
+ PermissionManager.disablePackageNamePermissionCache();
}
@Test
diff --git a/apex/jobscheduler/service/java/com/android/server/alarm/AlarmManagerService.java b/apex/jobscheduler/service/java/com/android/server/alarm/AlarmManagerService.java
index dfa72069c28a..ee03e4b2ccd1 100644
--- a/apex/jobscheduler/service/java/com/android/server/alarm/AlarmManagerService.java
+++ b/apex/jobscheduler/service/java/com/android/server/alarm/AlarmManagerService.java
@@ -120,6 +120,7 @@ import android.os.SystemProperties;
import android.os.ThreadLocalWorkSource;
import android.os.Trace;
import android.os.UserHandle;
+import android.os.UserManager;
import android.os.WorkSource;
import android.provider.DeviceConfig;
import android.provider.Settings;
@@ -1794,7 +1795,8 @@ public class AlarmManagerService extends SystemService {
mActivityManagerInternal = LocalServices.getService(ActivityManagerInternal.class);
mUseFrozenStateToDropListenerAlarms = Flags.useFrozenStateToDropListenerAlarms();
- mStartUserBeforeScheduledAlarms = Flags.startUserBeforeScheduledAlarms();
+ mStartUserBeforeScheduledAlarms = Flags.startUserBeforeScheduledAlarms()
+ && UserManager.supportsMultipleUsers();
if (mStartUserBeforeScheduledAlarms) {
mUserWakeupStore = new UserWakeupStore();
mUserWakeupStore.init();
@@ -3015,7 +3017,7 @@ public class AlarmManagerService extends SystemService {
mUseFrozenStateToDropListenerAlarms);
pw.println();
pw.print(Flags.FLAG_START_USER_BEFORE_SCHEDULED_ALARMS,
- mStartUserBeforeScheduledAlarms);
+ Flags.startUserBeforeScheduledAlarms());
pw.decreaseIndent();
pw.println();
pw.println();
diff --git a/apex/jobscheduler/service/java/com/android/server/alarm/UserWakeupStore.java b/apex/jobscheduler/service/java/com/android/server/alarm/UserWakeupStore.java
index dc5e3414a819..93904a773ed5 100644
--- a/apex/jobscheduler/service/java/com/android/server/alarm/UserWakeupStore.java
+++ b/apex/jobscheduler/service/java/com/android/server/alarm/UserWakeupStore.java
@@ -20,6 +20,7 @@ package com.android.server.alarm;
import android.annotation.Nullable;
import android.os.Environment;
import android.os.SystemClock;
+import android.os.UserHandle;
import android.util.AtomicFile;
import android.util.IndentingPrintWriter;
import android.util.Pair;
@@ -113,15 +114,18 @@ public class UserWakeupStore {
}
/**
- * Add user wakeup for the alarm.
+ * Add user wakeup for the alarm if needed.
* @param userId Id of the user that scheduled alarm.
* @param alarmTime time when alarm is expected to trigger.
*/
public void addUserWakeup(int userId, long alarmTime) {
- synchronized (mUserWakeupLock) {
- mUserStarts.put(userId, alarmTime - BUFFER_TIME_MS + getUserWakeupOffset());
+ // SYSTEM user is always running, so no need to schedule wakeup for it.
+ if (userId != UserHandle.USER_SYSTEM) {
+ synchronized (mUserWakeupLock) {
+ mUserStarts.put(userId, alarmTime - BUFFER_TIME_MS + getUserWakeupOffset());
+ }
+ updateUserListFile();
}
- updateUserListFile();
}
/**
diff --git a/api/Android.bp b/api/Android.bp
index cd1997c8bf97..d931df165a8f 100644
--- a/api/Android.bp
+++ b/api/Android.bp
@@ -29,12 +29,14 @@ bootstrap_go_package {
pkgPath: "android/soong/api",
deps: [
"blueprint",
+ "blueprint-proptools",
"soong",
"soong-android",
"soong-genrule",
"soong-java",
],
srcs: ["api.go"],
+ testSrcs: ["api_test.go"],
pluginFor: ["soong_build"],
}
@@ -60,40 +62,8 @@ metalava_cmd = "$(location metalava)"
metalava_cmd += " -J--add-opens=java.base/java.util=ALL-UNNAMED "
metalava_cmd += " --quiet "
-soong_config_module_type {
- name: "enable_crashrecovery_module",
- module_type: "combined_apis_defaults",
- config_namespace: "ANDROID",
- bool_variables: ["release_crashrecovery_module"],
- properties: [
- "bootclasspath",
- "system_server_classpath",
- ],
-}
-
-soong_config_bool_variable {
- name: "release_crashrecovery_module",
-}
-
-enable_crashrecovery_module {
- name: "crashrecovery_module_defaults",
- soong_config_variables: {
- release_crashrecovery_module: {
- bootclasspath: [
- "framework-crashrecovery",
- ],
- system_server_classpath: [
- "service-crashrecovery",
- ],
- },
- },
-}
-
combined_apis {
name: "frameworks-base-api",
- defaults: [
- "crashrecovery_module_defaults",
- ],
bootclasspath: [
"android.net.ipsec.ike",
"art.module.public.api",
@@ -126,7 +96,12 @@ combined_apis {
"framework-virtualization",
"framework-wifi",
"i18n.module.public.api",
- ],
+ ] + select(soong_config_variable("ANDROID", "release_crashrecovery_module"), {
+ "true": [
+ "framework-crashrecovery",
+ ],
+ default: [],
+ }),
system_server_classpath: [
"service-art",
"service-configinfrastructure",
@@ -135,7 +110,12 @@ combined_apis {
"service-permission",
"service-rkp",
"service-sdksandbox",
- ],
+ ] + select(soong_config_variable("ANDROID", "release_crashrecovery_module"), {
+ "true": [
+ "service-crashrecovery",
+ ],
+ default: [],
+ }),
}
genrule {
@@ -368,8 +348,6 @@ stubs_defaults {
"--hide CallbackInterface",
// Disable HiddenSuperclass, as Metalava handles this fine (it should be hidden by default)
"--hide HiddenSuperclass",
- "--hide-package android.audio.policy.configuration.V7_0",
- "--hide-package com.android.server",
"--manifest $(location :frameworks-base-core-AndroidManifest.xml)",
],
filter_packages: packages_to_document,
diff --git a/api/StubLibraries.bp b/api/StubLibraries.bp
index 12820f9ff277..8dfddf0e13c8 100644
--- a/api/StubLibraries.bp
+++ b/api/StubLibraries.bp
@@ -1345,4 +1345,5 @@ java_library {
":hwbinder-stubs-docs",
],
visibility: ["//visibility:public"],
+ is_stubs_module: true,
}
diff --git a/api/api.go b/api/api.go
index d4db49e90a01..b6b1a7e44510 100644
--- a/api/api.go
+++ b/api/api.go
@@ -54,16 +54,15 @@ var non_updatable_modules = []string{virtualization, location}
// The properties of the combined_apis module type.
type CombinedApisProperties struct {
// Module libraries in the bootclasspath
- Bootclasspath []string
+ Bootclasspath proptools.Configurable[[]string]
// Module libraries on the bootclasspath if include_nonpublic_framework_api is true.
Conditional_bootclasspath []string
// Module libraries in system server
- System_server_classpath []string
+ System_server_classpath proptools.Configurable[[]string]
}
type CombinedApis struct {
android.ModuleBase
- android.DefaultableModuleBase
properties CombinedApisProperties
}
@@ -74,34 +73,41 @@ func init() {
func registerBuildComponents(ctx android.RegistrationContext) {
ctx.RegisterModuleType("combined_apis", combinedApisModuleFactory)
- ctx.RegisterModuleType("combined_apis_defaults", CombinedApisModuleDefaultsFactory)
}
var PrepareForCombinedApisTest = android.FixtureRegisterWithContext(registerBuildComponents)
-func (a *CombinedApis) apiFingerprintStubDeps() []string {
+func (a *CombinedApis) bootclasspath(ctx android.ConfigAndErrorContext) []string {
+ return a.properties.Bootclasspath.GetOrDefault(a.ConfigurableEvaluator(ctx), nil)
+}
+
+func (a *CombinedApis) systemServerClasspath(ctx android.ConfigAndErrorContext) []string {
+ return a.properties.System_server_classpath.GetOrDefault(a.ConfigurableEvaluator(ctx), nil)
+}
+
+func (a *CombinedApis) apiFingerprintStubDeps(ctx android.BottomUpMutatorContext) []string {
ret := []string{}
ret = append(
ret,
- transformArray(a.properties.Bootclasspath, "", ".stubs")...,
+ transformArray(a.bootclasspath(ctx), "", ".stubs")...,
)
ret = append(
ret,
- transformArray(a.properties.Bootclasspath, "", ".stubs.system")...,
+ transformArray(a.bootclasspath(ctx), "", ".stubs.system")...,
)
ret = append(
ret,
- transformArray(a.properties.Bootclasspath, "", ".stubs.module_lib")...,
+ transformArray(a.bootclasspath(ctx), "", ".stubs.module_lib")...,
)
ret = append(
ret,
- transformArray(a.properties.System_server_classpath, "", ".stubs.system_server")...,
+ transformArray(a.systemServerClasspath(ctx), "", ".stubs.system_server")...,
)
return ret
}
func (a *CombinedApis) DepsMutator(ctx android.BottomUpMutatorContext) {
- ctx.AddDependency(ctx.Module(), nil, a.apiFingerprintStubDeps()...)
+ ctx.AddDependency(ctx.Module(), nil, a.apiFingerprintStubDeps(ctx)...)
}
func (a *CombinedApis) GenerateAndroidBuildActions(ctx android.ModuleContext) {
@@ -532,8 +538,8 @@ func createFullExportableApiLibraries(ctx android.LoadHookContext) {
}
func (a *CombinedApis) createInternalModules(ctx android.LoadHookContext) {
- bootclasspath := a.properties.Bootclasspath
- system_server_classpath := a.properties.System_server_classpath
+ bootclasspath := a.bootclasspath(ctx)
+ system_server_classpath := a.systemServerClasspath(ctx)
if ctx.Config().VendorConfig("ANDROID").Bool("include_nonpublic_framework_api") {
bootclasspath = append(bootclasspath, a.properties.Conditional_bootclasspath...)
sort.Strings(bootclasspath)
@@ -568,7 +574,6 @@ func combinedApisModuleFactory() android.Module {
module := &CombinedApis{}
module.AddProperties(&module.properties)
android.InitAndroidModule(module)
- android.InitDefaultableModule(module)
android.AddLoadHook(module, func(ctx android.LoadHookContext) { module.createInternalModules(ctx) })
return module
}
@@ -605,16 +610,3 @@ func remove(s []string, v string) []string {
}
return s2
}
-
-// Defaults
-type CombinedApisModuleDefaults struct {
- android.ModuleBase
- android.DefaultsModuleBase
-}
-
-func CombinedApisModuleDefaultsFactory() android.Module {
- module := &CombinedApisModuleDefaults{}
- module.AddProperties(&CombinedApisProperties{})
- android.InitDefaultsModule(module)
- return module
-}
diff --git a/api/api_test.go b/api/api_test.go
new file mode 100644
index 000000000000..47d167093b39
--- /dev/null
+++ b/api/api_test.go
@@ -0,0 +1,254 @@
+// 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 api
+
+import (
+ "android/soong/android"
+ "android/soong/java"
+ "fmt"
+ "testing"
+
+ "github.com/google/blueprint/proptools"
+)
+
+var prepareForTestWithCombinedApis = android.GroupFixturePreparers(
+ android.FixtureRegisterWithContext(registerBuildComponents),
+ java.PrepareForTestWithJavaBuildComponents,
+ android.FixtureAddTextFile("a/Android.bp", gatherRequiredDepsForTest()),
+ java.PrepareForTestWithJavaSdkLibraryFiles,
+ android.FixtureMergeMockFs(android.MockFS{
+ "a/api/current.txt": nil,
+ "a/api/removed.txt": nil,
+ "a/api/system-current.txt": nil,
+ "a/api/system-removed.txt": nil,
+ "a/api/test-current.txt": nil,
+ "a/api/test-removed.txt": nil,
+ "a/api/module-lib-current.txt": nil,
+ "a/api/module-lib-removed.txt": nil,
+ }),
+ android.FixtureModifyProductVariables(func(variables android.FixtureProductVariables) {
+ variables.Allow_missing_dependencies = proptools.BoolPtr(true)
+ }),
+)
+
+func gatherRequiredDepsForTest() string {
+ var bp string
+
+ extraLibraryModules := []string{
+ "stable.core.platform.api.stubs",
+ "core-lambda-stubs",
+ "core.current.stubs",
+ "ext",
+ "framework",
+ "android_stubs_current.from-text",
+ "android_system_stubs_current.from-text",
+ "android_test_stubs_current.from-text",
+ "android_test_frameworks_core_stubs_current.from-text",
+ "android_module_lib_stubs_current.from-text",
+ "android_system_server_stubs_current.from-text",
+ "android_stubs_current.from-source",
+ "android_system_stubs_current.from-source",
+ "android_test_stubs_current.from-source",
+ "android_test_frameworks_core_stubs_current.from-source",
+ "android_module_lib_stubs_current.from-source",
+ "android_system_server_stubs_current.from-source",
+ "android_stubs_current_exportable.from-source",
+ "android_system_stubs_current_exportable.from-source",
+ "android_test_stubs_current_exportable.from-source",
+ "android_module_lib_stubs_current_exportable.from-source",
+ "android_system_server_stubs_current_exportable.from-source",
+ "stub-annotations",
+ }
+
+ extraSdkLibraryModules := []string{
+ "framework-virtualization",
+ "framework-location",
+ }
+
+ extraSystemModules := []string{
+ "core-public-stubs-system-modules",
+ "core-module-lib-stubs-system-modules",
+ "stable-core-platform-api-stubs-system-modules",
+ }
+
+ extraFilegroupModules := []string{
+ "non-updatable-current.txt",
+ "non-updatable-removed.txt",
+ "non-updatable-system-current.txt",
+ "non-updatable-system-removed.txt",
+ "non-updatable-test-current.txt",
+ "non-updatable-test-removed.txt",
+ "non-updatable-module-lib-current.txt",
+ "non-updatable-module-lib-removed.txt",
+ "non-updatable-system-server-current.txt",
+ "non-updatable-system-server-removed.txt",
+ "non-updatable-exportable-current.txt",
+ "non-updatable-exportable-removed.txt",
+ "non-updatable-exportable-system-current.txt",
+ "non-updatable-exportable-system-removed.txt",
+ "non-updatable-exportable-test-current.txt",
+ "non-updatable-exportable-test-removed.txt",
+ "non-updatable-exportable-module-lib-current.txt",
+ "non-updatable-exportable-module-lib-removed.txt",
+ "non-updatable-exportable-system-server-current.txt",
+ "non-updatable-exportable-system-server-removed.txt",
+ }
+
+ for _, extra := range extraLibraryModules {
+ bp += fmt.Sprintf(`
+ java_library {
+ name: "%s",
+ srcs: ["a.java"],
+ sdk_version: "none",
+ system_modules: "stable-core-platform-api-stubs-system-modules",
+ compile_dex: true,
+ }
+ `, extra)
+ }
+
+ for _, extra := range extraSdkLibraryModules {
+ bp += fmt.Sprintf(`
+ java_sdk_library {
+ name: "%s",
+ srcs: ["a.java"],
+ public: {
+ enabled: true,
+ },
+ system: {
+ enabled: true,
+ },
+ test: {
+ enabled: true,
+ },
+ module_lib: {
+ enabled: true,
+ },
+ api_packages: [
+ "foo",
+ ],
+ sdk_version: "core_current",
+ compile_dex: true,
+ annotations_enabled: true,
+ }
+ `, extra)
+ }
+
+ for _, extra := range extraFilegroupModules {
+ bp += fmt.Sprintf(`
+ filegroup {
+ name: "%[1]s",
+ }
+ `, extra)
+ }
+
+ for _, extra := range extraSystemModules {
+ bp += fmt.Sprintf(`
+ java_system_modules {
+ name: "%[1]s",
+ libs: ["%[1]s-lib"],
+ }
+ java_library {
+ name: "%[1]s-lib",
+ sdk_version: "none",
+ system_modules: "none",
+ }
+ `, extra)
+ }
+
+ bp += fmt.Sprintf(`
+ java_defaults {
+ name: "android.jar_defaults",
+ }
+ `)
+
+ return bp
+}
+
+func TestCombinedApisDefaults(t *testing.T) {
+
+ result := android.GroupFixturePreparers(
+ prepareForTestWithCombinedApis,
+ java.FixtureWithLastReleaseApis(
+ "framework-location", "framework-virtualization", "framework-foo", "framework-bar"),
+ android.FixtureModifyProductVariables(func(variables android.FixtureProductVariables) {
+ variables.VendorVars = map[string]map[string]string{
+ "boolean_var": {
+ "for_testing": "true",
+ },
+ }
+ }),
+ ).RunTestWithBp(t, `
+ java_sdk_library {
+ name: "framework-foo",
+ srcs: ["a.java"],
+ public: {
+ enabled: true,
+ },
+ system: {
+ enabled: true,
+ },
+ test: {
+ enabled: true,
+ },
+ module_lib: {
+ enabled: true,
+ },
+ api_packages: [
+ "foo",
+ ],
+ sdk_version: "core_current",
+ annotations_enabled: true,
+ }
+
+ java_sdk_library {
+ name: "framework-bar",
+ srcs: ["a.java"],
+ public: {
+ enabled: true,
+ },
+ system: {
+ enabled: true,
+ },
+ test: {
+ enabled: true,
+ },
+ module_lib: {
+ enabled: true,
+ },
+ api_packages: [
+ "foo",
+ ],
+ sdk_version: "core_current",
+ annotations_enabled: true,
+ }
+
+ combined_apis {
+ name: "foo",
+ bootclasspath: [
+ "framework-bar",
+ ] + select(boolean_var_for_testing(), {
+ true: [
+ "framework-foo",
+ ],
+ default: [],
+ }),
+ }
+ `)
+
+ subModuleDependsOnSelectAppendedModule := java.CheckModuleHasDependency(t,
+ result.TestContext, "foo-current.txt", "", "framework-foo")
+ android.AssertBoolEquals(t, "Submodule expected to depend on the select-appended module",
+ true, subModuleDependsOnSelectAppendedModule)
+}
diff --git a/api/coverage/tools/ExtractFlaggedApis.kt b/api/coverage/tools/ExtractFlaggedApis.kt
index bf67187f4bad..0a3ae4f790b0 100644
--- a/api/coverage/tools/ExtractFlaggedApis.kt
+++ b/api/coverage/tools/ExtractFlaggedApis.kt
@@ -16,9 +16,9 @@
package android.platform.coverage
+import com.android.tools.metalava.model.CallableItem
import com.android.tools.metalava.model.ClassItem
import com.android.tools.metalava.model.Item
-import com.android.tools.metalava.model.MethodItem
import com.android.tools.metalava.model.text.ApiFile
import java.io.File
import java.io.FileWriter
@@ -40,24 +40,24 @@ fun main(args: Array<String>) {
fun extractFlaggedApisFromClass(
classItem: ClassItem,
- methods: List<MethodItem>,
+ callables: List<CallableItem>,
packageName: String,
builder: FlagApiMap.Builder
) {
- if (methods.isEmpty()) return
+ if (callables.isEmpty()) return
val classFlag = getClassFlag(classItem)
- for (method in methods) {
- val methodFlag = getFlagAnnotation(method) ?: classFlag
+ for (callable in callables) {
+ val callableFlag = getFlagAnnotation(callable) ?: classFlag
val api =
JavaMethod.newBuilder()
.setPackageName(packageName)
.setClassName(classItem.fullName())
- .setMethodName(method.name())
- for (param in method.parameters()) {
+ .setMethodName(callable.name())
+ for (param in callable.parameters()) {
api.addParameters(param.type().toTypeString())
}
- if (methodFlag != null) {
- addFlaggedApi(builder, api, methodFlag)
+ if (callableFlag != null) {
+ addFlaggedApi(builder, api, callableFlag)
}
}
}
diff --git a/api/go.work b/api/go.work
index edd002e7efba..c09bee578b61 100644
--- a/api/go.work
+++ b/api/go.work
@@ -1,17 +1,17 @@
-go 1.18
+go 1.22
use (
.
- ../../../build/soong
../../../build/blueprint
+ ../../../build/soong
../../../external/go-cmp
../../../external/golang-protobuf
)
replace (
android/soong v0.0.0 => ../../../build/soong
- google.golang.org/protobuf v0.0.0 => ../../../external/golang-protobuf
github.com/google/blueprint v0.0.0 => ../../../build/blueprint
github.com/google/go-cmp v0.0.0 => ../../../external/go-cmp
go.starlark.net v0.0.0 => ../../../external/starlark-go
+ google.golang.org/protobuf v0.0.0 => ../../../external/golang-protobuf
)
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp
index 7eb9d0f3ea91..fdf9abc49604 100644
--- a/cmds/bootanimation/BootAnimation.cpp
+++ b/cmds/bootanimation/BootAnimation.cpp
@@ -236,7 +236,7 @@ void BootAnimation::onFirstRef() {
ALOGD("%sAnimationPreloadTiming start time: %" PRId64 "ms",
mShuttingDown ? "Shutdown" : "Boot", elapsedRealtime());
preloadAnimation();
- ALOGD("%sAnimationPreloadStopTiming start time: %" PRId64 "ms",
+ ALOGD("%sAnimationPreloadTiming stop time: %" PRId64 "ms",
mShuttingDown ? "Shutdown" : "Boot", elapsedRealtime());
}
}
diff --git a/core/api/current.txt b/core/api/current.txt
index 46f426b9f8e9..69c409bb5261 100644
--- a/core/api/current.txt
+++ b/core/api/current.txt
@@ -1058,7 +1058,7 @@ package android {
field public static final int label = 16842753; // 0x1010001
field public static final int labelFor = 16843718; // 0x10103c6
field @Deprecated public static final int labelTextSize = 16843317; // 0x1010235
- field @FlaggedApi("android.view.inputmethod.ime_switcher_revamp") public static final int languageSettingsActivity;
+ field @FlaggedApi("android.view.inputmethod.ime_switcher_revamp_api") public static final int languageSettingsActivity;
field public static final int languageTag = 16844040; // 0x1010508
field public static final int largeHeap = 16843610; // 0x101035a
field public static final int largeScreens = 16843398; // 0x1010286
@@ -6844,6 +6844,9 @@ package android.app {
method public android.app.Notification.MessagingStyle.Message setData(String, android.net.Uri);
}
+ @FlaggedApi("android.app.api_rich_ongoing") public abstract static class Notification.RichOngoingStyle extends android.app.Notification.Style {
+ }
+
public abstract static class Notification.Style {
ctor @Deprecated public Notification.Style();
method public android.app.Notification build();
@@ -11394,7 +11397,7 @@ package android.content {
field public static final String EXTRA_LOCALE_LIST = "android.intent.extra.LOCALE_LIST";
field public static final String EXTRA_LOCAL_ONLY = "android.intent.extra.LOCAL_ONLY";
field public static final String EXTRA_LOCUS_ID = "android.intent.extra.LOCUS_ID";
- field @FlaggedApi("android.service.chooser.enable_sharesheet_metadata_extra") public static final String EXTRA_METADATA_TEXT = "android.intent.extra.METADATA_TEXT";
+ field public static final String EXTRA_METADATA_TEXT = "android.intent.extra.METADATA_TEXT";
field public static final String EXTRA_MIME_TYPES = "android.intent.extra.MIME_TYPES";
field public static final String EXTRA_NOT_UNKNOWN_SOURCE = "android.intent.extra.NOT_UNKNOWN_SOURCE";
field public static final String EXTRA_ORIGINATING_URI = "android.intent.extra.ORIGINATING_URI";
@@ -11603,6 +11606,7 @@ package android.content {
method public static android.content.IntentSender readIntentSenderOrNullFromParcel(android.os.Parcel);
method public void sendIntent(android.content.Context, int, android.content.Intent, android.content.IntentSender.OnFinished, android.os.Handler) throws android.content.IntentSender.SendIntentException;
method public void sendIntent(android.content.Context, int, android.content.Intent, android.content.IntentSender.OnFinished, android.os.Handler, String) throws android.content.IntentSender.SendIntentException;
+ method @FlaggedApi("com.android.window.flags.bal_send_intent_with_options") public void sendIntent(@Nullable android.content.Context, int, @Nullable android.content.Intent, @Nullable String, @Nullable android.os.Bundle, @Nullable java.util.concurrent.Executor, @Nullable android.content.IntentSender.OnFinished) throws android.content.IntentSender.SendIntentException;
method public static void writeIntentSenderOrNullToParcel(android.content.IntentSender, android.os.Parcel);
method public void writeToParcel(android.os.Parcel, int);
field @NonNull public static final android.os.Parcelable.Creator<android.content.IntentSender> CREATOR;
@@ -12043,6 +12047,7 @@ package android.content.pm {
field public static final int COLOR_MODE_DEFAULT = 0; // 0x0
field public static final int COLOR_MODE_HDR = 2; // 0x2
field public static final int COLOR_MODE_WIDE_COLOR_GAMUT = 1; // 0x1
+ field @FlaggedApi("android.content.res.handle_all_config_changes") public static final int CONFIG_ASSETS_PATHS = -2147483648; // 0x80000000
field public static final int CONFIG_COLOR_MODE = 16384; // 0x4000
field public static final int CONFIG_DENSITY = 4096; // 0x1000
field public static final int CONFIG_FONT_SCALE = 1073741824; // 0x40000000
@@ -12056,6 +12061,7 @@ package android.content.pm {
field public static final int CONFIG_MNC = 2; // 0x2
field public static final int CONFIG_NAVIGATION = 64; // 0x40
field public static final int CONFIG_ORIENTATION = 128; // 0x80
+ field @FlaggedApi("android.content.res.handle_all_config_changes") public static final int CONFIG_RESOURCES_UNUSED = 134217728; // 0x8000000
field public static final int CONFIG_SCREEN_LAYOUT = 256; // 0x100
field public static final int CONFIG_SCREEN_SIZE = 1024; // 0x400
field public static final int CONFIG_SMALLEST_SCREEN_SIZE = 2048; // 0x800
@@ -26563,7 +26569,7 @@ package android.media.midi {
package android.media.projection {
public final class MediaProjection {
- method public android.hardware.display.VirtualDisplay createVirtualDisplay(@NonNull String, int, int, int, int, @Nullable android.view.Surface, @Nullable android.hardware.display.VirtualDisplay.Callback, @Nullable android.os.Handler);
+ method @Nullable public android.hardware.display.VirtualDisplay createVirtualDisplay(@NonNull String, int, int, int, int, @Nullable android.view.Surface, @Nullable android.hardware.display.VirtualDisplay.Callback, @Nullable android.os.Handler);
method public void registerCallback(@NonNull android.media.projection.MediaProjection.Callback, @Nullable android.os.Handler);
method public void stop();
method public void unregisterCallback(@NonNull android.media.projection.MediaProjection.Callback);
@@ -26587,7 +26593,7 @@ package android.media.projection {
public final class MediaProjectionManager {
method @NonNull public android.content.Intent createScreenCaptureIntent();
method @NonNull public android.content.Intent createScreenCaptureIntent(@NonNull android.media.projection.MediaProjectionConfig);
- method public android.media.projection.MediaProjection getMediaProjection(int, @NonNull android.content.Intent);
+ method @Nullable public android.media.projection.MediaProjection getMediaProjection(int, @NonNull android.content.Intent);
}
}
@@ -54856,6 +54862,8 @@ package android.view.accessibility {
method @Deprecated public void addAction(int);
method public void addChild(android.view.View);
method public void addChild(android.view.View, int);
+ method @FlaggedApi("android.view.accessibility.support_multiple_labeledby") public void addLabeledBy(@NonNull android.view.View);
+ method @FlaggedApi("android.view.accessibility.support_multiple_labeledby") public void addLabeledBy(@NonNull android.view.View, int);
method public boolean canOpenPopup();
method public int describeContents();
method public java.util.List<android.view.accessibility.AccessibilityNodeInfo> findAccessibilityNodeInfosByText(String);
@@ -54884,6 +54892,7 @@ package android.view.accessibility {
method public int getInputType();
method public android.view.accessibility.AccessibilityNodeInfo getLabelFor();
method public android.view.accessibility.AccessibilityNodeInfo getLabeledBy();
+ method @FlaggedApi("android.view.accessibility.support_multiple_labeledby") @NonNull public java.util.List<android.view.accessibility.AccessibilityNodeInfo> getLabeledByList();
method public int getLiveRegion();
method public int getMaxTextLength();
method @NonNull public java.time.Duration getMinDurationBetweenContentChanges();
@@ -54944,6 +54953,8 @@ package android.view.accessibility {
method public boolean removeAction(android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction);
method public boolean removeChild(android.view.View);
method public boolean removeChild(android.view.View, int);
+ method @FlaggedApi("android.view.accessibility.support_multiple_labeledby") public boolean removeLabeledBy(@NonNull android.view.View);
+ method @FlaggedApi("android.view.accessibility.support_multiple_labeledby") public boolean removeLabeledBy(@NonNull android.view.View, int);
method public void setAccessibilityDataSensitive(boolean);
method public void setAccessibilityFocused(boolean);
method public void setAvailableExtraData(java.util.List<java.lang.String>);
@@ -56332,7 +56343,7 @@ package android.view.inputmethod {
public final class InputMethodInfo implements android.os.Parcelable {
ctor public InputMethodInfo(android.content.Context, android.content.pm.ResolveInfo) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
ctor public InputMethodInfo(String, String, CharSequence, String);
- method @FlaggedApi("android.view.inputmethod.ime_switcher_revamp") @Nullable public android.content.Intent createImeLanguageSettingsActivityIntent();
+ method @FlaggedApi("android.view.inputmethod.ime_switcher_revamp_api") @Nullable public android.content.Intent createImeLanguageSettingsActivityIntent();
method @Nullable public android.content.Intent createStylusHandwritingSettingsActivityIntent();
method public int describeContents();
method public void dump(android.util.Printer, String);
@@ -56353,7 +56364,7 @@ package android.view.inputmethod {
method public boolean supportsStylusHandwriting();
method public boolean suppressesSpellChecker();
method public void writeToParcel(android.os.Parcel, int);
- field @FlaggedApi("android.view.inputmethod.ime_switcher_revamp") public static final String ACTION_IME_LANGUAGE_SETTINGS = "android.view.inputmethod.action.IME_LANGUAGE_SETTINGS";
+ field @FlaggedApi("android.view.inputmethod.ime_switcher_revamp_api") public static final String ACTION_IME_LANGUAGE_SETTINGS = "android.view.inputmethod.action.IME_LANGUAGE_SETTINGS";
field public static final String ACTION_STYLUS_HANDWRITING_SETTINGS = "android.view.inputmethod.action.STYLUS_HANDWRITING_SETTINGS";
field @NonNull public static final android.os.Parcelable.Creator<android.view.inputmethod.InputMethodInfo> CREATOR;
}
diff --git a/core/api/module-lib-current.txt b/core/api/module-lib-current.txt
index 7ae5d1be9773..e148b5ca1c48 100644
--- a/core/api/module-lib-current.txt
+++ b/core/api/module-lib-current.txt
@@ -271,12 +271,12 @@ package android.net {
method @RequiresPermission(android.Manifest.permission.OBSERVE_NETWORK_POLICY) public boolean isUidRestrictedOnMeteredNetworks(int);
method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_STACK}) public void notifyStatsProviderLimitReached();
method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_STACK}) public void notifyStatsProviderWarningReached();
- method @RequiresPermission(android.Manifest.permission.OBSERVE_NETWORK_POLICY) public void registerNetworkPolicyCallback(@Nullable java.util.concurrent.Executor, @NonNull android.net.NetworkPolicyManager.NetworkPolicyCallback);
- method @RequiresPermission(android.Manifest.permission.OBSERVE_NETWORK_POLICY) public void unregisterNetworkPolicyCallback(@NonNull android.net.NetworkPolicyManager.NetworkPolicyCallback);
+ method @Deprecated @FlaggedApi("android.net.platform.flags.deprecate_network_policy_callback") @RequiresPermission(android.Manifest.permission.OBSERVE_NETWORK_POLICY) public void registerNetworkPolicyCallback(@Nullable java.util.concurrent.Executor, @NonNull android.net.NetworkPolicyManager.NetworkPolicyCallback);
+ method @Deprecated @FlaggedApi("android.net.platform.flags.deprecate_network_policy_callback") @RequiresPermission(android.Manifest.permission.OBSERVE_NETWORK_POLICY) public void unregisterNetworkPolicyCallback(@NonNull android.net.NetworkPolicyManager.NetworkPolicyCallback);
}
- public static interface NetworkPolicyManager.NetworkPolicyCallback {
- method public default void onUidBlockedReasonChanged(int, int);
+ @Deprecated @FlaggedApi("android.net.platform.flags.deprecate_network_policy_callback") public static interface NetworkPolicyManager.NetworkPolicyCallback {
+ method @Deprecated public default void onUidBlockedReasonChanged(int, int);
}
public class NetworkWatchlistManager {
diff --git a/core/api/test-current.txt b/core/api/test-current.txt
index 099dbbc2764f..88b5275d37f8 100644
--- a/core/api/test-current.txt
+++ b/core/api/test-current.txt
@@ -423,6 +423,7 @@ package android.app {
public final class PictureInPictureParams implements android.os.Parcelable {
method public float getAspectRatioFloat();
method public float getExpandedAspectRatioFloat();
+ method public static boolean isSameAspectRatio(@NonNull android.graphics.Rect, @NonNull android.util.Rational);
}
public final class PictureInPictureUiState implements android.os.Parcelable {
@@ -618,6 +619,7 @@ package android.app.admin {
method @RequiresPermission(android.Manifest.permission.MANAGE_PROFILE_AND_DEVICE_OWNERS) public void resetDefaultCrossProfileIntentFilters(int);
method @RequiresPermission(android.Manifest.permission.MANAGE_ROLE_HOLDERS) public void resetShouldAllowBypassingDevicePolicyManagementRoleQualificationState();
method @RequiresPermission(allOf={android.Manifest.permission.MANAGE_DEVICE_ADMINS, android.Manifest.permission.INTERACT_ACROSS_USERS_FULL}) public void setActiveAdmin(@NonNull android.content.ComponentName, boolean, int);
+ method @FlaggedApi("android.app.admin.flags.provisioning_context_parameter") @RequiresPermission(allOf={android.Manifest.permission.MANAGE_DEVICE_ADMINS, android.Manifest.permission.INTERACT_ACROSS_USERS_FULL}) public void setActiveAdmin(@NonNull android.content.ComponentName, boolean, int, @Nullable String);
method @RequiresPermission(android.Manifest.permission.MANAGE_PROFILE_AND_DEVICE_OWNERS) public boolean setDeviceOwner(@NonNull android.content.ComponentName, int);
method @RequiresPermission(android.Manifest.permission.MANAGE_PROFILE_AND_DEVICE_OWNERS) public boolean setDeviceOwnerOnly(@NonNull android.content.ComponentName, int);
method public void setDeviceOwnerType(@NonNull android.content.ComponentName, int);
@@ -1796,8 +1798,10 @@ package android.hardware.input {
public class InputSettings {
method @FlaggedApi("com.android.hardware.input.keyboard_a11y_bounce_keys_flag") public static int getAccessibilityBounceKeysThreshold(@NonNull android.content.Context);
method @FlaggedApi("com.android.hardware.input.keyboard_a11y_slow_keys_flag") public static int getAccessibilitySlowKeysThreshold(@NonNull android.content.Context);
+ method @FlaggedApi("com.android.hardware.input.keyboard_a11y_mouse_keys") public static boolean isAccessibilityMouseKeysEnabled(@NonNull android.content.Context);
method @FlaggedApi("com.android.hardware.input.keyboard_a11y_sticky_keys_flag") public static boolean isAccessibilityStickyKeysEnabled(@NonNull android.content.Context);
method @FlaggedApi("com.android.hardware.input.keyboard_a11y_bounce_keys_flag") @RequiresPermission(android.Manifest.permission.WRITE_SETTINGS) public static void setAccessibilityBounceKeysThreshold(@NonNull android.content.Context, int);
+ method @FlaggedApi("com.android.hardware.input.keyboard_a11y_mouse_keys") @RequiresPermission(android.Manifest.permission.WRITE_SETTINGS) public static void setAccessibilityMouseKeysEnabled(@NonNull android.content.Context, boolean);
method @FlaggedApi("com.android.hardware.input.keyboard_a11y_slow_keys_flag") @RequiresPermission(android.Manifest.permission.WRITE_SETTINGS) public static void setAccessibilitySlowKeysThreshold(@NonNull android.content.Context, int);
method @FlaggedApi("com.android.hardware.input.keyboard_a11y_sticky_keys_flag") @RequiresPermission(android.Manifest.permission.WRITE_SETTINGS) public static void setAccessibilityStickyKeysEnabled(@NonNull android.content.Context, boolean);
method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public static void setMaximumObscuringOpacityForTouch(@NonNull android.content.Context, @FloatRange(from=0, to=1) float);
@@ -1982,6 +1986,7 @@ package android.media {
method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_SETTINGS_PRIVILEGED) public float getRs2Value();
method public int getStreamMinVolumeInt(int);
method @NonNull public java.util.Map<java.lang.Integer,java.lang.Boolean> getSurroundFormats();
+ method @NonNull public android.media.VolumePolicy getVolumePolicy();
method public boolean hasRegisteredDynamicPolicy();
method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_SETTINGS_PRIVILEGED) public boolean isCsdEnabled();
method @RequiresPermission(anyOf={android.Manifest.permission.MODIFY_AUDIO_ROUTING, android.Manifest.permission.QUERY_AUDIO_STATE, android.Manifest.permission.MODIFY_AUDIO_SETTINGS_PRIVILEGED}) public boolean isFullVolumeDevice();
@@ -2073,6 +2078,20 @@ package android.media {
method public android.media.PlaybackParams setAudioStretchMode(int);
}
+ public final class VolumePolicy implements android.os.Parcelable {
+ ctor public VolumePolicy(boolean, boolean, boolean, int);
+ method public int describeContents();
+ method public void writeToParcel(@NonNull android.os.Parcel, int);
+ field public static final int A11Y_MODE_INDEPENDENT_A11Y_VOLUME = 1; // 0x1
+ field public static final int A11Y_MODE_MEDIA_A11Y_VOLUME = 0; // 0x0
+ field @NonNull public static final android.os.Parcelable.Creator<android.media.VolumePolicy> CREATOR;
+ field @NonNull public static final android.media.VolumePolicy DEFAULT;
+ field public final boolean doNotDisturbWhenSilent;
+ field public final int vibrateToSilentDebounce;
+ field public final boolean volumeDownToEnterSilent;
+ field public final boolean volumeUpToExitSilent;
+ }
+
public static final class VolumeShaper.Configuration.Builder {
method @NonNull public android.media.VolumeShaper.Configuration.Builder setOptionFlags(int);
}
diff --git a/core/java/android/animation/AnimatorSet.java b/core/java/android/animation/AnimatorSet.java
index 845a346be593..ac3711366ec7 100644
--- a/core/java/android/animation/AnimatorSet.java
+++ b/core/java/android/animation/AnimatorSet.java
@@ -1381,6 +1381,18 @@ public final class AnimatorSet extends Animator implements AnimationHandler.Anim
}
int toId = findLatestEventIdForTime(playTime);
handleAnimationEvents(-1, toId, playTime);
+
+ if (mSeekState.isActive()) {
+ // Pump a frame to the on-going animators
+ for (int i = 0; i < mPlayingSet.size(); i++) {
+ Node node = mPlayingSet.get(i);
+ if (!node.mEnded) {
+ pulseFrame(node, getPlayTimeForNodeIncludingDelay(playTime, node));
+ }
+ }
+ }
+
+ // Remove all the finished anims
for (int i = mPlayingSet.size() - 1; i >= 0; i--) {
if (mPlayingSet.get(i).mEnded) {
mPlayingSet.remove(i);
diff --git a/core/java/android/animation/OWNERS b/core/java/android/animation/OWNERS
index f3b330a02116..5223c870824c 100644
--- a/core/java/android/animation/OWNERS
+++ b/core/java/android/animation/OWNERS
@@ -3,3 +3,4 @@
romainguy@google.com
tianliu@google.com
adamp@google.com
+mount@google.com
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index 0947e33cb4d1..cbabb0227763 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -21,6 +21,7 @@ import static android.Manifest.permission.DETECT_SCREEN_CAPTURE;
import static android.Manifest.permission.INTERACT_ACROSS_USERS;
import static android.Manifest.permission.INTERACT_ACROSS_USERS_FULL;
import static android.Manifest.permission.INTERNAL_SYSTEM_WINDOW;
+import static android.app.Instrumentation.DEBUG_FINISH_ACTIVITY;
import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED;
import static android.app.WindowConfiguration.inMultiWindowMode;
import static android.os.Process.myUid;
@@ -3701,7 +3702,9 @@ public class Activity extends ContextThemeWrapper
* @see View#findViewById(int)
* @see Activity#requireViewById(int)
*/
- /* TODO(b/347672184): Re-add @Nullable */
+ // Strictly speaking this should be marked as @Nullable but the nullability of the return value
+ // is deliberately left unspecified as idiomatically correct code can make assumptions either
+ // way based on local context, e.g. layout specification.
public <T extends View> T findViewById(@IdRes int id) {
return getWindow().findViewById(id);
}
@@ -5822,7 +5825,8 @@ public class Activity extends ContextThemeWrapper
*
* @param intent The intent to start.
* @param requestCode If >= 0, this code will be returned in
- * onActivityResult() when the activity exits.
+ * onActivityResult() when the activity exits;
+ * If < 0, no result will return when the activity exits.
*
* @throws android.content.ActivityNotFoundException
*
@@ -5857,7 +5861,8 @@ public class Activity extends ContextThemeWrapper
*
* @param intent The intent to start.
* @param requestCode If >= 0, this code will be returned in
- * onActivityResult() when the activity exits.
+ * onActivityResult() when the activity exits;
+ * If < 0, no result will return when the activity exits.
* @param options Additional options for how the Activity should be started.
* See {@link android.content.Context#startActivity(Intent, Bundle)}
* Context.startActivity(Intent, Bundle)} for more details.
@@ -5965,7 +5970,8 @@ public class Activity extends ContextThemeWrapper
*
* @param intent The intent to start.
* @param requestCode If >= 0, this code will be returned in
- * onActivityResult() when the activity exits.
+ * onActivityResult() when the activity exits;
+ * If < 0, no result will return when the activity exits.
* @param user The user to start the intent as.
* @hide Implement to provide correct calling token.
*/
@@ -6001,7 +6007,8 @@ public class Activity extends ContextThemeWrapper
*
* @param intent The intent to start.
* @param requestCode If >= 0, this code will be returned in
- * onActivityResult() when the activity exits.
+ * onActivityResult() when the activity exits;
+ * If < 0, no result will return when the activity exits.
* @param options Additional options for how the Activity should be started. See {@link
* android.content.Context#startActivity(Intent, Bundle)} for more details.
* @param user The user to start the intent as.
@@ -6039,7 +6046,8 @@ public class Activity extends ContextThemeWrapper
*
* @param intent The intent to start.
* @param requestCode If >= 0, this code will be returned in
- * onActivityResult() when the activity exits.
+ * onActivityResult() when the activity exits;
+ * If < 0, no result will return when the activity exits.
* @param options Additional options for how the Activity should be started. See {@link
* android.content.Context#startActivity(Intent, Bundle)} for more details.
* @param user The user to start the intent as.
@@ -6165,7 +6173,8 @@ public class Activity extends ContextThemeWrapper
*
* @param intent The IntentSender to launch.
* @param requestCode If >= 0, this code will be returned in
- * onActivityResult() when the activity exits.
+ * onActivityResult() when the activity exits;
+ * If < 0, no result will return when the activity exits.
* @param fillInIntent If non-null, this will be provided as the
* intent parameter to {@link IntentSender#sendIntent}.
* @param flagsMask Intent flags in the original IntentSender that you
@@ -6204,7 +6213,8 @@ public class Activity extends ContextThemeWrapper
*
* @param intent The IntentSender to launch.
* @param requestCode If >= 0, this code will be returned in
- * onActivityResult() when the activity exits.
+ * onActivityResult() when the activity exits;
+ * If < 0, no result will return when the activity exits.
* @param fillInIntent If non-null, this will be provided as the
* intent parameter to {@link IntentSender#sendIntent}.
* @param flagsMask Intent flags in the original IntentSender that you
@@ -6436,8 +6446,8 @@ public class Activity extends ContextThemeWrapper
*
* @param intent The intent to start.
* @param requestCode If >= 0, this code will be returned in
- * onActivityResult() when the activity exits, as described in
- * {@link #startActivityForResult}.
+ * onActivityResult() when the activity exits; If < 0, no result will
+ * return when the activity exits, as described in {@link #startActivityForResult}.
*
* @return If a new activity was launched then true is returned; otherwise
* false is returned and you must handle the Intent yourself.
@@ -6468,7 +6478,8 @@ public class Activity extends ContextThemeWrapper
*
* @param intent The intent to start.
* @param requestCode If >= 0, this code will be returned in
- * onActivityResult() when the activity exits, as described in
+ * onActivityResult() when the activity exits; If < 0, no result
+ * will return when the activity exits, as described in
* {@link #startActivityForResult}.
* @param options Additional options for how the Activity should be started.
* See {@link android.content.Context#startActivity(Intent, Bundle)}
@@ -7297,6 +7308,9 @@ public class Activity extends ContextThemeWrapper
*/
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
private void finish(int finishTask) {
+ if (DEBUG_FINISH_ACTIVITY) {
+ Log.d("Instrumentation", "finishActivity: finishTask=" + finishTask, new Throwable());
+ }
if (mParent == null) {
int resultCode;
Intent resultData;
diff --git a/core/java/android/app/ActivityOptions.java b/core/java/android/app/ActivityOptions.java
index c6a1546fb931..65acd49d44fa 100644
--- a/core/java/android/app/ActivityOptions.java
+++ b/core/java/android/app/ActivityOptions.java
@@ -104,7 +104,9 @@ public class ActivityOptions extends ComponentOptions {
MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED,
MODE_BACKGROUND_ACTIVITY_START_ALLOWED,
MODE_BACKGROUND_ACTIVITY_START_DENIED,
- MODE_BACKGROUND_ACTIVITY_START_COMPAT})
+ MODE_BACKGROUND_ACTIVITY_START_COMPAT,
+ MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS,
+ MODE_BACKGROUND_ACTIVITY_START_ALLOW_IF_VISIBLE})
public @interface BackgroundActivityStartMode {}
/**
* No explicit value chosen. The system will decide whether to grant privileges.
@@ -119,6 +121,20 @@ public class ActivityOptions extends ComponentOptions {
*/
public static final int MODE_BACKGROUND_ACTIVITY_START_DENIED = 2;
/**
+ * Allow the {@link PendingIntent} to use ALL background activity start privileges, including
+ * special permissions that will allow starts at any time.
+ *
+ * @hide
+ */
+ public static final int MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS = 3;
+ /**
+ * Allow the {@link PendingIntent} to use background activity start privileges based on
+ * visibility of the app.
+ *
+ * @hide
+ */
+ public static final int MODE_BACKGROUND_ACTIVITY_START_ALLOW_IF_VISIBLE = 4;
+ /**
* Special behavior for compatibility.
* Similar to {@link #MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED}
*
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index b384326201fc..6df971a9cea8 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -30,6 +30,7 @@ import static android.app.servertransaction.ActivityLifecycleItem.ON_STOP;
import static android.app.servertransaction.ActivityLifecycleItem.PRE_ON_CREATE;
import static android.content.ContentResolver.DEPRECATE_DATA_COLUMNS;
import static android.content.ContentResolver.DEPRECATE_DATA_PREFIX;
+import static android.content.pm.ActivityInfo.CONFIG_RESOURCES_UNUSED;
import static android.content.res.Configuration.UI_MODE_TYPE_DESK;
import static android.content.res.Configuration.UI_MODE_TYPE_MASK;
import static android.view.Display.DEFAULT_DISPLAY;
@@ -41,7 +42,6 @@ import static android.window.ConfigurationHelper.shouldUpdateResources;
import static com.android.internal.annotations.VisibleForTesting.Visibility.PACKAGE;
import static com.android.internal.os.SafeZipPathValidatorCallback.VALIDATE_ZIP_PATH_FOR_PATH_TRAVERSAL;
import static com.android.sdksandbox.flags.Flags.sandboxActivitySdkBasedContext;
-import static com.android.window.flags.Flags.activityWindowInfoFlag;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -2105,8 +2105,7 @@ public final class ActivityThread extends ClientTransactionHandler
@Override
public void scheduleTaskFragmentTransaction(@NonNull ITaskFragmentOrganizer organizer,
@NonNull TaskFragmentTransaction transaction) throws RemoteException {
- // TODO(b/260873529): ITaskFragmentOrganizer can be cleanup to be a IBinder token
- // after flag removal.
+ // TODO(b/352665082): ITaskFragmentOrganizer can be cleanup to be a IBinder token
organizer.onTransactionReady(transaction);
}
@@ -6520,6 +6519,13 @@ public final class ActivityThread extends ClientTransactionHandler
return true;
}
+ if (android.content.res.Flags.handleAllConfigChanges()) {
+ if ((handledConfigChanges & CONFIG_RESOURCES_UNUSED) != 0) {
+ // Report the change if activities claim they do not use resources at all.
+ return true;
+ }
+ }
+
final int diffWithBucket = SizeConfigurationBuckets.filterDiff(publicDiff, currentConfig,
newConfig, sizeBuckets);
// Compare to the diff which filter the change without crossing size buckets with
@@ -6846,9 +6852,6 @@ public final class ActivityThread extends ClientTransactionHandler
}
private void handleActivityWindowInfoChanged(@NonNull ActivityClientRecord r) {
- if (!activityWindowInfoFlag()) {
- return;
- }
if (r.mActivityWindowInfo.equals(r.mLastReportedActivityWindowInfo)) {
return;
}
diff --git a/core/java/android/app/ComponentOptions.java b/core/java/android/app/ComponentOptions.java
index 0e8e2e30c26f..b3fc0588022b 100644
--- a/core/java/android/app/ComponentOptions.java
+++ b/core/java/android/app/ComponentOptions.java
@@ -18,9 +18,11 @@ package android.app;
import static android.app.ActivityOptions.BackgroundActivityStartMode;
import static android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED;
+import static android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS;
import static android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_COMPAT;
import static android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_DENIED;
import static android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED;
+import static android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOW_IF_VISIBLE;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -48,15 +50,7 @@ public class ComponentOptions {
public static final String KEY_PENDING_INTENT_BACKGROUND_ACTIVITY_ALLOWED =
"android.pendingIntent.backgroundActivityAllowed";
- /**
- * PendingIntent caller allows activity to be started if caller has BAL permission.
- * @hide
- */
- public static final String KEY_PENDING_INTENT_BACKGROUND_ACTIVITY_ALLOWED_BY_PERMISSION =
- "android.pendingIntent.backgroundActivityAllowedByPermission";
-
private Integer mPendingIntentBalAllowed = MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED;
- private boolean mPendingIntentBalAllowedByPermission = false;
ComponentOptions() {
}
@@ -69,9 +63,6 @@ public class ComponentOptions {
mPendingIntentBalAllowed =
opts.getInt(KEY_PENDING_INTENT_BACKGROUND_ACTIVITY_ALLOWED,
MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED);
- setPendingIntentBackgroundActivityLaunchAllowedByPermission(
- opts.getBoolean(
- KEY_PENDING_INTENT_BACKGROUND_ACTIVITY_ALLOWED_BY_PERMISSION, false));
}
/**
@@ -114,10 +105,19 @@ public class ComponentOptions {
public @NonNull ComponentOptions setPendingIntentBackgroundActivityStartMode(
@BackgroundActivityStartMode int state) {
switch (state) {
+ case MODE_BACKGROUND_ACTIVITY_START_ALLOWED:
+ if (mPendingIntentBalAllowed != MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS) {
+ // do not overwrite ALWAYS with ALLOWED for backwards compatibility,
+ // if setPendingIntentBackgroundActivityLaunchAllowedByPermission is used
+ // before this method.
+ mPendingIntentBalAllowed = state;
+ }
+ break;
case MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED:
case MODE_BACKGROUND_ACTIVITY_START_DENIED:
case MODE_BACKGROUND_ACTIVITY_START_COMPAT:
- case MODE_BACKGROUND_ACTIVITY_START_ALLOWED:
+ case MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS:
+ case MODE_BACKGROUND_ACTIVITY_START_ALLOW_IF_VISIBLE:
mPendingIntentBalAllowed = state;
break;
default:
@@ -140,20 +140,32 @@ public class ComponentOptions {
}
/**
- * Set PendingIntent activity can be launched from background if caller has BAL permission.
+ * Get PendingIntent activity is allowed to be started in the background if the caller
+ * has BAL permission.
* @hide
+ * @deprecated check for #MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS
*/
- public void setPendingIntentBackgroundActivityLaunchAllowedByPermission(boolean allowed) {
- mPendingIntentBalAllowedByPermission = allowed;
+ @Deprecated
+ public boolean isPendingIntentBackgroundActivityLaunchAllowedByPermission() {
+ return mPendingIntentBalAllowed == MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS;
}
/**
- * Get PendingIntent activity is allowed to be started in the background if the caller
- * has BAL permission.
+ * Set PendingIntent activity can be launched from background if caller has BAL permission.
* @hide
+ * @deprecated use #MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS
*/
- public boolean isPendingIntentBackgroundActivityLaunchAllowedByPermission() {
- return mPendingIntentBalAllowedByPermission;
+ @Deprecated
+ public void setPendingIntentBackgroundActivityLaunchAllowedByPermission(boolean allowed) {
+ if (allowed) {
+ setPendingIntentBackgroundActivityStartMode(
+ MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS);
+ } else {
+ if (getPendingIntentBackgroundActivityStartMode()
+ == MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS) {
+ setPendingIntentBackgroundActivityStartMode(MODE_BACKGROUND_ACTIVITY_START_ALLOWED);
+ }
+ }
}
/** @hide */
@@ -162,10 +174,6 @@ public class ComponentOptions {
if (mPendingIntentBalAllowed != MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED) {
b.putInt(KEY_PENDING_INTENT_BACKGROUND_ACTIVITY_ALLOWED, mPendingIntentBalAllowed);
}
- if (mPendingIntentBalAllowedByPermission) {
- b.putBoolean(KEY_PENDING_INTENT_BACKGROUND_ACTIVITY_ALLOWED_BY_PERMISSION,
- mPendingIntentBalAllowedByPermission);
- }
return b;
}
diff --git a/core/java/android/app/Dialog.java b/core/java/android/app/Dialog.java
index 57d9a7114cfa..5cb17fa225b7 100644
--- a/core/java/android/app/Dialog.java
+++ b/core/java/android/app/Dialog.java
@@ -565,7 +565,9 @@ public class Dialog implements DialogInterface, Window.Callback,
* @see View#findViewById(int)
* @see Dialog#requireViewById(int)
*/
- /* TODO(b/347672184): Re-add @Nullable */
+ // Strictly speaking this should be marked as @Nullable but the nullability of the return value
+ // is deliberately left unspecified as idiomatically correct code can make assumptions either
+ // way based on local context, e.g. layout specification.
public <T extends View> T findViewById(@IdRes int id) {
return mWindow.findViewById(id);
}
diff --git a/core/java/android/app/IApplicationThread.aidl b/core/java/android/app/IApplicationThread.aidl
index a64261a77a29..9f3829e3d46f 100644
--- a/core/java/android/app/IApplicationThread.aidl
+++ b/core/java/android/app/IApplicationThread.aidl
@@ -65,6 +65,7 @@ import java.util.Map;
*
* {@hide}
*/
+@JavaDelegator
oneway interface IApplicationThread {
void scheduleReceiver(in Intent intent, in ActivityInfo info,
in CompatibilityInfo compatInfo,
diff --git a/core/java/android/app/Instrumentation.java b/core/java/android/app/Instrumentation.java
index db216b1af974..be270463e576 100644
--- a/core/java/android/app/Instrumentation.java
+++ b/core/java/android/app/Instrumentation.java
@@ -107,6 +107,8 @@ public class Instrumentation {
// If set, will print the stack trace for activity starts within the process
static final boolean DEBUG_START_ACTIVITY = Build.IS_DEBUGGABLE &&
SystemProperties.getBoolean("persist.wm.debug.start_activity", false);
+ static final boolean DEBUG_FINISH_ACTIVITY = Build.IS_DEBUGGABLE &&
+ SystemProperties.getBoolean("persist.wm.debug.finish_activity", false);
/**
* @hide
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index db979a5dd30b..ef09dc45d423 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -10979,6 +10979,18 @@ public class Notification implements Parcelable
}
/**
+ * An object that can apply a rich ongoing notification style to a {@link Notification.Builder}
+ * object.
+ */
+ @FlaggedApi(Flags.FLAG_API_RICH_ONGOING)
+ public abstract static class RichOngoingStyle extends Notification.Style {
+ /**
+ * @hide
+ */
+ public RichOngoingStyle() {}
+ }
+
+ /**
* Notification style for custom views that are decorated by the system
*
* <p>Instead of providing a notification that is completely custom, a developer can set this
diff --git a/core/java/android/app/OWNERS b/core/java/android/app/OWNERS
index 0fad979e27cf..1200b4b45712 100644
--- a/core/java/android/app/OWNERS
+++ b/core/java/android/app/OWNERS
@@ -118,6 +118,8 @@ per-file *Task* = file:/services/core/java/com/android/server/wm/OWNERS
per-file Window* = file:/services/core/java/com/android/server/wm/OWNERS
per-file ConfigurationController.java = file:/services/core/java/com/android/server/wm/OWNERS
per-file *ScreenCapture* = file:/services/core/java/com/android/server/wm/OWNERS
+per-file ComponentOptions.java = file:/services/core/java/com/android/server/wm/OWNERS
+
# Multitasking
per-file multitasking.aconfig = file:/services/core/java/com/android/server/wm/OWNERS
diff --git a/core/java/android/app/PictureInPictureParams.java b/core/java/android/app/PictureInPictureParams.java
index 96d874ee110b..afe915eece26 100644
--- a/core/java/android/app/PictureInPictureParams.java
+++ b/core/java/android/app/PictureInPictureParams.java
@@ -654,6 +654,33 @@ public final class PictureInPictureParams implements Parcelable {
&& !hasSetSubtitle() && mIsLaunchIntoPip == null;
}
+ /**
+ * Compare a given {@link Rect} against the aspect ratio, with rounding error tolerance.
+ * @param bounds The {@link Rect} represents the source rect hint, this check is not needed
+ * if app provides a null source rect hint.
+ * @param aspectRatio {@link Rational} representation of aspect ratio, this check is not needed
+ * if app provides a null aspect ratio.
+ * @return {@code true} if the given {@link Rect} matches the aspect ratio.
+ * @hide
+ */
+ @SuppressWarnings("UnflaggedApi")
+ @TestApi
+ public static boolean isSameAspectRatio(@NonNull Rect bounds, @NonNull Rational aspectRatio) {
+ // Validations
+ if (bounds.isEmpty() || aspectRatio.floatValue() <= 0) {
+ return false;
+ }
+ // Check against both the width and height.
+ final int exactWidth = (aspectRatio.getNumerator() * bounds.height())
+ / aspectRatio.getDenominator();
+ if (Math.abs(exactWidth - bounds.width()) <= 1) {
+ return true;
+ }
+ final int exactHeight = (aspectRatio.getDenominator() * bounds.width())
+ / aspectRatio.getNumerator();
+ return Math.abs(exactHeight - bounds.height()) <= 1;
+ }
+
@Override
public boolean equals(Object o) {
if (this == o) return true;
diff --git a/core/java/android/app/SystemServiceRegistry.java b/core/java/android/app/SystemServiceRegistry.java
index 9437c748ee80..e73f4718732f 100644
--- a/core/java/android/app/SystemServiceRegistry.java
+++ b/core/java/android/app/SystemServiceRegistry.java
@@ -468,6 +468,11 @@ public final class SystemServiceRegistry {
public VpnManager createService(ContextImpl ctx) throws ServiceNotFoundException {
IBinder b = ServiceManager.getService(Context.VPN_MANAGEMENT_SERVICE);
IVpnManager service = IVpnManager.Stub.asInterface(b);
+ if (service == null
+ && ctx.getPackageManager().hasSystemFeature(PackageManager.FEATURE_WATCH)
+ && android.server.Flags.allowRemovingVpnService()) {
+ throw new ServiceNotFoundException(Context.VPN_MANAGEMENT_SERVICE);
+ }
return new VpnManager(ctx, service);
}});
diff --git a/core/java/android/app/TaskInfo.java b/core/java/android/app/TaskInfo.java
index aca9bb4d07c1..531537c374ce 100644
--- a/core/java/android/app/TaskInfo.java
+++ b/core/java/android/app/TaskInfo.java
@@ -30,6 +30,7 @@ import android.content.pm.ActivityInfo;
import android.content.res.Configuration;
import android.graphics.Point;
import android.graphics.Rect;
+import android.net.Uri;
import android.os.Build;
import android.os.IBinder;
import android.os.Parcel;
@@ -303,6 +304,19 @@ public class TaskInfo {
public boolean isTopActivityStyleFloating;
/**
+ * The URI of the intent that generated the top-most activity opened using a URL.
+ * @hide
+ */
+ @Nullable
+ public Uri capturedLink;
+
+ /**
+ * The time of the last launch of the activity opened using the {@link #capturedLink}.
+ * @hide
+ */
+ public long capturedLinkTimestamp;
+
+ /**
* Encapsulate specific App Compat information.
* @hide
*/
@@ -436,6 +450,8 @@ public class TaskInfo {
&& Objects.equals(topActivity, that.topActivity)
&& isTopActivityTransparent == that.isTopActivityTransparent
&& isTopActivityStyleFloating == that.isTopActivityStyleFloating
+ && Objects.equals(capturedLink, that.capturedLink)
+ && capturedLinkTimestamp == that.capturedLinkTimestamp
&& appCompatTaskInfo.equalsForTaskOrganizer(that.appCompatTaskInfo);
}
@@ -506,6 +522,8 @@ public class TaskInfo {
displayAreaFeatureId = source.readInt();
isTopActivityTransparent = source.readBoolean();
isTopActivityStyleFloating = source.readBoolean();
+ capturedLink = source.readTypedObject(Uri.CREATOR);
+ capturedLinkTimestamp = source.readLong();
appCompatTaskInfo = source.readTypedObject(AppCompatTaskInfo.CREATOR);
}
@@ -554,6 +572,8 @@ public class TaskInfo {
dest.writeInt(displayAreaFeatureId);
dest.writeBoolean(isTopActivityTransparent);
dest.writeBoolean(isTopActivityStyleFloating);
+ dest.writeTypedObject(capturedLink, flags);
+ dest.writeLong(capturedLinkTimestamp);
dest.writeTypedObject(appCompatTaskInfo, flags);
}
@@ -592,6 +612,8 @@ public class TaskInfo {
+ " displayAreaFeatureId=" + displayAreaFeatureId
+ " isTopActivityTransparent=" + isTopActivityTransparent
+ " isTopActivityStyleFloating=" + isTopActivityStyleFloating
+ + " capturedLink=" + capturedLink
+ + " capturedLinkTimestamp=" + capturedLinkTimestamp
+ " appCompatTaskInfo=" + appCompatTaskInfo
+ "}";
}
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java
index fb0ce0d2d077..a7070b910f17 100644
--- a/core/java/android/app/admin/DevicePolicyManager.java
+++ b/core/java/android/app/admin/DevicePolicyManager.java
@@ -9202,6 +9202,14 @@ public class DevicePolicyManager {
/**
* @hide
*/
+ @UnsupportedAppUsage
+ public void setActiveAdmin(@NonNull ComponentName policyReceiver, boolean refreshing) {
+ setActiveAdmin(policyReceiver, refreshing, myUserId());
+ }
+
+ /**
+ * @hide
+ */
@TestApi
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
@RequiresPermission(allOf = {
@@ -9210,21 +9218,45 @@ public class DevicePolicyManager {
})
public void setActiveAdmin(@NonNull ComponentName policyReceiver, boolean refreshing,
int userHandle) {
- if (mService != null) {
- try {
- mService.setActiveAdmin(policyReceiver, refreshing, userHandle);
- } catch (RemoteException e) {
- throw e.rethrowFromSystemServer();
- }
- }
+ setActiveAdminInternal(policyReceiver, refreshing, userHandle, null);
}
/**
* @hide
*/
- @UnsupportedAppUsage
- public void setActiveAdmin(@NonNull ComponentName policyReceiver, boolean refreshing) {
- setActiveAdmin(policyReceiver, refreshing, myUserId());
+ @TestApi
+ @RequiresPermission(allOf = {
+ MANAGE_DEVICE_ADMINS,
+ INTERACT_ACROSS_USERS_FULL
+ })
+ @FlaggedApi(Flags.FLAG_PROVISIONING_CONTEXT_PARAMETER)
+ public void setActiveAdmin(
+ @NonNull ComponentName policyReceiver,
+ boolean refreshing,
+ int userHandle,
+ @Nullable String provisioningContext
+ ) {
+ setActiveAdminInternal(policyReceiver, refreshing, userHandle, provisioningContext);
+ }
+
+ private void setActiveAdminInternal(
+ @NonNull ComponentName policyReceiver,
+ boolean refreshing,
+ int userHandle,
+ @Nullable String provisioningContext
+ ) {
+ if (mService != null) {
+ try {
+ mService.setActiveAdmin(
+ policyReceiver,
+ refreshing,
+ userHandle,
+ provisioningContext
+ );
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
}
/**
@@ -9678,7 +9710,7 @@ public class DevicePolicyManager {
if (mService != null) {
try {
final int myUserId = myUserId();
- mService.setActiveAdmin(admin, false, myUserId);
+ mService.setActiveAdmin(admin, false, myUserId, null);
return mService.setProfileOwner(admin, myUserId);
} catch (RemoteException re) {
throw re.rethrowFromSystemServer();
diff --git a/core/java/android/app/admin/IDevicePolicyManager.aidl b/core/java/android/app/admin/IDevicePolicyManager.aidl
index d1837132e1a4..381f9963789b 100644
--- a/core/java/android/app/admin/IDevicePolicyManager.aidl
+++ b/core/java/android/app/admin/IDevicePolicyManager.aidl
@@ -160,7 +160,8 @@ interface IDevicePolicyManager {
void setKeyguardDisabledFeatures(in ComponentName who, String callerPackageName, int which, boolean parent);
int getKeyguardDisabledFeatures(in ComponentName who, int userHandle, boolean parent);
- void setActiveAdmin(in ComponentName policyReceiver, boolean refreshing, int userHandle);
+ void setActiveAdmin(in ComponentName policyReceiver, boolean refreshing,
+ int userHandle, String provisioningContext);
boolean isAdminActive(in ComponentName policyReceiver, int userHandle);
List<ComponentName> getActiveAdmins(int userHandle);
@UnsupportedAppUsage
diff --git a/core/java/android/app/admin/OWNERS b/core/java/android/app/admin/OWNERS
index 308f1d622c25..4f3f5d9c3535 100644
--- a/core/java/android/app/admin/OWNERS
+++ b/core/java/android/app/admin/OWNERS
@@ -1,7 +1,6 @@
# Bug component: 142675
# Assign bugs to device-policy-manager-triage@google.com
-file:WorkDeviceExperience_OWNERS
file:EnterprisePlatformSecurity_OWNERS
yamasani@google.com #{LAST_RESORT_SUGGESTION} \ No newline at end of file
diff --git a/core/java/android/app/admin/flags/flags.aconfig b/core/java/android/app/admin/flags/flags.aconfig
index 82271129c69e..c789af32e2b1 100644
--- a/core/java/android/app/admin/flags/flags.aconfig
+++ b/core/java/android/app/admin/flags/flags.aconfig
@@ -393,3 +393,13 @@ flag {
purpose: PURPOSE_BUGFIX
}
}
+
+flag {
+ name: "provisioning_context_parameter"
+ namespace: "enterprise"
+ description: "Add provisioningContext to store metadata about when the admin was set"
+ bug: "326525847"
+ metadata {
+ purpose: PURPOSE_BUGFIX
+ }
+}
diff --git a/core/java/android/app/assist/OWNERS b/core/java/android/app/assist/OWNERS
index e4ffd7f41aa0..b53bdc202a89 100644
--- a/core/java/android/app/assist/OWNERS
+++ b/core/java/android/app/assist/OWNERS
@@ -1,2 +1 @@
-hackz@google.com
-volnov@google.com \ No newline at end of file
+srazdan@google.com
diff --git a/core/java/android/app/servertransaction/ClientTransactionListenerController.java b/core/java/android/app/servertransaction/ClientTransactionListenerController.java
index 0c1e7a32ae5e..c281533ee299 100644
--- a/core/java/android/app/servertransaction/ClientTransactionListenerController.java
+++ b/core/java/android/app/servertransaction/ClientTransactionListenerController.java
@@ -19,8 +19,6 @@ package android.app.servertransaction;
import static android.app.WindowConfiguration.areConfigurationsEqualForDisplay;
import static android.view.Display.INVALID_DISPLAY;
-import static com.android.window.flags.Flags.activityWindowInfoFlag;
-
import static java.util.Objects.requireNonNull;
import android.annotation.NonNull;
@@ -102,9 +100,6 @@ public class ClientTransactionListenerController {
*/
public void registerActivityWindowInfoChangedListener(
@NonNull BiConsumer<IBinder, ActivityWindowInfo> listener) {
- if (!activityWindowInfoFlag()) {
- return;
- }
synchronized (mLock) {
mActivityWindowInfoChangedListeners.add(listener);
}
@@ -116,9 +111,6 @@ public class ClientTransactionListenerController {
*/
public void unregisterActivityWindowInfoChangedListener(
@NonNull BiConsumer<IBinder, ActivityWindowInfo> listener) {
- if (!activityWindowInfoFlag()) {
- return;
- }
synchronized (mLock) {
mActivityWindowInfoChangedListeners.remove(listener);
}
@@ -130,9 +122,6 @@ public class ClientTransactionListenerController {
*/
public void onActivityWindowInfoChanged(@NonNull IBinder activityToken,
@NonNull ActivityWindowInfo activityWindowInfo) {
- if (!activityWindowInfoFlag()) {
- return;
- }
final Object[] activityWindowInfoChangedListeners;
synchronized (mLock) {
if (mActivityWindowInfoChangedListeners.isEmpty()) {
diff --git a/core/java/android/app/servertransaction/ObjectPool.java b/core/java/android/app/servertransaction/ObjectPool.java
index 598bd8a75637..e86ca37b99ca 100644
--- a/core/java/android/app/servertransaction/ObjectPool.java
+++ b/core/java/android/app/servertransaction/ObjectPool.java
@@ -16,70 +16,39 @@
package android.app.servertransaction;
-import com.android.window.flags.Flags;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Map;
-
/**
* An object pool that can provide reused objects if available.
+ *
* @hide
+ * @deprecated This class is deprecated. Directly create new instances of objects instead of
+ * obtaining them from this pool.
+ * TODO(b/311089192): Clean up usages of the pool.
*/
+@Deprecated
class ObjectPool {
- private static final Object sPoolSync = new Object();
- private static final Map<Class, ArrayList<? extends ObjectPoolItem>> sPoolMap =
- new HashMap<>();
-
- private static final int MAX_POOL_SIZE = 50;
-
/**
* Obtain an instance of a specific class from the pool
- * @param itemClass The class of the object we're looking for.
+ *
+ * @param ignoredItemClass The class of the object we're looking for.
* @return An instance or null if there is none.
+ * @deprecated This method is deprecated. Directly create new instances of objects instead of
+ * obtaining them from this pool.
*/
- public static <T extends ObjectPoolItem> T obtain(Class<T> itemClass) {
- if (Flags.disableObjectPool()) {
- return null;
- }
- synchronized (sPoolSync) {
- @SuppressWarnings("unchecked")
- final ArrayList<T> itemPool = (ArrayList<T>) sPoolMap.get(itemClass);
- if (itemPool != null && !itemPool.isEmpty()) {
- return itemPool.remove(itemPool.size() - 1);
- }
- return null;
- }
+ @Deprecated
+ public static <T extends ObjectPoolItem> T obtain(Class<T> ignoredItemClass) {
+ return null;
}
/**
* Recycle the object to the pool. The object should be properly cleared before this.
- * @param item The object to recycle.
+ *
+ * @param ignoredItem The object to recycle.
* @see ObjectPoolItem#recycle()
+ * @deprecated This method is deprecated. The object pool is no longer used, so there's
+ * no need to recycle objects.
*/
- public static <T extends ObjectPoolItem> void recycle(T item) {
- if (Flags.disableObjectPool()) {
- return;
- }
- synchronized (sPoolSync) {
- @SuppressWarnings("unchecked")
- ArrayList<T> itemPool = (ArrayList<T>) sPoolMap.get(item.getClass());
- if (itemPool == null) {
- itemPool = new ArrayList<>();
- sPoolMap.put(item.getClass(), itemPool);
- }
- // Check if the item is already in the pool
- final int size = itemPool.size();
- for (int i = 0; i < size; i++) {
- if (itemPool.get(i) == item) {
- throw new IllegalStateException("Trying to recycle already recycled item");
- }
- }
-
- if (size < MAX_POOL_SIZE) {
- itemPool.add(item);
- }
- }
+ @Deprecated
+ public static <T extends ObjectPoolItem> void recycle(T ignoredItem) {
}
}
diff --git a/core/java/android/app/servertransaction/ObjectPoolItem.java b/core/java/android/app/servertransaction/ObjectPoolItem.java
index 17bd4f30640f..0141f6eff53b 100644
--- a/core/java/android/app/servertransaction/ObjectPoolItem.java
+++ b/core/java/android/app/servertransaction/ObjectPoolItem.java
@@ -18,12 +18,20 @@ package android.app.servertransaction;
/**
* Base interface for all lifecycle items that can be put in object pool.
+ *
* @hide
+ * @deprecated This interface is deprecated. Objects should no longer be pooled.
+ * TODO(b/311089192): Clean up usages of this interface.
*/
+@Deprecated
public interface ObjectPoolItem {
/**
* Clear the contents of the item and putting it to a pool. The implementation should call
* {@link ObjectPool#recycle(ObjectPoolItem)} passing itself.
+ *
+ * @deprecated This method is deprecated. The object pool is no longer used, so there's
+ * no need to recycle objects.
*/
+ @Deprecated
void recycle();
}
diff --git a/core/java/android/audio/policy/configuration/V7_0/package-info.java b/core/java/android/audio/policy/configuration/V7_0/package-info.java
new file mode 100644
index 000000000000..8f7425fc2b5b
--- /dev/null
+++ b/core/java/android/audio/policy/configuration/V7_0/package-info.java
@@ -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.
+ */
+
+/**
+ * Hide the android.audio.policy.configuration.V7_0 API as that is managed
+ * separately.
+ *
+ * @hide
+ */
+package android.audio.policy.configuration.V7_0;
diff --git a/core/java/android/companion/CompanionDeviceManager.java b/core/java/android/companion/CompanionDeviceManager.java
index 34cfa584b683..15298423e1ba 100644
--- a/core/java/android/companion/CompanionDeviceManager.java
+++ b/core/java/android/companion/CompanionDeviceManager.java
@@ -1172,6 +1172,12 @@ public final class CompanionDeviceManager {
* BluetoothDevice#ACTION_BOND_STATE_CHANGED} intents to be notified when the bond removal
* process completes, and its result.
*
+ * <p>This API should be used to remove a bluetooth bond that was created either
+ * by using {@link BluetoothDevice#createBond(int)} or by a direct user action.
+ * The association must already exist with this device before calling this method, but
+ * this may be done retroactively to remove a bond that was created outside of the
+ * CompanionDeviceManager.
+ *
* @param associationId an already-associated companion device to remove bond from
* @return false on immediate error, true if bond removal process will begin
*/
diff --git a/core/java/android/companion/virtual/flags/flags.aconfig b/core/java/android/companion/virtual/flags/flags.aconfig
index d05d23c336c2..55278f617ba9 100644
--- a/core/java/android/companion/virtual/flags/flags.aconfig
+++ b/core/java/android/companion/virtual/flags/flags.aconfig
@@ -32,6 +32,13 @@ flag {
}
flag {
+ namespace: "virtual_devices"
+ name: "media_projection_keyguard_restrictions"
+ description: "Auto-stop MP when the device locks"
+ bug: "348335290"
+}
+
+flag {
namespace: "virtual_devices"
name: "virtual_display_insets"
description: "APIs for specifying virtual display insets (via cutout)"
diff --git a/core/java/android/content/ClipDescription.java b/core/java/android/content/ClipDescription.java
index 5953890ad85f..93724bb4949d 100644
--- a/core/java/android/content/ClipDescription.java
+++ b/core/java/android/content/ClipDescription.java
@@ -136,6 +136,14 @@ public class ClipDescription implements Parcelable {
"android.intent.extra.LOGGING_INSTANCE_ID";
/**
+ * The id of the task containing the window that initiated the drag that should be hidden.
+ * Only provided to internal drag handlers as a part of the DRAG_START event.
+ * @hide
+ */
+ public static final String EXTRA_HIDE_DRAG_SOURCE_TASK_ID =
+ "android.intent.extra.HIDE_DRAG_SOURCE_TASK_ID";
+
+ /**
* Indicates that a ClipData contains potentially sensitive information, such as a
* password or credit card number.
* <p>
diff --git a/core/java/android/content/ContentProvider.java b/core/java/android/content/ContentProvider.java
index 87fb84331af3..385d6cfd14a0 100644
--- a/core/java/android/content/ContentProvider.java
+++ b/core/java/android/content/ContentProvider.java
@@ -61,6 +61,7 @@ import android.os.storage.StorageManager;
import android.permission.PermissionCheckerManager;
import android.provider.MediaStore;
import android.text.TextUtils;
+import android.util.ArraySet;
import android.util.Log;
import android.util.SparseBooleanArray;
@@ -486,6 +487,8 @@ public abstract class ContentProvider implements ContentInterface, ComponentCall
validateIncomingAuthority(authority);
int numOperations = operations.size();
final int[] userIds = new int[numOperations];
+ final ArraySet<String> readPermissions = new ArraySet<String>();
+ final ArraySet<String> writePermissions = new ArraySet<String>();
for (int i = 0; i < numOperations; i++) {
ContentProviderOperation operation = operations.get(i);
Uri uri = operation.getUri();
@@ -499,17 +502,19 @@ public abstract class ContentProvider implements ContentInterface, ComponentCall
}
final AttributionSource accessAttributionSource =
attributionSource;
- if (operation.isReadOperation()) {
+ if (operation.isReadOperation() && !readPermissions.contains(uri.toString())) {
if (enforceReadPermission(accessAttributionSource, uri)
!= PermissionChecker.PERMISSION_GRANTED) {
throw new OperationApplicationException("App op not allowed", 0);
}
+ readPermissions.add(uri.toString());
}
- if (operation.isWriteOperation()) {
+ if (operation.isWriteOperation() && !writePermissions.contains(uri.toString())) {
if (enforceWritePermission(accessAttributionSource, uri)
!= PermissionChecker.PERMISSION_GRANTED) {
throw new OperationApplicationException("App op not allowed", 0);
}
+ writePermissions.add(uri.toString());
}
}
traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "applyBatch: ", authority);
@@ -2774,6 +2779,10 @@ public abstract class ContentProvider implements ContentInterface, ComponentCall
+ " provider from user:" + mContext.getUserId());
}
if (userId != UserHandle.USER_CURRENT
+ // getUserIdFromAuthority can return USER_NULL when can't cast the userId to
+ // an int, which can cause high volume of binder calls.
+ && (!android.multiuser.Flags.fixGetUserPropertyCache()
+ || userId != UserHandle.USER_NULL)
&& userId != mContext.getUserId()
// Since userId specified in content uri, the provider userId would be
// determined from it.
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index 112507e00e85..111e6a8e93ef 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -20,7 +20,6 @@ import static android.app.sdksandbox.SdkSandboxManager.ACTION_START_SANDBOXED_AC
import static android.content.ContentProvider.maybeAddUserId;
import static android.os.Flags.FLAG_ALLOW_PRIVATE_PROFILE;
import static android.security.Flags.FLAG_FRP_ENFORCEMENT;
-import static android.service.chooser.Flags.FLAG_ENABLE_SHARESHEET_METADATA_EXTRA;
import android.Manifest;
import android.accessibilityservice.AccessibilityService;
@@ -5278,12 +5277,28 @@ public class Intent implements Parcelable, Cloneable {
* through {@link #getData()}. User interaction is required to return the edited screenshot to
* the calling activity.
*
+ * <p>The response {@link Intent} may include additional data to "backlink" directly back to the
+ * application for which the screenshot was captured. If present, the application "backlink" can
+ * be retrieved via {@link #getClipData()}. The data is present only if the user accepted to
+ * include the link information with the screenshot. The data can contain one of the following:
+ * <ul>
+ * <li>A deeplinking {@link Uri} or an {@link Intent} if the captured app integrates with
+ * {@link android.app.assist.AssistContent}.</li>
+ * <li>Otherwise, a main launcher intent that launches the screenshotted application to
+ * its home screen.</li>
+ * </ul>
+ * The "backlink" to the screenshotted application will be set within {@link ClipData}, either
+ * as a {@link Uri} or an {@link Intent} if present.
+ *
* <p>This intent action requires the permission
* {@link android.Manifest.permission#LAUNCH_CAPTURE_CONTENT_ACTIVITY_FOR_NOTE}.
*
* <p>Callers should query
* {@link StatusBarManager#canLaunchCaptureContentActivityForNote(Activity)} before showing a UI
* element that allows users to trigger this flow.
+ *
+ * <p>Callers should query for {@link #EXTRA_CAPTURE_CONTENT_FOR_NOTE_STATUS_CODE} in the
+ * response {@link Intent} to check if the request was a success.
*/
@RequiresPermission(Manifest.permission.LAUNCH_CAPTURE_CONTENT_ACTIVITY_FOR_NOTE)
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
@@ -6252,7 +6267,6 @@ public class Intent implements Parcelable, Cloneable {
* <p>e.g. When sharing a photo, metadata could inform the user that location data is included
* in the photo they are sharing.</p>
*/
- @FlaggedApi(FLAG_ENABLE_SHARESHEET_METADATA_EXTRA)
public static final String EXTRA_METADATA_TEXT = "android.intent.extra.METADATA_TEXT";
/**
diff --git a/core/java/android/content/IntentSender.java b/core/java/android/content/IntentSender.java
index 2e252c12c51d..32d1964dd4f0 100644
--- a/core/java/android/content/IntentSender.java
+++ b/core/java/android/content/IntentSender.java
@@ -16,6 +16,7 @@
package android.content;
+import android.annotation.FlaggedApi;
import android.annotation.Nullable;
import android.app.ActivityManager;
import android.app.ActivityManager.PendingIntentInfo;
@@ -32,6 +33,10 @@ import android.os.RemoteException;
import android.os.UserHandle;
import android.util.AndroidException;
+import com.android.window.flags.Flags;
+
+import java.util.concurrent.Executor;
+
/**
* A description of an Intent and target action to perform with it.
* The returned object can be
@@ -114,15 +119,15 @@ public class IntentSender implements Parcelable {
implements Runnable {
private final IntentSender mIntentSender;
private final OnFinished mWho;
- private final Handler mHandler;
+ private final Executor mExecutor;
private Intent mIntent;
private int mResultCode;
private String mResultData;
private Bundle mResultExtras;
- FinishedDispatcher(IntentSender pi, OnFinished who, Handler handler) {
+ FinishedDispatcher(IntentSender pi, OnFinished who, Executor executor) {
mIntentSender = pi;
mWho = who;
- mHandler = handler;
+ mExecutor = executor;
}
public void performReceive(Intent intent, int resultCode, String data,
Bundle extras, boolean serialized, boolean sticky, int sendingUser) {
@@ -130,10 +135,10 @@ public class IntentSender implements Parcelable {
mResultCode = resultCode;
mResultData = data;
mResultExtras = extras;
- if (mHandler == null) {
+ if (mExecutor == null) {
run();
} else {
- mHandler.post(this);
+ mExecutor.execute(this);
}
}
public void run() {
@@ -147,16 +152,16 @@ public class IntentSender implements Parcelable {
* caller to specify information about the Intent to use and be notified
* when the send has completed.
*
- * @param context The Context of the caller. This may be null if
- * <var>intent</var> is also null.
+ * @param context The Context of the caller. This may be {@code null} if
+ * <var>intent</var> is also {@code null}.
* @param code Result code to supply back to the IntentSender's target.
* @param intent Additional Intent data. See {@link Intent#fillIn
* Intent.fillIn()} for information on how this is applied to the
- * original Intent. Use null to not modify the original Intent.
+ * original Intent. Use {@code null} to not modify the original Intent.
* @param onFinished The object to call back on when the send has
- * completed, or null for no callback.
+ * completed, or {@code null} for no callback.
* @param handler Handler identifying the thread on which the callback
- * should happen. If null, the callback will happen from the thread
+ * should happen. If {@code null}, the callback will happen from the thread
* pool of the process.
*
*
@@ -165,8 +170,8 @@ public class IntentSender implements Parcelable {
*/
public void sendIntent(Context context, int code, Intent intent,
OnFinished onFinished, Handler handler) throws SendIntentException {
- sendIntent(context, code, intent, onFinished, handler, null,
- SEND_INTENT_DEFAULT_OPTIONS);
+ sendIntent(context, code, intent, null, SEND_INTENT_DEFAULT_OPTIONS,
+ handler == null ? null : handler::post, onFinished);
}
/**
@@ -174,22 +179,22 @@ public class IntentSender implements Parcelable {
* caller to specify information about the Intent to use and be notified
* when the send has completed.
*
- * @param context The Context of the caller. This may be null if
- * <var>intent</var> is also null.
+ * @param context The Context of the caller. This may be {@code null} if
+ * <var>intent</var> is also {@code null}.
* @param code Result code to supply back to the IntentSender's target.
* @param intent Additional Intent data. See {@link Intent#fillIn
* Intent.fillIn()} for information on how this is applied to the
- * original Intent. Use null to not modify the original Intent.
+ * original Intent. Use {@code null} to not modify the original Intent.
* @param onFinished The object to call back on when the send has
- * completed, or null for no callback.
+ * completed, or {@code null} for no callback.
* @param handler Handler identifying the thread on which the callback
- * should happen. If null, the callback will happen from the thread
+ * should happen. If {@code null}, the callback will happen from the thread
* pool of the process.
* @param requiredPermission Name of permission that a recipient of the PendingIntent
* is required to hold. This is only valid for broadcast intents, and
* corresponds to the permission argument in
* {@link Context#sendBroadcast(Intent, String) Context.sendOrderedBroadcast(Intent, String)}.
- * If null, no permission is required.
+ * If {@code null}, no permission is required.
*
*
* @throws SendIntentException Throws CanceledIntentException if the IntentSender
@@ -198,8 +203,8 @@ public class IntentSender implements Parcelable {
public void sendIntent(Context context, int code, Intent intent,
OnFinished onFinished, Handler handler, String requiredPermission)
throws SendIntentException {
- sendIntent(context, code, intent, onFinished, handler, requiredPermission,
- SEND_INTENT_DEFAULT_OPTIONS);
+ sendIntent(context, code, intent, requiredPermission, SEND_INTENT_DEFAULT_OPTIONS,
+ handler == null ? null : handler::post, onFinished);
}
/**
@@ -207,32 +212,32 @@ public class IntentSender implements Parcelable {
* caller to specify information about the Intent to use and be notified
* when the send has completed.
*
- * @param context The Context of the caller. This may be null if
- * <var>intent</var> is also null.
+ * @param context The Context of the caller. This may be {@code null} if
+ * <var>intent</var> is also {@code null}.
* @param code Result code to supply back to the IntentSender's target.
* @param intent Additional Intent data. See {@link Intent#fillIn
* Intent.fillIn()} for information on how this is applied to the
- * original Intent. Use null to not modify the original Intent.
+ * original Intent. Use {@code null} to not modify the original Intent.
* @param onFinished The object to call back on when the send has
- * completed, or null for no callback.
- * @param handler Handler identifying the thread on which the callback
- * should happen. If null, the callback will happen from the thread
+ * completed, or {@code null} for no callback.
+ * @param executor Executor identifying the thread on which the callback
+ * should happen. If {@code null}, the callback will happen from the thread
* pool of the process.
* @param requiredPermission Name of permission that a recipient of the PendingIntent
* is required to hold. This is only valid for broadcast intents, and
* corresponds to the permission argument in
* {@link Context#sendBroadcast(Intent, String) Context.sendOrderedBroadcast(Intent, String)}.
- * If null, no permission is required.
+ * If {@code null}, no permission is required.
* @param options Additional options the caller would like to provide to modify the sending
- * behavior. May be built from an {@link ActivityOptions} to apply to an activity start.
+ * behavior. Typically built from using {@link ActivityOptions} to apply to an activity start.
*
* @throws SendIntentException Throws CanceledIntentException if the IntentSender
* is no longer allowing more intents to be sent through it.
- * @hide
*/
- public void sendIntent(Context context, int code, Intent intent,
- OnFinished onFinished, Handler handler, String requiredPermission,
- @Nullable Bundle options)
+ @FlaggedApi(Flags.FLAG_BAL_SEND_INTENT_WITH_OPTIONS)
+ public void sendIntent(@Nullable Context context, int code, @Nullable Intent intent,
+ @Nullable String requiredPermission, @Nullable Bundle options,
+ @Nullable Executor executor, @Nullable OnFinished onFinished)
throws SendIntentException {
try {
String resolvedType = intent != null ?
@@ -243,7 +248,7 @@ public class IntentSender implements Parcelable {
int res = ActivityManager.getService().sendIntentSender(app, mTarget, mWhitelistToken,
code, intent, resolvedType,
onFinished != null
- ? new FinishedDispatcher(this, onFinished, handler)
+ ? new FinishedDispatcher(this, onFinished, executor)
: null,
requiredPermission, options);
if (res < 0) {
@@ -268,7 +273,7 @@ public class IntentSender implements Parcelable {
* sending the Intent. The returned string is supplied by the system, so
* that an application can not spoof its package.
*
- * @return The package name of the PendingIntent, or null if there is
+ * @return The package name of the PendingIntent, or {@code null} if there is
* none associated with it.
*/
public String getCreatorPackage() {
@@ -296,7 +301,7 @@ public class IntentSender implements Parcelable {
* {@link android.os.Process#myUserHandle() Process.myUserHandle()} for
* more explanation of user handles.
*
- * @return The user handle of the PendingIntent, or null if there is
+ * @return The user handle of the PendingIntent, {@code null} if there is
* none associated with it.
*/
public UserHandle getCreatorUserHandle() {
@@ -355,11 +360,11 @@ public class IntentSender implements Parcelable {
};
/**
- * Convenience function for writing either a IntentSender or null pointer to
+ * Convenience function for writing either a IntentSender or {@code null} pointer to
* a Parcel. You must use this with {@link #readIntentSenderOrNullFromParcel}
* for later reading it.
*
- * @param sender The IntentSender to write, or null.
+ * @param sender The IntentSender to write, or {@code null}.
* @param out Where to write the IntentSender.
*/
public static void writeIntentSenderOrNullToParcel(IntentSender sender,
@@ -369,13 +374,13 @@ public class IntentSender implements Parcelable {
}
/**
- * Convenience function for reading either a Messenger or null pointer from
+ * Convenience function for reading either a Messenger or {@code null} pointer from
* a Parcel. You must have previously written the Messenger with
* {@link #writeIntentSenderOrNullToParcel}.
*
* @param in The Parcel containing the written Messenger.
*
- * @return Returns the Messenger read from the Parcel, or null if null had
+ * @return Returns the Messenger read from the Parcel, or @code null} if @code null} had
* been written.
*/
public static IntentSender readIntentSenderOrNullFromParcel(Parcel in) {
diff --git a/core/java/android/content/pm/ActivityInfo.java b/core/java/android/content/pm/ActivityInfo.java
index 57ffed47bbe3..6952a09f2d90 100644
--- a/core/java/android/content/pm/ActivityInfo.java
+++ b/core/java/android/content/pm/ActivityInfo.java
@@ -941,6 +941,8 @@ public class ActivityInfo extends ComponentInfo implements Parcelable {
CONFIG_COLOR_MODE,
CONFIG_FONT_SCALE,
CONFIG_GRAMMATICAL_GENDER,
+ CONFIG_ASSETS_PATHS,
+ CONFIG_RESOURCES_UNUSED,
})
@Retention(RetentionPolicy.SOURCE)
public @interface Config {}
@@ -1060,8 +1062,8 @@ public class ActivityInfo extends ComponentInfo implements Parcelable {
* can itself handle asset path changes. Set from the {@link android.R.attr#configChanges}
* attribute. This is not a core resource configuration, but a higher-level value, so its
* constant starts at the high bits.
- * @hide We do not want apps handling this yet, but we do need some kind of bit for diffs.
*/
+ @FlaggedApi(android.content.res.Flags.FLAG_HANDLE_ALL_CONFIG_CHANGES)
public static final int CONFIG_ASSETS_PATHS = 0x80000000;
/**
* Bit in {@link #configChanges} that indicates that the activity
@@ -1088,6 +1090,30 @@ public class ActivityInfo extends ComponentInfo implements Parcelable {
*/
public static final int CONFIG_FONT_WEIGHT_ADJUSTMENT = 0x10000000;
+ /**
+ * <p>This is probably not the constant you want, the resources compiler supports a less
+ * dangerous version of it, 'allKnown', that only suppresses all currently existing
+ * configuration change restarts depending on your target SDK rather than whatever the latest
+ * SDK supports, allowing the application to work with resources on future Platform versions.
+ *
+ * <p>Bit in {@link #configChanges} that indicates that the activity doesn't use Android
+ * Resources at all and doesn't need to be restarted on any configuration changes. This bit
+ * disables all restarts for configuration dimensions available in the current target SDK as
+ * well as dimensions introduced in future SDKs. Use it only if the activity doesn't need
+ * anything from its resources, and doesn't depend on any libraries that may provide resources
+ * and need to respond to configuration changes. When set,
+ * {@link Activity#onConfigurationChanged(Configuration)} will be called instead of a restart,
+ * and it’s up to the implementation to ensure that no stale resource values remain loaded
+ * anywhere in the code.
+ *
+ * <p>This overrides all other bits, and this is recommended to be used individually.
+ *
+ * <p>This is not a core resource configuration, but a higher-level value, so its constant
+ * starts at the high bits.
+ */
+ @FlaggedApi(android.content.res.Flags.FLAG_HANDLE_ALL_CONFIG_CHANGES)
+ public static final int CONFIG_RESOURCES_UNUSED = 0x8000000;
+
/** @hide
* Unfortunately the constants for config changes in native code are
* different from ActivityInfo. :( Here are the values we should use for the
@@ -1657,7 +1683,8 @@ public class ActivityInfo extends ComponentInfo implements Parcelable {
* {@link #CONFIG_KEYBOARD}, {@link #CONFIG_NAVIGATION},
* {@link #CONFIG_ORIENTATION}, {@link #CONFIG_SCREEN_LAYOUT},
* {@link #CONFIG_DENSITY}, {@link #CONFIG_LAYOUT_DIRECTION},
- * {@link #CONFIG_COLOR_MODE}, and {link #CONFIG_GRAMMATICAL_GENDER}.
+ * {@link #CONFIG_COLOR_MODE}, {@link #CONFIG_GRAMMATICAL_GENDER},
+ * {@link #CONFIG_ASSETS_PATHS}, and {@link #CONFIG_RESOURCES_UNUSED}.
* Set from the {@link android.R.attr#configChanges} attribute.
*/
public int configChanges;
diff --git a/core/java/android/content/pm/ShortcutServiceInternal.java b/core/java/android/content/pm/ShortcutServiceInternal.java
index 55d0bc1deedc..c811a47e5b05 100644
--- a/core/java/android/content/pm/ShortcutServiceInternal.java
+++ b/core/java/android/content/pm/ShortcutServiceInternal.java
@@ -91,6 +91,9 @@ public abstract class ShortcutServiceInternal {
public abstract void addShortcutChangeCallback(
@NonNull LauncherApps.ShortcutChangeCallback callback);
+ public abstract void removeShortcutChangeCallback(
+ @NonNull LauncherApps.ShortcutChangeCallback callback);
+
public abstract int getShortcutIconResId(int launcherUserId, @NonNull String callingPackage,
@NonNull String packageName, @NonNull String shortcutId, int userId);
diff --git a/core/java/android/content/pm/multiuser.aconfig b/core/java/android/content/pm/multiuser.aconfig
index c7d94c66c81e..5a3970295ac2 100644
--- a/core/java/android/content/pm/multiuser.aconfig
+++ b/core/java/android/content/pm/multiuser.aconfig
@@ -161,6 +161,16 @@ flag {
}
flag {
+ name: "cache_profile_parent"
+ namespace: "multiuser"
+ description: "Cache getProfileParent to avoid unnecessary binder calls"
+ bug: "350417399"
+ metadata {
+ purpose: PURPOSE_BUGFIX
+ }
+}
+
+flag {
name: "cache_quiet_mode_state"
namespace: "multiuser"
description: "Optimise quiet mode state retrieval"
@@ -307,3 +317,23 @@ flag {
purpose: PURPOSE_BUGFIX
}
}
+
+flag {
+ name: "modify_private_space_secondary_unlock_setup_flow"
+ namespace: "profile_experiences"
+ description: "Updates to setting up secondary unlock factor from Settings for the first time"
+ bug: "332850595"
+ metadata {
+ purpose: PURPOSE_BUGFIX
+ }
+}
+
+flag {
+ name: "fix_large_display_private_space_settings"
+ namespace: "profile_experiences"
+ description: "Fix tablet and foldable specific bugs for private space"
+ bug: "342563741"
+ metadata {
+ purpose: PURPOSE_BUGFIX
+ }
+}
diff --git a/core/java/android/content/res/flags.aconfig b/core/java/android/content/res/flags.aconfig
index a475cc85e921..a5f8199c9a07 100644
--- a/core/java/android/content/res/flags.aconfig
+++ b/core/java/android/content/res/flags.aconfig
@@ -56,3 +56,13 @@ flag {
# This flag is read in ResourcesImpl at boot time.
is_fixed_read_only: true
}
+
+flag {
+ name: "handle_all_config_changes"
+ is_exported: true
+ namespace: "resource_manager"
+ description: "Feature flag for allowing activities to handle all kinds of configuration changes"
+ bug: "180625460"
+ # This flag is read at boot time.
+ is_fixed_read_only: true
+}
diff --git a/core/java/android/database/CursorWindow.java b/core/java/android/database/CursorWindow.java
index ba356bb55194..65148726224e 100644
--- a/core/java/android/database/CursorWindow.java
+++ b/core/java/android/database/CursorWindow.java
@@ -16,6 +16,8 @@
package android.database;
+import static java.util.Objects.requireNonNull;
+
import android.annotation.BytesLong;
import android.annotation.IntRange;
import android.compat.annotation.UnsupportedAppUsage;
@@ -640,6 +642,7 @@ public class CursorWindow extends SQLiteClosable implements Parcelable {
*/
public boolean putBlob(byte[] value,
@IntRange(from = 0) int row, @IntRange(from = 0) int column) {
+ requireNonNull(value);
acquireReference();
try {
return nativePutBlob(mWindowPtr, value, row - mStartPos, column);
@@ -658,6 +661,7 @@ public class CursorWindow extends SQLiteClosable implements Parcelable {
*/
public boolean putString(String value,
@IntRange(from = 0) int row, @IntRange(from = 0) int column) {
+ requireNonNull(value);
acquireReference();
try {
return nativePutString(mWindowPtr, value, row - mStartPos, column);
diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java
index cbac912e33e8..ca3e3d2ad61b 100644
--- a/core/java/android/hardware/Camera.java
+++ b/core/java/android/hardware/Camera.java
@@ -569,7 +569,6 @@ public class Camera {
return native_setup(
new WeakReference<>(this),
cameraId,
- ActivityThread.currentOpPackageName(),
rotationOverride,
forceSlowJpegMode,
clientAttribution.getParcel(),
@@ -660,7 +659,6 @@ public class Camera {
private native int native_setup(
Object cameraThis,
int cameraId,
- String packageName,
int rotationOverride,
boolean forceSlowJpegMode,
Parcel clientAttributionParcel,
diff --git a/core/java/android/hardware/OWNERS b/core/java/android/hardware/OWNERS
index 51ad1519941b..43d3f5466ccf 100644
--- a/core/java/android/hardware/OWNERS
+++ b/core/java/android/hardware/OWNERS
@@ -5,7 +5,7 @@ michaelwr@google.com
sumir@google.com
# Camera
-per-file *Camera*=cychen@google.com,epeev@google.com,etalvala@google.com,shuzhenwang@google.com,zhijunhe@google.com,jchowdhary@google.com
+per-file *Camera*=file:platform/frameworks/av:/camera/OWNERS
# Sensor Privacy
per-file *SensorPrivacy* = file:platform/frameworks/native:/libs/sensorprivacy/OWNERS
diff --git a/core/java/android/hardware/camera2/CameraDevice.java b/core/java/android/hardware/camera2/CameraDevice.java
index 49353893965d..fb381d97adc3 100644
--- a/core/java/android/hardware/camera2/CameraDevice.java
+++ b/core/java/android/hardware/camera2/CameraDevice.java
@@ -1406,18 +1406,31 @@ public abstract class CameraDevice implements AutoCloseable {
* {@link android.hardware.camera2.params.MandatoryStreamCombination} are better suited for this
* purpose.</p>
*
- * <p><b>NOTE:</b>
- * For apps targeting {@link android.os.Build.VERSION_CODES#VANILLA_ICE_CREAM} and above,
+ * <p>If this function returns {@code true} for a particular stream combination, the camera
+ * device supports concurrent captures on all of the streams in the same CaptureRequest, with
+ * two exceptions below where concurrent captures are not supported: </p>
+ * <ul>
+ * <li>Supported stream combinations with exclusive dynamic range profiles as specified by
+ * {@link android.hardware.camera2.params.DynamicRangeProfiles#getProfileCaptureRequestConstraints}.</li>
+ * <li>Supported combinations of 'default' mode and 'max resolution' mode streams for devices
+ * with ULTRA_HIGH_RESOLUTION_SENSOR capability.</li>
+ * </ul>
+ * <p>For other cases where concurrent captures of a stream combination are not supported,
+ * this function returns {@code false}.</p>
+ *
+ * <p><b>NOTE:</b></p>
+ * <ul>
+ * <li>For apps targeting {@link android.os.Build.VERSION_CODES#VANILLA_ICE_CREAM} and above,
* this method will automatically delegate to
* {@link CameraDeviceSetup#isSessionConfigurationSupported} whenever possible. This
* means that the output of this method will consider parameters set through
- * {@link SessionConfiguration#setSessionParameters} as well.
- * </p>
+ * {@link SessionConfiguration#setSessionParameters} as well.</li>
*
- * <p>Session Parameters will be ignored for apps targeting <=
+ * <li>Session Parameters will be ignored for apps targeting <=
* {@link android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE}, or if
* {@link CameraManager#isCameraDeviceSetupSupported} returns false for the camera id
- * associated with this {@code CameraDevice}.</p>
+ * associated with this {@code CameraDevice}.</li>
+ * </ul>
*
* @return {@code true} if the given session configuration is supported by the camera device
* {@code false} otherwise.
@@ -1691,6 +1704,18 @@ public abstract class CameraDevice implements AutoCloseable {
* CameraCharacteristics#INFO_SESSION_CONFIGURATION_QUERY_VERSION} provides the list of
* feature combinations the camera device will reliably report.</p>
*
+ * <p>If this function returns {@code true} for a particular stream combination, the camera
+ * device supports concurrent captures on all of the streams in the same CaptureRequest,
+ * with two exceptions below where concurrent captures are not supported: </p>
+ * <ul>
+ * <li>Supported stream combinations with exclusive dynamic range profiles as specified by
+ * {@link android.hardware.camera2.params.DynamicRangeProfiles#getProfileCaptureRequestConstraints}.</li>
+ * <li>Supported combinations of 'default' mode and 'max resolution' mode streams for
+ * devices with ULTRA_HIGH_RESOLUTION_SENSOR capability.</li>
+ * </ul>
+ * <p>For other cases where concurrent captures of a stream combination are not supported,
+ * this function returns {@code false}.</p>
+ *
* <p><b>IMPORTANT:</b></p>
* <ul>
* <li>If feature support can be queried via {@link CameraCharacteristics}, applications
diff --git a/core/java/android/hardware/camera2/CameraManager.java b/core/java/android/hardware/camera2/CameraManager.java
index 2dbd4b81fe6c..6a7ee7fcb26a 100644
--- a/core/java/android/hardware/camera2/CameraManager.java
+++ b/core/java/android/hardware/camera2/CameraManager.java
@@ -56,6 +56,8 @@ import android.hardware.camera2.utils.ConcurrentCameraIdCombination;
import android.hardware.camera2.utils.ExceptionUtils;
import android.hardware.devicestate.DeviceState;
import android.hardware.devicestate.DeviceStateManager;
+import android.hardware.devicestate.feature.flags.FeatureFlags;
+import android.hardware.devicestate.feature.flags.FeatureFlagsImpl;
import android.hardware.display.DisplayManager;
import android.os.Binder;
import android.os.Handler;
@@ -247,14 +249,22 @@ public final class CameraManager {
private ArrayList<WeakReference<DeviceStateListener>> mDeviceStateListeners =
new ArrayList<>();
private boolean mFoldedDeviceState;
+ private final FeatureFlags mDeviceStateManagerFlags;
public FoldStateListener(Context context) {
mFoldedDeviceStates = context.getResources().getIntArray(
com.android.internal.R.array.config_foldedDeviceStates);
+ mDeviceStateManagerFlags = new FeatureFlagsImpl();
}
- private synchronized void handleStateChange(int state) {
- boolean folded = ArrayUtils.contains(mFoldedDeviceStates, state);
+ private synchronized void handleStateChange(DeviceState state) {
+ final boolean folded;
+ if (mDeviceStateManagerFlags.deviceStatePropertyMigration()) {
+ folded = state.hasProperty(
+ DeviceState.PROPERTY_FOLDABLE_DISPLAY_CONFIGURATION_OUTER_PRIMARY);
+ } else {
+ folded = ArrayUtils.contains(mFoldedDeviceStates, state.getIdentifier());
+ }
mFoldedDeviceState = folded;
Iterator<WeakReference<DeviceStateListener>> it = mDeviceStateListeners.iterator();
@@ -276,10 +286,8 @@ public final class CameraManager {
@SuppressWarnings("FlaggedApi")
@Override
- public void onDeviceStateChanged(DeviceState state) {
- // Suppressing the FlaggedAPI warning as this specific API isn't new, just moved to
- // system API which requires it to be flagged.
- handleStateChange(state.getIdentifier());
+ public void onDeviceStateChanged(@NonNull DeviceState state) {
+ handleStateChange(state);
}
}
@@ -980,6 +988,8 @@ public final class CameraManager {
clientAttribution.uid = USE_CALLING_UID;
clientAttribution.pid = USE_CALLING_PID;
clientAttribution.deviceId = contextAttribution.deviceId;
+ clientAttribution.packageName = mContext.getOpPackageName();
+ clientAttribution.attributionTag = mContext.getAttributionTag();
clientAttribution.next = new AttributionSourceState[0];
return clientAttribution;
}
@@ -1041,8 +1051,6 @@ public final class CameraManager {
cameraService.connectDevice(
callbacks,
cameraId,
- mContext.getOpPackageName(),
- mContext.getAttributionTag(),
oomScoreOffset,
mContext.getApplicationInfo().targetSdkVersion,
rotationOverride,
diff --git a/core/java/android/hardware/camera2/params/StreamConfigurationMap.java b/core/java/android/hardware/camera2/params/StreamConfigurationMap.java
index 978a8f9200ba..e3dbb2bbbf90 100644
--- a/core/java/android/hardware/camera2/params/StreamConfigurationMap.java
+++ b/core/java/android/hardware/camera2/params/StreamConfigurationMap.java
@@ -747,6 +747,10 @@ public final class StreamConfigurationMap {
* {@link android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList}.
* </p>
*
+ * <p>This function returns an empty array if
+ * {@link CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO}
+ * is not supported.</p>
+ *
* @return an array of supported high speed video recording sizes
* @see #getHighSpeedVideoFpsRangesFor(Size)
* @see CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO
@@ -836,6 +840,10 @@ public final class StreamConfigurationMap {
* supported for the same recording rate.</li>
* </p>
*
+ * <p>This function returns an empty array if
+ * {@link CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO}
+ * is not supported.</p>
+ *
* @return an array of supported high speed video recording FPS ranges The upper bound of
* returned ranges is guaranteed to be larger or equal to 120.
* @see #getHighSpeedVideoSizesFor
diff --git a/core/java/android/hardware/devicestate/DeviceStateManager.java b/core/java/android/hardware/devicestate/DeviceStateManager.java
index febc24c1465a..5b511cc94ac0 100644
--- a/core/java/android/hardware/devicestate/DeviceStateManager.java
+++ b/core/java/android/hardware/devicestate/DeviceStateManager.java
@@ -67,6 +67,14 @@ public final class DeviceStateManager {
public static final int MAXIMUM_DEVICE_STATE_IDENTIFIER = 10000;
/**
+ * {@link DeviceState} to represent an invalid device state.
+ * @hide
+ */
+ public static final DeviceState INVALID_DEVICE_STATE = new DeviceState(
+ new DeviceState.Configuration.Builder(INVALID_DEVICE_STATE_IDENTIFIER,
+ "INVALID").build());
+
+ /**
* Intent needed to launch the rear display overlay activity from SysUI
*
* @hide
diff --git a/core/java/android/hardware/display/DisplayManager.java b/core/java/android/hardware/display/DisplayManager.java
index 4894fb1ec452..97f6899ff141 100644
--- a/core/java/android/hardware/display/DisplayManager.java
+++ b/core/java/android/hardware/display/DisplayManager.java
@@ -395,7 +395,7 @@ public final class DisplayManager {
* the display is removed.
*
* Public virtual displays without this flag will move their content to main display
- * stack once they're removed. Private vistual displays will always destroy their
+ * stack once they're removed. Private virtual displays will always destroy their
* content on removal even without this flag.
*
* @see #createVirtualDisplay
@@ -1669,6 +1669,46 @@ public final class DisplayManager {
}
/**
+ * Gets the mapping between the doze brightness sensor values and brightness values. The doze
+ * brightness sensor is a light sensor used to determine the brightness while the device is
+ * dozing. Light sensor values are typically integers in the rage of 0-4. The returned values
+ * are between {@link PowerManager#BRIGHTNESS_MIN} and {@link PowerManager#BRIGHTNESS_MAX}, or
+ * -1 meaning that the current brightness should be kept.
+ * <p>
+ * Requires the {@link android.Manifest.permission#CONTROL_DISPLAY_BRIGHTNESS}
+ * permission.
+ * </p>
+ *
+ * @param displayId The ID of the display
+ *
+ * @hide
+ */
+ @RequiresPermission(Manifest.permission.CONTROL_DISPLAY_BRIGHTNESS)
+ @Nullable
+ public float[] getDozeBrightnessSensorValueToBrightness(int displayId) {
+ return mGlobal.getDozeBrightnessSensorValueToBrightness(displayId);
+ }
+
+ /**
+ * Gets the default doze brightness.
+ * The returned values are between {@link PowerManager#BRIGHTNESS_MIN} and
+ * {@link PowerManager#BRIGHTNESS_MAX}.
+ * <p>
+ * Requires the {@link android.Manifest.permission#CONTROL_DISPLAY_BRIGHTNESS}
+ * permission.
+ * </p>
+ *
+ * @param displayId The ID of the display
+ *
+ * @hide
+ */
+ @RequiresPermission(Manifest.permission.CONTROL_DISPLAY_BRIGHTNESS)
+ @FloatRange(from = 0f, to = 1f)
+ public float getDefaultDozeBrightness(int displayId) {
+ return mGlobal.getDefaultDozeBrightness(displayId);
+ }
+
+ /**
* Listens for changes in available display devices.
*/
public interface DisplayListener {
diff --git a/core/java/android/hardware/display/DisplayManagerGlobal.java b/core/java/android/hardware/display/DisplayManagerGlobal.java
index e9cd37aedec9..cae33d05b6ed 100644
--- a/core/java/android/hardware/display/DisplayManagerGlobal.java
+++ b/core/java/android/hardware/display/DisplayManagerGlobal.java
@@ -21,6 +21,7 @@ import static android.hardware.display.DisplayManager.EventsMask;
import static android.view.Display.HdrCapabilities.HdrType;
import android.Manifest;
+import android.annotation.FloatRange;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -1226,6 +1227,32 @@ public final class DisplayManagerGlobal {
}
}
+ /**
+ * @see DisplayManager#getDozeBrightnessSensorValueToBrightness
+ */
+ @RequiresPermission(Manifest.permission.CONTROL_DISPLAY_BRIGHTNESS)
+ @Nullable
+ public float[] getDozeBrightnessSensorValueToBrightness(int displayId) {
+ try {
+ return mDm.getDozeBrightnessSensorValueToBrightness(displayId);
+ } catch (RemoteException ex) {
+ throw ex.rethrowFromSystemServer();
+ }
+ }
+
+ /**
+ * @see DisplayManager#getDefaultDozeBrightness
+ */
+ @RequiresPermission(Manifest.permission.CONTROL_DISPLAY_BRIGHTNESS)
+ @FloatRange(from = 0f, to = 1f)
+ public float getDefaultDozeBrightness(int displayId) {
+ try {
+ return mDm.getDefaultDozeBrightness(displayId);
+ } catch (RemoteException ex) {
+ throw ex.rethrowFromSystemServer();
+ }
+ }
+
private final class DisplayManagerCallback extends IDisplayManagerCallback.Stub {
@Override
public void onDisplayEvent(int displayId, @DisplayEvent int event) {
diff --git a/core/java/android/hardware/display/DisplayManagerInternal.java b/core/java/android/hardware/display/DisplayManagerInternal.java
index 91caedc0b9a9..811a834dff47 100644
--- a/core/java/android/hardware/display/DisplayManagerInternal.java
+++ b/core/java/android/hardware/display/DisplayManagerInternal.java
@@ -686,8 +686,12 @@ public abstract class DisplayManagerInternal {
public RefreshRateRange range;
public RefreshRateLimitation(@RefreshRateLimitType int type, float min, float max) {
+ this(type, new RefreshRateRange(min, max));
+ }
+
+ public RefreshRateLimitation(@RefreshRateLimitType int type, RefreshRateRange range) {
this.type = type;
- range = new RefreshRateRange(min, max);
+ this.range = range;
}
@Override
diff --git a/core/java/android/hardware/display/IDisplayManager.aidl b/core/java/android/hardware/display/IDisplayManager.aidl
index 77277ee7bb08..f3c21e9f7a43 100644
--- a/core/java/android/hardware/display/IDisplayManager.aidl
+++ b/core/java/android/hardware/display/IDisplayManager.aidl
@@ -246,4 +246,12 @@ interface IDisplayManager {
// Restricts display modes to specified modeIds.
@EnforcePermission("RESTRICT_DISPLAY_MODES")
void requestDisplayModes(in IBinder token, int displayId, in @nullable int[] modeIds);
+
+ // Get the mapping between the doze brightness sensor values and brightness values
+ @EnforcePermission("CONTROL_DISPLAY_BRIGHTNESS")
+ float[] getDozeBrightnessSensorValueToBrightness(int displayId);
+
+ // Get the default doze brightness
+ @EnforcePermission("CONTROL_DISPLAY_BRIGHTNESS")
+ float getDefaultDozeBrightness(int displayId);
}
diff --git a/core/java/android/hardware/input/InputManager.java b/core/java/android/hardware/input/InputManager.java
index 23e262c43d8e..d7952eb26f7e 100644
--- a/core/java/android/hardware/input/InputManager.java
+++ b/core/java/android/hardware/input/InputManager.java
@@ -1251,8 +1251,22 @@ public final class InputManager {
* canceled. Only the pilfering window will continue to receive events for the affected pointers
* until the pointer is lifted.
*
- * This method should be used with caution as unexpected pilfering can break fundamental user
- * interactions.
+ * Furthermore, if any new pointers go down within the touchable region of the pilfering window
+ * and are part of the same gesture, those new pointers will be pilfered as well, and will not
+ * be sent to any other windows.
+ *
+ * Pilfering is designed to be used only once per gesture. Once the gesture is complete
+ * (i.e. on {@link MotionEvent#ACTION_UP}, {@link MotionEvent#ACTION_CANCEL},
+ * or {@link MotionEvent#ACTION_HOVER_EXIT}), the system will resume dispatching pointers
+ * to the appropriately touched windows.
+ *
+ * NOTE: This method should be used with caution as unexpected pilfering can break fundamental
+ * user interactions.
+ *
+ * NOTE: Since this method pilfers pointers based on gesture stream that is
+ * currently active for the window, the behavior will depend on the state of the system, and
+ * is inherently racy. For example, a pilfer request on a quick tap may not be successful if
+ * the tap is already complete by the time the pilfer request is received by the system.
*
* @see android.os.InputConfig#SPY
* @hide
diff --git a/core/java/android/hardware/input/InputSettings.java b/core/java/android/hardware/input/InputSettings.java
index 4c5ebe786b24..bec1c9ef8059 100644
--- a/core/java/android/hardware/input/InputSettings.java
+++ b/core/java/android/hardware/input/InputSettings.java
@@ -17,11 +17,13 @@
package android.hardware.input;
import static com.android.hardware.input.Flags.FLAG_KEYBOARD_A11Y_BOUNCE_KEYS_FLAG;
+import static com.android.hardware.input.Flags.FLAG_KEYBOARD_A11Y_MOUSE_KEYS;
import static com.android.hardware.input.Flags.FLAG_KEYBOARD_A11Y_SLOW_KEYS_FLAG;
import static com.android.hardware.input.Flags.FLAG_KEYBOARD_A11Y_STICKY_KEYS_FLAG;
import static com.android.hardware.input.Flags.keyboardA11yBounceKeysFlag;
import static com.android.hardware.input.Flags.keyboardA11ySlowKeysFlag;
import static com.android.hardware.input.Flags.keyboardA11yStickyKeysFlag;
+import static com.android.hardware.input.Flags.keyboardA11yMouseKeys;
import static com.android.hardware.input.Flags.touchpadTapDragging;
import static com.android.input.flags.Flags.enableInputFilterRustImpl;
@@ -662,4 +664,64 @@ public class InputSettings {
UserHandle.USER_CURRENT);
}
+ /**
+ * Whether Accessibility mouse keys feature flag is enabled.
+ *
+ * <p>
+ * ‘Mouse keys’ is an accessibility feature to aid users who have physical disabilities,
+ * that allows the user to use the keys on the keyboard to control the mouse pointer and
+ * other perform other mouse functionality.
+ * </p>
+ *
+ * @hide
+ */
+ public static boolean isAccessibilityMouseKeysFeatureFlagEnabled() {
+ return keyboardA11yMouseKeys();
+ }
+
+ /**
+ * Whether Accessibility mouse keys is enabled.
+ *
+ * <p>
+ * ‘Mouse keys’ is an accessibility feature to aid users who have physical disabilities,
+ * that allows the user to use the keys on the keyboard to control the mouse pointer and
+ * other perform other mouse functionality.
+ * </p>
+ *
+ * @hide
+ */
+ @TestApi
+ @FlaggedApi(FLAG_KEYBOARD_A11Y_MOUSE_KEYS)
+ public static boolean isAccessibilityMouseKeysEnabled(@NonNull Context context) {
+ if (!isAccessibilityMouseKeysFeatureFlagEnabled()) {
+ return false;
+ }
+ return Settings.Secure.getIntForUser(context.getContentResolver(),
+ Settings.Secure.ACCESSIBILITY_MOUSE_KEYS_ENABLED, 0, UserHandle.USER_CURRENT)
+ != 0;
+ }
+
+ /**
+ * Set Accessibility mouse keys feature enabled/disabled.
+ *
+ * <p>
+ * ‘Mouse keys’ is an accessibility feature to aid users who have physical disabilities,
+ * that allows the user to use the keys on the keyboard to control the mouse pointer and
+ * other perform other mouse functionality.
+ * </p>
+ *
+ * @hide
+ */
+ @TestApi
+ @FlaggedApi(FLAG_KEYBOARD_A11Y_MOUSE_KEYS)
+ @RequiresPermission(Manifest.permission.WRITE_SETTINGS)
+ public static void setAccessibilityMouseKeysEnabled(@NonNull Context context,
+ boolean enabled) {
+ if (!isAccessibilityMouseKeysFeatureFlagEnabled()) {
+ return;
+ }
+ Settings.Secure.putIntForUser(context.getContentResolver(),
+ Settings.Secure.ACCESSIBILITY_MOUSE_KEYS_ENABLED, enabled ? 1 : 0,
+ UserHandle.USER_CURRENT);
+ }
}
diff --git a/core/java/android/hardware/input/VirtualRotaryEncoderScrollEvent.java b/core/java/android/hardware/input/VirtualRotaryEncoderScrollEvent.java
index 3be911abe732..8c98abd6dbfe 100644
--- a/core/java/android/hardware/input/VirtualRotaryEncoderScrollEvent.java
+++ b/core/java/android/hardware/input/VirtualRotaryEncoderScrollEvent.java
@@ -107,7 +107,8 @@ public final class VirtualRotaryEncoderScrollEvent implements Parcelable {
}
/**
- * Sets the scroll amount, normalized from -1.0 to 1.0, inclusive.
+ * Sets the scroll amount, normalized from -1.0 to 1.0, inclusive. By default, the scroll
+ * amount is 0, which results in no scroll.
* <p>
* Positive values indicate scrolling forward (e.g. down in a vertical list); negative
* values, backward.
diff --git a/core/java/android/hardware/input/input_framework.aconfig b/core/java/android/hardware/input/input_framework.aconfig
index acd0d00f812d..0cd280002dbf 100644
--- a/core/java/android/hardware/input/input_framework.aconfig
+++ b/core/java/android/hardware/input/input_framework.aconfig
@@ -61,3 +61,17 @@ flag {
description: "Allows system to provide keyboard specific key drawables and shortcuts via config files"
bug: "345440920"
}
+
+flag {
+ namespace: "input_native"
+ name: "keyboard_a11y_mouse_keys"
+ description: "Controls if the mouse keys accessibility feature for physical keyboard is available to the user"
+ bug: "341799888"
+}
+
+flag {
+ namespace: "input_native"
+ name: "touchpad_visualizer"
+ description: "Enables a developer overlay that displays raw touchpad input data and gesture recognition status in real-time."
+ bug: "286551975"
+}
diff --git a/core/java/android/hardware/location/ContextHubInfo.java b/core/java/android/hardware/location/ContextHubInfo.java
index 7353d76b479a..d9349701bf7d 100644
--- a/core/java/android/hardware/location/ContextHubInfo.java
+++ b/core/java/android/hardware/location/ContextHubInfo.java
@@ -295,24 +295,38 @@ public class ContextHubInfo implements Parcelable {
@NonNull
@Override
public String toString() {
- String retVal = "";
- retVal += "ID/handle : " + mId;
- retVal += ", Name : " + mName;
- retVal += "\n\tVendor : " + mVendor;
- retVal += ", Toolchain : " + mToolchain;
- retVal += ", Toolchain version: 0x" + Integer.toHexString(mToolchainVersion);
- retVal += "\n\tPlatformVersion : 0x" + Integer.toHexString(mPlatformVersion);
- retVal += ", SwVersion : "
- + Byte.toUnsignedInt(mChreApiMajorVersion) + "." + Byte.toUnsignedInt(
- mChreApiMinorVersion) + "." + Short.toUnsignedInt(mChrePatchVersion);
- retVal += ", CHRE platform ID: 0x" + Long.toHexString(mChrePlatformId);
- retVal += "\n\tPeakMips : " + mPeakMips;
- retVal += ", StoppedPowerDraw : " + mStoppedPowerDrawMw + " mW";
- retVal += ", PeakPowerDraw : " + mPeakPowerDrawMw + " mW";
- retVal += ", MaxPacketLength : " + mMaxPacketLengthBytes + " Bytes";
- retVal += ", SupportsReliableMessage : " + mSupportsReliableMessages;
-
- return retVal;
+ StringBuilder out = new StringBuilder();
+ out.append("ID/handle : ");
+ out.append(mId);
+ out.append(", Name : ");
+ out.append(mName);
+ out.append("\n\tVendor : ");
+ out.append(mVendor);
+ out.append(", Toolchain : ");
+ out.append(mToolchain);
+ out.append(", Toolchain version: 0x");
+ out.append(Integer.toHexString(mToolchainVersion));
+ out.append("\n\tPlatformVersion : 0x");
+ out.append(Integer.toHexString(mPlatformVersion));
+ out.append(", SwVersion : ");
+ out.append(Byte.toUnsignedInt(mChreApiMajorVersion));
+ out.append(".");
+ out.append(Byte.toUnsignedInt(mChreApiMinorVersion));
+ out.append(".");
+ out.append(Short.toUnsignedInt(mChrePatchVersion));
+ out.append(", CHRE platform ID: 0x");
+ out.append(Long.toHexString(mChrePlatformId));
+ out.append("\n\tPeakMips : ");
+ out.append(mPeakMips);
+ out.append(", StoppedPowerDraw : ");
+ out.append(mStoppedPowerDrawMw);
+ out.append(" mW, PeakPowerDraw : ");
+ out.append(mPeakPowerDrawMw);
+ out.append(" mW, MaxPacketLength : ");
+ out.append(mMaxPacketLengthBytes);
+ out.append(" Bytes, SupportsReliableMessages : ");
+ out.append(mSupportsReliableMessages);
+ return out.toString();
}
/**
diff --git a/core/java/android/hardware/location/NanoAppMessage.java b/core/java/android/hardware/location/NanoAppMessage.java
index 85a5d45a6ae9..ec0adda38d10 100644
--- a/core/java/android/hardware/location/NanoAppMessage.java
+++ b/core/java/android/hardware/location/NanoAppMessage.java
@@ -230,27 +230,38 @@ public final class NanoAppMessage implements Parcelable {
public String toString() {
int length = mMessageBody.length;
- String ret = "NanoAppMessage[type = " + mMessageType + ", length = " + mMessageBody.length
- + " bytes, " + (mIsBroadcasted ? "broadcast" : "unicast") + ", nanoapp = 0x"
- + Long.toHexString(mNanoAppId) + ", isReliable = "
- + (mIsReliable ? "true" : "false") + ", messageSequenceNumber = "
- + mMessageSequenceNumber + "](";
+ StringBuilder out = new StringBuilder();
+ out.append( "NanoAppMessage[type = ");
+ out.append(mMessageType);
+ out.append(", length = ");
+ out.append(mMessageBody.length);
+ out.append(" bytes, ");
+ out.append(mIsBroadcasted ? "broadcast" : "unicast");
+ out.append(", nanoapp = 0x");
+ out.append(Long.toHexString(mNanoAppId));
+ out.append(", isReliable = ");
+ out.append(mIsReliable ? "true" : "false");
+ out.append(", messageSequenceNumber = ");
+ out.append(mMessageSequenceNumber);
+ out.append("](");
+
if (length > 0) {
- ret += "data = 0x";
+ out.append("data = 0x");
}
for (int i = 0; i < Math.min(length, DEBUG_LOG_NUM_BYTES); i++) {
- ret += HexEncoding.encodeToString(mMessageBody[i], true /* upperCase */);
+ out.append(HexEncoding.encodeToString(mMessageBody[i],
+ true /* upperCase */));
if ((i + 1) % 4 == 0) {
- ret += " ";
+ out.append(" ");
}
}
if (length > DEBUG_LOG_NUM_BYTES) {
- ret += "...";
+ out.append("...");
}
- ret += ")";
+ out.append(")");
- return ret;
+ return out.toString();
}
@Override
diff --git a/core/java/android/hardware/usb/flags/system_sw_usb_flags.aconfig b/core/java/android/hardware/usb/flags/system_sw_usb_flags.aconfig
index 0f944cfb7f67..51024ba64bd9 100644
--- a/core/java/android/hardware/usb/flags/system_sw_usb_flags.aconfig
+++ b/core/java/android/hardware/usb/flags/system_sw_usb_flags.aconfig
@@ -36,3 +36,10 @@ flag {
description: "Enable identifying midi device using USB sysfs"
bug: "333778731"
}
+
+flag {
+ name: "enable_udc_sysfs_usb_state_update"
+ namespace: "system_sw_usb"
+ description: "Enable usb state update based on udc sysfs"
+ bug: "339241080"
+}
diff --git a/core/java/android/inputmethodservice/AbstractInputMethodService.java b/core/java/android/inputmethodservice/AbstractInputMethodService.java
index e2d215ebfed4..4bc5bd2427ea 100644
--- a/core/java/android/inputmethodservice/AbstractInputMethodService.java
+++ b/core/java/android/inputmethodservice/AbstractInputMethodService.java
@@ -29,6 +29,7 @@ import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.WindowManager;
import android.view.WindowManagerGlobal;
+import android.view.inputmethod.Flags;
import android.view.inputmethod.InputMethod;
import android.view.inputmethod.InputMethodSession;
import android.window.WindowProviderService;
@@ -186,6 +187,10 @@ public abstract class AbstractInputMethodService extends WindowProviderService
if (callback != null) {
callback.finishedEvent(seq, handled);
}
+ if (Flags.imeSwitcherRevamp() && !handled && event.getAction() == KeyEvent.ACTION_DOWN
+ && event.getUnicodeChar() > 0 && mInputMethodServiceInternal != null) {
+ mInputMethodServiceInternal.notifyUserActionIfNecessary();
+ }
}
/**
diff --git a/core/java/android/inputmethodservice/ImsConfigurationTracker.java b/core/java/android/inputmethodservice/ImsConfigurationTracker.java
index 30ef0a2a6f7f..17a5ffcb1081 100644
--- a/core/java/android/inputmethodservice/ImsConfigurationTracker.java
+++ b/core/java/android/inputmethodservice/ImsConfigurationTracker.java
@@ -16,6 +16,8 @@
package android.inputmethodservice;
+import static android.content.pm.ActivityInfo.CONFIG_RESOURCES_UNUSED;
+
import android.annotation.MainThread;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -88,12 +90,16 @@ public final class ImsConfigurationTracker {
if (!mInitialized) {
return;
}
+ // Don't restart InputMethodService that claims it does not use resources at all.
+ boolean neverReset = android.content.res.Flags.handleAllConfigChanges()
+ && (mHandledConfigChanges & CONFIG_RESOURCES_UNUSED) != 0;
+
final int diff = mLastKnownConfig != null
? mLastKnownConfig.diffPublicOnly(newConfig) : CONFIG_CHANGED;
// If the new config is the same as the config this Service is already running with,
// then don't bother calling resetStateForNewConfiguration.
final int unhandledDiff = (diff & ~mHandledConfigChanges);
- if (unhandledDiff != 0) {
+ if (unhandledDiff != 0 && !neverReset) {
resetStateForNewConfigurationRunner.run();
}
if (diff != 0) {
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java
index 943b04f517f3..da7997d6cc65 100644
--- a/core/java/android/inputmethodservice/InputMethodService.java
+++ b/core/java/android/inputmethodservice/InputMethodService.java
@@ -16,7 +16,6 @@
package android.inputmethodservice;
-import static android.view.inputmethod.Flags.predictiveBackIme;
import static android.inputmethodservice.InputMethodServiceProto.CANDIDATES_VIEW_STARTED;
import static android.inputmethodservice.InputMethodServiceProto.CANDIDATES_VISIBILITY;
import static android.inputmethodservice.InputMethodServiceProto.CONFIGURATION;
@@ -57,6 +56,7 @@ import static android.view.inputmethod.ConnectionlessHandwritingCallback.CONNECT
import static android.view.inputmethod.ConnectionlessHandwritingCallback.CONNECTIONLESS_HANDWRITING_ERROR_UNSUPPORTED;
import static android.view.inputmethod.Flags.FLAG_CONNECTIONLESS_HANDWRITING;
import static android.view.inputmethod.Flags.ctrlShiftShortcut;
+import static android.view.inputmethod.Flags.predictiveBackIme;
import static java.lang.annotation.RetentionPolicy.SOURCE;
@@ -4341,6 +4341,17 @@ public class InputMethodService extends AbstractInputMethodService {
}
/**
+ * Called when the IME switch button was clicked from the client. Depending on the number of
+ * enabled IME subtypes, this will either switch to the next IME/subtype, or show the input
+ * method picker dialog.
+ *
+ * @hide
+ */
+ final void onImeSwitchButtonClickFromClient() {
+ mPrivOps.onImeSwitchButtonClickFromClient(getDisplayId());
+ }
+
+ /**
* Used to inject custom {@link InputMethodServiceInternal}.
*
* @return the {@link InputMethodServiceInternal} to be used.
diff --git a/core/java/android/inputmethodservice/NavigationBarController.java b/core/java/android/inputmethodservice/NavigationBarController.java
index de67e06ddda7..3ce67b0e0ec1 100644
--- a/core/java/android/inputmethodservice/NavigationBarController.java
+++ b/core/java/android/inputmethodservice/NavigationBarController.java
@@ -42,6 +42,7 @@ import android.view.WindowInsets;
import android.view.WindowInsetsController.Appearance;
import android.view.animation.Interpolator;
import android.view.animation.PathInterpolator;
+import android.view.inputmethod.InputMethodManager;
import android.widget.FrameLayout;
import com.android.internal.inputmethod.InputMethodNavButtonFlags;
@@ -145,7 +146,8 @@ final class NavigationBarController {
return mImpl.toDebugString();
}
- private static final class Impl implements Callback, Window.DecorCallback {
+ private static final class Impl implements Callback, Window.DecorCallback,
+ NavigationBarView.ButtonClickListener {
private static final int DEFAULT_COLOR_ADAPT_TRANSITION_TIME = 1700;
// Copied from com.android.systemui.animation.Interpolators#LEGACY_DECELERATE
@@ -241,6 +243,7 @@ final class NavigationBarController {
? StatusBarManager.NAVIGATION_HINT_IME_SWITCHER_SHOWN
: 0);
navigationBarView.setNavigationIconHints(hints);
+ navigationBarView.prepareNavButtons(this);
}
} else {
mNavigationBarFrame.setLayoutParams(new FrameLayout.LayoutParams(
@@ -592,6 +595,17 @@ final class NavigationBarController {
return drawLegacyNavigationBarBackground;
}
+ @Override
+ public void onImeSwitchButtonClick(View v) {
+ mService.onImeSwitchButtonClickFromClient();
+ }
+
+ @Override
+ public boolean onImeSwitchButtonLongClick(View v) {
+ v.getContext().getSystemService(InputMethodManager.class).showInputMethodPicker();
+ return true;
+ }
+
/**
* Returns the height of the IME caption bar if this should be shown, or {@code 0} instead.
*/
diff --git a/core/java/android/inputmethodservice/navigationbar/KeyButtonView.java b/core/java/android/inputmethodservice/navigationbar/KeyButtonView.java
index f423672c5490..540243c4fe92 100644
--- a/core/java/android/inputmethodservice/navigationbar/KeyButtonView.java
+++ b/core/java/android/inputmethodservice/navigationbar/KeyButtonView.java
@@ -41,6 +41,7 @@ import android.view.View;
import android.view.ViewConfiguration;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
+import android.view.inputmethod.Flags;
import android.view.inputmethod.InputConnection;
import android.widget.ImageView;
@@ -58,12 +59,30 @@ public class KeyButtonView extends ImageView implements ButtonInterface {
private int mTouchDownY;
private AudioManager mAudioManager;
private boolean mGestureAborted;
+ /**
+ * Whether the long click action has been invoked. The short click action is invoked on the up
+ * event while a long click is invoked as soon as the long press duration is reached, so a long
+ * click could be performed before the short click is checked, in which case the short click's
+ * action should not be invoked.
+ *
+ * @see View#mHasPerformedLongPress
+ */
+ private boolean mLongClicked;
private OnClickListener mOnClickListener;
private final KeyButtonRipple mRipple;
private final Paint mOvalBgPaint = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.FILTER_BITMAP_FLAG);
private float mDarkIntensity;
private boolean mHasOvalBg = false;
+ /** Runnable for checking whether the long click action should be performed. */
+ private final Runnable mCheckLongPress = new Runnable() {
+ public void run() {
+ if (isPressed() && performLongClick()) {
+ mLongClicked = true;
+ }
+ }
+ };
+
public KeyButtonView(Context context, AttributeSet attrs) {
super(context, attrs);
@@ -159,6 +178,7 @@ public class KeyButtonView extends ImageView implements ButtonInterface {
switch (action) {
case MotionEvent.ACTION_DOWN:
mDownTime = SystemClock.uptimeMillis();
+ mLongClicked = false;
setPressed(true);
// Use raw X and Y to detect gestures in case a parent changes the x and y values
@@ -173,6 +193,10 @@ public class KeyButtonView extends ImageView implements ButtonInterface {
if (!showSwipeUI) {
playSoundEffect(SoundEffectConstants.CLICK);
}
+ if (Flags.imeSwitcherRevamp() && isLongClickable()) {
+ removeCallbacks(mCheckLongPress);
+ postDelayed(mCheckLongPress, ViewConfiguration.getLongPressTimeout());
+ }
break;
case MotionEvent.ACTION_MOVE:
x = (int) ev.getRawX();
@@ -183,6 +207,9 @@ public class KeyButtonView extends ImageView implements ButtonInterface {
// When quick step is enabled, prevent animating the ripple triggered by
// setPressed and decide to run it on touch up
setPressed(false);
+ if (isLongClickable()) {
+ removeCallbacks(mCheckLongPress);
+ }
}
break;
case MotionEvent.ACTION_CANCEL:
@@ -190,9 +217,12 @@ public class KeyButtonView extends ImageView implements ButtonInterface {
if (mCode != KEYCODE_UNKNOWN) {
sendEvent(KeyEvent.ACTION_UP, KeyEvent.FLAG_CANCELED);
}
+ if (isLongClickable()) {
+ removeCallbacks(mCheckLongPress);
+ }
break;
case MotionEvent.ACTION_UP:
- final boolean doIt = isPressed();
+ final boolean doIt = isPressed() && !mLongClicked;
setPressed(false);
final boolean doHapticFeedback = (SystemClock.uptimeMillis() - mDownTime) > 150;
if (showSwipeUI) {
@@ -201,7 +231,7 @@ public class KeyButtonView extends ImageView implements ButtonInterface {
performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY);
playSoundEffect(SoundEffectConstants.CLICK);
}
- } else if (doHapticFeedback) {
+ } else if (doHapticFeedback && !mLongClicked) {
// Always send a release ourselves because it doesn't seem to be sent elsewhere
// and it feels weird to sometimes get a release haptic and other times not.
performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY_RELEASE);
@@ -221,6 +251,9 @@ public class KeyButtonView extends ImageView implements ButtonInterface {
sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CLICKED);
}
}
+ if (isLongClickable()) {
+ removeCallbacks(mCheckLongPress);
+ }
break;
}
diff --git a/core/java/android/inputmethodservice/navigationbar/NavigationBarView.java b/core/java/android/inputmethodservice/navigationbar/NavigationBarView.java
index e28f34528f42..209f323d7b34 100644
--- a/core/java/android/inputmethodservice/navigationbar/NavigationBarView.java
+++ b/core/java/android/inputmethodservice/navigationbar/NavigationBarView.java
@@ -26,6 +26,7 @@ import android.animation.ObjectAnimator;
import android.animation.PropertyValuesHolder;
import android.annotation.DrawableRes;
import android.annotation.FloatRange;
+import android.annotation.NonNull;
import android.app.StatusBarManager;
import android.content.Context;
import android.content.res.Configuration;
@@ -39,6 +40,7 @@ import android.view.Surface;
import android.view.View;
import android.view.animation.Interpolator;
import android.view.animation.PathInterpolator;
+import android.view.inputmethod.Flags;
import android.view.inputmethod.InputMethodManager;
import android.widget.FrameLayout;
@@ -79,6 +81,28 @@ public final class NavigationBarView extends FrameLayout {
private NavigationBarInflaterView mNavigationInflaterView;
+ /**
+ * Interface definition for callbacks to be invoked when navigation bar buttons are clicked.
+ */
+ public interface ButtonClickListener {
+
+ /**
+ * Called when the IME switch button is clicked.
+ *
+ * @param v The view that was clicked.
+ */
+ void onImeSwitchButtonClick(View v);
+
+ /**
+ * Called when the IME switch button has been clicked and held.
+ *
+ * @param v The view that was clicked and held.
+ *
+ * @return true if the callback consumed the long click, false otherwise.
+ */
+ boolean onImeSwitchButtonLongClick(View v);
+ }
+
public NavigationBarView(Context context, AttributeSet attrs) {
super(context, attrs);
@@ -98,13 +122,27 @@ public final class NavigationBarView extends FrameLayout {
new ButtonDispatcher(com.android.internal.R.id.input_method_nav_home_handle));
mDeadZone = new android.inputmethodservice.navigationbar.DeadZone(this);
+ }
+ /**
+ * Prepares the navigation bar buttons to be used and sets the on click listeners.
+ *
+ * @param listener The listener used to handle the clicks on the navigation bar buttons.
+ */
+ public void prepareNavButtons(@NonNull ButtonClickListener listener) {
getBackButton().setLongClickable(false);
- final ButtonDispatcher imeSwitchButton = getImeSwitchButton();
- imeSwitchButton.setLongClickable(false);
- imeSwitchButton.setOnClickListener(view -> view.getContext()
- .getSystemService(InputMethodManager.class).showInputMethodPicker());
+ if (Flags.imeSwitcherRevamp()) {
+ final var imeSwitchButton = getImeSwitchButton();
+ imeSwitchButton.setLongClickable(true);
+ imeSwitchButton.setOnClickListener(listener::onImeSwitchButtonClick);
+ imeSwitchButton.setOnLongClickListener(listener::onImeSwitchButtonLongClick);
+ } else {
+ final ButtonDispatcher imeSwitchButton = getImeSwitchButton();
+ imeSwitchButton.setLongClickable(false);
+ imeSwitchButton.setOnClickListener(view -> view.getContext()
+ .getSystemService(InputMethodManager.class).showInputMethodPicker());
+ }
}
@Override
@@ -178,7 +216,11 @@ public final class NavigationBarView extends FrameLayout {
oldConfig.getLayoutDirection() != mConfiguration.getLayoutDirection();
if (densityChange || dirChange) {
- mImeSwitcherIcon = getDrawable(com.android.internal.R.drawable.ic_ime_switcher);
+ final int switcherResId = Flags.imeSwitcherRevamp()
+ ? com.android.internal.R.drawable.ic_ime_switcher_new
+ : com.android.internal.R.drawable.ic_ime_switcher;
+
+ mImeSwitcherIcon = getDrawable(switcherResId);
}
if (orientationChange || densityChange || dirChange) {
mBackIcon = getBackDrawable();
diff --git a/core/java/android/net/NetworkPolicyManager.java b/core/java/android/net/NetworkPolicyManager.java
index 334b2316b268..3e6bbf6cdd0c 100644
--- a/core/java/android/net/NetworkPolicyManager.java
+++ b/core/java/android/net/NetworkPolicyManager.java
@@ -21,6 +21,7 @@ import static android.app.ActivityManager.PROCESS_STATE_UNKNOWN;
import static android.app.ActivityManager.procStateToString;
import static android.content.pm.PackageManager.GET_SIGNATURES;
+import android.annotation.FlaggedApi;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -36,6 +37,7 @@ import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.Signature;
+import android.net.platform.flags.Flags;
import android.net.wifi.WifiConfiguration;
import android.net.wifi.WifiInfo;
import android.os.Build;
@@ -954,11 +956,24 @@ public class NetworkPolicyManager {
* @param executor The {@link Executor} to run the callback on.
* @param callback The {@link NetworkPolicyCallback} to be registered.
* @hide
+ *
+ * @deprecated This API is only supported up to Android version
+ * {@link Build.VERSION_CODES#VANILLA_ICE_CREAM}. On later versions,
+ * {@link android.net.ConnectivityManager.NetworkCallback} should be used wherever possible.
+ *
+ * @throws UnsupportedOperationException when called on Android versions after
+ * {@link Build.VERSION_CODES#VANILLA_ICE_CREAM}.
*/
+ @Deprecated
+ @FlaggedApi(Flags.FLAG_DEPRECATE_NETWORK_POLICY_CALLBACK)
@SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
@RequiresPermission(android.Manifest.permission.OBSERVE_NETWORK_POLICY)
public void registerNetworkPolicyCallback(@Nullable Executor executor,
@NonNull NetworkPolicyCallback callback) {
+ if (Flags.deprecateNetworkPolicyCallback()) {
+ throw new UnsupportedOperationException("NetworkPolicyCallback is no longer supported."
+ + " Please use ConnectivityManager APIs instead");
+ }
if (callback == null) {
throw new NullPointerException("Callback cannot be null.");
}
@@ -974,10 +989,23 @@ public class NetworkPolicyManager {
*
* @param callback The {@link NetworkPolicyCallback} to be unregistered.
* @hide
+ *
+ * @deprecated This API is only supported up to Android version
+ * {@link Build.VERSION_CODES#VANILLA_ICE_CREAM}. On later versions,
+ * {@link android.net.ConnectivityManager.NetworkCallback} should be used wherever possible.
+ *
+ * @throws UnsupportedOperationException when called on Android versions after
+ * {@link Build.VERSION_CODES#VANILLA_ICE_CREAM}.
*/
+ @Deprecated
+ @FlaggedApi(Flags.FLAG_DEPRECATE_NETWORK_POLICY_CALLBACK)
@SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
@RequiresPermission(android.Manifest.permission.OBSERVE_NETWORK_POLICY)
public void unregisterNetworkPolicyCallback(@NonNull NetworkPolicyCallback callback) {
+ if (Flags.deprecateNetworkPolicyCallback()) {
+ throw new UnsupportedOperationException("NetworkPolicyCallback is no longer supported."
+ + " Please use ConnectivityManager APIs instead");
+ }
if (callback == null) {
throw new NullPointerException("Callback cannot be null.");
}
@@ -990,8 +1018,18 @@ public class NetworkPolicyManager {
/**
* Interface for the callback to listen for changes to network blocked status of apps.
*
+ * @deprecated This API is only supported up to Android version
+ * {@link Build.VERSION_CODES#VANILLA_ICE_CREAM}. On later versions, this callback will
+ * <b>not</b> be called when the network blocked status of an app changes. Instead,
+ * {@link android.net.ConnectivityManager.NetworkCallback} should be used wherever possible.
+ *
+ * @see #registerNetworkPolicyCallback(Executor, NetworkPolicyCallback)
+ * @see #unregisterNetworkPolicyCallback(NetworkPolicyCallback)
+ *
* @hide
*/
+ @FlaggedApi(Flags.FLAG_DEPRECATE_NETWORK_POLICY_CALLBACK)
+ @Deprecated
@SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
public interface NetworkPolicyCallback {
/**
diff --git a/core/java/android/net/flags.aconfig b/core/java/android/net/flags.aconfig
index 048c50eb0a19..48eb9680e647 100644
--- a/core/java/android/net/flags.aconfig
+++ b/core/java/android/net/flags.aconfig
@@ -25,3 +25,13 @@ flag {
description: "Flag for registerOffloadEngine API in NsdManager"
bug: "294777050"
}
+
+flag {
+ name: "deprecate_network_policy_callback"
+ namespace: "backstage_power"
+ description: "Flag for deprecating NetworkPolicyCallback and related APIs"
+ bug: "353342610"
+ metadata {
+ purpose: PURPOSE_BUGFIX
+ }
+}
diff --git a/core/java/android/os/AggregateBatteryConsumer.java b/core/java/android/os/AggregateBatteryConsumer.java
index 67e21957839a..c7f8878f104e 100644
--- a/core/java/android/os/AggregateBatteryConsumer.java
+++ b/core/java/android/os/AggregateBatteryConsumer.java
@@ -55,7 +55,7 @@ public final class AggregateBatteryConsumer extends BatteryConsumer {
@Override
public void dump(PrintWriter pw, boolean skipEmptyComponents) {
- mPowerComponents.dump(pw, skipEmptyComponents);
+ mPowerComponents.dump(pw, SCREEN_STATE_ANY, POWER_STATE_ANY, skipEmptyComponents);
}
@Override
diff --git a/core/java/android/os/BatteryConsumer.java b/core/java/android/os/BatteryConsumer.java
index 744f6a8d61ac..2447ff93fdbc 100644
--- a/core/java/android/os/BatteryConsumer.java
+++ b/core/java/android/os/BatteryConsumer.java
@@ -19,14 +19,19 @@ package android.os;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.database.Cursor;
import android.database.CursorWindow;
+import android.util.IntArray;
import android.util.Slog;
+import android.util.SparseArray;
import android.util.proto.ProtoOutputStream;
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;
/**
* Interface for objects containing battery attribution data.
@@ -192,31 +197,106 @@ public abstract class BatteryConsumer {
sProcessStateNames[PROCESS_STATE_CACHED] = "cached";
}
- private static final int[] SUPPORTED_POWER_COMPONENTS_PER_PROCESS_STATE = {
- POWER_COMPONENT_CPU,
- POWER_COMPONENT_MOBILE_RADIO,
- POWER_COMPONENT_WIFI,
- POWER_COMPONENT_BLUETOOTH,
- POWER_COMPONENT_AUDIO,
- POWER_COMPONENT_VIDEO,
- POWER_COMPONENT_FLASHLIGHT,
- POWER_COMPONENT_CAMERA,
- POWER_COMPONENT_GNSS,
+ private static final IntArray SUPPORTED_POWER_COMPONENTS_PER_PROCESS_STATE;
+ static {
+ int[] supportedPowerComponents = {
+ POWER_COMPONENT_CPU,
+ POWER_COMPONENT_MOBILE_RADIO,
+ POWER_COMPONENT_WIFI,
+ POWER_COMPONENT_BLUETOOTH,
+ POWER_COMPONENT_AUDIO,
+ POWER_COMPONENT_VIDEO,
+ POWER_COMPONENT_FLASHLIGHT,
+ POWER_COMPONENT_CAMERA,
+ POWER_COMPONENT_GNSS};
+ Arrays.sort(supportedPowerComponents);
+ SUPPORTED_POWER_COMPONENTS_PER_PROCESS_STATE = IntArray.wrap(supportedPowerComponents);
};
static final int COLUMN_INDEX_BATTERY_CONSUMER_TYPE = 0;
static final int COLUMN_COUNT = 1;
/**
+ * Identifiers of consumed power aggregations per SCREEN state.
+ *
+ * @hide
+ */
+ @IntDef(prefix = {"SCREEN_STATE_"}, value = {
+ SCREEN_STATE_UNSPECIFIED,
+ SCREEN_STATE_ANY,
+ SCREEN_STATE_ON,
+ SCREEN_STATE_OTHER,
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface ScreenState {
+ }
+
+ public static final int SCREEN_STATE_UNSPECIFIED = 0;
+ public static final int SCREEN_STATE_ANY = SCREEN_STATE_UNSPECIFIED;
+ public static final int SCREEN_STATE_ON = 1;
+ public static final int SCREEN_STATE_OTHER = 2; // Off, doze etc
+
+ public static final int SCREEN_STATE_COUNT = 3;
+
+ private static final String[] sScreenStateNames = new String[SCREEN_STATE_COUNT];
+
+ static {
+ // Assign individually to avoid future mismatch
+ sScreenStateNames[SCREEN_STATE_UNSPECIFIED] = "unspecified";
+ sScreenStateNames[SCREEN_STATE_ON] = "on";
+ sScreenStateNames[SCREEN_STATE_OTHER] = "off/doze";
+ }
+
+ /**
+ * Identifiers of consumed power aggregations per POWER state.
+ *
+ * @hide
+ */
+ @IntDef(prefix = {"POWER_STATE_"}, value = {
+ POWER_STATE_UNSPECIFIED,
+ POWER_STATE_ANY,
+ POWER_STATE_BATTERY,
+ POWER_STATE_OTHER,
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface PowerState {
+ }
+
+ public static final int POWER_STATE_UNSPECIFIED = 0;
+ public static final int POWER_STATE_ANY = POWER_STATE_UNSPECIFIED;
+ public static final int POWER_STATE_BATTERY = 1;
+ public static final int POWER_STATE_OTHER = 2; // Plugged in, or on wireless charger, etc.
+
+ public static final int POWER_STATE_COUNT = 3;
+
+ private static final String[] sPowerStateNames = new String[POWER_STATE_COUNT];
+
+ static {
+ // Assign individually to avoid future mismatch
+ sPowerStateNames[POWER_STATE_UNSPECIFIED] = "unspecified";
+ sPowerStateNames[POWER_STATE_BATTERY] = "on battery";
+ sPowerStateNames[POWER_STATE_OTHER] = "not on battery";
+ }
+
+ /**
* Identifies power attribution dimensions that a caller is interested in.
*/
public static final class Dimensions {
public final @PowerComponent int powerComponent;
public final @ProcessState int processState;
+ public final @ScreenState int screenState;
+ public final @PowerState int powerState;
- public Dimensions(int powerComponent, int processState) {
+ public Dimensions(@PowerComponent int powerComponent, @ProcessState int processState) {
+ this(powerComponent, processState, SCREEN_STATE_UNSPECIFIED, POWER_STATE_UNSPECIFIED);
+ }
+
+ public Dimensions(@PowerComponent int powerComponent, int processState,
+ @ScreenState int screenState, @PowerState int powerState) {
this.powerComponent = powerComponent;
this.processState = processState;
+ this.screenState = screenState;
+ this.powerState = powerState;
}
@Override
@@ -234,6 +314,20 @@ public abstract class BatteryConsumer {
sb.append("processState=").append(sProcessStateNames[processState]);
dimensionSpecified = true;
}
+ if (screenState != SCREEN_STATE_ANY) {
+ if (dimensionSpecified) {
+ sb.append(", ");
+ }
+ sb.append("screenState=").append(screenStateToString(screenState));
+ dimensionSpecified = true;
+ }
+ if (powerState != POWER_STATE_ANY) {
+ if (dimensionSpecified) {
+ sb.append(", ");
+ }
+ sb.append("powerState=").append(powerStateToString(powerState));
+ dimensionSpecified = true;
+ }
if (!dimensionSpecified) {
sb.append("any components and process states");
}
@@ -242,7 +336,8 @@ public abstract class BatteryConsumer {
}
public static final Dimensions UNSPECIFIED_DIMENSIONS =
- new Dimensions(POWER_COMPONENT_ANY, PROCESS_STATE_ANY);
+ new Dimensions(POWER_COMPONENT_ANY, PROCESS_STATE_ANY, SCREEN_STATE_ANY,
+ POWER_STATE_ANY);
/**
* Identifies power attribution dimensions that are captured by a data element of
@@ -258,52 +353,93 @@ public abstract class BatteryConsumer {
public static final class Key {
public final @PowerComponent int powerComponent;
public final @ProcessState int processState;
+ public final @ScreenState int screenState;
+ public final @PowerState int powerState;
final int mPowerModelColumnIndex;
final int mPowerColumnIndex;
final int mDurationColumnIndex;
- private String mShortString;
- private Key(int powerComponent, int processState, int powerModelColumnIndex,
+ private Key(@PowerComponent int powerComponent, @ProcessState int processState,
+ @ScreenState int screenState, @PowerState int powerState, int powerModelColumnIndex,
int powerColumnIndex, int durationColumnIndex) {
this.powerComponent = powerComponent;
this.processState = processState;
+ this.screenState = screenState;
+ this.powerState = powerState;
mPowerModelColumnIndex = powerModelColumnIndex;
mPowerColumnIndex = powerColumnIndex;
mDurationColumnIndex = durationColumnIndex;
}
+ /**
+ * Returns true if this key should be included in an enumeration parameterized with
+ * the supplied dimensions.
+ */
+ boolean matches(@PowerComponent int powerComponent, @ProcessState int processState,
+ @ScreenState int screenState, @PowerState int powerState) {
+ if (powerComponent != POWER_COMPONENT_ANY && this.powerComponent != powerComponent) {
+ return false;
+ }
+ if (processState != PROCESS_STATE_ANY && this.processState != processState) {
+ return false;
+ }
+ if (screenState != SCREEN_STATE_ANY && this.screenState != screenState) {
+ return false;
+ }
+ if (powerState != POWER_STATE_ANY && this.powerState != powerState) {
+ return false;
+ }
+ return true;
+ }
+
@SuppressWarnings("EqualsUnsafeCast")
@Override
public boolean equals(Object o) {
// Skipping null and class check for performance
final Key key = (Key) o;
return powerComponent == key.powerComponent
- && processState == key.processState;
+ && processState == key.processState
+ && screenState == key.screenState
+ && powerState == key.powerState;
}
@Override
public int hashCode() {
int result = powerComponent;
result = 31 * result + processState;
+ result = 31 * result + screenState;
+ result = 31 * result + powerState;
return result;
}
/**
* Returns a string suitable for use in dumpsys.
*/
- public String toShortString() {
- if (mShortString == null) {
- StringBuilder sb = new StringBuilder();
- sb.append(powerComponentIdToString(powerComponent));
- if (processState != PROCESS_STATE_UNSPECIFIED) {
- sb.append(':');
- sb.append(processStateToString(processState));
- }
- mShortString = sb.toString();
+ public static String toString(@PowerComponent int powerComponent,
+ @ProcessState int processState, @ScreenState int screenState,
+ @PowerState int powerState) {
+ StringBuilder sb = new StringBuilder();
+ sb.append(powerComponentIdToString(powerComponent));
+ if (processState != PROCESS_STATE_UNSPECIFIED) {
+ sb.append(':');
+ sb.append(processStateToString(processState));
+ }
+ if (screenState != SCREEN_STATE_UNSPECIFIED) {
+ sb.append(":scr-");
+ sb.append(sScreenStateNames[screenState]);
+ }
+ if (powerState != POWER_STATE_UNSPECIFIED) {
+ sb.append(":pwr-");
+ sb.append(sPowerStateNames[powerState]);
}
- return mShortString;
+ return sb.toString();
+ }
+
+ @Override
+ public String toString() {
+ return toString(powerComponent, processState, screenState, powerState);
}
}
@@ -335,11 +471,18 @@ public abstract class BatteryConsumer {
}
/**
+ * Returns the amount of usage time aggregated over the specified dimensions, in millis.
+ */
+ public long getUsageDurationMillis(@NonNull Dimensions dimensions) {
+ return mPowerComponents.getUsageDurationMillis(dimensions);
+ }
+
+ /**
* Returns keys for various power values attributed to the specified component
* held by this BatteryUsageStats object.
*/
public Key[] getKeys(@PowerComponent int componentId) {
- return mData.getKeys(componentId);
+ return mData.layout.getKeys(componentId);
}
/**
@@ -347,14 +490,16 @@ public abstract class BatteryConsumer {
* for all values of other dimensions such as process state.
*/
public Key getKey(@PowerComponent int componentId) {
- return mData.getKey(componentId, PROCESS_STATE_UNSPECIFIED);
+ return mData.layout.getKey(componentId, PROCESS_STATE_UNSPECIFIED, SCREEN_STATE_UNSPECIFIED,
+ POWER_STATE_UNSPECIFIED);
}
/**
* Returns the key for the power attributed to the specified component and process state.
*/
public Key getKey(@PowerComponent int componentId, @ProcessState int processState) {
- return mData.getKey(componentId, processState);
+ return mData.layout.getKey(componentId, processState, SCREEN_STATE_UNSPECIFIED,
+ POWER_STATE_UNSPECIFIED);
}
/**
@@ -365,8 +510,8 @@ public abstract class BatteryConsumer {
* @return Amount of consumed power in mAh.
*/
public double getConsumedPower(@PowerComponent int componentId) {
- return mPowerComponents.getConsumedPower(
- mData.getKeyOrThrow(componentId, PROCESS_STATE_UNSPECIFIED));
+ return mPowerComponents.getConsumedPower(componentId, PROCESS_STATE_UNSPECIFIED,
+ SCREEN_STATE_UNSPECIFIED, POWER_STATE_UNSPECIFIED);
}
/**
@@ -388,7 +533,8 @@ public abstract class BatteryConsumer {
*/
public @PowerModel int getPowerModel(@BatteryConsumer.PowerComponent int componentId) {
return mPowerComponents.getPowerModel(
- mData.getKeyOrThrow(componentId, PROCESS_STATE_UNSPECIFIED));
+ mData.layout.getKeyOrThrow(componentId, PROCESS_STATE_UNSPECIFIED,
+ SCREEN_STATE_UNSPECIFIED, POWER_STATE_UNSPECIFIED));
}
/**
@@ -507,6 +653,20 @@ public abstract class BatteryConsumer {
}
/**
+ * Returns the human-readable name of the specified power state (on battery or not)
+ */
+ public static String powerStateToString(@PowerState int powerState) {
+ return sPowerStateNames[powerState];
+ }
+
+ /**
+ * Returns the human-readable name of the specified screen state (on or off/doze)
+ */
+ public static String screenStateToString(@ScreenState int screenState) {
+ return sScreenStateNames[screenState];
+ }
+
+ /**
* Prints the stats in a human-readable format.
*/
public void dump(PrintWriter pw) {
@@ -591,42 +751,11 @@ public abstract class BatteryConsumer {
return new BatteryConsumerData(cursorWindow, cursorRow, layout);
}
- public Key[] getKeys(int componentId) {
- return layout.keys[componentId];
- }
-
- Key getKeyOrThrow(int componentId, int processState) {
- Key key = getKey(componentId, processState);
- if (key == null) {
- if (processState == PROCESS_STATE_ANY) {
- throw new IllegalArgumentException(
- "Unsupported power component ID: " + componentId);
- } else {
- throw new IllegalArgumentException(
- "Unsupported power component ID: " + componentId
- + " process state: " + processState);
- }
- }
- return key;
- }
-
- Key getKey(int componentId, int processState) {
- if (componentId >= POWER_COMPONENT_COUNT) {
- return null;
- }
-
- if (processState == PROCESS_STATE_ANY) {
- // The 0-th key for each component corresponds to the roll-up,
- // across all dimensions. We might as well skip the iteration over the array.
- return layout.keys[componentId][0];
- } else {
- for (Key key : layout.keys[componentId]) {
- if (key.processState == processState) {
- return key;
- }
- }
+ boolean hasValue(int columnIndex) {
+ if (mCursorRow == -1) {
+ return false;
}
- return null;
+ return mCursorWindow.getType(mCursorRow, columnIndex) != Cursor.FIELD_TYPE_NULL;
}
void putInt(int columnIndex, int value) {
@@ -693,113 +822,158 @@ public abstract class BatteryConsumer {
public final int customPowerComponentCount;
public final boolean powerModelsIncluded;
public final boolean processStateDataIncluded;
- public final Key[][] keys;
+ public final boolean screenStateDataIncluded;
+ public final boolean powerStateDataIncluded;
+ public final Key[] keys;
+ public final SparseArray<Key> indexedKeys;
public final int totalConsumedPowerColumnIndex;
public final int firstCustomConsumedPowerColumn;
public final int firstCustomUsageDurationColumn;
public final int columnCount;
- public final Key[][] processStateKeys;
+ private Key[][] mPerComponentKeys;
private BatteryConsumerDataLayout(int firstColumn, String[] customPowerComponentNames,
- boolean powerModelsIncluded, boolean includeProcessStateData) {
+ boolean powerModelsIncluded, boolean includeProcessStateData,
+ boolean includeScreenState, boolean includePowerState) {
this.customPowerComponentNames = customPowerComponentNames;
this.customPowerComponentCount = customPowerComponentNames.length;
this.powerModelsIncluded = powerModelsIncluded;
this.processStateDataIncluded = includeProcessStateData;
+ this.screenStateDataIncluded = includeScreenState;
+ this.powerStateDataIncluded = includePowerState;
int columnIndex = firstColumn;
totalConsumedPowerColumnIndex = columnIndex++;
- keys = new Key[POWER_COMPONENT_COUNT][];
+ ArrayList<Key> keyList = new ArrayList<>();
+ for (int screenState = 0; screenState < SCREEN_STATE_COUNT; screenState++) {
+ if (!includeScreenState && screenState != SCREEN_STATE_UNSPECIFIED) {
+ continue;
+ }
+ for (int powerState = 0; powerState < POWER_STATE_COUNT; powerState++) {
+ if (!includePowerState && powerState != POWER_STATE_UNSPECIFIED) {
+ continue;
+ }
+ for (int componentId = 0; componentId < POWER_COMPONENT_COUNT; componentId++) {
+ columnIndex = addKeys(keyList, powerModelsIncluded, includeProcessStateData,
+ componentId, screenState, powerState, columnIndex);
+ }
+ }
+ }
+
+ firstCustomConsumedPowerColumn = columnIndex;
+ columnIndex += customPowerComponentCount;
+
+ firstCustomUsageDurationColumn = columnIndex;
+ columnIndex += customPowerComponentCount;
+
+ columnCount = columnIndex;
- ArrayList<Key> perComponentKeys = new ArrayList<>();
- for (int componentId = 0; componentId < POWER_COMPONENT_COUNT; componentId++) {
- perComponentKeys.clear();
+ keys = keyList.toArray(KEY_ARRAY);
+ indexedKeys = new SparseArray<>(keys.length);
+ for (int i = 0; i < keys.length; i++) {
+ Key key = keys[i];
+ int index = keyIndex(key.powerComponent, key.processState, key.screenState,
+ key.powerState);
+ indexedKeys.put(index, key);
+ }
+ }
- // Declare the Key for the power component, ignoring other dimensions.
- perComponentKeys.add(
- new Key(componentId, PROCESS_STATE_ANY,
+ private int addKeys(List<Key> keys, boolean powerModelsIncluded,
+ boolean includeProcessStateData, int componentId,
+ int screenState, int powerState, int columnIndex) {
+ keys.add(new Key(componentId, PROCESS_STATE_ANY, screenState, powerState,
+ powerModelsIncluded
+ ? columnIndex++
+ : POWER_MODEL_NOT_INCLUDED, // power model
+ columnIndex++, // power
+ columnIndex++ // usage duration
+ ));
+
+ // Declare Keys for all process states, if needed
+ if (includeProcessStateData) {
+ boolean isSupported = SUPPORTED_POWER_COMPONENTS_PER_PROCESS_STATE
+ .binarySearch(componentId) >= 0;
+ if (isSupported) {
+ for (int processState = 0; processState < PROCESS_STATE_COUNT;
+ processState++) {
+ if (processState == PROCESS_STATE_UNSPECIFIED) {
+ continue;
+ }
+
+ keys.add(new Key(componentId, processState, screenState, powerState,
powerModelsIncluded
? columnIndex++
- : POWER_MODEL_NOT_INCLUDED, // power model
+ : POWER_MODEL_NOT_INCLUDED, // power model
columnIndex++, // power
columnIndex++ // usage duration
));
-
- // Declare Keys for all process states, if needed
- if (includeProcessStateData) {
- boolean isSupported = false;
- for (int id : SUPPORTED_POWER_COMPONENTS_PER_PROCESS_STATE) {
- if (id == componentId) {
- isSupported = true;
- break;
- }
- }
- if (isSupported) {
- for (int processState = 0; processState < PROCESS_STATE_COUNT;
- processState++) {
- if (processState == PROCESS_STATE_UNSPECIFIED) {
- continue;
- }
-
- perComponentKeys.add(
- new Key(componentId, processState,
- powerModelsIncluded
- ? columnIndex++
- : POWER_MODEL_NOT_INCLUDED, // power model
- columnIndex++, // power
- columnIndex++ // usage duration
- ));
- }
}
}
-
- keys[componentId] = perComponentKeys.toArray(KEY_ARRAY);
}
+ return columnIndex;
+ }
- if (includeProcessStateData) {
- processStateKeys = new Key[BatteryConsumer.PROCESS_STATE_COUNT][];
- ArrayList<Key> perProcStateKeys = new ArrayList<>();
- for (int processState = 0; processState < PROCESS_STATE_COUNT; processState++) {
- if (processState == PROCESS_STATE_UNSPECIFIED) {
- continue;
- }
+ Key getKey(@PowerComponent int componentId, @ProcessState int processState,
+ @ScreenState int screenState, @PowerState int powerState) {
+ return indexedKeys.get(keyIndex(componentId, processState, screenState, powerState));
+ }
- perProcStateKeys.clear();
- for (int i = 0; i < keys.length; i++) {
- for (int j = 0; j < keys[i].length; j++) {
- if (keys[i][j].processState == processState) {
- perProcStateKeys.add(keys[i][j]);
- }
+ Key getKeyOrThrow(@PowerComponent int componentId, @ProcessState int processState,
+ @ScreenState int screenState, @PowerState int powerState) {
+ Key key = getKey(componentId, processState, screenState, powerState);
+ if (key == null) {
+ throw new IllegalArgumentException(
+ "Unsupported power component ID: " + Key.toString(componentId, processState,
+ screenState, powerState));
+ }
+ return key;
+ }
+
+ public Key[] getKeys(@PowerComponent int componentId) {
+ synchronized (this) {
+ if (mPerComponentKeys == null) {
+ mPerComponentKeys = new Key[BatteryConsumer.POWER_COMPONENT_COUNT][];
+ }
+ Key[] componentKeys = mPerComponentKeys[componentId];
+ if (componentKeys == null) {
+ ArrayList<Key> out = new ArrayList<>();
+ for (Key key : keys) {
+ if (key.powerComponent == componentId) {
+ out.add(key);
}
}
- processStateKeys[processState] = perProcStateKeys.toArray(KEY_ARRAY);
+ componentKeys = out.toArray(new Key[out.size()]);
+ mPerComponentKeys[componentId] = componentKeys;
}
- } else {
- processStateKeys = null;
+ return componentKeys;
}
+ }
- firstCustomConsumedPowerColumn = columnIndex;
- columnIndex += customPowerComponentCount;
-
- firstCustomUsageDurationColumn = columnIndex;
- columnIndex += customPowerComponentCount;
-
- columnCount = columnIndex;
+ private int keyIndex(@PowerComponent int componentId, @ProcessState int processState,
+ @ScreenState int screenState, @PowerState int powerState) {
+ // [CCCCCCPPPSSBB]
+ // C - component ID
+ // P - process state
+ // S - screen state
+ // B - power state
+ return componentId << 7 | processState << 4 | screenState << 2 | powerState;
}
}
static BatteryConsumerDataLayout createBatteryConsumerDataLayout(
String[] customPowerComponentNames, boolean includePowerModels,
- boolean includeProcessStateData) {
+ boolean includeProcessStateData, boolean includeScreenStateData,
+ boolean includePowerStateData) {
int columnCount = BatteryConsumer.COLUMN_COUNT;
columnCount = Math.max(columnCount, AggregateBatteryConsumer.COLUMN_COUNT);
columnCount = Math.max(columnCount, UidBatteryConsumer.COLUMN_COUNT);
columnCount = Math.max(columnCount, UserBatteryConsumer.COLUMN_COUNT);
return new BatteryConsumerDataLayout(columnCount, customPowerComponentNames,
- includePowerModels, includeProcessStateData);
+ includePowerModels, includeProcessStateData, includeScreenStateData,
+ includePowerStateData);
}
protected abstract static class BaseBuilder<T extends BaseBuilder<?>> {
@@ -816,12 +990,19 @@ public abstract class BatteryConsumer {
@Nullable
public Key[] getKeys(@PowerComponent int componentId) {
- return mData.getKeys(componentId);
+ return mData.layout.getKeys(componentId);
}
@Nullable
public Key getKey(@PowerComponent int componentId, @ProcessState int processState) {
- return mData.getKey(componentId, processState);
+ return mData.layout.getKey(componentId, processState, SCREEN_STATE_UNSPECIFIED,
+ POWER_STATE_UNSPECIFIED);
+ }
+
+ @Nullable
+ public Key getKey(@PowerComponent int componentId, @ProcessState int processState,
+ @ScreenState int screenState, @PowerState int powerState) {
+ return mData.layout.getKey(componentId, processState, screenState, powerState);
}
/**
diff --git a/core/java/android/os/BatteryUsageStats.java b/core/java/android/os/BatteryUsageStats.java
index 61cc23d994f3..dd484f6bace5 100644
--- a/core/java/android/os/BatteryUsageStats.java
+++ b/core/java/android/os/BatteryUsageStats.java
@@ -102,9 +102,13 @@ public final class BatteryUsageStats implements Parcelable, Closeable {
static final String XML_ATTR_SCOPE = "scope";
static final String XML_ATTR_PREFIX_CUSTOM_COMPONENT = "custom_component_";
static final String XML_ATTR_PREFIX_INCLUDES_PROC_STATE_DATA = "includes_proc_state_data";
+ static final String XML_ATTR_PREFIX_INCLUDES_SCREEN_STATE_DATA = "includes_screen_state_data";
+ static final String XML_ATTR_PREFIX_INCLUDES_POWER_STATE_DATA = "includes_power_state_data";
static final String XML_ATTR_START_TIMESTAMP = "start_timestamp";
static final String XML_ATTR_END_TIMESTAMP = "end_timestamp";
static final String XML_ATTR_PROCESS_STATE = "process_state";
+ static final String XML_ATTR_SCREEN_STATE = "screen_state";
+ static final String XML_ATTR_POWER_STATE = "power_state";
static final String XML_ATTR_POWER = "power";
static final String XML_ATTR_DURATION = "duration";
static final String XML_ATTR_MODEL = "model";
@@ -144,10 +148,13 @@ public final class BatteryUsageStats implements Parcelable, Closeable {
private final String[] mCustomPowerComponentNames;
private final boolean mIncludesPowerModels;
private final boolean mIncludesProcessStateData;
+ private final boolean mIncludesScreenStateData;
+ private final boolean mIncludesPowerStateData;
private final List<UidBatteryConsumer> mUidBatteryConsumers;
private final List<UserBatteryConsumer> mUserBatteryConsumers;
private final AggregateBatteryConsumer[] mAggregateBatteryConsumers;
private final BatteryStatsHistory mBatteryStatsHistory;
+ private BatteryConsumer.BatteryConsumerDataLayout mBatteryConsumerDataLayout;
private CursorWindow mBatteryConsumersCursorWindow;
private BatteryUsageStats(@NonNull Builder builder) {
@@ -165,6 +172,9 @@ public final class BatteryUsageStats implements Parcelable, Closeable {
mCustomPowerComponentNames = builder.mCustomPowerComponentNames;
mIncludesPowerModels = builder.mIncludePowerModels;
mIncludesProcessStateData = builder.mIncludesProcessStateData;
+ mIncludesScreenStateData = builder.mIncludesScreenStateData;
+ mIncludesPowerStateData = builder.mIncludesPowerStateData;
+ mBatteryConsumerDataLayout = builder.mBatteryConsumerDataLayout;
mBatteryConsumersCursorWindow = builder.mBatteryConsumersCursorWindow;
double totalPowerMah = 0;
@@ -347,11 +357,13 @@ public final class BatteryUsageStats implements Parcelable, Closeable {
mCustomPowerComponentNames = source.readStringArray();
mIncludesPowerModels = source.readBoolean();
mIncludesProcessStateData = source.readBoolean();
+ mIncludesScreenStateData = source.readBoolean();
+ mIncludesPowerStateData = source.readBoolean();
mBatteryConsumersCursorWindow = CursorWindow.newFromParcel(source);
- BatteryConsumer.BatteryConsumerDataLayout dataLayout =
- BatteryConsumer.createBatteryConsumerDataLayout(mCustomPowerComponentNames,
- mIncludesPowerModels, mIncludesProcessStateData);
+ mBatteryConsumerDataLayout = BatteryConsumer.createBatteryConsumerDataLayout(
+ mCustomPowerComponentNames, mIncludesPowerModels, mIncludesProcessStateData,
+ mIncludesScreenStateData, mIncludesPowerStateData);
final int numRows = mBatteryConsumersCursorWindow.getNumRows();
@@ -363,7 +375,7 @@ public final class BatteryUsageStats implements Parcelable, Closeable {
for (int i = 0; i < numRows; i++) {
final BatteryConsumer.BatteryConsumerData data =
new BatteryConsumer.BatteryConsumerData(mBatteryConsumersCursorWindow, i,
- dataLayout);
+ mBatteryConsumerDataLayout);
int consumerType = mBatteryConsumersCursorWindow.getInt(i,
BatteryConsumer.COLUMN_INDEX_BATTERY_CONSUMER_TYPE);
@@ -405,6 +417,8 @@ public final class BatteryUsageStats implements Parcelable, Closeable {
dest.writeStringArray(mCustomPowerComponentNames);
dest.writeBoolean(mIncludesPowerModels);
dest.writeBoolean(mIncludesProcessStateData);
+ dest.writeBoolean(mIncludesScreenStateData);
+ dest.writeBoolean(mIncludesPowerStateData);
mBatteryConsumersCursorWindow.writeToParcel(dest, flags);
@@ -598,23 +612,16 @@ public final class BatteryUsageStats implements Parcelable, Closeable {
for (int componentId = 0; componentId < BatteryConsumer.POWER_COMPONENT_COUNT;
componentId++) {
- for (BatteryConsumer.Key key : deviceConsumer.getKeys(componentId)) {
- final double devicePowerMah = deviceConsumer.getConsumedPower(key);
- final double appsPowerMah = appsConsumer.getConsumedPower(key);
- if (devicePowerMah == 0 && appsPowerMah == 0) {
- continue;
- }
-
- String label = BatteryConsumer.powerComponentIdToString(componentId);
- if (key.processState != BatteryConsumer.PROCESS_STATE_UNSPECIFIED) {
- label = label
- + "(" + BatteryConsumer.processStateToString(key.processState) + ")";
- }
- printPowerComponent(pw, prefix, label, devicePowerMah, appsPowerMah,
- mIncludesPowerModels ? deviceConsumer.getPowerModel(key)
- : BatteryConsumer.POWER_MODEL_UNDEFINED,
- deviceConsumer.getUsageDurationMillis(key));
+ final double devicePowerMah = deviceConsumer.getConsumedPower(componentId);
+ final double appsPowerMah = appsConsumer.getConsumedPower(componentId);
+ if (devicePowerMah == 0 && appsPowerMah == 0) {
+ continue;
}
+
+ printPowerComponent(pw, prefix, BatteryConsumer.powerComponentIdToString(componentId),
+ devicePowerMah, appsPowerMah,
+ BatteryConsumer.POWER_MODEL_UNDEFINED,
+ deviceConsumer.getUsageDurationMillis(componentId));
}
for (int componentId = BatteryConsumer.FIRST_CUSTOM_POWER_COMPONENT_ID;
@@ -635,6 +642,59 @@ public final class BatteryUsageStats implements Parcelable, Closeable {
deviceConsumer.getUsageDurationForCustomComponentMillis(componentId));
}
+ if (mIncludesScreenStateData || mIncludesPowerStateData) {
+ String prefixPlus = prefix + " ";
+ StringBuilder stateLabel = new StringBuilder();
+ int screenState = BatteryConsumer.SCREEN_STATE_UNSPECIFIED;
+ int powerState = BatteryConsumer.POWER_STATE_UNSPECIFIED;
+ for (BatteryConsumer.Key key : mBatteryConsumerDataLayout.keys) {
+ if (key.processState != BatteryConsumer.PROCESS_STATE_UNSPECIFIED) {
+ continue;
+ }
+
+ if (key.screenState == BatteryConsumer.SCREEN_STATE_UNSPECIFIED
+ && key.powerState == BatteryConsumer.POWER_STATE_UNSPECIFIED) {
+ // Totals already printed earlier in this method
+ continue;
+ }
+
+ final double devicePowerMah = deviceConsumer.getConsumedPower(key);
+ final double appsPowerMah = appsConsumer.getConsumedPower(key);
+ if (devicePowerMah == 0 && appsPowerMah == 0) {
+ continue;
+ }
+
+ if (key.screenState != screenState || key.powerState != powerState) {
+ screenState = key.screenState;
+ powerState = key.powerState;
+
+ boolean empty = true;
+ stateLabel.setLength(0);
+ stateLabel.append(" (");
+ if (powerState != BatteryConsumer.POWER_STATE_UNSPECIFIED) {
+ stateLabel.append(BatteryConsumer.powerStateToString(powerState));
+ empty = false;
+ }
+ if (screenState != BatteryConsumer.SCREEN_STATE_UNSPECIFIED) {
+ if (!empty) {
+ stateLabel.append(", ");
+ }
+ stateLabel.append("screen ").append(
+ BatteryConsumer.screenStateToString(screenState));
+ empty = false;
+ }
+ if (!empty) {
+ stateLabel.append(")");
+ pw.println(stateLabel);
+ }
+ }
+ String label = BatteryConsumer.powerComponentIdToString(key.powerComponent);
+ printPowerComponent(pw, prefixPlus, label, devicePowerMah, appsPowerMah,
+ mIncludesPowerModels ? deviceConsumer.getPowerModel(key)
+ : BatteryConsumer.POWER_MODEL_UNDEFINED,
+ deviceConsumer.getUsageDurationMillis(key));
+ }
+ }
dumpSortedBatteryConsumers(pw, prefix, getUidBatteryConsumers());
dumpSortedBatteryConsumers(pw, prefix, getUserBatteryConsumers());
pw.println();
@@ -643,7 +703,7 @@ public final class BatteryUsageStats implements Parcelable, Closeable {
private void printPowerComponent(PrintWriter pw, String prefix, String label,
double devicePowerMah, double appsPowerMah, int powerModel, long durationMs) {
StringBuilder sb = new StringBuilder();
- sb.append(prefix).append(" ").append(label).append(": ")
+ sb.append(prefix).append(" ").append(label).append(": ")
.append(BatteryStats.formatCharge(devicePowerMah));
if (powerModel != BatteryConsumer.POWER_MODEL_UNDEFINED
&& powerModel != BatteryConsumer.POWER_MODEL_POWER_PROFILE) {
@@ -657,7 +717,7 @@ public final class BatteryUsageStats implements Parcelable, Closeable {
BatteryStats.formatTimeMs(sb, durationMs);
}
- pw.println(sb.toString());
+ pw.println(sb);
}
private void dumpSortedBatteryConsumers(PrintWriter pw, String prefix,
@@ -670,9 +730,8 @@ public final class BatteryUsageStats implements Parcelable, Closeable {
continue;
}
pw.print(prefix);
- pw.print(" ");
+ pw.print(" ");
consumer.dump(pw);
- pw.println();
}
}
@@ -686,6 +745,10 @@ public final class BatteryUsageStats implements Parcelable, Closeable {
}
serializer.attributeBoolean(null, XML_ATTR_PREFIX_INCLUDES_PROC_STATE_DATA,
mIncludesProcessStateData);
+ serializer.attributeBoolean(null, XML_ATTR_PREFIX_INCLUDES_SCREEN_STATE_DATA,
+ mIncludesScreenStateData);
+ serializer.attributeBoolean(null, XML_ATTR_PREFIX_INCLUDES_POWER_STATE_DATA,
+ mIncludesPowerStateData);
serializer.attributeLong(null, XML_ATTR_START_TIMESTAMP, mStatsStartTimestampMs);
serializer.attributeLong(null, XML_ATTR_END_TIMESTAMP, mStatsEndTimestampMs);
serializer.attributeLong(null, XML_ATTR_DURATION, mStatsDurationMs);
@@ -732,9 +795,13 @@ public final class BatteryUsageStats implements Parcelable, Closeable {
final boolean includesProcStateData = parser.getAttributeBoolean(null,
XML_ATTR_PREFIX_INCLUDES_PROC_STATE_DATA, false);
+ final boolean includesScreenStateData = parser.getAttributeBoolean(null,
+ XML_ATTR_PREFIX_INCLUDES_SCREEN_STATE_DATA, false);
+ final boolean includesPowerStateData = parser.getAttributeBoolean(null,
+ XML_ATTR_PREFIX_INCLUDES_POWER_STATE_DATA, false);
builder = new Builder(customComponentNames.toArray(new String[0]), true,
- includesProcStateData, 0);
+ includesProcStateData, includesScreenStateData, includesPowerStateData, 0);
builder.setStatsStartTimestamp(
parser.getAttributeLong(null, XML_ATTR_START_TIMESTAMP));
@@ -818,6 +885,8 @@ public final class BatteryUsageStats implements Parcelable, Closeable {
private final String[] mCustomPowerComponentNames;
private final boolean mIncludePowerModels;
private final boolean mIncludesProcessStateData;
+ private final boolean mIncludesScreenStateData;
+ private final boolean mIncludesPowerStateData;
private final double mMinConsumedPowerThreshold;
private final BatteryConsumer.BatteryConsumerDataLayout mBatteryConsumerDataLayout;
private long mStatsStartTimestampMs;
@@ -839,21 +908,24 @@ public final class BatteryUsageStats implements Parcelable, Closeable {
private BatteryStatsHistory mBatteryStatsHistory;
public Builder(@NonNull String[] customPowerComponentNames) {
- this(customPowerComponentNames, false, false, 0);
+ this(customPowerComponentNames, false, false, false, false, 0);
}
public Builder(@NonNull String[] customPowerComponentNames, boolean includePowerModels,
- boolean includeProcessStateData, double minConsumedPowerThreshold) {
+ boolean includeProcessStateData, boolean includeScreenStateData,
+ boolean includesPowerStateData, double minConsumedPowerThreshold) {
mBatteryConsumersCursorWindow =
new CursorWindow(null, BATTERY_CONSUMER_CURSOR_WINDOW_SIZE);
- mBatteryConsumerDataLayout =
- BatteryConsumer.createBatteryConsumerDataLayout(customPowerComponentNames,
- includePowerModels, includeProcessStateData);
+ mBatteryConsumerDataLayout = BatteryConsumer.createBatteryConsumerDataLayout(
+ customPowerComponentNames, includePowerModels, includeProcessStateData,
+ includeScreenStateData, includesPowerStateData);
mBatteryConsumersCursorWindow.setNumColumns(mBatteryConsumerDataLayout.columnCount);
mCustomPowerComponentNames = customPowerComponentNames;
mIncludePowerModels = includePowerModels;
mIncludesProcessStateData = includeProcessStateData;
+ mIncludesScreenStateData = includeScreenStateData;
+ mIncludesPowerStateData = includesPowerStateData;
mMinConsumedPowerThreshold = minConsumedPowerThreshold;
for (int scope = 0; scope < AGGREGATE_BATTERY_CONSUMER_SCOPE_COUNT; scope++) {
final BatteryConsumer.BatteryConsumerData data =
@@ -869,6 +941,14 @@ public final class BatteryUsageStats implements Parcelable, Closeable {
return mIncludesProcessStateData;
}
+ public boolean isScreenStateDataNeeded() {
+ return mIncludesScreenStateData;
+ }
+
+ public boolean isPowerStateDataNeeded() {
+ return mIncludesPowerStateData;
+ }
+
/**
* Returns true if this Builder is configured to hold data for the specified
* custom power component ID.
diff --git a/core/java/android/os/BatteryUsageStatsQuery.java b/core/java/android/os/BatteryUsageStatsQuery.java
index 203ef47d857e..d0ed297d2bda 100644
--- a/core/java/android/os/BatteryUsageStatsQuery.java
+++ b/core/java/android/os/BatteryUsageStatsQuery.java
@@ -73,6 +73,10 @@ public final class BatteryUsageStatsQuery implements Parcelable {
public static final int FLAG_BATTERY_USAGE_STATS_INCLUDE_VIRTUAL_UIDS = 0x0010;
+ public static final int FLAG_BATTERY_USAGE_STATS_INCLUDE_SCREEN_STATE = 0x0020;
+
+ public static final int FLAG_BATTERY_USAGE_STATS_INCLUDE_POWER_STATE = 0x0040;
+
private static final long DEFAULT_MAX_STATS_AGE_MS = 5 * 60 * 1000;
private final int mFlags;
@@ -123,6 +127,14 @@ public final class BatteryUsageStatsQuery implements Parcelable {
return (mFlags & FLAG_BATTERY_USAGE_STATS_INCLUDE_PROCESS_STATE_DATA) != 0;
}
+ public boolean isScreenStateDataNeeded() {
+ return (mFlags & FLAG_BATTERY_USAGE_STATS_INCLUDE_SCREEN_STATE) != 0;
+ }
+
+ public boolean isPowerStateDataNeeded() {
+ return (mFlags & FLAG_BATTERY_USAGE_STATS_INCLUDE_POWER_STATE) != 0;
+ }
+
/**
* Returns the power components that should be estimated or null if all power components
* are being requested.
@@ -297,6 +309,24 @@ public final class BatteryUsageStatsQuery implements Parcelable {
}
/**
+ * Requests that screen state data (screen-on, screen-other) be included in the
+ * BatteryUsageStats, if available.
+ */
+ public Builder includeScreenStateData() {
+ mFlags |= BatteryUsageStatsQuery.FLAG_BATTERY_USAGE_STATS_INCLUDE_SCREEN_STATE;
+ return this;
+ }
+
+ /**
+ * Requests that power state data (on-battery, power-other) be included in the
+ * BatteryUsageStats, if available.
+ */
+ public Builder includePowerStateData() {
+ mFlags |= BatteryUsageStatsQuery.FLAG_BATTERY_USAGE_STATS_INCLUDE_POWER_STATE;
+ return this;
+ }
+
+ /**
* Requests to aggregate stored snapshots between the two supplied timestamps
* @param fromTimestamp Exclusive starting timestamp, as per System.currentTimeMillis()
* @param toTimestamp Inclusive ending timestamp, as per System.currentTimeMillis()
diff --git a/core/java/android/os/IBinder.java b/core/java/android/os/IBinder.java
index c9f207cf26e8..50242bad191b 100644
--- a/core/java/android/os/IBinder.java
+++ b/core/java/android/os/IBinder.java
@@ -29,7 +29,7 @@ import java.io.FileDescriptor;
* interface describes the abstract protocol for interacting with a
* remotable object. Do not implement this interface directly, instead
* extend from {@link Binder}.
- *
+ *
* <p>The key IBinder API is {@link #transact transact()} matched by
* {@link Binder#onTransact Binder.onTransact()}. These
* methods allow you to send a call to an IBinder object and receive a
@@ -40,7 +40,7 @@ import java.io.FileDescriptor;
* expected behavior when calling an object that exists in the local
* process, and the underlying inter-process communication (IPC) mechanism
* ensures that these same semantics apply when going across processes.
- *
+ *
* <p>The data sent through transact() is a {@link Parcel}, a generic buffer
* of data that also maintains some meta-data about its contents. The meta
* data is used to manage IBinder object references in the buffer, so that those
@@ -51,7 +51,7 @@ import java.io.FileDescriptor;
* same IBinder object back. These semantics allow IBinder/Binder objects to
* be used as a unique identity (to serve as a token or for other purposes)
* that can be managed across processes.
- *
+ *
* <p>The system maintains a pool of transaction threads in each process that
* it runs in. These threads are used to dispatch all
* IPCs coming in from other processes. For example, when an IPC is made from
@@ -62,7 +62,7 @@ import java.io.FileDescriptor;
* thread in process A returns to allow its execution to continue. In effect,
* other processes appear to use as additional threads that you did not create
* executing in your own process.
- *
+ *
* <p>The Binder system also supports recursion across processes. For example
* if process A performs a transaction to process B, and process B while
* handling that transaction calls transact() on an IBinder that is implemented
@@ -70,7 +70,7 @@ import java.io.FileDescriptor;
* transaction to finish will take care of calling Binder.onTransact() on the
* object being called by B. This ensures that the recursion semantics when
* calling remote binder object are the same as when calling local objects.
- *
+ *
* <p>When working with remote objects, you often want to find out when they
* are no longer valid. There are three ways this can be determined:
* <ul>
@@ -83,7 +83,7 @@ import java.io.FileDescriptor;
* a {@link DeathRecipient} with the IBinder, which will be called when its
* containing process goes away.
* </ul>
- *
+ *
* @see Binder
*/
public interface IBinder {
@@ -95,17 +95,17 @@ public interface IBinder {
* The last transaction code available for user commands.
*/
int LAST_CALL_TRANSACTION = 0x00ffffff;
-
+
/**
* IBinder protocol transaction code: pingBinder().
*/
int PING_TRANSACTION = ('_'<<24)|('P'<<16)|('N'<<8)|'G';
-
+
/**
* IBinder protocol transaction code: dump internal state.
*/
int DUMP_TRANSACTION = ('_'<<24)|('D'<<16)|('M'<<8)|'P';
-
+
/**
* IBinder protocol transaction code: execute a shell command.
* @hide
@@ -129,7 +129,7 @@ public interface IBinder {
* across the platform. To support older code, the default implementation
* logs the tweet to the main log as a simple emulation of broadcasting
* it publicly over the Internet.
- *
+ *
* <p>Also, upon completing the dispatch, the object must make a cup
* of tea, return it to the caller, and exclaim "jolly good message
* old boy!".
@@ -142,7 +142,7 @@ public interface IBinder {
* its own like counter, and may display this value to the user to indicate the
* quality of the app. This is an optional command that applications do not
* need to handle, so the default implementation is to do nothing.
- *
+ *
* <p>There is no response returned and nothing about the
* system will be functionally affected by it, but it will improve the
* app's self-esteem.
@@ -185,7 +185,8 @@ public interface IBinder {
/**
* Limit that should be placed on IPC sizes to keep them safely under the
- * transaction buffer limit.
+ * transaction buffer limit. This is a recommendation, and is not the real
+ * limit. Transactions should be preferred to be even smaller than this.
* @hide
*/
public static final int MAX_IPC_SIZE = 64 * 1024;
@@ -206,7 +207,7 @@ public interface IBinder {
/**
* Check to see if the object still exists.
- *
+ *
* @return Returns false if the
* hosting process is gone, otherwise the result (always by default
* true) returned by the pingBinder() implementation on the other
@@ -221,7 +222,7 @@ public interface IBinder {
* true, the process may have died while the call is returning.
*/
public boolean isBinderAlive();
-
+
/**
* Attempt to retrieve a local implementation of an interface
* for this Binder object. If null is returned, you will need
@@ -232,7 +233,7 @@ public interface IBinder {
/**
* Print the object's state into the given stream.
- *
+ *
* @param fd The raw file descriptor that the dump is being sent to.
* @param args additional arguments to the dump request.
*/
@@ -280,7 +281,7 @@ public interface IBinder {
/**
* Perform a generic operation with the object.
- *
+ *
* @param code The action to perform. This should
* be a number between {@link #FIRST_CALL_TRANSACTION} and
* {@link #LAST_CALL_TRANSACTION}.
@@ -360,13 +361,13 @@ public interface IBinder {
* Remove a previously registered death notification.
* The recipient will no longer be called if this object
* dies.
- *
+ *
* @return {@code true} if the <var>recipient</var> is successfully
* unlinked, assuring you that its
* {@link DeathRecipient#binderDied DeathRecipient.binderDied()} method
* will not be called; {@code false} if the target IBinder has already
* died, meaning the method has been (or soon will be) called.
- *
+ *
* @throws java.util.NoSuchElementException if the given
* <var>recipient</var> has not been registered with the IBinder, and
* the IBinder is still alive. Note that if the <var>recipient</var>
diff --git a/core/java/android/os/INetworkManagementService.aidl b/core/java/android/os/INetworkManagementService.aidl
index a49ee7d00751..0c34c6fea1d0 100644
--- a/core/java/android/os/INetworkManagementService.aidl
+++ b/core/java/android/os/INetworkManagementService.aidl
@@ -110,92 +110,6 @@ interface INetworkManagementService
void shutdown();
/**
- ** TETHERING RELATED
- **/
-
- /**
- * Returns true if IP forwarding is enabled
- */
- @UnsupportedAppUsage(maxTargetSdk = 34, trackingBug = 170729553,
- publicAlternatives = "Use {@code android.net.INetd#ipfwdEnabled}")
- boolean getIpForwardingEnabled();
-
- /**
- * Enables/Disables IP Forwarding
- */
- @UnsupportedAppUsage(maxTargetSdk = 34, trackingBug = 170729553,
- publicAlternatives = "Avoid using this directly. Instead, enable tethering with "
- + "{@code android.net.TetheringManager#startTethering}. See also "
- + "{@code INetd#ipfwdEnableForwarding(String)}.")
- void setIpForwardingEnabled(boolean enabled);
-
- /**
- * Start tethering services with the specified dhcp server range
- * arg is a set of start end pairs defining the ranges.
- */
- @UnsupportedAppUsage(maxTargetSdk = 34, trackingBug = 170729553,
- publicAlternatives = "{@code android.net.TetheringManager#startTethering}")
- void startTethering(in String[] dhcpRanges);
-
- /**
- * Stop currently running tethering services
- */
- @UnsupportedAppUsage(maxTargetSdk = 34, trackingBug = 170729553,
- publicAlternatives = "{@code android.net.TetheringManager#stopTethering(int)}")
- void stopTethering();
-
- /**
- * Returns true if tethering services are started
- */
- @UnsupportedAppUsage(maxTargetSdk = 34, trackingBug = 170729553,
- publicAlternatives = "Generally track your own tethering requests. "
- + "See also {@code android.net.INetd#tetherIsEnabled()}")
- boolean isTetheringStarted();
-
- /**
- * Tethers the specified interface
- */
- @UnsupportedAppUsage(maxTargetSdk = 34, trackingBug = 170729553,
- publicAlternatives = "Avoid using this directly. Instead, enable tethering with "
- + "{@code android.net.TetheringManager#startTethering}. See also "
- + "{@code com.android.net.module.util.NetdUtils#tetherInterface}.")
- void tetherInterface(String iface);
-
- /**
- * Untethers the specified interface
- */
- @UnsupportedAppUsage(maxTargetSdk = 34, trackingBug = 170729553,
- publicAlternatives = "Avoid using this directly. Instead, disable "
- + "tethering with {@code android.net.TetheringManager#stopTethering(int)}. "
- + "See also {@code NetdUtils#untetherInterface}.")
- void untetherInterface(String iface);
-
- /**
- * Returns a list of currently tethered interfaces
- */
- @UnsupportedAppUsage(maxTargetSdk = 34, trackingBug = 170729553,
- publicAlternatives = "{@code android.net.TetheringManager#getTetheredIfaces()}")
- String[] listTetheredInterfaces();
-
- /**
- * Enables Network Address Translation between two interfaces.
- * The address and netmask of the external interface is used for
- * the NAT'ed network.
- */
- @UnsupportedAppUsage(maxTargetSdk = 34, trackingBug = 170729553,
- publicAlternatives = "Avoid using this directly. Instead, enable tethering with "
- + "{@code android.net.TetheringManager#startTethering}.")
- void enableNat(String internalInterface, String externalInterface);
-
- /**
- * Disables Network Address Translation between two interfaces.
- */
- @UnsupportedAppUsage(maxTargetSdk = 34, trackingBug = 170729553,
- publicAlternatives = "Avoid using this directly. Instead, disable tethering with "
- + "{@code android.net.TetheringManager#stopTethering(int)}.")
- void disableNat(String internalInterface, String externalInterface);
-
- /**
** DATA USAGE RELATED
**/
diff --git a/core/java/android/os/IVibratorManagerService.aidl b/core/java/android/os/IVibratorManagerService.aidl
index 8b1577cb4b1c..97993b609fda 100644
--- a/core/java/android/os/IVibratorManagerService.aidl
+++ b/core/java/android/os/IVibratorManagerService.aidl
@@ -41,5 +41,5 @@ interface IVibratorManagerService {
// There is no order guarantee with respect to the two-way APIs above like
// vibrate/isVibrating/cancel.
oneway void performHapticFeedback(int uid, int deviceId, String opPkg, int constant,
- boolean always, String reason, boolean fromIme);
+ String reason, int flags, int privFlags);
}
diff --git a/core/java/android/os/PowerComponents.java b/core/java/android/os/PowerComponents.java
index b035f123d5db..f22e1eac9643 100644
--- a/core/java/android/os/PowerComponents.java
+++ b/core/java/android/os/PowerComponents.java
@@ -17,8 +17,12 @@ package android.os;
import static android.os.BatteryConsumer.BatteryConsumerDataLayout.POWER_MODEL_NOT_INCLUDED;
import static android.os.BatteryConsumer.POWER_COMPONENT_ANY;
+import static android.os.BatteryConsumer.POWER_STATE_ANY;
+import static android.os.BatteryConsumer.POWER_STATE_UNSPECIFIED;
import static android.os.BatteryConsumer.PROCESS_STATE_ANY;
import static android.os.BatteryConsumer.PROCESS_STATE_UNSPECIFIED;
+import static android.os.BatteryConsumer.SCREEN_STATE_ANY;
+import static android.os.BatteryConsumer.SCREEN_STATE_UNSPECIFIED;
import static android.os.BatteryConsumer.convertMahToDeciCoulombs;
import android.annotation.NonNull;
@@ -56,23 +60,100 @@ class PowerComponents {
* Total power consumed by this consumer, aggregated over the specified dimensions, in mAh.
*/
public double getConsumedPower(@NonNull BatteryConsumer.Dimensions dimensions) {
- if (dimensions.powerComponent != POWER_COMPONENT_ANY) {
- return mData.getDouble(mData.getKeyOrThrow(dimensions.powerComponent,
- dimensions.processState).mPowerColumnIndex);
- } else if (dimensions.processState != PROCESS_STATE_ANY) {
- if (!mData.layout.processStateDataIncluded) {
- throw new IllegalArgumentException(
- "No data included in BatteryUsageStats for " + dimensions);
+ return getConsumedPower(dimensions.powerComponent, dimensions.processState,
+ dimensions.screenState, dimensions.powerState);
+ }
+
+ /**
+ * Total power consumed by this consumer, aggregated over the specified dimensions, in mAh.
+ */
+ public double getConsumedPower(@BatteryConsumer.PowerComponent int powerComponent,
+ @BatteryConsumer.ProcessState int processState,
+ @BatteryConsumer.ScreenState int screenState,
+ @BatteryConsumer.PowerState int powerState) {
+ if (powerComponent == POWER_COMPONENT_ANY && processState == PROCESS_STATE_ANY
+ && screenState == SCREEN_STATE_ANY && powerState == POWER_STATE_ANY) {
+ return mData.getDouble(mData.layout.totalConsumedPowerColumnIndex);
+ }
+
+ if (powerComponent != POWER_COMPONENT_ANY
+ && ((mData.layout.screenStateDataIncluded && screenState != SCREEN_STATE_ANY)
+ || (mData.layout.powerStateDataIncluded && powerState != POWER_STATE_ANY))) {
+ BatteryConsumer.Key key = mData.layout.getKey(powerComponent,
+ processState, screenState, powerState);
+ if (key != null) {
+ return mData.getDouble(key.mPowerColumnIndex);
}
- final BatteryConsumer.Key[] keys =
- mData.layout.processStateKeys[dimensions.processState];
- double totalPowerMah = 0;
- for (int i = keys.length - 1; i >= 0; i--) {
- totalPowerMah += mData.getDouble(keys[i].mPowerColumnIndex);
+ return 0;
+ }
+
+ if (mData.layout.processStateDataIncluded || mData.layout.screenStateDataIncluded
+ || mData.layout.powerStateDataIncluded) {
+ double total = 0;
+ for (BatteryConsumer.Key key : mData.layout.keys) {
+ if (key.processState != PROCESS_STATE_UNSPECIFIED
+ && key.matches(powerComponent, processState, screenState, powerState)) {
+ total += mData.getDouble(key.mPowerColumnIndex);
+ }
}
- return totalPowerMah;
+ if (total != 0) {
+ return total;
+ }
+ }
+
+ BatteryConsumer.Key key = mData.layout.getKey(powerComponent, processState,
+ SCREEN_STATE_UNSPECIFIED, POWER_STATE_UNSPECIFIED);
+ if (key != null) {
+ return mData.getDouble(key.mPowerColumnIndex);
} else {
- return mData.getDouble(mData.layout.totalConsumedPowerColumnIndex);
+ return 0;
+ }
+ }
+
+ /**
+ * Total usage duration by this consumer, aggregated over the specified dimensions, in ms.
+ */
+ public long getUsageDurationMillis(@NonNull BatteryConsumer.Dimensions dimensions) {
+ return getUsageDurationMillis(dimensions.powerComponent, dimensions.processState,
+ dimensions.screenState, dimensions.powerState);
+ }
+
+ /**
+ * Total usage duration by this consumer, aggregated over the specified dimensions, in ms.
+ */
+ public long getUsageDurationMillis(@BatteryConsumer.PowerComponent int powerComponent,
+ @BatteryConsumer.ProcessState int processState,
+ @BatteryConsumer.ScreenState int screenState,
+ @BatteryConsumer.PowerState int powerState) {
+ if ((mData.layout.screenStateDataIncluded && screenState != SCREEN_STATE_ANY)
+ || (mData.layout.powerStateDataIncluded && powerState != POWER_STATE_ANY)) {
+ BatteryConsumer.Key key = mData.layout.getKey(powerComponent,
+ processState, screenState, powerState);
+ if (key != null) {
+ return mData.getLong(key.mDurationColumnIndex);
+ }
+ return 0;
+ }
+
+ if (mData.layout.screenStateDataIncluded || mData.layout.powerStateDataIncluded) {
+ long total = 0;
+ for (BatteryConsumer.Key key : mData.layout.keys) {
+ if (key.processState != PROCESS_STATE_UNSPECIFIED
+ && key.matches(powerComponent, processState, screenState, powerState)) {
+ total += mData.getLong(key.mDurationColumnIndex);
+ }
+ }
+ if (total != 0) {
+ return total;
+ }
+ }
+
+ BatteryConsumer.Key key = mData.layout.getKey(powerComponent, processState,
+ SCREEN_STATE_UNSPECIFIED, POWER_STATE_UNSPECIFIED);
+ if (key != null) {
+ return mData.getLong(key.mDurationColumnIndex);
+ } else {
+ return 0;
}
}
@@ -84,7 +165,11 @@ class PowerComponents {
* @return Amount of consumed power in mAh.
*/
public double getConsumedPower(@NonNull BatteryConsumer.Key key) {
- return mData.getDouble(key.mPowerColumnIndex);
+ if (mData.hasValue(key.mPowerColumnIndex)) {
+ return mData.getDouble(key.mPowerColumnIndex);
+ }
+ return getConsumedPower(key.powerComponent, key.processState, key.screenState,
+ key.powerState);
}
/**
@@ -135,7 +220,12 @@ class PowerComponents {
* @return Amount of time in milliseconds.
*/
public long getUsageDurationMillis(BatteryConsumer.Key key) {
- return mData.getLong(key.mDurationColumnIndex);
+ if (mData.hasValue(key.mDurationColumnIndex)) {
+ return mData.getLong(key.mDurationColumnIndex);
+ }
+
+ return getUsageDurationMillis(key.powerComponent, key.processState, key.screenState,
+ key.powerState);
}
/**
@@ -154,51 +244,77 @@ class PowerComponents {
}
}
- public void dump(PrintWriter pw, boolean skipEmptyComponents) {
- String separator = "";
+ void dump(PrintWriter pw, @BatteryConsumer.ScreenState int screenState,
+ @BatteryConsumer.PowerState int powerState, boolean skipEmptyComponents) {
StringBuilder sb = new StringBuilder();
-
for (int componentId = 0; componentId < BatteryConsumer.POWER_COMPONENT_COUNT;
componentId++) {
- for (BatteryConsumer.Key key: mData.getKeys(componentId)) {
- final double componentPower = getConsumedPower(key);
- final long durationMs = getUsageDurationMillis(key);
- if (skipEmptyComponents && componentPower == 0 && durationMs == 0) {
- continue;
+ dump(sb, componentId, PROCESS_STATE_ANY, screenState, powerState, skipEmptyComponents);
+ if (mData.layout.processStateDataIncluded) {
+ for (int processState = 0; processState < BatteryConsumer.PROCESS_STATE_COUNT;
+ processState++) {
+ if (processState == PROCESS_STATE_UNSPECIFIED) {
+ continue;
+ }
+ dump(sb, componentId, processState, screenState, powerState,
+ skipEmptyComponents);
}
+ }
+ }
- sb.append(separator);
- separator = " ";
- sb.append(key.toShortString());
- sb.append("=");
- sb.append(BatteryStats.formatCharge(componentPower));
-
- if (durationMs != 0) {
- sb.append(" (");
- BatteryStats.formatTimeMsNoSpace(sb, durationMs);
- sb.append(")");
+ // TODO(b/352835319): take into account screen and power states
+ if (screenState == SCREEN_STATE_ANY && powerState == POWER_STATE_ANY) {
+ final int customComponentCount = mData.layout.customPowerComponentCount;
+ for (int customComponentId = BatteryConsumer.FIRST_CUSTOM_POWER_COMPONENT_ID;
+ customComponentId < BatteryConsumer.FIRST_CUSTOM_POWER_COMPONENT_ID
+ + customComponentCount;
+ customComponentId++) {
+ final double customComponentPower =
+ getConsumedPowerForCustomComponent(customComponentId);
+ if (skipEmptyComponents && customComponentPower == 0) {
+ continue;
}
+ sb.append(getCustomPowerComponentName(customComponentId));
+ sb.append("=");
+ sb.append(BatteryStats.formatCharge(customComponentPower));
+ sb.append(" ");
}
}
- final int customComponentCount = mData.layout.customPowerComponentCount;
- for (int customComponentId = BatteryConsumer.FIRST_CUSTOM_POWER_COMPONENT_ID;
- customComponentId < BatteryConsumer.FIRST_CUSTOM_POWER_COMPONENT_ID
- + customComponentCount;
- customComponentId++) {
- final double customComponentPower =
- getConsumedPowerForCustomComponent(customComponentId);
- if (skipEmptyComponents && customComponentPower == 0) {
- continue;
- }
- sb.append(separator);
- separator = " ";
- sb.append(getCustomPowerComponentName(customComponentId));
- sb.append("=");
- sb.append(BatteryStats.formatCharge(customComponentPower));
+ // Remove trailing spaces
+ while (!sb.isEmpty() && Character.isWhitespace(sb.charAt(sb.length() - 1))) {
+ sb.setLength(sb.length() - 1);
}
- pw.print(sb);
+ pw.println(sb);
+ }
+
+ private void dump(StringBuilder sb, @BatteryConsumer.PowerComponent int powerComponent,
+ @BatteryConsumer.ProcessState int processState,
+ @BatteryConsumer.ScreenState int screenState,
+ @BatteryConsumer.PowerState int powerState, boolean skipEmptyComponents) {
+ final double componentPower = getConsumedPower(powerComponent, processState, screenState,
+ powerState);
+ final long durationMs = getUsageDurationMillis(powerComponent, processState, screenState,
+ powerState);
+ if (skipEmptyComponents && componentPower == 0 && durationMs == 0) {
+ return;
+ }
+
+ sb.append(BatteryConsumer.powerComponentIdToString(powerComponent));
+ if (processState != PROCESS_STATE_UNSPECIFIED) {
+ sb.append(':');
+ sb.append(BatteryConsumer.processStateToString(processState));
+ }
+ sb.append("=");
+ sb.append(BatteryStats.formatCharge(componentPower));
+
+ if (durationMs != 0) {
+ sb.append(" (");
+ BatteryStats.formatTimeMsNoSpace(sb, durationMs);
+ sb.append(")");
+ }
+ sb.append(' ');
}
/** Returns whether there are any atoms.proto POWER_COMPONENTS data to write to a proto. */
@@ -220,11 +336,13 @@ class PowerComponents {
for (int componentId = 0; componentId < BatteryConsumer.POWER_COMPONENT_COUNT;
componentId++) {
-
- final BatteryConsumer.Key[] keys = mData.getKeys(componentId);
+ final BatteryConsumer.Key[] keys = mData.layout.getKeys(componentId);
for (BatteryConsumer.Key key : keys) {
- final long powerDeciCoulombs = convertMahToDeciCoulombs(getConsumedPower(key));
- final long durationMs = getUsageDurationMillis(key);
+ final long powerDeciCoulombs = convertMahToDeciCoulombs(
+ getConsumedPower(key.powerComponent, key.processState, key.screenState,
+ key.powerState));
+ final long durationMs = getUsageDurationMillis(key.powerComponent, key.processState,
+ key.screenState, key.powerState);
if (powerDeciCoulombs == 0 && durationMs == 0) {
// No interesting data. Make sure not to even write the COMPONENT int.
@@ -329,34 +447,43 @@ class PowerComponents {
void writeToXml(TypedXmlSerializer serializer) throws IOException {
serializer.startTag(null, BatteryUsageStats.XML_TAG_POWER_COMPONENTS);
- for (int componentId = 0; componentId < BatteryConsumer.POWER_COMPONENT_COUNT;
- componentId++) {
- final BatteryConsumer.Key[] keys = mData.getKeys(componentId);
- for (BatteryConsumer.Key key : keys) {
- final double powerMah = getConsumedPower(key);
- final long durationMs = getUsageDurationMillis(key);
- if (powerMah == 0 && durationMs == 0) {
- continue;
- }
+ for (BatteryConsumer.Key key : mData.layout.keys) {
+ if (!mData.hasValue(key.mPowerColumnIndex)
+ && !mData.hasValue(key.mDurationColumnIndex)) {
+ continue;
+ }
- serializer.startTag(null, BatteryUsageStats.XML_TAG_COMPONENT);
- serializer.attributeInt(null, BatteryUsageStats.XML_ATTR_ID, componentId);
- if (key.processState != PROCESS_STATE_UNSPECIFIED) {
- serializer.attributeInt(null, BatteryUsageStats.XML_ATTR_PROCESS_STATE,
- key.processState);
- }
- if (powerMah != 0) {
- serializer.attributeDouble(null, BatteryUsageStats.XML_ATTR_POWER, powerMah);
- }
- if (durationMs != 0) {
- serializer.attributeLong(null, BatteryUsageStats.XML_ATTR_DURATION, durationMs);
- }
- if (mData.layout.powerModelsIncluded) {
- serializer.attributeInt(null, BatteryUsageStats.XML_ATTR_MODEL,
- getPowerModel(key));
- }
- serializer.endTag(null, BatteryUsageStats.XML_TAG_COMPONENT);
+ final double powerMah = getConsumedPower(key);
+ final long durationMs = getUsageDurationMillis(key);
+ if (powerMah == 0 && durationMs == 0) {
+ continue;
+ }
+
+ serializer.startTag(null, BatteryUsageStats.XML_TAG_COMPONENT);
+ serializer.attributeInt(null, BatteryUsageStats.XML_ATTR_ID, key.powerComponent);
+ if (key.processState != PROCESS_STATE_UNSPECIFIED) {
+ serializer.attributeInt(null, BatteryUsageStats.XML_ATTR_PROCESS_STATE,
+ key.processState);
+ }
+ if (key.screenState != SCREEN_STATE_UNSPECIFIED) {
+ serializer.attributeInt(null, BatteryUsageStats.XML_ATTR_SCREEN_STATE,
+ key.screenState);
+ }
+ if (key.powerState != POWER_STATE_UNSPECIFIED) {
+ serializer.attributeInt(null, BatteryUsageStats.XML_ATTR_POWER_STATE,
+ key.powerState);
+ }
+ if (powerMah != 0) {
+ serializer.attributeDouble(null, BatteryUsageStats.XML_ATTR_POWER, powerMah);
+ }
+ if (durationMs != 0) {
+ serializer.attributeLong(null, BatteryUsageStats.XML_ATTR_DURATION, durationMs);
+ }
+ if (mData.layout.powerModelsIncluded) {
+ serializer.attributeInt(null, BatteryUsageStats.XML_ATTR_MODEL,
+ getPowerModel(key));
}
+ serializer.endTag(null, BatteryUsageStats.XML_TAG_COMPONENT);
}
final int customComponentEnd = BatteryConsumer.FIRST_CUSTOM_POWER_COMPONENT_ID
@@ -401,6 +528,8 @@ class PowerComponents {
case BatteryUsageStats.XML_TAG_COMPONENT: {
int componentId = -1;
int processState = PROCESS_STATE_UNSPECIFIED;
+ int screenState = SCREEN_STATE_UNSPECIFIED;
+ int powerState = POWER_STATE_UNSPECIFIED;
double powerMah = 0;
long durationMs = 0;
int model = BatteryConsumer.POWER_MODEL_UNDEFINED;
@@ -412,6 +541,12 @@ class PowerComponents {
case BatteryUsageStats.XML_ATTR_PROCESS_STATE:
processState = parser.getAttributeInt(i);
break;
+ case BatteryUsageStats.XML_ATTR_SCREEN_STATE:
+ screenState = parser.getAttributeInt(i);
+ break;
+ case BatteryUsageStats.XML_ATTR_POWER_STATE:
+ powerState = parser.getAttributeInt(i);
+ break;
case BatteryUsageStats.XML_ATTR_POWER:
powerMah = parser.getAttributeDouble(i);
break;
@@ -423,8 +558,8 @@ class PowerComponents {
break;
}
}
- final BatteryConsumer.Key key =
- builder.mData.getKey(componentId, processState);
+ final BatteryConsumer.Key key = builder.mData.layout.getKey(componentId,
+ processState, screenState, powerState);
builder.setConsumedPower(key, powerMah, model);
builder.setUsageDurationMillis(key, durationMs);
break;
@@ -468,11 +603,9 @@ class PowerComponents {
Builder(BatteryConsumer.BatteryConsumerData data, double minConsumedPowerThreshold) {
mData = data;
mMinConsumedPowerThreshold = minConsumedPowerThreshold;
- for (BatteryConsumer.Key[] keys : mData.layout.keys) {
- for (BatteryConsumer.Key key : keys) {
- if (key.mPowerModelColumnIndex != POWER_MODEL_NOT_INCLUDED) {
- mData.putInt(key.mPowerModelColumnIndex, POWER_MODEL_UNINITIALIZED);
- }
+ for (BatteryConsumer.Key key : mData.layout.keys) {
+ if (key.mPowerModelColumnIndex != POWER_MODEL_NOT_INCLUDED) {
+ mData.putInt(key.mPowerModelColumnIndex, POWER_MODEL_UNINITIALIZED);
}
}
}
@@ -572,51 +705,41 @@ class PowerComponents {
+ ", expected: " + mData.layout.customPowerComponentCount);
}
- for (int componentId = BatteryConsumer.POWER_COMPONENT_COUNT - 1; componentId >= 0;
- componentId--) {
- final BatteryConsumer.Key[] keys = mData.layout.keys[componentId];
- for (BatteryConsumer.Key key: keys) {
- BatteryConsumer.Key otherKey = null;
- for (BatteryConsumer.Key aKey: otherData.layout.keys[componentId]) {
- if (aKey.equals(key)) {
- otherKey = aKey;
- break;
- }
- }
-
- if (otherKey == null) {
- continue;
- }
+ for (BatteryConsumer.Key key : mData.layout.keys) {
+ BatteryConsumer.Key otherKey = otherData.layout.getKey(key.powerComponent,
+ key.processState, key.screenState, key.powerState);
+ if (otherKey == null) {
+ continue;
+ }
- mData.putDouble(key.mPowerColumnIndex,
- mData.getDouble(key.mPowerColumnIndex)
- + otherData.getDouble(otherKey.mPowerColumnIndex));
- mData.putLong(key.mDurationColumnIndex,
- mData.getLong(key.mDurationColumnIndex)
- + otherData.getLong(otherKey.mDurationColumnIndex));
+ mData.putDouble(key.mPowerColumnIndex,
+ mData.getDouble(key.mPowerColumnIndex)
+ + otherData.getDouble(otherKey.mPowerColumnIndex));
+ mData.putLong(key.mDurationColumnIndex,
+ mData.getLong(key.mDurationColumnIndex)
+ + otherData.getLong(otherKey.mDurationColumnIndex));
- if (key.mPowerModelColumnIndex == POWER_MODEL_NOT_INCLUDED) {
- continue;
- }
+ if (key.mPowerModelColumnIndex == POWER_MODEL_NOT_INCLUDED) {
+ continue;
+ }
- boolean undefined = false;
- if (otherKey.mPowerModelColumnIndex == POWER_MODEL_NOT_INCLUDED) {
+ boolean undefined = false;
+ if (otherKey.mPowerModelColumnIndex == POWER_MODEL_NOT_INCLUDED) {
+ undefined = true;
+ } else {
+ final int powerModel = mData.getInt(key.mPowerModelColumnIndex);
+ int otherPowerModel = otherData.getInt(otherKey.mPowerModelColumnIndex);
+ if (powerModel == POWER_MODEL_UNINITIALIZED) {
+ mData.putInt(key.mPowerModelColumnIndex, otherPowerModel);
+ } else if (powerModel != otherPowerModel
+ && otherPowerModel != POWER_MODEL_UNINITIALIZED) {
undefined = true;
- } else {
- final int powerModel = mData.getInt(key.mPowerModelColumnIndex);
- int otherPowerModel = otherData.getInt(otherKey.mPowerModelColumnIndex);
- if (powerModel == POWER_MODEL_UNINITIALIZED) {
- mData.putInt(key.mPowerModelColumnIndex, otherPowerModel);
- } else if (powerModel != otherPowerModel
- && otherPowerModel != POWER_MODEL_UNINITIALIZED) {
- undefined = true;
- }
}
+ }
- if (undefined) {
- mData.putInt(key.mPowerModelColumnIndex,
- BatteryConsumer.POWER_MODEL_UNDEFINED);
- }
+ if (undefined) {
+ mData.putInt(key.mPowerModelColumnIndex,
+ BatteryConsumer.POWER_MODEL_UNDEFINED);
}
}
@@ -631,10 +754,8 @@ class PowerComponents {
final int usageColumnIndex = mData.layout.firstCustomUsageDurationColumn + i;
final int otherDurationColumnIndex =
otherData.layout.firstCustomUsageDurationColumn + i;
- mData.putLong(usageColumnIndex,
- mData.getLong(usageColumnIndex) + otherData.getLong(
- otherDurationColumnIndex)
- );
+ mData.putLong(usageColumnIndex, mData.getLong(usageColumnIndex)
+ + otherData.getLong(otherDurationColumnIndex));
}
}
@@ -647,7 +768,8 @@ class PowerComponents {
for (int componentId = 0; componentId < BatteryConsumer.POWER_COMPONENT_COUNT;
componentId++) {
totalPowerMah += mData.getDouble(
- mData.getKeyOrThrow(componentId, PROCESS_STATE_ANY).mPowerColumnIndex);
+ mData.layout.getKeyOrThrow(componentId, PROCESS_STATE_ANY, SCREEN_STATE_ANY,
+ POWER_STATE_ANY).mPowerColumnIndex);
}
for (int i = 0; i < mData.layout.customPowerComponentCount; i++) {
totalPowerMah += mData.getDouble(
@@ -661,19 +783,17 @@ class PowerComponents {
*/
@NonNull
public PowerComponents build() {
- for (BatteryConsumer.Key[] keys : mData.layout.keys) {
- for (BatteryConsumer.Key key : keys) {
- if (key.mPowerModelColumnIndex != POWER_MODEL_NOT_INCLUDED) {
- if (mData.getInt(key.mPowerModelColumnIndex) == POWER_MODEL_UNINITIALIZED) {
- mData.putInt(key.mPowerModelColumnIndex,
- BatteryConsumer.POWER_MODEL_UNDEFINED);
- }
+ for (BatteryConsumer.Key key: mData.layout.keys) {
+ if (key.mPowerModelColumnIndex != POWER_MODEL_NOT_INCLUDED) {
+ if (mData.getInt(key.mPowerModelColumnIndex) == POWER_MODEL_UNINITIALIZED) {
+ mData.putInt(key.mPowerModelColumnIndex,
+ BatteryConsumer.POWER_MODEL_UNDEFINED);
}
+ }
- if (mMinConsumedPowerThreshold != 0) {
- if (mData.getDouble(key.mPowerColumnIndex) < mMinConsumedPowerThreshold) {
- mData.putDouble(key.mPowerColumnIndex, 0);
- }
+ if (mMinConsumedPowerThreshold != 0) {
+ if (mData.getDouble(key.mPowerColumnIndex) < mMinConsumedPowerThreshold) {
+ mData.putDouble(key.mPowerColumnIndex, 0);
}
}
}
diff --git a/core/java/android/os/PowerManager.java b/core/java/android/os/PowerManager.java
index 406a1a6795ab..026013c34e30 100644
--- a/core/java/android/os/PowerManager.java
+++ b/core/java/android/os/PowerManager.java
@@ -564,8 +564,7 @@ public final class PowerManager {
BRIGHTNESS_CONSTRAINT_TYPE_MINIMUM,
BRIGHTNESS_CONSTRAINT_TYPE_MAXIMUM,
BRIGHTNESS_CONSTRAINT_TYPE_DEFAULT,
- BRIGHTNESS_CONSTRAINT_TYPE_DIM,
- BRIGHTNESS_CONSTRAINT_TYPE_DOZE
+ BRIGHTNESS_CONSTRAINT_TYPE_DIM
})
@Retention(RetentionPolicy.SOURCE)
public @interface BrightnessConstraint{}
@@ -594,12 +593,6 @@ public final class PowerManager {
public static final int BRIGHTNESS_CONSTRAINT_TYPE_DIM = 3;
/**
- * Brightness constraint type: minimum allowed value.
- * @hide
- */
- public static final int BRIGHTNESS_CONSTRAINT_TYPE_DOZE = 4;
-
- /**
* @hide
*/
@IntDef(prefix = { "WAKE_REASON_" }, value = {
diff --git a/core/java/android/os/ServiceManager.java b/core/java/android/os/ServiceManager.java
index 0be2d3e30c33..e95c6a44c281 100644
--- a/core/java/android/os/ServiceManager.java
+++ b/core/java/android/os/ServiceManager.java
@@ -277,7 +277,7 @@ public final class ServiceManager {
if (service != null) {
return service;
} else {
- return Binder.allowBlocking(getIServiceManager().checkService(name));
+ return Binder.allowBlocking(getIServiceManager().checkService(name).getBinder());
}
} catch (RemoteException e) {
Log.e(TAG, "error in checkService", e);
@@ -425,7 +425,7 @@ public final class ServiceManager {
private static IBinder rawGetService(String name) throws RemoteException {
final long start = sStatLogger.getTime();
- final IBinder binder = getIServiceManager().getService(name);
+ final IBinder binder = getIServiceManager().getService(name).getBinder();
final int time = (int) sStatLogger.logDurationStat(Stats.GET_SERVICE, start);
diff --git a/core/java/android/os/ServiceManagerNative.java b/core/java/android/os/ServiceManagerNative.java
index 7b91dd5822e7..6c9a5c7f9fff 100644
--- a/core/java/android/os/ServiceManagerNative.java
+++ b/core/java/android/os/ServiceManagerNative.java
@@ -58,12 +58,12 @@ class ServiceManagerProxy implements IServiceManager {
}
@UnsupportedAppUsage
- public IBinder getService(String name) throws RemoteException {
+ public Service getService(String name) throws RemoteException {
// Same as checkService (old versions of servicemanager had both methods).
- return mServiceManager.checkService(name);
+ return checkService(name);
}
- public IBinder checkService(String name) throws RemoteException {
+ public Service checkService(String name) throws RemoteException {
return mServiceManager.checkService(name);
}
diff --git a/core/java/android/os/StrictMode.java b/core/java/android/os/StrictMode.java
index 292e6bdba539..50b73a9d3f66 100644
--- a/core/java/android/os/StrictMode.java
+++ b/core/java/android/os/StrictMode.java
@@ -126,20 +126,18 @@ import java.util.function.Consumer;
* method:
*
* <pre>
- * public void onCreate() {
- * StrictMode.setThreadPolicy(new {@link ThreadPolicy.Builder StrictMode.ThreadPolicy.Builder}()
- * .detectDiskReads()
- * .detectDiskWrites()
- * .detectNetwork() // or .detectAll() for all detectable problems
- * .penaltyLog()
- * .build());
- * StrictMode.setVmPolicy(new {@link VmPolicy.Builder StrictMode.VmPolicy.Builder}()
- * .detectLeakedSqlLiteObjects()
- * .detectLeakedClosableObjects()
- * .penaltyLog()
- * .penaltyDeath()
- * .build());
- * super.onCreate();
+ * override fun onCreate(savedInstanceState: Bundle?) {
+ * super.onCreate(savedInstanceState)
+ * StrictMode.setThreadPolicy(
+ * StrictMode.ThreadPolicy.Builder()
+ * .detectAll()
+ * .build()
+ * )
+ * StrictMode.setVmPolicy(
+ * StrictMode.VmPolicy.Builder()
+ * .detectAll()
+ * .build()
+ * )
* }
* </pre>
*
@@ -354,7 +352,7 @@ public final class StrictMode {
public static final int NETWORK_POLICY_LOG = 1;
/** {@hide} */
public static final int NETWORK_POLICY_REJECT = 2;
-
+
/**
* Detect explicit calls to {@link Runtime#gc()}.
*/
diff --git a/core/java/android/os/SystemVibrator.java b/core/java/android/os/SystemVibrator.java
index 2a62c24a86e1..5339d7331426 100644
--- a/core/java/android/os/SystemVibrator.java
+++ b/core/java/android/os/SystemVibrator.java
@@ -206,13 +206,12 @@ public class SystemVibrator extends Vibrator {
}
@Override
- public void performHapticFeedback(
- int constant, boolean always, String reason, boolean fromIme) {
+ public void performHapticFeedback(int constant, String reason, int flags, int privFlags) {
if (mVibratorManager == null) {
Log.w(TAG, "Failed to perform haptic feedback; no vibrator manager.");
return;
}
- mVibratorManager.performHapticFeedback(constant, always, reason, fromIme);
+ mVibratorManager.performHapticFeedback(constant, reason, flags, privFlags);
}
@Override
diff --git a/core/java/android/os/SystemVibratorManager.java b/core/java/android/os/SystemVibratorManager.java
index c80bcac2624f..a9846ba7e264 100644
--- a/core/java/android/os/SystemVibratorManager.java
+++ b/core/java/android/os/SystemVibratorManager.java
@@ -147,15 +147,14 @@ public class SystemVibratorManager extends VibratorManager {
}
@Override
- public void performHapticFeedback(int constant, boolean always, String reason,
- boolean fromIme) {
+ public void performHapticFeedback(int constant, String reason, int flags, int privFlags) {
if (mService == null) {
Log.w(TAG, "Failed to perform haptic feedback; no vibrator manager service.");
return;
}
try {
- mService.performHapticFeedback(
- mUid, mContext.getDeviceId(), mPackageName, constant, always, reason, fromIme);
+ mService.performHapticFeedback(mUid, mContext.getDeviceId(), mPackageName, constant,
+ reason, flags, privFlags);
} catch (RemoteException e) {
Log.w(TAG, "Failed to perform haptic feedback.", e);
}
@@ -245,9 +244,8 @@ public class SystemVibratorManager extends VibratorManager {
}
@Override
- public void performHapticFeedback(int effectId, boolean always, String reason,
- boolean fromIme) {
- SystemVibratorManager.this.performHapticFeedback(effectId, always, reason, fromIme);
+ public void performHapticFeedback(int effectId, String reason, int flags, int privFlags) {
+ SystemVibratorManager.this.performHapticFeedback(effectId, reason, flags, privFlags);
}
@Override
diff --git a/core/java/android/os/TEST_MAPPING b/core/java/android/os/TEST_MAPPING
index b5029a6aaff3..2fde5e7eff6a 100644
--- a/core/java/android/os/TEST_MAPPING
+++ b/core/java/android/os/TEST_MAPPING
@@ -119,7 +119,7 @@
"PowerComponents\\.java",
"[^/]*BatteryConsumer[^/]*\\.java"
],
- "name": "BatteryUsageStatsProtoTests"
+ "name": "PowerStatsTests"
},
{
"file_patterns": ["SharedMemory[^/]*\\.java"],
diff --git a/core/java/android/os/UidBatteryConsumer.java b/core/java/android/os/UidBatteryConsumer.java
index 53af838cb535..9b5a378d6591 100644
--- a/core/java/android/os/UidBatteryConsumer.java
+++ b/core/java/android/os/UidBatteryConsumer.java
@@ -140,12 +140,50 @@ public final class UidBatteryConsumer extends BatteryConsumer {
skipEmptyComponents);
appendProcessStateData(sb, BatteryConsumer.PROCESS_STATE_CACHED,
skipEmptyComponents);
- pw.print(sb);
+ pw.println(sb);
+ } else {
+ pw.println();
}
- pw.print(" ( ");
- mPowerComponents.dump(pw, skipEmptyComponents /* skipTotalPowerComponent */);
- pw.print(" ) ");
+ pw.print(" ");
+ mPowerComponents.dump(pw, SCREEN_STATE_ANY, POWER_STATE_ANY, skipEmptyComponents);
+
+ if (mData.layout.powerStateDataIncluded || mData.layout.screenStateDataIncluded) {
+ for (int powerState = 0; powerState < POWER_STATE_COUNT; powerState++) {
+ if (mData.layout.powerStateDataIncluded && powerState == POWER_STATE_UNSPECIFIED) {
+ continue;
+ }
+
+ for (int screenState = 0; screenState < SCREEN_STATE_COUNT; screenState++) {
+ if (mData.layout.screenStateDataIncluded
+ && screenState == POWER_STATE_UNSPECIFIED) {
+ continue;
+ }
+
+ final double consumedPower = mPowerComponents.getConsumedPower(
+ POWER_COMPONENT_ANY,
+ PROCESS_STATE_ANY, screenState, powerState);
+ if (consumedPower == 0) {
+ continue;
+ }
+
+ pw.print(" (");
+ if (powerState != POWER_STATE_UNSPECIFIED) {
+ pw.print(BatteryConsumer.powerStateToString(powerState));
+ }
+ if (screenState != SCREEN_STATE_UNSPECIFIED) {
+ if (powerState != POWER_STATE_UNSPECIFIED) {
+ pw.print(", ");
+ }
+ pw.print("screen ");
+ pw.print(BatteryConsumer.screenStateToString(screenState));
+ }
+ pw.print(") ");
+ mPowerComponents.dump(pw, screenState, powerState,
+ skipEmptyComponents /* skipTotalPowerComponent */);
+ }
+ }
+ }
}
private void appendProcessStateData(StringBuilder sb, @ProcessState int processState,
@@ -160,10 +198,6 @@ public final class UidBatteryConsumer extends BatteryConsumer {
.append(BatteryStats.formatCharge(power));
}
- static UidBatteryConsumer create(BatteryConsumerData data) {
- return new UidBatteryConsumer(data);
- }
-
/** Serializes this object to XML */
void writeToXml(TypedXmlSerializer serializer) throws IOException {
if (getConsumedPower() == 0) {
diff --git a/core/java/android/os/UserBatteryConsumer.java b/core/java/android/os/UserBatteryConsumer.java
index 23ba0c635eca..ea2be7b80e94 100644
--- a/core/java/android/os/UserBatteryConsumer.java
+++ b/core/java/android/os/UserBatteryConsumer.java
@@ -60,10 +60,10 @@ public class UserBatteryConsumer extends BatteryConsumer {
pw.print("User ");
pw.print(getUserId());
pw.print(": ");
- pw.print(BatteryStats.formatCharge(consumedPower));
- pw.print(" ( ");
- mPowerComponents.dump(pw, skipEmptyComponents /* skipTotalPowerComponent */);
- pw.print(" ) ");
+ pw.println(BatteryStats.formatCharge(consumedPower));
+ pw.print(" ");
+ mPowerComponents.dump(pw, SCREEN_STATE_ANY, POWER_STATE_ANY,
+ skipEmptyComponents /* skipTotalPowerComponent */);
}
/** Serializes this object to XML */
diff --git a/core/java/android/os/UserManager.java b/core/java/android/os/UserManager.java
index f30a9f5411ee..3aa42c6bb594 100644
--- a/core/java/android/os/UserManager.java
+++ b/core/java/android/os/UserManager.java
@@ -3927,7 +3927,12 @@ public class UserManager {
android.Manifest.permission.QUERY_USERS,
android.Manifest.permission.INTERACT_ACROSS_USERS}, conditional = true)
public @NonNull UserProperties getUserProperties(@NonNull UserHandle userHandle) {
- return mUserPropertiesCache.query(userHandle.getIdentifier());
+ final int userId = userHandle.getIdentifier();
+ // Avoid calling into system server for invalid user ids.
+ if (android.multiuser.Flags.fixGetUserPropertyCache() && userId < 0) {
+ throw new IllegalArgumentException("Cannot access properties for user " + userId);
+ }
+ return mUserPropertiesCache.query(userId);
}
/**
@@ -5663,6 +5668,33 @@ public class UserManager {
}
}
+ private static final String CACHE_KEY_QUIET_MODE_ENABLED_PROPERTY =
+ PropertyInvalidatedCache.createPropertyName(
+ PropertyInvalidatedCache.MODULE_SYSTEM, "quiet_mode_enabled");
+
+ private final PropertyInvalidatedCache<Integer, Boolean> mQuietModeEnabledCache =
+ new PropertyInvalidatedCache<Integer, Boolean>(
+ 32, CACHE_KEY_QUIET_MODE_ENABLED_PROPERTY) {
+ @Override
+ public Boolean recompute(Integer query) {
+ try {
+ return mService.isQuietModeEnabled(query);
+ } catch (RemoteException re) {
+ throw re.rethrowFromSystemServer();
+ }
+ }
+ @Override
+ public boolean bypass(Integer query) {
+ return query < 0;
+ }
+ };
+
+
+ /** @hide */
+ public static final void invalidateQuietModeEnabledCache() {
+ PropertyInvalidatedCache.invalidateCache(CACHE_KEY_QUIET_MODE_ENABLED_PROPERTY);
+ }
+
/**
* Returns whether the given profile is in quiet mode or not.
*
@@ -5670,6 +5702,13 @@ public class UserManager {
* @return true if the profile is in quiet mode, false otherwise.
*/
public boolean isQuietModeEnabled(UserHandle userHandle) {
+ if (android.multiuser.Flags.cacheQuietModeState()){
+ final int userId = userHandle.getIdentifier();
+ if (userId < 0) {
+ return false;
+ }
+ return mQuietModeEnabledCache.query(userId);
+ }
try {
return mService.isQuietModeEnabled(userHandle.getIdentifier());
} catch (RemoteException re) {
diff --git a/core/java/android/os/Vibrator.java b/core/java/android/os/Vibrator.java
index 8af371c74880..71c83f20741d 100644
--- a/core/java/android/os/Vibrator.java
+++ b/core/java/android/os/Vibrator.java
@@ -33,6 +33,7 @@ import android.media.AudioAttributes;
import android.os.vibrator.VibrationConfig;
import android.os.vibrator.VibratorFrequencyProfile;
import android.util.Log;
+import android.view.HapticFeedbackConstants;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -519,17 +520,15 @@ public abstract class Vibrator {
*
* @param constant the ID for the haptic feedback. This should be one of the constants defined
* in {@link HapticFeedbackConstants}.
- * @param always {@code true} if the haptic feedback should be played regardless of the user
- * vibration intensity settings applicable to the corresponding vibration.
- * {@code false} if the vibration for the haptic feedback should respect the applicable
- * vibration intensity settings.
* @param reason the reason for this haptic feedback.
- * @param fromIme the haptic feedback is performed from an IME.
+ * @param flags Additional flags as per {@link HapticFeedbackConstants}.
+ * @param privFlags Additional private flags as per {@link HapticFeedbackConstants}.
*
* @hide
*/
- public void performHapticFeedback(int constant, boolean always, String reason,
- boolean fromIme) {
+ public void performHapticFeedback(int constant, String reason,
+ @HapticFeedbackConstants.Flags int flags,
+ @HapticFeedbackConstants.PrivateFlags int privFlags) {
Log.w(TAG, "performHapticFeedback is not supported");
}
diff --git a/core/java/android/os/VibratorManager.java b/core/java/android/os/VibratorManager.java
index 513c4bd7ec0c..2c7a852cf29f 100644
--- a/core/java/android/os/VibratorManager.java
+++ b/core/java/android/os/VibratorManager.java
@@ -23,6 +23,7 @@ import android.annotation.SystemService;
import android.app.ActivityThread;
import android.content.Context;
import android.util.Log;
+import android.view.HapticFeedbackConstants;
/**
* Provides access to all vibrators from the device, as well as the ability to run them
@@ -142,15 +143,14 @@ public abstract class VibratorManager {
*
* @param constant the ID of the requested haptic feedback. Should be one of the constants
* defined in {@link HapticFeedbackConstants}.
- * @param always {@code true} if the haptic feedback should be played regardless of the user
- * vibration intensity settings applicable to the corresponding vibration.
- * {@code false} otherwise.
* @param reason the reason for this haptic feedback.
- * @param fromIme the haptic feedback is performed from an IME.
+ * @param flags Additional flags as per {@link HapticFeedbackConstants}.
+ * @param privFlags Additional private flags as per {@link HapticFeedbackConstants}.
* @hide
*/
- public void performHapticFeedback(int constant, boolean always, String reason,
- boolean fromIme) {
+ public void performHapticFeedback(int constant, String reason,
+ @HapticFeedbackConstants.Flags int flags,
+ @HapticFeedbackConstants.PrivateFlags int privFlags) {
Log.w(TAG, "performHapticFeedback is not supported");
}
diff --git a/core/java/android/os/vibrator/flags.aconfig b/core/java/android/os/vibrator/flags.aconfig
index c73a422d931b..ad2f59db46ff 100644
--- a/core/java/android/os/vibrator/flags.aconfig
+++ b/core/java/android/os/vibrator/flags.aconfig
@@ -46,6 +46,7 @@ flag {
flag {
namespace: "haptics"
name: "vibration_xml_apis"
+ is_exported: true
description: "Enabled System APIs for vibration effect XML parser and serializer"
bug: "347273158"
metadata {
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index c954cdb270e8..ff389208a579 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -11075,6 +11075,13 @@ public final class Settings {
public static final String MANDATORY_BIOMETRICS = "mandatory_biometrics";
/**
+ * Whether or not requirements for mandatory biometrics is satisfied.
+ * @hide
+ */
+ public static final String MANDATORY_BIOMETRICS_REQUIREMENTS_SATISFIED =
+ "mandatory_biometrics_requirements_satisfied";
+
+ /**
* Whether or not active unlock triggers on wake.
* @hide
*/
@@ -12324,6 +12331,18 @@ public final class Settings {
"accessibility_force_invert_color_enabled";
/**
+ * Whether to enable mouse keys for Physical Keyboard accessibility.
+ *
+ * If set to true, key presses (of the mouse keys) on
+ * physical keyboard will control mouse pointer on the display.
+ *
+ * @hide
+ */
+ @Readable
+ public static final String ACCESSIBILITY_MOUSE_KEYS_ENABLED =
+ "accessibility_mouse_keys_enabled";
+
+ /**
* Whether the Adaptive connectivity option is enabled.
*
* @hide
diff --git a/core/java/android/security/flags.aconfig b/core/java/android/security/flags.aconfig
index 3954bc2318cb..f6f0eff918e3 100644
--- a/core/java/android/security/flags.aconfig
+++ b/core/java/android/security/flags.aconfig
@@ -92,3 +92,10 @@ flag {
description: "Add a dump capability for attestation_verification service"
bug: "335498868"
}
+
+flag {
+ name: "should_trust_manager_listen_for_primary_auth"
+ namespace: "biometrics"
+ description: "Causes TrustManagerService to listen for credential attempts and ignore reports from upstream"
+ bug: "323086607"
+}
diff --git a/core/java/android/service/chooser/flags.aconfig b/core/java/android/service/chooser/flags.aconfig
index 82c16138f967..1f1a35117f72 100644
--- a/core/java/android/service/chooser/flags.aconfig
+++ b/core/java/android/service/chooser/flags.aconfig
@@ -2,14 +2,6 @@ package: "android.service.chooser"
container: "system"
flag {
- name: "enable_sharesheet_metadata_extra"
- is_exported: true
- namespace: "intentresolver"
- description: "This flag enables sharesheet metadata to be displayed to users."
- bug: "318942069"
-}
-
-flag {
name: "chooser_payload_toggling"
is_exported: true
namespace: "intentresolver"
diff --git a/core/java/android/service/dreams/DreamService.java b/core/java/android/service/dreams/DreamService.java
index 6b0d301c3baf..fbeab84fa96d 100644
--- a/core/java/android/service/dreams/DreamService.java
+++ b/core/java/android/service/dreams/DreamService.java
@@ -742,7 +742,9 @@ public class DreamService extends Service implements Window.Callback {
* @see View#findViewById(int)
* @see DreamService#requireViewById(int)
*/
- /* TODO(b/347672184): Re-add @Nullable */
+ // Strictly speaking this should be marked as @Nullable but the nullability of the return value
+ // is deliberately left unspecified as idiomatically correct code can make assumptions either
+ // way based on local context, e.g. layout specification.
public <T extends View> T findViewById(@IdRes int id) {
return getWindow().findViewById(id);
}
@@ -785,7 +787,6 @@ public class DreamService extends Service implements Window.Callback {
*/
public void setInteractive(boolean interactive) {
mInteractive = interactive;
- updateAccessibilityMessage();
}
/**
@@ -1639,9 +1640,9 @@ public class DreamService extends Service implements Window.Callback {
if (mWindow == null) return;
if (mDreamAccessibility == null) {
final View rootView = mWindow.getDecorView();
- mDreamAccessibility = new DreamAccessibility(this, rootView);
+ mDreamAccessibility = new DreamAccessibility(this, rootView, this::wakeUp);
}
- mDreamAccessibility.updateAccessibilityConfiguration(isInteractive());
+ mDreamAccessibility.updateAccessibilityConfiguration();
}
private boolean getWindowFlagValue(int flag, boolean defaultValue) {
diff --git a/core/java/android/service/dreams/utils/DreamAccessibility.java b/core/java/android/service/dreams/utils/DreamAccessibility.java
index c38f41bab5a6..f504ff7d4650 100644
--- a/core/java/android/service/dreams/utils/DreamAccessibility.java
+++ b/core/java/android/service/dreams/utils/DreamAccessibility.java
@@ -18,6 +18,7 @@ package android.service.dreams.utils;
import android.annotation.NonNull;
import android.content.Context;
+import android.os.Bundle;
import android.view.View;
import android.view.accessibility.AccessibilityNodeInfo;
@@ -32,22 +33,22 @@ public class DreamAccessibility {
private final Context mContext;
private final View mView;
private final View.AccessibilityDelegate mAccessibilityDelegate;
+ private final Runnable mDismissCallback;
- public DreamAccessibility(@NonNull Context context, @NonNull View view) {
+ public DreamAccessibility(@NonNull Context context, @NonNull View view,
+ @NonNull Runnable dismissCallback) {
mContext = context;
mView = view;
mAccessibilityDelegate = createNewAccessibilityDelegate(mContext);
+ mDismissCallback = dismissCallback;
}
/**
- * @param interactive
- * Removes and add accessibility configuration depending if the dream is interactive or not
+ * Adds default accessibility configuration if none exist on the dream
*/
- public void updateAccessibilityConfiguration(Boolean interactive) {
- if (!interactive) {
+ public void updateAccessibilityConfiguration() {
+ if (mView.getAccessibilityDelegate() == null) {
addAccessibilityConfiguration();
- } else {
- removeCustomAccessibilityAction();
}
}
@@ -58,31 +59,28 @@ public class DreamAccessibility {
mView.setAccessibilityDelegate(mAccessibilityDelegate);
}
- /**
- * Removes Configured the accessibility actions for the given root view.
- */
- private void removeCustomAccessibilityAction() {
- if (mView.getAccessibilityDelegate() == mAccessibilityDelegate) {
- mView.setAccessibilityDelegate(null);
- }
- }
-
private View.AccessibilityDelegate createNewAccessibilityDelegate(Context context) {
return new View.AccessibilityDelegate() {
@Override
public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfo info) {
super.onInitializeAccessibilityNodeInfo(host, info);
- for (AccessibilityNodeInfo.AccessibilityAction action : info.getActionList()) {
- if (action.getId() == AccessibilityNodeInfo.ACTION_CLICK) {
- info.removeAction(action);
- break;
- }
- }
info.addAction(new AccessibilityNodeInfo.AccessibilityAction(
- AccessibilityNodeInfo.ACTION_CLICK,
+ AccessibilityNodeInfo.ACTION_DISMISS,
context.getResources().getString(R.string.dream_accessibility_action_click)
));
}
+
+ @Override
+ public boolean performAccessibilityAction(View host, int action, Bundle args) {
+ switch(action){
+ case AccessibilityNodeInfo.ACTION_DISMISS:
+ if (mDismissCallback != null) {
+ mDismissCallback.run();
+ }
+ break;
+ }
+ return true;
+ }
};
}
}
diff --git a/core/java/android/text/ClientFlags.java b/core/java/android/text/ClientFlags.java
index 5d84d17bdb6e..b07534f5fe52 100644
--- a/core/java/android/text/ClientFlags.java
+++ b/core/java/android/text/ClientFlags.java
@@ -68,4 +68,11 @@ public class ClientFlags {
public static boolean fixMisalignedContextMenu() {
return TextFlags.isFeatureEnabled(Flags.FLAG_FIX_MISALIGNED_CONTEXT_MENU);
}
+
+ /**
+ * @see Flags#clearFontVariationSettings()
+ */
+ public static boolean clearFontVariationSettings() {
+ return TextFlags.isFeatureEnabled(Flags.FLAG_CLEAR_FONT_VARIATION_SETTINGS);
+ }
}
diff --git a/core/java/android/text/TextFlags.java b/core/java/android/text/TextFlags.java
index 9e02460d2637..4dca284b8a4d 100644
--- a/core/java/android/text/TextFlags.java
+++ b/core/java/android/text/TextFlags.java
@@ -61,6 +61,7 @@ public final class TextFlags {
Flags.FLAG_FIX_LINE_HEIGHT_FOR_LOCALE,
Flags.FLAG_ICU_BIDI_MIGRATION,
Flags.FLAG_FIX_MISALIGNED_CONTEXT_MENU,
+ Flags.FLAG_CLEAR_FONT_VARIATION_SETTINGS,
};
/**
@@ -75,6 +76,7 @@ public final class TextFlags {
Flags.fixLineHeightForLocale(),
Flags.icuBidiMigration(),
Flags.fixMisalignedContextMenu(),
+ Flags.clearFontVariationSettings(),
};
/**
diff --git a/core/java/android/text/flags/flags.aconfig b/core/java/android/text/flags/flags.aconfig
index 8836c8a3a113..02c63db2c8a6 100644
--- a/core/java/android/text/flags/flags.aconfig
+++ b/core/java/android/text/flags/flags.aconfig
@@ -220,3 +220,23 @@ flag {
is_fixed_read_only: true
bug: "346915432"
}
+
+flag {
+ name: "clear_font_variation_settings"
+ namespace: "text"
+ description: "The font variation settings must be cleared when the new Typeface is set"
+ bug: "353609778"
+ metadata {
+ purpose: PURPOSE_BUGFIX
+ }
+}
+
+flag {
+ name: "portuguese_hyphenator"
+ namespace: "text"
+ description: "Portuguese taiored hyphenator"
+ bug: "344656282"
+ metadata {
+ purpose: PURPOSE_BUGFIX
+ }
+}
diff --git a/core/java/android/text/format/DateIntervalFormat.java b/core/java/android/text/format/DateIntervalFormat.java
index e8236fda42b6..8dea3228eb0c 100644
--- a/core/java/android/text/format/DateIntervalFormat.java
+++ b/core/java/android/text/format/DateIntervalFormat.java
@@ -26,6 +26,7 @@ import android.icu.util.ULocale;
import android.util.LruCache;
import com.android.internal.annotations.VisibleForTesting;
+import com.android.libcore.Flags;
import java.text.FieldPosition;
import java.util.TimeZone;
@@ -123,4 +124,14 @@ public final class DateIntervalFormat {
&& c.get(Calendar.SECOND) == 0
&& c.get(Calendar.MILLISECOND) == 0;
}
+
+
+ @VisibleForTesting(visibility = PACKAGE)
+ public static boolean isLibcoreVFlagEnabled() {
+ // Note that the Flags class is expected to be jarjar-ed in the build-time.
+ // See go/repackage_flags
+ // The full-qualified name should be like
+ // com.android.internal.hidden_from_bootclasspath.com.android.libcore.Flags
+ return Flags.vApis();
+ }
}
diff --git a/core/java/android/tracing/flags.aconfig b/core/java/android/tracing/flags.aconfig
index be60c2504f38..04dba462bc1f 100644
--- a/core/java/android/tracing/flags.aconfig
+++ b/core/java/android/tracing/flags.aconfig
@@ -46,3 +46,11 @@ flag {
is_fixed_read_only: true
bug: "323165543"
}
+
+flag {
+ name: "client_side_proto_logging"
+ namespace: "windowing_tools"
+ description: "Add support for client side protologging"
+ is_fixed_read_only: true
+ bug: "352538294"
+}
diff --git a/core/java/android/util/FeatureFlagUtils.java b/core/java/android/util/FeatureFlagUtils.java
index 0714285c43f6..d8a88b83df99 100644
--- a/core/java/android/util/FeatureFlagUtils.java
+++ b/core/java/android/util/FeatureFlagUtils.java
@@ -138,12 +138,6 @@ public class FeatureFlagUtils {
"settings_show_stylus_preferences";
/**
- * Flag to enable/disable biometrics enrollment v2
- * @hide
- */
- public static final String SETTINGS_BIOMETRICS2_ENROLLMENT = "settings_biometrics2_enrollment";
-
- /**
* Flag to enable/disable FingerprintSettings v2
* @hide
*/
@@ -223,7 +217,6 @@ public class FeatureFlagUtils {
DEFAULT_FLAGS.put(SETTINGS_ENABLE_SPA_METRICS, "true");
DEFAULT_FLAGS.put(SETTINGS_ADB_METRICS_WRITER, "false");
DEFAULT_FLAGS.put(SETTINGS_SHOW_STYLUS_PREFERENCES, "true");
- DEFAULT_FLAGS.put(SETTINGS_BIOMETRICS2_ENROLLMENT, "false");
DEFAULT_FLAGS.put(SETTINGS_PREFER_ACCESSIBILITY_MENU_IN_SYSTEM, "false");
DEFAULT_FLAGS.put(SETTINGS_AUDIO_ROUTING, "false");
DEFAULT_FLAGS.put(SETTINGS_FLASH_NOTIFICATIONS, "true");
diff --git a/core/java/android/util/SequenceUtils.java b/core/java/android/util/SequenceUtils.java
index f833ce314c91..4f8db0fb260b 100644
--- a/core/java/android/util/SequenceUtils.java
+++ b/core/java/android/util/SequenceUtils.java
@@ -25,8 +25,8 @@ package android.util;
* {@link #getInitSeq}.
* 2. Whenever a newer info needs to be sent to the client side, the system server should first
* update its seq with {@link #getNextSeq}, then send the new info with the new seq to the client.
- * 3. On the client side, when receiving a new info, it should only consume it if it is newer than
- * the last received info seq by checking {@link #isIncomingSeqNewer}.
+ * 3. On the client side, when receiving a new info, it should only consume it if it is not stale by
+ * checking {@link #isIncomingSeqStale}.
*
* @hide
*/
@@ -36,15 +36,22 @@ public final class SequenceUtils {
}
/**
- * Returns {@code true} if the incomingSeq is newer than the curSeq.
+ * Returns {@code true} if the incomingSeq is stale, which means the client should not consume
+ * it.
*/
- public static boolean isIncomingSeqNewer(int curSeq, int incomingSeq) {
+ public static boolean isIncomingSeqStale(int curSeq, int incomingSeq) {
+ if (curSeq == getInitSeq()) {
+ // curSeq can be set to the initial seq in the following cases:
+ // 1. The client process/field is newly created/recreated.
+ // 2. The field is not managed by the system server, such as WindowlessWindowManager.
+ // The client should always consume the incoming in these cases.
+ return false;
+ }
// Convert to long for comparison.
final long diff = (long) incomingSeq - curSeq;
- // If there has been a sufficiently large jump, assume the sequence has wrapped around.
- // For example, when the last seq is MAX_VALUE, the incoming seq will be MIN_VALUE + 1.
- // diff = MIN_VALUE + 1 - MAX_VALUE. It is smaller than 0, but should be treated as newer.
- return diff > 0 || diff < Integer.MIN_VALUE;
+ // When diff is 0, allow client to consume.
+ // When there has been a sufficiently large jump, assume the sequence has wrapped around.
+ return (diff < 0 && diff > Integer.MIN_VALUE) || diff > Integer.MAX_VALUE;
}
/** Returns the initial seq. */
diff --git a/core/java/android/util/StateSet.java b/core/java/android/util/StateSet.java
index 16d6082649a7..17adb32fb846 100644
--- a/core/java/android/util/StateSet.java
+++ b/core/java/android/util/StateSet.java
@@ -288,6 +288,9 @@ public class StateSet {
case R.attr.state_activated:
sb.append("A ");
break;
+ case R.attr.state_hovered:
+ sb.append("H ");
+ break;
}
}
diff --git a/core/java/android/view/Choreographer.java b/core/java/android/view/Choreographer.java
index f0e673b3e3ac..7e247493e35c 100644
--- a/core/java/android/view/Choreographer.java
+++ b/core/java/android/view/Choreographer.java
@@ -41,6 +41,7 @@ import android.util.TimeUtils;
import android.view.animation.AnimationUtils;
import java.io.PrintWriter;
+import java.util.Locale;
/**
* Coordinates the timing of animations, input and drawing.
@@ -200,6 +201,7 @@ public final class Choreographer {
private final DisplayEventReceiver.VsyncEventData mLastVsyncEventData =
new DisplayEventReceiver.VsyncEventData();
private final FrameData mFrameData = new FrameData();
+ private volatile boolean mInDoFrameCallback = false;
/**
* Contains information about the current frame for jank-tracking,
@@ -818,6 +820,11 @@ public final class Choreographer {
* @hide
*/
public long getVsyncId() {
+ if (!mInDoFrameCallback && Trace.isTagEnabled(Trace.TRACE_TAG_VIEW)) {
+ String message = String.format(Locale.getDefault(), "unsync-vsync-id=%d isSfChoreo=%s",
+ mLastVsyncEventData.preferredFrameTimeline().vsyncId, this == getSfInstance());
+ Trace.instant(Trace.TRACE_TAG_VIEW, message);
+ }
return mLastVsyncEventData.preferredFrameTimeline().vsyncId;
}
@@ -853,6 +860,7 @@ public final class Choreographer {
if (Trace.isTagEnabled(Trace.TRACE_TAG_VIEW)) {
Trace.traceBegin(
Trace.TRACE_TAG_VIEW, "Choreographer#doFrame " + timeline.mVsyncId);
+ mInDoFrameCallback = true;
}
synchronized (mLock) {
if (!mFrameScheduled) {
@@ -947,6 +955,7 @@ public final class Choreographer {
doCallbacks(Choreographer.CALLBACK_COMMIT, frameIntervalNanos);
} finally {
AnimationUtils.unlockAnimationClock();
+ mInDoFrameCallback = false;
if (resynced) {
Trace.traceEnd(Trace.TRACE_TAG_VIEW);
}
diff --git a/core/java/android/view/HapticFeedbackConstants.java b/core/java/android/view/HapticFeedbackConstants.java
index 69228cafa34b..1fe06d474803 100644
--- a/core/java/android/view/HapticFeedbackConstants.java
+++ b/core/java/android/view/HapticFeedbackConstants.java
@@ -16,11 +16,30 @@
package android.view;
+import android.annotation.IntDef;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
/**
* Constants to be used to perform haptic feedback effects via
* {@link View#performHapticFeedback(int)}
*/
public class HapticFeedbackConstants {
+ /** @hide **/
+ @IntDef(flag = true, prefix = "FLAG_", value = {
+ FLAG_IGNORE_VIEW_SETTING,
+ FLAG_IGNORE_GLOBAL_SETTING,
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface Flags {}
+
+ /** @hide **/
+ @IntDef(flag = true, prefix = "PRIVATE_FLAG_", value = {
+ PRIVATE_FLAG_APPLY_INPUT_METHOD_SETTINGS,
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface PrivateFlags {}
private HapticFeedbackConstants() {}
@@ -258,4 +277,14 @@ public class HapticFeedbackConstants {
*/
@Deprecated
public static final int FLAG_IGNORE_GLOBAL_SETTING = 0x0002;
+
+ /**
+ * Flag for {@link android.os.Vibrator#performHapticFeedback(int, boolean, String, int, int)} or
+ * {@link ViewRootImpl#performHapticFeedback(int, boolean, int, int)}: Perform the haptic
+ * feedback with the input method vibration settings, e.g. applying the keyboard vibration
+ * user settings to the KEYBOARD_* constants.
+ *
+ * @hide
+ */
+ public static final int PRIVATE_FLAG_APPLY_INPUT_METHOD_SETTINGS = 0x0001;
}
diff --git a/core/java/android/view/IWindowManager.aidl b/core/java/android/view/IWindowManager.aidl
index cb5a885bd0a0..e5be53191e9e 100644
--- a/core/java/android/view/IWindowManager.aidl
+++ b/core/java/android/view/IWindowManager.aidl
@@ -53,6 +53,7 @@ import android.view.IWallpaperVisibilityListener;
import android.view.IWindow;
import android.view.IWindowSession;
import android.view.IWindowSessionCallback;
+import android.view.KeyboardShortcutGroup;
import android.view.KeyEvent;
import android.view.InputEvent;
import android.view.InsetsState;
@@ -1095,4 +1096,11 @@ interface IWindowManager
boolean transferTouchGesture(in InputTransferToken transferFromToken,
in InputTransferToken transferToToken);
+
+ /**
+ * Request the application launch keyboard shortcuts the system has defined.
+ *
+ * @param deviceId The id of the {@link InputDevice} that will handle the shortcut.
+ */
+ KeyboardShortcutGroup getApplicationLaunchKeyboardShortcuts(int deviceId);
}
diff --git a/core/java/android/view/IWindowSession.aidl b/core/java/android/view/IWindowSession.aidl
index 070d33bb9be6..14407ca32388 100644
--- a/core/java/android/view/IWindowSession.aidl
+++ b/core/java/android/view/IWindowSession.aidl
@@ -140,13 +140,13 @@ interface IWindowSession {
int seqId);
@UnsupportedAppUsage
- boolean performHapticFeedback(int effectId, boolean always, boolean fromIme);
+ boolean performHapticFeedback(int effectId, int flags, int privFlags);
/**
* Called by attached views to perform predefined haptic feedback without requiring VIBRATE
* permission.
*/
- oneway void performHapticFeedbackAsync(int effectId, boolean always, boolean fromIme);
+ oneway void performHapticFeedbackAsync(int effectId, int flags, int privFlags);
/**
* Initiate the drag operation itself
diff --git a/core/java/android/view/ImeInsetsSourceConsumer.java b/core/java/android/view/ImeInsetsSourceConsumer.java
index 1d950dc44e46..6343313b2e01 100644
--- a/core/java/android/view/ImeInsetsSourceConsumer.java
+++ b/core/java/android/view/ImeInsetsSourceConsumer.java
@@ -119,9 +119,11 @@ public final class ImeInsetsSourceConsumer extends InsetsSourceConsumer {
@Override
public boolean applyLocalVisibilityOverride() {
- ImeTracing.getInstance().triggerClientDump(
- "ImeInsetsSourceConsumer#applyLocalVisibilityOverride",
- mController.getHost().getInputMethodManager(), null /* icProto */);
+ if (!Flags.refactorInsetsController()) {
+ ImeTracing.getInstance().triggerClientDump(
+ "ImeInsetsSourceConsumer#applyLocalVisibilityOverride",
+ mController.getHost().getInputMethodManager(), null /* icProto */);
+ }
return super.applyLocalVisibilityOverride();
}
@@ -205,9 +207,13 @@ public final class ImeInsetsSourceConsumer extends InsetsSourceConsumer {
@Override
public void removeSurface() {
- final IBinder window = mController.getHost().getWindowToken();
- if (window != null) {
- getImm().removeImeSurface(window);
+ if (Flags.refactorInsetsController()) {
+ super.removeSurface();
+ } else {
+ final IBinder window = mController.getHost().getWindowToken();
+ if (window != null) {
+ getImm().removeImeSurface(window);
+ }
}
}
diff --git a/core/java/android/view/InputMonitor.java b/core/java/android/view/InputMonitor.java
index 2302dc7bd8c8..ea4abc1b8bc6 100644
--- a/core/java/android/view/InputMonitor.java
+++ b/core/java/android/view/InputMonitor.java
@@ -50,13 +50,12 @@ public final class InputMonitor implements Parcelable {
private final SurfaceControl mSurface;
/**
- * Takes all of the current pointer events streams that are currently being sent to this
- * monitor and generates appropriate cancellations for the windows that would normally get
- * them.
+ * Pilfer pointers from this input monitor.
*
- * This method should be used with caution as unexpected pilfering can break fundamental user
- * interactions.
+ * @see android.hardware.input.InputManager#pilferPointers(IBinder)
+ * @deprecated
*/
+ @Deprecated
public void pilferPointers() {
try {
mHost.pilferPointers();
@@ -197,10 +196,10 @@ public final class InputMonitor implements Parcelable {
};
@DataClass.Generated(
- time = 1679692514588L,
+ time = 1720819824835L,
codegenVersion = "1.0.23",
sourceFile = "frameworks/base/core/java/android/view/InputMonitor.java",
- inputSignatures = "private static final java.lang.String TAG\nprivate static final boolean DEBUG\nprivate final @android.annotation.NonNull android.view.InputChannel mInputChannel\nprivate final @android.annotation.NonNull android.view.IInputMonitorHost mHost\nprivate final @android.annotation.NonNull android.view.SurfaceControl mSurface\npublic void pilferPointers()\npublic void dispose()\nclass InputMonitor extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genToString=true)")
+ inputSignatures = "private static final java.lang.String TAG\nprivate static final boolean DEBUG\nprivate final @android.annotation.NonNull android.view.InputChannel mInputChannel\nprivate final @android.annotation.NonNull android.view.IInputMonitorHost mHost\nprivate final @android.annotation.NonNull android.view.SurfaceControl mSurface\npublic @java.lang.Deprecated void pilferPointers()\npublic void dispose()\nclass InputMonitor extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genToString=true)")
@Deprecated
private void __metadata() {}
diff --git a/core/java/android/view/InsetsController.java b/core/java/android/view/InsetsController.java
index df2af731037e..f166b89a1d13 100644
--- a/core/java/android/view/InsetsController.java
+++ b/core/java/android/view/InsetsController.java
@@ -765,7 +765,7 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation
public InsetsController(Host host) {
this(host, (controller, id, type) -> {
- if (type == ime()) {
+ if (!Flags.refactorInsetsController() && type == ime()) {
return new ImeInsetsSourceConsumer(id, controller.mState,
Transaction::new, controller);
} else {
diff --git a/core/java/android/view/InsetsFrameProvider.java b/core/java/android/view/InsetsFrameProvider.java
index fe98faba98c3..075571cb2890 100644
--- a/core/java/android/view/InsetsFrameProvider.java
+++ b/core/java/android/view/InsetsFrameProvider.java
@@ -162,6 +162,12 @@ public class InsetsFrameProvider implements Parcelable {
return mSource;
}
+ /** Set the flags of this provider. */
+ public InsetsFrameProvider setFlags(@Flags int flags) {
+ mFlags = flags;
+ return this;
+ }
+
public InsetsFrameProvider setFlags(@Flags int flags, @Flags int mask) {
mFlags = (mFlags & ~mask) | (flags & mask);
return this;
diff --git a/core/java/android/view/InsetsSourceConsumer.java b/core/java/android/view/InsetsSourceConsumer.java
index c73cbc6e9a57..477e35b6e655 100644
--- a/core/java/android/view/InsetsSourceConsumer.java
+++ b/core/java/android/view/InsetsSourceConsumer.java
@@ -43,6 +43,7 @@ import android.view.inputmethod.Flags;
import android.view.inputmethod.ImeTracker;
import com.android.internal.annotations.VisibleForTesting;
+import com.android.internal.inputmethod.ImeTracing;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -296,6 +297,13 @@ public class InsetsSourceConsumer {
@VisibleForTesting(visibility = PACKAGE)
public boolean applyLocalVisibilityOverride() {
+ if (Flags.refactorInsetsController()) {
+ if (mType == WindowInsets.Type.ime()) {
+ ImeTracing.getInstance().triggerClientDump(
+ "ImeInsetsSourceConsumer#applyLocalVisibilityOverride",
+ mController.getHost().getInputMethodManager(), null /* icProto */);
+ }
+ }
final InsetsSource source = mState.peekSource(mId);
if (source == null) {
return false;
@@ -396,6 +404,14 @@ public class InsetsSourceConsumer {
*/
public void removeSurface() {
// no-op for types that always return ShowResult#SHOW_IMMEDIATELY.
+ if (Flags.refactorInsetsController()) {
+ if (mType == WindowInsets.Type.ime()) {
+ final IBinder window = mController.getHost().getWindowToken();
+ if (window != null) {
+ mController.getHost().getInputMethodManager().removeImeSurface(window);
+ }
+ }
+ }
}
@VisibleForTesting(visibility = PACKAGE)
diff --git a/core/java/android/view/KeyboardShortcutGroup.aidl b/core/java/android/view/KeyboardShortcutGroup.aidl
new file mode 100644
index 000000000000..6f219dbda7ef
--- /dev/null
+++ b/core/java/android/view/KeyboardShortcutGroup.aidl
@@ -0,0 +1,3 @@
+package android.view;
+
+@JavaOnlyStableParcelable parcelable KeyboardShortcutGroup;
diff --git a/core/java/android/view/KeyboardShortcutInfo.java b/core/java/android/view/KeyboardShortcutInfo.java
index 3f6fd646994c..3f49bf3380c1 100644
--- a/core/java/android/view/KeyboardShortcutInfo.java
+++ b/core/java/android/view/KeyboardShortcutInfo.java
@@ -81,12 +81,29 @@ public final class KeyboardShortcutInfo implements Parcelable {
* {@link KeyEvent#META_SYM_ON}.
*/
public KeyboardShortcutInfo(CharSequence label, char baseCharacter, int modifiers) {
+ this(label, null, baseCharacter, modifiers);
+ }
+
+ /**
+ * @param label The label that identifies the action performed by this shortcut.
+ * @param icon An icon that identifies the action performed by this shortcut.
+ * @param baseCharacter The character that triggers the shortcut.
+ * @param modifiers The set of modifiers that, combined with the key, trigger the shortcut.
+ * These should be a combination of {@link KeyEvent#META_CTRL_ON},
+ * {@link KeyEvent#META_SHIFT_ON}, {@link KeyEvent#META_META_ON},
+ * {@link KeyEvent#META_ALT_ON}, {@link KeyEvent#META_FUNCTION_ON} and
+ * {@link KeyEvent#META_SYM_ON}.
+ *
+ * @hide
+ */
+ public KeyboardShortcutInfo(
+ CharSequence label, @Nullable Icon icon, char baseCharacter, int modifiers) {
mLabel = label;
checkArgument(baseCharacter != MIN_VALUE);
mBaseCharacter = baseCharacter;
mKeycode = KeyEvent.KEYCODE_UNKNOWN;
mModifiers = modifiers;
- mIcon = null;
+ mIcon = icon;
}
private KeyboardShortcutInfo(Parcel source) {
diff --git a/core/java/android/view/SurfaceControlRegistry.java b/core/java/android/view/SurfaceControlRegistry.java
index 117b200d054e..a806bd226c36 100644
--- a/core/java/android/view/SurfaceControlRegistry.java
+++ b/core/java/android/view/SurfaceControlRegistry.java
@@ -295,16 +295,7 @@ public class SurfaceControlRegistry {
}
sCallStackDebuggingInitialized = true;
- sCallStackDebuggingMatchCall =
- SystemProperties.get("persist.wm.debug.sc.tx.log_match_call", null)
- .toLowerCase();
- sCallStackDebuggingMatchName =
- SystemProperties.get("persist.wm.debug.sc.tx.log_match_name", null)
- .toLowerCase();
- sLogAllTxCallsOnApply = sCallStackDebuggingMatchCall.contains("apply");
- // Only enable stack debugging if any of the match filters are set
- sCallStackDebuggingEnabled = !sCallStackDebuggingMatchCall.isEmpty()
- || !sCallStackDebuggingMatchName.isEmpty();
+ updateCallStackDebuggingParams();
if (sCallStackDebuggingEnabled) {
Log.d(TAG, "Enabling transaction call stack debugging:"
+ " matchCall=" + sCallStackDebuggingMatchCall
@@ -325,6 +316,11 @@ public class SurfaceControlRegistry {
final void checkCallStackDebugging(@NonNull String call,
@Nullable SurfaceControl.Transaction tx, @Nullable SurfaceControl sc,
@Nullable String details) {
+
+ if (sCallStackDebuggingInitialized && sCallStackDebuggingEnabled) {
+ updateCallStackDebuggingParams();
+ }
+
if (!sCallStackDebuggingEnabled) {
return;
}
@@ -356,6 +352,22 @@ public class SurfaceControlRegistry {
}
/**
+ * Updates the call stack debugging params from the system properties.
+ */
+ private static void updateCallStackDebuggingParams() {
+ sCallStackDebuggingMatchCall =
+ SystemProperties.get("persist.wm.debug.sc.tx.log_match_call", null)
+ .toLowerCase();
+ sCallStackDebuggingMatchName =
+ SystemProperties.get("persist.wm.debug.sc.tx.log_match_name", null)
+ .toLowerCase();
+ sLogAllTxCallsOnApply = sCallStackDebuggingMatchCall.contains("apply");
+ // Only enable stack debugging if any of the match filters are set
+ sCallStackDebuggingEnabled = !sCallStackDebuggingMatchCall.isEmpty()
+ || !sCallStackDebuggingMatchName.isEmpty();
+ }
+
+ /**
* Tests whether the given surface control name/method call matches the filters set for the
* call stack debugging.
*/
diff --git a/core/java/android/view/SurfaceView.java b/core/java/android/view/SurfaceView.java
index fedbe4a65e07..42d66ce6bf1b 100644
--- a/core/java/android/view/SurfaceView.java
+++ b/core/java/android/view/SurfaceView.java
@@ -366,13 +366,8 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall
Log.e(TAG, "Received invalid input event");
return;
}
- try {
- vri.processingBackKey(true);
- vri.enqueueInputEvent(keyEvent, null /* receiver */, 0 /* flags */,
- true /* processImmediately */);
- } finally {
- vri.processingBackKey(false);
- }
+ vri.enqueueInputEvent(keyEvent, null /* receiver */, 0 /* flags */,
+ true /* processImmediately */);
});
}
};
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 47669427cb9d..a23e3839c348 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -22,6 +22,7 @@ import static android.os.Trace.TRACE_TAG_VIEW;
import static android.service.autofill.Flags.FLAG_AUTOFILL_CREDMAN_DEV_INTEGRATION;
import static android.view.ContentInfo.SOURCE_DRAG_AND_DROP;
import static android.view.Surface.FRAME_RATE_CATEGORY_HIGH;
+import static android.view.Surface.FRAME_RATE_CATEGORY_HIGH_HINT;
import static android.view.Surface.FRAME_RATE_CATEGORY_LOW;
import static android.view.Surface.FRAME_RATE_CATEGORY_NORMAL;
import static android.view.Surface.FRAME_RATE_CATEGORY_NO_PREFERENCE;
@@ -29,6 +30,7 @@ import static android.view.Surface.FRAME_RATE_COMPATIBILITY_FIXED_SOURCE;
import static android.view.Surface.FRAME_RATE_COMPATIBILITY_GTE;
import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD;
import static android.view.accessibility.AccessibilityEvent.CONTENT_CHANGE_TYPE_UNDEFINED;
+import static android.view.accessibility.Flags.removeChildHoverCheckForTouchExploration;
import static android.view.displayhash.DisplayHashResultCallback.DISPLAY_HASH_ERROR_INVALID_BOUNDS;
import static android.view.displayhash.DisplayHashResultCallback.DISPLAY_HASH_ERROR_MISSING_WINDOW;
import static android.view.displayhash.DisplayHashResultCallback.DISPLAY_HASH_ERROR_NOT_VISIBLE_ON_SCREEN;
@@ -5512,6 +5514,14 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
public static final int DRAG_FLAG_START_INTENT_SENDER_ON_UNHANDLED_DRAG = 1 << 13;
/**
+ * Flag indicating that this drag will result in the caller activity's task to be hidden for the
+ * duration of the drag, this means that the source activity will not receive drag events for
+ * the current drag gesture. Only the current voice interaction service may use this flag.
+ * @hide
+ */
+ public static final int DRAG_FLAG_HIDE_CALLING_TASK_ON_DRAG_START = 1 << 14;
+
+ /**
* Vertical scroll factor cached by {@link #getVerticalScrollFactor}.
*/
private float mVerticalScrollFactor;
@@ -17477,9 +17487,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
* Dispatching hover events to {@link TouchDelegate} to improve accessibility.
* <p>
* This method is dispatching hover events to the delegate target to support explore by touch.
- * Similar to {@link ViewGroup#dispatchTouchEvent}, this method send proper hover events to
+ * Similar to {@link ViewGroup#dispatchTouchEvent}, this method sends proper hover events to
* the delegate target according to the pointer and the touch area of the delegate while touch
- * exploration enabled.
+ * exploration is enabled.
* </p>
*
* @param event The motion event dispatch to the delegate target.
@@ -17511,17 +17521,33 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
// hover events but receive accessibility focus, it should also not delegate to these
// views when hovered.
if (!oldHoveringTouchDelegate) {
- if ((action == MotionEvent.ACTION_HOVER_ENTER
- || action == MotionEvent.ACTION_HOVER_MOVE)
- && !pointInHoveredChild(event)
- && pointInDelegateRegion) {
- mHoveringTouchDelegate = true;
+ if (removeChildHoverCheckForTouchExploration()) {
+ if ((action == MotionEvent.ACTION_HOVER_ENTER
+ || action == MotionEvent.ACTION_HOVER_MOVE) && pointInDelegateRegion) {
+ mHoveringTouchDelegate = true;
+ }
+ } else {
+ if ((action == MotionEvent.ACTION_HOVER_ENTER
+ || action == MotionEvent.ACTION_HOVER_MOVE)
+ && !pointInHoveredChild(event)
+ && pointInDelegateRegion) {
+ mHoveringTouchDelegate = true;
+ }
}
} else {
- if (action == MotionEvent.ACTION_HOVER_EXIT
- || (action == MotionEvent.ACTION_HOVER_MOVE
+ if (removeChildHoverCheckForTouchExploration()) {
+ if (action == MotionEvent.ACTION_HOVER_EXIT
+ || (action == MotionEvent.ACTION_HOVER_MOVE)) {
+ if (!pointInDelegateRegion) {
+ mHoveringTouchDelegate = false;
+ }
+ }
+ } else {
+ if (action == MotionEvent.ACTION_HOVER_EXIT
+ || (action == MotionEvent.ACTION_HOVER_MOVE
&& (pointInHoveredChild(event) || !pointInDelegateRegion))) {
- mHoveringTouchDelegate = false;
+ mHoveringTouchDelegate = false;
+ }
}
}
switch (action) {
@@ -19630,7 +19656,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
*/
public final void setLeft(int left) {
if (left != mLeft) {
- mPrivateFlags4 |= PFLAG4_HAS_MOVED;
final boolean matrixIsIdentity = hasIdentityMatrix();
if (matrixIsIdentity) {
if (mAttachInfo != null) {
@@ -25584,6 +25609,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
? FRAME_RATE_CATEGORY_NORMAL : FRAME_RATE_CATEGORY_HIGH;
mSizeBasedFrameRateCategoryAndReason = category | FRAME_RATE_CATEGORY_REASON_LARGE;
}
+ mPrivateFlags4 |= PFLAG4_HAS_MOVED;
}
onSizeChanged(newWidth, newHeight, oldWidth, oldHeight);
@@ -27534,7 +27560,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
* @return a view with given ID if found, or {@code null} otherwise
* @see View#requireViewById(int)
*/
- /* TODO(b/347672184): Re-add @Nullable */
+ // Strictly speaking this should be marked as @Nullable but the nullability of the return value
+ // is deliberately left unspecified as idiomatically correct code can make assumptions either
+ // way based on local context, e.g. layout specification.
public final <T extends View> T findViewById(@IdRes int id) {
if (id == NO_ID) {
return null;
@@ -28627,20 +28655,20 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
return false;
}
- final boolean always = (flags & HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING) != 0;
- boolean fromIme = false;
- if (mAttachInfo.mViewRootImpl != null) {
- fromIme = mAttachInfo.mViewRootImpl.mWindowAttributes.type == TYPE_INPUT_METHOD;
+ int privFlags = 0;
+ if (mAttachInfo.mViewRootImpl != null
+ && mAttachInfo.mViewRootImpl.mWindowAttributes.type == TYPE_INPUT_METHOD) {
+ privFlags = HapticFeedbackConstants.PRIVATE_FLAG_APPLY_INPUT_METHOD_SETTINGS;
}
if (Flags.useVibratorHapticFeedback()) {
if (!mAttachInfo.canPerformHapticFeedback()) {
return false;
}
- getSystemVibrator().performHapticFeedback(
- feedbackConstant, always, "View#performHapticFeedback", fromIme);
+ getSystemVibrator().performHapticFeedback(feedbackConstant,
+ "View#performHapticFeedback", flags, privFlags);
return true;
}
- return mAttachInfo.mRootCallbacks.performHapticFeedback(feedbackConstant, always, fromIme);
+ return mAttachInfo.mRootCallbacks.performHapticFeedback(feedbackConstant, flags, privFlags);
}
private Vibrator getSystemVibrator() {
@@ -31675,7 +31703,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
interface Callbacks {
void playSoundEffect(int effectId);
- boolean performHapticFeedback(int effectId, boolean always, boolean fromIme);
+
+ boolean performHapticFeedback(int effectId,
+ @HapticFeedbackConstants.Flags int flags,
+ @HapticFeedbackConstants.PrivateFlags int privFlags);
}
/**
@@ -33897,8 +33928,24 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
* @hide
*/
protected int calculateFrameRateCategory() {
+ ViewRootImpl viewRootImpl = getViewRootImpl();
+ ViewParent parent = mParent;
+ boolean isInputMethodWindowType =
+ viewRootImpl.mWindowAttributes.type == TYPE_INPUT_METHOD;
+
+ // boost frame rate when the position or the size changed.
+ if (((mPrivateFlags4 & (PFLAG4_HAS_MOVED | PFLAG4_HAS_DRAWN)) == (
+ PFLAG4_HAS_MOVED | PFLAG4_HAS_DRAWN) || mLastFrameLeft != mLeft
+ || mLastFrameTop != mTop)
+ && viewRootImpl.shouldCheckFrameRateCategory()
+ && parent instanceof View
+ && ((View) parent).mFrameContentVelocity <= 0
+ && !isInputMethodWindowType) {
+
+ return FRAME_RATE_CATEGORY_HIGH_HINT | FRAME_RATE_CATEGORY_REASON_BOOST;
+ }
int category;
- switch (getViewRootImpl().intermittentUpdateState()) {
+ switch (viewRootImpl.intermittentUpdateState()) {
case ViewRootImpl.INTERMITTENT_STATE_INTERMITTENT -> {
if (!sToolkitFrameRateBySizeReadOnlyFlagValue) {
category = FRAME_RATE_CATEGORY_NORMAL;
@@ -33932,66 +33979,23 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
}
float velocity = mFrameContentVelocity;
final float frameRate = mPreferredFrameRate;
- ViewParent parent = mParent;
- boolean isInputMethodWindowType = false;
- if (mAttachInfo != null && mAttachInfo.mViewRootImpl != null) {
- isInputMethodWindowType =
- mAttachInfo.mViewRootImpl.mWindowAttributes.type == TYPE_INPUT_METHOD;
- }
- if (velocity <= 0 && Float.isNaN(frameRate)) {
- // The most common case is when nothing is set, so this special case is called
- // often.
- if (mAttachInfo.mViewVelocityApi
- && ((mPrivateFlags4 & (PFLAG4_HAS_MOVED | PFLAG4_HAS_DRAWN)) == (
- PFLAG4_HAS_MOVED | PFLAG4_HAS_DRAWN) || mLastFrameLeft != mLeft
- || mLastFrameTop != mTop)
- && viewRootImpl.shouldCheckFrameRate(false)
- && parent instanceof View
- && ((View) parent).mFrameContentVelocity <= 0
- && !isInputMethodWindowType) {
- viewRootImpl.votePreferredFrameRate(MAX_FRAME_RATE, FRAME_RATE_COMPATIBILITY_GTE);
- }
- if (viewRootImpl.shouldCheckFrameRateCategory()) {
- int frameRateCategory = calculateFrameRateCategory();
- int category = frameRateCategory & ~FRAME_RATE_CATEGORY_REASON_MASK;
- int reason = frameRateCategory & FRAME_RATE_CATEGORY_REASON_MASK;
- viewRootImpl.votePreferredFrameRateCategory(category, reason, this);
- mLastFrameRateCategory = frameRateCategory;
- }
- mLastFrameLeft = mLeft;
- mLastFrameTop = mTop;
- return;
- }
- if (viewRootImpl.shouldCheckFrameRate(frameRate > 0f)) {
+
+ if (viewRootImpl.shouldCheckFrameRate(frameRate > 0f)
+ && (frameRate > 0 || (mAttachInfo.mViewVelocityApi && velocity > 0f))) {
float velocityFrameRate = 0f;
- if (mAttachInfo.mViewVelocityApi) {
- if (velocity < 0f
- && ((mPrivateFlags4 & (PFLAG4_HAS_MOVED | PFLAG4_HAS_DRAWN)) == (
- PFLAG4_HAS_MOVED | PFLAG4_HAS_DRAWN) || mLastFrameLeft != mLeft
- || mLastFrameTop != mTop)
- && mParent instanceof View
- && ((View) mParent).mFrameContentVelocity <= 0
- && !isInputMethodWindowType
- ) {
- // This current calculation is very simple. If something on the screen
- // moved, then it votes for the highest velocity.
- velocityFrameRate = MAX_FRAME_RATE;
- } else if (velocity > 0f) {
- velocityFrameRate = convertVelocityToFrameRate(velocity);
- }
- }
- if (velocityFrameRate > 0f || frameRate > 0f) {
- int compatibility;
- float frameRateToSet;
- if (frameRate >= velocityFrameRate) {
- compatibility = FRAME_RATE_COMPATIBILITY_FIXED_SOURCE;
- frameRateToSet = frameRate;
- } else {
- compatibility = FRAME_RATE_COMPATIBILITY_GTE;
- frameRateToSet = velocityFrameRate;
- }
- viewRootImpl.votePreferredFrameRate(frameRateToSet, compatibility);
+ if (mAttachInfo.mViewVelocityApi && velocity > 0f) {
+ velocityFrameRate = convertVelocityToFrameRate(velocity);
+ }
+ int compatibility;
+ float frameRateToSet;
+ if (frameRate >= velocityFrameRate) {
+ compatibility = FRAME_RATE_COMPATIBILITY_FIXED_SOURCE;
+ frameRateToSet = frameRate;
+ } else {
+ compatibility = FRAME_RATE_COMPATIBILITY_GTE;
+ frameRateToSet = velocityFrameRate;
}
+ viewRootImpl.votePreferredFrameRate(frameRateToSet, compatibility);
}
if (viewRootImpl.shouldCheckFrameRateCategory()) {
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index b2c39b13525f..ceaca2257af4 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -2798,9 +2798,10 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
if (alreadyDispatchedToNewTouchTarget && target == newTouchTarget) {
handled = true;
} else {
- final boolean cancelChild = resetCancelNextUpFlag(target.child)
- || intercepted;
- if (dispatchTransformedTouchEvent(ev, cancelChild,
+ final boolean cancelChild =
+ (target.child != null && resetCancelNextUpFlag(target.child))
+ || intercepted;
+ if (target.child != null && dispatchTransformedTouchEvent(ev, cancelChild,
target.child, target.pointerIdBits)) {
handled = true;
}
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index 88dc3f4a3f37..2f204f9b1be9 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -23,7 +23,7 @@ import static android.graphics.HardwareRenderer.SYNC_LOST_SURFACE_REWARD_IF_FOUN
import static android.os.IInputConstants.INVALID_INPUT_EVENT_ID;
import static android.os.Trace.TRACE_TAG_VIEW;
import static android.util.SequenceUtils.getInitSeq;
-import static android.util.SequenceUtils.isIncomingSeqNewer;
+import static android.util.SequenceUtils.isIncomingSeqStale;
import static android.view.Display.DEFAULT_DISPLAY;
import static android.view.Display.INVALID_DISPLAY;
import static android.view.DragEvent.ACTION_DRAG_LOCATION;
@@ -128,8 +128,8 @@ import static android.view.inputmethod.InputMethodEditorTraceProto.InputMethodCl
import static com.android.internal.annotations.VisibleForTesting.Visibility.PACKAGE;
import static com.android.text.flags.Flags.disableHandwritingInitiatorForIme;
-import static com.android.window.flags.Flags.activityWindowInfoFlag;
import static com.android.window.flags.Flags.enableBufferTransformHintFromDisplay;
+import static com.android.window.flags.Flags.enableCaptionCompatInsetForceConsumption;
import static com.android.window.flags.Flags.insetsControlChangedItem;
import static com.android.window.flags.Flags.insetsControlSeq;
import static com.android.window.flags.Flags.setScPropertiesInClient;
@@ -727,8 +727,6 @@ public final class ViewRootImpl implements ViewParent,
boolean mUpcomingWindowFocus;
@GuardedBy("this")
boolean mUpcomingInTouchMode;
- // While set, allow this VRI to handle back key without drop it.
- private boolean mProcessingBackKey;
/**
* Compatibility {@link OnBackInvokedCallback} for windowless window, to forward the back
* key event host app.
@@ -1135,6 +1133,8 @@ public final class ViewRootImpl implements ViewParent,
// Take 24 and 30 as an example, 24 is not a divisor of 30.
// We consider there is a conflict.
private boolean mIsFrameRateConflicted = false;
+ // Used to check whether SurfaceControl has been replaced.
+ private boolean mSurfaceReplaced = false;
// Used to set frame rate compatibility.
@Surface.FrameRateCompatibility int mFrameRateCompatibility =
FRAME_RATE_COMPATIBILITY_FIXED_SOURCE;
@@ -1207,6 +1207,8 @@ public final class ViewRootImpl implements ViewParent,
private final Rect mChildBoundingInsets = new Rect();
private boolean mChildBoundingInsetsChanged = false;
+ private final boolean mDisableDrawWakeLock;
+
private String mTag = TAG;
private String mFpsTraceName;
private String mLargestViewTraceName;
@@ -1336,6 +1338,10 @@ public final class ViewRootImpl implements ViewParent,
}
mAppStartInfoTimestampsFlagValue = android.app.Flags.appStartInfoTimestamps();
+
+ // Disable DRAW_WAKE_LOCK starting U.
+ mDisableDrawWakeLock =
+ CompatChanges.isChangeEnabled(DISABLE_DRAW_WAKE_LOCK) && disableDrawWakeLock();
}
public static void addFirstDrawHandler(Runnable callback) {
@@ -1367,9 +1373,6 @@ public final class ViewRootImpl implements ViewParent,
*/
public void setActivityConfigCallback(@Nullable ActivityConfigCallback callback) {
mActivityConfigCallback = callback;
- if (!activityWindowInfoFlag()) {
- return;
- }
if (callback == null) {
mPendingActivityWindowInfo = null;
mLastReportedActivityWindowInfo = null;
@@ -2329,23 +2332,23 @@ public final class ViewRootImpl implements ViewParent,
if (mLastReportedFrames == null) {
return;
}
- if (isIncomingSeqNewer(mLastReportedFrames.seq, inOutFrames.seq)) {
+ if (isIncomingSeqStale(mLastReportedFrames.seq, inOutFrames.seq)) {
+ // If the incoming is stale, use the last reported instead.
+ inOutFrames.setTo(mLastReportedFrames);
+ } else {
// Keep track of the latest.
mLastReportedFrames.setTo(inOutFrames);
- } else {
- // If the last reported frames is newer, use the last reported instead.
- inOutFrames.setTo(mLastReportedFrames);
}
}
private void onInsetsStateChanged(@NonNull InsetsState insetsState) {
if (insetsControlSeq()) {
- if (isIncomingSeqNewer(mLastReportedInsetsStateSeq, insetsState.getSeq())) {
- mLastReportedInsetsStateSeq = insetsState.getSeq();
- } else {
- // The last reported InsetsState is newer. Skip.
+ if (isIncomingSeqStale(mLastReportedInsetsStateSeq, insetsState.getSeq())) {
+ // The incoming is stale. Skip.
return;
}
+ // Keep track of the latest.
+ mLastReportedInsetsStateSeq = insetsState.getSeq();
}
if (mTranslator != null) {
@@ -2362,13 +2365,13 @@ public final class ViewRootImpl implements ViewParent,
}
if (insetsControlSeq()) {
- if (isIncomingSeqNewer(mLastReportedActiveControlsSeq, activeControls.getSeq())) {
- mLastReportedActiveControlsSeq = activeControls.getSeq();
- } else {
- // The last reported controls is newer. Skip.
+ if (isIncomingSeqStale(mLastReportedActiveControlsSeq, activeControls.getSeq())) {
+ // The incoming is stale. Skip.
activeControls.release();
return;
}
+ // Keep track of the latest.
+ mLastReportedActiveControlsSeq = activeControls.getSeq();
}
final InsetsSourceControl[] controls = activeControls.get();
@@ -2472,11 +2475,7 @@ public final class ViewRootImpl implements ViewParent,
void pokeDrawLockIfNeeded() {
// Disable DRAW_WAKE_LOCK starting U. Otherwise, only need to acquire it for DOZE state.
- if (CompatChanges.isChangeEnabled(DISABLE_DRAW_WAKE_LOCK) && disableDrawWakeLock()) {
- return;
- }
-
- if (mAttachInfo.mDisplayState != Display.STATE_DOZE) {
+ if (mDisableDrawWakeLock || mAttachInfo.mDisplayState != Display.STATE_DOZE) {
// In DOZE_SUSPEND, Android shouldn't control the display; therefore we only poke the
// draw wake lock when display state is DOZE. Noted that Display#isDozeState includes
// DOZE_SUSPEND as well, so, it's not feasible here.
@@ -3187,7 +3186,9 @@ public final class ViewRootImpl implements ViewParent,
inOutParams.privateFlags &= ~PRIVATE_FLAG_FIT_INSETS_CONTROLLED;
}
- private void controlInsetsForCompatibility(WindowManager.LayoutParams params) {
+ /** Updates the {@link InsetsType}s to hide or show based on layout params. */
+ @VisibleForTesting
+ public void controlInsetsForCompatibility(WindowManager.LayoutParams params) {
final int sysUiVis = params.systemUiVisibility | params.subtreeSystemUiVisibility;
final int flags = params.flags;
final boolean matchParent = params.width == MATCH_PARENT && params.height == MATCH_PARENT;
@@ -3198,6 +3199,9 @@ public final class ViewRootImpl implements ViewParent,
|| ((flags & FLAG_FULLSCREEN) != 0 && matchParent && nonAttachedAppWindow);
final boolean navWasHiddenByFlags = (mTypesHiddenByFlags & Type.navigationBars()) != 0;
final boolean navIsHiddenByFlags = (sysUiVis & SYSTEM_UI_FLAG_HIDE_NAVIGATION) != 0;
+ final boolean captionWasHiddenByFlags = (mTypesHiddenByFlags & Type.captionBar()) != 0;
+ final boolean captionIsHiddenByFlags = (sysUiVis & SYSTEM_UI_FLAG_FULLSCREEN) != 0
+ || ((flags & FLAG_FULLSCREEN) != 0 && matchParent && nonAttachedAppWindow);
@InsetsType int typesToHide = 0;
@InsetsType int typesToShow = 0;
@@ -3211,6 +3215,13 @@ public final class ViewRootImpl implements ViewParent,
} else if (!navIsHiddenByFlags && navWasHiddenByFlags) {
typesToShow |= Type.navigationBars();
}
+ if (captionIsHiddenByFlags && !captionWasHiddenByFlags
+ && enableCaptionCompatInsetForceConsumption()) {
+ typesToHide |= Type.captionBar();
+ } else if (!captionIsHiddenByFlags && captionWasHiddenByFlags
+ && enableCaptionCompatInsetForceConsumption()) {
+ typesToShow |= Type.captionBar();
+ }
if (typesToHide != 0) {
getInsetsController().hide(typesToHide);
}
@@ -3820,6 +3831,7 @@ public final class ViewRootImpl implements ViewParent,
surfaceReplaced = (surfaceGenerationId != mSurface.getGenerationId()
|| surfaceControlChanged) && mSurface.isValid();
if (surfaceReplaced) {
+ mSurfaceReplaced = true;
mSurfaceSequenceId++;
}
if (alwaysConsumeSystemBarsChanged) {
@@ -4422,6 +4434,8 @@ public final class ViewRootImpl implements ViewParent,
}
mFrameRateCategoryHighCount = mFrameRateCategoryHighCount > 0
? mFrameRateCategoryHighCount - 1 : mFrameRateCategoryHighCount;
+ mFrameRateCategoryHighHintCount = mFrameRateCategoryHighHintCount > 0
+ ? mFrameRateCategoryHighHintCount - 1 : mFrameRateCategoryHighHintCount;
mFrameRateCategoryNormalCount = mFrameRateCategoryNormalCount > 0
? mFrameRateCategoryNormalCount - 1 : mFrameRateCategoryNormalCount;
mFrameRateCategoryLowCount = mFrameRateCategoryLowCount > 0
@@ -4430,6 +4444,7 @@ public final class ViewRootImpl implements ViewParent,
mPreferredFrameRate = -1;
mIsFrameRateConflicted = false;
mFrameRateCategoryChangeReason = FRAME_RATE_CATEGORY_REASON_UNKNOWN;
+ mSurfaceReplaced = false;
} else if (mPreferredFrameRate == 0) {
// From MSG_FRAME_RATE_SETTING, where mPreferredFrameRate is set to 0
setPreferredFrameRate(0);
@@ -7252,7 +7267,7 @@ public final class ViewRootImpl implements ViewParent,
// Find a reason for dropping or canceling the event.
final String reason;
// The embedded window is focused, allow this VRI to handle back key.
- if (!mAttachInfo.mHasWindowFocus && !(mProcessingBackKey && isBack(q.mEvent))
+ if (!mAttachInfo.mHasWindowFocus && !isBack(q.mEvent)
&& !q.mEvent.isFromSource(InputDevice.SOURCE_CLASS_POINTER)
&& !isAutofillUiShowing()) {
// This is a non-pointer event and the window doesn't currently have input focus
@@ -7530,7 +7545,6 @@ public final class ViewRootImpl implements ViewParent,
animationCallback.onBackCancelled();
} else {
topCallback.onBackInvoked();
- return FINISH_HANDLED;
}
break;
}
@@ -7538,14 +7552,16 @@ public final class ViewRootImpl implements ViewParent,
if (keyEvent.getAction() == KeyEvent.ACTION_UP) {
if (!keyEvent.isCanceled()) {
topCallback.onBackInvoked();
- return FINISH_HANDLED;
} else {
Log.d(mTag, "Skip onBackInvoked(), reason: keyEvent.isCanceled=true");
}
}
}
-
- return FINISH_NOT_HANDLED;
+ if (keyEvent.getAction() == KeyEvent.ACTION_UP) {
+ // forward a cancelled event so that following stages cancel their back logic
+ keyEvent.cancel();
+ }
+ return FORWARD;
}
@Override
@@ -9343,7 +9359,7 @@ public final class ViewRootImpl implements ViewParent,
onClientWindowFramesChanged(mTmpFrames);
- if (activityWindowInfoFlag() && mPendingActivityWindowInfo != null) {
+ if (mPendingActivityWindowInfo != null) {
final ActivityWindowInfo outInfo = mRelayoutResult.activityWindowInfo;
if (outInfo != null) {
mPendingActivityWindowInfo.set(outInfo);
@@ -9653,18 +9669,18 @@ public final class ViewRootImpl implements ViewParent,
* {@inheritDoc}
*/
@Override
- public boolean performHapticFeedback(int effectId, boolean always, boolean fromIme) {
+ public boolean performHapticFeedback(int effectId, int flags, int privFlags) {
if ((mDisplay.getFlags() & Display.FLAG_TOUCH_FEEDBACK_DISABLED) != 0) {
return false;
}
try {
if (USE_ASYNC_PERFORM_HAPTIC_FEEDBACK) {
- mWindowSession.performHapticFeedbackAsync(effectId, always, fromIme);
+ mWindowSession.performHapticFeedbackAsync(effectId, flags, privFlags);
return true;
} else {
// Original blocking binder call path.
- return mWindowSession.performHapticFeedback(effectId, always, fromIme);
+ return mWindowSession.performHapticFeedback(effectId, flags, privFlags);
}
} catch (RemoteException e) {
return false;
@@ -11200,11 +11216,6 @@ public final class ViewRootImpl implements ViewParent,
mHandler.obtainMessage(MSG_REQUEST_SCROLL_CAPTURE, listener).sendToTarget();
}
- // Make this VRI able to process back key without drop it.
- void processingBackKey(boolean processing) {
- mProcessingBackKey = processing;
- }
-
/**
* Collect and include any ScrollCaptureCallback instances registered with the window.
*
@@ -12536,15 +12547,8 @@ public final class ViewRootImpl implements ViewParent,
* @return whether the event was handled (i.e. onKeyPreIme consumed it if preImeOnly=true)
*/
public boolean injectBackKeyEvents(boolean preImeOnly) {
- boolean consumed;
- try {
- processingBackKey(true);
- sendBackKeyEvent(KeyEvent.ACTION_DOWN, preImeOnly);
- consumed = sendBackKeyEvent(KeyEvent.ACTION_UP, preImeOnly);
- } finally {
- processingBackKey(false);
- }
- return consumed;
+ sendBackKeyEvent(KeyEvent.ACTION_DOWN, preImeOnly);
+ return sendBackKeyEvent(KeyEvent.ACTION_UP, preImeOnly);
}
private boolean sendBackKeyEvent(int action, boolean preImeOnly) {
@@ -12920,8 +12924,9 @@ public final class ViewRootImpl implements ViewParent,
boolean traceFrameRateCategory = false;
try {
- if (frameRateCategory != FRAME_RATE_CATEGORY_DEFAULT
- && mLastPreferredFrameRateCategory != frameRateCategory) {
+ if ((frameRateCategory != FRAME_RATE_CATEGORY_DEFAULT
+ && mLastPreferredFrameRateCategory != frameRateCategory)
+ || mSurfaceReplaced) {
traceFrameRateCategory = Trace.isTagEnabled(Trace.TRACE_TAG_VIEW);
if (traceFrameRateCategory) {
String reason = reasonToString(frameRateReason);
@@ -12985,7 +12990,7 @@ public final class ViewRootImpl implements ViewParent,
boolean traceFrameRate = false;
try {
- if (mLastPreferredFrameRate != preferredFrameRate) {
+ if (mLastPreferredFrameRate != preferredFrameRate || mSurfaceReplaced) {
traceFrameRate = Trace.isTagEnabled(Trace.TRACE_TAG_VIEW);
if (traceFrameRate) {
Trace.traceBegin(
diff --git a/core/java/android/view/Window.java b/core/java/android/view/Window.java
index 7cb70bd1e9dc..0582afe6655d 100644
--- a/core/java/android/view/Window.java
+++ b/core/java/android/view/Window.java
@@ -1722,7 +1722,9 @@ public abstract class Window {
* @see View#findViewById(int)
* @see Window#requireViewById(int)
*/
- /* TODO(b/347672184): Re-add @Nullable */
+ // Strictly speaking this should be marked as @Nullable but the nullability of the return value
+ // is deliberately left unspecified as idiomatically correct code can make assumptions either
+ // way based on local context, e.g. layout specification.
public <T extends View> T findViewById(@IdRes int id) {
return getDecorView().findViewById(id);
}
diff --git a/core/java/android/view/WindowInsets.java b/core/java/android/view/WindowInsets.java
index 561d979f2f9d..987c8c8213f3 100644
--- a/core/java/android/view/WindowInsets.java
+++ b/core/java/android/view/WindowInsets.java
@@ -1708,6 +1708,7 @@ public final class WindowInsets {
}
mTypeBoundingRectsMap[indexOf(i)] = rects.toArray(new Rect[0]);
}
+ mSystemInsetsConsumed = false;
return this;
}
@@ -1736,6 +1737,7 @@ public final class WindowInsets {
}
mTypeMaxBoundingRectsMap[indexOf(i)] = rects.toArray(new Rect[0]);
}
+ mStableInsetsConsumed = false;
return this;
}
diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java
index 18006bb7866a..14978ede88cc 100644
--- a/core/java/android/view/WindowManager.java
+++ b/core/java/android/view/WindowManager.java
@@ -1668,6 +1668,15 @@ public interface WindowManager extends ViewManager {
public void requestAppKeyboardShortcuts(final KeyboardShortcutsReceiver receiver, int deviceId);
/**
+ * Request the application launch keyboard shortcuts the system has defined.
+ *
+ * @param deviceId The id of the {@link InputDevice} that will handle the shortcut.
+ *
+ * @hide
+ */
+ KeyboardShortcutGroup getApplicationLaunchKeyboardShortcuts(int deviceId);
+
+ /**
* Request for ime's keyboard shortcuts to be retrieved asynchronously.
*
* @param receiver The callback to be triggered when the result is ready.
diff --git a/core/java/android/view/WindowManagerImpl.java b/core/java/android/view/WindowManagerImpl.java
index b667427fd2c5..330e46af6381 100644
--- a/core/java/android/view/WindowManagerImpl.java
+++ b/core/java/android/view/WindowManagerImpl.java
@@ -237,6 +237,16 @@ public final class WindowManagerImpl implements WindowManager {
}
@Override
+ public KeyboardShortcutGroup getApplicationLaunchKeyboardShortcuts(int deviceId) {
+ try {
+ return WindowManagerGlobal.getWindowManagerService()
+ .getApplicationLaunchKeyboardShortcuts(deviceId);
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
+ @Override
public void requestImeKeyboardShortcuts(
final KeyboardShortcutsReceiver receiver, int deviceId) {
IResultReceiver resultReceiver = new IResultReceiver.Stub() {
diff --git a/core/java/android/view/WindowlessWindowManager.java b/core/java/android/view/WindowlessWindowManager.java
index 55f22a631c3b..78718586329e 100644
--- a/core/java/android/view/WindowlessWindowManager.java
+++ b/core/java/android/view/WindowlessWindowManager.java
@@ -503,13 +503,13 @@ public class WindowlessWindowManager implements IWindowSession {
}
@Override
- public boolean performHapticFeedback(int effectId, boolean always, boolean fromIme) {
+ public boolean performHapticFeedback(int effectId, int flags, int privFlags) {
return false;
}
@Override
- public void performHapticFeedbackAsync(int effectId, boolean always, boolean fromIme) {
- performHapticFeedback(effectId, always, fromIme);
+ public void performHapticFeedbackAsync(int effectId, int flags, int privFlags) {
+ performHapticFeedback(effectId, flags, privFlags);
}
@Override
diff --git a/core/java/android/view/accessibility/AccessibilityNodeInfo.java b/core/java/android/view/accessibility/AccessibilityNodeInfo.java
index a5ba294d6a19..90cfcb1e64a8 100644
--- a/core/java/android/view/accessibility/AccessibilityNodeInfo.java
+++ b/core/java/android/view/accessibility/AccessibilityNodeInfo.java
@@ -982,6 +982,7 @@ public class AccessibilityNodeInfo implements Parcelable {
private long mParentNodeId = UNDEFINED_NODE_ID;
private long mLabelForId = UNDEFINED_NODE_ID;
private long mLabeledById = UNDEFINED_NODE_ID;
+ private LongArray mLabeledByIds;
private long mTraversalBefore = UNDEFINED_NODE_ID;
private long mTraversalAfter = UNDEFINED_NODE_ID;
@@ -3599,6 +3600,131 @@ public class AccessibilityNodeInfo implements Parcelable {
}
/**
+ * Adds the view which serves as the label of the view represented by
+ * this info for accessibility purposes. When more than one labels are
+ * added, the content from each label is combined in the order that
+ * they are added.
+ * <p>
+ * If visible text can be used to describe or give meaning to this UI,
+ * this method is preferred. For example, a TextView before an EditText
+ * in the UI usually specifies what information is contained in the
+ * EditText. Hence, the EditText is labelled by the TextView.
+ * </p>
+ *
+ * @param label A view that labels this node's source.
+ */
+ @FlaggedApi(Flags.FLAG_SUPPORT_MULTIPLE_LABELEDBY)
+ public void addLabeledBy(@NonNull View label) {
+ addLabeledBy(label, AccessibilityNodeProvider.HOST_VIEW_ID);
+ }
+
+ /**
+ * Adds the view which serves as the label of the view represented by
+ * this info for accessibility purposes. If <code>virtualDescendantId</code>
+ * is {@link View#NO_ID} the root is set as the label. When more than one
+ * labels are added, the content from each label is combined in the order
+ * that they are added.
+ * <p>
+ * A virtual descendant is an imaginary View that is reported as a part of the view
+ * hierarchy for accessibility purposes. This enables custom views that draw complex
+ * content to report themselves as a tree of virtual views, thus conveying their
+ * logical structure.
+ * </p>
+ * <p>
+ * If visible text can be used to describe or give meaning to this UI,
+ * this method is preferred. For example, a TextView before an EditText
+ * in the UI usually specifies what information is contained in the
+ * EditText. Hence, the EditText is labelled by the TextView.
+ * </p>
+ * <p>
+ * <strong>Note:</strong> Cannot be called from an
+ * {@link android.accessibilityservice.AccessibilityService}.
+ * This class is made immutable before being delivered to an AccessibilityService.
+ * </p>
+ *
+ * @param root A root whose virtual descendant labels this node's source.
+ * @param virtualDescendantId The id of the virtual descendant.
+ */
+ @FlaggedApi(Flags.FLAG_SUPPORT_MULTIPLE_LABELEDBY)
+ public void addLabeledBy(@NonNull View root, int virtualDescendantId) {
+ enforceNotSealed();
+ Preconditions.checkNotNull(root, "%s must not be null", root);
+ if (mLabeledByIds == null) {
+ mLabeledByIds = new LongArray();
+ }
+ mLabeledById = makeNodeId(root.getAccessibilityViewId(), virtualDescendantId);
+ mLabeledByIds.add(mLabeledById);
+ }
+
+ /**
+ * Gets the list of node infos which serve as the labels of the view represented by
+ * this info for accessibility purposes.
+ *
+ * @return The list of labels in the order that they were added.
+ */
+ @FlaggedApi(Flags.FLAG_SUPPORT_MULTIPLE_LABELEDBY)
+ public @NonNull List<AccessibilityNodeInfo> getLabeledByList() {
+ enforceSealed();
+ List<AccessibilityNodeInfo> labels = new ArrayList<>();
+ if (mLabeledByIds == null) {
+ return labels;
+ }
+ for (int i = 0; i < mLabeledByIds.size(); i++) {
+ labels.add(getNodeForAccessibilityId(mConnectionId, mWindowId, mLabeledByIds.get(i)));
+ }
+ return labels;
+ }
+
+ /**
+ * Removes a label. If the label was not previously added to the node,
+ * calling this method has no effect.
+ * <p>
+ * <strong>Note:</strong> Cannot be called from an
+ * {@link android.accessibilityservice.AccessibilityService}.
+ * This class is made immutable before being delivered to an AccessibilityService.
+ * </p>
+ *
+ * @param label The node which serves as this node's label.
+ * @return true if the label was present
+ * @see #addLabeledBy(View)
+ */
+ @FlaggedApi(Flags.FLAG_SUPPORT_MULTIPLE_LABELEDBY)
+ public boolean removeLabeledBy(@NonNull View label) {
+ return removeLabeledBy(label, AccessibilityNodeProvider.HOST_VIEW_ID);
+ }
+
+ /**
+ * Removes a virtual label which is a descendant of the given
+ * <code>root</code>. If the label was not previously added to the node,
+ * calling this method has no effect.
+ *
+ * @param root The root of the virtual subtree.
+ * @param virtualDescendantId The id of the virtual node which serves as this node's label.
+ * @return true if the label was present
+ * @see #addLabeledBy(View, int)
+ */
+ @FlaggedApi(Flags.FLAG_SUPPORT_MULTIPLE_LABELEDBY)
+ public boolean removeLabeledBy(@NonNull View root, int virtualDescendantId) {
+ enforceNotSealed();
+ final LongArray labeledByIds = mLabeledByIds;
+ if (labeledByIds == null) {
+ return false;
+ }
+ final int rootAccessibilityViewId =
+ (root != null) ? root.getAccessibilityViewId() : UNDEFINED_ITEM_ID;
+ final long labeledById = makeNodeId(rootAccessibilityViewId, virtualDescendantId);
+ if (mLabeledById == labeledById) {
+ mLabeledById = UNDEFINED_NODE_ID;
+ }
+ final int index = labeledByIds.indexOf(labeledById);
+ if (index < 0) {
+ return false;
+ }
+ labeledByIds.remove(index);
+ return true;
+ }
+
+ /**
* Sets the view which serves as the label of the view represented by
* this info for accessibility purposes.
*
@@ -3631,7 +3757,17 @@ public class AccessibilityNodeInfo implements Parcelable {
enforceNotSealed();
final int rootAccessibilityViewId = (root != null)
? root.getAccessibilityViewId() : UNDEFINED_ITEM_ID;
+ if (Flags.supportMultipleLabeledby()) {
+ if (mLabeledByIds == null) {
+ mLabeledByIds = new LongArray();
+ } else {
+ mLabeledByIds.clear();
+ }
+ }
mLabeledById = makeNodeId(rootAccessibilityViewId, virtualDescendantId);
+ if (Flags.supportMultipleLabeledby()) {
+ mLabeledByIds.add(mLabeledById);
+ }
}
/**
@@ -4242,6 +4378,12 @@ public class AccessibilityNodeInfo implements Parcelable {
fieldIndex++;
if (mLabeledById != DEFAULT.mLabeledById) nonDefaultFields |= bitAt(fieldIndex);
fieldIndex++;
+ if (Flags.supportMultipleLabeledby()) {
+ if (!LongArray.elementsEqual(mLabeledByIds, DEFAULT.mLabeledByIds)) {
+ nonDefaultFields |= bitAt(fieldIndex);
+ }
+ fieldIndex++;
+ }
if (mTraversalBefore != DEFAULT.mTraversalBefore) nonDefaultFields |= bitAt(fieldIndex);
fieldIndex++;
if (mTraversalAfter != DEFAULT.mTraversalAfter) nonDefaultFields |= bitAt(fieldIndex);
@@ -4383,6 +4525,20 @@ public class AccessibilityNodeInfo implements Parcelable {
if (isBitSet(nonDefaultFields, fieldIndex++)) parcel.writeLong(mParentNodeId);
if (isBitSet(nonDefaultFields, fieldIndex++)) parcel.writeLong(mLabelForId);
if (isBitSet(nonDefaultFields, fieldIndex++)) parcel.writeLong(mLabeledById);
+ if (Flags.supportMultipleLabeledby()) {
+ if (isBitSet(nonDefaultFields, fieldIndex++)) {
+ final LongArray labeledByIds = mLabeledByIds;
+ if (labeledByIds == null) {
+ parcel.writeInt(0);
+ } else {
+ final int labeledByIdsSize = labeledByIds.size();
+ parcel.writeInt(labeledByIdsSize);
+ for (int i = 0; i < labeledByIdsSize; i++) {
+ parcel.writeLong(labeledByIds.get(i));
+ }
+ }
+ }
+ }
if (isBitSet(nonDefaultFields, fieldIndex++)) parcel.writeLong(mTraversalBefore);
if (isBitSet(nonDefaultFields, fieldIndex++)) parcel.writeLong(mTraversalAfter);
if (isBitSet(nonDefaultFields, fieldIndex++)) {
@@ -4550,6 +4706,9 @@ public class AccessibilityNodeInfo implements Parcelable {
mParentNodeId = other.mParentNodeId;
mLabelForId = other.mLabelForId;
mLabeledById = other.mLabeledById;
+ if (Flags.supportMultipleLabeledby()) {
+ mLabeledByIds = other.mLabeledByIds;
+ }
mTraversalBefore = other.mTraversalBefore;
mTraversalAfter = other.mTraversalAfter;
mMinDurationBetweenContentChanges = other.mMinDurationBetweenContentChanges;
@@ -4656,6 +4815,20 @@ public class AccessibilityNodeInfo implements Parcelable {
if (isBitSet(nonDefaultFields, fieldIndex++)) mParentNodeId = parcel.readLong();
if (isBitSet(nonDefaultFields, fieldIndex++)) mLabelForId = parcel.readLong();
if (isBitSet(nonDefaultFields, fieldIndex++)) mLabeledById = parcel.readLong();
+ if (Flags.supportMultipleLabeledby()) {
+ if (isBitSet(nonDefaultFields, fieldIndex++)) {
+ final int labeledByIdsSize = parcel.readInt();
+ if (labeledByIdsSize <= 0) {
+ mLabeledByIds = null;
+ } else {
+ mLabeledByIds = new LongArray(labeledByIdsSize);
+ for (int i = 0; i < labeledByIdsSize; i++) {
+ final long labeledById = parcel.readLong();
+ mLabeledByIds.add(labeledById);
+ }
+ }
+ }
+ }
if (isBitSet(nonDefaultFields, fieldIndex++)) mTraversalBefore = parcel.readLong();
if (isBitSet(nonDefaultFields, fieldIndex++)) mTraversalAfter = parcel.readLong();
if (isBitSet(nonDefaultFields, fieldIndex++)) {
diff --git a/core/java/android/view/accessibility/a11ychecker/Android.bp b/core/java/android/view/accessibility/a11ychecker/Android.bp
deleted file mode 100644
index e5a577c16421..000000000000
--- a/core/java/android/view/accessibility/a11ychecker/Android.bp
+++ /dev/null
@@ -1,7 +0,0 @@
-java_library_static {
- name: "A11yChecker",
- srcs: [
- "*.java",
- ],
- visibility: ["//visibility:public"],
-}
diff --git a/core/java/android/view/accessibility/flags/accessibility_flags.aconfig b/core/java/android/view/accessibility/flags/accessibility_flags.aconfig
index d0bc57b9afbe..ed2bf79c51f4 100644
--- a/core/java/android/view/accessibility/flags/accessibility_flags.aconfig
+++ b/core/java/android/view/accessibility/flags/accessibility_flags.aconfig
@@ -128,6 +128,13 @@ flag {
}
flag {
+ namespace: "accessibility"
+ name: "remove_child_hover_check_for_touch_exploration"
+ description: "Remove a check for a hovered child that prevents touch events from being delegated to non-direct descendants"
+ bug: "304770837"
+}
+
+flag {
name: "skip_accessibility_warning_dialog_for_trusted_services"
namespace: "accessibility"
description: "Skips showing the accessibility warning dialog for trusted services."
@@ -177,6 +184,13 @@ flag {
}
flag {
+ name: "support_multiple_labeledby"
+ namespace: "accessibility"
+ description: "Feature flag for supporting multiple labels in AccessibilityNodeInfo labeledby api"
+ bug: "333780959"
+}
+
+flag {
name: "support_system_pinch_zoom_opt_out_apis"
namespace: "accessibility"
description: "Feature flag for declaring system pinch zoom opt-out apis"
diff --git a/core/java/android/view/autofill/AutofillFeatureFlags.java b/core/java/android/view/autofill/AutofillFeatureFlags.java
index 5b1c7d54ddb7..0ab51e45a951 100644
--- a/core/java/android/view/autofill/AutofillFeatureFlags.java
+++ b/core/java/android/view/autofill/AutofillFeatureFlags.java
@@ -563,7 +563,7 @@ public class AutofillFeatureFlags {
return DeviceConfig.getBoolean(
DeviceConfig.NAMESPACE_AUTOFILL,
DEVICE_CONFIG_ENABLE_RELAYOUT,
- true);
+ false);
}
/** @hide */
diff --git a/core/java/android/view/inputmethod/IInputMethodManagerGlobalInvoker.java b/core/java/android/view/inputmethod/IInputMethodManagerGlobalInvoker.java
index e7a2fb92a382..07a97948e7fd 100644
--- a/core/java/android/view/inputmethod/IInputMethodManagerGlobalInvoker.java
+++ b/core/java/android/view/inputmethod/IInputMethodManagerGlobalInvoker.java
@@ -465,6 +465,20 @@ final class IInputMethodManagerGlobalInvoker {
}
@AnyThread
+ @RequiresPermission(Manifest.permission.WRITE_SECURE_SETTINGS)
+ static void onImeSwitchButtonClickFromSystem(int displayId) {
+ final IInputMethodManager service = getService();
+ if (service == null) {
+ return;
+ }
+ try {
+ service.onImeSwitchButtonClickFromSystem(displayId);
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
+ @AnyThread
@Nullable
@RequiresPermission(value = Manifest.permission.INTERACT_ACROSS_USERS_FULL, conditional = true)
static InputMethodSubtype getCurrentInputMethodSubtype(@UserIdInt int userId) {
diff --git a/core/java/android/view/inputmethod/InputMethodInfo.java b/core/java/android/view/inputmethod/InputMethodInfo.java
index 11ee286652a1..0e66f7ac47b7 100644
--- a/core/java/android/view/inputmethod/InputMethodInfo.java
+++ b/core/java/android/view/inputmethod/InputMethodInfo.java
@@ -92,7 +92,7 @@ public final class InputMethodInfo implements Parcelable {
*
* @see #createImeLanguageSettingsActivityIntent()
*/
- @FlaggedApi(android.view.inputmethod.Flags.FLAG_IME_SWITCHER_REVAMP)
+ @FlaggedApi(android.view.inputmethod.Flags.FLAG_IME_SWITCHER_REVAMP_API)
public static final String ACTION_IME_LANGUAGE_SETTINGS =
"android.view.inputmethod.action.IME_LANGUAGE_SETTINGS";
@@ -298,7 +298,7 @@ public final class InputMethodInfo implements Parcelable {
com.android.internal.R.styleable.InputMethod);
settingsActivityComponent = sa.getString(
com.android.internal.R.styleable.InputMethod_settingsActivity);
- if (Flags.imeSwitcherRevamp()) {
+ if (Flags.imeSwitcherRevampApi()) {
languageSettingsActivityComponent = sa.getString(
com.android.internal.R.styleable.InputMethod_languageSettingsActivity);
}
@@ -888,15 +888,16 @@ public final class InputMethodInfo implements Parcelable {
*
* @attr ref R.styleable#InputMethod_languageSettingsActivity
*/
- @FlaggedApi(android.view.inputmethod.Flags.FLAG_IME_SWITCHER_REVAMP)
+ @FlaggedApi(android.view.inputmethod.Flags.FLAG_IME_SWITCHER_REVAMP_API)
@Nullable
public Intent createImeLanguageSettingsActivityIntent() {
- if (TextUtils.isEmpty(mLanguageSettingsActivityName)) {
+ final var activityName = !TextUtils.isEmpty(mLanguageSettingsActivityName)
+ ? mLanguageSettingsActivityName : mSettingsActivityName;
+ if (TextUtils.isEmpty(activityName)) {
return null;
}
return new Intent(ACTION_IME_LANGUAGE_SETTINGS).setComponent(
- new ComponentName(getServiceInfo().packageName,
- mLanguageSettingsActivityName)
+ new ComponentName(getServiceInfo().packageName, activityName)
);
}
diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java
index 0c63e583f326..fed8eea97688 100644
--- a/core/java/android/view/inputmethod/InputMethodManager.java
+++ b/core/java/android/view/inputmethod/InputMethodManager.java
@@ -1352,12 +1352,16 @@ public final class InputMethodManager {
case MSG_SET_VISIBILITY:
final boolean visible = msg.arg1 != 0;
synchronized (mH) {
- if (visible) {
- showSoftInput(mServedView, /* flags */ 0);
- } else {
- if (mCurRootView != null
- && mCurRootView.getInsetsController() != null) {
- mCurRootView.getInsetsController().hide(WindowInsets.Type.ime());
+ if (mCurRootView != null) {
+ final var insetsController = mCurRootView.getInsetsController();
+ if (insetsController != null) {
+ if (visible) {
+ insetsController.show(WindowInsets.Type.ime(),
+ false /* fromIme */, null /* statsToken */);
+ } else {
+ insetsController.hide(WindowInsets.Type.ime(),
+ false /* fromIme */, null /* statsToken */);
+ }
}
}
}
@@ -2334,16 +2338,18 @@ public final class InputMethodManager {
ImeTracker.forLogging().onProgress(statsToken, ImeTracker.PHASE_CLIENT_VIEW_SERVED);
if (Flags.refactorInsetsController()) {
+ final var viewRootImpl = view.getViewRootImpl();
// In case of a running show IME animation, it should not be requested visible,
// otherwise the animation would jump and not be controlled by the user anymore
- if ((mCurRootView.getInsetsController().computeUserAnimatingTypes()
- & WindowInsets.Type.ime()) == 0) {
+ if (viewRootImpl != null
+ && (viewRootImpl.getInsetsController().computeUserAnimatingTypes()
+ & WindowInsets.Type.ime()) == 0) {
// TODO(b/322992891) handle case of SHOW_IMPLICIT
- view.getWindowInsetsController().show(WindowInsets.Type.ime());
+ viewRootImpl.getInsetsController().show(WindowInsets.Type.ime(),
+ false /* fromIme */, statsToken);
return true;
- } else {
- return false;
}
+ return false;
} else {
// Makes sure to call ImeInsetsSourceConsumer#onShowRequested on the UI thread.
// TODO(b/229426865): call WindowInsetsController#show instead.
@@ -2497,7 +2503,10 @@ public final class InputMethodManager {
if (Flags.refactorInsetsController()) {
// TODO(b/322992891) handle case of HIDE_IMPLICIT_ONLY
- servedView.getWindowInsetsController().hide(WindowInsets.Type.ime());
+ final var viewRootImpl = servedView.getViewRootImpl();
+ if (viewRootImpl != null) {
+ viewRootImpl.getInsetsController().hide(WindowInsets.Type.ime());
+ }
return true;
} else {
return IInputMethodManagerGlobalInvoker.hideSoftInput(mClient, windowToken,
@@ -4354,6 +4363,20 @@ public final class InputMethodManager {
}
/**
+ * Called when the IME switch button was clicked from the system. Depending on the number of
+ * enabled IME subtypes, this will either switch to the next IME/subtype, or show the input
+ * method picker dialog.
+ *
+ * @param displayId The ID of the display where the input method picker dialog should be shown.
+ *
+ * @hide
+ */
+ @RequiresPermission(Manifest.permission.WRITE_SECURE_SETTINGS)
+ public void onImeSwitchButtonClickFromSystem(int displayId) {
+ IInputMethodManagerGlobalInvoker.onImeSwitchButtonClickFromSystem(displayId);
+ }
+
+ /**
* A test API for CTS to check whether there are any pending IME visibility requests.
*
* @return {@code true} iff there are pending IME visibility requests.
diff --git a/core/java/android/view/inputmethod/flags.aconfig b/core/java/android/view/inputmethod/flags.aconfig
index 56e5bcf79933..e294ee2d3a91 100644
--- a/core/java/android/view/inputmethod/flags.aconfig
+++ b/core/java/android/view/inputmethod/flags.aconfig
@@ -82,6 +82,15 @@ flag {
}
flag {
+ name: "ime_switcher_revamp_api"
+ is_exported: true
+ namespace: "input_method"
+ description: "Feature flag for APIs for revamping the Input Method Switcher menu"
+ bug: "311791923"
+ is_fixed_read_only: true
+}
+
+flag {
name: "initiation_without_input_connection"
namespace: "input_method"
description: "Feature flag for initiating handwriting without InputConnection"
diff --git a/core/java/android/webkit/WebViewFactory.java b/core/java/android/webkit/WebViewFactory.java
index 10344792eee2..c53a0e158dea 100644
--- a/core/java/android/webkit/WebViewFactory.java
+++ b/core/java/android/webkit/WebViewFactory.java
@@ -36,6 +36,7 @@ import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.SystemClock;
import android.os.Trace;
+import android.os.UserHandle;
import android.text.TextUtils;
import android.util.AndroidRuntimeException;
import android.util.ArraySet;
@@ -339,10 +340,10 @@ public final class WebViewFactory {
if (sProviderInstance != null) return sProviderInstance;
sTimestamps.mWebViewLoadStart = SystemClock.uptimeMillis();
- final int uid = android.os.Process.myUid();
- if (uid == android.os.Process.ROOT_UID || uid == android.os.Process.SYSTEM_UID
- || uid == android.os.Process.PHONE_UID || uid == android.os.Process.NFC_UID
- || uid == android.os.Process.BLUETOOTH_UID) {
+ final int appId = UserHandle.getAppId(android.os.Process.myUid());
+ if (appId == android.os.Process.ROOT_UID || appId == android.os.Process.SYSTEM_UID
+ || appId == android.os.Process.PHONE_UID || appId == android.os.Process.NFC_UID
+ || appId == android.os.Process.BLUETOOTH_UID) {
throw new UnsupportedOperationException(
"For security reasons, WebView is not allowed in privileged processes");
}
diff --git a/core/java/android/webkit/WebViewProviderInfo.java b/core/java/android/webkit/WebViewProviderInfo.java
index 6629fdc4cdee..16727c30dfd4 100644
--- a/core/java/android/webkit/WebViewProviderInfo.java
+++ b/core/java/android/webkit/WebViewProviderInfo.java
@@ -23,6 +23,9 @@ import android.os.Parcel;
import android.os.Parcelable;
import android.util.Base64;
+import java.util.Arrays;
+import java.util.Objects;
+
/**
* @hide
*/
@@ -80,6 +83,35 @@ public final class WebViewProviderInfo implements Parcelable {
out.writeTypedArray(signatures, 0);
}
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o instanceof WebViewProviderInfo that) {
+ return this.packageName.equals(that.packageName)
+ && this.description.equals(that.description)
+ && this.availableByDefault == that.availableByDefault
+ && this.isFallback == that.isFallback
+ && Arrays.equals(this.signatures, that.signatures);
+ } else {
+ return false;
+ }
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(packageName, description, availableByDefault,
+ isFallback, Arrays.hashCode(signatures));
+ }
+
+ @Override
+ public String toString() {
+ return "WebViewProviderInfo; packageName=" + packageName
+ + " description=\"" + description
+ + "\" availableByDefault=" + availableByDefault
+ + " isFallback=" + isFallback
+ + " signatures=" + Arrays.toString(signatures);
+ }
+
// fields read from framework resource
public final String packageName;
public final String description;
diff --git a/core/java/android/widget/RemoteViews.java b/core/java/android/widget/RemoteViews.java
index 9512347b0143..0dadbe374aa4 100644
--- a/core/java/android/widget/RemoteViews.java
+++ b/core/java/android/widget/RemoteViews.java
@@ -7438,8 +7438,7 @@ public class RemoteViews implements Parcelable, Filter {
// If the user interacts with a visible element it is safe to assume they consent that
// something is going to start.
opts.setPendingIntentBackgroundActivityStartMode(
- ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED);
- opts.setPendingIntentBackgroundActivityLaunchAllowedByPermission(true);
+ ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS);
return Pair.create(intent, opts);
}
}
diff --git a/core/java/android/window/ActivityWindowInfo.java b/core/java/android/window/ActivityWindowInfo.java
index 946bb823398c..71c500cd1bfa 100644
--- a/core/java/android/window/ActivityWindowInfo.java
+++ b/core/java/android/window/ActivityWindowInfo.java
@@ -18,6 +18,8 @@ package android.window;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.app.Activity;
+import android.app.ActivityThread;
import android.graphics.Rect;
import android.os.Parcel;
import android.os.Parcelable;
@@ -144,4 +146,15 @@ public final class ActivityWindowInfo implements Parcelable {
+ ", taskFragmentBounds=" + mTaskFragmentBounds
+ "}";
}
+
+ /** Gets the {@link ActivityWindowInfo} of the given activity. */
+ @Nullable
+ public static ActivityWindowInfo getActivityWindowInfo(@NonNull Activity activity) {
+ if (activity.isFinishing()) {
+ return null;
+ }
+ final ActivityThread.ActivityClientRecord record = ActivityThread.currentActivityThread()
+ .getActivityClient(activity.getActivityToken());
+ return record != null ? record.getActivityWindowInfo() : null;
+ }
}
diff --git a/core/java/android/window/BackProgressAnimator.java b/core/java/android/window/BackProgressAnimator.java
index d28500c0a1ea..12d4ab8bc963 100644
--- a/core/java/android/window/BackProgressAnimator.java
+++ b/core/java/android/window/BackProgressAnimator.java
@@ -16,12 +16,15 @@
package android.window;
+import static com.android.internal.annotations.VisibleForTesting.Visibility.PACKAGE;
+
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.util.FloatProperty;
import android.util.TimeUtils;
import android.view.Choreographer;
+import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.dynamicanimation.animation.DynamicAnimation;
import com.android.internal.dynamicanimation.animation.FlingAnimation;
import com.android.internal.dynamicanimation.animation.FloatValueHolder;
@@ -210,7 +213,8 @@ public class BackProgressAnimator implements DynamicAnimation.OnAnimationUpdateL
}
/** Returns true if the back animation is in progress. */
- boolean isBackAnimationInProgress() {
+ @VisibleForTesting(visibility = PACKAGE)
+ public boolean isBackAnimationInProgress() {
return mBackAnimationInProgress;
}
diff --git a/core/java/android/window/ITaskFragmentOrganizerController.aidl b/core/java/android/window/ITaskFragmentOrganizerController.aidl
index 4706dfd1a76c..ac57c0056c2b 100644
--- a/core/java/android/window/ITaskFragmentOrganizerController.aidl
+++ b/core/java/android/window/ITaskFragmentOrganizerController.aidl
@@ -39,25 +39,6 @@ interface ITaskFragmentOrganizerController {
void unregisterOrganizer(in ITaskFragmentOrganizer organizer);
/**
- * Registers remote animations per transition type for the organizer. It will override the
- * animations if the transition only contains windows that belong to the organized
- * TaskFragments in the given Task.
- */
- void registerRemoteAnimations(in ITaskFragmentOrganizer organizer,
- in RemoteAnimationDefinition definition);
-
- /**
- * Unregisters remote animations per transition type for the organizer.
- */
- void unregisterRemoteAnimations(in ITaskFragmentOrganizer organizer);
-
- /**
- * Checks if an activity organized by a {@link android.window.TaskFragmentOrganizer} and
- * only occupies a portion of Task bounds.
- */
- boolean isActivityEmbedded(in IBinder activityToken);
-
- /**
* Notifies the server that the organizer has finished handling the given transaction. The
* server should apply the given {@link WindowContainerTransaction} for the necessary changes.
*/
diff --git a/core/java/android/window/SnapshotDrawerUtils.java b/core/java/android/window/SnapshotDrawerUtils.java
index 4c8bad6d0aff..205f1defccd1 100644
--- a/core/java/android/window/SnapshotDrawerUtils.java
+++ b/core/java/android/window/SnapshotDrawerUtils.java
@@ -412,8 +412,7 @@ public class SnapshotDrawerUtils {
final WindowManager.LayoutParams attrs = Flags.drawSnapshotAspectRatioMatch()
? info.mainWindowLayoutParams : info.topOpaqueWindowLayoutParams;
final WindowManager.LayoutParams mainWindowParams = info.mainWindowLayoutParams;
- final InsetsState topWindowInsetsState = info.topOpaqueWindowInsetsState;
- if (attrs == null || mainWindowParams == null || topWindowInsetsState == null) {
+ if (attrs == null || mainWindowParams == null) {
Log.w(TAG, "unable to create taskSnapshot surface ");
return null;
}
@@ -456,7 +455,10 @@ public class SnapshotDrawerUtils {
return layoutParams;
}
- static Rect getSystemBarInsets(Rect frame, InsetsState state) {
+ static Rect getSystemBarInsets(Rect frame, @Nullable InsetsState state) {
+ if (state == null) {
+ return new Rect();
+ }
return state.calculateInsets(frame, WindowInsets.Type.systemBars(),
false /* ignoreVisibility */).toRect();
}
diff --git a/core/java/android/window/TaskFragmentOrganizer.java b/core/java/android/window/TaskFragmentOrganizer.java
index 461eab61e393..8e429cb376a6 100644
--- a/core/java/android/window/TaskFragmentOrganizer.java
+++ b/core/java/android/window/TaskFragmentOrganizer.java
@@ -21,6 +21,7 @@ import static android.view.WindowManager.TRANSIT_CLOSE;
import static android.view.WindowManager.TRANSIT_FIRST_CUSTOM;
import static android.view.WindowManager.TRANSIT_NONE;
import static android.view.WindowManager.TRANSIT_OPEN;
+import static android.window.ActivityWindowInfo.getActivityWindowInfo;
import android.annotation.CallSuper;
import android.annotation.FlaggedApi;
@@ -29,16 +30,17 @@ import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.RequiresPermission;
import android.annotation.TestApi;
+import android.app.Activity;
import android.os.Bundle;
import android.os.IBinder;
import android.os.RemoteException;
-import android.view.RemoteAnimationDefinition;
import android.view.WindowManager;
import com.android.window.flags.Flags;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
+import java.util.Objects;
import java.util.concurrent.Executor;
/**
@@ -205,34 +207,6 @@ public class TaskFragmentOrganizer extends WindowOrganizer {
}
/**
- * Registers remote animations per transition type for the organizer. It will override the
- * animations if the transition only contains windows that belong to the organized
- * TaskFragments, and at least one of the transition window is embedded (not filling the Task).
- * @hide
- */
- @CallSuper
- public void registerRemoteAnimations(@NonNull RemoteAnimationDefinition definition) {
- try {
- getController().registerRemoteAnimations(mInterface, definition);
- } catch (RemoteException e) {
- throw e.rethrowFromSystemServer();
- }
- }
-
- /**
- * Unregisters remote animations per transition type for the organizer.
- * @hide
- */
- @CallSuper
- public void unregisterRemoteAnimations() {
- try {
- getController().unregisterRemoteAnimations(mInterface);
- } catch (RemoteException e) {
- throw e.rethrowFromSystemServer();
- }
- }
-
- /**
* Notifies the server that the organizer has finished handling the given transaction. The
* server should apply the given {@link WindowContainerTransaction} for the necessary changes.
*
@@ -353,15 +327,15 @@ public class TaskFragmentOrganizer extends WindowOrganizer {
}
/**
- * Checks if an activity organized by a {@link android.window.TaskFragmentOrganizer} and
+ * Checks if an activity is organized by a {@link android.window.TaskFragmentOrganizer} and
* only occupies a portion of Task bounds.
+ *
+ * @see ActivityWindowInfo for additional window info.
* @hide
*/
- public boolean isActivityEmbedded(@NonNull IBinder activityToken) {
- try {
- return getController().isActivityEmbedded(activityToken);
- } catch (RemoteException e) {
- throw e.rethrowFromSystemServer();
- }
+ public static boolean isActivityEmbedded(@NonNull Activity activity) {
+ Objects.requireNonNull(activity);
+ final ActivityWindowInfo activityWindowInfo = getActivityWindowInfo(activity);
+ return activityWindowInfo != null && activityWindowInfo.isEmbedded();
}
}
diff --git a/core/java/android/window/TransitionInfo.java b/core/java/android/window/TransitionInfo.java
index 8ded608b71e1..1083f64513b1 100644
--- a/core/java/android/window/TransitionInfo.java
+++ b/core/java/android/window/TransitionInfo.java
@@ -205,7 +205,7 @@ public final class TransitionInfo implements Parcelable {
FLAG_SYNC,
FLAG_CONFIG_AT_END,
FLAG_FIRST_CUSTOM
- })
+ }, flag = true)
public @interface ChangeFlags {}
private final @TransitionType int mType;
diff --git a/core/java/android/window/TransitionRequestInfo.java b/core/java/android/window/TransitionRequestInfo.java
index cc225767bd49..253337b553da 100644
--- a/core/java/android/window/TransitionRequestInfo.java
+++ b/core/java/android/window/TransitionRequestInfo.java
@@ -471,7 +471,7 @@ public final class TransitionRequestInfo implements Parcelable {
"pipTask = " + mPipTask + ", " +
"remoteTransition = " + mRemoteTransition + ", " +
"displayChange = " + mDisplayChange + ", " +
- "flags = " + mFlags + ", " +
+ "flags = " + Integer.toHexString(mFlags) + ", " +
"debugId = " + mDebugId +
" }";
}
diff --git a/core/java/android/window/WindowContainerTransaction.java b/core/java/android/window/WindowContainerTransaction.java
index f4f6c8aa3636..e9d77f8aaf80 100644
--- a/core/java/android/window/WindowContainerTransaction.java
+++ b/core/java/android/window/WindowContainerTransaction.java
@@ -25,6 +25,7 @@ import static android.window.TaskFragmentOperation.OP_TYPE_SET_ADJACENT_TASK_FRA
import static android.window.TaskFragmentOperation.OP_TYPE_SET_COMPANION_TASK_FRAGMENT;
import static android.window.TaskFragmentOperation.OP_TYPE_START_ACTIVITY_IN_TASK_FRAGMENT;
+import android.annotation.FlaggedApi;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.TestApi;
@@ -41,9 +42,12 @@ import android.os.Parcel;
import android.os.Parcelable;
import android.util.ArrayMap;
import android.view.InsetsFrameProvider;
+import android.view.InsetsSource;
import android.view.SurfaceControl;
import android.view.WindowInsets.Type.InsetsType;
+import com.android.window.flags.Flags;
+
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -711,14 +715,16 @@ public final class WindowContainerTransaction implements Parcelable {
@NonNull
public WindowContainerTransaction addInsetsSource(
@NonNull WindowContainerToken receiver,
- IBinder owner, int index, @InsetsType int type, Rect frame, Rect[] boundingRects) {
+ IBinder owner, int index, @InsetsType int type, Rect frame, Rect[] boundingRects,
+ @InsetsSource.Flags int flags) {
final HierarchyOp hierarchyOp =
new HierarchyOp.Builder(HierarchyOp.HIERARCHY_OP_TYPE_ADD_INSETS_FRAME_PROVIDER)
.setContainer(receiver.asBinder())
.setInsetsFrameProvider(new InsetsFrameProvider(owner, index, type)
.setSource(InsetsFrameProvider.SOURCE_ARBITRARY_RECTANGLE)
.setArbitraryRectangle(frame)
- .setBoundingRects(boundingRects))
+ .setBoundingRects(boundingRects)
+ .setFlags(flags))
.setInsetsFrameOwner(owner)
.build();
mHierarchyOps.add(hierarchyOp);
@@ -962,6 +968,23 @@ public final class WindowContainerTransaction implements Parcelable {
}
/**
+ * Sets the task as trimmable or not. This can be used to prevent the task from being trimmed by
+ * recents. This attribute is set to true on task creation by default.
+ *
+ * @param isTrimmableFromRecents When {@code true}, task is set as trimmable from recents.
+ * @hide
+ */
+ @NonNull
+ public WindowContainerTransaction setTaskTrimmableFromRecents(
+ @NonNull WindowContainerToken container,
+ boolean isTrimmableFromRecents) {
+ mHierarchyOps.add(
+ HierarchyOp.createForSetTaskTrimmableFromRecents(container.asBinder(),
+ isTrimmableFromRecents));
+ return this;
+ }
+
+ /**
* Merges another WCT into this one.
* @param transfer When true, this will transfer everything from other potentially leaving
* other in an unusable state. When false, other is left alone, but
@@ -1412,6 +1435,7 @@ public final class WindowContainerTransaction implements Parcelable {
public static final int HIERARCHY_OP_TYPE_SET_REPARENT_LEAF_TASK_IF_RELAUNCH = 16;
public static final int HIERARCHY_OP_TYPE_ADD_TASK_FRAGMENT_OPERATION = 17;
public static final int HIERARCHY_OP_TYPE_MOVE_PIP_ACTIVITY_TO_PINNED_TASK = 18;
+ public static final int HIERARCHY_OP_TYPE_SET_IS_TRIMMABLE = 19;
// The following key(s) are for use with mLaunchOptions:
// When launching a task (eg. from recents), this is the taskId to be launched.
@@ -1473,6 +1497,8 @@ public final class WindowContainerTransaction implements Parcelable {
private boolean mReparentLeafTaskIfRelaunch;
+ private boolean mIsTrimmableFromRecents;
+
public static HierarchyOp createForReparent(
@NonNull IBinder container, @Nullable IBinder reparent, boolean toTop) {
return new HierarchyOp.Builder(HIERARCHY_OP_TYPE_REPARENT)
@@ -1575,6 +1601,16 @@ public final class WindowContainerTransaction implements Parcelable {
.build();
}
+ /** Create a hierarchy op for setting a task non-trimmable by recents. */
+ @FlaggedApi(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
+ public static HierarchyOp createForSetTaskTrimmableFromRecents(@NonNull IBinder container,
+ boolean isTrimmableFromRecents) {
+ return new HierarchyOp.Builder(HIERARCHY_OP_TYPE_SET_IS_TRIMMABLE)
+ .setContainer(container)
+ .setIsTrimmableFromRecents(isTrimmableFromRecents)
+ .build();
+ }
+
/** Only creates through {@link Builder}. */
private HierarchyOp(int type) {
mType = type;
@@ -1599,6 +1635,7 @@ public final class WindowContainerTransaction implements Parcelable {
mShortcutInfo = copy.mShortcutInfo;
mAlwaysOnTop = copy.mAlwaysOnTop;
mReparentLeafTaskIfRelaunch = copy.mReparentLeafTaskIfRelaunch;
+ mIsTrimmableFromRecents = copy.mIsTrimmableFromRecents;
}
protected HierarchyOp(Parcel in) {
@@ -1620,6 +1657,7 @@ public final class WindowContainerTransaction implements Parcelable {
mShortcutInfo = in.readTypedObject(ShortcutInfo.CREATOR);
mAlwaysOnTop = in.readBoolean();
mReparentLeafTaskIfRelaunch = in.readBoolean();
+ mIsTrimmableFromRecents = in.readBoolean();
}
public int getType() {
@@ -1715,6 +1753,12 @@ public final class WindowContainerTransaction implements Parcelable {
return mIncludingParents;
}
+ /** Set the task to be trimmable */
+ @NonNull
+ public boolean isTrimmableFromRecents() {
+ return mIsTrimmableFromRecents;
+ }
+
/** Gets a string representation of a hierarchy-op type. */
public static String hopToString(int type) {
switch (type) {
@@ -1811,6 +1855,10 @@ public final class WindowContainerTransaction implements Parcelable {
sb.append("fragmentToken= ").append(mContainer)
.append(" operation= ").append(mTaskFragmentOperation);
break;
+ case HIERARCHY_OP_TYPE_SET_IS_TRIMMABLE:
+ sb.append("container= ").append(mContainer)
+ .append(" isTrimmable= ")
+ .append(mIsTrimmableFromRecents);
default:
sb.append("container=").append(mContainer)
.append(" reparent=").append(mReparent)
@@ -1841,6 +1889,7 @@ public final class WindowContainerTransaction implements Parcelable {
dest.writeTypedObject(mShortcutInfo, flags);
dest.writeBoolean(mAlwaysOnTop);
dest.writeBoolean(mReparentLeafTaskIfRelaunch);
+ dest.writeBoolean(mIsTrimmableFromRecents);
}
@Override
@@ -1910,6 +1959,8 @@ public final class WindowContainerTransaction implements Parcelable {
private boolean mReparentLeafTaskIfRelaunch;
+ private boolean mIsTrimmableFromRecents;
+
Builder(int type) {
mType = type;
}
@@ -2000,6 +2051,11 @@ public final class WindowContainerTransaction implements Parcelable {
return this;
}
+ Builder setIsTrimmableFromRecents(boolean isTrimmableFromRecents) {
+ mIsTrimmableFromRecents = isTrimmableFromRecents;
+ return this;
+ }
+
HierarchyOp build() {
final HierarchyOp hierarchyOp = new HierarchyOp(mType);
hierarchyOp.mContainer = mContainer;
@@ -2023,6 +2079,7 @@ public final class WindowContainerTransaction implements Parcelable {
hierarchyOp.mBounds = mBounds;
hierarchyOp.mIncludingParents = mIncludingParents;
hierarchyOp.mReparentLeafTaskIfRelaunch = mReparentLeafTaskIfRelaunch;
+ hierarchyOp.mIsTrimmableFromRecents = mIsTrimmableFromRecents;
return hierarchyOp;
}
diff --git a/core/java/android/window/WindowMetricsController.java b/core/java/android/window/WindowMetricsController.java
index 739cf0eeca0c..0d5e37e19916 100644
--- a/core/java/android/window/WindowMetricsController.java
+++ b/core/java/android/window/WindowMetricsController.java
@@ -75,8 +75,8 @@ public final class WindowMetricsController {
/**
* The core implementation to obtain {@link WindowMetrics}
*
- * @param isMaximum {@code true} to obtain {@link WindowManager#getCurrentWindowMetrics()}.
- * {@code false} to obtain {@link WindowManager#getMaximumWindowMetrics()}.
+ * @param isMaximum {@code false} to obtain {@link WindowManager#getCurrentWindowMetrics()}.
+ * {@code true} to obtain {@link WindowManager#getMaximumWindowMetrics()}.
*/
private WindowMetrics getWindowMetricsInternal(boolean isMaximum) {
final Rect bounds;
diff --git a/core/java/android/window/WindowOnBackInvokedDispatcher.java b/core/java/android/window/WindowOnBackInvokedDispatcher.java
index 9b87e2351e3f..7bbc3dbb29db 100644
--- a/core/java/android/window/WindowOnBackInvokedDispatcher.java
+++ b/core/java/android/window/WindowOnBackInvokedDispatcher.java
@@ -244,6 +244,7 @@ public class WindowOnBackInvokedDispatcher implements OnBackInvokedDispatcher {
// We should call onBackCancelled() when an active callback is removed from
// dispatcher.
sendCancelledIfInProgress(callback);
+ mHandler.post(mProgressAnimator::reset);
setTopOnBackInvokedCallback(getTopCallback());
}
}
diff --git a/core/java/android/window/flags/large_screen_experiences_app_compat.aconfig b/core/java/android/window/flags/large_screen_experiences_app_compat.aconfig
index cc880e182b2b..f739622a1b92 100644
--- a/core/java/android/window/flags/large_screen_experiences_app_compat.aconfig
+++ b/core/java/android/window/flags/large_screen_experiences_app_compat.aconfig
@@ -91,6 +91,20 @@ flag {
}
flag {
+ name: "camera_compat_fullscreen_pick_same_task_activity"
+ namespace: "large_screen_experiences_app_compat"
+ description: "Limit undo of camera compat treatment to the same task that started the treatment."
+ bug: "350495350"
+}
+
+flag {
+ name: "scrolling_from_letterbox"
+ namespace: "large_screen_experiences_app_compat"
+ description: "Whether to enable app scrolling from gestures from letterbox area"
+ bug: "353697519"
+}
+
+flag {
name: "app_compat_refactoring"
namespace: "large_screen_experiences_app_compat"
description: "Whether the changes about app compat refactoring are enabled./n"
diff --git a/core/java/android/window/flags/lse_desktop_experience.aconfig b/core/java/android/window/flags/lse_desktop_experience.aconfig
index 7432ca7956df..91ac4ff05687 100644
--- a/core/java/android/window/flags/lse_desktop_experience.aconfig
+++ b/core/java/android/window/flags/lse_desktop_experience.aconfig
@@ -40,8 +40,8 @@ flag {
flag {
name: "enable_windowing_edge_drag_resize"
namespace: "lse_desktop_experience"
- description: "Enables edge drag resizing for all input sources"
- bug: "323383067"
+ description: "Enables edge drag resizing for stylus input (cursor is enabled by default)"
+ bug: "337782092"
}
flag {
@@ -101,6 +101,13 @@ flag {
}
flag {
+ name: "enable_cascading_windows"
+ namespace: "lse_desktop_experience"
+ description: "Whether to apply cascading effect for placing multiple windows when first launched"
+ bug: "325240051"
+}
+
+flag {
name: "enable_camera_compat_for_desktop_windowing"
namespace: "lse_desktop_experience"
description: "Whether to apply Camera Compat treatment to fixed-orientation apps in desktop windowing mode"
@@ -122,6 +129,20 @@ flag {
}
flag {
+ name: "enable_caption_compat_inset_force_consumption"
+ namespace: "lse_desktop_experience"
+ description: "Enables force-consumption of caption bar insets for immersive apps in freeform"
+ bug: "316231589"
+}
+
+flag {
+ name: "enable_caption_compat_inset_force_consumption_always"
+ namespace: "lse_desktop_experience"
+ description: "Enables force-consumption of caption bar insets for all apps in freeform"
+ bug: "352563889"
+}
+
+flag {
name: "show_desktop_windowing_dev_option"
namespace: "lse_desktop_experience"
description: "Whether to show developer option for enabling desktop windowing mode"
@@ -141,3 +162,38 @@ flag {
description: "Whether to enable desktop windowing transition handler and observer instead of task listeners."
bug: "332682201"
}
+
+flag {
+ name: "enable_caption_compat_inset_conversion"
+ namespace: "lse_desktop_experience"
+ description: "Enables compatibility mitigation for apps that don't support caption insets well"
+ bug: "316231589"
+}
+
+flag {
+ name: "enable_desktop_windowing_multi_instance_features"
+ namespace: "lse_desktop_experience"
+ description: "Whether to enable multi-instance support in desktop windowing."
+ bug: "336289597"
+}
+
+flag {
+ name: "enable_desktop_windowing_back_navigation"
+ namespace: "lse_desktop_experience"
+ description: "Whether to enable back navigation treatment in desktop windowing."
+ bug: "350421096"
+}
+
+flag {
+ name: "enable_desktop_windowing_app_handle_education"
+ namespace: "lse_desktop_experience"
+ description: "Enables desktop windowing app handle education"
+ bug: "348208342"
+}
+
+flag {
+ name: "enable_compat_ui_visibility_status"
+ namespace: "lse_desktop_experience"
+ description: "Enables the tracking of the status for compat ui elements."
+ bug: "350953004"
+}
diff --git a/core/java/android/window/flags/responsible_apis.aconfig b/core/java/android/window/flags/responsible_apis.aconfig
index 94f6503f8a97..6ce9725f95b0 100644
--- a/core/java/android/window/flags/responsible_apis.aconfig
+++ b/core/java/android/window/flags/responsible_apis.aconfig
@@ -58,6 +58,13 @@ flag {
}
flag {
+ name: "bal_additional_start_modes"
+ namespace: "responsible_apis"
+ description: "Introduce additional start modes."
+ bug: "352182359"
+}
+
+flag {
name: "bal_send_intent_with_options"
namespace: "responsible_apis"
description: "Add options parameter to IntentSender.sendIntent."
diff --git a/core/java/android/window/flags/windowing_frontend.aconfig b/core/java/android/window/flags/windowing_frontend.aconfig
index 621b2c41050e..c451cc880a8c 100644
--- a/core/java/android/window/flags/windowing_frontend.aconfig
+++ b/core/java/android/window/flags/windowing_frontend.aconfig
@@ -19,6 +19,16 @@ flag {
}
flag {
+ name: "do_not_skip_ime_by_target_visibility"
+ namespace: "windowing_frontend"
+ description: "Avoid window traversal missing IME"
+ bug: "339375944"
+ metadata {
+ purpose: PURPOSE_BUGFIX
+ }
+}
+
+flag {
name: "apply_lifecycle_on_pip_change"
namespace: "windowing_frontend"
description: "Make pip activity lifecyle change with windowing mode"
@@ -70,17 +80,6 @@ flag {
}
flag {
- name: "skip_sleeping_when_switching_display"
- namespace: "windowing_frontend"
- description: "Reduce unnecessary visibility or lifecycle changes when changing fold state"
- bug: "303241079"
- is_fixed_read_only: true
- metadata {
- purpose: PURPOSE_BUGFIX
- }
-}
-
-flag {
name: "introduce_smoother_dimmer"
namespace: "windowing_frontend"
description: "Refactor dim to fix flickers"
@@ -152,6 +151,13 @@ flag {
}
flag {
+ name: "respect_non_top_visible_fixed_orientation"
+ namespace: "windowing_frontend"
+ description: "If top activity is not opaque, respect the fixed orientation of activity behind it"
+ bug: "283514860"
+}
+
+flag {
name: "insets_decoupled_configuration"
namespace: "windowing_frontend"
description: "Configuration decoupled from insets"
@@ -210,3 +216,22 @@ flag {
}
}
+flag {
+ name: "enforce_shell_thread_model"
+ namespace: "windowing_frontend"
+ description: "Crash the shell process if someone calls in from the wrong thread"
+ bug: "351189446"
+ is_fixed_read_only: true
+ metadata {
+ purpose: PURPOSE_BUGFIX
+ }
+}
+flag {
+ name: "custom_animations_behind_translucent"
+ namespace: "windowing_frontend"
+ description: "A change can use its own layer parameters to animate behind a translucent activity"
+ bug: "327332488"
+ metadata {
+ purpose: PURPOSE_BUGFIX
+ }
+}
diff --git a/core/java/android/window/flags/windowing_sdk.aconfig b/core/java/android/window/flags/windowing_sdk.aconfig
index ae9d757e1e0b..13d465f183c9 100644
--- a/core/java/android/window/flags/windowing_sdk.aconfig
+++ b/core/java/android/window/flags/windowing_sdk.aconfig
@@ -3,16 +3,6 @@ container: "system"
# Project link: https://gantry.corp.google.com/projects/android_platform_windowing_sdk/changes
-# Using a fixed read only flag because there are ClientTransaction scheduling before
-# WindowManagerService creation.
-flag {
- namespace: "windowing_sdk"
- name: "bundle_client_transaction_flag"
- description: "To bundle multiple ClientTransactionItems into one ClientTransaction"
- bug: "260873529"
- is_fixed_read_only: true
-}
-
flag {
namespace: "windowing_sdk"
name: "activity_embedding_overlay_presentation_flag"
diff --git a/core/java/com/android/internal/accessibility/AccessibilityShortcutController.java b/core/java/com/android/internal/accessibility/AccessibilityShortcutController.java
index 75ddb58590a1..f9c294758bf0 100644
--- a/core/java/com/android/internal/accessibility/AccessibilityShortcutController.java
+++ b/core/java/com/android/internal/accessibility/AccessibilityShortcutController.java
@@ -48,6 +48,7 @@ import android.os.Handler;
import android.os.UserHandle;
import android.os.Vibrator;
import android.provider.Settings;
+import android.provider.SettingsStringUtil;
import android.speech.tts.TextToSpeech;
import android.speech.tts.Voice;
import android.text.TextUtils;
@@ -151,7 +152,8 @@ public class AccessibilityShortcutController {
* info for toggling a framework feature
*/
public static Map<ComponentName, FrameworkFeatureInfo>
- getFrameworkShortcutFeaturesMap() {
+ getFrameworkShortcutFeaturesMap() {
+
if (sFrameworkShortcutFeaturesMap == null) {
Map<ComponentName, FrameworkFeatureInfo> featuresMap = new ArrayMap<>(4);
featuresMap.put(COLOR_INVERSION_COMPONENT_NAME,
@@ -172,7 +174,7 @@ public class AccessibilityShortcutController {
R.string.one_handed_mode_feature_name));
}
featuresMap.put(REDUCE_BRIGHT_COLORS_COMPONENT_NAME,
- new ToggleableFrameworkFeatureInfo(
+ new ExtraDimFrameworkFeatureInfo(
Settings.Secure.REDUCE_BRIGHT_COLORS_ACTIVATED,
"1" /* Value to enable */, "0" /* Value to disable */,
R.string.reduce_bright_colors_feature_name));
@@ -828,6 +830,44 @@ public class AccessibilityShortcutController {
}
}
+
+ public static class ExtraDimFrameworkFeatureInfo extends FrameworkFeatureInfo {
+ ExtraDimFrameworkFeatureInfo(String settingKey, String settingOnValue,
+ String settingOffValue, int labelStringResourceId) {
+ super(settingKey, settingOnValue, settingOffValue, labelStringResourceId);
+ }
+
+ /**
+ * Perform shortcut action.
+ *
+ * @return True if the accessibility service is enabled, false otherwise.
+ */
+ public boolean activateShortcut(Context context, int userId) {
+ if (com.android.server.display.feature.flags.Flags.evenDimmer()
+ && context.getResources().getBoolean(
+ com.android.internal.R.bool.config_evenDimmerEnabled)) {
+ launchExtraDimDialog();
+ return true;
+ } else {
+ // Assuming that the default state will be to have the feature off
+ final SettingsStringUtil.SettingStringHelper
+ setting = new SettingsStringUtil.SettingStringHelper(
+ context.getContentResolver(), getSettingKey(), userId);
+ if (!TextUtils.equals(getSettingOnValue(), setting.read())) {
+ setting.write(getSettingOnValue());
+ return true;
+ } else {
+ setting.write(getSettingOffValue());
+ return false;
+ }
+ }
+ }
+
+ private void launchExtraDimDialog() {
+ // TODO: launch Extra dim dialog for feature migration
+ }
+ }
+
// Class to allow mocking of static framework calls
public static class FrameworkObjectProvider {
public AccessibilityManager getAccessibilityManagerInstance(Context context) {
diff --git a/core/java/com/android/internal/app/SuspendedAppActivity.java b/core/java/com/android/internal/app/SuspendedAppActivity.java
index 7a8a47e5f9fc..9d5704141c93 100644
--- a/core/java/com/android/internal/app/SuspendedAppActivity.java
+++ b/core/java/com/android/internal/app/SuspendedAppActivity.java
@@ -342,8 +342,8 @@ public class SuspendedAppActivity extends AlertActivity
.MODE_BACKGROUND_ACTIVITY_START_ALLOWED)
.toBundle();
try {
- mOnUnsuspend.sendIntent(this, 0, null, null, null, null,
- activityOptions);
+ mOnUnsuspend.sendIntent(this, 0, null, null, activityOptions,
+ null, null);
} catch (IntentSender.SendIntentException e) {
Slog.e(TAG, "Error while starting intent " + mOnUnsuspend, e);
}
diff --git a/core/java/com/android/internal/display/RefreshRateSettingsUtils.java b/core/java/com/android/internal/display/RefreshRateSettingsUtils.java
index c23a5012923b..47e4943a035b 100644
--- a/core/java/com/android/internal/display/RefreshRateSettingsUtils.java
+++ b/core/java/com/android/internal/display/RefreshRateSettingsUtils.java
@@ -83,4 +83,32 @@ public class RefreshRateSettingsUtils {
}
return maxRefreshRate;
}
+
+ /**
+ * Find the highest refresh rate among all the modes of all the built-in/physical displays.
+ *
+ * This method will acquire DisplayManager.mLock, so calling it while holding other locks
+ * should be done with care.
+ * @param context The context
+ * @return The highest refresh rate
+ */
+ public static float findHighestRefreshRateAmongAllBuiltInDisplays(Context context) {
+ final DisplayManager dm = context.getSystemService(DisplayManager.class);
+ final Display[] displays = dm.getDisplays(DISPLAY_CATEGORY_ALL_INCLUDING_DISABLED);
+ if (displays.length == 0) {
+ Log.w(TAG, "No valid display devices");
+ return DEFAULT_REFRESH_RATE;
+ }
+
+ float maxRefreshRate = DEFAULT_REFRESH_RATE;
+ for (Display display : displays) {
+ if (display.getType() != Display.TYPE_INTERNAL) continue;
+ for (Display.Mode mode : display.getSupportedModes()) {
+ if (mode.getRefreshRate() > maxRefreshRate) {
+ maxRefreshRate = mode.getRefreshRate();
+ }
+ }
+ }
+ return maxRefreshRate;
+ }
}
diff --git a/core/java/com/android/internal/inputmethod/IInputMethodPrivilegedOperations.aidl b/core/java/com/android/internal/inputmethod/IInputMethodPrivilegedOperations.aidl
index 63623c767694..ac4c066a992f 100644
--- a/core/java/com/android/internal/inputmethod/IInputMethodPrivilegedOperations.aidl
+++ b/core/java/com/android/internal/inputmethod/IInputMethodPrivilegedOperations.aidl
@@ -43,6 +43,7 @@ oneway interface IInputMethodPrivilegedOperations {
void switchToPreviousInputMethod(in AndroidFuture future /* T=Boolean */);
void switchToNextInputMethod(boolean onlyCurrentIme, in AndroidFuture future /* T=Boolean */);
void shouldOfferSwitchingToNextInputMethod(in AndroidFuture future /* T=Boolean */);
+ void onImeSwitchButtonClickFromClient(int displayId);
void notifyUserActionAsync();
void applyImeVisibilityAsync(IBinder showOrHideInputToken, boolean setVisible,
in ImeTracker.Token statsToken);
diff --git a/core/java/com/android/internal/inputmethod/InputMethodPrivilegedOperations.java b/core/java/com/android/internal/inputmethod/InputMethodPrivilegedOperations.java
index 72c41bed4436..2daf0fd1f61c 100644
--- a/core/java/com/android/internal/inputmethod/InputMethodPrivilegedOperations.java
+++ b/core/java/com/android/internal/inputmethod/InputMethodPrivilegedOperations.java
@@ -378,6 +378,22 @@ public final class InputMethodPrivilegedOperations {
}
/**
+ * Calls {@link IInputMethodPrivilegedOperations#onImeSwitchButtonClickFromClient(int)}
+ */
+ @AnyThread
+ public void onImeSwitchButtonClickFromClient(int displayId) {
+ final IInputMethodPrivilegedOperations ops = mOps.getAndWarnIfNull();
+ if (ops == null) {
+ return;
+ }
+ try {
+ ops.onImeSwitchButtonClickFromClient(displayId);
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
+ /**
* Calls {@link IInputMethodPrivilegedOperations#notifyUserActionAsync()}
*/
@AnyThread
diff --git a/core/java/com/android/internal/jank/Cuj.java b/core/java/com/android/internal/jank/Cuj.java
index 1638699c6175..69d1cb34005d 100644
--- a/core/java/com/android/internal/jank/Cuj.java
+++ b/core/java/com/android/internal/jank/Cuj.java
@@ -160,8 +160,13 @@ public class Cuj {
*/
public static final int CUJ_DESKTOP_MODE_RESIZE_WINDOW = 106;
- /** Track entering desktop mode interaction. */
- public static final int CUJ_DESKTOP_MODE_ENTER_MODE = 107;
+ /**
+ * Track app handle drag and hold interaction.
+ *
+ * <p>Tracking starts when the app handle is dragged and
+ * finishes immediately after app handle release, before starting a new transition.
+ */
+ public static final int CUJ_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_HOLD = 107;
/** Track exiting desktop mode interaction. */
public static final int CUJ_DESKTOP_MODE_EXIT_MODE = 108;
@@ -175,9 +180,38 @@ public class Cuj {
/** Track launching a dialog from a status bar chip. */
public static final int CUJ_STATUS_BAR_LAUNCH_DIALOG_FROM_CHIP = 111;
+ /**
+ * Track entering desktop mode interaction via app handle menu.
+ *
+ * <p>Tracking starts after windowing mode option in the app handle menu is clicked and
+ * finishes when the window animation to desktop ends.
+ */
+ public static final int CUJ_DESKTOP_MODE_ENTER_MODE_APP_HANDLE_MENU = 112;
+
+ /** Track Launcher Keyboard Quick Switch View opening animation */
+ public static final int CUJ_LAUNCHER_KEYBOARD_QUICK_SWITCH_OPEN = 113;
+
+ /** Track Launcher Keyboard Quick Switch View closing animation */
+ public static final int CUJ_LAUNCHER_KEYBOARD_QUICK_SWITCH_CLOSE = 114;
+
+ /** Track launching an app through the Launcher Keyboard Quick Switch View */
+ public static final int CUJ_LAUNCHER_KEYBOARD_QUICK_SWITCH_APP_LAUNCH = 115;
+
+ /**
+ * Track entering desktop mode interaction via app handle drag release.
+ *
+ * <p>Tracking starts when the app handle is released and
+ * finishes when one of the three possible animations end:
+ * <ul>
+ * <li>release to desktop</li>
+ * <li>release to split-screen</li>
+ * <li>release to back to full-screen</li>
+ * </ul>.
+ */
+ public static final int CUJ_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_RELEASE = 116;
// When adding a CUJ, update this and make sure to also update CUJ_TO_STATSD_INTERACTION_TYPE.
- @VisibleForTesting static final int LAST_CUJ = CUJ_STATUS_BAR_LAUNCH_DIALOG_FROM_CHIP;
+ @VisibleForTesting static final int LAST_CUJ = CUJ_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_RELEASE;
/** @hide */
@IntDef({
@@ -276,11 +310,16 @@ public class Cuj {
CUJ_DESKTOP_MODE_MAXIMIZE_WINDOW,
CUJ_FOLD_ANIM,
CUJ_DESKTOP_MODE_RESIZE_WINDOW,
- CUJ_DESKTOP_MODE_ENTER_MODE,
+ CUJ_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_HOLD,
+ CUJ_DESKTOP_MODE_ENTER_MODE_APP_HANDLE_MENU,
CUJ_DESKTOP_MODE_EXIT_MODE,
CUJ_DESKTOP_MODE_MINIMIZE_WINDOW,
CUJ_DESKTOP_MODE_DRAG_WINDOW,
- CUJ_STATUS_BAR_LAUNCH_DIALOG_FROM_CHIP
+ CUJ_STATUS_BAR_LAUNCH_DIALOG_FROM_CHIP,
+ CUJ_LAUNCHER_KEYBOARD_QUICK_SWITCH_OPEN,
+ CUJ_LAUNCHER_KEYBOARD_QUICK_SWITCH_CLOSE,
+ CUJ_LAUNCHER_KEYBOARD_QUICK_SWITCH_APP_LAUNCH,
+ CUJ_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_RELEASE
})
@Retention(RetentionPolicy.SOURCE)
public @interface CujType {}
@@ -389,11 +428,16 @@ public class Cuj {
CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_MAXIMIZE_WINDOW] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_MAXIMIZE_WINDOW;
CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_FOLD_ANIM] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__FOLD_ANIM;
CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_RESIZE_WINDOW] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_RESIZE_WINDOW;
- CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_ENTER_MODE] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_ENTER_MODE;
+ CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_HOLD] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_HOLD;
+ CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_ENTER_MODE_APP_HANDLE_MENU] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_ENTER_MODE_APP_HANDLE_MENU;
CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_EXIT_MODE] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_EXIT_MODE;
CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_MINIMIZE_WINDOW] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_MINIMIZE_WINDOW;
CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_DRAG_WINDOW] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_DRAG_WINDOW;
CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_STATUS_BAR_LAUNCH_DIALOG_FROM_CHIP] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__STATUS_BAR_LAUNCH_DIALOG_FROM_CHIP;
+ CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_KEYBOARD_QUICK_SWITCH_OPEN] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_KEYBOARD_QUICK_SWITCH_OPEN;
+ CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_KEYBOARD_QUICK_SWITCH_CLOSE] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_KEYBOARD_QUICK_SWITCH_CLOSE;
+ CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_LAUNCHER_KEYBOARD_QUICK_SWITCH_APP_LAUNCH] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__LAUNCHER_KEYBOARD_QUICK_SWITCH_APP_LAUNCH;
+ CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_RELEASE] = FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__INTERACTION_TYPE__DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_RELEASE;
}
private Cuj() {
@@ -602,8 +646,10 @@ public class Cuj {
return "FOLD_ANIM";
case CUJ_DESKTOP_MODE_RESIZE_WINDOW:
return "DESKTOP_MODE_RESIZE_WINDOW";
- case CUJ_DESKTOP_MODE_ENTER_MODE:
- return "DESKTOP_MODE_ENTER_MODE";
+ case CUJ_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_HOLD:
+ return "DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_HOLD";
+ case CUJ_DESKTOP_MODE_ENTER_MODE_APP_HANDLE_MENU:
+ return "DESKTOP_MODE_ENTER_MODE_APP_HANDLE_MENU";
case CUJ_DESKTOP_MODE_EXIT_MODE:
return "DESKTOP_MODE_EXIT_MODE";
case CUJ_DESKTOP_MODE_MINIMIZE_WINDOW:
@@ -612,6 +658,14 @@ public class Cuj {
return "DESKTOP_MODE_DRAG_WINDOW";
case CUJ_STATUS_BAR_LAUNCH_DIALOG_FROM_CHIP:
return "STATUS_BAR_LAUNCH_DIALOG_FROM_CHIP";
+ case CUJ_LAUNCHER_KEYBOARD_QUICK_SWITCH_OPEN:
+ return "LAUNCHER_KEYBOARD_QUICK_SWITCH_OPEN";
+ case CUJ_LAUNCHER_KEYBOARD_QUICK_SWITCH_CLOSE:
+ return "LAUNCHER_KEYBOARD_QUICK_SWITCH_CLOSE";
+ case CUJ_LAUNCHER_KEYBOARD_QUICK_SWITCH_APP_LAUNCH:
+ return "LAUNCHER_KEYBOARD_QUICK_SWITCH_APP_LAUNCH";
+ case CUJ_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_RELEASE:
+ return "DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_RELEASE";
}
return "UNKNOWN";
}
diff --git a/core/java/com/android/internal/os/PowerStats.java b/core/java/com/android/internal/os/PowerStats.java
index 24971f51aabf..488e06f9a1ad 100644
--- a/core/java/com/android/internal/os/PowerStats.java
+++ b/core/java/com/android/internal/os/PowerStats.java
@@ -580,10 +580,15 @@ public final class PowerStats {
}
PowerStatsFormatter uidStatsFormatter = descriptor.getUidStatsFormatter();
for (int i = 0; i < uidStats.size(); i++) {
+ String formattedStats = uidStatsFormatter.format(uidStats.valueAt(i));
+ if (formattedStats.isBlank()) {
+ continue;
+ }
+
pw.print("UID ");
pw.print(UserHandle.formatUid(uidStats.keyAt(i)));
pw.print(": ");
- pw.print(uidStatsFormatter.format(uidStats.valueAt(i)));
+ pw.print(formattedStats);
pw.println();
}
pw.decreaseIndent();
diff --git a/core/java/com/android/internal/os/TEST_MAPPING b/core/java/com/android/internal/os/TEST_MAPPING
index d552e0b8c643..ae43acfdedb6 100644
--- a/core/java/com/android/internal/os/TEST_MAPPING
+++ b/core/java/com/android/internal/os/TEST_MAPPING
@@ -18,7 +18,7 @@
"Kernel[^/]*\\.java",
"[^/]*Power[^/]*\\.java"
],
- "name": "BatteryUsageStatsProtoTests"
+ "name": "PowerStatsTests"
},
{
"file_patterns": [
diff --git a/core/java/com/android/internal/os/flags.aconfig b/core/java/com/android/internal/os/flags.aconfig
index 30fa4f1a472a..2ad665181e70 100644
--- a/core/java/com/android/internal/os/flags.aconfig
+++ b/core/java/com/android/internal/os/flags.aconfig
@@ -12,7 +12,7 @@ flag {
flag {
name: "use_transaction_codes_for_unknown_methods"
- namespace: "dropbox"
+ namespace: "stability"
description: "Use transaction codes when the method names is unknown"
bug: "350041302"
is_fixed_read_only: true
diff --git a/core/java/com/android/internal/pm/pkg/component/AconfigFlags.java b/core/java/com/android/internal/pm/pkg/component/AconfigFlags.java
index f306b0b02677..b873175451e1 100644
--- a/core/java/com/android/internal/pm/pkg/component/AconfigFlags.java
+++ b/core/java/com/android/internal/pm/pkg/component/AconfigFlags.java
@@ -60,7 +60,13 @@ public class AconfigFlags {
"/product/etc/aconfig_flags.pb",
"/vendor/etc/aconfig_flags.pb");
+ public enum Permission {
+ READ_WRITE,
+ READ_ONLY
+ }
+
private final ArrayMap<String, Boolean> mFlagValues = new ArrayMap<>();
+ private final ArrayMap<String, Permission> mFlagPermissions = new ArrayMap<>();
public AconfigFlags() {
if (!Flags.manifestFlagging()) {
@@ -184,6 +190,12 @@ public class AconfigFlags {
Slog.v(LOG_TAG, "Read Aconfig default flag value "
+ flagPackageAndName + " = " + flagValue);
mFlagValues.put(flagPackageAndName, flagValue);
+
+ Permission permission = flag.permission == Aconfig.READ_ONLY
+ ? Permission.READ_ONLY
+ : Permission.READ_WRITE;
+
+ mFlagPermissions.put(flagPackageAndName, permission);
}
}
@@ -200,6 +212,17 @@ public class AconfigFlags {
}
/**
+ * Get the flag permission, or null if the flag doesn't exist.
+ * @param flagPackageAndName Full flag name formatted as 'package.flag'
+ * @return the current permission of the given Aconfig flag, or null if there is no such flag
+ */
+ @Nullable
+ public Permission getFlagPermission(@NonNull String flagPackageAndName) {
+ Permission permission = mFlagPermissions.get(flagPackageAndName);
+ return permission;
+ }
+
+ /**
* Check if the element in {@code parser} should be skipped because of the feature flag.
* @param parser XML parser object currently parsing an element
* @return true if the element is disabled because of its feature flag
diff --git a/core/java/com/android/internal/policy/DecorView.java b/core/java/com/android/internal/policy/DecorView.java
index 63ff598bae61..87e22ed42cbd 100644
--- a/core/java/com/android/internal/policy/DecorView.java
+++ b/core/java/com/android/internal/policy/DecorView.java
@@ -109,6 +109,7 @@ import com.android.internal.view.menu.MenuHelper;
import com.android.internal.widget.ActionBarContextView;
import com.android.internal.widget.BackgroundFallback;
import com.android.internal.widget.floatingtoolbar.FloatingToolbar;
+import com.android.window.flags.Flags;
import java.util.List;
import java.util.function.Consumer;
@@ -1193,7 +1194,8 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind
// If we should always consume system bars, only consume that if the app wanted to go to
// fullscreen, as otherwise we can expect the app to handle it.
boolean fullscreen = (sysUiVisibility & SYSTEM_UI_FLAG_FULLSCREEN) != 0
- || (attrs.flags & FLAG_FULLSCREEN) != 0
+ || (attrs.flags & FLAG_FULLSCREEN) != 0;
+ final boolean hideStatusBar = fullscreen
|| (requestedVisibleTypes & WindowInsets.Type.statusBars()) == 0;
boolean consumingStatusBar =
((sysUiVisibility & SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN) == 0
@@ -1203,9 +1205,20 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind
&& mForceWindowDrawsBarBackgrounds
&& mLastTopInset != 0)
|| ((mLastForceConsumingTypes & WindowInsets.Type.statusBars()) != 0
- && fullscreen);
+ && hideStatusBar);
- int consumedTop = consumingStatusBar ? mLastTopInset : 0;
+ final boolean hideCaptionBar = fullscreen
+ || (requestedVisibleTypes & WindowInsets.Type.captionBar()) == 0;
+ final boolean consumingCaptionBar =
+ ((mLastForceConsumingTypes & WindowInsets.Type.captionBar()) != 0
+ && hideCaptionBar);
+
+ final int consumedTop;
+ if (Flags.enableCaptionCompatInsetForceConsumption()) {
+ consumedTop = (consumingStatusBar || consumingCaptionBar) ? mLastTopInset : 0;
+ } else {
+ consumedTop = consumingStatusBar ? mLastTopInset : 0;
+ }
int consumedRight = consumingNavBar ? mLastRightInset : 0;
int consumedBottom = consumingNavBar ? mLastBottomInset : 0;
int consumedLeft = consumingNavBar ? mLastLeftInset : 0;
diff --git a/core/java/com/android/internal/policy/FoldLockSettingsObserver.java b/core/java/com/android/internal/policy/FoldLockSettingsObserver.java
new file mode 100644
index 000000000000..c6fba8a31277
--- /dev/null
+++ b/core/java/com/android/internal/policy/FoldLockSettingsObserver.java
@@ -0,0 +1,128 @@
+/*
+ * 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;
+
+import android.content.ContentResolver;
+import android.content.Context;
+import android.database.ContentObserver;
+import android.os.Handler;
+import android.os.UserHandle;
+import android.provider.Settings;
+
+import androidx.annotation.Nullable;
+import androidx.annotation.VisibleForTesting;
+
+import java.util.Set;
+
+/**
+ * A ContentObserver that listens for changes in the "Continue using apps on fold" setting. This
+ * setting determines a device's behavior when the user folds the device.
+ * @hide
+ *
+ * Keep the setting values in this class in sync with the values in
+ * {@link com.android.server.utils.FoldSettingProvider} and
+ * {@link com.android.settings.display.FoldLockBehaviorSettings}
+ */
+public class FoldLockSettingsObserver extends ContentObserver {
+ /** The setting for "stay awake on fold". */
+ public static final String SETTING_VALUE_STAY_AWAKE_ON_FOLD = "stay_awake_on_fold_key";
+ /** The setting for "swipe up to continue". */
+ public static final String SETTING_VALUE_SELECTIVE_STAY_AWAKE = "selective_stay_awake_key";
+ /** The setting for "always sleep on fold". */
+ public static final String SETTING_VALUE_SLEEP_ON_FOLD = "sleep_on_fold_key";
+ public static final String SETTING_VALUE_DEFAULT = SETTING_VALUE_SELECTIVE_STAY_AWAKE;
+ private static final Set<String> SETTING_VALUES = Set.of(SETTING_VALUE_STAY_AWAKE_ON_FOLD,
+ SETTING_VALUE_SELECTIVE_STAY_AWAKE, SETTING_VALUE_SLEEP_ON_FOLD);
+
+ private final Context mContext;
+
+ /** The cached value of the setting. */
+ @VisibleForTesting
+ String mFoldLockSetting;
+
+ public FoldLockSettingsObserver(Handler handler, Context context) {
+ super(handler);
+ mContext = context;
+ }
+
+ /** Registers the observer and updates the cache for the first time. */
+ public void register() {
+ final ContentResolver r = mContext.getContentResolver();
+ r.registerContentObserver(
+ Settings.System.getUriFor(Settings.System.FOLD_LOCK_BEHAVIOR),
+ false, this, UserHandle.USER_ALL);
+ requestAndCacheFoldLockSetting();
+ }
+
+ /** Unregisters the observer. */
+ public void unregister() {
+ mContext.getContentResolver().unregisterContentObserver(this);
+ }
+
+ /** Runs when settings changes. */
+ @Override
+ public void onChange(boolean selfChange) {
+ requestAndCacheFoldLockSetting();
+ }
+
+ /**
+ * Requests and caches the current FOLD_LOCK_BEHAVIOR setting, which should be one of three
+ * values: SETTING_VALUE_STAY_AWAKE_ON_FOLD, SETTING_VALUE_SELECTIVE_STAY_AWAKE,
+ * SETTING_VALUE_SLEEP_ON_FOLD. If null (not set), returns the system default.
+ */
+ @VisibleForTesting
+ void requestAndCacheFoldLockSetting() {
+ String currentSetting = request();
+
+ if (currentSetting == null || !SETTING_VALUES.contains(currentSetting)) {
+ currentSetting = SETTING_VALUE_DEFAULT;
+ }
+
+ setCurrentFoldSetting(currentSetting);
+ }
+
+ /**
+ * Makes a binder call to request the current FOLD_LOCK_BEHAVIOR setting.
+ */
+ @VisibleForTesting
+ @Nullable
+ String request() {
+ return Settings.System.getStringForUser(mContext.getContentResolver(),
+ Settings.System.FOLD_LOCK_BEHAVIOR, UserHandle.USER_CURRENT);
+ }
+
+ /** Caches the fold-lock behavior received from Settings. */
+ @VisibleForTesting
+ void setCurrentFoldSetting(String newSetting) {
+ mFoldLockSetting = newSetting;
+ }
+
+ /** Used by external requesters: checks if the current setting is "stay awake on fold". */
+ public boolean isStayAwakeOnFold() {
+ return mFoldLockSetting.equals(SETTING_VALUE_STAY_AWAKE_ON_FOLD);
+ }
+
+ /** Used by external requesters: checks if the current setting is "swipe up to continue". */
+ public boolean isSelectiveStayAwake() {
+ return mFoldLockSetting.equals(SETTING_VALUE_SELECTIVE_STAY_AWAKE);
+ }
+
+ /** Used by external requesters: checks if the current setting is "sleep on fold". */
+ public boolean isSleepOnFold() {
+ return mFoldLockSetting.equals(SETTING_VALUE_SLEEP_ON_FOLD);
+ }
+}
diff --git a/core/java/com/android/internal/protolog/IProtoLogClient.aidl b/core/java/com/android/internal/protolog/IProtoLogClient.aidl
new file mode 100644
index 000000000000..969ed99d3aca
--- /dev/null
+++ b/core/java/com/android/internal/protolog/IProtoLogClient.aidl
@@ -0,0 +1,29 @@
+/*
+ * 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.protolog;
+
+/**
+ * The ProtoLog client interface.
+ *
+ * These clients will communicate bi-directionally with the ProtoLog service
+ * (@see IProtoLogService.aidl) running in the system process.
+ *
+ * {@hide}
+ */
+interface IProtoLogClient {
+ void toggleLogcat(boolean enabled, in String[] groups);
+} \ No newline at end of file
diff --git a/core/java/com/android/internal/protolog/IProtoLogService.aidl b/core/java/com/android/internal/protolog/IProtoLogService.aidl
new file mode 100644
index 000000000000..cc349ea2985a
--- /dev/null
+++ b/core/java/com/android/internal/protolog/IProtoLogService.aidl
@@ -0,0 +1,51 @@
+/*
+ * 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.protolog;
+
+import com.android.internal.protolog.IProtoLogClient;
+
+/**
+ * The ProtoLog Service interface.
+ *
+ * This service runs in system server.
+ *
+ * All ProtoLog clients (in theory one per process) will register themselves to this service.
+ * This service will then serve as the entry point for any shell command based interactions with
+ * protolog and get/forward any required information/actions from/to all the registered ProtoLog
+ * clients.
+ *
+ * Clients will be responsible for directly sending all their trace data to Perfetto without passing
+ * through this service, except viewer config data, the mappings from messages hashes (generated by
+ * the ProtoLog Tool if and when the tool processed the source code). So, this service is
+ * responsible for dumping the viewer config data from all clients. The reason for this is because
+ * we do this on Perfetto's onFlush callback when a tracing instance is stopped. However, if a
+ * client process is frozen then this will not dump; system server, where this service runs cannot
+ * be frozen. Secondly many processes (i.e. apps) will run the same code with the same viewer config
+ * data, so this service allows us to orchestrate which config gets dumped so we don't duplicate
+ * this information in the trace and waste valuable trace space.
+ *
+ * {@hide}
+ */
+interface IProtoLogService {
+ interface IRegisterClientArgs {
+ String[] getGroups();
+ boolean[] getGroupsDefaultLogcatStatus();
+ String getViewerConfigFile();
+ }
+
+ void registerClient(IProtoLogClient client, IRegisterClientArgs args);
+} \ No newline at end of file
diff --git a/core/java/com/android/internal/protolog/LegacyProtoLogImpl.java b/core/java/com/android/internal/protolog/LegacyProtoLogImpl.java
index d24487412313..572a599dc8f5 100644
--- a/core/java/com/android/internal/protolog/LegacyProtoLogImpl.java
+++ b/core/java/com/android/internal/protolog/LegacyProtoLogImpl.java
@@ -48,6 +48,7 @@ import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
+import java.util.Map;
import java.util.TreeMap;
import java.util.stream.Collectors;
@@ -65,7 +66,7 @@ public class LegacyProtoLogImpl implements IProtoLog {
private final String mLegacyViewerConfigFilename;
private final TraceBuffer mBuffer;
private final LegacyProtoLogViewerConfigReader mViewerConfig;
- private final TreeMap<String, IProtoLogGroup> mLogGroups;
+ private final Map<String, IProtoLogGroup> mLogGroups = new TreeMap<>();
private final Runnable mCacheUpdater;
private final int mPerChunkSize;
@@ -74,20 +75,19 @@ public class LegacyProtoLogImpl implements IProtoLog {
private final Object mProtoLogEnabledLock = new Object();
public LegacyProtoLogImpl(String outputFile, String viewerConfigFilename,
- TreeMap<String, IProtoLogGroup> logGroups, Runnable cacheUpdater) {
+ Runnable cacheUpdater) {
this(new File(outputFile), viewerConfigFilename, BUFFER_CAPACITY,
- new LegacyProtoLogViewerConfigReader(), PER_CHUNK_SIZE, logGroups, cacheUpdater);
+ new LegacyProtoLogViewerConfigReader(), PER_CHUNK_SIZE, cacheUpdater);
}
public LegacyProtoLogImpl(File file, String viewerConfigFilename, int bufferCapacity,
LegacyProtoLogViewerConfigReader viewerConfig, int perChunkSize,
- TreeMap<String, IProtoLogGroup> logGroups, Runnable cacheUpdater) {
+ Runnable cacheUpdater) {
mLogFile = file;
mBuffer = new TraceBuffer(bufferCapacity);
mLegacyViewerConfigFilename = viewerConfigFilename;
mViewerConfig = viewerConfig;
mPerChunkSize = perChunkSize;
- mLogGroups = logGroups;
mCacheUpdater = cacheUpdater;
}
@@ -97,21 +97,26 @@ public class LegacyProtoLogImpl implements IProtoLog {
@VisibleForTesting
@Override
public void log(LogLevel level, IProtoLogGroup group, long messageHash, int paramsMask,
- @Nullable String messageString, Object[] args) {
+ @Nullable Object[] args) {
if (group.isLogToProto()) {
logToProto(messageHash, paramsMask, args);
}
if (group.isLogToLogcat()) {
- logToLogcat(group.getTag(), level, messageHash, messageString, args);
+ logToLogcat(group.getTag(), level, messageHash, args);
}
}
+ @Override
+ public void log(LogLevel logLevel, IProtoLogGroup group, String messageString, Object... args) {
+ // This will be removed very soon so no point implementing it here.
+ throw new IllegalStateException(
+ "Not implemented. Only implemented for PerfettoProtoLogImpl.");
+ }
+
private void logToLogcat(String tag, LogLevel level, long messageHash,
- @Nullable String messageString, Object[] args) {
+ @Nullable Object[] args) {
String message = null;
- if (messageString == null) {
- messageString = mViewerConfig.getViewerString(messageHash);
- }
+ final String messageString = mViewerConfig.getViewerString(messageHash);
if (messageString != null) {
if (args != null) {
try {
@@ -125,8 +130,10 @@ public class LegacyProtoLogImpl implements IProtoLog {
}
if (message == null) {
StringBuilder builder = new StringBuilder("UNKNOWN MESSAGE (" + messageHash + ")");
- for (Object o : args) {
- builder.append(" ").append(o);
+ if (args != null) {
+ for (Object o : args) {
+ builder.append(" ").append(o);
+ }
}
message = builder.toString();
}
@@ -410,5 +417,12 @@ public class LegacyProtoLogImpl implements IProtoLog {
// so we ignore the level argument to this function.
return group.isLogToLogcat() || (group.isLogToProto() && isProtoEnabled());
}
+
+ @Override
+ public void registerGroups(IProtoLogGroup... protoLogGroups) {
+ for (IProtoLogGroup group : protoLogGroups) {
+ mLogGroups.put(group.name(), group);
+ }
+ }
}
diff --git a/core/java/com/android/internal/protolog/LogcatOnlyProtoLogImpl.java b/core/java/com/android/internal/protolog/LogcatOnlyProtoLogImpl.java
new file mode 100644
index 000000000000..ebdad6d52933
--- /dev/null
+++ b/core/java/com/android/internal/protolog/LogcatOnlyProtoLogImpl.java
@@ -0,0 +1,87 @@
+/*
+ * 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.protolog;
+
+import static com.android.internal.protolog.ProtoLog.REQUIRE_PROTOLOGTOOL;
+
+import android.text.TextUtils;
+import android.util.Log;
+
+import com.android.internal.protolog.common.ILogger;
+import com.android.internal.protolog.common.IProtoLog;
+import com.android.internal.protolog.common.IProtoLogGroup;
+import com.android.internal.protolog.common.LogLevel;
+
+/**
+ * Class only create and used to server temporarily for when there is source code pre-processing by
+ * the ProtoLog tool, when the tracing to Perfetto flag is off, and the static REQUIRE_PROTOLOGTOOL
+ * boolean is false. In which case we simply want to log protolog message to logcat. Note, that this
+ * means that in such cases there is no real advantage of using protolog over logcat.
+ *
+ * @deprecated Should not be used. This is just a temporary class to support a legacy behavior.
+ */
+@Deprecated
+public class LogcatOnlyProtoLogImpl implements IProtoLog {
+ @Override
+ public void log(LogLevel logLevel, IProtoLogGroup group, long messageHash, int paramsMask,
+ Object[] args) {
+ throw new RuntimeException("Not supported when using LogcatOnlyProtoLogImpl");
+ }
+
+ @Override
+ public void log(LogLevel logLevel, IProtoLogGroup group, String messageString, Object[] args) {
+ if (REQUIRE_PROTOLOGTOOL) {
+ throw new RuntimeException(
+ "REQUIRE_PROTOLOGTOOL not set to false before the first log call.");
+ }
+
+ String formattedString = TextUtils.formatSimple(messageString, args);
+ switch (logLevel) {
+ case VERBOSE -> Log.v(group.getTag(), formattedString);
+ case INFO -> Log.i(group.getTag(), formattedString);
+ case DEBUG -> Log.d(group.getTag(), formattedString);
+ case WARN -> Log.w(group.getTag(), formattedString);
+ case ERROR -> Log.e(group.getTag(), formattedString);
+ case WTF -> Log.wtf(group.getTag(), formattedString);
+ }
+ }
+
+ @Override
+ public boolean isProtoEnabled() {
+ return false;
+ }
+
+ @Override
+ public int startLoggingToLogcat(String[] groups, ILogger logger) {
+ return 0;
+ }
+
+ @Override
+ public int stopLoggingToLogcat(String[] groups, ILogger logger) {
+ return 0;
+ }
+
+ @Override
+ public boolean isEnabled(IProtoLogGroup group, LogLevel level) {
+ return true;
+ }
+
+ @Override
+ public void registerGroups(IProtoLogGroup... protoLogGroups) {
+ // Does nothing
+ }
+}
diff --git a/core/java/com/android/internal/protolog/PerfettoProtoLogImpl.java b/core/java/com/android/internal/protolog/PerfettoProtoLogImpl.java
index 42fa6ac0407d..fbec1f104fc8 100644
--- a/core/java/com/android/internal/protolog/PerfettoProtoLogImpl.java
+++ b/core/java/com/android/internal/protolog/PerfettoProtoLogImpl.java
@@ -42,11 +42,11 @@ import static android.internal.perfetto.protos.TracePacketOuterClass.TracePacket
import static android.internal.perfetto.protos.TracePacketOuterClass.TracePacket.SEQ_NEEDS_INCREMENTAL_STATE;
import static android.internal.perfetto.protos.TracePacketOuterClass.TracePacket.TIMESTAMP;
+import android.annotation.NonNull;
import android.annotation.Nullable;
import android.internal.perfetto.protos.Protolog.ProtoLogViewerConfig.MessageData;
import android.os.ShellCommand;
import android.os.SystemClock;
-import android.os.Trace;
import android.text.TextUtils;
import android.tracing.perfetto.DataSourceParams;
import android.tracing.perfetto.InitArguments;
@@ -72,62 +72,73 @@ import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
+import java.util.UUID;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
+import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
/**
* A service for the ProtoLog logging system.
*/
-public class PerfettoProtoLogImpl implements IProtoLog {
+public class PerfettoProtoLogImpl extends IProtoLogClient.Stub implements IProtoLog {
private static final String LOG_TAG = "ProtoLog";
+ public static final String NULL_STRING = "null";
private final AtomicInteger mTracingInstances = new AtomicInteger();
private final ProtoLogDataSource mDataSource = new ProtoLogDataSource(
this::onTracingInstanceStart,
- this::dumpTransitionTraceConfig,
+ this::onTracingFlush,
this::onTracingInstanceStop
);
+ @Nullable
private final ProtoLogViewerConfigReader mViewerConfigReader;
+ @Nullable
private final ViewerConfigInputStreamProvider mViewerConfigInputStreamProvider;
- private final TreeMap<String, IProtoLogGroup> mLogGroups;
+ private final TreeMap<String, IProtoLogGroup> mLogGroups = new TreeMap<>();
private final Runnable mCacheUpdater;
- private final Map<LogLevel, Integer> mDefaultLogLevelCounts = new ArrayMap<>();
- private final Map<IProtoLogGroup, Map<LogLevel, Integer>> mLogLevelCounts = new ArrayMap<>();
+ private final int[] mDefaultLogLevelCounts = new int[LogLevel.values().length];
+ private final Map<String, int[]> mLogLevelCounts = new ArrayMap<>();
+ private final Map<String, Integer> mCollectStackTraceGroupCounts = new ArrayMap<>();
- private final ExecutorService mBackgroundLoggingService = Executors.newSingleThreadExecutor();
+ private final Lock mBackgroundServiceLock = new ReentrantLock();
+ private ExecutorService mBackgroundLoggingService = Executors.newSingleThreadExecutor();
- public PerfettoProtoLogImpl(String viewerConfigFilePath,
- TreeMap<String, IProtoLogGroup> logGroups, Runnable cacheUpdater) {
+ public PerfettoProtoLogImpl(@NonNull String viewerConfigFilePath, Runnable cacheUpdater) {
this(() -> {
try {
return new ProtoInputStream(new FileInputStream(viewerConfigFilePath));
} catch (FileNotFoundException e) {
- Slog.w(LOG_TAG, "Failed to load viewer config file " + viewerConfigFilePath, e);
- return null;
+ throw new RuntimeException("Failed to load viewer config file " + viewerConfigFilePath, e);
}
- }, logGroups, cacheUpdater);
+ }, cacheUpdater);
+ }
+
+ public PerfettoProtoLogImpl() {
+ this(null, null, () -> {});
}
public PerfettoProtoLogImpl(
- ViewerConfigInputStreamProvider viewerConfigInputStreamProvider,
- TreeMap<String, IProtoLogGroup> logGroups,
+ @NonNull ViewerConfigInputStreamProvider viewerConfigInputStreamProvider,
Runnable cacheUpdater
) {
this(viewerConfigInputStreamProvider,
- new ProtoLogViewerConfigReader(viewerConfigInputStreamProvider), logGroups,
+ new ProtoLogViewerConfigReader(viewerConfigInputStreamProvider),
cacheUpdater);
}
@VisibleForTesting
public PerfettoProtoLogImpl(
- ViewerConfigInputStreamProvider viewerConfigInputStreamProvider,
- ProtoLogViewerConfigReader viewerConfigReader,
- TreeMap<String, IProtoLogGroup> logGroups,
+ @Nullable ViewerConfigInputStreamProvider viewerConfigInputStreamProvider,
+ @Nullable ProtoLogViewerConfigReader viewerConfigReader,
Runnable cacheUpdater
) {
Producer.init(InitArguments.DEFAULTS);
@@ -140,7 +151,6 @@ public class PerfettoProtoLogImpl implements IProtoLog {
mDataSource.register(params);
this.mViewerConfigInputStreamProvider = viewerConfigInputStreamProvider;
this.mViewerConfigReader = viewerConfigReader;
- this.mLogGroups = logGroups;
this.mCacheUpdater = cacheUpdater;
}
@@ -149,23 +159,208 @@ public class PerfettoProtoLogImpl implements IProtoLog {
*/
@VisibleForTesting
@Override
- public void log(LogLevel level, IProtoLogGroup group, long messageHash, int paramsMask,
- @Nullable String messageString, Object[] args) {
- Trace.traceBegin(Trace.TRACE_TAG_WINDOW_MANAGER, "log");
+ public void log(LogLevel logLevel, IProtoLogGroup group, long messageHash, int paramsMask,
+ @Nullable Object[] args) {
+ log(logLevel, group, new Message(messageHash, paramsMask), args);
+ }
- long tsNanos = SystemClock.elapsedRealtimeNanos();
- try {
- mBackgroundLoggingService.submit(() ->
- logToProto(level, group.name(), messageHash, paramsMask, args, tsNanos));
- if (group.isLogToLogcat()) {
- logToLogcat(group.getTag(), level, messageHash, messageString, args);
+ @Override
+ public void log(LogLevel logLevel, IProtoLogGroup group, String messageString, Object... args) {
+ log(logLevel, group, new Message(messageString), args);
+ }
+
+ /**
+ * SLog wrapper.
+ */
+ @VisibleForTesting
+ public void passToLogcat(String tag, LogLevel level, String message) {
+ switch (level) {
+ case DEBUG:
+ Slog.d(tag, message);
+ break;
+ case VERBOSE:
+ Slog.v(tag, message);
+ break;
+ case INFO:
+ Slog.i(tag, message);
+ break;
+ case WARN:
+ Slog.w(tag, message);
+ break;
+ case ERROR:
+ Slog.e(tag, message);
+ break;
+ case WTF:
+ Slog.wtf(tag, message);
+ break;
+ }
+ }
+
+ /**
+ * Returns {@code true} iff logging to proto is enabled.
+ */
+ public boolean isProtoEnabled() {
+ return mTracingInstances.get() > 0;
+ }
+
+ @Override
+ public void toggleLogcat(boolean enabled, String[] groups) {
+ final ILogger logger = (message) -> Log.d(LOG_TAG, message);
+ if (enabled) {
+ startLoggingToLogcat(groups, logger);
+ } else {
+ stopLoggingToLogcat(groups, logger);
+ }
+ }
+
+ /**
+ * Start text logging
+ * @param groups Groups to start text logging for
+ * @param logger A logger to write status updates to
+ * @return status code
+ */
+ public int startLoggingToLogcat(String[] groups, @NonNull ILogger logger) {
+ if (mViewerConfigReader != null) {
+ mViewerConfigReader.loadViewerConfig(groups, logger);
+ }
+ return setTextLogging(true, logger, groups);
+ }
+
+ /**
+ * Stop text logging
+ * @param groups Groups to start text logging for
+ * @param logger A logger to write status updates to
+ * @return status code
+ */
+ public int stopLoggingToLogcat(String[] groups, @NonNull ILogger logger) {
+ if (mViewerConfigReader != null) {
+ mViewerConfigReader.unloadViewerConfig(groups, logger);
+ }
+ return setTextLogging(false, logger, groups);
+ }
+
+ @Override
+ public boolean isEnabled(IProtoLogGroup group, LogLevel level) {
+ final int[] groupLevelCount = mLogLevelCounts.get(group.name());
+ return (groupLevelCount == null && mDefaultLogLevelCounts[level.ordinal()] > 0)
+ || (groupLevelCount != null && groupLevelCount[level.ordinal()] > 0)
+ || group.isLogToLogcat();
+ }
+
+ @Override
+ public void registerGroups(IProtoLogGroup... protoLogGroups) {
+ for (IProtoLogGroup protoLogGroup : protoLogGroups) {
+ mLogGroups.put(protoLogGroup.name(), protoLogGroup);
+ }
+
+ final String[] groupsLoggingToLogcat = Arrays.stream(protoLogGroups)
+ .filter(IProtoLogGroup::isLogToLogcat)
+ .map(IProtoLogGroup::name)
+ .toArray(String[]::new);
+
+ if (mViewerConfigReader != null) {
+ mViewerConfigReader.loadViewerConfig(groupsLoggingToLogcat);
+ }
+ }
+
+ /**
+ * Responds to a shell command.
+ */
+ @Deprecated
+ public int onShellCommand(ShellCommand shell) {
+ PrintWriter pw = shell.getOutPrintWriter();
+
+ if (android.tracing.Flags.clientSideProtoLogging()) {
+ pw.println("Command deprecated. Please use 'cmd protolog' instead.");
+ return -1;
+ }
+
+ String cmd = shell.getNextArg();
+ if (cmd == null) {
+ return unknownCommand(pw);
+ }
+ ArrayList<String> args = new ArrayList<>();
+ String arg;
+ while ((arg = shell.getNextArg()) != null) {
+ args.add(arg);
+ }
+ final ILogger logger = (msg) -> logAndPrintln(pw, msg);
+ String[] groups = args.toArray(new String[0]);
+ switch (cmd) {
+ case "start", "stop" -> {
+ pw.println("Command not supported. "
+ + "Please start and stop ProtoLog tracing with Perfetto.");
+ return -1;
}
+ case "enable-text" -> {
+ if (mViewerConfigReader != null) {
+ mViewerConfigReader.loadViewerConfig(groups, logger);
+ }
+ return setTextLogging(true, logger, groups);
+ }
+ case "disable-text" -> {
+ return setTextLogging(false, logger, groups);
+ }
+ default -> {
+ return unknownCommand(pw);
+ }
+ }
+ }
+
+ private void log(LogLevel logLevel, IProtoLogGroup group, Message message,
+ @Nullable Object[] args) {
+ if (isProtoEnabled()) {
+ long tsNanos = SystemClock.elapsedRealtimeNanos();
+ final String stacktrace;
+ if (mCollectStackTraceGroupCounts.getOrDefault(group.name(), 0) > 0) {
+ stacktrace = collectStackTrace();
+ } else {
+ stacktrace = null;
+ }
+ try {
+ mBackgroundServiceLock.lock();
+ mBackgroundLoggingService.execute(() ->
+ logToProto(logLevel, group, message, args, tsNanos,
+ stacktrace));
+ } finally {
+ mBackgroundServiceLock.unlock();
+ }
+ }
+ if (group.isLogToLogcat()) {
+ logToLogcat(group.getTag(), logLevel, message, args);
+ }
+ }
+
+ private void onTracingFlush() {
+ final ExecutorService loggingService;
+ try {
+ mBackgroundServiceLock.lock();
+ loggingService = mBackgroundLoggingService;
+ mBackgroundLoggingService = Executors.newSingleThreadExecutor();
} finally {
- Trace.traceEnd(Trace.TRACE_TAG_WINDOW_MANAGER);
+ mBackgroundServiceLock.unlock();
}
+
+ try {
+ loggingService.shutdown();
+ boolean finished = loggingService.awaitTermination(10, TimeUnit.SECONDS);
+
+ if (!finished) {
+ Log.e(LOG_TAG, "ProtoLog background tracing service didn't finish gracefully.");
+ }
+ } catch (InterruptedException e) {
+ Log.e(LOG_TAG, "Failed to wait for tracing to finish", e);
+ }
+
+ dumpTransitionTraceConfig();
}
private void dumpTransitionTraceConfig() {
+ if (mViewerConfigInputStreamProvider == null) {
+ // No viewer config available
+ return;
+ }
+
ProtoInputStream pis = mViewerConfigInputStreamProvider.getInputStream();
if (pis == null) {
@@ -256,89 +451,58 @@ public class PerfettoProtoLogImpl implements IProtoLog {
os.end(outMessagesToken);
}
- private void logToLogcat(String tag, LogLevel level, long messageHash,
- @Nullable String messageString, Object[] args) {
- Trace.traceBegin(Trace.TRACE_TAG_WINDOW_MANAGER, "logToLogcat");
- try {
- doLogToLogcat(tag, level, messageHash, messageString, args);
- } finally {
- Trace.traceEnd(Trace.TRACE_TAG_WINDOW_MANAGER);
+ private void logToLogcat(String tag, LogLevel level, Message message,
+ @Nullable Object[] args) {
+ String messageString;
+ if (mViewerConfigReader == null) {
+ messageString = message.getMessage();
+ } else {
+ messageString = message.getMessage(mViewerConfigReader);
}
- }
- private void doLogToLogcat(String tag, LogLevel level, long messageHash,
- @androidx.annotation.Nullable String messageString, Object[] args) {
- String message = null;
if (messageString == null) {
- messageString = mViewerConfigReader.getViewerString(messageHash);
- }
- if (messageString != null) {
+ StringBuilder builder = new StringBuilder("UNKNOWN MESSAGE");
if (args != null) {
- try {
- message = TextUtils.formatSimple(messageString, args);
- } catch (Exception ex) {
- Slog.w(LOG_TAG, "Invalid ProtoLog format string.", ex);
- }
- } else {
- message = messageString;
+ builder.append(" args = (");
+ builder.append(String.join(", ", Arrays.stream(args)
+ .map(it -> {
+ if (it == null) {
+ return "null";
+ } else {
+ return it.toString();
+ }
+ }).toList()));
+ builder.append(")");
}
+ messageString = builder.toString();
+ args = new Object[0];
}
- if (message == null) {
- StringBuilder builder = new StringBuilder("UNKNOWN MESSAGE (" + messageHash + ")");
- for (Object o : args) {
- builder.append(" ").append(o);
- }
- message = builder.toString();
- }
- passToLogcat(tag, level, message);
- }
- /**
- * SLog wrapper.
- */
- @VisibleForTesting
- public void passToLogcat(String tag, LogLevel level, String message) {
- switch (level) {
- case DEBUG:
- Slog.d(tag, message);
- break;
- case VERBOSE:
- Slog.v(tag, message);
- break;
- case INFO:
- Slog.i(tag, message);
- break;
- case WARN:
- Slog.w(tag, message);
- break;
- case ERROR:
- Slog.e(tag, message);
- break;
- case WTF:
- Slog.wtf(tag, message);
- break;
- }
+ logToLogcat(tag, level, messageString, args);
}
- private void logToProto(LogLevel level, String groupName, long messageHash, int paramsMask,
- Object[] args, long tsNanos) {
- if (!isProtoEnabled()) {
- return;
- }
-
- Trace.traceBegin(Trace.TRACE_TAG_WINDOW_MANAGER, "logToProto");
- try {
- doLogToProto(level, groupName, messageHash, paramsMask, args, tsNanos);
- } finally {
- Trace.traceEnd(Trace.TRACE_TAG_WINDOW_MANAGER);
+ private void logToLogcat(String tag, LogLevel level, String messageString,
+ @Nullable Object[] args) {
+ String message;
+ if (args != null) {
+ try {
+ message = TextUtils.formatSimple(messageString, args);
+ } catch (IllegalArgumentException e) {
+ message = "FORMAT_ERROR \"" + messageString + "\", args=("
+ + String.join(
+ ", ", Arrays.stream(args).map(Object::toString).toList()) + ")";
+ }
+ } else {
+ message = messageString;
}
+ passToLogcat(tag, level, message);
}
- private void doLogToProto(LogLevel level, String groupName, long messageHash, int paramsMask,
- Object[] args, long tsNanos) {
+ private void logToProto(LogLevel level, IProtoLogGroup logGroup, Message message, Object[] args,
+ long tsNanos, @Nullable String stacktrace) {
mDataSource.trace(ctx -> {
final ProtoLogDataSource.TlsState tlsState = ctx.getCustomTlsState();
- final LogLevel logFrom = tlsState.getLogFromLevel(groupName);
+ final LogLevel logFrom = tlsState.getLogFromLevel(logGroup.name());
if (level.ordinal() < logFrom.ordinal()) {
return;
@@ -350,29 +514,43 @@ public class PerfettoProtoLogImpl implements IProtoLog {
// trace processing easier.
int argIndex = 0;
for (Object o : args) {
- int type = LogDataType.bitmaskToLogDataType(paramsMask, argIndex);
+ int type = LogDataType.bitmaskToLogDataType(message.getMessageMask(), argIndex);
if (type == LogDataType.STRING) {
- internStringArg(ctx, o.toString());
+ if (o == null) {
+ internStringArg(ctx, NULL_STRING);
+ } else {
+ internStringArg(ctx, o.toString());
+ }
}
argIndex++;
}
}
int internedStacktrace = 0;
- if (tlsState.getShouldCollectStacktrace(groupName)) {
+ if (tlsState.getShouldCollectStacktrace(logGroup.name())) {
// Intern stackstraces before creating the trace packet for the proto message so
// that the interned stacktrace strings appear before in the trace to make the
// trace processing easier.
- String stacktrace = collectStackTrace();
internedStacktrace = internStacktraceString(ctx, stacktrace);
}
+ boolean needsIncrementalState = false;
+
+ long messageHash = 0;
+ if (message.mMessageHash != null) {
+ messageHash = message.mMessageHash;
+ }
+ if (message.mMessageString != null) {
+ needsIncrementalState = true;
+ messageHash =
+ internProtoMessage(ctx, level, logGroup, message.mMessageString);
+ }
+
final ProtoOutputStream os = ctx.newTracePacket();
os.write(TIMESTAMP, tsNanos);
long token = os.start(PROTOLOG_MESSAGE);
- os.write(MESSAGE_ID, messageHash);
- boolean needsIncrementalState = false;
+ os.write(MESSAGE_ID, messageHash);
if (args != null) {
@@ -381,22 +559,39 @@ public class PerfettoProtoLogImpl implements IProtoLog {
ArrayList<Double> doubleParams = new ArrayList<>();
ArrayList<Boolean> booleanParams = new ArrayList<>();
for (Object o : args) {
- int type = LogDataType.bitmaskToLogDataType(paramsMask, argIndex);
+ int type = LogDataType.bitmaskToLogDataType(message.getMessageMask(), argIndex);
try {
switch (type) {
case LogDataType.STRING:
- final int internedStringId = internStringArg(ctx, o.toString());
+ final int internedStringId;
+ if (o == null) {
+ internedStringId = internStringArg(ctx, NULL_STRING);
+ } else {
+ internedStringId = internStringArg(ctx, o.toString());
+ }
os.write(STR_PARAM_IIDS, internedStringId);
needsIncrementalState = true;
break;
case LogDataType.LONG:
- longParams.add(((Number) o).longValue());
+ if (o == null) {
+ longParams.add(0);
+ } else {
+ longParams.add(((Number) o).longValue());
+ }
break;
case LogDataType.DOUBLE:
- doubleParams.add(((Number) o).doubleValue());
+ if (o == null) {
+ doubleParams.add(0d);
+ } else {
+ doubleParams.add(((Number) o).doubleValue());
+ }
break;
case LogDataType.BOOLEAN:
- booleanParams.add((boolean) o);
+ if (o == null) {
+ booleanParams.add(false);
+ } else {
+ booleanParams.add((boolean) o);
+ }
break;
}
} catch (ClassCastException ex) {
@@ -414,7 +609,7 @@ public class PerfettoProtoLogImpl implements IProtoLog {
booleanParams.forEach(it -> os.write(BOOLEAN_PARAMS, it ? 1 : 0));
}
- if (tlsState.getShouldCollectStacktrace(groupName)) {
+ if (tlsState.getShouldCollectStacktrace(logGroup.name())) {
os.write(STACKTRACE_IID, internedStacktrace);
}
@@ -427,6 +622,63 @@ public class PerfettoProtoLogImpl implements IProtoLog {
});
}
+ private long internProtoMessage(
+ TracingContext<ProtoLogDataSource.Instance, ProtoLogDataSource.TlsState,
+ ProtoLogDataSource.IncrementalState> ctx, LogLevel level,
+ IProtoLogGroup logGroup, String message) {
+ final ProtoLogDataSource.IncrementalState incrementalState = ctx.getIncrementalState();
+
+ if (!incrementalState.clearReported) {
+ final ProtoOutputStream os = ctx.newTracePacket();
+ os.write(SEQUENCE_FLAGS, SEQ_INCREMENTAL_STATE_CLEARED);
+ incrementalState.clearReported = true;
+ }
+
+
+ if (!incrementalState.protologGroupInterningSet.contains(logGroup.getId())) {
+ incrementalState.protologGroupInterningSet.add(logGroup.getId());
+
+ final ProtoOutputStream os = ctx.newTracePacket();
+ final long protologViewerConfigToken = os.start(PROTOLOG_VIEWER_CONFIG);
+ final long groupConfigToken = os.start(GROUPS);
+
+ os.write(ID, logGroup.getId());
+ os.write(NAME, logGroup.name());
+ os.write(TAG, logGroup.getTag());
+
+ os.end(groupConfigToken);
+ os.end(protologViewerConfigToken);
+ }
+
+ final Long messageHash = hash(level, logGroup.name(), message);
+ if (!incrementalState.protologMessageInterningSet.contains(messageHash)) {
+ incrementalState.protologMessageInterningSet.add(messageHash);
+
+ final ProtoOutputStream os = ctx.newTracePacket();
+ final long protologViewerConfigToken = os.start(PROTOLOG_VIEWER_CONFIG);
+ final long messageConfigToken = os.start(MESSAGES);
+
+ os.write(MessageData.MESSAGE_ID, messageHash);
+ os.write(MESSAGE, message);
+ os.write(LEVEL, level.ordinal());
+ os.write(GROUP_ID, logGroup.getId());
+
+ os.end(messageConfigToken);
+ os.end(protologViewerConfigToken);
+ }
+
+ return messageHash;
+ }
+
+ private Long hash(
+ LogLevel logLevel,
+ String logGroup,
+ String messageString
+ ) {
+ final String fullStringIdentifier = messageString + logLevel + logGroup;
+ return UUID.nameUUIDFromBytes(fullStringIdentifier.getBytes()).getMostSignificantBits();
+ }
+
private static final int STACK_SIZE_TO_PROTO_LOG_ENTRY_CALL = 12;
private String collectStackTrace() {
@@ -466,7 +718,7 @@ public class PerfettoProtoLogImpl implements IProtoLog {
ProtoLogDataSource.IncrementalState> ctx,
Map<String, Integer> internMap,
long fieldId,
- String string
+ @NonNull String string
) {
final ProtoLogDataSource.IncrementalState incrementalState = ctx.getIncrementalState();
@@ -492,74 +744,6 @@ public class PerfettoProtoLogImpl implements IProtoLog {
return internMap.get(string);
}
- /**
- * Returns {@code true} iff logging to proto is enabled.
- */
- public boolean isProtoEnabled() {
- return mTracingInstances.get() > 0;
- }
-
- /**
- * Start text logging
- * @param groups Groups to start text logging for
- * @param logger A logger to write status updates to
- * @return status code
- */
- public int startLoggingToLogcat(String[] groups, ILogger logger) {
- mViewerConfigReader.loadViewerConfig(logger);
- return setTextLogging(true, logger, groups);
- }
-
- /**
- * Stop text logging
- * @param groups Groups to start text logging for
- * @param logger A logger to write status updates to
- * @return status code
- */
- public int stopLoggingToLogcat(String[] groups, ILogger logger) {
- mViewerConfigReader.unloadViewerConfig();
- return setTextLogging(false, logger, groups);
- }
-
- @Override
- public boolean isEnabled(IProtoLogGroup group, LogLevel level) {
- return group.isLogToLogcat() || getLogFromLevel(group).ordinal() <= level.ordinal();
- }
-
- private LogLevel getLogFromLevel(IProtoLogGroup group) {
- if (mLogLevelCounts.containsKey(group)) {
- for (LogLevel logLevel : LogLevel.values()) {
- if (mLogLevelCounts.get(group).getOrDefault(logLevel, 0) > 0) {
- return logLevel;
- }
- }
- } else {
- for (LogLevel logLevel : LogLevel.values()) {
- if (mDefaultLogLevelCounts.getOrDefault(logLevel, 0) > 0) {
- return logLevel;
- }
- }
- }
-
- return LogLevel.WTF;
- }
-
- /**
- * Start logging the stack trace of the when the log message happened for target groups
- * @return status code
- */
- public int startLoggingStackTrace(String[] groups, ILogger logger) {
- return -1;
- }
-
- /**
- * Stop logging the stack trace of the when the log message happened for target groups
- * @return status code
- */
- public int stopLoggingStackTrace() {
- return -1;
- }
-
private int setTextLogging(boolean value, ILogger logger, String... groups) {
for (int i = 0; i < groups.length; i++) {
String group = groups[i];
@@ -576,41 +760,6 @@ public class PerfettoProtoLogImpl implements IProtoLog {
return 0;
}
- /**
- * Responds to a shell command.
- */
- public int onShellCommand(ShellCommand shell) {
- PrintWriter pw = shell.getOutPrintWriter();
- String cmd = shell.getNextArg();
- if (cmd == null) {
- return unknownCommand(pw);
- }
- ArrayList<String> args = new ArrayList<>();
- String arg;
- while ((arg = shell.getNextArg()) != null) {
- args.add(arg);
- }
- final ILogger logger = (msg) -> logAndPrintln(pw, msg);
- String[] groups = args.toArray(new String[0]);
- switch (cmd) {
- case "start", "stop" -> {
- pw.println("Command not supported. "
- + "Please start and stop ProtoLog tracing with Perfetto.");
- return -1;
- }
- case "enable-text" -> {
- mViewerConfigReader.loadViewerConfig(logger);
- return setTextLogging(true, logger, groups);
- }
- case "disable-text" -> {
- return setTextLogging(false, logger, groups);
- }
- default -> {
- return unknownCommand(pw);
- }
- }
- }
-
private int unknownCommand(PrintWriter pw) {
pw.println("Unknown command");
pw.println("Window manager logging options:");
@@ -619,67 +768,116 @@ public class PerfettoProtoLogImpl implements IProtoLog {
return -1;
}
- private synchronized void onTracingInstanceStart(ProtoLogDataSource.ProtoLogConfig config) {
- this.mTracingInstances.incrementAndGet();
-
+ private synchronized void onTracingInstanceStart(
+ int instanceIdx, ProtoLogDataSource.ProtoLogConfig config) {
final LogLevel defaultLogFrom = config.getDefaultGroupConfig().logFrom;
- mDefaultLogLevelCounts.put(defaultLogFrom,
- mDefaultLogLevelCounts.getOrDefault(defaultLogFrom, 0) + 1);
+ for (int i = defaultLogFrom.ordinal(); i < LogLevel.values().length; i++) {
+ mDefaultLogLevelCounts[i]++;
+ }
final Set<String> overriddenGroupTags = config.getGroupTagsWithOverriddenConfigs();
for (String overriddenGroupTag : overriddenGroupTags) {
- IProtoLogGroup group = mLogGroups.get(overriddenGroupTag);
-
- mLogLevelCounts.putIfAbsent(group, new ArrayMap<>());
- final Map<LogLevel, Integer> logLevelsCountsForGroup = mLogLevelCounts.get(group);
+ mLogLevelCounts.putIfAbsent(overriddenGroupTag, new int[LogLevel.values().length]);
+ final int[] logLevelsCountsForGroup = mLogLevelCounts.get(overriddenGroupTag);
final LogLevel logFromLevel = config.getConfigFor(overriddenGroupTag).logFrom;
- logLevelsCountsForGroup.put(logFromLevel,
- logLevelsCountsForGroup.getOrDefault(logFromLevel, 0) + 1);
+ for (int i = logFromLevel.ordinal(); i < LogLevel.values().length; i++) {
+ logLevelsCountsForGroup[i]++;
+ }
+
+ if (config.getConfigFor(overriddenGroupTag).collectStackTrace) {
+ mCollectStackTraceGroupCounts.put(overriddenGroupTag,
+ mCollectStackTraceGroupCounts.getOrDefault(overriddenGroupTag, 0) + 1);
+ }
+
+ if (config.getConfigFor(overriddenGroupTag).collectStackTrace) {
+ mCollectStackTraceGroupCounts.put(overriddenGroupTag,
+ mCollectStackTraceGroupCounts.getOrDefault(overriddenGroupTag, 0) + 1);
+ }
}
mCacheUpdater.run();
+
+ this.mTracingInstances.incrementAndGet();
}
- private synchronized void onTracingInstanceStop(ProtoLogDataSource.ProtoLogConfig config) {
+ private synchronized void onTracingInstanceStop(
+ int instanceIdx, ProtoLogDataSource.ProtoLogConfig config) {
this.mTracingInstances.decrementAndGet();
final LogLevel defaultLogFrom = config.getDefaultGroupConfig().logFrom;
- mDefaultLogLevelCounts.put(defaultLogFrom,
- mDefaultLogLevelCounts.get(defaultLogFrom) - 1);
- if (mDefaultLogLevelCounts.get(defaultLogFrom) <= 0) {
- mDefaultLogLevelCounts.remove(defaultLogFrom);
+ for (int i = defaultLogFrom.ordinal(); i < LogLevel.values().length; i++) {
+ mDefaultLogLevelCounts[i]--;
}
final Set<String> overriddenGroupTags = config.getGroupTagsWithOverriddenConfigs();
for (String overriddenGroupTag : overriddenGroupTags) {
- IProtoLogGroup group = mLogGroups.get(overriddenGroupTag);
-
- mLogLevelCounts.putIfAbsent(group, new ArrayMap<>());
- final Map<LogLevel, Integer> logLevelsCountsForGroup = mLogLevelCounts.get(group);
+ final int[] logLevelsCountsForGroup = mLogLevelCounts.get(overriddenGroupTag);
final LogLevel logFromLevel = config.getConfigFor(overriddenGroupTag).logFrom;
- logLevelsCountsForGroup.put(logFromLevel,
- logLevelsCountsForGroup.get(logFromLevel) - 1);
- if (logLevelsCountsForGroup.get(logFromLevel) <= 0) {
- logLevelsCountsForGroup.remove(logFromLevel);
+ for (int i = logFromLevel.ordinal(); i < LogLevel.values().length; i++) {
+ logLevelsCountsForGroup[i]--;
+ }
+ if (Arrays.stream(logLevelsCountsForGroup).allMatch(it -> it == 0)) {
+ mLogLevelCounts.remove(overriddenGroupTag);
}
- if (logLevelsCountsForGroup.isEmpty()) {
- mLogLevelCounts.remove(group);
+
+ if (config.getConfigFor(overriddenGroupTag).collectStackTrace) {
+ mCollectStackTraceGroupCounts.put(overriddenGroupTag,
+ mCollectStackTraceGroupCounts.get(overriddenGroupTag) - 1);
+
+ if (mCollectStackTraceGroupCounts.get(overriddenGroupTag) == 0) {
+ mCollectStackTraceGroupCounts.remove(overriddenGroupTag);
+ }
}
}
mCacheUpdater.run();
}
- static void logAndPrintln(@Nullable PrintWriter pw, String msg) {
+ private static void logAndPrintln(@Nullable PrintWriter pw, String msg) {
Slog.i(LOG_TAG, msg);
if (pw != null) {
pw.println(msg);
pw.flush();
}
}
+
+ private static class Message {
+ private final Long mMessageHash;
+ private final Integer mMessageMask;
+ private final String mMessageString;
+
+ private Message(Long messageHash, int messageMask) {
+ this.mMessageHash = messageHash;
+ this.mMessageMask = messageMask;
+ this.mMessageString = null;
+ }
+
+ private Message(String messageString) {
+ this.mMessageHash = null;
+ final List<Integer> argTypes = LogDataType.parseFormatString(messageString);
+ this.mMessageMask = LogDataType.logDataTypesToBitMask(argTypes);
+ this.mMessageString = messageString;
+ }
+
+ private int getMessageMask() {
+ return mMessageMask;
+ }
+
+ private String getMessage() {
+ return mMessageString;
+ }
+
+ private String getMessage(@NonNull ProtoLogViewerConfigReader viewerConfigReader) {
+ if (mMessageString != null) {
+ return mMessageString;
+ }
+
+ return viewerConfigReader.getViewerString(mMessageHash);
+ }
+ }
}
diff --git a/core/java/com/android/internal/protolog/ProtoLog.java b/core/java/com/android/internal/protolog/ProtoLog.java
index 0118c056d682..87678e5922f9 100644
--- a/core/java/com/android/internal/protolog/ProtoLog.java
+++ b/core/java/com/android/internal/protolog/ProtoLog.java
@@ -44,21 +44,23 @@ public class ProtoLog {
// LINT.ThenChange(frameworks/base/tools/protologtool/src/com/android/protolog/tool/ProtoLogTool.kt)
// Needs to be set directly otherwise the protologtool tries to transform the method call
+ @Deprecated
public static boolean REQUIRE_PROTOLOGTOOL = true;
+ private static IProtoLog sProtoLogInstance;
+
/**
* DEBUG level log.
*
* @param group {@code IProtoLogGroup} controlling this log call.
* @param messageString constant format string for the logged message.
* @param args parameters to be used with the format string.
+ *
+ * NOTE: If source code is pre-processed by ProtoLogTool this is not the function call that is
+ * executed. Check generated code for actual call.
*/
public static void d(IProtoLogGroup group, String messageString, Object... args) {
- // Stub, replaced by the ProtoLogTool.
- if (REQUIRE_PROTOLOGTOOL) {
- throw new UnsupportedOperationException(
- "ProtoLog calls MUST be processed with ProtoLogTool");
- }
+ logStringMessage(LogLevel.DEBUG, group, messageString, args);
}
/**
@@ -67,13 +69,12 @@ public class ProtoLog {
* @param group {@code IProtoLogGroup} controlling this log call.
* @param messageString constant format string for the logged message.
* @param args parameters to be used with the format string.
+ *
+ * NOTE: If source code is pre-processed by ProtoLogTool this is not the function call that is
+ * executed. Check generated code for actual call.
*/
public static void v(IProtoLogGroup group, String messageString, Object... args) {
- // Stub, replaced by the ProtoLogTool.
- if (REQUIRE_PROTOLOGTOOL) {
- throw new UnsupportedOperationException(
- "ProtoLog calls MUST be processed with ProtoLogTool");
- }
+ logStringMessage(LogLevel.VERBOSE, group, messageString, args);
}
/**
@@ -82,13 +83,12 @@ public class ProtoLog {
* @param group {@code IProtoLogGroup} controlling this log call.
* @param messageString constant format string for the logged message.
* @param args parameters to be used with the format string.
+ *
+ * NOTE: If source code is pre-processed by ProtoLogTool this is not the function call that is
+ * executed. Check generated code for actual call.
*/
public static void i(IProtoLogGroup group, String messageString, Object... args) {
- // Stub, replaced by the ProtoLogTool.
- if (REQUIRE_PROTOLOGTOOL) {
- throw new UnsupportedOperationException(
- "ProtoLog calls MUST be processed with ProtoLogTool");
- }
+ logStringMessage(LogLevel.INFO, group, messageString, args);
}
/**
@@ -97,13 +97,12 @@ public class ProtoLog {
* @param group {@code IProtoLogGroup} controlling this log call.
* @param messageString constant format string for the logged message.
* @param args parameters to be used with the format string.
+ *
+ * NOTE: If source code is pre-processed by ProtoLogTool this is not the function call that is
+ * executed. Check generated code for actual call.
*/
public static void w(IProtoLogGroup group, String messageString, Object... args) {
- // Stub, replaced by the ProtoLogTool.
- if (REQUIRE_PROTOLOGTOOL) {
- throw new UnsupportedOperationException(
- "ProtoLog calls MUST be processed with ProtoLogTool");
- }
+ logStringMessage(LogLevel.WARN, group, messageString, args);
}
/**
@@ -112,13 +111,12 @@ public class ProtoLog {
* @param group {@code IProtoLogGroup} controlling this log call.
* @param messageString constant format string for the logged message.
* @param args parameters to be used with the format string.
+ *
+ * NOTE: If source code is pre-processed by ProtoLogTool this is not the function call that is
+ * executed. Check generated code for actual call.
*/
public static void e(IProtoLogGroup group, String messageString, Object... args) {
- // Stub, replaced by the ProtoLogTool.
- if (REQUIRE_PROTOLOGTOOL) {
- throw new UnsupportedOperationException(
- "ProtoLog calls MUST be processed with ProtoLogTool");
- }
+ logStringMessage(LogLevel.ERROR, group, messageString, args);
}
/**
@@ -127,13 +125,12 @@ public class ProtoLog {
* @param group {@code IProtoLogGroup} controlling this log call.
* @param messageString constant format string for the logged message.
* @param args parameters to be used with the format string.
+ *
+ * NOTE: If source code is pre-processed by ProtoLogTool this is not the function call that is
+ * executed. Check generated code for actual call.
*/
public static void wtf(IProtoLogGroup group, String messageString, Object... args) {
- // Stub, replaced by the ProtoLogTool.
- if (REQUIRE_PROTOLOGTOOL) {
- throw new UnsupportedOperationException(
- "ProtoLog calls MUST be processed with ProtoLogTool");
- }
+ logStringMessage(LogLevel.WTF, group, messageString, args);
}
/**
@@ -142,11 +139,7 @@ public class ProtoLog {
* @return true iff this is being logged.
*/
public static boolean isEnabled(IProtoLogGroup group, LogLevel level) {
- if (REQUIRE_PROTOLOGTOOL) {
- throw new UnsupportedOperationException(
- "ProtoLog calls MUST be processed with ProtoLogTool");
- }
- return false;
+ return sProtoLogInstance.isEnabled(group, level);
}
/**
@@ -154,10 +147,36 @@ public class ProtoLog {
* @return A singleton instance of ProtoLog.
*/
public static IProtoLog getSingleInstance() {
- if (REQUIRE_PROTOLOGTOOL) {
- throw new UnsupportedOperationException(
- "ProtoLog calls MUST be processed with ProtoLogTool");
+ return sProtoLogInstance;
+ }
+
+ /**
+ * Registers available protolog groups. A group must be registered before it can be used.
+ * @param protoLogGroups The groups to register for use in protolog.
+ */
+ public static void registerGroups(IProtoLogGroup... protoLogGroups) {
+ sProtoLogInstance.registerGroups(protoLogGroups);
+ }
+
+ private static void logStringMessage(LogLevel logLevel, IProtoLogGroup group,
+ String stringMessage, Object... args) {
+ if (sProtoLogInstance == null) {
+ throw new IllegalStateException(
+ "Trying to use ProtoLog before it is initialized in this process.");
+ }
+
+ if (sProtoLogInstance.isEnabled(group, logLevel)) {
+ sProtoLogInstance.log(logLevel, group, stringMessage, args);
+ }
+ }
+
+ static {
+ if (android.tracing.Flags.perfettoProtologTracing()) {
+ sProtoLogInstance = new PerfettoProtoLogImpl();
+ } else {
+ // The first call to ProtoLog is likely to flip REQUIRE_PROTOLOGTOOL, which is when this
+ // static block will be executed before REQUIRE_PROTOLOGTOOL is actually set.
+ sProtoLogInstance = new LogcatOnlyProtoLogImpl();
}
- return null;
}
}
diff --git a/core/java/com/android/internal/protolog/ProtoLogDataSource.java b/core/java/com/android/internal/protolog/ProtoLogDataSource.java
index 6ab79b92784e..6dc6585b5caf 100644
--- a/core/java/com/android/internal/protolog/ProtoLogDataSource.java
+++ b/core/java/com/android/internal/protolog/ProtoLogDataSource.java
@@ -40,6 +40,7 @@ import com.android.internal.protolog.common.LogLevel;
import java.io.IOException;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.function.Consumer;
@@ -48,12 +49,12 @@ public class ProtoLogDataSource extends DataSource<ProtoLogDataSource.Instance,
ProtoLogDataSource.TlsState,
ProtoLogDataSource.IncrementalState> {
- private final Consumer<ProtoLogConfig> mOnStart;
+ private final Instance.TracingInstanceStartCallback mOnStart;
private final Runnable mOnFlush;
- private final Consumer<ProtoLogConfig> mOnStop;
+ private final Instance.TracingInstanceStopCallback mOnStop;
- public ProtoLogDataSource(Consumer<ProtoLogConfig> onStart, Runnable onFlush,
- Consumer<ProtoLogConfig> onStop) {
+ public ProtoLogDataSource(Instance.TracingInstanceStartCallback onStart, Runnable onFlush,
+ Instance.TracingInstanceStopCallback onStop) {
super("android.protolog");
this.mOnStart = onStart;
this.mOnFlush = onFlush;
@@ -138,6 +139,8 @@ public class ProtoLogDataSource extends DataSource<ProtoLogDataSource.Instance,
}
public static class IncrementalState {
+ public final Set<Integer> protologGroupInterningSet = new HashSet<>();
+ public final Set<Long> protologMessageInterningSet = new HashSet<>();
public final Map<String, Integer> argumentInterningMap = new HashMap<>();
public final Map<String, Integer> stacktraceInterningMap = new HashMap<>();
public boolean clearReported = false;
@@ -264,20 +267,30 @@ public class ProtoLogDataSource extends DataSource<ProtoLogDataSource.Instance,
public static class Instance extends DataSourceInstance {
- private final Consumer<ProtoLogConfig> mOnStart;
+ public interface TracingInstanceStartCallback {
+ void run(int instanceIdx, ProtoLogConfig config);
+ }
+
+ public interface TracingInstanceStopCallback {
+ void run(int instanceIdx, ProtoLogConfig config);
+ }
+
+ private final TracingInstanceStartCallback mOnStart;
private final Runnable mOnFlush;
- private final Consumer<ProtoLogConfig> mOnStop;
+ private final TracingInstanceStopCallback mOnStop;
private final ProtoLogConfig mConfig;
+ private final int mInstanceIndex;
public Instance(
DataSource<Instance, TlsState, IncrementalState> dataSource,
int instanceIdx,
ProtoLogConfig config,
- Consumer<ProtoLogConfig> onStart,
+ TracingInstanceStartCallback onStart,
Runnable onFlush,
- Consumer<ProtoLogConfig> onStop
+ TracingInstanceStopCallback onStop
) {
super(dataSource, instanceIdx);
+ this.mInstanceIndex = instanceIdx;
this.mOnStart = onStart;
this.mOnFlush = onFlush;
this.mOnStop = onStop;
@@ -286,7 +299,7 @@ public class ProtoLogDataSource extends DataSource<ProtoLogDataSource.Instance,
@Override
public void onStart(StartCallbackArguments args) {
- this.mOnStart.accept(this.mConfig);
+ this.mOnStart.run(this.mInstanceIndex, this.mConfig);
}
@Override
@@ -296,7 +309,7 @@ public class ProtoLogDataSource extends DataSource<ProtoLogDataSource.Instance,
@Override
public void onStop(StopCallbackArguments args) {
- this.mOnStop.accept(this.mConfig);
+ this.mOnStop.run(this.mInstanceIndex, this.mConfig);
}
}
}
diff --git a/core/java/com/android/internal/protolog/ProtoLogImpl.java b/core/java/com/android/internal/protolog/ProtoLogImpl.java
index 6d142afce626..77ca7ce91b22 100644
--- a/core/java/com/android/internal/protolog/ProtoLogImpl.java
+++ b/core/java/com/android/internal/protolog/ProtoLogImpl.java
@@ -30,6 +30,7 @@ import com.android.internal.protolog.common.IProtoLogGroup;
import com.android.internal.protolog.common.LogLevel;
import com.android.internal.protolog.common.ProtoLogToolInjected;
+import java.io.File;
import java.util.TreeMap;
/**
@@ -54,48 +55,33 @@ public class ProtoLogImpl {
private static Runnable sCacheUpdater;
/** Used by the ProtoLogTool, do not call directly - use {@code ProtoLog} class instead. */
- public static void d(IProtoLogGroup group, long messageHash, int paramsMask,
- @Nullable String messageString,
- Object... args) {
- getSingleInstance()
- .log(LogLevel.DEBUG, group, messageHash, paramsMask, messageString, args);
+ public static void d(IProtoLogGroup group, long messageHash, int paramsMask, Object... args) {
+ getSingleInstance().log(LogLevel.DEBUG, group, messageHash, paramsMask, args);
}
/** Used by the ProtoLogTool, do not call directly - use {@code ProtoLog} class instead. */
- public static void v(IProtoLogGroup group, long messageHash, int paramsMask,
- @Nullable String messageString,
- Object... args) {
- getSingleInstance().log(LogLevel.VERBOSE, group, messageHash, paramsMask, messageString,
- args);
+ public static void v(IProtoLogGroup group, long messageHash, int paramsMask, Object... args) {
+ getSingleInstance().log(LogLevel.VERBOSE, group, messageHash, paramsMask, args);
}
/** Used by the ProtoLogTool, do not call directly - use {@code ProtoLog} class instead. */
- public static void i(IProtoLogGroup group, long messageHash, int paramsMask,
- @Nullable String messageString,
- Object... args) {
- getSingleInstance().log(LogLevel.INFO, group, messageHash, paramsMask, messageString, args);
+ public static void i(IProtoLogGroup group, long messageHash, int paramsMask, Object... args) {
+ getSingleInstance().log(LogLevel.INFO, group, messageHash, paramsMask, args);
}
/** Used by the ProtoLogTool, do not call directly - use {@code ProtoLog} class instead. */
- public static void w(IProtoLogGroup group, long messageHash, int paramsMask,
- @Nullable String messageString,
- Object... args) {
- getSingleInstance().log(LogLevel.WARN, group, messageHash, paramsMask, messageString, args);
+ public static void w(IProtoLogGroup group, long messageHash, int paramsMask, Object... args) {
+ getSingleInstance().log(LogLevel.WARN, group, messageHash, paramsMask, args);
}
/** Used by the ProtoLogTool, do not call directly - use {@code ProtoLog} class instead. */
- public static void e(IProtoLogGroup group, long messageHash, int paramsMask,
- @Nullable String messageString,
- Object... args) {
- getSingleInstance()
- .log(LogLevel.ERROR, group, messageHash, paramsMask, messageString, args);
+ public static void e(IProtoLogGroup group, long messageHash, int paramsMask, Object... args) {
+ getSingleInstance().log(LogLevel.ERROR, group, messageHash, paramsMask, args);
}
/** Used by the ProtoLogTool, do not call directly - use {@code ProtoLog} class instead. */
- public static void wtf(IProtoLogGroup group, long messageHash, int paramsMask,
- @Nullable String messageString,
- Object... args) {
- getSingleInstance().log(LogLevel.WTF, group, messageHash, paramsMask, messageString, args);
+ public static void wtf(IProtoLogGroup group, long messageHash, int paramsMask, Object... args) {
+ getSingleInstance().log(LogLevel.WTF, group, messageHash, paramsMask, args);
}
/**
@@ -107,18 +93,35 @@ public class ProtoLogImpl {
}
/**
+ * Registers available protolog groups. A group must be registered before it can be used.
+ * @param protoLogGroups The groups to register for use in protolog.
+ */
+ public static void registerGroups(IProtoLogGroup... protoLogGroups) {
+ getSingleInstance().registerGroups(protoLogGroups);
+ }
+
+ /**
* Returns the single instance of the ProtoLogImpl singleton class.
*/
public static synchronized IProtoLog getSingleInstance() {
if (sServiceInstance == null) {
if (android.tracing.Flags.perfettoProtologTracing()) {
- sServiceInstance = new PerfettoProtoLogImpl(
- sViewerConfigPath, sLogGroups, sCacheUpdater);
+ File f = new File(sViewerConfigPath);
+ if (!ProtoLog.REQUIRE_PROTOLOGTOOL && !f.exists()) {
+ // TODO(b/353530422): Remove - temporary fix to unblock b/352290057
+ // In so tests the viewer config file might not exist in which we don't
+ // want to provide config path to the user
+ sServiceInstance = new PerfettoProtoLogImpl(null, null, sCacheUpdater);
+ } else {
+ sServiceInstance = new PerfettoProtoLogImpl(sViewerConfigPath, sCacheUpdater);
+ }
} else {
sServiceInstance = new LegacyProtoLogImpl(
- sLegacyOutputFilePath, sLegacyViewerConfigPath, sLogGroups, sCacheUpdater);
+ sLegacyOutputFilePath, sLegacyViewerConfigPath, sCacheUpdater);
}
+ IProtoLogGroup[] groups = sLogGroups.values().toArray(new IProtoLogGroup[0]);
+ sServiceInstance.registerGroups(groups);
sCacheUpdater.run();
}
return sServiceInstance;
diff --git a/core/java/com/android/internal/protolog/ProtoLogViewerConfigReader.java b/core/java/com/android/internal/protolog/ProtoLogViewerConfigReader.java
index b7b24241c26a..38ca0d8f75e8 100644
--- a/core/java/com/android/internal/protolog/ProtoLogViewerConfigReader.java
+++ b/core/java/com/android/internal/protolog/ProtoLogViewerConfigReader.java
@@ -1,23 +1,36 @@
package com.android.internal.protolog;
+import static android.internal.perfetto.protos.Protolog.ProtoLogViewerConfig.GROUPS;
+import static android.internal.perfetto.protos.Protolog.ProtoLogViewerConfig.Group.ID;
+import static android.internal.perfetto.protos.Protolog.ProtoLogViewerConfig.Group.NAME;
+
import static android.internal.perfetto.protos.Protolog.ProtoLogViewerConfig.MESSAGES;
import static android.internal.perfetto.protos.Protolog.ProtoLogViewerConfig.MessageData.MESSAGE;
import static android.internal.perfetto.protos.Protolog.ProtoLogViewerConfig.MessageData.MESSAGE_ID;
+import static android.internal.perfetto.protos.Protolog.ProtoLogViewerConfig.MessageData.GROUP_ID;
-import android.util.ArrayMap;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.util.Log;
+import android.util.LongSparseArray;
import android.util.proto.ProtoInputStream;
import com.android.internal.protolog.common.ILogger;
import java.io.IOException;
import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+import java.util.TreeMap;
public class ProtoLogViewerConfigReader {
+ @NonNull
private final ViewerConfigInputStreamProvider mViewerConfigInputStreamProvider;
- private Map<Long, String> mLogMessageMap = null;
+ private final Map<String, Set<Long>> mGroupHashes = new TreeMap<>();
+ private final LongSparseArray<String> mLogMessageMap = new LongSparseArray<>();
public ProtoLogViewerConfigReader(
- ViewerConfigInputStreamProvider viewerConfigInputStreamProvider) {
+ @NonNull ViewerConfigInputStreamProvider viewerConfigInputStreamProvider) {
this.mViewerConfigInputStreamProvider = viewerConfigInputStreamProvider;
}
@@ -26,39 +39,62 @@ public class ProtoLogViewerConfigReader {
* or the viewer config is not loaded into memory.
*/
public synchronized String getViewerString(long messageHash) {
- if (mLogMessageMap != null) {
- return mLogMessageMap.get(messageHash);
- } else {
- return null;
- }
+ return mLogMessageMap.get(messageHash);
+ }
+
+ public synchronized void loadViewerConfig(String[] groups) {
+ loadViewerConfig(groups, (message) -> {});
}
/**
* Loads the viewer config into memory. No-op if already loaded in memory.
*/
- public synchronized void loadViewerConfig(ILogger logger) {
- if (mLogMessageMap != null) {
- return;
- }
+ public synchronized void loadViewerConfig(String[] groups, @NonNull ILogger logger) {
+ for (String group : groups) {
+ if (mGroupHashes.containsKey(group)) {
+ continue;
+ }
+
+ try {
+ Map<Long, String> mappings = loadViewerConfigMappingForGroup(group);
+ mGroupHashes.put(group, mappings.keySet());
+ for (Long key : mappings.keySet()) {
+ mLogMessageMap.put(key, mappings.get(key));
+ }
- try {
- doLoadViewerConfig();
- logger.log("Loaded " + mLogMessageMap.size() + " log definitions");
- } catch (IOException e) {
- logger.log("Unable to load log definitions: "
- + "IOException while processing viewer config" + e);
+ logger.log("Loaded " + mLogMessageMap.size() + " log definitions");
+ } catch (IOException e) {
+ logger.log("Unable to load log definitions: "
+ + "IOException while processing viewer config" + e);
+ }
}
}
+ public synchronized void unloadViewerConfig(String[] groups) {
+ unloadViewerConfig(groups, (message) -> {});
+ }
+
/**
* Unload the viewer config from memory.
*/
- public synchronized void unloadViewerConfig() {
- mLogMessageMap = null;
+ public synchronized void unloadViewerConfig(String[] groups, @NonNull ILogger logger) {
+ for (String group : groups) {
+ if (!mGroupHashes.containsKey(group)) {
+ continue;
+ }
+
+ final Set<Long> hashes = mGroupHashes.get(group);
+ for (Long hash : hashes) {
+ logger.log("Unloading viewer config hash " + hash);
+ mLogMessageMap.remove(hash);
+ }
+ }
}
- private void doLoadViewerConfig() throws IOException {
- mLogMessageMap = new ArrayMap<>();
+ private Map<Long, String> loadViewerConfigMappingForGroup(String group) throws IOException {
+ Long targetGroupId = loadGroupId(group);
+
+ final Map<Long, String> hashesForGroup = new TreeMap<>();
final ProtoInputStream pis = mViewerConfigInputStreamProvider.getInputStream();
while (pis.nextField() != ProtoInputStream.NO_MORE_FIELDS) {
@@ -67,6 +103,7 @@ public class ProtoLogViewerConfigReader {
long messageId = 0;
String message = null;
+ int groupId = 0;
while (pis.nextField() != ProtoInputStream.NO_MORE_FIELDS) {
switch (pis.getFieldNumber()) {
case (int) MESSAGE_ID:
@@ -75,9 +112,16 @@ public class ProtoLogViewerConfigReader {
case (int) MESSAGE:
message = pis.readString(MESSAGE);
break;
+ case (int) GROUP_ID:
+ groupId = pis.readInt(GROUP_ID);
+ break;
}
}
+ if (groupId == 0) {
+ throw new IOException("Failed to get group id");
+ }
+
if (messageId == 0) {
throw new IOException("Failed to get message id");
}
@@ -86,10 +130,45 @@ public class ProtoLogViewerConfigReader {
throw new IOException("Failed to get message string");
}
- mLogMessageMap.put(messageId, message);
+ if (groupId == targetGroupId) {
+ hashesForGroup.put(messageId, message);
+ }
+
+ pis.end(inMessageToken);
+ }
+ }
+
+ return hashesForGroup;
+ }
+
+ private Long loadGroupId(String group) throws IOException {
+ final ProtoInputStream pis = mViewerConfigInputStreamProvider.getInputStream();
+
+ while (pis.nextField() != ProtoInputStream.NO_MORE_FIELDS) {
+ if (pis.getFieldNumber() == (int) GROUPS) {
+ final long inMessageToken = pis.start(GROUPS);
+
+ long groupId = 0;
+ String groupName = null;
+ while (pis.nextField() != ProtoInputStream.NO_MORE_FIELDS) {
+ switch (pis.getFieldNumber()) {
+ case (int) ID:
+ groupId = pis.readInt(ID);
+ break;
+ case (int) NAME:
+ groupName = pis.readString(NAME);
+ break;
+ }
+ }
+
+ if (Objects.equals(groupName, group)) {
+ return groupId;
+ }
pis.end(inMessageToken);
}
}
+
+ throw new RuntimeException("Group " + group + "not found in viewer config");
}
}
diff --git a/core/java/com/android/internal/protolog/ViewerConfigInputStreamProvider.java b/core/java/com/android/internal/protolog/ViewerConfigInputStreamProvider.java
index 334f5488425a..14bc8e4782f2 100644
--- a/core/java/com/android/internal/protolog/ViewerConfigInputStreamProvider.java
+++ b/core/java/com/android/internal/protolog/ViewerConfigInputStreamProvider.java
@@ -16,11 +16,13 @@
package com.android.internal.protolog;
+import android.annotation.NonNull;
import android.util.proto.ProtoInputStream;
public interface ViewerConfigInputStreamProvider {
/**
* @return a ProtoInputStream.
*/
+ @NonNull
ProtoInputStream getInputStream();
}
diff --git a/core/java/com/android/internal/protolog/common/IProtoLog.java b/core/java/com/android/internal/protolog/common/IProtoLog.java
index f72d9f79958d..f5695acd0614 100644
--- a/core/java/com/android/internal/protolog/common/IProtoLog.java
+++ b/core/java/com/android/internal/protolog/common/IProtoLog.java
@@ -27,11 +27,19 @@ public interface IProtoLog {
* @param group The group this message belongs to.
* @param messageHash The hash of the message.
* @param paramsMask The parameters mask of the message.
- * @param messageString The message string.
* @param args The arguments of the message.
*/
void log(LogLevel logLevel, IProtoLogGroup group, long messageHash, int paramsMask,
- String messageString, Object[] args);
+ Object[] args);
+
+ /**
+ * Log a ProtoLog message
+ * @param logLevel Log level of the proto message.
+ * @param group The group this message belongs to.
+ * @param messageString The message string.
+ * @param args The arguments of the message.
+ */
+ void log(LogLevel logLevel, IProtoLogGroup group, String messageString, Object... args);
/**
* Check if ProtoLog is tracing.
@@ -60,4 +68,10 @@ public interface IProtoLog {
* @return If we need to log this group and level to either ProtoLog or Logcat.
*/
boolean isEnabled(IProtoLogGroup group, LogLevel level);
+
+ /**
+ * Registers available protolog groups. A group must be registered before it can be used.
+ * @param protoLogGroups The groups to register for use in protolog.
+ */
+ void registerGroups(IProtoLogGroup... protoLogGroups);
}
diff --git a/core/java/com/android/internal/view/IInputMethodManager.aidl b/core/java/com/android/internal/view/IInputMethodManager.aidl
index 2b3ffeb2e619..cba27ce3fe65 100644
--- a/core/java/com/android/internal/view/IInputMethodManager.aidl
+++ b/core/java/com/android/internal/view/IInputMethodManager.aidl
@@ -135,6 +135,19 @@ interface IInputMethodManager {
+ "android.Manifest.permission.TEST_INPUT_METHOD)")
boolean isInputMethodPickerShownForTest();
+ /**
+ * Called when the IME switch button was clicked from the system. Depending on the number of
+ * enabled IME subtypes, this will either switch to the next IME/subtype, or show the input
+ * method picker dialog.
+ *
+ * @param displayId The ID of the display where the input method picker dialog should be shown.
+ * @param userId The ID of the user that triggered the click.
+ */
+ @EnforcePermission("WRITE_SECURE_SETTINGS")
+ @JavaPassthrough(annotation="@android.annotation.RequiresPermission(value = "
+ + "android.Manifest.permission.WRITE_SECURE_SETTINGS)")
+ oneway void onImeSwitchButtonClickFromSystem(int displayId);
+
@JavaPassthrough(annotation="@android.annotation.RequiresPermission(value = "
+ "android.Manifest.permission.INTERACT_ACROSS_USERS_FULL, conditional = true)")
@nullable InputMethodSubtype getCurrentInputMethodSubtype(int userId);
diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java
index f4ad487f48ac..19c6f51ff9a7 100644
--- a/core/java/com/android/internal/widget/LockPatternUtils.java
+++ b/core/java/com/android/internal/widget/LockPatternUtils.java
@@ -22,6 +22,8 @@ import static android.app.admin.DevicePolicyManager.PASSWORD_QUALITY_NUMERIC;
import static android.app.admin.DevicePolicyManager.PASSWORD_QUALITY_NUMERIC_COMPLEX;
import static android.app.admin.DevicePolicyManager.PASSWORD_QUALITY_SOMETHING;
import static android.app.admin.DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED;
+import static android.security.Flags.reportPrimaryAuthAttempts;
+import static android.security.Flags.shouldTrustManagerListenForPrimaryAuth;
import android.annotation.IntDef;
import android.annotation.NonNull;
@@ -414,7 +416,9 @@ public class LockPatternUtils {
return;
}
getDevicePolicyManager().reportFailedPasswordAttempt(userId);
- getTrustManager().reportUnlockAttempt(false /* authenticated */, userId);
+ if (!reportPrimaryAuthAttempts() || !shouldTrustManagerListenForPrimaryAuth()) {
+ getTrustManager().reportUnlockAttempt(/* authenticated= */ false, userId);
+ }
}
@UnsupportedAppUsage
@@ -423,7 +427,9 @@ public class LockPatternUtils {
return;
}
getDevicePolicyManager().reportSuccessfulPasswordAttempt(userId);
- getTrustManager().reportUnlockAttempt(true /* authenticated */, userId);
+ if (!reportPrimaryAuthAttempts() || !shouldTrustManagerListenForPrimaryAuth()) {
+ getTrustManager().reportUnlockAttempt(/* authenticated= */ true, userId);
+ }
}
public void reportPasswordLockout(int timeoutMs, int userId) {
diff --git a/core/java/com/android/internal/widget/MaxHeightFrameLayout.java b/core/java/com/android/internal/widget/MaxHeightFrameLayout.java
new file mode 100644
index 000000000000..d65dddd9c5b1
--- /dev/null
+++ b/core/java/com/android/internal/widget/MaxHeightFrameLayout.java
@@ -0,0 +1,98 @@
+/*
+ * 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.widget;
+
+import android.annotation.AttrRes;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.annotation.Px;
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.util.AttributeSet;
+import android.widget.FrameLayout;
+
+import com.android.internal.R;
+
+/**
+ * This custom subclass of FrameLayout enforces that its calculated height be no larger than the
+ * given maximum height (if any).
+ *
+ * @hide
+ */
+public class MaxHeightFrameLayout extends FrameLayout {
+
+ private int mMaxHeight = Integer.MAX_VALUE;
+
+ public MaxHeightFrameLayout(@NonNull Context context) {
+ this(context, null);
+ }
+
+ public MaxHeightFrameLayout(@NonNull Context context, @Nullable AttributeSet attrs) {
+ this(context, attrs, 0);
+ }
+
+ public MaxHeightFrameLayout(@NonNull Context context, @Nullable AttributeSet attrs,
+ @AttrRes int defStyleAttr) {
+ this(context, attrs, defStyleAttr, 0);
+ }
+
+ public MaxHeightFrameLayout(Context context, AttributeSet attrs, int defStyleAttr,
+ int defStyleRes) {
+ super(context, attrs, defStyleAttr, defStyleRes);
+ final TypedArray a = context.obtainStyledAttributes(
+ attrs, R.styleable.MaxHeightFrameLayout, defStyleAttr, defStyleRes);
+ saveAttributeDataForStyleable(context, R.styleable.MaxHeightFrameLayout,
+ attrs, a, defStyleAttr, defStyleRes);
+
+ setMaxHeight(a.getDimensionPixelSize(R.styleable.MaxHeightFrameLayout_maxHeight,
+ Integer.MAX_VALUE));
+ }
+
+ /**
+ * Gets the maximum height of this view, in pixels.
+ *
+ * @see #setMaxHeight(int)
+ *
+ * @attr ref android.R.styleable#MaxHeightFrameLayout_maxHeight
+ */
+ @Px
+ public int getMaxHeight() {
+ return mMaxHeight;
+ }
+
+ /**
+ * Sets the maximum height this view can have.
+ *
+ * @param maxHeight the maximum height, in pixels
+ *
+ * @see #getMaxHeight()
+ *
+ * @attr ref android.R.styleable#MaxHeightFrameLayout_maxHeight
+ */
+ public void setMaxHeight(@Px int maxHeight) {
+ mMaxHeight = maxHeight;
+ }
+
+ @Override
+ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ if (MeasureSpec.getSize(heightMeasureSpec) > mMaxHeight) {
+ final int mode = MeasureSpec.getMode(heightMeasureSpec);
+ heightMeasureSpec = MeasureSpec.makeMeasureSpec(mMaxHeight, mode);
+ }
+ super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+ }
+}
diff --git a/core/jni/android_hardware_Camera.cpp b/core/jni/android_hardware_Camera.cpp
index b8fd3d065d8d..3f74fac35bb7 100644
--- a/core/jni/android_hardware_Camera.cpp
+++ b/core/jni/android_hardware_Camera.cpp
@@ -582,8 +582,8 @@ static void android_hardware_Camera_getCameraInfo(JNIEnv *env, jobject thiz, jin
// connect to camera service
static jint android_hardware_Camera_native_setup(JNIEnv *env, jobject thiz, jobject weak_this,
- jint cameraId, jstring clientPackageName,
- jint rotationOverride, jboolean forceSlowJpegMode,
+ jint cameraId, jint rotationOverride,
+ jboolean forceSlowJpegMode,
jobject jClientAttributionParcel,
jint devicePolicy) {
AttributionSourceState clientAttribution;
@@ -591,16 +591,8 @@ static jint android_hardware_Camera_native_setup(JNIEnv *env, jobject thiz, jobj
return -EACCES;
}
- // Convert jstring to String16
- const char16_t *rawClientName = reinterpret_cast<const char16_t*>(
- env->GetStringChars(clientPackageName, NULL));
- jsize rawClientNameLen = env->GetStringLength(clientPackageName);
- std::string clientName = toStdString(rawClientName, rawClientNameLen);
- env->ReleaseStringChars(clientPackageName,
- reinterpret_cast<const jchar*>(rawClientName));
-
int targetSdkVersion = android_get_application_target_sdk_version();
- sp<Camera> camera = Camera::connect(cameraId, clientName, targetSdkVersion, rotationOverride,
+ sp<Camera> camera = Camera::connect(cameraId, targetSdkVersion, rotationOverride,
forceSlowJpegMode, clientAttribution, devicePolicy);
if (camera == NULL) {
return -EACCES;
@@ -1089,7 +1081,7 @@ static const JNINativeMethod camMethods[] = {
(void *)android_hardware_Camera_getNumberOfCameras},
{"_getCameraInfo", "(IILandroid/os/Parcel;ILandroid/hardware/Camera$CameraInfo;)V",
(void *)android_hardware_Camera_getCameraInfo},
- {"native_setup", "(Ljava/lang/Object;ILjava/lang/String;IZLandroid/os/Parcel;I)I",
+ {"native_setup", "(Ljava/lang/Object;IIZLandroid/os/Parcel;I)I",
(void *)android_hardware_Camera_native_setup},
{"native_release", "()V", (void *)android_hardware_Camera_release},
{"setPreviewSurface", "(Landroid/view/Surface;)V",
diff --git a/core/jni/android_media_AudioSystem.cpp b/core/jni/android_media_AudioSystem.cpp
index eaff7608ce3b..7c62615cdc42 100644
--- a/core/jni/android_media_AudioSystem.cpp
+++ b/core/jni/android_media_AudioSystem.cpp
@@ -27,6 +27,7 @@
#include <android_media_audiopolicy.h>
#include <android_os_Parcel.h>
#include <audiomanager/AudioManager.h>
+#include <android-base/properties.h>
#include <binder/IBinder.h>
#include <jni.h>
#include <media/AidlConversion.h>
@@ -41,8 +42,10 @@
#include <system/audio_policy.h>
#include <utils/Log.h>
+#include <thread>
#include <optional>
#include <sstream>
+#include <memory>
#include <vector>
#include "android_media_AudioAttributes.h"
@@ -261,6 +264,13 @@ static struct {
jfieldID mMixerBehavior;
} gAudioMixerAttributesField;
+static struct {
+ jclass clazz;
+ jmethodID run;
+} gRunnableClassInfo;
+
+static JavaVM* gVm;
+
static Mutex gLock;
enum AudioError {
@@ -2718,12 +2728,11 @@ static jint android_media_AudioSystem_getMaxChannelCount(JNIEnv *env, jobject th
}
static jint android_media_AudioSystem_getMaxSampleRate(JNIEnv *env, jobject thiz) {
- // see frameworks/av/services/audiopolicy/common/include/policy.h
- return 192000; // SAMPLE_RATE_HZ_MAX (for API)
+ return SAMPLE_RATE_HZ_MAX;
}
static jint android_media_AudioSystem_getMinSampleRate(JNIEnv *env, jobject thiz) {
- return 4000; // SAMPLE_RATE_HZ_MIN (for API)
+ return SAMPLE_RATE_HZ_MIN;
}
static std::vector<uid_t> convertJIntArrayToUidVector(JNIEnv *env, jintArray jArray) {
@@ -3363,6 +3372,55 @@ static jboolean android_media_AudioSystem_isBluetoothVariableLatencyEnabled(JNIE
return enabled;
}
+class JavaSystemPropertyListener {
+ public:
+ JavaSystemPropertyListener(JNIEnv* env, jobject javaCallback, std::string sysPropName) :
+ mCallback(env->NewGlobalRef(javaCallback)),
+ mCachedProperty(android::base::CachedProperty{std::move(sysPropName)}) {
+ mListenerThread = std::thread([this]() mutable {
+ JNIEnv* threadEnv = GetOrAttachJNIEnvironment(gVm);
+ while (!mCleanupSignal.load()) {
+ using namespace std::chrono_literals;
+ // 1s timeout so this thread can read the cleanup signal to (slowly) be able to
+ // be destroyed.
+ std::string newVal = mCachedProperty.WaitForChange(1000ms) ?: "";
+ if (newVal != "" && mLastVal != newVal) {
+ threadEnv->CallVoidMethod(mCallback, gRunnableClassInfo.run);
+ mLastVal = std::move(newVal);
+ }
+ }
+ });
+ }
+
+ ~JavaSystemPropertyListener() {
+ mCleanupSignal.store(true);
+ mListenerThread.join();
+ JNIEnv* env = GetOrAttachJNIEnvironment(gVm);
+ env->DeleteGlobalRef(mCallback);
+ }
+
+ private:
+ jobject mCallback;
+ android::base::CachedProperty mCachedProperty;
+ std::thread mListenerThread;
+ std::atomic<bool> mCleanupSignal{false};
+ std::string mLastVal = "";
+};
+
+std::vector<std::unique_ptr<JavaSystemPropertyListener>> gSystemPropertyListeners;
+std::mutex gSysPropLock{};
+
+static void android_media_AudioSystem_listenForSystemPropertyChange(JNIEnv *env, jobject thiz,
+ jstring sysProp,
+ jobject javaCallback) {
+ ScopedUtfChars sysPropChars{env, sysProp};
+ auto listener = std::make_unique<JavaSystemPropertyListener>(env, javaCallback,
+ std::string{sysPropChars.c_str()});
+ std::unique_lock _l{gSysPropLock};
+ gSystemPropertyListeners.push_back(std::move(listener));
+}
+
+
// ----------------------------------------------------------------------------
#define MAKE_AUDIO_SYSTEM_METHOD(x) \
@@ -3535,7 +3593,12 @@ static const JNINativeMethod gMethods[] =
android_media_AudioSystem_clearPreferredMixerAttributes),
MAKE_AUDIO_SYSTEM_METHOD(supportsBluetoothVariableLatency),
MAKE_AUDIO_SYSTEM_METHOD(setBluetoothVariableLatencyEnabled),
- MAKE_AUDIO_SYSTEM_METHOD(isBluetoothVariableLatencyEnabled)};
+ MAKE_AUDIO_SYSTEM_METHOD(isBluetoothVariableLatencyEnabled),
+ MAKE_JNI_NATIVE_METHOD("listenForSystemPropertyChange",
+ "(Ljava/lang/String;Ljava/lang/Runnable;)V",
+ android_media_AudioSystem_listenForSystemPropertyChange),
+
+ };
static const JNINativeMethod gEventHandlerMethods[] =
{MAKE_JNI_NATIVE_METHOD("native_setup", "(Ljava/lang/Object;)V",
@@ -3817,6 +3880,12 @@ int register_android_media_AudioSystem(JNIEnv *env)
gAudioMixerAttributesField.mMixerBehavior =
GetFieldIDOrDie(env, audioMixerAttributesClass, "mMixerBehavior", "I");
+ jclass runnableClazz = FindClassOrDie(env, "java/lang/Runnable");
+ gRunnableClassInfo.clazz = MakeGlobalRefOrDie(env, runnableClazz);
+ gRunnableClassInfo.run = GetMethodIDOrDie(env, runnableClazz, "run", "()V");
+
+ LOG_ALWAYS_FATAL_IF(env->GetJavaVM(&gVm) != 0);
+
AudioSystem::addErrorCallback(android_media_AudioSystem_error_callback);
RegisterMethodsOrDie(env, kClassPathName, gMethods, NELEM(gMethods));
diff --git a/core/jni/android_util_Process.cpp b/core/jni/android_util_Process.cpp
index 982189e30beb..809ec6321fad 100644
--- a/core/jni/android_util_Process.cpp
+++ b/core/jni/android_util_Process.cpp
@@ -656,9 +656,8 @@ static int pid_compare(const void* v1, const void* v2)
static jlong android_os_Process_getFreeMemory(JNIEnv* env, jobject clazz)
{
- std::array<std::string_view, 2> memFreeTags = {
- ::android::meminfo::SysMemInfo::kMemFree,
- ::android::meminfo::SysMemInfo::kMemCached,
+ std::array<std::string_view, 1> memFreeTags = {
+ ::android::meminfo::SysMemInfo::kMemAvailable,
};
std::vector<uint64_t> mem(memFreeTags.size());
::android::meminfo::SysMemInfo smi;
@@ -1063,8 +1062,8 @@ jboolean android_os_Process_readProcFile(JNIEnv* env, jobject clazz,
}
env->ReleaseStringUTFChars(file, file8);
- // Most proc files we read are small, so we only go through the
- // loop once and use the stack buffer. We allocate a buffer big
+ // Most proc files we read are small, so we go through the loop
+ // with the stack buffer firstly. We allocate a buffer big
// enough for the whole file.
char readBufferStack[kProcReadStackBufferSize];
@@ -1072,37 +1071,47 @@ jboolean android_os_Process_readProcFile(JNIEnv* env, jobject clazz,
char* readBuffer = &readBufferStack[0];
ssize_t readBufferSize = kProcReadStackBufferSize;
ssize_t numberBytesRead;
+ off_t offset = 0;
for (;;) {
+ ssize_t requestedBufferSize = readBufferSize - offset;
// By using pread, we can avoid an lseek to rewind the FD
// before retry, saving a system call.
- numberBytesRead = pread(fd, readBuffer, readBufferSize, 0);
- if (numberBytesRead < 0 && errno == EINTR) {
- continue;
- }
+ numberBytesRead =
+ TEMP_FAILURE_RETRY(pread(fd, readBuffer + offset, requestedBufferSize, offset));
if (numberBytesRead < 0) {
if (kDebugProc) {
- ALOGW("Unable to open process file: %s fd=%d\n", file8, fd.get());
+ ALOGW("Unable to read process file err: %s file: %s fd=%d\n",
+ strerror_r(errno, &readBufferStack[0], sizeof(readBufferStack)), file8,
+ fd.get());
}
return JNI_FALSE;
}
- if (numberBytesRead < readBufferSize) {
+ if (numberBytesRead == 0) {
+ // End of file.
+ numberBytesRead = offset;
break;
}
- if (readBufferSize > std::numeric_limits<ssize_t>::max() / 2) {
- if (kDebugProc) {
- ALOGW("Proc file too big: %s fd=%d\n", file8, fd.get());
+ if (numberBytesRead < requestedBufferSize) {
+ // Read less bytes than requested, it's not an error per pread(2).
+ offset += numberBytesRead;
+ } else {
+ // Buffer is fully used, try to grow it.
+ if (readBufferSize > std::numeric_limits<ssize_t>::max() / 2) {
+ if (kDebugProc) {
+ ALOGW("Proc file too big: %s fd=%d\n", file8, fd.get());
+ }
+ return JNI_FALSE;
}
- return JNI_FALSE;
- }
- readBufferSize = std::max(readBufferSize * 2,
- kProcReadMinHeapBufferSize);
- readBufferHeap.reset(); // Free address space before getting more.
- readBufferHeap = std::make_unique<char[]>(readBufferSize);
- if (!readBufferHeap) {
- jniThrowException(env, "java/lang/OutOfMemoryError", NULL);
- return JNI_FALSE;
+ readBufferSize = std::max(readBufferSize * 2, kProcReadMinHeapBufferSize);
+ readBufferHeap.reset(); // Free address space before getting more.
+ readBufferHeap = std::make_unique<char[]>(readBufferSize);
+ if (!readBufferHeap) {
+ jniThrowException(env, "java/lang/OutOfMemoryError", NULL);
+ return JNI_FALSE;
+ }
+ readBuffer = readBufferHeap.get();
+ offset = 0;
}
- readBuffer = readBufferHeap.get();
}
// parseProcLineArray below modifies the buffer while parsing!
diff --git a/core/jni/android_view_InputChannel.cpp b/core/jni/android_view_InputChannel.cpp
index d11166fd6187..e874163943b6 100644
--- a/core/jni/android_view_InputChannel.cpp
+++ b/core/jni/android_view_InputChannel.cpp
@@ -16,18 +16,22 @@
#define LOG_TAG "InputChannel-JNI"
-#include "android-base/stringprintf.h"
-#include <nativehelper/JNIHelp.h>
-#include "nativehelper/scoped_utf_chars.h"
+#include "android_view_InputChannel.h"
+
#include <android_runtime/AndroidRuntime.h>
#include <binder/Parcel.h>
-#include <utils/Log.h>
+#include <com_android_input_flags.h>
#include <input/InputTransport.h>
-#include "android_view_InputChannel.h"
+#include <nativehelper/JNIHelp.h>
+#include <utils/Log.h>
+
+#include "android-base/stringprintf.h"
#include "android_os_Parcel.h"
#include "android_util_Binder.h"
-
#include "core_jni_helpers.h"
+#include "nativehelper/scoped_utf_chars.h"
+
+namespace input_flags = com::android::input::flags;
namespace android {
@@ -69,6 +73,9 @@ NativeInputChannel::~NativeInputChannel() {
}
void NativeInputChannel::setDisposeCallback(InputChannelObjDisposeCallback callback, void* data) {
+ if (input_flags::remove_input_channel_from_windowstate()) {
+ return;
+ }
mDisposeCallback = callback;
mDisposeData = data;
}
diff --git a/core/jni/android_view_MotionEvent.cpp b/core/jni/android_view_MotionEvent.cpp
index d32486c73db2..240be3fe5534 100644
--- a/core/jni/android_view_MotionEvent.cpp
+++ b/core/jni/android_view_MotionEvent.cpp
@@ -415,7 +415,7 @@ static void android_view_MotionEvent_nativeAddBatch(JNIEnv* env, jclass clazz,
env->DeleteLocalRef(pointerCoordsObj);
}
- event->addSample(eventTimeNanos, rawPointerCoords.data());
+ event->addSample(eventTimeNanos, rawPointerCoords.data(), event->getId());
event->setMetaState(event->getMetaState() | metaState);
}
diff --git a/core/jni/platform/host/HostRuntime.cpp b/core/jni/platform/host/HostRuntime.cpp
index 59d18b8535f5..020b27e82bea 100644
--- a/core/jni/platform/host/HostRuntime.cpp
+++ b/core/jni/platform/host/HostRuntime.cpp
@@ -17,6 +17,8 @@
#include <android-base/logging.h>
#include <android-base/properties.h>
#include <android/graphics/jni_runtime.h>
+#include <android_runtime/AndroidRuntime.h>
+#include <jni_wrappers.h>
#include <nativehelper/JNIHelp.h>
#include <nativehelper/jni_macros.h>
#include <unicode/putil.h>
@@ -27,9 +29,6 @@
#include <unordered_map>
#include <vector>
-#include "android_view_InputDevice.h"
-#include "core_jni_helpers.h"
-#include "jni.h"
#ifdef _WIN32
#include <windows.h>
#else
@@ -38,8 +37,6 @@
#include <sys/stat.h>
#endif
-#include <iostream>
-
using namespace std;
/*
@@ -49,20 +46,13 @@ using namespace std;
* (see AndroidRuntime.cpp).
*/
-static JavaVM* javaVM;
-static jclass bridge;
-static jclass layoutLog;
-static jmethodID getLogId;
-static jmethodID logMethodId;
-
extern int register_android_os_Binder(JNIEnv* env);
-extern int register_libcore_util_NativeAllocationRegistry_Delegate(JNIEnv* env);
+extern int register_libcore_util_NativeAllocationRegistry(JNIEnv* env);
typedef void (*FreeFunction)(void*);
-static void NativeAllocationRegistry_Delegate_nativeApplyFreeFunction(JNIEnv*, jclass,
- jlong freeFunction,
- jlong ptr) {
+static void NativeAllocationRegistry_applyFreeFunction(JNIEnv*, jclass, jlong freeFunction,
+ jlong ptr) {
void* nativePtr = reinterpret_cast<void*>(static_cast<uintptr_t>(ptr));
FreeFunction nativeFreeFunction =
reinterpret_cast<FreeFunction>(static_cast<uintptr_t>(freeFunction));
@@ -70,11 +60,11 @@ static void NativeAllocationRegistry_Delegate_nativeApplyFreeFunction(JNIEnv*, j
}
static JNINativeMethod gMethods[] = {
- NATIVE_METHOD(NativeAllocationRegistry_Delegate, nativeApplyFreeFunction, "(JJ)V"),
+ NATIVE_METHOD(NativeAllocationRegistry, applyFreeFunction, "(JJ)V"),
};
-int register_libcore_util_NativeAllocationRegistry_Delegate(JNIEnv* env) {
- return jniRegisterNativeMethods(env, "libcore/util/NativeAllocationRegistry_Delegate", gMethods,
+int register_libcore_util_NativeAllocationRegistry(JNIEnv* env) {
+ return jniRegisterNativeMethods(env, "libcore/util/NativeAllocationRegistry", gMethods,
NELEM(gMethods));
}
@@ -104,6 +94,7 @@ extern int register_android_view_KeyCharacterMap(JNIEnv* env);
extern int register_android_view_KeyEvent(JNIEnv* env);
extern int register_android_view_InputDevice(JNIEnv* env);
extern int register_android_view_MotionEvent(JNIEnv* env);
+extern int register_android_view_Surface(JNIEnv* env);
extern int register_android_view_ThreadedRenderer(JNIEnv* env);
extern int register_android_graphics_HardwareBufferRenderer(JNIEnv* env);
extern int register_android_view_VelocityTracker(JNIEnv* env);
@@ -151,11 +142,12 @@ static const std::unordered_map<std::string, RegJNIRec> gRegJNIMap = {
{"android.view.KeyEvent", REG_JNI(register_android_view_KeyEvent)},
{"android.view.InputDevice", REG_JNI(register_android_view_InputDevice)},
{"android.view.MotionEvent", REG_JNI(register_android_view_MotionEvent)},
+ {"android.view.Surface", REG_JNI(register_android_view_Surface)},
{"android.view.VelocityTracker", REG_JNI(register_android_view_VelocityTracker)},
{"com.android.internal.util.VirtualRefBasePtr",
REG_JNI(register_com_android_internal_util_VirtualRefBasePtr)},
- {"libcore.util.NativeAllocationRegistry_Delegate",
- REG_JNI(register_libcore_util_NativeAllocationRegistry_Delegate)},
+ {"libcore.util.NativeAllocationRegistry",
+ REG_JNI(register_libcore_util_NativeAllocationRegistry)},
};
static int register_jni_procs(const std::unordered_map<std::string, RegJNIRec>& jniRegMap,
@@ -166,28 +158,9 @@ static int register_jni_procs(const std::unordered_map<std::string, RegJNIRec>&
}
}
- if (register_android_graphics_classes(env) < 0) {
- return -1;
- }
-
return 0;
}
-int AndroidRuntime::registerNativeMethods(JNIEnv* env, const char* className,
- const JNINativeMethod* gMethods, int numMethods) {
- return jniRegisterNativeMethods(env, className, gMethods, numMethods);
-}
-
-JNIEnv* AndroidRuntime::getJNIEnv() {
- JNIEnv* env;
- if (javaVM->GetEnv((void**)&env, JNI_VERSION_1_6) != JNI_OK) return nullptr;
- return env;
-}
-
-JavaVM* AndroidRuntime::getJavaVM() {
- return javaVM;
-}
-
static vector<string> parseCsv(const string& csvString) {
vector<string> result;
istringstream stream(csvString);
@@ -198,29 +171,6 @@ static vector<string> parseCsv(const string& csvString) {
return result;
}
-void LayoutlibLogger(base::LogId, base::LogSeverity severity, const char* tag, const char* file,
- unsigned int line, const char* message) {
- JNIEnv* env = AndroidRuntime::getJNIEnv();
- jint logPrio = severity;
- jstring tagString = env->NewStringUTF(tag);
- jstring messageString = env->NewStringUTF(message);
-
- jobject bridgeLog = env->CallStaticObjectMethod(bridge, getLogId);
-
- env->CallVoidMethod(bridgeLog, logMethodId, logPrio, tagString, messageString);
-
- env->DeleteLocalRef(tagString);
- env->DeleteLocalRef(messageString);
- env->DeleteLocalRef(bridgeLog);
-}
-
-void LayoutlibAborter(const char* abort_message) {
- // Layoutlib should not call abort() as it would terminate Studio.
- // Throw an exception back to Java instead.
- JNIEnv* env = AndroidRuntime::getJNIEnv();
- jniThrowRuntimeException(env, "The Android framework has encountered a fatal error");
-}
-
// This method has been copied/adapted from system/core/init/property_service.cpp
// If the ro.product.cpu.abilist* properties have not been explicitly
// set, derive them from ro.system.product.cpu.abilist* properties.
@@ -309,62 +259,49 @@ static void* mmapFile(const char* dataFilePath) {
#endif
}
-static bool init_icu(const char* dataPath) {
- void* addr = mmapFile(dataPath);
- UErrorCode err = U_ZERO_ERROR;
- udata_setCommonData(addr, &err);
- if (err != U_ZERO_ERROR) {
- return false;
+// Loads the ICU data file from the location specified in the system property ro.icu.data.path
+static void loadIcuData() {
+ string icuPath = base::GetProperty("ro.icu.data.path", "");
+ if (!icuPath.empty()) {
+ // Set the location of ICU data
+ void* addr = mmapFile(icuPath.c_str());
+ UErrorCode err = U_ZERO_ERROR;
+ udata_setCommonData(addr, &err);
+ if (err != U_ZERO_ERROR) {
+ ALOGE("Unable to load ICU data\n");
+ }
}
- return true;
}
-// Creates an array of InputDevice from key character map files
-static void init_keyboard(JNIEnv* env, const vector<string>& keyboardPaths) {
- jclass inputDevice = FindClassOrDie(env, "android/view/InputDevice");
- jobjectArray inputDevicesArray =
- env->NewObjectArray(keyboardPaths.size(), inputDevice, nullptr);
- int keyboardId = 1;
-
- for (const string& path : keyboardPaths) {
- base::Result<std::shared_ptr<KeyCharacterMap>> charMap =
- KeyCharacterMap::load(path, KeyCharacterMap::Format::BASE);
-
- InputDeviceInfo info = InputDeviceInfo();
- info.initialize(keyboardId, 0, 0, InputDeviceIdentifier(),
- "keyboard " + std::to_string(keyboardId), true, false,
- ui::LogicalDisplayId::DEFAULT);
- info.setKeyboardType(AINPUT_KEYBOARD_TYPE_ALPHABETIC);
- info.setKeyCharacterMap(*charMap);
-
- jobject inputDeviceObj = android_view_InputDevice_create(env, info);
- if (inputDeviceObj) {
- env->SetObjectArrayElement(inputDevicesArray, keyboardId - 1, inputDeviceObj);
- env->DeleteLocalRef(inputDeviceObj);
- }
- keyboardId++;
- }
+static int register_android_core_classes(JNIEnv* env) {
+ jclass system = FindClassOrDie(env, "java/lang/System");
+ jmethodID getPropertyMethod =
+ GetStaticMethodIDOrDie(env, system, "getProperty",
+ "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;");
- if (bridge == nullptr) {
- bridge = FindClassOrDie(env, "com/android/layoutlib/bridge/Bridge");
- bridge = MakeGlobalRefOrDie(env, bridge);
- }
- jmethodID setInputManager = GetStaticMethodIDOrDie(env, bridge, "setInputManager",
- "([Landroid/view/InputDevice;)V");
- env->CallStaticVoidMethod(bridge, setInputManager, inputDevicesArray);
- env->DeleteLocalRef(inputDevicesArray);
-}
+ // Get the names of classes that need to register their native methods
+ auto nativesClassesJString =
+ (jstring)env->CallStaticObjectMethod(system, getPropertyMethod,
+ env->NewStringUTF("core_native_classes"),
+ env->NewStringUTF(""));
+ const char* nativesClassesArray = env->GetStringUTFChars(nativesClassesJString, nullptr);
+ string nativesClassesString(nativesClassesArray);
+ vector<string> classesToRegister = parseCsv(nativesClassesString);
+ env->ReleaseStringUTFChars(nativesClassesJString, nativesClassesArray);
-} // namespace android
+ if (register_jni_procs(gRegJNIMap, classesToRegister, env) < 0) {
+ return JNI_ERR;
+ }
-using namespace android;
+ return 0;
+}
// Called right before aborting by LOG_ALWAYS_FATAL. Print the pending exception.
void abort_handler(const char* abort_message) {
ALOGE("About to abort the process...");
- JNIEnv* env = NULL;
- if (javaVM->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6) != JNI_OK) {
+ JNIEnv* env = AndroidRuntime::getJNIEnv();
+ if (env == nullptr) {
ALOGE("vm->GetEnv() failed");
return;
}
@@ -375,107 +312,98 @@ void abort_handler(const char* abort_message) {
ALOGE("Aborting because: %s", abort_message);
}
-JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void*) {
- javaVM = vm;
- JNIEnv* env = nullptr;
- if (vm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6) != JNI_OK) {
- return JNI_ERR;
- }
-
- __android_log_set_aborter(abort_handler);
+// ------------------ Host implementation of AndroidRuntime ------------------
- init_android_graphics();
+/*static*/ JavaVM* AndroidRuntime::mJavaVM;
- // Configuration is stored as java System properties.
- // Get a reference to System.getProperty
- jclass system = FindClassOrDie(env, "java/lang/System");
- jmethodID getPropertyMethod =
- GetStaticMethodIDOrDie(env, system, "getProperty",
- "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;");
+/*static*/ int AndroidRuntime::registerNativeMethods(JNIEnv* env, const char* className,
+ const JNINativeMethod* gMethods,
+ int numMethods) {
+ return jniRegisterNativeMethods(env, className, gMethods, numMethods);
+}
- // Java system properties that contain LayoutLib config. The initial values in the map
- // are the default values if the property is not specified.
- std::unordered_map<std::string, std::string> systemProperties =
- {{"core_native_classes", ""},
- {"register_properties_during_load", ""},
- {"icu.data.path", ""},
- {"use_bridge_for_logging", ""},
- {"keyboard_paths", ""}};
-
- for (auto& [name, defaultValue] : systemProperties) {
- jstring propertyString =
- (jstring)env->CallStaticObjectMethod(system, getPropertyMethod,
- env->NewStringUTF(name.c_str()),
- env->NewStringUTF(defaultValue.c_str()));
- const char* propertyChars = env->GetStringUTFChars(propertyString, 0);
- systemProperties[name] = string(propertyChars);
- env->ReleaseStringUTFChars(propertyString, propertyChars);
+/*static*/ JNIEnv* AndroidRuntime::getJNIEnv() {
+ JNIEnv* env;
+ JavaVM* vm = AndroidRuntime::getJavaVM();
+ if (vm->GetEnv((void**)&env, JNI_VERSION_1_6) != JNI_OK) {
+ return nullptr;
}
- // Get the names of classes that need to register their native methods
- vector<string> classesToRegister = parseCsv(systemProperties["core_native_classes"]);
+ return env;
+}
- if (systemProperties["register_properties_during_load"] == "true") {
- // Set the system properties first as they could be used in the static initialization of
- // other classes
- if (register_android_os_SystemProperties(env) < 0) {
- return JNI_ERR;
- }
- classesToRegister.erase(find(classesToRegister.begin(), classesToRegister.end(),
- "android.os.SystemProperties"));
- bridge = FindClassOrDie(env, "com/android/layoutlib/bridge/Bridge");
- bridge = MakeGlobalRefOrDie(env, bridge);
- jmethodID setSystemPropertiesMethod =
- GetStaticMethodIDOrDie(env, bridge, "setSystemProperties", "()V");
- env->CallStaticVoidMethod(bridge, setSystemPropertiesMethod);
- property_initialize_ro_cpu_abilist();
- }
+/*static*/ JavaVM* AndroidRuntime::getJavaVM() {
+ return mJavaVM;
+}
- if (register_jni_procs(gRegJNIMap, classesToRegister, env) < 0) {
+/*static*/ int AndroidRuntime::startReg(JNIEnv* env) {
+ if (register_android_core_classes(env) < 0) {
return JNI_ERR;
}
-
- if (!systemProperties["icu.data.path"].empty()) {
- // Set the location of ICU data
- bool icuInitialized = init_icu(systemProperties["icu.data.path"].c_str());
- if (!icuInitialized) {
- return JNI_ERR;
- }
+ if (register_android_graphics_classes(env) < 0) {
+ return JNI_ERR;
}
+ return 0;
+}
- if (systemProperties["use_bridge_for_logging"] == "true") {
- layoutLog = FindClassOrDie(env, "com/android/ide/common/rendering/api/ILayoutLog");
- layoutLog = MakeGlobalRefOrDie(env, layoutLog);
- logMethodId = GetMethodIDOrDie(env, layoutLog, "logAndroidFramework",
- "(ILjava/lang/String;Ljava/lang/String;)V");
- if (bridge == nullptr) {
- bridge = FindClassOrDie(env, "com/android/layoutlib/bridge/Bridge");
- bridge = MakeGlobalRefOrDie(env, bridge);
- }
- getLogId = GetStaticMethodIDOrDie(env, bridge, "getLog",
- "()Lcom/android/ide/common/rendering/api/ILayoutLog;");
- android::base::SetLogger(LayoutlibLogger);
- android::base::SetAborter(LayoutlibAborter);
- } else {
- // initialize logging, so ANDROD_LOG_TAGS env variable is respected
- android::base::InitLogging(nullptr, android::base::StderrLogger);
- }
+void AndroidRuntime::onVmCreated(JNIEnv* env) {
+ env->GetJavaVM(&mJavaVM);
+}
+
+void AndroidRuntime::onStarted() {
+ property_initialize_ro_cpu_abilist();
+ loadIcuData();
// Use English locale for number format to ensure correct parsing of floats when using strtof
setlocale(LC_NUMERIC, "en_US.UTF-8");
+}
- if (!systemProperties["keyboard_paths"].empty()) {
- vector<string> keyboardPaths = parseCsv(systemProperties["keyboard_paths"]);
- init_keyboard(env, keyboardPaths);
- } else {
- fprintf(stderr, "Skip initializing keyboard\n");
+void AndroidRuntime::start(const char* className, const Vector<String8>& options, bool zygote) {
+ JNIEnv* env = AndroidRuntime::getJNIEnv();
+ // Register native functions.
+ if (startReg(env) < 0) {
+ ALOGE("Unable to register all android native methods\n");
}
+ onStarted();
+}
- return JNI_VERSION_1_6;
+AndroidRuntime::AndroidRuntime(char* argBlockStart, const size_t argBlockLength)
+ : mExitWithoutCleanup(false), mArgBlockStart(argBlockStart), mArgBlockLength(argBlockLength) {
+ init_android_graphics();
}
-JNIEXPORT void JNI_OnUnload(JavaVM* vm, void*) {
+AndroidRuntime::~AndroidRuntime() {}
+
+// Version of AndroidRuntime to run on host
+class HostRuntime : public AndroidRuntime {
+public:
+ HostRuntime() : AndroidRuntime(nullptr, 0) {}
+
+ void onVmCreated(JNIEnv* env) override {
+ AndroidRuntime::onVmCreated(env);
+ // initialize logging, so ANDROD_LOG_TAGS env variable is respected
+ android::base::InitLogging(nullptr, android::base::StderrLogger, abort_handler);
+ }
+
+ void onStarted() override {
+ AndroidRuntime::onStarted();
+ }
+};
+
+} // namespace android
+
+using namespace android;
+
+JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void*) {
JNIEnv* env = nullptr;
- vm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6);
- env->DeleteGlobalRef(bridge);
- env->DeleteGlobalRef(layoutLog);
+ if (vm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6) != JNI_OK) {
+ return JNI_ERR;
+ }
+
+ Vector<String8> args;
+ HostRuntime runtime;
+
+ runtime.onVmCreated(env);
+ runtime.start("HostRuntime", args, false);
+
+ return JNI_VERSION_1_6;
}
diff --git a/core/proto/android/server/inputmethod/inputmethodmanagerservice.proto b/core/proto/android/server/inputmethod/inputmethodmanagerservice.proto
index b75d545b1305..eddf1d276e4b 100644
--- a/core/proto/android/server/inputmethod/inputmethodmanagerservice.proto
+++ b/core/proto/android/server/inputmethod/inputmethodmanagerservice.proto
@@ -47,4 +47,5 @@ message InputMethodManagerServiceProto {
optional int32 ime_window_visibility = 22;
optional bool show_ime_with_hard_keyboard = 23;
optional bool accessibility_requesting_no_soft_keyboard = 24;
-} \ No newline at end of file
+ optional bool concurrent_multi_user_mode_enabled = 25;
+}
diff --git a/core/proto/android/server/vibrator/vibratormanagerservice.proto b/core/proto/android/server/vibrator/vibratormanagerservice.proto
index 5a4d6dbdc085..12804d43b04e 100644
--- a/core/proto/android/server/vibrator/vibratormanagerservice.proto
+++ b/core/proto/android/server/vibrator/vibratormanagerservice.proto
@@ -147,6 +147,7 @@ message VibrationProto {
IGNORED_ON_WIRELESS_CHARGER = 27;
IGNORED_MISSING_PERMISSION = 28;
CANCELLED_BY_APP_OPS = 29;
+ CANCELLED_BY_FOREGROUND_USER = 30;
reserved 17; // prev IGNORED_UNKNOWN_VIBRATION
}
}
diff --git a/core/res/res/drawable/ic_ime_switcher_new.xml b/core/res/res/drawable/ic_ime_switcher_new.xml
new file mode 100644
index 000000000000..04f4a250b3ec
--- /dev/null
+++ b/core/res/res/drawable/ic_ime_switcher_new.xml
@@ -0,0 +1,26 @@
+<?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.
+-->
+
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="20dp"
+ android:height="20dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path
+ android:pathData="M11.99,2C6.47,2 2,6.48 2,12s4.47,10 9.99,10C17.52,22 22,17.52 22,12S17.52,2 11.99,2zM18.92,8h-2.95c-0.32,-1.25 -0.78,-2.45 -1.38,-3.56 1.84,0.63 3.37,1.91 4.33,3.56zM12,4.04c0.83,1.2 1.48,2.53 1.91,3.96h-3.82c0.43,-1.43 1.08,-2.76 1.91,-3.96zM4.26,14C4.1,13.36 4,12.69 4,12s0.1,-1.36 0.26,-2h3.38c-0.08,0.66 -0.14,1.32 -0.14,2 0,0.68 0.06,1.34 0.14,2L4.26,14zM5.08,16h2.95c0.32,1.25 0.78,2.45 1.38,3.56 -1.84,-0.63 -3.37,-1.9 -4.33,-3.56zM8.03,8L5.08,8c0.96,-1.66 2.49,-2.93 4.33,-3.56C8.81,5.55 8.35,6.75 8.03,8zM12,19.96c-0.83,-1.2 -1.48,-2.53 -1.91,-3.96h3.82c-0.43,1.43 -1.08,2.76 -1.91,3.96zM14.34,14L9.66,14c-0.09,-0.66 -0.16,-1.32 -0.16,-2 0,-0.68 0.07,-1.35 0.16,-2h4.68c0.09,0.65 0.16,1.32 0.16,2 0,0.68 -0.07,1.34 -0.16,2zM14.59,19.56c0.6,-1.11 1.06,-2.31 1.38,-3.56h2.95c-0.96,1.65 -2.49,2.93 -4.33,3.56zM16.36,14c0.08,-0.66 0.14,-1.32 0.14,-2 0,-0.68 -0.06,-1.34 -0.14,-2h3.38c0.16,0.64 0.26,1.31 0.26,2s-0.1,1.36 -0.26,2h-3.38z"
+ android:fillColor="#FFFFFFFF"/>
+</vector>
diff --git a/core/res/res/drawable/input_method_switch_button.xml b/core/res/res/drawable/input_method_switch_button.xml
new file mode 100644
index 000000000000..396d81ed87f6
--- /dev/null
+++ b/core/res/res/drawable/input_method_switch_button.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.
+-->
+
+<inset xmlns:android="http://schemas.android.com/apk/res/android"
+ android:insetTop="6dp"
+ android:insetBottom="6dp">
+ <ripple android:color="?android:attr/colorControlHighlight">
+ <item android:id="@android:id/mask">
+ <shape android:shape="rectangle">
+ <corners android:radius="28dp"/>
+ <solid android:color="@color/white"/>
+ </shape>
+ </item>
+
+ <item>
+ <shape android:shape="rectangle">
+ <corners android:radius="28dp"/>
+ <solid android:color="@color/transparent"/>
+ <stroke android:color="?attr/materialColorPrimary"
+ android:width="1dp"/>
+ <padding android:left="16dp"
+ android:top="8dp"
+ android:right="16dp"
+ android:bottom="8dp"/>
+ </shape>
+ </item>
+ </ripple>
+</inset>
diff --git a/core/res/res/drawable/input_method_switch_item_background.xml b/core/res/res/drawable/input_method_switch_item_background.xml
new file mode 100644
index 000000000000..eb7a24691f37
--- /dev/null
+++ b/core/res/res/drawable/input_method_switch_item_background.xml
@@ -0,0 +1,37 @@
+<?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.
+-->
+
+<ripple xmlns:android="http://schemas.android.com/apk/res/android"
+ android:color="@color/list_highlight_material">
+ <item android:id="@id/mask">
+ <shape android:shape="rectangle">
+ <corners android:radius="28dp"/>
+ <solid android:color="@color/white"/>
+ </shape>
+ </item>
+
+ <item>
+ <selector>
+ <item android:state_activated="true">
+ <shape android:shape="rectangle">
+ <corners android:radius="28dp"/>
+ <solid android:color="?attr/materialColorSecondaryContainer"/>
+ </shape>
+ </item>
+ </selector>
+ </item>
+</ripple>
diff --git a/core/res/res/layout/input_method_switch_dialog_new.xml b/core/res/res/layout/input_method_switch_dialog_new.xml
new file mode 100644
index 000000000000..5a4d6b14a52b
--- /dev/null
+++ b/core/res/res/layout/input_method_switch_dialog_new.xml
@@ -0,0 +1,70 @@
+<?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"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
+
+ <com.android.internal.widget.MaxHeightFrameLayout
+ android:layout_width="320dp"
+ android:layout_height="0dp"
+ android:layout_weight="1"
+ android:maxHeight="373dp">
+
+ <com.android.internal.widget.RecyclerView
+ android:id="@+id/list"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingVertical="8dp"
+ android:clipToPadding="false"
+ android:layoutManager="com.android.internal.widget.LinearLayoutManager"/>
+
+ </com.android.internal.widget.MaxHeightFrameLayout>
+
+ <LinearLayout
+ style="?android:attr/buttonBarStyle"
+ android:id="@+id/button_bar"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:paddingHorizontal="16dp"
+ android:paddingTop="8dp"
+ android:paddingBottom="16dp"
+ android:visibility="gone">
+
+ <Space
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"/>
+
+ <Button
+ style="?attr/buttonBarButtonStyle"
+ android:id="@+id/button1"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:background="@drawable/input_method_switch_button"
+ android:layout_gravity="end"
+ android:text="@string/input_method_language_settings"
+ android:fontFamily="google-sans-text"
+ android:textAppearance="?attr/textAppearance"
+ android:visibility="gone"/>
+
+ </LinearLayout>
+
+</LinearLayout>
diff --git a/core/res/res/layout/input_method_switch_item_new.xml b/core/res/res/layout/input_method_switch_item_new.xml
new file mode 100644
index 000000000000..16a97c4b39ee
--- /dev/null
+++ b/core/res/res/layout/input_method_switch_item_new.xml
@@ -0,0 +1,88 @@
+<?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"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:paddingHorizontal="16dp"
+ android:paddingBottom="8dp">
+
+ <View
+ android:id="@+id/divider"
+ android:layout_width="match_parent"
+ android:layout_height="1dp"
+ android:background="?attr/materialColorSurfaceVariant"
+ android:layout_marginStart="20dp"
+ android:layout_marginTop="8dp"
+ android:layout_marginEnd="24dp"
+ android:layout_marginBottom="12dp"
+ android:visibility="gone"/>
+
+ <TextView
+ android:id="@+id/header_text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:padding="8dp"
+ android:ellipsize="end"
+ android:singleLine="true"
+ android:fontFamily="google-sans-text"
+ android:textAppearance="?attr/textAppearance"
+ android:textColor="?attr/materialColorPrimary"
+ android:visibility="gone"/>
+
+ <LinearLayout
+ android:id="@+id/list_item"
+ android:layout_width="match_parent"
+ android:layout_height="72dp"
+ android:background="@drawable/input_method_switch_item_background"
+ android:gravity="center_vertical"
+ android:orientation="horizontal"
+ android:paddingStart="20dp"
+ android:paddingEnd="24dp">
+
+ <LinearLayout
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:gravity="start|center_vertical"
+ android:orientation="vertical">
+
+ <TextView
+ android:id="@+id/text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:ellipsize="marquee"
+ android:singleLine="true"
+ android:fontFamily="google-sans-text"
+ android:textAppearance="?attr/textAppearanceListItem"/>
+
+ </LinearLayout>
+
+ <ImageView
+ android:id="@+id/image"
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ android:gravity="center_vertical"
+ android:layout_marginStart="12dp"
+ android:src="@drawable/ic_check_24dp"
+ android:tint="?attr/materialColorOnSurface"
+ android:visibility="gone"/>
+
+ </LinearLayout>
+
+</LinearLayout>
diff --git a/core/res/res/values-af/strings.xml b/core/res/res/values-af/strings.xml
index 336eb31a3229..5b6de34c831d 100644
--- a/core/res/res/values-af/strings.xml
+++ b/core/res/res/values-af/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Foutverslag"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Beëindig sessie"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Skermskoot"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Foutverslag"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Dit sal inligting oor die huidige toestand van jou toestel insamel om as \'n e-posboodskap te stuur. Dit sal \'n tydjie neem vandat die foutverslag begin is totdat dit reg is om gestuur te word; wees asseblief geduldig."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Interaktiewe verslag"</string>
@@ -1767,12 +1765,9 @@
<skip />
<!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
<skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"Die kenmerk sal oopmaak wanneer jy weer op die toeganklikheidknoppie tik"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"Die kenmerk sal oopmaak wanneer jy weer hierdie kortpad gebruik. Swiep vanaf die onderkant van jou skerm met 2 vingers op en los vinnig."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"Die kenmerk sal oopmaak wanneer jy weer hierdie kortpad gebruik. Swiep vanaf die onderkant van jou skerm met 3 vingers op en los vinnig."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Vergroting"</string>
<string name="user_switched" msgid="7249833311585228097">"Huidige gebruiker <xliff:g id="NAME">%1$s</xliff:g> ."</string>
<string name="user_switching_message" msgid="1912993630661332336">"Skakel tans oor na <xliff:g id="NAME">%1$s</xliff:g> …"</string>
@@ -2436,21 +2431,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Hoe dit werk"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Hangend …"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Stel Vingerafdrukslot weer op"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> kan nie meer herken word nie."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> en <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> kan nie meer herken word nie."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> kan nie meer herken word nie. Stel Vingerafdrukslot weer op."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> en <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> kan nie meer herken word nie. Stel Vingerafdrukslot weer op."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Stel Gesigslot weer op"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Jou gesigmodel kan nie meer herken word nie. Stel Gesigslot weer op."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Stel op"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Nie nou nie"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Alarm vir <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Wissel gebruiker"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Demp"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Tik om klank te demp"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-am/strings.xml b/core/res/res/values-am/strings.xml
index ad8874fef437..7b40f305668e 100644
--- a/core/res/res/values-am/strings.xml
+++ b/core/res/res/values-am/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"የሳንካ ሪፖርት"</string>
<string name="global_action_logout" msgid="6093581310002476511">"ክፍለ-ጊዜን አብቃ"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"ቅጽበታዊ ገፅ ዕይታ"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"የሳንካ ሪፖርት"</string>
<string name="bugreport_message" msgid="5212529146119624326">"ይሄ እንደ የኢሜይል መልዕክት አድርጎ የሚልከውን ስለመሣሪያዎ የአሁኑ ሁኔታ መረጃ ይሰበስባል። የሳንካ ሪፖርቱን ከመጀመር ጀምሮ እስኪላክ ድረስ ትንሽ ጊዜ ይወስዳል፤ እባክዎ ይታገሱ።"</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"መስተጋብራዊ ሪፖርት"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"ገመድ-አልባ debuggingን ለማሰናከል ይምረጡ።"</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"የሙከራ ጥቅል ሁነታ ነቅቷል"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"የመሞከሪያ ጥቅል ሁነታን ለማሰናከል የፋብሪካ ዳግም ቅንብርን ይሞክሩ።"</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"የተሳሳተ HSUM ግንብ ውቅረት"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"የዚህ መሣሪያ የበይነገፅ-አልባ ሥርዓት ተጠቃሚ ሁነታ ሁኔታ ከግንብ ውቅረቱ ይለያል። እባክዎ መሣሪያውን የፋብሪካ ዳግም ያስጀምሩት።"</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"ተከታታይ ኮንሶል ነቅቷል"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"አፈጻጸም ተጽዕኖ አርፎበታል። ለማሰናከል፣ bootloader ን ይፈትሹ።"</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"የሙከራ MTE ነቅቷል።"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"የድምፅ ቁልፎችን ይዟል። <xliff:g id="SERVICE_NAME">%1$s</xliff:g> በርቷል።"</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"የድምፅ ቁልፎችን ይዟል። <xliff:g id="SERVICE_NAME">%1$s</xliff:g> ጠፍተዋል።"</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"የድምጽ መጠን ቁልፎቹን ይልቀቁ። <xliff:g id="SERVICE_NAME">%1$s</xliff:g>ን ለማብራት ሁለቱንም የድምጽ መጠን ቁልፎች በድጋሚ ለ3 ሰከንዶች ተጭነው ይያዙ።"</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"ባህሪ ይምረጡ"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"ባህሪ ይምረጡ"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"ባህሪ ይምረጡ"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"በቀጣይ ጊዜ የተደራሽነት አዝራሩን መታ ሲያደርጉ ባህሪው ይከፈታል"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"በቀጣይ ጊዜ ይህን አቋራጭ ሲመለከቱ ባህሪው ይከፈታል። ከማያ ገፅዎ ታች በ2 ጣቶች ወደላይ ያንሸራትቱ እና በፍጥነት ይልቀቁ።"</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"በቀጣይ ጊዜ ይህን አቋራጭ ሲመለከቱ ባህሪው ይከፈታል። ከማያ ገፅዎ ታች ወደላይ በ3 ጣቶች ያንሸራትቱ እና ወዲያው ይልቀቁ።"</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"ማጉላት"</string>
<string name="user_switched" msgid="7249833311585228097">"የአሁኑ ተጠቃሚ <xliff:g id="NAME">%1$s</xliff:g>።"</string>
<string name="user_switching_message" msgid="1912993630661332336">"ወደ <xliff:g id="NAME">%1$s</xliff:g> በመቀየር ላይ…"</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"ፒን በጣም አጭር ነው። ቢያንስ 4 አሃዝ መሆን አለበት።"</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"ቆይተው እንደገና ይሞክሩ"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"ሙሉ ገፅ በማሳየት ላይ"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"ለመውጣት ከማያ ገፅዎ አናት ወደታች ያንሸራትቱ"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"ገባኝ"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"ለተሻለ ዕይታ ያሽከርክሩ"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"ለተሻለ ዕይታ <xliff:g id="NAME">%s</xliff:g>ን በሙሉ ገጽ ዕይታ ይክፈቱ"</string>
@@ -2436,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"እንዴት እንደሚሠራ"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"በመጠባበቅ ላይ..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"በጣት አሻራ መክፈቻን እንደገና ያዋቅሩ"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> ከእንግዲህ መለየት አይችልም።"</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> እና <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> ከእንግዲህ መለየት አይችሉም።"</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> ከእንግዲህ መለየት አይችልም። በጣት አሻራ መክፈቻን እንደገና ያዋቅሩ።"</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> እና <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> ከእንግዲህ መለየት አይችሉም። በጣት አሻራ መክፈቻን እንደገና ያዋቅሩ።"</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"በመልክ መክፈትን እንደገና ያዋቅሩ"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"የመልክ ሞዴልዎ ከእንግዲህ መለየት አይችልም። በመልክ መክፈትን እንደገና ያዋቅሩ።"</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"ያዋቅሩ"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"አሁን አይደለም"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"ለ<xliff:g id="USER_NAME">%s</xliff:g> ማንቂያ"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"ተጠቃሚ ቀይር"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"ድምፀ-ከል አድርግ"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"ድምፀ-ከል አድርግ ለማድረግ መታ ያድርጉ"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-ar/strings.xml b/core/res/res/values-ar/strings.xml
index ee90210d7b3c..e17e0b6942d4 100644
--- a/core/res/res/values-ar/strings.xml
+++ b/core/res/res/values-ar/strings.xml
@@ -269,8 +269,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"تقرير الأخطاء"</string>
<string name="global_action_logout" msgid="6093581310002476511">"إنهاء الجلسة"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"لقطة شاشة"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"تقرير الأخطاء"</string>
<string name="bugreport_message" msgid="5212529146119624326">"سيجمع هذا معلومات حول حالة جهازك الحالي لإرسالها كرسالة إلكترونية، ولكنه سيستغرق وقتًا قليلاً من بدء عرض تقرير بالأخطاء. وحتى يكون جاهزًا للإرسال، يُرجى الانتظار."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"تقرير تفاعلي"</string>
@@ -1417,10 +1415,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"انقر لإيقاف ميزة \"تصحيح الأخطاء اللاسلكي\""</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"تم تفعيل وضع \"مفعّل الاختبار\""</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"يمكنك إجراء إعادة ضبط على الإعدادات الأصلية لإيقاف وضع \"مفعِّل اختبار\"."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"‏إعدادات التصميم الخاصة بوضع HSUM غير صحيحة"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"‏إنّ حالة \"وضع النظام بلا واجهة مستخدم رسومية\" (Headless System User Mode) على هذا الجهاز تختلف عن إعدادات تصميمه. يُرجى إعادة ضبط الجهاز على الإعدادات الأصلية."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"وحدة التحكّم التسلسلية مفعّلة"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"الأداء متأثر. لإيقاف وحدة التحكّم، تحقّق من برنامج الإقلاع."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"‏الميزة التجريبية إضافة وضع علامات الذاكرة (MTE) مفعّلة"</string>
@@ -1765,12 +1761,9 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"تم الضغط مع الاستمرار على مفتاحَي التحكّم في مستوى الصوت. تم تفعيل <xliff:g id="SERVICE_NAME">%1$s</xliff:g>."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"تم الضغط مع الاستمرار على مفتاحَي التحكّم في مستوى الصوت. تم إيقاف <xliff:g id="SERVICE_NAME">%1$s</xliff:g>."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"ارفع إصبعَيك عن مفتاحَي مستوى الصوت. لتفعيل خدمة \"<xliff:g id="SERVICE_NAME">%1$s</xliff:g>\"، اضغط مع الاستمرار على كلا مفتاحَي مستوى الصوت مجددًا لمدة 3 ثوانٍ."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"اختيار ميزة"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"اختيار ميزة"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"اختيار ميزة"</string>
<string name="accessibility_button_instructional_text" msgid="6831154884557881996">"سيتم فتح الميزة عند النقر على زر أدوات تسهيل الاستخدام في المرة القادمة"</string>
<string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"سيتم فتح الميزة عند استخدام هذا الاختصار في المرة القادمة. مرِّر سريعًا من أسفل الشاشة إلى أعلاها باستخدام إصبعَين وارفعما بعدها بسرعة."</string>
<string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"سيتم فتح الميزة عند استخدام هذا الاختصار في المرة القادمة. مرِّر سريعًا من أسفل الشاشة إلى أعلاها باستخدام 3 أصابع وارفع أصابعك بعدها بسرعة."</string>
@@ -1779,7 +1772,7 @@
<string name="user_switching_message" msgid="1912993630661332336">"جارٍ التبديل إلى <xliff:g id="NAME">%1$s</xliff:g>…"</string>
<string name="user_logging_out_message" msgid="7216437629179710359">"جارٍ الخروج <xliff:g id="NAME">%1$s</xliff:g>…"</string>
<string name="owner_name" msgid="8713560351570795743">"المالك"</string>
- <string name="guest_name" msgid="8502103277839834324">"ضيف"</string>
+ <string name="guest_name" msgid="8502103277839834324">"وضع الضيف"</string>
<string name="error_message_title" msgid="4082495589294631966">"خطأ"</string>
<string name="error_message_change_not_allowed" msgid="843159705042381454">"لا يسمح المشرف بإجراء هذا التغيير"</string>
<string name="app_not_found" msgid="3429506115332341800">"لم يتم العثور على تطبيق يمكنه التعامل مع هذا الإجراء."</string>
@@ -1896,8 +1889,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"رقم التعريف الشخصي أقصر مما يلزم، يجب ألا يقل عن ٤ أرقام. "</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"أعد المحاولة لاحقًا"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"جارٍ العرض بملء الشاشة"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"للخروج، مرِّر سريعًا من أسفل الشاشة لأعلاها"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"حسنًا"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"يمكنك تدوير الجهاز لرؤية شاشة معاينة الكاميرا بشكل أوضح."</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"عليك فتح \"<xliff:g id="NAME">%s</xliff:g>\" في وضع ملء الشاشة لرؤية شاشة معاينة الكاميرا بشكل أوضح."</string>
@@ -2437,21 +2429,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"طريقة العمل"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"بانتظار الإزالة من الأرشيف…"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"إعادة إعداد ميزة \"فتح الجهاز ببصمة الإصبع\""</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"لا يمكن بعد الآن التعرّف على \"<xliff:g id="FINGERPRINT">%s</xliff:g>\"."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"لا يمكن بعد الآن التعرّف على \"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g>\" و\"<xliff:g id="FINGERPRINT_1">%2$s</xliff:g>\"."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"لا يمكن بعد الآن التعرّف على \"<xliff:g id="FINGERPRINT">%s</xliff:g>\". يجب ضبط ميزة \"فتح الجهاز ببصمة الإصبع\" مجددًا."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"لا يمكن بعد الآن التعرّف على \"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g>\" و\"<xliff:g id="FINGERPRINT_1">%2$s</xliff:g>\". يجب ضبط ميزة \"فتح الجهاز ببصمة الإصبع\" مجددًا."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"إعادة إعداد ميزة \"فتح الجهاز بالتعرّف على الوجه\""</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"لا يمكن بعد الآن التعرّف على نموذج الوجه الخاص بك. يجب ضبط ميزة \"فتح الجهاز بالتعرّف على الوجه\" مجددًا."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"إعداد"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"لاحقًا"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"تنبيه لـ \"<xliff:g id="USER_NAME">%s</xliff:g>\""</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"تبديل المستخدم"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"كتم الصوت"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"انقر لكتم الصوت"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-as/strings.xml b/core/res/res/values-as/strings.xml
index 599d46977f60..2642a3228546 100644
--- a/core/res/res/values-as/strings.xml
+++ b/core/res/res/values-as/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"বাগ সম্পর্কীয় অভিযোগ"</string>
<string name="global_action_logout" msgid="6093581310002476511">"ছেশ্বন সমাপ্ত কৰক"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"স্ক্ৰীনশ্বট"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"বাগ সম্পর্কীয় অভিযোগ"</string>
<string name="bugreport_message" msgid="5212529146119624326">"এই কার্যই ইমেইল বাৰ্তা হিচাপে পঠিয়াবলৈ আপোনাৰ ডিভাইচৰ বৰ্তমান অৱস্থাৰ বিষয়ে তথ্য সংগ্ৰহ কৰিব৷ ইয়াক বাগ সম্পর্কীয় অভিযোগ পঠিওৱা কাৰ্য আৰম্ভ কৰোঁতে অলপ সময় লাগিব; অনুগ্ৰহ কৰি ধৈৰ্য ধৰক।"</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"ইণ্টাৰেক্টিভ অভিযোগ"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"ৱায়াৰলেচ ডি\'বাগিং অক্ষম কৰিবলৈ বাছনি কৰক।"</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"টেষ্ট হাৰনেছ ম’ড সক্ষম কৰা আছে"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"টেষ্ট হাৰনেছ ম’ড অক্ষম কৰিবলৈ ফেক্টৰী ৰিছেট কৰক।"</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"ভুল HSUM বিল্ডৰ কনফিগাৰেশ্বন"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"এই ডিভাইচৰ পৰিধীয় ডিভাইচহীন ছিষ্টেম ব্যৱহাৰকাৰী ম’ড স্থিতি ইয়াৰ বিল্ডৰ কনফিগাৰেশ্বনৰ পৰা পৃথক। অনুগ্ৰহ কৰি ডিভাইচটো ফেক্টৰী ৰিছেট কৰক।"</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"ক্ৰমিক কনছ’ল সক্ষম কৰা আছে"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"কাৰ্যক্ষমতা প্ৰভাৱিত হৈছে। অক্ষম কৰিবলৈ বুটল’ডাৰ পৰীক্ষা কৰক।"</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"পৰীক্ষামূলক MTE সক্ষম কৰা হ\'ল"</string>
@@ -1761,12 +1757,9 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"ভলিউম কীসমূহ ধৰি ৰাখক। <xliff:g id="SERVICE_NAME">%1$s</xliff:g> অন কৰা হ\'ল।"</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"ভলিউম কী ধৰি ৰাখিছিল। <xliff:g id="SERVICE_NAME">%1$s</xliff:g> অফ কৰা হ\'ল।"</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"ভলিউম কী এৰি দিয়ক। <xliff:g id="SERVICE_NAME">%1$s</xliff:g> অন কৰিবলৈ, দুয়োটা ভলিউম কী পুনৰ ৩ ছেকেণ্ডৰ বাবে টিপি হেঁচি ৰাখক।"</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"এটা সুবিধা বাছনি কৰক"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"এটা সুবিধা বাছনি কৰক"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"এটা সুবিধা বাছনি কৰক"</string>
<string name="accessibility_button_instructional_text" msgid="6831154884557881996">"আপুনি ইয়াৰ পাছত সাধ্য-সুবিধা বুটামটোত টিপিলে সুবিধাটো খোল খাব"</string>
<string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"ইয়াৰ পাছত আপুনি এই শ্বৰ্টকাটটো ব্যৱহাৰ কৰিলে সুবিধাটো খোল খাব। আপোনাৰ স্ক্ৰীনখনৰ একেবাৰে তলৰ পৰা ওপৰলৈ ২ টা আঙুলিৰে ছোৱাইপ কৰি আঙুলিকেইটা দ্ৰুতভাৱে উঠাই দিয়ক।"</string>
<string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"ইয়াৰ পাছত আপুনি এই শ্বৰ্টকাটটো ব্যৱহাৰ কৰিলে সুবিধাটো খোল খাব। আপোনাৰ স্ক্ৰীনখনৰ একেবাৰে তলৰ পৰা ওপৰলৈ ৩ টা আঙুলিৰে ছোৱাইপ কৰি আঙুলিকেইটা দ্ৰুতভাৱে উঠাই দিয়ক।"</string>
@@ -1892,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"পিনটো অতি চুটি। কমেও ৪টা সংখ্যাৰ হ\'ব লাগিব।"</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"পাছত আকৌ চেষ্টা কৰক"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"স্ক্ৰীন পূৰ্ণৰূপত চাই আছে"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"বাহিৰ হ’বলৈ, আপোনাৰ স্ক্ৰীনখনৰ একেবাৰে ওপৰৰ পৰা তললৈ ছোৱাইপ কৰক"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"বুজি পালোঁ"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"ভালকৈ চাবলৈ ঘূৰাওক"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"ভালকৈ চাবলৈ <xliff:g id="NAME">%s</xliff:g> পূৰ্ণ স্ক্ৰীনত খোলক"</string>
@@ -2433,21 +2425,25 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"ই কেনেকৈ কাম কৰে"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"বিবেচনাধীন হৈ আছে..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"ফিংগাৰপ্ৰিণ্ট আনলক পুনৰ ছেট আপ কৰক"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> আৰু চিনাক্ত কৰিব নোৱাৰি।"</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> আৰু <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> আৰু চিনাক্ত কৰিব নোৱাৰি।"</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> আৰু চিনাক্ত কৰিব নোৱাৰি। ফিংগাৰপ্ৰিণ্ট আনলক পুনৰ ছেট আপ কৰক।"</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> আৰু <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> আৰু চিনাক্ত কৰিব নোৱাৰি। ফিংগাৰপ্ৰিণ্ট আনলক পুনৰ ছেট আপ কৰক।"</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"ফে’চ আনলক পুনৰ ছেট আপ কৰক"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"আপোনাৰ মুখাৱয়বৰ মডেলটো আৰু চিনাক্ত কৰিব নোৱাৰি। ফে’চ আনলক পুনৰ ছেট আপ কৰক।"</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"ছেট আপ কৰক"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"এতিয়া নহয়"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"<xliff:g id="USER_NAME">%s</xliff:g>ৰ বাবে এলাৰ্ম"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"ব্যৱহাৰকাৰী সলনি কৰক"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"মিউট কৰক"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"ধ্বনি মিউট কৰিবলৈ টিপক"</string>
+ <string name="keyboard_shortcut_group_applications_browser" msgid="6535007304687100909">"ব্ৰাউজাৰ"</string>
+ <string name="keyboard_shortcut_group_applications_contacts" msgid="2750702518068326356">"সম্পৰ্ক"</string>
+ <string name="keyboard_shortcut_group_applications_email" msgid="4229037666415353683">"ইমেইল"</string>
+ <string name="keyboard_shortcut_group_applications_sms" msgid="3523799286376321137">"এছএমএছ"</string>
+ <string name="keyboard_shortcut_group_applications_music" msgid="2051507523525651067">"সংগীত"</string>
+ <string name="keyboard_shortcut_group_applications_calendar" msgid="3571770335653387606">"কেলেণ্ডাৰ"</string>
+ <string name="keyboard_shortcut_group_applications_calculator" msgid="6753209559716091507">"কেলকুলেটৰ"</string>
+ <string name="keyboard_shortcut_group_applications_maps" msgid="7950000659522589471">"মেপ"</string>
+ <string name="keyboard_shortcut_group_applications" msgid="3010389163951364798">"এপ্লিকেশ্বন"</string>
</resources>
diff --git a/core/res/res/values-az/strings.xml b/core/res/res/values-az/strings.xml
index a22cf4ac7b2d..90db2d46c0ae 100644
--- a/core/res/res/values-az/strings.xml
+++ b/core/res/res/values-az/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Baq hesabatı"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Sessiyanı sonlandırın"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Skrinşot"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Baq hesabatı"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Bu, sizin hazırkı cihaz durumu haqqında məlumat toplayacaq ki, elektron məktub şəklində göndərsin. Baq raportuna başlamaq üçün bir az vaxt lazım ola bilər, bir az səbr edin."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"İnteraktiv hesabat"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"WiFi sazlamasını deaktiv etmək üçün seçin."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Test Rejimi aktivdir"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Test Rejimini deaktiv etmək üçün fabrika ayarlarına sıfırlayın."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Yanlış HSUM qurma konfiqurasiyası"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"Bu cihazın Monitorsuz sistem üzrə istifadəçi rejimindəki vəziyyəti onun konfiqurasiyasından fərqlənir. Cihazda zavod sıfırlaması edin."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Ardıcıl konsol aktiv edildi"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Performans təsirlənir. Söndürməkçün yükləyicini yoxlayın."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"Eksperimental MTE aktiv edilib"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Səs səviyyəsi düymələrinə basıb saxlayın. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> aktiv edildi."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Səs səviyyəsi düymələrinə basılaraq saxlanıb. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> deaktiv edilib."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Səs düymələrini buraxın. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> xidmətini aktiv etmək üçün hər iki səs düyməsinə yenidən 3 saniyə basıb saxlayın."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Funksiya seçin"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Funksiya seçin"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Funksiya seçin"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"Növbəti dəfə xüsusi imkanlar düyməsinə toxunduğunuz zaman funksiya açılacaq"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"Növbəti dəfə bu qısayoldan istifadə etdiyiniz zaman funksiya açılacaq. Ekranın aşağısından 2 barmaq ilə yuxarı çəkin və tez buraxın."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"Növbəti dəfə bu qısayoldan istifadə etdiyiniz zaman funksiya açılacaq. Ekranın aşağısından 3 barmaq ilə yuxarı çəkin və tez buraxın."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Böyütmə"</string>
<string name="user_switched" msgid="7249833311585228097">"Cari istifadəçi <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"<xliff:g id="NAME">%1$s</xliff:g> adına keçirilir…"</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"PİN çox qısadır. Ən azı 4 rəqəm olmalıdır."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Daha sonra yenidən yoxlayın."</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Tam ekrana baxış"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Çıxmaq üçün ekranın yuxarısından aşağı çəkin"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"Anladım"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Daha yaxşı görünüş üçün fırladın"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Yaxşı görmək üçün <xliff:g id="NAME">%s</xliff:g> tətbiqini tam ekranda açın"</string>
@@ -2436,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Haqqında"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Gözləmədə..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Barmaqla Kilidaçmanı yenidən ayarlayın"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> artıq tanınmır."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> və <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> artıq tanınmır."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> artıq tanınmır. Barmaqla Kilidaçmanı yenidən ayarlayın."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> və <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> artıq tanınmır. Barmaqla Kilidaçmanı yenidən ayarlayın."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Üzlə Kilidaçmanı yenidən ayarlayın"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Üz modeliniz artıq tanınmır. Üzlə Kilidaçmanı yenidən ayarlayın."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Ayarlayın"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"İndi yox"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"<xliff:g id="USER_NAME">%s</xliff:g> üçün alarm"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"İstifadəçini dəyişin"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Susdurun"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Susdurmaq üçün toxunun"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-b+sr+Latn/strings.xml b/core/res/res/values-b+sr+Latn/strings.xml
index 8da8c2ffb000..a2a885bad85a 100644
--- a/core/res/res/values-b+sr+Latn/strings.xml
+++ b/core/res/res/values-b+sr+Latn/strings.xml
@@ -266,8 +266,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Javi grešku"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Završi sesiju"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Snimak ekrana"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Javi grešku"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Ovim će se prikupiti informacije o trenutnom stanju uređaja kako bi bile poslate u poruci e-pošte. Od započinjanja izveštaja o grešci do trenutka za njegovo slanje proći će neko vreme; budite strpljivi."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Interaktiv. izveštaj"</string>
@@ -1414,10 +1412,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Izaberite da biste onemogućili bežično otklanjanje grešaka."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Omogućen je režim probnog korišćenja"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Obavite resetovanje na fabrička podešavanja da biste onemogućili režim probnog korišćenja."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Pogrešna HSUM konfiguracija"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"Status korisničkog režima sistema bez grafičkog korisničkog interfejsa za ovaj uređaj razlikuje se od njegove konfiguracije. Resetujte uređaj na fabrička podešavanja."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Serijska konzola je omogućena"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Performanse su smanjene. Da biste onemogući konzolu, proverite pokretački program."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"Eksperimentalni MTE je omogućen"</string>
@@ -1762,18 +1758,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Držali ste tastere za jačinu zvuka. Usluga <xliff:g id="SERVICE_NAME">%1$s</xliff:g> je uključena."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Držali ste tastere za jačinu zvuka. Usluga <xliff:g id="SERVICE_NAME">%1$s</xliff:g> je isključena."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Pustite tastere za jačinu zvuka. Da biste uključili <xliff:g id="SERVICE_NAME">%1$s</xliff:g>, ponovo pritisnite i zadržite oba tastera za jačinu zvuka 3 sekunde."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Izaberite funkciju"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Izaberite funkciju"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Izaberite funkciju"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"Funkcija će se otvoriti kada sledeći put dodirnete dugme Pristupačnost"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"Funkcija će se otvoriti kada sledeći put budete koristili ovu prečicu. Prevucite nagore od dna ekrana sa 2 prsta i brzo pustite."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"Funkcija će se otvoriti kada sledeći put budete koristili ovu prečicu. Prevucite nagore od dna ekrana sa 3 prsta i brzo pustite."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Uvećanje"</string>
<string name="user_switched" msgid="7249833311585228097">"Aktuelni korisnik <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"Prebacivanje na <xliff:g id="NAME">%1$s</xliff:g>…"</string>
@@ -1896,8 +1886,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"PIN je prekratak. Mora da ima bar 4 cifre."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Probajte ponovo kasnije"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Prikazuje se ceo ekran"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Da biste zatvorili, prevucite nadole od vrha ekrana"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"Važi"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Rotirajte radi boljeg prikaza"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Otvorite aplikaciju <xliff:g id="NAME">%s</xliff:g> preko celog ekrana da biste bolje videli"</string>
@@ -2437,21 +2426,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Princip rada"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Na čekanju..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Ponovo podesite otključavanje otiskom prsta"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> više ne može da se prepozna."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> i <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> više ne mogu da se prepoznaju."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> više ne može da se prepozna. Ponovo podesite otključavanje otiskom prsta."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> i <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> više ne mogu da se prepoznaju. Ponovo podesite otključavanje otiskom prsta."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Ponovo podesite otključavanje licem"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Vaš model lica više ne može da se prepozna. Ponovo podesite otključavanje licem."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Podesi"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Ne sada"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Alarm za: <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Promeni korisnika"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Isključi zvuk"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Dodirnite da biste isključili zvuk"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-be/strings.xml b/core/res/res/values-be/strings.xml
index 28f9ebc57e48..18d5698ae460 100644
--- a/core/res/res/values-be/strings.xml
+++ b/core/res/res/values-be/strings.xml
@@ -267,8 +267,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Справаздача пра памылкі"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Скончыць сеанс"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Здымак экрана"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Справаздача"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Будзе збiрацца iнфармацыя пра бягучы стан прылады, якая будзе адпраўляцца на электронную пошту. Стварэнне справаздачы пра памылкi зойме некаторы час."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Інтэрактыўная справаздача"</string>
@@ -1415,10 +1413,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Выберыце, каб выключыць адладку па Wi-Fi."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Тэставы рэжым уключаны"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Каб выключыць тэставы рэжым, скіньце налады да заводскіх значэнняў."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Канфігурацыя рэжыму кансольнага сістэмнага карыстальніка не адпавядае зборцы"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"Стан рэжыму кансольнага сістэмнага карыстальніка на гэтай прыладзе не адпавядае канфігурацыі яе зборкі. Скіньце прыладу да заводскіх налад."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Паслядоўная кансоль уключана"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Паказчык прадукцыйнасці змяніўся. Каб выключыць кансоль, праверце загрузчык."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"Эксперыментальнае пашырэнне тэгаў памяці (MTE) уключана"</string>
@@ -1763,12 +1759,9 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Клавішы гучнасці ўтрымліваліся націснутымі. Уключана служба \"<xliff:g id="SERVICE_NAME">%1$s</xliff:g>\"."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Клавішы гучнасці ўтрымліваліся націснутымі. Служба \"<xliff:g id="SERVICE_NAME">%1$s</xliff:g>\" выключана."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Адпусціце клавішы гучнасці. Каб уключыць сэрвіс \"<xliff:g id="SERVICE_NAME">%1$s</xliff:g>\", націсніце абедзве клавішы гучнасці яшчэ раз і ўтрымлівайце іх на працягу 3 секунд."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Выберыце функцыю"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Выберыце функцыю"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Выберыце функцыю"</string>
<string name="accessibility_button_instructional_text" msgid="6831154884557881996">"Функцыя адкрыецца, калі вы наступным разам націснеце на кнопку спецыяльных магчымасцей"</string>
<string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"Функцыя адкрыецца, калі вы наступным разам выкарыстаеце гэты хуткі доступ. Правядзіце двума пальцамі ад нізу экрана ўверх і хутка адпусціце."</string>
<string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"Функцыя адкрыецца, калі вы наступным разам выкарыстаеце гэты хуткі доступ. Правядзіце трыма пальцамі ад нізу экрана ўверх і хутка адпусціце."</string>
@@ -1894,8 +1887,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"PIN-код занадта кароткі. Павінен змяшчаць не менш за 4 лічбы."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Паўтарыце спробу пазней"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Прагляд у поўнаэкранным рэжыме"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Каб выйсці, правядзіце пальцам уніз ад верхняга краю экрана"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"Зразумела"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Павярнуць для лепшага прагляду"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Для больш зручнага прагляду адкрыйце праграму \"<xliff:g id="NAME">%s</xliff:g>\", выкарыстоўваючы поўнаэкранны рэжым"</string>
@@ -2435,21 +2427,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Як гэта працуе"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"У чаканні..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Наладзіць разблакіроўку адбіткам пальца паўторна"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"Адбітак пальца \"<xliff:g id="FINGERPRINT">%s</xliff:g>\" больш не можа быць распазнаны."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"Адбіткі пальцаў \"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g>\" і \"<xliff:g id="FINGERPRINT_1">%2$s</xliff:g>\" больш не могуць быць распазнаны."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"Адбітак пальца \"<xliff:g id="FINGERPRINT">%s</xliff:g>\" больш не можа быць распазнаны. Паўторна наладзьце разблакіроўку адбіткам пальца."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"Адбіткі пальцаў \"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g>\" і \"<xliff:g id="FINGERPRINT_1">%2$s</xliff:g>\" больш не могуць быць распазнаны. Паўторна наладзьце разблакіроўку адбіткам пальца."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Паўторна наладзьце распазнаванне твару"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Мадэль твару больш не можа быць распазнана. Паўторна наладзьце распазнаванне твару."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Наладзіць"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Не зараз"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Будзільнік карыстальніка <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Змяніць карыстальніка"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Выключыць гук"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Націсніце, каб выключыць гук"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-bg/strings.xml b/core/res/res/values-bg/strings.xml
index b9934777c82f..ea49f521560b 100644
--- a/core/res/res/values-bg/strings.xml
+++ b/core/res/res/values-bg/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Сигнал за грешка"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Прекратяване на сесията"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Екранна снимка"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Сигнал за грешка"</string>
<string name="bugreport_message" msgid="5212529146119624326">"По този начин ще се събере информация за текущото състояние на устройството ви, която да се изпрати като имейл съобщение. След стартирането на процеса ще мине известно време, докато сигналът за програмна грешка бъде готов за подаване. Моля, имайте търпение."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Интерактивен сигнал"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Изберете, за да деактивирате безжичното отстраняване на грешки."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Режимът за тестова среда е активиран"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Възстановете фабричните настройки, за да деактивирате режима за тестова среда."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Грешна конфигурация на компилацията за режима на потребител на система без графичен потребителски интерфейс"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"Състоянието на устройството в режима на потребител на система без графичен потребителски интерфейс се различава от това в конфигурацията на компилация. Моля, възстановете фабричните настройки на устройството."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Серийната конзола е активирана"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Ефективността е засегната. За да деактивирате, проверете програмата за първоначално зареждане."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"Експерименталното разширение MTE е активирано"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Задържахте бутоните за силата на звука. Услугата <xliff:g id="SERVICE_NAME">%1$s</xliff:g> е включена."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Задържахте бутоните за силата на звука. Услугата <xliff:g id="SERVICE_NAME">%1$s</xliff:g> е изключена."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Освободете бутоните за силата на звука. За да включите <xliff:g id="SERVICE_NAME">%1$s</xliff:g>, отново натиснете двата бутона за силата на звука и задръжте за 3 секунди."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Изберете функция"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Изберете функция"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Изберете функция"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"Функцията ще се отвори при следващото докосване бутона за достъпност"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"Функцията ще се отвори при следващото използване на този пряк път. Прекарайте 2 пръста нагоре от долната част на екрана и бързо освободете."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"Функцията ще се отвори при следващото използване на този пряк път. Прекарайте 3 пръста нагоре от долната част на екрана и бързо освободете."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Увеличение"</string>
<string name="user_switched" msgid="7249833311585228097">"Текущ потребител <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"Превключва се към: <xliff:g id="NAME">%1$s</xliff:g>…"</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"ПИН кодът е твърде кратък. Трябва да е поне 4 цифри."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Опитайте отново по-късно"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Изглед на цял екран"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"За изход плъзнете надолу от горната част на екрана"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"Разбрах"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Завъртете за по-добър изглед"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Отворете <xliff:g id="NAME">%s</xliff:g> на цял екран за по-добър изглед"</string>
@@ -2436,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Начин на работа"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Изчаква..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Повторно настройване на „Отключване с отпечатък“"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> вече не може да се разпознае."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> и <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> вече не могат да бъдат разпознати."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> вече не може да се разпознае. Настройте отново „Отключване с отпечатък“."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> и <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> вече не могат да бъдат разпознати. Настройте отново „Отключване с отпечатък“."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Повторно настройване на „Отключване с лице“"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Моделът на лицето ви вече не може да бъде разпознат. Настройте отново „Отключване с лице“."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Настройване"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Не сега"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Будилник за <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Смяна на потребителя"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Спиране на звука"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Докоснете, за да спрете звука"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-bn/strings.xml b/core/res/res/values-bn/strings.xml
index ca5c47110b4b..354899358dbc 100644
--- a/core/res/res/values-bn/strings.xml
+++ b/core/res/res/values-bn/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"ত্রুটির প্রতিবেদন"</string>
<string name="global_action_logout" msgid="6093581310002476511">"সেশন শেষ করুন"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"স্ক্রিনশট নিন"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"সমস্যার রিপোর্ট"</string>
<string name="bugreport_message" msgid="5212529146119624326">"এটি একটি ই-মেল মেসেজ পাঠানোর জন্য আপনার ডিভাইসের বর্তমান অবস্থা সম্পর্কে তথ্য সংগ্রহ করবে৷ ত্রুটির প্রতিবেদন শুরুর সময় থেকে এটি পাঠানোর জন্য প্রস্তুত হতে কিছুটা সময় নেবে; অনুগ্রহ করে ধৈর্য রাখুন৷"</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"ইন্টারেক্টিভ প্রতিবেদন"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"ওয়্যারলেস ডিবাগিং বন্ধ করতে বেছে নিন।"</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"টেস্ট হারনেস মোড চালু আছে"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"টেস্ট হারনেস মোড বন্ধ করতে ফ্যাক্টরি রিসেট করুন।"</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"HSUM বিল্ড কনফিগারেশন ভুল আছে"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"এই ডিভাইসের হেডলেস সিস্টেম ইউজার মোড স্ট্যাটাস, তার বিল্ড কনফিগারেশনের থেকে আলাদা। আপনার ডিভাইস ফ্যাক্টরি রিসেট করুন।"</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"সিরিয়াল কনসোল চালু করা হয়েছে"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"পারফর্ম্যান্সে এর প্রভাব পড়বে। চালানো বন্ধ করতে \'বুটলোডার\' প্রোগ্রামে এটিকে চেক করে দেখুন।"</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"পরীক্ষামূলক MTE চালু আছে"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"ভলিউম কী ধরে ছিলেন। <xliff:g id="SERVICE_NAME">%1$s</xliff:g> চালু করা হয়েছে।"</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"ভলিউম কী ধরে ছিলেন। <xliff:g id="SERVICE_NAME">%1$s</xliff:g> বন্ধ করা হয়েছে।"</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"ভলিউম \'কী\' রিলিজ করুন। <xliff:g id="SERVICE_NAME">%1$s</xliff:g> চালু করুন, দু\'টি ভলিউম \'কী\' আবার প্রেস করে ৩ সেকেন্ড ধরে রাখুন।"</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"ফিচার বেছে নিন"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"ফিচার বেছে নিন"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"ফিচার বেছে নিন"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"পরের বার অ্যাক্সেসিবিলিটি বোতামে ট্যাপ করলে, ফিচারটি চালু হয়ে যাবে"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"পরের বার এই শর্টকাট ব্যবহার করলে, ফিচারটি চালু হয়ে যাবে। ২টি আঙ্গুল দিয়ে স্ক্রিনের নিচ থেকে উপরের দিকে সোয়াইপ করে দ্রুত ছেড়ে দিন।"</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"পরের বার এই শর্টকাট ব্যবহার করলে, ফিচারটি চালু হয়ে যাবে। ৩টি আঙ্গুল দিয়ে স্ক্রিনের নিচ থেকে উপরের দিকে সোয়াইপ করে দ্রুত ছেড়ে দিন।"</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"বড় করে দেখা"</string>
<string name="user_switched" msgid="7249833311585228097">"বর্তমান ব্যবহারকারী <xliff:g id="NAME">%1$s</xliff:g>৷"</string>
<string name="user_switching_message" msgid="1912993630661332336">"<xliff:g id="NAME">%1$s</xliff:g> প্রোফাইলে পাল্টানো হচ্ছে…"</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"পিন খুবই ছোট৷ এটিকে কমপক্ষে ৪ সংখ্যার হতে হবে৷"</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"পরে আবার চেষ্টা করুন"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"পূর্ণ স্ক্রিনে দেখা হচ্ছে"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"বেরিয়ে আসতে, আপনার স্ক্রিনের একেবারে উপর থেকে নিচের দিকে সোয়াইপ করুন"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"বুঝেছি"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"আরও ভাল ক্যামেরা ভিউ পাওয়ার জন্য ঘোরান"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"আরও ভাল ভিউয়ের জন্য ফুল স্ক্রিনে <xliff:g id="NAME">%s</xliff:g> খুলুন"</string>
@@ -2436,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"এটি কীভাবে কাজ করে"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"বাকি আছে…"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"\'ফিঙ্গারপ্রিন্ট আনলক\' আবার সেট-আপ করুন"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> আর শনাক্ত করা যাবে না।"</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> ও <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> আর শনাক্ত করা যাবে না।"</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> আর শনাক্ত করা যাবে না। ফিঙ্গারপ্রিন্ট আনলক আবার সেট-আপ করুন।"</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> ও <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> আর শনাক্ত করা যাবে না। ফিঙ্গারপ্রিন্ট আনলক আবার সেট-আপ করুন।"</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"\'ফেস আনলক\' আবার সেট-আপ করুন"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"আপনার ফেস মডেল আর শনাক্ত করা যাবে না। ফেস আনলক আবার সেট-আপ করুন।"</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"সেট-আপ করুন"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"এখন নয়"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"<xliff:g id="USER_NAME">%s</xliff:g>-এর জন্য অ্যালার্ম"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"ব্যবহারকারী পাল্টান"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"মিউট করুন"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"সাউন্ড মিউট করতে ট্যাপ করুন"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-bs/strings.xml b/core/res/res/values-bs/strings.xml
index 4a1aaedc1697..eb66410b3f69 100644
--- a/core/res/res/values-bs/strings.xml
+++ b/core/res/res/values-bs/strings.xml
@@ -266,8 +266,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Izvještaj o greškama"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Završi sesiju"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Snimak ekrana"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Izvještaj o greškama"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Ovim će se prikupljati informacije o trenutnom stanju uređaja, koji će biti poslani kao e-poruka. Može malo potrajati dok se izvještaj o greškama ne kreira i bude spreman za slanje. Budite strpljivi."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Interaktivni izvještaj"</string>
@@ -1414,10 +1412,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Odaberite da onemogućite bežično otklanjanje grešaka."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Omogućen način rada okvira za testiranje"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Izvršite vraćanje na fabričke postavke da onemogućite način rada okvira za testiranje."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Pogrešna konfiguracija HSUM-a"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"Stanje korisnika sistema bez grafičkog korisničkog interfejsa se razlikuje od njegove konfiguracije. Vratite uređaj na fabričke postavke."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Serijska konzola omogućena"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Performanse su smanjene. Da onemogućite, provjerite program za učitavanje operativnog sistema."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"Eksperimentalni MTE je omogućen"</string>
@@ -1762,18 +1758,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Držali ste tipke za jačinu zvuka. Usluga <xliff:g id="SERVICE_NAME">%1$s</xliff:g> je uključena."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Držali ste tipke za jačinu zvuka. Usluga <xliff:g id="SERVICE_NAME">%1$s</xliff:g> je isključena."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Pustite tipke za jačinu zvuka. Da uključite uslugu <xliff:g id="SERVICE_NAME">%1$s</xliff:g>, ponovo pritisnite i zadržite obje tipke za jačinu zvuka 3 sekunde."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Odaberite funkciju"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Odaberite funkciju"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Odaberite funkciju"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"Funkcija će se otvoriti sljedeći put kada dodirnete dugme za pristupačnost"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"Funkcija će se otvoriti sljedeći put kada upotrijebite ovu prečicu. Prevucite s 2 prsta s dna ekrana i brzo pustite."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"Funkcija će se otvoriti sljedeći put kada upotrijebite ovu prečicu. Prevucite s 3 prsta s dna ekrana i brzo pustite."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Uvećavanje"</string>
<string name="user_switched" msgid="7249833311585228097">"Trenutni korisnik <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"Prebacivanje na korisnika <xliff:g id="NAME">%1$s</xliff:g>..."</string>
@@ -1896,8 +1886,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"PIN je prekratak. Mora imati najmanje 4 cifre."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Pokušajte ponovo kasnije."</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Prikazuje se cijeli ekran"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Da izađete, prevucite s vrha ekrana nadolje"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"Razumijem"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Rotirajte za bolji prikaz"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Otvorite aplikaciju <xliff:g id="NAME">%s</xliff:g> preko cijelog ekrana radi boljeg pregleda"</string>
@@ -2437,21 +2426,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Kako ovo funkcionira"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Na čekanju…"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Ponovo postavite otključavanje otiskom prsta"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> se više ne može prepoznati."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> i <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> se više ne mogu prepoznati."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> se više ne može prepoznati. Ponovo postavite otključavanje otiskom prsta."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> i <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> se više ne mogu prepoznati. Ponovo postavite otključavanje otiskom prsta."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Ponovo postavite otključavanje licem"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Vaš model lica se više ne može prepoznati. Ponovo postavite otključavanje licem."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Postavite"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Ne sada"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Alarm za: <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Prebaci na drugog korisnika"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Isključi zvuk"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Dodirnite da isključite zvuk"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-ca/strings.xml b/core/res/res/values-ca/strings.xml
index a3b13f1a5972..9e5c336b9b6a 100644
--- a/core/res/res/values-ca/strings.xml
+++ b/core/res/res/values-ca/strings.xml
@@ -266,8 +266,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Informe d\'error"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Finalitza la sessió"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Captura de pantalla"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Informe d\'errors"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Es recopilarà informació sobre l\'estat actual del dispositiu i se t\'enviarà per correu electrònic. Passaran uns quants minuts des de l\'inici de l\'informe d\'errors fins al seu enviament, per la qual cosa et recomanem que tinguis paciència."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Informe interactiu"</string>
@@ -1414,10 +1412,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Selecciona per desactivar la depuració sense fil."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"S\'ha activat el mode Agent de prova"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Si vols desactivar el mode Agent de prova, restableix les dades de fàbrica."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Configuració de la compilació HSUM incorrecta"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"L\'estat del mode d\'usuari del sistema sense interfície gràfica d\'aquest dispositiu és diferent de la configuració de la seva compilació. Restableix les dades de fàbrica del dispositiu."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"S\'ha activat la consola de sèrie"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Afecta el rendiment. Per desactivar-la, comprova el bootloader."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"L\'MTE experimental s\'ha activat"</string>
@@ -1762,18 +1758,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"S\'han mantingut premudes les tecles de volum. S\'ha activat <xliff:g id="SERVICE_NAME">%1$s</xliff:g>."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"S\'han mantingut premudes les tecles de volum. S\'ha desactivat <xliff:g id="SERVICE_NAME">%1$s</xliff:g>."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Deixa anar les tecles de volum. Per activar <xliff:g id="SERVICE_NAME">%1$s</xliff:g>, torna a mantenir premudes totes dues tecles de volum durant 3 segons."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Tria una funció"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Tria una funció"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Tria una funció"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"La funció s\'obrirà la pròxima vegada que toquis el botó d\'accessibilitat"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"La funció s\'obrirà la pròxima vegada que utilitzis aquesta drecera. Llisca cap amunt amb 2 dits des de la part inferior de la pantalla i aixeca\'ls ràpidament."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"La funció s\'obrirà la pròxima vegada que utilitzis aquesta drecera. Llisca cap amunt amb 3 dits des de la part inferior de la pantalla i aixeca\'ls ràpidament."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Ampliació"</string>
<string name="user_switched" msgid="7249833311585228097">"Usuari actual: <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"S\'està canviant a <xliff:g id="NAME">%1$s</xliff:g>…"</string>
@@ -1896,8 +1886,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"El PIN és massa curt. Ha de tenir quatre dígits com a mínim."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Torna-ho a provar més tard"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Mode de pantalla completa"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Per sortir, llisca cap avall des de la part superior de la pantalla"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"Entesos"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Gira per a una millor visualització"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Obre <xliff:g id="NAME">%s</xliff:g> en pantalla completa per a una millor visualització"</string>
@@ -2437,21 +2426,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Com funciona"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Pendent..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Torna a configurar Desbloqueig amb empremta digital"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> ja no es pot reconèixer."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> i <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> ja no es poden reconèixer."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> ja no es pot reconèixer. Torna a configurar Desbloqueig amb empremta digital."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> i <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> ja no es poden reconèixer. Torna a configurar Desbloqueig amb empremta digital."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Torna a configurar Desbloqueig facial"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"El teu model facial ja no es pot reconèixer. Torna a configurar Desbloqueig facial."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Configura"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Ara no"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Alarma per a <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Canvia d\'usuari"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Silencia"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Toca per silenciar el so"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml
index a5a42c3357ad..78b79cb227e6 100644
--- a/core/res/res/values-cs/strings.xml
+++ b/core/res/res/values-cs/strings.xml
@@ -267,8 +267,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Hlášení chyb"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Ukončit relaci"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Snímek obrazovky"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Hlášení chyb"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Shromažďuje informace o aktuálním stavu zařízení. Tyto informace je následně možné poslat v e-mailové zprávě, chvíli však potrvá, než bude hlášení o chybě připraveno k odeslání. Buďte prosím trpěliví."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Interaktivní přehled"</string>
@@ -1415,10 +1413,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Vyberte, chcete-li zakázat bezdrátové ladění."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Režim správce testů je aktivní"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Chcete-li deaktivovat režim správce testů, restartujte zařízení do továrního nastavení."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Nesprávná konfigurace sestavení HSUM"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"Stav systémového uživatele bez grafické vrstvy (HSUM) tohoto zařízení se liší od konfigurace sestavení. Resetujte zařízení do továrního nastavení."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Je zapnutá sériová konzole"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Toto má dopad na výkon. Chcete-li ji vypnout, zkontrolujte bootloader."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"Je zapnuto experimentální MTE"</string>
@@ -1443,7 +1439,7 @@
<string name="fast_scroll_numeric_alphabet" msgid="2529539945421557329">" 0123456789AÁBCČDĎEÉĚFGHCHIÍJKLMNŇOÓPQRŘSŠTŤUÚVWXYÝZŽ"</string>
<string name="alert_windows_notification_channel_group_name" msgid="6063891141815714246">"Zobrazení přes ostatní aplikace"</string>
<string name="alert_windows_notification_channel_name" msgid="3437528564303192620">"Aplikace <xliff:g id="NAME">%s</xliff:g> se zobrazuje přes ostatní aplikace"</string>
- <string name="alert_windows_notification_title" msgid="6331662751095228536">"<xliff:g id="NAME">%s</xliff:g> se zobrazuje přes ostatní aplikace"</string>
+ <string name="alert_windows_notification_title" msgid="6331662751095228536">"Aplikace <xliff:g id="NAME">%s</xliff:g> se zobrazuje přes ostatní aplikace"</string>
<string name="alert_windows_notification_message" msgid="6538171456970725333">"Pokud nechcete, aby aplikace <xliff:g id="NAME">%s</xliff:g> tuto funkci používala, klepnutím otevřete nastavení a funkci vypněte."</string>
<string name="alert_windows_notification_turn_off_action" msgid="7805857234839123780">"Vypnout"</string>
<string name="ext_media_checking_notification_title" msgid="8299199995416510094">"Kontroluje se <xliff:g id="NAME">%s</xliff:g>…"</string>
@@ -1763,18 +1759,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Byla podržena tlačítka hlasitosti. Služba <xliff:g id="SERVICE_NAME">%1$s</xliff:g> je zapnutá."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Byla podržena tlačítka hlasitosti. Služba <xliff:g id="SERVICE_NAME">%1$s</xliff:g> byla vypnuta."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Uvolněte tlačítka hlasitosti. Pokud chcete zapnout službu <xliff:g id="SERVICE_NAME">%1$s</xliff:g>, znovu tři sekundy podržte obě tlačítka hlasitosti."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Vyberte funkci"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Vyberte funkci"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Vyberte funkci"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"Funkce se otevře, až příště klepnete na tlačítko přístupnosti"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"Funkce se otevře při příštím použití této zkratky. Přejeďte dvěma prsty nahoru ze spodní části obrazovky a rychle je zvedněte."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"Funkce se otevře při příštím použití této zkratky. Přejeďte třemi prsty nahoru ze spodní části obrazovky a rychle je zvedněte."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Zvětšení"</string>
<string name="user_switched" msgid="7249833311585228097">"Aktuální uživatel je <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"Přepínání na uživatele <xliff:g id="NAME">%1$s</xliff:g>…"</string>
@@ -1897,8 +1887,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"Kód PIN je příliš krátký. Musí mít alespoň čtyři číslice."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Zkuste to znovu později"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Zobrazení celé obrazovky"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Tento režim ukončíte přejetím prstem dolů z horního okraje obrazovky"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"Rozumím"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Otočte obrazovku, abyste lépe viděli"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Otevřete aplikaci <xliff:g id="NAME">%s</xliff:g> na celou obrazovku, aby byla lépe vidět"</string>
@@ -2438,21 +2427,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Jak to funguje"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Čeká na vyřízení…"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Opětovné nastavení odemknutí otiskem prstu"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> se nedaří rozpoznat."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> a <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> se nedaří rozpoznat."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> se nedaří rozpoznat. Nastavte odemknutí otiskem prstu znovu."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> a <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> se nedaří rozpoznat. Nastavte odemknutí otiskem prstu znovu."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Nastavte odemknutí obličejem znovu"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Váš model obličeje se nedaří rozpoznat. Nastavte odemknutí obličejem znovu."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Nastavit"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Teď ne"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Budík pro uživatele <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Přepnout uživatele"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Ztlumit"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Klepnutím ztlumíte zvuk"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-da/strings.xml b/core/res/res/values-da/strings.xml
index 66ab048dab09..b7e70ef6f7eb 100644
--- a/core/res/res/values-da/strings.xml
+++ b/core/res/res/values-da/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Fejlrapport"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Afslut sessionen"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Screenshot"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Fejlrapport"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Der indsamles oplysninger om din enheds aktuelle status, der efterfølgende sendes i en mail. Der går lidt tid, fra fejlrapporten påbegyndes, til den er klar til at blive sendt. Tak for tålmodigheden."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Interaktiv rapport"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Vælg for at deaktivere trådløs fejlretning."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Tilstanden Testsele er aktiveret"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Gendan fabriksindstillingerne for at deaktivere tilstanden Testsele."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Forkert HSUM-buildkonfiguration"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"Tilstanden systembruger uden grafisk brugerflade på denne enhed er forskellig fra dens buildkonfiguration. Gendan enhedens fabriksindstillinger."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Seriekonsollen er aktiveret"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Effektiviteten er påvirket. Deaktiver via bootloaderen."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"Eksperimentel MTE er aktiveret"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Lydstyrkeknapperne blev holdt nede. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> er aktiveret."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Lydstyrkeknapperne blev holdt nede. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> er deaktiveret."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Slip lydstyrkeknapperne. Du kan aktivere <xliff:g id="SERVICE_NAME">%1$s</xliff:g> ved at holde begge lydstyrkeknapper nede igen i 3 sekunder."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Vælg en funktion"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Vælg en funktion"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Vælg en funktion"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"Funktionen åbnes næste gang, du trykker på knappen til hjælpefunktioner"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"Funktionen åbnes næste gang, du bruger denne genvej. Stryg opad fra bunden af skærmen med 2 fingre, og slip derefter hurtigt."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"Funktionen åbnes næste gang, du bruger denne genvej. Stryg opad fra bunden af skærmen med 3 fingre, og slip derefter hurtigt."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Forstørrelse"</string>
<string name="user_switched" msgid="7249833311585228097">"Nuværende bruger <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"Skifter til <xliff:g id="NAME">%1$s</xliff:g>…"</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"Pinkoden er for kort. Den skal være på mindst 4 tal."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Prøv igen senere"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Visning i fuld skærm"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Stryg nedad fra toppen af skærmen for at afslutte"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"OK, det er forstået"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Roter, og få en bedre visning"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Åbn <xliff:g id="NAME">%s</xliff:g> i fuld skærm for at få en bedre visning"</string>
@@ -2156,7 +2145,7 @@
<string name="notification_feedback_indicator_promoted" msgid="9030204303764698640">"Denne notifikation blev placeret højere. Tryk for at give feedback."</string>
<string name="notification_feedback_indicator_demoted" msgid="8880309924296450875">"Denne notifikation blev placeret lavere. Tryk for at give feedback."</string>
<string name="nas_upgrade_notification_title" msgid="8436359459300146555">"Forbedrede notifikationer"</string>
- <string name="nas_upgrade_notification_content" msgid="5157550369837103337">"Foreslåede handlinger og svar leveres nu via forbedrede notifikationer. Tilpassede Android-notifikationer understøttes ikke længere."</string>
+ <string name="nas_upgrade_notification_content" msgid="5157550369837103337">"Foreslåede handlinger og svar leveres nu via forbedrede notifikationer. Adaptive Android-notifikationer understøttes ikke længere."</string>
<string name="nas_upgrade_notification_enable_action" msgid="3046406808378726874">"OK"</string>
<string name="nas_upgrade_notification_disable_action" msgid="3794833210043497982">"Deaktiver"</string>
<string name="nas_upgrade_notification_learn_more_action" msgid="7011130656195423947">"Få flere oplysninger"</string>
@@ -2436,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Sådan fungerer det"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Afventer…"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Konfigurer fingeroplåsning igen"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> kan ikke længere genkendes."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> og <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> kan ikke længere genkendes."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> kan ikke længere genkendes. Konfigurer fingeroplåsning igen."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> og <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> kan ikke længere genkendes. Konfigurer fingeroplåsning igen."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Konfigurer ansigtsoplåsning igen"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Din ansigtsmodel kan ikke længere genkendes. Konfigurer ansigtsoplåsning igen."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Konfigurer"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Ikke nu"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Alarm til <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Skift bruger"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Slå lyden fra"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Tryk for at slå lyden fra"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml
index 162b782f2f03..e30f92d4725f 100644
--- a/core/res/res/values-de/strings.xml
+++ b/core/res/res/values-de/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Fehlerbericht"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Sitzung beenden"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Screenshot"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Fehlerbericht"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Bei diesem Fehlerbericht werden Daten zum aktuellen Status deines Geräts erfasst und als E-Mail versandt. Vom Start des Berichts bis zu seinem Versand kann es eine Weile dauern. Bitte habe etwas Geduld."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Interaktiver Bericht"</string>
@@ -347,7 +345,7 @@
<string name="permgroupdesc_phone" msgid="270048070781478204">"Telefonanrufe tätigen und verwalten"</string>
<string name="permgrouplab_sensors" msgid="9134046949784064495">"Körpersensoren"</string>
<string name="permgroupdesc_sensors" msgid="2610631290633747752">"auf Sensordaten zu deinen Vitaldaten zugreifen"</string>
- <string name="permgrouplab_notifications" msgid="5472972361980668884">"Benachrichtigungen"</string>
+ <string name="permgrouplab_notifications" msgid="5472972361980668884">"Benachrichtigun­gen"</string>
<string name="permgroupdesc_notifications" msgid="4608679556801506580">"Benachrichtigungen anzeigen"</string>
<string name="capability_title_canRetrieveWindowContent" msgid="7554282892101587296">"Fensterinhalte abrufen"</string>
<string name="capability_desc_canRetrieveWindowContent" msgid="6195610527625237661">"Die Inhalte eines Fensters, mit dem du interagierst, werden abgerufen."</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Auswählen, um \"Debugging über WLAN\" zu deaktivieren."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Test-Harnischmodus aktiviert"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Setz das Gerät auf die Werkseinstellungen zurück, um den Test-Harnischmodus zu deaktivieren."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Falsche HSUM‑Build-Konfiguration"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"Der Headless System User Mode-Zustand unterscheidet sich von seiner Build-Konfiguration. Bitte setze das Gerät auf die Werkseinstellungen zurück."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Serielle Konsole aktiviert"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Leistung wird beeinflusst. Überprüfe Bootloader zum Deaktivieren."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"Experimentelle MTE aktiviert"</string>
@@ -1579,7 +1575,7 @@
<string name="add_account_button_label" msgid="322390749416414097">"Konto hinzufügen"</string>
<string name="number_picker_increment_button" msgid="7621013714795186298">"Verlängern"</string>
<string name="number_picker_decrement_button" msgid="5116948444762708204">"Verringern"</string>
- <string name="number_picker_increment_scroll_mode" msgid="8403893549806805985">"<xliff:g id="VALUE">%s</xliff:g> berühren und halten."</string>
+ <string name="number_picker_increment_scroll_mode" msgid="8403893549806805985">"<xliff:g id="VALUE">%s</xliff:g> gedrückt halten."</string>
<string name="number_picker_increment_scroll_action" msgid="8310191318914268271">"Zum Verlängern nach oben und zum Verringern nach unten schieben"</string>
<string name="time_picker_increment_minute_button" msgid="7195870222945784300">"Minuten verlängern"</string>
<string name="time_picker_decrement_minute_button" msgid="230925389943411490">"Minuten verringern"</string>
@@ -1606,7 +1602,7 @@
<string name="activitychooserview_choose_application_error" msgid="6937782107559241734">"<xliff:g id="APPLICATION_NAME">%s</xliff:g> konnte nicht gestartet werden."</string>
<string name="shareactionprovider_share_with" msgid="2753089758467748982">"Teilen mit"</string>
<string name="shareactionprovider_share_with_application" msgid="4902832247173666973">"Mit <xliff:g id="APPLICATION_NAME">%s</xliff:g> teilen"</string>
- <string name="content_description_sliding_handle" msgid="982510275422590757">"Schieberegler: Berühren und halten"</string>
+ <string name="content_description_sliding_handle" msgid="982510275422590757">"Schieberegler: Gedrückt halten"</string>
<string name="description_target_unlock_tablet" msgid="7431571180065859551">"Zum Entsperren den Finger über den Bildschirm ziehen"</string>
<string name="action_bar_home_description" msgid="1501655419158631974">"Zur Startseite navigieren"</string>
<string name="action_bar_up_description" msgid="6611579697195026932">"Nach oben navigieren"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Lautstärketasten wurden gedrückt gehalten. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> ist aktiviert."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Lautstärketasten wurden gedrückt gehalten. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> ist deaktiviert."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Lass die Lautstärketasten los. Halte zum Aktivieren von <xliff:g id="SERVICE_NAME">%1$s</xliff:g> beide Lautstärketasten noch einmal 3 Sekunden lang gedrückt."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Funktion auswählen"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Funktion auswählen"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Funktion auswählen"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"Die Funktion wird geöffnet, wenn du das nächste Mal auf die Schaltfläche „Bedienungshilfen“ tippst"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"Die Funktion wird geöffnet, wenn du diese Touch-Geste für Bedienungshilfen das nächste Mal verwendest. Wische mit 2 Fingern vom unteren Displayrand nach oben und lass dann schnell los."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"Die Funktion wird geöffnet, wenn du diese Touch-Geste für Bedienungshilfen das nächste Mal verwendest. Wische mit 3 Fingern vom unteren Displayrand nach oben und lass dann schnell los."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Vergrößerung"</string>
<string name="user_switched" msgid="7249833311585228097">"Aktueller Nutzer <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="user_switching_message" msgid="1912993630661332336">"Wechseln zu <xliff:g id="NAME">%1$s</xliff:g>…"</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"Die PIN ist zu kurz. Sie muss mindestens 4 Ziffern umfassen."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Später erneut versuchen"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Vollbildmodus wird aktiviert"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Wenn du den Modus verlassen möchtest, wische vom oberen Displayrand nach unten"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"Ok"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Drehen, um die Ansicht zu verbessern"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Du kannst <xliff:g id="NAME">%s</xliff:g> im Vollbildmodus öffnen, um die Ansicht zu verbessern"</string>
@@ -2436,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"So funktionierts"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Ausstehend…"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Entsperrung per Fingerabdruck neu einrichten"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> wird nicht mehr erkannt."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> und <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> werden nicht mehr erkannt."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> wird nicht mehr erkannt. Richte die Entsperrung per Fingerabdruck neu ein."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> und <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> werden nicht mehr erkannt. Richte die Entsperrung per Fingerabdruck neu ein."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Entsperrung per Gesichtserkennung neu einrichten"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Dein Gesichtsmodell wird nicht mehr erkannt. Richte die Entsperrung per Gesichtserkennung neu ein."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Einrichten"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Nicht jetzt"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Wecker für <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Nutzer wechseln"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Stummschalten"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Zum Stummschalten tippen"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-el/strings.xml b/core/res/res/values-el/strings.xml
index 0e0a58289116..c7a55634fb4b 100644
--- a/core/res/res/values-el/strings.xml
+++ b/core/res/res/values-el/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Αναφορά σφαλμάτων"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Λήξη περιόδου σύνδεσης"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Στιγμιότυπο οθόνης"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Αναφορά σφάλματος"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Θα συλλέξει πληροφορίες σχετικά με την τρέχουσα κατάσταση της συσκευής σας και θα τις στείλει μέσω μηνύματος ηλεκτρονικού ταχυδρομείου. Απαιτείται λίγος χρόνος για τη σύνταξη της αναφοράς σφάλματος και την αποστολή της. Κάντε λίγη υπομονή."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Διαδραστική αναφορά"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Επιλέξτε, για να απενεργοποιήσετε τον ασύρματο εντοπισμό σφαλμάτων."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Η λειτουργία περιβάλλοντος δοκιμών ενεργοποιήθηκε"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Εκτελέστε επαναφορά εργοστασιακών ρυθμίσεων για να απενεργοποιήσετε τη λειτουργία περιβάλλοντος δοκιμών."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Λάθος διαμόρφωση κατασκευής HSUM"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"Η κατάσταση της Λειτουργίας χρήστη συστήματος Headless (Headless System User Mode, HSUM) αυτής της συσκευής διαφέρει από τη διαμόρφωση κατασκευής της. Κάντε επαναφορά εργοστασιακών ρυθμίσεων της συσκευής."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Η σειριακή κονσόλα ενεργοποιήθηκε"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Η απόδοση επηρεάζεται. Για απενεργοποίηση, επιλέξτε το πρόγραμμα φόρτωσης εκκίνησης."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"Ενεργοποιήθηκε το πειραματικό MTE"</string>
@@ -1441,7 +1437,7 @@
<string name="fast_scroll_numeric_alphabet" msgid="2529539945421557329">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="alert_windows_notification_channel_group_name" msgid="6063891141815714246">"Εμφάνιση πάνω σε άλλες εφαρμογές"</string>
<string name="alert_windows_notification_channel_name" msgid="3437528564303192620">"Η εφαρμογή <xliff:g id="NAME">%s</xliff:g> προβάλλεται πάνω από άλλες εφαρμογές"</string>
- <string name="alert_windows_notification_title" msgid="6331662751095228536">"Η εφαρμογή <xliff:g id="NAME">%s</xliff:g> επικαλύπτει άλλες"</string>
+ <string name="alert_windows_notification_title" msgid="6331662751095228536">"Η εφαρ. <xliff:g id="NAME">%s</xliff:g> επικαλύπτει άλλες"</string>
<string name="alert_windows_notification_message" msgid="6538171456970725333">"Εάν δεν θέλετε να χρησιμοποιείται αυτή η λειτουργία από την εφαρμογή <xliff:g id="NAME">%s</xliff:g>, πατήστε για να ανοίξετε τις ρυθμίσεις και απενεργοποιήστε την."</string>
<string name="alert_windows_notification_turn_off_action" msgid="7805857234839123780">"Απενεργοποίηση"</string>
<string name="ext_media_checking_notification_title" msgid="8299199995416510094">"Έλεγχος <xliff:g id="NAME">%s</xliff:g>…"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Τα πλήκτρα έντασης είναι πατημένα. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> ενεργοποιήθηκε."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Τα πλήκτρα έντασης είναι πατημένα. <xliff:g id="SERVICE_NAME">%1$s</xliff:g>: απενεργοποιημένο"</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Αφήστε τα κουμπιά έντασης ήχου. Για να ενεργοποιήσετε την υπηρεσία <xliff:g id="SERVICE_NAME">%1$s</xliff:g>, πατήστε ξανά παρατεταμένα και τα δύο κουμπιά έντασης ήχου για τρία δευτερόλεπτα."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Επιλέξτε μια λειτουργία"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Επιλέξτε μια λειτουργία"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Επιλέξτε μια λειτουργία"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"Η λειτουργία θα ανοίξει την επόμενη φορά που θα πατήσετε το κουμπί προσβασιμότητας"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"Η λειτουργία θα ανοίξει την επόμενη φορά που θα χρησιμοποιήσετε αυτή τη συντόμευση. Σαρώστε προς τα πάνω με 2 δάχτυλα από το κάτω μέρος της οθόνης και απομακρύνετε γρήγορα τα δάχτυλά σας."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"Η λειτουργία θα ανοίξει την επόμενη φορά που θα χρησιμοποιήσετε αυτή τη συντόμευση. Σαρώστε προς τα πάνω με 3 δάχτυλα από το κάτω μέρος της οθόνης και απομακρύνετε γρήγορα τα δάχτυλά σας."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Μεγιστοποίηση"</string>
<string name="user_switched" msgid="7249833311585228097">"Τρέχων χρήστης <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"Εναλλαγή σε <xliff:g id="NAME">%1$s</xliff:g>…"</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"Το PIN είναι υπερβολικά μικρό. Πρέπει να έχει μέγεθος τουλάχιστον 4 χαρακτήρων."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Δοκιμάστε ξανά αργότερα"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Προβολή σε πλήρη οθόνη"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Για έξοδο, σύρετε προς τα κάτω από το επάνω μέρος της οθόνης"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"Το κατάλαβα"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Περιστρέψτε την οθόνη για καλύτερη προβολή"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Ανοίξτε την εφαρμογή <xliff:g id="NAME">%s</xliff:g> σε πλήρη οθόνη για καλύτερη προβολή"</string>
@@ -2124,7 +2113,7 @@
<string name="popup_window_default_title" msgid="6907717596694826919">"Αναδυόμενο παράθυρο"</string>
<string name="slice_more_content" msgid="3377367737876888459">"+ <xliff:g id="NUMBER">%1$d</xliff:g>"</string>
<string name="shortcut_restored_on_lower_version" msgid="9206301954024286063">"Η έκδοση εφαρμογής υποβαθμίστηκε ή δεν είναι συμβατή με αυτήν τη συντόμευση"</string>
- <string name="shortcut_restore_not_supported" msgid="4763198938588468400">"Δεν ήταν δυνατή η επαναφορά της συντόμευσης, επειδή η εφαρμογή δεν υποστηρίζει τη δημιουργία αντιγράφων ασφαλείας και την επαναφορά"</string>
+ <string name="shortcut_restore_not_supported" msgid="4763198938588468400">"Δεν ήταν δυνατή η επαναφορά της συντόμευσης, επειδή η εφαρμογή δεν υποστηρίζει τη δημιουργία αντιγράφου ασφαλείας και την επαναφορά"</string>
<string name="shortcut_restore_signature_mismatch" msgid="579345304221605479">"Δεν ήταν δυνατή η επαναφορά της συντόμευσης, λόγω αναντιστοιχίας της υπογραφής εφαρμογής"</string>
<string name="shortcut_restore_unknown_issue" msgid="2478146134395982154">"Δεν ήταν δυνατή η επαναφορά της συντόμευσης"</string>
<string name="shortcut_disabled_reason_unknown" msgid="753074793553599166">"Η συντόμευση είναι απενεργοποιημένη"</string>
@@ -2436,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Πώς λειτουργεί"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Σε εκκρεμότητα…"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Επαναρρύθμιση λειτουργίας Ξεκλείδωμα με δακτυλικό αποτύπωμα"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"Δεν είναι πλέον δυνατή η αναγνώριση του <xliff:g id="FINGERPRINT">%s</xliff:g>."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"Δεν είναι πλέον δυνατή η αναγνώριση του <xliff:g id="FINGERPRINT_0">%1$s</xliff:g> και του <xliff:g id="FINGERPRINT_1">%2$s</xliff:g>."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"Δεν είναι πλέον δυνατή η αναγνώριση του <xliff:g id="FINGERPRINT">%s</xliff:g>. Ρυθμίστε ξανά τη λειτουργία Ξεκλείδωμα με δακτυλικό αποτύπωμα."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"Δεν είναι πλέον δυνατή η αναγνώριση του <xliff:g id="FINGERPRINT_0">%1$s</xliff:g> και του <xliff:g id="FINGERPRINT_1">%2$s</xliff:g>. Ρυθμίστε ξανά τη λειτουργία Ξεκλείδωμα με δακτυλικό αποτύπωμα."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Επαναρρύθμιση λειτουργίας Ξεκλείδωμα με το πρόσωπο"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Δεν είναι πλέον δυνατή η αναγνώριση του μοντέλου προσώπου σας. Ρυθμίστε ξανά τη λειτουργία Ξεκλείδωμα με το πρόσωπο."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Ρύθμιση"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Όχι τώρα"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Ξυπνητήρι για τον χρήστη <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Εναλλαγή χρήστη"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Σίγαση"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Πατήστε για σίγαση του ήχου"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-en-rAU/strings.xml b/core/res/res/values-en-rAU/strings.xml
index 73081b8ef684..5dfd2ac76aad 100644
--- a/core/res/res/values-en-rAU/strings.xml
+++ b/core/res/res/values-en-rAU/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Bug report"</string>
<string name="global_action_logout" msgid="6093581310002476511">"End session"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Screenshot"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Bug report"</string>
<string name="bugreport_message" msgid="5212529146119624326">"This will collect information about your current device state, to send as an email message. It will take a little time from starting the bug report until it is ready to be sent. Please be patient."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Interactive report"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Select to disable wireless debugging."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Test Harness Mode enabled"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Perform a factory reset to disable Test Harness Mode."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Wrong HSUM build configuration"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"The headless system user mode state of this device differs from its build configuration. Please factory reset the device."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Serial console enabled"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Performance is impacted. To disable, check bootloader."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"Experimental MTE enabled"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Held volume keys. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> turned on."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Held volume keys. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> turned off."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Release the volume keys. To turn on <xliff:g id="SERVICE_NAME">%1$s</xliff:g>, press and hold both volume keys again for three seconds."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Choose a feature"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Choose a feature"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Choose a feature"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"The feature will open the next time that you tap the accessibility button"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"The feature will open the next time that you use this shortcut. Swipe up with 2 fingers from the bottom of your screen and release quickly."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"The feature will open the next time that you use this shortcut. Swipe up with 3 fingers from the bottom of your screen and release quickly."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Magnification"</string>
<string name="user_switched" msgid="7249833311585228097">"Current user <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"Switching to <xliff:g id="NAME">%1$s</xliff:g>…"</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"PIN is too short. Must be at least four digits."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Try again later"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Viewing full screen"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"To exit, swipe down from the top of your screen"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"Got it"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Rotate for a better view"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Open <xliff:g id="NAME">%s</xliff:g> in full screen for a better view"</string>
@@ -2436,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"How it works"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Pending…"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Set up Fingerprint Unlock again"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> can no longer be recognised."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> and <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> can no longer be recognised."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> can no longer be recognised. Set up Fingerprint Unlock again."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> and <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> can no longer be recognised. Set up Fingerprint Unlock again."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Set up Face Unlock again"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Your face model can no longer be recognised. Set up Face Unlock again."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Set up"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Not now"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Alarm for <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Switch user"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Mute"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Tap to mute sound"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-en-rCA/strings.xml b/core/res/res/values-en-rCA/strings.xml
index 00b39a925c65..55c637610f8e 100644
--- a/core/res/res/values-en-rCA/strings.xml
+++ b/core/res/res/values-en-rCA/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Bug report"</string>
<string name="global_action_logout" msgid="6093581310002476511">"End session"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Screenshot"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Bug report"</string>
<string name="bugreport_message" msgid="5212529146119624326">"This will collect information about your current device state, to send as an e-mail message. It will take a little time from starting the bug report until it is ready to be sent; please be patient."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Interactive report"</string>
@@ -2427,21 +2425,25 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"How it works"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Pending..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Set up Fingerprint Unlock again"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> can no longer be recognized."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> and <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> can no longer be recognized."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> can no longer be recognized. Set up Fingerprint Unlock again."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> and <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> can no longer be recognized. Set up Fingerprint Unlock again."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Set up Face Unlock again"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Your face model can no longer be recognized. Set up Face Unlock again."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Set up"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Not now"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Alarm for <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Switch user"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Mute"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Tap to mute sound"</string>
+ <string name="keyboard_shortcut_group_applications_browser" msgid="6535007304687100909">"Browser"</string>
+ <string name="keyboard_shortcut_group_applications_contacts" msgid="2750702518068326356">"Contacts"</string>
+ <string name="keyboard_shortcut_group_applications_email" msgid="4229037666415353683">"Email"</string>
+ <string name="keyboard_shortcut_group_applications_sms" msgid="3523799286376321137">"SMS"</string>
+ <string name="keyboard_shortcut_group_applications_music" msgid="2051507523525651067">"Music"</string>
+ <string name="keyboard_shortcut_group_applications_calendar" msgid="3571770335653387606">"Calendar"</string>
+ <string name="keyboard_shortcut_group_applications_calculator" msgid="6753209559716091507">"Calculator"</string>
+ <string name="keyboard_shortcut_group_applications_maps" msgid="7950000659522589471">"Maps"</string>
+ <string name="keyboard_shortcut_group_applications" msgid="3010389163951364798">"Applications"</string>
</resources>
diff --git a/core/res/res/values-en-rGB/strings.xml b/core/res/res/values-en-rGB/strings.xml
index 0fff77a1faed..bb55bade208b 100644
--- a/core/res/res/values-en-rGB/strings.xml
+++ b/core/res/res/values-en-rGB/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Bug report"</string>
<string name="global_action_logout" msgid="6093581310002476511">"End session"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Screenshot"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Bug report"</string>
<string name="bugreport_message" msgid="5212529146119624326">"This will collect information about your current device state, to send as an email message. It will take a little time from starting the bug report until it is ready to be sent. Please be patient."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Interactive report"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Select to disable wireless debugging."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Test Harness Mode enabled"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Perform a factory reset to disable Test Harness Mode."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Wrong HSUM build configuration"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"The headless system user mode state of this device differs from its build configuration. Please factory reset the device."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Serial console enabled"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Performance is impacted. To disable, check bootloader."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"Experimental MTE enabled"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Held volume keys. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> turned on."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Held volume keys. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> turned off."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Release the volume keys. To turn on <xliff:g id="SERVICE_NAME">%1$s</xliff:g>, press and hold both volume keys again for three seconds."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Choose a feature"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Choose a feature"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Choose a feature"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"The feature will open the next time that you tap the accessibility button"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"The feature will open the next time that you use this shortcut. Swipe up with 2 fingers from the bottom of your screen and release quickly."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"The feature will open the next time that you use this shortcut. Swipe up with 3 fingers from the bottom of your screen and release quickly."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Magnification"</string>
<string name="user_switched" msgid="7249833311585228097">"Current user <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"Switching to <xliff:g id="NAME">%1$s</xliff:g>…"</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"PIN is too short. Must be at least four digits."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Try again later"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Viewing full screen"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"To exit, swipe down from the top of your screen"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"Got it"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Rotate for a better view"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Open <xliff:g id="NAME">%s</xliff:g> in full screen for a better view"</string>
@@ -2436,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"How it works"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Pending…"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Set up Fingerprint Unlock again"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> can no longer be recognised."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> and <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> can no longer be recognised."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> can no longer be recognised. Set up Fingerprint Unlock again."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> and <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> can no longer be recognised. Set up Fingerprint Unlock again."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Set up Face Unlock again"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Your face model can no longer be recognised. Set up Face Unlock again."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Set up"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Not now"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Alarm for <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Switch user"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Mute"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Tap to mute sound"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-en-rIN/strings.xml b/core/res/res/values-en-rIN/strings.xml
index ba7bc5f6f770..1ab0a1664444 100644
--- a/core/res/res/values-en-rIN/strings.xml
+++ b/core/res/res/values-en-rIN/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Bug report"</string>
<string name="global_action_logout" msgid="6093581310002476511">"End session"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Screenshot"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Bug report"</string>
<string name="bugreport_message" msgid="5212529146119624326">"This will collect information about your current device state, to send as an email message. It will take a little time from starting the bug report until it is ready to be sent. Please be patient."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Interactive report"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Select to disable wireless debugging."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Test Harness Mode enabled"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Perform a factory reset to disable Test Harness Mode."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Wrong HSUM build configuration"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"The headless system user mode state of this device differs from its build configuration. Please factory reset the device."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Serial console enabled"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Performance is impacted. To disable, check bootloader."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"Experimental MTE enabled"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Held volume keys. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> turned on."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Held volume keys. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> turned off."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Release the volume keys. To turn on <xliff:g id="SERVICE_NAME">%1$s</xliff:g>, press and hold both volume keys again for three seconds."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Choose a feature"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Choose a feature"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Choose a feature"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"The feature will open the next time that you tap the accessibility button"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"The feature will open the next time that you use this shortcut. Swipe up with 2 fingers from the bottom of your screen and release quickly."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"The feature will open the next time that you use this shortcut. Swipe up with 3 fingers from the bottom of your screen and release quickly."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Magnification"</string>
<string name="user_switched" msgid="7249833311585228097">"Current user <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"Switching to <xliff:g id="NAME">%1$s</xliff:g>…"</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"PIN is too short. Must be at least four digits."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Try again later"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Viewing full screen"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"To exit, swipe down from the top of your screen"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"Got it"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Rotate for a better view"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Open <xliff:g id="NAME">%s</xliff:g> in full screen for a better view"</string>
@@ -2436,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"How it works"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Pending…"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Set up Fingerprint Unlock again"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> can no longer be recognised."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> and <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> can no longer be recognised."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> can no longer be recognised. Set up Fingerprint Unlock again."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> and <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> can no longer be recognised. Set up Fingerprint Unlock again."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Set up Face Unlock again"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Your face model can no longer be recognised. Set up Face Unlock again."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Set up"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Not now"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Alarm for <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Switch user"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Mute"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Tap to mute sound"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-en-rXC/strings.xml b/core/res/res/values-en-rXC/strings.xml
index 2798d032027d..cac4a51ba497 100644
--- a/core/res/res/values-en-rXC/strings.xml
+++ b/core/res/res/values-en-rXC/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‎‏‏‏‎‎‏‎‏‎‎‏‏‏‎‏‏‎‎‎‎‎‎‎‎‏‎‎‎‎‏‎‎‏‎‎‏‎‏‎‎‎‏‏‎‏‎‎‏‎‎‏‎‎‎‏‎‎‏‏‎Bug report‎‏‎‎‏‎"</string>
<string name="global_action_logout" msgid="6093581310002476511">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‎‏‎‎‏‎‎‏‎‎‎‎‏‎‏‏‏‏‏‏‏‏‏‎‏‎‏‎‏‎‎‏‎‎‎‎‏‎‏‎‏‎‎‎‎‎‏‏‎‏‎‏‏‏‎‏‏‏‏‏‎End session‎‏‎‎‏‎"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‎‏‎‎‎‎‏‏‏‎‎‎‏‏‎‎‎‏‎‏‏‏‎‎‏‏‎‎‎‏‏‏‏‏‏‏‎‎‎‎‏‎‎‎‏‎‏‏‎‎‎‎‎‏‏‎‎‏‎‎‎Screenshot‎‏‎‎‏‎"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‎‏‏‎‏‎‏‎‎‏‏‏‏‎‏‎‏‎‏‏‎‏‎‏‎‏‏‏‏‏‏‏‎‎‎‎‏‏‎‏‏‎‎‎‎‎‎‏‎‎‏‏‎‏‏‏‏‎‏‎‎Bug report‎‏‎‎‏‎"</string>
<string name="bugreport_message" msgid="5212529146119624326">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‏‎‎‎‎‏‎‏‎‏‏‎‏‎‎‏‏‏‏‏‏‎‏‎‎‏‎‎‎‎‏‎‎‏‏‏‏‏‎‏‎‏‎‎‏‎‎‏‎‏‏‎‏‎‎‎‎‏‏‎‎This will collect information about your current device state, to send as an e-mail message. It will take a little time from starting the bug report until it is ready to be sent; please be patient.‎‏‎‎‏‎"</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‏‏‏‎‏‎‎‏‎‏‎‏‎‎‎‎‏‎‏‏‏‎‎‏‎‎‏‎‎‎‎‏‏‏‏‎‎‏‎‎‎‏‎‎‎‎‎‏‏‎‏‎‏‏‏‏‏‎‎‏‎Interactive report‎‏‎‎‏‎"</string>
@@ -2427,21 +2425,25 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‏‎‏‏‎‏‏‏‎‏‏‏‎‏‎‏‏‎‎‎‎‏‏‏‎‏‎‎‎‎‏‏‎‏‎‎‎‏‎‏‏‏‏‎‎‏‏‎‎‎‎‏‏‎‎‎‎‏‏‏‎How it works‎‏‎‎‏‎"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‏‏‏‎‏‎‎‎‏‎‎‎‏‎‎‏‎‎‏‏‏‏‎‏‎‏‎‏‎‏‏‏‏‏‎‏‏‏‎‏‎‏‎‏‏‎‏‎‏‏‏‎‏‎‏‎‏‏‎‏‎Pending...‎‏‎‎‏‎"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‎‏‏‎‎‎‏‎‏‎‏‏‎‏‎‏‏‎‎‎‎‏‏‎‎‎‏‎‎‏‏‎‏‎‏‎‏‏‎‎‎‏‏‎‎‏‏‏‏‏‎‎‏‏‏‏‎‏‎‏‎Set up Fingerprint Unlock again‎‏‎‎‏‎"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‎‎‎‏‎‎‏‏‎‏‎‏‏‎‏‏‎‏‏‏‎‎‎‏‎‎‎‏‏‏‎‎‎‏‎‎‎‎‎‎‎‏‎‎‏‏‎‎‏‏‎‎‏‎‏‏‎‏‏‎‎‎‏‎‎‏‏‎<xliff:g id="FINGERPRINT">%s</xliff:g>‎‏‎‎‏‏‏‎ can no longer be recognized.‎‏‎‎‏‎"</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‏‏‎‏‏‏‏‏‏‎‏‏‏‏‏‏‏‎‏‎‏‎‏‎‏‏‎‎‏‏‏‎‏‎‏‎‎‏‎‎‏‏‎‎‏‏‎‏‏‏‎‏‎‎‎‎‏‎‎‎‎‎‏‎‎‏‏‎<xliff:g id="FINGERPRINT_0">%1$s</xliff:g>‎‏‎‎‏‏‏‎ and ‎‏‎‎‏‏‎<xliff:g id="FINGERPRINT_1">%2$s</xliff:g>‎‏‎‎‏‏‏‎ can no longer be recognized.‎‏‎‎‏‎"</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‏‎‎‏‎‏‎‏‎‎‏‏‎‎‎‎‏‎‎‏‎‏‏‏‎‎‏‏‏‎‏‏‎‎‏‏‎‏‎‏‎‏‏‏‎‏‎‏‎‎‏‏‏‎‏‎‏‎‏‎‎‎‏‎‎‏‏‎<xliff:g id="FINGERPRINT">%s</xliff:g>‎‏‎‎‏‏‏‎ can no longer be recognized. Set up Fingerprint Unlock again.‎‏‎‎‏‎"</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‎‎‏‎‏‏‏‎‏‎‏‎‎‎‏‏‏‏‏‏‎‎‏‏‏‏‎‎‎‎‎‏‎‏‏‎‎‎‎‎‎‎‎‏‎‏‎‎‏‎‎‏‏‏‎‏‏‎‏‏‎‎‏‎‎‏‏‎<xliff:g id="FINGERPRINT_0">%1$s</xliff:g>‎‏‎‎‏‏‏‎ and ‎‏‎‎‏‏‎<xliff:g id="FINGERPRINT_1">%2$s</xliff:g>‎‏‎‎‏‏‏‎ can no longer be recognized. Set up Fingerprint Unlock again.‎‏‎‎‏‎"</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‎‏‏‎‏‎‎‏‎‎‏‏‏‎‏‏‏‎‎‏‎‏‏‎‏‏‏‎‏‎‎‏‏‏‎‎‏‎‏‏‎‎‏‎‎‎‎‎‎‏‎‏‏‎‏‏‏‎‎‎‏‎Set up Face Unlock again‎‏‎‎‏‎"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‎‏‎‏‎‎‏‎‏‏‎‏‏‎‎‏‎‏‎‎‏‎‎‎‎‎‏‎‎‏‎‏‏‏‏‎‏‏‎‏‏‎‎‎‎‎‎‎‎‎‎‎‎‏‎‏‎‏‎‎‎‎Your face model can no longer be recognized. Set up Face Unlock again.‎‏‎‎‏‎"</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‎‎‏‎‎‏‏‏‎‎‏‎‏‏‎‏‎‎‏‎‎‎‏‏‏‎‎‎‏‏‏‏‏‎‎‏‎‎‎‏‎‏‏‎‏‎‏‏‏‏‎‎‏‏‏‎‏‎‎‏‎Set up‎‏‎‎‏‎"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‎‎‎‎‎‏‎‏‏‎‎‎‎‎‎‏‏‎‏‎‎‏‎‎‎‏‎‏‏‎‏‏‎‎‏‏‎‏‏‏‎‏‏‎‏‏‎‏‏‏‎‎‎‏‏‎‎‎‏‏‎Not now‎‏‎‎‏‎"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‏‎‎‎‏‏‏‎‎‎‎‏‏‎‏‏‎‏‎‏‏‏‎‎‎‎‎‏‏‎‎‎‏‏‎‏‎‎‏‏‎‏‎‏‏‏‏‎‎‎‏‎‏‏‏‎‎‏‏‏‎Alarm for ‎‏‎‎‏‏‎<xliff:g id="USER_NAME">%s</xliff:g>‎‏‎‎‏‏‏‎‎‏‎‎‏‎"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‏‎‏‎‏‏‏‎‏‎‎‎‏‏‏‎‎‎‏‎‎‎‎‎‎‎‏‏‎‏‏‎‏‏‏‏‎‏‏‏‏‎‎‎‎‏‏‏‎‎‎‎‏‏‎‏‎‎‏‎‎Switch user‎‏‎‎‏‎"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‎‏‎‎‏‎‎‏‎‏‏‎‎‎‎‏‎‎‏‎‏‏‏‏‏‏‎‎‎‎‏‏‏‏‎‏‏‏‏‎‏‎‏‏‏‎‏‏‏‎‎‏‏‎‎‎‏‎‏‏‎Mute‎‏‎‎‏‎"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‎‏‏‏‏‎‎‎‏‎‏‎‏‎‏‎‏‎‎‎‎‎‎‎‎‏‎‎‏‎‏‎‏‎‏‏‏‏‏‎‏‎‎‎‏‎‎‏‎‏‎‎‎‎‏‎‎‎‎‏‎Tap to mute sound‎‏‎‎‏‎"</string>
+ <string name="keyboard_shortcut_group_applications_browser" msgid="6535007304687100909">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‏‎‏‎‏‎‏‏‎‎‎‏‎‎‎‎‎‎‏‎‏‎‎‎‎‏‎‏‎‎‎‎‏‎‎‎‎‏‏‏‎‏‎‏‎‎‏‎‎‎‏‏‏‏‏‎‏‏‎‏‎Browser‎‏‎‎‏‎"</string>
+ <string name="keyboard_shortcut_group_applications_contacts" msgid="2750702518068326356">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‎‏‏‎‎‎‏‎‏‏‎‎‎‏‏‏‎‏‎‏‎‏‎‏‏‏‎‏‏‏‎‎‏‎‎‎‎‎‏‏‏‏‎‎‎‎‏‎‏‏‏‏‏‏‎‏‎‏‎‎‎Contacts‎‏‎‎‏‎"</string>
+ <string name="keyboard_shortcut_group_applications_email" msgid="4229037666415353683">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‏‏‎‏‎‏‎‏‏‎‎‎‎‏‎‎‎‏‏‏‏‎‏‎‏‏‎‎‏‏‏‏‎‏‎‎‎‎‏‏‎‏‏‏‏‎‎‎‏‏‏‏‏‎‏‎‏‎‎‏‏‎Email‎‏‎‎‏‎"</string>
+ <string name="keyboard_shortcut_group_applications_sms" msgid="3523799286376321137">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‏‎‎‎‎‏‏‏‎‎‏‏‏‎‎‎‎‏‏‎‎‏‏‎‎‎‏‏‏‏‏‏‏‎‏‎‎‎‎‏‏‏‏‎‎‎‏‎‏‎‎‎‎‎‏‏‏‎‎‎‏‎SMS‎‏‎‎‏‎"</string>
+ <string name="keyboard_shortcut_group_applications_music" msgid="2051507523525651067">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‏‏‎‎‎‏‏‏‏‎‎‎‎‏‏‎‏‎‏‏‎‎‏‏‏‎‎‏‎‎‏‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎‏‎‏‎‏‎‎‏‏‏‏‎‏‏‎Music‎‏‎‎‏‎"</string>
+ <string name="keyboard_shortcut_group_applications_calendar" msgid="3571770335653387606">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‏‎‎‎‏‏‎‎‏‎‎‎‏‎‏‏‏‏‎‏‎‎‎‏‏‎‎‏‎‎‎‏‏‏‎‏‏‏‏‏‎‎‏‎‏‏‏‎‏‏‏‎‏‎‏‎‏‎‏‏‎‎Calendar‎‏‎‎‏‎"</string>
+ <string name="keyboard_shortcut_group_applications_calculator" msgid="6753209559716091507">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‏‏‎‏‏‎‏‏‏‎‎‎‎‎‏‏‏‎‎‎‎‏‎‏‎‎‎‎‏‎‎‎‎‏‎‎‏‎‏‎‎‏‏‎‎‏‎‏‎‏‏‎‎‏‏‏‎‎‏‏‎Calculator‎‏‎‎‏‎"</string>
+ <string name="keyboard_shortcut_group_applications_maps" msgid="7950000659522589471">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‏‏‏‎‎‏‎‏‎‏‎‎‎‎‎‏‎‎‏‏‎‏‏‏‏‎‏‎‏‎‎‏‏‎‏‎‏‏‏‏‎‏‏‏‎‎‎‏‎‎‏‏‎‎‎‏‏‏‏‏‎Maps‎‏‎‎‏‎"</string>
+ <string name="keyboard_shortcut_group_applications" msgid="3010389163951364798">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‏‎‎‏‏‏‎‎‎‏‏‏‎‎‎‎‏‏‎‎‏‏‏‏‏‏‏‎‏‎‏‏‎‎‎‏‎‎‎‎‎‎‎‏‏‎‎‏‏‎‏‎‏‎‏‏‏‏‏‎‎Applications‎‏‎‎‏‎"</string>
</resources>
diff --git a/core/res/res/values-es-rUS/strings.xml b/core/res/res/values-es-rUS/strings.xml
index 543afeb70eaf..b1f56b79b201 100644
--- a/core/res/res/values-es-rUS/strings.xml
+++ b/core/res/res/values-es-rUS/strings.xml
@@ -266,8 +266,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Informe de errores"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Finalizar sesión"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Captura de pantalla"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Informe de errores"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Se recopilará información sobre el estado actual de tu dispositivo, que se enviará por correo. Pasarán unos minutos desde que se inicie el informe de errores hasta que se envíe, por lo que te recomendamos que tengas paciencia."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Informe interactivo"</string>
@@ -1414,10 +1412,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Selecciona para inhabilitar la depuración inalámbrica."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Se habilitó el modo de agente de prueba"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Restablece la configuración de fábrica para inhabilitar el modo de agente de prueba."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"La configuración de compilación HSUM no es correcta"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"El estado de Headless System User Mode de este dispositivo difiere de la configuración de compilación. Restablece el dispositivo a su configuración de fábrica."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Se habilitó la consola en serie"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Afecta el rendimiento. Para inhabilitarla, verifica el bootloader."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"MTE experimental habilitada"</string>
@@ -1762,18 +1758,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Como mantuviste presionadas las teclas de volumen, se activó <xliff:g id="SERVICE_NAME">%1$s</xliff:g>."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Se presionaron las teclas de volumen. Se desactivó <xliff:g id="SERVICE_NAME">%1$s</xliff:g>."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Suelta las teclas de volumen. Para activar <xliff:g id="SERVICE_NAME">%1$s</xliff:g>, vuelve a mantener presionadas las teclas de volumen durante 3 segundos."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Elige una función"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Elige una función"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Elige una función"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"La función se abrirá la próxima vez que presiones el botón de accesibilidad"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"La función se abrirá la próxima vez que uses este atajo. Desliza hacia arriba con 2 dedos desde la parte inferior de la pantalla y levanta los dedos rápidamente."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"La función se abrirá la próxima vez que uses este atajo. Desliza hacia arriba con 3 dedos desde la parte inferior de la pantalla y levanta los dedos rápidamente."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Ampliación"</string>
<string name="user_switched" msgid="7249833311585228097">"Usuario actual: <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="user_switching_message" msgid="1912993630661332336">"Cambiando a <xliff:g id="NAME">%1$s</xliff:g>…"</string>
@@ -1896,8 +1886,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"El PIN es demasiado corto. Debe tener al menos 4 dígitos."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Vuelve a intentar más tarde."</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Visualización en pantalla completa"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Para salir, desliza el dedo hacia abajo desde la parte superior de la pantalla"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"Entendido"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Gira la pantalla para obtener una mejor vista"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Abre <xliff:g id="NAME">%s</xliff:g> en pantalla completa para una mejor visualización"</string>
@@ -2437,21 +2426,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Cómo funciona"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Pendiente…"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Vuelve a configurar el Desbloqueo con huellas dactilares"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"Ya no se puede reconocer <xliff:g id="FINGERPRINT">%s</xliff:g>."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"Ya no se pueden reconocer <xliff:g id="FINGERPRINT_0">%1$s</xliff:g> y <xliff:g id="FINGERPRINT_1">%2$s</xliff:g>."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"Ya no se puede reconocer <xliff:g id="FINGERPRINT">%s</xliff:g>. Vuelve a configurar el Desbloqueo con huellas dactilares."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"Ya no se pueden reconocer <xliff:g id="FINGERPRINT_0">%1$s</xliff:g> y <xliff:g id="FINGERPRINT_1">%2$s</xliff:g>. Vuelve a configurar el Desbloqueo con huellas dactilares."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Vuelve a configurar el Desbloqueo facial"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Ya no se puede reconocer tu modelo de rostro. Vuelve a configurar el Desbloqueo facial."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Configurar"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Ahora no"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Alarma para <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Cambiar de usuario"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Silenciar"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Presiona para silenciar el sonido"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml
index 0a153baa74aa..f187cfde4c91 100644
--- a/core/res/res/values-es/strings.xml
+++ b/core/res/res/values-es/strings.xml
@@ -266,8 +266,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Informe de errores"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Finalizar sesión"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Captura de pantalla"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Informe de errores"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Se recopilará información sobre el estado actual de tu dispositivo y se enviará por correo electrónico. Pasarán unos minutos desde que empiece a generarse el informe de errores hasta que se envíe."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Informe interactivo"</string>
@@ -1414,10 +1412,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Toca para desactivar la depuración inalámbrica."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Modo de agente de prueba habilitado"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Restablece los ajustes de fábrica para inhabilitar el modo de agente de prueba."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Configuración de compilación del modo de usuario del sistema sin interfaz gráfica incorrecta"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"El estado del modo de usuario del sistema sin interfaz gráfica de este dispositivo es distinto al de su configuración de compilación. Restablece el estado de fábrica del dispositivo."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Se ha habilitado la consola en serie"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Afecta al rendimiento. Para inhabilitarlo, comprueba el bootloader."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"MTE experimental habilitado"</string>
@@ -1442,7 +1438,7 @@
<string name="fast_scroll_numeric_alphabet" msgid="2529539945421557329">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="alert_windows_notification_channel_group_name" msgid="6063891141815714246">"Mostrar sobre otras aplicaciones"</string>
<string name="alert_windows_notification_channel_name" msgid="3437528564303192620">"<xliff:g id="NAME">%s</xliff:g> se muestra sobre otras aplicaciones"</string>
- <string name="alert_windows_notification_title" msgid="6331662751095228536">"<xliff:g id="NAME">%s</xliff:g> se muestra sobre otras apps"</string>
+ <string name="alert_windows_notification_title" msgid="6331662751095228536">"<xliff:g id="NAME">%s</xliff:g> se muestra sobre otras aplicaciones"</string>
<string name="alert_windows_notification_message" msgid="6538171456970725333">"Si no quieres que <xliff:g id="NAME">%s</xliff:g> utilice esta función, toca la notificación para abrir los ajustes y desactivarla."</string>
<string name="alert_windows_notification_turn_off_action" msgid="7805857234839123780">"Desactivar"</string>
<string name="ext_media_checking_notification_title" msgid="8299199995416510094">"Comprobando <xliff:g id="NAME">%s</xliff:g>…"</string>
@@ -1762,18 +1758,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Al mantener pulsadas las teclas de volumen, se ha activado <xliff:g id="SERVICE_NAME">%1$s</xliff:g>."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Se han mantenido pulsadas las teclas de volumen. Se ha desactivado <xliff:g id="SERVICE_NAME">%1$s</xliff:g>."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Suelta las teclas de volumen. Para activar <xliff:g id="SERVICE_NAME">%1$s</xliff:g>, mantén pulsadas las dos teclas de volumen de nuevo durante 3 segundos."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Elige una función"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Elige una función"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Elige una función"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"La función se abrirá la próxima vez que toques el botón de accesibilidad"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"La función se abrirá la próxima vez que uses este acceso directo. Desliza hacia arriba con 2 dedos desde la parte inferior de la pantalla y suelta rápidamente."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"La función se abrirá la próxima vez que uses este acceso directo. Desliza hacia arriba con 3 dedos desde la parte inferior de la pantalla y suelta rápidamente."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Ampliación"</string>
<string name="user_switched" msgid="7249833311585228097">"Usuario actual: <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="user_switching_message" msgid="1912993630661332336">"Cambiando a <xliff:g id="NAME">%1$s</xliff:g>…"</string>
@@ -1896,8 +1886,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"El PIN es demasiado corto. Debe tener al menos 4 dígitos."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Reintentar más tarde"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Modo de pantalla completa"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Para salir, desliza hacia abajo desde la parte superior de la pantalla"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"Entendido"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Gira la pantalla para verlo mejor"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Abre <xliff:g id="NAME">%s</xliff:g> en pantalla completa para verlo mejor"</string>
@@ -2437,21 +2426,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Cómo funciona"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Pendiente..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Configura Desbloqueo con huella digital de nuevo"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> ya no puede reconocerse."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> y <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> ya no pueden reconocerse."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> ya no puede reconocerse. Vuelve a configurar Desbloqueo con huella digital."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> y <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> ya no pueden reconocerse. Vuelve a configurar Desbloqueo con huella digital."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Configura Desbloqueo facial de nuevo"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Tu modelo facial ya no puede reconocerse. Vuelve a configurar Desbloqueo facial."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Configurar"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Ahora no"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Alarma para <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Cambiar de usuario"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Silenciar"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Toca para silenciar el sonido"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-et/strings.xml b/core/res/res/values-et/strings.xml
index 4b81448cc288..5a618d6c5d53 100644
--- a/core/res/res/values-et/strings.xml
+++ b/core/res/res/values-et/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Veaaruanne"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Seansi lõpp"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Ekraanipilt"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Veaaruanne"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Nii kogutakse teavet teie seadme praeguse oleku kohta, et saata see meilisõnumina. Enne kui saate veaaruande ära saata, võtab selle loomine natuke aega; varuge kannatust."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Interakt. aruanne"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Valige juhtmevaba silumise keelamiseks."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Testrakendirežiim on lubatud"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Testrakendirežiimi keelamiseks taastage tehaseseaded."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Vale HSUM-i järgu seadistus"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"Selle seadme kasutajaliideseta süsteemikasutaja režiimi olek erineb selle järgu seadistusest. Lähtestage seade tehaseseadetele."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Seeriakonsool on lubatud"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"See mõjutab toimivust. Keelamiseks kontrollige käivituslaadurit."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"Katseline MTE on lubatud"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Helitugevuse klahve hoiti all. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> lülitati sisse."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Helitugevuse klahve hoiti all. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> lülitati välja."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Vabastage helitugevuse klahvid. Teenuse <xliff:g id="SERVICE_NAME">%1$s</xliff:g> sisselülitamiseks vajutage uuesti mõlemat helitugevuse klahvi ja hoidke neid 3 sekundit all."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Valige funktsioon"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Valige funktsioon"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Valige funktsioon"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"Funktsioon avaneb järgmine kord, kui puudutate juurdepääsetavuse nuppu"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"Funktsioon avaneb järgmine kord, kui kasutate seda otseteed. Tõmmake kahe sõrmega ekraani allservast üles ja vabastage kiiresti."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"Funktsioon avaneb järgmine kord, kui kasutate seda otseteed. Tõmmake kolme sõrmega ekraani allservast üles ja vabastage kiiresti."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Suurendus"</string>
<string name="user_switched" msgid="7249833311585228097">"Praegune kasutaja <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"Üleminek kasutajale <xliff:g id="NAME">%1$s</xliff:g> ..."</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"PIN-kood on liiga lühike. Peab olema vähemalt 4-kohaline."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Proovige hiljem uuesti"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Kuvamine täisekraanil"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Väljumiseks pühkige ekraanikuva ülaosast alla"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"Selge"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Pöörake parema vaate jaoks"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Parema vaate jaoks avage rakendus <xliff:g id="NAME">%s</xliff:g> täisekraanil"</string>
@@ -2436,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Tööpõhimõtted"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Ootel …"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Seadistage sõrmejäljega avamine uuesti"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"Sõrmejälge <xliff:g id="FINGERPRINT">%s</xliff:g> ei saa enam tuvastada."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"Sõrmejälgi <xliff:g id="FINGERPRINT_0">%1$s</xliff:g> ja <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> ei saa enam tuvastada."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"Sõrmejälge <xliff:g id="FINGERPRINT">%s</xliff:g> ei saa enam tuvastada. Seadistage sõrmejäljega avamine uuesti."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"Sõrmejälgi <xliff:g id="FINGERPRINT_0">%1$s</xliff:g> ja <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> ei saa enam tuvastada. Seadistage sõrmejäljega avamine uuesti."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Seadistage näoga avamine uuesti"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Teie näomudelit ei saa enam tuvastada. Seadistage näoga avamine uuesti."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Seadista"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Mitte praegu"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Äratus kasutajale <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Vaheta kasutajat"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Vaigista"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Puudutage heli vaigistamiseks"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-eu/strings.xml b/core/res/res/values-eu/strings.xml
index 16b956ec1e98..58192893b337 100644
--- a/core/res/res/values-eu/strings.xml
+++ b/core/res/res/values-eu/strings.xml
@@ -265,14 +265,12 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Akatsen txostena"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Amaitu saioa"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Pantaila-argazkia"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Akatsen txostena"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Gailuaren oraingo egoerari buruzko informazioa bilduko da, mezu elektroniko gisa bidaltzeko. Minutu batzuk igaroko dira akatsen txostena sortzen hasten denetik bidaltzeko prest egon arte. Itxaron, mesedez."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Txosten dinamikoa"</string>
<string name="bugreport_option_interactive_summary" msgid="8493795476325339542">"Aukera hau erabili beharko zenuke ia beti. Txostenaren jarraipena egin ahal izango duzu eta arazoari buruzko xehetasunak eman ahal izango dituzu. Baliteke gutxitan erabili behar izaten diren atalak ez agertzea, denbora aurrezteko."</string>
<string name="bugreport_option_full_title" msgid="7681035745950045690">"Txosten osoa"</string>
- <string name="bugreport_option_full_summary" msgid="1975130009258435885">"Erabili aukera hau sisteman ahalik eta traba gutxien eragiteko gailuak erantzuten ez duenean, mantsoegi dabilenean edo txosteneko atal guztiak behar dituzunean. Ez dizu uzten xehetasun gehiago idazten, ezta beste pantaila-argazkirik ateratzen ere."</string>
+ <string name="bugreport_option_full_summary" msgid="1975130009258435885">"Erabili aukera hau sistemaren interferentzia ahalik eta txikiena izateko gailuak erantzuten ez duenean, mantsoegi dabilenean edo txosteneko atal guztiak behar dituzunean. Ez dizu uzten xehetasun gehiago idazten, ezta beste pantaila-argazkirik ateratzen ere."</string>
<string name="bugreport_countdown" msgid="6418620521782120755">"{count,plural, =1{Akatsen txostenerako argazkia aterako da # segundo barru.}other{Akatsen txostenerako argazkia aterako da # segundo barru.}}"</string>
<string name="bugreport_screenshot_success_toast" msgid="7986095104151473745">"Pantaila-argazkia egin da akatsen txostenarekin"</string>
<string name="bugreport_screenshot_failure_toast" msgid="6736320861311294294">"Ezin izan da egin pantaila-argazkia akatsen txostenarekin"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Hautatu hau hari gabeko arazketa desgaitzeko."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Proba-materialeko modua gaitu da"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Proba-materialaren modua desgaitzeko, berrezarri jatorrizko datuak."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Interfaze grafikorik gabeko sistema-erabiltzaile moduaren konpilazioaren konfigurazioa ez da zuzena"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"Gailu honen interfaze grafikorik gabeko sistema-erabiltzaile moduaren egoera ez dator bat haren konpilazioaren konfigurazioarekin. Berrezarri gailuko jatorrizko datuak."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Serie-kontsola gaituta"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Errendimenduari eragiten dio. Desgaitzeko, joan abiarazlera."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"MTE esperimentala gaituta dago"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Bolumen-botoiak sakatuta eduki direnez, <xliff:g id="SERVICE_NAME">%1$s</xliff:g> aktibatu egin da."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Bolumen-botoiak sakatuta eduki direnez, <xliff:g id="SERVICE_NAME">%1$s</xliff:g> desaktibatu egin da."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Askatu bolumen-botoiak. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> aktibatzeko, eduki sakatuta berriro bi bolumen-botoiak hiru segundoz."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Aukeratu eginbide bat"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Aukeratu eginbide bat"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Aukeratu eginbide bat"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"Erabilerraztasuna botoia sakatzen duzun hurrengoan irekiko da eginbidea"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"Lasterbidea erabiltzen duzun hurrengoan irekiko da eginbidea. Pasatu 2 hatz pantailaren behealdetik gorantz eta askatu bizkor."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"Lasterbidea erabiltzen duzun hurrengoan irekiko da eginbidea. Pasatu 3 hatz pantailaren behealdetik gorantz eta askatu bizkor."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Lupa"</string>
<string name="user_switched" msgid="7249833311585228097">"Erabiltzailea: <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"\"<xliff:g id="NAME">%1$s</xliff:g>\" erabiltzailera aldatzen…"</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"PINa laburregia da. Lau digitu izan behar ditu gutxienez."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Saiatu berriro geroago"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Pantaila osoko ikuspegia"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Irteteko, pasatu hatza pantailaren goialdetik beherantz"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"Ados"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Biratu pantaila ikuspegi hobea lortzeko"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Ireki <xliff:g id="NAME">%s</xliff:g> pantaila osoan eta ikuspegi hobea lortuko duzu"</string>
@@ -2436,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Nola funtzionatzen du?"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Zain…"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Konfiguratu berriro hatz-marka bidez desblokeatzeko eginbidea"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> ez da ezagutzen jada."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> eta <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> ez dira ezagutzen jada."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> ez da ezagutzen jada. Konfiguratu berriro hatz-marka bidez desblokeatzeko eginbidea."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> eta <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> ez dira ezagutzen jada. Konfiguratu berriro hatz-marka bidez desblokeatzeko eginbidea."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Konfiguratu berriro aurpegi bidez desblokeatzeko eginbidea"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Zure aurpegi-eredua ez da ezagutzen jada. Konfiguratu berriro aurpegi bidez desblokeatzeko eginbidea."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Konfiguratu"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Orain ez"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"<xliff:g id="USER_NAME">%s</xliff:g> erabiltzailearentzako alarma"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Aldatu erabiltzailea"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Desaktibatu audioa"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Sakatu audioa desaktibatzeko"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-fa/strings.xml b/core/res/res/values-fa/strings.xml
index 71e776053403..7a08af6b5184 100644
--- a/core/res/res/values-fa/strings.xml
+++ b/core/res/res/values-fa/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"گزارش اشکال"</string>
<string name="global_action_logout" msgid="6093581310002476511">"پایان جلسه"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"نماگرفت"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"گزارش اشکال"</string>
<string name="bugreport_message" msgid="5212529146119624326">"این گزارش اطلاعات مربوط به وضعیت دستگاه کنونی شما را جمع‌آوری می‌کند تا به‌صورت پیام ایمیل ارسال شود. از زمان شروع گزارش اشکال تا آماده شدن برای ارسال اندکی زمان می‌برد؛ لطفاً کمی صبر کنید."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"گزارش تعاملی"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"برای غیرفعال کردن اشکال‌زدایی بی‌سیم انتخاب کنید."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"«حالت مجموعه داده‌های تست» فعال شد"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"برای غیرفعال کردن «حالت مجموعه داده‌های تست»، بازنشانی کارخانه‌ای کنید."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"‏پیکربندی ساخت HSUM اشتباه است"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"وضعیت «حالت کاربر سیستم بی‌سر» در این دستگاه با پیکربندی ساخت متفاوت است. لطفاً دستگاه را بازنشانی کارخانه‌ای کنید."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"کنسول سریال فعال است"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"‏عملکرد تحت‌تأثیر قرار گرفته است. برای غیرفعال کردن، bootloader را بررسی کنید."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"‏MTE آزمایشی فعال شد"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"کلیدهای میزان صدا پایین نگه داشته شد. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> روشن شد."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"کلیدهای میزان صدا پایین نگه داشته شد. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> خاموش شد."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"کلیدهای میزان صدا را رها کنید. برای روشن کردن <xliff:g id="SERVICE_NAME">%1$s</xliff:g>، هر دو کلید میزان صدا را مجدداً به‌مدت ۳ ثانیه فشار دهید و نگه دارید."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"انتخاب ویژگی"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"انتخاب ویژگی"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"انتخاب ویژگی"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"دفعه بعد که روی دکمه دسترس‌پذیری تک‌ضرب بزنید، این ویژگی باز می‌شود"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"دفعه بعد که از این میان‌بر استفاده کنید، این ویژگی باز می‌شود. با ۲ انگشت از پایین صفحه تند به بالا بکشید و سریع رها کنید."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"دفعه بعد که از این میان‌بر استفاده کنید، این ویژگی باز می‌شود. با ۳ انگشت از پایین صفحه تند به بالا بکشید و سریع رها کنید."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"درشت‌نمایی"</string>
<string name="user_switched" msgid="7249833311585228097">"کاربر کنونی <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"در حالت تغییر به <xliff:g id="NAME">%1$s</xliff:g>…"</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"پین بیش از حد کوتاه است. باید حداقل ۴ رقم باشد."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"بعداً دوباره امتحان کنید"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"مشاهده در حالت تمام صفحه"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"برای خروج، از بالای صفحه تند به پایین بکشید"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"متوجه شدم"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"برای دید بهتر، دستگاه را بچرخانید"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"برای دید بهتر، <xliff:g id="NAME">%s</xliff:g> را به‌صورت تمام‌صفحه باز کنید"</string>
@@ -2432,25 +2421,38 @@
<string name="screen_not_shared_sensitive_content" msgid="7058419185079565001">"به‌دلایل امنیتی، محتوای برنامه پس‌از هم‌رسانی صفحه‌نمایش پنهان می‌شود"</string>
<string name="satellite_notification_title" msgid="4026338973463121526">"به‌طور خودکار به ماهواره متصل شد"</string>
<string name="satellite_notification_summary" msgid="5207364139430767162">"‏می‌توانید بدون شبکه تلفن همراه یا Wi-Fi پیام ارسال و دریافت کنید"</string>
- <string name="satellite_notification_open_message" msgid="4149234979688273729">"باز کردن «پیام‌ها»"</string>
+ <string name="satellite_notification_open_message" msgid="4149234979688273729">"باز کردن «پیام‌نگار»"</string>
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"روش کار"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"درحال تعلیق…"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"راه‌اندازی مجدد «قفل‌گشایی با اثر انگشت»"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"‫<xliff:g id="FINGERPRINT">%s</xliff:g> دیگر قابل‌شناسایی نیست."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"‫<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> و <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> دیگر قابل‌شناسایی نیستند."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"‫<xliff:g id="FINGERPRINT">%s</xliff:g> دیگر قابل‌شناسایی نیست. «قفل‌گشایی با اثر انگشت» را دوباره راه‌اندازی کنید."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"‫<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> و <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> دیگر قابل‌شناسایی نیستند. «قفل‌گشایی با اثر انگشت» را دوباره راه‌اندازی کنید."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"راه‌اندازی مجدد «قفل‌گشایی با چهره»"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"مدل چهره‌تان دیگر قابل‌شناسایی نیست. «قفل‌گشایی با چهره» را دوباره راه‌اندازی کنید."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"راه‌اندازی"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"حالا نه"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"زنگ ساعت <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"تغییر کاربر"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"بی‌صدا کردن"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"برای بی‌صدا کردن تک‌ضرب بزنید"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-fi/strings.xml b/core/res/res/values-fi/strings.xml
index e881a4cf29e0..8393e9a2697e 100644
--- a/core/res/res/values-fi/strings.xml
+++ b/core/res/res/values-fi/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Virheraportti"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Lopeta käyttökerta"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Kuvakaappaus"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Virheraportti"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Toiminto kerää tietoja laitteen tilasta ja lähettää ne sähköpostitse. Virheraportti on valmis lähetettäväksi hetken kuluttua - kiitos kärsivällisyydestäsi."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Interaktiivinen"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Poista langaton virheenkorjaus käytöstä valitsemalla tämä."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Testikehystila käytössä"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Palauta tehdasasetukset, niin voit poistaa testikehystilan käytöstä."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Väärä HSUM-koontiversiomääritys"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"Tämän laitteen järjestelmäkäyttäjän tila eroaa koontiversiomäärityksestä. Palauta laitteen tehdasasetukset."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Sarjakonsoli käytössä"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Tämä vaikuttaa suorituskykyyn. Jos haluat poistaa toiminnon käytöstä, tarkista käynnistysohjelma."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"Kokeellinen MTE käytössä"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Äänenvoimakkuuspainikkeita painettiin pitkään. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> laitettiin päälle."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Äänenvoimakkuuspainikkeita painettiin pitkään. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> laitettiin pois päältä."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Vapauta äänenvoimakkuuspainikkeet. Laita <xliff:g id="SERVICE_NAME">%1$s</xliff:g> päälle painamalla äänenvoimakkuuspainikkeita uudelleen kolmen sekunnin ajan."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Valitse ominaisuus"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Valitse ominaisuus"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Valitse ominaisuus"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"Ominaisuus avautuu, kun seuraavan kerran napautat saavutettavuuspainiketta"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"Ominaisuus avautuu, kun seuraavan kerran käytät tätä pikakomentoa. Pyyhkäise näytön alareunasta ylös kahdella sormella ja nosta sormet näytöltä nopeasti."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"Ominaisuus avautuu, kun seuraavan kerran käytät tätä pikakomentoa. Pyyhkäise näytön alareunasta ylös kolmella sormella ja nosta sormet näytöltä nopeasti."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Suurennus"</string>
<string name="user_switched" msgid="7249833311585228097">"Nykyinen käyttäjä: <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"Vaihdetaan käyttäjään <xliff:g id="NAME">%1$s</xliff:g>…"</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"PIN-koodi on liian lyhyt. Vähimmäispituus on neljä merkkiä."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Yritä myöhemmin uudelleen"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Koko ruudun tilassa"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Poistu pyyhkäisemällä alas näytön yläreunasta"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"Selvä"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Kierrä, niin saat paremman näkymän"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Avaa <xliff:g id="NAME">%s</xliff:g>, niin saat paremman näkymän"</string>
@@ -2436,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Näin se toimii"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Odottaa…"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Ota sormenjälkiavaus uudelleen käyttöön"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> ei enää ole tunnistettavissa."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> ja <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> eivät enää ole tunnistettavissa."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> ei enää ole tunnistettavissa. Ota sormenjälkiavaus uudelleen käyttöön."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> ja <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> eivät enää ole tunnistettavissa. Ota sormenjälkiavaus uudelleen käyttöön."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Ota kasvojentunnistusavaus uudelleen käyttöön"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Kasvomallia ei enää tunnisteta. Ota kasvojentunnistusavaus uudelleen käyttöön."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Ota käyttöön"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Ei nyt"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Hälytys: <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Vaihda käyttäjää"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Mykistä"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Mykistä äänet napauttamalla"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-fr-rCA/strings.xml b/core/res/res/values-fr-rCA/strings.xml
index f5fc6039c636..a0f8ec017e64 100644
--- a/core/res/res/values-fr-rCA/strings.xml
+++ b/core/res/res/values-fr-rCA/strings.xml
@@ -198,7 +198,7 @@
<string name="ssl_ca_cert_noti_by_administrator" msgid="4564941950768783879">"Par l\'administrateur de votre profil professionnel"</string>
<string name="ssl_ca_cert_noti_managed" msgid="217337232273211674">"Par <xliff:g id="MANAGING_DOMAIN">%s</xliff:g>"</string>
<string name="work_profile_deleted" msgid="5891181538182009328">"Profil professionnel supprimé"</string>
- <string name="work_profile_deleted_details" msgid="3773706828364418016">"Le profil professionnel de l\'application d\'administration est manquant ou corrompu. Votre profil professionnel et ses données connexes ont donc été supprimés. Communiquez avec votre administrateur pour obtenir de l\'assistance."</string>
+ <string name="work_profile_deleted_details" msgid="3773706828364418016">"Le profil professionnel de l\'appli d\'administration est manquant ou corrompu. Votre profil professionnel et ses données connexes ont donc été supprimés. Communiquez avec votre administrateur pour obtenir de l\'assistance."</string>
<string name="work_profile_deleted_description_dpm_wipe" msgid="2477244968924647232">"Votre profil professionnel n\'est plus accessible sur cet appareil"</string>
<string name="work_profile_deleted_reason_maximum_password_failure" msgid="1080323158315663167">"Trop de tentatives d\'entrée du mot de passe"</string>
<string name="device_ownership_relinquished" msgid="4080886992183195724">"L\'administrateur a libéré l\'appareil pour un usage personnel"</string>
@@ -206,7 +206,7 @@
<string name="private_space_deleted_by_admin_details" msgid="7007781735201818689">"Votre organisation n\'autorise pas les espaces privés sur cet appareil géré."</string>
<string name="network_logging_notification_title" msgid="554983187553845004">"L\'appareil est géré"</string>
<string name="network_logging_notification_text" msgid="1327373071132562512">"Votre organisation gère cet appareil et peut surveiller le trafic réseau. Touchez ici pour obtenir plus d\'information."</string>
- <string name="location_changed_notification_title" msgid="3620158742816699316">"Les applications peuvent accéder à votre position"</string>
+ <string name="location_changed_notification_title" msgid="3620158742816699316">"Les applis peuvent accéder à votre position"</string>
<string name="location_changed_notification_text" msgid="7158423339982706912">"Communiquez avec votre administrateur informatique pour en savoir plus"</string>
<string name="geofencing_service" msgid="3826902410740315456">"Service de définition de limites géographiques"</string>
<string name="country_detector" msgid="7023275114706088854">"Détecteur de pays"</string>
@@ -218,14 +218,14 @@
<string name="device_policy_manager_service" msgid="5085762851388850332">"Service de gestionnaire Device Policy"</string>
<string name="music_recognition_manager_service" msgid="7481956037950276359">"Service de gestion de la reconnaissance musicale"</string>
<string name="factory_reset_warning" msgid="6858705527798047809">"Le contenu de votre appareil sera effacé"</string>
- <string name="factory_reset_message" msgid="2657049595153992213">"Impossible d\'utiliser l\'application d\'administration. Les données de votre appareil vont maintenant être effacées.\n\nSi vous avez des questions, communiquez avec l\'administrateur de votre organisation."</string>
+ <string name="factory_reset_message" msgid="2657049595153992213">"Impossible d\'utiliser l\'appli d\'administration. Les données de votre appareil vont maintenant être effacées.\n\nSi vous avez des questions, communiquez avec l\'administrateur de votre organisation."</string>
<string name="printing_disabled_by" msgid="3517499806528864633">"Impression désactivée par <xliff:g id="OWNER_APP">%s</xliff:g>."</string>
<string name="personal_apps_suspension_title" msgid="7561416677884286600">"Activer profil professionnel"</string>
- <string name="personal_apps_suspension_text" msgid="6115455688932935597">"Vos applications personnelles sont bloquées jusqu\'à ce que vous activiez votre profil professionnel"</string>
- <string name="personal_apps_suspension_soon_text" msgid="8123898693479590">"Les applications personnelles seront bloquées le <xliff:g id="DATE">%1$s</xliff:g> à <xliff:g id="TIME">%2$s</xliff:g>. Votre administrateur informatique ne vous autorise pas à laisser votre profil professionnel désactivé pendant plus de <xliff:g id="NUMBER">%3$d</xliff:g> jours."</string>
+ <string name="personal_apps_suspension_text" msgid="6115455688932935597">"Vos applis personnelles sont bloquées jusqu\'à ce que vous activiez votre profil professionnel"</string>
+ <string name="personal_apps_suspension_soon_text" msgid="8123898693479590">"Les applis personnelles seront bloquées le <xliff:g id="DATE">%1$s</xliff:g> à <xliff:g id="TIME">%2$s</xliff:g>. Votre administrateur informatique ne vous autorise pas à laisser votre profil professionnel désactivé pendant plus de <xliff:g id="NUMBER">%3$d</xliff:g> jours."</string>
<string name="personal_apps_suspended_turn_profile_on" msgid="2758012869627513689">"Activer"</string>
<string name="work_profile_telephony_paused_title" msgid="7690804479291839519">"Les appels et messages sont désactivés"</string>
- <string name="work_profile_telephony_paused_text" msgid="8065762301100978221">"Vous avez mis en pause les applications professionnelles. Vous ne recevrez aucun appel téléphonique ni message texte."</string>
+ <string name="work_profile_telephony_paused_text" msgid="8065762301100978221">"Vous avez mis en pause les applis professionnelles. Vous ne recevrez aucun appel téléphonique ni message texte."</string>
<string name="work_profile_telephony_paused_turn_on_button" msgid="7542632318337068821">"Réact. applis pros"</string>
<string name="me" msgid="6207584824693813140">"Moi"</string>
<string name="power_dialog" product="tablet" msgid="8333207765671417261">"Options de la tablette"</string>
@@ -252,7 +252,7 @@
<string name="shutdown_confirm" product="default" msgid="136816458966692315">"Votre téléphone va s\'éteindre."</string>
<string name="shutdown_confirm_question" msgid="796151167261608447">"Voulez-vous éteindre l\'appareil?"</string>
<string name="reboot_safemode_title" msgid="5853949122655346734">"Redémarrer en mode sans échec"</string>
- <string name="reboot_safemode_confirm" msgid="1658357874737219624">"Voulez-vous redémarrer en mode sans échec? Cette opération aura pour effet de désactiver toutes les applications tierces que vous avez installées. Elles seront réactivées au prochain redémarrage."</string>
+ <string name="reboot_safemode_confirm" msgid="1658357874737219624">"Voulez-vous redémarrer en mode sans échec? Cette opération aura pour effet de désactiver toutes les applis tierces que vous avez installées. Elles seront réactivées au prochain redémarrage."</string>
<string name="recent_tasks_title" msgid="8183172372995396653">"Récents"</string>
<string name="no_recent_tasks" msgid="9063946524312275906">"Aucune appli récente"</string>
<string name="global_actions" product="tablet" msgid="4412132498517933867">"Options de la tablette"</string>
@@ -266,8 +266,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Rapport de bogue"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Fermer la session"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Capture d\'écran"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Rapport de bogue"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Cela permet de recueillir des informations concernant l\'état actuel de votre appareil. Ces informations sont ensuite envoyées sous forme de courriel. Merci de patienter pendant la préparation du rapport de bogue. Cette opération peut prendre quelques instants."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Rapport interactif"</string>
@@ -305,13 +303,13 @@
<string name="notification_channel_alerts" msgid="5070241039583668427">"Alertes"</string>
<string name="notification_channel_retail_mode" msgid="3732239154256431213">"Démo en magasin"</string>
<string name="notification_channel_usb" msgid="1528280969406244896">"Connexion USB"</string>
- <string name="notification_channel_heavy_weight_app" msgid="17455756500828043">"Application en cours d\'exécution"</string>
- <string name="notification_channel_foreground_service" msgid="7102189948158885178">"Applications qui sollicitent la pile"</string>
+ <string name="notification_channel_heavy_weight_app" msgid="17455756500828043">"Appli en cours d\'exécution"</string>
+ <string name="notification_channel_foreground_service" msgid="7102189948158885178">"Applis qui sollicitent la pile"</string>
<string name="notification_channel_accessibility_magnification" msgid="1707913872219798098">"Agrandissement"</string>
<string name="notification_channel_accessibility_security_policy" msgid="1727787021725251912">"Usage des fonctionnalités d\'accessibilité"</string>
<string name="notification_channel_display" msgid="6905032605735615090">"Écran"</string>
<string name="foreground_service_app_in_background" msgid="1439289699671273555">"<xliff:g id="APP_NAME">%1$s</xliff:g> sollicite la pile"</string>
- <string name="foreground_service_apps_in_background" msgid="7340037176412387863">"<xliff:g id="NUMBER">%1$d</xliff:g> applications sollicitent la pile"</string>
+ <string name="foreground_service_apps_in_background" msgid="7340037176412387863">"<xliff:g id="NUMBER">%1$d</xliff:g> applis sollicitent la pile"</string>
<string name="foreground_service_tap_for_details" msgid="9078123626015586751">"Touchez pour afficher des détails sur l\'utilisation de la pile et des données"</string>
<string name="foreground_service_multiple_separator" msgid="5002287361849863168">"<xliff:g id="LEFT_SIDE">%1$s</xliff:g>, <xliff:g id="RIGHT_SIDE">%2$s</xliff:g>"</string>
<string name="safeMode" msgid="8974401416068943888">"Mode sans échec"</string>
@@ -367,282 +365,282 @@
<string name="dream_preview_title" msgid="5570751491996100804">"Aperçu, <xliff:g id="DREAM_NAME">%1$s</xliff:g>"</string>
<string name="dream_accessibility_action_click" msgid="7392398629967797805">"Ignorer"</string>
<string name="permlab_statusBar" msgid="8798267849526214017">"désactiver ou modifier la barre d\'état"</string>
- <string name="permdesc_statusBar" msgid="5809162768651019642">"Permet à l\'application de désactiver la barre d\'état, ou d\'ajouter et de supprimer des icônes système."</string>
+ <string name="permdesc_statusBar" msgid="5809162768651019642">"Permet à l\'appli de désactiver la barre d\'état, ou d\'ajouter et de supprimer des icônes système."</string>
<string name="permlab_statusBarService" msgid="2523421018081437981">"servir de barre d\'état"</string>
- <string name="permdesc_statusBarService" msgid="6652917399085712557">"Permet à l\'application de faire office de barre d\'état."</string>
+ <string name="permdesc_statusBarService" msgid="6652917399085712557">"Permet à l\'appli de faire office de barre d\'état."</string>
<string name="permlab_expandStatusBar" msgid="1184232794782141698">"agrandir ou réduire la barre d\'état"</string>
- <string name="permdesc_expandStatusBar" msgid="7180756900448498536">"Permet à l\'application de réduire ou de développer la barre d\'état."</string>
+ <string name="permdesc_expandStatusBar" msgid="7180756900448498536">"Permet à l\'appli de réduire ou de développer la barre d\'état."</string>
<string name="permlab_fullScreenIntent" msgid="4310888199502509104">"afficher les notifications en mode plein écran sur un appareil verrouillé"</string>
- <string name="permdesc_fullScreenIntent" msgid="1100721419406643997">"Permet à l\'application d\'afficher les notifications en mode plein écran sur un appareil verrouillé."</string>
+ <string name="permdesc_fullScreenIntent" msgid="1100721419406643997">"Permet à l\'appli d\'afficher les notifications en mode plein écran sur un appareil verrouillé."</string>
<string name="permlab_install_shortcut" msgid="7451554307502256221">"Installer des raccourcis"</string>
- <string name="permdesc_install_shortcut" msgid="4476328467240212503">"Permet à une application d\'ajouter des raccourcis sans l\'intervention de l\'utilisateur."</string>
+ <string name="permdesc_install_shortcut" msgid="4476328467240212503">"Permet à une appli d\'ajouter des raccourcis sans l\'intervention de l\'utilisateur."</string>
<string name="permlab_uninstall_shortcut" msgid="295263654781900390">"désinstaller des raccourcis"</string>
- <string name="permdesc_uninstall_shortcut" msgid="1924735350988629188">"Permet à l\'application de supprimer des raccourcis de la page d\'accueil sans intervention de l\'utilisateur."</string>
+ <string name="permdesc_uninstall_shortcut" msgid="1924735350988629188">"Permet à l\'appli de supprimer des raccourcis de la page d\'accueil sans intervention de l\'utilisateur."</string>
<string name="permlab_processOutgoingCalls" msgid="4075056020714266558">"transférer les appels sortants"</string>
- <string name="permdesc_processOutgoingCalls" msgid="7833149750590606334">"Permet à l\'application de lire le numéro composé lors d\'un appel sortant et lui donne la possibilité de rediriger l\'appel vers un autre numéro ou d\'abandonner l\'appel."</string>
+ <string name="permdesc_processOutgoingCalls" msgid="7833149750590606334">"Permet à l\'appli de lire le numéro composé lors d\'un appel sortant et lui donne la possibilité de rediriger l\'appel vers un autre numéro ou d\'abandonner l\'appel."</string>
<string name="permlab_answerPhoneCalls" msgid="4131324833663725855">"répondre aux appels téléphoniques"</string>
- <string name="permdesc_answerPhoneCalls" msgid="894386681983116838">"Permet à l\'application de répondre aux appels entrants."</string>
+ <string name="permdesc_answerPhoneCalls" msgid="894386681983116838">"Permet à l\'appli de répondre aux appels entrants."</string>
<string name="permlab_receiveSms" msgid="505961632050451881">"recevoir des messages texte"</string>
- <string name="permdesc_receiveSms" msgid="1797345626687832285">"Permet à l\'application de recevoir et de traiter les messages texte. Cette autorisation lui donne la possibilité de surveiller ou de supprimer les messages envoyés à votre appareil sans vous les montrer."</string>
+ <string name="permdesc_receiveSms" msgid="1797345626687832285">"Permet à l\'appli de recevoir et de traiter les messages texte. Cette autorisation lui donne la possibilité de surveiller ou de supprimer les messages envoyés à votre appareil sans vous les montrer."</string>
<string name="permlab_receiveMms" msgid="4000650116674380275">"recevoir des messages multimédias"</string>
- <string name="permdesc_receiveMms" msgid="958102423732219710">"Permet à l\'application de recevoir et de traiter les messages multimédias. Cette autorisation lui donne la possibilité de surveiller ou de supprimer les messages envoyés à votre appareil sans vous les montrer."</string>
+ <string name="permdesc_receiveMms" msgid="958102423732219710">"Permet à l\'appli de recevoir et de traiter les messages multimédias. Cette autorisation lui donne la possibilité de surveiller ou de supprimer les messages envoyés à votre appareil sans vous les montrer."</string>
<string name="permlab_bindCellBroadcastService" msgid="586746677002040651">"Transférer les messages de diffusion cellulaire"</string>
- <string name="permdesc_bindCellBroadcastService" msgid="6540910200973641606">"Permet à l\'application d\'établir un lien avec le module de diffusion cellulaire afin de transférer les messages de diffusion cellulaire à mesure de leur réception. Dans certaines régions, des alertes de diffusion cellulaire sont envoyées afin de vous avertir de situations d\'urgence. Des applications malveillantes peuvent interférer avec les performances ou le fonctionnement de votre appareil lors de la réception d\'une alerte d\'urgence par diffusion cellulaire."</string>
+ <string name="permdesc_bindCellBroadcastService" msgid="6540910200973641606">"Permet à l\'appli d\'établir un lien avec le module de diffusion cellulaire afin de transférer les messages de diffusion cellulaire à mesure de leur réception. Dans certaines régions, des alertes de diffusion cellulaire sont envoyées afin de vous avertir de situations d\'urgence. Des applis malveillantes peuvent interférer avec les performances ou le fonctionnement de votre appareil lors de la réception d\'une alerte d\'urgence par diffusion cellulaire."</string>
<string name="permlab_manageOngoingCalls" msgid="281244770664231782">"Gérer les appels en cours"</string>
- <string name="permdesc_manageOngoingCalls" msgid="7003138133829915265">"Autorise une application à afficher les renseignements concernant les appels en cours sur votre appareil et à les gérer."</string>
+ <string name="permdesc_manageOngoingCalls" msgid="7003138133829915265">"Autorise une appli à afficher les renseignements concernant les appels en cours sur votre appareil et à les gérer."</string>
<string name="permlab_accessLastKnownCellId" msgid="7638226620825665130">"Accéder à la dernière identité cellulaire connue."</string>
- <string name="permdesc_accessLastKnownCellId" msgid="6664621339249308857">"Autorise une application à accéder à la dernière identité cellulaire connue fournie par la téléphonie."</string>
+ <string name="permdesc_accessLastKnownCellId" msgid="6664621339249308857">"Autorise une appli à accéder à la dernière identité cellulaire connue fournie par la téléphonie."</string>
<string name="permlab_readCellBroadcasts" msgid="5869884450872137693">"lire les messages de diffusion cellulaire"</string>
- <string name="permdesc_readCellBroadcasts" msgid="672513437331980168">"Permet à l\'application de lire les messages de diffusion cellulaire que votre appareil reçoit. Dans certaines zones géographiques, des alertes vous sont envoyées afin de vous prévenir en cas de situation d\'urgence. Des applications malveillantes peuvent venir perturber les performances ou le fonctionnement de votre appareil lors de la réception d\'un message de diffusion cellulaire."</string>
+ <string name="permdesc_readCellBroadcasts" msgid="672513437331980168">"Permet à l\'appli de lire les messages de diffusion cellulaire que votre appareil reçoit. Dans certaines zones géographiques, des alertes vous sont envoyées afin de vous prévenir en cas de situation d\'urgence. Des applis malveillantes peuvent venir perturber les performances ou le fonctionnement de votre appareil lors de la réception d\'un message de diffusion cellulaire."</string>
<string name="permlab_subscribedFeedsRead" msgid="217624769238425461">"lire les flux auxquels vous êtes abonné"</string>
- <string name="permdesc_subscribedFeedsRead" msgid="6911349196661811865">"Permet à l\'application d\'obtenir des données sur les flux en cours de synchronisation."</string>
+ <string name="permdesc_subscribedFeedsRead" msgid="6911349196661811865">"Permet à l\'appli d\'obtenir des données sur les flux en cours de synchronisation."</string>
<string name="permlab_sendSms" msgid="7757368721742014252">"envoyer et afficher des messages texte"</string>
- <string name="permdesc_sendSms" msgid="6757089798435130769">"Permet à l\'application d\'envoyer des messages texte. Cette autorisation peut entraîner des frais inattendus. Des applications malveillantes peuvent générer des frais en envoyant des messages sans votre consentement."</string>
+ <string name="permdesc_sendSms" msgid="6757089798435130769">"Permet à l\'appli d\'envoyer des messages texte. Cette autorisation peut entraîner des frais inattendus. Des applis malveillantes peuvent générer des frais en envoyant des messages sans votre consentement."</string>
<string name="permlab_readSms" msgid="5164176626258800297">"voir les messages texte ou multimédias"</string>
- <string name="permdesc_readSms" product="tablet" msgid="7912990447198112829">"Cette application peut lire tous les messages texte stockés sur votre tablette."</string>
- <string name="permdesc_readSms" product="tv" msgid="3054753345758011986">"Cette application peut lire tous les messages texte stockés sur votre appareil Android TV."</string>
- <string name="permdesc_readSms" product="default" msgid="774753371111699782">"Cette application peut lire tous les messages texte stockés sur votre téléphone."</string>
+ <string name="permdesc_readSms" product="tablet" msgid="7912990447198112829">"Cette appli peut lire tous les messages texte stockés sur votre tablette."</string>
+ <string name="permdesc_readSms" product="tv" msgid="3054753345758011986">"Cette appli peut lire tous les messages texte stockés sur votre appareil Android TV."</string>
+ <string name="permdesc_readSms" product="default" msgid="774753371111699782">"Cette appli peut lire tous les messages texte stockés sur votre téléphone."</string>
<string name="permlab_receiveWapPush" msgid="4223747702856929056">"recevoir des messages WAP"</string>
- <string name="permdesc_receiveWapPush" msgid="1638677888301778457">"Permet à l\'application de recevoir et de traiter les messages WAP. Cette autorisation lui donne la possibilité de surveiller ou de supprimer les messages envoyés à votre appareil sans vous les montrer."</string>
- <string name="permlab_getTasks" msgid="7460048811831750262">"récupérer les données des applications en cours d\'exécution"</string>
- <string name="permdesc_getTasks" msgid="7388138607018233726">"Permet à l\'application de récupérer des données sur des tâches en cours d\'exécution et récemment exécutées. L\'application est ainsi susceptible d\'obtenir des données concernant les applications utilisées sur l\'appareil."</string>
+ <string name="permdesc_receiveWapPush" msgid="1638677888301778457">"Permet à l\'appli de recevoir et de traiter les messages WAP. Cette autorisation lui donne la possibilité de surveiller ou de supprimer les messages envoyés à votre appareil sans vous les montrer."</string>
+ <string name="permlab_getTasks" msgid="7460048811831750262">"récupérer les données des applis en cours d\'exécution"</string>
+ <string name="permdesc_getTasks" msgid="7388138607018233726">"Permet à l\'appli de récupérer des données sur des tâches en cours d\'exécution et récemment exécutées. L\'appli est ainsi susceptible d\'obtenir des données concernant les applis utilisées sur l\'appareil."</string>
<string name="permlab_manageProfileAndDeviceOwners" msgid="639849495253987493">"gérer les propriétaires des profils et de l\'appareil"</string>
- <string name="permdesc_manageProfileAndDeviceOwners" msgid="7304240671781989283">"Autoriser les applications à définir les propriétaires des profils et celui de l\'appareil"</string>
- <string name="permlab_reorderTasks" msgid="7598562301992923804">"réorganiser les applications en cours d\'exécution"</string>
- <string name="permdesc_reorderTasks" msgid="8796089937352344183">"Permet à l\'application de déplacer les tâches au premier plan et en arrière-plan. L\'application peut procéder à ces opérations sans votre intervention."</string>
+ <string name="permdesc_manageProfileAndDeviceOwners" msgid="7304240671781989283">"Autoriser les applis à définir les propriétaires des profils et celui de l\'appareil"</string>
+ <string name="permlab_reorderTasks" msgid="7598562301992923804">"réorganiser les applis en cours d\'exécution"</string>
+ <string name="permdesc_reorderTasks" msgid="8796089937352344183">"Permet à l\'appli de déplacer les tâches au premier plan et en arrière-plan. L\'appli peut procéder à ces opérations sans votre intervention."</string>
<string name="permlab_enableCarMode" msgid="893019409519325311">"activer le mode voiture"</string>
- <string name="permdesc_enableCarMode" msgid="56419168820473508">"Permet à l\'application d\'activer le mode Voiture."</string>
- <string name="permlab_killBackgroundProcesses" msgid="6559320515561928348">"fermer les autres applications"</string>
- <string name="permdesc_killBackgroundProcesses" msgid="2357013583055434685">"Permet à l\'application de mettre fin aux processus d\'autres applications exécutés en arrière-plan. Cette autorisation peut interrompre l\'exécution d\'autres applications."</string>
- <string name="permlab_systemAlertWindow" msgid="5757218350944719065">"Cette application peut s\'afficher par-dessus d\'autres applications"</string>
- <string name="permdesc_systemAlertWindow" msgid="1145660714855738308">"Cette application peut s\'afficher par-dessus d\'autres applications ou parties de l\'écran. Cela pourrait interférer avec l\'utilisation normale des applications et modifier la manière dont les autres applications s\'affichent à l\'écran."</string>
- <string name="permlab_hideOverlayWindows" msgid="6382697828482271802">"Masquer les superpositions d\'autres applications"</string>
- <string name="permdesc_hideOverlayWindows" msgid="5660242821651958225">"Cette application peut demander au système de masquer les superpositions provenant d\'applications, afin qu\'elles ne s\'affichent pas au-dessus de celle-ci."</string>
+ <string name="permdesc_enableCarMode" msgid="56419168820473508">"Permet à l\'appli d\'activer le mode Voiture."</string>
+ <string name="permlab_killBackgroundProcesses" msgid="6559320515561928348">"fermer les autres applis"</string>
+ <string name="permdesc_killBackgroundProcesses" msgid="2357013583055434685">"Permet à l\'appli de mettre fin aux processus d\'autres applis exécutés en arrière-plan. Cette autorisation peut interrompre l\'exécution d\'autres applis."</string>
+ <string name="permlab_systemAlertWindow" msgid="5757218350944719065">"Cette appli peut s\'afficher par-dessus d\'autres applis"</string>
+ <string name="permdesc_systemAlertWindow" msgid="1145660714855738308">"Cette appli peut s\'afficher par-dessus d\'autres applis ou parties de l\'écran. Cela pourrait interférer avec l\'utilisation normale des applis et modifier la manière dont les autres applis s\'affichent à l\'écran."</string>
+ <string name="permlab_hideOverlayWindows" msgid="6382697828482271802">"Masquer les superpositions d\'autres applis"</string>
+ <string name="permdesc_hideOverlayWindows" msgid="5660242821651958225">"Cette appli peut demander au système de masquer les superpositions provenant d\'applis, afin qu\'elles ne s\'affichent pas au-dessus de celle-ci."</string>
<string name="permlab_runInBackground" msgid="541863968571682785">"fonctionner en arrière-plan"</string>
- <string name="permdesc_runInBackground" msgid="4344539472115495141">"Cette application peut fonctionner en arrière-plan. Cela risque d\'épuiser la pile plus rapidement."</string>
+ <string name="permdesc_runInBackground" msgid="4344539472115495141">"Cette appli peut fonctionner en arrière-plan. Cela risque d\'épuiser la pile plus rapidement."</string>
<string name="permlab_useDataInBackground" msgid="783415807623038947">"utiliser des données en arrière-plan"</string>
- <string name="permdesc_useDataInBackground" msgid="1230753883865891987">"Cette application peut utiliser des données en arrière-plan. Cela risque d\'augmenter l\'utilisation des données."</string>
+ <string name="permdesc_useDataInBackground" msgid="1230753883865891987">"Cette appli peut utiliser des données en arrière-plan. Cela risque d\'augmenter l\'utilisation des données."</string>
<string name="permlab_schedule_exact_alarm" msgid="6683283918033029730">"Programmer des actions à échéance précise"</string>
- <string name="permdesc_schedule_exact_alarm" msgid="8198009212013211497">"Cette application peut programmer des tâches à effectuer ultérieurement à un moment voulu. Cela implique que l\'application peut également s\'exécuter quand vous n\'utilisez pas activement l\'appareil."</string>
+ <string name="permdesc_schedule_exact_alarm" msgid="8198009212013211497">"Cette appli peut programmer des tâches à effectuer ultérieurement à un moment voulu. Cela implique que l\'appli peut également s\'exécuter quand vous n\'utilisez pas activement l\'appareil."</string>
<string name="permlab_use_exact_alarm" msgid="348045139777131552">"Programmer des alarmes ou des rappels d\'événements"</string>
- <string name="permdesc_use_exact_alarm" msgid="7033761461886938912">"Cette application peut programmer des actions, comme des alarmes et des rappels, pour vous avertir ultérieurement à un moment voulu."</string>
- <string name="permlab_persistentActivity" msgid="464970041740567970">"exécuter l\'application en continu"</string>
- <string name="permdesc_persistentActivity" product="tablet" msgid="6055271149187369916">"Permet à l\'application de rendre certains de ces composants persistants dans la mémoire. Cette autorisation peut limiter la mémoire disponible pour d\'autres applications et ralentir la tablette."</string>
- <string name="permdesc_persistentActivity" product="tv" msgid="6800526387664131321">"Permet à l\'application de rendre certains de ses composants persistants dans la mémoire. Cette autorisation peut limiter la mémoire disponible pour d\'autres applications et ralentir l\'appareil Android TV."</string>
- <string name="permdesc_persistentActivity" product="default" msgid="1914841924366562051">"Permet à l\'application de rendre certains de ces composants persistants dans la mémoire. Cette autorisation peut limiter la mémoire disponible pour d\'autres applications et ralentir le téléphone."</string>
+ <string name="permdesc_use_exact_alarm" msgid="7033761461886938912">"Cette appli peut programmer des actions, comme des alarmes et des rappels, pour vous avertir ultérieurement à un moment voulu."</string>
+ <string name="permlab_persistentActivity" msgid="464970041740567970">"exécuter l\'appli en continu"</string>
+ <string name="permdesc_persistentActivity" product="tablet" msgid="6055271149187369916">"Permet à l\'appli de rendre certains de ces composants persistants dans la mémoire. Cette autorisation peut limiter la mémoire disponible pour d\'autres applis et ralentir la tablette."</string>
+ <string name="permdesc_persistentActivity" product="tv" msgid="6800526387664131321">"Permet à l\'appli de rendre certains de ses composants persistants dans la mémoire. Cette autorisation peut limiter la mémoire disponible pour d\'autres applis et ralentir l\'appareil Android TV."</string>
+ <string name="permdesc_persistentActivity" product="default" msgid="1914841924366562051">"Permet à l\'appli de rendre certains de ces composants persistants dans la mémoire. Cette autorisation peut limiter la mémoire disponible pour d\'autres applis et ralentir le téléphone."</string>
<string name="permlab_foregroundService" msgid="1768855976818467491">"exécuter le service en premier plan"</string>
- <string name="permdesc_foregroundService" msgid="8720071450020922795">"Permet à l\'application d\'utiliser les services en premier plan."</string>
+ <string name="permdesc_foregroundService" msgid="8720071450020922795">"Permet à l\'appli d\'utiliser les services en premier plan."</string>
<string name="permlab_foregroundServiceCamera" msgid="7814751737955715297">"exécuter le service d\'avant-plan avec le type « appareil photo »"</string>
- <string name="permdesc_foregroundServiceCamera" msgid="6973701931250595727">"Autoriser l\'application à utiliser les services d\'avant-plan avec le type « appareil photo »"</string>
+ <string name="permdesc_foregroundServiceCamera" msgid="6973701931250595727">"Autoriser l\'appli à utiliser les services d\'avant-plan avec le type « appareil photo »"</string>
<string name="permlab_foregroundServiceConnectedDevice" msgid="3019650546176872501">"exécuter le service d\'avant-plan avec le type « appareil connecté »"</string>
- <string name="permdesc_foregroundServiceConnectedDevice" msgid="1067457315741352963">"Autoriser l\'application à utiliser les services d\'avant-plan avec le type « appareil connecté »"</string>
+ <string name="permdesc_foregroundServiceConnectedDevice" msgid="1067457315741352963">"Autoriser l\'appli à utiliser les services d\'avant-plan avec le type « appareil connecté »"</string>
<string name="permlab_foregroundServiceDataSync" msgid="5847463514326881076">"exécuter le service d\'avant-plan avec le type « synchronisation des données »"</string>
- <string name="permdesc_foregroundServiceDataSync" msgid="2267140263423973050">"Autoriser l\'application à utiliser les services d\'avant-plan avec le type « synchronisation des données »"</string>
+ <string name="permdesc_foregroundServiceDataSync" msgid="2267140263423973050">"Autoriser l\'appli à utiliser les services d\'avant-plan avec le type « synchronisation des données »"</string>
<string name="permlab_foregroundServiceLocation" msgid="3745428302378535690">"exécuter le service d\'avant-plan avec le type « emplacement »"</string>
- <string name="permdesc_foregroundServiceLocation" msgid="118894034365177183">"Autoriser l\'application à utiliser les services d\'avant-plan avec le type « emplacement »"</string>
+ <string name="permdesc_foregroundServiceLocation" msgid="118894034365177183">"Autoriser l\'appli à utiliser les services d\'avant-plan avec le type « emplacement »"</string>
<string name="permlab_foregroundServiceMediaPlayback" msgid="4002687983891935514">"exécuter le service d\'avant-plan avec le type « lecture multimédia »"</string>
- <string name="permdesc_foregroundServiceMediaPlayback" msgid="3638032446063968043">"Autoriser l\'application à utiliser les services d\'avant-plan avec le type « lecture multimédia »"</string>
+ <string name="permdesc_foregroundServiceMediaPlayback" msgid="3638032446063968043">"Autoriser l\'appli à utiliser les services d\'avant-plan avec le type « lecture multimédia »"</string>
<string name="permlab_foregroundServiceMediaProjection" msgid="2630868915733312527">"exécuter le service d\'avant-plan avec le type « projection de contenus multimédias »"</string>
- <string name="permdesc_foregroundServiceMediaProjection" msgid="4805677128082002298">"Autoriser l\'application à utiliser les services d\'avant-plan avec le type « projection de contenus multimédias »"</string>
+ <string name="permdesc_foregroundServiceMediaProjection" msgid="4805677128082002298">"Autoriser l\'appli à utiliser les services d\'avant-plan avec le type « projection de contenus multimédias »"</string>
<string name="permlab_foregroundServiceMicrophone" msgid="7390033424890545399">"exécuter le service d\'avant-plan avec le type « microphone »"</string>
- <string name="permdesc_foregroundServiceMicrophone" msgid="1206041516173483201">"Autoriser l\'application à utiliser les services d\'avant-plan avec le type « microphone »"</string>
+ <string name="permdesc_foregroundServiceMicrophone" msgid="1206041516173483201">"Autoriser l\'appli à utiliser les services d\'avant-plan avec le type « microphone »"</string>
<string name="permlab_foregroundServicePhoneCall" msgid="627937743867697892">"exécuter le service d\'avant-plan avec le type « appel téléphonique »"</string>
- <string name="permdesc_foregroundServicePhoneCall" msgid="5941660252587015147">"Autoriser l\'application à utiliser les services d\'avant-plan avec le type « appel téléphonique »"</string>
+ <string name="permdesc_foregroundServicePhoneCall" msgid="5941660252587015147">"Autoriser l\'appli à utiliser les services d\'avant-plan avec le type « appel téléphonique »"</string>
<string name="permlab_foregroundServiceHealth" msgid="3675776442080928184">"exécuter le service d\'avant-plan avec le type « santé »"</string>
- <string name="permdesc_foregroundServiceHealth" msgid="2024586220562667185">"Autoriser l\'application à utiliser les services d\'avant-plan avec le type « santé »"</string>
+ <string name="permdesc_foregroundServiceHealth" msgid="2024586220562667185">"Autoriser l\'appli à utiliser les services d\'avant-plan avec le type « santé »"</string>
<string name="permlab_foregroundServiceRemoteMessaging" msgid="105670277002780950">"exécuter le service d\'avant-plan avec le type « messagerie à distance »"</string>
- <string name="permdesc_foregroundServiceRemoteMessaging" msgid="8767598075877576277">"Autoriser l\'application à utiliser les services d\'avant-plan avec le type « messagerie à distance »"</string>
+ <string name="permdesc_foregroundServiceRemoteMessaging" msgid="8767598075877576277">"Autoriser l\'appli à utiliser les services d\'avant-plan avec le type « messagerie à distance »"</string>
<string name="permlab_foregroundServiceSystemExempted" msgid="1597663713590612685">"exécuter le service d\'avant-plan avec le type « système exempté »"</string>
- <string name="permdesc_foregroundServiceSystemExempted" msgid="947381760834649622">"Autoriser l\'application à utiliser les services d\'avant-plan avec le type « système exempté »"</string>
+ <string name="permdesc_foregroundServiceSystemExempted" msgid="947381760834649622">"Autoriser l\'appli à utiliser les services d\'avant-plan avec le type « système exempté »"</string>
<string name="permlab_foregroundServiceFileManagement" msgid="2585000987966045030">"exécuter le service d\'avant-plan avec le type « fileManagement »"</string>
- <string name="permdesc_foregroundServiceFileManagement" msgid="417103601269698508">"Autorise l\'application à utiliser les services d\'avant-plan avec le type « fileManagement »"</string>
+ <string name="permdesc_foregroundServiceFileManagement" msgid="417103601269698508">"Autorise l\'appli à utiliser les services d\'avant-plan avec le type « fileManagement »"</string>
<string name="permlab_foregroundServiceMediaProcessing" msgid="3045295152245381864">"exécuter le service de premier plan avec le type « mediaProcessing »"</string>
- <string name="permdesc_foregroundServiceMediaProcessing" msgid="8303086172106677312">"Autorise l\'application à utiliser les services de premier plan avec le type « mediaProcessing »"</string>
+ <string name="permdesc_foregroundServiceMediaProcessing" msgid="8303086172106677312">"Autorise l\'appli à utiliser les services de premier plan avec le type « mediaProcessing »"</string>
<string name="permlab_foregroundServiceSpecialUse" msgid="7973536745876645082">"exécuter le service d\'avant-plan avec le type « usage spécial »"</string>
- <string name="permdesc_foregroundServiceSpecialUse" msgid="646713654541885919">"Autoriser l\'application à utiliser les services d\'avant-plan avec le type « usage spécial »"</string>
- <string name="permlab_getPackageSize" msgid="375391550792886641">"évaluer l\'espace de stockage de l\'application"</string>
- <string name="permdesc_getPackageSize" msgid="742743530909966782">"Permet à l\'application de récupérer la taille de son code, de ses données et de sa mémoire cache."</string>
+ <string name="permdesc_foregroundServiceSpecialUse" msgid="646713654541885919">"Autoriser l\'appli à utiliser les services d\'avant-plan avec le type « usage spécial »"</string>
+ <string name="permlab_getPackageSize" msgid="375391550792886641">"évaluer l\'espace de stockage de l\'appli"</string>
+ <string name="permdesc_getPackageSize" msgid="742743530909966782">"Permet à l\'appli de récupérer la taille de son code, de ses données et de sa mémoire cache."</string>
<string name="permlab_writeSettings" msgid="8057285063719277394">"modifier les paramètres du système"</string>
- <string name="permdesc_writeSettings" msgid="8293047411196067188">"Permet à l\'application de modifier les paramètres du système. Des applications malveillantes peuvent utiliser cette fonctionnalité pour corrompre la configuration de votre système."</string>
+ <string name="permdesc_writeSettings" msgid="8293047411196067188">"Permet à l\'appli de modifier les paramètres du système. Des applis malveillantes peuvent utiliser cette fonctionnalité pour corrompre la configuration de votre système."</string>
<string name="permlab_receiveBootCompleted" msgid="6643339400247325379">"s\'exécuter au démarrage"</string>
- <string name="permdesc_receiveBootCompleted" product="tablet" msgid="5565659082718177484">"Permet à l\'application de se lancer une fois le démarrage du système terminé. Elle peut rallonger le temps de démarrage de la tablette et ralentir son fonctionnement global en raison de son exécution continue."</string>
- <string name="permdesc_receiveBootCompleted" product="tv" msgid="4900842256047614307">"Permet à l\'application de se lancer une fois le démarrage du système terminé. Cela peut rallonger le temps de démarrage de votre appareil Android TV et permettre à l\'application d\'en ralentir le fonctionnement global en raison de son exécution continue."</string>
- <string name="permdesc_receiveBootCompleted" product="default" msgid="7912677044558690092">"Permet à l\'application de se lancer une fois le démarrage du système terminé. Elle peut rallonger le temps de démarrage du téléphone et ralentir son fonctionnement global en raison de son exécution continue."</string>
+ <string name="permdesc_receiveBootCompleted" product="tablet" msgid="5565659082718177484">"Permet à l\'appli de se lancer une fois le démarrage du système terminé. Elle peut rallonger le temps de démarrage de la tablette et ralentir son fonctionnement global en raison de son exécution continue."</string>
+ <string name="permdesc_receiveBootCompleted" product="tv" msgid="4900842256047614307">"Permet à l\'appli de se lancer une fois le démarrage du système terminé. Cela peut rallonger le temps de démarrage de votre appareil Android TV et permettre à l\'appli d\'en ralentir le fonctionnement global en raison de son exécution continue."</string>
+ <string name="permdesc_receiveBootCompleted" product="default" msgid="7912677044558690092">"Permet à l\'appli de se lancer une fois le démarrage du système terminé. Elle peut rallonger le temps de démarrage du téléphone et ralentir son fonctionnement global en raison de son exécution continue."</string>
<string name="permlab_broadcastSticky" msgid="4552241916400572230">"envoyer une diffusion persistante"</string>
- <string name="permdesc_broadcastSticky" product="tablet" msgid="5058486069846384013">"Permet à l\'application d\'envoyer des intentions de diffusion \"persistantes\", qui perdurent une fois la diffusion terminée. Une utilisation excessive peut ralentir la tablette ou la rendre instable en l\'obligeant à utiliser trop de mémoire."</string>
- <string name="permdesc_broadcastSticky" product="tv" msgid="2338185920171000650">"Permet à l\'application d\'envoyer des intentions de diffusion persistantes, qui perdurent une fois la diffusion terminée. Une utilisation excessive peut ralentir votre appareil Android TV ou le rendre instable en l\'obligeant à utiliser trop de mémoire."</string>
- <string name="permdesc_broadcastSticky" product="default" msgid="134529339678913453">"Permet à l\'application d\'envoyer des intentions de diffusion \"persistantes\", qui perdurent une fois la diffusion terminée. Une utilisation excessive peut ralentir le téléphone ou le rendre instable en l\'obligeant à utiliser trop de mémoire."</string>
+ <string name="permdesc_broadcastSticky" product="tablet" msgid="5058486069846384013">"Permet à l\'appli d\'envoyer des intentions de diffusion \"persistantes\", qui perdurent une fois la diffusion terminée. Une utilisation excessive peut ralentir la tablette ou la rendre instable en l\'obligeant à utiliser trop de mémoire."</string>
+ <string name="permdesc_broadcastSticky" product="tv" msgid="2338185920171000650">"Permet à l\'appli d\'envoyer des intentions de diffusion persistantes, qui perdurent une fois la diffusion terminée. Une utilisation excessive peut ralentir votre appareil Android TV ou le rendre instable en l\'obligeant à utiliser trop de mémoire."</string>
+ <string name="permdesc_broadcastSticky" product="default" msgid="134529339678913453">"Permet à l\'appli d\'envoyer des intentions de diffusion \"persistantes\", qui perdurent une fois la diffusion terminée. Une utilisation excessive peut ralentir le téléphone ou le rendre instable en l\'obligeant à utiliser trop de mémoire."</string>
<string name="permlab_readContacts" msgid="8776395111787429099">"lire vos contacts"</string>
- <string name="permdesc_readContacts" product="tablet" msgid="6430093481659992692">"Permet à l\'application de lire les données relatives aux contacts stockés sur votre tablette. Les applications auront aussi accès aux comptes sur votre tablette qui ont créé des contacts. Cela peut comprendre des comptes créés par des applications que vous avez installées. Cette autorisation permet aux applications d\'enregistrer ces données. Les applications malveillantes peuvent les partager à votre insu."</string>
- <string name="permdesc_readContacts" product="tv" msgid="8400138591135554789">"Permet à l\'application de lire les données relatives aux contacts stockés sur votre appareil Android TV. Les applications auront aussi accès aux comptes sur votre appareil Android TV qui ont créé des contacts. Cela peut comprendre des comptes créés par des applications que vous avez installées. Cette autorisation permet aux applications d\'enregistrer ces données. Les applications malveillantes peuvent les partager à votre insu."</string>
- <string name="permdesc_readContacts" product="default" msgid="4911989776203207644">"Permet à l\'application de lire les données relatives aux contacts stockés sur votre téléphone. Les applications auront aussi accès aux comptes sur votre téléphone qui ont créé des contacts. Cela peut comprendre des comptes créés par des applications que vous avez installées. Cette autorisation permet aux applications d\'enregistrer ces données. Les applications malveillantes peuvent les partager à votre insu."</string>
+ <string name="permdesc_readContacts" product="tablet" msgid="6430093481659992692">"Permet à l\'appli de lire les données relatives aux contacts stockés sur votre tablette. Les applis auront aussi accès aux comptes sur votre tablette qui ont créé des contacts. Cela peut comprendre des comptes créés par des applis que vous avez installées. Cette autorisation permet aux applis d\'enregistrer ces données. Les applis malveillantes peuvent les partager à votre insu."</string>
+ <string name="permdesc_readContacts" product="tv" msgid="8400138591135554789">"Permet à l\'appli de lire les données relatives aux contacts stockés sur votre appareil Android TV. Les applis auront aussi accès aux comptes sur votre appareil Android TV qui ont créé des contacts. Cela peut comprendre des comptes créés par des applis que vous avez installées. Cette autorisation permet aux applis d\'enregistrer ces données. Les applis malveillantes peuvent les partager à votre insu."</string>
+ <string name="permdesc_readContacts" product="default" msgid="4911989776203207644">"Permet à l\'appli de lire les données relatives aux contacts stockés sur votre téléphone. Les applis auront aussi accès aux comptes sur votre téléphone qui ont créé des contacts. Cela peut comprendre des comptes créés par des applis que vous avez installées. Cette autorisation permet aux applis d\'enregistrer ces données. Les applis malveillantes peuvent les partager à votre insu."</string>
<string name="permlab_writeContacts" msgid="8919430536404830430">"modifier vos contacts"</string>
- <string name="permdesc_writeContacts" product="tablet" msgid="6422419281427826181">"Permet à l\'application de modifier les données relatives aux contacts stockés sur votre tablette. Cette autorisation permet aux applications de supprimer des données relatives aux contacts."</string>
- <string name="permdesc_writeContacts" product="tv" msgid="6488872735379978935">"Permet à l\'application de modifier les données relatives aux contacts stockés sur votre appareil Android TV. Cette autorisation permet aux applications de supprimer des données relatives aux contacts."</string>
- <string name="permdesc_writeContacts" product="default" msgid="8304795696237065281">"Permet à l\'application de modifier les données relatives aux contacts stockés sur votre téléphone. Cette autorisation permet aux applications de supprimer des données relatives aux contacts."</string>
+ <string name="permdesc_writeContacts" product="tablet" msgid="6422419281427826181">"Permet à l\'appli de modifier les données relatives aux contacts stockés sur votre tablette. Cette autorisation permet aux applis de supprimer des données relatives aux contacts."</string>
+ <string name="permdesc_writeContacts" product="tv" msgid="6488872735379978935">"Permet à l\'appli de modifier les données relatives aux contacts stockés sur votre appareil Android TV. Cette autorisation permet aux applis de supprimer des données relatives aux contacts."</string>
+ <string name="permdesc_writeContacts" product="default" msgid="8304795696237065281">"Permet à l\'appli de modifier les données relatives aux contacts stockés sur votre téléphone. Cette autorisation permet aux applis de supprimer des données relatives aux contacts."</string>
<string name="permlab_readCallLog" msgid="1739990210293505948">"lire le journal d\'appels"</string>
- <string name="permdesc_readCallLog" msgid="8964770895425873433">"Cette application peut lire votre historique d\'appel."</string>
+ <string name="permdesc_readCallLog" msgid="8964770895425873433">"Cette appli peut lire votre historique d\'appel."</string>
<string name="permlab_writeCallLog" msgid="670292975137658895">"modifier le journal d\'appels"</string>
- <string name="permdesc_writeCallLog" product="tablet" msgid="2657525794731690397">"Permet à l\'application de lire le journal d\'appels de votre tablette, y compris les données relatives aux appels entrants et sortants. Des applications malveillantes peuvent utiliser cette fonctionnalité pour effacer ou modifier votre journal d\'appels."</string>
- <string name="permdesc_writeCallLog" product="tv" msgid="3934939195095317432">"Permet à l\'application de modifier le journal d\'appels de votre appareil Android TV, y compris les données sur les appels entrants et sortants. Des applications malveillantes pourraient utiliser cette fonctionnalité pour effacer ou modifier votre journal d\'appels."</string>
- <string name="permdesc_writeCallLog" product="default" msgid="5903033505665134802">"Permet à l\'application de lire le journal d\'appels de votre téléphone, y compris les données relatives aux appels entrants et sortants. Des applications malveillantes peuvent utiliser cette fonctionnalité pour effacer ou modifier votre journal d\'appels."</string>
+ <string name="permdesc_writeCallLog" product="tablet" msgid="2657525794731690397">"Permet à l\'appli de lire le journal d\'appels de votre tablette, y compris les données relatives aux appels entrants et sortants. Des applis malveillantes peuvent utiliser cette fonctionnalité pour effacer ou modifier votre journal d\'appels."</string>
+ <string name="permdesc_writeCallLog" product="tv" msgid="3934939195095317432">"Permet à l\'appli de modifier le journal d\'appels de votre appareil Android TV, y compris les données sur les appels entrants et sortants. Des applis malveillantes pourraient utiliser cette fonctionnalité pour effacer ou modifier votre journal d\'appels."</string>
+ <string name="permdesc_writeCallLog" product="default" msgid="5903033505665134802">"Permet à l\'appli de lire le journal d\'appels de votre téléphone, y compris les données relatives aux appels entrants et sortants. Des applis malveillantes peuvent utiliser cette fonctionnalité pour effacer ou modifier votre journal d\'appels."</string>
<string name="permlab_bodySensors" msgid="662918578601619569">"Accéder aux données des capteurs corporels si en utilisation (fréq. card., etc.)"</string>
- <string name="permdesc_bodySensors" product="default" msgid="7652650410295512140">"Permet à l\'application d\'accéder aux données des capteurs corporels telles que la fréquence cardiaque, la température et le pourcentage d\'oxygène dans le sang pendant l\'utilisation de l\'application."</string>
+ <string name="permdesc_bodySensors" product="default" msgid="7652650410295512140">"Permet à l\'appli d\'accéder aux données des capteurs corporels telles que la fréquence cardiaque, la température et le pourcentage d\'oxygène dans le sang pendant l\'utilisation de l\'appli."</string>
<string name="permlab_bodySensors_background" msgid="4912560779957760446">"Accéder aux données des capteurs corporels (comme la fréq. card.) en arrière-plan"</string>
- <string name="permdesc_bodySensors_background" product="default" msgid="8870726027557749417">"Permet à l\'application d\'accéder aux données des capteurs corporels telles que la fréquence cardiaque, la température et le pourcentage d\'oxygène dans le sang pendant que l\'application s\'exécute en arrière-plan."</string>
+ <string name="permdesc_bodySensors_background" product="default" msgid="8870726027557749417">"Permet à l\'appli d\'accéder aux données des capteurs corporels telles que la fréquence cardiaque, la température et le pourcentage d\'oxygène dans le sang pendant que l\'appli s\'exécute en arrière-plan."</string>
<string name="permlab_readCalendar" msgid="6408654259475396200">"Lire les événements d\'agenda et leurs détails"</string>
- <string name="permdesc_readCalendar" product="tablet" msgid="515452384059803326">"Cette application peut lire tous les événements d\'agenda stockés sur votre tablette et partager ou enregistrer les données de votre agenda."</string>
- <string name="permdesc_readCalendar" product="tv" msgid="5811726712981647628">"Cette application peut lire tous les événements d\'agenda stockés sur votre appareil Android TV et partager ou enregistrer les données de votre agenda."</string>
- <string name="permdesc_readCalendar" product="default" msgid="9118823807655829957">"Cette application peut lire tous les événements d\'agenda stockés sur votre téléphone et partager ou enregistrer les données de votre agenda."</string>
+ <string name="permdesc_readCalendar" product="tablet" msgid="515452384059803326">"Cette appli peut lire tous les événements d\'agenda stockés sur votre tablette et partager ou enregistrer les données de votre agenda."</string>
+ <string name="permdesc_readCalendar" product="tv" msgid="5811726712981647628">"Cette appli peut lire tous les événements d\'agenda stockés sur votre appareil Android TV et partager ou enregistrer les données de votre agenda."</string>
+ <string name="permdesc_readCalendar" product="default" msgid="9118823807655829957">"Cette appli peut lire tous les événements d\'agenda stockés sur votre téléphone et partager ou enregistrer les données de votre agenda."</string>
<string name="permlab_writeCalendar" msgid="6422137308329578076">"ajouter ou modifier des événements d\'agenda et envoyer des courriels aux invités à l\'insu du propriétaire"</string>
- <string name="permdesc_writeCalendar" product="tablet" msgid="8722230940717092850">"Cette application peut ajouter, supprimer et modifier des événements d\'agenda sur votre tablette. Elle peut aussi envoyer des messages qui pourraient sembler venir des propriétaires d\'agenda en question ou modifier des événements sans avertir leur propriétaire."</string>
- <string name="permdesc_writeCalendar" product="tv" msgid="951246749004952706">"Cette application peut ajouter, supprimer et modifier des événements d\'agenda sur votre appareil Android TV. Elle peut aussi envoyer des messages qui pourraient sembler venir des propriétaires d\'agenda en question ou modifier des événements sans avertir leur propriétaire."</string>
- <string name="permdesc_writeCalendar" product="default" msgid="5416380074475634233">"Cette application peut ajouter, supprimer et modifier des événements d\'agenda sur votre téléphone. Elle peut aussi envoyer des messages qui pourraient sembler venir des propriétaires d\'agenda en question ou modifier des événements sans avertir leur propriétaire."</string>
+ <string name="permdesc_writeCalendar" product="tablet" msgid="8722230940717092850">"Cette appli peut ajouter, supprimer et modifier des événements d\'agenda sur votre tablette. Elle peut aussi envoyer des messages qui pourraient sembler venir des propriétaires d\'agenda en question ou modifier des événements sans avertir leur propriétaire."</string>
+ <string name="permdesc_writeCalendar" product="tv" msgid="951246749004952706">"Cette appli peut ajouter, supprimer et modifier des événements d\'agenda sur votre appareil Android TV. Elle peut aussi envoyer des messages qui pourraient sembler venir des propriétaires d\'agenda en question ou modifier des événements sans avertir leur propriétaire."</string>
+ <string name="permdesc_writeCalendar" product="default" msgid="5416380074475634233">"Cette appli peut ajouter, supprimer et modifier des événements d\'agenda sur votre téléphone. Elle peut aussi envoyer des messages qui pourraient sembler venir des propriétaires d\'agenda en question ou modifier des événements sans avertir leur propriétaire."</string>
<string name="permlab_accessLocationExtraCommands" msgid="5162339812057983988">"accéder aux commandes de fournisseur de position géographique supplémentaires"</string>
- <string name="permdesc_accessLocationExtraCommands" msgid="355369611979907967">"Permet à l\'application d\'accéder à des commandes de localisation supplémentaires offertes par le fournisseur. Elle est ainsi susceptible d\'interférer avec le bon fonctionnement du GPS ou de toute autre source de localisation."</string>
+ <string name="permdesc_accessLocationExtraCommands" msgid="355369611979907967">"Permet à l\'appli d\'accéder à des commandes de localisation supplémentaires offertes par le fournisseur. Elle est ainsi susceptible d\'interférer avec le bon fonctionnement du GPS ou de toute autre source de localisation."</string>
<string name="permlab_accessFineLocation" msgid="6426318438195622966">"accéder à votre position précise seulement en avant-plan"</string>
- <string name="permdesc_accessFineLocation" msgid="6732174080240016335">"Cette application peut obtenir votre position précise des services de localisation lorsque vous utilisez l\'application. Les services de localisation doivent être activés sur votre appareil pour que l\'application puisse obtenir votre position. Cela pourrait accroître l\'utilisation de la pile."</string>
+ <string name="permdesc_accessFineLocation" msgid="6732174080240016335">"Cette appli peut obtenir votre position précise des services de localisation lorsque vous utilisez l\'appli. Les services de localisation doivent être activés sur votre appareil pour que l\'appli puisse obtenir votre position. Cela pourrait accroître l\'utilisation de la pile."</string>
<string name="permlab_accessCoarseLocation" msgid="1561042925407799741">"accéder à votre position approximative seulement en avant-plan"</string>
- <string name="permdesc_accessCoarseLocation" msgid="778521847873199160">"Cette application peut obtenir votre position approximative des services de localisation lorsque vous utilisez l\'application. Les services de localisation doivent être activés sur votre appareil pour que l\'application puisse obtenir votre position."</string>
+ <string name="permdesc_accessCoarseLocation" msgid="778521847873199160">"Cette appli peut obtenir votre position approximative des services de localisation lorsque vous utilisez l\'appli. Les services de localisation doivent être activés sur votre appareil pour que l\'appli puisse obtenir votre position."</string>
<string name="permlab_accessBackgroundLocation" msgid="1721164702777366138">"accès à la localisation en arrière-plan"</string>
- <string name="permdesc_accessBackgroundLocation" msgid="8264885066095638105">"Cette application peut accéder à votre position en tout temps, même lorsque vous n\'utilisez pas l\'application."</string>
+ <string name="permdesc_accessBackgroundLocation" msgid="8264885066095638105">"Cette appli peut accéder à votre position en tout temps, même lorsque vous n\'utilisez pas l\'appli."</string>
<string name="permlab_modifyAudioSettings" msgid="6129039778010031815">"modifier vos paramètres audio"</string>
- <string name="permdesc_modifyAudioSettings" msgid="8687227609663124921">"Permet à l\'application de modifier les paramètres audio généraux, tels que le volume et la sortie audio utilisée."</string>
+ <string name="permdesc_modifyAudioSettings" msgid="8687227609663124921">"Permet à l\'appli de modifier les paramètres audio généraux, tels que le volume et la sortie audio utilisée."</string>
<string name="permlab_recordAudio" msgid="1208457423054219147">"enregistrer des fichiers audio"</string>
- <string name="permdesc_recordAudio" msgid="5857246765327514062">"Cette application peut enregistrer de l\'audio à l\'aide du microphone lorsque vous utilisez l\'application."</string>
+ <string name="permdesc_recordAudio" msgid="5857246765327514062">"Cette appli peut enregistrer de l\'audio à l\'aide du microphone lorsque vous utilisez l\'appli."</string>
<string name="permlab_recordBackgroundAudio" msgid="5891032812308878254">"enregistrer de l\'audio en arrière-plan"</string>
- <string name="permdesc_recordBackgroundAudio" msgid="1992623135737407516">"Cette application peut enregistrer de l\'audio à l\'aide du microphone en tout temps."</string>
- <string name="permlab_detectScreenCapture" msgid="4447042362828799433">"détecter les captures d\'écran des fenêtres d\'application"</string>
- <string name="permdesc_detectScreenCapture" msgid="3485784917960342284">"Cette application recevra une notification lorsqu\'une capture d\'écran sera prise pendant que l\'application est en cours d\'utilisation."</string>
+ <string name="permdesc_recordBackgroundAudio" msgid="1992623135737407516">"Cette appli peut enregistrer de l\'audio à l\'aide du microphone en tout temps."</string>
+ <string name="permlab_detectScreenCapture" msgid="4447042362828799433">"détecter les captures d\'écran des fenêtres d\'appli"</string>
+ <string name="permdesc_detectScreenCapture" msgid="3485784917960342284">"Cette appli recevra une notification lorsqu\'une capture d\'écran sera prise pendant que l\'appli est en cours d\'utilisation."</string>
<string name="permlab_sim_communication" msgid="176788115994050692">"envoyer des commandes à la carte SIM"</string>
- <string name="permdesc_sim_communication" msgid="4179799296415957960">"Permet à l\'application d\'envoyer des commandes à la carte SIM. Cette fonctionnalité est très dangereuse."</string>
+ <string name="permdesc_sim_communication" msgid="4179799296415957960">"Permet à l\'appli d\'envoyer des commandes à la carte SIM. Cette fonctionnalité est très dangereuse."</string>
<string name="permlab_activityRecognition" msgid="1782303296053990884">"reconnaître les activités physiques"</string>
- <string name="permdesc_activityRecognition" msgid="8667484762991357519">"Cette application peut reconnaître vos activités physiques."</string>
+ <string name="permdesc_activityRecognition" msgid="8667484762991357519">"Cette appli peut reconnaître vos activités physiques."</string>
<string name="permlab_camera" msgid="6320282492904119413">"prendre des photos et filmer des vidéos"</string>
- <string name="permdesc_camera" msgid="5240801376168647151">"Cette application peut prendre des photos et enregistrer des vidéos à l\'aide de l\'appareil photo lorsque vous utilisez l\'application."</string>
+ <string name="permdesc_camera" msgid="5240801376168647151">"Cette appli peut prendre des photos et enregistrer des vidéos à l\'aide de l\'appareil photo lorsque vous utilisez l\'appli."</string>
<string name="permlab_backgroundCamera" msgid="7549917926079731681">"prendre des photos et enregistrer des vidéos en arrière-plan"</string>
- <string name="permdesc_backgroundCamera" msgid="1615291686191138250">"Cette application peut prendre des photos et enregistrer des vidéos à l\'aide de l\'appareil photo en tout temps."</string>
- <string name="permlab_systemCamera" msgid="3642917457796210580">"Autoriser une application ou un service à accéder aux appareils photo système pour prendre des photos et filmer des vidéos"</string>
- <string name="permdesc_systemCamera" msgid="5938360914419175986">"Cette application privilégiée ou système peut prendre des photos ou filmer des vidéos à l\'aide d\'un appareil photo système en tout temps. L\'application doit également posséder l\'autorisation android.permission.CAMERA"</string>
- <string name="permlab_cameraOpenCloseListener" msgid="5548732769068109315">"Autoriser une application ou un service de recevoir des rappels relatifs à l\'ouverture ou à la fermeture des appareils photos."</string>
- <string name="permdesc_cameraOpenCloseListener" msgid="2002636131008772908">"Cette application peut recevoir des rappels lorsque l\'appareil photo est ouvert ou fermé (par l\'application en question)."</string>
- <string name="permlab_cameraHeadlessSystemUser" msgid="680194666834500050">"Autoriser une application ou un service à accéder à la caméra en tant qu\'utilisateur de système sans interface."</string>
- <string name="permdesc_cameraHeadlessSystemUser" msgid="6963163319710996412">"Cette application peut accéder à la caméra en tant qu\'utilisateur de système sans interface."</string>
+ <string name="permdesc_backgroundCamera" msgid="1615291686191138250">"Cette appli peut prendre des photos et enregistrer des vidéos à l\'aide de l\'appareil photo en tout temps."</string>
+ <string name="permlab_systemCamera" msgid="3642917457796210580">"Autoriser une appli ou un service à accéder aux appareils photo système pour prendre des photos et filmer des vidéos"</string>
+ <string name="permdesc_systemCamera" msgid="5938360914419175986">"Cette appli privilégiée ou système peut prendre des photos ou filmer des vidéos à l\'aide d\'un appareil photo système en tout temps. L\'appli doit également posséder l\'autorisation android.permission.CAMERA"</string>
+ <string name="permlab_cameraOpenCloseListener" msgid="5548732769068109315">"Autoriser une appli ou un service de recevoir des rappels relatifs à l\'ouverture ou à la fermeture des appareils photos."</string>
+ <string name="permdesc_cameraOpenCloseListener" msgid="2002636131008772908">"Cette appli peut recevoir des rappels lorsque l\'appareil photo est ouvert ou fermé (par l\'appli en question)."</string>
+ <string name="permlab_cameraHeadlessSystemUser" msgid="680194666834500050">"Autoriser une appli ou un service à accéder à la caméra en tant qu\'utilisateur de système sans interface."</string>
+ <string name="permdesc_cameraHeadlessSystemUser" msgid="6963163319710996412">"Cette appli peut accéder à la caméra en tant qu\'utilisateur de système sans interface."</string>
<string name="permlab_vibrate" msgid="8596800035791962017">"gérer le vibreur"</string>
- <string name="permdesc_vibrate" msgid="8733343234582083721">"Permet à l\'application de gérer le vibreur de l\'appareil."</string>
- <string name="permdesc_vibrator_state" msgid="7050024956594170724">"Permet à l\'application d\'accéder au mode vibration."</string>
+ <string name="permdesc_vibrate" msgid="8733343234582083721">"Permet à l\'appli de gérer le vibreur de l\'appareil."</string>
+ <string name="permdesc_vibrator_state" msgid="7050024956594170724">"Permet à l\'appli d\'accéder au mode vibration."</string>
<string name="permlab_callPhone" msgid="1798582257194643320">"appeler directement des numéros de téléphone"</string>
- <string name="permdesc_callPhone" msgid="7892422187827695656">"Autorisez l\'application à appeler des numéros de téléphone sans votre intervention. Cela peut entraîner des frais ou des appels imprévus. Notez aussi que cela ne permet pas à l\'application d\'appeler des numéros d\'urgence. Des applications malveillantes peuvent engendrer des frais en passant des appels sans votre confirmation ou en composant des codes de fournisseurs de service qui transfèrent automatiquement des appels entrants vers un autre numéro."</string>
+ <string name="permdesc_callPhone" msgid="7892422187827695656">"Autorisez l\'appli à appeler des numéros de téléphone sans votre intervention. Cela peut entraîner des frais ou des appels imprévus. Notez aussi que cela ne permet pas à l\'appli d\'appeler des numéros d\'urgence. Des applis malveillantes peuvent engendrer des frais en passant des appels sans votre confirmation ou en composant des codes de fournisseurs de service qui transfèrent automatiquement des appels entrants vers un autre numéro."</string>
<string name="permlab_accessImsCallService" msgid="442192920714863782">"accéder au service d\'appel IMS"</string>
- <string name="permdesc_accessImsCallService" msgid="6328551241649687162">"Permet à l\'application d\'utiliser le service IMS pour faire des appels sans votre intervention."</string>
+ <string name="permdesc_accessImsCallService" msgid="6328551241649687162">"Permet à l\'appli d\'utiliser le service IMS pour faire des appels sans votre intervention."</string>
<string name="permlab_readPhoneState" msgid="8138526903259297969">"voir l\'état et l\'identité du téléphone"</string>
- <string name="permdesc_readPhoneState" msgid="7229063553502788058">"Permet à l\'application d\'accéder aux fonctionnalités téléphoniques de l\'appareil. Cette autorisation permet à l\'application de déterminer le numéro de téléphone et les identifiants de l\'appareil, si un appel est actif et le numéro distant connecté par un appel."</string>
+ <string name="permdesc_readPhoneState" msgid="7229063553502788058">"Permet à l\'appli d\'accéder aux fonctionnalités téléphoniques de l\'appareil. Cette autorisation permet à l\'appli de déterminer le numéro de téléphone et les identifiants de l\'appareil, si un appel est actif et le numéro distant connecté par un appel."</string>
<string name="permlab_readBasicPhoneState" msgid="3214853233263871347">"Lire l\'état et l\'identité de la téléphonie de base"</string>
- <string name="permdesc_readBasicPhoneState" msgid="828185691675460520">"Permet à l\'application d\'accéder aux fonctionnalités de téléphonie de base de l\'appareil."</string>
+ <string name="permdesc_readBasicPhoneState" msgid="828185691675460520">"Permet à l\'appli d\'accéder aux fonctionnalités de téléphonie de base de l\'appareil."</string>
<string name="permlab_manageOwnCalls" msgid="9033349060307561370">"acheminer les appels dans le système"</string>
- <string name="permdesc_manageOwnCalls" msgid="4431178362202142574">"Permet à l\'application d\'acheminer ses appels dans le système afin d\'améliorer l\'expérience d\'appel."</string>
+ <string name="permdesc_manageOwnCalls" msgid="4431178362202142574">"Permet à l\'appli d\'acheminer ses appels dans le système afin d\'améliorer l\'expérience d\'appel."</string>
<string name="permlab_callCompanionApp" msgid="3654373653014126884">"afficher et gérer les appels à l\'aide du système."</string>
- <string name="permdesc_callCompanionApp" msgid="8474168926184156261">"Autorise l\'application à afficher et à gérer les appels sortants sur l\'appareil. Cela comprend de l\'information comme les numéros pour les appels et l\'état des appels."</string>
+ <string name="permdesc_callCompanionApp" msgid="8474168926184156261">"Autorise l\'appli à afficher et à gérer les appels sortants sur l\'appareil. Cela comprend de l\'information comme les numéros pour les appels et l\'état des appels."</string>
<string name="permlab_exemptFromAudioRecordRestrictions" msgid="1164725468350759486">"est exemptée des restrictions relatives à l\'enregistrement de fichiers audio"</string>
- <string name="permdesc_exemptFromAudioRecordRestrictions" msgid="2425117015896871976">"Exempter l\'application des restrictions relatives à l\'enregistrement de fichiers audio."</string>
- <string name="permlab_acceptHandover" msgid="2925523073573116523">"continuer un appel d\'une autre application"</string>
- <string name="permdesc_acceptHandovers" msgid="7129026180128626870">"Permet à l\'application de continuer un appel commencé dans une autre application."</string>
+ <string name="permdesc_exemptFromAudioRecordRestrictions" msgid="2425117015896871976">"Exempter l\'appli des restrictions relatives à l\'enregistrement de fichiers audio."</string>
+ <string name="permlab_acceptHandover" msgid="2925523073573116523">"continuer un appel d\'une autre appli"</string>
+ <string name="permdesc_acceptHandovers" msgid="7129026180128626870">"Permet à l\'appli de continuer un appel commencé dans une autre appli."</string>
<string name="permlab_readPhoneNumbers" msgid="5668704794723365628">"lire les numéros de téléphone"</string>
- <string name="permdesc_readPhoneNumbers" msgid="7368652482818338871">"Permet à l\'application d\'accéder aux numéros de téléphone de l\'appareil."</string>
+ <string name="permdesc_readPhoneNumbers" msgid="7368652482818338871">"Permet à l\'appli d\'accéder aux numéros de téléphone de l\'appareil."</string>
<string name="permlab_wakeLock" product="automotive" msgid="1904736682319375676">"garder l\'écran de la voiture allumé"</string>
<string name="permlab_wakeLock" product="tablet" msgid="1527660973931694000">"empêcher la tablette de passer en mode veille"</string>
<string name="permlab_wakeLock" product="tv" msgid="2856941418123343518">"Empêcher votre appareil Android TV de passer en mode Veille"</string>
<string name="permlab_wakeLock" product="default" msgid="569409726861695115">"empêcher le téléphone de passer en mode veille"</string>
- <string name="permdesc_wakeLock" product="automotive" msgid="5995045369683254571">"Permet à l\'application de garder l\'écran de la voiture allumé."</string>
- <string name="permdesc_wakeLock" product="tablet" msgid="2441742939101526277">"Permet à l\'application d\'empêcher la tablette de passer en mode veille."</string>
- <string name="permdesc_wakeLock" product="tv" msgid="2329298966735118796">"Permet à l\'application d\'empêcher votre appareil Android TV de passer en mode Veille."</string>
- <string name="permdesc_wakeLock" product="default" msgid="3689523792074007163">"Permet à l\'application d\'empêcher le téléphone de passer en mode veille."</string>
+ <string name="permdesc_wakeLock" product="automotive" msgid="5995045369683254571">"Permet à l\'appli de garder l\'écran de la voiture allumé."</string>
+ <string name="permdesc_wakeLock" product="tablet" msgid="2441742939101526277">"Permet à l\'appli d\'empêcher la tablette de passer en mode veille."</string>
+ <string name="permdesc_wakeLock" product="tv" msgid="2329298966735118796">"Permet à l\'appli d\'empêcher votre appareil Android TV de passer en mode Veille."</string>
+ <string name="permdesc_wakeLock" product="default" msgid="3689523792074007163">"Permet à l\'appli d\'empêcher le téléphone de passer en mode veille."</string>
<string name="permlab_transmitIr" msgid="8077196086358004010">"transmettre des signaux infrarouges"</string>
- <string name="permdesc_transmitIr" product="tablet" msgid="5884738958581810253">"Permet à l\'application d\'utiliser l\'émetteur infrarouge de la tablette."</string>
- <string name="permdesc_transmitIr" product="tv" msgid="3278506969529173281">"Permet à l\'application d\'utiliser le transmetteur infrarouge de votre appareil Android TV."</string>
- <string name="permdesc_transmitIr" product="default" msgid="8484193849295581808">"Permet à l\'application d\'utiliser l\'émetteur infrarouge du téléphone."</string>
+ <string name="permdesc_transmitIr" product="tablet" msgid="5884738958581810253">"Permet à l\'appli d\'utiliser l\'émetteur infrarouge de la tablette."</string>
+ <string name="permdesc_transmitIr" product="tv" msgid="3278506969529173281">"Permet à l\'appli d\'utiliser le transmetteur infrarouge de votre appareil Android TV."</string>
+ <string name="permdesc_transmitIr" product="default" msgid="8484193849295581808">"Permet à l\'appli d\'utiliser l\'émetteur infrarouge du téléphone."</string>
<string name="permlab_setWallpaper" msgid="6959514622698794511">"définir le fond d\'écran"</string>
- <string name="permdesc_setWallpaper" msgid="2973996714129021397">"Permet à l\'application de définir le fond d\'écran du système."</string>
+ <string name="permdesc_setWallpaper" msgid="2973996714129021397">"Permet à l\'appli de définir le fond d\'écran du système."</string>
<string name="permlab_accessHiddenProfile" msgid="8607094418491556823">"Accéder aux profils masqués"</string>
- <string name="permdesc_accessHiddenProfile" msgid="1543153202481009676">"Autorise l\'application à accéder aux profils masqués"</string>
+ <string name="permdesc_accessHiddenProfile" msgid="1543153202481009676">"Autorise l\'appli à accéder aux profils masqués"</string>
<string name="permlab_setWallpaperHints" msgid="1153485176642032714">"modifier la taille du fond d\'écran"</string>
- <string name="permdesc_setWallpaperHints" msgid="6257053376990044668">"Permet à l\'application de définir les bulles d\'aide concernant la taille du fond d\'écran du système."</string>
+ <string name="permdesc_setWallpaperHints" msgid="6257053376990044668">"Permet à l\'appli de définir les bulles d\'aide concernant la taille du fond d\'écran du système."</string>
<string name="permlab_setTimeZone" msgid="7922618798611542432">"définir le fuseau horaire"</string>
- <string name="permdesc_setTimeZone" product="tablet" msgid="1788868809638682503">"Permet à l\'application de modifier le fuseau horaire de la tablette."</string>
- <string name="permdesc_setTimeZone" product="tv" msgid="9069045914174455938">"Permet à l\'application de modifier le fuseau horaire de votre appareil Android TV."</string>
- <string name="permdesc_setTimeZone" product="default" msgid="4611828585759488256">"Permet à l\'application de modifier le fuseau horaire du téléphone."</string>
+ <string name="permdesc_setTimeZone" product="tablet" msgid="1788868809638682503">"Permet à l\'appli de modifier le fuseau horaire de la tablette."</string>
+ <string name="permdesc_setTimeZone" product="tv" msgid="9069045914174455938">"Permet à l\'appli de modifier le fuseau horaire de votre appareil Android TV."</string>
+ <string name="permdesc_setTimeZone" product="default" msgid="4611828585759488256">"Permet à l\'appli de modifier le fuseau horaire du téléphone."</string>
<string name="permlab_getAccounts" msgid="5304317160463582791">"rechercher des comptes sur l\'appareil"</string>
- <string name="permdesc_getAccounts" product="tablet" msgid="1784452755887604512">"Permet à l\'application d\'obtenir la liste des comptes connus par la tablette. Il peut s\'agir de n\'importe quel compte créé par les applications que vous avez installées."</string>
- <string name="permdesc_getAccounts" product="tv" msgid="437604680436540822">"Permet à l\'application d\'obtenir la liste des comptes connus de votre appareil Android TV. Cela peut comprendre n\'importe quel compte créé par les applications que vous avez installées."</string>
- <string name="permdesc_getAccounts" product="default" msgid="2491273043569751867">"Permet à l\'application d\'obtenir la liste des comptes connus par le téléphone. Il peut s\'agir de n\'importe quel compte créé par les applications que vous avez installées."</string>
+ <string name="permdesc_getAccounts" product="tablet" msgid="1784452755887604512">"Permet à l\'appli d\'obtenir la liste des comptes connus par la tablette. Il peut s\'agir de n\'importe quel compte créé par les applis que vous avez installées."</string>
+ <string name="permdesc_getAccounts" product="tv" msgid="437604680436540822">"Permet à l\'appli d\'obtenir la liste des comptes connus de votre appareil Android TV. Cela peut comprendre n\'importe quel compte créé par les applis que vous avez installées."</string>
+ <string name="permdesc_getAccounts" product="default" msgid="2491273043569751867">"Permet à l\'appli d\'obtenir la liste des comptes connus par le téléphone. Il peut s\'agir de n\'importe quel compte créé par les applis que vous avez installées."</string>
<string name="permlab_accessNetworkState" msgid="2349126720783633918">"afficher les connexions réseau"</string>
- <string name="permdesc_accessNetworkState" msgid="4394564702881662849">"Permet à l\'application d\'accéder à des détails concernant les connexions réseau, comme les réseaux existants et connectés."</string>
+ <string name="permdesc_accessNetworkState" msgid="4394564702881662849">"Permet à l\'appli d\'accéder à des détails concernant les connexions réseau, comme les réseaux existants et connectés."</string>
<string name="permlab_createNetworkSockets" msgid="3224420491603590541">"bénéficier d\'un accès complet au réseau"</string>
- <string name="permdesc_createNetworkSockets" msgid="7722020828749535988">"Permet à l\'application de créer des interfaces de connexion réseau et d\'utiliser des protocoles réseau personnalisés. Le navigateur et d\'autres applications permettent d\'envoyer des données sur Internet. Cette autorisation n\'est donc pas nécessaire pour envoyer des données sur Internet."</string>
+ <string name="permdesc_createNetworkSockets" msgid="7722020828749535988">"Permet à l\'appli de créer des interfaces de connexion réseau et d\'utiliser des protocoles réseau personnalisés. Le navigateur et d\'autres applis permettent d\'envoyer des données sur Internet. Cette autorisation n\'est donc pas nécessaire pour envoyer des données sur Internet."</string>
<string name="permlab_changeNetworkState" msgid="8945711637530425586">"modifier la connectivité réseau"</string>
- <string name="permdesc_changeNetworkState" msgid="649341947816898736">"Permet à l\'application de modifier l\'état de la connectivité réseau."</string>
+ <string name="permdesc_changeNetworkState" msgid="649341947816898736">"Permet à l\'appli de modifier l\'état de la connectivité réseau."</string>
<string name="permlab_changeTetherState" msgid="9079611809931863861">"changer la connectivité du partage de connexion"</string>
- <string name="permdesc_changeTetherState" msgid="3025129606422533085">"Permet à l\'application de modifier l\'état de la connectivité du partage de connexion."</string>
+ <string name="permdesc_changeTetherState" msgid="3025129606422533085">"Permet à l\'appli de modifier l\'état de la connectivité du partage de connexion."</string>
<string name="permlab_accessWifiState" msgid="5552488500317911052">"afficher les connexions Wi-Fi"</string>
- <string name="permdesc_accessWifiState" msgid="6913641669259483363">"Permet à l\'application d\'accéder à des détails sur les réseaux Wi-Fi afin de savoir si une connexion Wi-Fi est activée et pour connaître le nom des appareils connectés au Wi-Fi, par exemple."</string>
+ <string name="permdesc_accessWifiState" msgid="6913641669259483363">"Permet à l\'appli d\'accéder à des détails sur les réseaux Wi-Fi afin de savoir si une connexion Wi-Fi est activée et pour connaître le nom des appareils connectés au Wi-Fi, par exemple."</string>
<string name="permlab_changeWifiState" msgid="7947824109713181554">"activer/désactiver la connexion Wi-Fi"</string>
- <string name="permdesc_changeWifiState" msgid="7170350070554505384">"Permet à l\'application de se connecter à des points d\'accès Wi-Fi, de s\'en déconnecter et de modifier la configuration de l\'appareil pour les réseaux Wi-Fi."</string>
+ <string name="permdesc_changeWifiState" msgid="7170350070554505384">"Permet à l\'appli de se connecter à des points d\'accès Wi-Fi, de s\'en déconnecter et de modifier la configuration de l\'appareil pour les réseaux Wi-Fi."</string>
<string name="permlab_changeWifiMulticastState" msgid="285626875870754696">"autoriser la réception de données en mode Wi-Fi multidiffusion"</string>
- <string name="permdesc_changeWifiMulticastState" product="tablet" msgid="191079868596433554">"Permet à l\'application de recevoir des paquets envoyés à tous les appareils (et pas seulement à votre tablette) d\'un réseau Wi-Fi qui utilise des adresses de multidiffusion. Cette autorisation entraîne une consommation d\'énergie supérieure au mode de diffusion simple."</string>
- <string name="permdesc_changeWifiMulticastState" product="tv" msgid="1336952358450652595">"Permet à l\'application de recevoir des paquets envoyés à tous les appareils d\'un réseau Wi-Fi qui utilise des adresses de multidiffusion, et pas seulement à votre appareil Android TV. Cette autorisation entraîne une consommation d\'énergie supérieure au mode de diffusion simple."</string>
- <string name="permdesc_changeWifiMulticastState" product="default" msgid="8296627590220222740">"Permet à l\'application de recevoir des paquets envoyés à tous les appareils (et pas seulement à votre téléphone) d\'un réseau Wi-Fi qui utilise des adresses de multidiffusion. Cette autorisation entraîne une consommation d\'énergie supérieure au mode de diffusion simple."</string>
+ <string name="permdesc_changeWifiMulticastState" product="tablet" msgid="191079868596433554">"Permet à l\'appli de recevoir des paquets envoyés à tous les appareils (et pas seulement à votre tablette) d\'un réseau Wi-Fi qui utilise des adresses de multidiffusion. Cette autorisation entraîne une consommation d\'énergie supérieure au mode de diffusion simple."</string>
+ <string name="permdesc_changeWifiMulticastState" product="tv" msgid="1336952358450652595">"Permet à l\'appli de recevoir des paquets envoyés à tous les appareils d\'un réseau Wi-Fi qui utilise des adresses de multidiffusion, et pas seulement à votre appareil Android TV. Cette autorisation entraîne une consommation d\'énergie supérieure au mode de diffusion simple."</string>
+ <string name="permdesc_changeWifiMulticastState" product="default" msgid="8296627590220222740">"Permet à l\'appli de recevoir des paquets envoyés à tous les appareils (et pas seulement à votre téléphone) d\'un réseau Wi-Fi qui utilise des adresses de multidiffusion. Cette autorisation entraîne une consommation d\'énergie supérieure au mode de diffusion simple."</string>
<string name="permlab_bluetoothAdmin" msgid="6490373569441946064">"accéder aux paramètres Bluetooth"</string>
- <string name="permdesc_bluetoothAdmin" product="tablet" msgid="5370837055438574863">"Permet à l\'application de configurer la tablette Bluetooth locale, d\'identifier des appareils distants et de les associer à la tablette."</string>
- <string name="permdesc_bluetoothAdmin" product="tv" msgid="1623992984547014588">"Permet à l\'application de configurer le Bluetooth sur votre appareil Android TV, de repérer des appareils distants et de les associer à l\'appareil."</string>
- <string name="permdesc_bluetoothAdmin" product="default" msgid="7381341743021234863">"Permet à l\'application de configurer le téléphone Bluetooth local, d\'identifier des appareils distants et de les associer au téléphone."</string>
+ <string name="permdesc_bluetoothAdmin" product="tablet" msgid="5370837055438574863">"Permet à l\'appli de configurer la tablette Bluetooth locale, d\'identifier des appareils distants et de les associer à la tablette."</string>
+ <string name="permdesc_bluetoothAdmin" product="tv" msgid="1623992984547014588">"Permet à l\'appli de configurer le Bluetooth sur votre appareil Android TV, de repérer des appareils distants et de les associer à l\'appareil."</string>
+ <string name="permdesc_bluetoothAdmin" product="default" msgid="7381341743021234863">"Permet à l\'appli de configurer le téléphone Bluetooth local, d\'identifier des appareils distants et de les associer au téléphone."</string>
<string name="permlab_accessWimaxState" msgid="7029563339012437434">"se connecter au réseau WiMAX et s\'en déconnecter"</string>
- <string name="permdesc_accessWimaxState" msgid="5372734776802067708">"Permet à l\'application de déterminer si le WiMAX est activé et d\'obtenir des détails sur tous les réseaux WiMAX connectés."</string>
+ <string name="permdesc_accessWimaxState" msgid="5372734776802067708">"Permet à l\'appli de déterminer si le WiMAX est activé et d\'obtenir des détails sur tous les réseaux WiMAX connectés."</string>
<string name="permlab_changeWimaxState" msgid="6223305780806267462">"modifier l\'état du WiMAX"</string>
- <string name="permdesc_changeWimaxState" product="tablet" msgid="4011097664859480108">"Permet à l\'application de connecter la tablette aux réseaux WiMAX et de l\'en déconnecter."</string>
- <string name="permdesc_changeWimaxState" product="tv" msgid="5373274458799425276">"Permet à l\'application de connecter votre appareil Android TV aux réseaux WiMAX et de les en déconnecter."</string>
- <string name="permdesc_changeWimaxState" product="default" msgid="1551666203780202101">"Permet à l\'application de connecter le téléphone aux réseaux WiMAX et de l\'en déconnecter."</string>
+ <string name="permdesc_changeWimaxState" product="tablet" msgid="4011097664859480108">"Permet à l\'appli de connecter la tablette aux réseaux WiMAX et de l\'en déconnecter."</string>
+ <string name="permdesc_changeWimaxState" product="tv" msgid="5373274458799425276">"Permet à l\'appli de connecter votre appareil Android TV aux réseaux WiMAX et de les en déconnecter."</string>
+ <string name="permdesc_changeWimaxState" product="default" msgid="1551666203780202101">"Permet à l\'appli de connecter le téléphone aux réseaux WiMAX et de l\'en déconnecter."</string>
<string name="permlab_bluetooth" msgid="586333280736937209">"s\'associer à des appareils Bluetooth"</string>
- <string name="permdesc_bluetooth" product="tablet" msgid="3053222571491402635">"Permet à l\'application d\'accéder à la configuration du Bluetooth sur la tablette, et d\'établir et accepter des connexions avec les appareils associés."</string>
- <string name="permdesc_bluetooth" product="tv" msgid="8851534496561034998">"Permet à l\'application d\'afficher la configuration du Bluetooth sur votre appareil Android TV, de se connecter à des appareils associés et d\'accepter leur connexion."</string>
- <string name="permdesc_bluetooth" product="default" msgid="2779606714091276746">"Permet à l\'application d\'accéder à la configuration du Bluetooth sur le téléphone, et d\'établir et accepter des connexions avec les appareils associés."</string>
+ <string name="permdesc_bluetooth" product="tablet" msgid="3053222571491402635">"Permet à l\'appli d\'accéder à la configuration du Bluetooth sur la tablette, et d\'établir et accepter des connexions avec les appareils associés."</string>
+ <string name="permdesc_bluetooth" product="tv" msgid="8851534496561034998">"Permet à l\'appli d\'afficher la configuration du Bluetooth sur votre appareil Android TV, de se connecter à des appareils associés et d\'accepter leur connexion."</string>
+ <string name="permdesc_bluetooth" product="default" msgid="2779606714091276746">"Permet à l\'appli d\'accéder à la configuration du Bluetooth sur le téléphone, et d\'établir et accepter des connexions avec les appareils associés."</string>
<string name="permlab_bluetooth_scan" msgid="5402587142833124594">"découvrir des appareils Bluetooth et s\'y connecter"</string>
- <string name="permdesc_bluetooth_scan" product="default" msgid="6540723536925289276">"Permet à l\'application de découvrir les appareils Bluetooth à proximité et de s\'y connecter"</string>
+ <string name="permdesc_bluetooth_scan" product="default" msgid="6540723536925289276">"Permet à l\'appli de découvrir les appareils Bluetooth à proximité et de s\'y connecter"</string>
<string name="permlab_bluetooth_connect" msgid="6657463246355003528">"se connecter aux appareils Bluetooth associés"</string>
- <string name="permdesc_bluetooth_connect" product="default" msgid="4546016548795544617">"Permet à l\'application de se connecter aux appareils Bluetooth associés"</string>
+ <string name="permdesc_bluetooth_connect" product="default" msgid="4546016548795544617">"Permet à l\'appli de se connecter aux appareils Bluetooth associés"</string>
<string name="permlab_bluetooth_advertise" msgid="2781147747928853177">"envoyer annonces aux appareils Bluetooth à proxim."</string>
- <string name="permdesc_bluetooth_advertise" product="default" msgid="6085174451034210183">"Permet à l\'application d\'envoyer des annonces aux appareils Bluetooth à proximité"</string>
+ <string name="permdesc_bluetooth_advertise" product="default" msgid="6085174451034210183">"Permet à l\'appli d\'envoyer des annonces aux appareils Bluetooth à proximité"</string>
<string name="permlab_uwb_ranging" msgid="8141915781475770665">"déterminer la position relative entre des appareils à bande ultralarge à proximité"</string>
- <string name="permdesc_uwb_ranging" msgid="2519723069604307055">"Autorisez l\'application à déterminer la position relative entre des appareils à bande ultralarge à proximité"</string>
+ <string name="permdesc_uwb_ranging" msgid="2519723069604307055">"Autorisez l\'appli à déterminer la position relative entre des appareils à bande ultralarge à proximité"</string>
<string name="permlab_nearby_wifi_devices" msgid="392774237063608500">"interagir avec les appareils Wi-Fi à proximité"</string>
- <string name="permdesc_nearby_wifi_devices" msgid="3054307728646332906">"Permet à l\'application de diffuser des annonces, de se connecter et de déterminer la position relative des appareils Wi-Fi à proximité"</string>
+ <string name="permdesc_nearby_wifi_devices" msgid="3054307728646332906">"Permet à l\'appli de diffuser des annonces, de se connecter et de déterminer la position relative des appareils Wi-Fi à proximité"</string>
<string name="permlab_preferredPaymentInfo" msgid="5274423844767445054">"Information sur le service préféré de paiement CCP"</string>
- <string name="permdesc_preferredPaymentInfo" msgid="8583552469807294967">"Permet à l\'application d\'obtenir de l\'information sur le service préféré de paiement CCP comme les aides enregistrées et la route de destination."</string>
+ <string name="permdesc_preferredPaymentInfo" msgid="8583552469807294967">"Permet à l\'appli d\'obtenir de l\'information sur le service préféré de paiement CCP comme les aides enregistrées et la route de destination."</string>
<string name="permlab_nfc" msgid="1904455246837674977">"gérer la communication en champ proche"</string>
- <string name="permdesc_nfc" msgid="8352737680695296741">"Permet à l\'application de communiquer avec des bornes, des cartes et des lecteurs compatibles avec la technologie CCP (communication en champ proche)."</string>
+ <string name="permdesc_nfc" msgid="8352737680695296741">"Permet à l\'appli de communiquer avec des bornes, des cartes et des lecteurs compatibles avec la technologie CCP (communication en champ proche)."</string>
<string name="permlab_nfcTransactionEvent" msgid="5868209446710407679">"Événement de transaction relatif à un élément sécurisé"</string>
- <string name="permdesc_nfcTransactionEvent" msgid="1904286701876487397">"Autorise l\'application à recevoir des informations relatives aux transactions effectuées sur un élément sécurisé."</string>
+ <string name="permdesc_nfcTransactionEvent" msgid="1904286701876487397">"Autorise l\'appli à recevoir des informations relatives aux transactions effectuées sur un élément sécurisé."</string>
<string name="permlab_disableKeyguard" msgid="3605253559020928505">"désactiver le verrouillage de l\'écran"</string>
- <string name="permdesc_disableKeyguard" msgid="3223710003098573038">"Permet à l\'application de désactiver le verrouillage des touches et toute mesure de sécurité par mot de passe associée. Par exemple, votre téléphone désactive le verrouillage des touches lorsque vous recevez un appel, puis le réactive lorsque vous raccrochez."</string>
+ <string name="permdesc_disableKeyguard" msgid="3223710003098573038">"Permet à l\'appli de désactiver le verrouillage des touches et toute mesure de sécurité par mot de passe associée. Par exemple, votre téléphone désactive le verrouillage des touches lorsque vous recevez un appel, puis le réactive lorsque vous raccrochez."</string>
<string name="permlab_requestPasswordComplexity" msgid="1808977190557794109">"demander la complexité du verrouillage d\'écran"</string>
- <string name="permdesc_requestPasswordComplexity" msgid="1130556896836258567">"Autorise l\'application à apprendre le niveau de complexité de l\'écran de verrouillage (élevé, moyen, faible ou aucun), qui indique la gamme possible de longueur et de type de verrouillage d\'écran. L\'application peut aussi suggérer aux utilisateurs de mettre à jour l\'écran de verrouillage afin d\'utiliser un certain niveau de complexité, mais ils peuvent ignorer la suggestion. Notez que le verrouillage d\'écran n\'est pas stocké en texte brut pour de manière à ce que l\'application n\'ait pas accès au mot de passe exact."</string>
+ <string name="permdesc_requestPasswordComplexity" msgid="1130556896836258567">"Autorise l\'appli à apprendre le niveau de complexité de l\'écran de verrouillage (élevé, moyen, faible ou aucun), qui indique la gamme possible de longueur et de type de verrouillage d\'écran. L\'appli peut aussi suggérer aux utilisateurs de mettre à jour l\'écran de verrouillage afin d\'utiliser un certain niveau de complexité, mais ils peuvent ignorer la suggestion. Notez que le verrouillage d\'écran n\'est pas stocké en texte brut pour de manière à ce que l\'appli n\'ait pas accès au mot de passe exact."</string>
<string name="permlab_postNotification" msgid="4875401198597803658">"afficher les notifications"</string>
- <string name="permdesc_postNotification" msgid="5974977162462877075">"Permet à l\'application d\'afficher les notifications"</string>
+ <string name="permdesc_postNotification" msgid="5974977162462877075">"Permet à l\'appli d\'afficher les notifications"</string>
<string name="permlab_turnScreenOn" msgid="219344053664171492">"allumer l\'écran"</string>
- <string name="permdesc_turnScreenOn" msgid="4394606875897601559">"Permet à l\'application d\'allumer l\'écran."</string>
+ <string name="permdesc_turnScreenOn" msgid="4394606875897601559">"Permet à l\'appli d\'allumer l\'écran."</string>
<string name="permlab_useBiometric" msgid="6314741124749633786">"utiliser le matériel biométrique"</string>
- <string name="permdesc_useBiometric" msgid="7502858732677143410">"Permet à l\'application d\'utiliser du matériel biométrique pour l\'authentification"</string>
+ <string name="permdesc_useBiometric" msgid="7502858732677143410">"Permet à l\'appli d\'utiliser du matériel biométrique pour l\'authentification"</string>
<string name="permlab_manageFingerprint" msgid="7432667156322821178">"gérer le lecteur d\'empreintes digitales"</string>
- <string name="permdesc_manageFingerprint" msgid="2025616816437339865">"Permet à l\'application de faire appel à des méthodes d\'ajout et de suppression de modèles d\'empreinte digitale que vous pouvez utiliser."</string>
+ <string name="permdesc_manageFingerprint" msgid="2025616816437339865">"Permet à l\'appli de faire appel à des méthodes d\'ajout et de suppression de modèles d\'empreinte digitale que vous pouvez utiliser."</string>
<string name="permlab_useFingerprint" msgid="1001421069766751922">"utiliser le lecteur d\'empreintes digitales"</string>
- <string name="permdesc_useFingerprint" msgid="412463055059323742">"Permet à l\'application d\'utiliser le lecteur d\'empreintes digitales pour l\'authentification"</string>
+ <string name="permdesc_useFingerprint" msgid="412463055059323742">"Permet à l\'appli d\'utiliser le lecteur d\'empreintes digitales pour l\'authentification"</string>
<string name="permlab_audioWrite" msgid="8501705294265669405">"modifier votre collection de musique"</string>
- <string name="permdesc_audioWrite" msgid="8057399517013412431">"Autorise l\'application à modifier votre collection de musique."</string>
+ <string name="permdesc_audioWrite" msgid="8057399517013412431">"Autorise l\'appli à modifier votre collection de musique."</string>
<string name="permlab_videoWrite" msgid="5940738769586451318">"modifier votre collection de vidéos"</string>
- <string name="permdesc_videoWrite" msgid="6124731210613317051">"Autorise l\'application à modifier votre collection de vidéos."</string>
+ <string name="permdesc_videoWrite" msgid="6124731210613317051">"Autorise l\'appli à modifier votre collection de vidéos."</string>
<string name="permlab_imagesWrite" msgid="1774555086984985578">"modifier votre collection de photos"</string>
- <string name="permdesc_imagesWrite" msgid="5195054463269193317">"Autorise l\'application à modifier votre collection de photos."</string>
+ <string name="permdesc_imagesWrite" msgid="5195054463269193317">"Autorise l\'appli à modifier votre collection de photos."</string>
<string name="permlab_mediaLocation" msgid="7368098373378598066">"lire les positions issues de votre collection multimédia"</string>
- <string name="permdesc_mediaLocation" msgid="597912899423578138">"Autorise l\'application à lire les positions indiquées dans votre collection multimédia."</string>
+ <string name="permdesc_mediaLocation" msgid="597912899423578138">"Autorise l\'appli à lire les positions indiquées dans votre collection multimédia."</string>
<string name="biometric_app_setting_name" msgid="3339209978734534457">"Utiliser les données biométriques"</string>
<string name="biometric_or_screen_lock_app_setting_name" msgid="5348462421758257752">"Utiliser les données biométriques ou le verrouillage de l\'écran"</string>
<string name="biometric_dialog_default_title" msgid="55026799173208210">"Confirmez que c\'est vous"</string>
@@ -760,81 +758,81 @@
<string name="face_error_vendor_unknown" msgid="7387005932083302070">"Un problème est survenu. Réessayez."</string>
<string name="face_icon_content_description" msgid="465030547475916280">"Icône visage"</string>
<string name="permlab_readSyncSettings" msgid="6250532864893156277">"lire les paramètres de synchronisation"</string>
- <string name="permdesc_readSyncSettings" msgid="1325658466358779298">"Permet à l\'application d\'accéder aux paramètres de synchronisation d\'un compte. Par exemple, cette autorisation peut permettre de déterminer si l\'application Contacts est synchronisée avec un compte ou non."</string>
+ <string name="permdesc_readSyncSettings" msgid="1325658466358779298">"Permet à l\'appli d\'accéder aux paramètres de synchronisation d\'un compte. Par exemple, cette autorisation peut permettre de déterminer si l\'appli Contacts est synchronisée avec un compte ou non."</string>
<string name="permlab_writeSyncSettings" msgid="6583154300780427399">"activer ou désactiver la synchronisation"</string>
- <string name="permdesc_writeSyncSettings" msgid="6029151549667182687">"Permet à une application de modifier les paramètres de synchronisation d\'un compte. Cette autorisation peut, par exemple, être utilisée pour activer la synchronisation de l\'application Contacts avec un compte."</string>
+ <string name="permdesc_writeSyncSettings" msgid="6029151549667182687">"Permet à une appli de modifier les paramètres de synchronisation d\'un compte. Cette autorisation peut, par exemple, être utilisée pour activer la synchronisation de l\'appli Contacts avec un compte."</string>
<string name="permlab_readSyncStats" msgid="3747407238320105332">"lire les statistiques de synchronisation"</string>
- <string name="permdesc_readSyncStats" msgid="3867809926567379434">"Permet à une application d\'accéder aux statistiques de synchronisation d\'un compte, y compris l\'historique des événements de synchronisation et le volume de données synchronisées."</string>
+ <string name="permdesc_readSyncStats" msgid="3867809926567379434">"Permet à une appli d\'accéder aux statistiques de synchronisation d\'un compte, y compris l\'historique des événements de synchronisation et le volume de données synchronisées."</string>
<string name="permlab_sdcardRead" msgid="5791467020950064920">"lire le contenu de votre espace de stockage partagé"</string>
- <string name="permdesc_sdcardRead" msgid="6872973242228240382">"Permet à l\'application de lire le contenu de votre espace de stockage partagé."</string>
+ <string name="permdesc_sdcardRead" msgid="6872973242228240382">"Permet à l\'appli de lire le contenu de votre espace de stockage partagé."</string>
<string name="permlab_readMediaAudio" msgid="8723513075731763810">"lire des fichiers audio à partir de l\'espace de stockage partagé"</string>
- <string name="permdesc_readMediaAudio" msgid="5299772574434619399">"Permet à l\'application de lire les fichiers audio de votre espace de stockage partagé."</string>
+ <string name="permdesc_readMediaAudio" msgid="5299772574434619399">"Permet à l\'appli de lire les fichiers audio de votre espace de stockage partagé."</string>
<string name="permlab_readMediaVideo" msgid="7768003311260655007">"lire des fichiers vidéo à partir de l\'espace de stockage partagé"</string>
- <string name="permdesc_readMediaVideo" msgid="3846400073770403528">"Permet à l\'application de lire les fichiers vidéo de votre espace de stockage partagé."</string>
+ <string name="permdesc_readMediaVideo" msgid="3846400073770403528">"Permet à l\'appli de lire les fichiers vidéo de votre espace de stockage partagé."</string>
<string name="permlab_readMediaImages" msgid="4057590631020986789">"lire des fichiers d\'image à partir de l\'espace de stockage partagé"</string>
- <string name="permdesc_readMediaImages" msgid="5836219373138469259">"Permet à l\'application de lire les fichiers d\'image de votre espace de stockage partagé."</string>
+ <string name="permdesc_readMediaImages" msgid="5836219373138469259">"Permet à l\'appli de lire les fichiers d\'image de votre espace de stockage partagé."</string>
<string name="permlab_readVisualUserSelect" msgid="5516204215354667586">"lire les fichiers d\'images et de vidéos sélectionnés par l\'utilisateur dans l\'espace de stockage partagé"</string>
- <string name="permdesc_readVisualUserSelect" msgid="8027174717714968217">"Permet à l\'application de lire les fichiers d\'images et de vidéos que vous sélectionnez dans votre espace de stockage partagé."</string>
+ <string name="permdesc_readVisualUserSelect" msgid="8027174717714968217">"Permet à l\'appli de lire les fichiers d\'images et de vidéos que vous sélectionnez dans votre espace de stockage partagé."</string>
<string name="permlab_sdcardWrite" msgid="4863021819671416668">"modifier ou supprimer le contenu de votre espace de stockage partagé"</string>
- <string name="permdesc_sdcardWrite" msgid="8376047679331387102">"Autorise l\'application à écrire le contenu de votre espace de stockage partagé."</string>
+ <string name="permdesc_sdcardWrite" msgid="8376047679331387102">"Autorise l\'appli à écrire le contenu de votre espace de stockage partagé."</string>
<string name="permlab_use_sip" msgid="8250774565189337477">"faire et recevoir des appels SIP"</string>
- <string name="permdesc_use_sip" msgid="3590270893253204451">"Autorise l\'application à effectuer et à recevoir des appels SIP."</string>
+ <string name="permdesc_use_sip" msgid="3590270893253204451">"Autorise l\'appli à effectuer et à recevoir des appels SIP."</string>
<string name="permlab_register_sim_subscription" msgid="1653054249287576161">"enregistrer de nouvelles connexions de télécommunication à l\'aide de la carte SIM"</string>
- <string name="permdesc_register_sim_subscription" msgid="4183858662792232464">"Permettre à l\'application d\'enregistrer de nouvelles connexions de télécommunication à l\'aide de la carte SIM"</string>
+ <string name="permdesc_register_sim_subscription" msgid="4183858662792232464">"Permettre à l\'appli d\'enregistrer de nouvelles connexions de télécommunication à l\'aide de la carte SIM"</string>
<string name="permlab_register_call_provider" msgid="6135073566140050702">"enregistrer de nouvelles connexions de télécommunication"</string>
- <string name="permdesc_register_call_provider" msgid="4201429251459068613">"Permettre à l\'application d\'enregistrer de nouvelles connexions de télécommunication"</string>
+ <string name="permdesc_register_call_provider" msgid="4201429251459068613">"Permettre à l\'appli d\'enregistrer de nouvelles connexions de télécommunication"</string>
<string name="permlab_connection_manager" msgid="3179365584691166915">"gérer les connexions de télécommunication"</string>
- <string name="permdesc_connection_manager" msgid="1426093604238937733">"Permettre à l\'application de gérer les connexions de télécommunication"</string>
+ <string name="permdesc_connection_manager" msgid="1426093604238937733">"Permettre à l\'appli de gérer les connexions de télécommunication"</string>
<string name="permlab_bind_incall_service" msgid="5990625112603493016">"interagir avec l\'écran d\'appel"</string>
- <string name="permdesc_bind_incall_service" msgid="4124917526967765162">"Permet à l\'application de contrôler quand et comment l\'écran d\'appel s\'affiche."</string>
+ <string name="permdesc_bind_incall_service" msgid="4124917526967765162">"Permet à l\'appli de contrôler quand et comment l\'écran d\'appel s\'affiche."</string>
<string name="permlab_bind_connection_service" msgid="5409268245525024736">"interagir avec les services de téléphonie"</string>
- <string name="permdesc_bind_connection_service" msgid="6261796725253264518">"Permet à l\'application d\'interagir avec les services de téléphonie afin de faire et de recevoir des appels."</string>
+ <string name="permdesc_bind_connection_service" msgid="6261796725253264518">"Permet à l\'appli d\'interagir avec les services de téléphonie afin de faire et de recevoir des appels."</string>
<string name="permlab_control_incall_experience" msgid="6436863486094352987">"fournir une expérience utilisateur pendant l\'appel"</string>
- <string name="permdesc_control_incall_experience" msgid="5896723643771737534">"Permet à l\'application de fournir une expérience utilisateur pendant l\'appel."</string>
+ <string name="permdesc_control_incall_experience" msgid="5896723643771737534">"Permet à l\'appli de fournir une expérience utilisateur pendant l\'appel."</string>
<string name="permlab_readNetworkUsageHistory" msgid="8470402862501573795">"lire l\'historique d\'utilisation de réseaux"</string>
- <string name="permdesc_readNetworkUsageHistory" msgid="1112962304941637102">"Permet à l\'application de lire l\'historique d\'utilisation de réseaux et d\'applications particuliers."</string>
+ <string name="permdesc_readNetworkUsageHistory" msgid="1112962304941637102">"Permet à l\'appli de lire l\'historique d\'utilisation de réseaux et d\'applis particuliers."</string>
<string name="permlab_manageNetworkPolicy" msgid="6872549423152175378">"gérer les politiques du réseau"</string>
- <string name="permdesc_manageNetworkPolicy" msgid="1865663268764673296">"Permet à l\'application de gérer les politiques du réseau et de définir celles propres à l\'application"</string>
+ <string name="permdesc_manageNetworkPolicy" msgid="1865663268764673296">"Permet à l\'appli de gérer les politiques du réseau et de définir celles propres à l\'appli"</string>
<string name="permlab_modifyNetworkAccounting" msgid="7448790834938749041">"modifier le système d\'analyse de l\'utilisation du réseau"</string>
- <string name="permdesc_modifyNetworkAccounting" msgid="5076042642247205390">"Permet à l\'application de modifier le système d\'analyse de l\'utilisation du réseau par les autres applications. Les applications standards ne doivent pas utiliser cette fonctionnalité."</string>
+ <string name="permdesc_modifyNetworkAccounting" msgid="5076042642247205390">"Permet à l\'appli de modifier le système d\'analyse de l\'utilisation du réseau par les autres applis. Les applis standards ne doivent pas utiliser cette fonctionnalité."</string>
<string name="permlab_accessNotifications" msgid="7130360248191984741">"accéder aux notifications"</string>
- <string name="permdesc_accessNotifications" msgid="761730149268789668">"Permet aux applications de récupérer, d\'examiner et d\'autoriser les notifications, y compris celles envoyées par d\'autres applications."</string>
+ <string name="permdesc_accessNotifications" msgid="761730149268789668">"Permet aux applis de récupérer, d\'examiner et d\'autoriser les notifications, y compris celles envoyées par d\'autres applis."</string>
<string name="permlab_bindNotificationListenerService" msgid="5848096702733262458">"s\'associer à l\'interface de niveau supérieur d\'un service d\'écoute des notifications"</string>
- <string name="permdesc_bindNotificationListenerService" msgid="4970553694467137126">"Permet à l\'application de s\'associer à l\'interface de niveau supérieur d\'un service d\'écoute des notifications. Ne devrait jamais être nécessaire pour les applications normales."</string>
+ <string name="permdesc_bindNotificationListenerService" msgid="4970553694467137126">"Permet à l\'appli de s\'associer à l\'interface de niveau supérieur d\'un service d\'écoute des notifications. Ne devrait jamais être nécessaire pour les applis normales."</string>
<string name="permlab_bindConditionProviderService" msgid="5245421224814878483">"s\'associer à un service de fournisseur de conditions"</string>
- <string name="permdesc_bindConditionProviderService" msgid="6106018791256120258">"Permet à l\'application de s\'associer à l\'interface de niveau supérieur d\'un service de fournisseur de conditions. Ne devrait pas être nécessaire pour les applications standards."</string>
+ <string name="permdesc_bindConditionProviderService" msgid="6106018791256120258">"Permet à l\'appli de s\'associer à l\'interface de niveau supérieur d\'un service de fournisseur de conditions. Ne devrait pas être nécessaire pour les applis standards."</string>
<string name="permlab_bindDreamService" msgid="4776175992848982706">"associer à un service de rêve"</string>
- <string name="permdesc_bindDreamService" msgid="9129615743300572973">"Permet à l\'application autorisée de s\'associer à l\'interface de plus haut niveau d\'un service de rêve. Les applications standard ne devraient pas avoir recours à cette fonctionnalité."</string>
- <string name="permlab_invokeCarrierSetup" msgid="5098810760209818140">"faire appel à l\'application de configuration du fournisseur de services"</string>
- <string name="permdesc_invokeCarrierSetup" msgid="4790845896063237887">"Permet à l\'application autorisée de faire appel à l\'application de configuration fournie par le fournisseur de services. Cette fonctionnalité ne devrait pas être nécessaire pour les applications standards."</string>
+ <string name="permdesc_bindDreamService" msgid="9129615743300572973">"Permet à l\'appli autorisée de s\'associer à l\'interface de plus haut niveau d\'un service de rêve. Les applis standard ne devraient pas avoir recours à cette fonctionnalité."</string>
+ <string name="permlab_invokeCarrierSetup" msgid="5098810760209818140">"faire appel à l\'appli de configuration du fournisseur de services"</string>
+ <string name="permdesc_invokeCarrierSetup" msgid="4790845896063237887">"Permet à l\'appli autorisée de faire appel à l\'appli de configuration fournie par le fournisseur de services. Cette fonctionnalité ne devrait pas être nécessaire pour les applis standards."</string>
<string name="permlab_accessNetworkConditions" msgid="1270732533356286514">"détecter des observations sur les conditions du réseau"</string>
- <string name="permdesc_accessNetworkConditions" msgid="2959269186741956109">"Permet à une application de détecter les observations sur les conditions du réseau. Ne devrait jamais être nécessaire pour les applications standards."</string>
+ <string name="permdesc_accessNetworkConditions" msgid="2959269186741956109">"Permet à une appli de détecter les observations sur les conditions du réseau. Ne devrait jamais être nécessaire pour les applis standards."</string>
<string name="permlab_setInputCalibration" msgid="932069700285223434">"modifier le calibrage du périphérique d\'entrée"</string>
- <string name="permdesc_setInputCalibration" msgid="2937872391426631726">"Permet à l\'application de modifier les paramètres de calibrage de l\'écran tactile. Ne devrait jamais être nécessaire pour les applications standards."</string>
+ <string name="permdesc_setInputCalibration" msgid="2937872391426631726">"Permet à l\'appli de modifier les paramètres de calibrage de l\'écran tactile. Ne devrait jamais être nécessaire pour les applis standards."</string>
<string name="permlab_accessDrmCertificates" msgid="6473765454472436597">"accéder aux certificats GDN"</string>
- <string name="permdesc_accessDrmCertificates" msgid="6983139753493781941">"Permet à une application de fournir et d\'utiliser les certificats de GDN. Cela ne devrait jamais être nécessaire pour les applications normales."</string>
+ <string name="permdesc_accessDrmCertificates" msgid="6983139753493781941">"Permet à une appli de fournir et d\'utiliser les certificats de GDN. Cela ne devrait jamais être nécessaire pour les applis normales."</string>
<string name="permlab_handoverStatus" msgid="7620438488137057281">"recevoir des données sur l\'état du transfert Android Beam"</string>
- <string name="permdesc_handoverStatus" msgid="3842269451732571070">"Autoriser cette application à recevoir des données sur les transferts Android Beam en cours"</string>
+ <string name="permdesc_handoverStatus" msgid="3842269451732571070">"Autoriser cette appli à recevoir des données sur les transferts Android Beam en cours"</string>
<string name="permlab_removeDrmCertificates" msgid="710576248717404416">"supprimer des certificats GDN"</string>
- <string name="permdesc_removeDrmCertificates" msgid="4068445390318355716">"Permet à une application de supprimer les certificats GDN. Cela ne devrait jamais être nécessaire pour des applications normales."</string>
+ <string name="permdesc_removeDrmCertificates" msgid="4068445390318355716">"Permet à une appli de supprimer les certificats GDN. Cela ne devrait jamais être nécessaire pour des applis normales."</string>
<string name="permlab_bindCarrierMessagingService" msgid="3363450860593096967">"s\'associer à un service de messagerie d\'un fournisseur"</string>
- <string name="permdesc_bindCarrierMessagingService" msgid="6316457028173478345">"Permet à l\'application autorisée de s\'associer à l\'interface de plus haut niveau d\'un service de messagerie d\'un fournisseur. Les applications standards ne devraient jamais avoir recours à cette fonctionnalité."</string>
+ <string name="permdesc_bindCarrierMessagingService" msgid="6316457028173478345">"Permet à l\'appli autorisée de s\'associer à l\'interface de plus haut niveau d\'un service de messagerie d\'un fournisseur. Les applis standards ne devraient jamais avoir recours à cette fonctionnalité."</string>
<string name="permlab_bindCarrierServices" msgid="2395596978626237474">"s\'associer aux services d\'un fournisseur"</string>
- <string name="permdesc_bindCarrierServices" msgid="9185614481967262900">"Permet à l\'application autorisée de s\'associer aux services d\'un fournisseur. Ne devrait pas être nécessaire pour les applications standards."</string>
+ <string name="permdesc_bindCarrierServices" msgid="9185614481967262900">"Permet à l\'appli autorisée de s\'associer aux services d\'un fournisseur. Ne devrait pas être nécessaire pour les applis standards."</string>
<string name="permlab_access_notification_policy" msgid="5524112842876975537">"accéder au mode Ne pas déranger"</string>
- <string name="permdesc_access_notification_policy" msgid="8538374112403845013">"Permet à l\'application de consulter et de modifier la configuration du mode Ne pas déranger."</string>
+ <string name="permdesc_access_notification_policy" msgid="8538374112403845013">"Permet à l\'appli de consulter et de modifier la configuration du mode Ne pas déranger."</string>
<string name="permlab_startViewPermissionUsage" msgid="1504564328641112341">"démarrer l\'affichage de l\'usage des autorisations"</string>
- <string name="permdesc_startViewPermissionUsage" msgid="2820325605959586538">"Permet au détenteur de démarrer l\'usage des autorisations pour une application. Cette fonctionnalité ne devrait pas être nécessaire pour les applications standards."</string>
+ <string name="permdesc_startViewPermissionUsage" msgid="2820325605959586538">"Permet au détenteur de démarrer l\'usage des autorisations pour une appli. Cette fonctionnalité ne devrait pas être nécessaire pour les applis standards."</string>
<string name="permlab_startReviewPermissionDecisions" msgid="8690578688476599284">"démarrer les décisions d\'autorisation de lecture"</string>
- <string name="permdesc_startReviewPermissionDecisions" msgid="2775556853503004236">"Permet au détenteur de démarrer l\'écran pour revoir les décisions d\'autorisation. Ne devrait pas être requis pour les applications standards."</string>
- <string name="permlab_startViewAppFeatures" msgid="7955084203185903001">"démarrer l\'affichage des fonctionnalités de l\'application"</string>
- <string name="permdesc_startViewAppFeatures" msgid="7207240860165206107">"Permet au détenteur de commencer à afficher les renseignements sur les fonctionnalités d\'une application."</string>
+ <string name="permdesc_startReviewPermissionDecisions" msgid="2775556853503004236">"Permet au détenteur de démarrer l\'écran pour revoir les décisions d\'autorisation. Ne devrait pas être requis pour les applis standards."</string>
+ <string name="permlab_startViewAppFeatures" msgid="7955084203185903001">"démarrer l\'affichage des fonctionnalités de l\'appli"</string>
+ <string name="permdesc_startViewAppFeatures" msgid="7207240860165206107">"Permet au détenteur de commencer à afficher les renseignements sur les fonctionnalités d\'une appli."</string>
<string name="permlab_highSamplingRateSensors" msgid="3941068435726317070">"accéder aux données des capteurs à un taux d’échantillonnage élevé"</string>
- <string name="permdesc_highSamplingRateSensors" msgid="8430061978931155995">"Permet à l’application d’échantillonner les données des capteurs à une fréquence supérieure à 200 Hz"</string>
- <string name="permlab_updatePackagesWithoutUserAction" msgid="3363272609642618551">"Mettre à jour l\'application sans intervention de l\'utilisateur"</string>
- <string name="permdesc_updatePackagesWithoutUserAction" msgid="4567739631260526366">"Permet à une application précédemment installée de se mettre à jour sans intervention de l\'utilisateur"</string>
- <string name="permlab_writeVerificationStateE2eeContactKeys" msgid="3990742344778360457">"mettre à jour les états des vérifications des clés de contact chiffrées de bout en bout qui appartiennent à d\'autres applications"</string>
- <string name="permdesc_writeVerificationStateE2eeContactKeys" msgid="8453156829747427041">"Autorise l\'application à mettre à jour les états des vérifications des clés de contact chiffrées de bout en bout qui appartiennent à d\'autres applications"</string>
+ <string name="permdesc_highSamplingRateSensors" msgid="8430061978931155995">"Permet à l’appli d’échantillonner les données des capteurs à une fréquence supérieure à 200 Hz"</string>
+ <string name="permlab_updatePackagesWithoutUserAction" msgid="3363272609642618551">"Mettre à jour l\'appli sans intervention de l\'utilisateur"</string>
+ <string name="permdesc_updatePackagesWithoutUserAction" msgid="4567739631260526366">"Permet à une appli précédemment installée de se mettre à jour sans intervention de l\'utilisateur"</string>
+ <string name="permlab_writeVerificationStateE2eeContactKeys" msgid="3990742344778360457">"mettre à jour les états des vérifications des clés de contact chiffrées de bout en bout qui appartiennent à d\'autres applis"</string>
+ <string name="permdesc_writeVerificationStateE2eeContactKeys" msgid="8453156829747427041">"Autorise l\'appli à mettre à jour les états des vérifications des clés de contact chiffrées de bout en bout qui appartiennent à d\'autres applis"</string>
<string name="policylab_limitPassword" msgid="4851829918814422199">"Définir les règles du mot de passe"</string>
<string name="policydesc_limitPassword" msgid="4105491021115793793">"Gérer le nombre et le type de caractères autorisés dans les mots de passe et les NIP de verrouillage de l\'écran."</string>
<string name="policylab_watchLogin" msgid="7599669460083719504">"Gérer les tentatives de déverrouillage de l\'écran"</string>
@@ -866,7 +864,7 @@
<string name="policylab_expirePassword" msgid="6015404400532459169">"Déf. expir. m. passe verr. écr."</string>
<string name="policydesc_expirePassword" msgid="9136524319325960675">"Modifier la fréquence de modification du mot de passe, du NIP ou du schéma de verrouillage de l\'écran."</string>
<string name="policylab_encryptedStorage" msgid="9012936958126670110">"Définir cryptage du stockage"</string>
- <string name="policydesc_encryptedStorage" msgid="1102516950740375617">"Exiger le chiffrement des données d\'application stockées"</string>
+ <string name="policydesc_encryptedStorage" msgid="1102516950740375617">"Exiger le chiffrement des données d\'appli stockées"</string>
<string name="policylab_disableCamera" msgid="5749486347810162018">"Désactiver les appareils photo"</string>
<string name="policydesc_disableCamera" msgid="3204405908799676104">"Empêcher l\'utilisation de tous les appareils photos"</string>
<string name="policylab_disableKeyguardFeatures" msgid="5071855750149949741">"Désact. fonctions verr. écran"</string>
@@ -984,7 +982,7 @@
<string name="sipAddressTypeHome" msgid="5918441930656878367">"Domicile"</string>
<string name="sipAddressTypeWork" msgid="7873967986701216770">"Travail"</string>
<string name="sipAddressTypeOther" msgid="6317012577345187275">"Autre"</string>
- <string name="quick_contacts_not_available" msgid="1262709196045052223">"Aucune application permettant d\'afficher ce contact n\'a été trouvée."</string>
+ <string name="quick_contacts_not_available" msgid="1262709196045052223">"Aucune appli permettant d\'afficher ce contact n\'a été trouvée."</string>
<string name="keyguard_password_enter_pin_code" msgid="6401406801060956153">"Saisissez le NIP."</string>
<string name="keyguard_password_enter_puk_code" msgid="3112256684547584093">"Saisissez la clé PUK et le nouveau NIP."</string>
<string name="keyguard_password_enter_puk_prompt" msgid="2825313071899938305">"Clé PUK"</string>
@@ -1102,9 +1100,9 @@
<string name="js_dialog_before_unload" msgid="7213364985774778744">"<xliff:g id="MESSAGE">%s</xliff:g>\n\nVoulez-vous vraiment quitter cette page?"</string>
<string name="autofill_window_title" msgid="4379134104008111961">"Remplissage automatique avec <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
<string name="permlab_setAlarm" msgid="1158001610254173567">"définir une alarme"</string>
- <string name="permdesc_setAlarm" msgid="2185033720060109640">"Permet à l\'application de régler la sonnerie d\'une fonction de réveil installée sur votre appareil. Cette fonctionnalité n\'est pas compatible avec toutes les applications de réveils."</string>
+ <string name="permdesc_setAlarm" msgid="2185033720060109640">"Permet à l\'appli de régler la sonnerie d\'une fonction de réveil installée sur votre appareil. Cette fonctionnalité n\'est pas compatible avec toutes les applis de réveils."</string>
<string name="permlab_addVoicemail" msgid="4770245808840814471">"ajouter des messages vocaux"</string>
- <string name="permdesc_addVoicemail" msgid="5470312139820074324">"Permet à l\'application d\'ajouter des messages à votre messagerie vocale."</string>
+ <string name="permdesc_addVoicemail" msgid="5470312139820074324">"Permet à l\'appli d\'ajouter des messages à votre messagerie vocale."</string>
<string name="pasted_from_clipboard" msgid="7355790625710831847">"<xliff:g id="PASTING_APP_NAME">%1$s</xliff:g> a collé du contenu de votre presse-papiers"</string>
<string name="more_item_label" msgid="7419249600215749115">"Plus"</string>
<string name="prepend_shortcut_label" msgid="1743716737502867951">"Menu+"</string>
@@ -1201,7 +1199,7 @@
<string name="low_internal_storage_view_text" msgid="8172166728369697835">"Il est possible que certaines fonctionnalités du système ne soient pas opérationnelles."</string>
<string name="low_internal_storage_view_text_no_boot" msgid="7368968163411251788">"Espace de stockage insuffisant pour le système. Assurez-vous de disposer de 250 Mo d\'espace libre, puis redémarrez."</string>
<string name="app_running_notification_title" msgid="8985999749231486569">"<xliff:g id="APP_NAME">%1$s</xliff:g> en cours d\'exécution"</string>
- <string name="app_running_notification_text" msgid="5120815883400228566">"Touchez pour en savoir plus ou pour arrêter l\'application."</string>
+ <string name="app_running_notification_text" msgid="5120815883400228566">"Touchez pour en savoir plus ou pour arrêter l\'appli."</string>
<string name="ok" msgid="2646370155170753815">"OK"</string>
<string name="cancel" msgid="6908697720451760115">"Annuler"</string>
<string name="yes" msgid="9069828999585032361">"OK"</string>
@@ -1236,28 +1234,28 @@
<string name="whichSendToApplication" msgid="77101541959464018">"Envoyer avec"</string>
<string name="whichSendToApplicationNamed" msgid="3385686512014670003">"Envoyer avec %1$s"</string>
<string name="whichSendToApplicationLabel" msgid="3543240188816513303">"Envoyer"</string>
- <string name="whichHomeApplication" msgid="8276350727038396616">"Sélectionner une application pour l\'écran d\'accueil"</string>
+ <string name="whichHomeApplication" msgid="8276350727038396616">"Sélectionner une appli pour l\'écran d\'accueil"</string>
<string name="whichHomeApplicationNamed" msgid="5855990024847433794">"Utiliser %1$s comme écran d\'accueil"</string>
<string name="whichHomeApplicationLabel" msgid="8907334282202933959">"Enregistrer l\'image"</string>
<string name="whichImageCaptureApplication" msgid="2737413019463215284">"Enregistrer l\'image avec"</string>
<string name="whichImageCaptureApplicationNamed" msgid="8820702441847612202">"Enregistrer l\'image avec %1$s"</string>
<string name="whichImageCaptureApplicationLabel" msgid="6505433734824988277">"Enregistrer l\'image"</string>
- <string name="alwaysUse" msgid="3153558199076112903">"Utiliser cette application par défaut pour cette action"</string>
+ <string name="alwaysUse" msgid="3153558199076112903">"Utiliser cette appli par défaut pour cette action"</string>
<string name="use_a_different_app" msgid="4987790276170972776">"Utiliser une appli différente"</string>
- <string name="clearDefaultHintMsg" msgid="1325866337702524936">"Pour supprimer les valeurs par défaut, accédez à Paramètres système &gt; Applications &gt; Téléchargements."</string>
+ <string name="clearDefaultHintMsg" msgid="1325866337702524936">"Pour supprimer les valeurs par défaut, accédez à Paramètres système &gt; Applis &gt; Téléchargements."</string>
<string name="chooseActivity" msgid="8563390197659779956">"Sélectionnez une action"</string>
- <string name="chooseUsbActivity" msgid="2096269989990986612">"Sélectionnez une application pour le périphérique de stockage USB"</string>
- <string name="noApplications" msgid="1186909265235544019">"Aucune application ne peut effectuer cette action."</string>
+ <string name="chooseUsbActivity" msgid="2096269989990986612">"Sélectionnez une appli pour le périphérique de stockage USB"</string>
+ <string name="noApplications" msgid="1186909265235544019">"Aucune appli ne peut effectuer cette action."</string>
<string name="aerr_application" msgid="4090916809370389109">"<xliff:g id="APPLICATION">%1$s</xliff:g> a cessé de fonctionner"</string>
<string name="aerr_process" msgid="4268018696970966407">"<xliff:g id="PROCESS">%1$s</xliff:g> a cessé de fonctionner"</string>
<string name="aerr_application_repeated" msgid="7804378743218496566">"<xliff:g id="APPLICATION">%1$s</xliff:g> plante continuellement"</string>
<string name="aerr_process_repeated" msgid="1153152413537954974">"<xliff:g id="PROCESS">%1$s</xliff:g> plante continuellement"</string>
- <string name="aerr_restart" msgid="2789618625210505419">"Rouvrir l\'application"</string>
+ <string name="aerr_restart" msgid="2789618625210505419">"Rouvrir l\'appli"</string>
<string name="aerr_report" msgid="3095644466849299308">"Envoyer des commentaires"</string>
<string name="aerr_close" msgid="3398336821267021852">"Fermer"</string>
<string name="aerr_mute" msgid="2304972923480211376">"Désactiver jusqu\'au redémarrage de l\'appareil"</string>
<string name="aerr_wait" msgid="3198677780474548217">"Attendre"</string>
- <string name="aerr_close_app" msgid="8318883106083050970">"Fermer l\'application"</string>
+ <string name="aerr_close_app" msgid="8318883106083050970">"Fermer l\'appli"</string>
<string name="anr_title" msgid="7290329487067300120"></string>
<string name="anr_activity_application" msgid="8121716632960340680">"<xliff:g id="APPLICATION">%2$s</xliff:g> ne répond pas"</string>
<string name="anr_activity_process" msgid="3477362583767128667">"<xliff:g id="ACTIVITY">%1$s</xliff:g> ne répond pas"</string>
@@ -1267,18 +1265,18 @@
<string name="report" msgid="2149194372340349521">"Signaler"</string>
<string name="wait" msgid="7765985809494033348">"Attendre"</string>
<string name="webpage_unresponsive" msgid="7850879412195273433">"La page ne répond pas.\n \nVoulez-vous la fermer?"</string>
- <string name="launch_warning_title" msgid="6725456009564953595">"Application redirigée"</string>
+ <string name="launch_warning_title" msgid="6725456009564953595">"Appli redirigée"</string>
<string name="launch_warning_replace" msgid="3073392976283203402">"<xliff:g id="APP_NAME">%1$s</xliff:g> est maintenant lancée."</string>
- <string name="launch_warning_original" msgid="3332206576800169626">"L\'application <xliff:g id="APP_NAME">%1$s</xliff:g> a été lancée initialement."</string>
+ <string name="launch_warning_original" msgid="3332206576800169626">"L\'appli <xliff:g id="APP_NAME">%1$s</xliff:g> a été lancée initialement."</string>
<string name="screen_compat_mode_scale" msgid="8627359598437527726">"Redimensionner"</string>
<string name="screen_compat_mode_show" msgid="5080361367584709857">"Toujours afficher"</string>
- <string name="screen_compat_mode_hint" msgid="4032272159093750908">"Réactivez ce mode en accédant à Paramètres système &gt; Applications &gt; Téléchargements"</string>
+ <string name="screen_compat_mode_hint" msgid="4032272159093750908">"Réactivez ce mode en accédant à Paramètres système &gt; Applis &gt; Téléchargements"</string>
<string name="unsupported_display_size_message" msgid="7265211375269394699">"<xliff:g id="APP_NAME">%1$s</xliff:g> n\'est pas compatible avec le paramètre de taille d\'affichage actuel et peut se comporter de manière inattendue."</string>
<string name="unsupported_display_size_show" msgid="980129850974919375">"Toujours afficher"</string>
- <string name="unsupported_compile_sdk_message" msgid="7326293500707890537">"<xliff:g id="APP_NAME">%1$s</xliff:g> a été conçue pour une version incompatible du système d\'exploitation Android et peut se comporter de manière inattendue. Il se peut qu\'une version mise à jour de l\'application soit proposée."</string>
+ <string name="unsupported_compile_sdk_message" msgid="7326293500707890537">"<xliff:g id="APP_NAME">%1$s</xliff:g> a été conçue pour une version incompatible du système d\'exploitation Android et peut se comporter de manière inattendue. Il se peut qu\'une version mise à jour de l\'appli soit proposée."</string>
<string name="unsupported_compile_sdk_show" msgid="1601210057960312248">"Toujours afficher"</string>
<string name="unsupported_compile_sdk_check_update" msgid="1103639989147664456">"Vérifier la présence de mises à jour"</string>
- <string name="smv_application" msgid="3775183542777792638">"L\'application <xliff:g id="APPLICATION">%1$s</xliff:g> (du processus <xliff:g id="PROCESS">%2$s</xliff:g>) a enfreint ses propres règles du mode strict."</string>
+ <string name="smv_application" msgid="3775183542777792638">"L\'appli <xliff:g id="APPLICATION">%1$s</xliff:g> (du processus <xliff:g id="PROCESS">%2$s</xliff:g>) a enfreint ses propres règles du mode strict."</string>
<string name="smv_process" msgid="1398801497130695446">"Le processus <xliff:g id="PROCESS">%1$s</xliff:g> a enfreint ses propres règles du mode strict."</string>
<string name="android_upgrading_title" product="default" msgid="7279077384220829683">"Mise à jour du téléphone en cours…"</string>
<string name="android_upgrading_title" product="tablet" msgid="4268417249079938805">"Mise à jour de la tablette en cours…"</string>
@@ -1290,7 +1288,7 @@
<string name="android_upgrading_notification_title" product="default" msgid="3509927005342279257">"Finalisation de la m. à j. syst. en cours…"</string>
<string name="app_upgrading_toast" msgid="1016267296049455585">"Mise à niveau de <xliff:g id="APPLICATION">%1$s</xliff:g> en cours…"</string>
<string name="android_preparing_apk" msgid="589736917792300956">"Préparation de <xliff:g id="APPNAME">%1$s</xliff:g> en cours…"</string>
- <string name="android_upgrading_starting_apps" msgid="6206161195076057075">"Lancement des applications…"</string>
+ <string name="android_upgrading_starting_apps" msgid="6206161195076057075">"Lancement des applis…"</string>
<string name="android_upgrading_complete" msgid="409800058018374746">"Finalisation de la mise à jour."</string>
<string name="fp_power_button_enrollment_message" msgid="5648173517663246140">"Vous avez appuyé sur le l\'interrupteur – cette action éteint habituellement l\'écran.\n\nEssayez de toucher légèrement pendant la configuration de votre empreinte digitale."</string>
<string name="fp_power_button_enrollment_title" msgid="6976841690455338563">"Pour terminer, éteignez l\'écran"</string>
@@ -1310,9 +1308,9 @@
<string name="dump_heap_ready_notification" msgid="2302452262927390268">"L\'empreinte de mémoire <xliff:g id="PROC">%1$s</xliff:g> est prête"</string>
<string name="dump_heap_notification_detail" msgid="8431586843001054050">"L\'empreinte de mémoire a été recueillie. Touchez ici pour la partager."</string>
<string name="dump_heap_title" msgid="4367128917229233901">"Partager l\'empreinte de mémoire?"</string>
- <string name="dump_heap_text" msgid="1692649033835719336">"Le processus <xliff:g id="PROC">%1$s</xliff:g> a dépassé sa limite de mémoire de <xliff:g id="SIZE">%2$s</xliff:g>. Vous pouvez partager son empreinte de mémoire avec son développeur. Attention : Cette empreinte peut contenir certains de vos renseignements personnels auxquels l\'application a accès."</string>
+ <string name="dump_heap_text" msgid="1692649033835719336">"Le processus <xliff:g id="PROC">%1$s</xliff:g> a dépassé sa limite de mémoire de <xliff:g id="SIZE">%2$s</xliff:g>. Vous pouvez partager son empreinte de mémoire avec son développeur. Attention : Cette empreinte peut contenir certains de vos renseignements personnels auxquels l\'appli a accès."</string>
<string name="dump_heap_system_text" msgid="6805155514925350849">"Le processus <xliff:g id="PROC">%1$s</xliff:g> a dépassé sa limite de mémoire de <xliff:g id="SIZE">%2$s</xliff:g>. Vous pouvez partager son empreinte de mémoire. Attention : Cette empreinte peut contenir des renseignements personnels auxquels le processus a accès, y compris du texte que vous avez entré."</string>
- <string name="dump_heap_ready_text" msgid="5849618132123045516">"Une empreinte de mémoire du processus lié à l\'application <xliff:g id="PROC">%1$s</xliff:g> peut être partagée. Attention : Cette empreinte peut contenir des renseignements personnels auxquels le processus a accès, y compris du texte que vous avez entré."</string>
+ <string name="dump_heap_ready_text" msgid="5849618132123045516">"Une empreinte de mémoire du processus lié à l\'appli <xliff:g id="PROC">%1$s</xliff:g> peut être partagée. Attention : Cette empreinte peut contenir des renseignements personnels auxquels le processus a accès, y compris du texte que vous avez entré."</string>
<string name="sendText" msgid="493003724401350724">"Sélectionner une action pour le texte"</string>
<string name="volume_ringtone" msgid="134784084629229029">"Volume de la sonnerie"</string>
<string name="volume_music" msgid="7727274216734955095">"Volume du contenu multimédia"</string>
@@ -1361,7 +1359,7 @@
<string name="decline" msgid="6490507610282145874">"Refuser"</string>
<string name="select_character" msgid="3352797107930786979">"Insérer un caractère"</string>
<string name="sms_control_title" msgid="4748684259903148341">"Envoi de messages SMS"</string>
- <string name="sms_control_message" msgid="6574313876316388239">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; envoie un grand nombre de SMS. Autorisez-vous cette application à poursuivre l\'envoi des messages?"</string>
+ <string name="sms_control_message" msgid="6574313876316388239">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; envoie un grand nombre de SMS. Autorisez-vous cette appli à poursuivre l\'envoi des messages?"</string>
<string name="sms_control_yes" msgid="4858845109269524622">"Autoriser"</string>
<string name="sms_control_no" msgid="4845717880040355570">"Refuser"</string>
<string name="sms_short_code_confirm_message" msgid="1385416688897538724">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; souhaite envoyer un message à &lt;b&gt;<xliff:g id="DEST_ADDRESS">%2$s</xliff:g>&lt;/b&gt;."</string>
@@ -1370,7 +1368,7 @@
<string name="sms_short_code_confirm_allow" msgid="920477594325526691">"Envoyer"</string>
<string name="sms_short_code_confirm_deny" msgid="1356917469323768230">"Annuler"</string>
<string name="sms_short_code_remember_choice" msgid="1374526438647744862">"Mémoriser mon choix"</string>
- <string name="sms_short_code_remember_undo_instruction" msgid="2620984439143080410">"Pour modifier : Paramètres &gt; Applications"</string>
+ <string name="sms_short_code_remember_undo_instruction" msgid="2620984439143080410">"Pour modifier : Paramètres &gt; Applis"</string>
<string name="sms_short_code_confirm_always_allow" msgid="2223014893129755950">"Toujours autoriser"</string>
<string name="sms_short_code_confirm_never_allow" msgid="2688828813521652079">"Ne jamais autoriser"</string>
<string name="sim_removed_title" msgid="1349026474932481037">"Carte SIM retirée"</string>
@@ -1380,9 +1378,9 @@
<string name="sim_added_message" msgid="6602906609509958680">"Redémarrez votre appareil pour accéder au réseau mobile."</string>
<string name="sim_restart_button" msgid="8481803851341190038">"Redémarrer"</string>
<string name="install_carrier_app_notification_title" msgid="5712723402213090102">"Activer le service cellulaire"</string>
- <string name="install_carrier_app_notification_text" msgid="2781317581274192728">"Téléchargez l\'application du fournisseur de services pour activer votre nouvelle carte SIM"</string>
- <string name="install_carrier_app_notification_text_app_name" msgid="4086877327264106484">"Téléchargez l\'application de <xliff:g id="APP_NAME">%1$s</xliff:g> pour activer votre nouvelle carte SIM"</string>
- <string name="install_carrier_app_notification_button" msgid="6257740533102594290">"Télécharger l\'application"</string>
+ <string name="install_carrier_app_notification_text" msgid="2781317581274192728">"Téléchargez l\'appli du fournisseur de services pour activer votre nouvelle carte SIM"</string>
+ <string name="install_carrier_app_notification_text_app_name" msgid="4086877327264106484">"Téléchargez l\'appli de <xliff:g id="APP_NAME">%1$s</xliff:g> pour activer votre nouvelle carte SIM"</string>
+ <string name="install_carrier_app_notification_button" msgid="6257740533102594290">"Télécharger l\'appli"</string>
<string name="carrier_app_notification_title" msgid="5815477368072060250">"Nouvelle carte SIM insérée"</string>
<string name="carrier_app_notification_text" msgid="6567057546341958637">"Touchez ici pour effectuer la configuration"</string>
<string name="time_picker_dialog_title" msgid="9053376764985220821">"Définir l\'heure"</string>
@@ -1414,10 +1412,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Sélectionnez cette option pour désactiver le débogage sans fil."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Mode Logiciel de test activé"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Effectuez une réinitialisation pour désactiver le mode Logiciel de test."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Configuration incorrecte de la version du mode Utilisateur de système sans interface"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"L\'état du mode Utilisateur de système sans interface de cet appareil est différent de la configuration de votre version. Veuillez rétablir les paramètres par défaut de l\'appareil."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"La console série est activée"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"La performance est réduite. Pour désactiver cette fonction, vérifier le programme d\'amorçage."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"Extension MTE expérimentale activée"</string>
@@ -1429,7 +1425,7 @@
<string name="taking_remote_bugreport_notification_title" msgid="1582531382166919850">"Création d\'un rapport de bogue en cours..."</string>
<string name="share_remote_bugreport_notification_title" msgid="6708897723753334999">"Partager le rapport de bogue?"</string>
<string name="sharing_remote_bugreport_notification_title" msgid="3077385149217638550">"Partage du rapport de bogue en cours..."</string>
- <string name="share_remote_bugreport_notification_message_finished" msgid="7325635795739260135">"Votre administrateur a demandé un rapport de bogue pour l\'aider à dépanner cet appareil. Les applications et les données peuvent être partagées."</string>
+ <string name="share_remote_bugreport_notification_message_finished" msgid="7325635795739260135">"Votre administrateur a demandé un rapport de bogue pour l\'aider à dépanner cet appareil. Les applis et les données peuvent être partagées."</string>
<string name="share_remote_bugreport_action" msgid="7630880678785123682">"PARTAGER"</string>
<string name="decline_remote_bugreport_action" msgid="4040894777519784346">"REFUSER"</string>
<string name="select_input_method" msgid="3971267998568587025">"Sélectionnez le mode de saisie"</string>
@@ -1441,7 +1437,7 @@
<string name="fast_scroll_alphabet" msgid="8854435958703888376">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="fast_scroll_numeric_alphabet" msgid="2529539945421557329">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="alert_windows_notification_channel_group_name" msgid="6063891141815714246">"Afficher par-dessus les autres applis"</string>
- <string name="alert_windows_notification_channel_name" msgid="3437528564303192620">"<xliff:g id="NAME">%s</xliff:g> affiche du contenu par-dessus d\'autres applications"</string>
+ <string name="alert_windows_notification_channel_name" msgid="3437528564303192620">"<xliff:g id="NAME">%s</xliff:g> affiche du contenu par-dessus d\'autres applis"</string>
<string name="alert_windows_notification_title" msgid="6331662751095228536">"<xliff:g id="NAME">%s</xliff:g> aff. contenu par-dessus applis"</string>
<string name="alert_windows_notification_message" msgid="6538171456970725333">"Si vous ne voulez pas que <xliff:g id="NAME">%s</xliff:g> utilise cette fonctionnalités, touchez l\'écran pour ouvrir les paramètres, puis désactivez-la."</string>
<string name="alert_windows_notification_turn_off_action" msgid="7805857234839123780">"Désactiver"</string>
@@ -1496,17 +1492,17 @@
<string name="ext_media_status_missing" msgid="6520746443048867314">"Non insérée"</string>
<string name="activity_list_empty" msgid="4219430010716034252">"Aucune activité correspondante trouvée."</string>
<string name="permlab_route_media_output" msgid="8048124531439513118">"diriger la sortie multimédia"</string>
- <string name="permdesc_route_media_output" msgid="1759683269387729675">"Permet à une application de diriger la sortie multimédia vers d\'autres appareils externes."</string>
+ <string name="permdesc_route_media_output" msgid="1759683269387729675">"Permet à une appli de diriger la sortie multimédia vers d\'autres appareils externes."</string>
<string name="permlab_readInstallSessions" msgid="7279049337895583621">"accéder aux sessions d\'installation"</string>
- <string name="permdesc_readInstallSessions" msgid="4012608316610763473">"Permet à une application d\'accéder aux sessions d\'installation. Cela lui permet de consulter les détails relatifs à l\'installation des paquets actifs."</string>
+ <string name="permdesc_readInstallSessions" msgid="4012608316610763473">"Permet à une appli d\'accéder aux sessions d\'installation. Cela lui permet de consulter les détails relatifs à l\'installation des paquets actifs."</string>
<string name="permlab_requestInstallPackages" msgid="7600020863445351154">"demander l\'installation de paquets"</string>
- <string name="permdesc_requestInstallPackages" msgid="3969369278325313067">"Permet à une application de demander l\'installation de paquets."</string>
+ <string name="permdesc_requestInstallPackages" msgid="3969369278325313067">"Permet à une appli de demander l\'installation de paquets."</string>
<string name="permlab_requestDeletePackages" msgid="2541172829260106795">"demander la suppression de paquets"</string>
- <string name="permdesc_requestDeletePackages" msgid="6133633516423860381">"Permet à une application de demander la suppression de paquets."</string>
+ <string name="permdesc_requestDeletePackages" msgid="6133633516423860381">"Permet à une appli de demander la suppression de paquets."</string>
<string name="permlab_requestIgnoreBatteryOptimizations" msgid="7646611326036631439">"demander d\'ignorer les optimisations de la pile"</string>
- <string name="permdesc_requestIgnoreBatteryOptimizations" msgid="634260656917874356">"Permet à une application de demander la permission d\'ignorer les optimisations de la pile."</string>
+ <string name="permdesc_requestIgnoreBatteryOptimizations" msgid="634260656917874356">"Permet à une appli de demander la permission d\'ignorer les optimisations de la pile."</string>
<string name="permlab_queryAllPackages" msgid="2928450604653281650">"envoyer une requête à propos de tous les paquets"</string>
- <string name="permdesc_queryAllPackages" msgid="5339069855520996010">"Permet à une application de voir tous les paquets installés."</string>
+ <string name="permdesc_queryAllPackages" msgid="5339069855520996010">"Permet à une appli de voir tous les paquets installés."</string>
<string name="tutorial_double_tap_to_zoom_message_short" msgid="1842872462124648678">"Appuyer deux fois pour régler le zoom"</string>
<string name="gadget_host_error_inflating" msgid="2449961590495198720">"Impossible d\'ajouter le widget."</string>
<string name="ime_action_go" msgid="5536744546326495436">"Aller"</string>
@@ -1518,7 +1514,7 @@
<string name="ime_action_default" msgid="8265027027659800121">"Exécuter"</string>
<string name="dial_number_using" msgid="6060769078933953531">"Composer le numéro\nen utilisant <xliff:g id="NUMBER">%s</xliff:g>"</string>
<string name="create_contact_using" msgid="6200708808003692594">"Ajouter un contact\nen utilisant <xliff:g id="NUMBER">%s</xliff:g>"</string>
- <string name="grant_credentials_permission_message_header" msgid="5365733888842570481">"Les applications suivantes demandent l\'autorisation d\'accéder à votre compte à partir de maintenant."</string>
+ <string name="grant_credentials_permission_message_header" msgid="5365733888842570481">"Les applis suivantes demandent l\'autorisation d\'accéder à votre compte à partir de maintenant."</string>
<string name="grant_credentials_permission_message_footer" msgid="1886710210516246461">"Voulez-vous autoriser cette demande?"</string>
<string name="grant_permissions_header_text" msgid="3420736827804657201">"Demande d\'accès"</string>
<string name="allow" msgid="6195617008611933762">"Autoriser"</string>
@@ -1526,8 +1522,8 @@
<string name="permission_request_notification_title" msgid="1810025922441048273">"Autorisation demandée"</string>
<string name="permission_request_notification_with_subtitle" msgid="3743417870360129298">"Autorisation demandée\npour le compte \"<xliff:g id="ACCOUNT">%s</xliff:g>\""</string>
<string name="permission_request_notification_for_app_with_subtitle" msgid="1298704005732851350">"Autorisation demandée par <xliff:g id="APP">%1$s</xliff:g>\npour le compte <xliff:g id="ACCOUNT">%2$s</xliff:g>."</string>
- <string name="forward_intent_to_owner" msgid="4620359037192871015">"Vous utilisez cette application en dehors de votre profil professionnel"</string>
- <string name="forward_intent_to_work" msgid="3620262405636021151">"Vous utilisez cette application dans votre profil professionnel"</string>
+ <string name="forward_intent_to_owner" msgid="4620359037192871015">"Vous utilisez cette appli en dehors de votre profil professionnel"</string>
+ <string name="forward_intent_to_work" msgid="3620262405636021151">"Vous utilisez cette appli dans votre profil professionnel"</string>
<string name="input_method_binding_label" msgid="1166731601721983656">"Mode de saisie"</string>
<string name="sync_binding_label" msgid="469249309424662147">"Synchroniser"</string>
<string name="accessibility_binding_label" msgid="1974602776545801715">"Accessibilité"</string>
@@ -1550,8 +1546,8 @@
<string name="no_file_chosen" msgid="4146295695162318057">"Aucun fichier sélectionné"</string>
<string name="reset" msgid="3865826612628171429">"Réinitialiser"</string>
<string name="submit" msgid="862795280643405865">"Envoyer"</string>
- <string name="car_mode_disable_notification_title" msgid="8450693275833142896">"L\'application de conduite est en cours d\'exécution"</string>
- <string name="car_mode_disable_notification_message" msgid="8954550232288567515">"Touchez pour quitter l\'application de conduite."</string>
+ <string name="car_mode_disable_notification_title" msgid="8450693275833142896">"L\'appli de conduite est en cours d\'exécution"</string>
+ <string name="car_mode_disable_notification_message" msgid="8954550232288567515">"Touchez pour quitter l\'appli de conduite."</string>
<string name="back_button_label" msgid="4078224038025043387">"Précédent"</string>
<string name="next_button_label" msgid="6040209156399907780">"Suivante"</string>
<string name="skip_button_label" msgid="3566599811326688389">"Ignorer"</string>
@@ -1603,8 +1599,8 @@
<string name="keyboardview_keycode_mode_change" msgid="2743735349997999020">"Changement de mode"</string>
<string name="keyboardview_keycode_shift" msgid="3026509237043975573">"Maj"</string>
<string name="keyboardview_keycode_enter" msgid="168054869339091055">"Entrée"</string>
- <string name="activitychooserview_choose_application" msgid="3500574466367891463">"Sélectionnez une application"</string>
- <string name="activitychooserview_choose_application_error" msgid="6937782107559241734">"Impossible de lancer l\'application <xliff:g id="APPLICATION_NAME">%s</xliff:g>"</string>
+ <string name="activitychooserview_choose_application" msgid="3500574466367891463">"Sélectionnez une appli"</string>
+ <string name="activitychooserview_choose_application_error" msgid="6937782107559241734">"Impossible de lancer l\'appli <xliff:g id="APPLICATION_NAME">%s</xliff:g>"</string>
<string name="shareactionprovider_share_with" msgid="2753089758467748982">"Partagez avec"</string>
<string name="shareactionprovider_share_with_application" msgid="4902832247173666973">"Partager avec <xliff:g id="APPLICATION_NAME">%s</xliff:g>"</string>
<string name="content_description_sliding_handle" msgid="982510275422590757">"Poignée coulissante. Appuyez de manière prolongée."</string>
@@ -1632,7 +1628,7 @@
<string name="data_usage_restricted_title" msgid="126711424380051268">"Données en arrière-plan limitées"</string>
<string name="data_usage_restricted_body" msgid="5338694433686077733">"Touchez pour suppr. restriction."</string>
<string name="data_usage_rapid_title" msgid="2950192123248740375">"Utilis. élevée des données cell."</string>
- <string name="data_usage_rapid_body" msgid="3886676853263693432">"Vos applications ont utilisé plus de données que d\'habitude"</string>
+ <string name="data_usage_rapid_body" msgid="3886676853263693432">"Vos applis ont utilisé plus de données que d\'habitude"</string>
<string name="data_usage_rapid_app_body" msgid="5425779218506513861">"<xliff:g id="APP">%s</xliff:g> a utilisé plus de données que d\'habitude"</string>
<string name="ssl_certificate" msgid="5690020361307261997">"Certificat de sécurité"</string>
<string name="ssl_certificate_is_valid" msgid="7293675884598527081">"Ce certificat est valide."</string>
@@ -1737,15 +1733,15 @@
<string name="accessibility_shortcut_menu_item_status_on" msgid="6608392117189732543">"ACTIVÉ"</string>
<string name="accessibility_shortcut_menu_item_status_off" msgid="5531598275559472393">"DÉSACTIVÉ"</string>
<string name="accessibility_enable_service_title" msgid="3931558336268541484">"Permettre à <xliff:g id="SERVICE">%1$s</xliff:g> de contrôler complètement votre appareil?"</string>
- <string name="accessibility_service_warning_description" msgid="291674995220940133">"Le contrôle total convient aux applications qui répondent à vos besoins d\'accessibilité. Il ne convient pas à la plupart des applications."</string>
+ <string name="accessibility_service_warning_description" msgid="291674995220940133">"Le contrôle total convient aux applis qui répondent à vos besoins d\'accessibilité. Il ne convient pas à la plupart des applis."</string>
<string name="accessibility_service_screen_control_title" msgid="190017412626919776">"Afficher et contrôler l\'écran"</string>
- <string name="accessibility_service_screen_control_description" msgid="6946315917771791525">"Cette fonctionnalité peut lire tout le contenu à l\'écran et afficher du contenu par-dessus d\'autres applications."</string>
+ <string name="accessibility_service_screen_control_description" msgid="6946315917771791525">"Cette fonctionnalité peut lire tout le contenu à l\'écran et afficher du contenu par-dessus d\'autres applis."</string>
<string name="accessibility_service_action_perform_title" msgid="779670378951658160">"Afficher et effectuer des actions"</string>
- <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Cette fonctionnalité peut faire le suivi de vos interactions avec une application ou un capteur matériel et interagir avec des applications en votre nom."</string>
+ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Cette fonctionnalité peut faire le suivi de vos interactions avec une appli ou un capteur matériel et interagir avec des applis en votre nom."</string>
<string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Autoriser"</string>
<string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Refuser"</string>
<string name="accessibility_dialog_button_uninstall" msgid="2952465517671708108">"Désinstaller"</string>
- <string name="accessibility_dialog_touch_filtered_warning" msgid="3741940116597822451">"Une application masque la demande d\'autorisation de sorte que votre réponse ne peut pas être vérifiée."</string>
+ <string name="accessibility_dialog_touch_filtered_warning" msgid="3741940116597822451">"Une appli masque la demande d\'autorisation de sorte que votre réponse ne peut pas être vérifiée."</string>
<string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Toucher une fonctionnalité pour commencer à l\'utiliser :"</string>
<string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Choisir les fonctionnalités à utiliser à l\'aide du bouton d\'accessibilité"</string>
<string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Choisir les fonctionnalités à utiliser avec le raccourci des touches de volume"</string>
@@ -1762,18 +1758,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Touches de volume maintenues enfoncées. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> activé."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Touches de volume maintenues enfoncées. Service <xliff:g id="SERVICE_NAME">%1$s</xliff:g> désactivé."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Relâchez les touches de volume. Pour activer <xliff:g id="SERVICE_NAME">%1$s</xliff:g>, maintenez les deux touches de volume enfoncées pendant 3 secondes."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Choisir une fonctionnalité"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Choisir une fonctionnalité"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Choisir une fonctionnalité"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"La fonctionnalité s\'ouvrira la prochaine fois que vous toucherez le bouton d\'accessibilité"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"La fonctionnalité s\'ouvrira la prochaine fois que vous utiliserez ce raccourci. Balayez l\'écran du bas vers le haut avec deux doigts et relâchez rapidement."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"La fonctionnalité s\'ouvrira la prochaine fois que vous utiliserez ce raccourci. Balayez l\'écran du bas vers le haut avec trois doigts et relâchez rapidement."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Agrandissement"</string>
<string name="user_switched" msgid="7249833311585228097">"Utilisateur actuel : <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="user_switching_message" msgid="1912993630661332336">"Passage au profil : <xliff:g id="NAME">%1$s</xliff:g> en cours…"</string>
@@ -1782,7 +1772,7 @@
<string name="guest_name" msgid="8502103277839834324">"Invité"</string>
<string name="error_message_title" msgid="4082495589294631966">"Erreur"</string>
<string name="error_message_change_not_allowed" msgid="843159705042381454">"Cette modification n\'est pas autorisée par votre administrateur"</string>
- <string name="app_not_found" msgid="3429506115332341800">"Aucune application trouvée pour gérer cette action."</string>
+ <string name="app_not_found" msgid="3429506115332341800">"Aucune appli trouvée pour gérer cette action."</string>
<string name="revoke" msgid="5526857743819590458">"Révoquer"</string>
<string name="mediasize_iso_a0" msgid="7039061159929977973">"ISO A0"</string>
<string name="mediasize_iso_a1" msgid="4063589931031977223">"ISO A1"</string>
@@ -1896,8 +1886,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"Le NIP est trop court. Il doit comporter au moins 4 chiffres."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Réessayez plus tard"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Affichage plein écran"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Pour quitter ce mode, balayer l\'écran vers le bas à partir du haut"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"OK"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Faire pivoter pour obtenir un meilleur affichage"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Ouvrir <xliff:g id="NAME">%s</xliff:g> en plein écran pour un meilleur affichage"</string>
@@ -1995,7 +1984,7 @@
<string name="recs_notification_channel_label" msgid="4945985121418684297">"Recommandations"</string>
<string name="importance_from_user" msgid="2782756722448800447">"Vous définissez l\'importance de ces notifications."</string>
<string name="importance_from_person" msgid="4235804979664465383">"Ces notifications sont importantes en raison des participants."</string>
- <string name="notification_history_title_placeholder" msgid="7748630986182249599">"Notification d\'application personnalisée"</string>
+ <string name="notification_history_title_placeholder" msgid="7748630986182249599">"Notification d\'appli personnalisée"</string>
<string name="user_creation_account_exists" msgid="2239146360099708035">"Autoriser <xliff:g id="APP">%1$s</xliff:g> à créer un utilisateur <xliff:g id="ACCOUNT">%2$s</xliff:g>? (Un utilisateur est déjà associé à ce compte)"</string>
<string name="user_creation_adding" msgid="7305185499667958364">"Autoriser <xliff:g id="APP">%1$s</xliff:g> à créer un profil d\'utilisateur avec le compte <xliff:g id="ACCOUNT">%2$s</xliff:g>?"</string>
<string name="supervised_user_creation_label" msgid="6884904353827427515">"Ajouter un utilisateur supervisé"</string>
@@ -2009,17 +1998,17 @@
<string name="language_picker_section_all" msgid="1985809075777564284">"Toutes les langues"</string>
<string name="region_picker_section_all" msgid="756441309928774155">"Toutes les régions"</string>
<string name="locale_search_menu" msgid="6258090710176422934">"Rechercher"</string>
- <string name="app_suspended_title" msgid="888873445010322650">"L\'application n\'est pas accessible"</string>
- <string name="app_suspended_default_message" msgid="6451215678552004172">"L\'application <xliff:g id="APP_NAME_0">%1$s</xliff:g> n\'est pas accessible pour le moment. Ceci est géré par <xliff:g id="APP_NAME_1">%2$s</xliff:g>."</string>
+ <string name="app_suspended_title" msgid="888873445010322650">"L\'appli n\'est pas accessible"</string>
+ <string name="app_suspended_default_message" msgid="6451215678552004172">"L\'appli <xliff:g id="APP_NAME_0">%1$s</xliff:g> n\'est pas accessible pour le moment. Ceci est géré par <xliff:g id="APP_NAME_1">%2$s</xliff:g>."</string>
<string name="app_suspended_more_details" msgid="211260942831587014">"En savoir plus"</string>
- <string name="app_suspended_unsuspend_message" msgid="1665438589450555459">"Réactiver l\'application"</string>
+ <string name="app_suspended_unsuspend_message" msgid="1665438589450555459">"Réactiver l\'appli"</string>
<string name="work_mode_off_title" msgid="6367463960165135829">"Réactiver les applis pros?"</string>
<string name="work_mode_turn_on" msgid="5316648862401307800">"Réactiver"</string>
<string name="work_mode_emergency_call_button" msgid="6818855962881612322">"Urgence"</string>
<string name="set_up_screen_lock_title" msgid="8346083801616474030">"Config. Verrouillage d\'écran"</string>
<string name="set_up_screen_lock_action_label" msgid="2687634803649209367">"Config. Verrouillage d\'écran"</string>
<string name="private_space_set_up_screen_lock_message" msgid="1109956797005149814">"Configurez verrouillage de l\'écran pour utiliser Espace privé"</string>
- <string name="app_blocked_title" msgid="7353262160455028160">"L\'application n\'est pas accessible"</string>
+ <string name="app_blocked_title" msgid="7353262160455028160">"L\'appli n\'est pas accessible"</string>
<string name="app_blocked_message" msgid="542972921087873023">"<xliff:g id="APP_NAME">%1$s</xliff:g> n\'est pas accessible pour le moment."</string>
<string name="app_streaming_blocked_title" msgid="6090945835898766139">"<xliff:g id="ACTIVITY">%1$s</xliff:g> non accessible"</string>
<string name="app_streaming_blocked_title_for_permission_dialog" msgid="3805704317624448487">"La demande d\'autorisation a été supprimée."</string>
@@ -2033,20 +2022,20 @@
<string name="app_streaming_blocked_message" product="tv" msgid="4003011766528814377">"Impossible d\'accéder à ce contenu sur votre <xliff:g id="DEVICE">%1$s</xliff:g> pour le moment. Essayez sur votre appareil Android TV à la place."</string>
<string name="app_streaming_blocked_message" product="tablet" msgid="4242053045964946062">"Impossible d\'accéder à ce contenu sur votre <xliff:g id="DEVICE">%1$s</xliff:g> pour le moment. Essayez sur votre tablette à la place."</string>
<string name="app_streaming_blocked_message" product="default" msgid="6159168735030739398">"Impossible d\'accéder à ce contenu sur votre <xliff:g id="DEVICE">%1$s</xliff:g> pour le moment. Essayez sur votre téléphone à la place."</string>
- <string name="app_streaming_blocked_message_for_permission_request" product="tv" msgid="4706276040125072077">"Cette application demande des autorisations supplémentaires, mais les autorisations ne peuvent pas être accordées lors d\'une session de diffusion en continu. Accordez l\'autorisation sur votre appareil Android TV d\'abord."</string>
- <string name="app_streaming_blocked_message_for_permission_request" product="tablet" msgid="1824604581465771629">"Cette application demande des autorisations supplémentaires, mais les autorisations ne peuvent pas être accordées lors d\'une session de diffusion en continu. Accordez l\'autorisation sur votre tablette d\'abord."</string>
- <string name="app_streaming_blocked_message_for_permission_request" product="default" msgid="7755223160363292105">"Cette application demande des autorisations supplémentaires, mais les autorisations ne peuvent pas être accordées lors d\'une session de diffusion en continu. Accordez l\'autorisation sur votre téléphone d\'abord."</string>
- <string name="app_streaming_blocked_message_for_fingerprint_dialog" product="tv" msgid="3470977315395784567">"Cette application demande une sécurité supplémentaire. Essayez sur votre appareil Android TV à la place."</string>
- <string name="app_streaming_blocked_message_for_fingerprint_dialog" product="tablet" msgid="698460091901465092">"Cette application demande une sécurité supplémentaire. Essayez sur votre tablette à la place."</string>
- <string name="app_streaming_blocked_message_for_fingerprint_dialog" product="default" msgid="8552691971910603907">"Cette application demande une sécurité supplémentaire. Essayez sur votre téléphone à la place."</string>
+ <string name="app_streaming_blocked_message_for_permission_request" product="tv" msgid="4706276040125072077">"Cette appli demande des autorisations supplémentaires, mais les autorisations ne peuvent pas être accordées lors d\'une session de diffusion en continu. Accordez l\'autorisation sur votre appareil Android TV d\'abord."</string>
+ <string name="app_streaming_blocked_message_for_permission_request" product="tablet" msgid="1824604581465771629">"Cette appli demande des autorisations supplémentaires, mais les autorisations ne peuvent pas être accordées lors d\'une session de diffusion en continu. Accordez l\'autorisation sur votre tablette d\'abord."</string>
+ <string name="app_streaming_blocked_message_for_permission_request" product="default" msgid="7755223160363292105">"Cette appli demande des autorisations supplémentaires, mais les autorisations ne peuvent pas être accordées lors d\'une session de diffusion en continu. Accordez l\'autorisation sur votre téléphone d\'abord."</string>
+ <string name="app_streaming_blocked_message_for_fingerprint_dialog" product="tv" msgid="3470977315395784567">"Cette appli demande une sécurité supplémentaire. Essayez sur votre appareil Android TV à la place."</string>
+ <string name="app_streaming_blocked_message_for_fingerprint_dialog" product="tablet" msgid="698460091901465092">"Cette appli demande une sécurité supplémentaire. Essayez sur votre tablette à la place."</string>
+ <string name="app_streaming_blocked_message_for_fingerprint_dialog" product="default" msgid="8552691971910603907">"Cette appli demande une sécurité supplémentaire. Essayez sur votre téléphone à la place."</string>
<string name="app_streaming_blocked_message_for_settings_dialog" product="tv" msgid="820334666354451145">"Impossible d\'accéder à ce contenu sur votre <xliff:g id="DEVICE">%1$s</xliff:g>. Essayez sur votre appareil Android TV à la place."</string>
<string name="app_streaming_blocked_message_for_settings_dialog" product="tablet" msgid="3286849551133045896">"Impossible d\'accéder à ce contenu sur votre <xliff:g id="DEVICE">%1$s</xliff:g>. Essayez sur votre tablette à la place."</string>
<string name="app_streaming_blocked_message_for_settings_dialog" product="default" msgid="6264287556598916295">"Impossible d\'accéder à ce contenu sur votre <xliff:g id="DEVICE">%1$s</xliff:g>. Essayez sur votre téléphone à la place."</string>
- <string name="deprecated_target_sdk_message" msgid="5246906284426844596">"Cette application a été conçue pour une ancienne version d\'Android. Elle pourrait ne pas fonctionner correctement, et ne comprend pas les dernières protections des données confidentielles et de sécurité. Vérifiez s\'il existe une mise à jour ou contactez le développeur de l\'application."</string>
+ <string name="deprecated_target_sdk_message" msgid="5246906284426844596">"Cette appli a été conçue pour une ancienne version d\'Android. Elle pourrait ne pas fonctionner correctement, et ne comprend pas les dernières protections des données confidentielles et de sécurité. Vérifiez s\'il existe une mise à jour ou contactez le développeur de l\'appli."</string>
<string name="deprecated_target_sdk_app_store" msgid="8456784048558808909">"Vérifier la présence de mises à jour"</string>
- <string name="deprecated_abi_message" msgid="6820548011196218091">"Cette application n\'est pas compatible avec la dernière version d\'Android. Vérifiez s\'il existe une mise à jour ou communiquez avec le développeur de l\'application."</string>
+ <string name="deprecated_abi_message" msgid="6820548011196218091">"Cette appli n\'est pas compatible avec la dernière version d\'Android. Vérifiez s\'il existe une mise à jour ou communiquez avec le développeur de l\'appli."</string>
<string name="new_sms_notification_title" msgid="6528758221319927107">"Vous avez de nouveaux messages"</string>
- <string name="new_sms_notification_content" msgid="3197949934153460639">"Ouvrez l\'application de messagerie texte pour l\'afficher"</string>
+ <string name="new_sms_notification_content" msgid="3197949934153460639">"Ouvrez l\'appli de messagerie texte pour l\'afficher"</string>
<string name="profile_encrypted_title" msgid="9001208667521266472">"Des fonctionnalités sont limitées"</string>
<string name="profile_encrypted_detail" msgid="5279730442756849055">"Profil professionnel verrouillé"</string>
<string name="profile_encrypted_message" msgid="1128512616293157802">"Touch. pr déver. profil profess."</string>
@@ -2056,7 +2045,7 @@
<string name="pin_specific_target" msgid="7824671240625957415">"Épingler <xliff:g id="LABEL">%1$s</xliff:g>"</string>
<string name="unpin_target" msgid="3963318576590204447">"Annuler l\'épinglage"</string>
<string name="unpin_specific_target" msgid="3859828252160908146">"Annuler l\'épinglage de <xliff:g id="LABEL">%1$s</xliff:g>"</string>
- <string name="app_info" msgid="6113278084877079851">"Détails de l\'application"</string>
+ <string name="app_info" msgid="6113278084877079851">"Détails de l\'appli"</string>
<string name="negative_duration" msgid="1938335096972945232">"−<xliff:g id="TIME">%1$s</xliff:g>"</string>
<string name="demo_starting_message" msgid="6577581216125805905">"Démarrage de la démonstration en cours…"</string>
<string name="demo_restarting_message" msgid="1160053183701746766">"Réinitialisation de l\'appareil en cours…"</string>
@@ -2124,14 +2113,14 @@
<string name="mmcc_illegal_me_msim_template" msgid="4802735138861422802">"La carte SIM <xliff:g id="SIMNUMBER">%d</xliff:g> n\'est pas autorisée"</string>
<string name="popup_window_default_title" msgid="6907717596694826919">"Fenêtre contextuelle"</string>
<string name="slice_more_content" msgid="3377367737876888459">"+ <xliff:g id="NUMBER">%1$d</xliff:g>"</string>
- <string name="shortcut_restored_on_lower_version" msgid="9206301954024286063">"La version de l\'application a été rétrogradée ou n\'est pas compatible avec ce raccourci"</string>
- <string name="shortcut_restore_not_supported" msgid="4763198938588468400">"Impossible de restaurer le raccourci, car l\'application ne prend pas en charge la sauvegarde et la restauration"</string>
- <string name="shortcut_restore_signature_mismatch" msgid="579345304221605479">"Impossible de restaurer le raccourci en raison d\'une erreur de correspondance des signature d\'applications"</string>
+ <string name="shortcut_restored_on_lower_version" msgid="9206301954024286063">"La version de l\'appli a été rétrogradée ou n\'est pas compatible avec ce raccourci"</string>
+ <string name="shortcut_restore_not_supported" msgid="4763198938588468400">"Impossible de restaurer le raccourci, car l\'appli ne prend pas en charge la sauvegarde et la restauration"</string>
+ <string name="shortcut_restore_signature_mismatch" msgid="579345304221605479">"Impossible de restaurer le raccourci en raison d\'une erreur de correspondance des signature d\'applis"</string>
<string name="shortcut_restore_unknown_issue" msgid="2478146134395982154">"Impossible de restaurer le raccourci"</string>
<string name="shortcut_disabled_reason_unknown" msgid="753074793553599166">"Le raccourci est désactivé"</string>
<string name="harmful_app_warning_uninstall" msgid="6472912975664191772">"DÉSINSTALLER"</string>
<string name="harmful_app_warning_open_anyway" msgid="5963657791740211807">"OUVRIR QUAND MÊME"</string>
- <string name="harmful_app_warning_title" msgid="8794823880881113856">"Une application nuisible a été détectée"</string>
+ <string name="harmful_app_warning_title" msgid="8794823880881113856">"Une appli nuisible a été détectée"</string>
<string name="slices_permission_request" msgid="3677129866636153406">"<xliff:g id="APP_0">%1$s</xliff:g> souhaite afficher <xliff:g id="APP_2">%2$s</xliff:g> tranches"</string>
<string name="screenshot_edit" msgid="7408934887203689207">"Modifier"</string>
<string name="volume_dialog_ringer_guidance_vibrate" msgid="2055927873175228519">"Les appels et les notifications vibreront"</string>
@@ -2143,14 +2132,14 @@
<string name="zen_upgrade_notification_title" msgid="8198167698095298717">"Les paramètres du mode Ne pas déranger ont changé"</string>
<string name="zen_upgrade_notification_content" msgid="5228458567180124005">"Touchez l\'écran pour vérifier ce qui est bloqué."</string>
<string name="review_notification_settings_title" msgid="5102557424459810820">"Examiner les paramètres de notification"</string>
- <string name="review_notification_settings_text" msgid="5916244866751849279">"À partir d\'Android 13, les applications que vous installez ont besoin de votre autorisation pour envoyer des notifications. Touchez pour modifier cette autorisation pour les applications existantes."</string>
+ <string name="review_notification_settings_text" msgid="5916244866751849279">"À partir d\'Android 13, les applis que vous installez ont besoin de votre autorisation pour envoyer des notifications. Touchez pour modifier cette autorisation pour les applis existantes."</string>
<string name="review_notification_settings_remind_me_action" msgid="1081081018678480907">"Me rappeler plus tard"</string>
<string name="review_notification_settings_dismiss" msgid="4160916504616428294">"Fermer"</string>
<string name="notification_app_name_system" msgid="3045196791746735601">"Système"</string>
<string name="notification_app_name_settings" msgid="9088548800899952531">"Paramètres"</string>
<string name="notification_appops_camera_active" msgid="8177643089272352083">"Appareil photo"</string>
<string name="notification_appops_microphone_active" msgid="581333393214739332">"Microphone"</string>
- <string name="notification_appops_overlay_active" msgid="5571732753262836481">"superpose du contenu par-dessus d\'autres applications à l\'écran"</string>
+ <string name="notification_appops_overlay_active" msgid="5571732753262836481">"superpose du contenu par-dessus d\'autres applis à l\'écran"</string>
<string name="notification_feedback_indicator" msgid="663476517711323016">"Envoyer des commentaires"</string>
<string name="notification_feedback_indicator_alerted" msgid="6552871804121942099">"La notification a été automatiquement élevée à la catégorie Par défaut. Touchez pour envoyer des commentaires."</string>
<string name="notification_feedback_indicator_silenced" msgid="3799442124723177262">"Cette notification a été rétrogradée à Silencieuse. Touchez pour envoyer des commentaires."</string>
@@ -2173,7 +2162,7 @@
<string name="battery_saver_charged_notification_summary" product="tablet" msgid="4426317048139996888">"La tablette est suffisamment chargée. Ces fonctionnalités ne sont plus restreintes."</string>
<string name="battery_saver_charged_notification_summary" product="device" msgid="1031562417867646649">"L\'appareil est suffisamment chargé. Ces fonctionnalités ne sont plus restreintes."</string>
<string name="mime_type_folder" msgid="2203536499348787650">"Dossier"</string>
- <string name="mime_type_apk" msgid="3168784749499623902">"Application Android"</string>
+ <string name="mime_type_apk" msgid="3168784749499623902">"Appli Android"</string>
<string name="mime_type_generic" msgid="4606589110116560228">"Fichier"</string>
<string name="mime_type_generic_ext" msgid="9220220924380909486">"Fichier <xliff:g id="EXTENSION">%1$s</xliff:g>"</string>
<string name="mime_type_audio" msgid="4933450584432509875">"Son"</string>
@@ -2194,11 +2183,11 @@
<string name="car_loading_profile" msgid="8219978381196748070">"Chargement en cours…"</string>
<string name="file_count" msgid="3220018595056126969">"{count,plural, =1{{file_name} + # fichier}one{{file_name} + # fichier}many{{file_name} + # fichiers}other{{file_name} + # fichiers}}"</string>
<string name="chooser_no_direct_share_targets" msgid="1511722103987329028">"Aucune recommandation de personnes avec lesquelles effectuer un partage"</string>
- <string name="chooser_all_apps_button_label" msgid="3230427756238666328">"Liste des applications"</string>
- <string name="usb_device_resolve_prompt_warn" msgid="325871329788064199">"Cette application n\'a pas été autorisée à effectuer des enregistrements, mais elle pourrait capturer du contenu audio par l\'intermédiaire de cet appareil USB."</string>
+ <string name="chooser_all_apps_button_label" msgid="3230427756238666328">"Liste des applis"</string>
+ <string name="usb_device_resolve_prompt_warn" msgid="325871329788064199">"Cette appli n\'a pas été autorisée à effectuer des enregistrements, mais elle pourrait capturer du contenu audio par l\'intermédiaire de cet appareil USB."</string>
<string name="accessibility_system_action_home_label" msgid="3234748160850301870">"Accueil"</string>
<string name="accessibility_system_action_back_label" msgid="4205361367345537608">"Retour"</string>
- <string name="accessibility_system_action_recents_label" msgid="4782875610281649728">"Applications récentes"</string>
+ <string name="accessibility_system_action_recents_label" msgid="4782875610281649728">"Applis récentes"</string>
<string name="accessibility_system_action_notifications_label" msgid="6083767351772162010">"Notifications"</string>
<string name="accessibility_system_action_quick_settings_label" msgid="4583900123506773783">"Paramètres rapides"</string>
<string name="accessibility_system_action_power_dialog_label" msgid="8095341821683910781">"Boîte de dialogue sur l\'alimentation"</string>
@@ -2227,22 +2216,22 @@
<string name="resolver_personal_tab_accessibility" msgid="5739524949153091224">"Affichage personnel"</string>
<string name="resolver_work_tab_accessibility" msgid="4753168230363802734">"Affichage professionnel"</string>
<string name="resolver_cross_profile_blocked" msgid="3014597376026044840">"Bloqué par votre administrateur informatique"</string>
- <string name="resolver_cant_share_with_work_apps_explanation" msgid="9071442683080586643">"Impossible de partager ce contenu avec des applications professionnelles"</string>
- <string name="resolver_cant_access_work_apps_explanation" msgid="1129960195389373279">"Impossible d\'ouvrir ce contenu avec des applications professionnelles"</string>
- <string name="resolver_cant_share_with_personal_apps_explanation" msgid="6349766201904601544">"Impossible de partager ce contenu avec des applications personnelles"</string>
- <string name="resolver_cant_access_personal_apps_explanation" msgid="1679399548862724359">"Impossible d\'ouvrir ce contenu avec des applications personnelles"</string>
- <string name="resolver_turn_on_work_apps" msgid="1535946298236678122">"Les applications professionnelles sont interrompues"</string>
+ <string name="resolver_cant_share_with_work_apps_explanation" msgid="9071442683080586643">"Impossible de partager ce contenu avec des applis professionnelles"</string>
+ <string name="resolver_cant_access_work_apps_explanation" msgid="1129960195389373279">"Impossible d\'ouvrir ce contenu avec des applis professionnelles"</string>
+ <string name="resolver_cant_share_with_personal_apps_explanation" msgid="6349766201904601544">"Impossible de partager ce contenu avec des applis personnelles"</string>
+ <string name="resolver_cant_access_personal_apps_explanation" msgid="1679399548862724359">"Impossible d\'ouvrir ce contenu avec des applis personnelles"</string>
+ <string name="resolver_turn_on_work_apps" msgid="1535946298236678122">"Les applis professionnelles sont interrompues"</string>
<string name="resolver_switch_on_work" msgid="4527096360772311894">"Réactiver"</string>
- <string name="resolver_no_work_apps_available" msgid="3298291360133337270">"Aucune application professionnelle"</string>
- <string name="resolver_no_personal_apps_available" msgid="6284837227019594881">"Aucune application personnelle"</string>
+ <string name="resolver_no_work_apps_available" msgid="3298291360133337270">"Aucune appli professionnelle"</string>
+ <string name="resolver_no_personal_apps_available" msgid="6284837227019594881">"Aucune appli personnelle"</string>
<string name="miniresolver_open_work" msgid="6286176185835401931">"Ouvrir le profil professionnel de <xliff:g id="APP">%s</xliff:g>?"</string>
<string name="miniresolver_open_in_personal" msgid="807427577794490375">"Ouvrir <xliff:g id="APP">%s</xliff:g> dans le profil personnel?"</string>
<string name="miniresolver_open_in_work" msgid="941341494673509916">"Ouvrir <xliff:g id="APP">%s</xliff:g> dans le profil professionnel?"</string>
- <string name="miniresolver_call_in_work" msgid="528779988307529039">"Appeler à partir de l\'application professionnelle?"</string>
- <string name="miniresolver_switch_to_work" msgid="1042640606122638596">"Passer à l\'application professionnelle?"</string>
- <string name="miniresolver_call_information" msgid="6739417525304184083">"Votre organisation vous autorise à passer des appels uniquement à partir d\'applications professionnelles"</string>
- <string name="miniresolver_sms_information" msgid="4311292661329483088">"Votre organisation vous autorise à envoyer des messages uniquement à partir d\'applications professionnelles"</string>
- <string name="miniresolver_private_space_phone_information" msgid="4469511223312488570">"Vous ne pouvez passer des appels téléphoniques qu\'à partir de votre application Téléphone personnelle. Les appels passés à l\'aide de cette dernière seront ajoutés à votre historique personnel des appels."</string>
+ <string name="miniresolver_call_in_work" msgid="528779988307529039">"Appeler à partir de l\'appli professionnelle?"</string>
+ <string name="miniresolver_switch_to_work" msgid="1042640606122638596">"Passer à l\'appli professionnelle?"</string>
+ <string name="miniresolver_call_information" msgid="6739417525304184083">"Votre organisation vous autorise à passer des appels uniquement à partir d\'applis professionnelles"</string>
+ <string name="miniresolver_sms_information" msgid="4311292661329483088">"Votre organisation vous autorise à envoyer des messages uniquement à partir d\'applis professionnelles"</string>
+ <string name="miniresolver_private_space_phone_information" msgid="4469511223312488570">"Vous ne pouvez passer des appels téléphoniques qu\'à partir de votre appli Téléphone personnelle. Les appels passés à l\'aide de cette dernière seront ajoutés à votre historique personnel des appels."</string>
<string name="miniresolver_private_space_messages_information" msgid="111285656327622118">"Vous ne pouvez envoyer des messages texte qu\'à partir de votre appli Messages personnelle."</string>
<string name="miniresolver_use_personal_browser" msgid="776072682871133308">"Utiliser le navigateur du profil personnel"</string>
<string name="miniresolver_use_work_browser" msgid="543575306251952994">"Utiliser le navigateur du profil professionnel"</string>
@@ -2366,35 +2355,35 @@
<string name="dismiss_action" msgid="1728820550388704784">"Fermer"</string>
<string name="sensor_privacy_start_use_mic_notification_content_title" msgid="2420858361276370367">"Débloquer le microphone de l\'appareil"</string>
<string name="sensor_privacy_start_use_camera_notification_content_title" msgid="7287720213963466672">"Débloquer l\'appareil photo de l\'appareil"</string>
- <string name="sensor_privacy_start_use_notification_content_text" msgid="7595608891015777346">"Pour &lt;b&gt;<xliff:g id="APP">%s</xliff:g>&lt;/b&gt; ainsi que toutes les applications et tous les services"</string>
+ <string name="sensor_privacy_start_use_notification_content_text" msgid="7595608891015777346">"Pour &lt;b&gt;<xliff:g id="APP">%s</xliff:g>&lt;/b&gt; ainsi que toutes les applis et tous les services"</string>
<string name="sensor_privacy_start_use_dialog_turn_on_button" msgid="7089318886628390827">"Débloquer"</string>
<string name="sensor_privacy_notification_channel_label" msgid="936036783155261349">"Confidentialité des capteurs"</string>
- <string name="splash_screen_view_icon_description" msgid="180638751260598187">"Icône de l\'application"</string>
- <string name="splash_screen_view_branding_description" msgid="7911129347402728216">"Image de marque de l\'application"</string>
+ <string name="splash_screen_view_icon_description" msgid="180638751260598187">"Icône de l\'appli"</string>
+ <string name="splash_screen_view_branding_description" msgid="7911129347402728216">"Image de marque de l\'appli"</string>
<string name="view_and_control_notification_title" msgid="4300765399209912240">"Vérifiez les paramètres d\'accès"</string>
<string name="view_and_control_notification_content" msgid="8003766498562604034">"<xliff:g id="SERVICE_NAME">%s</xliff:g> peut voir et contrôler votre écran. Touchez pour examiner."</string>
<string name="ui_translation_accessibility_translated_text" msgid="3197547218178944544">"Message <xliff:g id="MESSAGE">%1$s</xliff:g> traduit."</string>
<string name="ui_translation_accessibility_translation_finished" msgid="3057830947610088465">"Message traduit : <xliff:g id="FROM_LANGUAGE">%1$s</xliff:g> vers <xliff:g id="TO_LANGUAGE">%2$s</xliff:g>."</string>
<string name="notification_channel_abusive_bg_apps" msgid="6092140213264920355">"Activité en arrière-plan"</string>
- <string name="notification_title_abusive_bg_apps" msgid="994230770856147656">"Une application décharge votre pile"</string>
- <string name="notification_title_long_running_fgs" msgid="8170284286477131587">"Une application est toujours active"</string>
+ <string name="notification_title_abusive_bg_apps" msgid="994230770856147656">"Une appli décharge votre pile"</string>
+ <string name="notification_title_long_running_fgs" msgid="8170284286477131587">"Une appli est toujours active"</string>
<string name="notification_content_abusive_bg_apps" msgid="5296898075922695259">"<xliff:g id="APP">%1$s</xliff:g> s\'exécute en arrière-plan. Touchez pour gérer l\'utilisation de la pile."</string>
- <string name="notification_content_long_running_fgs" msgid="8258193410039977101">"<xliff:g id="APP">%1$s</xliff:g> peut avoir une incidence sur l\'autonomie de la pile. Touchez pour examiner les applications actives."</string>
- <string name="notification_action_check_bg_apps" msgid="4758877443365362532">"Vérifier les applications actives"</string>
+ <string name="notification_content_long_running_fgs" msgid="8258193410039977101">"<xliff:g id="APP">%1$s</xliff:g> peut avoir une incidence sur l\'autonomie de la pile. Touchez pour examiner les applis actives."</string>
+ <string name="notification_action_check_bg_apps" msgid="4758877443365362532">"Vérifier les applis actives"</string>
<string name="vdm_camera_access_denied" product="default" msgid="6102378580971542473">"Impossible d\'accéder à l\'appareil photo du téléphone à partir de votre <xliff:g id="DEVICE">%1$s</xliff:g>"</string>
<string name="vdm_camera_access_denied" product="tablet" msgid="6895968310395249076">"Impossible d\'accéder à l\'appareil photo de la tablette à partir de votre <xliff:g id="DEVICE">%1$s</xliff:g>"</string>
<string name="vdm_secure_window" msgid="161700398158812314">"Vous ne pouvez pas y accéder lorsque vous utilisez la diffusion en continu. Essayez sur votre téléphone à la place."</string>
<string name="vdm_pip_blocked" msgid="4036107522497281397">"Impossible d\'afficher des incrustations d\'image pendant une diffusion en continu"</string>
<string name="system_locale_title" msgid="711882686834677268">"Paramètre système par défaut"</string>
<string name="default_card_name" msgid="9198284935962911468">"CARTE <xliff:g id="CARDNUMBER">%d</xliff:g>"</string>
- <string name="permlab_companionProfileWatch" msgid="2457738382085872542">"Autorisation du profil de la montre de l\'application compagnon pour gérer les montres"</string>
- <string name="permdesc_companionProfileWatch" msgid="5655698581110449397">"Autorise une application compagnon à gérer les montres."</string>
+ <string name="permlab_companionProfileWatch" msgid="2457738382085872542">"Autorisation du profil de la montre de l\'appli compagnon pour gérer les montres"</string>
+ <string name="permdesc_companionProfileWatch" msgid="5655698581110449397">"Autorise une appli compagnon à gérer les montres."</string>
<string name="permlab_observeCompanionDevicePresence" msgid="9008994909653990465">"Surveiller la présence d\'un appareil compagnon"</string>
- <string name="permdesc_observeCompanionDevicePresence" msgid="3011699826788697852">"Autorise une application compagnon à surveiller la présence d\'un appareil compagnon lorsque les appareils sont à proximité ou éloignés."</string>
- <string name="permlab_deliverCompanionMessages" msgid="3931552294842980887">"Transmettre les messages des applications compagnons"</string>
- <string name="permdesc_deliverCompanionMessages" msgid="2170847384281412850">"Autorise une application compagnon à transmettre des messages à d\'autres appareils."</string>
+ <string name="permdesc_observeCompanionDevicePresence" msgid="3011699826788697852">"Autorise une appli compagnon à surveiller la présence d\'un appareil compagnon lorsque les appareils sont à proximité ou éloignés."</string>
+ <string name="permlab_deliverCompanionMessages" msgid="3931552294842980887">"Transmettre les messages des applis compagnons"</string>
+ <string name="permdesc_deliverCompanionMessages" msgid="2170847384281412850">"Autorise une appli compagnon à transmettre des messages à d\'autres appareils."</string>
<string name="permlab_startForegroundServicesFromBackground" msgid="6363004936218638382">"Lancer les services d\'avant-plan à partir de l\'arrière-plan"</string>
- <string name="permdesc_startForegroundServicesFromBackground" msgid="4071826571656001537">"Permet à une application compagnon en arrière-plan de lancer des services d\'avant-plan."</string>
+ <string name="permdesc_startForegroundServicesFromBackground" msgid="4071826571656001537">"Permet à une appli compagnon en arrière-plan de lancer des services d\'avant-plan."</string>
<string name="mic_access_on_toast" msgid="2666925317663845156">"Le microphone est accessible"</string>
<string name="mic_access_off_toast" msgid="8111040892954242437">"Le microphone est bloqué"</string>
<string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Impossible de dupliquer l\'écran"</string>
@@ -2437,21 +2426,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Fonctionnement"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"En attente…"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Configurer le Déverrouillage par empreinte digitale à nouveau"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"L\'empreinte digitale <xliff:g id="FINGERPRINT">%s</xliff:g> ne peut plus être reconnue."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"Les empreintes digitales <xliff:g id="FINGERPRINT_0">%1$s</xliff:g> et <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> ne peuvent plus être reconnues."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"L\'empreinte digitale <xliff:g id="FINGERPRINT">%s</xliff:g> ne peut plus être reconnue. Reconfigurez le Déverrouillage par empreinte digitale."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"Les empreintes digitales <xliff:g id="FINGERPRINT_0">%1$s</xliff:g> et <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> ne peuvent plus être reconnues. Reconfigurez le Déverrouillage par empreinte digitale."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Configurer le Déverrouillage par reconnaissance faciale à nouveau"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Votre modèle facial ne peut plus être reconnu. Reconfigurez le Déverrouillage par reconnaissance faciale."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Configurer"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Plus tard"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Alarme pour <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Changer d\'utilisateur"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Désactiver le son"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Toucher pour désactiver le son"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml
index 4bcf9a649770..0f58c47a3dc5 100644
--- a/core/res/res/values-fr/strings.xml
+++ b/core/res/res/values-fr/strings.xml
@@ -266,8 +266,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Rapport de bug"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Fermer la session"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Capture d\'écran"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Signaler un bug"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Cela permet de recueillir des informations concernant l\'état actuel de votre appareil. Ces informations sont ensuite envoyées sous forme d\'e-mail. Merci de patienter pendant la préparation du rapport de bug. Cette opération peut prendre quelques instants."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Rapport interactif"</string>
@@ -1414,10 +1412,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Sélectionnez cette option pour désactiver le débogage sans fil."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Mode Atelier de test activé"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Rétablissez la configuration d\'usine pour désactiver le mode Atelier de test."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Mauvaise configuration de compilation HSUM"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"L\'état du mode utilisateur du système headless de cet appareil diffère de sa configuration de compilation. Veuillez rétablir la configuration d\'usine de l\'appareil."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Console série activée"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Les performances sont affectées. Pour désactiver la console série, vérifiez le bootloader."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"MTE expérimentale activée"</string>
@@ -1762,18 +1758,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Touches de volume appuyées de manière prolongée. Service <xliff:g id="SERVICE_NAME">%1$s</xliff:g> activé."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Touches de volume appuyées de manière prolongée. Service <xliff:g id="SERVICE_NAME">%1$s</xliff:g> désactivé."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Relâchez les boutons de volume. Pour activer <xliff:g id="SERVICE_NAME">%1$s</xliff:g>, appuyez de nouveau sur les deux boutons de volume pendant trois secondes."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Sélectionnez une fonctionnalité"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Sélectionnez une fonctionnalité"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Sélectionnez une fonctionnalité"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"La fonctionnalité s\'ouvrira la prochaine fois que vous appuierez sur le bouton Accessibilité"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"La fonctionnalité s\'ouvrira la prochaine fois que vous utiliserez ce raccourci. Balayez du bas de l\'écran vers le haut avec deux doigts et relâchez rapidement."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"La fonctionnalité s\'ouvrira la prochaine fois que vous utiliserez ce raccourci. Balayez du bas de l\'écran vers le haut avec trois doigts et relâchez rapidement."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Agrandissement"</string>
<string name="user_switched" msgid="7249833311585228097">"Utilisateur actuel : <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="user_switching_message" msgid="1912993630661332336">"Passage à <xliff:g id="NAME">%1$s</xliff:g>..."</string>
@@ -1896,8 +1886,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"Le code PIN est trop court. Il doit comporter au moins 4 chiffres."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Veuillez réessayer ultérieurement."</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Affichage en plein écran"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Pour quitter, balayez l\'écran de haut en bas"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"OK"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Faites pivoter pour mieux voir"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Ouvrez <xliff:g id="NAME">%s</xliff:g> en plein écran pour mieux voir"</string>
@@ -2437,21 +2426,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Fonctionnement"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"En attente…"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Reconfigurer le déverrouillage par empreinte digitale"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> ne peut plus être reconnue."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> et <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> ne peuvent plus être reconnues."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> ne peut plus être reconnue. Reconfigurez le déverrouillage par empreinte digitale."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> et <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> ne peuvent plus être reconnues. Reconfigurez le déverrouillage par empreinte digitale."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Reconfigurer le déverrouillage par reconnaissance faciale"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Votre empreinte faciale ne peut plus être reconnue. Reconfigurez le déverrouillage par reconnaissance faciale."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Configuration"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Pas maintenant"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Alarme pour <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Changer d\'utilisateur"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Couper le son"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Appuyer pour couper le son"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-gl/strings.xml b/core/res/res/values-gl/strings.xml
index 6bfebb405cda..d016747ea3c6 100644
--- a/core/res/res/values-gl/strings.xml
+++ b/core/res/res/values-gl/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Informe de erros"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Finalizar a sesión"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Capt. pantalla"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Informe de erros"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Este informe recompilará información acerca do estado actual do teu dispositivo para enviala en forma de mensaxe de correo electrónico. O informe de erros tardará un pouco en completarse desde o seu inicio ata que estea preparado para enviarse, polo que che recomendamos que teñas paciencia."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Informe interactivo"</string>
@@ -1767,12 +1765,9 @@
<skip />
<!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
<skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"A función abrirase cando volvas tocar o botón Accesibilidade"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"A función abrirase cando volvas usar este atallo. Pasa dous dedos desde a parte inferior da pantalla e solta rapidamente."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"A función abrirase cando volvas usar este atallo. Pasa tres dedos desde a parte inferior da pantalla e solta rapidamente."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Ampliación"</string>
<string name="user_switched" msgid="7249833311585228097">"Usuario actual <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"Cambiando a <xliff:g id="NAME">%1$s</xliff:g>…"</string>
@@ -2436,21 +2431,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Como funciona?"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Pendente..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Configura de novo o desbloqueo dactilar"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> xa non se recoñece."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> e <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> xa non se recoñecen."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> xa non se recoñece. Configura de novo o desbloqueo dactilar."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> e <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> xa non se recoñecen. Configura de novo o desbloqueo dactilar."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Configura de novo o desbloqueo facial"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Xa non se recoñece o teu modelo facial. Configura de novo o desbloqueo facial."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Configurar"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Agora non"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Alarma para <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Cambiar de usuario"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Silenciar"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Tocar para silenciar o son"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-gu/strings.xml b/core/res/res/values-gu/strings.xml
index fd2134aa96ba..7204703fb9f1 100644
--- a/core/res/res/values-gu/strings.xml
+++ b/core/res/res/values-gu/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"બગ રિપોર્ટ"</string>
<string name="global_action_logout" msgid="6093581310002476511">"સત્ર સમાપ્ત કરો"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"સ્ક્રીનશૉટ"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"બગ રિપોર્ટ"</string>
<string name="bugreport_message" msgid="5212529146119624326">"આ, એક ઇ-મેઇલ સંદેશ તરીકે મોકલવા માટે, તમારા વર્તમાન ઉપકરણ સ્થિતિ વિશેની માહિતી એકત્રિત કરશે. એક બગ રિપોર્ટ પ્રારંભ કરીને તે મોકલવા માટે તૈયાર ન થઈ જાય ત્યાં સુધી તેમાં થોડો સમય લાગશે; કૃપા કરીને ધીરજ રાખો."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"ક્રિયાપ્રતિક્રિયાત્મક રિપોર્ટ"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"વાયરલેસ ડિબગીંગ બંધ કરવા માટે પસંદ કરો."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"ટેસ્ટ હાર્નેસ મોડ ચાલુ કર્યો"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"ટેસ્ટ હાર્નેસ મોડ બંધ કરવા માટે ફૅક્ટરી રીસેટ કરો."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"HSUMનું ખોટું બિલ્ડ કન્ફિગ્યુરેશન"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"આ ડિવાઇસના હેડલેસ સિસ્ટમ યુઝર મોડનું સ્ટેટસ તેના બિલ્ડ કન્ફિગ્યુરેશન કરતાં અલગ હોય છે. કૃપા કરીને ડિવાઇસને ફેક્ટરી રીસેટ કરો."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"સિરીયલ કન્સોલ ચાલુ થયો"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"કાર્યપ્રદર્શનને અસર થાય છે. બંધ કરવા માટે, બૂટલોડર ચેક કરો."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"પ્રયોગાત્મક MTE ચાલુ કર્યું"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"વૉલ્યૂમ કી દબાવી રાખો. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> ચાલુ કરી."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"વૉલ્યૂમ કી દબાવી રાખો. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> બંધ કરી."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"વૉલ્યૂમ કી છોડી દો. <xliff:g id="SERVICE_NAME">%1$s</xliff:g>ને ચાલુ કરવા માટે, 3 સેકન્ડ માટે બન્ને વૉલ્યૂમ કીને ફરીથી દબાવી રાખો."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"સુવિધા પસંદ કરો"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"સુવિધા પસંદ કરો"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"સુવિધા પસંદ કરો"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"તમે આગલી વાર જ્યારે ઍક્સેસિબિલિટી બટન પર ટૅપ કરશો, ત્યારે આ સુવિધા ચાલુ થશે"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"તમે આગલી વાર જ્યારે આ શૉર્ટકટનો ઉપયોગ કરશો, ત્યારે આ સુવિધા ચાલુ થશે. તમારી સ્ક્રીનની સૌથી નીચેથી 2 આંગળી વડે ઉપરની દિશાએ સ્વાઇપ કરો અને ઝડપથી છોડી દો."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"તમે આગલી વાર જ્યારે આ શૉર્ટકટનો ઉપયોગ કરશો, ત્યારે આ સુવિધા ચાલુ થશે. તમારી સ્ક્રીનની સૌથી નીચેથી 3 આંગળી વડે ઉપરની દિશાએ સ્વાઇપ કરો અને ઝડપથી છોડી દો."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"મોટું કરવું"</string>
<string name="user_switched" msgid="7249833311585228097">"વર્તમાન વપરાશકર્તા <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"<xliff:g id="NAME">%1$s</xliff:g> પર સ્વિચ કરી રહ્યાં છે…"</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"પિન ખૂબ નાનો છે. ઓછામાં ઓછો 4 અંકનો હોવો આવશ્યક છે."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"પછી ફરી પ્રયાસ કરો"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"પૂર્ણ સ્ક્રીન પર જુઓ"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"બહાર નીકળવા માટે, તમારી સ્ક્રીનની સૌથી ઉપરથી નીચેની તરફ સ્વાઇપ કરો"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"સમજાઈ ગયું"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"બહેતર વ્યૂ માટે ફેરવો"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"બહેતર વ્યૂ માટે, પૂર્ણ સ્ક્રીનમાં <xliff:g id="NAME">%s</xliff:g> ખોલો"</string>
@@ -2436,21 +2425,25 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"તેની કામ કરવાની રીત"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"બાકી..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"ફિંગરપ્રિન્ટ અનલૉક સુવિધાનું ફરી સેટઅપ કરો"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"હવે <xliff:g id="FINGERPRINT">%s</xliff:g> ઓળખી શકાતી નથી."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"હવે <xliff:g id="FINGERPRINT_0">%1$s</xliff:g> અને <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> ઓળખી શકાતી નથી."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"હવે <xliff:g id="FINGERPRINT">%s</xliff:g> ઓળખી શકાતી નથી. ફિંગરપ્રિન્ટ અનલૉક સુવિધાનું ફરી સેટઅપ કરો."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"હવે <xliff:g id="FINGERPRINT_0">%1$s</xliff:g> અને <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> ઓળખી શકાતી નથી. ફિંગરપ્રિન્ટ અનલૉક સુવિધાનું ફરી સેટઅપ કરો."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"ફેસ અનલૉક સુવિધાનું ફરી સેટઅપ કરો"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"હવે તમારા ચહેરાનું મૉડલ ઓળખી શકાતું નથી. ફેસ અનલૉક સુવિધાનું ફરી સેટઅપ કરો."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"સેટઅપ કરો"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"હમણાં નહીં"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"<xliff:g id="USER_NAME">%s</xliff:g> માટે અલાર્મ"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"વપરાશકર્તા સ્વિચ કરો"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"મ્યૂટ કરો"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"સાઉન્ડ મ્યૂટ કરવા માટે ટૅપ કરો"</string>
+ <string name="keyboard_shortcut_group_applications_browser" msgid="6535007304687100909">"બ્રાઉઝર"</string>
+ <string name="keyboard_shortcut_group_applications_contacts" msgid="2750702518068326356">"સંપર્કો"</string>
+ <string name="keyboard_shortcut_group_applications_email" msgid="4229037666415353683">"ઇમેઇલ"</string>
+ <string name="keyboard_shortcut_group_applications_sms" msgid="3523799286376321137">"SMS"</string>
+ <string name="keyboard_shortcut_group_applications_music" msgid="2051507523525651067">"મ્યુઝિક"</string>
+ <string name="keyboard_shortcut_group_applications_calendar" msgid="3571770335653387606">"કૅલેન્ડર"</string>
+ <string name="keyboard_shortcut_group_applications_calculator" msgid="6753209559716091507">"કેલ્ક્યુલેટર"</string>
+ <string name="keyboard_shortcut_group_applications_maps" msgid="7950000659522589471">"નકશા"</string>
+ <string name="keyboard_shortcut_group_applications" msgid="3010389163951364798">"ઍપ્લિકેશનો"</string>
</resources>
diff --git a/core/res/res/values-hi/strings.xml b/core/res/res/values-hi/strings.xml
index 84df1165b091..c4d6f4afdff8 100644
--- a/core/res/res/values-hi/strings.xml
+++ b/core/res/res/values-hi/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"गड़बड़ी की रिपोर्ट"</string>
<string name="global_action_logout" msgid="6093581310002476511">"सत्र खत्म करें"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"स्क्रीनशॉट"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"गड़बड़ी की रिपोर्ट"</string>
<string name="bugreport_message" msgid="5212529146119624326">"इससे ईमेल भेजने के लिए, आपके डिवाइस की मौजूदा स्थिति से जुड़ी जानकारी इकट्ठा की जाएगी. गड़बड़ी की रिपोर्ट बनना शुरू होने से लेकर भेजने के लिए तैयार होने तक कुछ समय लगेगा; कृपया इंतज़ार करें."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"सहभागी रिपोर्ट"</string>
@@ -631,7 +629,7 @@
<string name="permlab_useBiometric" msgid="6314741124749633786">"बायोमीट्रिक हार्डवेयर इस्तेमाल करने दें"</string>
<string name="permdesc_useBiometric" msgid="7502858732677143410">"पुष्टि के लिए, ऐप्लिकेशन को बायोमीट्रिक हार्डवेयर इस्तेमाल करने की मंज़ूरी दें"</string>
<string name="permlab_manageFingerprint" msgid="7432667156322821178">"फ़िंगरप्रिंट हार्डवेयर को प्रबंधित करें"</string>
- <string name="permdesc_manageFingerprint" msgid="2025616816437339865">"फ़िंगरप्रिंट वाले टेम्पलेट का इस्तेमाल करने के लिए जोड़ने और हटाने के लिए ऐप को तरीके शुरू करने देती है."</string>
+ <string name="permdesc_manageFingerprint" msgid="2025616816437339865">"फ़िंगरप्रिंट वाले टेंप्लेट का इस्तेमाल करने के लिए जोड़ने और हटाने के लिए ऐप को तरीके शुरू करने देती है."</string>
<string name="permlab_useFingerprint" msgid="1001421069766751922">"फ़िंगरप्रिंट हार्डवेयर का उपयोग करें"</string>
<string name="permdesc_useFingerprint" msgid="412463055059323742">"ऐप के प्रमाणीकरण के लिए फ़िंगरप्रिंट हार्डवेयर का उपयोग करने देती है"</string>
<string name="permlab_audioWrite" msgid="8501705294265669405">"अपने संगीत संग्रह में बदलाव करने की अनुमति दें"</string>
@@ -1200,7 +1198,7 @@
<string name="low_internal_storage_view_text" msgid="8172166728369697835">"हो सकता है कुछ सिस्टम फ़ंक्शन काम नहीं करें"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="7368968163411251788">"सिस्टम के लिए ज़रूरी मेमोरी नहीं है. पक्का करें कि आपके पास 250एमबी की खाली जगह है और फिर से शुरू करें."</string>
<string name="app_running_notification_title" msgid="8985999749231486569">"<xliff:g id="APP_NAME">%1$s</xliff:g> चल रहा है"</string>
- <string name="app_running_notification_text" msgid="5120815883400228566">"ज़्यादा जानकारी के लिए या ऐप्लिकेशन को रोकने के लिए छूएं."</string>
+ <string name="app_running_notification_text" msgid="5120815883400228566">"ऐप्लिकेशन को रोकने या ज़्यादा जानकारी के लिए टैप करें."</string>
<string name="ok" msgid="2646370155170753815">"ठीक है"</string>
<string name="cancel" msgid="6908697720451760115">"रद्द करें"</string>
<string name="yes" msgid="9069828999585032361">"ठीक है"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"वॉयरलेस डीबगिंग की सुविधा बंद करने के लिए चुनें."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"टेस्ट हार्नेस मोड चालू किया गया"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"टेस्ट हार्नेस मोड बंद करने के लिए फ़ैक्ट्री रीसेट करें."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"एचएसयूएम का बिल्ड कॉन्फ़िगरेशन गलत है"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"इस डिवाइस के लिए हेडलेस सिस्टम यूज़र मोड की स्थिति इसके बिल्ड कॉन्फ़िगरेशन से अलग है. कृपया अपने डिवाइस को फ़ैक्ट्री रीसेट करें."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"सीरियल कंसोल को चालू करें"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"परफ़ॉर्मेंस पर असर पड़ा है. बंद करने के लिए बूटलोडर चुनें."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"आज़माने के लिए एमटीई चालू है"</string>
@@ -1441,8 +1437,8 @@
<string name="fast_scroll_numeric_alphabet" msgid="2529539945421557329">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="alert_windows_notification_channel_group_name" msgid="6063891141815714246">"दूसरे ऐप्लिकेशन के ऊपर दिखाए जाने का ऐक्सेस"</string>
<string name="alert_windows_notification_channel_name" msgid="3437528564303192620">"<xliff:g id="NAME">%s</xliff:g> अन्य ऐप्लिकेशन के ऊपर दिखाई दे रहा है"</string>
- <string name="alert_windows_notification_title" msgid="6331662751095228536">"<xliff:g id="NAME">%s</xliff:g> अन्य ऐप पर दिखाई दे रहा है"</string>
- <string name="alert_windows_notification_message" msgid="6538171456970725333">"अगर आप नहीं चाहते कि <xliff:g id="NAME">%s</xliff:g> इस सुविधा का उपयोग करे, तो सेटिंग खोलने और उसे बंद करने के लिए टैप करें."</string>
+ <string name="alert_windows_notification_title" msgid="6331662751095228536">"<xliff:g id="NAME">%s</xliff:g> दूसरे ऐप के ऊपर दिख रहा है"</string>
+ <string name="alert_windows_notification_message" msgid="6538171456970725333">"अगर <xliff:g id="NAME">%s</xliff:g> को इस सुविधा का इस्तेमाल करने की अनुमति नहीं देनी है, तो इसे बंद करने के लिए सेटिंग पर जाएं."</string>
<string name="alert_windows_notification_turn_off_action" msgid="7805857234839123780">"बंद करें"</string>
<string name="ext_media_checking_notification_title" msgid="8299199995416510094">"<xliff:g id="NAME">%s</xliff:g> ढूंढा जा रहा है…"</string>
<string name="ext_media_checking_notification_message" msgid="2231566971425375542">"मौजूदा सामग्री की जाँच की जा रही है"</string>
@@ -1761,12 +1757,9 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"आवाज़ कम-ज़्यादा करने वाले दोनों बटन दबाकर रखें. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> को चालू कर दिया गया."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"आवाज़ कम-ज़्यादा करने वाले दोनों बटन दबाकर रखें. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> को बंद कर दिया गया."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"आवाज़ बटन को छोड़ें. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> की सुविधा चालू करने के लिए, आवाज़ वाले दोनों बटन तीन सेकंड तक दबाकर रखें."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"कोई सुविधा चुनें"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"कोई सुविधा चुनें"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"कोई सुविधा चुनें"</string>
<string name="accessibility_button_instructional_text" msgid="6831154884557881996">"अगली बार सुलभता बटन पर टैप करने से, यह सुविधा चालू हो जाएगी"</string>
<string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"इस शॉर्टकट का अगली बार इस्तेमाल करने पर, यह सुविधा चालू हो जाएगी. स्क्रीन पर दो उंगलियों से, नीचे से ऊपर की ओर स्वाइप करें और फिर स्क्रीन से तुरंत उंगलियां हटा दें."</string>
<string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"इस शॉर्टकट का अगली बार इस्तेमाल करने पर, यह सुविधा चालू हो जाएगी. स्क्रीन पर तीन उंगलियों से, नीचे से ऊपर की ओर स्वाइप करें और फिर स्क्रीन से तुरंत उंगलियां हटा दें."</string>
@@ -1892,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"PIN बहुत छोटा है. कम से कम 4 अंकों का होना चाहिए."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"बाद में फिर से प्रयास करें"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"आप पूरे स्क्रीन पर देख रहे हैं"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"बंद करने के लिए, स्क्रीन के सबसे ऊपरी हिस्से से नीचे की ओर स्वाइप करें"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"ठीक है"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"बेहतर व्यू पाने के लिए, डिवाइस की स्क्रीन को घुमाएं"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"बेहतर व्यू पाने के लिए <xliff:g id="NAME">%s</xliff:g> को फ़ुल स्क्रीन में खोलें"</string>
@@ -2433,21 +2425,25 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"यह सेटिंग कैसे काम करती है"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"प्रोसेस जारी है..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"फ़िंगरप्रिंट अनलॉक की सुविधा दोबारा सेट अप करें"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"अब <xliff:g id="FINGERPRINT">%s</xliff:g> की पहचान नहीं की जा सकती."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"अब <xliff:g id="FINGERPRINT_0">%1$s</xliff:g> और <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> की पहचान नहीं की जा सकती."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"अब <xliff:g id="FINGERPRINT">%s</xliff:g> की पहचान नहीं की जा सकती. फ़िंगरप्रिंट अनलॉक की सुविधा दोबारा सेट अप करें."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"अब <xliff:g id="FINGERPRINT_0">%1$s</xliff:g> और <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> की पहचान नहीं की जा सकती. फ़िंगरप्रिंट अनलॉक की सुविधा दोबारा सेट अप करें."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"फ़ेस अनलॉक की सुविधा को दोबारा सेट अप करें"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"अब आपके चेहरे के मॉडल की पहचान नहीं की जा सकती. फ़ेस अनलॉक की सुविधा को दोबारा सेट अप करें."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"सेट अप करें"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"अभी नहीं"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"<xliff:g id="USER_NAME">%s</xliff:g> के लिए अलार्म"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"दूसरे खाते पर स्विच करें"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"म्यूट करें"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"आवाज़ म्यूट करने के लिए टैप करें"</string>
+ <string name="keyboard_shortcut_group_applications_browser" msgid="6535007304687100909">"ब्राउज़र"</string>
+ <string name="keyboard_shortcut_group_applications_contacts" msgid="2750702518068326356">"संपर्क"</string>
+ <string name="keyboard_shortcut_group_applications_email" msgid="4229037666415353683">"ईमेल"</string>
+ <string name="keyboard_shortcut_group_applications_sms" msgid="3523799286376321137">"एसएमएस"</string>
+ <string name="keyboard_shortcut_group_applications_music" msgid="2051507523525651067">"संगीत"</string>
+ <string name="keyboard_shortcut_group_applications_calendar" msgid="3571770335653387606">"कैलेंडर"</string>
+ <string name="keyboard_shortcut_group_applications_calculator" msgid="6753209559716091507">"कैल्कुलेटर"</string>
+ <string name="keyboard_shortcut_group_applications_maps" msgid="7950000659522589471">"मैप"</string>
+ <string name="keyboard_shortcut_group_applications" msgid="3010389163951364798">"ऐप्लिकेशन"</string>
</resources>
diff --git a/core/res/res/values-hr/strings.xml b/core/res/res/values-hr/strings.xml
index ace37279027c..c3a6ec20c0b3 100644
--- a/core/res/res/values-hr/strings.xml
+++ b/core/res/res/values-hr/strings.xml
@@ -266,8 +266,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Izvješće o programskim pogreškama"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Završi sesiju"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Snimka zaslona"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Izvješće o programskim pogreškama"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Time će se prikupiti podaci o trenutačnom stanju vašeg uređaja koje ćete nam poslati u e-poruci. Za pripremu izvješća o programskoj pogrešci potrebno je nešto vremena pa vas molimo za strpljenje."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Interaktivno izvješće"</string>
@@ -1414,10 +1412,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Odaberite da biste onemogućili bežično otklanjanje pogrešaka."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Omogućen je način testnog okvira"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Vratite na tvorničke postavke da biste onemogućili način testnog okvira."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Pogrešna konfiguracija sustavnog korisnika bez grafičkog korisničkog sučelja"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"Stanje načina sustavnog korisnika bez grafičkog korisničkog sučelja na ovom uređaju razlikuje se od njegove konfiguracije. Vratite uređaj na tvorničke postavke."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Serijska konzola omogućena"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Izvedba je otežana. Provjerite pokretač operativnog sustava da biste onemogućili konzolu."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"Omogućen je eksperimentalni MTE"</string>
@@ -1762,18 +1758,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Držali ste tipke za glasnoću. Uključila se usluga <xliff:g id="SERVICE_NAME">%1$s</xliff:g>."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Držali ste tipke za glasnoću. Isključila se usluga <xliff:g id="SERVICE_NAME">%1$s</xliff:g>."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Pustite tipke za glasnoću. Da biste uključili uslugu <xliff:g id="SERVICE_NAME">%1$s</xliff:g>, ponovo pritisnite i zadržite obje tipke za glasnoću tri sekunde."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Odaberite značajku"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Odaberite značajku"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Odaberite značajku"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"Značajka će se otvoriti sljedeći put kad dodirnete gumb za pristupačnost"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"Značajka će se otvoriti sljedeći put kad upotrijebite ovaj prečac. Nakratko prijeđite dvama prstima s dna zaslona."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"Značajka će se otvoriti sljedeći put kad upotrijebite ovaj prečac. Nakratko prijeđite s dna zaslona trima prstima."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Povećavanje"</string>
<string name="user_switched" msgid="7249833311585228097">"Trenutačni korisnik <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"Prebacivanje na korisnika <xliff:g id="NAME">%1$s</xliff:g>…"</string>
@@ -1896,8 +1886,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"PIN je prekratak. Mora imati barem 4 znamenke."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Pokušajte ponovo kasnije"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Gledanje preko cijelog zaslona"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Za izlaz povucite prstom od vrha zaslona prema dolje"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"Shvaćam"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Zakrenite kako biste bolje vidjeli"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Otvorite aplikaciju <xliff:g id="NAME">%s</xliff:g> preko cijelog zaslona za bolji prikaz"</string>
@@ -2437,21 +2426,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Kako to funkcionira"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Na čekanju..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Ponovno postavite otključavanje otiskom prsta"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> više se ne prepoznaje."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> i <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> više se ne prepoznaju."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> više se ne prepoznaje. Ponovo postavite otključavanje otiskom prsta."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> i <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> više se ne prepoznaju. Ponovo postavite otključavanje otiskom prsta."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Ponovno postavite otključavanje licem"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Vaš model lica više se ne prepoznaje. Ponovo postavite otključavanje licem."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Postavi"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Ne sad"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Alarm za korisnika <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Promijeni korisnika"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Isključi zvuk"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Dodirnite za isključivanje zvuka"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-hu/strings.xml b/core/res/res/values-hu/strings.xml
index 23b5fee78b61..396a482d0e9a 100644
--- a/core/res/res/values-hu/strings.xml
+++ b/core/res/res/values-hu/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Programhiba bejelentése"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Munkamenet befejezése"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Képernyőkép"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Programhiba bejelentése"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Ezzel információt fog gyűjteni az eszköz jelenlegi állapotáról, amelyet a rendszer e-mailben fog elküldeni. Kérjük, legyen türelemmel, amíg a hibajelentés elkészül, és küldhető állapotba kerül."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Interaktív jelentés"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Válassza ezt a vezeték nélküli hibakeresés letiltásához."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Tesztelési alapkörnyezet mód engedélyezve"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"A Tesztelési alapkörnyezet mód kikapcsolásához állítsa vissza a gyári beállításokat."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Hibás HSUM-buildkonfiguráció"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"Az eszköz Headless System User Mode állapota eltér a buildjének a konfigurációjától. Kérjük, állítsa vissza az eszköz gyári beállításait."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Soros konzol engedélyezve"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Ez hatással van a teljesítményre. A letiltáshoz ellenőrizze a rendszerindítót."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"Kísérleti MTE engedélyezve"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Nyomva tartotta a hangerőgombokat. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> bekapcsolva."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Nyomva tartotta a hangerőgombokat. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> kikapcsolva."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Engedje fel a hangerőszabályzó gombokat. A(z) <xliff:g id="SERVICE_NAME">%1$s</xliff:g> bekapcsolásához tartsa újra lenyomva a hangerőszabályzó gombokat három másodpercig."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Funkció kiválasztása"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Funkció kiválasztása"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Funkció kiválasztása"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"A funkció a Kisegítő lehetőségek gombra való következő koppintáskor lesz megnyitva"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"A funkció a gyorsparancs következő használatakor lesz megnyitva. Csúsztasson felfelé két ujjal a képernyő aljáról, majd emelje fel gyorsan az ujjait."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"A funkció a gyorsparancs következő használatakor lesz megnyitva. Csúsztasson felfelé három ujjal a képernyő aljáról, majd emelje fel gyorsan az ujjait."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Nagyítás"</string>
<string name="user_switched" msgid="7249833311585228097">"<xliff:g id="NAME">%1$s</xliff:g> az aktuális felhasználó."</string>
<string name="user_switching_message" msgid="1912993630661332336">"Átváltás erre: <xliff:g id="NAME">%1$s</xliff:g>..."</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"A PIN-kód túl rövid. Legalább 4 számjegyből kell állnia."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Próbálkozzon később"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Megtekintése teljes képernyőn"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"A kilépéshez csúsztasson gyorsan lefelé a képernyő tetejéről."</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"Értem"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Forgassa el a jobb élmény érdekében"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"A jobb élmény érdekében teljes képernyős módban nyissa meg a(z) <xliff:g id="NAME">%s</xliff:g> alkalmazást"</string>
@@ -2436,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Hogyan működik?"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Függőben…"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"A Feloldás ujjlenyomattal funkció újbóli beállítása"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"A következő már nem felismerhető: <xliff:g id="FINGERPRINT">%s</xliff:g>."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"A következők már nem felismerhetők: <xliff:g id="FINGERPRINT_0">%1$s</xliff:g> és <xliff:g id="FINGERPRINT_1">%2$s</xliff:g>."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"A következő már nem felismerhető: <xliff:g id="FINGERPRINT">%s</xliff:g>. Állítsa be újra a Feloldás ujjlenyomattal funkciót."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"A következők már nem felismerhetők: <xliff:g id="FINGERPRINT_0">%1$s</xliff:g> és <xliff:g id="FINGERPRINT_1">%2$s</xliff:g>. Állítsa be újra a Feloldás ujjlenyomattal funkciót."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Állítsa be újra az Arcalapú feloldást"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Az arcmodellje már nem felismerhető. Állítsa be újra az Arcalapú feloldást."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Beállítás"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Most nem"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Riasztás <xliff:g id="USER_NAME">%s</xliff:g> részére"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Felhasználóváltás"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Némítás"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Koppintson a hang elnémításához"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-hy/strings.xml b/core/res/res/values-hy/strings.xml
index 4f9d478020af..aad776043bc4 100644
--- a/core/res/res/values-hy/strings.xml
+++ b/core/res/res/values-hy/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Հաղորդում վրիպակի մասին"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Ավարտել աշխատաշրջանը"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Սքրինշոթ"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Հաղորդում վրիպակի մասին"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Սա տեղեկություններ կհավաքագրի ձեր սարքի առկա կարգավիճակի մասին և կուղարկի այն էլեկտրոնային նամակով: Որոշակի ժամանակ կպահանջվի վրիպակի մասին զեկուցելու պահից սկսած մինչ ուղարկելը: Խնդրում ենք փոքր-ինչ համբերատար լինել:"</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Ինտերակտիվ զեկույց"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Սեղմեք՝ անլար վրիպազերծումն անջատելու համար:"</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Թեստային ռեժիմը միացված է"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Թեստային ռեժիմն անջատելու համար զրոյացրեք կարգավորումները։"</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"HSUM կառուցման սխալ կազմաձև"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"Այս սարքի առանց գրաֆիկական ինտերֆեյսի համակարգի օգտատիրոջ ռեժիմի (HSUM) կարգավիճակը տարբերվում է դրա կառուցման կազմաձևից։ Խնդրում ենք վերականգնել սարքի գործարանային կարգավորումները։"</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Սերիական վահանակը միացված է"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Աշխատանքի արդյունավետությունը նվազում է։ Վահանակն անջատելու համար ստուգեք օպերացիոն համակարգի բեռնիչը։"</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"Միացված է փորձնական MTE գործառույթը"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Ձայնի կարգավորման կոճակները սեղմվեցին։ <xliff:g id="SERVICE_NAME">%1$s</xliff:g> ծառայությունը միացավ։"</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Ձայնի կարգավորման կոճակները սեղմվեցին։ <xliff:g id="SERVICE_NAME">%1$s</xliff:g> ծառայությունն անջատվեց։"</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Բաց թողեք ձայնի ուժգնության կոճակները։ <xliff:g id="SERVICE_NAME">%1$s</xliff:g> ծառայությունը միացնելու համար սեղմեք և 3 վայրկյան պահեք ձայնի ուժգնության երկու կոճակը։"</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Ընտրեք որևէ գործառույթ"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Ընտրեք որևէ գործառույթ"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Ընտրեք որևէ գործառույթ"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"Գործառույթը կբացվի հաջորդ անգամ, երբ սեղմեք «Հատուկ գործառույթներ» կոճակը"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"Գործառույթը կբացվի հաջորդ անգամ, երբ օգտագործեք այս դյուրանցումը։ Երկու մատը էկրանի ներքևից սահեցրեք վերև և արագ բաց թողեք։"</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"Գործառույթը կբացվի հաջորդ անգամ, երբ օգտագործեք այս դյուրանցումը։ Երեք մատը էկրանի ներքևից սահեցրեք վերև և արագ բաց թողեք։"</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Խոշորացում"</string>
<string name="user_switched" msgid="7249833311585228097">"Ներկայիս օգտատերը <xliff:g id="NAME">%1$s</xliff:g>:"</string>
<string name="user_switching_message" msgid="1912993630661332336">"Անցում <xliff:g id="NAME">%1$s</xliff:g> պրոֆիլին..."</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"PIN-ը չափազանց կարճ է: Պետք է ունենա առնվազն 4 թվանիշ:"</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Կրկին փորձեք մի փոքր ուշ"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Լիաէկրան դիտում"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Դուրս գալու համար էկրանի վերևից մատը սահեցրեք ներքև"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"Պարզ է"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Պտտեք՝ դիտակերպը լավացնելու համար"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Բացեք <xliff:g id="NAME">%s</xliff:g> հավելվածը լիաէկրան ռեժիմում՝ դիտակերպը լավացնելու համար"</string>
@@ -2436,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Ինչպես է դա աշխատում"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Առկախ է…"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Նորից կարգավորեք մատնահետքով ապակողպումը"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> մատնահետքն այլևս չի կարող ճանաչվել։"</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> և <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> մատնահետքերն այլևս չեն կարող ճանաչվել։"</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> մատնահետքն այլևս չի կարող ճանաչվել։ Նորից կարգավորեք մատնահետքով ապակողպումը։"</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> և <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> մատնահետքերն այլևս չեն կարող ճանաչվել։ Նորից կարգավորեք մատնահետքով ապակողպումը։"</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Նորից կարգավորեք դեմքով ապակողպումը"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Ձեր դեմքի նմուշն այլևս չի կարող ճանաչվել։ Նորից կարգավորեք դեմքով ապակողպումը։"</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Կարգավորել"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Ոչ հիմա"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"<xliff:g id="USER_NAME">%s</xliff:g>-ի զարթուցիչ"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Անցնել մյուս հաշիվ"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Անտեսել"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Հպեք՝ ձայնն անջատելու համար"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-in/strings.xml b/core/res/res/values-in/strings.xml
index 2fabef385270..9668f0e52719 100644
--- a/core/res/res/values-in/strings.xml
+++ b/core/res/res/values-in/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Laporan bug"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Akhiri sesi"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Screenshot"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Laporan bug"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Ini akan mengumpulkan informasi status perangkat Anda saat ini, untuk dikirimkan sebagai pesan email. Harap bersabar, mungkin perlu waktu untuk memulai laporan bug hingga siap dikirim."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Laporan interaktif"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Pilih untuk menonaktifkan proses debug nirkabel."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Mode Tes Otomatis diaktifkan"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Lakukan reset ke setelan pabrik untuk menonaktifkan Mode Tes Otomatis."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Konfigurasi build HSUM salah"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"Status Mode Pengguna Sistem Headless dari perangkat ini berbeda dari konfigurasi build-nya. Reset perangkat ke setelan pabrik."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Konsol serial diaktifkan"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Performa terpengaruh. Untuk menonaktifkan, periksa bootloader."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"MTE eksperimental diaktifkan"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Tombol volume ditahan. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> diaktifkan."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Tombol volume ditahan. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> dinonaktifkan."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Lepaskan tombol volume. Untuk mengaktifkan <xliff:g id="SERVICE_NAME">%1$s</xliff:g>, tekan dan tahan kedua tombol volume lagi selama 3 detik."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Pilih fitur"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Pilih fitur"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Pilih fitur"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"Fitur akan terbuka setelah Anda mengetuk tombol aksesibilitas"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"Fitur akan terbuka setelah Anda menggunakan pintasan ini. Geser ke atas dengan 2 jari dari bawah layar, lalu lepaskan dengan cepat."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"Fitur akan terbuka setelah Anda menggunakan pintasan ini. Geser ke atas dengan 3 jari dari bawah layar, lalu lepaskan dengan cepat."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Pembesaran"</string>
<string name="user_switched" msgid="7249833311585228097">"Pengguna saat ini <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"Beralih ke <xliff:g id="NAME">%1$s</xliff:g>…"</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"PIN terlalu pendek. Minimal 4 digit."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Coba lagi nanti"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Melihat layar penuh"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Untuk keluar, geser ke bawah dari bagian atas layar"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"Mengerti"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Putar posisi layar untuk mendapatkan tampilan yang lebih baik"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Buka <xliff:g id="NAME">%s</xliff:g> dalam layar penuh untuk mendapatkan tampilan yang lebih baik"</string>
@@ -2436,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Cara kerjanya"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Tertunda..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Siapkan Buka dengan Sidik Jari lagi"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> tidak dapat dikenali lagi."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> dan <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> tidak dapat dikenali lagi."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> tidak dapat dikenali lagi. Siapkan Buka dengan Sidik Jari lagi."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> dan <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> tidak dapat dikenali lagi. Siapkan Buka dengan Sidik Jari lagi."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Siapkan Buka dengan Wajah lagi"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Model wajah Anda tidak dapat dikenali lagi. Siapkan Buka dengan Wajah lagi."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Penyiapan"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Lain kali"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Alarm untuk <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Ganti pengguna"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Bisukan"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Ketuk untuk membisukan suara"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-is/strings.xml b/core/res/res/values-is/strings.xml
index dd47cebcdf49..b179c15d1f83 100644
--- a/core/res/res/values-is/strings.xml
+++ b/core/res/res/values-is/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Villutilkynning"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Ljúka lotu"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Skjámynd"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Villutilkynning"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Þetta safnar upplýsingum um núverandi stöðu tækisins til að senda með tölvupósti. Það tekur smástund frá því villutilkynningin er ræst og þar til hún er tilbúin til sendingar – sýndu biðlund."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Gagnvirk skýrsla"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Veldu til að slökkva á þráðlausri villuleit."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Kveikt á stillingu prófunarvangs"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Núllstilltu til að slökkva á stillingu prófunarvangs."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Röng HSUM-grunnstilling"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"Ástand bakgrunnsnotandastillingarinnar í þessu tæki er ekki það sama og grunnstillingin gefur til kynna. Núllstilltu tækið."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Raðstjórnborð virkjað"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Þetta hefur áhrif á afköst. Athugaðu ræsiforritið ef þú vilt gera þetta óvirkt."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"Kveikt á MTE á tilraunarstigi"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Hljóðstyrkstökkum haldið inni. Kveikt á <xliff:g id="SERVICE_NAME">%1$s</xliff:g>."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Hljóðstyrkstökkum haldið inni. Slökkt á <xliff:g id="SERVICE_NAME">%1$s</xliff:g>."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Slepptu hljóðstyrkstökkunum. Til að kveikja á <xliff:g id="SERVICE_NAME">%1$s</xliff:g> skaltu halda báðum hljóðstyrkstökkunum aftur inni í 3 sekúndur."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Veldu eiginleika"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Veldu eiginleika"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Veldu eiginleika"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"Eiginleikinn opnast næst þegar þú ýtir á aðgengishnappinn"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"Eiginleikinn opnast næst þegar þú notar þessa flýtileið Strjúktu upp með 2 fingrum frá neðsta hluta skjásins og slepptu hratt."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"Eiginleikinn opnast næst þegar þú notar þessa flýtileið Strjúktu upp með 3 fingrum frá neðsta hluta skjásins og slepptu hratt."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Stækkun"</string>
<string name="user_switched" msgid="7249833311585228097">"Núverandi notandi <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"Skiptir yfir á <xliff:g id="NAME">%1$s</xliff:g>…"</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"PIN-númerið er of stutt. Það verður að vera a.m.k. 4 tölustafir."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Reyndu aftur síðar"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Notar allan skjáinn"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Strjúktu niður frá efsta hluta skjásins til að hætta"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"Ég skil"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Snúðu til að sjá betur"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Opnaðu <xliff:g id="NAME">%s</xliff:g> á öllum skjánum til að fá betra yfirlit"</string>
@@ -2436,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Svona virkar þetta"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Í bið…"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Setja upp fingrafarskenni aftur"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"Ekki er hægt að bera kennsl á <xliff:g id="FINGERPRINT">%s</xliff:g> lengur."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"Ekki er hægt að bera kennsl á <xliff:g id="FINGERPRINT_0">%1$s</xliff:g> og <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> lengur."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"Ekki er hægt að bera kennsl á <xliff:g id="FINGERPRINT">%s</xliff:g> lengur. Settu upp fingrafarskenni aftur."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"Ekki er hægt að bera kennsl á <xliff:g id="FINGERPRINT_0">%1$s</xliff:g> og <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> lengur. Settu upp fingrafarskenni aftur."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Setja upp andlitskenni aftur"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Ekki er hægt að bera kennsl á andlitslíkanið þitt lengur. Settu upp andlitskenni aftur."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Setja upp"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Ekki núna"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Viðvörun fyrir <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Skipta um notanda"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Þagga"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Ýttu til að þagga hljóð"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml
index 94b68b031deb..06aa308d6378 100644
--- a/core/res/res/values-it/strings.xml
+++ b/core/res/res/values-it/strings.xml
@@ -266,8 +266,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Segnalazione di bug"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Termina sessione"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Screenshot"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Segnalazione di bug"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Verranno raccolte informazioni sullo stato corrente del dispositivo che saranno inviate sotto forma di messaggio email. Passerà un po\' di tempo prima che la segnalazione di bug aperta sia pronta per essere inviata; ti preghiamo di avere pazienza."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Report interattivo"</string>
@@ -501,9 +499,9 @@
<string name="permlab_accessLocationExtraCommands" msgid="5162339812057983988">"accesso a comandi aggiuntivi provider di geolocalizz."</string>
<string name="permdesc_accessLocationExtraCommands" msgid="355369611979907967">"Consente all\'app di accedere a ulteriori comandi del fornitore di posizione. Ciò potrebbe consentire all\'app di interferire con il funzionamento del GPS o di altre fonti di geolocalizzazione."</string>
<string name="permlab_accessFineLocation" msgid="6426318438195622966">"accesso alla posizione esatta solo in primo piano"</string>
- <string name="permdesc_accessFineLocation" msgid="6732174080240016335">"Questa app può recuperare la tua posizione precisa dai Servizi di geolocalizzazione quando l\'app è in uso. L\'impostazione Servizi di geolocalizzazione deve essere attiva sul tuo dispositivo perché l\'app possa recuperare la tua posizione. Questa operazione potrebbe comportare un maggior consumo della batteria."</string>
+ <string name="permdesc_accessFineLocation" msgid="6732174080240016335">"Questa app può recuperare la tua posizione precisa dai Servizi di localizzazione quando l\'app è in uso. L\'impostazione Servizi di localizzazione deve essere attiva sul tuo dispositivo perché l\'app possa recuperare la tua posizione. Questa operazione potrebbe comportare un maggior consumo della batteria."</string>
<string name="permlab_accessCoarseLocation" msgid="1561042925407799741">"Accesso alla posizione approssimativa solo in primo piano"</string>
- <string name="permdesc_accessCoarseLocation" msgid="778521847873199160">"Questa app può recuperare la tua posizione approssimativa dai Servizi di geolocalizzazione quando l\'app è in uso. L\'impostazione Servizi di geolocalizzazione deve essere attiva sul tuo dispositivo perché l\'app possa recuperare la tua posizione."</string>
+ <string name="permdesc_accessCoarseLocation" msgid="778521847873199160">"Questa app può recuperare la tua posizione approssimativa dai Servizi di localizzazione quando l\'app è in uso. L\'impostazione Servizi di localizzazione deve essere attiva sul tuo dispositivo perché l\'app possa recuperare la tua posizione."</string>
<string name="permlab_accessBackgroundLocation" msgid="1721164702777366138">"accesso alla posizione in background"</string>
<string name="permdesc_accessBackgroundLocation" msgid="8264885066095638105">"Questa app può accedere alla posizione in qualsiasi momento, anche quando l\'app non è in uso."</string>
<string name="permlab_modifyAudioSettings" msgid="6129039778010031815">"modifica impostazioni audio"</string>
@@ -1414,10 +1412,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Seleziona per disattivare il debug wireless."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Modalità test harness attivata"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Ripristina le impostazioni di fabbrica per disattivare la modalità test harness."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Configurazione di compilazione della modalità utente di sistema headless errata"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"Lo stato della modalità utente di sistema headless di questo dispositivo è diverso dalla sua configurazione di compilazione. Ripristina i dati di fabbrica del dispositivo."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Console seriale attivata"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Ci sono conseguenze sulle prestazioni. Per disattivare, seleziona il bootloader."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"Funzionalità MTE sperimentale attivata"</string>
@@ -1762,12 +1758,9 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Tieni premuti i tasti del volume. Servizio <xliff:g id="SERVICE_NAME">%1$s</xliff:g> attivato."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Tieni premuti i tasti del volume. Servizio <xliff:g id="SERVICE_NAME">%1$s</xliff:g> disattivato."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Rilascia i tasti del volume. Per attivare <xliff:g id="SERVICE_NAME">%1$s</xliff:g>, tieni di nuovo premuti entrambi i tasti del volume per 3 secondi."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Scegli una funzionalità"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Scegli una funzionalità"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Scegli una funzionalità"</string>
<string name="accessibility_button_instructional_text" msgid="6831154884557881996">"La funzionalità si aprirà la prossima volta che toccherai il pulsante Accessibilità"</string>
<string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"La funzionalità si aprirà la prossima volta che utilizzerai questa scorciatoia. Scorri verso l\'alto con 2 dita dalla parte inferiore dello schermo e rilascia rapidamente."</string>
<string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"La funzionalità si aprirà la prossima volta che utilizzerai questa scorciatoia. Scorri verso l\'alto con 3 dita dalla parte inferiore dello schermo e rilascia rapidamente."</string>
@@ -1893,8 +1886,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"Il PIN è troppo corto. Deve avere almeno quattro cifre."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Riprova più tardi"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Visualizzazione a schermo intero"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Per uscire, scorri verso il basso dalla parte superiore dello schermo"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"OK"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Ruota per migliorare l\'anteprima"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Apri <xliff:g id="NAME">%s</xliff:g> a schermo intero per migliorare la visualizzazione"</string>
@@ -2434,21 +2426,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Come funziona"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"In attesa…"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Riconfigura lo Sblocco con l\'Impronta"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> non può più essere riconosciuto."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> e <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> non possono più essere riconosciuti."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> non può più essere riconosciuto. Riconfigura lo Sblocco con l\'Impronta."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> e <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> non possono più essere riconosciuti. Riconfigura lo Sblocco con l\'Impronta."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Riconfigura lo Sblocco con il Volto"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Il tuo modello del volto non può più essere riconosciuto. Riconfigura lo Sblocco con il Volto."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Configura"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Non ora"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Sveglia per: <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Cambia utente"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Disattiva audio"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Tocca per disattivare l\'audio"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-iw/strings.xml b/core/res/res/values-iw/strings.xml
index f9b1d03b07dc..dd9f6b82c3fa 100644
--- a/core/res/res/values-iw/strings.xml
+++ b/core/res/res/values-iw/strings.xml
@@ -266,8 +266,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"דוח איתור באגים"</string>
<string name="global_action_logout" msgid="6093581310002476511">"סיום הפעלה"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"צילום מסך"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"דיווח על באג"</string>
<string name="bugreport_message" msgid="5212529146119624326">"הפעולה הזו תאסוף מידע על מצב המכשיר הנוכחי שלך כדי לשלוח אותו כהודעת אימייל. היא תימשך זמן קצר מרגע פתיחת הדיווח על הבאג ועד לשליחת ההודעה בפועל. יש להמתין בסבלנות."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"דוח אינטראקטיבי"</string>
@@ -1414,10 +1412,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"יש לבחור כדי להשבית ניפוי באגים אלחוטי."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"מצב מסגרת בדיקה הופעל"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"כדי להשבית את מצב \'מסגרת בדיקה\' צריך לאפס להגדרות היצרן."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"‏תצורת build שגויה של \'משתמש מערכת ללא GUI\' ‏(HSUM)"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"‏מצב ה\'משתמש מערכת ללא GUI\' של המכשיר הזה שונה מתצורת ה-build שלו. צריך לאפס את המכשיר להגדרות המקוריות."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"קונסולה סדרתית מופעלת"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"קיימת השפעה על הביצועים. כדי להשבית, יש לבדוק את תוכנת האתחול."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"‏ה-MTE הניסיוני הופעל"</string>
@@ -1762,12 +1758,9 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"לחצני עוצמת הקול נלחצו בלחיצה ארוכה. שירות <xliff:g id="SERVICE_NAME">%1$s</xliff:g> הופעל."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"לחצני עוצמת הקול נלחצו בלחיצה ארוכה. שירות <xliff:g id="SERVICE_NAME">%1$s</xliff:g> הושבת."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"אפשר לשחרר את מקש עוצמת הקול. כדי להפעיל את השירות <xliff:g id="SERVICE_NAME">%1$s</xliff:g>, צריך ללחוץ לחיצה ארוכה על שני המקשים של עוצמת הקול שוב במשך 3 שניות."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"בחירת תכונה"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"בחירת תכונה"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"בחירת תכונה"</string>
<string name="accessibility_button_instructional_text" msgid="6831154884557881996">"התכונה תיפתח בפעם הבאה שתזוהה הקשה על לחצן הנגישות"</string>
<string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"התכונה תיפתח בפעם הבאה שייעשה שימוש במקש הקיצור הזה. צריך להחליק למעלה עם 2 אצבעות מהחלק התחתון של המסך ולשחרר במהירות."</string>
<string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"התכונה תיפתח בפעם הבאה שייעשה שימוש במקש הקיצור הזה. צריך להחליק למעלה עם 3 אצבעות מהחלק התחתון של המסך ולשחרר במהירות."</string>
@@ -1893,8 +1886,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"קוד הגישה קצר מדי. חייב להיות באורך 4 ספרות לפחות."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"יש לנסות שוב מאוחר יותר"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"צפייה במסך מלא"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"כדי לצאת, מחליקים למטה מהחלק העליון של המסך"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"הבנתי"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"מסובבים כדי לראות טוב יותר"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"צריך לפתוח את <xliff:g id="NAME">%s</xliff:g> במסך מלא כדי לראות טוב יותר"</string>
@@ -2434,21 +2426,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"איך זה עובד"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"בהמתנה..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"הגדרה חוזרת של \'ביטול הנעילה בטביעת אצבע\'"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"כבר לא ניתן לזהות את <xliff:g id="FINGERPRINT">%s</xliff:g>."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"כבר לא ניתן לזהות את <xliff:g id="FINGERPRINT_0">%1$s</xliff:g> ואת <xliff:g id="FINGERPRINT_1">%2$s</xliff:g>."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"כבר לא ניתן לזהות את <xliff:g id="FINGERPRINT">%s</xliff:g>. הגדרה חוזרת של \'פתיחה בטביעת אצבע\'."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"כבר לא ניתן לזהות את <xliff:g id="FINGERPRINT_0">%1$s</xliff:g> ואת <xliff:g id="FINGERPRINT_1">%2$s</xliff:g>. הגדרה חוזרת של \'פתיחה בטביעת אצבע\'."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"הגדרה חוזרת של \'פתיחה ע\"י זיהוי הפנים\'"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"כבר לא ניתן לזהות את התבנית לזיהוי הפנים. הגדרה חוזרת של \'פתיחה בזיהוי פנים\'."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"הגדרה"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"לא עכשיו"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"שעון מעורר של <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"החלפת משתמש"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"השתקה"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"צריך להקיש כדי להשתיק את הצליל"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-ja/strings.xml b/core/res/res/values-ja/strings.xml
index e97ff004b53e..29644862065c 100644
--- a/core/res/res/values-ja/strings.xml
+++ b/core/res/res/values-ja/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"バグレポート"</string>
<string name="global_action_logout" msgid="6093581310002476511">"セッションを終了"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"画面の保存"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"バグレポート"</string>
<string name="bugreport_message" msgid="5212529146119624326">"現在のデバイスの状態に関する情報が収集され、その内容がメールで送信されます。バグレポートが開始してから送信可能な状態となるまでには多少の時間がかかりますのでご了承ください。"</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"対話型レポート"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"ワイヤレス デバッグを無効にするには選択します。"</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"テストハーネス モード有効"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"出荷時設定にリセットしてテストハーネス モードを無効にしてください。"</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"ヘッドレス システム ユーザー モードのビルド構成に誤りがあります"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"このデバイスのヘッドレス システム ユーザー モードの状態は、ビルド構成と異なります。デバイスを初期状態にリセットしてください。"</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"シリアル コンソールは有効です"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"シリアル コンソールを有効にすると、パフォーマンスに影響します。無効にするには、ブートローダーをチェックしてください。"</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"試験運用版 MTE を有効にしました"</string>
@@ -1761,12 +1757,9 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"音量ボタンを長押ししました。<xliff:g id="SERVICE_NAME">%1$s</xliff:g> が ON になりました。"</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"音量ボタンを長押ししました。<xliff:g id="SERVICE_NAME">%1$s</xliff:g> が OFF になりました。"</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"音量ボタンを離してください。<xliff:g id="SERVICE_NAME">%1$s</xliff:g> を有効にするには音量大と音量小の両方のボタンを 3 秒ほど長押ししてください。"</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"機能の選択"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"機能の選択"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"機能の選択"</string>
<string name="accessibility_button_instructional_text" msgid="6831154884557881996">"この機能は、ユーザー補助機能ボタンを次回タップした時に利用できるようになります"</string>
<string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"この機能は、このショートカットを次回使用した時に利用できるようになります。2 本の指で画面の下部から上にスワイプし、素早く離してください。"</string>
<string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"この機能は、このショートカットを次回使用した時に利用できるようになります。3 本の指で画面の下部から上にスワイプし、素早く離してください。"</string>
@@ -1892,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"PINが短すぎます。4桁以上で設定してください。"</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"しばらくしてから再試行"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"全画面表示"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"終了するには画面の上部から下にスワイプします"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"OK"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"画面を回転させて見やすくしましょう"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"<xliff:g id="NAME">%s</xliff:g> を全画面表示で開いて見やすくしましょう"</string>
@@ -2433,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"仕組み"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"保留中..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"指紋認証をもう一度設定してください"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g>を認識できなくなりました。"</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g>と<xliff:g id="FINGERPRINT_1">%2$s</xliff:g>を認識できなくなりました。"</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g>を認識できなくなりました。指紋認証をもう一度設定してください。"</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g>と<xliff:g id="FINGERPRINT_1">%2$s</xliff:g>を認識できなくなりました。指紋認証をもう一度設定してください。"</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"顔認証をもう一度設定してください"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"顔モデルを認識できなくなりました。顔認証をもう一度設定してください。"</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"設定"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"後で"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"<xliff:g id="USER_NAME">%s</xliff:g> さんのアラーム"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"ユーザーを切り替え"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"ミュート"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"音声をミュートするにはタップします"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-ka/strings.xml b/core/res/res/values-ka/strings.xml
index 967877c9bcc9..a45176fce061 100644
--- a/core/res/res/values-ka/strings.xml
+++ b/core/res/res/values-ka/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"ხარვეზის ანგარიში"</string>
<string name="global_action_logout" msgid="6093581310002476511">"სესიის დასრულება"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"ეკრანის ანაბეჭდი"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"ხარვეზის ანგარიში"</string>
<string name="bugreport_message" msgid="5212529146119624326">"იგი შეაგროვებს ინფორმაციას თქვენი მოწყობილობის ამჟამინდელი მდგომარეობის შესახებ, რათა ის ელფოსტის შეტყობინების სახით გააგზავნოს. ხარვეზის ანგარიშის მომზადებასა და შეტყობინების გაგზავნას გარკვეული დრო სჭირდება. გთხოვთ, მოითმინოთ."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"ინტერაქტიული ანგარიში"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"აირჩიეთ შეცდომების უსადენო გამართვის გასათიშად."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"რეჟიმი „გარემო ტესტირებისთვის“ ჩართულია"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"დააბრუნეთ ქარხნული პარამეტრები „გარემო ტესტირებისთვის“ რეჟიმის გასათიშად."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"არასწორი HSUM build კონფიგურაცია"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"ამ მოწყობილობის Headless სისტემის მომხმარებლის რეჟიმის მდგომარეობა განსხვავდება მისი build კონფიგურაციისგან. გთხოვთ მოწყობილობა ქარხნულ პარამეტრებზე დააბრუნოთ."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"სერიული კონსოლი ჩართულია"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"მუშაობა შეფერხებულია. გასათიშად მონიშნეთ ჩამტვირთავი."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"ექსპერიმენტული MTE ჩართულია"</string>
@@ -1761,12 +1757,9 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"ხანგრძლივად დააჭირეთ ხმის ღილაკებს. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> ჩართულია."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"ხანგრძლივად დააჭირეთ ხმის ღილაკებს. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> გამორთულია."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"ხელი აუშვით ხმის ღილაკებს. <xliff:g id="SERVICE_NAME">%1$s</xliff:g>-ის ჩასართველად, ხელმეორედ ხანგრძლივად დააჭირეთ ორივე ხმის ღილაკს 3 წამის განმავლობაში."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"ფუნქციის არჩევა"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"ფუნქციის არჩევა"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"ფუნქციის არჩევა"</string>
<string name="accessibility_button_instructional_text" msgid="6831154884557881996">"ეს ფუნქცია გაიხსნება, როცა შემდეგ ჯერზე შეეხებით მარტივი წვდომის ღილაკს"</string>
<string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"ეს ფუნქცია გაიხსნება, როცა შემდეგ ჯერზე გამოიყენებთ ამ მალსახმობს. გადაფურცლეთ 2 თითით თქვენი ეკრანის ქვედა ნაწილიდან და სწრაფად აუშვით."</string>
<string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"ეს ფუნქცია გაიხსნება, როცა შემდეგ ჯერზე გამოიყენებთ ამ მალსახმობს. გადაფურცლეთ 3 თითით თქვენი ეკრანის ქვედა ნაწილიდან და სწრაფად აუშვით."</string>
@@ -1892,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"PIN ძალიან მოკლეა. უნდა შედგებოდეს სულ ცოტა 4 ციფრისგან."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"სცადეთ მოგვიანებით"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"სრულ ეკრანზე ნახვა"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"თქვენი ეკრანის ზემოდან გადაფურცლეთ ქვემოთ, რათა გამოხვიდეთ"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"გასაგებია"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"შეატრიალეთ უკეთესი ხედისთვის"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"გახსენით <xliff:g id="NAME">%s</xliff:g> სრულ ეკრანზე უკეთესი ხედისთვის"</string>
@@ -2433,21 +2425,25 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"მუშაობის პრინციპი"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"მომლოდინე..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"ანაბეჭდით განბლოკვის ხელახლა დაყენება"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g>-ის ამოცნობა ვეღარ ხერხდება."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g>-ისა და <xliff:g id="FINGERPRINT_1">%2$s</xliff:g>-ის ამოცნობა ვეღარ ხერხდება."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g>-ის ამოცნობა ვეღარ ხერხდება. დააყენეთ ანაბეჭდით განბლოკვა ხელახლა."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g>-ისა და <xliff:g id="FINGERPRINT_1">%2$s</xliff:g>-ის ამოცნობა ვეღარ ხერხდება. დააყენეთ ანაბეჭდით განბლოკვა ხელახლა."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"დააყენეთ სახით განბლოკვა ხელახლა"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"თქვენი სახის მოდელის ამოცნობა ვეღარ ხერხდება. დააყენეთ სახით განბლოკვა ხელახლა."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"დაყენება"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"ახლა არა"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"მაღვიძარა <xliff:g id="USER_NAME">%s</xliff:g>-ისთვის"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"მომხმარებლის გადართვა"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"დადუმება"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"შეეხეთ ხმის დასადუმებლად"</string>
+ <string name="keyboard_shortcut_group_applications_browser" msgid="6535007304687100909">"ბრაუზერი"</string>
+ <string name="keyboard_shortcut_group_applications_contacts" msgid="2750702518068326356">"კონტაქტები"</string>
+ <string name="keyboard_shortcut_group_applications_email" msgid="4229037666415353683">"ელფოსტა"</string>
+ <string name="keyboard_shortcut_group_applications_sms" msgid="3523799286376321137">"SMS"</string>
+ <string name="keyboard_shortcut_group_applications_music" msgid="2051507523525651067">"მუსიკა"</string>
+ <string name="keyboard_shortcut_group_applications_calendar" msgid="3571770335653387606">"კალენდარი"</string>
+ <string name="keyboard_shortcut_group_applications_calculator" msgid="6753209559716091507">"კალკულატორი"</string>
+ <string name="keyboard_shortcut_group_applications_maps" msgid="7950000659522589471">"Maps"</string>
+ <string name="keyboard_shortcut_group_applications" msgid="3010389163951364798">"აპლიკაციები"</string>
</resources>
diff --git a/core/res/res/values-kk/strings.xml b/core/res/res/values-kk/strings.xml
index 9d3ee992e6ae..c526870ddbab 100644
--- a/core/res/res/values-kk/strings.xml
+++ b/core/res/res/values-kk/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Вирус туралы хабарлау"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Сеансты аяқтау"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Скриншот"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Қате туралы есеп"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Құрылғының қазіргі күйі туралы ақпаратты жинап, электрондық хабармен жібереді. Есеп әзір болғанша біраз уақыт кетеді, шыдай тұрыңыз."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Интерактивті есеп"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Сымсыз түзетуді өшіру үшін басыңыз."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Сынақ бағдарламасы режимі қосылды"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Сынақ бағдарламасы режимін өшіру үшін зауыттық күйіне қайтарыңыз."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"HSUM құрастыру конфигурациясы дұрыс емес"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"Бұл құрылғының Headless System User Mode күйі құрастыру кезіндегі конфигурациясынан ерекшеленеді. Құрылғыны зауыттық параметрлеріне қайтарыңыз."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Сериялық консоль қосылды"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Өнімділікке әсер етеді. Өшіру үшін жүктегішті тексеріңіз."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"Эксперименттік MTE қосылды"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Пайдаланушы дыбыс деңгейі пернелерін басып ұстап тұрды. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> қосулы."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Дыбыс деңгейі пернелерін басып тұрған соң, <xliff:g id="SERVICE_NAME">%1$s</xliff:g> өшірілді."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Дыбыс деңгейі пернелерін жіберіңіз. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> қызметін қосу үшін дыбыс деңгейі пернесінің екеуін де қайтадан 3 секундқа басып тұрыңыз."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Функция таңдау"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Функция таңдау"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Функция таңдау"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"Келесіде арнайы мүмкіндіктер түймесін түрткенде, функция ашылады."</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"Келесіде осы жылдам пәрменді қолданғанда, функция ашылады. 2 саусақпен экранның төменгі жағынан жоғары қарай сырғытып, жылдам жіберіп қалыңыз."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"Келесіде осы жылдам пәрменді қолданғанда, функция ашылады. 3 саусақпен экранның төменгі жағынан жоғары қарай сырғытып, жылдам жіберіп қалыңыз."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Ұлғайту"</string>
<string name="user_switched" msgid="7249833311585228097">"Ағымдағы пайдаланушы <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"<xliff:g id="NAME">%1$s</xliff:g> профиліне ауысу…"</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"PIN тым қысқа. Кем дегенде 4 бірлік болуы тиіс."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Кейінірек қайта әрекеттеніңіз."</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Толық экранда көру"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Шығу үшін экранның жоғарғы жағынан төмен қарай сырғытыңыз."</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"Түсінікті"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Жақсырақ көру үшін бұрыңыз."</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Жақсырақ көру үшін <xliff:g id="NAME">%s</xliff:g> қолданбасын толық экранда ашыңыз."</string>
@@ -2436,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Бұл қалай орындалады?"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Дайын емес…"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Саусақ ізімен ашу функциясын қайта реттеу"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> бұдан былай танылмайды."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> және <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> бұдан былай танылмайды."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> бұдан былай танылмайды. Саусақ ізімен ашу функциясын қайта реттеңіз."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> және <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> бұдан былай танылмайды. Саусақ ізімен ашу функциясын қайта реттеңіз."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Бет тану функциясын қайта реттеу"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Бет үлгіңіз бұдан былай танылмайды. Бет тану функциясын қайта реттеңіз."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Реттеу"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Қазір емес"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"<xliff:g id="USER_NAME">%s</xliff:g> атына қойылған дабыл"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Пайдаланушыны ауыстыру"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Дыбысын өшіру"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Дыбысын өшіру үшін түртіңіз."</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-km/strings.xml b/core/res/res/values-km/strings.xml
index 88bf5274e48d..2bf799c9e8cf 100644
--- a/core/res/res/values-km/strings.xml
+++ b/core/res/res/values-km/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"របាយការណ៍​កំហុស"</string>
<string name="global_action_logout" msgid="6093581310002476511">"បញ្ចប់​សម័យ"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"រូបថតអេក្រង់"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"របាយការណ៍អំពីបញ្ហា"</string>
<string name="bugreport_message" msgid="5212529146119624326">"វា​នឹង​​ប្រមូល​ព័ត៌មាន​អំពី​ស្ថានភាព​ឧបករណ៍​របស់​អ្នក ដើម្បី​ផ្ញើ​ជា​សារ​អ៊ីមែល។ វា​នឹង​ចំណាយ​ពេល​តិច​ពី​ពេល​ចាប់ផ្ដើម​របាយការណ៍​រហូត​ដល់​ពេល​វា​រួចរាល់​ដើម្បី​ផ្ញើ សូម​អត់ធ្មត់។"</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"របាយការណ៍អន្តរកម្ម"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"ជ្រើសរើស ដើម្បី​បិទ​ការជួសជុល​ដោយឥតខ្សែ។"</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"បាន​បើក​មុខងារប្រមូលធ្វើតេស្ត"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"ធ្វើការកំណត់ដូចដើមឡើងវិញ ដើម្បី​បិទ​មុខងារប្រមូលធ្វើតេស្ត។"</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"ការកំណត់រចនាសម្ព័ន្ធកំណែបង្កើត HSUM ខុស"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"ស្ថានភាព Headless System User Mode របស់ឧបករណ៍នេះខុសពីការកំណត់រចនាសម្ព័ន្ធកំណែបង្កើតរបស់វា។ សូមកំណត់ឧបករណ៍នេះ​ដូច​ចេញ​ពី​រោងចក្រ។"</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"កុងសូល​ស៊េរី​ត្រូវបានបើក"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"ប្រតិបត្តិការ​ទទួលរង​ការប៉ះពាល់។ សូម​ពិនិត្យមើល​កម្មវិធី​ដំណើរការ​ប្រព័ន្ធ ដើម្បី​បិទ។"</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"បានបើក MTE ពិសោធន៍"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"បានសង្កត់​គ្រាប់ចុច​កម្រិតសំឡេង​ជាប់។ បាន​បើក <xliff:g id="SERVICE_NAME">%1$s</xliff:g>។"</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"បានសង្កត់​គ្រាប់ចុច​កម្រិតសំឡេង​ជាប់។ បាន​បិទ <xliff:g id="SERVICE_NAME">%1$s</xliff:g>។"</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"លែង​គ្រាប់ចុចកម្រិតសំឡេង។ ដើម្បីបើក <xliff:g id="SERVICE_NAME">%1$s</xliff:g> សូមចុច​គ្រាប់ចុចកម្រិតសំឡេងទាំងពីរឱ្យជាប់ម្ដងទៀត​រយៈពេល 3 វិនាទី។"</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"ជ្រើសរើសមុខងារ"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"ជ្រើសរើសមុខងារ"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"ជ្រើសរើសមុខងារ"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"មុខងារនេះនឹងបើក ពេលអ្នកចុចប៊ូតុង​ភាពងាយស្រួលនៅលើកក្រោយ"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"មុខងារនេះនឹងបើក ពេលអ្នកប្រើផ្លូវកាត់នេះនៅលើកក្រោយ។ អូសពីផ្នែកខាងក្រោមនៃអេក្រង់របស់អ្នកឡើងលើដោយប្រើម្រាមដៃ 2 ហើយលែងឱ្យរហ័ស។"</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"មុខងារនេះនឹងបើក ពេលអ្នកប្រើផ្លូវកាត់នេះនៅលើកក្រោយ។ អូសពីផ្នែកខាងក្រោមនៃអេក្រង់របស់អ្នកឡើងលើដោយប្រើម្រាមដៃ 3 ហើយលែងឱ្យរហ័ស។"</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"ការ​ពង្រីក"</string>
<string name="user_switched" msgid="7249833311585228097">"អ្នក​ប្រើ​បច្ចុប្បន្ន <xliff:g id="NAME">%1$s</xliff:g> ។"</string>
<string name="user_switching_message" msgid="1912993630661332336">"កំពុង​ប្ដូរ​ទៅ <xliff:g id="NAME">%1$s</xliff:g>…"</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"កូដ​ PIN ខ្លី​ពេក។ ត្រូវ​តែ​មាន​យ៉ាង​ហោច​ណាស់ ៤ តួ។"</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"សូម​ព្យាយាម​ម្ដងទៀត​នៅ​ពេល​ក្រោយ។"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"កំពុងមើលពេញអេក្រង់"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"ដើម្បីចេញ សូមអូសពីផ្នែកខាងលើនៃអេក្រង់របស់អ្នកចុះក្រោម"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"យល់ហើយ"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"បង្វិលដើម្បីមើលបានកាន់តែច្បាស់"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"បើក <xliff:g id="NAME">%s</xliff:g> នៅក្នុងអេក្រង់ពេញ ដើម្បីមើលបានកាន់តែច្បាស់"</string>
@@ -2436,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"របៀបដែលវាដំណើរការ"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"កំពុងរង់ចាំ..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"រៀបចំការដោះសោ​ដោយស្កេន​ស្នាមម្រាមដៃម្ដងទៀត"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"លែងអាចសម្គាល់ <xliff:g id="FINGERPRINT">%s</xliff:g> បានទៀតហើយ។"</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"លែងអាចសម្គាល់ <xliff:g id="FINGERPRINT_0">%1$s</xliff:g> និង <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> បានទៀតហើយ។"</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"លែងអាចសម្គាល់ <xliff:g id="FINGERPRINT">%s</xliff:g> បានទៀតហើយ។ សូមរៀបចំការដោះសោ​ដោយស្កេន​ស្នាមម្រាមដៃម្ដងទៀត។"</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"លែងអាចសម្គាល់ <xliff:g id="FINGERPRINT_0">%1$s</xliff:g> និង <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> បានទៀតហើយ។ សូមរៀបចំការដោះសោ​ដោយស្កេន​ស្នាមម្រាមដៃម្ដងទៀត។"</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"រៀបចំ​ការដោះ​សោ​ដោយស្កេន​មុខម្ដងទៀត"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"លែងអាចសម្គាល់គំរូមុខរបស់អ្នកបានទៀតហើយ។ សូមរៀបចំ​ការដោះ​សោ​ដោយស្កេន​មុខម្ដងទៀត។"</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"រៀបចំ"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"កុំទាន់"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"ម៉ោងរោទ៍សម្រាប់ <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"ប្ដូរអ្នកប្រើប្រាស់"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"បិទសំឡេង"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"ចុចដើម្បីបិទសំឡេង"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-kn/strings.xml b/core/res/res/values-kn/strings.xml
index 59612451ddc0..413a35a92c48 100644
--- a/core/res/res/values-kn/strings.xml
+++ b/core/res/res/values-kn/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"ದೋಷದ ವರದಿ"</string>
<string name="global_action_logout" msgid="6093581310002476511">"ಸೆಷನ್ ಅಂತ್ಯಗೊಳಿಸಿ"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"ಸ್ಕ್ರೀನ್‌ಶಾಟ್"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"ಬಗ್ ವರದಿ"</string>
<string name="bugreport_message" msgid="5212529146119624326">"ನಿಮ್ಮ ಸಾಧನದ ಪ್ರಸ್ತುತ ಸ್ಥಿತಿಯ ಕುರಿತು ಮಾಹಿತಿಯನ್ನು ಸಂಗ್ರಹಿಸಿಕೊಳ್ಳುವುದರ ಜೊತೆ ಇ-ಮೇಲ್ ರೂಪದಲ್ಲಿ ನಿಮಗೆ ರವಾನಿಸುತ್ತದೆ. ಇದು ದೋಷ ವರದಿಯನ್ನು ಪ್ರಾರಂಭಿಸಿದ ಸಮಯದಿಂದ ಅದನ್ನು ಕಳುಹಿಸುವವರೆಗೆ ಸ್ವಲ್ಪ ಸಮಯವನ್ನು ತೆಗೆದುಕೊಳ್ಳುತ್ತದೆ; ದಯವಿಟ್ಟು ತಾಳ್ಮೆಯಿಂದಿರಿ."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"ಪರಸ್ಪರ ಸಂವಹನ ವರದಿ"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"ವೈರ್‌ಲೆಸ್ ಡೀಬಗ್‌ ಮಾಡುವಿಕೆಯನ್ನು ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಲು ಆಯ್ಕೆ ಮಾಡಿ."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"ಸ್ವಯಂ ಪರೀಕ್ಷೆಯಾಗುವಿಕೆ ಮೋಡ್ ಅನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಲಾಗಿದೆ"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"ಸ್ವಯಂ ಪರೀಕ್ಷೆಯಾಗುವಿಕೆ ಮೋಡ್ ಅನ್ನು ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಲು ಫ್ಯಾಕ್ಟರಿ ರಿಸೆಟ್ ಮಾಡಬೇಕು."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"HSUM ಬಿಲ್ಡ್ ಕಾನ್ಫಿಗರೇಶನ್ ತಪ್ಪಾಗಿದೆ"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"ಈ ಸಾಧನದ ಹೆಡ್‌ಲೆಸ್ ಸಿಸ್ಟಂ ಬಳಕೆದಾರ ಮೋಡ್ ಸ್ಥಿತಿಯು ಅದರ ಬಿಲ್ಡ್ ಕಾನ್ಫಿಗರೇಶನ್‌ಗಿಂತ ಭಿನ್ನವಾಗಿದೆ. ಸಾಧನವನ್ನು ಫ್ಯಾಕ್ಟರಿ ರೀಸೆಟ್ ಮಾಡಿ."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"ಸರಣಿ ಕನ್ಸೋಲ್ ಅನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಲಾಗಿದೆ"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"ಕಾರ್ಯಕ್ಷಮತೆಯ ಮೇಲೆ ಪರಿಣಾಮ ಬೀರುತ್ತದೆ. ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಲು, ಬೂಟ್‌ಲೋಡರ್ ಅನ್ನು ಪರಿಶೀಲಿಸಿ."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"ಪ್ರಾಯೋಗಿಕ MTE ಸಕ್ರಿಯಗೊಳಿಸಲಾಗಿದೆ"</string>
@@ -1761,12 +1757,9 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"ವಾಲ್ಯೂಮ್ ಕೀಗಳನ್ನು ಹಿಡಿದುಕೊಳ್ಳಿ. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> ಅನ್ನು ಆನ್ ಮಾಡಲಾಗಿದೆ."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"ವಾಲ್ಯೂಮ್ ಕೀಗಳನ್ನು ಹಿಡಿದಿಟ್ಟುಕೊಳ್ಳಲಾಗಿದೆ. <xliff:g id="SERVICE_NAME">%1$s</xliff:g>, ಆಫ್ ಮಾಡಲಾಗಿದೆ."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"ವಾಲ್ಯೂಮ್ ಕೀಗಳನ್ನು ಬಿಡುಗಡೆ ಮಾಡಿ. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> ಅನ್ನು ಆನ್ ಮಾಡಲು, ಎರಡೂ ವಾಲ್ಯೂಮ್ ಕೀಗಳನ್ನು ಮತ್ತೊಮ್ಮೆ 3 ಸೆಕೆಂಡ್‌ಗಳ ಕಾಲ ಒತ್ತಿ ಹಿಡಿದುಕೊಳ್ಳಿ."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"ಫೀಚರ್ ಆರಿಸಿ"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"ಫೀಚರ್ ಆರಿಸಿ"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"ಫೀಚರ್ ಆರಿಸಿ"</string>
<string name="accessibility_button_instructional_text" msgid="6831154884557881996">"ಮುಂದಿನ ಬಾರಿ ನೀವು ಆ್ಯಕ್ಸೆಸಿಬಿಲಿಟಿ ಬಟನ್ ಅನ್ನು ಟ್ಯಾಪ್ ಮಾಡಿದಾಗ ಈ ಫೀಚರ್ ಆನ್‌ ಆಗುತ್ತದೆ"</string>
<string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"ಮುಂದಿನ ಬಾರಿ ನೀವು ಈ ಶಾರ್ಟ್‌ಕಟ್ ಅನ್ನು ಬಳಸುವಾಗ ಈ ಫೀಚರ್ ಆನ್ ಆಗುತ್ತದೆ. ನಿಮ್ಮ ಸ್ಕ್ರೀನ್‌ನ ಕೆಳಗಿನಿಂದ 2 ಬೆರಳುಗಳಿಂದ ಮೇಲಕ್ಕೆ ಸ್ವೈಪ್ ಮಾಡಿ ಹಾಗೂ ತ್ವರಿತವಾಗಿ ಬಿಡುಗಡೆ ಮಾಡಿ."</string>
<string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"ಮುಂದಿನ ಬಾರಿ ನೀವು ಈ ಶಾರ್ಟ್‌ಕಟ್ ಅನ್ನು ಬಳಸುವಾಗ ಈ ಫೀಚರ್ ಆನ್ ಆಗುತ್ತದೆ. ನಿಮ್ಮ ಸ್ಕ್ರೀನ್‌ನ ಕೆಳಗಿನಿಂದ 3 ಬೆರಳುಗಳಿಂದ ಮೇಲಕ್ಕೆ ಸ್ವೈಪ್ ಮಾಡಿ ಹಾಗೂ ತ್ವರಿತವಾಗಿ ಬಿಡುಗಡೆ ಮಾಡಿ."</string>
@@ -1892,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"ಪಿನ್‌ ತುಂಬಾ ಚಿಕ್ಕದಾಗಿದೆ. ಕನಿಷ್ಠ ಪಕ್ಷ 4 ಅಂಕಿಗಳಾಗಿರಬೇಕು."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"ನಂತರ ಮತ್ತೆ ಪ್ರಯತ್ನಿಸಿ"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"ಪೂರ್ಣ ಪರದೆಯನ್ನು ವೀಕ್ಷಿಸಲಾಗುತ್ತಿದೆ"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"ನಿರ್ಗಮಿಸಲು, ನಿಮ್ಮ ಸ್ಕ್ರೀನ್‌ನ ಮೇಲಿನಿಂದ ಕೆಳಕ್ಕೆ ಸ್ವೈಪ್ ಮಾಡಿ"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"ತಿಳಿಯಿತು"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"ಅತ್ಯುತ್ತಮ ವೀಕ್ಷಣೆಗಾಗಿ ತಿರುಗಿಸಿ"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"ಅತ್ಯುತ್ತಮ ವೀಕ್ಷಣೆಗಾಗಿ <xliff:g id="NAME">%s</xliff:g> ಅನ್ನು ಪೂರ್ಣ ಸ್ಕ್ರೀನ್‌ನಲ್ಲಿ ತೆರೆಯಿರಿ"</string>
@@ -2433,21 +2425,25 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"ಇದು ಹೇಗೆ ಕೆಲಸ ಮಾಡುತ್ತದೆ"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"ಬಾಕಿ ಉಳಿದಿದೆ..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"ಫಿಂಗರ್‌ಪ್ರಿಂಟ್ ಅನ್‌ಲಾಕ್ ಅನ್ನು ಮತ್ತೊಮ್ಮೆ ಸೆಟಪ್ ಮಾಡಿ"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> ಅನ್ನು ಇನ್ನು ಮುಂದೆ ಗುರುತಿಸಲಾಗುವುದಿಲ್ಲ."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> ಮತ್ತು <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> ಅನ್ನು ಇನ್ನು ಮುಂದೆ ಗುರುತಿಸಲಾಗುವುದಿಲ್ಲ."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> ಅನ್ನು ಇನ್ನು ಮುಂದೆ ಗುರುತಿಸಲಾಗುವುದಿಲ್ಲ. ಫಿಂಗರ್‌ಪ್ರಿಂಟ್ ಅನ್‌ಲಾಕ್ ಅನ್ನು ಮತ್ತೊಮ್ಮೆ ಸೆಟಪ್ ಮಾಡಿ."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> ಮತ್ತು <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> ಅನ್ನು ಇನ್ನು ಮುಂದೆ ಗುರುತಿಸಲಾಗುವುದಿಲ್ಲ. ಫಿಂಗರ್‌ಪ್ರಿಂಟ್ ಅನ್‌ಲಾಕ್ ಅನ್ನು ಮತ್ತೊಮ್ಮೆ ಸೆಟಪ್ ಮಾಡಿ."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"ಫೇಸ್ ಅನ್‌ಲಾಕ್ ಅನ್ನು ಮತ್ತೊಮ್ಮೆ ಸೆಟಪ್ ಮಾಡಿ"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"ನಿಮ್ಮ ಫೇಸ್ ಮಾಡೆಲ್ ಅನ್ನು ಇನ್ನು ಮುಂದೆ ಗುರುತಿಸಲಾಗುವುದಿಲ್ಲ. ಫೇಸ್ ಅನ್‌ಲಾಕ್ ಅನ್ನು ಮತ್ತೊಮ್ಮೆ ಸೆಟಪ್ ಮಾಡಿ."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"ಸೆಟಪ್ ಮಾಡಿ"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"ಈಗ ಬೇಡ"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"<xliff:g id="USER_NAME">%s</xliff:g> ಗಾಗಿ ಅಲಾರಾಂ"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"ಬಳಕೆದಾರರನ್ನು ಬದಲಿಸಿ"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"ಮ್ಯೂಟ್ ಮಾಡಿ"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"ಧ್ವನಿಯನ್ನು ಮ್ಯೂಟ್ ಮಾಡಲು ಟ್ಯಾಪ್ ಮಾಡಿ"</string>
+ <string name="keyboard_shortcut_group_applications_browser" msgid="6535007304687100909">"ಬ್ರೌಸರ್"</string>
+ <string name="keyboard_shortcut_group_applications_contacts" msgid="2750702518068326356">"ಸಂಪರ್ಕಗಳು"</string>
+ <string name="keyboard_shortcut_group_applications_email" msgid="4229037666415353683">"ಇಮೇಲ್"</string>
+ <string name="keyboard_shortcut_group_applications_sms" msgid="3523799286376321137">"SMS"</string>
+ <string name="keyboard_shortcut_group_applications_music" msgid="2051507523525651067">"ಸಂಗೀತ"</string>
+ <string name="keyboard_shortcut_group_applications_calendar" msgid="3571770335653387606">"Calendar"</string>
+ <string name="keyboard_shortcut_group_applications_calculator" msgid="6753209559716091507">"ಕ್ಯಾಲ್ಕ್ಯುಲೇಟರ್"</string>
+ <string name="keyboard_shortcut_group_applications_maps" msgid="7950000659522589471">"Maps"</string>
+ <string name="keyboard_shortcut_group_applications" msgid="3010389163951364798">"ಆ್ಯಪ್‌ಗಳು"</string>
</resources>
diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml
index 1dea620e2bbc..e0d3fb7ae1d1 100644
--- a/core/res/res/values-ko/strings.xml
+++ b/core/res/res/values-ko/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"버그 신고"</string>
<string name="global_action_logout" msgid="6093581310002476511">"세션 끝내기"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"스크린샷"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"버그 신고"</string>
<string name="bugreport_message" msgid="5212529146119624326">"현재 기기 상태에 대한 정보를 수집하여 이메일 메시지로 전송합니다. 버그 신고를 시작하여 전송할 준비가 되려면 약간 시간이 걸립니다."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"대화형 보고서"</string>
@@ -1199,7 +1197,7 @@
<string name="low_internal_storage_view_title" msgid="9024241779284783414">"저장 공간이 부족함"</string>
<string name="low_internal_storage_view_text" msgid="8172166728369697835">"일부 시스템 기능이 작동하지 않을 수 있습니다."</string>
<string name="low_internal_storage_view_text_no_boot" msgid="7368968163411251788">"시스템의 저장 공간이 부족합니다. 250MB의 여유 공간이 확보한 후 다시 시작하세요."</string>
- <string name="app_running_notification_title" msgid="8985999749231486569">"<xliff:g id="APP_NAME">%1$s</xliff:g>이(가) 실행 중입니다."</string>
+ <string name="app_running_notification_title" msgid="8985999749231486569">"<xliff:g id="APP_NAME">%1$s</xliff:g> 실행 중"</string>
<string name="app_running_notification_text" msgid="5120815883400228566">"자세한 내용을 보거나 앱을 중지하려면 탭하세요."</string>
<string name="ok" msgid="2646370155170753815">"확인"</string>
<string name="cancel" msgid="6908697720451760115">"취소"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"무선 디버깅을 사용 중지하려면 선택하세요."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"테스트 하네스 모드 사용 설정됨"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"테스트 하네스 모드를 사용 중지하려면 초기화하세요."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"잘못된 HSUM 빌드 구성"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"이 기기의 헤드리스 시스템 사용자 모드 상태가 빌드 구성과 다릅니다. 기기를 초기화하세요."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"시리얼 콘솔 사용 설정됨"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"성능에 영향을 미쳤습니다. 사용 중지하려면 부트로더를 확인하세요."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"실험용 MTE 사용 설정됨"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"볼륨 키를 길게 눌렀습니다. <xliff:g id="SERVICE_NAME">%1$s</xliff:g>이(가) 사용 설정되었습니다."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"볼륨 키를 길게 눌렀습니다. <xliff:g id="SERVICE_NAME">%1$s</xliff:g>이(가) 사용 중지되었습니다."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"볼륨 키에서 손을 뗍니다. <xliff:g id="SERVICE_NAME">%1$s</xliff:g>을 켜려면 볼륨 키 2개를 3초 동안 길게 누르세요."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"기능을 선택합니다"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"기능을 선택합니다"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"기능을 선택합니다"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"다음번에 접근성 버튼을 탭할 때 이 기능이 열립니다."</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"다음번에 이 단축키를 사용할 때 이 기능이 열립니다. 화면 하단에서 손가락 두 개를 사용해 위로 스와이프했다가 빠르게 놓습니다."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"다음번에 이 단축키를 사용할 때 이 기능이 열립니다. 화면 하단에서 손가락 세 개를 사용해 위로 스와이프했다가 빠르게 놓습니다."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"확대"</string>
<string name="user_switched" msgid="7249833311585228097">"현재 사용자는 <xliff:g id="NAME">%1$s</xliff:g>님입니다."</string>
<string name="user_switching_message" msgid="1912993630661332336">"<xliff:g id="NAME">%1$s</xliff:g>로 전환하는 중…"</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"PIN이 너무 짧습니다. 최소 4자 이상이어야 합니다."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"나중에 다시 시도"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"전체 화면 모드"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"종료하려면 화면 상단에서 아래로 스와이프합니다."</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"확인"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"카메라 미리보기 화면이 잘 보이도록 회전하세요."</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"화면이 더 잘 보이도록 <xliff:g id="NAME">%s</xliff:g>을(를) 전체 화면에서 여세요."</string>
@@ -2436,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"작동 방식"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"대기 중…"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"지문 잠금 해제 다시 설정"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> 지문을 더 이상 인식할 수 없습니다."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> 및 <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> 지문을 더 이상 인식할 수 없습니다."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> 지문을 더 이상 인식할 수 없습니다. 지문 잠금 해제를 다시 설정하세요."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> 및 <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> 지문을 더 이상 인식할 수 없습니다. 지문 잠금 해제를 다시 설정하세요."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"얼굴 인식 잠금 해제 다시 설정"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"얼굴 모델을 더 이상 인식할 수 없습니다. 얼굴 인식 잠금 해제를 다시 설정하세요."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"설정"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"나중에"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"<xliff:g id="USER_NAME">%s</xliff:g>님의 알람"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"사용자 전환"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"음소거"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"탭하여 소리 음소거"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-ky/strings.xml b/core/res/res/values-ky/strings.xml
index 47767936ae4b..e4c460381134 100644
--- a/core/res/res/values-ky/strings.xml
+++ b/core/res/res/values-ky/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Ката тууралуу билдирүү"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Сеансты бүтүрүү"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Скриншот"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Мүчүлүштүк жөнүндө кабарлоо"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Ушуну менен түзмөгүңүздүн учурдагы абалы тууралуу маалымат топтолуп, электрондук почта аркылуу жөнөтүлөт. Отчет даяр болгуча бир аз күтө туруңуз."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Интерактивдүү кабар"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Мүчүлүштүктөрдү Wi-Fi аркылуу оңдоону өчүрүңүз."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Сыноо программасынын режими иштетилди"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Сыноо программасынын режимин өчүрүү үчүн баштапкы параметрлерге кайтарыңыз."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"HSUM курама конфигурациясы туура эмес"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"Бул түзмөктөгү Консолдук системаны колдонуучу режиминин абалы курама конфигурациядан айырмаланып турат. Түзмөктү баштапкы абалга кайтарыңыз."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Сериялык консоль иштетилди"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Майнаптуулугуна таасири тиет. Өчүрүү үчүн операциялык тутумду жүктөгүчтү текшериңиз."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"Cынамык MTE иштетилди"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Үндү катуулатуу/акырындатуу баскычтары басылып, <xliff:g id="SERVICE_NAME">%1$s</xliff:g> күйгүзүлдү."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Үндү катуулатуу/акырындатуу баскычтары басылып, <xliff:g id="SERVICE_NAME">%1$s</xliff:g> өчүрүлдү."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Үн баскычтарын коё бериңиз. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> кызматын күйгүзүү үчүн үн баскычтарын кайра 3 секунд коё бербей басып туруңуз."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Функция тандаңыз"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Функция тандаңыз"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Функция тандаңыз"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"Эми функция атайын мүмкүнчүлүктөр баскычын басканыңызда ачылат"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"Эми функция ушул ыкчам баскыч менен ачылат. Экранды 2 манжаңыз менен ылдыйдан өйдө карай сүрүп, тез коё бериңиз."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"Эми функция ушул ыкчам баскыч менен ачылат. Экранды 3 манжаңыз менен ылдыйдан өйдө карай сүрүп, тез коё бериңиз."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Чоңойтуу"</string>
<string name="user_switched" msgid="7249833311585228097">"Учурдагы колдонуучу <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"<xliff:g id="NAME">%1$s</xliff:g> дегенге которулууда…"</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"PIN өтө кыска. Аз дегенде 4 сандан турушу керек."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Бир аздан кийин кайталап көрүңүз"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Толук экран режими"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Чыгуу үчүн экранды өйдө жагынан ылдый сүрүп коюңуз"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"Түшүндүм"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Жакшыраак көрүү үчүн буруңуз"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Жакшыраак көрүү үчүн <xliff:g id="NAME">%s</xliff:g> колдонмосун толук экранда ачыңыз"</string>
@@ -2436,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Ал кантип иштейт"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Кезекте турат..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Манжа изи менен ачуу функциясын кайра тууралаңыз"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> мындан ары таанылбайт."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> жана <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> мындан ары таанылбайт."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> мындан ары таанылбайт. Манжа изи менен ачуу функциясын кайрадан тууралаңыз."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> жана <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> мындан ары таанылбайт. Манжа изи менен ачуу функциясын кайрадан тууралаңыз."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Жүзүнөн таанып ачуу функциясын кайрадан тууралаңыз"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Жүзүңүздүн үлгүсү мындан ары таанылбайт. Жүзүнөн таанып ачуу функциясын кайрадан тууралаңыз."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Тууралоо"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Азыр эмес"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"<xliff:g id="USER_NAME">%s</xliff:g> үчүн ойготкуч"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Колдонуучуну которуштуруу"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Үнүн басуу"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Үнүн басуу үчүн таптап коюңуз"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-lo/strings.xml b/core/res/res/values-lo/strings.xml
index 7e31a1ccbd1a..ef5e51dc6dc5 100644
--- a/core/res/res/values-lo/strings.xml
+++ b/core/res/res/values-lo/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"ລາຍງານຂໍ້ຜິດພາດ"</string>
<string name="global_action_logout" msgid="6093581310002476511">"ສິ້ນສຸດເຊດຊັນ"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"ພາບໜ້າຈໍ"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"ລາຍງານຂໍ້ຜິດພາດ"</string>
<string name="bugreport_message" msgid="5212529146119624326">"ນີ້ຈະເປັນການເກັບກຳຂໍ້ມູນກ່ຽວກັບ ສະຖານະປັດຈຸບັນຂອງອຸປະກອນທ່ານ ເພື່ອສົ່ງເປັນຂໍ້ຄວາມທາງອີເມວ. ມັນຈະໃຊ້ເວລາໜ້ອຍນຶ່ງ ໃນການເລີ່ມຕົ້ນການລາຍງານຂໍ້ຜິດພາດ ຈົນກວ່າຈະພ້ອມທີ່ຈະສົ່ງໄດ້, ກະລຸນາລໍຖ້າ."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"ລາຍງານແບບໂຕ້ຕອບ"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"ເລືອກເພື່ອປິດການນຳໃຊ້ການດີບັກໄຮ້ສາຍ."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"ເປີດໃຊ້ໂໝດ Test Harness ແລ້ວ"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"ດຳເນີນການຣີເຊັດເປັນຄ່າຈາກໂຮງງານເພື່ອປິດການນຳໃຊ້ໂໝດ Test Harness."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"ການຕັ້ງຄ່າ build ຂອງ HSUM ບໍ່ຖືກຕ້ອງ"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"ສະຖານະໂໝດຜູ້ໃຊ້ລະບົບແບບບໍ່ມີສ່ວນຫົວຂອງອຸປະກອນນີ້ແຕກຕ່າງຈາກການຕັ້ງຄ່າ build. ກະລຸນາຣີເຊັດອຸປະກອນເປັນຄ່າຈາກໂຮງງານ."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"ເປີດນຳໃຊ້ຊີຣຽວຄອນໂຊແລ້ວ"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"ມີຜົນກະທົບກັບປະສິດທິພາບ. ເພື່ອປິດການນຳໃຊ້, ໃຫ້ກວດສອບ bootloader ເບິ່ງ."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"ເປີດການນຳໃຊ້ MTE ແບບທົດລອງແລ້ວ"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"ກົດປຸ່ມລະດັບສຽງຄ້າງໄວ້. ເປີດໃຊ້ <xliff:g id="SERVICE_NAME">%1$s</xliff:g> ແລ້ວ."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"ກົດປຸ່ມລະດັບສຽງຄ້າງໄວ້. ປິດ <xliff:g id="SERVICE_NAME">%1$s</xliff:g> ໄວ້ແລ້ວ."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"ປ່ອຍປຸ່ມລະດັບສຽງ. ເພື່ອເປີດ <xliff:g id="SERVICE_NAME">%1$s</xliff:g>, ໃຫ້ກົດປຸ່ມລະດັບສຽງທັງສອງຄ້າງໄວ້ 3 ວິນາທີ."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"ເລືອກຄຸນສົມບັດ"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"ເລືອກຄຸນສົມບັດ"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"ເລືອກຄຸນສົມບັດ"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"ຄຸນສົມບັດນີ້ຈະເປີດຂຶ້ນໃນເທື່ອຕໍ່ໄປທີ່ທ່ານແຕະປຸ່ມການຊ່ວຍເຂົ້າເຖິງ"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"ຄຸນສົມບັດນີ້ຈະເປີດຂຶ້ນໃນເທື່ອຕໍ່ໄປທີ່ທ່ານໃຊ້ທາງລັດນີ້. ໃຊ້ 2 ນິ້ວປັດຂຶ້ນຈາກລຸ່ມສຸດຂອງໜ້າຈໍຂອງທ່ານແລ້ວປ່ອຍແບບໄວໆ."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"ຄຸນສົມບັດນີ້ຈະເປີດຂຶ້ນໃນເທື່ອຕໍ່ໄປທີ່ທ່ານໃຊ້ທາງລັດນີ້. ໃຊ້ 3 ນິ້ວປັດຂຶ້ນຈາກລຸ່ມສຸດຂອງໜ້າຈໍຂອງທ່ານແລ້ວປ່ອຍແບບໄວໆ."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"ການຂະຫຍາຍ"</string>
<string name="user_switched" msgid="7249833311585228097">"ຜູ່ໃຊ້ປັດຈຸບັນ <xliff:g id="NAME">%1$s</xliff:g> ."</string>
<string name="user_switching_message" msgid="1912993630661332336">"ກຳລັງສະຫຼັບໄປຫາ<xliff:g id="NAME">%1$s</xliff:g>…"</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"PIN ​ສັ້ນ​ເກີນ​ໄປ​. ຕ້ອງມີຢ່າງໜ້ອຍ 4 ຫຼັກ​."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"ລອງໃໝ່ອີກຄັ້ງໃນພາຍຫລັງ."</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"ການ​ເບິ່ງ​ເຕັມ​ໜ້າ​ຈໍ"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"ເພື່ອອອກ, ໃຫ້ປັດລົງຈາກເທິງສຸດຂອງໜ້າຈໍຂອງທ່ານ"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"ເຂົ້າ​ໃຈ​ແລ້ວ"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"ໝຸນເພື່ອມຸມມອງທີ່ດີຂຶ້ນ"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"ເປີດ <xliff:g id="NAME">%s</xliff:g> ໃນໂໝດເຕັມຈໍເພື່ອມຸມມອງທີ່ດີຂຶ້ນ"</string>
@@ -2436,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"ມັນເຮັດວຽກແນວໃດ"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"ລໍຖ້າດຳເນີນການ..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"ຕັ້ງຄ່າການປົດລັອກດ້ວຍລາຍນິ້ວມືຄືນໃໝ່"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"ບໍ່ສາມາດຈຳແນກ <xliff:g id="FINGERPRINT">%s</xliff:g> ໄດ້ອີກຕໍ່ໄປ."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"ບໍ່ສາມາດຈຳແນກ <xliff:g id="FINGERPRINT_0">%1$s</xliff:g> ແລະ <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> ໄດ້ອີກຕໍ່ໄປ."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"ບໍ່ສາມາດຈຳແນກ <xliff:g id="FINGERPRINT">%s</xliff:g> ໄດ້ອີກຕໍ່ໄປ. ກະລຸນາຕັ້ງຄ່າການປົດລັອກດ້ວຍລາຍນິ້ວມືອີກຄັ້ງ."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"ບໍ່ສາມາດຈຳແນກ <xliff:g id="FINGERPRINT_0">%1$s</xliff:g> ແລະ <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> ໄດ້ອີກຕໍ່ໄປ. ກະລຸນາຕັ້ງຄ່າການປົດລັອກດ້ວຍລາຍນິ້ວມືອີກຄັ້ງ."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"ຕັ້ງຄ່າການປົດລັອກດ້ວຍໜ້າຄືນໃໝ່"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"ບໍ່ສາມາດຈຳແນກຮູບແບບໃບໜ້າຂອງທ່ານໄດ້ອີກຕໍ່ໄປ. ກະລຸນາຕັ້ງຄ່າການປົດລັອກດ້ວຍໜ້າອີກຄັ້ງ."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"ຕັ້ງຄ່າ"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"ບໍ່ຟ້າວເທື່ອ"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"ໂມງປຸກສຳລັບ <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"ສະຫຼັບຜູ້ໃຊ້"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"ປິດສຽງ"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"ແຕະເພື່ອປິດສຽງ"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-lt/strings.xml b/core/res/res/values-lt/strings.xml
index 87027a68770d..e2d59fd81d12 100644
--- a/core/res/res/values-lt/strings.xml
+++ b/core/res/res/values-lt/strings.xml
@@ -267,8 +267,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Pranešimas apie riktą"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Baigti seansą"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Ekrano kopija"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Pranešim. apie riktą"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Bus surinkta informacija apie dabartinę įrenginio būseną ir išsiųsta el. pašto pranešimu. Šiek tiek užtruks, kol pranešimas apie riktą bus paruoštas siųsti; būkite kantrūs."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Interakt. ataskaita"</string>
@@ -1415,10 +1413,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Pasirinkite, kad išjungtumėte belaidžio ryšio derinimą."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Testavimo sistemos režimas įgalintas"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Atkurkite gamyklinius duomenis, kad išjungtumėte testavimo sistemos režimą."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Netinkama sistemos be grafinės naudotojo sąsajos naudotojo režimo kompiliavimo konfigūracija"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"Šio įrenginio sistemos be grafinės naudotojo sąsajos naudotojo režimo būsena skiriasi nuo jo kompiliavimo konfigūracijos. Atkurkite gamyklinius įrenginio nustatymus."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Serijos pultas įgalintas"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Našumas paveiktas. Norėdami išjungti, patikrinkite paleidyklę."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"Eksperimentiniai atminties žymėjimo plėtiniai (angl. „Memory Tagging Extensions“, MTE) įgalinti"</string>
@@ -1763,18 +1759,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Laikomi garsumo klavišai. „<xliff:g id="SERVICE_NAME">%1$s</xliff:g>“ įjungta."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Laikomi garsumo klavišai. „<xliff:g id="SERVICE_NAME">%1$s</xliff:g>“ išjungta."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Atleiskite garsumo klavišus. Kad įjungtumėte „<xliff:g id="SERVICE_NAME">%1$s</xliff:g>“, paspauskite ir 3 sekundes palaikykite garsumo klavišus."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Pasirinkite funkciją"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Pasirinkite funkciją"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Pasirinkite funkciją"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"Funkcija bus atidaryta kitą kartą, kai paliesite pritaikomumo mygtuką"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"Funkcija bus atidaryta kitą kartą, kai naudosite šį spartųjį klavišą. Perbraukite dviem pirštais aukštyn nuo ekrano apačios ir greitai atleiskite."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"Funkcija bus atidaryta kitą kartą, kai naudosite šį spartųjį klavišą. Perbraukite trimis pirštais aukštyn nuo ekrano apačios ir greitai atleiskite."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Didinimas"</string>
<string name="user_switched" msgid="7249833311585228097">"Dabartinis naudotojas: <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"Perjungiama į <xliff:g id="NAME">%1$s</xliff:g>…"</string>
@@ -1897,8 +1887,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"PIN kodas per trumpas. Jis turi būti bent 4 skaitmenų."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Vėliau bandykite dar kartą"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Peržiūrima viso ekrano režimu"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Jei norite išeiti, perbraukite žemyn nuo ekrano viršaus"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"Supratau"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Pasukite, kad geriau matytumėte vaizdą"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Atidarykite „<xliff:g id="NAME">%s</xliff:g>“ viso ekrano režimu, kad geriau matytumėte vaizdą"</string>
@@ -2438,21 +2427,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Kaip tai veikia"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Laukiama..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Atrakinimo piršto atspaudu nustatymas dar kartą"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> nebegalima atpažinti."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> ir <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> nebegalima atpažinti."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> nebegalima atpažinti. Dar kartą nustatykite atrakinimą piršto atspaudu."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> ir <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> nebegalima atpažinti. Dar kartą nustatykite atrakinimą piršto atspaudu."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Atrakinimo pagal veidą nustatymas iš naujo"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Jūsų veido modelio nebegalima atpažinti. Iš naujo nustatykite atrakinimą pagal veidą."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Nustatyti"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Ne dabar"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Signalas: <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Perjungti naudotoją"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Nutildyti"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Palieskite, kad nutildytumėte garsą"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-lv/strings.xml b/core/res/res/values-lv/strings.xml
index 3bd986ef12b2..42fb763bda65 100644
--- a/core/res/res/values-lv/strings.xml
+++ b/core/res/res/values-lv/strings.xml
@@ -266,8 +266,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Kļūdu ziņojums"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Beigt sesiju"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Ekrānuzņēmums"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Kļūdas pārskats"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Veicot šo darbību, tiks apkopota informācija par jūsu ierīces pašreizējo stāvokli un nosūtīta e-pasta ziņojuma veidā. Kļūdu ziņojuma pabeigšanai un nosūtīšanai var būt nepieciešams laiks. Lūdzu, esiet pacietīgs."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Interaktīvs pārskats"</string>
@@ -1768,12 +1766,9 @@
<skip />
<!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
<skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"Funkcija tiks atvērta, kad nākamreiz pieskarsieties pieejamības pogai."</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"Funkcija tiks atvērta, kad nākamreiz izmantosiet šo saīsni. Velciet augšup ar diviem pirkstiem no ekrāna apakšdaļas un ātri atlaidiet."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"Funkcija tiks atvērta, kad nākamreiz izmantosiet šo saīsni. Velciet augšup ar trim pirkstiem no ekrāna apakšdaļas un ātri atlaidiet."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Palielinājums"</string>
<string name="user_switched" msgid="7249833311585228097">"Pašreizējais lietotājs: <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"Notiek pāriešana uz: <xliff:g id="NAME">%1$s</xliff:g>"</string>
@@ -2437,21 +2432,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Darbības principi"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Gaida…"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Vēlreiz iestatiet autorizāciju ar pirksta nospiedumu"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"Pirksta nospiedumu (<xliff:g id="FINGERPRINT">%s</xliff:g>) vairs nevar atpazīt."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"Pirkstu nospiedumus (<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> un <xliff:g id="FINGERPRINT_1">%2$s</xliff:g>) vairs nevar atpazīt."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"Pirksta nospiedumu (<xliff:g id="FINGERPRINT">%s</xliff:g>) vairs nevar atpazīt. Vēlreiz iestatiet autorizāciju ar pirksta nospiedumu."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"Pirkstu nospiedumus (<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> un <xliff:g id="FINGERPRINT_1">%2$s</xliff:g>) vairs nevar atpazīt. Vēlreiz iestatiet autorizāciju ar pirksta nospiedumu."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Vēlreiz iestatiet autorizāciju pēc sejas"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Jūsu sejas modeli vairs nevar atpazīt. Vēlreiz iestatiet autorizāciju pēc sejas."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Iestatīt"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Ne tagad"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Signāls lietotājam <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Mainīt lietotāju"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Izslēgt skaņu"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Pieskarieties, lai izslēgtu skaņu"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-mk/strings.xml b/core/res/res/values-mk/strings.xml
index afcf2d5d8b6c..b3b3e37cf2b5 100644
--- a/core/res/res/values-mk/strings.xml
+++ b/core/res/res/values-mk/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Извештај за грешка"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Завршете ја сесијата"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Слика од екранот"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Извештај за грешки"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Ова ќе собира информации за моменталната состојба на вашиот уред, за да ги испрати како порака по е-пошта. Тоа ќе одземе малку време почнувајќи од извештајот за грешки додека не се подготви за праќање; бидете трпеливи."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Интерактивен извештај"</string>
@@ -1767,12 +1765,9 @@
<skip />
<!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
<skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"Функцијата ќе се отвори следниот пат кога ќе го допрете копчето за пристапност"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"Функцијата ќе се отвори следниот пат кога ќе ја користите кратенкава. Повлечете нагоре со 2 прста од долниот дел на екранот и брзо отпуштете."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"Функцијата ќе се отвори следниот пат кога ќе ја користите кратенкава. Повлечете нагоре со 3 прста од долниот дел на екранот и брзо отпуштете."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Зголемување"</string>
<string name="user_switched" msgid="7249833311585228097">"Тековен корисник <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"Се префрла на <xliff:g id="NAME">%1$s</xliff:g>…"</string>
@@ -2436,21 +2431,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Дознајте како функционира"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Во фаза на чекање…"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Поставете „Отклучување со отпечаток“ повторно"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> веќе не може да се препознае."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> и <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> веќе не може да се препознаат."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> веќе не може да се препознае. Поставете „Отклучување со отпечаток“ повторно."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> и <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> веќе не може да се препознаат. Поставете „Отклучување со отпечаток“ повторно."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Поставете „Отклучување со лик“ повторно"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Вашиот модел на лик веќе не може да се препознае. Поставете „Отклучување со лик“ повторно."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Поставете"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Не сега"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Аларм за <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Сменете го корисникот"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Исклучи звук"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Допрете за да го исклучите звукот"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-ml/strings.xml b/core/res/res/values-ml/strings.xml
index 7cac60a7dee5..f9a74e79750c 100644
--- a/core/res/res/values-ml/strings.xml
+++ b/core/res/res/values-ml/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"ബഗ് റിപ്പോർട്ട്"</string>
<string name="global_action_logout" msgid="6093581310002476511">"സെഷൻ അവസാനിപ്പിക്കുക"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"സ്‌ക്രീൻഷോട്ട്"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"ബഗ് റിപ്പോർട്ട്"</string>
<string name="bugreport_message" msgid="5212529146119624326">"ഒരു ഇമെയിൽ സന്ദേശമായി അയയ്‌ക്കുന്നതിന്, ഇത് നിങ്ങളുടെ നിലവിലെ ഉപകരണ നിലയെക്കുറിച്ചുള്ള വിവരങ്ങൾ ശേഖരിക്കും. ബഗ് റിപ്പോർട്ട് ആരംഭിക്കുന്നതിൽ നിന്ന് ഇത് അയയ്‌ക്കാനായി തയ്യാറാകുന്നതുവരെ അൽപ്പസമയമെടുക്കും; ക്ഷമയോടെ കാത്തിരിക്കുക."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"ഇന്റരാക്റ്റീവ് റിപ്പോർട്ട്"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"വയർലെസ് ഡീബഗ്ഗിംഗ് പ്രവർത്തനരഹിതമാക്കാൻ തിരഞ്ഞെടുക്കുക."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"പരിശോധനാ സംവിധാനങ്ങൾ മോഡ് പ്രവർത്തനക്ഷമമാക്കി"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"പരിശോധനാ സംവിധാന മോഡ് പ്രവർത്തനരഹിതമാക്കാൻ ഫാക്‌ടറി പുനഃക്രമീകരണം നിർവഹിക്കുക."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"HSUM ബിൽഡ് കോൺഫിഗറേഷൻ തെറ്റാണ്"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"ഈ ഉപകരണത്തിന്റെ ഹെഡ്‌ലെസ് സിസ്റ്റം യൂസർ മോഡ് നില ഇതിന്റെ ബിൽഡ് കോൺഫിഗറേഷനിൽ നിന്ന് വ്യത്യസ്തമാണ്. ഉപകരണം ഫാക്‌ടറി റീസെറ്റ് ചെയ്യുക."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"സീരിയൽ കൺസോൾ പ്രവർത്തനക്ഷമമാക്കി"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"പ്രകടനത്തെ ബാധിച്ചു. പ്രവർത്തനരഹിതമാക്കാൻ, ബൂട്ട് ലോഡർ പരിശോധിക്കുക."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"പരീക്ഷണാത്മക MTE പ്രവർത്തനക്ഷമമാക്കി"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"വോളിയം കീകൾ പിടിച്ചു. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> ഓണാക്കി."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"വോളിയം കീകൾ അമർത്തിപ്പിടിച്ചു. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> ഓഫാക്കി."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"വോളിയം കീകൾ വിടുക. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> ഓണാക്കാൻ, രണ്ട് വോളിയം കീകളും വീണ്ടും മൂന്ന് സെക്കൻഡ് അമർത്തിപ്പിടിക്കുക."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"ഒരു ഫീച്ചർ തിരഞ്ഞെടുക്കുക"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"ഒരു ഫീച്ചർ തിരഞ്ഞെടുക്കുക"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"ഒരു ഫീച്ചർ തിരഞ്ഞെടുക്കുക"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"അടുത്ത തവണ നിങ്ങൾ ഉപയോഗസഹായി ബട്ടൺ ടാപ്പ് ചെയ്യുമ്പോൾ ഫീച്ചർ തുറക്കും"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"അടുത്ത തവണ നിങ്ങൾ ഈ കുറുക്കുവഴി ഉപയോഗിക്കുമ്പോൾ ഫീച്ചർ തുറക്കും. നിങ്ങളുടെ സ്ക്രീനിന്റെ താഴെ നിന്ന് 2 വിരലുകൾ ഉപയോഗിച്ച് മുകളിലേക്ക് സ്വൈപ്പ് ചെയ്‌ത് പെട്ടെന്ന് വിടുക."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"അടുത്ത തവണ നിങ്ങൾ ഈ കുറുക്കുവഴി ഉപയോഗിക്കുമ്പോൾ ഫീച്ചർ തുറക്കും. നിങ്ങളുടെ സ്ക്രീനിന്റെ താഴെ നിന്ന് 3 വിരലുകൾ ഉപയോഗിച്ച് മുകളിലേക്ക് സ്വൈപ്പ് ചെയ്‌ത് പെട്ടെന്ന് വിടുക."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"മാഗ്നിഫിക്കേഷൻ"</string>
<string name="user_switched" msgid="7249833311585228097">"നിലവിലെ ഉപയോക്താവ് <xliff:g id="NAME">%1$s</xliff:g> ആണ്."</string>
<string name="user_switching_message" msgid="1912993630661332336">"<xliff:g id="NAME">%1$s</xliff:g> എന്ന ഉപയോക്താവിലേക്ക് മാറുന്നു…"</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"പിൻ തീരെ ചെറുതാണ്. 4 അക്കമെങ്കിലും ഉണ്ടായിരിക്കണം."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"പിന്നീട് വീണ്ടും ശ്രമിക്കുക"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"പൂർണ്ണ സ്‌ക്രീനിൽ കാണുന്നു"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"പുറത്ത് കടക്കാൻ, സ്‌ക്രീനിന്റെ മുകളിൽ നിന്ന് താഴോട്ട് സ്വൈപ്പ് ചെയ്യുക"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"മനസ്സിലായി"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"മികച്ച കാഴ്‌ചയ്‌ക്കായി റൊട്ടേറ്റ് ചെയ്യുക"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"മികച്ച കാഴ്‌‌ചയ്ക്ക് പൂർണ്ണ സ്‌ക്രീനിൽ <xliff:g id="NAME">%s</xliff:g> തുറക്കുക"</string>
@@ -2436,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"ഇത് പ്രവർത്തിക്കുന്നത് എങ്ങനെയാണ്"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"തീർപ്പാക്കിയിട്ടില്ല..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"ഫിംഗർപ്രിന്റ് അൺലോക്ക് വീണ്ടും സജ്ജീകരിക്കുക"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> ഇനി തിരിച്ചറിയാനാകില്ല."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g>, <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> എന്നിവ ഇനി തിരിച്ചറിയാനാകില്ല."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> ഇനി തിരിച്ചറിയാനാകില്ല. ഫിംഗർപ്രിന്റ് അൺലോക്ക് വീണ്ടും സജ്ജീകരിക്കുക."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g>, <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> എന്നിവ ഇനി തിരിച്ചറിയാനാകില്ല. ഫിംഗർപ്രിന്റ് അൺലോക്ക് വീണ്ടും സജ്ജീകരിക്കുക."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"ഫെയ്‌സ് അൺലോക്ക് വീണ്ടും സജ്ജീകരിക്കുക"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"നിങ്ങളുടെ മുഖ മോഡൽ ഇനി തിരിച്ചറിയാനാകില്ല. ഫെയ്‌സ് അൺലോക്ക് വീണ്ടും സജ്ജീകരിക്കുക."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"സജ്ജീകരിക്കുക"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"ഇപ്പോൾ വേണ്ട"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"<xliff:g id="USER_NAME">%s</xliff:g> എന്നയാൾക്കുള്ള അലാറം"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"ഉപയോക്താവിനെ മാറുക"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"മ്യൂട്ടുചെയ്യുക"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"ശബ്ദം മ്യൂട്ട് ചെയ്യാൻ ടാപ്പ് ചെയ്യുക"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-mn/strings.xml b/core/res/res/values-mn/strings.xml
index 7a2fa5390909..dc92f63c30d4 100644
--- a/core/res/res/values-mn/strings.xml
+++ b/core/res/res/values-mn/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Алдаа мэдээлэх"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Гаргах харилцан үйлдэл"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Дэлгэцийн зураг дарах"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Алдааны мэдээ"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Энэ таны төхөөрөмжийн одоогийн статусын талаарх мэдээллийг цуглуулах ба имэйл мессеж болгон илгээнэ. Алдааны мэдэгдлээс эхэлж илгээхэд бэлэн болоход хэсэг хугацаа зарцуулагдана тэвчээртэй байна уу."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Интерактив тайлан"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Wireless debugging-г идэвхгүй болгохын тулд сонгоно уу."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Туршилтын цогц горимыг идэвхжүүлсэн"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Туршилтын цогц горимыг идэвхгүй болгохын тулд үйлдвэрийн төлөвт шинэчилнэ үү."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"HSUM-н хийцийн тохируулга буруу байна"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"Энэ төхөөрөмжийн Интерфейсгүй системийн хэрэглэгчийн горимын төлөв хийцийн тохируулгаас нь өөр байна. Төхөөрөмжийг үйлдвэрийн тохиргоонд шинэчилнэ үү."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Цуваа консолыг идэвхжүүлсэн"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Гүйцэтгэлд нөлөөлнө. Идэвхгүй болгохын тулд эхэлж ачаалагчийг шалгана уу."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"Туршилтын MTE-г идэвхжүүлсэн"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Дууны түвшний түлхүүрийг удаан дарсан. <xliff:g id="SERVICE_NAME">%1$s</xliff:g>-г асаалаа."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Дууны түвшний түлхүүрийг удаан дарсан. <xliff:g id="SERVICE_NAME">%1$s</xliff:g>-г унтраалаа."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Дууны түвшний товчнуудыг суллана уу. <xliff:g id="SERVICE_NAME">%1$s</xliff:g>-г асаахын тулд дууны түвшний 2 товчийг зэрэг 3 секундийн турш удаан дарна уу."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Онцлог сонгоно уу"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Онцлог сонгоно уу"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Онцлог сонгоно уу"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"Таныг дараагийн удаа хандалтын товчийг товших үед тус онцлог нээгдэнэ"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"Таныг дараагийн удаа энэ товчлолыг ашиглах үед тус онцлог нээгдэнэ. Дэлгэцийнхээ доод талаас 2 хуруугаараа дээш шудраад, түргэн суллана уу."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"Таныг дараагийн удаа энэ товчлолыг ашиглах үед тус онцлог нээгдэнэ. Дэлгэцийнхээ доод талаас 3 хуруугаараа дээш шудраад, түргэн суллана уу."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Томруулах"</string>
<string name="user_switched" msgid="7249833311585228097">"Одоогийн хэрэглэгч <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"<xliff:g id="NAME">%1$s</xliff:g> руу сэлгэж байна…"</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"ПИН хэт богино байна. Хамгийн багадаа 4 цифртэй байх ёстой."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Дараа дахин оролдоно уу"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Бүтэн дэлгэцээр үзэж байна"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Гарахын тулд дэлгэцийнхээ дээд талаас доош шударна уу"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"Ойлголоо"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Харагдах байдлыг сайжруулах бол эргүүлнэ үү"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Харагдах байдлыг сайжруулах бол <xliff:g id="NAME">%s</xliff:g>-г бүтэн дэлгэцээр нээнэ үү"</string>
@@ -2436,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Энэ хэрхэн ажилладаг вэ?"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Хүлээгдэж буй..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Хурууны хээгээр түгжээ тайлахыг дахин тохируулна уу"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g>-г цаашид таних боломжгүй."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> болон <xliff:g id="FINGERPRINT_1">%2$s</xliff:g>-г цаашид таних боломжгүй."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g>-г цаашид таних боломжгүй. Хурууны хээгээр түгжээ тайлахыг дахин тохируулна уу."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> болон <xliff:g id="FINGERPRINT_1">%2$s</xliff:g>-г цаашид таних боломжгүй. Хурууны хээгээр түгжээ тайлахыг дахин тохируулна уу."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Царайгаар түгжээ тайлахыг дахин тохируулна уу"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Таны нүүрний загварыг цаашид таних боломжгүй. Царайгаар түгжээ тайлахыг дахин тохируулна уу."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Тохируулах"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Одоо биш"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"<xliff:g id="USER_NAME">%s</xliff:g>-н сэрүүлэг"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Хэрэглэгч сэлгэх"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Дууг хаах"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Дууг хаахын тулд товшино уу"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-mr/strings.xml b/core/res/res/values-mr/strings.xml
index f811004ae520..3874200418c6 100644
--- a/core/res/res/values-mr/strings.xml
+++ b/core/res/res/values-mr/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"बग रिपोर्ट"</string>
<string name="global_action_logout" msgid="6093581310002476511">"सेशन समाप्त करा"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"स्क्रीनशॉट"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"बग रिपोर्ट"</string>
<string name="bugreport_message" msgid="5212529146119624326">"ईमेल मेसेज म्हणून पाठविण्यासाठी, हे तुमच्या सध्याच्या डिव्हाइस स्थितीविषयी माहिती संकलित करेल. बग रिपोर्ट सुरू करण्यापासून तो पाठवण्यापर्यंत थोडा वेळ लागेल; कृपया धीर धरा."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"परस्परसंवादी अहवाल"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"वायरलेस डीबगिंग बंद करण्यासाठी निवडा."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"टेस्ट हार्नेस मोड सुरू केला आहे"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"टेस्ट हार्नेस मोड बंद करण्यासाठी फॅक्टरी रीसेट करा."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"HSUM च्या बिल्डचे कॉन्फिगरेशन चुकीचे आहे"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"या डिव्हाइसची हेडलेस सिस्टीम वापरकर्ता मोड स्थिती ही बिल्डच्या कॉंफिगरेशनपेक्षा वेगळी आहे. कृपया डिव्हाइस फॅक्टरी रीसेट करा."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"सिरीअल कन्सोल सुरू केला आहे"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"परफॉर्मन्सवर परिणाम होतो. बंद करण्यासाठी, बूटलोडर तपासा."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"प्रायोगिक MTE सुरू केले आहे"</string>
@@ -1761,12 +1757,9 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"धरून ठेवलेल्या व्हॉल्यूम की. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> सुरू केला आहे."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"धरून ठेवलेल्या व्हॉल्यूम की. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> बंद केले आहे."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"व्हॉल्यूम की रिलीझ करा. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> सुरू करण्यासाठी, दोन्ही व्हॉल्यूम की पुन्हा प्रेस करा आणि तीन सेकंदांसाठी धरून ठेवा."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"वैशिष्‍ट्य निवडा"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"वैशिष्‍ट्य निवडा"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"वैशिष्‍ट्य निवडा"</string>
<string name="accessibility_button_instructional_text" msgid="6831154884557881996">"तुम्ही पुढील वेळी अ‍ॅक्सेसिबिलिटी बटणावर टॅप कराल, तेव्हा वैशिष्ट्य उघडेल"</string>
<string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"तुम्ही पुढील वेळी हा शॉर्टकट वापराल, तेव्हा वैशिष्ट्य उघडेल. २ बोटांनी तुमच्या स्क्रीनच्या तळापासून वर स्वाइप करा आणि पटकन रिलीझ करा."</string>
<string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"तुम्ही पुढील वेळी हा शॉर्टकट वापराल, तेव्हा वैशिष्ट्य उघडेल. ३ बोटांनी तुमच्या स्क्रीनच्या तळापासून वर स्वाइप करा आणि पटकन रिलीझ करा."</string>
@@ -1892,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"पिन खूप लहान आहे. किमान 4 अंकांचा असणे आवश्‍यक आहे."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"नंतर पुन्हा प्रयत्न करा"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"पूर्ण स्क्रीनवर पाहत आहात"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"बाहेर पडण्यासाठी, तुमच्या स्क्रीनच्या सर्वात वरून खाली स्वाइप करा"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"समजले"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"अधिक चांगल्या दृश्यासाठी फिरवा"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"अधिक चांगल्या दृश्यासाठी <xliff:g id="NAME">%s</xliff:g> हे फुल स्क्रीनमध्ये उघडा"</string>
@@ -2433,21 +2425,25 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"ते कसे काम करते"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"प्रलंबित आहे..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"फिंगरप्रिंट अनलॉक पुन्हा सेट करा"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> यापुढे ओळखता येणार नाही."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> आणि <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> यापुढे ओळखता येणार नाहीत."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> यापुढे ओळखता येणार नाही. फिंगरप्रिंट अनलॉक पुन्हा सेट करा."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> आणि <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> यापुढे ओळखता येणार नाहीत. फिंगरप्रिंट अनलॉक पुन्हा सेट करा."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"फेस अनलॉक पुन्हा सेट करा"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"तुमचे फेस मॉडेल यापुढे ओळखता येणार नाही. फेस अनलॉक पुन्हा सेट करा."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"सेट करा"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"आताच नको"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"<xliff:g id="USER_NAME">%s</xliff:g> साठी अलार्म"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"वापरकर्ता स्विच करा"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"म्यूट करा"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"आवाज म्यूट करण्यासाठी टॅप करा"</string>
+ <string name="keyboard_shortcut_group_applications_browser" msgid="6535007304687100909">"ब्राउझर"</string>
+ <string name="keyboard_shortcut_group_applications_contacts" msgid="2750702518068326356">"Contacts"</string>
+ <string name="keyboard_shortcut_group_applications_email" msgid="4229037666415353683">"ईमेल"</string>
+ <string name="keyboard_shortcut_group_applications_sms" msgid="3523799286376321137">"एसएमएस"</string>
+ <string name="keyboard_shortcut_group_applications_music" msgid="2051507523525651067">"संगीत"</string>
+ <string name="keyboard_shortcut_group_applications_calendar" msgid="3571770335653387606">"Calendar"</string>
+ <string name="keyboard_shortcut_group_applications_calculator" msgid="6753209559716091507">"Calculator"</string>
+ <string name="keyboard_shortcut_group_applications_maps" msgid="7950000659522589471">"Maps"</string>
+ <string name="keyboard_shortcut_group_applications" msgid="3010389163951364798">"अ‍ॅप्लिकेशन"</string>
</resources>
diff --git a/core/res/res/values-ms/strings.xml b/core/res/res/values-ms/strings.xml
index 0bd939ec0759..cc866b9049b0 100644
--- a/core/res/res/values-ms/strings.xml
+++ b/core/res/res/values-ms/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Laporan pepijat"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Tamatkan sesi"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Tangkapan skrin"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Laporan pepijat"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Ini akan mengumpul maklumat tentang keadaan peranti semasa anda untuk dihantarkan sebagai mesej e-mel. Harap bersabar, mungkin perlu sedikit masa untuk memulakan laporan sehingga siap untuk dihantar."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Laporan interaktif"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Pilih untuk melumpuhkan penyahpepijatan wayarles."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Mod Abah-abah Ujian didayakan"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Laksanakan tetapan semula kilang untuk melumpuhkan Mod Abah-abah Ujian."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Konfigurasi binaan HSUM salah"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"Keadaan Mod Pengguna Sistem Tanpa Kepala peranti ini berbeza daripada konfigurasi binaan peranti. Tetapkan semula peranti kepada tetapan kilang."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Konsol bersiri didayakan"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Prestasi terjejas. Untuk melumpuhkan, semak pemuat but."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"Percubaan MTE didayakan"</string>
@@ -1442,7 +1438,7 @@
<string name="alert_windows_notification_channel_group_name" msgid="6063891141815714246">"Paparkan di atas apl lain"</string>
<string name="alert_windows_notification_channel_name" msgid="3437528564303192620">"<xliff:g id="NAME">%s</xliff:g> dipaparkan di atas apl lain"</string>
<string name="alert_windows_notification_title" msgid="6331662751095228536">"<xliff:g id="NAME">%s</xliff:g> dipaparkan di atas apl lain"</string>
- <string name="alert_windows_notification_message" msgid="6538171456970725333">"Jika anda tidak mahu <xliff:g id="NAME">%s</xliff:g> menggunakan ciri ini, ketik untuk membuka tetapan dan matikannya."</string>
+ <string name="alert_windows_notification_message" msgid="6538171456970725333">"Jika anda tidak mahu <xliff:g id="NAME">%s</xliff:g> menggunakan ciri ini, ketik untuk membuka tetapan dan matikan ciri tersebut."</string>
<string name="alert_windows_notification_turn_off_action" msgid="7805857234839123780">"Matikan"</string>
<string name="ext_media_checking_notification_title" msgid="8299199995416510094">"Menyemak <xliff:g id="NAME">%s</xliff:g>…"</string>
<string name="ext_media_checking_notification_message" msgid="2231566971425375542">"Menyemak kandungan semasa"</string>
@@ -1761,12 +1757,9 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Kekunci kelantangan ditahan. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> dihidupkan."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Kekunci kelantangan ditahan. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> dimatikan."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Lepaskan kekunci kelantangan. Untuk menghidupkan <xliff:g id="SERVICE_NAME">%1$s</xliff:g>, sila tekan dan tahan kedua-dua kekunci kelantangan sekali lagi selama 3 saat."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Pilih ciri"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Pilih ciri"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Pilih ciri"</string>
<string name="accessibility_button_instructional_text" msgid="6831154884557881996">"Ciri ini akan dibuka pada kali seterusnya anda mengetik butang kebolehaksesan"</string>
<string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"Ciri ini akan dibuka pada kali seterusnya anda menggunakan pintasan ini. Leret ke atas menggunakan 2 jari dari bahagian bawah skrin anda dan lepaskan dengan cepat."</string>
<string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"Ciri ini akan dibuka pada kali seterusnya anda menggunakan pintasan ini. Leret ke atas menggunakan 3 jari dari bahagian bawah skrin anda dan lepaskan dengan cepat."</string>
@@ -1892,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"PIN terlalu pendek. Mesti sekurang-kurangnya 4 angka."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Cuba sebentar lagi"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Melihat skrin penuh"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Untuk keluar, leret ke bawah daripada bahagian atas skrin anda"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"Faham"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Putar untuk mendapatkan paparan yang lebih baik"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Buka <xliff:g id="NAME">%s</xliff:g> dalam skrin penuh untuk mendapatkan paparan yang lebih baik"</string>
@@ -2433,21 +2425,25 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Cara ciri ini berfungsi"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Belum selesai..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Sediakan Buka Kunci Cap Jari sekali lagi"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> tidak dapat dicam lagi."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> dan <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> tidak dapat dicam lagi."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> tidak dapat dicam lagi. Sediakan semula Buka Kunci Cap Jari."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> dan <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> tidak dapat dicam lagi. Sediakan semula Buka Kunci Cap Jari."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Sediakan semula Buka Kunci Wajah"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Model wajah anda tidak dapat dicam lagi. Sediakan semula Buka Kunci Wajah."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Sediakan"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Bukan sekarang"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Penggera untuk <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Tukar pengguna"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Redam"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Ketik untuk meredamkan bunyi"</string>
+ <string name="keyboard_shortcut_group_applications_browser" msgid="6535007304687100909">"Penyemak Imbas"</string>
+ <string name="keyboard_shortcut_group_applications_contacts" msgid="2750702518068326356">"Kenalan"</string>
+ <string name="keyboard_shortcut_group_applications_email" msgid="4229037666415353683">"E-mel"</string>
+ <string name="keyboard_shortcut_group_applications_sms" msgid="3523799286376321137">"SMS"</string>
+ <string name="keyboard_shortcut_group_applications_music" msgid="2051507523525651067">"Muzik"</string>
+ <string name="keyboard_shortcut_group_applications_calendar" msgid="3571770335653387606">"Kalendar"</string>
+ <string name="keyboard_shortcut_group_applications_calculator" msgid="6753209559716091507">"Kalkulator"</string>
+ <string name="keyboard_shortcut_group_applications_maps" msgid="7950000659522589471">"Maps"</string>
+ <string name="keyboard_shortcut_group_applications" msgid="3010389163951364798">"Aplikasi"</string>
</resources>
diff --git a/core/res/res/values-my/strings.xml b/core/res/res/values-my/strings.xml
index 29efeedbbf95..fca79cb9ea27 100644
--- a/core/res/res/values-my/strings.xml
+++ b/core/res/res/values-my/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"အမှားရှာပြင် မှတ်တမ်း"</string>
<string name="global_action_logout" msgid="6093581310002476511">"စက်ရှင် ပြီးဆုံးပြီ"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"ဖန်သားပြင်ဓာတ်ပုံ"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"ချွတ်ယွင်းချက်အစီရင်ခံစာ"</string>
<string name="bugreport_message" msgid="5212529146119624326">"သင့်ရဲ့ လက်ရှိ စက်အခြေအနေ အချက်အလက်များကို အီးမေးလ် အနေဖြင့် ပေးပို့ရန် စုဆောင်းပါမည်။ အမှားရှာဖွေပြင်ဆင်မှုမှတ်တမ်းမှ ပေးပို့ရန် အသင့်ဖြစ်သည်အထိ အချိန် အနည်းငယ်ကြာမြင့်မှာ ဖြစ်သဖြင့် သည်းခံပြီး စောင့်ပါရန်"</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"လက်ငင်းတုံ့ပြန်နိုင်သည့် အစီရင်ခံချက်"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"ကြိုးမဲ့ အမှားရှာပြင်ခြင်းကို ပိတ်ရန် ရွေးပါ။"</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"\'စမ်းသပ်ခြင်းစနစ်မုဒ်\' ဖွင့်ထားသည်"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"\'စမ်းသပ်ခြင်းစနစ် မုဒ်\' ကိုပိတ်ရန် စက်ရုံထုတ်အတိုင်း ပြင်ဆင်သတ်မှတ်ပါ။"</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"HSUM တည်ဆောက်ပုံ စီစဉ်သတ်မှတ်ချက် မှားနေသည်"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"ဤစက်၏ ‘မမြင်နိုင်သော စနစ်အသုံးပြုသူမုဒ်’ အခြေအနေသည် ၎င်း၏ တည်ဆောက်ပုံ စီစဉ်သတ်မှတ်ချက်နှင့် ကွဲလွဲနေသည်။ ဤစက်ကို စက်ရုံထုတ်အတိုင်း ပြင်ဆင်သတ်မှတ်ပါ။"</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"အမှတ်စဉ် ကွန်ဆိုးလ်ကို ဖွင့်ထားသည်"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"စွမ်းဆောင်ရည်အပေါ် သက်ရောက်မှုရှိနိုင်ပါသည်။ ပိတ်ရန် bootloader ကို စစ်ဆေးပါ။"</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"အစမ်းသုံး MTE ကို ဖွင့်ထားသည်"</string>
@@ -1761,12 +1757,9 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"အသံခလုတ်များကို ဖိထားသည်။ <xliff:g id="SERVICE_NAME">%1$s</xliff:g> ဖွင့်လိုက်သည်။"</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"အသံခလုတ်များကို ဖိထားသည်။ <xliff:g id="SERVICE_NAME">%1$s</xliff:g> ပိတ်လိုက်သည်။"</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"အသံထိန်းခလုတ်များကို လွှတ်လိုက်ပါ။ <xliff:g id="SERVICE_NAME">%1$s</xliff:g> ဖွင့်ရန် အသံထိန်းခလုတ်နှစ်ခုစလုံးကို ၃ စက္ကန့်ကြာအောင် ထပ်နှိပ်ပါ။"</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"တူးလ်ရွေးပါ"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"တူးလ်ရွေးပါ"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"တူးလ်ရွေးပါ"</string>
<string name="accessibility_button_instructional_text" msgid="6831154884557881996">"နောက်တစ်ကြိမ်တွင် သုံးနိုင်မှုခလုတ်ကို တို့သည့်အခါ ဤဝန်ဆောင်မှု ပွင့်လာမည်"</string>
<string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"နောက်တစ်ကြိမ်တွင် ဤဖြတ်လမ်းကို သုံးသည့်အခါ ဤဝန်ဆောင်မှု ပွင့်လာမည်။ သင့်ဖန်သားပြင်အောက်ခြေမှ အပေါ်သို့ လက် ၂ ချောင်းဖြင့် ပွတ်ဆွဲ၍ အမြန်လွှတ်လိုက်ပါ။"</string>
<string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"နောက်တစ်ကြိမ်တွင် ဤဖြတ်လမ်းကို သုံးသည့်အခါ ဤဝန်ဆောင်မှု ပွင့်လာမည်။ သင့်ဖန်သားပြင်အောက်ခြေမှ အပေါ်သို့ လက် ၃ ချောင်းဖြင့် ပွတ်ဆွဲ၍ အမြန်လွှတ်လိုက်ပါ။"</string>
@@ -1892,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"ပင် နံပါတ် တိုလွန်းသည်။. အနည်းဆုံး ဂဏန်း ၄ လုံး ဖြစ်ရမည်။"</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"နောက်မှ ပြန်ကြိုးစားပါ"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"မျက်နှာပြင်အပြည့် ကြည့်နေသည်"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"ထွက်ရန် သင့်ဖန်သားပြင်ထိပ်မှ အောက်သို့ ပွတ်ဆွဲပါ"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"ရပါပြီ"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"ပိုကောင်းသောမြင်ကွင်းအတွက် လှည့်ပါ"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"ပိုကောင်းသောမြင်ကွင်းအတွက် ဖန်သားပြင်အပြည့်ဖြင့် <xliff:g id="NAME">%s</xliff:g> ကို ဖွင့်ပါ"</string>
@@ -2433,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"အလုပ်လုပ်ပုံ"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"ဆိုင်းငံ့ထားသည်…"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"‘လက်ဗွေသုံး လော့ခ်ဖွင့်ခြင်း’ ကို စနစ်ထပ်မံထည့်သွင်းပါ"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> ကို မသိရှိနိုင်တော့ပါ။"</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> နှင့် <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> ကို မသိရှိနိုင်တော့ပါ။"</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> ကို မသိရှိနိုင်တော့ပါ။ ‘လက်ဗွေသုံး လော့ခ်ဖွင့်ခြင်း’ ထပ်မံစနစ်ထည့်သွင်းပါ။"</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> နှင့် <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> ကို မသိရှိနိုင်တော့ပါ။ ‘လက်ဗွေသုံး လော့ခ်ဖွင့်ခြင်း’ ထပ်မံစနစ်ထည့်သွင်းပါ။"</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"‘မျက်နှာပြ လော့ခ်ဖွင့်ခြင်း’ ကို စနစ်ထပ်မံထည့်သွင်းပါ"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"သင်၏မျက်နှာနမူနာကို မသိရှိနိုင်တော့ပါ။ ‘မျက်နှာပြ လော့ခ်ဖွင့်ခြင်း’ ထပ်မံစနစ်ထည့်သွင်းပါ။"</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"စနစ်ထည့်သွင်းရန်"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"ယခုမလုပ်ပါ"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"<xliff:g id="USER_NAME">%s</xliff:g> အတွက် နှိုးစက်"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"အသုံးပြုသူ ပြောင်းရန်"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"အသံပိတ်ရန်"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"အသံပိတ်ရန် တို့ပါ"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml
index e60f43f0c0d8..03db9c5ac21f 100644
--- a/core/res/res/values-nb/strings.xml
+++ b/core/res/res/values-nb/strings.xml
@@ -264,9 +264,7 @@
<string name="global_action_emergency" msgid="1387617624177105088">"Nødssituasjon"</string>
<string name="global_action_bug_report" msgid="5127867163044170003">"Feilrapport"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Avslutt økten"</string>
- <string name="global_action_screenshot" msgid="2610053466156478564">"Skjermdump"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
+ <string name="global_action_screenshot" msgid="2610053466156478564">"Skjermbilde"</string>
<string name="bugreport_title" msgid="8549990811777373050">"Feilrapport"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Informasjon om tilstanden til enheten din samles inn og sendes som en e-post. Det tar litt tid fra du starter feilrapporten til e-posten er klar, så vær tålmodig."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Interaktiv rapport"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Velg for å slå av trådløs feilsøking."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Testrammeverk-modus er slått på"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Tilbakestill enheten til fabrikkstandard for å slå av Testrammeverk-modus."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Feil konfigurasjon for kodebygging for hodeløs systembruker-modus"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"Statusen for hodeløs systembruker-modus for denne enheten avviker fra enhetens konfigurasjon for kodebygging. Tilbakestill enheten til fabrikkstandard."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Seriekonsollen er aktivert"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Ytelsen er påvirket. Sjekk oppstartsinnlasteren for å deaktivere."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"MTE på forsøksstadiet er aktivert"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Volumtastene holdes inne. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> er slått på."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Volumtastene holdes inne. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> er slått av."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Slipp opp volumtastene. For å slå på <xliff:g id="SERVICE_NAME">%1$s</xliff:g>, trykk og hold på begge volumtastene igjen i 3 sekunder."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Velg en funksjon"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Velg en funksjon"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Velg en funksjon"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"Funksjonen åpnes neste gang du trykker på Tilgjengelighet-knappen"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"Funksjonen åpnes neste gang du bruker denne snarveien. Sveip opp med 2 fingre fra nederst på skjermen, og slipp raskt opp."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"Funksjonen åpnes neste gang du bruker denne snarveien. Sveip opp med 3 fingre fra nederst på skjermen, og slipp raskt opp."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Forstørring"</string>
<string name="user_switched" msgid="7249833311585228097">"Gjeldende bruker: <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"Bytter til <xliff:g id="NAME">%1$s</xliff:g> …"</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"PIN-koden er for kort. Den må bestå av minst fire sifre."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Prøv på nytt senere"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Visning i fullskjerm"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"For å gå ut, sveip ned fra toppen av skjermen"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"Skjønner"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Roter for å få en bedre visning"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Åpne <xliff:g id="NAME">%s</xliff:g> i fullskjerm for å se bedre"</string>
@@ -2202,7 +2191,7 @@
<string name="accessibility_system_action_quick_settings_label" msgid="4583900123506773783">"Hurtiginnstillinger"</string>
<string name="accessibility_system_action_power_dialog_label" msgid="8095341821683910781">"Dialogboks for å slå av/på"</string>
<string name="accessibility_system_action_lock_screen_label" msgid="5484190691945563838">"Låseskjerm"</string>
- <string name="accessibility_system_action_screenshot_label" msgid="3581566515062741676">"Skjermdump"</string>
+ <string name="accessibility_system_action_screenshot_label" msgid="3581566515062741676">"Skjermbilde"</string>
<string name="accessibility_system_action_headset_hook_label" msgid="8524691721287425468">"Hook for hodetelefoner"</string>
<string name="accessibility_system_action_on_screen_a11y_shortcut_label" msgid="8488701469459210309">"Tilgjengelighetssnarvei på skjermen"</string>
<string name="accessibility_system_action_on_screen_a11y_shortcut_chooser_label" msgid="1057878690209817886">"Velger for tilgjengelighetssnarvei på skjermen"</string>
@@ -2436,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Slik fungerer det"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Venter …"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Konfigurer opplåsingen med fingeravtrykk på nytt"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> gjenkjennes ikke lenger."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> og <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> gjenkjennes ikke lenger."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> gjenkjennes ikke lenger. Konfigurer opplåsing med fingeravtrykk på nytt."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> og <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> gjenkjennes ikke lenger. Konfigurer opplåsing med fingeravtrykk på nytt."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Konfigurer ansiktslåsen på nytt"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Ansiktsmodellen din gjenkjennes ikke lenger. Konfigurer ansiktslåsen på nytt."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Konfigurer"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Ikke nå"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Alarm for <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Bytt bruker"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Kutt lyden"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Trykk for å kutte lyden"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-ne/strings.xml b/core/res/res/values-ne/strings.xml
index dee68258119d..6c58d16cd77c 100644
--- a/core/res/res/values-ne/strings.xml
+++ b/core/res/res/values-ne/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"बग रिपोर्ट"</string>
<string name="global_action_logout" msgid="6093581310002476511">"सत्रको अन्त्य गर्नुहोस्"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"स्क्रिनसट"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"बग रिपोर्ट"</string>
<string name="bugreport_message" msgid="5212529146119624326">"एउटा इमेल सन्देशको रूपमा पठाउनलाई यसले तपाईँको हालैको उपकरणको अवस्थाको बारेमा सूचना जम्मा गर्ने छ। बग रिपोर्ट सुरु गरेदेखि पठाउन तयार नभएसम्म यसले केही समय लिन्छ; कृपया धैर्य गर्नुहोस्।"</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"अन्तरक्रियामूलक रिपोर्ट"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"वायरलेस डिबगिङ असक्षम पार्न यो विकल्प चयन गर्नुहोस्।"</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"परीक्षण प्याकेज मोड सक्षम पारियो"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"परीक्षण प्याकेज मोड असक्षम पार्न फ्याक्ट्री रिसेट गर्नुहोस्।"</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"HSUM बिल्ड कन्फिगुरेसन गलत छ"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"यो डिभाइसको हेडलेस सिस्टम युजर मोडको स्थिति यसको बिल्ड कन्फिगुरेसनभन्दा फरक छ। कृपया यो डिभाइस फ्याक्ट्री रिसेट गर्नुहोस्।"</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"क्रमसम्बन्धी कन्सोल सक्षम पारियो"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"पर्फर्मेन्समा प्रभाव परेको छ। यसलाई असक्षम पार्न बुटलोडरको जाँच गर्नुहोस्।"</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"परीक्षणका क्रममा रहेको MTE अन गरियो"</string>
@@ -1761,12 +1757,9 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"तपाईंले भोल्युम बटनहरू थिचिराख्नुभयो। <xliff:g id="SERVICE_NAME">%1$s</xliff:g> अन भयो।"</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"तपाईंले भोल्युम बटनहरू थिचिराख्नुभयो। <xliff:g id="SERVICE_NAME">%1$s</xliff:g> अफ भयो।"</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"भोल्युम बटनहरू थिच्न छाड्नुहोस्। <xliff:g id="SERVICE_NAME">%1$s</xliff:g> अन गर्न दुवै भोल्युम बटन फेरि ३ सेकेन्डसम्म थिचिराख्नुहोस्।"</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"कुनै सुविधा चयन गर्नुहोस्"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"कुनै सुविधा चयन गर्नुहोस्"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"कुनै सुविधा चयन गर्नुहोस्"</string>
<string name="accessibility_button_instructional_text" msgid="6831154884557881996">"तपाईंले अर्को पटक एक्सेसिबिलिटी बटनमा ट्याप गर्दा यो सुविधा खुल्ने छ"</string>
<string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"तपाईंले अर्को पटक यो सर्टकट प्रयोग गर्दा यो सुविधा खुल्ने छ। २ वटा औँलाले स्क्रिनको पुछारबाट माथितिर स्वाइप गर्नुहोस् र तुरुन्तै औँला उठाउनुहोस्।"</string>
<string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"तपाईंले अर्को पटक यो सर्टकट प्रयोग गर्दा यो सुविधा खुल्ने छ। ३ वटा औँलाले स्क्रिनको पुछारबाट माथितिर स्वाइप गर्नुहोस् र तुरुन्तै औँला उठाउनुहोस्।"</string>
@@ -1892,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"PIN अति छोटो भयो। कम्तीमा ४ अङ्क हुन आवश्यक छ।"</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"पछि पुनः प्रयास गर्नुहोस्"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"पूरा पर्दा हेर्दै"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"यहाँबाट बाहिरिन स्क्रिनको सिरानबाट तलतिर स्वाइप गर्नुहोस्"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"बुझेँ"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"अझ राम्रो दृश्य हेर्न चाहनुहुन्छ भने रोटेट गर्नुहोस्"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"अझ राम्रो दृश्य हेर्न चाहनुहुन्छ भने <xliff:g id="NAME">%s</xliff:g> खोल्नुहोस्"</string>
@@ -2433,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"यसले काम गर्ने तरिका"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"विचाराधीन..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"फिंगरप्रिन्ट अनलक फेरि सेटअप गर्नुहोस्"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> अब पहिचान गर्न सकिँदैन।"</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> र <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> अब पहिचान गर्न सकिँदैन।"</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> अब पहिचान गर्न सकिँदैन। फिंगरप्रिन्ट अनलक फेरि सेटअप गर्नुहोस्।"</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> र <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> अब पहिचान गर्न सकिँदैन। फिंगरप्रिन्ट अनलक फेरि सेटअप गर्नुहोस्।"</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"फेस अनलक फेरि सेटअप गर्नुहोस्"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"तपाईंको फेस मोडेल अब पहिचान गर्न सकिँदैन। फेस अनलक फेरि सेटअप गर्नुहोस्।"</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"सेटअप गर्नुहोस्"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"अहिले होइन"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"<xliff:g id="USER_NAME">%s</xliff:g> का निम्ति अलार्म"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"प्रयोगकर्ता बदल्नुहोस्"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"म्युट गर्नुहोस्"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"साउन्ड म्युट गर्न ट्याप गर्नुहोस्"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-nl/strings.xml b/core/res/res/values-nl/strings.xml
index 7bb69276ad10..5fd6d42268a2 100644
--- a/core/res/res/values-nl/strings.xml
+++ b/core/res/res/values-nl/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Bugrapport"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Sessie beëindigen"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Screenshot"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Bugrapport"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Hiermee worden gegevens over de huidige status van je apparaat verzameld en als e-mail verzonden. Wanneer u een bugrapport start, duurt het even voordat het kan worden verzonden. Even geduld alstublieft."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Interactief rapport"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Selecteer deze optie om draadloze foutopsporing uit te zetten."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Test harness-modus staat aan"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Reset de fabrieksinstellingen om de test harness-modus uit te zetten."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Onjuiste HSUM-buildconfiguratie"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"De Headless System User Mode-status van dit apparaat wijkt af van de buildconfiguratie. Zet het apparaat terug op de fabrieksinstellingen."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Seriële console staat aan"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Dit is van invloed op de prestaties. Controleer de bootloader om dit uit te zetten."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"Experimentele MTE aangezet"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Volumetoetsen ingedrukt gehouden. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> staat aan."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Volumetoetsen ingedrukt gehouden. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> staat uit."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Laat de volumeknoppen los. Als je <xliff:g id="SERVICE_NAME">%1$s</xliff:g> wilt aanzetten, houd je beide volumeknoppen weer 3 seconden ingedrukt."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Kies een functie"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Kies een functie"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Kies een functie"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"De functie opent de volgende keer dat je op de knop Toegankelijkheid tikt"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"De functie opent de volgende keer dat je deze snelkoppeling gebruikt. Swipe met 2 vingers omhoog vanaf de onderkant van je scherm en laat snel los."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"De functie opent de volgende keer dat je deze snelkoppeling gebruikt. Swipe met 3 vingers omhoog vanaf de onderkant van je scherm en laat snel los."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Vergroting"</string>
<string name="user_switched" msgid="7249833311585228097">"Huidige gebruiker <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"Overschakelen naar <xliff:g id="NAME">%1$s</xliff:g>…"</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"Pincode is te kort. Moet ten minste vier cijfers lang zijn."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Probeer het later opnieuw"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Volledig scherm wordt getoond"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Swipe omlaag vanaf de bovenkant van het scherm om af te sluiten"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"Ik snap het"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Draai voor een betere weergave"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Open <xliff:g id="NAME">%s</xliff:g> op volledig scherm voor een betere weergave"</string>
@@ -2436,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Hoe het werkt"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"In behandeling…"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Ontgrendelen met vingerafdruk weer instellen"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> wordt niet meer herkend."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> en <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> worden niet meer herkend."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> wordt niet meer herkend. Stel Ontgrendelen met vingerafdruk opnieuw in."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> en <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> worden niet meer herkend. Stel Ontgrendelen met vingerafdruk opnieuw in."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Ontgrendelen via gezichtsherkenning weer instellen"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Je gezichtsmodel wordt niet meer herkend. Stel Ontgrendelen via gezichtsherkenning opnieuw in."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Instellen"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Niet nu"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Wekker voor <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Gebruiker wijzigen"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Geluid uitzetten"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Tik om het geluid uit te zetten"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-or/strings.xml b/core/res/res/values-or/strings.xml
index 1c6d1917ec2b..883ef1f58559 100644
--- a/core/res/res/values-or/strings.xml
+++ b/core/res/res/values-or/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"ବଗ୍‌ ରିପୋର୍ଟ"</string>
<string name="global_action_logout" msgid="6093581310002476511">"ସେସନ୍‍ ଶେଷ କରନ୍ତୁ"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"ସ୍କ୍ରିନସଟ"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"ବଗ୍‌ ରିପୋର୍ଟ"</string>
<string name="bugreport_message" msgid="5212529146119624326">"ଇ-ମେଲ୍ ମେସେଜ୍‍ ଭାବରେ ପଠାଇବାକୁ, ଆପଣଙ୍କ ବର୍ତ୍ତମାନର ଡିଭାଇସ୍‌ ବିଷୟରେ ଏହା ସୂଚନା ସଂଗ୍ରହ କରିବ। ବଗ୍ ରିପୋର୍ଟ ଆରମ୍ଭ ହେବାପରଠାରୁ ଏହାକୁ ପଠାଇବା ପାଇଁ କିଛି ସମୟ ଲାଗିବ, ଦୟାକରି ଧୈର୍ଯ୍ୟ ରଖନ୍ତୁ।"</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"ଇଣ୍ଟରାକ୍ଟିଭ୍‍ ରିପୋର୍ଟ"</string>
@@ -1034,7 +1032,7 @@
<string name="lockscreen_failed_attempts_almost_glogin" product="tv" msgid="6399092175942158529">"ଆପଣ ଆପଣଙ୍କର ଅନଲକ୍ ପାଟର୍ନକୁ <xliff:g id="NUMBER_0">%1$d</xliff:g> ଥର ଭୁଲ ଭାବେ ଆଙ୍କିଛନ୍ତି। <xliff:g id="NUMBER_1">%2$d</xliff:g> ଥର ଅସଫଳ ଚେଷ୍ଟା ପରେ, ଆପଣଙ୍କୁ Google ସାଇନ୍ଇନ୍ ବ୍ୟବହାର କରି ଆପଣଙ୍କର Android TV ଡିଭାଇସ୍‌କୁ ଅନ୍‌ଲକ୍ କରିବା ପାଇଁ କୁହାଯିବ। \n\n<xliff:g id="NUMBER_2">%3$d</xliff:g> ସେକେଣ୍ଡ ମଧ୍ୟରେ ପୁଣି ଚେଷ୍ଟା କରନ୍ତୁ।"</string>
<string name="lockscreen_failed_attempts_almost_glogin" product="default" msgid="5691623136957148335">"ଅନଲକ୍‍ ପାଟର୍ନକୁ ଆପଣ <xliff:g id="NUMBER_0">%1$d</xliff:g> ଥର ଭୁଲ ଭାବେ ଅଙ୍କନ କରିଛନ୍ତି। ଆଉ <xliff:g id="NUMBER_1">%2$d</xliff:g>ଟି ଭୁଲ ପ୍ରୟାସ ପରେ, Google ସାଇନ୍‌-ଇନ୍‍ ବ୍ୟବହାର କରି ଆପଣଙ୍କୁ ନିଜ ଫୋନ୍‍କୁ ଅନଲକ୍‍ କରିବାକୁ କୁହାଯିବ।\n\n <xliff:g id="NUMBER_2">%3$d</xliff:g> ସେକେଣ୍ଡ ପରେ ପୁଣି ଚେଷ୍ଟା କରନ୍ତୁ।"</string>
<string name="lockscreen_failed_attempts_almost_at_wipe" product="tablet" msgid="7914445759242151426">"ଟାବଲେଟ୍‍କୁ ଅନ୍‌ଲକ୍‌ କରିବା ପାଇଁ <xliff:g id="NUMBER_0">%1$d</xliff:g> ଥର ଭୁଲ ପ୍ରୟାସ କରିଛନ୍ତି। ଆଉ <xliff:g id="NUMBER_1">%2$d</xliff:g>ଟି ଭୁଲ ପ୍ରୟାସ ପରେ, ଟାବଲେଟ୍‍ଟି ଫ୍ୟାକ୍ଟୋରୀ ଡିଫଲ୍ଟକୁ ରିସେଟ୍‍ ହୋଇଯିବ ଏବଂ ଆପଣ ସମସ୍ତ ୟୁଜର୍‍ ଡାଟା ହରାଇବେ।"</string>
- <string name="lockscreen_failed_attempts_almost_at_wipe" product="tv" msgid="4275591249631864248">"ଆପଣ <xliff:g id="NUMBER_0">%1$d</xliff:g> ଥର ଆପଣଙ୍କର Android TV ଡିଭାଇସ୍‌କୁ ଭୁଲ ଭାବେ ଅନ୍‌ଲକ୍ କରିବାକୁ ଚେଷ୍ଟା କରିଛନ୍ତି। <xliff:g id="NUMBER_1">%2$d</xliff:g> ଥର ଅସଫଳ ଚେଷ୍ଟା ପରେ, ଆପଣଙ୍କର Android TV ଡିଭାଇସ୍ ଫ୍ୟାକ୍ଟୋରୀ ଡିଫଲ୍ଟକୁ ରିସେଟ୍ କରାଯିବ ଏବଂ ସମସ୍ତ ଉପଯୋଗକର୍ତ୍ତା ଡାଟା ହରାଇବ।"</string>
+ <string name="lockscreen_failed_attempts_almost_at_wipe" product="tv" msgid="4275591249631864248">"ଆପଣ <xliff:g id="NUMBER_0">%1$d</xliff:g> ଥର ଆପଣଙ୍କର Android TV ଡିଭାଇସକୁ ଭୁଲ ଭାବେ ଅନଲକ କରିବାକୁ ଚେଷ୍ଟା କରିଛନ୍ତି। <xliff:g id="NUMBER_1">%2$d</xliff:g> ଥର ଅସଫଳ ଚେଷ୍ଟା ପରେ ଆପଣଙ୍କର Android TV ଡିଭାଇସ ଫେକ୍ଟୋରୀ ଡିଫଲ୍ଟକୁ ରିସେଟ କରାଯିବ ଏବଂ ସମସ୍ତ ୟୁଜର ଡାଟା ହରାଇବ।"</string>
<string name="lockscreen_failed_attempts_almost_at_wipe" product="default" msgid="1166532464798446579">"ଫୋନ୍‍ ଅନଲକ୍‍ କରିବାକୁ ଆପଣ <xliff:g id="NUMBER_0">%1$d</xliff:g> ଥର ଭୁଲ ପ୍ରୟାସ କଲେ। ଆଉ <xliff:g id="NUMBER_1">%2$d</xliff:g>ଟି ଭୁଲ ପ୍ରୟାସ ପରେ, ଫୋନ୍‍ଟି ଫ୍ୟାକ୍ଟୋରୀ ଡିଫଲ୍ଟକୁ ରିସେଟ୍‍ ହୋଇଯିବ ଏବଂ ଆପଣ ସମସ୍ତ ୟୁଜର୍‍ ଡାଟା ହରାଇବେ।"</string>
<string name="lockscreen_failed_attempts_now_wiping" product="tablet" msgid="8682445539263683414">"ଟାବଲେଟ୍‍ ଅନଲକ୍‍ କରିବାକୁ ଆପଣ <xliff:g id="NUMBER">%d</xliff:g> ଥର ଭୁଲ ପ୍ରୟାସ କଲେ। ଟାବଲେଟ୍‍ଟି ବର୍ତ୍ତମାନ ଫ୍ୟାକ୍ଟୋରୀ ଡିଫଲ୍ଟକୁ ରିସେଟ୍‍ ହୋଇଯିବ।"</string>
<string name="lockscreen_failed_attempts_now_wiping" product="tv" msgid="2205435033340091883">"ଆପଣ <xliff:g id="NUMBER">%d</xliff:g> ଥର ଆପଣଙ୍କର Android TV ଡିଭାଇସ୍‌କୁ ଭୁଲ ଭାବେ ଅନ୍‌ଲକ୍ କରିବାକୁ ଚେଷ୍ଟା କରିଛନ୍ତି। ବର୍ତ୍ତମାନ ଆପଣଙ୍କର Android TV ଡିଭାଇସ୍ ଫ୍ୟାକ୍ଟୋରୀ ଡିଫଲ୍ଟକୁ ରିସେଟ୍ ହୋଇଯିବ।"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"ୱାୟାରଲେସ୍ ଡିବଗିଂକୁ ଅକ୍ଷମ କରିବା ପାଇଁ ଚୟନ କରନ୍ତୁ।"</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"ଟେଷ୍ଟ ହାର୍ନେସ୍ ମୋଡ୍ ସକ୍ଷମ ଅଛି"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"ଟେଷ୍ଟ ହାର୍‌ନେସ୍ ମୋଡ୍ ଅକ୍ଷମ କରିବାକୁ ଏକ ଫ୍ୟାକ୍ଟରୀ ରିସେଟ୍ କରନ୍ତୁ।"</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"ଭୁଲ HSUM ବିଲ୍ଡ କନଫିଗରେସନ"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"ଏହି ଡିଭାଇସର ହେଡଲେସ ସିଷ୍ଟମ ୟୁଜର ମୋଡ ସ୍ଥିତି ଏହାର ବିଲ୍ଡ କନଫିଗରେସନଠାରୁ ଭିନ୍ନ ଅଟେ। ଦୟାକରି ଡିଭାଇସକୁ ଫେକ୍ଟୋରୀ ରିସେଟ କରନ୍ତୁ।"</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"କ୍ରମିକ କନ୍‍‍ସୋଲ୍‍କୁ ସକ୍ଷମ କରାଯାଇଛି"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"କାର୍ଯ୍ୟଦକ୍ଷତା ପ୍ରଭାବିତ ହୋଇଛି। ଅକ୍ଷମ କରିବା ପାଇଁ, ବୁଟ୍‌ଲୋଡର୍‍ର ଯାଞ୍ଚ କରନ୍ତୁ।"</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"ପରୀକ୍ଷାମୂଳକ MTEକୁ ସକ୍ଷମ କରାଯାଇଛି"</string>
@@ -1711,7 +1707,7 @@
<string name="kg_too_many_failed_password_attempts_dialog_message" msgid="3328686432962224215">"ଆପଣଙ୍କ ପାସ୍‌ୱର୍ଡକୁ ଆପଣ <xliff:g id="NUMBER_0">%1$d</xliff:g>ଥର ଭୁଲ ଭାବେ ଟାଇପ୍ କରିଛନ୍ତି। <xliff:g id="NUMBER_1">%2$d</xliff:g> ସେକେଣ୍ଡ ପରେ \n\nପୁଣି ଚେଷ୍ଟା କରନ୍ତୁ।"</string>
<string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="7357404233979139075">"ଆପଣଙ୍କ ଲକ୍‍ ଖୋଲିବା ପାଟର୍ନକୁ ଆପଣ <xliff:g id="NUMBER_0">%1$d</xliff:g>ଥର ଭୁଲ ଭାବେ ଅଙ୍କନ କରିଛନ୍ତି। <xliff:g id="NUMBER_1">%2$d</xliff:g> ସେକେଣ୍ଡ ପରେ \n\nପୁଣି ଚେଷ୍ଟା କରନ୍ତୁ।"</string>
<string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="3479940221343361587">"ଟାବଲେଟ୍‌ ଅନଲକ୍‍ କରିବାକୁ ଆପଣ <xliff:g id="NUMBER_0">%1$d</xliff:g> ଥର ଭୁଲ ପ୍ରୟାସ କଲେ। ଆଉ <xliff:g id="NUMBER_1">%2$d</xliff:g>ଟି ଭୁଲ ପ୍ରୟାସ ପରେ, ଟାବଲେଟ୍‌ଟି ଫ୍ୟାକ୍ଟୋରୀ ଡିଫଲ୍ଟକୁ ରିସେଟ୍‍ ହୋଇଯିବ ଏବଂ ସମସ୍ତ ୟୁଜର୍‍ ଡାଟା ବାହାରିଯିବ।"</string>
- <string name="kg_failed_attempts_almost_at_wipe" product="tv" msgid="9064457748587850217">"ଆପଣ <xliff:g id="NUMBER_0">%1$d</xliff:g> ଥର ଆପଣଙ୍କର Android TV ଡିଭାଇସ୍‌କୁ ଭୁଲ ଭାବେ ଅନ୍‌ଲକ୍ କରିବାକୁ ଚେଷ୍ଟା କରିଛନ୍ତି। <xliff:g id="NUMBER_1">%2$d</xliff:g> ଥର ଅସଫଳ ଚେଷ୍ଟା ପରେ, ଆପଣଙ୍କର Android TV ଡିଭାଇସ୍ ଫ୍ୟାକ୍ଟୋରୀ ଡିଫଲ୍ଟକୁ ରିସେଟ୍ କରାଯିବ ଏବଂ ସମସ୍ତ ଉପଯୋଗକର୍ତ୍ତା ଡାଟା ହରାଇବ।"</string>
+ <string name="kg_failed_attempts_almost_at_wipe" product="tv" msgid="9064457748587850217">"ଆପଣ <xliff:g id="NUMBER_0">%1$d</xliff:g> ଥର ଆପଣଙ୍କର Android TV ଡିଭାଇସକୁ ଭୁଲ ଭାବେ ଅନଲକ କରିବାକୁ ଚେଷ୍ଟା କରିଛନ୍ତି। <xliff:g id="NUMBER_1">%2$d</xliff:g> ଥର ଅସଫଳ ଚେଷ୍ଟା ପରେ ଆପଣଙ୍କର Android TV ଡିଭାଇସ ଫେକ୍ଟୋରୀ ଡିଫଲ୍ଟକୁ ରିସେଟ କରାଯିବ ଏବଂ ସମସ୍ତ ୟୁଜର ଡାଟା ହରାଇବ।"</string>
<string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="5955398963754432548">"ଫୋନ୍‌ ଅନଲକ୍‍ କରିବାକୁ ଆପଣ <xliff:g id="NUMBER_0">%1$d</xliff:g> ଥର ଭୁଲ ପ୍ରୟାସ କଲେ। ଆଉ <xliff:g id="NUMBER_1">%2$d</xliff:g>ଟି ଭୁଲ ପ୍ରୟାସ ପରେ, ଫୋନ୍‌ଟି ଫ୍ୟାକ୍ଟୋରୀ ଡିଫଲ୍ଟକୁ ରିସେଟ୍‍ ହୋଇଯିବ ଏବଂ ସମସ୍ତ ୟୁଜର୍‍ ଡାଟା ବାହାରିଯିବ।"</string>
<string name="kg_failed_attempts_now_wiping" product="tablet" msgid="2299099385175083308">"ଟାବଲେଟ୍‌ ଅନଲକ୍‍ କରିବାକୁ ଆପଣ <xliff:g id="NUMBER">%d</xliff:g> ଥର ଭୁଲ ପ୍ରୟାସ କଲେ। ଟାବଲେଟ୍‌ଟି ବର୍ତ୍ତମାନ ଫ୍ୟାକ୍ଟୋରୀ ଡିଫଲ୍ଟକୁ ରିସେଟ୍‍ ହୋଇଯିବ।"</string>
<string name="kg_failed_attempts_now_wiping" product="tv" msgid="5045460916106267585">"ଆପଣ <xliff:g id="NUMBER">%d</xliff:g> ଥର ଆପଣଙ୍କର Android TV ଡିଭାଇସ୍‌କୁ ଭୁଲ ଭାବେ ଅନ୍‌ଲକ୍ କରିବାକୁ ଚେଷ୍ଟା କରିଛନ୍ତି। ବର୍ତ୍ତମାନ ଆପଣଙ୍କର Android TV ଡିଭାଇସ୍ ଫ୍ୟାକ୍ଟୋରୀ ଡିଫଲ୍ଟକୁ ରିସେଟ୍ ହୋଇଯିବ।"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"ଭଲ୍ୟୁମ୍ କୀ\'ଗୁଡ଼ିକୁ ଧରି ରଖାଯାଇଛି। <xliff:g id="SERVICE_NAME">%1$s</xliff:g> ଚାଲୁ ହୋଇଛି।"</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"ଭଲ୍ୟୁମ୍ କୀ\'ଗୁଡ଼ିକୁ ଧରି ରଖାଯାଇଛି। <xliff:g id="SERVICE_NAME">%1$s</xliff:g> ବନ୍ଦ ହୋଇଛି।"</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"ଭଲ୍ୟୁମ କୀ\'ଗୁଡ଼ିକୁ ରିଲିଜ କରନ୍ତୁ। <xliff:g id="SERVICE_NAME">%1$s</xliff:g>କୁ ଚାଲୁ କରିବା ପାଇଁ ଉଭୟ ଭଲ୍ୟୁମ କୀ\'କୁ ପୁଣି 3 ସେକେଣ୍ଡ ପାଇଁ ଦବାଇ ଧରି ରଖନ୍ତୁ।"</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"ଏକ ଫିଚର ବାଛନ୍ତୁ"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"ଏକ ଫିଚର ବାଛନ୍ତୁ"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"ଏକ ଫିଚର ବାଛନ୍ତୁ"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"ଆପଣ ଆଗାମୀ ଥର ଆକ୍ସେସିବିଲିଟୀ ବଟନରେ ଟାପ କଲେ ଏହି ଫିଚରଟି ଖୋଲିବ"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"ଆପଣ ଆଗାମୀ ଥର ଏହି ସର୍ଟକଟକୁ ବ୍ୟବହାର କଲେ ଏହି ଫିଚରଟି ଖୋଲିବ। ଆପଣଙ୍କ ସ୍କ୍ରିନର ନିମ୍ନଭାଗରୁ 2 ଆଙ୍ଗୁଠିରେ ଉପରକୁ ସ୍ୱାଇପ କରି ଶୀଘ୍ର ରିଲିଜ କରନ୍ତୁ।"</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"ଆପଣ ଆଗାମୀ ଥର ଏହି ସର୍ଟକଟକୁ ବ୍ୟବହାର କଲେ ଏହି ଫିଚରଟି ଖୋଲିବ। ଆପଣଙ୍କ ସ୍କ୍ରିନର ନିମ୍ନଭାଗରୁ 3 ଆଙ୍ଗୁଠିରେ ଉପରକୁ ସ୍ୱାଇପ କରି ଶୀଘ୍ର ରିଲିଜ କରନ୍ତୁ।"</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"ମେଗ୍ନିଫିକେସନ"</string>
<string name="user_switched" msgid="7249833311585228097">"ବର୍ତ୍ତମାନର ୟୁଜର୍‌ ହେଉଛନ୍ତି <xliff:g id="NAME">%1$s</xliff:g>।"</string>
<string name="user_switching_message" msgid="1912993630661332336">"<xliff:g id="NAME">%1$s</xliff:g>ରେ ସ୍ୱିଚ କରନ୍ତୁ…"</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"PIN ବହୁତ ଛୋଟ। ଅତି କମ୍‍ରେ 4 ସଂଖ୍ୟା ବିଶିଷ୍ଟ ହେବା ଦରକାର।"</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"ପରେ ପୁଣି ଚେଷ୍ଟା କରନ୍ତୁ"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"ପୂର୍ଣ୍ଣ ସ୍କ୍ରୀନରେ ଦେଖାଯାଉଛି"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"ବାହାରି ଯିବା ପାଇଁ ଆପଣଙ୍କ ସ୍କ୍ରିନର ଶୀର୍ଷରୁ ତଳକୁ ସ୍ୱାଇପ କରନ୍ତୁ"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"ବୁଝିଗଲି"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"ଏକ ଭଲ ଭ୍ୟୁ ପାଇଁ ରୋଟେଟ କରନ୍ତୁ"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"ଏକ ଭଲ ଭ୍ୟୁ ପାଇଁ ପୂର୍ଣ୍ଣ ସ୍କ୍ରିନରେ <xliff:g id="NAME">%s</xliff:g> ଖୋଲନ୍ତୁ"</string>
@@ -1996,7 +1985,7 @@
<string name="importance_from_person" msgid="4235804979664465383">"ସମ୍ପୃକ୍ତ ଲୋକଙ୍କ କାରଣରୁ ଏହା ଗୁରୁତ୍ୱପୂର୍ଣ୍ଣ ଅଟେ।"</string>
<string name="notification_history_title_placeholder" msgid="7748630986182249599">"କଷ୍ଟମ୍ ଆପ୍ ବିଜ୍ଞପ୍ତି"</string>
<string name="user_creation_account_exists" msgid="2239146360099708035">"<xliff:g id="APP">%1$s</xliff:g>ରେ ଏକ ନୂଆ ଉପଯୋଗକର୍ତ୍ତା ତିଆରି କରିବା ପାଇଁ <xliff:g id="ACCOUNT">%2$s</xliff:g>କୁ (ପୂର୍ବରୁ ଏହି ଆକାଉଣ୍ଟ ଉପଯୋଗକର୍ତ୍ତାଙ୍କ ନାମରେ ଅଛି) ଅନୁମତି ଦେବେ?"</string>
- <string name="user_creation_adding" msgid="7305185499667958364">"<xliff:g id="APP">%1$s</xliff:g>ରେ ଏକ ନୂଆ ଉପଯୋଗକର୍ତ୍ତା ତିଆରି କରିବା ପାଇଁ <xliff:g id="ACCOUNT">%2$s</xliff:g>କୁ ଅନୁମତି ଦେବେ?"</string>
+ <string name="user_creation_adding" msgid="7305185499667958364">"<xliff:g id="APP">%1$s</xliff:g>ରେ ଏକ ନୂଆ ୟୁଜର ତିଆରି କରିବା ପାଇଁ <xliff:g id="ACCOUNT">%2$s</xliff:g>କୁ ଅନୁମତି ଦେବେ?"</string>
<string name="supervised_user_creation_label" msgid="6884904353827427515">"ନିରୀକ୍ଷିତ ୟୁଜର ଯୋଗ କରନ୍ତୁ"</string>
<string name="language_selection_title" msgid="52674936078683285">"ଏକ ଭାଷା ଯୋଗ କରନ୍ତୁ"</string>
<string name="country_selection_title" msgid="5221495687299014379">"ପସନ୍ଦର ଅଞ୍ଚଳ"</string>
@@ -2436,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"ଏହା କିପରି କାମ କରେ"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"ବାକି ଅଛି…"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"ଫିଙ୍ଗରପ୍ରିଣ୍ଟ ଅନଲକ ପୁଣି ସେଟ ଅପ କରନ୍ତୁ"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g>କୁ ଆଉ ଚିହ୍ନଟ କରାଯାଇପାରିବ ନାହିଁ।"</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> ଏବଂ <xliff:g id="FINGERPRINT_1">%2$s</xliff:g>କୁ ଆଉ ଚିହ୍ନଟ କରାଯାଇପାରିବ ନାହିଁ।"</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g>କୁ ଆଉ ଚିହ୍ନଟ କରାଯାଇପାରିବ ନାହିଁ। ଫିଙ୍ଗରପ୍ରିଣ୍ଟ ଅନଲକ ପୁଣି ସେଟ ଅପ କରନ୍ତୁ।"</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> ଏବଂ <xliff:g id="FINGERPRINT_1">%2$s</xliff:g>କୁ ଆଉ ଚିହ୍ନଟ କରାଯାଇପାରିବ ନାହିଁ। ଫିଙ୍ଗରପ୍ରିଣ୍ଟ ଅନଲକ ପୁଣି ସେଟ ଅପ କରନ୍ତୁ।"</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"ଫେସ୍ ଅନଲକ୍ ପୁଣି ସେଟ୍ ଅପ୍ କରନ୍ତୁ"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"ଆପଣଙ୍କ ଫେସ ମଡେଲକୁ ଆଉ ଚିହ୍ନଟ କରାଯାଇପାରିବ ନାହିଁ। ଫେସ ଅନଲକ ପୁଣି ସେଟ ଅପ କରନ୍ତୁ।"</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"ସେଟ ଅପ କରନ୍ତୁ"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"ବର୍ତ୍ତମାନ ନୁହେଁ"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"<xliff:g id="USER_NAME">%s</xliff:g>ଙ୍କ ପାଇଁ ଆଲାରାମ"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"ୟୁଜରଙ୍କୁ ସ୍ୱିଚ କରନ୍ତୁ"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"ମ୍ୟୁଟ କରନ୍ତୁ"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"ସାଉଣ୍ଡ ମ୍ୟୁଟ କରିବାକୁ ଟାପ କରନ୍ତୁ"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-pa/strings.xml b/core/res/res/values-pa/strings.xml
index 996f25595a5e..fda4943bed41 100644
--- a/core/res/res/values-pa/strings.xml
+++ b/core/res/res/values-pa/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"ਬਗ ਰਿਪੋਰਟ"</string>
<string name="global_action_logout" msgid="6093581310002476511">"ਸੈਸ਼ਨ ਸਮਾਪਤ ਕਰੋ"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"ਸਕ੍ਰੀਨਸ਼ਾਟ ਲਵੋ"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"ਬੱਗ ਰਿਪੋਰਟ"</string>
<string name="bugreport_message" msgid="5212529146119624326">"ਇਹ ਇੱਕ ਈਮੇਲ ਸੁਨੇਹਾ ਭੇਜਣ ਲਈ, ਤੁਹਾਡੇ ਵਰਤਮਾਨ ਡੀਵਾਈਸ ਬਾਰੇ ਜਾਣਕਾਰੀ ਇਕੱਠੀ ਕਰੇਗਾ। ਬੱਗ ਰਿਪੋਰਟ ਸ਼ੁਰੂ ਕਰਨ ਵਿੱਚ ਥੋੜ੍ਹਾ ਸਮਾਂ ਲੱਗੇਗਾ ਜਦੋਂ ਤੱਕ ਇਹ ਭੇਜੇ ਜਾਣ ਲਈ ਤਿਆਰ ਨਾ ਹੋਵੇ, ਕਿਰਪਾ ਕਰਕੇ ਧੀਰਜ ਰੱਖੋ।"</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"ਅੰਤਰਕਿਰਿਆਤਮਕ ਰਿਪੋਰਟ"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"ਵਾਇਰਲੈੱਸ ਡੀਬੱਗਿੰਗ ਨੂੰ ਬੰਦ ਕਰਨ ਲਈ ਚੁਣੋ।"</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"ਟੈਸਟ ਹਾਰਨੈੱਸ ਮੋਡ ਚਾਲੂ ਹੈ"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"ਟੈਸਟ ਹਾਰਨੈੱਸ ਮੋਡ ਬੰਦ ਕਰਨ ਲਈ ਫੈਕਟਰੀ ਰੀਸੈੱਟ ਕਰੋ।"</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"ਗਲਤ HSUM ਬਿਲਡ ਸੰਰੂਪਣ"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"ਇਸ ਡੀਵਾਈਸ ਦੀ ਹੈੱਡਲੈੱਸ ਸਿਸਟਮ ਯੂਜ਼ਰ ਮੋਡ ਸਥਿਤੀ ਇਸਦੇ ਬਿਲਡ ਸੰਰੂਪਣ ਤੋਂ ਵੱਖਰੀ ਹੈ। ਕਿਰਪਾ ਕਰਕੇ ਡੀਵਾਈਸ ਨੂੰ ਫੈਕਟਰੀ ਰੀਸੈੱਟ ਕਰੋ।"</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"ਸੀਰੀਅਲ ਕੰਸੋਲ ਚਾਲੂ ਕੀਤਾ ਗਿਆ"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"ਕਾਰਗੁਜ਼ਾਰੀ ਪ੍ਰਭਾਵਿਤ ਹੋਈ ਹੈ। ਬੰਦ ਕਰਨ ਲਈ, ਬੂਟਲੋਡਰ ਦੇਖੋ।"</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"ਪ੍ਰਯੋਗਮਈ MTE ਨੂੰ ਚਾਲੂ ਕੀਤਾ ਗਿਆ"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"ਅਵਾਜ਼ੀ ਕੁੰਜੀਆਂ ਦਬਾ ਕੇ ਰੱਖੀਆਂ ਗਈਆਂ। <xliff:g id="SERVICE_NAME">%1$s</xliff:g> ਨੂੰ ਚਾਲੂ ਕੀਤਾ ਗਿਆ।"</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"ਅਵਾਜ਼ੀ ਕੁੰਜੀਆਂ ਦਬਾ ਕੇ ਰੱਖੀਆਂ ਗਈਆਂ। <xliff:g id="SERVICE_NAME">%1$s</xliff:g> ਨੂੰ ਬੰਦ ਕੀਤਾ ਗਿਆ।"</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"ਅਵਾਜ਼ ਕੁੰਜੀਆਂ ਨੂੰ ਛੱਡੋ। <xliff:g id="SERVICE_NAME">%1$s</xliff:g> ਨੂੰ ਚਾਲੂ ਕਰਨ ਲਈ, ਦੋਵੇਂ ਅਵਾਜ਼ ਕੁੰਜੀਆਂ ਨੂੰ 3 ਸਕਿੰਟਾਂ ਲਈ ਦੁਬਾਰਾ ਦਬਾਈ ਰੱਖੋ।"</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"ਕੋਈ ਵਿਸ਼ੇਸ਼ਤਾ ਚੁਣੋ"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"ਕੋਈ ਵਿਸ਼ੇਸ਼ਤਾ ਚੁਣੋ"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"ਕੋਈ ਵਿਸ਼ੇਸ਼ਤਾ ਚੁਣੋ"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"ਅਗਲੀ ਵਾਰ ਜਦੋਂ ਤੁਸੀਂ ਪਹੁੰਚਯੋਗਤਾ ਬਟਨ ਨੂੰ ਟੈਪ ਕਰੋਗੇ, ਤਾਂ ਇਹ ਵਿਸ਼ੇਸ਼ਤਾ ਖੁੱਲ੍ਹ ਜਾਵੇਗੀ"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"ਅਗਲੀ ਵਾਰ ਜਦੋਂ ਤੁਸੀਂ ਇਸ ਸ਼ਾਰਟਕੱਟ ਦੀ ਵਰਤੋਂ ਕਰੋਗੇ, ਤਾਂ ਇਹ ਵਿਸ਼ੇਸ਼ਤਾ ਖੁੱਲ੍ਹ ਜਾਵੇਗੀ। 2 ਉਂਗਲਾਂ ਨਾਲ ਆਪਣੀ ਸਕ੍ਰੀਨ ਦੇ ਹੇਠਾਂ ਤੋਂ ਉੱਪਰ ਵੱਲ ਸਵਾਈਪ ਕਰ ਕੇ ਤੁਰੰਤ ਛੱਡੋ।"</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"ਅਗਲੀ ਵਾਰ ਜਦੋਂ ਤੁਸੀਂ ਇਸ ਸ਼ਾਰਟਕੱਟ ਦੀ ਵਰਤੋਂ ਕਰੋਗੇ, ਤਾਂ ਇਹ ਵਿਸ਼ੇਸ਼ਤਾ ਖੁੱਲ੍ਹ ਜਾਵੇਗੀ। 3 ਉਂਗਲਾਂ ਨਾਲ ਆਪਣੀ ਸਕ੍ਰੀਨ ਦੇ ਹੇਠਾਂ ਤੋਂ ਉੱਪਰ ਵੱਲ ਸਵਾਈਪ ਕਰ ਕੇ ਤੁਰੰਤ ਛੱਡੋ।"</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"ਵੱਡਦਰਸ਼ੀਕਰਨ"</string>
<string name="user_switched" msgid="7249833311585228097">"ਮੌਜੂਦਾ ਉਪਭੋਗਤਾ <xliff:g id="NAME">%1$s</xliff:g>।"</string>
<string name="user_switching_message" msgid="1912993630661332336">"<xliff:g id="NAME">%1$s</xliff:g> \'ਤੇ ਸਵਿੱਚ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ…"</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"ਪਿੰਨ ਬਹੁਤ ਜ਼ਿਆਦਾ ਛੋਟਾ ਹੈ। ਘੱਟੋ-ਘੱਟ 4 ਅੰਕ ਹੋਣੇ ਚਾਹੀਦੇ ਹਨ।"</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"ਬਾਅਦ ਵਿੱਚ ਦੁਬਾਰਾ ਕੋਸ਼ਿਸ਼ ਕਰੋ।"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"ਪੂਰੀ ਸਕ੍ਰੀਨ \'ਤੇ ਦੇਖੋ"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"ਬਾਹਰ ਜਾਣ ਲਈ, ਆਪਣੀ ਸਕ੍ਰੀਨ ਦੇ ਸਿਖਰ ਤੋਂ ਹੇਠਾਂ ਵੱਲ ਸਵਾਈਪ ਕਰੋ"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"ਸਮਝ ਲਿਆ"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"ਬਿਹਤਰ ਦ੍ਰਿਸ਼ ਅਨੁਭਵ ਲਈ ਘੁਮਾਓ"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"ਬਿਹਤਰ ਦ੍ਰਿਸ਼ ਅਨੁਭਵ ਲਈ <xliff:g id="NAME">%s</xliff:g> ਨੂੰ ਪੂਰੀ-ਸਕ੍ਰੀਨ ਵਿੱਚ ਖੋਲ੍ਹੋ"</string>
@@ -2436,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"ਇਹ ਕਿਵੇਂ ਕੰਮ ਕਰਦਾ ਹੈ"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"ਵਿਚਾਰ-ਅਧੀਨ..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"ਫਿੰਗਰਪ੍ਰਿੰਟ ਅਣਲਾਕ ਦਾ ਦੁਬਾਰਾ ਸੈੱਟਅੱਪ ਕਰੋ"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> ਦੀ ਹੁਣ ਪਛਾਣ ਨਹੀਂ ਕੀਤੀ ਜਾ ਸਕਦੀ।"</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> ਅਤੇ <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> ਦੀ ਹੁਣ ਪਛਾਣ ਨਹੀਂ ਕੀਤੀ ਜਾ ਸਕਦੀ।"</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> ਦੀ ਹੁਣ ਪਛਾਣ ਨਹੀਂ ਕੀਤੀ ਜਾ ਸਕਦੀ। ਫਿੰਗਰਪ੍ਰਿੰਟ ਅਣਲਾਕ ਦਾ ਦੁਬਾਰਾ ਸੈੱਟਅੱਪ ਕਰੋ।"</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> ਅਤੇ <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> ਦੀ ਹੁਣ ਪਛਾਣ ਨਹੀਂ ਕੀਤੀ ਜਾ ਸਕਦੀ। ਫਿੰਗਰਪ੍ਰਿੰਟ ਅਣਲਾਕ ਦਾ ਦੁਬਾਰਾ ਸੈੱਟਅੱਪ ਕਰੋ।"</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"ਫ਼ੇਸ ਅਣਲਾਕ ਦਾ ਦੁਬਾਰਾ ਸੈੱਟਅੱਪ ਕਰੋ"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"ਤੁਹਾਡੇ ਚਿਹਰੇ ਦੇ ਮਾਡਲ ਦੀ ਹੁਣ ਪਛਾਣ ਨਹੀਂ ਕੀਤੀ ਜਾ ਸਕਦੀ। ਫ਼ੇਸ ਅਣਲਾਕ ਦਾ ਦੁਬਾਰਾ ਸੈੱਟਅੱਪ ਕਰੋ।"</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"ਸੈੱਟਅੱਪ ਕਰੋ"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"ਹੁਣੇ ਨਹੀਂ"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"<xliff:g id="USER_NAME">%s</xliff:g> ਲਈ ਅਲਾਰਮ"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"ਵਰਤੋਂਕਾਰ ਬਦਲੋ"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"ਮਿਊਟ ਕਰੋ"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"ਧੁਨੀ ਮਿਊਟ ਕਰਨ ਲਈ ਟੈਪ ਕਰੋ"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml
index a608fc765a93..bfaf21ceca07 100644
--- a/core/res/res/values-pl/strings.xml
+++ b/core/res/res/values-pl/strings.xml
@@ -267,8 +267,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Zgłoś błąd"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Zakończ sesję"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Zrzut ekranu"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Zgłoś błąd"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Informacje o bieżącym stanie urządzenia zostaną zebrane i wysłane e-mailem. Przygotowanie zgłoszenia błędu do wysłania chwilę potrwa, więc zachowaj cierpliwość."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Raport interaktywny"</string>
@@ -1415,10 +1413,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Wybierz, by wyłączyć debugowanie bezprzewodowe."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Tryb jarzma testowego został włączony"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Przywróć ustawienia fabryczne, by wyłączyć tryb jarzma testowego."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Nieprawidłowa konfiguracja kompilacji trybu użytkownika systemowego bez interfejsu graficznego"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"Stan trybu użytkownika systemowego bez interfejsu graficznego różni się od konfiguracji kompilacji. Przywróć urządzenie do ustawień fabrycznych."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Konsola szeregowa włączona"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Wpływa na wydajność. Aby wyłączyć, sprawdź program rozruchowy."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"Włączono eksperymentalne rozszerzenie MTE"</string>
@@ -1763,12 +1759,9 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Przytrzymano klawisze głośności. Usługa <xliff:g id="SERVICE_NAME">%1$s</xliff:g> została włączona."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Przytrzymano klawisze głośności. Usługa <xliff:g id="SERVICE_NAME">%1$s</xliff:g> została wyłączona."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Zwolnij przyciski głośności. Aby włączyć usługę <xliff:g id="SERVICE_NAME">%1$s</xliff:g>, naciśnij i przytrzymaj oba przyciski głośności przez 3 sekundy."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Wybierz funkcję"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Wybierz funkcję"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Wybierz funkcję"</string>
<string name="accessibility_button_instructional_text" msgid="6831154884557881996">"Funkcja otworzy się, gdy następnym razem klikniesz przycisk ułatwień dostępu"</string>
<string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"Funkcja otworzy się, gdy następnym razem użyjesz tego skrótu. Przesuń 2 palcami z dołu ekranu i szybko je unieś."</string>
<string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"Funkcja otworzy się, gdy następnym razem użyjesz tego skrótu. Przesuń 3 palcami z dołu ekranu i szybko je unieś."</string>
@@ -1894,8 +1887,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"PIN jest za krótki. Musi mieć co najmniej 4 cyfry."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Spróbuj ponownie później"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Włączony pełny ekran"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Aby zamknąć, przesuń palcem w dół z góry ekranu"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"OK"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Obróć, aby lepiej widzieć"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Otwórz aplikację <xliff:g id="NAME">%s</xliff:g> na pełnym ekranie, aby lepiej widzieć"</string>
@@ -2435,21 +2427,25 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Jak to działa"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Oczekiwanie…"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Skonfiguruj ponownie odblokowywanie odciskiem palca"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"Ten odcisk palca (<xliff:g id="FINGERPRINT">%s</xliff:g>) nie jest już rozpoznawany."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"Te odciski palców (<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> i <xliff:g id="FINGERPRINT_1">%2$s</xliff:g>) nie są już rozpoznawane."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"Ten odcisk palca (<xliff:g id="FINGERPRINT">%s</xliff:g>) nie jest już rozpoznawany. Skonfiguruj ponownie odblokowywanie odciskiem palca."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"Te odciski palców (<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> i <xliff:g id="FINGERPRINT_1">%2$s</xliff:g>) nie są już rozpoznawane. Skonfiguruj ponownie odblokowywanie odciskiem palca."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Skonfiguruj ponownie rozpoznawanie twarzy"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Model Twojej twarzy nie jest już rozpoznawany. Skonfiguruj ponownie rozpoznawanie twarzy."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Skonfiguruj"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Nie teraz"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Alarm dla: <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Przełącz konto"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Wycisz"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Kliknij, aby wyciszyć dźwięk"</string>
+ <string name="keyboard_shortcut_group_applications_browser" msgid="6535007304687100909">"Przeglądarka"</string>
+ <string name="keyboard_shortcut_group_applications_contacts" msgid="2750702518068326356">"Kontakty"</string>
+ <string name="keyboard_shortcut_group_applications_email" msgid="4229037666415353683">"E-mail"</string>
+ <string name="keyboard_shortcut_group_applications_sms" msgid="3523799286376321137">"SMS-y"</string>
+ <string name="keyboard_shortcut_group_applications_music" msgid="2051507523525651067">"Muzyka"</string>
+ <string name="keyboard_shortcut_group_applications_calendar" msgid="3571770335653387606">"Kalendarz"</string>
+ <string name="keyboard_shortcut_group_applications_calculator" msgid="6753209559716091507">"Kalkulator"</string>
+ <string name="keyboard_shortcut_group_applications_maps" msgid="7950000659522589471">"Mapy"</string>
+ <string name="keyboard_shortcut_group_applications" msgid="3010389163951364798">"Aplikacje"</string>
</resources>
diff --git a/core/res/res/values-pt-rBR/strings.xml b/core/res/res/values-pt-rBR/strings.xml
index fa47d04fc702..a6c07ef21064 100644
--- a/core/res/res/values-pt-rBR/strings.xml
+++ b/core/res/res/values-pt-rBR/strings.xml
@@ -266,8 +266,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Relatório de bug"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Finalizar sessão"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Captura de tela"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Relatório de bug"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Isto coletará informações sobre o estado atual do dispositivo para enviá-las em uma mensagem de e-mail. Após iniciar o relatório de bugs, será necessário aguardar algum tempo até que esteja pronto para ser enviado."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Relatório interativo"</string>
@@ -1414,10 +1412,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Selecione para desativar a depuração por Wi-Fi."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Modo Arcabouço de testes ativado"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Realize uma redefinição para configuração original para desativar o modo Arcabouço de testes."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Configuração incorreta do build do modo de usuário do sistema headless"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"O estado do modo de usuário do sistema headless deste dispositivo é diferente da configuração do build dele. Faça a redefinição de fábrica do dispositivo."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Console serial ativado"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"O desempenho foi impactado. Para desativar, verifique o carregador de inicialização."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"MTE experimental ativada"</string>
@@ -1762,12 +1758,9 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Teclas de volume pressionadas. Serviço <xliff:g id="SERVICE_NAME">%1$s</xliff:g> ativado."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Teclas de volume pressionadas. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> desativado."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Solte as teclas de volume. Para ativar o serviço <xliff:g id="SERVICE_NAME">%1$s</xliff:g>, toque e pressione as duas teclas de volume por três segundos."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Escolha um recurso"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Escolha um recurso"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Escolha um recurso"</string>
<string name="accessibility_button_instructional_text" msgid="6831154884557881996">"O recurso será aberto na próxima vez que você tocar no botão de acessibilidade"</string>
<string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"O recurso será aberto na próxima vez que você usar este atalho. Deslize com 2 dedos de baixo para cima na tela e solte rapidamente."</string>
<string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"O recurso será aberto na próxima vez que você usar este atalho. Deslize com 3 dedos de baixo para cima na tela e solte rapidamente."</string>
@@ -1893,8 +1886,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"O PIN é curto demais. Deve ter pelo menos 4 dígitos."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Tente novamente mais tarde"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Visualização em tela cheia"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Para sair, deslize de cima para baixo na tela"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"Entendi"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Gire a tela para ter uma visualização melhor"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Abra o app <xliff:g id="NAME">%s</xliff:g> em tela cheia para ter uma melhor visualização"</string>
@@ -2434,21 +2426,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Como funciona"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Pendente…"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Configurar o Desbloqueio por impressão digital de novo"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"A impressão digital <xliff:g id="FINGERPRINT">%s</xliff:g> não é mais reconhecida."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"As impressões digitais <xliff:g id="FINGERPRINT_0">%1$s</xliff:g> e <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> não são mais reconhecidas."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"A impressão digital <xliff:g id="FINGERPRINT">%s</xliff:g> não é mais reconhecida. Configure o \"Desbloqueio por impressão digital\" de novo."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"As impressões digitais <xliff:g id="FINGERPRINT_0">%1$s</xliff:g> e <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> não são mais reconhecidas. Configure o \"Desbloqueio por impressão digital\" de novo."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Configure o Desbloqueio facial de novo"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Seu modelo de rosto não é mais reconhecido. Configure o \"Desbloqueio facial\" de novo."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Configuração"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Agora não"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Alarme para <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Trocar usuário"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Desativar som"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Toque para silenciar"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-pt-rPT/strings.xml b/core/res/res/values-pt-rPT/strings.xml
index 8a5230348a3c..6c8840862988 100644
--- a/core/res/res/values-pt-rPT/strings.xml
+++ b/core/res/res/values-pt-rPT/strings.xml
@@ -266,8 +266,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Relatório de erros"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Terminar sessão"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Capt. ecrã"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Relatório de erro"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Será recolhida informação sobre o estado atual do seu dispositivo a enviar através de uma mensagem de email. Demorará algum tempo até que o relatório de erro esteja pronto para ser enviado. Aguarde um pouco."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Relatório interativo"</string>
@@ -1414,10 +1412,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Selecione para desativar a depuração sem fios."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Modo de estrutura de teste ativado"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Efetue uma reposição de dados de fábrica para desativar o Modo de estrutura de teste."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Configuração da compilação do modo de utilizador do sistema sem interface incorreta"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"O estado do modo de utilizador do sistema sem interface deste dispositivo difere da respetiva configuração da compilação. Faça uma reposição de fábrica do dispositivo."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Consola de série ativada"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"O desempenho é afetado. Para desativar, selecione o carregador de arranque."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"MTE experimental ativada"</string>
@@ -1442,7 +1438,7 @@
<string name="fast_scroll_numeric_alphabet" msgid="2529539945421557329">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="alert_windows_notification_channel_group_name" msgid="6063891141815714246">"Sobreposição a outras apps"</string>
<string name="alert_windows_notification_channel_name" msgid="3437528564303192620">"A app <xliff:g id="NAME">%s</xliff:g> sobrepõe-se a outras aplicações"</string>
- <string name="alert_windows_notification_title" msgid="6331662751095228536">"O <xliff:g id="NAME">%s</xliff:g> sobrepõe-se a outras app"</string>
+ <string name="alert_windows_notification_title" msgid="6331662751095228536">"<xliff:g id="NAME">%s</xliff:g> sobrepõe-se a outras app"</string>
<string name="alert_windows_notification_message" msgid="6538171456970725333">"Se não quer que a app <xliff:g id="NAME">%s</xliff:g> utilize esta funcionalidade, toque para abrir as definições e desative-a."</string>
<string name="alert_windows_notification_turn_off_action" msgid="7805857234839123780">"Desativar"</string>
<string name="ext_media_checking_notification_title" msgid="8299199995416510094">"A verificar o <xliff:g id="NAME">%s</xliff:g>…"</string>
@@ -1762,12 +1758,9 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Teclas do volume premidas. Serviço <xliff:g id="SERVICE_NAME">%1$s</xliff:g> ativado."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Teclas de volume premidas. Serviço <xliff:g id="SERVICE_NAME">%1$s</xliff:g> desativado."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Solte as teclas de volume. Para ativar o serviço <xliff:g id="SERVICE_NAME">%1$s</xliff:g>, prima sem soltar ambas as teclas de volume novamente durante 3 segundos."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Escolha uma funcionalidade"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Escolha uma funcionalidade"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Escolha uma funcionalidade"</string>
<string name="accessibility_button_instructional_text" msgid="6831154884557881996">"A funcionalidade vai ser aberta da próxima vez que tocar no botão Acessibilidade"</string>
<string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"A funcionalidade vai ser aberta da próxima vez que usar este atalho. Deslize com 2 dedos a partir da parte inferior do ecrã e solte rapidamente."</string>
<string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"A funcionalidade vai ser aberta da próxima vez que usar este atalho. Deslize para cima com 3 dedos a partir da parte inferior do ecrã e solte rapidamente."</string>
@@ -1893,8 +1886,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"O PIN é demasiado pequeno. Deve ter, no mínimo, 4 dígitos."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Tente mais tarde"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Visualização de ecrã inteiro"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Para sair, deslize rapidamente para baixo a partir da parte superior do ecrã"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"OK"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Rode para uma melhor visualização"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Abra <xliff:g id="NAME">%s</xliff:g> em ecrã inteiro para uma melhor visualização"</string>
@@ -2190,7 +2182,7 @@
<string name="bluetooth_airplane_mode_toast" msgid="2066399056595768554">"O Bluetooth continuará ativado durante o modo de avião."</string>
<string name="car_loading_profile" msgid="8219978381196748070">"A carregar…"</string>
<string name="file_count" msgid="3220018595056126969">"{count,plural, =1{{file_name} + # ficheiro}many{{file_name} + # ficheiros}other{{file_name} + # ficheiros}}"</string>
- <string name="chooser_no_direct_share_targets" msgid="1511722103987329028">"Não existem pessoas recomendadas com quem partilhar"</string>
+ <string name="chooser_no_direct_share_targets" msgid="1511722103987329028">"Sem pessoas recomendadas com quem partilhar"</string>
<string name="chooser_all_apps_button_label" msgid="3230427756238666328">"Lista de aplicações"</string>
<string name="usb_device_resolve_prompt_warn" msgid="325871329788064199">"Esta app não recebeu autorização de gravação, mas pode capturar áudio através deste dispositivo USB."</string>
<string name="accessibility_system_action_home_label" msgid="3234748160850301870">"Página inicial"</string>
@@ -2434,21 +2426,25 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Como funciona"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Pendente…"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Configure o Desbloqueio por impressão digital novamente"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"Já não é possível reconhecer <xliff:g id="FINGERPRINT">%s</xliff:g>."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"Já não é possível reconhecer <xliff:g id="FINGERPRINT_0">%1$s</xliff:g> e <xliff:g id="FINGERPRINT_1">%2$s</xliff:g>."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"Já não é possível reconhecer <xliff:g id="FINGERPRINT">%s</xliff:g>. Configure o Desbloqueio por impressão digital novamente."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"Já não é possível reconhecer <xliff:g id="FINGERPRINT_0">%1$s</xliff:g> e <xliff:g id="FINGERPRINT_1">%2$s</xliff:g>. Configure o Desbloqueio por impressão digital novamente."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Configure o Desbloqueio facial novamente"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Já não é possível reconhecer o seu modelo de rosto. Configure o Desbloqueio facial novamente."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Configurar"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Agora não"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Alarme de <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Mudar de utilizador"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Desativar som"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Toque para desativar o som"</string>
+ <string name="keyboard_shortcut_group_applications_browser" msgid="6535007304687100909">"Navegador"</string>
+ <string name="keyboard_shortcut_group_applications_contacts" msgid="2750702518068326356">"Contactos"</string>
+ <string name="keyboard_shortcut_group_applications_email" msgid="4229037666415353683">"Email"</string>
+ <string name="keyboard_shortcut_group_applications_sms" msgid="3523799286376321137">"SMS"</string>
+ <string name="keyboard_shortcut_group_applications_music" msgid="2051507523525651067">"Música"</string>
+ <string name="keyboard_shortcut_group_applications_calendar" msgid="3571770335653387606">"Calendário"</string>
+ <string name="keyboard_shortcut_group_applications_calculator" msgid="6753209559716091507">"Calculadora"</string>
+ <string name="keyboard_shortcut_group_applications_maps" msgid="7950000659522589471">"Maps"</string>
+ <string name="keyboard_shortcut_group_applications" msgid="3010389163951364798">"Aplicações"</string>
</resources>
diff --git a/core/res/res/values-pt/strings.xml b/core/res/res/values-pt/strings.xml
index fa47d04fc702..a6c07ef21064 100644
--- a/core/res/res/values-pt/strings.xml
+++ b/core/res/res/values-pt/strings.xml
@@ -266,8 +266,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Relatório de bug"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Finalizar sessão"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Captura de tela"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Relatório de bug"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Isto coletará informações sobre o estado atual do dispositivo para enviá-las em uma mensagem de e-mail. Após iniciar o relatório de bugs, será necessário aguardar algum tempo até que esteja pronto para ser enviado."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Relatório interativo"</string>
@@ -1414,10 +1412,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Selecione para desativar a depuração por Wi-Fi."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Modo Arcabouço de testes ativado"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Realize uma redefinição para configuração original para desativar o modo Arcabouço de testes."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Configuração incorreta do build do modo de usuário do sistema headless"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"O estado do modo de usuário do sistema headless deste dispositivo é diferente da configuração do build dele. Faça a redefinição de fábrica do dispositivo."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Console serial ativado"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"O desempenho foi impactado. Para desativar, verifique o carregador de inicialização."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"MTE experimental ativada"</string>
@@ -1762,12 +1758,9 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Teclas de volume pressionadas. Serviço <xliff:g id="SERVICE_NAME">%1$s</xliff:g> ativado."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Teclas de volume pressionadas. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> desativado."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Solte as teclas de volume. Para ativar o serviço <xliff:g id="SERVICE_NAME">%1$s</xliff:g>, toque e pressione as duas teclas de volume por três segundos."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Escolha um recurso"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Escolha um recurso"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Escolha um recurso"</string>
<string name="accessibility_button_instructional_text" msgid="6831154884557881996">"O recurso será aberto na próxima vez que você tocar no botão de acessibilidade"</string>
<string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"O recurso será aberto na próxima vez que você usar este atalho. Deslize com 2 dedos de baixo para cima na tela e solte rapidamente."</string>
<string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"O recurso será aberto na próxima vez que você usar este atalho. Deslize com 3 dedos de baixo para cima na tela e solte rapidamente."</string>
@@ -1893,8 +1886,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"O PIN é curto demais. Deve ter pelo menos 4 dígitos."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Tente novamente mais tarde"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Visualização em tela cheia"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Para sair, deslize de cima para baixo na tela"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"Entendi"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Gire a tela para ter uma visualização melhor"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Abra o app <xliff:g id="NAME">%s</xliff:g> em tela cheia para ter uma melhor visualização"</string>
@@ -2434,21 +2426,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Como funciona"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Pendente…"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Configurar o Desbloqueio por impressão digital de novo"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"A impressão digital <xliff:g id="FINGERPRINT">%s</xliff:g> não é mais reconhecida."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"As impressões digitais <xliff:g id="FINGERPRINT_0">%1$s</xliff:g> e <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> não são mais reconhecidas."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"A impressão digital <xliff:g id="FINGERPRINT">%s</xliff:g> não é mais reconhecida. Configure o \"Desbloqueio por impressão digital\" de novo."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"As impressões digitais <xliff:g id="FINGERPRINT_0">%1$s</xliff:g> e <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> não são mais reconhecidas. Configure o \"Desbloqueio por impressão digital\" de novo."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Configure o Desbloqueio facial de novo"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Seu modelo de rosto não é mais reconhecido. Configure o \"Desbloqueio facial\" de novo."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Configuração"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Agora não"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Alarme para <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Trocar usuário"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Desativar som"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Toque para silenciar"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-ro/strings.xml b/core/res/res/values-ro/strings.xml
index 9c6f87e64cd6..4a9471590c5a 100644
--- a/core/res/res/values-ro/strings.xml
+++ b/core/res/res/values-ro/strings.xml
@@ -266,8 +266,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Raport despre erori"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Încheie sesiunea"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Instantaneu"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Raport de eroare"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Acest raport va colecta informații despre starea actuală a dispozitivului, pentru a le trimite într-un e-mail. Ai răbdare după pornirea raportului despre erori până când va fi gata de trimis."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Raport interactiv"</string>
@@ -1414,10 +1412,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Selectează pentru a dezactiva remedierea erorilor wireless."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Modul Set de testare este activat"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Revino la setările din fabrică pentru a dezactiva modul Set de testare."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Configurare greșită a versiunii HSUM"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"Starea Headless System User Mode a acestui dispozitiv diferă de configurarea versiunii. Revino la setările din fabrică ale dispozitivului."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Consola din serie este activată"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Performanța este afectată. Pentru a dezactiva, verifică programul bootloader."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"MTE experimentală activată"</string>
@@ -1762,18 +1758,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"S-au apăsat lung tastele de volum. S-a activat <xliff:g id="SERVICE_NAME">%1$s</xliff:g>."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"S-au apăsat lung tastele de volum. S-a dezactivat <xliff:g id="SERVICE_NAME">%1$s</xliff:g>."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Eliberează butoanele de volum. Pentru a activa <xliff:g id="SERVICE_NAME">%1$s</xliff:g>, apasă lung pe ambele butoane de volum timp de trei secunde încă o dată."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Alege o funcție"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Alege o funcție"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Alege o funcție"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"Funcția se va deschide data viitoare când atingi butonul de accesibilitate"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"Funcția se va deschide data viitoare când folosești această comandă rapidă. Glisează în sus cu două degete din partea de jos a ecranului și ridică-le rapid."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"Funcția se va deschide data viitoare când folosești această comandă rapidă. Glisează în sus cu trei degete din partea de jos a ecranului și ridică-le rapid."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Mărire"</string>
<string name="user_switched" msgid="7249833311585228097">"Utilizator curent: <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"Se comută la <xliff:g id="NAME">%1$s</xliff:g>…"</string>
@@ -1896,8 +1886,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"Codul PIN este prea scurt. Trebuie să aibă cel puțin 4 cifre."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Reîncearcă mai târziu"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Vizualizare pe ecran complet"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Pentru a ieși, glisează în jos din partea de sus a ecranului"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"Am înțeles"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Rotește pentru o previzualizare mai bună"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Deschide <xliff:g id="NAME">%s</xliff:g> pe ecran complet pentru o imagine mai bună"</string>
@@ -2437,21 +2426,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Cum funcționează"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"În așteptare..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Configurează din nou Deblocarea cu amprenta"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> nu mai poate fi recunoscută."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> și <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> nu mai pot fi recunoscute."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> nu mai poate fi recunoscută. Configurează din nou Deblocarea cu amprenta."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> și <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> nu mai pot fi recunoscute. Configurează din nou Deblocarea cu amprenta."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Reconfigurează Deblocarea facială"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Modelul tău facial nu mai poate fi recunoscut. Configurează din nou Deblocarea facială."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Configurează"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Nu acum"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Alarmă pentru <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Schimbă utilizatorul"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Dezactivează sunetul"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Atinge pentru a dezactiva sunetul"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml
index ac2e5638780f..96da7325ec5c 100644
--- a/core/res/res/values-ru/strings.xml
+++ b/core/res/res/values-ru/strings.xml
@@ -267,8 +267,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Отчет об ошибке"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Закончить сеанс"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Скриншот"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Отчет об ошибке"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Информация о текущем состоянии вашего устройства будет собрана и отправлена по электронной почте. Подготовка отчета займет некоторое время."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Интерактивный отчет"</string>
@@ -1415,10 +1413,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Нажмите, чтобы отключить отладку по Wi-Fi."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Тестовый режим включен"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Чтобы отключить тестовый режим, сбросьте настройки до заводских."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Неверная конфигурация сборки РКСП"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"Состояние режима консольного системного пользователя для этого устройства отличается от его конфигурации сборки. Сбросьте настройки устройства до заводских."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Консоль последовательного порта включена"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Производительность устройства снижена. Чтобы отключить консоль, перейдите в загрузчик операционной системы."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"Включена экспериментальная функция MTE"</string>
@@ -1763,18 +1759,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Использован жест с кнопками регулировки громкости. Функция \"<xliff:g id="SERVICE_NAME">%1$s</xliff:g>\" включена."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Использован жест с кнопками регулировки громкости. Функция \"<xliff:g id="SERVICE_NAME">%1$s</xliff:g>\" отключена."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Отпустите кнопки громкости. Чтобы включить <xliff:g id="SERVICE_NAME">%1$s</xliff:g>, нажмите и удерживайте обе кнопки регулировки громкости в течение трех секунд."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Выберите функцию"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Выберите функцию"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Выберите функцию"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"Функция теперь будет включаться при нажатии кнопки специальных возможностей."</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"Функция теперь будет включаться при выполнении действия быстрого запуска. Проведите двумя пальцами по экрану снизу вверх."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"Функция теперь будет включаться при выполнении действия быстрого запуска. Проведите тремя пальцами по экрану снизу вверх."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Увеличение"</string>
<string name="user_switched" msgid="7249833311585228097">"Выбран аккаунт пользователя <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"Смена профиля на \"<xliff:g id="NAME">%1$s</xliff:g>\"…"</string>
@@ -1897,8 +1887,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"PIN-код должен содержать не менее 4 символов."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Повторите попытку позже."</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Полноэкранный режим"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Чтобы выйти, проведите вниз от верхнего края экрана"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"ОК"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Поверните, чтобы лучше видеть."</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Откройте приложение \"<xliff:g id="NAME">%s</xliff:g>\" в полноэкранном режиме, чтобы лучше видеть."</string>
@@ -2438,21 +2427,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Узнать принцип работы"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Обработка…"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Настройте разблокировку по отпечатку пальца заново"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"Отпечаток \"<xliff:g id="FINGERPRINT">%s</xliff:g>\" больше нельзя распознать."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"Отпечатки \"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g>\" и \"<xliff:g id="FINGERPRINT_1">%2$s</xliff:g>\" больше нельзя распознать."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"Отпечаток \"<xliff:g id="FINGERPRINT">%s</xliff:g>\" больше нельзя распознать. Настройте разблокировку по отпечатку пальца снова."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"Отпечатки \"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g>\" и \"<xliff:g id="FINGERPRINT_1">%2$s</xliff:g>\" больше нельзя распознать. Настройте разблокировку по отпечатку пальца снова."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Настройте фейсконтроль заново"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Вашу модель лица больше нельзя распознать. Настройте фейсконтроль снова."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Настроить"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Не сейчас"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Будильник пользователя <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Сменить пользователя"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Отключить звук"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Нажмите, чтобы отключить звук."</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-si/strings.xml b/core/res/res/values-si/strings.xml
index fd8b536b03ce..6549a7ef8989 100644
--- a/core/res/res/values-si/strings.xml
+++ b/core/res/res/values-si/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"දෝෂ වර්තාව"</string>
<string name="global_action_logout" msgid="6093581310002476511">"සැසිය අවසන් කරන්න"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"තිර රුව"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"දෝෂ වර්තාව"</string>
<string name="bugreport_message" msgid="5212529146119624326">"ඊ-තැපැල් පණිවිඩයක් ලෙස යැවීමට මෙය ඔබගේ වත්මන් උපාංග තත්වය ගැන තොරතුරු එකතු කරනු ඇත. දෝෂ වාර්තාව ආරම්භ කර එය යැවීමට සූදානම් කරන තෙක් එයට කිසියම් කාලයක් ගතවනු ඇත; කරුණාකර ඉවසන්න."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"අන්තර්ක්‍රියා වාර්."</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"නොරැහැන් නිදොස්කරණය අබල කිරීමට තෝරන්න."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"පුරක පරීක්‍ෂා ප්‍රකාරය සබලයි"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"පුරක පරීක්‍ෂා ප්‍රකාරය අබල කිරීමට කර්මාන්තශාලා යළි සැකසීමක් ඉටු කරන්න."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"වැරදි HSUM තැනුම් වින්‍යාසය"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"මෙම උපාංගයෙහි හිස රහිත පද්ධති පරිශීලක ප්‍රකාරය තත්ත්වය එහි තැනුම් වින්‍යාසයෙන් වෙනස් වේ. උපාංගය කර්මාන්තශාලා යළි සකසන්න."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"අනුක්‍රමික කොන්සෝලය සබලයි"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"කාර්ය සාධනය බලපෑමට ලක් වී ඇත. අබල කිරීමට, ආරම්භකය පරීක්ෂා කරන්න."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"අත්හදා බැලීමේ MTE සබලයි"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"හඬ පරිමා යතුරු අල්ලා ගන්න <xliff:g id="SERVICE_NAME">%1$s</xliff:g> ක්‍රියාත්මකයි."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"හඬ පරිමා යතුරු අල්ලා ගන්න <xliff:g id="SERVICE_NAME">%1$s</xliff:g> ක්‍රියාවිරහිතයි."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"හඬ පරිමා යතුරු මුදා හරින්න. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> සක්‍රීය කිරීමට, හඬ පරිමා යතුරු දෙකම නැවත තත්පර 3ක් ඔබා අල්ලා සිටින්න."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"විශේෂාංගයක් තෝරා ගන්න"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"විශේෂාංගයක් තෝරා ගන්න"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"විශේෂාංගයක් තෝරා ගන්න"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"මීළඟ වතාවේ ඔබ ප්‍රවේශ්‍යතා බොත්තම තට්ටු කිරීමෙන් විශේෂාංගය විවෘත වේ"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"ඔබ මෙම කෙටිමඟ භාවිතා කරන මීළඟ වතාවේ විශේෂාංගය විවෘත වනු ඇත. ඔබේ තිරයෙහි පහළ සිට ඇඟිලි 2කින් ඉහළට ස්වයිප් කර ඉක්මනින් නිදහස් කරන්න."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"ඔබ මෙම කෙටිමඟ භාවිතා කරන මීළඟ වතාවේ විශේෂාංගය විවෘත වනු ඇත. ඔබේ තිරයෙහි පහළ සිට ඇඟිලි 3කින් ඉහළට ස්වයිප් කර ඉක්මනින් නිදහස් කරන්න."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"විශාලනය"</string>
<string name="user_switched" msgid="7249833311585228097">"දැනට සිටින පරිශීලකයා <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"<xliff:g id="NAME">%1$s</xliff:g> වෙත මාරු කරමින්…"</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"PIN කුඩා වැඩිය. ඉලක්කම් 4 වත් විය යුතුය."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"පසුව නැවත උත්සාහ කරන්න"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"මුළු තිරය බලමින්"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"පිටවීමට, ඔබේ තිරයෙහි ඉහළ සිට පහළට ස්වයිප් කරන්න"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"වැටහුණි"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"වඩා හොඳ දසුනක් සඳහා කරකවන්න"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"වඩා හොඳ දසුනක් සඳහා <xliff:g id="NAME">%s</xliff:g> පූර්ණ තිරයේ විවෘත කරන්න"</string>
@@ -2436,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"එය ක්‍රියා කරන ආකාරය"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"පොරොත්තුයි..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"ඇඟිලි සලකුණු අගුලු හැරීම නැවත සකසන්න"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> තවදුරටත් හඳුනා ගත නොහැක."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> සහ <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> තවදුරටත් හඳුනා ගත නොහැක."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> තවදුරටත් හඳුනා ගත නොහැක. ඇඟිලි සලකුණු අගුළු හැරීම නැවත පිහිටුවන්න."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> සහ <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> තවදුරටත් හඳුනා ගත නොහැක. ඇඟිලි සලකුණු අගුළු හැරීම නැවත පිහිටුවන්න."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"මුහුණෙන් අගුලු හැරීම නැවත සකසන්න"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"ඔබේ මුහුණු ආකෘතිය තවදුරටත් හඳුනා ගත නොහැක. මුහුණෙන් අගුළු හැරීම නැවත පිහිටුවන්න."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"සකසන්න"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"දැන් නොවේ"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"<xliff:g id="USER_NAME">%s</xliff:g> සඳහා එලාමය"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"පරිශීලක මාරු කරන්න"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"නිහඬ කරන්න"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"ශබ්දය නිශ්ශබ්ද කිරීමට තට්ටු කරන්න"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-sk/strings.xml b/core/res/res/values-sk/strings.xml
index c660fbd8ab2c..27500c4526d0 100644
--- a/core/res/res/values-sk/strings.xml
+++ b/core/res/res/values-sk/strings.xml
@@ -267,8 +267,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Hlásenie o chybách"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Ukončiť reláciu"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Snímka obrazovky"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Nahlásiť chybu"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Týmto zhromaždíte informácie o aktuálnom stave zariadenia. Informácie je potom možné odoslať e-mailom, chvíľu však potrvá, kým bude hlásenie chyby pripravené na odoslanie. Prosíme vás preto o trpezlivosť."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Interaktívne nahlásenie"</string>
@@ -1202,7 +1200,7 @@
<string name="low_internal_storage_view_text" msgid="8172166728369697835">"Niektoré systémové funkcie nemusia fungovať"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="7368968163411251788">"V úložisku nie je dostatok voľného miesta pre systém. Zaistite, aby ste mali 250 MB voľného miesta a zariadenie reštartujte."</string>
<string name="app_running_notification_title" msgid="8985999749231486569">"Aplikácia <xliff:g id="APP_NAME">%1$s</xliff:g> je spustená"</string>
- <string name="app_running_notification_text" msgid="5120815883400228566">"Klepnutím zobrazíte ďalšie informácie alebo zastavíte aplikáciu."</string>
+ <string name="app_running_notification_text" msgid="5120815883400228566">"Klepnutím zobrazíte ďalšie informácie alebo aplikáciu zastavíte."</string>
<string name="ok" msgid="2646370155170753815">"OK"</string>
<string name="cancel" msgid="6908697720451760115">"Zrušiť"</string>
<string name="yes" msgid="9069828999585032361">"OK"</string>
@@ -1415,10 +1413,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Výberom zakážete bezdrôtové ladenie."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Režim správcu testov je aktivovaný"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Ak chcete zakázať režim správcu testov, obnovte výrobné nastavenia."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Nesprávna konfigurácia kompilácie pre režim konzolového systémového používateľa"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"Stav režimu konzolového systémového používateľa pre toto zariadenie sa líši od jeho konfigurácie kompilácie. Obnovte výrobné nastavenia zariadenia."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Sériová konzola je povolená"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Ovplyvňuje výkon. Ak ju chcete zakázať, skontrolujte zavádzací program systému."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"Je zapnuté experimentálne rozšírenie MTE"</string>
@@ -1443,7 +1439,7 @@
<string name="fast_scroll_numeric_alphabet" msgid="2529539945421557329">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="alert_windows_notification_channel_group_name" msgid="6063891141815714246">"Zobrazenie cez iné aplikácie"</string>
<string name="alert_windows_notification_channel_name" msgid="3437528564303192620">"<xliff:g id="NAME">%s</xliff:g> sa zobrazuje cez iné aplikácie"</string>
- <string name="alert_windows_notification_title" msgid="6331662751095228536">"<xliff:g id="NAME">%s</xliff:g> sa zobrazuje cez iné aplikácie"</string>
+ <string name="alert_windows_notification_title" msgid="6331662751095228536">"Aplikácia <xliff:g id="NAME">%s</xliff:g> sa zobrazuje nad inými aplikáciami"</string>
<string name="alert_windows_notification_message" msgid="6538171456970725333">"Ak nechcete, aby aplikácia <xliff:g id="NAME">%s</xliff:g> používala túto funkciu, klepnutím otvorte nastavenia a vypnite ju."</string>
<string name="alert_windows_notification_turn_off_action" msgid="7805857234839123780">"Vypnúť"</string>
<string name="ext_media_checking_notification_title" msgid="8299199995416510094">"Kontroluje sa <xliff:g id="NAME">%s</xliff:g>…"</string>
@@ -1763,18 +1759,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Pridržali ste tlačidlá hlasitosti. Služba <xliff:g id="SERVICE_NAME">%1$s</xliff:g> je zapnutá."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Pridržali ste tlačidlá hlasitosti. Služba <xliff:g id="SERVICE_NAME">%1$s</xliff:g> je vypnutá."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Uvoľnite tlačidlá hlasitosti. Ak chcete zapnúť službu <xliff:g id="SERVICE_NAME">%1$s</xliff:g>, znova pridržte tri sekundy obe tlačidlá hlasitosti."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Vyberte funkciu"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Vyberte funkciu"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Vyberte funkciu"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"Táto funkcia sa otvorí, keď nabudúce klepnete na tlačidlo dostupnosti"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"Táto funkcia sa otvorí, keď nabudúce použijete túto skratku. Potiahnite zdola obrazovky dvoma prstami nahor a rýchlo uvoľnite."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"Táto funkcia sa otvorí, keď nabudúce použijete túto skratku. Potiahnite zdola obrazovky troma prstami nahor a rýchlo uvoľnite."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Zväčšenie"</string>
<string name="user_switched" msgid="7249833311585228097">"Aktuálny používateľ je <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"Prepína sa na účet <xliff:g id="NAME">%1$s</xliff:g>…"</string>
@@ -1897,8 +1887,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"Kód PIN je príliš krátky. Musí mať minimálne 4 číslice."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Skúste to neskôr"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Zobrazenie na celú obrazovku"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Ukončíte potiahnutím zhora obrazovky nadol"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"Dobre"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Otočte zariadenie pre lepšie zobrazenie"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Otvorte <xliff:g id="NAME">%s</xliff:g> na celej obrazovke pre lepšie zobrazenie"</string>
@@ -2438,21 +2427,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Ako to funguje"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Nespracovaná…"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Znova nastavte odomknutie odtlačkom prsta"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> sa už nedari rozpoznať."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> a <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> sa už nedari rozpoznať."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> sa už nedari rozpoznať. Znova nastavte odomknutie odtlačkom prsta."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> a <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> sa už nedari rozpoznať. Znova nastavte odomknutie odtlačkom prsta."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Znova nastavte odomknutie tvárou"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Váš model tváre sa už nedari rozpoznať. Znova nastavte odomknutie tvárou."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Nastaviť"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Teraz nie"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Budík pre používateľa <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Prepnúť používateľa"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Ignorovať"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Klepnutím vypnite zvuk"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-sl/strings.xml b/core/res/res/values-sl/strings.xml
index b5f9dc591ea0..08043ecbbbca 100644
--- a/core/res/res/values-sl/strings.xml
+++ b/core/res/res/values-sl/strings.xml
@@ -267,8 +267,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Poročilo o napakah"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Končaj sejo"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Posnetek"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Poročilo o napakah"</string>
<string name="bugreport_message" msgid="5212529146119624326">"S tem bodo zbrani podatki o trenutnem stanju naprave, ki bodo poslani v e-poštnem sporočilu. Izvedba poročila o napakah in priprava trajata nekaj časa, zato bodite potrpežljivi."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Interaktivno poročilo"</string>
@@ -1415,10 +1413,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Izberite, če želite onemogočiti brezžično odpravljanje napak."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Način preizkusnega ogrodja je omogočen"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Če želite onemogočiti način preizkusnega ogrodja, ponastavite napravo na tovarniške nastavitve."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Napačna konfiguracija gradnje za način sistemskega uporabnika brez grafičnega uporabniškega vmesnika"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"Stanje načina sistemskega uporabnika brez grafičnega uporabniškega vmesnika za to napravo se razlikuje od njene konfiguracije gradnje. Napravo ponastavite na tovarniške nastavitve."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Serijska konzola je omogočena"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Učinkovitost delovanja je slabša. Uporabo konzole lahko onemogočite v zagonskem nalagalniku."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"Preizkusne razširitve MTE so omogočene"</string>
@@ -1763,18 +1759,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Tipki za glasnost sta pridržani. Storitev <xliff:g id="SERVICE_NAME">%1$s</xliff:g> je vklopljena."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Tipki za glasnost sta pridržani. Storitev <xliff:g id="SERVICE_NAME">%1$s</xliff:g> je izklopljena."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Spustite gumba za glasnost. Če želite vklopiti storitev <xliff:g id="SERVICE_NAME">%1$s</xliff:g>, znova pritisnite in 3 sekunde pridržite oba gumba za glasnost."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Izberite funkcijo"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Izberite funkcijo"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Izberite funkcijo"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"Funkcija se bo odprla, ko se boste naslednjič dotaknili gumba za dostopnost"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"Funkcija se bo odprla, ko boste naslednjič uporabili to bližnjico. Z dvema prstoma povlecite navzgor z dna zaslona in hitro spustite."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"Funkcija se bo odprla, ko boste naslednjič uporabili to bližnjico. S tremi prsti povlecite navzgor z dna zaslona in hitro spustite."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Povečava"</string>
<string name="user_switched" msgid="7249833311585228097">"Trenutni uporabnik <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"Preklapljanje na uporabnika <xliff:g id="NAME">%1$s</xliff:g> …"</string>
@@ -1897,8 +1887,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"PIN je prekratek. Imeti mora vsaj 4 števke."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Poskusite znova pozneje"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Vklopljen je celozaslonski način"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Če želite zapreti, povlecite navzdol z vrha zaslona"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"Razumem"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Zasukajte za boljši pregled."</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Aplikacijo <xliff:g id="NAME">%s</xliff:g> odprite v celozaslonskem načinu za boljši pregled."</string>
@@ -2438,21 +2427,25 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Kako deluje"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"V teku …"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Vnovična nastavitev odklepanja s prstnim odtisom"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"Odtisa »<xliff:g id="FINGERPRINT">%s</xliff:g>« ni več mogoče prepoznati."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"Odtisov »<xliff:g id="FINGERPRINT_0">%1$s</xliff:g>« in »<xliff:g id="FINGERPRINT_1">%2$s</xliff:g>« ni več mogoče prepoznati."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"Odtisa »<xliff:g id="FINGERPRINT">%s</xliff:g>« ni več mogoče prepoznati. Znova nastavite odklepanje s prstnim odtisom."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"Odtisov »<xliff:g id="FINGERPRINT_0">%1$s</xliff:g>« in »<xliff:g id="FINGERPRINT_1">%2$s</xliff:g>« ni več mogoče prepoznati. Znova nastavite odklepanje s prstnim odtisom."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Vnovična nastavitev odklepanja z obrazom"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Vašega modela obraza ni več mogoče prepoznati. Znova nastavite odklepanje z obrazom."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Nastavi"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Ne zdaj"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Alarm za uporabnika <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Preklop uporabnika"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Izklop zvoka"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Dotaknite se za izklop zvoka"</string>
+ <string name="keyboard_shortcut_group_applications_browser" msgid="6535007304687100909">"Brskalnik"</string>
+ <string name="keyboard_shortcut_group_applications_contacts" msgid="2750702518068326356">"Stiki"</string>
+ <string name="keyboard_shortcut_group_applications_email" msgid="4229037666415353683">"E-pošta"</string>
+ <string name="keyboard_shortcut_group_applications_sms" msgid="3523799286376321137">"SMS"</string>
+ <string name="keyboard_shortcut_group_applications_music" msgid="2051507523525651067">"Glasba"</string>
+ <string name="keyboard_shortcut_group_applications_calendar" msgid="3571770335653387606">"Koledar"</string>
+ <string name="keyboard_shortcut_group_applications_calculator" msgid="6753209559716091507">"Računalo"</string>
+ <string name="keyboard_shortcut_group_applications_maps" msgid="7950000659522589471">"Zemljevidi"</string>
+ <string name="keyboard_shortcut_group_applications" msgid="3010389163951364798">"Aplikacije"</string>
</resources>
diff --git a/core/res/res/values-sq/strings.xml b/core/res/res/values-sq/strings.xml
index 35dd218c1d51..9adae6714fbc 100644
--- a/core/res/res/values-sq/strings.xml
+++ b/core/res/res/values-sq/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Raport i defektit në kod"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Jepi fund sesionit"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Pamja e ekranit"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Raporti i defekteve në kod"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Ky funksion mundëson mbledhjen e informacioneve mbi gjendjen aktuale të pajisjes për ta dërguar si mesazh mail-i. Do të duhet pak kohë nga nisja e raportit të defekteve në kod. Faleminderit për durimin."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Raport interaktiv"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Zgjidh për të çaktivizuar korrigjimin përmes Wi-Fi."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Modaliteti i lidhjes së testimit është aktivizuar"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Kryej një rivendosje në cilësimet e fabrikës për të çaktivizuar \"Modalitetin e lidhjes së testimit\"."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Konfigurim i gabuar i ndërtimit të modalitetit HSUM"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"Gjendja e \"Modalitetit të përdoruesit për sistemin pa kokë\" për këtë pajisje ndryshon nga konfigurimi i ndërtimit. Rivendose pajisjen në gjendje fabrike."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Paneli komandues i serisë është aktivizuar"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Ndikohet cilësia e funksionimit. Për ta çaktivizuar, kontrollo ngarkuesin e sistemit."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"MTE eksperimentale u aktivizua"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Tastet e volumit të mbajtura shtypur. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> i aktivizuar."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Tastet e volumit të mbajtura shtypur. U çaktivizua \"<xliff:g id="SERVICE_NAME">%1$s</xliff:g>\"."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Lësho tastet e volumit. Për të aktivizuar <xliff:g id="SERVICE_NAME">%1$s</xliff:g>, shtyp dhe mbaj shtypur të dy tastet e volumit sërish për 3 sekonda."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Zgjidh një veçori"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Zgjidh një veçori"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Zgjidh një veçori"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"Veçoria do të hapet herën tjetër kur të trokasësh te butoni i qasshmërisë"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"Veçoria do të hapet herën tjetër kur të përdorësh këtë shkurtore. Rrëshqit shpejt lart me 2 gishta nga fundi i ekranit dhe lëshoje me shpejtësi."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"Veçoria do të hapet herën tjetër kur të përdorësh këtë shkurtore. Rrëshqit shpejt lart me 3 gishta nga fundi i ekranit dhe lëshoje me shpejtësi."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Zmadhimi"</string>
<string name="user_switched" msgid="7249833311585228097">"Emri i përdoruesit aktual: <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="user_switching_message" msgid="1912993630661332336">"Po kalon në \"<xliff:g id="NAME">%1$s</xliff:g>\"…"</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"PIN-i është shumë i shkurtër. Duhet të jetë të paktën 4 shifra."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Provo sërish më vonë"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Po shikon ekranin e plotë"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Për të dalë, rrëshqit shpejt poshtë nga kreu i ekranit"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"E kuptova"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Rrotullo për një pamje më të mirë"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Hape <xliff:g id="NAME">%s</xliff:g> në ekran të plotë për pamje më të mirë"</string>
@@ -2436,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Si funksionon"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Në pritje..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Konfiguro përsëri \"Shkyçjen me gjurmën e gishtit\""</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> nuk mund të njihet më."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> dhe <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> nuk mund të njihen më."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> nuk mund të njihet më. Konfiguro përsëri \"Shkyçjen me gjurmën e gishtit\"."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> dhe <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> nuk mund të njihen më. Konfiguro përsëri \"Shkyçjen me gjurmën e gishtit\"."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Konfiguro \"Shkyçjen me fytyrë\" përsëri"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Modeli yt i fytyrës nuk mund të njihet më. Konfiguro \"Shkyçjen me fytyrë\" përsëri."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Konfiguro"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Jo tani"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Alarmi për <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Ndërro përdoruesin"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Hiqi zërin"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Trokit për t\'i hequr zërin"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-sr/strings.xml b/core/res/res/values-sr/strings.xml
index a979047f6458..6cea89f898d2 100644
--- a/core/res/res/values-sr/strings.xml
+++ b/core/res/res/values-sr/strings.xml
@@ -266,8 +266,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Јави грешку"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Заврши сесију"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Снимак екрана"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Јави грешку"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Овим ће се прикупити информације о тренутном стању уређаја како би биле послате у поруци е-поште. Од започињања извештаја о грешци до тренутка за његово слање проћи ће неко време; будите стрпљиви."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Интерактив. извештај"</string>
@@ -1414,10 +1412,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Изаберите да бисте онемогућили бежично отклањање грешака."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Омогућен је режим пробног коришћења"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Обавите ресетовање на фабричка подешавања да бисте онемогућили режим пробног коришћења."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Погрешна HSUM конфигурација"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"Статус корисничког режима система без графичког корисничког интерфејса за овај уређај разликује се од његове конфигурације. Ресетујте уређај на фабричка подешавања."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Серијска конзола је омогућена"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Перформансе су смањене. Да бисте онемогући конзолу, проверите покретачки програм."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"Експериментални MTE је омогућен"</string>
@@ -1762,18 +1758,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Држали сте тастере за јачину звука. Услуга <xliff:g id="SERVICE_NAME">%1$s</xliff:g> је укључена."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Држали сте тастере за јачину звука. Услуга <xliff:g id="SERVICE_NAME">%1$s</xliff:g> је искључена."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Пустите тастере за јачину звука. Да бисте укључили <xliff:g id="SERVICE_NAME">%1$s</xliff:g>, поново притисните и задржите оба тастера за јачину звука 3 секунде."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Изаберите функцију"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Изаберите функцију"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Изаберите функцију"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"Функција ће се отворити када следећи пут додирнете дугме Приступачност"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"Функција ће се отворити када следећи пут будете користили ову пречицу. Превуците нагоре од дна екрана са 2 прста и брзо пустите."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"Функција ће се отворити када следећи пут будете користили ову пречицу. Превуците нагоре од дна екрана са 3 прста и брзо пустите."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Увећање"</string>
<string name="user_switched" msgid="7249833311585228097">"Актуелни корисник <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"Пребацивање на <xliff:g id="NAME">%1$s</xliff:g>…"</string>
@@ -1896,8 +1886,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"PIN је прекратак. Мора да има бар 4 цифре."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Пробајте поново касније"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Приказује се цео екран"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Да бисте затворили, превуците надоле од врха екрана"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"Важи"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Ротирајте ради бољег приказа"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Отворите апликацију <xliff:g id="NAME">%s</xliff:g> преко целог екрана да бисте боље видели"</string>
@@ -2437,21 +2426,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Принцип рада"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"На чекању..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Поново подесите откључавање отиском прста"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> више не може да се препозна."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> и <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> више не могу да се препознају."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> више не може да се препозна. Поново подесите откључавање отиском прста."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> и <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> више не могу да се препознају. Поново подесите откључавање отиском прста."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Поново подесите откључавање лицем"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Ваш модел лица више не може да се препозна. Поново подесите откључавање лицем."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Подеси"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Не сада"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Аларм за: <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Промени корисника"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Искључи звук"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Додирните да бисте искључили звук"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-sv/strings.xml b/core/res/res/values-sv/strings.xml
index eac67f57baab..53f1408b6115 100644
--- a/core/res/res/values-sv/strings.xml
+++ b/core/res/res/values-sv/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Felrapport"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Avsluta session"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Skärmbild"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Felrapport"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Nu hämtas information om aktuell status för enheten, som sedan skickas i ett e-postmeddelade. Det tar en liten stund innan felrapporten är färdig och kan skickas, så vi ber dig ha tålamod."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Interaktiv rapport"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Välj för att inaktivera trådlös felsökning."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Läget för testverktyg har aktiverats"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Inaktivera testverktygsläget genom att göra en återställning till standardinställningarna."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Fel HSUM-byggkonfigurering"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"Statusen för läget fönsterlös systemanvändare för den här enheten skiljer sig från dess byggkonfigurering. Återställ standardinställningarna på enheten."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Seriekonsolen är aktiverad"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Prestandan påverkas. Inaktivera via starthanteraren."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"Experimentell MTE har aktiverats"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Volymknapparna har tryckts ned. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> har aktiverats."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Volymknapparna har tryckts ned. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> har inaktiverats."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Släpp volymknapparna. Du kan aktivera <xliff:g id="SERVICE_NAME">%1$s</xliff:g> genom att hålla båda volymknapparna nedtryckta i tre sekunder igen."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Välj en funktion"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Välj en funktion"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Välj en funktion"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"Funktionen öppnas nästa gång du trycker på tillgänglighetsknappen"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"Funktionen öppnas nästa gång du använder kortkommandot. Svep uppåt med två fingrar från skärmens nederkant och släpp snabbt."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"Funktionen öppnas nästa gång du använder kortkommandot. Svep uppåt med tre fingrar från skärmens nederkant och släpp snabbt."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Förstoring"</string>
<string name="user_switched" msgid="7249833311585228097">"Nuvarande användare: <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"Byter till <xliff:g id="NAME">%1$s</xliff:g> …"</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"Pinkoden är för kort. Måste vara minst fyra siffror."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Försök igen senare"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Visar på fullskärm"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Svep nedåt från skärmens överkant för att avsluta"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"OK"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Rotera för att få en bättre vy"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Öppna <xliff:g id="NAME">%s</xliff:g> i fullskärmsläget för att få en bättre vy"</string>
@@ -2436,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Så fungerar det"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Väntar …"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Konfigurera fingeravtryckslås igen"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"Det går inte längre att känna igen <xliff:g id="FINGERPRINT">%s</xliff:g>."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"Det går inte längre att känna igen <xliff:g id="FINGERPRINT_0">%1$s</xliff:g> och <xliff:g id="FINGERPRINT_1">%2$s</xliff:g>."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"Det går inte längre att känna igen <xliff:g id="FINGERPRINT">%s</xliff:g>. Konfigurera fingeravtryckslås igen."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"Det går inte längre att känna igen <xliff:g id="FINGERPRINT_0">%1$s</xliff:g> och <xliff:g id="FINGERPRINT_1">%2$s</xliff:g>. Konfigurera fingeravtryckslås igen."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Konfigurera ansiktslås igen"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Det går inte längre att känna igen din ansiktsmodell. Konfigurera ansiktslåset på nytt."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Ställ in"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Inte nu"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Alarm för <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Byt användare"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Ljud av"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Tryck för att stänga av ljudet"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-sw/strings.xml b/core/res/res/values-sw/strings.xml
index 409603c7967d..c096d4b74135 100644
--- a/core/res/res/values-sw/strings.xml
+++ b/core/res/res/values-sw/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Ripoti ya hitilafu"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Maliza kipindi"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Picha ya skrini"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Ripoti ya hitilafu"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Hii itakusanya maelezo kuhusu hali ya kifaa chako kwa sasa, na itume kama barua pepe. Itachukua muda mfupi tangu ripoti ya hitilafu ianze kuzalishwa hadi iwe tayari kutumwa; vumilia."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Ripoti ya kushirikiana"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Chagua ili uzime utatuzi usiotumia waya."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Hali ya Muunganisho wa Majaribio imewashwa"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Rejesha mipangilio iliyotoka nayo kiwandani ili uzime hali ya Muunganisho wa Majaribio."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Mipangilio ya muundo wa HSUM si sahihi"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"Hali ya Mtumiaji wa Mfumo usio na Skrini, Kiolesura au Vifaa Vinavyochomekwa katika kifaa hiki inatofautiana na mipangilio ya muundo wa kifaa. Tafadhali rejesha mipangilio ambayo kifaa kilitoka nayo kiwandani."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Muunganisho kupitia mlango umewashwa"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Utendaji unaathirika. lli uzime, teua programu ya kuwasha mfumo wa uendeshaji."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"Kipengele cha majaribio cha MTE kimeruhusiwa"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Vitufe vya sauti vilivyoshikiliwa. Umewasha <xliff:g id="SERVICE_NAME">%1$s</xliff:g>."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Vitufe vya sauti vimeshikiliwa. Umezima <xliff:g id="SERVICE_NAME">%1$s</xliff:g>."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Achilia vitufe vya sauti. Ili uwashe <xliff:g id="SERVICE_NAME">%1$s</xliff:g>, bonyeza na ushikilie tena vitufe vyote vya sauti kwa sekunde 3."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Chagua kipengele"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Chagua kipengele"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Chagua kipengele"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"Kipengele kitafunguka utakapogusa tena kitufe cha zana za ufikivu"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"Kipengele kitafunguka utakapotumia tena njia hii ya mkato. Telezesha vidole 2 kuanzia sehemu ya chini ya skrini yako kwenda juu kisha uachilie haraka."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"Kipengele kitafunguka utakapotumia tena njia hii ya mkato. Telezesha vidole 3 kuanzia sehemu ya chini ya skrini yako kwenda juu kisha uachilie haraka."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Ukuzaji"</string>
<string name="user_switched" msgid="7249833311585228097">"Mtumiaji wa sasa <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"Inaenda kwa <xliff:g id="NAME">%1$s</xliff:g>…"</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"PIN ni fupi mno. Lazima iwe angalau tarakimu 4."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Jaribu tena baadaye"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Unatazama skrini nzima"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Telezesha kidole chini kutoka sehemu ya juu ya skrini yako ili ufunge"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"Nimeelewa"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Zungusha ili upate mwonekano bora"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Fungua <xliff:g id="NAME">%s</xliff:g> kwenye skrini nzima ili uone maudhui kwa urahisi"</string>
@@ -2436,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Utaratibu wake"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Inashughulikiwa..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Weka tena mipangilio ya Kufungua kwa Alama ya Kidole"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> haitambuliki tena."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> na <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> havitambuliki tena."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> haitambuliki tena. Weka tena mipangilio ya Kufungua kwa Alama ya Kidole."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> na <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> havitambuliki tena. Weka tena mipangilio ya Kufungua kwa Alama ya Kidole."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Weka tena mipangilio ya Kufungua kwa Uso"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Muundo wa uso wako hautambuliki tena. Weka tena mipangilio ya Kufungua kwa Uso."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Weka mipangilio"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Si sasa"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"King\'ora cha <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Badilisha mtumiaji"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Zima sauti"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Gusa ili uzime sauti"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-ta/strings.xml b/core/res/res/values-ta/strings.xml
index f76b2fceda1b..429862b65a82 100644
--- a/core/res/res/values-ta/strings.xml
+++ b/core/res/res/values-ta/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"பிழை அறிக்கை"</string>
<string name="global_action_logout" msgid="6093581310002476511">"அமர்வை முடிக்கிறது"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"ஸ்கிரீன்ஷாட்"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"பிழை அறிக்கை"</string>
<string name="bugreport_message" msgid="5212529146119624326">"உங்கள் நடப்புச் சாதன நிலையை மின்னஞ்சல் செய்தியாக அனுப்ப, அது குறித்த தகவலை இது சேகரிக்கும். பிழை அறிக்கையைத் தொடங்குவதில் இருந்து, அது அனுப்புவதற்குத் தயாராகும் வரை, இதற்குச் சிறிது நேரம் ஆகும்; பொறுமையாகக் காத்திருக்கவும்."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"ஊடாடத்தக்க அறிக்கை"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"வைஃபை பிழைதிருத்தத்தை முடக்க தேர்ந்தெடுக்கவும்."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"\'தன்னியக்க சோதனைப்\' பயன்முறை இயக்கப்பட்டது"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"’தன்னியக்க சோதனைப்\' பயன்முறையை முடக்க ஆரம்பநிலைக்கு மீட்டமைக்கவும்."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"தவறான HSUM பதிப்பு உள்ளமைப்பு"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"இந்தச் சாதனத்தின் காட்சி இடைமுகமற்ற சிஸ்டம் பயனர் பயன்முறையின் நிலை அதன் பதிப்பு உள்ளமைப்பிலிருந்து வேறுபடுகிறது. சாதனத்தை ஆரம்பநிலைக்கு மீட்டமையுங்கள்."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"சீரியல் கன்சோல் இயக்கப்பட்டது"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"செயல்திறன் பாதிக்கப்பட்டுள்ளது. முடக்குவதற்கு பூட்லோடரைத் தேர்வுசெய்யவும்."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"பரிசோதனை MTE இயக்கப்பட்டது"</string>
@@ -1529,7 +1525,7 @@
<string name="forward_intent_to_work" msgid="3620262405636021151">"பணிக் கணக்கில் பயன்பாட்டைப் பயன்படுத்துகிறீர்கள்"</string>
<string name="input_method_binding_label" msgid="1166731601721983656">"உள்ளீட்டு முறை"</string>
<string name="sync_binding_label" msgid="469249309424662147">"ஒத்திசை"</string>
- <string name="accessibility_binding_label" msgid="1974602776545801715">"அணுகல்தன்மை"</string>
+ <string name="accessibility_binding_label" msgid="1974602776545801715">"மாற்றுத்திறன் வசதி"</string>
<string name="wallpaper_binding_label" msgid="1197440498000786738">"வால்பேப்பர்"</string>
<string name="chooser_wallpaper" msgid="3082405680079923708">"வால்பேப்பரை மாற்று"</string>
<string name="notification_listener_binding_label" msgid="2702165274471499713">"அறிவிப்புகளைக் கண்காணிக்கும் சேவை"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"ஒலியளவுக்கான விசைகளைப் பிடித்திருந்தீர்கள். <xliff:g id="SERVICE_NAME">%1$s</xliff:g> ஆன் செய்யப்பட்டது."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"ஒலியளவுக்கான விசைகளைப் பிடித்திருந்தீர்கள். <xliff:g id="SERVICE_NAME">%1$s</xliff:g> ஆஃப் செய்யப்பட்டது."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"ஒலியளவு பட்டன்களை அழுத்துவதை நிறுத்துங்கள். <xliff:g id="SERVICE_NAME">%1$s</xliff:g> சேவையை இயக்க, ஒலியளவு பட்டன்கள் இரண்டையும் 3 வினாடிகளுக்கு மீண்டும் அழுத்திப் பிடிக்கவும்."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"அம்சத்தைத் தேர்வுசெய்யுங்கள்"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"அம்சத்தைத் தேர்வுசெய்யுங்கள்"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"அம்சத்தைத் தேர்வுசெய்யுங்கள்"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"அடுத்த முறை மாற்றுத்திறன் பட்டனை நீங்கள் தட்டும்போது அம்சம் திறக்கும்"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"அடுத்த முறை இந்த ஷார்ட்கட்டை நீங்கள் பயன்படுத்தும்போது அம்சம் திறக்கும். 2 விரல்களால் திரையின் கீழிருந்து மேல்நோக்கி ஸ்வைப் செய்து விரைவாக விரல்களை எடுக்கவும்."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"அடுத்த முறை இந்த ஷார்ட்கட்டை நீங்கள் பயன்படுத்தும்போது அம்சம் திறக்கும். 3 விரல்களால் திரையின் கீழிருந்து மேல்நோக்கி ஸ்வைப் செய்து விரைவாக விரல்களை எடுக்கவும்."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"பெரிதாக்கல்"</string>
<string name="user_switched" msgid="7249833311585228097">"நடப்பு பயனர் <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"<xliff:g id="NAME">%1$s</xliff:g>க்கு மாறுகிறது…"</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"பின் மிகவும் சிறியதாக உள்ளது. குறைந்தது 4 இலக்கங்கள் இருக்க வேண்டும்."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"மீண்டும் முயற்சிக்கவும்"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"முழுத் திரையில் காட்டுகிறது"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"வெளியேற, உங்கள் திரையின் மேலிருந்து கீழ்நோக்கி ஸ்வைப் செய்யவும்"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"புரிந்தது"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"சிறந்த காட்சிக்கு சுழற்றுங்கள்"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"சிறந்த காட்சிக்கு, <xliff:g id="NAME">%s</xliff:g> ஆப்ஸை முழுத்திரைப் பயன்முறையில் திறக்கவும்"</string>
@@ -2070,7 +2059,7 @@
<string name="app_category_news" msgid="1172762719574964544">"செய்திகளும் பத்திரிகைகளும்"</string>
<string name="app_category_maps" msgid="6395725487922533156">"வரைபடங்களும் வழிசெலுத்தலும்"</string>
<string name="app_category_productivity" msgid="1844422703029557883">"உற்பத்தித்திறன்"</string>
- <string name="app_category_accessibility" msgid="6643521607848547683">"அணுகல்தன்மை"</string>
+ <string name="app_category_accessibility" msgid="6643521607848547683">"மாற்றுத்திறன் வசதி"</string>
<string name="device_storage_monitor_notification_channel" msgid="5164244565844470758">"சாதனச் சேமிப்பகம்"</string>
<string name="adb_debugging_notification_channel_tv" msgid="4764046459631031496">"USB பிழைதிருத்தம்"</string>
<string name="time_picker_hour_label" msgid="4208590187662336864">"மணி"</string>
@@ -2436,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"இது செயல்படும் விதம்"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"நிலுவையிலுள்ளது..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"கைரேகை அன்லாக் அம்சத்தை மீண்டும் அமையுங்கள்"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g>ஐ இனி அடையாளம் காண முடியாது."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g>, <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> ஆகியவற்றை இனி அடையாளம் காண முடியாது."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g>ஐ இனி அடையாளம் காண முடியாது. கைரேகை அன்லாக் அம்சத்தை மீண்டும் அமையுங்கள்."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g>, <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> ஆகியவற்றை இனி அடையாளம் காண முடியாது. கைரேகை அன்லாக் அம்சத்தை மீண்டும் அமையுங்கள்."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"\'முகம் காட்டித் திறத்தல்\' அம்சத்தை மீண்டும் அமையுங்கள்"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"உங்கள் முகத் தோற்றப் பதிவை இனி அடையாளம் காண முடியாது. முகம் காட்டித் திறத்தல் அம்சத்தை மீண்டும் அமையுங்கள்."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"அமை"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"இப்போது வேண்டாம்"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"<xliff:g id="USER_NAME">%s</xliff:g>க்கான அலாரம்"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"பயனரை மாற்றுங்கள்"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"ஒலியடக்கு"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"ஒலியடக்க தட்டவும்"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-te/strings.xml b/core/res/res/values-te/strings.xml
index 63c6cfe51a6f..830c4f64e37f 100644
--- a/core/res/res/values-te/strings.xml
+++ b/core/res/res/values-te/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"బగ్ రిపోర్ట్‌"</string>
<string name="global_action_logout" msgid="6093581310002476511">"సెషన్‌ను ముగించు"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"స్క్రీన్‌షాట్"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"బగ్ రిపోర్ట్‌"</string>
<string name="bugreport_message" msgid="5212529146119624326">"ఇది ఈమెయిల్‌ మెసేజ్‌ రూపంలో పంపడానికి మీ ప్రస్తుత పరికర స్థితి గురించి సమాచారాన్ని సేకరిస్తుంది. బగ్ రిపోర్ట్‌ను ప్రారంభించడం మొదలుకొని పంపడానికి సిద్ధం చేసే వరకు ఇందుకు కొంత సమయం పడుతుంది; దయచేసి ఓపిక పట్టండి."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"ప్రభావశీల రిపోర్ట్‌"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"వైర్‌లెస్ డీబగ్గింగ్‌ను డిజేబుల్ చేయడానికి ఎంచుకోండి."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"పరీక్ష నియంత్రణ మోడ్ ప్రారంభించబడింది"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"పరీక్ష నియంత్రణ మోడ్‌ను నిలిపివేయడానికి ఫ్యాక్టరీ రీసెట్‍‌ను అమలు చేయండి."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"తప్పు HSUM బిల్డ్ కాన్ఫిగరేషన్"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"ఈ పరికరానికి సంబంధించిన హెడ్‌లెస్ సిస్టమ్ యూజర్ మోడ్ స్టేట్, దాని బిల్డ్ కాన్ఫిగరేషన్ కంటే భిన్నంగా ఉంటుంది. దయచేసి పరికరాన్ని ఫ్యాక్టరీ రీసెట్ చేయండి."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"సీరియల్ కన్సోల్ ప్రారంభించబడింది"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"పని తీరు ప్రభావితమైంది. నిలిపివేయడానికి, బూట్‌లోడర్‌ను చెక్ చేయండి."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"ప్రయోగాత్మక MTE ఎనేబుల్ చేయబడింది"</string>
@@ -1761,12 +1757,9 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"వాల్యూమ్ కీలు నొక్కి ఉంచబడ్డాయి. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> ఆన్ చేయబడింది"</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"వాల్యూమ్ కీలు నొక్కి ఉంచబడ్డాయి. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> ఆఫ్ చేయబడింది"</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"వాల్యూమ్ కీలను రిలీజ్ చేయండి. <xliff:g id="SERVICE_NAME">%1$s</xliff:g>‌ను ఆన్ చేయడానికి, రెండు వాల్యూమ్ కీలను మళ్లీ 3 సెకన్ల పాటు నొక్కి పట్టుకోండి."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"ఒక ఫీచర్‌ను ఎంచుకోండి"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"ఒక ఫీచర్‌ను ఎంచుకోండి"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"ఒక ఫీచర్‌ను ఎంచుకోండి"</string>
<string name="accessibility_button_instructional_text" msgid="6831154884557881996">"తర్వాతిసారి మీరు యాక్సెసిబిలిటీ బటన్‌ను ట్యాప్ చేసినప్పుడు ఈ ఫీచర్ తెరుచుకుంటుంది"</string>
<string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"తర్వాతిసారి మీరు ఈ షార్ట్‌కట్‌ను ఉపయోగించినప్పుడు ఈ ఫీచర్ తెరుచుకుంటుంది. మీ స్క్రీన్ దిగువ నుండి 2 వేళ్లతో పైకి స్వైప్ చేసి, వెంటనే వదలండి."</string>
<string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"తర్వాతిసారి మీరు ఈ షార్ట్‌కట్‌ను ఉపయోగించినప్పుడు ఈ ఫీచర్ తెరుచుకుంటుంది. మీ స్క్రీన్ దిగువ నుండి 3 వేళ్లతో పైకి స్వైప్ చేసి, వెంటనే వదలండి."</string>
@@ -1892,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"పిన్‌ చాలా చిన్నదిగా ఉంది. తప్పనిసరిగా కనీసం 4 అంకెలు ఉండాలి."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"తర్వాత మళ్లీ ట్రై చేయండి"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"ఫుల్-స్క్రీన్‌లో వీక్షిస్తున్నారు"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"ఎగ్జిట్ అవ్వడానికి, మీ స్క్రీన్ పై నుండి కిందికి స్వైప్ చేయండి"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"అర్థమైంది"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"మెరుగైన వీక్షణ కోసం తిప్పండి"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"మెరుగైన వీక్షణ కోసం <xliff:g id="NAME">%s</xliff:g>‌ను ఫుల్ స్క్రీన్‌లో తెరవండి"</string>
@@ -2433,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"ఇది ఎలా పని చేస్తుంది"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"పెండింగ్‌లో ఉంది..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"వేలిముద్ర అన్‌లాక్‌ను మళ్లీ సెటప్ చేయండి"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g>‌ను ఇకపై గుర్తించడం సాధ్యం కాదు."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g>, <xliff:g id="FINGERPRINT_1">%2$s</xliff:g>‌లను ఇకపై గుర్తించడం సాధ్యం కాదు."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g>‌ను ఇకపై గుర్తించడం సాధ్యం కాదు. వేలిముద్ర అన్‌లాక్‌ను మళ్లీ సెటప్ చేయండి."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g>, <xliff:g id="FINGERPRINT_1">%2$s</xliff:g>‌లను ఇకపై గుర్తించడం సాధ్యం కాదు. వేలిముద్ర అన్‌లాక్‌ను మళ్లీ సెటప్ చేయండి."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"ఫేస్ అన్‌లాక్‌ను మళ్లీ సెటప్ చేయండి"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"మీ ఫేస్ మోడల్‌ను ఇకపై గుర్తించడం సాధ్యం కాదు. ఫేస్ అన్‌లాక్‌ను మళ్లీ సెటప్ చేయండి."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"సెటప్ చేయండి"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"ఇప్పుడు కాదు"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"<xliff:g id="USER_NAME">%s</xliff:g> కోసం అలారం"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"యూజర్‌ను మార్చండి"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"మ్యూట్ చేయండి"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"సౌండ్‌ను మ్యూట్ చేయడానికి ట్యాప్ చేయండి"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-th/strings.xml b/core/res/res/values-th/strings.xml
index 9d244eeeacfb..b4f39791fb0d 100644
--- a/core/res/res/values-th/strings.xml
+++ b/core/res/res/values-th/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"รายงานข้อบกพร่อง"</string>
<string name="global_action_logout" msgid="6093581310002476511">"จบเซสชัน"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"ภาพหน้าจอ"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"รายงานข้อบกพร่อง"</string>
<string name="bugreport_message" msgid="5212529146119624326">"การดำเนินการนี้จะรวบรวมข้อมูลเกี่ยวกับสถานะปัจจุบันของอุปกรณ์ของคุณ โดยจะส่งไปในรูปแบบข้อความอีเมล อาจใช้เวลาสักครู่ตั้งแต่เริ่มการสร้างรายงานข้อบกพร่องจนกระทั่งเสร็จสมบูรณ์ โปรดอดทนรอ"</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"รายงานแบบอินเทอร์แอกทีฟ"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"เลือกเพื่อปิดใช้การแก้ไขข้อบกพร่องผ่าน Wi-Fi"</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"โหมดโปรแกรมทดสอบอัตโนมัติเปิดใช้อยู่"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"รีเซ็ตเป็นค่าเริ่มต้นเพื่อปิดใช้โหมดโปรแกรมทดสอบอัตโนมัติ"</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"การกำหนดค่าบิลด์ HSUM ไม่ถูกต้อง"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"สถานะโหมดผู้ใช้ระบบแบบไม่มีส่วนหัวของอุปกรณ์นี้แตกต่างจากการกำหนดค่าบิลด์ โปรดรีเซ็ตอุปกรณ์เป็นค่าเริ่มต้น"</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"เปิดใช้คอนโซลการเรียงอันดับแล้ว"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"ประสิทธิภาพได้รับผลกระทบ ตรวจสอบ Bootloader เพื่อปิดใช้งาน"</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"เปิดใช้ MTE เชิงทดสอบอยู่"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"กดปุ่มปรับระดับเสียงค้างไว้แล้ว เปิด <xliff:g id="SERVICE_NAME">%1$s</xliff:g> แล้ว"</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"กดปุ่มปรับระดับเสียงค้างไว้แล้ว ปิด <xliff:g id="SERVICE_NAME">%1$s</xliff:g> แล้ว"</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"ปล่อยปุ่มปรับระดับเสียง หากต้องการเปิด <xliff:g id="SERVICE_NAME">%1$s</xliff:g> ให้กดปุ่มปรับระดับเสียงทั้ง 2 ปุ่มค้างไว้อีกครั้งเป็นเวลา 3 วินาที"</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"เลือกฟีเจอร์"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"เลือกฟีเจอร์"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"เลือกฟีเจอร์"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"ฟีเจอร์นี้จะเปิดขึ้นในครั้งถัดไปที่คุณแตะปุ่มการช่วยเหลือพิเศษ"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"ฟีเจอร์นี้จะเปิดขึ้นในครั้งถัดไปที่คุณใช้ทางลัดนี้ ใช้ 2 นิ้วปัดขึ้นจากด้านล่างของหน้าจอและปล่อยอย่างรวดเร็ว"</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"ฟีเจอร์นี้จะเปิดขึ้นในครั้งถัดไปที่คุณใช้ทางลัดนี้ ใช้ 3 นิ้วปัดขึ้นจากด้านล่างของหน้าจอและปล่อยอย่างรวดเร็ว"</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"การขยาย"</string>
<string name="user_switched" msgid="7249833311585228097">"ผู้ใช้ปัจจุบัน <xliff:g id="NAME">%1$s</xliff:g>"</string>
<string name="user_switching_message" msgid="1912993630661332336">"กำลังเปลี่ยนเป็น<xliff:g id="NAME">%1$s</xliff:g>…"</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"PIN สั้นเกินไป ต้องมีอย่างน้อย 4 หลัก"</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"ลองอีกครั้งในภายหลัง"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"กำลังดูแบบเต็มหน้าจอ"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"หากต้องการออก ให้ปัดลงจากด้านบนของหน้าจอ"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"รับทราบ"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"หมุนเพื่อรับมุมมองที่ดียิ่งขึ้น"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"เปิด <xliff:g id="NAME">%s</xliff:g> ในโหมดเต็มหน้าจอเพื่อรับมุมมองที่ดียิ่งขึ้น"</string>
@@ -2436,21 +2425,25 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"วิธีการทำงาน"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"รอดำเนินการ..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"ตั้งค่าการปลดล็อกด้วยลายนิ้วมืออีกครั้ง"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"ระบบไม่จดจำ <xliff:g id="FINGERPRINT">%s</xliff:g> อีกต่อไป"</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"ระบบไม่จดจำ <xliff:g id="FINGERPRINT_0">%1$s</xliff:g> และ <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> อีกต่อไป"</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"ระบบไม่จดจำ <xliff:g id="FINGERPRINT">%s</xliff:g> อีกต่อไป ตั้งค่าการปลดล็อกด้วยลายนิ้วมืออีกครั้ง"</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"ระบบไม่จดจำ <xliff:g id="FINGERPRINT_0">%1$s</xliff:g> และ <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> อีกต่อไป ตั้งค่าการปลดล็อกด้วยลายนิ้วมืออีกครั้ง"</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"ตั้งค่าการปลดล็อกด้วยใบหน้าอีกครั้ง"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"ระบบไม่จดจำรูปแบบใบหน้าของคุณอีกต่อไป ตั้งค่าการปลดล็อกด้วยใบหน้าอีกครั้ง"</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"ตั้งค่า"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"ไว้ทีหลัง"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"นาฬิกาปลุกสำหรับ <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"สลับผู้ใช้"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"ปิดเสียง"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"แตะเพื่อปิดเสียง"</string>
+ <string name="keyboard_shortcut_group_applications_browser" msgid="6535007304687100909">"เบราว์เซอร์"</string>
+ <string name="keyboard_shortcut_group_applications_contacts" msgid="2750702518068326356">"รายชื่อติดต่อ"</string>
+ <string name="keyboard_shortcut_group_applications_email" msgid="4229037666415353683">"อีเมล"</string>
+ <string name="keyboard_shortcut_group_applications_sms" msgid="3523799286376321137">"SMS"</string>
+ <string name="keyboard_shortcut_group_applications_music" msgid="2051507523525651067">"เพลง"</string>
+ <string name="keyboard_shortcut_group_applications_calendar" msgid="3571770335653387606">"ปฏิทิน"</string>
+ <string name="keyboard_shortcut_group_applications_calculator" msgid="6753209559716091507">"เครื่องคิดเลข"</string>
+ <string name="keyboard_shortcut_group_applications_maps" msgid="7950000659522589471">"แผนที่"</string>
+ <string name="keyboard_shortcut_group_applications" msgid="3010389163951364798">"แอปพลิเคชัน"</string>
</resources>
diff --git a/core/res/res/values-tl/strings.xml b/core/res/res/values-tl/strings.xml
index bcb70bfec18b..bebc2b45eb08 100644
--- a/core/res/res/values-tl/strings.xml
+++ b/core/res/res/values-tl/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Ulat sa bug"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Tapusin ang session"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Screenshot"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Ulat ng bug"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Mangongolekta ito ng impormasyon tungkol sa kasalukuyang katayuan ng iyong device, na ipapadala bilang mensaheng e-mail. Gugugol ito ng kaunting oras mula sa pagsisimula ng ulat sa bug hanggang sa handa na itong maipadala; mangyaring magpasensya."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Interactive na ulat"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Piliin para i-disable ang wireless na pag-debug."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Naka-enable ang Test Harness Mode"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Mag-factory reset para i-disable ang Test Harness Mode."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Maling configuration ng build ng HSUM"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"Ang status na Headless System User Mode ng device na ito ay naiiba sa configuration ng build nito. Paki-factory reset ang device."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Naka-enable ang serial console"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Naaapektuhan ang performance. Para i-disable, lagyan ng check ang bootloader."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"Na-enable ang Pang-eksperimentong MTE"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Pinindot nang matagal ang volume keys. Na-on ang <xliff:g id="SERVICE_NAME">%1$s</xliff:g>."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Pinindot nang matagal ang volume keys. Na-off ang <xliff:g id="SERVICE_NAME">%1$s</xliff:g>."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Bitawan ang mga volume key. Para i-on ang <xliff:g id="SERVICE_NAME">%1$s</xliff:g>, muling pindutin nang matagal ang dalawang volume key sa loob ng 3 segundo."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Pumili ng feature"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Pumili ng feature"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Pumili ng feature"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"Magbubukas ang feature sa susunod na i-tap mo ang button ng accessibility"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"Magbubukas ang feature sa susunod na gamitin mo ang shortcut na ito. Mag-swipe pataas gamit ang 2 daliri mula sa ibaba ng iyong screen at mabilis na i-release."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"Magbubukas ang feature sa susunod na gamitin mo ang shortcut na ito. Mag-swipe pataas gamit ang 3 daliri mula sa ibaba ng iyong screen at mabilis na i-release."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Pag-magnify"</string>
<string name="user_switched" msgid="7249833311585228097">"Kasalukuyang user <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"Lumilipat kay <xliff:g id="NAME">%1$s</xliff:g>…"</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"Masyadong maikli ang PIN. Hindi dapat mas maikli sa 4 na digit."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Subukang muli sa ibang pagkakataon"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Panonood sa full screen"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Para lumabas, mag-swipe pababa mula sa itaas ng iyong screen"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"Nakuha ko"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"I-rotate para sa mas magandang view"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Buksan ang <xliff:g id="NAME">%s</xliff:g> sa full screen para sa mas magandang view"</string>
@@ -2436,21 +2425,25 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Paano ito gumagana"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Nakabinbin..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"I-set up ulit ang Pag-unlock Gamit ang Fingerprint"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"Hindi na makilala ang <xliff:g id="FINGERPRINT">%s</xliff:g>."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"Hindi na makilala ang <xliff:g id="FINGERPRINT_0">%1$s</xliff:g> at <xliff:g id="FINGERPRINT_1">%2$s</xliff:g>."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"Hindi na makilala ang <xliff:g id="FINGERPRINT">%s</xliff:g>. I-set up ulit ang Pag-unlock Gamit ang Fingerprint."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"Hindi na makilala ang <xliff:g id="FINGERPRINT_0">%1$s</xliff:g> at <xliff:g id="FINGERPRINT_1">%2$s</xliff:g>. I-set up ulit ang Pag-unlock Gamit ang Fingerprint."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"I-set up ulit ang Pag-unlock Gamit ang Mukha"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Hindi na makilala ang iyong face model. I-set up ulit ang Pag-unlock Gamit ang Mukha."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"I-set up"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Huwag muna"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Alarm para kay <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Magpalit ng user"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"I-mute"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"I-tap para i-mute ang tunog"</string>
+ <string name="keyboard_shortcut_group_applications_browser" msgid="6535007304687100909">"Browser"</string>
+ <string name="keyboard_shortcut_group_applications_contacts" msgid="2750702518068326356">"Mga Contact"</string>
+ <string name="keyboard_shortcut_group_applications_email" msgid="4229037666415353683">"Email"</string>
+ <string name="keyboard_shortcut_group_applications_sms" msgid="3523799286376321137">"SMS"</string>
+ <string name="keyboard_shortcut_group_applications_music" msgid="2051507523525651067">"Musika"</string>
+ <string name="keyboard_shortcut_group_applications_calendar" msgid="3571770335653387606">"Kalendaryo"</string>
+ <string name="keyboard_shortcut_group_applications_calculator" msgid="6753209559716091507">"Calculator"</string>
+ <string name="keyboard_shortcut_group_applications_maps" msgid="7950000659522589471">"Mga Mapa"</string>
+ <string name="keyboard_shortcut_group_applications" msgid="3010389163951364798">"Mga Application"</string>
</resources>
diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml
index 03863c571013..72404af417fb 100644
--- a/core/res/res/values-tr/strings.xml
+++ b/core/res/res/values-tr/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Hata raporu"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Oturumu sonlandır"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Ekran görüntüsü"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Hata raporu"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Bu rapor, e-posta iletisi olarak göndermek üzere cihazınızın şu anki durumuyla ilgili bilgi toplar. Hata raporu başlatıldıktan sonra hazır olması biraz zaman alabilir, lütfen sabırlı olun."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Etkileşimli rapor"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Kablosuz hata ayıklamayı devre dışı bırakmak için seçin."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Test Bandı Modu etkin"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Test Bandı Modu\'nu devre dışı bırakmak için cihazı fabrika ayarlarına sıfırlayın."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Gözetimsiz Sistem Kullanıcı Modu derleme yapılandırması yanlış"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"Bu cihazın Gözetimsiz Sistem Kullanıcı Modu durumu, derleme yapılandırmasından farklı. Lütfen cihazı fabrika ayarlarına sıfırlayın."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Seri konsol etkinleştirildi"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Performans etkilendi. Devre dışı bırakmak için bootloader\'ı kontrol edin."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"Deneysel MTE etkinleştirildi"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Ses tuşlarını basılı tuttunuz. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> açıldı."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Ses tuşlarını basılı tuttunuz. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> kapatıldı."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Ses seviyesi tuşlarını bırakın. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> hizmetini etkinleştirmek için her iki ses seviyesi tuşuna yeniden basıp 3 saniye boyunca basılı tutun."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Özellik seçin"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Özellik seçin"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Özellik seçin"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"Özellik, erişilebilirlik düğmesine bir sonraki dokunuşunuzda açılır."</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"Özellik, bu kısayolu bir sonraki kullanışınızda açılır. Ekranın alt kısmından 2 parmağınızla yukarı doğru kaydırın ve hızlıca bırakın."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"Özellik, bu kısayolu bir sonraki kullanışınızda açılır. Ekranın alt kısmından 3 parmağınızla yukarı doğru kaydırın ve hızlıca bırakın."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Büyütme"</string>
<string name="user_switched" msgid="7249833311585228097">"Geçerli kullanıcı: <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"<xliff:g id="NAME">%1$s</xliff:g> adlı kullanıcıya geçiliyor…"</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"PIN çok kısa. En az 4 basamaklı olmalı."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Daha sonra tekrar deneyin"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Tam ekran olarak görüntüleme"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Çıkmak için ekranın üst kısmından aşağı doğru kaydırın"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"Anladım"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Daha iyi bir görünüm elde etmek için ekranı döndürün"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Daha iyi görünüm için <xliff:g id="NAME">%s</xliff:g> uygulamasını açın"</string>
@@ -2436,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"İşleyiş şekli"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Bekliyor..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Parmak İzi Kilidi\'ni tekrar kurun"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> artık tanınamayacak."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> ve <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> artık tanınamayacak."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> artık tanınamayacak. Parmak İzi Kilidi\'ni tekrar kurun."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> ve <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> artık tanınamayacak. Parmak İzi Kilidi\'ni tekrar kurun."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Yüz Tanıma Kilidi\'ni tekrar kurun"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Yüz modeliniz artık tanınamayacak. Yüz Tanıma Kilidi\'ni tekrar kurun."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Ayarla"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Şimdi değil"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"<xliff:g id="USER_NAME">%s</xliff:g> için alarm"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Kullanıcı değiştir"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Sesi kapat"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Sesi kapat düğmesine dokunun"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-uk/strings.xml b/core/res/res/values-uk/strings.xml
index 7ffd66aeeb02..246cce925e9a 100644
--- a/core/res/res/values-uk/strings.xml
+++ b/core/res/res/values-uk/strings.xml
@@ -267,8 +267,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Звіт про помилки"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Завершити сеанс"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Знімок екрана"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Звіт про помилку"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Інформація про поточний стан вашого пристрою буде зібрана й надіслана електронною поштою. Підготовка звіту триватиме певний час."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Інтерактивний звіт"</string>
@@ -1415,10 +1413,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Натисніть, щоб вимкнути налагодження."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Увімкнено режим автоматизованого тестування"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Щоб вимкнути режим автоматизованого тестування, відновіть заводські налаштування."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Неправильна конфігурація складання HSUM"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"Стан пристрою в режимі користувача системи без графічного інтерфейсу (HSUM) відрізняється від його конфігурації складання. Скиньте налаштування пристрою."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Послідовну консоль увімкнено"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Продуктивність зазнала впливу. Щоб вимкнути, перевірте завантажувач операційної системи."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"Експериментальний запуск з MTE ввімкнено"</string>
@@ -1763,18 +1759,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Утримано клавіші гучності. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> увімкнено."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Утримано клавіші гучності. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> вимкнено."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Відпустіть клавіші гучності. Щоб увімкнути сервіс <xliff:g id="SERVICE_NAME">%1$s</xliff:g>, натисніть і втримуйте обидві клавіші гучності протягом 3 секунд."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Виберіть функцію"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Виберіть функцію"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Виберіть функцію"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"Функція відкриється, коли ви наступного разу натиснете кнопку функцій доступності"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"Функція відкриється, коли ви наступного разу скористаєтеся цією швидкою командою. Проведіть двома пальцями вгору від низу екрана й швидко відпустіть."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"Функція відкриється, коли ви наступного разу скористаєтеся цією швидкою командою. Проведіть трьома пальцями вгору від низу екрана й швидко відпустіть."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Збільшення"</string>
<string name="user_switched" msgid="7249833311585228097">"Поточний користувач: <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"Перехід у режим \"<xliff:g id="NAME">%1$s</xliff:g>\"…"</string>
@@ -1897,8 +1887,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"PIN-код закороткий. Має бути принаймні 4 цифри."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Спробуйте пізніше"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Перегляд на весь екран"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Щоб вийти, проведіть пальцем униз від верхнього краю екрана"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"OK"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Оберніть для кращого огляду"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Для кращого огляду відкрийте додаток <xliff:g id="NAME">%s</xliff:g> на весь екран"</string>
@@ -2438,21 +2427,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Як це працює"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Обробка…"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Налаштуйте розблокування відбитком пальця повторно"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"Відбиток пальця <xliff:g id="FINGERPRINT">%s</xliff:g> більше не розпізнається."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"Відбитки пальців <xliff:g id="FINGERPRINT_0">%1$s</xliff:g> і <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> більше не розпізнаються."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"Відбиток пальця <xliff:g id="FINGERPRINT">%s</xliff:g> більше не розпізнається. Налаштуйте розблокування відбитком пальця повторно."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"Відбитки пальців <xliff:g id="FINGERPRINT_0">%1$s</xliff:g> і <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> більше не розпізнаються. Налаштуйте розблокування відбитком пальця повторно."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Налаштуйте фейс-контроль повторно"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Модель вашого обличчя більше не розпізнається. Налаштуйте фейс-контроль повторно."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Налаштувати"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Не зараз"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Будильник користувача <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Змінити користувача"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Вимкнути звук"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Натисніть, щоб вимкнути звук"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-ur/strings.xml b/core/res/res/values-ur/strings.xml
index 1b14e674ed5f..e613dd72d56b 100644
--- a/core/res/res/values-ur/strings.xml
+++ b/core/res/res/values-ur/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"بگ کی اطلاع"</string>
<string name="global_action_logout" msgid="6093581310002476511">"سیشن ختم کریں"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"اسکرین شاٹ"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"بگ رپورٹ"</string>
<string name="bugreport_message" msgid="5212529146119624326">"ایک ای میل پیغام کے بطور بھیجنے کیلئے، یہ آپ کے موجودہ آلہ کی حالت کے بارے میں معلومات جمع کرے گا۔ بگ کی اطلاع شروع کرنے سے لے کر بھیجنے کیلئے تیار ہونے تک اس میں تھوڑا وقت لگے گا؛ براہ کرم تحمل سے کام لیں۔"</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"متعامل رپورٹ"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"وائرلیس ڈیبگنگ کو غیر فعال کرنے کے ليے منتخب کریں۔"</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"ٹیسٹ ہارنیس موڈ فعال ہے"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"ٹیسٹ ہارنیس موڈ غیر فعال کرنے کے لیے فیکٹری ری سیٹ کریں۔"</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"‏‫HSUM کی غلط بلڈ کنفیگریشن"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"اس آلہ کی ہیڈ لیس سسٹم یوزر موڈ کی حیثیت اس کی بلڈ کنفیگریشن سے مختلف ہوتی ہے۔ براہ کرم آلہ کو فیکٹری ری سیٹ کریں۔"</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"شمار کونسول فعال ہے"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"کارکردگی پر اثر پڑا ہے۔ غیر فعال کرنے کے ليے، بوٹ لوڈر چیک کریں۔"</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"‏تجرباتی MTE کو فعال کیا گیا"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"والیوم کی کلیدوں کو دبائے رکھا گیا۔ <xliff:g id="SERVICE_NAME">%1$s</xliff:g> آن ہے۔"</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"والیوم کی کلیدوں کو دبائے رکھا گیا۔ <xliff:g id="SERVICE_NAME">%1$s</xliff:g> آف ہے۔"</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"والیوم کی کلیدوں کو ریلیز کریں <xliff:g id="SERVICE_NAME">%1$s</xliff:g> کو آن کرنے کے لیے، والیوم کی دونوں کلیدوں کو دوبارہ 3 سیکنڈ تک چھوئیں اور دبائے رکھیں۔"</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"ایک خصوصیت منتخب کریں"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"ایک خصوصیت منتخب کریں"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"ایک خصوصیت منتخب کریں"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"اگلی بار جب آپ ایکسیسبیلٹی بٹن پر تھپتھپائیں گے تو خصوصیت کھل جائے گی"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"اگلی بار جب آپ یہ شارٹ کٹ استعمال کریں گے تو خصوصیت کھل جائے گی۔ اپنی اسکرین کے نیچے سے 2 انگلیوں سے اوپر کی طرف سوائپ کریں اور تیزی سے ریلیز کریں۔"</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"اگلی بار جب آپ یہ شارٹ کٹ استعمال کریں گے تو خصوصیت کھل جائے گی۔ اپنی اسکرین کے نیچے سے 3 انگلیوں سے اوپر کی طرف سوائپ کریں اور تیزی سے ریلیز کریں۔"</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"میگنیفکیشن"</string>
<string name="user_switched" msgid="7249833311585228097">"موجودہ صارف <xliff:g id="NAME">%1$s</xliff:g>۔"</string>
<string name="user_switching_message" msgid="1912993630661332336">"<xliff:g id="NAME">%1$s</xliff:g> پر سوئچ کیا جا رہا ہے…"</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"‏PIN کافی چھوٹا ہے۔ کم از کم 4 ہندسے ہونا ضروری ہے۔"</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"بعد میں دوبارہ کوشش کریں"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"پوری اسکرین میں دیکھ رہے ہیں"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"باہر نکلنے کے لیے اپنی اسکرین کے اوپری حصے سے نیچے کی طرف سوائپ کریں"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"سمجھ آ گئی"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"بہتر منظر کے لیے گھمائیں"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"بہتر منظر کے لیے <xliff:g id="NAME">%s</xliff:g> کو فُل اسکرین میں کھولیں"</string>
@@ -2436,21 +2425,25 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"اس کے کام کرنے کا طریقہ"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"زیر التواء..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"فنگر پرنٹ اَن لاک کو دوبارہ سیٹ اپ کریں"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> مزید پہچانا نہیں جا سکتا۔"</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> اور <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> کو مزید پہچانا نہیں جا سکتا۔"</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> مزید پہچانا نہیں جا سکتا۔ فنگر پرنٹ اَن لاک کو دوبارہ سیٹ اپ کریں۔"</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> اور <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> کو مزید پہچانا نہیں جا سکتا۔ فنگر پرنٹ اَن لاک کو دوبارہ سیٹ اپ کریں۔"</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"فیس اَن لاک کو دوبارہ سیٹ اپ کریں"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"آپ کے چہرے کا ماڈل مزید پہچانا نہیں جا سکتا۔ فیس اَن لاک کو دوبارہ سیٹ اپ کریں۔"</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"سیٹ اپ کریں"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"ابھی نہیں"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"<xliff:g id="USER_NAME">%s</xliff:g> کیلئے الارم"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"صارف سوئچ کریں"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"خاموش کریں"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"آواز کو خاموش کرنے کے لیے تھپتھپائیں"</string>
+ <string name="keyboard_shortcut_group_applications_browser" msgid="6535007304687100909">"براؤزر"</string>
+ <string name="keyboard_shortcut_group_applications_contacts" msgid="2750702518068326356">"رابطے"</string>
+ <string name="keyboard_shortcut_group_applications_email" msgid="4229037666415353683">"ای میل"</string>
+ <string name="keyboard_shortcut_group_applications_sms" msgid="3523799286376321137">"SMS"</string>
+ <string name="keyboard_shortcut_group_applications_music" msgid="2051507523525651067">"موسیقی"</string>
+ <string name="keyboard_shortcut_group_applications_calendar" msgid="3571770335653387606">"کیلنڈر"</string>
+ <string name="keyboard_shortcut_group_applications_calculator" msgid="6753209559716091507">"کیلکولیٹر"</string>
+ <string name="keyboard_shortcut_group_applications_maps" msgid="7950000659522589471">"نقشے"</string>
+ <string name="keyboard_shortcut_group_applications" msgid="3010389163951364798">"ایپلیکیشنز"</string>
</resources>
diff --git a/core/res/res/values-uz/strings.xml b/core/res/res/values-uz/strings.xml
index 1c8879ef8353..994950cec574 100644
--- a/core/res/res/values-uz/strings.xml
+++ b/core/res/res/values-uz/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Xatoliklar hisoboti"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Seansni yakunlash"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Skrinshot"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Xatoliklar hisoboti"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Qurilmangiz holati haqidagi ma’lumotlar to‘planib, e-pochta orqali yuboriladi. Hisobotni tayyorlash biroz vaqt olishi mumkin."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Interaktiv hisobot"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Uni faolsizlantirish uchun bosing."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Xavfsizlik sinovi rejimi yoqildi"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Xavfsizlik sinovi rejimini faolsizlantirish uchun zavod sozlamalariga qaytaring."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"HSUM nashr konfiguratsiyasida xato"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"Bu qurilmadagi Headless System User Mode holati uning konfiguratsiyasidan farq qiladi. Qurilma sozlamalarini tozalang."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Ketma-ket port konsoli yoqildi"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Qurilma samaradorligi pasaydi. Konsolni faolsizlantirish uchun operatsion tizim yuklagichini oching."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"Tajribaviy MTE yoqildi"</string>
@@ -1761,12 +1757,9 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Tovush tugmalari bosib turildi. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> yoqildi."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Tovush tugmalari bosib turildi. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> faolsizlantirildi."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Tovush tugmalarini qoʻyib yuboring. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> xizmatini yoqish uchun ikkala tovush tugmasini 3 soniya bosib turing."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Funksiyani tanlang"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Funksiyani tanlang"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Funksiyani tanlang"</string>
<string name="accessibility_button_instructional_text" msgid="6831154884557881996">"Keyingi safar qulayliklar tugmasini bosganingizda funksiya ochiladi"</string>
<string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"Keyingi safar shu buyruqdan foydalanganingizda funksiya ochiladi. Ekranning pastidan 2 barmoq bilan tepaga suring va darhol qoʻyib yuboring."</string>
<string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"Keyingi safar shu buyruqdan foydalanganingizda funksiya ochiladi. Ekranning pastidan 3 barmoq bilan tepaga suring va darhol qoʻyib yuboring."</string>
@@ -1892,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"PIN kod juda qisqa, kamida 4 ta raqam kiriting."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Keyinroq urinib ko‘ring"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Butun ekranli rejim"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Chiqish uchun ekranning tepasidan pastga suring"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"OK"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Yaxshiroq koʻrish uchun kamerani buring"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Yaxshiroq koʻrish uchun butun ekranda <xliff:g id="NAME">%s</xliff:g> ilovasini oching"</string>
@@ -2433,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Ishlash tartibi"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Kutilmoqda..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Barmoq izi bilan ochish funksiyasini qayta sozlang"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"<xliff:g id="FINGERPRINT">%s</xliff:g> endi tanilmaydi."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> va <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> endi tanilmaydi."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"<xliff:g id="FINGERPRINT">%s</xliff:g> endi tanilmaydi. Barmoq izi bilan ochishni qayta sozlang."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> va <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> endi tanilmaydi. Barmoq izi bilan ochishni qayta sozlang."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Yuz bilan ochishni qayta sozlash"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Yuzingiz modeli endi tanilmaydi. Yuz bilan ochishni qayta sozlang."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Sozlash"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Hozir emas"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"<xliff:g id="USER_NAME">%s</xliff:g> uchun signal"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Foydalanuvchini almashtirish"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Ovozsiz qilish"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Tovushsiz qilish uchun bosing"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-vi/strings.xml b/core/res/res/values-vi/strings.xml
index 5d8597eeaca6..f825f7b501ee 100644
--- a/core/res/res/values-vi/strings.xml
+++ b/core/res/res/values-vi/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Báo cáo lỗi"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Kết thúc phiên"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Chụp màn hình"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Báo cáo lỗi"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Báo cáo này sẽ thu thập thông tin về tình trạng thiết bị hiện tại của bạn, để gửi dưới dạng thông báo qua email. Sẽ mất một chút thời gian kể từ khi bắt đầu báo cáo lỗi cho tới khi báo cáo sẵn sàng để gửi; xin vui lòng kiên nhẫn."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Báo cáo tương tác"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Chọn để tắt tính năng gỡ lỗi qua Wi-Fi."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Đã bật Chế độ khai thác kiểm thử"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Khôi phục cài đặt gốc để tắt Chế độ khai thác kiểm thử."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Cấu hình bản dựng HSUM không chính xác"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"Trạng thái Chế độ người dùng hệ thống không có giao diện người dùng (HSUM) của thiết bị này khác với cấu hình bản dựng của thiết bị. Vui lòng đặt lại thiết bị về trạng thái ban đầu."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"Đã bật bảng điều khiển cổng nối tiếp"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Hiệu suất sẽ bị ảnh hưởng. Để tắt, hãy chọn trình tải khởi động."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"Đã bật MTE thử nghiệm"</string>
@@ -1441,7 +1437,7 @@
<string name="fast_scroll_numeric_alphabet" msgid="2529539945421557329">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="alert_windows_notification_channel_group_name" msgid="6063891141815714246">"Hiển thị trên các ứng dụng khác"</string>
<string name="alert_windows_notification_channel_name" msgid="3437528564303192620">"<xliff:g id="NAME">%s</xliff:g> hiển thị trên các ứng dụng khác"</string>
- <string name="alert_windows_notification_title" msgid="6331662751095228536">"<xliff:g id="NAME">%s</xliff:g> hiển thị trên ứng dụng khác"</string>
+ <string name="alert_windows_notification_title" msgid="6331662751095228536">"<xliff:g id="NAME">%s</xliff:g> đang hiện trên các ứng dụng khác"</string>
<string name="alert_windows_notification_message" msgid="6538171456970725333">"Nếu bạn không muốn <xliff:g id="NAME">%s</xliff:g> sử dụng tính năng này, hãy nhấn để mở cài đặt và tắt tính năng này."</string>
<string name="alert_windows_notification_turn_off_action" msgid="7805857234839123780">"Tắt"</string>
<string name="ext_media_checking_notification_title" msgid="8299199995416510094">"Đang kiểm tra <xliff:g id="NAME">%s</xliff:g>…"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Bạn đã giữ các phím âm lượng. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> đã bật."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Bạn đã giữ các phím âm lượng. <xliff:g id="SERVICE_NAME">%1$s</xliff:g> đã tắt."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Thả phím âm lượng. Để bật <xliff:g id="SERVICE_NAME">%1$s</xliff:g>, hãy nhấn và giữ cả 2 phím âm lượng trong 3 giây một lần nữa."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Chọn một tính năng"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Chọn một tính năng"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Chọn một tính năng"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"Tính năng này sẽ được mở vào lần tới bạn nhấn nút hỗ trợ tiếp cận"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"Tính năng này sẽ được mở vào lần tới bạn dùng lối tắt này. Hãy dùng 2 ngón tay vuốt từ cuối màn hình lên rồi thả tay nhanh."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"Tính năng này sẽ được mở vào lần tới bạn dùng lối tắt này. Hãy dùng 3 ngón tay vuốt từ cuối màn hình lên rồi thả tay nhanh."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Phóng to"</string>
<string name="user_switched" msgid="7249833311585228097">"Người dùng hiện tại <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"Đang chuyển sang <xliff:g id="NAME">%1$s</xliff:g>…"</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"Mã PIN quá ngắn. Phải có ít nhất 4 chữ số."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Hãy thử lại sau"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Xem toàn màn hình"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Để thoát, hãy vuốt xuống từ đầu màn hình"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"OK"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Xoay để xem dễ hơn"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Mở <xliff:g id="NAME">%s</xliff:g> ở chế độ toàn màn hình để xem dễ hơn"</string>
@@ -2436,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Cách hoạt động"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Đang chờ xử lý..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Thiết lập lại tính năng Mở khoá bằng vân tay"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"Không nhận dạng được <xliff:g id="FINGERPRINT">%s</xliff:g> nữa."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"Không nhận dạng được <xliff:g id="FINGERPRINT_0">%1$s</xliff:g> và <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> nữa."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"Không nhận dạng được <xliff:g id="FINGERPRINT">%s</xliff:g> nữa. Hãy thiết lập lại tính năng Mở khoá bằng vân tay."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"Không nhận dạng được <xliff:g id="FINGERPRINT_0">%1$s</xliff:g> và <xliff:g id="FINGERPRINT_1">%2$s</xliff:g> nữa. Hãy thiết lập lại tính năng Mở khoá bằng vân tay."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Thiết lập lại tính năng Mở khoá bằng khuôn mặt"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Không nhận dạng được mẫu khuôn mặt của bạn nữa. Hãy thiết lập lại tính năng Mở khoá bằng khuôn mặt."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Thiết lập"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Để sau"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"Chuông báo cho <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Chuyển đổi người dùng"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Tắt tiếng"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Nhấn để tắt tiếng"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml
index a9a310512500..2d1873dc8170 100644
--- a/core/res/res/values-zh-rCN/strings.xml
+++ b/core/res/res/values-zh-rCN/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"错误报告"</string>
<string name="global_action_logout" msgid="6093581310002476511">"结束会话"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"屏幕截图"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"错误报告"</string>
<string name="bugreport_message" msgid="5212529146119624326">"这会收集有关当前设备状态的信息,并以电子邮件的形式进行发送。从开始生成错误报告到准备好发送需要一点时间,请耐心等待。"</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"互动式报告"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"选择即可停用无线调试功能。"</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"自动化测试框架模式已启用"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"恢复出厂设置以停用自动化测试框架模式。"</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"HSUM build 配置不正确"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"此设备的无头系统用户模式状态与其 build 配置不同。请将设备恢复出厂设置。"</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"已启用序列控制台"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"性能受到影响。要停用,请查看引导加载程序。"</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"已启用实验性 MTE"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"已按住音量键。<xliff:g id="SERVICE_NAME">%1$s</xliff:g>已开启。"</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"已按住音量键。<xliff:g id="SERVICE_NAME">%1$s</xliff:g>已关闭。"</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"松开音量键。如要启用 <xliff:g id="SERVICE_NAME">%1$s</xliff:g>,请再次同时按住两个音量键 3 秒。"</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"请选择功能"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"请选择功能"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"请选择功能"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"下次点按“无障碍”按钮时,将打开此功能"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"下次使用此快捷手势时,将打开此功能。用 2 根手指从画面底部向上滑动,然后快速松开。"</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"下次使用此快捷手势时,将打开此功能。用 3 根手指从画面底部向上滑动,然后快速松开。"</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"放大功能"</string>
<string name="user_switched" msgid="7249833311585228097">"当前用户是<xliff:g id="NAME">%1$s</xliff:g>。"</string>
<string name="user_switching_message" msgid="1912993630661332336">"正在切换为<xliff:g id="NAME">%1$s</xliff:g>…"</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"PIN码太短,至少应包含4位数字。"</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"稍后重试"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"目前处于全屏模式"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"若要退出,请从屏幕顶部向下滑动"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"知道了"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"旋转可改善预览效果"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"在全屏模式下打开“<xliff:g id="NAME">%s</xliff:g>”可改善预览效果"</string>
@@ -2436,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"运作方式"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"待归档…"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"重新设置指纹解锁功能"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"系统无法再识别<xliff:g id="FINGERPRINT">%s</xliff:g>。"</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"系统无法再识别<xliff:g id="FINGERPRINT_0">%1$s</xliff:g>和<xliff:g id="FINGERPRINT_1">%2$s</xliff:g>。"</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"系统无法再识别<xliff:g id="FINGERPRINT">%s</xliff:g>。请重新设置指纹解锁功能。"</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"系统无法再识别<xliff:g id="FINGERPRINT_0">%1$s</xliff:g>和<xliff:g id="FINGERPRINT_1">%2$s</xliff:g>。请重新设置指纹解锁功能。"</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"重新设置“人脸解锁”功能"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"系统无法再识别您的脸部模型。请重新设置人脸解锁功能。"</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"设置"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"以后再说"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"<xliff:g id="USER_NAME">%s</xliff:g>的闹钟"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"切换用户"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"静音"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"点按即可设为静音"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-zh-rHK/strings.xml b/core/res/res/values-zh-rHK/strings.xml
index 72e83088d8a5..ca88600b2c6b 100644
--- a/core/res/res/values-zh-rHK/strings.xml
+++ b/core/res/res/values-zh-rHK/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"錯誤報告"</string>
<string name="global_action_logout" msgid="6093581310002476511">"結束工作階段"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"螢幕截圖"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"錯誤報告"</string>
<string name="bugreport_message" msgid="5212529146119624326">"這會收集你目前裝置狀態的相關資訊,並以電郵傳送給你。從開始建立錯誤報告到準備傳送需要一段時間,請耐心等候。"</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"互動報告"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"選取即可停用無線偵錯功能。"</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"已啟用測試工具模式"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"請將裝置回復原廠設定,以停用測試工具模式。"</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"HSUM 版本設定錯誤"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"此裝置的無使用者介面系統使用者模式狀態與裝置的版本設定不符。請將裝置回復原廠設定。"</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"已啟用序列控制器"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"效能受到影響,勾選啟動程式即可停用。"</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"實驗版 MTE 已啟用"</string>
@@ -1761,12 +1757,9 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"已按住音量鍵。<xliff:g id="SERVICE_NAME">%1$s</xliff:g> 已開啟。"</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"已按住音量鍵。<xliff:g id="SERVICE_NAME">%1$s</xliff:g> 已關閉。"</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"鬆開音量鍵。如果要開 <xliff:g id="SERVICE_NAME">%1$s</xliff:g>,請同時㩒住兩個音量鍵 3 秒。"</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"選擇功能"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"選擇功能"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"選擇功能"</string>
<string name="accessibility_button_instructional_text" msgid="6831154884557881996">"下次輕按無障礙功能按鈕時,就會開啟此功能"</string>
<string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"下次使用此快速鍵時,就會開啟此功能。請用 2 隻手指從螢幕底部向上滑動並快速放開。"</string>
<string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"下次使用此快速鍵時,就會開啟此功能。請用 3 隻手指從螢幕底部向上滑動並快速放開。"</string>
@@ -1892,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"PIN 碼太短,至少必須為 4 位數。"</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"稍後再試"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"開啟全螢幕"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"如要離開,請從螢幕頂部向下滑動"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"知道了"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"旋轉以改善預覽效果"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"以全螢幕模式開啟「<xliff:g id="NAME">%s</xliff:g>」,以改善預覽效果"</string>
@@ -2433,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"運作方式"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"待處理…"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"重新設定「指紋解鎖」功能"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"無法再辨識<xliff:g id="FINGERPRINT">%s</xliff:g>。"</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"無法再辨識<xliff:g id="FINGERPRINT_0">%1$s</xliff:g>和<xliff:g id="FINGERPRINT_1">%2$s</xliff:g>。"</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"無法再辨識<xliff:g id="FINGERPRINT">%s</xliff:g>。請重新設定「指紋解鎖」功能。"</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"無法再辨識<xliff:g id="FINGERPRINT_0">%1$s</xliff:g>和<xliff:g id="FINGERPRINT_1">%2$s</xliff:g>。請重新設定「指紋解鎖」功能。"</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"重新設定「面孔解鎖」功能"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"無法再辨識你的面部模型。請重新設定「面孔解鎖」功能。"</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"設定"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"暫時不要"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"<xliff:g id="USER_NAME">%s</xliff:g>的鬧鐘"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"切換使用者"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"靜音"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"輕按即可靜音"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml
index d971b0f25b65..b22ad0ad62f9 100644
--- a/core/res/res/values-zh-rTW/strings.xml
+++ b/core/res/res/values-zh-rTW/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"錯誤報告"</string>
<string name="global_action_logout" msgid="6093581310002476511">"結束"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"螢幕截圖"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"錯誤報告"</string>
<string name="bugreport_message" msgid="5212529146119624326">"這會收集你目前裝置狀態的相關資訊,以便透過電子郵件傳送。從錯誤報告開始建立到準備傳送的這段過程可能需要一點時間,敬請耐心等候。"</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"互動式報告"</string>
@@ -1199,7 +1197,7 @@
<string name="low_internal_storage_view_title" msgid="9024241779284783414">"儲存空間即將用盡"</string>
<string name="low_internal_storage_view_text" msgid="8172166728369697835">"部分系統功能可能無法運作"</string>
<string name="low_internal_storage_view_text_no_boot" msgid="7368968163411251788">"系統儲存空間不足。請確定你已釋出 250MB 的可用空間,然後重新啟動。"</string>
- <string name="app_running_notification_title" msgid="8985999749231486569">"「<xliff:g id="APP_NAME">%1$s</xliff:g>」目前正在執行"</string>
+ <string name="app_running_notification_title" msgid="8985999749231486569">"「<xliff:g id="APP_NAME">%1$s</xliff:g>」正在執行中"</string>
<string name="app_running_notification_text" msgid="5120815883400228566">"輕觸即可瞭解詳情或停止應用程式。"</string>
<string name="ok" msgid="2646370155170753815">"確定"</string>
<string name="cancel" msgid="6908697720451760115">"取消"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"選取即可停用無線偵錯功能。"</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"測試控管工具模式已啟用"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"恢復原廠設定以停用測試控管工具模式。"</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"HSUM 建構設定錯誤"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"這部裝置的無頭系統使用者模式狀態與其建構設定不同,請將裝置恢復原廠設定。"</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"已啟用序列主控台"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"效能已受到影響。如要停用,請檢查系統啟動載入程式。"</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"已啟用實驗 MTE"</string>
@@ -1441,7 +1437,7 @@
<string name="fast_scroll_numeric_alphabet" msgid="2529539945421557329">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="alert_windows_notification_channel_group_name" msgid="6063891141815714246">"在其他應用程式上面顯示"</string>
<string name="alert_windows_notification_channel_name" msgid="3437528564303192620">"「<xliff:g id="NAME">%s</xliff:g>」在其他應用程式上顯示內容"</string>
- <string name="alert_windows_notification_title" msgid="6331662751095228536">"「<xliff:g id="NAME">%s</xliff:g>」正在其他應用程式上顯示內容"</string>
+ <string name="alert_windows_notification_title" msgid="6331662751095228536">"「<xliff:g id="NAME">%s</xliff:g>」正重疊顯示在其他應用程式上方"</string>
<string name="alert_windows_notification_message" msgid="6538171456970725333">"如果你不想讓「<xliff:g id="NAME">%s</xliff:g>」使用這項功能,請輕觸開啟設定頁面,然後停用此功能。"</string>
<string name="alert_windows_notification_turn_off_action" msgid="7805857234839123780">"關閉"</string>
<string name="ext_media_checking_notification_title" msgid="8299199995416510094">"正在檢查 <xliff:g id="NAME">%s</xliff:g>…"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"已按住音量鍵。「<xliff:g id="SERVICE_NAME">%1$s</xliff:g>」已開啟。"</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"已按住音量鍵。「<xliff:g id="SERVICE_NAME">%1$s</xliff:g>」已關閉。"</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"放開音量鍵。如要開啟 <xliff:g id="SERVICE_NAME">%1$s</xliff:g>,請同時按住音量調高鍵和調低鍵 3 秒。"</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"選擇功能"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"選擇功能"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"選擇功能"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"下次輕觸無障礙工具按鈕時,就會開啟這項功能"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"下次使用這個捷徑時,就會開啟這項功能。請用 2 指從螢幕底部向上滑動並快速放開。"</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"下次使用這個捷徑時,就會開啟這項功能。請用 3 指從螢幕底部向上滑動並快速放開。"</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"放大"</string>
<string name="user_switched" msgid="7249833311585228097">"目前的使用者是 <xliff:g id="NAME">%1$s</xliff:g>。"</string>
<string name="user_switching_message" msgid="1912993630661332336">"正在切換至<xliff:g id="NAME">%1$s</xliff:g>…"</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"PIN 長度太短,至少必須為 4 位數。"</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"稍後再試"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"以全螢幕檢視"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"如要離開,請從螢幕頂端向下滑動"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"知道了"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"旋轉螢幕以瀏覽完整的檢視畫面"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"如要享有更優質的預覽體驗,可透過全螢幕模式開啟「<xliff:g id="NAME">%s</xliff:g>」"</string>
@@ -2436,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"運作方式"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"待處理…"</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"重新設定指紋解鎖"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"系統無法再辨識「<xliff:g id="FINGERPRINT">%s</xliff:g>」。"</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"系統無法再辨識「<xliff:g id="FINGERPRINT_0">%1$s</xliff:g>」和「<xliff:g id="FINGERPRINT_1">%2$s</xliff:g>」。"</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"系統無法再辨識「<xliff:g id="FINGERPRINT">%s</xliff:g>」,請重新設定指紋解鎖。"</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"系統無法再辨識「<xliff:g id="FINGERPRINT_0">%1$s</xliff:g>」和「<xliff:g id="FINGERPRINT_1">%2$s</xliff:g>」,請重新設定指紋解鎖。"</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"重新設定人臉解鎖"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"系統無法再辨識你的臉部模型,請重新設定人臉解鎖。"</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"設定"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"暫時不要"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"<xliff:g id="USER_NAME">%s</xliff:g>的鬧鐘"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"切換使用者"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"靜音"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"輕觸即可設為靜音"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-zu/strings.xml b/core/res/res/values-zu/strings.xml
index 695dc98dd3b8..f9aa9253776a 100644
--- a/core/res/res/values-zu/strings.xml
+++ b/core/res/res/values-zu/strings.xml
@@ -265,8 +265,6 @@
<string name="global_action_bug_report" msgid="5127867163044170003">"Umbiko wephutha"</string>
<string name="global_action_logout" msgid="6093581310002476511">"Phothula isikhathi"</string>
<string name="global_action_screenshot" msgid="2610053466156478564">"Isithombe-skrini"</string>
- <!-- no translation found for identity_check_biometric_prompt_description (5810195983015866727) -->
- <skip />
<string name="bugreport_title" msgid="8549990811777373050">"Umbiko wephutha"</string>
<string name="bugreport_message" msgid="5212529146119624326">"Lokhu kuzoqoqa ulwazi mayelana nesimo samanje sedivayisi yakho, ukuthumela imilayezo ye-imeyili. Kuzothatha isikhathi esincane kusuka ekuqaleni umbiko wesiphazamiso uze ulungele ukuthunyelwa; sicela ubekezele."</string>
<string name="bugreport_option_interactive_title" msgid="7968287837902871289">"Umbiko obandakanyayo"</string>
@@ -1413,10 +1411,8 @@
<string name="adbwifi_active_notification_message" product="tv" msgid="8633421848366915478">"Khetha ukukhubaza ukulungisa amaphutha okungenantambo."</string>
<string name="test_harness_mode_notification_title" msgid="2282785860014142511">"Imodi yokuhlola i-harness inikwe amandla"</string>
<string name="test_harness_mode_notification_message" msgid="3039123743127958420">"Yenza ukusetha kabusha kwasekuqaleni ukuze ukhubaze imodi yokuqina yokuhlola."</string>
- <!-- no translation found for wrong_hsum_configuration_notification_title (7212758829332714385) -->
- <skip />
- <!-- no translation found for wrong_hsum_configuration_notification_message (5353475441480684381) -->
- <skip />
+ <string name="wrong_hsum_configuration_notification_title" msgid="7212758829332714385">"Ukulungiselelwa okungalungile kwesakho se-HSUM"</string>
+ <string name="wrong_hsum_configuration_notification_message" msgid="5353475441480684381">"Isimo Semodi Yomsebenzisi Yesistimu Engenakhanda yale divayisi siyahluka ekucushweni kwesakhiwo sayo. Sicela usethe kabusha njengasekuqaleni idivayisi."</string>
<string name="console_running_notification_title" msgid="6087888939261635904">"I-serial console inikwe amandla"</string>
<string name="console_running_notification_message" msgid="7892751888125174039">"Ukusebenza kuyathinteka. Ukuze ukhubaze, hlola i-bootloader."</string>
<string name="mte_override_notification_title" msgid="4731115381962792944">"I-Experimental MTE inikwe amandla"</string>
@@ -1761,18 +1757,12 @@
<string name="accessibility_shortcut_enabling_service" msgid="5473495203759847687">"Ubambe okhiye bevolumu. I-<xliff:g id="SERVICE_NAME">%1$s</xliff:g> ivuliwe."</string>
<string name="accessibility_shortcut_disabling_service" msgid="8675244165062700619">"Ubambe okhiye bevolumu. I-<xliff:g id="SERVICE_NAME">%1$s</xliff:g> ivaliwe."</string>
<string name="accessibility_shortcut_spoken_feedback" msgid="3760999147597564314">"Khipha okhiye bevolumu. Ukuze uvule i-<xliff:g id="SERVICE_NAME">%1$s</xliff:g>, cindezela bese ubamba bobabili okhiye bevolumu futhi imizuzwana emi-3."</string>
- <!-- no translation found for accessibility_button_prompt_text (6105393217162198616) -->
- <skip />
- <!-- no translation found for accessibility_gesture_prompt_text (6452246951969541792) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_prompt_text (77745752309056152) -->
- <skip />
- <!-- no translation found for accessibility_button_instructional_text (6831154884557881996) -->
- <skip />
- <!-- no translation found for accessibility_gesture_instructional_text (4133877896011098550) -->
- <skip />
- <!-- no translation found for accessibility_gesture_3finger_instructional_text (1124458279366968154) -->
- <skip />
+ <string name="accessibility_button_prompt_text" msgid="6105393217162198616">"Khetha isakhi"</string>
+ <string name="accessibility_gesture_prompt_text" msgid="6452246951969541792">"Khetha isakhi"</string>
+ <string name="accessibility_gesture_3finger_prompt_text" msgid="77745752309056152">"Khetha isakhi"</string>
+ <string name="accessibility_button_instructional_text" msgid="6831154884557881996">"Isakhi sizovuleka ngokulandelayo uma uthepha inkinobho yokufinyeleleka"</string>
+ <string name="accessibility_gesture_instructional_text" msgid="4133877896011098550">"Lesi sakhi sizovuleka ngokulandelayo uma usebenzisa lesi sinqamuleli. Swayiphela phezulu ngeminwe engu-2 kusukela ngaphansi kwesikrini sakho uphinde udedele ngokushesha."</string>
+ <string name="accessibility_gesture_3finger_instructional_text" msgid="1124458279366968154">"Lesi sakhi sizovuleka ngokulandelayo uma usebenzisa lesi sinqamuleli. Swayiphela phezulu ngeminwe engu-3 kusukela ngaphansi kwesikrini sakho uphinde udedele ngokushesha."</string>
<string name="accessibility_magnification_chooser_text" msgid="1502075582164931596">"Ukukhuliswa"</string>
<string name="user_switched" msgid="7249833311585228097">"Umsebenzisi wamanje <xliff:g id="NAME">%1$s</xliff:g>."</string>
<string name="user_switching_message" msgid="1912993630661332336">"Ishintshela ku-<xliff:g id="NAME">%1$s</xliff:g>…"</string>
@@ -1895,8 +1885,7 @@
<string name="restr_pin_error_too_short" msgid="1547007808237941065">"I-PIN yimfushane kakhulu. Okungenani kumele ibe namadijithi angu-4."</string>
<string name="restr_pin_try_later" msgid="5897719962541636727">"Zama futhi emva kwesikhathi"</string>
<string name="immersive_cling_title" msgid="2307034298721541791">"Ukubuka isikrini esigcwele"</string>
- <!-- no translation found for immersive_cling_description (2896205051090870978) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2896205051090870978">"Ukuze uphume, swayiphela phansi kusukela phezulu esikrinini sakho"</string>
<string name="immersive_cling_positive" msgid="7047498036346489883">"Ngiyitholile"</string>
<string name="display_rotation_camera_compat_toast_after_rotation" msgid="7600891546249829854">"Zungezisa ukuze uthole ukubuka okungcono"</string>
<string name="display_rotation_camera_compat_toast_in_multi_window" msgid="2473122980393502775">"Vula i-<xliff:g id="NAME">%s</xliff:g> kusikrini esigcwele ngokubuka okungcono"</string>
@@ -2436,21 +2425,34 @@
<string name="satellite_notification_how_it_works" msgid="3132069321977520519">"Indlela esebenza ngayo"</string>
<string name="unarchival_session_app_label" msgid="6811856981546348205">"Ilindile..."</string>
<string name="fingerprint_dangling_notification_title" msgid="7362075195588639989">"Setha Ukuvula ngesigxivizo somunwe futhi"</string>
- <!-- no translation found for fingerprint_dangling_notification_msg_1 (5851784577768803510) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_2 (7925203589860744456) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_1 (1824812666549916586) -->
- <skip />
- <!-- no translation found for fingerprint_dangling_notification_msg_all_deleted_2 (5974657382960155099) -->
- <skip />
+ <string name="fingerprint_dangling_notification_msg_1" msgid="5851784577768803510">"I-<xliff:g id="FINGERPRINT">%s</xliff:g> angeke isaziwa."</string>
+ <string name="fingerprint_dangling_notification_msg_2" msgid="7925203589860744456">"I-<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> kanye ne-<xliff:g id="FINGERPRINT_1">%2$s</xliff:g> angeke isaziwa."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_1" msgid="1824812666549916586">"I-<xliff:g id="FINGERPRINT">%s</xliff:g> angeke isaziwa. Setha Ukuvula Ngesigxivizo Somunwe futhi."</string>
+ <string name="fingerprint_dangling_notification_msg_all_deleted_2" msgid="5974657382960155099">"I-<xliff:g id="FINGERPRINT_0">%1$s</xliff:g> kanye ne-<xliff:g id="FINGERPRINT_1">%2$s</xliff:g> angeke isaziwa. Setha Ukuvula Ngesigxivizo Somunwe futhi."</string>
<string name="face_dangling_notification_title" msgid="947852541060975473">"Setha Ukuvula Ngobuso futhi"</string>
- <!-- no translation found for face_dangling_notification_msg (746235263598985384) -->
- <skip />
+ <string name="face_dangling_notification_msg" msgid="746235263598985384">"Imodeli yobuso yakho angeke isabonwa. Setha Ukuvula Ngobuso futhi."</string>
<string name="biometric_dangling_notification_action_set_up" msgid="8246885009807817961">"Setha"</string>
<string name="biometric_dangling_notification_action_not_now" msgid="8095249216864443491">"Hhayi manje"</string>
<string name="bg_user_sound_notification_title_alarm" msgid="5251678483393143527">"I-alamu ka-<xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="bg_user_sound_notification_button_switch_user" msgid="3091969648572788946">"Shintsha umsebenzisi"</string>
<string name="bg_user_sound_notification_button_mute" msgid="4942158515665615243">"Thulisa"</string>
<string name="bg_user_sound_notification_message" msgid="8613881975316976673">"Thepha ukuze uthulise umsindo"</string>
+ <!-- no translation found for keyboard_shortcut_group_applications_browser (6535007304687100909) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_contacts (2750702518068326356) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_email (4229037666415353683) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_sms (3523799286376321137) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_music (2051507523525651067) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calendar (3571770335653387606) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_calculator (6753209559716091507) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications_maps (7950000659522589471) -->
+ <skip />
+ <!-- no translation found for keyboard_shortcut_group_applications (3010389163951364798) -->
+ <skip />
</resources>
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 4892f59bd9fb..7cc9e13db5cf 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -4304,7 +4304,7 @@
<attr name="settingsActivity" format="string" />
<!-- Component name of an activity that allows the user to modify
on-screen keyboards variants (e.g. different language or layout) for this service. -->
- <!-- @FlaggedApi("android.view.inputmethod.ime_switcher_revamp") -->
+ <!-- @FlaggedApi("android.view.inputmethod.ime_switcher_revamp_api") -->
<attr name="languageSettingsActivity" format="string"/>
<!-- Set to true in all of the configurations for which this input
method should be considered an option as the default. -->
@@ -5243,6 +5243,11 @@
the VISIBLE or INVISIBLE state when measuring. Defaults to false. -->
<attr name="measureAllChildren" format="boolean" />
</declare-styleable>
+ <!-- @hide -->
+ <declare-styleable name="MaxHeightFrameLayout">
+ <!-- An optional argument to supply a maximum height for this view. -->
+ <attr name="maxHeight" format="dimension" />
+ </declare-styleable>
<declare-styleable name="ExpandableListView">
<!-- Indicator shown beside the group View. This can be a stateful Drawable. -->
<attr name="groupIndicator" format="reference" />
diff --git a/core/res/res/values/attrs_manifest.xml b/core/res/res/values/attrs_manifest.xml
index f94c8ab0350e..2e3dbda5e41c 100644
--- a/core/res/res/values/attrs_manifest.xml
+++ b/core/res/res/values/attrs_manifest.xml
@@ -1052,6 +1052,19 @@
<!-- The font weight adjustment value has changed. Used to reflect the user increasing font
weight. -->
<flag name="fontWeightAdjustment" value="0x10000000" />
+ <!-- The assets paths have changed. For example a runtime overlay is installed and enabled.
+ Corresponds to {@link android.content.pm.ActivityInfo#CONFIG_ASSETS_PATHS}. -->
+ <flag name="assetsPaths" value="0x80000000" />
+ <!-- This is probably not the flag you want, the resources compiler supports a less
+ dangerous version of it, 'allKnown', that only suppresses all currently existing
+ configuration change restarts depending on your target SDK rather than whatever the
+ latest SDK supports, allowing the application to work with resources on future Platform
+ versions.
+ Activity doesn't use Android Resources at all and doesn't need to be restarted on any
+ configuration changes. This overrides all other flags, and this is recommended to be
+ used individually. Corresponds to
+ {@link android.content.pm.ActivityInfo#CONFIG_RESOURCES_UNUSED}. -->
+ <flag name="resourcesUnused" value="0x8000000" />
</attr>
<!-- Indicate that the activity can be launched as the embedded child of another
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 4f0a836224f9..236e7c5b7a62 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -533,6 +533,9 @@
<!-- If this is true, key chords can be used to take a screenshot on the device. -->
<bool name="config_enableScreenshotChord">true</bool>
+ <!-- If this is true, accessibility events on notifications are sent. -->
+ <bool name="config_enableNotificationAccessibilityEvents">true</bool>
+
<!-- If this is true, allow wake from theater mode when plugged in or unplugged. -->
<bool name="config_allowTheaterModeWakeFromUnplug">false</bool>
<!-- If this is true, allow wake from theater mode from gesture. -->
@@ -7087,4 +7090,7 @@
<!-- Whether to show GAIA education screen during account login of private space setup.
OEM/Partner can explicitly opt to disable the screen. -->
<bool name="config_enableGaiaEducationInPrivateSpace">true</bool>
+
+ <!-- Whether to enable usb state update via udc sysfs. -->
+ <bool name="config_enableUdcSysfsUsbStateUpdate">false</bool>
</resources>
diff --git a/core/res/res/values/config_telephony.xml b/core/res/res/values/config_telephony.xml
index cdd8557393b8..61c7a8cde7d5 100644
--- a/core/res/res/values/config_telephony.xml
+++ b/core/res/res/values/config_telephony.xml
@@ -393,12 +393,6 @@
<bool name="config_wait_for_device_alignment_in_demo_datagram">false</bool>
<java-symbol type="bool" name="config_wait_for_device_alignment_in_demo_datagram" />
- <!-- Boolean indicating whether to enable MMS to be attempted on IWLAN if possible, even if
- existing cellular networks already supports IWLAN.
- -->
- <bool name="force_iwlan_mms_feature_enabled">false</bool>
- <java-symbol type="bool" name="force_iwlan_mms_feature_enabled" />
-
<!-- The time duration in millis after which Telephony will abort the last message datagram
sending requests. Telephony starts a timer when receiving a last message datagram sending
request in either OFF, IDLE, or NOT_CONNECTED state. In NOT_CONNECTED, the duration of the
diff --git a/core/res/res/values/public-staging.xml b/core/res/res/values/public-staging.xml
index b64334f7f95a..b74b41c666c8 100644
--- a/core/res/res/values/public-staging.xml
+++ b/core/res/res/values/public-staging.xml
@@ -114,7 +114,7 @@
<public name="optional"/>
<!-- @FlaggedApi("android.media.tv.flags.enable_ad_service_fw") -->
<public name="adServiceTypes" />
- <!-- @FlaggedApi("android.view.inputmethod.ime_switcher_revamp") -->
+ <!-- @FlaggedApi("android.view.inputmethod.ime_switcher_revamp_api") -->
<public name="languageSettingsActivity"/>
<!-- @FlaggedApi("android.service.controls.flags.Flags.FLAG_HOME_PANEL_DREAM") -->
<public name="dreamCategory"/>
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 6b71f97e3f17..ec865f6c376f 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -3880,6 +3880,8 @@
<!-- Title of the pop-up dialog in which the user switches keyboard, also known as input method. -->
<string name="select_input_method">Choose input method</string>
+ <!-- Button to access the language settings of the current input method. [CHAR LIMIT=50]-->
+ <string name="input_method_language_settings">Language Settings</string>
<!-- Summary text of a toggle switch to enable/disable use of the IME while a physical
keyboard is connected -->
<string name="show_ime">Keep it on screen while physical keyboard is active</string>
@@ -6534,4 +6536,23 @@ ul.</string>
<string name="bg_user_sound_notification_button_mute">Mute</string>
<!-- Notification text to mute the sound from the background user [CHAR LIMIT=NOTIF_BODY]-->
<string name="bg_user_sound_notification_message">Tap to mute sound</string>
+
+ <!-- User visible title for the keyboard shortcut that takes the user to the browser app. [CHAR LIMIT=70] -->
+ <string name="keyboard_shortcut_group_applications_browser">Browser</string>
+ <!-- User visible title for the keyboard shortcut that takes the user to the contacts app. [CHAR LIMIT=70] -->
+ <string name="keyboard_shortcut_group_applications_contacts">Contacts</string>
+ <!-- User visible title for the keyboard shortcut that takes the user to the email app. [CHAR LIMIT=70] -->
+ <string name="keyboard_shortcut_group_applications_email">Email</string>
+ <!-- User visible title for the keyboard shortcut that takes the user to the SMS messaging app. [CHAR LIMIT=70] -->
+ <string name="keyboard_shortcut_group_applications_sms">SMS</string>
+ <!-- User visible title for the keyboard shortcut that takes the user to the music app. [CHAR LIMIT=70] -->
+ <string name="keyboard_shortcut_group_applications_music">Music</string>
+ <!-- User visible title for the keyboard shortcut that takes the user to the calendar app. [CHAR LIMIT=70] -->
+ <string name="keyboard_shortcut_group_applications_calendar">Calendar</string>
+ <!-- User visible title for the keyboard shortcut that takes the user to the calculator app. [CHAR LIMIT=70] -->
+ <string name="keyboard_shortcut_group_applications_calculator">Calculator</string>
+ <!-- User visible title for the keyboard shortcut that takes the user to the maps app. [CHAR LIMIT=70] -->
+ <string name="keyboard_shortcut_group_applications_maps">Maps</string>
+ <!-- User visible title for the keyboard shortcut group containing system-wide application launch shortcuts. [CHAR-LIMIT=70] -->
+ <string name="keyboard_shortcut_group_applications">Applications</string>
</resources>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 419a615d92ff..09688f2f7bec 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -523,6 +523,7 @@
<java-symbol type="integer" name="config_defaultAnalogClockSecondsHandFps"/>
<java-symbol type="bool" name="config_notificationCloseButtonSupported"/>
<java-symbol type="bool" name="config_enableGaiaEducationInPrivateSpace"/>
+ <java-symbol type="bool" name="config_enableUdcSysfsUsbStateUpdate"/>
<java-symbol type="color" name="tab_indicator_text_v4" />
@@ -1577,6 +1578,8 @@
<java-symbol type="layout" name="input_method" />
<java-symbol type="layout" name="input_method_extract_view" />
<java-symbol type="layout" name="input_method_switch_item" />
+ <java-symbol type="layout" name="input_method_switch_item_new" />
+ <java-symbol type="layout" name="input_method_switch_dialog_new" />
<java-symbol type="layout" name="input_method_switch_dialog_title" />
<java-symbol type="layout" name="js_prompt" />
<java-symbol type="layout" name="list_content_simple" />
@@ -2006,6 +2009,7 @@
<java-symbol type="array" name="config_notificationFallbackVibeWaveform" />
<java-symbol type="bool" name="config_enableServerNotificationEffectsForAutomotive" />
<java-symbol type="bool" name="config_useAttentionLight" />
+ <java-symbol type="bool" name="config_enableNotificationAccessibilityEvents" />
<java-symbol type="bool" name="config_adaptive_sleep_available" />
<java-symbol type="bool" name="config_camera_autorotate"/>
<java-symbol type="bool" name="config_animateScreenLights" />
@@ -2551,6 +2555,7 @@
<java-symbol type="dimen" name="input_method_nav_key_button_ripple_max_width" />
<java-symbol type="drawable" name="ic_ime_nav_back" />
<java-symbol type="drawable" name="ic_ime_switcher" />
+ <java-symbol type="drawable" name="ic_ime_switcher_new" />
<java-symbol type="id" name="input_method_nav_back" />
<java-symbol type="id" name="input_method_nav_buttons" />
<java-symbol type="id" name="input_method_nav_center_group" />
@@ -5399,6 +5404,7 @@
<java-symbol type="style" name="Theme.DeviceDefault.DialogWhenLarge" />
<java-symbol type="style" name="Theme.DeviceDefault.DocumentsUI" />
<java-symbol type="style" name="Theme.DeviceDefault.InputMethod" />
+ <java-symbol type="style" name="Theme.DeviceDefault.InputMethodSwitcherDialog" />
<java-symbol type="style" name="Theme.DeviceDefault.Light.DarkActionBar" />
<java-symbol type="style" name="Theme.DeviceDefault.Light.Dialog.FixedSize" />
<java-symbol type="style" name="Theme.DeviceDefault.Light.Dialog.MinWidth" />
@@ -5560,4 +5566,15 @@
<java-symbol type="string" name="bg_user_sound_notification_button_switch_user" />
<java-symbol type="string" name="bg_user_sound_notification_button_mute" />
<java-symbol type="string" name="bg_user_sound_notification_message" />
+
+ <!-- Keyboard Shortcut default category names. -->
+ <java-symbol type="string" name="keyboard_shortcut_group_applications_browser" />
+ <java-symbol type="string" name="keyboard_shortcut_group_applications_calculator" />
+ <java-symbol type="string" name="keyboard_shortcut_group_applications_calendar" />
+ <java-symbol type="string" name="keyboard_shortcut_group_applications_contacts" />
+ <java-symbol type="string" name="keyboard_shortcut_group_applications_email" />
+ <java-symbol type="string" name="keyboard_shortcut_group_applications_maps" />
+ <java-symbol type="string" name="keyboard_shortcut_group_applications_music" />
+ <java-symbol type="string" name="keyboard_shortcut_group_applications_sms" />
+ <java-symbol type="string" name="keyboard_shortcut_group_applications" />
</resources>
diff --git a/core/res/res/values/themes_device_defaults.xml b/core/res/res/values/themes_device_defaults.xml
index 382ff0441fd2..f5c67387cb92 100644
--- a/core/res/res/values/themes_device_defaults.xml
+++ b/core/res/res/values/themes_device_defaults.xml
@@ -6179,4 +6179,10 @@ easier.
<item name="colorListDivider">@color/list_divider_opacity_device_default_light</item>
<item name="opacityListDivider">@color/list_divider_opacity_device_default_light</item>
</style>
+
+ <!-- Device default theme for the Input Method Switcher dialog. -->
+ <style name="Theme.DeviceDefault.InputMethodSwitcherDialog" parent="Theme.DeviceDefault.Dialog.Alert.DayNight">
+ <item name="windowMinWidthMajor">@null</item>
+ <item name="windowMinWidthMinor">@null</item>
+ </style>
</resources>
diff --git a/core/res/res/xml/power_profile.xml b/core/res/res/xml/power_profile.xml
index fc63657f04d0..f67ad3f5575e 100644
--- a/core/res/res/xml/power_profile.xml
+++ b/core/res/res/xml/power_profile.xml
@@ -33,14 +33,14 @@
There must be one of these for each display, labeled:
ambient.on.display0, ambient.on.display1, etc...
- Each display suffix number should match it's ordinal in its display device config.
+ Each display suffix number should match its ordinal in its display device config.
-->
<item name="ambient.on.display0">0.1</item> <!-- ~100mA -->
<!-- Average battery current draw of display0 while on without backlight.
There must be one of these for each display, labeled:
screen.on.display0, screen.on.display1, etc...
- Each display suffix number should match it's ordinal in its display device config.
+ Each display suffix number should match its ordinal in its display device config.
-->
<item name="screen.on.display0">0.1</item> <!-- ~100mA -->
<!-- Average battery current draw of the backlight at full brightness.
@@ -50,7 +50,7 @@
There must be one of these for each display, labeled:
screen.full.display0, screen.full.display1, etc...
- Each display suffix number should match it's ordinal in its display device config.
+ Each display suffix number should match its ordinal in its display device config.
-->
<item name="screen.full.display0">0.1</item> <!-- ~100mA -->
diff --git a/core/tests/InputMethodCoreTests/src/android/view/inputmethod/CursorAnchorInfoTest.java b/core/tests/InputMethodCoreTests/src/android/view/inputmethod/CursorAnchorInfoTest.java
index 9d7d71d8d539..616c72ec6078 100644
--- a/core/tests/InputMethodCoreTests/src/android/view/inputmethod/CursorAnchorInfoTest.java
+++ b/core/tests/InputMethodCoreTests/src/android/view/inputmethod/CursorAnchorInfoTest.java
@@ -20,8 +20,8 @@ import static org.junit.Assert.assertEquals;
import android.graphics.Matrix;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
-import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/core/tests/InputMethodCoreTests/src/android/view/inputmethod/DeleteRangeGestureTest.java b/core/tests/InputMethodCoreTests/src/android/view/inputmethod/DeleteRangeGestureTest.java
index d7b911dda672..d0a4141eb9ed 100644
--- a/core/tests/InputMethodCoreTests/src/android/view/inputmethod/DeleteRangeGestureTest.java
+++ b/core/tests/InputMethodCoreTests/src/android/view/inputmethod/DeleteRangeGestureTest.java
@@ -22,8 +22,8 @@ import static org.junit.Assert.assertNotNull;
import android.graphics.RectF;
import android.platform.test.annotations.Presubmit;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
-import androidx.test.runner.AndroidJUnit4;
import com.android.compatibility.common.util.ApiTest;
diff --git a/core/tests/InputMethodCoreTests/src/android/view/inputmethod/EditorInfoTest.java b/core/tests/InputMethodCoreTests/src/android/view/inputmethod/EditorInfoTest.java
index 4839dd27b283..013117e89c3e 100644
--- a/core/tests/InputMethodCoreTests/src/android/view/inputmethod/EditorInfoTest.java
+++ b/core/tests/InputMethodCoreTests/src/android/view/inputmethod/EditorInfoTest.java
@@ -45,8 +45,8 @@ import android.util.StringBuilderPrinter;
import android.view.MotionEvent;
import android.view.autofill.AutofillId;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
-import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/core/tests/InputMethodCoreTests/src/android/view/inputmethod/InputMethodInfoTest.java b/core/tests/InputMethodCoreTests/src/android/view/inputmethod/InputMethodInfoTest.java
index 36ab0d4b0868..61bf1378fc36 100644
--- a/core/tests/InputMethodCoreTests/src/android/view/inputmethod/InputMethodInfoTest.java
+++ b/core/tests/InputMethodCoreTests/src/android/view/inputmethod/InputMethodInfoTest.java
@@ -28,9 +28,9 @@ import android.os.Bundle;
import android.os.Parcel;
import android.platform.test.flag.junit.SetFlagsRule;
-import androidx.test.InstrumentationRegistry;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
-import androidx.test.runner.AndroidJUnit4;
+import androidx.test.platform.app.InstrumentationRegistry;
import com.android.frameworks.inputmethodcoretests.R;
@@ -70,7 +70,7 @@ public class InputMethodInfoTest {
assertThat(imi.supportsInlineSuggestionsWithTouchExploration(), is(false));
assertThat(imi.supportsStylusHandwriting(), is(false));
assertThat(imi.createStylusHandwritingSettingsActivityIntent(), equalTo(null));
- if (Flags.imeSwitcherRevamp()) {
+ if (Flags.imeSwitcherRevampApi()) {
assertThat(imi.createImeLanguageSettingsActivityIntent(), equalTo(null));
}
}
@@ -135,7 +135,7 @@ public class InputMethodInfoTest {
private InputMethodInfo buildInputMethodForTest(final @XmlRes int metaDataRes)
throws Exception {
- final Context context = InstrumentationRegistry.getContext();
+ final Context context = InstrumentationRegistry.getInstrumentation().getContext();
final ServiceInfo serviceInfo = new ServiceInfo();
serviceInfo.applicationInfo = context.getApplicationInfo();
serviceInfo.packageName = context.getPackageName();
diff --git a/core/tests/InputMethodCoreTests/src/android/view/inputmethod/InputMethodManagerTest.java b/core/tests/InputMethodCoreTests/src/android/view/inputmethod/InputMethodManagerTest.java
index d70572444128..812b3f5cd153 100644
--- a/core/tests/InputMethodCoreTests/src/android/view/inputmethod/InputMethodManagerTest.java
+++ b/core/tests/InputMethodCoreTests/src/android/view/inputmethod/InputMethodManagerTest.java
@@ -24,9 +24,9 @@ import static org.junit.Assert.assertNotNull;
import android.content.Context;
import android.hardware.display.DisplayManager;
-import androidx.test.InstrumentationRegistry;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
-import androidx.test.runner.AndroidJUnit4;
+import androidx.test.platform.app.InstrumentationRegistry;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/core/tests/InputMethodCoreTests/src/android/view/inputmethod/InputMethodSubtypeArrayTest.java b/core/tests/InputMethodCoreTests/src/android/view/inputmethod/InputMethodSubtypeArrayTest.java
index e7b1110f898a..73ff30408a7b 100644
--- a/core/tests/InputMethodCoreTests/src/android/view/inputmethod/InputMethodSubtypeArrayTest.java
+++ b/core/tests/InputMethodCoreTests/src/android/view/inputmethod/InputMethodSubtypeArrayTest.java
@@ -26,8 +26,8 @@ import android.os.Parcel;
import android.platform.test.annotations.Presubmit;
import android.view.inputmethod.InputMethodSubtype.InputMethodSubtypeBuilder;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
-import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/core/tests/InputMethodCoreTests/src/android/view/inputmethod/InputMethodSubtypeTest.java b/core/tests/InputMethodCoreTests/src/android/view/inputmethod/InputMethodSubtypeTest.java
index 5095cad1b607..4c76992cbcac 100644
--- a/core/tests/InputMethodCoreTests/src/android/view/inputmethod/InputMethodSubtypeTest.java
+++ b/core/tests/InputMethodCoreTests/src/android/view/inputmethod/InputMethodSubtypeTest.java
@@ -27,8 +27,8 @@ import android.annotation.Nullable;
import android.os.Parcel;
import android.view.inputmethod.InputMethodSubtype.InputMethodSubtypeBuilder;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
-import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/core/tests/InputMethodCoreTests/src/android/view/inputmethod/InsertGestureTest.java b/core/tests/InputMethodCoreTests/src/android/view/inputmethod/InsertGestureTest.java
index 47a724d36038..608dd4d9fca1 100644
--- a/core/tests/InputMethodCoreTests/src/android/view/inputmethod/InsertGestureTest.java
+++ b/core/tests/InputMethodCoreTests/src/android/view/inputmethod/InsertGestureTest.java
@@ -22,8 +22,8 @@ import static org.junit.Assert.assertNotNull;
import android.graphics.PointF;
import android.platform.test.annotations.Presubmit;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
-import androidx.test.runner.AndroidJUnit4;
import com.android.compatibility.common.util.ApiTest;
diff --git a/core/tests/InputMethodCoreTests/src/android/view/inputmethod/InsertModeGestureTest.java b/core/tests/InputMethodCoreTests/src/android/view/inputmethod/InsertModeGestureTest.java
index a94f8772fcd0..bb6a944ba17f 100644
--- a/core/tests/InputMethodCoreTests/src/android/view/inputmethod/InsertModeGestureTest.java
+++ b/core/tests/InputMethodCoreTests/src/android/view/inputmethod/InsertModeGestureTest.java
@@ -24,8 +24,8 @@ import android.os.CancellationSignal;
import android.os.CancellationSignalBeamer;
import android.platform.test.annotations.Presubmit;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
-import androidx.test.runner.AndroidJUnit4;
import com.android.compatibility.common.util.ApiTest;
diff --git a/core/tests/InputMethodCoreTests/src/android/view/inputmethod/SelectGestureTest.java b/core/tests/InputMethodCoreTests/src/android/view/inputmethod/SelectGestureTest.java
index b2eb07c0a9e7..4cbd7ab1ef65 100644
--- a/core/tests/InputMethodCoreTests/src/android/view/inputmethod/SelectGestureTest.java
+++ b/core/tests/InputMethodCoreTests/src/android/view/inputmethod/SelectGestureTest.java
@@ -22,8 +22,8 @@ import static org.junit.Assert.assertNotNull;
import android.graphics.RectF;
import android.platform.test.annotations.Presubmit;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
-import androidx.test.runner.AndroidJUnit4;
import com.android.compatibility.common.util.ApiTest;
diff --git a/core/tests/InputMethodCoreTests/src/android/view/inputmethod/SelectRangeGestureTest.java b/core/tests/InputMethodCoreTests/src/android/view/inputmethod/SelectRangeGestureTest.java
index df63a4aaaefe..c1e2197b8d85 100644
--- a/core/tests/InputMethodCoreTests/src/android/view/inputmethod/SelectRangeGestureTest.java
+++ b/core/tests/InputMethodCoreTests/src/android/view/inputmethod/SelectRangeGestureTest.java
@@ -22,8 +22,8 @@ import static org.junit.Assert.assertNotNull;
import android.graphics.RectF;
import android.platform.test.annotations.Presubmit;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
-import androidx.test.runner.AndroidJUnit4;
import com.android.compatibility.common.util.ApiTest;
diff --git a/core/tests/InputMethodCoreTests/src/android/view/inputmethod/SparseRectFArrayTest.java b/core/tests/InputMethodCoreTests/src/android/view/inputmethod/SparseRectFArrayTest.java
index f264cc630dc5..724d729c950f 100644
--- a/core/tests/InputMethodCoreTests/src/android/view/inputmethod/SparseRectFArrayTest.java
+++ b/core/tests/InputMethodCoreTests/src/android/view/inputmethod/SparseRectFArrayTest.java
@@ -25,8 +25,8 @@ import android.graphics.RectF;
import android.os.Parcel;
import android.view.inputmethod.SparseRectFArray.SparseRectFArrayBuilder;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
-import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/core/tests/InputMethodCoreTests/src/com/android/internal/inputmethod/InputConnectionWrapperTest.java b/core/tests/InputMethodCoreTests/src/com/android/internal/inputmethod/InputConnectionWrapperTest.java
index a6262944e8b0..9eb5dd1a2422 100644
--- a/core/tests/InputMethodCoreTests/src/com/android/internal/inputmethod/InputConnectionWrapperTest.java
+++ b/core/tests/InputMethodCoreTests/src/com/android/internal/inputmethod/InputConnectionWrapperTest.java
@@ -22,8 +22,8 @@ import android.platform.test.annotations.Presubmit;
import android.view.inputmethod.InputConnection;
import android.view.inputmethod.InputConnectionWrapper;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
-import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/core/tests/InputMethodCoreTests/src/com/android/internal/inputmethod/InputMethodDebugTest.java b/core/tests/InputMethodCoreTests/src/com/android/internal/inputmethod/InputMethodDebugTest.java
index 32bfdcb7b217..6ac36398ad55 100644
--- a/core/tests/InputMethodCoreTests/src/com/android/internal/inputmethod/InputMethodDebugTest.java
+++ b/core/tests/InputMethodCoreTests/src/com/android/internal/inputmethod/InputMethodDebugTest.java
@@ -20,8 +20,8 @@ import static org.junit.Assert.assertEquals;
import android.view.WindowManager.LayoutParams;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
-import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/core/tests/InputMethodCoreTests/src/com/android/internal/inputmethod/SubtypeLocaleUtilsTest.java b/core/tests/InputMethodCoreTests/src/com/android/internal/inputmethod/SubtypeLocaleUtilsTest.java
index ba6390808151..7b0a5dacbea0 100644
--- a/core/tests/InputMethodCoreTests/src/com/android/internal/inputmethod/SubtypeLocaleUtilsTest.java
+++ b/core/tests/InputMethodCoreTests/src/com/android/internal/inputmethod/SubtypeLocaleUtilsTest.java
@@ -18,8 +18,8 @@ package com.android.internal.inputmethod;
import static org.junit.Assert.assertEquals;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
-import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/core/tests/batterystatstests/BatteryUsageStatsProtoTests/Android.bp b/core/tests/batterystatstests/BatteryUsageStatsProtoTests/Android.bp
deleted file mode 100644
index 1fb5f2c0789b..000000000000
--- a/core/tests/batterystatstests/BatteryUsageStatsProtoTests/Android.bp
+++ /dev/null
@@ -1,30 +0,0 @@
-package {
- // See: http://go/android-license-faq
- // A large-scale-change added 'default_applicable_licenses' to import
- // all of the 'license_kinds' from "frameworks_base_license"
- // to get the below license kinds:
- // SPDX-license-identifier-Apache-2.0
- default_applicable_licenses: ["frameworks_base_license"],
-}
-
-android_test {
- name: "BatteryUsageStatsProtoTests",
- srcs: ["src/**/*.java"],
-
- static_libs: [
- "androidx.test.rules",
- "junit",
- "mockito-target-minus-junit4",
- "platform-test-annotations",
- "platformprotosnano",
- "statsdprotolite",
- "truth",
- ],
-
- libs: ["android.test.runner"],
-
- platform_apis: true,
- certificate: "platform",
-
- test_suites: ["device-tests"],
-}
diff --git a/core/tests/coretests/Android.bp b/core/tests/coretests/Android.bp
index d2771691c50c..41696dfa782e 100644
--- a/core/tests/coretests/Android.bp
+++ b/core/tests/coretests/Android.bp
@@ -63,7 +63,6 @@ android_test {
"-c fa",
],
static_libs: [
- "A11yChecker",
"collector-device-lib-platform",
"frameworks-base-testutils",
"core-test-rules", // for libcore.dalvik.system.CloseGuardSupport
diff --git a/core/tests/coretests/src/android/animation/AnimatorSetCallsTest.java b/core/tests/coretests/src/android/animation/AnimatorSetCallsTest.java
index cb3f99c37a4f..33a46d0fde17 100644
--- a/core/tests/coretests/src/android/animation/AnimatorSetCallsTest.java
+++ b/core/tests/coretests/src/android/animation/AnimatorSetCallsTest.java
@@ -35,6 +35,8 @@ import org.junit.Test;
import java.util.ArrayList;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicReference;
+
@MediumTest
public class AnimatorSetCallsTest {
@@ -447,6 +449,43 @@ public class AnimatorSetCallsTest {
mActivity.runOnUiThread(() -> {});
}
+ @Test
+ public void startAfterSeek() throws Throwable {
+ ArrayList<Float> values = new ArrayList<>();
+ AtomicReference<CountDownLatch> drawLatch = new AtomicReference<>(new CountDownLatch(1));
+
+ mActivity.runOnUiThread(() -> {
+ mAnimator.setDuration(300);
+ mAnimator.setInterpolator(null);
+ View view = (View) mAnimator.getTarget();
+ view.getViewTreeObserver().addOnDrawListener(() -> {
+ values.add(view.getTranslationX());
+ drawLatch.get().countDown();
+ });
+ mSet1.setCurrentPlayTime(150);
+ });
+
+ assertTrue(drawLatch.get().await(1, TimeUnit.SECONDS));
+ drawLatch.set(new CountDownLatch(1));
+
+ mActivity.runOnUiThread(() -> {
+ assertEquals(1, values.size());
+ assertEquals(50f, values.get(0), 0.01f);
+ mSet1.start();
+ });
+
+ assertTrue(drawLatch.get().await(1, TimeUnit.SECONDS));
+
+ mActivity.runOnUiThread(() -> {
+ assertTrue(values.size() >= 2);
+ float lastValue = values.get(0);
+ for (int i = 1; i < values.size(); i++) {
+ assertTrue(values.get(i) >= lastValue);
+ lastValue = values.get(i);
+ }
+ });
+ }
+
private void waitForOnUiThread(PollingCheck.PollingCheckCondition condition) {
final boolean[] value = new boolean[1];
PollingCheck.waitFor(() -> {
diff --git a/core/tests/coretests/src/android/animation/OWNERS b/core/tests/coretests/src/android/animation/OWNERS
new file mode 100644
index 000000000000..1eefb3a3dc65
--- /dev/null
+++ b/core/tests/coretests/src/android/animation/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/animation/OWNERS
diff --git a/core/tests/coretests/src/android/app/activity/ActivityThreadTest.java b/core/tests/coretests/src/android/app/activity/ActivityThreadTest.java
index f87a9e2b3643..294352e7f928 100644
--- a/core/tests/coretests/src/android/app/activity/ActivityThreadTest.java
+++ b/core/tests/coretests/src/android/app/activity/ActivityThreadTest.java
@@ -25,8 +25,6 @@ import static android.platform.test.flag.junit.SetFlagsRule.DefaultInitValueType
import static android.view.Display.DEFAULT_DISPLAY;
import static android.view.Display.INVALID_DISPLAY;
-import static com.android.window.flags.Flags.FLAG_ACTIVITY_WINDOW_INFO_FLAG;
-
import static com.google.common.truth.Truth.assertThat;
import static org.junit.Assert.assertEquals;
@@ -92,7 +90,8 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.mockito.MockitoAnnotations;
+import org.mockito.junit.MockitoJUnit;
+import org.mockito.junit.MockitoRule;
import java.util.ArrayList;
import java.util.List;
@@ -119,6 +118,9 @@ public class ActivityThreadTest {
// few sequence numbers the framework used to launch the test activity.
private static final int BASE_SEQ = 10000000;
+ @Rule
+ public final MockitoRule mocks = MockitoJUnit.rule();
+
@Rule(order = 0)
public final ActivityTestRule<TestActivity> mActivityTestRule =
new ActivityTestRule<>(TestActivity.class, true /* initialTouchMode */,
@@ -135,8 +137,6 @@ public class ActivityThreadTest {
@Before
public void setup() {
- MockitoAnnotations.initMocks(this);
-
// Keep track of the original controller, so that it can be used to restore in tearDown()
// when there is override in some test cases.
mOriginalWindowTokenClientController = WindowTokenClientController.getInstance();
@@ -810,7 +810,6 @@ public class ActivityThreadTest {
@Test
public void testActivityWindowInfoChanged_activityLaunch() {
- mSetFlagsRule.enableFlags(FLAG_ACTIVITY_WINDOW_INFO_FLAG);
ClientTransactionListenerController.getInstance().registerActivityWindowInfoChangedListener(
mActivityWindowInfoListener);
@@ -825,7 +824,6 @@ public class ActivityThreadTest {
@Test
public void testActivityWindowInfoChanged_activityRelaunch() {
- mSetFlagsRule.enableFlags(FLAG_ACTIVITY_WINDOW_INFO_FLAG);
ClientTransactionListenerController.getInstance().registerActivityWindowInfoChangedListener(
mActivityWindowInfoListener);
@@ -866,7 +864,6 @@ public class ActivityThreadTest {
@Test
public void testActivityWindowInfoChanged_activityConfigurationChanged() {
- mSetFlagsRule.enableFlags(FLAG_ACTIVITY_WINDOW_INFO_FLAG);
ClientTransactionListenerController.getInstance().registerActivityWindowInfoChangedListener(
mActivityWindowInfoListener);
diff --git a/core/tests/coretests/src/android/app/servertransaction/ClientTransactionItemTest.java b/core/tests/coretests/src/android/app/servertransaction/ClientTransactionItemTest.java
index c7060adc1ca1..72c4639277bb 100644
--- a/core/tests/coretests/src/android/app/servertransaction/ClientTransactionItemTest.java
+++ b/core/tests/coretests/src/android/app/servertransaction/ClientTransactionItemTest.java
@@ -47,10 +47,12 @@ import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
+import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
+import org.mockito.junit.MockitoJUnit;
+import org.mockito.junit.MockitoRule;
/**
* Tests for subtypes of {@link ClientTransactionItem}.
@@ -63,6 +65,9 @@ import org.mockito.MockitoAnnotations;
@Presubmit
public class ClientTransactionItemTest {
+ @Rule
+ public final MockitoRule mocks = MockitoJUnit.rule();
+
@Mock
private ClientTransactionHandler mHandler;
@Mock
@@ -89,7 +94,6 @@ public class ClientTransactionItemTest {
@Before
public void setup() {
- MockitoAnnotations.initMocks(this);
mGlobalConfig = new Configuration();
mConfiguration = new Configuration();
mActivitiesToBeDestroyed = new ArrayMap<>();
diff --git a/core/tests/coretests/src/android/app/servertransaction/ClientTransactionListenerControllerTest.java b/core/tests/coretests/src/android/app/servertransaction/ClientTransactionListenerControllerTest.java
index 0b270d485b97..f9609fcad8a1 100644
--- a/core/tests/coretests/src/android/app/servertransaction/ClientTransactionListenerControllerTest.java
+++ b/core/tests/coretests/src/android/app/servertransaction/ClientTransactionListenerControllerTest.java
@@ -53,15 +53,14 @@ import android.window.WindowTokenClient;
import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
-import com.android.window.flags.Flags;
-
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InOrder;
import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
+import org.mockito.junit.MockitoJUnit;
+import org.mockito.junit.MockitoRule;
import java.util.concurrent.RejectedExecutionException;
import java.util.function.BiConsumer;
@@ -78,6 +77,8 @@ import java.util.function.BiConsumer;
public class ClientTransactionListenerControllerTest {
@Rule
+ public final MockitoRule mocks = MockitoJUnit.rule();
+ @Rule
public final SetFlagsRule mSetFlagsRule = new SetFlagsRule(DEVICE_DEFAULT);
@Mock
@@ -102,7 +103,6 @@ public class ClientTransactionListenerControllerTest {
@Before
public void setup() {
- MockitoAnnotations.initMocks(this);
mDisplayManager = new DisplayManagerGlobal(mIDisplayManager);
mHandler = getInstrumentation().getContext().getMainThreadHandler();
mController = spy(ClientTransactionListenerController
@@ -167,8 +167,6 @@ public class ClientTransactionListenerControllerTest {
@Test
public void testActivityWindowInfoChangedListener() {
- mSetFlagsRule.enableFlags(Flags.FLAG_ACTIVITY_WINDOW_INFO_FLAG);
-
mController.registerActivityWindowInfoChangedListener(mActivityWindowInfoListener);
final ActivityWindowInfo activityWindowInfo = new ActivityWindowInfo();
activityWindowInfo.set(true /* isEmbedded */, new Rect(0, 0, 1000, 2000),
diff --git a/core/tests/coretests/src/android/app/servertransaction/ObjectPoolTests.java b/core/tests/coretests/src/android/app/servertransaction/ObjectPoolTests.java
index 32e611cf0a1e..e429cfc687bb 100644
--- a/core/tests/coretests/src/android/app/servertransaction/ObjectPoolTests.java
+++ b/core/tests/coretests/src/android/app/servertransaction/ObjectPoolTests.java
@@ -21,12 +21,7 @@ import static android.app.servertransaction.TestUtils.mergedConfig;
import static android.app.servertransaction.TestUtils.referrerIntentList;
import static android.app.servertransaction.TestUtils.resultInfoList;
-import static com.android.window.flags.Flags.FLAG_DISABLE_OBJECT_POOL;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotSame;
-import static org.junit.Assert.assertSame;
import android.annotation.NonNull;
import android.app.ActivityOptions;
@@ -41,27 +36,20 @@ import android.os.Bundle;
import android.os.IBinder;
import android.os.PersistableBundle;
import android.platform.test.annotations.Presubmit;
-import android.platform.test.flag.junit.FlagsParameterization;
-import android.platform.test.flag.junit.SetFlagsRule;
import android.window.ActivityWindowInfo;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
-import com.android.window.flags.Flags;
-
-import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
+import org.mockito.junit.MockitoJUnit;
+import org.mockito.junit.MockitoRule;
-import java.util.List;
import java.util.function.Supplier;
-import platform.test.runner.parameterized.ParameterizedAndroidJunit4;
-import platform.test.runner.parameterized.Parameters;
-
/**
* Tests for {@link ObjectPool}.
*
@@ -71,33 +59,19 @@ import platform.test.runner.parameterized.Parameters;
* <p>This test class is a part of Window Manager Service tests and specified in
* {@link com.android.server.wm.test.filters.FrameworksTestsFilter}.
*/
-@RunWith(ParameterizedAndroidJunit4.class)
+@RunWith(AndroidJUnit4.class)
@SmallTest
@Presubmit
public class ObjectPoolTests {
- @Parameters(name = "{0}")
- public static List<FlagsParameterization> getParams() {
- return FlagsParameterization.allCombinationsOf(FLAG_DISABLE_OBJECT_POOL);
- }
-
@Rule
- public SetFlagsRule mSetFlagsRule;
+ public final MockitoRule mocks = MockitoJUnit.rule();
@Mock
private IApplicationThread mApplicationThread;
@Mock
private IBinder mActivityToken;
- public ObjectPoolTests(FlagsParameterization flags) {
- mSetFlagsRule = new SetFlagsRule(flags);
- }
-
- @Before
- public void setup() {
- MockitoAnnotations.initMocks(this);
- }
-
// 1. Check if two obtained objects from pool are not the same.
// 2. Check if the state of the object is cleared after recycling.
// 3. Check if the same object is obtained from pool after recycling.
@@ -221,30 +195,11 @@ public class ObjectPoolTests {
item.recycle();
final ObjectPoolItem item2 = obtain.get();
- if (Flags.disableObjectPool()) {
- assertNotSame(item, item2); // Different instance.
- } else {
- assertSame(item, item2);
- }
+ assertNotSame(item, item2); // Different instance.
// Create new object when the pool is empty.
final ObjectPoolItem item3 = obtain.get();
assertNotSame(item, item3);
- if (Flags.disableObjectPool()) {
- // Skip recycle if flag enabled, compare unnecessary.
- return;
- }
- assertEquals(item, item3);
-
- // Reset fields after recycle.
- item.recycle();
-
- assertNotEquals(item, item3);
-
- // Recycled objects are equal.
- item3.recycle();
-
- assertEquals(item, item3);
}
}
diff --git a/core/tests/coretests/src/android/app/servertransaction/TransactionExecutorTests.java b/core/tests/coretests/src/android/app/servertransaction/TransactionExecutorTests.java
index 73b7447a31c0..eb69b9c8b6e1 100644
--- a/core/tests/coretests/src/android/app/servertransaction/TransactionExecutorTests.java
+++ b/core/tests/coretests/src/android/app/servertransaction/TransactionExecutorTests.java
@@ -57,11 +57,13 @@ import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
+import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InOrder;
import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
+import org.mockito.junit.MockitoJUnit;
+import org.mockito.junit.MockitoRule;
import java.util.Arrays;
import java.util.Collections;
@@ -83,6 +85,9 @@ import java.util.stream.Collectors;
@Presubmit
public class TransactionExecutorTests {
+ @Rule
+ public final MockitoRule mocks = MockitoJUnit.rule();
+
@Mock
private ClientTransactionHandler mTransactionHandler;
@Mock
@@ -98,8 +103,6 @@ public class TransactionExecutorTests {
@Before
public void setUp() throws Exception {
- MockitoAnnotations.initMocks(this);
-
mClientRecord = new ActivityClientRecord();
when(mTransactionHandler.getActivityClient(any())).thenReturn(mClientRecord);
diff --git a/core/tests/coretests/src/android/inputmethodservice/ImsConfigurationTrackerTest.java b/core/tests/coretests/src/android/inputmethodservice/ImsConfigurationTrackerTest.java
index 064439e9b113..f5e9cc6953fb 100644
--- a/core/tests/coretests/src/android/inputmethodservice/ImsConfigurationTrackerTest.java
+++ b/core/tests/coretests/src/android/inputmethodservice/ImsConfigurationTrackerTest.java
@@ -24,9 +24,10 @@ import static org.junit.Assert.assertTrue;
import android.content.Context;
import android.content.pm.ActivityInfo;
import android.content.res.Configuration;
+import android.platform.test.annotations.RequiresFlagsEnabled;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
-import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test;
@@ -74,4 +75,33 @@ public class ImsConfigurationTrackerTest {
assertFalse("IME shouldn't restart since it handles configChanges",
didReset.get());
}
+
+ @Test
+ @RequiresFlagsEnabled(android.content.res.Flags.FLAG_HANDLE_ALL_CONFIG_CHANGES)
+ public void testShouldImeRestart_handleResourceUnused() throws Exception {
+ Configuration config = mContext.getResources().getConfiguration();
+ mImsConfigTracker.onInitialize(0 /* handledConfigChanges */);
+ mImsConfigTracker.onBindInput(mContext.getResources());
+ Configuration newConfig = new Configuration(config);
+
+ final AtomicBoolean didReset = new AtomicBoolean();
+ Runnable resetStateRunner = () -> didReset.set(true);
+
+ mImsConfigTracker.onConfigurationChanged(newConfig, resetStateRunner);
+ assertFalse("IME shouldn't restart if config hasn't changed",
+ didReset.get());
+
+ // Screen density changed but IME doesn't handle configChanges
+ newConfig.densityDpi = 99;
+ mImsConfigTracker.onConfigurationChanged(newConfig, resetStateRunner);
+ assertTrue("IME should restart for unhandled configChanges",
+ didReset.get());
+
+ didReset.set(false);
+ // opt-in IME to handle all configuration changes.
+ mImsConfigTracker.setHandledConfigChanges(ActivityInfo.CONFIG_RESOURCES_UNUSED);
+ mImsConfigTracker.onConfigurationChanged(newConfig, resetStateRunner);
+ assertFalse("IME shouldn't restart since it handles configChanges",
+ didReset.get());
+ }
}
diff --git a/core/tests/coretests/src/android/text/format/DateIntervalFormatTest.java b/core/tests/coretests/src/android/text/format/DateIntervalFormatTest.java
index 71c068d7ad46..9750de386271 100644
--- a/core/tests/coretests/src/android/text/format/DateIntervalFormatTest.java
+++ b/core/tests/coretests/src/android/text/format/DateIntervalFormatTest.java
@@ -35,6 +35,7 @@ import static android.text.format.DateUtils.FORMAT_SHOW_YEAR;
import static android.text.format.DateUtils.FORMAT_UTC;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
import android.icu.util.Calendar;
import android.icu.util.TimeZone;
@@ -683,4 +684,12 @@ public class DateIntervalFormatTest {
assertEquals("February 27\u2009\u2013\u2009March 1, 2004",
fmt.apply(1077840000000L, 1078185600000L));
}
+
+ @Test
+ public void testIsLibcoreVFlagEnabled() {
+ // This flag has been fully ramped. It should never be false.
+ assertTrue(DateIntervalFormat.isLibcoreVFlagEnabled());
+ // Call a Android V API in libcore.
+ assertEquals("\ud840\udc2b", Character.toString(0x2002B));
+ }
}
diff --git a/core/tests/coretests/src/android/util/SequenceUtilsTest.java b/core/tests/coretests/src/android/util/SequenceUtilsTest.java
index 020520dbcf85..6ca1751a675b 100644
--- a/core/tests/coretests/src/android/util/SequenceUtilsTest.java
+++ b/core/tests/coretests/src/android/util/SequenceUtilsTest.java
@@ -19,7 +19,7 @@ package android.util;
import static android.util.SequenceUtils.getInitSeq;
import static android.util.SequenceUtils.getNextSeq;
-import static android.util.SequenceUtils.isIncomingSeqNewer;
+import static android.util.SequenceUtils.isIncomingSeqStale;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -60,30 +60,35 @@ public class SequenceUtilsTest {
}
@Test
- public void testIsIncomingSeqNewer() {
- assertTrue(isIncomingSeqNewer(getInitSeq() + 1, getInitSeq() + 10));
- assertFalse(isIncomingSeqNewer(getInitSeq() + 10, getInitSeq() + 1));
- assertTrue(isIncomingSeqNewer(-100, 100));
- assertFalse(isIncomingSeqNewer(100, -100));
- assertTrue(isIncomingSeqNewer(1, 2));
- assertFalse(isIncomingSeqNewer(2, 1));
+ public void testIsIncomingSeqStale() {
+ assertFalse(isIncomingSeqStale(getInitSeq() + 1, getInitSeq() + 10));
+ assertTrue(isIncomingSeqStale(getInitSeq() + 10, getInitSeq() + 1));
+ assertFalse(isIncomingSeqStale(-100, 100));
+ assertTrue(isIncomingSeqStale(100, -100));
+ assertFalse(isIncomingSeqStale(1, 2));
+ assertTrue(isIncomingSeqStale(2, 1));
// Possible incoming seq are all newer than the initial seq.
- assertTrue(isIncomingSeqNewer(getInitSeq(), getInitSeq() + 1));
- assertTrue(isIncomingSeqNewer(getInitSeq(), -100));
- assertTrue(isIncomingSeqNewer(getInitSeq(), 0));
- assertTrue(isIncomingSeqNewer(getInitSeq(), 100));
- assertTrue(isIncomingSeqNewer(getInitSeq(), Integer.MAX_VALUE));
- assertTrue(isIncomingSeqNewer(getInitSeq(), getNextSeq(Integer.MAX_VALUE)));
+ assertFalse(isIncomingSeqStale(getInitSeq(), getInitSeq()));
+ assertFalse(isIncomingSeqStale(getInitSeq(), getInitSeq() + 1));
+ assertFalse(isIncomingSeqStale(getInitSeq(), -100));
+ assertFalse(isIncomingSeqStale(getInitSeq(), 0));
+ assertFalse(isIncomingSeqStale(getInitSeq(), 100));
+ assertFalse(isIncomingSeqStale(getInitSeq(), Integer.MAX_VALUE));
+ assertFalse(isIncomingSeqStale(getInitSeq(), getNextSeq(Integer.MAX_VALUE)));
// False for the same seq.
- assertFalse(isIncomingSeqNewer(getInitSeq(), getInitSeq()));
- assertFalse(isIncomingSeqNewer(100, 100));
- assertFalse(isIncomingSeqNewer(Integer.MAX_VALUE, Integer.MAX_VALUE));
+ assertFalse(isIncomingSeqStale(100, 100));
+ assertFalse(isIncomingSeqStale(Integer.MAX_VALUE, Integer.MAX_VALUE));
- // True when there is a large jump (overflow).
- assertTrue(isIncomingSeqNewer(Integer.MAX_VALUE, getInitSeq() + 1));
- assertTrue(isIncomingSeqNewer(Integer.MAX_VALUE, getInitSeq() + 100));
- assertTrue(isIncomingSeqNewer(Integer.MAX_VALUE, getNextSeq(Integer.MAX_VALUE)));
+ // False when there is a large jump (overflow).
+ assertFalse(isIncomingSeqStale(Integer.MAX_VALUE, getInitSeq() + 1));
+ assertFalse(isIncomingSeqStale(Integer.MAX_VALUE, getInitSeq() + 100));
+ assertFalse(isIncomingSeqStale(Integer.MAX_VALUE, getNextSeq(Integer.MAX_VALUE)));
+
+ // True when the large jump is opposite (curSeq is newer).
+ assertTrue(isIncomingSeqStale(getInitSeq() + 1, Integer.MAX_VALUE));
+ assertTrue(isIncomingSeqStale(getInitSeq() + 100, Integer.MAX_VALUE));
+ assertTrue(isIncomingSeqStale(getNextSeq(Integer.MAX_VALUE), Integer.MAX_VALUE));
}
}
diff --git a/core/tests/coretests/src/android/view/ImeInsetsSourceConsumerTest.java b/core/tests/coretests/src/android/view/ImeInsetsSourceConsumerTest.java
index 47b288993d11..248db65d7435 100644
--- a/core/tests/coretests/src/android/view/ImeInsetsSourceConsumerTest.java
+++ b/core/tests/coretests/src/android/view/ImeInsetsSourceConsumerTest.java
@@ -37,8 +37,12 @@ import android.graphics.Insets;
import android.graphics.Point;
import android.graphics.Rect;
import android.platform.test.annotations.Presubmit;
+import android.platform.test.annotations.RequiresFlagsDisabled;
+import android.platform.test.flag.junit.CheckFlagsRule;
+import android.platform.test.flag.junit.DeviceFlagsValueProvider;
import android.view.WindowManager.BadTokenException;
import android.view.WindowManager.LayoutParams;
+import android.view.inputmethod.Flags;
import android.view.inputmethod.ImeTracker;
import android.widget.TextView;
@@ -46,6 +50,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
import org.junit.Before;
+import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mockito;
@@ -61,6 +66,9 @@ import org.mockito.Spy;
@RunWith(AndroidJUnit4.class)
public class ImeInsetsSourceConsumerTest {
+ @Rule
+ public final CheckFlagsRule mCheckFlagsRule = DeviceFlagsValueProvider.createCheckFlagsRule();
+
Context mContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
InsetsSourceConsumer mImeConsumer;
@Spy InsetsController mController;
@@ -112,6 +120,7 @@ public class ImeInsetsSourceConsumerTest {
}
@Test
+ @RequiresFlagsDisabled(Flags.FLAG_REFACTOR_INSETS_CONTROLLER)
public void testImeRequestedVisibleAwaitingControl() {
// Set null control and then request show.
mController.onControlsChanged(new InsetsSourceControl[] { null });
@@ -141,6 +150,7 @@ public class ImeInsetsSourceConsumerTest {
}
@Test
+ @RequiresFlagsDisabled(Flags.FLAG_REFACTOR_INSETS_CONTROLLER)
public void testImeRequestedVisibleAwaitingLeash() {
// Set null control, then request show.
mController.onControlsChanged(new InsetsSourceControl[] { null });
@@ -185,6 +195,7 @@ public class ImeInsetsSourceConsumerTest {
}
@Test
+ @RequiresFlagsDisabled(Flags.FLAG_REFACTOR_INSETS_CONTROLLER)
public void testImeGetAndClearSkipAnimationOnce_expectSkip() {
// Expect IME animation will skipped when the IME is visible at first place.
verifyImeGetAndClearSkipAnimationOnce(true /* hasWindowFocus */, true /* hasViewFocus */,
@@ -192,6 +203,7 @@ public class ImeInsetsSourceConsumerTest {
}
@Test
+ @RequiresFlagsDisabled(Flags.FLAG_REFACTOR_INSETS_CONTROLLER)
public void testImeGetAndClearSkipAnimationOnce_expectNoSkip() {
// Expect IME animation will not skipped if previously no view focused when gained the
// window focus and requesting the IME visible next time.
diff --git a/core/tests/coretests/src/android/view/ViewFrameRateTest.java b/core/tests/coretests/src/android/view/ViewFrameRateTest.java
index c01b51dcade8..62291d405a60 100644
--- a/core/tests/coretests/src/android/view/ViewFrameRateTest.java
+++ b/core/tests/coretests/src/android/view/ViewFrameRateTest.java
@@ -29,11 +29,9 @@ import static android.view.flags.Flags.FLAG_VIEW_VELOCITY_API;
import static android.view.flags.Flags.toolkitFrameRateBySizeReadOnly;
import static android.view.flags.Flags.toolkitFrameRateDefaultNormalReadOnly;
import static android.view.flags.Flags.toolkitFrameRateSmallUsesPercentReadOnly;
-import static android.view.flags.Flags.toolkitFrameRateVelocityMappingReadOnly;
import static junit.framework.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import android.annotation.NonNull;
@@ -100,9 +98,8 @@ public class ViewFrameRateTest {
}
@Test
- @RequiresFlagsEnabled({FLAG_VIEW_VELOCITY_API,
- FLAG_TOOLKIT_FRAME_RATE_VIEW_ENABLING_READ_ONLY})
- public void frameRateChangesWhenContentMoves() throws Throwable {
+ @RequiresFlagsEnabled(FLAG_TOOLKIT_FRAME_RATE_VIEW_ENABLING_READ_ONLY)
+ public void highHintWhenContentMoves() throws Throwable {
if (!ViewProperties.vrr_enabled().orElse(true)) {
return;
}
@@ -110,21 +107,15 @@ public class ViewFrameRateTest {
mActivityRule.runOnUiThread(() -> {
mMovingView.offsetLeftAndRight(100);
runAfterDraw(() -> {
- if (toolkitFrameRateVelocityMappingReadOnly()) {
- float frameRate = mViewRoot.getLastPreferredFrameRate();
- assertTrue(frameRate > 0);
- } else {
- assertEquals(FRAME_RATE_CATEGORY_HIGH,
- mViewRoot.getLastPreferredFrameRateCategory());
- }
+ assertEquals(FRAME_RATE_CATEGORY_HIGH_HINT,
+ mViewRoot.getLastPreferredFrameRateCategory());
});
});
waitForAfterDraw();
}
@Test
- @RequiresFlagsEnabled({FLAG_VIEW_VELOCITY_API,
- FLAG_TOOLKIT_FRAME_RATE_VIEW_ENABLING_READ_ONLY})
+ @RequiresFlagsEnabled(FLAG_TOOLKIT_FRAME_RATE_VIEW_ENABLING_READ_ONLY)
public void inputMethodWithContentMoves() throws Throwable {
if (!ViewProperties.vrr_enabled().orElse(true)) {
return;
@@ -136,6 +127,8 @@ public class ViewFrameRateTest {
final WindowManager.LayoutParams attrs = mViewRoot.mWindowAttributes;
attrs.type = TYPE_INPUT_METHOD;
instrumentation.runOnMainSync(() -> {
+ attrs.width = 1;
+ attrs.height = 1;
mViewRoot.setLayoutParams(attrs, false);
});
instrumentation.waitForIdleSync();
@@ -147,14 +140,13 @@ public class ViewFrameRateTest {
mActivityRule.runOnUiThread(() -> {
mMovingView.offsetLeftAndRight(100);
runAfterDraw(() -> {
- if (toolkitFrameRateVelocityMappingReadOnly()) {
- float frameRate = mViewRoot.getLastPreferredFrameRate();
- // frame rate shouldn't be boost with TYPE_INPUT_METHOD window type
- assertTrue(frameRate == 0);
- } else {
- assertEquals(FRAME_RATE_CATEGORY_HIGH,
- mViewRoot.getLastPreferredFrameRateCategory());
- }
+ int expected = toolkitFrameRateBySizeReadOnly()
+ ? FRAME_RATE_CATEGORY_LOW : FRAME_RATE_CATEGORY_NORMAL;
+ float frameRate = mViewRoot.getLastPreferredFrameRate();
+ // frame rate shouldn't be boost with TYPE_INPUT_METHOD window type
+ assertTrue(frameRate == 0);
+ assertEquals(expected,
+ mViewRoot.getLastPreferredFrameRateCategory());
});
});
waitForAfterDraw();
@@ -177,7 +169,7 @@ public class ViewFrameRateTest {
@Test
- @RequiresFlagsEnabled(FLAG_VIEW_VELOCITY_API)
+ @RequiresFlagsEnabled(FLAG_TOOLKIT_FRAME_RATE_VIEW_ENABLING_READ_ONLY)
public void highHintWhenActionMove() throws Throwable {
if (!ViewProperties.vrr_enabled().orElse(true)) {
return;
@@ -227,62 +219,59 @@ public class ViewFrameRateTest {
move.setSource(InputDevice.SOURCE_TOUCHSCREEN);
instrumentation.sendPointerSync(move);
- // We should continue to enable touch boost even when GTE compatibility is present.
+ // Should continue to enable touch boost.
mActivityRule.runOnUiThread(() -> {
mMovingView.offsetLeftAndRight(10);
assertTrue(mViewRoot.getIsTouchBoosting());
});
- now = SystemClock.uptimeMillis();
- MotionEvent up = MotionEvent.obtain(
- now, // downTime
- now, // eventTime
- MotionEvent.ACTION_UP, // action
- position[0], // x
- position[1], // y
- 0 // metaState
- );
- up.setSource(InputDevice.SOURCE_TOUCHSCREEN);
- instrumentation.sendPointerSync(up);
-
- // No touch boost when there is no ongoing pressed gesture.
- mActivityRule.runOnUiThread(() -> {
- mMovingView.offsetLeftAndRight(10);
- assertFalse(mViewRoot.getIsTouchBoosting());
- });
-
down.recycle();
move.recycle();
- up.recycle();
}
+ // When the size of a View is changed, we should boost the frame rate.
@Test
- @RequiresFlagsEnabled(FLAG_VIEW_VELOCITY_API)
- public void frameBoostDisable() throws Throwable {
+ @RequiresFlagsEnabled(FLAG_TOOLKIT_FRAME_RATE_VIEW_ENABLING_READ_ONLY)
+ public void highHintWhenSizeChanged() throws Throwable {
if (!ViewProperties.vrr_enabled().orElse(true)) {
return;
}
+ waitForFrameRateCategoryToSettle();
+ assertTrue(mViewRoot.getLastPreferredFrameRateCategory()
+ < FRAME_RATE_CATEGORY_HIGH_HINT);
+
+ int width = mMovingView.getWidth();
+ int height = mMovingView.getHeight();
+
+ ViewGroup.LayoutParams params = mMovingView.getLayoutParams();
+ params.width = width * 2;
+ params.height = height * 2;
+
+ // frame rate category should be HIGH_HINT when the size is changed
mActivityRule.runOnUiThread(() -> {
- long now = SystemClock.uptimeMillis();
- MotionEvent down = MotionEvent.obtain(
- /* downTime */ now,
- /* eventTime */ now,
- /* action */ MotionEvent.ACTION_DOWN,
- /* x */ 0f,
- /* y */ 0f,
- /* metaState */ 0
- );
- mActivity.dispatchTouchEvent(down);
- mMovingView.offsetLeftAndRight(10);
- });
- mActivityRule.runOnUiThread(() -> {
- mMovingView.invalidate();
+ mMovingView.setLayoutParams(params);
+ runAfterDraw(() -> {
+ assertTrue(mMovingView.getWidth() > width);
+ assertTrue(mMovingView.getHeight() > height);
+ assertEquals(FRAME_RATE_CATEGORY_HIGH_HINT,
+ mViewRoot.getLastPreferredFrameRateCategory());
+ });
});
+ waitForAfterDraw();
+ // set it back to the original size
+ params.width = width;
+ params.height = height;
mActivityRule.runOnUiThread(() -> {
- assertFalse(mViewRoot.getIsTouchBoosting());
- assertFalse(mViewRoot.getIsFrameRateBoosting());
+ mMovingView.setLayoutParams(params);
+ runAfterDraw(() -> {
+ assertEquals(width, mMovingView.getWidth());
+ assertEquals(height, mMovingView.getHeight());
+ assertEquals(FRAME_RATE_CATEGORY_HIGH_HINT,
+ mViewRoot.getLastPreferredFrameRateCategory());
+ });
});
+ waitForAfterDraw();
}
@Test
@@ -804,6 +793,12 @@ public class ViewFrameRateTest {
down.setSource(InputDevice.SOURCE_TOUCHSCREEN);
instrumentation.sendPointerSync(down);
assertEquals(FRAME_RATE_CATEGORY_HIGH_HINT, mViewRoot.getLastPreferredFrameRateCategory());
+
+ // Should still be boost with position changed
+ mActivityRule.runOnUiThread(() -> {
+ mMovingView.offsetLeftAndRight(10);
+ assertTrue(mViewRoot.getIsTouchBoosting());
+ });
}
@LargeTest
diff --git a/core/tests/coretests/src/android/view/ViewRootImplTest.java b/core/tests/coretests/src/android/view/ViewRootImplTest.java
index 9337bf67625a..c5b75ff50da7 100644
--- a/core/tests/coretests/src/android/view/ViewRootImplTest.java
+++ b/core/tests/coretests/src/android/view/ViewRootImplTest.java
@@ -16,6 +16,8 @@
package android.view;
+import static android.util.SequenceUtils.getInitSeq;
+import static android.view.HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING;
import static android.view.Surface.FRAME_RATE_CATEGORY_DEFAULT;
import static android.view.Surface.FRAME_RATE_CATEGORY_HIGH;
import static android.view.Surface.FRAME_RATE_CATEGORY_HIGH_HINT;
@@ -493,8 +495,8 @@ public class ViewRootImplTest {
0, displayInfo, new DisplayAdjustments());
ViewRootImpl viewRootImpl = new ViewRootImpl(sContext, display);
- boolean result = viewRootImpl.performHapticFeedback(
- HapticFeedbackConstants.CONTEXT_CLICK, true, false /* fromIme */);
+ boolean result = viewRootImpl.performHapticFeedback(HapticFeedbackConstants.CONTEXT_CLICK,
+ FLAG_IGNORE_GLOBAL_SETTING, 0 /* privFlags */);
assertThat(result).isFalse();
}
@@ -1555,9 +1557,9 @@ public class ViewRootImplTest {
final InsetsState state0 = new InsetsState();
final InsetsState state1 = new InsetsState();
state0.setDisplayFrame(new Rect(0, 0, 500, 1000));
- state0.setSeq(10000);
+ state0.setSeq(getInitSeq() + 10000);
state1.setDisplayFrame(new Rect(0, 0, 1500, 2000));
- state1.setSeq(10001);
+ state1.setSeq(getInitSeq() + 10001);
final InsetsSourceControl.Array array = new InsetsSourceControl.Array();
sInstrumentation.runOnMainSync(() -> {
diff --git a/core/tests/coretests/src/android/view/WindowInfoTest.java b/core/tests/coretests/src/android/view/WindowInfoTest.java
index d927f0632273..43e678fb634c 100644
--- a/core/tests/coretests/src/android/view/WindowInfoTest.java
+++ b/core/tests/coretests/src/android/view/WindowInfoTest.java
@@ -34,8 +34,8 @@ import android.platform.test.annotations.Presubmit;
import android.text.TextUtils;
import android.view.accessibility.AccessibilityNodeInfo;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
-import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/core/tests/coretests/src/android/view/WindowInsetsTest.java b/core/tests/coretests/src/android/view/WindowInsetsTest.java
index ab4543cb8001..ba1204b9cc23 100644
--- a/core/tests/coretests/src/android/view/WindowInsetsTest.java
+++ b/core/tests/coretests/src/android/view/WindowInsetsTest.java
@@ -17,6 +17,7 @@
package android.view;
import static android.view.WindowInsets.Type.SIZE;
+import static android.view.WindowInsets.Type.captionBar;
import static android.view.WindowInsets.Type.systemBars;
import static org.junit.Assert.assertEquals;
@@ -26,12 +27,14 @@ import android.graphics.Insets;
import android.graphics.Rect;
import android.platform.test.annotations.Presubmit;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
-import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
+import java.util.List;
+
@RunWith(AndroidJUnit4.class)
@SmallTest
@Presubmit
@@ -68,4 +71,17 @@ public class WindowInsetsTest {
true /* compatIgnoreVisibility */, null, null, 0, 0);
assertEquals(Insets.of(0, 10, 0, 0), windowInsets.getSystemWindowInsets());
}
+
+ @Test
+ public void testSetBoundingRectsInBuilder_noInsets_preservedInWindowInsets() {
+ final List<Rect> rects = List.of(new Rect(0, 0, 50, 100));
+ final WindowInsets insets =
+ new WindowInsets.Builder()
+ .setBoundingRects(captionBar(), rects)
+ .setBoundingRectsIgnoringVisibility(captionBar(), rects)
+ .build();
+
+ assertEquals(rects, insets.getBoundingRects(captionBar()));
+ assertEquals(rects, insets.getBoundingRectsIgnoringVisibility(captionBar()));
+ }
}
diff --git a/core/tests/coretests/src/android/view/WindowManagerTests.java b/core/tests/coretests/src/android/view/WindowManagerTests.java
index c5a9d480771e..211d768dde93 100644
--- a/core/tests/coretests/src/android/view/WindowManagerTests.java
+++ b/core/tests/coretests/src/android/view/WindowManagerTests.java
@@ -25,8 +25,8 @@ import static org.junit.Assume.assumeTrue;
import android.platform.test.annotations.Presubmit;
import android.platform.test.flag.junit.SetFlagsRule;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
-import androidx.test.runner.AndroidJUnit4;
import org.junit.Rule;
import org.junit.Test;
diff --git a/core/tests/coretests/src/android/view/WindowMetricsTest.java b/core/tests/coretests/src/android/view/WindowMetricsTest.java
index 39ea8af6fed9..f3ddfa68489f 100644
--- a/core/tests/coretests/src/android/view/WindowMetricsTest.java
+++ b/core/tests/coretests/src/android/view/WindowMetricsTest.java
@@ -27,9 +27,9 @@ import android.hardware.display.DisplayManager;
import android.os.Handler;
import android.platform.test.annotations.Presubmit;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
import androidx.test.platform.app.InstrumentationRegistry;
-import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test;
diff --git a/core/tests/coretests/src/android/view/accessibility/AccessibilityNodeInfoTest.java b/core/tests/coretests/src/android/view/accessibility/AccessibilityNodeInfoTest.java
index 3d4918b1bd42..2d82d231e279 100644
--- a/core/tests/coretests/src/android/view/accessibility/AccessibilityNodeInfoTest.java
+++ b/core/tests/coretests/src/android/view/accessibility/AccessibilityNodeInfoTest.java
@@ -46,7 +46,7 @@ public class AccessibilityNodeInfoTest {
// The number of fields tested in the corresponding CTS AccessibilityNodeInfoTest:
// See fullyPopulateAccessibilityNodeInfo, assertEqualsAccessibilityNodeInfo,
// and assertAccessibilityNodeInfoCleared in that class.
- private static final int NUM_MARSHALLED_PROPERTIES = 43;
+ private static final int NUM_MARSHALLED_PROPERTIES = 44;
/**
* The number of properties that are purposely not marshalled
diff --git a/core/tests/coretests/src/android/view/accessibility/a11ychecker/OWNERS b/core/tests/coretests/src/android/view/accessibility/a11ychecker/OWNERS
deleted file mode 100644
index 872a1804555b..000000000000
--- a/core/tests/coretests/src/android/view/accessibility/a11ychecker/OWNERS
+++ /dev/null
@@ -1,5 +0,0 @@
-# Android Accessibility Framework owners
-include /core/java/android/view/accessibility/a11ychecker/OWNERS
-include /services/accessibility/OWNERS
-
-yaraabdullatif@google.com
diff --git a/core/tests/coretests/src/android/window/SystemPerformanceHinterTests.java b/core/tests/coretests/src/android/window/SystemPerformanceHinterTests.java
index 3147eac30705..8db13c845b38 100644
--- a/core/tests/coretests/src/android/window/SystemPerformanceHinterTests.java
+++ b/core/tests/coretests/src/android/window/SystemPerformanceHinterTests.java
@@ -30,8 +30,8 @@ import static android.window.SystemPerformanceHinter.HINT_SF_FRAME_RATE;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThrows;
import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.ArgumentMatchers.anyBoolean;
+import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.reset;
@@ -42,14 +42,16 @@ import android.platform.test.annotations.Presubmit;
import android.view.SurfaceControl;
import androidx.annotation.NonNull;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
-import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
+import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
+import org.mockito.junit.MockitoJUnit;
+import org.mockito.junit.MockitoRule;
import java.util.HashMap;
@@ -63,6 +65,9 @@ import java.util.HashMap;
@RunWith(AndroidJUnit4.class)
public class SystemPerformanceHinterTests {
+ @Rule
+ public final MockitoRule mockito = MockitoJUnit.rule();
+
private static final int DEFAULT_DISPLAY_ID = android.view.Display.DEFAULT_DISPLAY;
private static final int SECONDARY_DISPLAY_ID = DEFAULT_DISPLAY_ID + 1;
private static final int NO_ROOT_DISPLAY_ID = DEFAULT_DISPLAY_ID + 2;
@@ -83,8 +88,6 @@ public class SystemPerformanceHinterTests {
@Before
public void setUpOnce() {
- MockitoAnnotations.initMocks(this);
-
mDefaultDisplayRoot = new SurfaceControl();
mSecondaryDisplayRoot = new SurfaceControl();
mRootProvider = new SystemPerformanceHinterTests.RootProvider();
diff --git a/core/tests/coretests/src/android/window/TaskFpsCallbackTest.java b/core/tests/coretests/src/android/window/TaskFpsCallbackTest.java
index 2dadb20d8f2c..4589607adb82 100644
--- a/core/tests/coretests/src/android/window/TaskFpsCallbackTest.java
+++ b/core/tests/coretests/src/android/window/TaskFpsCallbackTest.java
@@ -24,9 +24,9 @@ import android.content.Context;
import android.platform.test.annotations.Presubmit;
import android.view.WindowManager;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
import androidx.test.platform.app.InstrumentationRegistry;
-import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test;
diff --git a/core/tests/coretests/src/android/window/WindowContextControllerTest.java b/core/tests/coretests/src/android/window/WindowContextControllerTest.java
index 30c0f2b682db..1f60b3121192 100644
--- a/core/tests/coretests/src/android/window/WindowContextControllerTest.java
+++ b/core/tests/coretests/src/android/window/WindowContextControllerTest.java
@@ -34,14 +34,16 @@ import static org.mockito.Mockito.verify;
import android.os.Binder;
import android.platform.test.annotations.Presubmit;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
-import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
+import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
+import org.mockito.junit.MockitoJUnit;
+import org.mockito.junit.MockitoRule;
/**
* Tests for {@link WindowContextController}
@@ -56,6 +58,10 @@ import org.mockito.MockitoAnnotations;
@SmallTest
@Presubmit
public class WindowContextControllerTest {
+
+ @Rule
+ public final MockitoRule mockito = MockitoJUnit.rule();
+
private WindowContextController mController;
@Mock
private WindowTokenClientController mWindowTokenClientController;
@@ -64,7 +70,6 @@ public class WindowContextControllerTest {
@Before
public void setUp() throws Exception {
- MockitoAnnotations.initMocks(this);
mController = spy(new WindowContextController(mMockToken));
doReturn(mWindowTokenClientController).when(mController).getWindowTokenClientController();
doNothing().when(mMockToken).onConfigurationChanged(any(), anyInt(), anyBoolean());
diff --git a/core/tests/coretests/src/android/window/WindowContextTest.java b/core/tests/coretests/src/android/window/WindowContextTest.java
index b2a404449de7..f1fbd559b8f8 100644
--- a/core/tests/coretests/src/android/window/WindowContextTest.java
+++ b/core/tests/coretests/src/android/window/WindowContextTest.java
@@ -53,10 +53,10 @@ import android.view.WindowManagerGlobal;
import android.view.WindowManagerImpl;
import androidx.annotation.NonNull;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.rule.ActivityTestRule;
-import androidx.test.runner.AndroidJUnit4;
import com.android.frameworks.coretests.R;
diff --git a/core/tests/coretests/src/android/window/WindowMetricsHelperTest.java b/core/tests/coretests/src/android/window/WindowMetricsHelperTest.java
index 7cbb6b44ea57..accc0206e6e0 100644
--- a/core/tests/coretests/src/android/window/WindowMetricsHelperTest.java
+++ b/core/tests/coretests/src/android/window/WindowMetricsHelperTest.java
@@ -31,9 +31,9 @@ import android.platform.test.flag.junit.DeviceFlagsValueProvider;
import android.view.WindowInsets;
import android.view.WindowMetrics;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
import androidx.test.rule.ActivityTestRule;
-import androidx.test.runner.AndroidJUnit4;
import com.android.window.flags.Flags;
diff --git a/core/tests/coretests/src/android/window/WindowOnBackInvokedDispatcherTest.java b/core/tests/coretests/src/android/window/WindowOnBackInvokedDispatcherTest.java
index d4482f243939..d153edd9da39 100644
--- a/core/tests/coretests/src/android/window/WindowOnBackInvokedDispatcherTest.java
+++ b/core/tests/coretests/src/android/window/WindowOnBackInvokedDispatcherTest.java
@@ -44,18 +44,20 @@ import android.view.IWindowSession;
import android.view.ImeBackAnimationController;
import android.view.MotionEvent;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
import androidx.test.platform.app.InstrumentationRegistry;
-import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
+import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
import org.mockito.InOrder;
import org.mockito.Mock;
import org.mockito.Mockito;
-import org.mockito.MockitoAnnotations;
+import org.mockito.junit.MockitoJUnit;
+import org.mockito.junit.MockitoRule;
import java.util.ArrayList;
import java.util.List;
@@ -70,6 +72,10 @@ import java.util.List;
@SmallTest
@Presubmit
public class WindowOnBackInvokedDispatcherTest {
+
+ @Rule
+ public final MockitoRule mockito = MockitoJUnit.rule();
+
@Mock
private IWindowSession mWindowSession;
@Mock
@@ -106,8 +112,6 @@ public class WindowOnBackInvokedDispatcherTest {
@Before
public void setUp() throws Exception {
- MockitoAnnotations.initMocks(this);
-
doReturn(true).when(mApplicationInfo).isOnBackInvokedCallbackEnabled();
doReturn(mApplicationInfo).when(mContext).getApplicationInfo();
@@ -348,12 +352,16 @@ public class WindowOnBackInvokedDispatcherTest {
waitForIdle();
verify(mCallback1).onBackStarted(any(BackEvent.class));
+ assertTrue(mDispatcher.mProgressAnimator.isBackAnimationInProgress());
mDispatcher.unregisterOnBackInvokedCallback(mCallback1);
waitForIdle();
verify(mCallback1).onBackCancelled();
verify(mWindowSession).setOnBackInvokedCallbackInfo(Mockito.eq(mWindow), isNull());
+ // Verify that ProgressAnimator is reset (and thus does not cause further callback event
+ // dispatching)
+ assertFalse(mDispatcher.mProgressAnimator.isBackAnimationInProgress());
}
@Test
diff --git a/core/tests/coretests/src/android/window/WindowTokenClientControllerTest.java b/core/tests/coretests/src/android/window/WindowTokenClientControllerTest.java
index a21c91782214..a3725af04ba6 100644
--- a/core/tests/coretests/src/android/window/WindowTokenClientControllerTest.java
+++ b/core/tests/coretests/src/android/window/WindowTokenClientControllerTest.java
@@ -39,9 +39,11 @@ import android.view.IWindowManager;
import androidx.test.filters.SmallTest;
import org.junit.Before;
+import org.junit.Rule;
import org.junit.Test;
import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
+import org.mockito.junit.MockitoJUnit;
+import org.mockito.junit.MockitoRule;
/**
* Tests for {@link WindowTokenClientController}.
@@ -53,6 +55,9 @@ import org.mockito.MockitoAnnotations;
@Presubmit
public class WindowTokenClientControllerTest {
+ @Rule
+ public final MockitoRule mockito = MockitoJUnit.rule();
+
@Mock
private IWindowManager mWindowManagerService;
@Mock
@@ -67,7 +72,6 @@ public class WindowTokenClientControllerTest {
@Before
public void setup() {
- MockitoAnnotations.initMocks(this);
mController = spy(WindowTokenClientController.createInstanceForTesting());
doReturn(mWindowManagerService).when(mController).getWindowManagerService();
mWindowContextInfo = new WindowContextInfo(mConfiguration, DEFAULT_DISPLAY);
diff --git a/core/tests/coretests/src/android/window/flags/WindowFlagsTest.java b/core/tests/coretests/src/android/window/flags/WindowFlagsTest.java
index 9292f667b27c..aa4c28a55865 100644
--- a/core/tests/coretests/src/android/window/flags/WindowFlagsTest.java
+++ b/core/tests/coretests/src/android/window/flags/WindowFlagsTest.java
@@ -20,8 +20,8 @@ import static com.android.window.flags.Flags.taskFragmentSystemOrganizerFlag;
import android.platform.test.annotations.Presubmit;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
-import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/core/tests/coretests/src/com/android/internal/policy/FoldLockSettingsObserverTest.java b/core/tests/coretests/src/com/android/internal/policy/FoldLockSettingsObserverTest.java
new file mode 100644
index 000000000000..537dd69d017d
--- /dev/null
+++ b/core/tests/coretests/src/com/android/internal/policy/FoldLockSettingsObserverTest.java
@@ -0,0 +1,110 @@
+/*
+ * 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;
+
+import static com.android.internal.policy.FoldLockSettingsObserver.SETTING_VALUE_DEFAULT;
+import static com.android.internal.policy.FoldLockSettingsObserver.SETTING_VALUE_SLEEP_ON_FOLD;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.reset;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.verify;
+
+import android.content.ContentResolver;
+import android.content.Context;
+import android.os.Handler;
+import android.os.UserHandle;
+import android.provider.Settings;
+
+import androidx.test.ext.junit.runners.AndroidJUnit4;
+import androidx.test.filters.SmallTest;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+/**
+ * Tests for {@link FoldLockSettingsObserver}.
+ */
+@SmallTest
+@RunWith(AndroidJUnit4.class)
+public final class FoldLockSettingsObserverTest {
+ @Mock
+ private Context mContext;
+ @Mock
+ private Handler mHandler;
+ @Mock
+ private ContentResolver mContentResolver;
+
+ private FoldLockSettingsObserver mFoldLockSettingsObserver;
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+
+ mFoldLockSettingsObserver =
+ spy(new FoldLockSettingsObserver(mHandler, mContext));
+
+ doReturn(mContentResolver).when(mContext).getContentResolver();
+ doReturn(SETTING_VALUE_DEFAULT).when(mFoldLockSettingsObserver).request();
+
+ mFoldLockSettingsObserver.register();
+ }
+
+ @Test
+ public void shouldRegister() {
+ doReturn(mContentResolver).when(mContext).getContentResolver();
+
+ mFoldLockSettingsObserver.register();
+
+ verify(mContentResolver).registerContentObserver(
+ Settings.System.getUriFor(Settings.System.FOLD_LOCK_BEHAVIOR),
+ false /*notifyForDescendants */,
+ mFoldLockSettingsObserver,
+ UserHandle.USER_ALL
+ );
+ }
+
+ @Test
+ public void shouldUnregister() {
+ mFoldLockSettingsObserver.unregister();
+
+ verify(mContentResolver).unregisterContentObserver(mFoldLockSettingsObserver);
+ }
+
+ @Test
+ public void shouldCacheNewValue() {
+ // Reset the mock's behavior and call count to zero.
+ reset(mFoldLockSettingsObserver);
+ doReturn(SETTING_VALUE_SLEEP_ON_FOLD).when(mFoldLockSettingsObserver).request();
+
+ // Setting is DEFAULT at first.
+ assertEquals(SETTING_VALUE_DEFAULT, mFoldLockSettingsObserver.mFoldLockSetting);
+
+ // Cache new setting.
+ mFoldLockSettingsObserver.requestAndCacheFoldLockSetting();
+
+ // Check that setter was called once and change went through properly.
+ verify(mFoldLockSettingsObserver).setCurrentFoldSetting(anyString());
+ assertTrue(mFoldLockSettingsObserver.isSleepOnFold());
+ }
+}
diff --git a/core/tests/overlaytests/handle_config_change/Android.bp b/core/tests/overlaytests/handle_config_change/Android.bp
new file mode 100644
index 000000000000..2b31d0adab17
--- /dev/null
+++ b/core/tests/overlaytests/handle_config_change/Android.bp
@@ -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 {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "frameworks_base_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["frameworks_base_license"],
+ default_team: "trendy_team_android_resources",
+}
+
+java_test_host {
+ name: "HandleConfigChangeHostTests",
+ srcs: ["src/**/*.java"],
+ libs: [
+ "tradefed",
+ "compatibility-host-util",
+ ],
+ static_libs: [
+ "compatibility-host-util-axt",
+ "flag-junit-host",
+ "android.content.res.flags-aconfig-java-host",
+ ],
+ test_suites: [
+ "device-tests",
+ ],
+ // All APKs required by the tests
+ data: [
+ ":OverlayResApp",
+ ],
+ per_testcase_directory: true,
+}
diff --git a/core/tests/overlaytests/handle_config_change/AndroidTest.xml b/core/tests/overlaytests/handle_config_change/AndroidTest.xml
new file mode 100644
index 000000000000..05ea03686484
--- /dev/null
+++ b/core/tests/overlaytests/handle_config_change/AndroidTest.xml
@@ -0,0 +1,35 @@
+<?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.
+ -->
+
+<configuration description="Config for the handle config change test cases">
+ <option name="test-tag" value="HandleConfigChangeHostTests" />
+ <option name="test-suite-tag" value="apct" />
+
+ <target_preparer class="com.android.tradefed.targetprep.DeviceSetup">
+ <option name="force-skip-system-props" value="true" />
+ <option name="set-global-setting" key="verifier_engprod" value="1" />
+ <option name="set-global-setting" key="verifier_verify_adb_installs" value="0" />
+ <option name="restore-settings" value="true" />
+ </target_preparer>
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="OverlayResApp.apk" />
+ </target_preparer>
+ <test class="com.android.tradefed.testtype.HostTest">
+ <option name="class" value="com.android.overlaytest.HandleConfigChangeHostTests" />
+ </test>
+</configuration>
diff --git a/core/tests/overlaytests/handle_config_change/src/com/android/overlaytest/HandleConfigChangeHostTests.java b/core/tests/overlaytests/handle_config_change/src/com/android/overlaytest/HandleConfigChangeHostTests.java
new file mode 100644
index 000000000000..e91716ab04b3
--- /dev/null
+++ b/core/tests/overlaytests/handle_config_change/src/com/android/overlaytest/HandleConfigChangeHostTests.java
@@ -0,0 +1,47 @@
+/*
+ * 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.overlaytest;
+
+import android.content.res.Flags;
+import android.platform.test.annotations.AppModeFull;
+import android.platform.test.annotations.RequiresFlagsEnabled;
+import android.platform.test.flag.junit.CheckFlagsRule;
+import android.platform.test.flag.junit.host.HostFlagsValueProvider;
+
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+import com.android.tradefed.testtype.junit4.BaseHostJUnit4Test;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+@AppModeFull
+public class HandleConfigChangeHostTests extends BaseHostJUnit4Test {
+ @Rule
+ public final CheckFlagsRule mCheckFlagsRule =
+ HostFlagsValueProvider.createCheckFlagsRule(this::getDevice);
+ private static final String DEVICE_TEST_PKG1 = "com.android.overlaytest.overlayresapp";
+ private static final String DEVICE_TEST_CLASS = "OverlayResTest";
+
+ @Test
+ @RequiresFlagsEnabled(Flags.FLAG_HANDLE_ALL_CONFIG_CHANGES)
+ public void testOverlayRes() throws Exception {
+ runDeviceTests(DEVICE_TEST_PKG1, DEVICE_TEST_PKG1 + "." + DEVICE_TEST_CLASS,
+ "overlayRes_onConfigurationChanged");
+ }
+}
diff --git a/core/tests/overlaytests/handle_config_change/test-apps/OverlayResApp/Android.bp b/core/tests/overlaytests/handle_config_change/test-apps/OverlayResApp/Android.bp
new file mode 100644
index 000000000000..e0f101229080
--- /dev/null
+++ b/core/tests/overlaytests/handle_config_change/test-apps/OverlayResApp/Android.bp
@@ -0,0 +1,43 @@
+// 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 {
+ default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
+android_test_helper_app {
+ name: "OverlayResApp",
+ srcs: ["src/**/*.java"],
+ resource_dirs: ["res"],
+ platform_apis: true,
+ certificate: "platform",
+
+ static_libs: [
+ "androidx.annotation_annotation",
+ "androidx.test.rules",
+ "androidx.test.core",
+ "compatibility-device-util-axt",
+ "truth",
+ ],
+ libs: [
+ "android.test.runner",
+ "android.test.base",
+ ],
+ test_suites: [
+ "device-tests",
+ ],
+
+ manifest: "AndroidManifest.xml",
+}
diff --git a/core/tests/overlaytests/handle_config_change/test-apps/OverlayResApp/AndroidManifest.xml b/core/tests/overlaytests/handle_config_change/test-apps/OverlayResApp/AndroidManifest.xml
new file mode 100644
index 000000000000..617e8796317a
--- /dev/null
+++ b/core/tests/overlaytests/handle_config_change/test-apps/OverlayResApp/AndroidManifest.xml
@@ -0,0 +1,33 @@
+<?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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.overlaytest.overlayresapp"
+ xmlns:tools="http://schemas.android.com/tools">
+
+ <application>
+ <uses-library android:name="android.test.runner" />
+ <activity
+ android:name=".OverlayResActivity"
+ android:exported="false"
+ android:configChanges="assetsPaths">
+ </activity>
+ </application>
+
+ <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
+ android:targetPackage="com.android.overlaytest.overlayresapp" />
+
+</manifest>
diff --git a/core/tests/overlaytests/handle_config_change/test-apps/OverlayResApp/res/values/integers.xml b/core/tests/overlaytests/handle_config_change/test-apps/OverlayResApp/res/values/integers.xml
new file mode 100644
index 000000000000..493333f8268b
--- /dev/null
+++ b/core/tests/overlaytests/handle_config_change/test-apps/OverlayResApp/res/values/integers.xml
@@ -0,0 +1,20 @@
+<?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.
+ -->
+
+<resources>
+ <integer name="test_integer">0</integer>
+</resources> \ No newline at end of file
diff --git a/core/tests/overlaytests/handle_config_change/test-apps/OverlayResApp/res/values/strings.xml b/core/tests/overlaytests/handle_config_change/test-apps/OverlayResApp/res/values/strings.xml
new file mode 100644
index 000000000000..72820d37fdc7
--- /dev/null
+++ b/core/tests/overlaytests/handle_config_change/test-apps/OverlayResApp/res/values/strings.xml
@@ -0,0 +1,21 @@
+<?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.
+ -->
+
+<resources>
+ <string name="app_name">My Application</string>
+ <string name="test_string">Test String</string>
+</resources> \ No newline at end of file
diff --git a/core/tests/overlaytests/handle_config_change/test-apps/OverlayResApp/src/com/android/overlaytest/overlayresapp/OverlayResActivity.java b/core/tests/overlaytests/handle_config_change/test-apps/OverlayResApp/src/com/android/overlaytest/overlayresapp/OverlayResActivity.java
new file mode 100644
index 000000000000..96143ae4e1e1
--- /dev/null
+++ b/core/tests/overlaytests/handle_config_change/test-apps/OverlayResApp/src/com/android/overlaytest/overlayresapp/OverlayResActivity.java
@@ -0,0 +1,50 @@
+/*
+ * 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.overlaytest.overlayresapp;
+
+import android.app.Activity;
+import android.content.res.Configuration;
+import android.os.Bundle;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+
+/**
+ * A test activity to verify that the assets paths configuration changes are received if the
+ * overlay targeting state is changed.
+ */
+public class OverlayResActivity extends Activity {
+ private Runnable mConfigurationChangedCallback;
+ @Override
+ protected void onCreate(@Nullable Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ }
+
+ @Override
+ public void onConfigurationChanged(@NonNull Configuration newConfig) {
+ super.onConfigurationChanged(newConfig);
+ final Runnable callback = mConfigurationChangedCallback;
+ if (callback != null) {
+ callback.run();
+ }
+ }
+
+ /** Registers the callback of onConfigurationChanged. */
+ public void setConfigurationChangedCallback(Runnable callback) {
+ mConfigurationChangedCallback = callback;
+ }
+}
diff --git a/core/tests/overlaytests/handle_config_change/test-apps/OverlayResApp/src/com/android/overlaytest/overlayresapp/OverlayResTest.java b/core/tests/overlaytests/handle_config_change/test-apps/OverlayResApp/src/com/android/overlaytest/overlayresapp/OverlayResTest.java
new file mode 100644
index 000000000000..1c377192f0ea
--- /dev/null
+++ b/core/tests/overlaytests/handle_config_change/test-apps/OverlayResApp/src/com/android/overlaytest/overlayresapp/OverlayResTest.java
@@ -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.overlaytest.overlayresapp;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import static junit.framework.Assert.assertNotNull;
+
+import static org.junit.Assert.fail;
+
+import android.content.Context;
+import android.content.om.FabricatedOverlay;
+import android.content.om.OverlayInfo;
+import android.content.om.OverlayManager;
+import android.content.om.OverlayManagerTransaction;
+import android.content.res.Resources;
+import android.os.UserHandle;
+import android.util.TypedValue;
+
+import androidx.test.ext.junit.rules.ActivityScenarioRule;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+@RunWith(JUnit4.class)
+public class OverlayResTest {
+ // Default timeout value
+ private static final long TIMEOUT_MS = TimeUnit.SECONDS.toMillis(5);
+ private static final String TEST_OVERLAY_NAME = "Test";
+ private static final String TEST_RESOURCE_INTEGER = "integer/test_integer";
+ private static final String TEST_RESOURCE_STRING = "string/test_string";
+ private static final int TEST_INTEGER = 0;
+ private static final int TEST_FRRO_INTEGER = 1;
+ private static final String TEST_STRING = "Test String";
+ private static final String TEST_FRRO_STRING = "FRRO Test String";
+ private OverlayResActivity mActivity;
+ private Context mContext;
+ private OverlayManager mOverlayManager;
+ private int mUserId;
+ private UserHandle mUserHandle;
+
+ @Rule
+ public ActivityScenarioRule<OverlayResActivity> mActivityScenarioRule =
+ new ActivityScenarioRule<>(OverlayResActivity.class);
+
+ @Before
+ public void setUp() {
+ mActivityScenarioRule.getScenario().onActivity(activity -> {
+ assertThat(activity).isNotNull();
+ mActivity = activity;
+ });
+ mContext = mActivity.getApplicationContext();
+ mOverlayManager = mContext.getSystemService(OverlayManager.class);
+ mUserId = UserHandle.myUserId();
+ mUserHandle = UserHandle.of(mUserId);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ final OverlayManagerTransaction.Builder cleanUp = new OverlayManagerTransaction.Builder();
+ mOverlayManager.getOverlayInfosForTarget(mContext.getPackageName(), mUserHandle).forEach(
+ info -> {
+ if (info.isFabricated()) {
+ cleanUp.unregisterFabricatedOverlay(info.getOverlayIdentifier());
+ }
+ });
+ mOverlayManager.commit(cleanUp.build());
+
+ }
+
+ @Test
+ public void overlayRes_onConfigurationChanged() throws Exception {
+ final CountDownLatch latch1 = new CountDownLatch(1);
+ mActivity.setConfigurationChangedCallback(() -> {
+ Resources r = mActivity.getApplicationContext().getResources();
+ assertThat(r.getInteger(R.integer.test_integer)).isEqualTo(TEST_FRRO_INTEGER);
+ assertThat(r.getString(R.string.test_string)).isEqualTo(TEST_FRRO_STRING);
+ latch1.countDown();
+ });
+
+ // Create and enable FRRO
+ final FabricatedOverlay overlay = new FabricatedOverlay.Builder(
+ mContext.getPackageName(), TEST_OVERLAY_NAME, mContext.getPackageName())
+ .setResourceValue(TEST_RESOURCE_INTEGER, TypedValue.TYPE_INT_DEC, TEST_FRRO_INTEGER)
+ .setResourceValue(TEST_RESOURCE_STRING, TypedValue.TYPE_STRING, TEST_FRRO_STRING)
+ .build();
+
+ mOverlayManager.commit(new OverlayManagerTransaction.Builder()
+ .registerFabricatedOverlay(overlay)
+ .build());
+
+ OverlayInfo info = mOverlayManager.getOverlayInfo(overlay.getIdentifier(), mUserHandle);
+ assertNotNull(info);
+ assertThat(info.isEnabled()).isFalse();
+
+ mOverlayManager.commit(new OverlayManagerTransaction.Builder()
+ .setEnabled(overlay.getIdentifier(), true, mUserId)
+ .build());
+
+ info = mOverlayManager.getOverlayInfo(overlay.getIdentifier(), mUserHandle);
+ assertNotNull(info);
+ assertThat(info.isEnabled()).isTrue();
+
+ if (!latch1.await(TIMEOUT_MS, TimeUnit.MILLISECONDS)) {
+ fail("Fail to wait configuration changes for build and enabling frro, "
+ + "onConfigurationChanged() has not been invoked.");
+ }
+
+ final CountDownLatch latch2 = new CountDownLatch(1);
+ mActivity.setConfigurationChangedCallback(() -> {
+ Resources r = mActivity.getApplicationContext().getResources();
+ assertThat(r.getInteger(R.integer.test_integer)).isEqualTo(TEST_INTEGER);
+ assertThat(r.getString(R.string.test_string)).isEqualTo(TEST_STRING);
+ latch2.countDown();
+ });
+
+ // unregister FRRO
+ mOverlayManager.commit(new OverlayManagerTransaction.Builder()
+ .unregisterFabricatedOverlay(overlay.getIdentifier())
+ .build());
+
+ if (!latch2.await(TIMEOUT_MS, TimeUnit.MILLISECONDS)) {
+ fail("Fail to wait configuration changes after unregister frro,"
+ + " onConfigurationChanged() has not been invoked.");
+ }
+ }
+}
diff --git a/core/tests/resourceflaggingtests/Android.bp b/core/tests/resourceflaggingtests/Android.bp
new file mode 100644
index 000000000000..e8bb71010006
--- /dev/null
+++ b/core/tests/resourceflaggingtests/Android.bp
@@ -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 {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "frameworks_base_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["frameworks_base_license"],
+ default_team: "trendy_team_android_resources",
+}
+
+genrule {
+ name: "resource-flagging-test-app-resources-compile",
+ tools: ["aapt2"],
+ srcs: [
+ "flagged_resources_res/values/bools.xml",
+ ],
+ out: ["values_bools.arsc.flat"],
+ cmd: "$(location aapt2) compile $(in) -o $(genDir) " +
+ "--feature-flags test.package.falseFlag:ro=false,test.package.trueFlag:ro=true",
+}
+
+genrule {
+ name: "resource-flagging-test-app-apk",
+ tools: ["aapt2"],
+ // The first input file in the list must be the manifest
+ srcs: [
+ "TestAppAndroidManifest.xml",
+ ":resource-flagging-test-app-resources-compile",
+ ],
+ out: ["resapp.apk"],
+ cmd: "$(location aapt2) link -o $(out) --manifest $(in)",
+}
+
+java_genrule {
+ name: "resource-flagging-apk-as-resource",
+ srcs: [
+ ":resource-flagging-test-app-apk",
+ ],
+ out: ["apks_as_resources.res.zip"],
+ tools: ["soong_zip"],
+
+ cmd: "mkdir -p $(genDir)/res/raw && " +
+ "cp $(in) $(genDir)/res/raw/$$(basename $(in)) && " +
+ "$(location soong_zip) -o $(out) -C $(genDir)/res -D $(genDir)/res",
+}
+
+android_test {
+ name: "ResourceFlaggingTests",
+ srcs: [
+ "src/**/*.java",
+ ],
+ platform_apis: true,
+ certificate: "platform",
+ static_libs: [
+ "androidx.test.rules",
+ "testng",
+ "compatibility-device-util-axt",
+ ],
+ resource_zips: [":resource-flagging-apk-as-resource"],
+ test_suites: ["device-tests"],
+}
diff --git a/core/tests/resourceflaggingtests/AndroidManifest.xml b/core/tests/resourceflaggingtests/AndroidManifest.xml
new file mode 100644
index 000000000000..938463b14e64
--- /dev/null
+++ b/core/tests/resourceflaggingtests/AndroidManifest.xml
@@ -0,0 +1,31 @@
+<?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.
+ -->
+
+<manifest
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.resourceflaggingtests">
+
+ <application>
+ <uses-library android:name="android.test.runner" />
+ </application>
+
+ <instrumentation
+ android:name="androidx.test.runner.AndroidJUnitRunner"
+ android:targetPackage="com.android.resourceflaggingtests"
+ android:label="Resource Flagging Tests" />
+
+</manifest> \ No newline at end of file
diff --git a/core/tests/resourceflaggingtests/OWNERS b/core/tests/resourceflaggingtests/OWNERS
new file mode 100644
index 000000000000..10950a193b25
--- /dev/null
+++ b/core/tests/resourceflaggingtests/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/app/RESOURCES_OWNERS
diff --git a/core/tests/resourceflaggingtests/TestAppAndroidManifest.xml b/core/tests/resourceflaggingtests/TestAppAndroidManifest.xml
new file mode 100644
index 000000000000..d6cdeb7b5231
--- /dev/null
+++ b/core/tests/resourceflaggingtests/TestAppAndroidManifest.xml
@@ -0,0 +1,4 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.intenal.flaggedresources">
+ <application/>
+</manifest> \ No newline at end of file
diff --git a/core/tests/resourceflaggingtests/flagged_resources_res/values/bools.xml b/core/tests/resourceflaggingtests/flagged_resources_res/values/bools.xml
new file mode 100644
index 000000000000..f4defd94831c
--- /dev/null
+++ b/core/tests/resourceflaggingtests/flagged_resources_res/values/bools.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
+ <bool name="res1">true</bool>
+ <bool name="res1" android:featureFlag="test.package.falseFlag">false</bool>
+
+ <bool name="res2">false</bool>
+ <bool name="res2" android:featureFlag="test.package.trueFlag">true</bool>
+</resources> \ No newline at end of file
diff --git a/core/tests/resourceflaggingtests/src/com/android/resourceflaggingtests/ResourceFlaggingTest.java b/core/tests/resourceflaggingtests/src/com/android/resourceflaggingtests/ResourceFlaggingTest.java
new file mode 100644
index 000000000000..a0cbe3cf05c3
--- /dev/null
+++ b/core/tests/resourceflaggingtests/src/com/android/resourceflaggingtests/ResourceFlaggingTest.java
@@ -0,0 +1,81 @@
+/*
+ * 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.resourceflaggingtests;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import android.content.Context;
+import android.content.res.AssetManager;
+import android.content.res.Configuration;
+import android.content.res.Resources;
+import android.os.FileUtils;
+import android.util.DisplayMetrics;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.SmallTest;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+
+import java.io.File;
+import java.io.InputStream;
+
+@RunWith(JUnit4.class)
+@SmallTest
+public class ResourceFlaggingTest {
+ private Context mContext;
+ private Resources mResources;
+
+ @Before
+ public void setUp() throws Exception {
+ mContext = InstrumentationRegistry.getTargetContext();
+ AssetManager assets = new AssetManager();
+ assertThat(assets.addAssetPath(extractApkAndGetPath(R.raw.resapp))).isNotEqualTo(0);
+
+ final DisplayMetrics dm = new DisplayMetrics();
+ dm.setToDefaults();
+ mResources = new Resources(assets, dm, new Configuration());
+ }
+
+ @Test
+ public void testFlagDisabled() {
+ assertThat(getBoolean("res1")).isTrue();
+ }
+
+ @Test
+ public void testFlagEnabled() {
+ assertThat(getBoolean("res2")).isTrue();
+ }
+
+ private boolean getBoolean(String name) {
+ int resId = mResources.getIdentifier(name, "bool", "com.android.intenal.flaggedresources");
+ assertThat(resId).isNotEqualTo(0);
+ return mResources.getBoolean(resId);
+ }
+
+ private String extractApkAndGetPath(int id) throws Exception {
+ final Resources resources = mContext.getResources();
+ try (InputStream is = resources.openRawResource(id)) {
+ File path = new File(mContext.getFilesDir(), resources.getResourceEntryName(id));
+ path.deleteOnExit();
+ FileUtils.copyToFileOrThrow(is, path);
+ return path.getAbsolutePath();
+ }
+ }
+}
diff --git a/data/etc/OWNERS b/data/etc/OWNERS
index 701d145fe805..85dae631cac3 100644
--- a/data/etc/OWNERS
+++ b/data/etc/OWNERS
@@ -1,6 +1,5 @@
include /PACKAGE_MANAGER_OWNERS
-alanstokes@google.com
cbrubaker@google.com
hackbod@android.com
hackbod@google.com
diff --git a/data/etc/platform.xml b/data/etc/platform.xml
index 65615e62c3df..7b96699f7f71 100644
--- a/data/etc/platform.xml
+++ b/data/etc/platform.xml
@@ -325,10 +325,12 @@
<!-- These are the standard packages that are allowed to always have internet
access while in power save mode, even if they aren't in the foreground. -->
<allow-in-power-save package="com.android.providers.downloads" />
+ <allow-in-power-save package="com.android.rkpdapp" />
<!-- These are the standard packages that are allowed to always have internet
access while in data mode, even if they aren't in the foreground. -->
<allow-in-data-usage-save package="com.android.providers.downloads" />
+ <allow-in-data-usage-save package="com.android.rkpdapp" />
<!-- This is a core platform component that needs to freely run in the background -->
<allow-in-power-save package="com.android.cellbroadcastreceiver.module" />
diff --git a/errorprone/java/com/google/errorprone/bugpatterns/android/RequiresPermissionChecker.java b/errorprone/java/com/google/errorprone/bugpatterns/android/RequiresPermissionChecker.java
index 7c7cb18afc4d..9887c272e7f8 100644
--- a/errorprone/java/com/google/errorprone/bugpatterns/android/RequiresPermissionChecker.java
+++ b/errorprone/java/com/google/errorprone/bugpatterns/android/RequiresPermissionChecker.java
@@ -55,9 +55,9 @@ import com.sun.source.util.TreeScanner;
import com.sun.tools.javac.code.Symbol;
import com.sun.tools.javac.code.Symbol.ClassSymbol;
import com.sun.tools.javac.code.Symbol.MethodSymbol;
-import com.sun.tools.javac.code.Symbol.VarSymbol;
import com.sun.tools.javac.code.Type;
import com.sun.tools.javac.code.Type.ClassType;
+import com.sun.tools.javac.tree.JCTree.JCNewClass;
import java.util.ArrayList;
import java.util.Arrays;
@@ -67,7 +67,6 @@ import java.util.List;
import java.util.Optional;
import java.util.Set;
import java.util.concurrent.atomic.AtomicReference;
-import java.util.function.Predicate;
import java.util.regex.Pattern;
import javax.lang.model.element.Name;
@@ -125,6 +124,12 @@ public final class RequiresPermissionChecker extends BugChecker
instanceMethod()
.onDescendantOf("android.content.Context")
.withNameMatching(Pattern.compile("^send(Ordered|Sticky)?Broadcast.*$")));
+ private static final Matcher<ExpressionTree> SEND_BROADCAST_AS_USER =
+ methodInvocation(
+ instanceMethod()
+ .onDescendantOf("android.content.Context")
+ .withNameMatching(
+ Pattern.compile("^send(Ordered|Sticky)?Broadcast.*AsUser.*$")));
private static final Matcher<ExpressionTree> SEND_PENDING_INTENT = methodInvocation(
instanceMethod()
.onDescendantOf("android.app.PendingIntent")
@@ -306,18 +311,6 @@ public final class RequiresPermissionChecker extends BugChecker
}
}
- private static ExpressionTree findArgumentByParameterName(MethodInvocationTree tree,
- Predicate<String> paramName) {
- final MethodSymbol sym = ASTHelpers.getSymbol(tree);
- final List<VarSymbol> params = sym.getParameters();
- for (int i = 0; i < params.size(); i++) {
- if (paramName.test(params.get(i).name.toString())) {
- return tree.getArguments().get(i);
- }
- }
- return null;
- }
-
private static Name resolveName(ExpressionTree tree) {
if (tree instanceof IdentifierTree) {
return ((IdentifierTree) tree).getName();
@@ -345,76 +338,85 @@ public final class RequiresPermissionChecker extends BugChecker
private static ParsedRequiresPermission parseBroadcastSourceRequiresPermission(
MethodInvocationTree methodTree, VisitorState state) {
- final ExpressionTree arg = findArgumentByParameterName(methodTree,
- (name) -> name.toLowerCase().contains("intent"));
- if (arg instanceof IdentifierTree) {
- final Name argName = ((IdentifierTree) arg).getName();
- final MethodTree method = state.findEnclosing(MethodTree.class);
- final AtomicReference<ParsedRequiresPermission> res = new AtomicReference<>();
- method.accept(new TreeScanner<Void, Void>() {
- private ParsedRequiresPermission last;
-
- @Override
- public Void visitMethodInvocation(MethodInvocationTree tree, Void param) {
- if (Objects.equal(methodTree, tree)) {
- res.set(last);
- } else {
- final Name name = resolveName(tree.getMethodSelect());
- if (Objects.equal(argName, name)
- && INTENT_SET_ACTION.matches(tree, state)) {
- last = parseIntentAction(tree);
+ if (methodTree.getArguments().size() < 1) {
+ return null;
+ }
+ final ExpressionTree arg = methodTree.getArguments().get(0);
+ if (!(arg instanceof IdentifierTree)) {
+ return null;
+ }
+ final Name argName = ((IdentifierTree) arg).getName();
+ final MethodTree method = state.findEnclosing(MethodTree.class);
+ final AtomicReference<ParsedRequiresPermission> res = new AtomicReference<>();
+ method.accept(new TreeScanner<Void, Void>() {
+ private ParsedRequiresPermission mLast;
+
+ @Override
+ public Void visitMethodInvocation(MethodInvocationTree tree, Void param) {
+ if (Objects.equal(methodTree, tree)) {
+ res.set(mLast);
+ } else {
+ final Name name = resolveName(tree.getMethodSelect());
+ if (Objects.equal(argName, name) && INTENT_SET_ACTION.matches(tree, state)) {
+ mLast = parseIntentAction(tree);
+ } else if (name == null && tree.getMethodSelect() instanceof MemberSelectTree) {
+ ExpressionTree innerTree =
+ ((MemberSelectTree) tree.getMethodSelect()).getExpression();
+ if (innerTree instanceof JCNewClass) {
+ mLast = parseIntentAction((NewClassTree) innerTree);
}
}
- return super.visitMethodInvocation(tree, param);
}
+ return super.visitMethodInvocation(tree, param);
+ }
- @Override
- public Void visitAssignment(AssignmentTree tree, Void param) {
- final Name name = resolveName(tree.getVariable());
- final Tree init = tree.getExpression();
- if (Objects.equal(argName, name)
- && init instanceof NewClassTree) {
- last = parseIntentAction((NewClassTree) init);
- }
- return super.visitAssignment(tree, param);
+ @Override
+ public Void visitAssignment(AssignmentTree tree, Void param) {
+ final Name name = resolveName(tree.getVariable());
+ final Tree init = tree.getExpression();
+ if (Objects.equal(argName, name) && init instanceof NewClassTree) {
+ mLast = parseIntentAction((NewClassTree) init);
}
+ return super.visitAssignment(tree, param);
+ }
- @Override
- public Void visitVariable(VariableTree tree, Void param) {
- final Name name = tree.getName();
- final ExpressionTree init = tree.getInitializer();
- if (Objects.equal(argName, name)
- && init instanceof NewClassTree) {
- last = parseIntentAction((NewClassTree) init);
- }
- return super.visitVariable(tree, param);
+ @Override
+ public Void visitVariable(VariableTree tree, Void param) {
+ final Name name = tree.getName();
+ final ExpressionTree init = tree.getInitializer();
+ if (Objects.equal(argName, name) && init instanceof NewClassTree) {
+ mLast = parseIntentAction((NewClassTree) init);
}
- }, null);
- return res.get();
- }
- return null;
+ return super.visitVariable(tree, param);
+ }
+ }, null);
+ return res.get();
}
private static ParsedRequiresPermission parseBroadcastTargetRequiresPermission(
MethodInvocationTree tree, VisitorState state) {
- final ExpressionTree arg = findArgumentByParameterName(tree,
- (name) -> name.toLowerCase().contains("permission"));
final ParsedRequiresPermission res = new ParsedRequiresPermission();
- if (arg != null) {
- arg.accept(new TreeScanner<Void, Void>() {
- @Override
- public Void visitIdentifier(IdentifierTree tree, Void param) {
- res.addConstValue(tree);
- return super.visitIdentifier(tree, param);
- }
-
- @Override
- public Void visitMemberSelect(MemberSelectTree tree, Void param) {
- res.addConstValue(tree);
- return super.visitMemberSelect(tree, param);
- }
- }, null);
+ int permission_position = 1;
+ if (SEND_BROADCAST_AS_USER.matches(tree, state)) {
+ permission_position = 2;
}
+ if (tree.getArguments().size() < permission_position + 1) {
+ return res;
+ }
+ final ExpressionTree arg = tree.getArguments().get(permission_position);
+ arg.accept(new TreeScanner<Void, Void>() {
+ @Override
+ public Void visitIdentifier(IdentifierTree tree, Void param) {
+ res.addConstValue(tree);
+ return super.visitIdentifier(tree, param);
+ }
+
+ @Override
+ public Void visitMemberSelect(MemberSelectTree tree, Void param) {
+ res.addConstValue(tree);
+ return super.visitMemberSelect(tree, param);
+ }
+ }, null);
return res;
}
diff --git a/errorprone/tests/java/com/google/errorprone/bugpatterns/android/RequiresPermissionCheckerTest.java b/errorprone/tests/java/com/google/errorprone/bugpatterns/android/RequiresPermissionCheckerTest.java
index e53372d97f3d..05fde7c4fe57 100644
--- a/errorprone/tests/java/com/google/errorprone/bugpatterns/android/RequiresPermissionCheckerTest.java
+++ b/errorprone/tests/java/com/google/errorprone/bugpatterns/android/RequiresPermissionCheckerTest.java
@@ -412,6 +412,19 @@ public class RequiresPermissionCheckerTest {
" context.sendBroadcast(intent);",
" }",
" }",
+ " public void exampleWithChainedMethod(Context context) {",
+ " Intent intent = new Intent(FooManager.ACTION_RED)",
+ " .putExtra(\"foo\", 42);",
+ " context.sendBroadcast(intent, FooManager.PERMISSION_RED);",
+ " context.sendBroadcastWithMultiplePermissions(intent,",
+ " new String[] { FooManager.PERMISSION_RED });",
+ " }",
+ " public void exampleWithAsUser(Context context) {",
+ " Intent intent = new Intent(FooManager.ACTION_RED);",
+ " context.sendBroadcastAsUser(intent, 42, FooManager.PERMISSION_RED);",
+ " context.sendBroadcastAsUserMultiplePermissions(intent, 42,",
+ " new String[] { FooManager.PERMISSION_RED });",
+ " }",
"}")
.doTest();
}
diff --git a/errorprone/tests/res/android/content/Context.java b/errorprone/tests/res/android/content/Context.java
index efc4fb122435..9d622ffaf120 100644
--- a/errorprone/tests/res/android/content/Context.java
+++ b/errorprone/tests/res/android/content/Context.java
@@ -36,4 +36,15 @@ public class Context {
public void sendBroadcastWithMultiplePermissions(Intent intent, String[] receiverPermissions) {
throw new UnsupportedOperationException();
}
+
+ /* Fake user type for test purposes */
+ public void sendBroadcastAsUser(Intent intent, int user, String receiverPermission) {
+ throw new UnsupportedOperationException();
+ }
+
+ /* Fake user type for test purposes */
+ public void sendBroadcastAsUserMultiplePermissions(
+ Intent intent, int user, String[] receiverPermissions) {
+ throw new UnsupportedOperationException();
+ }
}
diff --git a/errorprone/tests/res/android/content/Intent.java b/errorprone/tests/res/android/content/Intent.java
index 288396e60577..7ccea784754a 100644
--- a/errorprone/tests/res/android/content/Intent.java
+++ b/errorprone/tests/res/android/content/Intent.java
@@ -24,4 +24,8 @@ public class Intent {
public Intent setAction(String action) {
throw new UnsupportedOperationException();
}
+
+ public Intent putExtra(String extra, int value) {
+ throw new UnsupportedOperationException();
+ }
}
diff --git a/graphics/java/android/graphics/Paint.java b/graphics/java/android/graphics/Paint.java
index df95a91d72d7..b83931fa0615 100644
--- a/graphics/java/android/graphics/Paint.java
+++ b/graphics/java/android/graphics/Paint.java
@@ -35,6 +35,7 @@ import android.compat.annotation.UnsupportedAppUsage;
import android.graphics.fonts.FontVariationAxis;
import android.os.Build;
import android.os.LocaleList;
+import android.text.ClientFlags;
import android.text.GraphicsOperations;
import android.text.SpannableString;
import android.text.SpannedString;
@@ -1540,8 +1541,21 @@ public class Paint {
* @return typeface
*/
public Typeface setTypeface(Typeface typeface) {
+ return setTypefaceInternal(typeface, true);
+ }
+
+ private Typeface setTypefaceInternal(Typeface typeface, boolean clearFontVariationSettings) {
final long typefaceNative = typeface == null ? 0 : typeface.native_instance;
nSetTypeface(mNativePaint, typefaceNative);
+
+ if (ClientFlags.clearFontVariationSettings()) {
+ if (clearFontVariationSettings && !Objects.equals(mTypeface, typeface)) {
+ // We cannot call setFontVariationSetting with empty string or null because it calls
+ // setTypeface method. To avoid recursive setTypeface call, manually resetting
+ // mFontVariationSettings.
+ mFontVariationSettings = null;
+ }
+ }
mTypeface = typeface;
return typeface;
}
@@ -2037,6 +2051,14 @@ public class Paint {
* </li>
* </ul>
*
+ * Note: This method replaces the Typeface previously set to this instance.
+ * Until API {@link Build.VERSION_CODES.VANILLA_ICE_CREAM}, any caller of
+ * {@link #setTypeface(Typeface)} should call this method with empty settings, then call
+ * {@link #setTypeface(Typeface)}, then call this method with preferred variation settings.
+ * The device API more than {@link Build.VERSION_CODES.VANILLA_ICE_CREAM}, the
+ * {@link #setTypeface(Typeface)} method clears font variation settings. So caller of
+ * {@link #setTypeface(Typeface)} should call this method again for applying variation settings.
+ *
* @param fontVariationSettings font variation settings. You can pass null or empty string as
* no variation settings.
*
@@ -2059,8 +2081,8 @@ public class Paint {
if (settings == null || settings.length() == 0) {
mFontVariationSettings = null;
- setTypeface(Typeface.createFromTypefaceWithVariation(mTypeface,
- Collections.emptyList()));
+ setTypefaceInternal(Typeface.createFromTypefaceWithVariation(mTypeface,
+ Collections.emptyList()), false);
return true;
}
@@ -2078,7 +2100,8 @@ public class Paint {
return false;
}
mFontVariationSettings = settings;
- setTypeface(Typeface.createFromTypefaceWithVariation(targetTypeface, filteredAxes));
+ setTypefaceInternal(Typeface.createFromTypefaceWithVariation(targetTypeface, filteredAxes),
+ false);
return true;
}
diff --git a/keystore/java/android/security/KeyChain.java b/keystore/java/android/security/KeyChain.java
index 4b367e0e5b4b..f9fd3694835e 100644
--- a/keystore/java/android/security/KeyChain.java
+++ b/keystore/java/android/security/KeyChain.java
@@ -66,6 +66,7 @@ import java.util.Collection;
import java.util.List;
import java.util.Locale;
import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;
import javax.security.auth.x500.X500Principal;
@@ -376,6 +377,8 @@ public final class KeyChain {
*/
public static final int KEY_ATTESTATION_FAILURE = 4;
+ private static final int BIND_KEY_CHAIN_SERVICE_TIMEOUT_MS = 30 * 1000;
+
/**
* Used by DPC or delegated app in
* {@link android.app.admin.DeviceAdminReceiver#onChoosePrivateKeyAlias} or
@@ -1120,7 +1123,10 @@ public final class KeyChain {
context.unbindService(keyChainServiceConnection);
throw new AssertionError("could not bind to KeyChainService");
}
- countDownLatch.await();
+ if (!countDownLatch.await(BIND_KEY_CHAIN_SERVICE_TIMEOUT_MS, TimeUnit.MILLISECONDS)) {
+ context.unbindService(keyChainServiceConnection);
+ throw new AssertionError("binding to KeyChainService timeout");
+ }
IKeyChainService service = keyChainService.get();
if (service != null) {
return new KeyChainConnection(context, keyChainServiceConnection, service);
diff --git a/libs/WindowManager/Jetpack/src/androidx/window/common/RawFoldingFeatureProducer.java b/libs/WindowManager/Jetpack/src/androidx/window/common/RawFoldingFeatureProducer.java
index 8906e6d3d02e..88264f383153 100644
--- a/libs/WindowManager/Jetpack/src/androidx/window/common/RawFoldingFeatureProducer.java
+++ b/libs/WindowManager/Jetpack/src/androidx/window/common/RawFoldingFeatureProducer.java
@@ -34,7 +34,7 @@ import java.util.Optional;
import java.util.function.Consumer;
/**
- * Implementation of {@link androidx.window.util.DataProducer} that produces a
+ * Implementation of {@link androidx.window.util.BaseDataProducer} that produces a
* {@link String} that can be parsed to a {@link CommonFoldingFeature}.
* {@link RawFoldingFeatureProducer} searches for the value in two places. The first check is in
* settings where the {@link String} property is saved with the key
diff --git a/libs/WindowManager/Jetpack/src/androidx/window/extensions/WindowExtensionsImpl.java b/libs/WindowManager/Jetpack/src/androidx/window/extensions/WindowExtensionsImpl.java
index ecf47209a802..7f11feaa585e 100644
--- a/libs/WindowManager/Jetpack/src/androidx/window/extensions/WindowExtensionsImpl.java
+++ b/libs/WindowManager/Jetpack/src/androidx/window/extensions/WindowExtensionsImpl.java
@@ -39,6 +39,8 @@ import androidx.window.extensions.embedding.SplitController;
import androidx.window.extensions.layout.WindowLayoutComponent;
import androidx.window.extensions.layout.WindowLayoutComponentImpl;
+import com.android.window.flags.Flags;
+
import java.util.Objects;
@@ -55,11 +57,9 @@ class WindowExtensionsImpl implements WindowExtensions {
*/
private static final int NO_LEVEL_OVERRIDE = -1;
- /**
- * The min version of the WM Extensions that must be supported in the current platform version.
- */
- @VisibleForTesting
- static final int EXTENSIONS_VERSION_CURRENT_PLATFORM = 6;
+ private static final int EXTENSIONS_VERSION_V7 = 7;
+
+ private static final int EXTENSIONS_VERSION_V6 = 6;
private final Object mLock = new Object();
private volatile DeviceStateManagerFoldingFeatureProducer mFoldingFeatureProducer;
@@ -67,7 +67,6 @@ class WindowExtensionsImpl implements WindowExtensions {
private volatile SplitController mSplitController;
private volatile WindowAreaComponent mWindowAreaComponent;
- private final int mVersion = EXTENSIONS_VERSION_CURRENT_PLATFORM;
private final boolean mIsActivityEmbeddingEnabled;
WindowExtensionsImpl() {
@@ -76,9 +75,22 @@ class WindowExtensionsImpl implements WindowExtensions {
Log.i(TAG, generateLogMessage());
}
+ /**
+ * The min version of the WM Extensions that must be supported in the current platform version.
+ */
+ @VisibleForTesting
+ static int getExtensionsVersionCurrentPlatform() {
+ if (Flags.activityEmbeddingAnimationCustomizationFlag()) {
+ // Activity Embedding animation customization is the only major feature for v7.
+ return EXTENSIONS_VERSION_V7;
+ } else {
+ return EXTENSIONS_VERSION_V6;
+ }
+ }
+
private String generateLogMessage() {
final StringBuilder logBuilder = new StringBuilder("Initializing Window Extensions, "
- + "vendor API level=" + mVersion);
+ + "vendor API level=" + getExtensionsVersionCurrentPlatform());
final int levelOverride = getLevelOverride();
if (levelOverride != NO_LEVEL_OVERRIDE) {
logBuilder.append(", override to ").append(levelOverride);
@@ -91,7 +103,12 @@ class WindowExtensionsImpl implements WindowExtensions {
@Override
public int getVendorApiLevel() {
final int levelOverride = getLevelOverride();
- return (levelOverride != NO_LEVEL_OVERRIDE) ? levelOverride : mVersion;
+ return hasLevelOverride() ? levelOverride : getExtensionsVersionCurrentPlatform();
+ }
+
+ @VisibleForTesting
+ boolean hasLevelOverride() {
+ return getLevelOverride() != NO_LEVEL_OVERRIDE;
}
private int getLevelOverride() {
diff --git a/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/DividerPresenter.java b/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/DividerPresenter.java
index 822a07c23950..544f0f38f48c 100644
--- a/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/DividerPresenter.java
+++ b/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/DividerPresenter.java
@@ -894,9 +894,7 @@ class DividerPresenter implements View.OnTouchListener {
private static boolean isDraggingToFullscreenAllowed(
@NonNull DividerAttributes dividerAttributes) {
- // TODO(b/293654166) Use DividerAttributes.isDraggingToFullscreenAllowed when extension is
- // updated to v7.
- return false;
+ return dividerAttributes.isDraggingToFullscreenAllowed();
}
/**
diff --git a/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/JetpackTaskFragmentOrganizer.java b/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/JetpackTaskFragmentOrganizer.java
index 9ea2943bc6da..1eb95c1efb08 100644
--- a/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/JetpackTaskFragmentOrganizer.java
+++ b/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/JetpackTaskFragmentOrganizer.java
@@ -70,10 +70,6 @@ class JetpackTaskFragmentOrganizer extends TaskFragmentOrganizer {
@NonNull
private final TaskFragmentCallback mCallback;
- @VisibleForTesting
- @Nullable
- TaskFragmentAnimationController mAnimationController;
-
/**
* Callback that notifies the controller about changes to task fragments.
*/
@@ -91,25 +87,6 @@ class JetpackTaskFragmentOrganizer extends TaskFragmentOrganizer {
mCallback = callback;
}
- @Override
- public void unregisterOrganizer() {
- if (mAnimationController != null) {
- mAnimationController.unregisterRemoteAnimations();
- mAnimationController = null;
- }
- super.unregisterOrganizer();
- }
-
- /**
- * Overrides the animation for transitions of embedded activities organized by this organizer.
- */
- void overrideSplitAnimation() {
- if (mAnimationController == null) {
- mAnimationController = new TaskFragmentAnimationController(this);
- }
- mAnimationController.registerRemoteAnimations();
- }
-
/**
* Starts a new Activity and puts it into split with an existing Activity side-by-side.
* @param launchingFragmentToken token for the launching TaskFragment. If it exists, it will
diff --git a/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/SplitController.java b/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/SplitController.java
index 7ddda1f98809..8e1fde066277 100644
--- a/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/SplitController.java
+++ b/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/SplitController.java
@@ -22,6 +22,7 @@ import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED;
import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED;
import static android.view.Display.DEFAULT_DISPLAY;
import static android.view.WindowManager.TRANSIT_CLOSE;
+import static android.window.ActivityWindowInfo.getActivityWindowInfo;
import static android.window.TaskFragmentOperation.OP_TYPE_REPARENT_ACTIVITY_TO_TASK_FRAGMENT;
import static android.window.TaskFragmentOperation.OP_TYPE_START_ACTIVITY_IN_TASK_FRAGMENT;
import static android.window.TaskFragmentOrganizer.KEY_ERROR_CALLBACK_OP_TYPE;
@@ -80,6 +81,7 @@ import android.window.ActivityWindowInfo;
import android.window.TaskFragmentAnimationParams;
import android.window.TaskFragmentInfo;
import android.window.TaskFragmentOperation;
+import android.window.TaskFragmentOrganizer;
import android.window.TaskFragmentParentInfo;
import android.window.TaskFragmentTransaction;
import android.window.WindowContainerTransaction;
@@ -114,7 +116,6 @@ import java.util.function.BiConsumer;
public class SplitController implements JetpackTaskFragmentOrganizer.TaskFragmentCallback,
ActivityEmbeddingComponent, DividerPresenter.DragEventCallback {
static final String TAG = "SplitController";
- static final boolean ENABLE_SHELL_TRANSITIONS = true;
// TODO(b/243518738): Move to WM Extensions if we have requirement of overlay without
// association. It's not set in WM Extensions nor Wm Jetpack library currently.
@@ -205,11 +206,9 @@ public class SplitController implements JetpackTaskFragmentOrganizer.TaskFragmen
/** Listener registered to {@link ClientTransactionListenerController}. */
@GuardedBy("mLock")
- @Nullable
+ @NonNull
private final BiConsumer<IBinder, ActivityWindowInfo> mActivityWindowInfoListener =
- Flags.activityWindowInfoFlag()
- ? this::onActivityWindowInfoChanged
- : null;
+ this::onActivityWindowInfoChanged;
private final Handler mHandler;
private final MainThreadExecutor mExecutor;
@@ -2556,9 +2555,9 @@ public class SplitController implements JetpackTaskFragmentOrganizer.TaskFragmen
return ActivityThread.currentActivityThread().getActivity(activityToken);
}
- @VisibleForTesting
@Nullable
- ActivityThread.ActivityClientRecord getActivityClientRecord(@NonNull Activity activity) {
+ private ActivityThread.ActivityClientRecord getActivityClientRecord(
+ @NonNull Activity activity) {
return ActivityThread.currentActivityThread()
.getActivityClient(activity.getActivityToken());
}
@@ -3095,22 +3094,14 @@ public class SplitController implements JetpackTaskFragmentOrganizer.TaskFragmen
*/
@Override
public boolean isActivityEmbedded(@NonNull Activity activity) {
- Objects.requireNonNull(activity);
synchronized (mLock) {
- if (Flags.activityWindowInfoFlag()) {
- final ActivityWindowInfo activityWindowInfo = getActivityWindowInfo(activity);
- return activityWindowInfo != null && activityWindowInfo.isEmbedded();
- }
- return mPresenter.isActivityEmbedded(activity.getActivityToken());
+ return TaskFragmentOrganizer.isActivityEmbedded(activity);
}
}
@Override
public void setEmbeddedActivityWindowInfoCallback(@NonNull Executor executor,
@NonNull Consumer<EmbeddedActivityWindowInfo> callback) {
- if (!Flags.activityWindowInfoFlag()) {
- return;
- }
Objects.requireNonNull(executor);
Objects.requireNonNull(callback);
synchronized (mLock) {
@@ -3124,9 +3115,6 @@ public class SplitController implements JetpackTaskFragmentOrganizer.TaskFragmen
@Override
public void clearEmbeddedActivityWindowInfoCallback() {
- if (!Flags.activityWindowInfoFlag()) {
- return;
- }
synchronized (mLock) {
if (mEmbeddedActivityWindowInfoCallback == null) {
return;
@@ -3147,9 +3135,6 @@ public class SplitController implements JetpackTaskFragmentOrganizer.TaskFragmen
@Nullable
@Override
public EmbeddedActivityWindowInfo getEmbeddedActivityWindowInfo(@NonNull Activity activity) {
- if (!Flags.activityWindowInfoFlag()) {
- return null;
- }
synchronized (mLock) {
final ActivityWindowInfo activityWindowInfo = getActivityWindowInfo(activity);
return activityWindowInfo != null
@@ -3180,15 +3165,6 @@ public class SplitController implements JetpackTaskFragmentOrganizer.TaskFragmen
}
}
- @Nullable
- private ActivityWindowInfo getActivityWindowInfo(@NonNull Activity activity) {
- if (activity.isFinishing()) {
- return null;
- }
- final ActivityThread.ActivityClientRecord record = getActivityClientRecord(activity);
- return record != null ? record.getActivityWindowInfo() : null;
- }
-
@NonNull
private static EmbeddedActivityWindowInfo translateActivityWindowInfo(
@NonNull Activity activity, @NonNull ActivityWindowInfo activityWindowInfo) {
diff --git a/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/SplitPresenter.java b/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/SplitPresenter.java
index eb1fc23d6b00..f1e7ef5ce123 100644
--- a/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/SplitPresenter.java
+++ b/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/SplitPresenter.java
@@ -166,11 +166,6 @@ class SplitPresenter extends JetpackTaskFragmentOrganizer {
mWindowLayoutComponent = windowLayoutComponent;
mController = controller;
registerOrganizer();
- if (!SplitController.ENABLE_SHELL_TRANSITIONS) {
- // TODO(b/207070762): cleanup with legacy app transition
- // Animation will be handled by WM Shell when Shell transition is enabled.
- overrideSplitAnimation();
- }
}
/**
@@ -1364,4 +1359,16 @@ class SplitPresenter extends JetpackTaskFragmentOrganizer {
return new ParentContainerInfo(taskProperties.getTaskMetrics(), configuration,
windowLayoutInfo);
}
+
+ @VisibleForTesting
+ @NonNull
+ static String positionToString(@ContainerPosition int position) {
+ return switch (position) {
+ case CONTAINER_POSITION_LEFT -> "left";
+ case CONTAINER_POSITION_TOP -> "top";
+ case CONTAINER_POSITION_RIGHT -> "right";
+ case CONTAINER_POSITION_BOTTOM -> "bottom";
+ default -> "Unknown position:" + position;
+ };
+ }
}
diff --git a/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/TaskFragmentAnimationAdapter.java b/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/TaskFragmentAnimationAdapter.java
deleted file mode 100644
index 33220c44a3b5..000000000000
--- a/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/TaskFragmentAnimationAdapter.java
+++ /dev/null
@@ -1,224 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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 androidx.window.extensions.embedding;
-
-import static android.graphics.Matrix.MTRANS_X;
-import static android.graphics.Matrix.MTRANS_Y;
-import static android.view.RemoteAnimationTarget.MODE_CLOSING;
-
-import android.graphics.Point;
-import android.graphics.Rect;
-import android.view.Choreographer;
-import android.view.RemoteAnimationTarget;
-import android.view.SurfaceControl;
-import android.view.animation.Animation;
-import android.view.animation.Transformation;
-
-import androidx.annotation.NonNull;
-
-/**
- * Wrapper to handle the TaskFragment animation update in one {@link SurfaceControl.Transaction}.
- *
- * The base adapter can be used for {@link RemoteAnimationTarget} that is simple open/close.
- */
-class TaskFragmentAnimationAdapter {
-
- /**
- * If {@link #mOverrideLayer} is set to this value, we don't want to override the surface layer.
- */
- private static final int LAYER_NO_OVERRIDE = -1;
-
- @NonNull
- final Animation mAnimation;
- @NonNull
- final RemoteAnimationTarget mTarget;
- @NonNull
- final SurfaceControl mLeash;
- /** Area in absolute coordinate that the animation surface shouldn't go beyond. */
- @NonNull
- private final Rect mWholeAnimationBounds = new Rect();
- /**
- * Area in absolute coordinate that should represent all the content to show for this window.
- * This should be the end bounds for opening window, and start bounds for closing window in case
- * the window is resizing during the open/close transition.
- */
- @NonNull
- private final Rect mContentBounds = new Rect();
- /** Offset relative to the window parent surface for {@link #mContentBounds}. */
- @NonNull
- private final Point mContentRelOffset = new Point();
-
- @NonNull
- final Transformation mTransformation = new Transformation();
- @NonNull
- final float[] mMatrix = new float[9];
- @NonNull
- final float[] mVecs = new float[4];
- @NonNull
- final Rect mRect = new Rect();
- private boolean mIsFirstFrame = true;
- private int mOverrideLayer = LAYER_NO_OVERRIDE;
-
- TaskFragmentAnimationAdapter(@NonNull Animation animation,
- @NonNull RemoteAnimationTarget target) {
- this(animation, target, target.leash, target.screenSpaceBounds);
- }
-
- /**
- * @param leash the surface to animate.
- * @param wholeAnimationBounds area in absolute coordinate that the animation surface shouldn't
- * go beyond.
- */
- TaskFragmentAnimationAdapter(@NonNull Animation animation,
- @NonNull RemoteAnimationTarget target, @NonNull SurfaceControl leash,
- @NonNull Rect wholeAnimationBounds) {
- mAnimation = animation;
- mTarget = target;
- mLeash = leash;
- mWholeAnimationBounds.set(wholeAnimationBounds);
- if (target.mode == MODE_CLOSING) {
- // When it is closing, we want to show the content at the start position in case the
- // window is resizing as well. For example, when the activities is changing from split
- // to stack, the bottom TaskFragment will be resized to fullscreen when hiding.
- final Rect startBounds = target.startBounds;
- final Rect endBounds = target.screenSpaceBounds;
- mContentBounds.set(startBounds);
- mContentRelOffset.set(target.localBounds.left, target.localBounds.top);
- mContentRelOffset.offset(
- startBounds.left - endBounds.left,
- startBounds.top - endBounds.top);
- } else {
- mContentBounds.set(target.screenSpaceBounds);
- mContentRelOffset.set(target.localBounds.left, target.localBounds.top);
- }
- }
-
- /**
- * Surface layer to be set at the first frame of the animation. We will not set the layer if it
- * is set to {@link #LAYER_NO_OVERRIDE}.
- */
- final void overrideLayer(int layer) {
- mOverrideLayer = layer;
- }
-
- /** Called on frame update. */
- final void onAnimationUpdate(@NonNull SurfaceControl.Transaction t, long currentPlayTime) {
- if (mIsFirstFrame) {
- t.show(mLeash);
- if (mOverrideLayer != LAYER_NO_OVERRIDE) {
- t.setLayer(mLeash, mOverrideLayer);
- }
- mIsFirstFrame = false;
- }
-
- // Extract the transformation to the current time.
- mAnimation.getTransformation(Math.min(currentPlayTime, mAnimation.getDuration()),
- mTransformation);
- t.setFrameTimelineVsync(Choreographer.getInstance().getVsyncId());
- onAnimationUpdateInner(t);
- }
-
- /** To be overridden by subclasses to adjust the animation surface change. */
- void onAnimationUpdateInner(@NonNull SurfaceControl.Transaction t) {
- // Update the surface position and alpha.
- mTransformation.getMatrix().postTranslate(mContentRelOffset.x, mContentRelOffset.y);
- t.setMatrix(mLeash, mTransformation.getMatrix(), mMatrix);
- t.setAlpha(mLeash, mTransformation.getAlpha());
-
- // Get current surface bounds in absolute coordinate.
- // positionX/Y are in local coordinate, so minus the local offset to get the slide amount.
- final int positionX = Math.round(mMatrix[MTRANS_X]);
- final int positionY = Math.round(mMatrix[MTRANS_Y]);
- final Rect cropRect = new Rect(mContentBounds);
- cropRect.offset(positionX - mContentRelOffset.x, positionY - mContentRelOffset.y);
-
- // Store the current offset of the surface top left from (0,0) in absolute coordinate.
- final int offsetX = cropRect.left;
- final int offsetY = cropRect.top;
-
- // Intersect to make sure the animation happens within the whole animation bounds.
- if (!cropRect.intersect(mWholeAnimationBounds)) {
- // Hide the surface when it is outside of the animation area.
- t.setAlpha(mLeash, 0);
- }
-
- // cropRect is in absolute coordinate, so we need to translate it to surface top left.
- cropRect.offset(-offsetX, -offsetY);
- t.setCrop(mLeash, cropRect);
- }
-
- /** Called after animation finished. */
- final void onAnimationEnd(@NonNull SurfaceControl.Transaction t) {
- onAnimationUpdate(t, mAnimation.getDuration());
- }
-
- final long getDurationHint() {
- return mAnimation.computeDurationHint();
- }
-
- /**
- * Should be used for the animation of the snapshot of a {@link RemoteAnimationTarget} that has
- * size change.
- */
- static class SnapshotAdapter extends TaskFragmentAnimationAdapter {
-
- SnapshotAdapter(@NonNull Animation animation, @NonNull RemoteAnimationTarget target) {
- // Start leash is the snapshot of the starting surface.
- super(animation, target, target.startLeash, target.screenSpaceBounds);
- }
-
- @Override
- void onAnimationUpdateInner(@NonNull SurfaceControl.Transaction t) {
- // Snapshot should always be placed at the top left of the animation leash.
- mTransformation.getMatrix().postTranslate(0, 0);
- t.setMatrix(mLeash, mTransformation.getMatrix(), mMatrix);
- t.setAlpha(mLeash, mTransformation.getAlpha());
- }
- }
-
- /**
- * Should be used for the animation of the {@link RemoteAnimationTarget} that has size change.
- */
- static class BoundsChangeAdapter extends TaskFragmentAnimationAdapter {
-
- BoundsChangeAdapter(@NonNull Animation animation, @NonNull RemoteAnimationTarget target) {
- super(animation, target);
- }
-
- @Override
- void onAnimationUpdateInner(@NonNull SurfaceControl.Transaction t) {
- mTransformation.getMatrix().postTranslate(
- mTarget.localBounds.left, mTarget.localBounds.top);
- t.setMatrix(mLeash, mTransformation.getMatrix(), mMatrix);
- t.setAlpha(mLeash, mTransformation.getAlpha());
-
- // The following applies an inverse scale to the clip-rect so that it crops "after" the
- // scale instead of before.
- mVecs[1] = mVecs[2] = 0;
- mVecs[0] = mVecs[3] = 1;
- mTransformation.getMatrix().mapVectors(mVecs);
- mVecs[0] = 1.f / mVecs[0];
- mVecs[3] = 1.f / mVecs[3];
- final Rect clipRect = mTransformation.getClipRect();
- mRect.left = (int) (clipRect.left * mVecs[0] + 0.5f);
- mRect.right = (int) (clipRect.right * mVecs[0] + 0.5f);
- mRect.top = (int) (clipRect.top * mVecs[3] + 0.5f);
- mRect.bottom = (int) (clipRect.bottom * mVecs[3] + 0.5f);
- t.setWindowCrop(mLeash, mRect);
- }
- }
-}
diff --git a/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/TaskFragmentAnimationController.java b/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/TaskFragmentAnimationController.java
deleted file mode 100644
index d7eb9a01f57c..000000000000
--- a/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/TaskFragmentAnimationController.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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 androidx.window.extensions.embedding;
-
-import static android.view.WindowManager.TRANSIT_OLD_ACTIVITY_CLOSE;
-import static android.view.WindowManager.TRANSIT_OLD_ACTIVITY_OPEN;
-import static android.view.WindowManager.TRANSIT_OLD_TASK_FRAGMENT_CHANGE;
-import static android.view.WindowManager.TRANSIT_OLD_TASK_FRAGMENT_CLOSE;
-import static android.view.WindowManager.TRANSIT_OLD_TASK_FRAGMENT_OPEN;
-
-import android.util.Log;
-import android.view.RemoteAnimationAdapter;
-import android.view.RemoteAnimationDefinition;
-import android.window.TaskFragmentOrganizer;
-
-import androidx.annotation.NonNull;
-
-import com.android.internal.annotations.VisibleForTesting;
-
-/** Controls the TaskFragment remote animations. */
-class TaskFragmentAnimationController {
-
- private static final String TAG = "TaskFragAnimationCtrl";
- static final boolean DEBUG = false;
-
- private final TaskFragmentOrganizer mOrganizer;
- private final TaskFragmentAnimationRunner mRemoteRunner = new TaskFragmentAnimationRunner();
- @VisibleForTesting
- final RemoteAnimationDefinition mDefinition;
- private boolean mIsRegistered;
-
- TaskFragmentAnimationController(@NonNull TaskFragmentOrganizer organizer) {
- mOrganizer = organizer;
- mDefinition = new RemoteAnimationDefinition();
- final RemoteAnimationAdapter animationAdapter =
- new RemoteAnimationAdapter(mRemoteRunner, 0, 0, true /* changeNeedsSnapshot */);
- mDefinition.addRemoteAnimation(TRANSIT_OLD_ACTIVITY_OPEN, animationAdapter);
- mDefinition.addRemoteAnimation(TRANSIT_OLD_TASK_FRAGMENT_OPEN, animationAdapter);
- mDefinition.addRemoteAnimation(TRANSIT_OLD_ACTIVITY_CLOSE, animationAdapter);
- mDefinition.addRemoteAnimation(TRANSIT_OLD_TASK_FRAGMENT_CLOSE, animationAdapter);
- mDefinition.addRemoteAnimation(TRANSIT_OLD_TASK_FRAGMENT_CHANGE, animationAdapter);
- }
-
- void registerRemoteAnimations() {
- if (DEBUG) {
- Log.v(TAG, "registerRemoteAnimations");
- }
- if (mIsRegistered) {
- return;
- }
- mOrganizer.registerRemoteAnimations(mDefinition);
- mIsRegistered = true;
- }
-
- void unregisterRemoteAnimations() {
- if (DEBUG) {
- Log.v(TAG, "unregisterRemoteAnimations");
- }
- if (!mIsRegistered) {
- return;
- }
- mOrganizer.unregisterRemoteAnimations();
- mIsRegistered = false;
- }
-}
diff --git a/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/TaskFragmentAnimationRunner.java b/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/TaskFragmentAnimationRunner.java
deleted file mode 100644
index d9b73a8290f5..000000000000
--- a/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/TaskFragmentAnimationRunner.java
+++ /dev/null
@@ -1,309 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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 androidx.window.extensions.embedding;
-
-import static android.os.Process.THREAD_PRIORITY_DISPLAY;
-import static android.view.RemoteAnimationTarget.MODE_CHANGING;
-import static android.view.RemoteAnimationTarget.MODE_CLOSING;
-import static android.view.RemoteAnimationTarget.MODE_OPENING;
-import static android.view.WindowManager.TRANSIT_OLD_ACTIVITY_CLOSE;
-import static android.view.WindowManager.TRANSIT_OLD_ACTIVITY_OPEN;
-import static android.view.WindowManager.TRANSIT_OLD_TASK_FRAGMENT_CHANGE;
-import static android.view.WindowManager.TRANSIT_OLD_TASK_FRAGMENT_CLOSE;
-import static android.view.WindowManager.TRANSIT_OLD_TASK_FRAGMENT_OPEN;
-import static android.view.WindowManagerPolicyConstants.TYPE_LAYER_OFFSET;
-
-import android.animation.Animator;
-import android.animation.ValueAnimator;
-import android.graphics.Rect;
-import android.os.Handler;
-import android.os.HandlerThread;
-import android.os.RemoteException;
-import android.util.Log;
-import android.view.IRemoteAnimationFinishedCallback;
-import android.view.IRemoteAnimationRunner;
-import android.view.RemoteAnimationTarget;
-import android.view.SurfaceControl;
-import android.view.WindowManager;
-import android.view.animation.Animation;
-
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.function.BiFunction;
-
-/** To run the TaskFragment animations. */
-class TaskFragmentAnimationRunner extends IRemoteAnimationRunner.Stub {
-
- private static final String TAG = "TaskFragAnimationRunner";
- private final Handler mHandler;
- private final TaskFragmentAnimationSpec mAnimationSpec;
-
- TaskFragmentAnimationRunner() {
- HandlerThread animationThread = new HandlerThread(
- "androidx.window.extensions.embedding", THREAD_PRIORITY_DISPLAY);
- animationThread.start();
- mHandler = animationThread.getThreadHandler();
- mAnimationSpec = new TaskFragmentAnimationSpec(mHandler);
- }
-
- @Nullable
- private Animator mAnimator;
-
- @Override
- public void onAnimationStart(@WindowManager.TransitionOldType int transit,
- @NonNull RemoteAnimationTarget[] apps,
- @NonNull RemoteAnimationTarget[] wallpapers,
- @NonNull RemoteAnimationTarget[] nonApps,
- @NonNull IRemoteAnimationFinishedCallback finishedCallback) {
- if (wallpapers.length != 0 || nonApps.length != 0) {
- throw new IllegalArgumentException("TaskFragment shouldn't handle animation with"
- + "wallpaper or non-app windows.");
- }
- if (TaskFragmentAnimationController.DEBUG) {
- Log.v(TAG, "onAnimationStart transit=" + transit);
- }
- mHandler.post(() -> startAnimation(transit, apps, finishedCallback));
- }
-
- @Override
- public void onAnimationCancelled() {
- mHandler.post(this::cancelAnimation);
- }
-
- /** Creates and starts animation. */
- private void startAnimation(@WindowManager.TransitionOldType int transit,
- @NonNull RemoteAnimationTarget[] targets,
- @NonNull IRemoteAnimationFinishedCallback finishedCallback) {
- if (mAnimator != null) {
- Log.w(TAG, "start new animation when the previous one is not finished yet.");
- mAnimator.cancel();
- }
- mAnimator = createAnimator(transit, targets, finishedCallback);
- mAnimator.start();
- }
-
- /** Cancels animation. */
- private void cancelAnimation() {
- if (mAnimator == null) {
- return;
- }
- mAnimator.cancel();
- mAnimator = null;
- }
-
- /** Creates the animator given the transition type and windows. */
- @NonNull
- private Animator createAnimator(@WindowManager.TransitionOldType int transit,
- @NonNull RemoteAnimationTarget[] targets,
- @NonNull IRemoteAnimationFinishedCallback finishedCallback) {
- final List<TaskFragmentAnimationAdapter> adapters =
- createAnimationAdapters(transit, targets);
- long duration = 0;
- for (TaskFragmentAnimationAdapter adapter : adapters) {
- duration = Math.max(duration, adapter.getDurationHint());
- }
- final ValueAnimator animator = ValueAnimator.ofFloat(0, 1);
- animator.setDuration(duration);
- animator.addUpdateListener((anim) -> {
- // Update all adapters in the same transaction.
- final SurfaceControl.Transaction t = new SurfaceControl.Transaction();
- for (TaskFragmentAnimationAdapter adapter : adapters) {
- adapter.onAnimationUpdate(t, animator.getCurrentPlayTime());
- }
- t.apply();
- });
- animator.addListener(new Animator.AnimatorListener() {
- @Override
- public void onAnimationStart(Animator animation) {}
-
- @Override
- public void onAnimationEnd(Animator animation) {
- final SurfaceControl.Transaction t = new SurfaceControl.Transaction();
- for (TaskFragmentAnimationAdapter adapter : adapters) {
- adapter.onAnimationEnd(t);
- }
- t.apply();
-
- try {
- finishedCallback.onAnimationFinished();
- } catch (RemoteException e) {
- e.rethrowFromSystemServer();
- }
- mAnimator = null;
- }
-
- @Override
- public void onAnimationCancel(Animator animation) {}
-
- @Override
- public void onAnimationRepeat(Animator animation) {}
- });
- return animator;
- }
-
- /** List of {@link TaskFragmentAnimationAdapter} to handle animations on all window targets. */
- @NonNull
- private List<TaskFragmentAnimationAdapter> createAnimationAdapters(
- @WindowManager.TransitionOldType int transit,
- @NonNull RemoteAnimationTarget[] targets) {
- switch (transit) {
- case TRANSIT_OLD_ACTIVITY_OPEN:
- case TRANSIT_OLD_TASK_FRAGMENT_OPEN:
- return createOpenAnimationAdapters(targets);
- case TRANSIT_OLD_ACTIVITY_CLOSE:
- case TRANSIT_OLD_TASK_FRAGMENT_CLOSE:
- return createCloseAnimationAdapters(targets);
- case TRANSIT_OLD_TASK_FRAGMENT_CHANGE:
- return createChangeAnimationAdapters(targets);
- default:
- throw new IllegalArgumentException("Unhandled transit type=" + transit);
- }
- }
-
- @NonNull
- private List<TaskFragmentAnimationAdapter> createOpenAnimationAdapters(
- @NonNull RemoteAnimationTarget[] targets) {
- return createOpenCloseAnimationAdapters(targets, true /* isOpening */,
- mAnimationSpec::loadOpenAnimation);
- }
-
- @NonNull
- private List<TaskFragmentAnimationAdapter> createCloseAnimationAdapters(
- @NonNull RemoteAnimationTarget[] targets) {
- return createOpenCloseAnimationAdapters(targets, false /* isOpening */,
- mAnimationSpec::loadCloseAnimation);
- }
-
- /**
- * Creates {@link TaskFragmentAnimationAdapter} for OPEN and CLOSE types of transition.
- * @param isOpening {@code true} for OPEN type, {@code false} for CLOSE type.
- */
- @NonNull
- private List<TaskFragmentAnimationAdapter> createOpenCloseAnimationAdapters(
- @NonNull RemoteAnimationTarget[] targets, boolean isOpening,
- @NonNull BiFunction<RemoteAnimationTarget, Rect, Animation> animationProvider) {
- // We need to know if the target window is only a partial of the whole animation screen.
- // If so, we will need to adjust it to make the whole animation screen looks like one.
- final List<RemoteAnimationTarget> openingTargets = new ArrayList<>();
- final List<RemoteAnimationTarget> closingTargets = new ArrayList<>();
- final Rect openingWholeScreenBounds = new Rect();
- final Rect closingWholeScreenBounds = new Rect();
- for (RemoteAnimationTarget target : targets) {
- if (target.mode != MODE_CLOSING) {
- openingTargets.add(target);
- openingWholeScreenBounds.union(target.screenSpaceBounds);
- } else {
- closingTargets.add(target);
- closingWholeScreenBounds.union(target.screenSpaceBounds);
- // Union the start bounds since this may be the ClosingChanging animation.
- closingWholeScreenBounds.union(target.startBounds);
- }
- }
-
- // For OPEN transition, open windows should be above close windows.
- // For CLOSE transition, open windows should be below close windows.
- int offsetLayer = TYPE_LAYER_OFFSET;
- final List<TaskFragmentAnimationAdapter> adapters = new ArrayList<>();
- for (RemoteAnimationTarget target : openingTargets) {
- final TaskFragmentAnimationAdapter adapter = createOpenCloseAnimationAdapter(target,
- animationProvider, openingWholeScreenBounds);
- if (isOpening) {
- adapter.overrideLayer(offsetLayer++);
- }
- adapters.add(adapter);
- }
- for (RemoteAnimationTarget target : closingTargets) {
- final TaskFragmentAnimationAdapter adapter = createOpenCloseAnimationAdapter(target,
- animationProvider, closingWholeScreenBounds);
- if (!isOpening) {
- adapter.overrideLayer(offsetLayer++);
- }
- adapters.add(adapter);
- }
- return adapters;
- }
-
- @NonNull
- private TaskFragmentAnimationAdapter createOpenCloseAnimationAdapter(
- @NonNull RemoteAnimationTarget target,
- @NonNull BiFunction<RemoteAnimationTarget, Rect, Animation> animationProvider,
- @NonNull Rect wholeAnimationBounds) {
- final Animation animation = animationProvider.apply(target, wholeAnimationBounds);
- return new TaskFragmentAnimationAdapter(animation, target, target.leash,
- wholeAnimationBounds);
- }
-
- @NonNull
- private List<TaskFragmentAnimationAdapter> createChangeAnimationAdapters(
- @NonNull RemoteAnimationTarget[] targets) {
- if (shouldUseJumpCutForChangeAnimation(targets)) {
- return new ArrayList<>();
- }
-
- final List<TaskFragmentAnimationAdapter> adapters = new ArrayList<>();
- for (RemoteAnimationTarget target : targets) {
- if (target.mode == MODE_CHANGING) {
- // This is the target with bounds change.
- final Animation[] animations =
- mAnimationSpec.createChangeBoundsChangeAnimations(target);
- // Adapter for the starting snapshot leash.
- adapters.add(new TaskFragmentAnimationAdapter.SnapshotAdapter(
- animations[0], target));
- // Adapter for the ending bounds changed leash.
- adapters.add(new TaskFragmentAnimationAdapter.BoundsChangeAdapter(
- animations[1], target));
- continue;
- }
-
- // These are the other targets that don't have bounds change in the same transition.
- final Animation animation;
- if (target.hasAnimatingParent) {
- // No-op if it will be covered by the changing parent window.
- animation = TaskFragmentAnimationSpec.createNoopAnimation(target);
- } else if (target.mode == MODE_CLOSING) {
- animation = mAnimationSpec.createChangeBoundsCloseAnimation(target);
- } else {
- animation = mAnimationSpec.createChangeBoundsOpenAnimation(target);
- }
- adapters.add(new TaskFragmentAnimationAdapter(animation, target));
- }
- return adapters;
- }
-
- /**
- * Whether we should use jump cut for the change transition.
- * This normally happens when opening a new secondary with the existing primary using a
- * different split layout. This can be complicated, like from horizontal to vertical split with
- * new split pairs.
- * Uses a jump cut animation to simplify.
- */
- private boolean shouldUseJumpCutForChangeAnimation(@NonNull RemoteAnimationTarget[] targets) {
- boolean hasOpeningWindow = false;
- boolean hasClosingWindow = false;
- for (RemoteAnimationTarget target : targets) {
- if (target.hasAnimatingParent) {
- continue;
- }
- hasOpeningWindow |= target.mode == MODE_OPENING;
- hasClosingWindow |= target.mode == MODE_CLOSING;
- }
- return hasOpeningWindow && hasClosingWindow;
- }
-}
diff --git a/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/TaskFragmentAnimationSpec.java b/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/TaskFragmentAnimationSpec.java
deleted file mode 100644
index 1f866c3b99c9..000000000000
--- a/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/TaskFragmentAnimationSpec.java
+++ /dev/null
@@ -1,267 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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 androidx.window.extensions.embedding;
-
-import static android.view.RemoteAnimationTarget.MODE_CLOSING;
-
-import android.app.ActivityThread;
-import android.content.ContentResolver;
-import android.content.Context;
-import android.database.ContentObserver;
-import android.graphics.Rect;
-import android.os.Handler;
-import android.provider.Settings;
-import android.view.RemoteAnimationTarget;
-import android.view.WindowManager;
-import android.view.animation.AlphaAnimation;
-import android.view.animation.Animation;
-import android.view.animation.AnimationSet;
-import android.view.animation.AnimationUtils;
-import android.view.animation.ClipRectAnimation;
-import android.view.animation.Interpolator;
-import android.view.animation.LinearInterpolator;
-import android.view.animation.ScaleAnimation;
-import android.view.animation.TranslateAnimation;
-
-import androidx.annotation.NonNull;
-
-import com.android.internal.R;
-import com.android.internal.policy.AttributeCache;
-import com.android.internal.policy.TransitionAnimation;
-
-/** Animation spec for TaskFragment transition. */
-// TODO(b/206557124): provide an easier way to customize animation
-class TaskFragmentAnimationSpec {
-
- private static final String TAG = "TaskFragAnimationSpec";
- private static final int CHANGE_ANIMATION_DURATION = 517;
- private static final int CHANGE_ANIMATION_FADE_DURATION = 80;
- private static final int CHANGE_ANIMATION_FADE_OFFSET = 30;
-
- private final Context mContext;
- private final TransitionAnimation mTransitionAnimation;
- private final Interpolator mFastOutExtraSlowInInterpolator;
- private final LinearInterpolator mLinearInterpolator;
- private float mTransitionAnimationScaleSetting;
-
- TaskFragmentAnimationSpec(@NonNull Handler handler) {
- mContext = ActivityThread.currentActivityThread().getApplication();
- mTransitionAnimation = new TransitionAnimation(mContext, false /* debug */, TAG);
- // Initialize the AttributeCache for the TransitionAnimation.
- AttributeCache.init(mContext);
- mFastOutExtraSlowInInterpolator = AnimationUtils.loadInterpolator(
- mContext, android.R.interpolator.fast_out_extra_slow_in);
- mLinearInterpolator = new LinearInterpolator();
-
- // The transition animation should be adjusted based on the developer option.
- final ContentResolver resolver = mContext.getContentResolver();
- mTransitionAnimationScaleSetting = getTransitionAnimationScaleSetting();
- resolver.registerContentObserver(
- Settings.Global.getUriFor(Settings.Global.TRANSITION_ANIMATION_SCALE), false,
- new SettingsObserver(handler));
- }
-
- /** For target that doesn't need to be animated. */
- @NonNull
- static Animation createNoopAnimation(@NonNull RemoteAnimationTarget target) {
- // Noop but just keep the target showing/hiding.
- final float alpha = target.mode == MODE_CLOSING ? 0f : 1f;
- return new AlphaAnimation(alpha, alpha);
- }
-
- /** Animation for target that is opening in a change transition. */
- @NonNull
- Animation createChangeBoundsOpenAnimation(@NonNull RemoteAnimationTarget target) {
- final Rect parentBounds = target.taskInfo.configuration.windowConfiguration.getBounds();
- final Rect bounds = target.screenSpaceBounds;
- final int startLeft;
- final int startTop;
- if (parentBounds.top == bounds.top && parentBounds.bottom == bounds.bottom) {
- // The window will be animated in from left or right depending on its position.
- startTop = 0;
- startLeft = parentBounds.left == bounds.left ? -bounds.width() : bounds.width();
- } else {
- // The window will be animated in from top or bottom depending on its position.
- startTop = parentBounds.top == bounds.top ? -bounds.height() : bounds.height();
- startLeft = 0;
- }
-
- // The position should be 0-based as we will post translate in
- // TaskFragmentAnimationAdapter#onAnimationUpdate
- final Animation animation = new TranslateAnimation(startLeft, 0, startTop, 0);
- animation.setInterpolator(mFastOutExtraSlowInInterpolator);
- animation.setDuration(CHANGE_ANIMATION_DURATION);
- animation.initialize(bounds.width(), bounds.height(), bounds.width(), bounds.height());
- animation.scaleCurrentDuration(mTransitionAnimationScaleSetting);
- return animation;
- }
-
- /** Animation for target that is closing in a change transition. */
- @NonNull
- Animation createChangeBoundsCloseAnimation(@NonNull RemoteAnimationTarget target) {
- final Rect parentBounds = target.taskInfo.configuration.windowConfiguration.getBounds();
- // Use startBounds if the window is closing in case it may also resize.
- final Rect bounds = target.startBounds;
- final int endTop;
- final int endLeft;
- if (parentBounds.top == bounds.top && parentBounds.bottom == bounds.bottom) {
- // The window will be animated out to left or right depending on its position.
- endTop = 0;
- endLeft = parentBounds.left == bounds.left ? -bounds.width() : bounds.width();
- } else {
- // The window will be animated out to top or bottom depending on its position.
- endTop = parentBounds.top == bounds.top ? -bounds.height() : bounds.height();
- endLeft = 0;
- }
-
- // The position should be 0-based as we will post translate in
- // TaskFragmentAnimationAdapter#onAnimationUpdate
- final Animation animation = new TranslateAnimation(0, endLeft, 0, endTop);
- animation.setInterpolator(mFastOutExtraSlowInInterpolator);
- animation.setDuration(CHANGE_ANIMATION_DURATION);
- animation.initialize(bounds.width(), bounds.height(), bounds.width(), bounds.height());
- animation.scaleCurrentDuration(mTransitionAnimationScaleSetting);
- return animation;
- }
-
- /**
- * Animation for target that is changing (bounds change) in a change transition.
- * @return the return array always has two elements. The first one is for the start leash, and
- * the second one is for the end leash.
- */
- @NonNull
- Animation[] createChangeBoundsChangeAnimations(@NonNull RemoteAnimationTarget target) {
- // Both start bounds and end bounds are in screen coordinates. We will post translate
- // to the local coordinates in TaskFragmentAnimationAdapter#onAnimationUpdate
- final Rect startBounds = target.startBounds;
- final Rect parentBounds = target.taskInfo.configuration.windowConfiguration.getBounds();
- final Rect endBounds = target.screenSpaceBounds;
- float scaleX = ((float) startBounds.width()) / endBounds.width();
- float scaleY = ((float) startBounds.height()) / endBounds.height();
- // Start leash is a child of the end leash. Reverse the scale so that the start leash won't
- // be scaled up with its parent.
- float startScaleX = 1.f / scaleX;
- float startScaleY = 1.f / scaleY;
-
- // The start leash will be fade out.
- final AnimationSet startSet = new AnimationSet(false /* shareInterpolator */);
- final Animation startAlpha = new AlphaAnimation(1f, 0f);
- startAlpha.setInterpolator(mLinearInterpolator);
- startAlpha.setDuration(CHANGE_ANIMATION_FADE_DURATION);
- startAlpha.setStartOffset(CHANGE_ANIMATION_FADE_OFFSET);
- startSet.addAnimation(startAlpha);
- final Animation startScale = new ScaleAnimation(startScaleX, startScaleX, startScaleY,
- startScaleY);
- startScale.setInterpolator(mFastOutExtraSlowInInterpolator);
- startScale.setDuration(CHANGE_ANIMATION_DURATION);
- startSet.addAnimation(startScale);
- startSet.initialize(startBounds.width(), startBounds.height(), endBounds.width(),
- endBounds.height());
- startSet.scaleCurrentDuration(mTransitionAnimationScaleSetting);
-
- // The end leash will be moved into the end position while scaling.
- final AnimationSet endSet = new AnimationSet(true /* shareInterpolator */);
- endSet.setInterpolator(mFastOutExtraSlowInInterpolator);
- final Animation endScale = new ScaleAnimation(scaleX, 1, scaleY, 1);
- endScale.setDuration(CHANGE_ANIMATION_DURATION);
- endSet.addAnimation(endScale);
- // The position should be 0-based as we will post translate in
- // TaskFragmentAnimationAdapter#onAnimationUpdate
- final Animation endTranslate = new TranslateAnimation(startBounds.left - endBounds.left, 0,
- startBounds.top - endBounds.top, 0);
- endTranslate.setDuration(CHANGE_ANIMATION_DURATION);
- endSet.addAnimation(endTranslate);
- // The end leash is resizing, we should update the window crop based on the clip rect.
- final Rect startClip = new Rect(startBounds);
- final Rect endClip = new Rect(endBounds);
- startClip.offsetTo(0, 0);
- endClip.offsetTo(0, 0);
- final Animation clipAnim = new ClipRectAnimation(startClip, endClip);
- clipAnim.setDuration(CHANGE_ANIMATION_DURATION);
- endSet.addAnimation(clipAnim);
- endSet.initialize(startBounds.width(), startBounds.height(), parentBounds.width(),
- parentBounds.height());
- endSet.scaleCurrentDuration(mTransitionAnimationScaleSetting);
-
- return new Animation[]{startSet, endSet};
- }
-
- @NonNull
- Animation loadOpenAnimation(@NonNull RemoteAnimationTarget target,
- @NonNull Rect wholeAnimationBounds) {
- final boolean isEnter = target.mode != MODE_CLOSING;
- final Animation animation;
- // Background color on TaskDisplayArea has already been set earlier in
- // WindowContainer#getAnimationAdapter.
- if (target.showBackdrop) {
- animation = mTransitionAnimation.loadDefaultAnimationRes(isEnter
- ? com.android.internal.R.anim.task_fragment_clear_top_open_enter
- : com.android.internal.R.anim.task_fragment_clear_top_open_exit);
- } else {
- animation = mTransitionAnimation.loadDefaultAnimationRes(isEnter
- ? com.android.internal.R.anim.task_fragment_open_enter
- : com.android.internal.R.anim.task_fragment_open_exit);
- }
- // Use the whole animation bounds instead of the change bounds, so that when multiple change
- // targets are opening at the same time, the animation applied to each will be the same.
- // Otherwise, we may see gap between the activities that are launching together.
- animation.initialize(wholeAnimationBounds.width(), wholeAnimationBounds.height(),
- wholeAnimationBounds.width(), wholeAnimationBounds.height());
- animation.scaleCurrentDuration(mTransitionAnimationScaleSetting);
- return animation;
- }
-
- @NonNull
- Animation loadCloseAnimation(@NonNull RemoteAnimationTarget target,
- @NonNull Rect wholeAnimationBounds) {
- final boolean isEnter = target.mode != MODE_CLOSING;
- final Animation animation;
- if (target.showBackdrop) {
- animation = mTransitionAnimation.loadDefaultAnimationRes(isEnter
- ? com.android.internal.R.anim.task_fragment_clear_top_close_enter
- : com.android.internal.R.anim.task_fragment_clear_top_close_exit);
- } else {
- animation = mTransitionAnimation.loadDefaultAnimationRes(isEnter
- ? com.android.internal.R.anim.task_fragment_close_enter
- : com.android.internal.R.anim.task_fragment_close_exit);
- }
- // Use the whole animation bounds instead of the change bounds, so that when multiple change
- // targets are closing at the same time, the animation applied to each will be the same.
- // Otherwise, we may see gap between the activities that are finishing together.
- animation.initialize(wholeAnimationBounds.width(), wholeAnimationBounds.height(),
- wholeAnimationBounds.width(), wholeAnimationBounds.height());
- animation.scaleCurrentDuration(mTransitionAnimationScaleSetting);
- return animation;
- }
-
- private float getTransitionAnimationScaleSetting() {
- return WindowManager.fixScale(Settings.Global.getFloat(mContext.getContentResolver(),
- Settings.Global.TRANSITION_ANIMATION_SCALE, mContext.getResources().getFloat(
- R.dimen.config_appTransitionAnimationDurationScaleDefault)));
- }
-
- private class SettingsObserver extends ContentObserver {
- SettingsObserver(@NonNull Handler handler) {
- super(handler);
- }
-
- @Override
- public void onChange(boolean selfChange) {
- mTransitionAnimationScaleSetting = getTransitionAnimationScaleSetting();
- }
- }
-}
diff --git a/libs/WindowManager/Jetpack/src/androidx/window/util/AcceptOnceConsumer.java b/libs/WindowManager/Jetpack/src/androidx/window/util/AcceptOnceConsumer.java
index fe60037483c4..63828ab2e62b 100644
--- a/libs/WindowManager/Jetpack/src/androidx/window/util/AcceptOnceConsumer.java
+++ b/libs/WindowManager/Jetpack/src/androidx/window/util/AcceptOnceConsumer.java
@@ -23,7 +23,7 @@ import java.util.function.Consumer;
/**
* A base class that works with {@link BaseDataProducer} to add/remove a consumer that should
* only be used once when {@link BaseDataProducer#notifyDataChanged} is called.
- * @param <T> The type of data this producer returns through {@link DataProducer#getData}.
+ * @param <T> The type of data this producer returns through {@link BaseDataProducer#getData}.
*/
public class AcceptOnceConsumer<T> implements Consumer<T> {
private final Consumer<T> mCallback;
diff --git a/libs/WindowManager/Jetpack/src/androidx/window/util/BaseDataProducer.java b/libs/WindowManager/Jetpack/src/androidx/window/util/BaseDataProducer.java
index de52f0969fa8..cd26efd4fdb6 100644
--- a/libs/WindowManager/Jetpack/src/androidx/window/util/BaseDataProducer.java
+++ b/libs/WindowManager/Jetpack/src/androidx/window/util/BaseDataProducer.java
@@ -26,13 +26,12 @@ import java.util.Set;
import java.util.function.Consumer;
/**
- * Base class that provides the implementation for the callback mechanism of the
- * {@link DataProducer} API. This class is thread safe for adding, removing, and notifying
- * consumers.
+ * Base class that manages listeners when listening to a piece of data that changes. This class is
+ * thread safe for adding, removing, and notifying consumers.
*
- * @param <T> The type of data this producer returns through {@link DataProducer#getData}.
+ * @param <T> The type of data this producer returns through {@link BaseDataProducer#getData}.
*/
-public abstract class BaseDataProducer<T> implements DataProducer<T>,
+public abstract class BaseDataProducer<T> implements
AcceptOnceConsumer.AcceptOnceProducerCallback<T> {
private final Object mLock = new Object();
@@ -42,12 +41,17 @@ public abstract class BaseDataProducer<T> implements DataProducer<T>,
private final Set<Consumer<T>> mCallbacksToRemove = new HashSet<>();
/**
+ * Emits the first available data at that point in time.
+ * @param dataConsumer a {@link Consumer} that will receive one value.
+ */
+ public abstract void getData(@NonNull Consumer<T> dataConsumer);
+
+ /**
* Adds a callback to the set of callbacks listening for data. Data is delivered through
* {@link BaseDataProducer#notifyDataChanged(Object)}. This method is thread safe. Callers
* should ensure that callbacks are thread safe.
* @param callback that will receive data from the producer.
*/
- @Override
public final void addDataChangedCallback(@NonNull Consumer<T> callback) {
synchronized (mLock) {
mCallbacks.add(callback);
@@ -63,7 +67,6 @@ public abstract class BaseDataProducer<T> implements DataProducer<T>,
* @param callback that was registered in
* {@link BaseDataProducer#addDataChangedCallback(Consumer)}.
*/
- @Override
public final void removeDataChangedCallback(@NonNull Consumer<T> callback) {
synchronized (mLock) {
mCallbacks.remove(callback);
@@ -92,8 +95,8 @@ public abstract class BaseDataProducer<T> implements DataProducer<T>,
/**
* Called to notify all registered consumers that the data provided
- * by {@link DataProducer#getData} has changed. Calls to this are thread save but callbacks need
- * to ensure thread safety.
+ * by {@link BaseDataProducer#getData} has changed. Calls to this are thread save but callbacks
+ * need to ensure thread safety.
*/
protected void notifyDataChanged(T value) {
synchronized (mLock) {
diff --git a/libs/WindowManager/Jetpack/src/androidx/window/util/DataProducer.java b/libs/WindowManager/Jetpack/src/androidx/window/util/DataProducer.java
deleted file mode 100644
index ec301dc34aaa..000000000000
--- a/libs/WindowManager/Jetpack/src/androidx/window/util/DataProducer.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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 androidx.window.util;
-
-import android.annotation.NonNull;
-
-import java.util.function.Consumer;
-
-/**
- * Produces data through {@link DataProducer#getData} and provides a mechanism for receiving
- * a callback when the data managed by the produces has changed.
- *
- * @param <T> The type of data this producer returns through {@link DataProducer#getData}.
- */
-public interface DataProducer<T> {
- /**
- * Emits the first available data at that point in time.
- * @param dataConsumer a {@link Consumer} that will receive one value.
- */
- void getData(@NonNull Consumer<T> dataConsumer);
-
- /**
- * Adds a callback to be notified when the data returned
- * from {@link DataProducer#getData} has changed.
- */
- void addDataChangedCallback(@NonNull Consumer<T> callback);
-
- /** Removes a callback previously added with {@link #addDataChangedCallback(Consumer)}. */
- void removeDataChangedCallback(@NonNull Consumer<T> callback);
-}
diff --git a/libs/WindowManager/Jetpack/tests/unittest/Android.bp b/libs/WindowManager/Jetpack/tests/unittest/Android.bp
index 61ea51a35f58..139ddda5af3c 100644
--- a/libs/WindowManager/Jetpack/tests/unittest/Android.bp
+++ b/libs/WindowManager/Jetpack/tests/unittest/Android.bp
@@ -32,6 +32,7 @@ android_test {
],
static_libs: [
+ "TestParameterInjector",
"androidx.window.extensions",
"androidx.window.extensions.core_core",
"junit",
diff --git a/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/WindowExtensionsTest.java b/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/WindowExtensionsTest.java
index c5aaddc4e0ed..92f48141b607 100644
--- a/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/WindowExtensionsTest.java
+++ b/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/WindowExtensionsTest.java
@@ -16,7 +16,7 @@
package androidx.window.extensions;
-import static androidx.window.extensions.WindowExtensionsImpl.EXTENSIONS_VERSION_CURRENT_PLATFORM;
+import static androidx.window.extensions.WindowExtensionsImpl.getExtensionsVersionCurrentPlatform;
import static com.google.common.truth.Truth.assertThat;
@@ -59,7 +59,8 @@ public class WindowExtensionsTest {
@Test
public void testGetVendorApiLevel_extensionsEnabled_matchesCurrentVersion() {
assumeTrue(WindowManager.hasWindowExtensionsEnabled());
- assertThat(mVersion).isEqualTo(EXTENSIONS_VERSION_CURRENT_PLATFORM);
+ assumeFalse(((WindowExtensionsImpl) mExtensions).hasLevelOverride());
+ assertThat(mVersion).isEqualTo(getExtensionsVersionCurrentPlatform());
}
@Test
diff --git a/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/JetpackTaskFragmentOrganizerTest.java b/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/JetpackTaskFragmentOrganizerTest.java
index 7b473b04548c..ad41b18dcbc6 100644
--- a/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/JetpackTaskFragmentOrganizerTest.java
+++ b/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/JetpackTaskFragmentOrganizerTest.java
@@ -23,8 +23,6 @@ import static androidx.window.extensions.embedding.EmbeddingTestUtils.createTest
import static com.android.dx.mockito.inline.extended.ExtendedMockito.spyOn;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.verify;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
@@ -86,24 +84,6 @@ public class JetpackTaskFragmentOrganizerTest {
}
@Test
- public void testUnregisterOrganizer() {
- mOrganizer.overrideSplitAnimation();
- mOrganizer.unregisterOrganizer();
-
- verify(mOrganizer).unregisterRemoteAnimations();
- }
-
- @Test
- public void testOverrideSplitAnimation() {
- assertNull(mOrganizer.mAnimationController);
-
- mOrganizer.overrideSplitAnimation();
-
- assertNotNull(mOrganizer.mAnimationController);
- verify(mOrganizer).registerRemoteAnimations(mOrganizer.mAnimationController.mDefinition);
- }
-
- @Test
public void testExpandTaskFragment() {
final TaskContainer taskContainer = createTestTaskContainer();
doReturn(taskContainer).when(mSplitController).getTaskContainer(anyInt());
diff --git a/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/OverlayPresentationTest.java b/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/OverlayPresentationTest.java
index 325750243744..1c4c8870b26f 100644
--- a/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/OverlayPresentationTest.java
+++ b/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/OverlayPresentationTest.java
@@ -35,6 +35,7 @@ import static androidx.window.extensions.embedding.SplitPresenter.CONTAINER_POSI
import static androidx.window.extensions.embedding.SplitPresenter.CONTAINER_POSITION_RIGHT;
import static androidx.window.extensions.embedding.SplitPresenter.CONTAINER_POSITION_TOP;
import static androidx.window.extensions.embedding.SplitPresenter.getOverlayPosition;
+import static androidx.window.extensions.embedding.SplitPresenter.positionToString;
import static androidx.window.extensions.embedding.SplitPresenter.sanitizeBounds;
import static androidx.window.extensions.embedding.WindowAttributes.DIM_AREA_ON_TASK;
@@ -78,7 +79,6 @@ import android.window.WindowContainerTransaction;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.test.core.app.ApplicationProvider;
-import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
import androidx.window.common.DeviceStateManagerFoldingFeatureProducer;
import androidx.window.extensions.layout.WindowLayoutComponentImpl;
@@ -86,6 +86,9 @@ import androidx.window.extensions.layout.WindowLayoutInfo;
import com.android.window.flags.Flags;
+import com.google.testing.junit.testparameterinjector.TestParameter;
+import com.google.testing.junit.testparameterinjector.TestParameterInjector;
+
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
@@ -108,7 +111,7 @@ import java.util.List;
@SuppressWarnings("GuardedBy")
@Presubmit
@SmallTest
-@RunWith(AndroidJUnit4.class)
+@RunWith(TestParameterInjector.class)
public class OverlayPresentationTest {
@Rule
public MockitoRule rule = MockitoJUnit.rule();
@@ -875,57 +878,70 @@ public class OverlayPresentationTest {
eq(overlayContainer.getTaskFragmentToken()), eq(activityToken));
}
- // TODO(b/243518738): Rewrite with TestParameter.
- @Test
- public void testGetOverlayPosition() {
- assertWithMessage("It must be position left for left overlay.")
- .that(getOverlayPosition(new Rect(
- TASK_BOUNDS.left,
- TASK_BOUNDS.top,
- TASK_BOUNDS.right / 2,
- TASK_BOUNDS.bottom), TASK_BOUNDS)).isEqualTo(CONTAINER_POSITION_LEFT);
- assertWithMessage("It must be position left for shrunk left overlay.")
- .that(getOverlayPosition(new Rect(
- TASK_BOUNDS.left,
- TASK_BOUNDS.top + 20,
- TASK_BOUNDS.right / 2,
- TASK_BOUNDS.bottom - 20), TASK_BOUNDS)).isEqualTo(CONTAINER_POSITION_LEFT);
- assertWithMessage("It must be position left for top overlay.")
- .that(getOverlayPosition(new Rect(
- TASK_BOUNDS.left,
- TASK_BOUNDS.top,
- TASK_BOUNDS.right,
- TASK_BOUNDS.bottom / 2), TASK_BOUNDS)).isEqualTo(CONTAINER_POSITION_TOP);
- assertWithMessage("It must be position left for shrunk top overlay.")
- .that(getOverlayPosition(new Rect(
- TASK_BOUNDS.left + 20,
- TASK_BOUNDS.top,
- TASK_BOUNDS.right - 20,
- TASK_BOUNDS.bottom / 2), TASK_BOUNDS)).isEqualTo(CONTAINER_POSITION_TOP);
- assertWithMessage("It must be position left for right overlay.")
- .that(getOverlayPosition(new Rect(
- TASK_BOUNDS.right / 2,
- TASK_BOUNDS.top,
- TASK_BOUNDS.right,
- TASK_BOUNDS.bottom), TASK_BOUNDS)).isEqualTo(CONTAINER_POSITION_RIGHT);
- assertWithMessage("It must be position left for shrunk right overlay.")
- .that(getOverlayPosition(new Rect(
- TASK_BOUNDS.right / 2,
- TASK_BOUNDS.top + 20,
- TASK_BOUNDS.right,
- TASK_BOUNDS.bottom - 20), TASK_BOUNDS)).isEqualTo(CONTAINER_POSITION_RIGHT);
- assertWithMessage("It must be position left for bottom overlay.")
- .that(getOverlayPosition(new Rect(
- TASK_BOUNDS.left,
- TASK_BOUNDS.bottom / 2,
- TASK_BOUNDS.right,
- TASK_BOUNDS.bottom), TASK_BOUNDS)).isEqualTo(CONTAINER_POSITION_BOTTOM);
- assertWithMessage("It must be position left for shrunk bottom overlay.")
- .that(getOverlayPosition(new Rect(
- TASK_BOUNDS.left + 20,
- TASK_BOUNDS.bottom / 20,
- TASK_BOUNDS.right - 20,
- TASK_BOUNDS.bottom), TASK_BOUNDS)).isEqualTo(CONTAINER_POSITION_BOTTOM);
+ @Test
+ public void testGetOverlayPosition(@TestParameter OverlayPositionTestParams params) {
+ final Rect taskBounds = new Rect(TASK_BOUNDS);
+ final Rect overlayBounds = params.toOverlayBounds();
+ final int overlayPosition = getOverlayPosition(overlayBounds, taskBounds);
+
+ assertWithMessage("The overlay position must be "
+ + positionToString(params.mPosition) + ", but is "
+ + positionToString(overlayPosition)
+ + ", parent bounds=" + taskBounds + ", overlay bounds=" + overlayBounds)
+ .that(overlayPosition).isEqualTo(params.mPosition);
+ }
+
+ private enum OverlayPositionTestParams {
+ LEFT_OVERLAY(CONTAINER_POSITION_LEFT, false /* shouldBeShrunk */),
+ LEFT_SHRUNK_OVERLAY(CONTAINER_POSITION_LEFT, true /* shouldBeShrunk */),
+ TOP_OVERLAY(CONTAINER_POSITION_TOP, false /* shouldBeShrunk */),
+ TOP_SHRUNK_OVERLAY(CONTAINER_POSITION_TOP, true /* shouldBeShrunk */),
+ RIGHT_OVERLAY(CONTAINER_POSITION_RIGHT, false /* shouldBeShrunk */),
+ RIGHT_SHRUNK_OVERLAY(CONTAINER_POSITION_RIGHT, true /* shouldBeShrunk */),
+ BOTTOM_OVERLAY(CONTAINER_POSITION_BOTTOM, false /* shouldBeShrunk */),
+ BOTTOM_SHRUNK_OVERLAY(CONTAINER_POSITION_BOTTOM, true /* shouldBeShrunk */);
+
+ @SplitPresenter.ContainerPosition
+ private final int mPosition;
+
+ private final boolean mShouldBeShrunk;
+
+ OverlayPositionTestParams(
+ @SplitPresenter.ContainerPosition int position, boolean shouldBeShrunk) {
+ mPosition = position;
+ mShouldBeShrunk = shouldBeShrunk;
+ }
+
+ @NonNull
+ private Rect toOverlayBounds() {
+ Rect r = new Rect(TASK_BOUNDS);
+ final int offset = mShouldBeShrunk ? 20 : 0;
+ switch (mPosition) {
+ case CONTAINER_POSITION_LEFT:
+ r.top += offset;
+ r.right /= 2;
+ r.bottom -= offset;
+ break;
+ case CONTAINER_POSITION_TOP:
+ r.left += offset;
+ r.right -= offset;
+ r.bottom /= 2;
+ break;
+ case CONTAINER_POSITION_RIGHT:
+ r.left = r.right / 2;
+ r.top += offset;
+ r.bottom -= offset;
+ break;
+ case CONTAINER_POSITION_BOTTOM:
+ r.left += offset;
+ r.right -= offset;
+ r.top = r.bottom / 2;
+ break;
+ default:
+ throw new IllegalArgumentException("Invalid position: " + mPosition);
+ }
+ return r;
+ }
}
/**
diff --git a/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/SplitControllerTest.java b/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/SplitControllerTest.java
index efeec82b782e..d852204b88a8 100644
--- a/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/SplitControllerTest.java
+++ b/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/SplitControllerTest.java
@@ -103,8 +103,6 @@ import androidx.window.common.DeviceStateManagerFoldingFeatureProducer;
import androidx.window.extensions.layout.WindowLayoutComponentImpl;
import androidx.window.extensions.layout.WindowLayoutInfo;
-import com.android.window.flags.Flags;
-
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
@@ -167,6 +165,7 @@ public class SplitControllerTest {
private Consumer<List<SplitInfo>> mEmbeddingCallback;
private List<SplitInfo> mSplitInfos;
private TransactionManager mTransactionManager;
+ private ActivityThread mCurrentActivityThread;
@Before
public void setUp() {
@@ -183,10 +182,12 @@ public class SplitControllerTest {
};
mSplitController.setSplitInfoCallback(mEmbeddingCallback);
mTransactionManager = mSplitController.mTransactionManager;
+ mCurrentActivityThread = ActivityThread.currentActivityThread();
spyOn(mSplitController);
spyOn(mSplitPresenter);
spyOn(mEmbeddingCallback);
spyOn(mTransactionManager);
+ spyOn(mCurrentActivityThread);
doNothing().when(mSplitPresenter).applyTransaction(any(), anyInt(), anyBoolean());
final Configuration activityConfig = new Configuration();
activityConfig.windowConfiguration.setBounds(TASK_BOUNDS);
@@ -1557,8 +1558,6 @@ public class SplitControllerTest {
@Test
public void testIsActivityEmbedded() {
- mSetFlagRule.enableFlags(Flags.FLAG_ACTIVITY_WINDOW_INFO_FLAG);
-
assertFalse(mSplitController.isActivityEmbedded(mActivity));
doReturn(true).when(mActivityWindowInfo).isEmbedded();
@@ -1568,8 +1567,6 @@ public class SplitControllerTest {
@Test
public void testGetEmbeddedActivityWindowInfo() {
- mSetFlagRule.enableFlags(Flags.FLAG_ACTIVITY_WINDOW_INFO_FLAG);
-
final boolean isEmbedded = true;
final Rect taskBounds = new Rect(0, 0, 1000, 2000);
final Rect activityStackBounds = new Rect(0, 0, 500, 2000);
@@ -1584,8 +1581,6 @@ public class SplitControllerTest {
@Test
public void testSetEmbeddedActivityWindowInfoCallback() {
- mSetFlagRule.enableFlags(Flags.FLAG_ACTIVITY_WINDOW_INFO_FLAG);
-
final ClientTransactionListenerController controller = ClientTransactionListenerController
.getInstance();
spyOn(controller);
@@ -1676,7 +1671,8 @@ public class SplitControllerTest {
final IBinder activityToken = new Binder();
doReturn(activityToken).when(activity).getActivityToken();
doReturn(activity).when(mSplitController).getActivity(activityToken);
- doReturn(activityClientRecord).when(mSplitController).getActivityClientRecord(activity);
+ doReturn(activityClientRecord).when(mCurrentActivityThread).getActivityClient(
+ activityToken);
doReturn(taskId).when(activity).getTaskId();
doReturn(new ActivityInfo()).when(activity).getActivityInfo();
doReturn(DEFAULT_DISPLAY).when(activity).getDisplayId();
diff --git a/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/TaskFragmentAnimationControllerTest.java b/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/TaskFragmentAnimationControllerTest.java
deleted file mode 100644
index a1e9f08585f6..000000000000
--- a/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/TaskFragmentAnimationControllerTest.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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 androidx.window.extensions.embedding;
-
-import static com.android.dx.mockito.inline.extended.ExtendedMockito.verify;
-
-import static org.mockito.Mockito.never;
-
-import android.platform.test.annotations.Presubmit;
-import android.window.TaskFragmentOrganizer;
-
-import androidx.test.ext.junit.runners.AndroidJUnit4;
-import androidx.test.filters.SmallTest;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.junit.MockitoJUnit;
-import org.mockito.junit.MockitoRule;
-
-/**
- * Test class for {@link TaskFragmentAnimationController}.
- *
- * Build/Install/Run:
- * atest WMJetpackUnitTests:TaskFragmentAnimationControllerTest
- */
-@Presubmit
-@SmallTest
-@RunWith(AndroidJUnit4.class)
-public class TaskFragmentAnimationControllerTest {
- @Rule
- public MockitoRule rule = MockitoJUnit.rule();
-
- @Mock
- private TaskFragmentOrganizer mOrganizer;
- private TaskFragmentAnimationController mAnimationController;
-
- @Before
- public void setup() {
- mAnimationController = new TaskFragmentAnimationController(mOrganizer);
- }
-
- @Test
- public void testRegisterRemoteAnimations() {
- mAnimationController.registerRemoteAnimations();
-
- verify(mOrganizer).registerRemoteAnimations(mAnimationController.mDefinition);
-
- mAnimationController.registerRemoteAnimations();
-
- // No extra call if it has been registered.
- verify(mOrganizer).registerRemoteAnimations(mAnimationController.mDefinition);
- }
-
- @Test
- public void testUnregisterRemoteAnimations() {
- mAnimationController.unregisterRemoteAnimations();
-
- // No call if it is not registered.
- verify(mOrganizer, never()).unregisterRemoteAnimations();
-
- mAnimationController.registerRemoteAnimations();
- mAnimationController.unregisterRemoteAnimations();
-
- verify(mOrganizer).unregisterRemoteAnimations();
-
- mAnimationController.unregisterRemoteAnimations();
-
- // No extra call if it has been unregistered.
- verify(mOrganizer).unregisterRemoteAnimations();
- }
-}
diff --git a/libs/WindowManager/Shell/Android.bp b/libs/WindowManager/Shell/Android.bp
index 1e6824196687..5135e9ee14bc 100644
--- a/libs/WindowManager/Shell/Android.bp
+++ b/libs/WindowManager/Shell/Android.bp
@@ -190,6 +190,15 @@ java_library {
],
}
+java_library {
+ name: "WindowManager-Shell-shared-desktopMode",
+
+ srcs: [
+ "shared/**/desktopmode/*.java",
+ "shared/**/desktopmode/*.kt",
+ ],
+}
+
android_library {
name: "WindowManager-Shell",
srcs: [
@@ -215,7 +224,6 @@ android_library {
"//frameworks/libs/systemui:com_android_systemui_shared_flags_lib",
"//frameworks/libs/systemui:iconloader_base",
"com_android_wm_shell_flags_lib",
- "com.android.window.flags.window-aconfig-java",
"WindowManager-Shell-proto",
"WindowManager-Shell-shared",
"perfetto_trace_java_protos",
@@ -227,6 +235,13 @@ android_library {
// *.kt sources are inside a filegroup.
"kotlin-annotations",
],
+ required: [
+ "wmshell.protolog.json.gz",
+ "wmshell.protolog.pb",
+ ],
+ flags_packages: [
+ "com_android_wm_shell_flags",
+ ],
kotlincflags: ["-Xjvm-default=all"],
manifest: "AndroidManifest.xml",
plugins: ["dagger2-compiler"],
diff --git a/libs/WindowManager/Shell/AndroidManifest.xml b/libs/WindowManager/Shell/AndroidManifest.xml
index 52ae93f5ebf1..bbbc23e8b922 100644
--- a/libs/WindowManager/Shell/AndroidManifest.xml
+++ b/libs/WindowManager/Shell/AndroidManifest.xml
@@ -34,6 +34,7 @@
<activity
android:name=".bubbles.shortcut.CreateBubbleShortcutActivity"
+ android:featureFlag="com.android.wm.shell.enable_retrievable_bubbles"
android:exported="true"
android:excludeFromRecents="true"
android:theme="@android:style/Theme.NoDisplay"
@@ -47,6 +48,7 @@
<activity
android:name=".bubbles.shortcut.ShowBubblesActivity"
+ android:featureFlag="com.android.wm.shell.enable_retrievable_bubbles"
android:exported="true"
android:excludeFromRecents="true"
android:theme="@android:style/Theme.NoDisplay" >
diff --git a/libs/WindowManager/Shell/aconfig/multitasking.aconfig b/libs/WindowManager/Shell/aconfig/multitasking.aconfig
index 3ff40e0886a4..56ea7c201e53 100644
--- a/libs/WindowManager/Shell/aconfig/multitasking.aconfig
+++ b/libs/WindowManager/Shell/aconfig/multitasking.aconfig
@@ -113,16 +113,6 @@ flag {
}
flag {
- name: "animate_bubble_size_change"
- namespace: "multitasking"
- description: "Turns on the animation for bubble bar icons size change"
- bug: "335575529"
- metadata {
- purpose: PURPOSE_BUGFIX
- }
-}
-
-flag {
name: "enable_taskbar_on_phones"
namespace: "multitasking"
description: "Enables taskbar on phones"
diff --git a/libs/WindowManager/Shell/multivalentScreenshotTests/goldens/robolectric/phone/dark_portrait_bubbles_education.png b/libs/WindowManager/Shell/multivalentScreenshotTests/goldens/robolectric/phone/dark_portrait_bubbles_education.png
index 723c6b8d9c93..e02c89ae07bd 100644
--- a/libs/WindowManager/Shell/multivalentScreenshotTests/goldens/robolectric/phone/dark_portrait_bubbles_education.png
+++ b/libs/WindowManager/Shell/multivalentScreenshotTests/goldens/robolectric/phone/dark_portrait_bubbles_education.png
Binary files differ
diff --git a/libs/WindowManager/Shell/multivalentScreenshotTests/goldens/robolectric/phone/light_portrait_bubbles_education.png b/libs/WindowManager/Shell/multivalentScreenshotTests/goldens/robolectric/phone/light_portrait_bubbles_education.png
index 723c6b8d9c93..e02c89ae07bd 100644
--- a/libs/WindowManager/Shell/multivalentScreenshotTests/goldens/robolectric/phone/light_portrait_bubbles_education.png
+++ b/libs/WindowManager/Shell/multivalentScreenshotTests/goldens/robolectric/phone/light_portrait_bubbles_education.png
Binary files differ
diff --git a/libs/WindowManager/Shell/res/drawable/desktop_mode_ic_handle_menu_open_in_browser.xml b/libs/WindowManager/Shell/res/drawable/desktop_mode_ic_handle_menu_open_in_browser.xml
new file mode 100644
index 000000000000..7d912a24c443
--- /dev/null
+++ b/libs/WindowManager/Shell/res/drawable/desktop_mode_ic_handle_menu_open_in_browser.xml
@@ -0,0 +1,19 @@
+<?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.
+ -->
+
+<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="960" android:viewportHeight="960" android:tint="?attr/colorControlNormal">
+ <path android:fillColor="@android:color/black" android:pathData="M160,880Q127,880 103.5,856.5Q80,833 80,800L80,440Q80,407 103.5,383.5Q127,360 160,360L240,360L240,160Q240,127 263.5,103.5Q287,80 320,80L800,80Q833,80 856.5,103.5Q880,127 880,160L880,520Q880,553 856.5,576.5Q833,600 800,600L720,600L720,800Q720,833 696.5,856.5Q673,880 640,880L160,880ZM160,800L640,800Q640,800 640,800Q640,800 640,800L640,520L160,520L160,800Q160,800 160,800Q160,800 160,800ZM720,520L800,520Q800,520 800,520Q800,520 800,520L800,240L320,240L320,360L640,360Q673,360 696.5,383.5Q720,407 720,440L720,520Z"/>
+</vector>
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 d5724cc6a420..864f7cd421ee 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
@@ -19,6 +19,10 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="@dimen/desktop_mode_handle_menu_width"
android:layout_height="wrap_content"
+ 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:orientation="vertical">
<LinearLayout
@@ -27,7 +31,7 @@
android:layout_height="@dimen/desktop_mode_handle_menu_app_info_pill_height"
android:layout_marginTop="@dimen/desktop_mode_handle_menu_margin_top"
android:layout_marginStart="1dp"
- android:elevation="1dp"
+ android:elevation="@dimen/desktop_mode_handle_menu_pill_elevation"
android:orientation="horizontal"
android:background="@drawable/desktop_mode_decor_handle_menu_background"
android:gravity="center_vertical">
@@ -73,7 +77,7 @@
android:layout_marginTop="@dimen/desktop_mode_handle_menu_pill_spacing_margin"
android:layout_marginStart="1dp"
android:orientation="horizontal"
- android:elevation="1dp"
+ android:elevation="@dimen/desktop_mode_handle_menu_pill_elevation"
android:background="@drawable/desktop_mode_decor_handle_menu_background"
android:gravity="center_vertical">
@@ -124,7 +128,7 @@
android:layout_marginTop="@dimen/desktop_mode_handle_menu_pill_spacing_margin"
android:layout_marginStart="1dp"
android:orientation="vertical"
- android:elevation="1dp"
+ android:elevation="@dimen/desktop_mode_handle_menu_pill_elevation"
android:background="@drawable/desktop_mode_decor_handle_menu_background">
<Button
@@ -135,5 +139,24 @@
android:drawableTint="?androidprv:attr/materialColorOnSurface"
style="@style/DesktopModeHandleMenuActionButton"/>
</LinearLayout>
+
+ <LinearLayout
+ android:id="@+id/open_in_browser_pill"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/desktop_mode_handle_menu_open_in_browser_pill_height"
+ android:layout_marginTop="@dimen/desktop_mode_handle_menu_pill_spacing_margin"
+ android:layout_marginStart="1dp"
+ android:orientation="vertical"
+ android:elevation="@dimen/desktop_mode_handle_menu_pill_elevation"
+ android:background="@drawable/desktop_mode_decor_handle_menu_background">
+
+ <Button
+ android:id="@+id/open_in_browser_button"
+ android:contentDescription="@string/open_in_browser_text"
+ android:text="@string/open_in_browser_text"
+ android:drawableStart="@drawable/desktop_mode_ic_handle_menu_open_in_browser"
+ android:drawableTint="?androidprv:attr/materialColorOnSurface"
+ style="@style/DesktopModeHandleMenuActionButton"/>
+ </LinearLayout>
</LinearLayout>
diff --git a/libs/WindowManager/Shell/res/values-af/strings.xml b/libs/WindowManager/Shell/res/values-af/strings.xml
index 8b328e2c79cf..6e8a679928f0 100644
--- a/libs/WindowManager/Shell/res/values-af/strings.xml
+++ b/libs/WindowManager/Shell/res/values-af/strings.xml
@@ -118,6 +118,8 @@
<string name="float_button_text" msgid="9221657008391364581">"Sweef"</string>
<string name="select_text" msgid="5139083974039906583">"Kies"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Skermskoot"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"Maak toe"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Maak kieslys toe"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Maak kieslys oop"</string>
diff --git a/libs/WindowManager/Shell/res/values-am/strings.xml b/libs/WindowManager/Shell/res/values-am/strings.xml
index b005a01711eb..ac7935d76bfd 100644
--- a/libs/WindowManager/Shell/res/values-am/strings.xml
+++ b/libs/WindowManager/Shell/res/values-am/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"አረፋ"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"ያቀናብሩ"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"አረፋ ተሰናብቷል።"</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"አረፋዎች"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"አረፋዎችን አሳይ"</string>
<string name="restart_button_description" msgid="4564728020654658478">"ለተሻለ ዕይታ ይህን መተግበሪያ እንደገና ለመጀመር መታ ያድርጉ"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"የዚህን መተግበሪያ ምጥጥነ ገፅታ በቅንብሮች ውስጥ ይለውጡ"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"የምጥጥነ ገፅታ ለውጥ"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"ተንሳፋፊ"</string>
<string name="select_text" msgid="5139083974039906583">"ምረጥ"</string>
<string name="screenshot_text" msgid="1477704010087786671">"ቅጽበታዊ ገፅ ዕይታ"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"ዝጋ"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"ምናሌ ዝጋ"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"ምናሌን ክፈት"</string>
diff --git a/libs/WindowManager/Shell/res/values-ar/strings.xml b/libs/WindowManager/Shell/res/values-ar/strings.xml
index 8c283d33eff6..53ff6da41d34 100644
--- a/libs/WindowManager/Shell/res/values-ar/strings.xml
+++ b/libs/WindowManager/Shell/res/values-ar/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"فقاعة"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"إدارة"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"تم إغلاق الفقاعة."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"الفقاعات"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"إظهار الفقاعات"</string>
<string name="restart_button_description" msgid="4564728020654658478">"انقر لإعادة تشغيل هذا التطبيق للحصول على تجربة عرض أفضل."</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"يمكنك تغيير نسبة العرض إلى الارتفاع لهذا التطبيق من خلال \"الإعدادات\"."</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"تغيير نسبة العرض إلى الارتفاع"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"نافذة عائمة"</string>
<string name="select_text" msgid="5139083974039906583">"اختيار"</string>
<string name="screenshot_text" msgid="1477704010087786671">"لقطة شاشة"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"إغلاق"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"إغلاق القائمة"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"فتح القائمة"</string>
diff --git a/libs/WindowManager/Shell/res/values-as/strings.xml b/libs/WindowManager/Shell/res/values-as/strings.xml
index ef92587ad274..b94ab2e73e9c 100644
--- a/libs/WindowManager/Shell/res/values-as/strings.xml
+++ b/libs/WindowManager/Shell/res/values-as/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"বাবল"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"পৰিচালনা কৰক"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"বাবল অগ্ৰাহ্য কৰা হৈছে"</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"বাবল"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"বাবল দেখুৱাওক"</string>
<string name="restart_button_description" msgid="4564728020654658478">"উন্নত ভিউ পোৱাৰ বাবে এপ্‌টো ৰিষ্টাৰ্ট কৰিবলৈ টিপক"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"ছেটিঙলৈ গৈ এই এপ্‌টোৰ আকাৰৰ অনুপাত সলনি কৰক"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"আকাৰৰ অনুপাত সলনি কৰক"</string>
@@ -118,6 +116,7 @@
<string name="float_button_text" msgid="9221657008391364581">"ওপঙা"</string>
<string name="select_text" msgid="5139083974039906583">"বাছনি কৰক"</string>
<string name="screenshot_text" msgid="1477704010087786671">"স্ক্ৰীনশ্বট"</string>
+ <string name="open_in_browser_text" msgid="9181692926376072904">"ব্ৰাউজাৰত খোলক"</string>
<string name="close_text" msgid="4986518933445178928">"বন্ধ কৰক"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"মেনু বন্ধ কৰক"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"মেনু খোলক"</string>
diff --git a/libs/WindowManager/Shell/res/values-az/strings.xml b/libs/WindowManager/Shell/res/values-az/strings.xml
index 04b2f1c23bc4..dd3e0e3b03f4 100644
--- a/libs/WindowManager/Shell/res/values-az/strings.xml
+++ b/libs/WindowManager/Shell/res/values-az/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Qabarcıq"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"İdarə edin"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Qabarcıqdan imtina edilib."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Yumrucuq"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Yumrucuqları göstərin"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Yaxşı görünüş üçün toxunaraq bu tətbiqi yenidən başladın"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Ayarlarda bu tətbiqin tərəflər nisbətini dəyişin"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Tərəflər nisbətini dəyişin"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"Üzən pəncərə"</string>
<string name="select_text" msgid="5139083974039906583">"Seçin"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Skrinşot"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"Bağlayın"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Menyunu bağlayın"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Menyunu açın"</string>
diff --git a/libs/WindowManager/Shell/res/values-b+sr+Latn/strings.xml b/libs/WindowManager/Shell/res/values-b+sr+Latn/strings.xml
index 47bc105f19bc..af695e73161d 100644
--- a/libs/WindowManager/Shell/res/values-b+sr+Latn/strings.xml
+++ b/libs/WindowManager/Shell/res/values-b+sr+Latn/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Oblačić"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Upravljajte"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Oblačić je odbačen."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Oblačići"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Prikaži oblačiće"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Dodirnite da biste restartovali ovu aplikaciju radi boljeg prikaza"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Promenite razmeru ove aplikacije u Podešavanjima"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Promeni razmeru"</string>
@@ -118,6 +116,7 @@
<string name="float_button_text" msgid="9221657008391364581">"Plutajuće"</string>
<string name="select_text" msgid="5139083974039906583">"Izaberite"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Snimak ekrana"</string>
+ <string name="open_in_browser_text" msgid="9181692926376072904">"Otvorite u pregledaču"</string>
<string name="close_text" msgid="4986518933445178928">"Zatvorite"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Zatvorite meni"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Otvorite meni"</string>
diff --git a/libs/WindowManager/Shell/res/values-be/strings.xml b/libs/WindowManager/Shell/res/values-be/strings.xml
index 6ad7553a8383..dbbc07fe2407 100644
--- a/libs/WindowManager/Shell/res/values-be/strings.xml
+++ b/libs/WindowManager/Shell/res/values-be/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Усплывальнае апавяшчэнне"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Кіраваць"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Усплывальнае апавяшчэнне адхілена."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Успл. чаты"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Паказ усплывальных чатаў"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Націсніце, каб перазапусціць гэту праграму для зручнейшага прагляду"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Змяніць суадносіны бакоў для гэтай праграмы ў наладах"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Змяніць суадносіны бакоў"</string>
@@ -118,6 +116,7 @@
<string name="float_button_text" msgid="9221657008391364581">"Зрабіць рухомым акном"</string>
<string name="select_text" msgid="5139083974039906583">"Выбраць"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Здымак экрана"</string>
+ <string name="open_in_browser_text" msgid="9181692926376072904">"Адкрыць у браўзеры"</string>
<string name="close_text" msgid="4986518933445178928">"Закрыць"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Закрыць меню"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Адкрыць меню"</string>
diff --git a/libs/WindowManager/Shell/res/values-bg/strings.xml b/libs/WindowManager/Shell/res/values-bg/strings.xml
index a9e0bce81376..bba2f999c8ea 100644
--- a/libs/WindowManager/Shell/res/values-bg/strings.xml
+++ b/libs/WindowManager/Shell/res/values-bg/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Балонче"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Управление"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Балончето е отхвърлено."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Балончета"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Показване на балончетата"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Докоснете, за да рестартирате това приложение с цел по-добър изглед"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Променете съотношението на това приложение в „Настройки“"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Промяна на съотношението"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"Плаващо"</string>
<string name="select_text" msgid="5139083974039906583">"Избиране"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Екранна снимка"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"Затваряне"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Затваряне на менюто"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Отваряне на менюто"</string>
diff --git a/libs/WindowManager/Shell/res/values-bn/strings.xml b/libs/WindowManager/Shell/res/values-bn/strings.xml
index 29de1007e311..cb081821d719 100644
--- a/libs/WindowManager/Shell/res/values-bn/strings.xml
+++ b/libs/WindowManager/Shell/res/values-bn/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"বাবল"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"ম্যানেজ করুন"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"বাবল বাতিল করা হয়েছে।"</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"বাবল"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"বাবল দেখুন"</string>
<string name="restart_button_description" msgid="4564728020654658478">"আরও ভাল ভিউয়ের জন্য এই অ্যাপ রিস্টার্ট করতে ট্যাপ করুন"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"সেটিংস থেকে এই অ্যাপের অ্যাস্পেক্ট রেশিও পরিবর্তন করুন"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"অ্যাস্পেক্ট রেশিও পরিবর্তন করুন"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"ফ্লোট"</string>
<string name="select_text" msgid="5139083974039906583">"বেছে নিন"</string>
<string name="screenshot_text" msgid="1477704010087786671">"স্ক্রিনশট"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"বন্ধ করুন"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"\'মেনু\' বন্ধ করুন"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"মেনু খুলুন"</string>
diff --git a/libs/WindowManager/Shell/res/values-bs/strings.xml b/libs/WindowManager/Shell/res/values-bs/strings.xml
index 5f1da7571d95..e7505e50f749 100644
--- a/libs/WindowManager/Shell/res/values-bs/strings.xml
+++ b/libs/WindowManager/Shell/res/values-bs/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Oblačić"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Upravljaj"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Oblačić je odbačen."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Oblačići"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Prikaz oblačića"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Dodirnite da ponovo pokrenete ovu aplikaciju radi boljeg prikaza"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Promijenite format slike aplikacije u Postavkama"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Promijenite format slike"</string>
@@ -118,6 +116,7 @@
<string name="float_button_text" msgid="9221657008391364581">"Lebdeći"</string>
<string name="select_text" msgid="5139083974039906583">"Odabir"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Snimak ekrana"</string>
+ <string name="open_in_browser_text" msgid="9181692926376072904">"Otvori u pregledniku"</string>
<string name="close_text" msgid="4986518933445178928">"Zatvaranje"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Zatvaranje menija"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Otvaranje menija"</string>
diff --git a/libs/WindowManager/Shell/res/values-ca/strings.xml b/libs/WindowManager/Shell/res/values-ca/strings.xml
index d70de794ba17..ce9f54798120 100644
--- a/libs/WindowManager/Shell/res/values-ca/strings.xml
+++ b/libs/WindowManager/Shell/res/values-ca/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Bombolla"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Gestiona"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"La bombolla s\'ha ignorat."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Bombolles"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Mostra les bombolles"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Toca per reiniciar aquesta aplicació i obtenir una millor visualització"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Canvia la relació d\'aspecte d\'aquesta aplicació a Configuració"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Canvia la relació d\'aspecte"</string>
@@ -118,6 +116,7 @@
<string name="float_button_text" msgid="9221657008391364581">"Flotant"</string>
<string name="select_text" msgid="5139083974039906583">"Selecciona"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Captura de pantalla"</string>
+ <string name="open_in_browser_text" msgid="9181692926376072904">"Obre al navegador"</string>
<string name="close_text" msgid="4986518933445178928">"Tanca"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Tanca el menú"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Obre el menú"</string>
diff --git a/libs/WindowManager/Shell/res/values-cs/strings.xml b/libs/WindowManager/Shell/res/values-cs/strings.xml
index ca00fec12e86..06941f6db248 100644
--- a/libs/WindowManager/Shell/res/values-cs/strings.xml
+++ b/libs/WindowManager/Shell/res/values-cs/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Bublina"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Spravovat"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Bublina byla zavřena."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Bubliny"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Zobrazovat bubliny"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Klepnutím tuto aplikaci restartujete kvůli lepšímu zobrazení"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Změnit v Nastavení poměr stran této aplikace"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Změnit poměr stran"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"Plovoucí"</string>
<string name="select_text" msgid="5139083974039906583">"Vybrat"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Snímek obrazovky"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"Zavřít"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Zavřít nabídku"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Otevřít nabídku"</string>
diff --git a/libs/WindowManager/Shell/res/values-da/strings.xml b/libs/WindowManager/Shell/res/values-da/strings.xml
index d50d2f0f135d..7883bb0fab8b 100644
--- a/libs/WindowManager/Shell/res/values-da/strings.xml
+++ b/libs/WindowManager/Shell/res/values-da/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Boble"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Administrer"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Boblen blev lukket."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Bobler"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Vis bobler"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Tryk for at genstarte denne app, så visningen forbedres"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Skift denne apps billedformat i Indstillinger"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Skift billedformat"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"Svævende"</string>
<string name="select_text" msgid="5139083974039906583">"Vælg"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Screenshot"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"Luk"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Luk menu"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Åbn menu"</string>
diff --git a/libs/WindowManager/Shell/res/values-de/strings.xml b/libs/WindowManager/Shell/res/values-de/strings.xml
index 7f44f83a1790..6bb85239f397 100644
--- a/libs/WindowManager/Shell/res/values-de/strings.xml
+++ b/libs/WindowManager/Shell/res/values-de/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Bubble"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Verwalten"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Bubble verworfen."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Bubbles"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Bubbles anzeigen"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Tippen, um diese App neu zu starten und die Ansicht zu verbessern"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Seitenverhältnis der App in den Einstellungen ändern"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Seitenverhältnis ändern"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"Frei schwebend"</string>
<string name="select_text" msgid="5139083974039906583">"Auswählen"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Screenshot"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"Schließen"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Menü schließen"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Menü öffnen"</string>
diff --git a/libs/WindowManager/Shell/res/values-el/strings.xml b/libs/WindowManager/Shell/res/values-el/strings.xml
index a3a5ccd839e4..a640b941dd6e 100644
--- a/libs/WindowManager/Shell/res/values-el/strings.xml
+++ b/libs/WindowManager/Shell/res/values-el/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Συννεφάκι"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Διαχείριση"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Το συννεφάκι παραβλέφθηκε."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Συννεφάκια"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Εμφάνιση συννεφακίων"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Πατήστε για να επανεκκινήσετε αυτή την εφαρμογή για καλύτερη προβολή"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Αλλάξτε τον λόγο διαστάσεων αυτής της εφαρμογής στις Ρυθμίσεις"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Αλλαγή λόγου διαστάσεων"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"Κινούμενο"</string>
<string name="select_text" msgid="5139083974039906583">"Επιλογή"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Στιγμιότυπο οθόνης"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"Κλείσιμο"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Κλείσιμο μενού"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Άνοιγμα μενού"</string>
diff --git a/libs/WindowManager/Shell/res/values-en-rAU/strings.xml b/libs/WindowManager/Shell/res/values-en-rAU/strings.xml
index edc4f4e25c2a..4708d5fcd54e 100644
--- a/libs/WindowManager/Shell/res/values-en-rAU/strings.xml
+++ b/libs/WindowManager/Shell/res/values-en-rAU/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Bubble"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Manage"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Bubble dismissed."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Bubbles"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Show bubbles"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Tap to restart this app for a better view"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Change this app\'s aspect ratio in Settings"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Change aspect ratio"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"Float"</string>
<string name="select_text" msgid="5139083974039906583">"Select"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Screenshot"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"Close"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Close menu"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Open menu"</string>
diff --git a/libs/WindowManager/Shell/res/values-en-rCA/strings.xml b/libs/WindowManager/Shell/res/values-en-rCA/strings.xml
index d7e23fd8dfd8..bd8a63690ba3 100644
--- a/libs/WindowManager/Shell/res/values-en-rCA/strings.xml
+++ b/libs/WindowManager/Shell/res/values-en-rCA/strings.xml
@@ -116,6 +116,7 @@
<string name="float_button_text" msgid="9221657008391364581">"Float"</string>
<string name="select_text" msgid="5139083974039906583">"Select"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Screenshot"</string>
+ <string name="open_in_browser_text" msgid="9181692926376072904">"Open in browser"</string>
<string name="close_text" msgid="4986518933445178928">"Close"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Close Menu"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Open Menu"</string>
diff --git a/libs/WindowManager/Shell/res/values-en-rGB/strings.xml b/libs/WindowManager/Shell/res/values-en-rGB/strings.xml
index edc4f4e25c2a..4708d5fcd54e 100644
--- a/libs/WindowManager/Shell/res/values-en-rGB/strings.xml
+++ b/libs/WindowManager/Shell/res/values-en-rGB/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Bubble"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Manage"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Bubble dismissed."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Bubbles"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Show bubbles"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Tap to restart this app for a better view"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Change this app\'s aspect ratio in Settings"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Change aspect ratio"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"Float"</string>
<string name="select_text" msgid="5139083974039906583">"Select"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Screenshot"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"Close"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Close menu"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Open menu"</string>
diff --git a/libs/WindowManager/Shell/res/values-en-rIN/strings.xml b/libs/WindowManager/Shell/res/values-en-rIN/strings.xml
index edc4f4e25c2a..4708d5fcd54e 100644
--- a/libs/WindowManager/Shell/res/values-en-rIN/strings.xml
+++ b/libs/WindowManager/Shell/res/values-en-rIN/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Bubble"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Manage"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Bubble dismissed."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Bubbles"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Show bubbles"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Tap to restart this app for a better view"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Change this app\'s aspect ratio in Settings"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Change aspect ratio"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"Float"</string>
<string name="select_text" msgid="5139083974039906583">"Select"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Screenshot"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"Close"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Close menu"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Open menu"</string>
diff --git a/libs/WindowManager/Shell/res/values-en-rXC/strings.xml b/libs/WindowManager/Shell/res/values-en-rXC/strings.xml
index 1da8c275ce54..35030808f4fd 100644
--- a/libs/WindowManager/Shell/res/values-en-rXC/strings.xml
+++ b/libs/WindowManager/Shell/res/values-en-rXC/strings.xml
@@ -116,6 +116,7 @@
<string name="float_button_text" msgid="9221657008391364581">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‎‎‏‏‏‏‎‏‎‎‎‎‎‏‏‎‎‎‎‏‏‎‏‎‎‎‏‏‎‏‎‏‎‎‎‏‎‎‏‏‏‏‏‏‏‏‎‎‏‎‏‎Float‎‏‎‎‏‎"</string>
<string name="select_text" msgid="5139083974039906583">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‎‏‏‏‎‏‎‏‎‎‎‏‏‎‏‏‎‎‎‏‏‎‏‎‎‏‎‏‎‏‏‏‎‏‏‏‏‎‎‎‏‏‎‏‎‎‏‎‏‎‎‏‎‎‎‏‎‏‏‏‎Select‎‏‎‎‏‎"</string>
<string name="screenshot_text" msgid="1477704010087786671">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‎‏‎‎‏‎‎‎‎‎‎‏‏‏‎‏‏‎‏‏‏‏‏‏‎‏‏‏‏‏‎‎‏‏‎‎‎‏‏‏‎‎‏‏‏‏‏‎‏‎‎‎‏‎‏‎‏‏‏‏‎Screenshot‎‏‎‎‏‎"</string>
+ <string name="open_in_browser_text" msgid="9181692926376072904">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‏‏‏‏‎‏‏‎‏‎‏‏‏‏‏‎‏‏‎‏‎‎‎‏‎‎‎‏‏‏‏‎‎‎‎‏‎‏‎‏‏‏‎‎‏‏‎‏‎‏‏‎‏‏‎‎‏‎‎‎‎Open in browser‎‏‎‎‏‎"</string>
<string name="close_text" msgid="4986518933445178928">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‎‏‎‏‎‎‏‏‎‎‏‏‏‎‏‎‏‏‎‎‏‎‎‎‏‏‎‎‏‏‎‏‏‏‎‏‏‏‎‎‎‎‏‎‎‏‏‏‎‏‏‎‎‎‏‏‎‎‎‎‎Close‎‏‎‎‏‎"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‏‎‎‎‎‏‎‎‏‎‏‎‏‎‏‎‏‏‎‎‎‎‎‏‎‎‏‎‎‎‏‏‎‏‏‎‏‏‎‏‎‎‏‏‏‏‏‏‎‎‎‎‏‎‎‎‏‏‎‏‎Close Menu‎‏‎‎‏‎"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‏‎‏‎‏‎‏‏‎‎‏‎‏‏‏‏‎‎‏‏‏‏‎‏‎‎‏‏‏‏‏‎‎‏‎‏‎‎‎‎‏‏‎‎‏‏‎‎‎‎‎‏‏‎‎‏‏‎‎‎‎‎Open Menu‎‏‎‎‏‎"</string>
diff --git a/libs/WindowManager/Shell/res/values-es-rUS/strings.xml b/libs/WindowManager/Shell/res/values-es-rUS/strings.xml
index 8653e5932a04..72bafcd61e5a 100644
--- a/libs/WindowManager/Shell/res/values-es-rUS/strings.xml
+++ b/libs/WindowManager/Shell/res/values-es-rUS/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Cuadro"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Administrar"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Se descartó el cuadro."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Burbujas"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Mostrar burbujas"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Presiona para reiniciar esta app y tener una mejor vista"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Cambiar la relación de aspecto de esta app en Configuración"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Cambiar relación de aspecto"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"Flotante"</string>
<string name="select_text" msgid="5139083974039906583">"Seleccionar"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Captura de pantalla"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"Cerrar"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Cerrar menú"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Abrir el menú"</string>
diff --git a/libs/WindowManager/Shell/res/values-es/strings.xml b/libs/WindowManager/Shell/res/values-es/strings.xml
index 8f59c9c91d20..d907a56d15c4 100644
--- a/libs/WindowManager/Shell/res/values-es/strings.xml
+++ b/libs/WindowManager/Shell/res/values-es/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Burbuja"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Gestionar"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Burbuja cerrada."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Burbujas"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Mostrar burbujas"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Toca para reiniciar esta aplicación y obtener una mejor vista"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Cambiar la relación de aspecto de esta aplicación en Ajustes"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Cambiar relación de aspecto"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"Flotante"</string>
<string name="select_text" msgid="5139083974039906583">"Seleccionar"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Captura de pantalla"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"Cerrar"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Cerrar menú"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Abrir menú"</string>
diff --git a/libs/WindowManager/Shell/res/values-et/strings.xml b/libs/WindowManager/Shell/res/values-et/strings.xml
index 3d86eb4a91d9..7d8103edf664 100644
--- a/libs/WindowManager/Shell/res/values-et/strings.xml
+++ b/libs/WindowManager/Shell/res/values-et/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Mull"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Halda"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Mullist loobuti."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Mullid"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Kuva mullid"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Puudutage, et see rakendus parema vaate jaoks taaskäivitada"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Muutke selle rakenduse kuvasuhet jaotises Seaded"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Muutke kuvasuhet"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"Hõljuv"</string>
<string name="select_text" msgid="5139083974039906583">"Vali"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Ekraanipilt"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"Sule"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Sule menüü"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Ava menüü"</string>
diff --git a/libs/WindowManager/Shell/res/values-eu/strings.xml b/libs/WindowManager/Shell/res/values-eu/strings.xml
index 4e7bdd246d10..19e028f0f706 100644
--- a/libs/WindowManager/Shell/res/values-eu/strings.xml
+++ b/libs/WindowManager/Shell/res/values-eu/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Burbuila"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Kudeatu"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Baztertu da globoa."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Burbuilak"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Erakutsi burbuilak"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Hobeto ikusteko, sakatu hau, eta aplikazioa berrabiarazi egingo da"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Aldatu aplikazioaren aspektu-erlazioa ezarpenetan"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Aldatu aspektu-erlazioa"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"Leiho gainerakorra"</string>
<string name="select_text" msgid="5139083974039906583">"Hautatu"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Pantaila-argazkia"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"Itxi"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Itxi menua"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Ireki menua"</string>
diff --git a/libs/WindowManager/Shell/res/values-fa/strings.xml b/libs/WindowManager/Shell/res/values-fa/strings.xml
index 4b9be47f8023..2bb9415d83a6 100644
--- a/libs/WindowManager/Shell/res/values-fa/strings.xml
+++ b/libs/WindowManager/Shell/res/values-fa/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"حباب"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"مدیریت"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"حبابک رد شد."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"حبابک"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"نمایش حبابک"</string>
<string name="restart_button_description" msgid="4564728020654658478">"برای داشتن نمایی بهتر، تک‌ضرب بزنید تا این برنامه بازراه‌اندازی شود"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"نسبت ابعادی این برنامه را در «تنظیمات» تغییر دهید"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"تغییر نسبت ابعادی"</string>
@@ -96,7 +94,7 @@
<string name="camera_compat_dismiss_button_description" msgid="2795364433503817511">"دوربین مشکلی ندارد؟ برای بستن تک‌ضرب بزنید."</string>
<string name="letterbox_education_dialog_title" msgid="7739895354143295358">"از چندین برنامه به‌طور هم‌زمان استفاده کنید"</string>
<string name="letterbox_education_split_screen_text" msgid="449233070804658627">"برای حالت صفحهٔ دونیمه، در برنامه‌ای دیگر بکشید"</string>
- <string name="letterbox_education_reposition_text" msgid="4589957299813220661">"برای جابه‌جا کردن برنامه، بیرون از آن دوضربه بزنید"</string>
+ <string name="letterbox_education_reposition_text" msgid="4589957299813220661">"برای جابه‌جا کردن برنامه، بیرون از آن دو تک‌ضرب بزنید"</string>
<string name="letterbox_education_got_it" msgid="4057634570866051177">"متوجه‌ام"</string>
<string name="letterbox_education_expand_button_description" msgid="1729796567101129834">"برای اطلاعات بیشتر، گسترده کنید."</string>
<string name="letterbox_restart_dialog_title" msgid="8543049527871033505">"برای نمایش بهتر بازراه‌اندازی شود؟"</string>
@@ -104,7 +102,7 @@
<string name="letterbox_restart_cancel" msgid="1342209132692537805">"لغو کردن"</string>
<string name="letterbox_restart_restart" msgid="8529976234412442973">"بازراه‌اندازی"</string>
<string name="letterbox_restart_dialog_checkbox_title" msgid="5252918008140768386">"دوباره نشان داده نشود"</string>
- <string name="letterbox_reachability_reposition_text" msgid="3522042240665748268">"برای جابه‌جا کردن این برنامه\nدوضربه بزنید"</string>
+ <string name="letterbox_reachability_reposition_text" msgid="3522042240665748268">"برای جابه‌جا کردن این برنامه\nدو تک‌ضرب بزنید"</string>
<string name="maximize_button_text" msgid="1650859196290301963">"بزرگ کردن"</string>
<string name="minimize_button_text" msgid="271592547935841753">"کوچک کردن"</string>
<string name="close_button_text" msgid="2913281996024033299">"بستن"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"شناور"</string>
<string name="select_text" msgid="5139083974039906583">"انتخاب"</string>
<string name="screenshot_text" msgid="1477704010087786671">"نماگرفت"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"بستن"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"بستن منو"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"باز کردن منو"</string>
diff --git a/libs/WindowManager/Shell/res/values-fi/strings.xml b/libs/WindowManager/Shell/res/values-fi/strings.xml
index 577d625ba8f8..fcc4150f6fc1 100644
--- a/libs/WindowManager/Shell/res/values-fi/strings.xml
+++ b/libs/WindowManager/Shell/res/values-fi/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Kupla"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Ylläpidä"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Kupla ohitettu."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Kuplat"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Näytä kuplat"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Napauta, niin sovellus käynnistyy uudelleen paremmin näytölle sopivana"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Muuta tämän sovelluksen kuvasuhdetta Asetuksissa"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Vaihda kuvasuhdetta"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"Kelluva ikkuna"</string>
<string name="select_text" msgid="5139083974039906583">"Valitse"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Kuvakaappaus"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"Sulje"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Sulje valikko"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Avaa valikko"</string>
diff --git a/libs/WindowManager/Shell/res/values-fr-rCA/strings.xml b/libs/WindowManager/Shell/res/values-fr-rCA/strings.xml
index 74d822ac02c0..268b409e6eef 100644
--- a/libs/WindowManager/Shell/res/values-fr-rCA/strings.xml
+++ b/libs/WindowManager/Shell/res/values-fr-rCA/strings.xml
@@ -31,11 +31,11 @@
<string name="accessibility_action_pip_resize" msgid="4623966104749543182">"Redimensionner"</string>
<string name="accessibility_action_pip_stash" msgid="4060775037619702641">"Ajouter à la réserve"</string>
<string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Retirer de la réserve"</string>
- <string name="dock_forced_resizable" msgid="7429086980048964687">"L\'application peut ne pas fonctionner avec l\'écran partagé"</string>
- <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"L\'application ne prend pas en charge l\'écran partagé"</string>
- <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Cette application ne peut être ouverte que dans une seule fenêtre."</string>
- <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Il est possible que l\'application ne fonctionne pas sur un écran secondaire."</string>
- <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"L\'application ne peut pas être lancée sur des écrans secondaires."</string>
+ <string name="dock_forced_resizable" msgid="7429086980048964687">"L\'appli peut ne pas fonctionner avec l\'écran partagé"</string>
+ <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"L\'appli ne prend pas en charge l\'écran partagé"</string>
+ <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Cette appli ne peut être ouverte que dans une seule fenêtre."</string>
+ <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Il est possible que l\'appli ne fonctionne pas sur un écran secondaire."</string>
+ <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"L\'appli ne peut pas être lancée sur des écrans secondaires."</string>
<string name="accessibility_divider" msgid="6407584574218956849">"Séparateur d\'écran partagé"</string>
<string name="divider_title" msgid="1963391955593749442">"Séparateur d\'écran partagé"</string>
<string name="accessibility_action_divider_left_full" msgid="1792313656305328536">"Plein écran à la gauche"</string>
@@ -56,7 +56,7 @@
<string name="one_handed_tutorial_description" msgid="3486582858591353067">"Pour quitter, balayez l\'écran du bas vers le haut, ou touchez n\'importe où sur l\'écran en haut de l\'appli"</string>
<string name="accessibility_action_start_one_handed" msgid="5070337354072861426">"Démarrer le mode Une main"</string>
<string name="accessibility_action_stop_one_handed" msgid="1369940261782179442">"Quitter le mode Une main"</string>
- <string name="bubbles_settings_button_description" msgid="1301286017420516912">"Paramètres pour les bulles de l\'application <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
+ <string name="bubbles_settings_button_description" msgid="1301286017420516912">"Paramètres pour les bulles de l\'appli <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
<string name="bubble_overflow_button_content_description" msgid="8160974472718594382">"Menu déroulant"</string>
<string name="bubble_accessibility_action_add_back" msgid="1830101076853540953">"Replacer sur la pile"</string>
<string name="bubble_content_description_single" msgid="8495748092720065813">"<xliff:g id="NOTIFICATION_TITLE">%1$s</xliff:g> de <xliff:g id="APP_NAME">%2$s</xliff:g>"</string>
@@ -73,7 +73,7 @@
<string name="bubbles_user_education_title" msgid="2112319053732691899">"Clavarder en utilisant des bulles"</string>
<string name="bubbles_user_education_description" msgid="4215862563054175407">"Les nouvelles conversations s\'affichent sous forme d\'icônes flottantes (de bulles). Touchez une bulle pour l\'ouvrir. Faites-la glisser pour la déplacer."</string>
<string name="bubbles_user_education_manage_title" msgid="7042699946735628035">"Paramètres des bulles"</string>
- <string name="bubbles_user_education_manage" msgid="3460756219946517198">"Toucher Gérer pour désactiver les bulles de cette application"</string>
+ <string name="bubbles_user_education_manage" msgid="3460756219946517198">"Toucher Gérer pour désactiver les bulles de cette appli"</string>
<string name="bubbles_user_education_got_it" msgid="3382046149225428296">"OK"</string>
<string name="bubble_overflow_empty_title" msgid="2397251267073294968">"Aucune bulle récente"</string>
<string name="bubble_overflow_empty_subtitle" msgid="2627417924958633713">"Les bulles récentes et les bulles ignorées s\'afficheront ici"</string>
@@ -84,33 +84,31 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Bulle"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Gérer"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Bulle ignorée."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
- <string name="restart_button_description" msgid="4564728020654658478">"Touchez pour redémarrer cette application afin d\'obtenir un meilleur affichage"</string>
- <string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Changer les proportions de cette application dans les paramètres"</string>
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Bulles"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Afficher les bulles"</string>
+ <string name="restart_button_description" msgid="4564728020654658478">"Touchez pour redémarrer cette appli afin d\'obtenir un meilleur affichage"</string>
+ <string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Changer les proportions de cette appli dans les paramètres"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Modifier les proportions"</string>
<string name="camera_compat_treatment_suggested_button_description" msgid="8103916969024076767">"Problèmes d\'appareil photo?\nTouchez pour réajuster"</string>
<string name="camera_compat_treatment_applied_button_description" msgid="2944157113330703897">"Problème non résolu?\nTouchez pour rétablir"</string>
<string name="camera_compat_dismiss_button_description" msgid="2795364433503817511">"Aucun problème d\'appareil photo? Touchez pour ignorer."</string>
<string name="letterbox_education_dialog_title" msgid="7739895354143295358">"Voir et en faire plus"</string>
- <string name="letterbox_education_split_screen_text" msgid="449233070804658627">"Faites glisser une autre application pour utiliser l\'écran partagé"</string>
- <string name="letterbox_education_reposition_text" msgid="4589957299813220661">"Touchez deux fois à côté d\'une application pour la repositionner"</string>
+ <string name="letterbox_education_split_screen_text" msgid="449233070804658627">"Faites glisser une autre appli pour utiliser l\'écran partagé"</string>
+ <string name="letterbox_education_reposition_text" msgid="4589957299813220661">"Touchez deux fois à côté d\'une appli pour la repositionner"</string>
<string name="letterbox_education_got_it" msgid="4057634570866051177">"OK"</string>
<string name="letterbox_education_expand_button_description" msgid="1729796567101129834">"Développer pour en savoir plus."</string>
<string name="letterbox_restart_dialog_title" msgid="8543049527871033505">"Redémarrer pour un meilleur affichage?"</string>
- <string name="letterbox_restart_dialog_description" msgid="6096946078246557848">"Vous pouvez redémarrer l\'application pour qu\'elle s\'affiche mieux sur votre écran, mais il se peut que vous perdiez votre progression ou toute modification non enregistrée"</string>
+ <string name="letterbox_restart_dialog_description" msgid="6096946078246557848">"Vous pouvez redémarrer l\'appli pour qu\'elle s\'affiche mieux sur votre écran, mais il se peut que vous perdiez votre progression ou toute modification non enregistrée"</string>
<string name="letterbox_restart_cancel" msgid="1342209132692537805">"Annuler"</string>
<string name="letterbox_restart_restart" msgid="8529976234412442973">"Redémarrer"</string>
<string name="letterbox_restart_dialog_checkbox_title" msgid="5252918008140768386">"Ne plus afficher"</string>
- <string name="letterbox_reachability_reposition_text" msgid="3522042240665748268">"Toucher deux fois pour\ndéplacer cette application"</string>
+ <string name="letterbox_reachability_reposition_text" msgid="3522042240665748268">"Toucher deux fois pour\ndéplacer cette appli"</string>
<string name="maximize_button_text" msgid="1650859196290301963">"Agrandir"</string>
<string name="minimize_button_text" msgid="271592547935841753">"Réduire"</string>
<string name="close_button_text" msgid="2913281996024033299">"Fermer"</string>
<string name="back_button_text" msgid="1469718707134137085">"Retour"</string>
<string name="handle_text" msgid="1766582106752184456">"Identifiant"</string>
- <string name="app_icon_text" msgid="2823268023931811747">"Icône de l\'application"</string>
+ <string name="app_icon_text" msgid="2823268023931811747">"Icône de l\'appli"</string>
<string name="fullscreen_text" msgid="1162316685217676079">"Plein écran"</string>
<string name="desktop_text" msgid="1077633567027630454">"Mode Bureau"</string>
<string name="split_screen_text" msgid="1396336058129570886">"Écran divisé"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"Flottant"</string>
<string name="select_text" msgid="5139083974039906583">"Sélectionner"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Capture d\'écran"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"Fermer"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Fermer le menu"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Ouvrir le menu"</string>
diff --git a/libs/WindowManager/Shell/res/values-fr/strings.xml b/libs/WindowManager/Shell/res/values-fr/strings.xml
index 4d14d0b85f3e..1762a2921863 100644
--- a/libs/WindowManager/Shell/res/values-fr/strings.xml
+++ b/libs/WindowManager/Shell/res/values-fr/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Bulle"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Gérer"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Bulle fermée."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Bulles"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Afficher les bulles"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Appuyez pour redémarrer cette appli et obtenir une meilleure vue."</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Modifiez le format de cette appli dans les Paramètres."</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Modifier le format"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"Flottante"</string>
<string name="select_text" msgid="5139083974039906583">"Sélectionner"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Capture d\'écran"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"Fermer"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Fermer le menu"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Ouvrir le menu"</string>
diff --git a/libs/WindowManager/Shell/res/values-gl/strings.xml b/libs/WindowManager/Shell/res/values-gl/strings.xml
index e5b67c2aaad1..94e7ad5bcd4e 100644
--- a/libs/WindowManager/Shell/res/values-gl/strings.xml
+++ b/libs/WindowManager/Shell/res/values-gl/strings.xml
@@ -118,6 +118,7 @@
<string name="float_button_text" msgid="9221657008391364581">"Flotante"</string>
<string name="select_text" msgid="5139083974039906583">"Seleccionar"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Captura de pantalla"</string>
+ <string name="open_in_browser_text" msgid="9181692926376072904">"Abrir no navegador"</string>
<string name="close_text" msgid="4986518933445178928">"Pechar"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Pechar o menú"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Abrir menú"</string>
diff --git a/libs/WindowManager/Shell/res/values-gu/strings.xml b/libs/WindowManager/Shell/res/values-gu/strings.xml
index e2a52dccd8ea..8a03a4d33b87 100644
--- a/libs/WindowManager/Shell/res/values-gu/strings.xml
+++ b/libs/WindowManager/Shell/res/values-gu/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"બબલ"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"મેનેજ કરો"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"બબલ છોડી દેવાયો."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"બબલ"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"બબલ બતાવો"</string>
<string name="restart_button_description" msgid="4564728020654658478">"વધુ સારા વ્યૂ માટે, આ ઍપને ફરી શરૂ કરવા ટૅપ કરો"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"સેટિંગમાં આ ઍપનો સાપેક્ષ ગુણોત્તર બદલો"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"સાપેક્ષ ગુણોત્તર બદલો"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"ફ્લોટિંગ વિન્ડો"</string>
<string name="select_text" msgid="5139083974039906583">"પસંદ કરો"</string>
<string name="screenshot_text" msgid="1477704010087786671">"સ્ક્રીનશૉટ"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"બંધ કરો"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"મેનૂ બંધ કરો"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"મેનૂ ખોલો"</string>
diff --git a/libs/WindowManager/Shell/res/values-hi/strings.xml b/libs/WindowManager/Shell/res/values-hi/strings.xml
index f75e0e0528e1..b73f449e4e83 100644
--- a/libs/WindowManager/Shell/res/values-hi/strings.xml
+++ b/libs/WindowManager/Shell/res/values-hi/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"बबल"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"मैनेज करें"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"बबल खारिज किया गया."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"बबल्स"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"बबल्स दिखाएं"</string>
<string name="restart_button_description" msgid="4564728020654658478">"बेहतर व्यू पाने के लिए, टैप करके ऐप्लिकेशन को रीस्टार्ट करें"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"सेटिंग में जाकर इस ऐप्लिकेशन का आसपेक्ट रेशियो (लंबाई-चौड़ाई का अनुपात) बदलें"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"आसपेक्ट रेशियो (लंबाई-चौड़ाई का अनुपात) बदलें"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"फ़्लोट"</string>
<string name="select_text" msgid="5139083974039906583">"चुनें"</string>
<string name="screenshot_text" msgid="1477704010087786671">"स्क्रीनशॉट"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"बंद करें"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"मेन्यू बंद करें"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"मेन्यू खोलें"</string>
diff --git a/libs/WindowManager/Shell/res/values-hr/strings.xml b/libs/WindowManager/Shell/res/values-hr/strings.xml
index ed80c505d756..000b0e63bf8e 100644
--- a/libs/WindowManager/Shell/res/values-hr/strings.xml
+++ b/libs/WindowManager/Shell/res/values-hr/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Oblačić"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Upravljanje"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Oblačić odbačen."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Oblačići"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Prikaži oblačiće"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Dodirnite da biste ponovo pokrenuli tu aplikaciju kako biste bolje vidjeli"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Promijeni omjer slike ove aplikacije u postavkama"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Promijeni omjer slike"</string>
@@ -118,6 +116,7 @@
<string name="float_button_text" msgid="9221657008391364581">"Plutajući"</string>
<string name="select_text" msgid="5139083974039906583">"Odaberite"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Snimka zaslona"</string>
+ <string name="open_in_browser_text" msgid="9181692926376072904">"Otvori u pregledniku"</string>
<string name="close_text" msgid="4986518933445178928">"Zatvorite"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Zatvorite izbornik"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Otvaranje izbornika"</string>
diff --git a/libs/WindowManager/Shell/res/values-hu/strings.xml b/libs/WindowManager/Shell/res/values-hu/strings.xml
index 32a31063bd90..f4cf75472bb7 100644
--- a/libs/WindowManager/Shell/res/values-hu/strings.xml
+++ b/libs/WindowManager/Shell/res/values-hu/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Buborék"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Kezelés"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Buborék elvetve."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Buborékok"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Buborékok megjelenítése"</string>
<string name="restart_button_description" msgid="4564728020654658478">"A jobb nézet érdekében koppintson az alkalmazás újraindításához."</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Az app méretarányát a Beállításokban módosíthatja"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Méretarány módosítása"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"Lebegő"</string>
<string name="select_text" msgid="5139083974039906583">"Kiválasztás"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Képernyőkép"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"Bezárás"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Menü bezárása"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Menü megnyitása"</string>
diff --git a/libs/WindowManager/Shell/res/values-hy/strings.xml b/libs/WindowManager/Shell/res/values-hy/strings.xml
index 65ca704ded09..1d2d2ff76912 100644
--- a/libs/WindowManager/Shell/res/values-hy/strings.xml
+++ b/libs/WindowManager/Shell/res/values-hy/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Պղպջակ"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Կառավարել"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Ամպիկը փակվեց։"</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Ամպիկներ"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Ցույց տալ ամպիկներ"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Հպեք՝ հավելվածը վերագործարկելու և ավելի հարմար տեսք ընտրելու համար"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Փոխել հավելվածի կողմերի հարաբերակցությունը Կարգավորումներում"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Փոխել չափերի հարաբերակցությունը"</string>
@@ -118,6 +116,7 @@
<string name="float_button_text" msgid="9221657008391364581">"Լողացող պատուհան"</string>
<string name="select_text" msgid="5139083974039906583">"Ընտրել"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Սքրինշոթ"</string>
+ <string name="open_in_browser_text" msgid="9181692926376072904">"Բացել դիտարկիչում"</string>
<string name="close_text" msgid="4986518933445178928">"Փակել"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Փակել ընտրացանկը"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Բացել ընտրացանկը"</string>
diff --git a/libs/WindowManager/Shell/res/values-in/strings.xml b/libs/WindowManager/Shell/res/values-in/strings.xml
index 975dd72f67d7..0e662f65e1e1 100644
--- a/libs/WindowManager/Shell/res/values-in/strings.xml
+++ b/libs/WindowManager/Shell/res/values-in/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Balon"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Kelola"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Balon ditutup."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Balon"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Tampilkan Balon"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Ketuk untuk memulai ulang aplikasi ini agar mendapatkan tampilan yang lebih baik"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Ubah rasio aspek aplikasi ini di Setelan"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Ubah rasio aspek"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"Mengambang"</string>
<string name="select_text" msgid="5139083974039906583">"Pilih"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Screenshot"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"Tutup"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Tutup Menu"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Buka Menu"</string>
diff --git a/libs/WindowManager/Shell/res/values-is/strings.xml b/libs/WindowManager/Shell/res/values-is/strings.xml
index 11c47189dce0..fb1df4db5d71 100644
--- a/libs/WindowManager/Shell/res/values-is/strings.xml
+++ b/libs/WindowManager/Shell/res/values-is/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Blaðra"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Stjórna"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Blöðru lokað."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Blöðrur"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Sýna blöðrur"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Ýttu til að endurræsa forritið og fá betri sýn"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Breyta myndhlutfalli þessa forrits í stillingunum"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Breyta myndhlutfalli"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"Reikult"</string>
<string name="select_text" msgid="5139083974039906583">"Velja"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Skjámynd"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"Loka"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Loka valmynd"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Opna valmynd"</string>
diff --git a/libs/WindowManager/Shell/res/values-it/strings.xml b/libs/WindowManager/Shell/res/values-it/strings.xml
index 168c8cc5936f..9c825bee57ce 100644
--- a/libs/WindowManager/Shell/res/values-it/strings.xml
+++ b/libs/WindowManager/Shell/res/values-it/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Fumetto"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Gestisci"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Fumetto ignorato."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Bolle"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Mostra bolle"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Tocca per riavviare l\'app e migliorare la visualizzazione"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Cambia le proporzioni dell\'app nelle Impostazioni"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Cambia proporzioni"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"Mobile"</string>
<string name="select_text" msgid="5139083974039906583">"Seleziona"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Screenshot"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"Chiudi"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Chiudi il menu"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Apri menu"</string>
diff --git a/libs/WindowManager/Shell/res/values-iw/strings.xml b/libs/WindowManager/Shell/res/values-iw/strings.xml
index fd4cd1adaa2a..abd0f6b34178 100644
--- a/libs/WindowManager/Shell/res/values-iw/strings.xml
+++ b/libs/WindowManager/Shell/res/values-iw/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"בועה"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"ניהול"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"הבועה נסגרה."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"בועות"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"הצגת הבועות"</string>
<string name="restart_button_description" msgid="4564728020654658478">"כדי לראות טוב יותר יש להקיש ולהפעיל את האפליקציה הזו מחדש"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"אפשר לשנות את יחס הגובה-רוחב של האפליקציה הזו ב\'הגדרות\'"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"שינוי יחס גובה-רוחב"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"בלונים"</string>
<string name="select_text" msgid="5139083974039906583">"בחירה"</string>
<string name="screenshot_text" msgid="1477704010087786671">"צילום מסך"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"סגירה"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"סגירת התפריט"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"פתיחת התפריט"</string>
diff --git a/libs/WindowManager/Shell/res/values-ja/strings.xml b/libs/WindowManager/Shell/res/values-ja/strings.xml
index 64ddec9450ae..55fd8b16f2a2 100644
--- a/libs/WindowManager/Shell/res/values-ja/strings.xml
+++ b/libs/WindowManager/Shell/res/values-ja/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"バブル"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"管理"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"ふきだしが非表示になっています。"</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"バブル"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"バブルを表示"</string>
<string name="restart_button_description" msgid="4564728020654658478">"タップしてこのアプリを再起動すると、表示が適切になります"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"このアプリのアスペクト比を [設定] で変更します"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"アスペクト比を変更"</string>
@@ -118,6 +116,7 @@
<string name="float_button_text" msgid="9221657008391364581">"フローティング"</string>
<string name="select_text" msgid="5139083974039906583">"選択"</string>
<string name="screenshot_text" msgid="1477704010087786671">"スクリーンショット"</string>
+ <string name="open_in_browser_text" msgid="9181692926376072904">"ブラウザで開く"</string>
<string name="close_text" msgid="4986518933445178928">"閉じる"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"メニューを閉じる"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"メニューを開く"</string>
diff --git a/libs/WindowManager/Shell/res/values-ka/strings.xml b/libs/WindowManager/Shell/res/values-ka/strings.xml
index cab8807b86d1..235420812937 100644
--- a/libs/WindowManager/Shell/res/values-ka/strings.xml
+++ b/libs/WindowManager/Shell/res/values-ka/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"ბუშტი"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"მართვა"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"ბუშტი დაიხურა."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"ბუშტები"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"ბუშტების ჩვენება"</string>
<string name="restart_button_description" msgid="4564728020654658478">"შეხებით გადატვირთეთ ეს აპი უკეთესი ხედის მისაღებად"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"შეცვალეთ ამ აპის თანაფარდობა პარამეტრებიდან"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"თანაფარდობის შეცვლა"</string>
@@ -118,6 +116,7 @@
<string name="float_button_text" msgid="9221657008391364581">"ფარფატი"</string>
<string name="select_text" msgid="5139083974039906583">"არჩევა"</string>
<string name="screenshot_text" msgid="1477704010087786671">"ეკრანის ანაბეჭდი"</string>
+ <string name="open_in_browser_text" msgid="9181692926376072904">"ბრაუზერში გახსნა"</string>
<string name="close_text" msgid="4986518933445178928">"დახურვა"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"მენიუს დახურვა"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"მენიუს გახსნა"</string>
diff --git a/libs/WindowManager/Shell/res/values-kk/strings.xml b/libs/WindowManager/Shell/res/values-kk/strings.xml
index 4ff5b85b36fd..18183739cb99 100644
--- a/libs/WindowManager/Shell/res/values-kk/strings.xml
+++ b/libs/WindowManager/Shell/res/values-kk/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Көпіршік"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Басқару"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Қалқыма хабар жабылды."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Қалқыма хабарлар"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Қалқыма хабарлар көрсету"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Көріністі жақсарту үшін осы қолданбаны түртіп, қайта ашыңыз."</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Осы қолданбаның арақатынасын параметрлерден өзгертуге болады."</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Арақатынасты өзгерту"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"Қалқыма"</string>
<string name="select_text" msgid="5139083974039906583">"Таңдау"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Скриншот"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"Жабу"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Мәзірді жабу"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Мәзірді ашу"</string>
diff --git a/libs/WindowManager/Shell/res/values-km/strings.xml b/libs/WindowManager/Shell/res/values-km/strings.xml
index ba7a32495659..69c0e1eabc05 100644
--- a/libs/WindowManager/Shell/res/values-km/strings.xml
+++ b/libs/WindowManager/Shell/res/values-km/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"ពពុះ"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"គ្រប់គ្រង"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"បានច្រានចោល​សារលេចឡើង។"</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"ផ្ទាំងអណ្ដែត"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"បង្ហាញផ្ទាំងអណ្ដែត"</string>
<string name="restart_button_description" msgid="4564728020654658478">"ចុចដើម្បី​ចាប់ផ្ដើម​កម្មវិធី​នេះឡើងវិញសម្រាប់ទិដ្ឋភាពកាន់តែប្រសើរ"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"ផ្លាស់ប្ដូរសមាមាត្រ​របស់កម្មវិធីនេះនៅក្នុងការកំណត់"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"ប្ដូរ​​សមាមាត្រ"</string>
@@ -118,6 +116,7 @@
<string name="float_button_text" msgid="9221657008391364581">"អណ្ដែត"</string>
<string name="select_text" msgid="5139083974039906583">"ជ្រើសរើស"</string>
<string name="screenshot_text" msgid="1477704010087786671">"រូបថតអេក្រង់"</string>
+ <string name="open_in_browser_text" msgid="9181692926376072904">"បើកក្នុងកម្មវិធីរុករកតាមអ៊ីនធឺណិត"</string>
<string name="close_text" msgid="4986518933445178928">"បិទ"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"បិទ​ម៉ឺនុយ"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"បើកម៉ឺនុយ"</string>
diff --git a/libs/WindowManager/Shell/res/values-kn/strings.xml b/libs/WindowManager/Shell/res/values-kn/strings.xml
index 423e8d53a654..88a29df525e9 100644
--- a/libs/WindowManager/Shell/res/values-kn/strings.xml
+++ b/libs/WindowManager/Shell/res/values-kn/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"ಬಬಲ್"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"ನಿರ್ವಹಿಸಿ"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"ಬಬಲ್ ವಜಾಗೊಳಿಸಲಾಗಿದೆ."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"ಬಬಲ್ಸ್"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"ಬಬಲ್ಸ್ ತೋರಿಸಿ"</string>
<string name="restart_button_description" msgid="4564728020654658478">"ಉತ್ತಮ ವೀಕ್ಷಣೆಗಾಗಿ ಈ ಆ್ಯಪ್ ಅನ್ನು ಮರುಪ್ರಾರಂಭಿಸಲು ಟ್ಯಾಪ್ ಮಾಡಿ"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"ಸೆಟ್ಟಿಂಗ್‌ಗಳಲ್ಲಿ ಈ ಆ್ಯಪ್‌ನ ದೃಶ್ಯಾನುಪಾತವನ್ನು ಬದಲಾಯಿಸಿ"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"ದೃಶ್ಯಾನುಪಾತವನ್ನು ಬದಲಾಯಿಸಿ"</string>
@@ -118,6 +116,7 @@
<string name="float_button_text" msgid="9221657008391364581">"ಫ್ಲೋಟ್"</string>
<string name="select_text" msgid="5139083974039906583">"ಆಯ್ಕೆಮಾಡಿ"</string>
<string name="screenshot_text" msgid="1477704010087786671">"ಸ್ಕ್ರೀನ್‌ಶಾಟ್"</string>
+ <string name="open_in_browser_text" msgid="9181692926376072904">"ಬ್ರೌಸರ್‌ನಲ್ಲಿ ತೆರೆಯಿರಿ"</string>
<string name="close_text" msgid="4986518933445178928">"ಮುಚ್ಚಿ"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"ಮೆನು ಮುಚ್ಚಿ"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"ಮೆನು ತೆರೆಯಿರಿ"</string>
diff --git a/libs/WindowManager/Shell/res/values-ko/strings.xml b/libs/WindowManager/Shell/res/values-ko/strings.xml
index 0d1c6216776b..a22667d83858 100644
--- a/libs/WindowManager/Shell/res/values-ko/strings.xml
+++ b/libs/WindowManager/Shell/res/values-ko/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"버블"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"관리"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"대화창을 닫았습니다."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"대화창"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"대화창 표시"</string>
<string name="restart_button_description" msgid="4564728020654658478">"탭하면 앱을 다시 시작하여 보기를 개선합니다."</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"설정에서 앱의 가로세로 비율을 변경합니다."</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"가로세로 비율 변경"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"플로팅"</string>
<string name="select_text" msgid="5139083974039906583">"선택"</string>
<string name="screenshot_text" msgid="1477704010087786671">"스크린샷"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"닫기"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"메뉴 닫기"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"메뉴 열기"</string>
diff --git a/libs/WindowManager/Shell/res/values-ky/strings.xml b/libs/WindowManager/Shell/res/values-ky/strings.xml
index f17e9ca891c0..289d930ecedd 100644
--- a/libs/WindowManager/Shell/res/values-ky/strings.xml
+++ b/libs/WindowManager/Shell/res/values-ky/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Көбүк"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Башкаруу"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Калкып чыкма билдирме жабылды."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Калкып чыкма билдирмелер"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Калкып чыкма билдирмелерди көрсөтүү"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Жакшыраак көрүү үчүн бул колдонмону өчүрүп күйгүзүңүз. Ал үчүн таптап коюңуз"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Бул колдонмонун тараптарынын катнашын параметрлерден өзгөртүү"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Тараптардын катнашын өзгөртүү"</string>
@@ -118,6 +116,7 @@
<string name="float_button_text" msgid="9221657008391364581">"Калкыма"</string>
<string name="select_text" msgid="5139083974039906583">"Тандоо"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Скриншот"</string>
+ <string name="open_in_browser_text" msgid="9181692926376072904">"Серепчиден ачуу"</string>
<string name="close_text" msgid="4986518933445178928">"Жабуу"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Менюну жабуу"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Менюну ачуу"</string>
diff --git a/libs/WindowManager/Shell/res/values-lo/strings.xml b/libs/WindowManager/Shell/res/values-lo/strings.xml
index 195e4d56a1c1..0b84d2c45957 100644
--- a/libs/WindowManager/Shell/res/values-lo/strings.xml
+++ b/libs/WindowManager/Shell/res/values-lo/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"ຟອງ"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"ຈັດການ"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"ປິດ Bubble ໄສ້ແລ້ວ."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"ຟອງ"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"ສະແດງຟອງ"</string>
<string name="restart_button_description" msgid="4564728020654658478">"ແຕະເພື່ອຣີສະຕາດແອັບນີ້ເພື່ອມຸມມອງທີ່ດີຂຶ້ນ"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"ປ່ຽນອັດຕາສ່ວນຂອງແອັບນີ້ໃນການຕັ້ງຄ່າ"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"ປ່ຽນອັດຕາສ່ວນ"</string>
@@ -118,6 +116,7 @@
<string name="float_button_text" msgid="9221657008391364581">"ລອຍ"</string>
<string name="select_text" msgid="5139083974039906583">"ເລືອກ"</string>
<string name="screenshot_text" msgid="1477704010087786671">"ຮູບໜ້າຈໍ"</string>
+ <string name="open_in_browser_text" msgid="9181692926376072904">"ເປີດໃນໂປຣແກຣມທ່ອງເວັບ"</string>
<string name="close_text" msgid="4986518933445178928">"ປິດ"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"ປິດເມນູ"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"ເປີດເມນູ"</string>
diff --git a/libs/WindowManager/Shell/res/values-lt/strings.xml b/libs/WindowManager/Shell/res/values-lt/strings.xml
index 63ad580a81cc..5b0e6b7a7047 100644
--- a/libs/WindowManager/Shell/res/values-lt/strings.xml
+++ b/libs/WindowManager/Shell/res/values-lt/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Debesėlis"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Tvarkyti"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Debesėlio atsisakyta."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Burbulai"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Rodyti burbulus"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Palieskite, kad iš naujo paleistumėte šią programą ir matytumėte aiškiau"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Pakeiskite šios programos kraštinių santykį"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Keisti kraštinių santykį"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"Slankusis langas"</string>
<string name="select_text" msgid="5139083974039906583">"Pasirinkti"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Ekrano kopija"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"Uždaryti"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Uždaryti meniu"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Atidaryti meniu"</string>
diff --git a/libs/WindowManager/Shell/res/values-lv/strings.xml b/libs/WindowManager/Shell/res/values-lv/strings.xml
index 268d89324f54..704b2ed43f92 100644
--- a/libs/WindowManager/Shell/res/values-lv/strings.xml
+++ b/libs/WindowManager/Shell/res/values-lv/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Burbulis"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Pārvaldīt"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Burbulis ir noraidīts."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Burbuļi"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Rādīt burbuļus"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Pieskarieties, lai restartētu šo lietotni un uzlabotu attēlojumu."</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Iestatījumos mainiet šīs lietotnes malu attiecību."</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Mainīt malu attiecību"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"Peldošs"</string>
<string name="select_text" msgid="5139083974039906583">"Atlasīt"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Ekrānuzņēmums"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"Aizvērt"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Aizvērt izvēlni"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Atvērt izvēlni"</string>
diff --git a/libs/WindowManager/Shell/res/values-mk/strings.xml b/libs/WindowManager/Shell/res/values-mk/strings.xml
index 0a0027fa1bae..b257f802f294 100644
--- a/libs/WindowManager/Shell/res/values-mk/strings.xml
+++ b/libs/WindowManager/Shell/res/values-mk/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Балонче"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Управувајте"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Балончето е отфрлено."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Балончиња"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Прикажи „Балончиња“"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Допрете за да ја рестартирате апликацијава за подобар приказ"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Промени го соодносот на апликацијава во „Поставки“"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Променување на соодносот"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"Лебдечко"</string>
<string name="select_text" msgid="5139083974039906583">"Изберете"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Слика од екранот"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"Затворете"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Затворете го менито"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Отвори го менито"</string>
diff --git a/libs/WindowManager/Shell/res/values-ml/strings.xml b/libs/WindowManager/Shell/res/values-ml/strings.xml
index 07809e1a0014..2efd983b3342 100644
--- a/libs/WindowManager/Shell/res/values-ml/strings.xml
+++ b/libs/WindowManager/Shell/res/values-ml/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"ബബിൾ"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"മാനേജ് ചെയ്യുക"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"ബബിൾ ഡിസ്മിസ് ചെയ്തു."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"ബബിൾ"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"ബബിൾ കാണിക്കുക"</string>
<string name="restart_button_description" msgid="4564728020654658478">"മികച്ച കാഴ്‌ചയ്‌ക്കായി ഈ ആപ്പ് റീസ്‌റ്റാർട്ട് ചെയ്യാൻ ടാപ്പ് ചെയ്യുക"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"ഈ ആപ്പിന്റെ വീക്ഷണ അനുപാതം, ക്രമീകരണത്തിൽ മാറ്റുക"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"വീക്ഷണ അനുപാതം മാറ്റുക"</string>
@@ -118,6 +116,7 @@
<string name="float_button_text" msgid="9221657008391364581">"ഫ്ലോട്ട്"</string>
<string name="select_text" msgid="5139083974039906583">"തിരഞ്ഞെടുക്കുക"</string>
<string name="screenshot_text" msgid="1477704010087786671">"സ്ക്രീൻഷോട്ട്"</string>
+ <string name="open_in_browser_text" msgid="9181692926376072904">"ബ്രൗസറിൽ തുറക്കുക"</string>
<string name="close_text" msgid="4986518933445178928">"അടയ്ക്കുക"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"മെനു അടയ്ക്കുക"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"മെനു തുറക്കുക"</string>
diff --git a/libs/WindowManager/Shell/res/values-mn/strings.xml b/libs/WindowManager/Shell/res/values-mn/strings.xml
index 99bd2dffca53..a343065d2506 100644
--- a/libs/WindowManager/Shell/res/values-mn/strings.xml
+++ b/libs/WindowManager/Shell/res/values-mn/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Бөмбөлөг"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Удирдах"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Бөмбөлгийг үл хэрэгссэн."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Бөмбөлгүүд"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Бөмбөлгүүдийг харуулах"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Харагдах байдлыг сайжруулахын тулд энэ аппыг товшиж, дахин эхлүүлнэ үү"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Энэ аппын харьцааг Тохиргоонд өөрчилнө үү"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Харьцааг өөрчлөх"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"Хөвөгч"</string>
<string name="select_text" msgid="5139083974039906583">"Сонгох"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Дэлгэцийн агшин"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"Хаах"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Цэсийг хаах"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Цэс нээх"</string>
diff --git a/libs/WindowManager/Shell/res/values-mr/strings.xml b/libs/WindowManager/Shell/res/values-mr/strings.xml
index ac57e0a549b4..ef71e864a809 100644
--- a/libs/WindowManager/Shell/res/values-mr/strings.xml
+++ b/libs/WindowManager/Shell/res/values-mr/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"बबल"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"व्यवस्थापित करा"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"बबल डिसमिस केला."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"बबल"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"बबल दाखवा"</string>
<string name="restart_button_description" msgid="4564728020654658478">"अधिक चांगल्या दृश्यासाठी हे अ‍ॅप रीस्टार्ट करण्याकरिता टॅप करा"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"सेटिंग्ज मध्ये या ॲपचा आस्पेक्ट रेशो बदला"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"आस्पेक्ट रेशो बदला"</string>
@@ -118,6 +116,7 @@
<string name="float_button_text" msgid="9221657008391364581">"फ्लोट"</string>
<string name="select_text" msgid="5139083974039906583">"निवडा"</string>
<string name="screenshot_text" msgid="1477704010087786671">"स्क्रीनशॉट"</string>
+ <string name="open_in_browser_text" msgid="9181692926376072904">"ब्राउझरमध्ये उघडा"</string>
<string name="close_text" msgid="4986518933445178928">"बंद करा"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"मेनू बंद करा"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"मेनू उघडा"</string>
diff --git a/libs/WindowManager/Shell/res/values-ms/strings.xml b/libs/WindowManager/Shell/res/values-ms/strings.xml
index 6bc2fbb27c51..a9a97d8112c6 100644
--- a/libs/WindowManager/Shell/res/values-ms/strings.xml
+++ b/libs/WindowManager/Shell/res/values-ms/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Gelembung"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Urus"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Gelembung diketepikan."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Gelembung"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Tunjukkan Gelembung"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Ketik untuk memulakan semula apl ini untuk mendapatkan paparan yang lebih baik"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Tukar nisbah bidang apl ini dalam Tetapan"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Tukar nisbah bidang"</string>
@@ -118,6 +116,7 @@
<string name="float_button_text" msgid="9221657008391364581">"Terapung"</string>
<string name="select_text" msgid="5139083974039906583">"Pilih"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Tangkapan skrin"</string>
+ <string name="open_in_browser_text" msgid="9181692926376072904">"Buka dalam penyemak imbas"</string>
<string name="close_text" msgid="4986518933445178928">"Tutup"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Tutup Menu"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Buka Menu"</string>
diff --git a/libs/WindowManager/Shell/res/values-my/strings.xml b/libs/WindowManager/Shell/res/values-my/strings.xml
index 12c19edcaeb1..781148d83a4a 100644
--- a/libs/WindowManager/Shell/res/values-my/strings.xml
+++ b/libs/WindowManager/Shell/res/values-my/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"ပူဖောင်းဖောက်သံ"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"စီမံရန်"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"ပူဖောင်းကွက် ဖယ်လိုက်သည်။"</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"ပူဖောင်းကွက်"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"ပူဖောင်းကွက်များ ပြပါ"</string>
<string name="restart_button_description" msgid="4564728020654658478">"ပိုကောင်းသောမြင်ကွင်းအတွက် ဤအက်ပ်ပြန်စရန် တို့ပါ"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"ဆက်တင်များတွင် ဤအက်ပ်၏အချိုးအစားကို ပြောင်းရန်"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"အချိုးစား ပြောင်းရန်"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"မျှောရန်"</string>
<string name="select_text" msgid="5139083974039906583">"ရွေးရန်"</string>
<string name="screenshot_text" msgid="1477704010087786671">"ဖန်သားပြင်ဓာတ်ပုံ"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"ပိတ်ရန်"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"မီနူး ပိတ်ရန်"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"မီနူး ဖွင့်ရန်"</string>
diff --git a/libs/WindowManager/Shell/res/values-nb/strings.xml b/libs/WindowManager/Shell/res/values-nb/strings.xml
index 1161eb608405..9dc8501692a6 100644
--- a/libs/WindowManager/Shell/res/values-nb/strings.xml
+++ b/libs/WindowManager/Shell/res/values-nb/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Boble"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Administrer"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Boblen er avvist."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Bobler"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Vis bobler"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Trykk for å starte denne appen på nytt og få en bedre visning"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Endre høyde/bredde-forholdet for denne appen i Innstillinger"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Endre høyde/bredde-forholdet"</string>
@@ -117,7 +115,9 @@
<string name="more_button_text" msgid="3655388105592893530">"Mer"</string>
<string name="float_button_text" msgid="9221657008391364581">"Svevende"</string>
<string name="select_text" msgid="5139083974039906583">"Velg"</string>
- <string name="screenshot_text" msgid="1477704010087786671">"Skjermdump"</string>
+ <string name="screenshot_text" msgid="1477704010087786671">"Skjermbilde"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"Lukk"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Lukk menyen"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Åpne menyen"</string>
diff --git a/libs/WindowManager/Shell/res/values-ne/strings.xml b/libs/WindowManager/Shell/res/values-ne/strings.xml
index 25d033738c86..7cc4a437905b 100644
--- a/libs/WindowManager/Shell/res/values-ne/strings.xml
+++ b/libs/WindowManager/Shell/res/values-ne/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"बबल"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"व्यवस्थापन गर्नुहोस्"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"बबल हटाइयो।"</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"बबलहरू"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"बबलहरू देखाउनुहोस्"</string>
<string name="restart_button_description" msgid="4564728020654658478">"अझ राम्रो भ्यू प्राप्त गर्नका लागि यो एप रिस्टार्ट गर्न ट्याप गर्नुहोस्"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"सेटिङमा गई यो एपको एस्पेक्ट रेसियो परिवर्तन गर्नुहोस्"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"एस्पेक्ट रेसियो परिवर्तन गर्नुहोस्"</string>
@@ -118,6 +116,7 @@
<string name="float_button_text" msgid="9221657008391364581">"फ्लोट"</string>
<string name="select_text" msgid="5139083974039906583">"चयन गर्नुहोस्"</string>
<string name="screenshot_text" msgid="1477704010087786671">"स्क्रिनसट"</string>
+ <string name="open_in_browser_text" msgid="9181692926376072904">"ब्राउजरमा खोल्नुहोस्"</string>
<string name="close_text" msgid="4986518933445178928">"बन्द गर्नुहोस्"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"मेनु बन्द गर्नुहोस्"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"मेनु खोल्नुहोस्"</string>
diff --git a/libs/WindowManager/Shell/res/values-nl/strings.xml b/libs/WindowManager/Shell/res/values-nl/strings.xml
index 4ad343cb1a4e..7480add2ab0a 100644
--- a/libs/WindowManager/Shell/res/values-nl/strings.xml
+++ b/libs/WindowManager/Shell/res/values-nl/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Bubbel"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Beheren"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Bubbel gesloten."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Bubbels"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Bubbels tonen"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Tik om deze app opnieuw op te starten voor een betere weergave"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Wijzig de beeldverhouding van deze app in Instellingen"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Beeldverhouding wijzigen"</string>
@@ -118,6 +116,7 @@
<string name="float_button_text" msgid="9221657008391364581">"Zwevend"</string>
<string name="select_text" msgid="5139083974039906583">"Selecteren"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Screenshot"</string>
+ <string name="open_in_browser_text" msgid="9181692926376072904">"Openen in browser"</string>
<string name="close_text" msgid="4986518933445178928">"Sluiten"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Menu sluiten"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Menu openen"</string>
diff --git a/libs/WindowManager/Shell/res/values-or/strings.xml b/libs/WindowManager/Shell/res/values-or/strings.xml
index 966d40440ac7..5412bb8c4a85 100644
--- a/libs/WindowManager/Shell/res/values-or/strings.xml
+++ b/libs/WindowManager/Shell/res/values-or/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"ବବଲ୍"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"ପରିଚାଳନା କରନ୍ତୁ"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"ବବଲ୍ ଖାରଜ କରାଯାଇଛି।"</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"ବବଲ"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"ବବଲ ଦେଖାନ୍ତୁ"</string>
<string name="restart_button_description" msgid="4564728020654658478">"ଏକ ଆହୁରି ଭଲ ଭ୍ୟୁ ପାଇଁ ଏହି ଆପ ରିଷ୍ଟାର୍ଟ କରିବାକୁ ଟାପ କରନ୍ତୁ"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"ସେଟିଂସରେ ଏହି ଆପର ଚଉଡ଼ା ଓ ଉଚ୍ଚତାର ଅନୁପାତ ପରିବର୍ତ୍ତନ କରନ୍ତୁ"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"ଚଉଡ଼ା ଓ ଉଚ୍ଚତାର ଅନୁପାତ ପରିବର୍ତ୍ତନ କରନ୍ତୁ"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"ଫ୍ଲୋଟ"</string>
<string name="select_text" msgid="5139083974039906583">"ଚୟନ କରନ୍ତୁ"</string>
<string name="screenshot_text" msgid="1477704010087786671">"ସ୍କ୍ରିନସଟ"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"ବନ୍ଦ କରନ୍ତୁ"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"ମେନୁ ବନ୍ଦ କରନ୍ତୁ"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"ମେନୁ ଖୋଲନ୍ତୁ"</string>
diff --git a/libs/WindowManager/Shell/res/values-pa/strings.xml b/libs/WindowManager/Shell/res/values-pa/strings.xml
index 9feaf41cda7f..abff90d32cc1 100644
--- a/libs/WindowManager/Shell/res/values-pa/strings.xml
+++ b/libs/WindowManager/Shell/res/values-pa/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"ਬੁਲਬੁਲਾ"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"ਪ੍ਰਬੰਧਨ ਕਰੋ"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"ਬਬਲ ਨੂੰ ਖਾਰਜ ਕੀਤਾ ਗਿਆ।"</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"ਬਬਲ"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"ਬਬਲ ਦਿਖਾਓ"</string>
<string name="restart_button_description" msgid="4564728020654658478">"ਬਿਹਤਰ ਦ੍ਰਿਸ਼ ਵਾਸਤੇ ਇਸ ਐਪ ਨੂੰ ਮੁੜ-ਸ਼ੁਰੂ ਕਰਨ ਲਈ ਟੈਪ ਕਰੋ"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"ਸੈਟਿੰਗਾਂ ਵਿੱਚ ਜਾ ਕੇ ਇਸ ਐਪ ਦੇ ਆਕਾਰ ਅਨੁਪਾਤ ਨੂੰ ਬਦਲੋ"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"ਆਕਾਰ ਅਨੁਪਾਤ ਬਦਲੋ"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"ਫ਼ਲੋਟ"</string>
<string name="select_text" msgid="5139083974039906583">"ਚੁਣੋ"</string>
<string name="screenshot_text" msgid="1477704010087786671">"ਸਕ੍ਰੀਨਸ਼ਾਟ"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"ਬੰਦ ਕਰੋ"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"ਮੀਨੂ ਬੰਦ ਕਰੋ"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"ਮੀਨੂ ਖੋਲ੍ਹੋ"</string>
diff --git a/libs/WindowManager/Shell/res/values-pl/strings.xml b/libs/WindowManager/Shell/res/values-pl/strings.xml
index 1c7fbf8e80d3..1c268bd34d55 100644
--- a/libs/WindowManager/Shell/res/values-pl/strings.xml
+++ b/libs/WindowManager/Shell/res/values-pl/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Dymek"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Zarządzaj"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Zamknięto dymek"</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Dymki"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Pokaż dymki"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Kliknij w celu zrestartowania aplikacji, aby lepiej się wyświetlała."</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Zmień proporcje obrazu aplikacji w Ustawieniach"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Zmień proporcje obrazu"</string>
@@ -118,6 +116,7 @@
<string name="float_button_text" msgid="9221657008391364581">"Pływające"</string>
<string name="select_text" msgid="5139083974039906583">"Wybierz"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Zrzut ekranu"</string>
+ <string name="open_in_browser_text" msgid="9181692926376072904">"Otwórz w przeglądarce"</string>
<string name="close_text" msgid="4986518933445178928">"Zamknij"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Zamknij menu"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Otwórz menu"</string>
diff --git a/libs/WindowManager/Shell/res/values-pt-rBR/strings.xml b/libs/WindowManager/Shell/res/values-pt-rBR/strings.xml
index 5c2de2ad0d31..82566fedf890 100644
--- a/libs/WindowManager/Shell/res/values-pt-rBR/strings.xml
+++ b/libs/WindowManager/Shell/res/values-pt-rBR/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Bolha"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Gerenciar"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Balão dispensado."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Balões"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Mostrar balões"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Toque para reiniciar o app e atualizar a visualização"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Mude o tamanho da janela deste app nas Configurações"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Mudar a proporção"</string>
@@ -118,6 +116,7 @@
<string name="float_button_text" msgid="9221657008391364581">"Ponto flutuante"</string>
<string name="select_text" msgid="5139083974039906583">"Selecionar"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Captura de tela"</string>
+ <string name="open_in_browser_text" msgid="9181692926376072904">"Abrir no navegador"</string>
<string name="close_text" msgid="4986518933445178928">"Fechar"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Fechar menu"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Abrir o menu"</string>
diff --git a/libs/WindowManager/Shell/res/values-pt-rPT/strings.xml b/libs/WindowManager/Shell/res/values-pt-rPT/strings.xml
index 6f76525473eb..b2e89182ace4 100644
--- a/libs/WindowManager/Shell/res/values-pt-rPT/strings.xml
+++ b/libs/WindowManager/Shell/res/values-pt-rPT/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Balão"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Gerir"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Balão ignorado."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Balões"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Mostrar balões"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Toque para reiniciar esta app e ficar com uma melhor visão"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Altere o formato desta app nas Definições"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Altere o formato"</string>
@@ -118,6 +116,7 @@
<string name="float_button_text" msgid="9221657008391364581">"Flutuar"</string>
<string name="select_text" msgid="5139083974039906583">"Selecionar"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Captura de ecrã"</string>
+ <string name="open_in_browser_text" msgid="9181692926376072904">"Abrir no navegador"</string>
<string name="close_text" msgid="4986518933445178928">"Fechar"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Fechar menu"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Abrir menu"</string>
diff --git a/libs/WindowManager/Shell/res/values-pt/strings.xml b/libs/WindowManager/Shell/res/values-pt/strings.xml
index 5c2de2ad0d31..82566fedf890 100644
--- a/libs/WindowManager/Shell/res/values-pt/strings.xml
+++ b/libs/WindowManager/Shell/res/values-pt/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Bolha"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Gerenciar"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Balão dispensado."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Balões"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Mostrar balões"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Toque para reiniciar o app e atualizar a visualização"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Mude o tamanho da janela deste app nas Configurações"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Mudar a proporção"</string>
@@ -118,6 +116,7 @@
<string name="float_button_text" msgid="9221657008391364581">"Ponto flutuante"</string>
<string name="select_text" msgid="5139083974039906583">"Selecionar"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Captura de tela"</string>
+ <string name="open_in_browser_text" msgid="9181692926376072904">"Abrir no navegador"</string>
<string name="close_text" msgid="4986518933445178928">"Fechar"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Fechar menu"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Abrir o menu"</string>
diff --git a/libs/WindowManager/Shell/res/values-ro/strings.xml b/libs/WindowManager/Shell/res/values-ro/strings.xml
index 6e85e7849d95..67dc389816a6 100644
--- a/libs/WindowManager/Shell/res/values-ro/strings.xml
+++ b/libs/WindowManager/Shell/res/values-ro/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Balon"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Gestionează"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Balonul a fost respins."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Baloane"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Afișează Baloane"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Atinge ca să repornești aplicația pentru o vizualizare mai bună"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Schimbă raportul de dimensiuni al aplicației din Setări"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Schimbă raportul de dimensiuni"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"Flotantă"</string>
<string name="select_text" msgid="5139083974039906583">"Selectează"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Captură de ecran"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"Închide"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Închide meniul"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Deschide meniul"</string>
diff --git a/libs/WindowManager/Shell/res/values-ru/strings.xml b/libs/WindowManager/Shell/res/values-ru/strings.xml
index 1b41983cd1a3..b2a60302bd1a 100644
--- a/libs/WindowManager/Shell/res/values-ru/strings.xml
+++ b/libs/WindowManager/Shell/res/values-ru/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Всплывающая подсказка"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Настроить"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Всплывающий чат закрыт."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Чаты"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Всплывающие чаты"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Нажмите, чтобы перезапустить приложение и оптимизировать размер"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Изменить соотношение сторон приложения в настройках"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Изменить соотношение сторон"</string>
@@ -118,6 +116,7 @@
<string name="float_button_text" msgid="9221657008391364581">"Плавающее окно"</string>
<string name="select_text" msgid="5139083974039906583">"Выбрать"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Скриншот"</string>
+ <string name="open_in_browser_text" msgid="9181692926376072904">"Открыть в браузере"</string>
<string name="close_text" msgid="4986518933445178928">"Закрыть"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Закрыть меню"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Открыть меню"</string>
diff --git a/libs/WindowManager/Shell/res/values-si/strings.xml b/libs/WindowManager/Shell/res/values-si/strings.xml
index 6fd37e91c8b0..34eaad0825f6 100644
--- a/libs/WindowManager/Shell/res/values-si/strings.xml
+++ b/libs/WindowManager/Shell/res/values-si/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"බුබුළු"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"කළමනා කරන්න"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"බුබුල ඉවත දමා ඇත."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"බුබුළු"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"බුබුළු පෙන්වන්න"</string>
<string name="restart_button_description" msgid="4564728020654658478">"වඩා හොඳ දසුනක් සඳහා මෙම යෙදුම යළි ඇරඹීමට තට්ටු කරන්න"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"සැකසීම් තුළ මෙම යෙදුමේ දර්ශන අනුපාතය වෙනස් කරන්න"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"දර්ශන අනුපාතය වෙනස් කරන්න"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"පාවෙන"</string>
<string name="select_text" msgid="5139083974039906583">"තෝරන්න"</string>
<string name="screenshot_text" msgid="1477704010087786671">"තිර රුව"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"වසන්න"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"මෙනුව වසන්න"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"මෙනුව විවෘත කරන්න"</string>
diff --git a/libs/WindowManager/Shell/res/values-sk/strings.xml b/libs/WindowManager/Shell/res/values-sk/strings.xml
index dabbf397d38f..4687f39cb308 100644
--- a/libs/WindowManager/Shell/res/values-sk/strings.xml
+++ b/libs/WindowManager/Shell/res/values-sk/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Bublina"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Spravovať"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Bublina bola zavretá."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Bubliny"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Zobraziť bubliny"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Ak chcete zlepšiť zobrazenie, klepnutím túto aplikáciu reštartujte"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Zmeniť pomer strán tejto aplikácie v Nastaveniach"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Zmeniť pomer strán"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"Plávajúce"</string>
<string name="select_text" msgid="5139083974039906583">"Vybrať"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Snímka obrazovky"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"Zavrieť"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Zavrieť ponuku"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Otvoriť ponuku"</string>
diff --git a/libs/WindowManager/Shell/res/values-sl/strings.xml b/libs/WindowManager/Shell/res/values-sl/strings.xml
index 3ade33810cc8..5848f9261d9b 100644
--- a/libs/WindowManager/Shell/res/values-sl/strings.xml
+++ b/libs/WindowManager/Shell/res/values-sl/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Mehurček"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Upravljanje"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Oblaček je bil opuščen."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Oblački"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Prikaži oblačke"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Če želite boljši prikaz, se dotaknite za vnovični zagon te aplikacije."</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Razmerje stranic te aplikacije spremenite v nastavitvah."</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Sprememba razmerja stranic"</string>
@@ -118,6 +116,7 @@
<string name="float_button_text" msgid="9221657008391364581">"Lebdeče"</string>
<string name="select_text" msgid="5139083974039906583">"Izberi"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Posnetek zaslona"</string>
+ <string name="open_in_browser_text" msgid="9181692926376072904">"Odpri v brskalniku"</string>
<string name="close_text" msgid="4986518933445178928">"Zapri"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Zapri meni"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Odpri meni"</string>
diff --git a/libs/WindowManager/Shell/res/values-sq/strings.xml b/libs/WindowManager/Shell/res/values-sq/strings.xml
index ee1aa00c5cbe..5f8f97e8b7df 100644
--- a/libs/WindowManager/Shell/res/values-sq/strings.xml
+++ b/libs/WindowManager/Shell/res/values-sq/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Flluskë"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Menaxho"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Flluska u hoq."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Flluskat"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Shfaq \"Flluskat\""</string>
<string name="restart_button_description" msgid="4564728020654658478">"Trokit për ta rinisur këtë aplikacion për një pamje më të mirë"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Ndrysho raportin e pamjes së këtij aplikacioni te \"Cilësimet\""</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Ndrysho raportin e pamjes"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"Pluskuese"</string>
<string name="select_text" msgid="5139083974039906583">"Zgjidh"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Pamja e ekranit"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"Mbyll"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Mbyll menynë"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Hap menynë"</string>
diff --git a/libs/WindowManager/Shell/res/values-sr/strings.xml b/libs/WindowManager/Shell/res/values-sr/strings.xml
index b2868ca84dac..8402eef99c38 100644
--- a/libs/WindowManager/Shell/res/values-sr/strings.xml
+++ b/libs/WindowManager/Shell/res/values-sr/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Облачић"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Управљајте"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Облачић је одбачен."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Облачићи"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Прикажи облачиће"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Додирните да бисте рестартовали ову апликацију ради бољег приказа"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Промените размеру ове апликације у Подешавањима"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Промени размеру"</string>
@@ -118,6 +116,7 @@
<string name="float_button_text" msgid="9221657008391364581">"Плутајуће"</string>
<string name="select_text" msgid="5139083974039906583">"Изаберите"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Снимак екрана"</string>
+ <string name="open_in_browser_text" msgid="9181692926376072904">"Отворите у прегледачу"</string>
<string name="close_text" msgid="4986518933445178928">"Затворите"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Затворите мени"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Отворите мени"</string>
diff --git a/libs/WindowManager/Shell/res/values-sv/strings.xml b/libs/WindowManager/Shell/res/values-sv/strings.xml
index 66118efd5da7..a991152ddc06 100644
--- a/libs/WindowManager/Shell/res/values-sv/strings.xml
+++ b/libs/WindowManager/Shell/res/values-sv/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Bubbla"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Hantera"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Bubblan ignorerades."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Bubblor"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Visa bubblor"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Tryck för att starta om appen och få en bättre vy"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Ändra appens bildformat i inställningarna"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Ändra bildformat"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"Svävande"</string>
<string name="select_text" msgid="5139083974039906583">"Välj"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Skärmbild"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"Stäng"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Stäng menyn"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Öppna menyn"</string>
diff --git a/libs/WindowManager/Shell/res/values-sw/strings.xml b/libs/WindowManager/Shell/res/values-sw/strings.xml
index 863b49b1f010..94ea2f2ad02e 100644
--- a/libs/WindowManager/Shell/res/values-sw/strings.xml
+++ b/libs/WindowManager/Shell/res/values-sw/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Kiputo"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Dhibiti"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Umeondoa kiputo."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Viputo"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Onyesha Viputo"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Gusa ili uzime kisha uwashe programu hii, ili upate mwonekano bora"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Badilisha uwiano wa programu hii katika Mipangilio"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Badilisha uwiano wa kipengele"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"Inayoelea"</string>
<string name="select_text" msgid="5139083974039906583">"Chagua"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Picha ya skrini"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"Funga"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Funga Menyu"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Fungua Menyu"</string>
diff --git a/libs/WindowManager/Shell/res/values-ta/strings.xml b/libs/WindowManager/Shell/res/values-ta/strings.xml
index 74e0207bf62e..866fe568c470 100644
--- a/libs/WindowManager/Shell/res/values-ta/strings.xml
+++ b/libs/WindowManager/Shell/res/values-ta/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"பபிள்"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"நிர்வகி"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"குமிழ் நிராகரிக்கப்பட்டது."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"குமிழ்கள்"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"குமிழ்களைக் காட்டு"</string>
<string name="restart_button_description" msgid="4564728020654658478">"இங்கு தட்டுவதன் மூலம் இந்த ஆப்ஸை மீண்டும் தொடங்கி, ஆப்ஸ் காட்டப்படும் விதத்தை இன்னும் சிறப்பாக்கலாம்"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"அமைப்புகளில் இந்த ஆப்ஸின் தோற்ற விகிதத்தை மாற்றும்"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"தோற்ற விகிதத்தை மாற்றும்"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"மிதக்கும் சாளரம்"</string>
<string name="select_text" msgid="5139083974039906583">"தேர்ந்தெடுக்கும்"</string>
<string name="screenshot_text" msgid="1477704010087786671">"ஸ்கிரீன்ஷாட்"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"மூடும்"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"மெனுவை மூடும்"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"மெனுவைத் திற"</string>
diff --git a/libs/WindowManager/Shell/res/values-te/strings.xml b/libs/WindowManager/Shell/res/values-te/strings.xml
index 35711567e760..ef094fcc8e64 100644
--- a/libs/WindowManager/Shell/res/values-te/strings.xml
+++ b/libs/WindowManager/Shell/res/values-te/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"బబుల్"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"మేనేజ్ చేయండి"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"బబుల్ విస్మరించబడింది."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"బబుల్స్"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"బబుల్స్ చూడండి"</string>
<string name="restart_button_description" msgid="4564728020654658478">"మెరుగైన వీక్షణ కోసం ఈ యాప్‌ను రీస్టార్ట్ చేయడానికి ట్యాప్ చేయండి"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"సెట్టింగ్‌లలో ఈ యాప్ ఆకార నిష్పత్తిని మార్చండి"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"ఆకార నిష్పత్తిని మార్చండి"</string>
@@ -118,6 +116,7 @@
<string name="float_button_text" msgid="9221657008391364581">"ఫ్లోట్"</string>
<string name="select_text" msgid="5139083974039906583">"ఎంచుకోండి"</string>
<string name="screenshot_text" msgid="1477704010087786671">"స్క్రీన్‌షాట్"</string>
+ <string name="open_in_browser_text" msgid="9181692926376072904">"బ్రౌజర్‌లో తెరవండి"</string>
<string name="close_text" msgid="4986518933445178928">"మూసివేయండి"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"మెనూను మూసివేయండి"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"మెనూను తెరవండి"</string>
diff --git a/libs/WindowManager/Shell/res/values-th/strings.xml b/libs/WindowManager/Shell/res/values-th/strings.xml
index 47694164270e..762a81a0305a 100644
--- a/libs/WindowManager/Shell/res/values-th/strings.xml
+++ b/libs/WindowManager/Shell/res/values-th/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"บับเบิล"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"จัดการ"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"ปิดบับเบิลแล้ว"</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"บับเบิล"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"แสดงบับเบิล"</string>
<string name="restart_button_description" msgid="4564728020654658478">"แตะเพื่อรีสตาร์ทแอปนี้และรับมุมมองที่ดียิ่งขึ้น"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"เปลี่ยนสัดส่วนภาพของแอปนี้ในการตั้งค่า"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"เปลี่ยนอัตราส่วนกว้างยาว"</string>
@@ -118,6 +116,7 @@
<string name="float_button_text" msgid="9221657008391364581">"ล่องลอย"</string>
<string name="select_text" msgid="5139083974039906583">"เลือก"</string>
<string name="screenshot_text" msgid="1477704010087786671">"ภาพหน้าจอ"</string>
+ <string name="open_in_browser_text" msgid="9181692926376072904">"เปิดในเบราว์เซอร์"</string>
<string name="close_text" msgid="4986518933445178928">"ปิด"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"ปิดเมนู"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"เปิดเมนู"</string>
diff --git a/libs/WindowManager/Shell/res/values-tl/strings.xml b/libs/WindowManager/Shell/res/values-tl/strings.xml
index be18d88194c1..418f500aac80 100644
--- a/libs/WindowManager/Shell/res/values-tl/strings.xml
+++ b/libs/WindowManager/Shell/res/values-tl/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Bubble"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Pamahalaan"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Na-dismiss na ang bubble."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Mga Bubble"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Ipakita ang Mga Bubble"</string>
<string name="restart_button_description" msgid="4564728020654658478">"I-tap para i-restart ang app na ito para sa mas magandang view"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Baguhin ang aspect ratio ng app na ito sa Mga Setting"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Baguhin ang aspect ratio"</string>
@@ -118,6 +116,7 @@
<string name="float_button_text" msgid="9221657008391364581">"Float"</string>
<string name="select_text" msgid="5139083974039906583">"Piliin"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Screenshot"</string>
+ <string name="open_in_browser_text" msgid="9181692926376072904">"Buksan sa browser"</string>
<string name="close_text" msgid="4986518933445178928">"Isara"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Isara ang Menu"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Buksan ang Menu"</string>
diff --git a/libs/WindowManager/Shell/res/values-tr/strings.xml b/libs/WindowManager/Shell/res/values-tr/strings.xml
index 4c8c53610711..e70f1708fb75 100644
--- a/libs/WindowManager/Shell/res/values-tr/strings.xml
+++ b/libs/WindowManager/Shell/res/values-tr/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Baloncuk"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Yönet"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Balon kapatıldı."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Baloncuklar"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Baloncukları göster"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Bu uygulamayı yeniden başlatarak daha iyi bir görünüm elde etmek için dokunun"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Bu uygulamanın en boy oranını Ayarlar\'dan değiştirin"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"En boy oranını değiştir"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"Havada Süzülen"</string>
<string name="select_text" msgid="5139083974039906583">"Seç"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Ekran görüntüsü"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"Kapat"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Menüyü kapat"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Menüyü Aç"</string>
diff --git a/libs/WindowManager/Shell/res/values-uk/strings.xml b/libs/WindowManager/Shell/res/values-uk/strings.xml
index 7cc1a0406f97..b243a153af8f 100644
--- a/libs/WindowManager/Shell/res/values-uk/strings.xml
+++ b/libs/WindowManager/Shell/res/values-uk/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Спливаюче сповіщення"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Налаштувати"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Спливаюче сповіщення закрито."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Спл. чати"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Показувати спливаючі чати"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Натисніть, щоб перезапустити цей додаток для зручнішого перегляду"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Змінити формат для цього додатка в налаштуваннях"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Змінити формат"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"Плаваюче вікно"</string>
<string name="select_text" msgid="5139083974039906583">"Вибрати"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Знімок екрана"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"Закрити"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Закрити меню"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Відкрити меню"</string>
diff --git a/libs/WindowManager/Shell/res/values-ur/strings.xml b/libs/WindowManager/Shell/res/values-ur/strings.xml
index 8b9f29969d80..2cf9f325892d 100644
--- a/libs/WindowManager/Shell/res/values-ur/strings.xml
+++ b/libs/WindowManager/Shell/res/values-ur/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"بلبلہ"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"نظم کریں"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"بلبلہ برخاست کر دیا گیا۔"</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"بلبلے"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"بلبلے دکھائیں"</string>
<string name="restart_button_description" msgid="4564728020654658478">"بہتر منظر کے لیے اس ایپ کو ری اسٹارٹ کرنے کی خاطر تھپتھپائیں"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"ترتیبات میں اس ایپ کی تناسبی شرح کو تبدیل کریں"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"تناسبی شرح کو تبدیل کریں"</string>
@@ -118,6 +116,7 @@
<string name="float_button_text" msgid="9221657008391364581">"فلوٹ"</string>
<string name="select_text" msgid="5139083974039906583">"منتخب کریں"</string>
<string name="screenshot_text" msgid="1477704010087786671">"اسکرین شاٹ"</string>
+ <string name="open_in_browser_text" msgid="9181692926376072904">"براؤزر میں کھولیں"</string>
<string name="close_text" msgid="4986518933445178928">"بند کریں"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"مینیو بند کریں"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"مینو کھولیں"</string>
diff --git a/libs/WindowManager/Shell/res/values-uz/strings.xml b/libs/WindowManager/Shell/res/values-uz/strings.xml
index 55c6b32c909b..f8cd43f9d6fa 100644
--- a/libs/WindowManager/Shell/res/values-uz/strings.xml
+++ b/libs/WindowManager/Shell/res/values-uz/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Pufaklar"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Boshqarish"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Bulutcha yopildi."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Bulutchalar"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Bulutchalarni chiqarish"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Yaxshiroq koʻrish maqsadida bu ilovani qayta ishga tushirish uchun bosing"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Sozlamalar orqali bu ilovaning tomonlar nisbatini oʻzgartiring"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Tomonlar nisbatini oʻzgartirish"</string>
@@ -118,6 +116,7 @@
<string name="float_button_text" msgid="9221657008391364581">"Pufakli"</string>
<string name="select_text" msgid="5139083974039906583">"Tanlash"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Skrinshot"</string>
+ <string name="open_in_browser_text" msgid="9181692926376072904">"Brauzerda ochish"</string>
<string name="close_text" msgid="4986518933445178928">"Yopish"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Menyuni yopish"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Menyuni ochish"</string>
diff --git a/libs/WindowManager/Shell/res/values-vi/strings.xml b/libs/WindowManager/Shell/res/values-vi/strings.xml
index 07a6b6f6c2b4..a813b265a4dc 100644
--- a/libs/WindowManager/Shell/res/values-vi/strings.xml
+++ b/libs/WindowManager/Shell/res/values-vi/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Bong bóng"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Quản lý"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Đã đóng bong bóng."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Bong bóng"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Hiện bong bóng"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Nhấn nút khởi động lại ứng dụng này để xem dễ hơn"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Thay đổi tỷ lệ khung hình của ứng dụng này thông qua phần Cài đặt"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Thay đổi tỷ lệ khung hình"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"Nổi"</string>
<string name="select_text" msgid="5139083974039906583">"Chọn"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Ảnh chụp màn hình"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"Đóng"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Đóng trình đơn"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Mở Trình đơn"</string>
diff --git a/libs/WindowManager/Shell/res/values-zh-rCN/strings.xml b/libs/WindowManager/Shell/res/values-zh-rCN/strings.xml
index 908095a163a7..6f21fdfa250e 100644
--- a/libs/WindowManager/Shell/res/values-zh-rCN/strings.xml
+++ b/libs/WindowManager/Shell/res/values-zh-rCN/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"气泡"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"管理"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"已关闭消息气泡。"</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"消息气泡"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"显示消息气泡"</string>
<string name="restart_button_description" msgid="4564728020654658478">"点按即可重启此应用,获得更好的视觉体验"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"在“设置”中更改此应用的宽高比"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"更改高宽比"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"悬浮"</string>
<string name="select_text" msgid="5139083974039906583">"选择"</string>
<string name="screenshot_text" msgid="1477704010087786671">"屏幕截图"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"关闭"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"关闭菜单"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"打开菜单"</string>
diff --git a/libs/WindowManager/Shell/res/values-zh-rHK/strings.xml b/libs/WindowManager/Shell/res/values-zh-rHK/strings.xml
index c8550b4e0611..159db8f0e82d 100644
--- a/libs/WindowManager/Shell/res/values-zh-rHK/strings.xml
+++ b/libs/WindowManager/Shell/res/values-zh-rHK/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"氣泡"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"管理"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"對話氣泡已關閉。"</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"對話氣泡"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"顯示對話氣泡"</string>
<string name="restart_button_description" msgid="4564728020654658478">"輕按並重新啟動此應用程式,以取得更佳的觀看體驗"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"前往「設定」變更此應用程式的長寬比"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"變更長寬比"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"浮動"</string>
<string name="select_text" msgid="5139083974039906583">"選取"</string>
<string name="screenshot_text" msgid="1477704010087786671">"螢幕截圖"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"關閉"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"關閉選單"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"打開選單"</string>
diff --git a/libs/WindowManager/Shell/res/values-zh-rTW/strings.xml b/libs/WindowManager/Shell/res/values-zh-rTW/strings.xml
index 67048335de64..8a1b2bf2b14e 100644
--- a/libs/WindowManager/Shell/res/values-zh-rTW/strings.xml
+++ b/libs/WindowManager/Shell/res/values-zh-rTW/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"泡泡"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"管理"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"已關閉泡泡。"</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"對話框"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"顯示對話框"</string>
<string name="restart_button_description" msgid="4564728020654658478">"輕觸此按鈕重新啟動這個應用程式,即可獲得更良好的觀看體驗"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"前往「設定」變更這個應用程式的顯示比例"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"變更顯示比例"</string>
@@ -118,6 +116,8 @@
<string name="float_button_text" msgid="9221657008391364581">"浮動"</string>
<string name="select_text" msgid="5139083974039906583">"選取"</string>
<string name="screenshot_text" msgid="1477704010087786671">"螢幕截圖"</string>
+ <!-- no translation found for open_in_browser_text (9181692926376072904) -->
+ <skip />
<string name="close_text" msgid="4986518933445178928">"關閉"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"關閉選單"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"開啟選單"</string>
diff --git a/libs/WindowManager/Shell/res/values-zu/strings.xml b/libs/WindowManager/Shell/res/values-zu/strings.xml
index 96b4faec06b8..ba3df301df54 100644
--- a/libs/WindowManager/Shell/res/values-zu/strings.xml
+++ b/libs/WindowManager/Shell/res/values-zu/strings.xml
@@ -84,10 +84,8 @@
<string name="notification_bubble_title" msgid="6082910224488253378">"Ibhamuza"</string>
<string name="manage_bubbles_text" msgid="7730624269650594419">"Phatha"</string>
<string name="accessibility_bubble_dismissed" msgid="8367471990421247357">"Ibhamuza licashisiwe."</string>
- <!-- no translation found for bubble_shortcut_label (666269077944378311) -->
- <skip />
- <!-- no translation found for bubble_shortcut_long_label (6088437544312894043) -->
- <skip />
+ <string name="bubble_shortcut_label" msgid="666269077944378311">"Amabhamuza"</string>
+ <string name="bubble_shortcut_long_label" msgid="6088437544312894043">"Bonisa Amabhamuza"</string>
<string name="restart_button_description" msgid="4564728020654658478">"Thepha ukuze uqale kabusha le app ukuze ibonakale kangcono"</string>
<string name="user_aspect_ratio_settings_button_hint" msgid="734835849600713016">"Shintsha ukubukeka kwesilinganiselo kwe-app kuMasethingi"</string>
<string name="user_aspect_ratio_settings_button_description" msgid="4315566801697411684">"Shintsha ukubukeka kwesilinganiselo"</string>
@@ -118,6 +116,7 @@
<string name="float_button_text" msgid="9221657008391364581">"Iflowuthi"</string>
<string name="select_text" msgid="5139083974039906583">"Khetha"</string>
<string name="screenshot_text" msgid="1477704010087786671">"Isithombe-skrini"</string>
+ <string name="open_in_browser_text" msgid="9181692926376072904">"Vula kubhrawuza"</string>
<string name="close_text" msgid="4986518933445178928">"Vala"</string>
<string name="collapse_menu_text" msgid="7515008122450342029">"Vala Imenyu"</string>
<string name="expand_menu_text" msgid="3847736164494181168">"Vula Imenyu"</string>
diff --git a/libs/WindowManager/Shell/res/values/dimen.xml b/libs/WindowManager/Shell/res/values/dimen.xml
index 595d34664cfa..269a58693a24 100644
--- a/libs/WindowManager/Shell/res/values/dimen.xml
+++ b/libs/WindowManager/Shell/res/values/dimen.xml
@@ -495,9 +495,16 @@
<!-- The radius of the Maximize menu shadow. -->
<dimen name="desktop_mode_maximize_menu_shadow_radius">8dp</dimen>
- <!-- The width of the handle menu in desktop mode. -->
+ <!-- The width of the handle menu in desktop mode. -->
<dimen name="desktop_mode_handle_menu_width">216dp</dimen>
+ <!-- The maximum height of the handle menu in desktop mode. Four pills (52dp each) plus 2dp
+ spacing between them plus 4dp top padding. -->
+ <dimen name="desktop_mode_handle_menu_height">218dp</dimen>
+
+ <!-- The elevation set on the handle menu pills. -->
+ <dimen name="desktop_mode_handle_menu_pill_elevation">1dp</dimen>
+
<!-- The height of the handle menu's "App Info" pill in desktop mode. -->
<dimen name="desktop_mode_handle_menu_app_info_pill_height">52dp</dimen>
@@ -507,8 +514,11 @@
<!-- The height of the handle menu's "More Actions" pill in desktop mode. -->
<dimen name="desktop_mode_handle_menu_more_actions_pill_height">52dp</dimen>
- <!-- The height of the handle menu in desktop mode. -->
- <dimen name="desktop_mode_handle_menu_height">328dp</dimen>
+ <!-- The height of the handle menu's "Open in browser" pill in desktop mode. -->
+ <dimen name="desktop_mode_handle_menu_open_in_browser_pill_height">52dp</dimen>
+
+ <!-- The margin between pills of the handle menu in desktop mode. -->
+ <dimen name="desktop_mode_handle_menu_pill_spacing_margin">2dp</dimen>
<!-- The top margin of the handle menu in desktop mode. -->
<dimen name="desktop_mode_handle_menu_margin_top">4dp</dimen>
@@ -516,9 +526,6 @@
<!-- The start margin of the handle menu in desktop mode. -->
<dimen name="desktop_mode_handle_menu_margin_start">6dp</dimen>
- <!-- The margin between pills of the handle menu in desktop mode. -->
- <dimen name="desktop_mode_handle_menu_pill_spacing_margin">2dp</dimen>
-
<!-- The radius of the caption menu corners. -->
<dimen name="desktop_mode_handle_menu_corner_radius">26dp</dimen>
diff --git a/libs/WindowManager/Shell/res/values/strings.xml b/libs/WindowManager/Shell/res/values/strings.xml
index 47846746b205..4e7cfb638a12 100644
--- a/libs/WindowManager/Shell/res/values/strings.xml
+++ b/libs/WindowManager/Shell/res/values/strings.xml
@@ -280,6 +280,8 @@
<string name="select_text">Select</string>
<!-- Accessibility text for the handle menu screenshot button [CHAR LIMIT=NONE] -->
<string name="screenshot_text">Screenshot</string>
+ <!-- Accessibility text for the handle menu open in browser button [CHAR LIMIT=NONE] -->
+ <string name="open_in_browser_text">Open in browser</string>
<!-- Accessibility text for the handle menu close button [CHAR LIMIT=NONE] -->
<string name="close_text">Close</string>
<!-- Accessibility text for the handle menu close menu button [CHAR LIMIT=NONE] -->
diff --git a/libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/animation/PhysicsAnimatorTestUtils.kt b/libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/animation/PhysicsAnimatorTestUtils.kt
index 235b9bf7b9fd..fc3dc1465dff 100644
--- a/libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/animation/PhysicsAnimatorTestUtils.kt
+++ b/libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/animation/PhysicsAnimatorTestUtils.kt
@@ -168,6 +168,16 @@ object PhysicsAnimatorTestUtils {
}
}
+ /** Whether any animation is currently running. */
+ @JvmStatic
+ fun isAnyAnimationRunning(): Boolean {
+ for (target in allAnimatedObjects) {
+ val animator = PhysicsAnimator.getInstance(target)
+ if (animator.isRunning()) return true
+ }
+ return false
+ }
+
/**
* Blocks the calling thread until the first animation frame in which predicate returns true. If
* the given object isn't animating, returns without blocking.
diff --git a/libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/desktopmode/DesktopModeFlags.kt b/libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/desktopmode/DesktopModeFlags.kt
index 8c2cfd1ed823..d3fc49bcb766 100644
--- a/libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/desktopmode/DesktopModeFlags.kt
+++ b/libs/WindowManager/Shell/shared/src/com/android/wm/shell/shared/desktopmode/DesktopModeFlags.kt
@@ -39,8 +39,6 @@ enum class DesktopModeFlags(
/**
* Determines state of flag based on the actual flag and desktop mode developer option overrides.
- *
- * Note, this method makes sure that a constant developer toggle overrides is read until reboot.
*/
fun isEnabled(context: Context): Boolean =
if (!Flags.showDesktopWindowingDevOption() ||
@@ -65,7 +63,7 @@ enum class DesktopModeFlags(
?: run {
val override = getToggleOverrideFromSystem(context)
// Cache toggle override the first time we encounter context. Override does not change
- // with context, as context is just used to fetch System Property and Settings.Global
+ // with context, as context is just used to fetch Settings.Global
cachedToggleOverride = override
Log.d(TAG, "Toggle override initialized to: $override")
override
@@ -74,30 +72,14 @@ enum class DesktopModeFlags(
return override
}
- private fun getToggleOverrideFromSystem(context: Context): ToggleOverride {
- // A non-persistent System Property is used to store override to ensure it remains
- // constant till reboot.
- val overrideFromSystemProperties: ToggleOverride? =
- System.getProperty(SYSTEM_PROPERTY_OVERRIDE_KEY, null).convertToToggleOverride()
- return overrideFromSystemProperties
- ?: run {
- // Read Setting Global if System Property is not present (just after reboot)
- // or not valid (user manually changed the value)
- val overrideFromSettingsGlobal =
- Settings.Global.getInt(
- context.contentResolver,
- Settings.Global.DEVELOPMENT_OVERRIDE_DESKTOP_MODE_FEATURES,
- ToggleOverride.OVERRIDE_UNSET.setting)
- .convertToToggleOverrideWithFallback(ToggleOverride.OVERRIDE_UNSET)
- // Initialize System Property
- System.setProperty(
- SYSTEM_PROPERTY_OVERRIDE_KEY, overrideFromSettingsGlobal.setting.toString())
-
- overrideFromSettingsGlobal
- }
- }
+ private fun getToggleOverrideFromSystem(context: Context): ToggleOverride =
+ convertToToggleOverrideWithFallback(
+ Settings.Global.getInt(
+ context.contentResolver,
+ Settings.Global.DEVELOPMENT_OVERRIDE_DESKTOP_MODE_FEATURES,
+ ToggleOverride.OVERRIDE_UNSET.setting),
+ ToggleOverride.OVERRIDE_UNSET)
- // TODO(b/348193756): Share ToggleOverride enum with Settings 'DesktopModePreferenceController'
/**
* Override state of desktop mode developer option toggle.
*
@@ -113,40 +95,27 @@ enum class DesktopModeFlags(
OVERRIDE_ON(1)
}
- private val settingToToggleOverrideMap = ToggleOverride.entries.associateBy { it.setting }
-
- private fun String?.convertToToggleOverride(): ToggleOverride? {
- val intValue = this?.toIntOrNull() ?: return null
- return settingToToggleOverrideMap[intValue]
- ?: run {
- Log.w(TAG, "Unknown toggleOverride int $intValue")
- null
- }
- }
-
- private fun Int.convertToToggleOverrideWithFallback(
- fallbackOverride: ToggleOverride
- ): ToggleOverride {
- return settingToToggleOverrideMap[this]
- ?: run {
- Log.w(TAG, "Unknown toggleOverride int $this")
- fallbackOverride
- }
- }
-
companion object {
private const val TAG = "DesktopModeFlags"
/**
- * Key for non-persistent System Property which is used to store desktop windowing developer
- * option overrides.
- */
- private const val SYSTEM_PROPERTY_OVERRIDE_KEY = "sys.wmshell.desktopmode.dev_toggle_override"
-
- /**
* Local cache for toggle override, which is initialized once on its first access. It needs to
- * be refreshed only on reboots as overridden state takes effect on reboots.
+ * be refreshed only on reboots as overridden state is expected to take effect on reboots.
*/
private var cachedToggleOverride: ToggleOverride? = null
+
+ private val settingToToggleOverrideMap = ToggleOverride.entries.associateBy { it.setting }
+
+ @JvmStatic
+ fun convertToToggleOverrideWithFallback(
+ overrideInt: Int,
+ fallbackOverride: ToggleOverride
+ ): ToggleOverride {
+ return settingToToggleOverrideMap[overrideInt]
+ ?: run {
+ Log.w(TAG, "Unknown toggleOverride int $overrideInt")
+ fallbackOverride
+ }
+ }
}
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/ShellTaskOrganizer.java b/libs/WindowManager/Shell/src/com/android/wm/shell/ShellTaskOrganizer.java
index d41600b140c4..f014e559d4b4 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/ShellTaskOrganizer.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/ShellTaskOrganizer.java
@@ -699,6 +699,22 @@ public class ShellTaskOrganizer extends TaskOrganizer {
}
}
+ /**
+ * Shows/hides the given task surface. Not for general use as changing the task visibility may
+ * conflict with other Transitions. This is currently ONLY used to temporarily hide a task
+ * while a drag is in session.
+ */
+ public void setTaskSurfaceVisibility(int taskId, boolean visible) {
+ synchronized (mLock) {
+ final TaskAppearedInfo info = mTasks.get(taskId);
+ if (info != null) {
+ SurfaceControl.Transaction t = new SurfaceControl.Transaction();
+ t.setVisibility(info.getLeash(), visible);
+ t.apply();
+ }
+ }
+ }
+
private boolean updateTaskListenerIfNeeded(RunningTaskInfo taskInfo, SurfaceControl leash,
TaskListener oldListener, TaskListener newListener) {
if (oldListener == newListener) return false;
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/back/BackAnimation.java b/libs/WindowManager/Shell/src/com/android/wm/shell/back/BackAnimation.java
index 196f89d5794e..df80946a99aa 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/back/BackAnimation.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/back/BackAnimation.java
@@ -107,4 +107,24 @@ public interface BackAnimation {
* @param pilferCallback the callback to pilfer pointers.
*/
void setPilferPointerCallback(Runnable pilferCallback);
+
+ /**
+ * Set a callback to requestTopUi.
+ * @param topUiRequest the callback to requestTopUi.
+ */
+ void setTopUiRequestCallback(TopUiRequest topUiRequest);
+
+ /**
+ * Callback to request SysUi to call
+ * {@link android.app.IActivityManager#setHasTopUi(boolean)}.
+ */
+ interface TopUiRequest {
+
+ /**
+ * Request {@link android.app.IActivityManager#setHasTopUi(boolean)} to be called.
+ * @param requestTopUi whether topUi should be requested or not
+ * @param tag tag of the request-source
+ */
+ void requestTopUi(boolean requestTopUi, String tag);
+ }
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/back/BackAnimationController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/back/BackAnimationController.java
index ece02711070e..a9fdea34515e 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/back/BackAnimationController.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/back/BackAnimationController.java
@@ -114,6 +114,7 @@ public class BackAnimationController implements RemoteCallable<BackAnimationCont
@Nullable
private BackNavigationInfo mBackNavigationInfo;
+ private boolean mReceivedNullNavigationInfo = false;
private final IActivityTaskManager mActivityTaskManager;
private final Context mContext;
private final ContentResolver mContentResolver;
@@ -179,6 +180,7 @@ public class BackAnimationController implements RemoteCallable<BackAnimationCont
@BackNavigationInfo.BackTargetType
private int mPreviousNavigationType;
private Runnable mPilferPointerCallback;
+ private BackAnimation.TopUiRequest mRequestTopUiCallback;
public BackAnimationController(
@NonNull ShellInit shellInit,
@@ -357,6 +359,11 @@ public class BackAnimationController implements RemoteCallable<BackAnimationCont
mPilferPointerCallback = callback;
});
}
+
+ @Override
+ public void setTopUiRequestCallback(TopUiRequest topUiRequest) {
+ mShellExecutor.execute(() -> mRequestTopUiCallback = topUiRequest);
+ }
}
private static class IBackAnimationImpl extends IBackAnimation.Stub
@@ -422,6 +429,12 @@ public class BackAnimationController implements RemoteCallable<BackAnimationCont
@VisibleForTesting
public void onThresholdCrossed() {
mThresholdCrossed = true;
+ // There was no focus window when calling startBackNavigation, still pilfer pointers so
+ // the next focus window won't receive motion events.
+ if (mBackNavigationInfo == null && mReceivedNullNavigationInfo) {
+ tryPilferPointers();
+ return;
+ }
// Dispatch onBackStarted, only to app callbacks.
// System callbacks will receive onBackStarted when the remote animation starts.
final boolean shouldDispatchToAnimator = shouldDispatchToAnimator();
@@ -541,7 +554,9 @@ public class BackAnimationController implements RemoteCallable<BackAnimationCont
ProtoLog.d(WM_SHELL_BACK_PREVIEW, "Received backNavigationInfo:%s", backNavigationInfo);
if (backNavigationInfo == null) {
ProtoLog.e(WM_SHELL_BACK_PREVIEW, "Received BackNavigationInfo is null.");
+ mReceivedNullNavigationInfo = true;
cancelLatencyTracking();
+ tryPilferPointers();
return;
}
final int backType = backNavigationInfo.getType();
@@ -550,6 +565,7 @@ public class BackAnimationController implements RemoteCallable<BackAnimationCont
if (!mShellBackAnimationRegistry.startGesture(backType)) {
mActiveCallback = null;
}
+ requestTopUi(true, backType);
tryPilferPointers();
} else {
mActiveCallback = mBackNavigationInfo.getOnBackInvokedCallback();
@@ -895,10 +911,12 @@ public class BackAnimationController implements RemoteCallable<BackAnimationCont
mPointersPilfered = false;
mShellBackAnimationRegistry.resetDefaultCrossActivity();
cancelLatencyTracking();
+ mReceivedNullNavigationInfo = false;
if (mBackNavigationInfo != null) {
mPreviousNavigationType = mBackNavigationInfo.getType();
mBackNavigationInfo.onBackNavigationFinished(triggerBack);
mBackNavigationInfo = null;
+ requestTopUi(false, mPreviousNavigationType);
}
}
@@ -962,6 +980,13 @@ public class BackAnimationController implements RemoteCallable<BackAnimationCont
}
}
+ private void requestTopUi(boolean hasTopUi, int backType) {
+ if (mRequestTopUiCallback != null && (backType == BackNavigationInfo.TYPE_CROSS_TASK
+ || backType == BackNavigationInfo.TYPE_CROSS_ACTIVITY)) {
+ mRequestTopUiCallback.requestTopUi(hasTopUi, TAG);
+ }
+ }
+
/**
* Validate animation targets.
*/
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/back/CrossActivityBackAnimation.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/back/CrossActivityBackAnimation.kt
index 4f04c5c28412..4e0c82b9628f 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/back/CrossActivityBackAnimation.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/back/CrossActivityBackAnimation.kt
@@ -61,8 +61,7 @@ abstract class CrossActivityBackAnimation(
private val context: Context,
private val background: BackAnimationBackground,
private val rootTaskDisplayAreaOrganizer: RootTaskDisplayAreaOrganizer,
- protected val transaction: SurfaceControl.Transaction,
- private val choreographer: Choreographer
+ protected val transaction: SurfaceControl.Transaction
) : ShellBackAnimation() {
protected val startClosingRect = RectF()
@@ -269,7 +268,9 @@ abstract class CrossActivityBackAnimation(
.setSpring(postCommitFlingSpring)
flingAnimation.start()
// do an animation-frame immediately to prevent idle frame
- flingAnimation.doAnimationFrame(choreographer.lastFrameTimeNanos / TimeUtils.NANOS_PER_MS)
+ flingAnimation.doAnimationFrame(
+ Choreographer.getInstance().lastFrameTimeNanos / TimeUtils.NANOS_PER_MS
+ )
val valueAnimator =
ValueAnimator.ofFloat(1f, 0f).setDuration(getPostCommitAnimationDuration())
@@ -362,7 +363,7 @@ abstract class CrossActivityBackAnimation(
}
protected fun applyTransaction() {
- transaction.setFrameTimelineVsync(choreographer.vsyncId)
+ transaction.setFrameTimelineVsync(Choreographer.getInstance().vsyncId)
transaction.apply()
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/back/CrossTaskBackAnimation.java b/libs/WindowManager/Shell/src/com/android/wm/shell/back/CrossTaskBackAnimation.java
index 103a65422504..e2b0513c951f 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/back/CrossTaskBackAnimation.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/back/CrossTaskBackAnimation.java
@@ -52,7 +52,6 @@ import com.android.internal.policy.SystemBarUtils;
import com.android.internal.protolog.ProtoLog;
import com.android.wm.shell.R;
import com.android.wm.shell.animation.Interpolators;
-import com.android.wm.shell.shared.annotations.ShellMainThread;
import javax.inject.Inject;
@@ -69,7 +68,6 @@ import javax.inject.Inject;
* IOnBackInvokedCallback} with WM Shell and receives back dispatches when a back navigation to
* launcher starts.
*/
-@ShellMainThread
public class CrossTaskBackAnimation extends ShellBackAnimation {
private static final int BACKGROUNDCOLOR = 0x43433A;
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/back/CustomCrossActivityBackAnimation.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/back/CustomCrossActivityBackAnimation.kt
index e266e2cd7eea..b02f97bf7784 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/back/CustomCrossActivityBackAnimation.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/back/CustomCrossActivityBackAnimation.kt
@@ -19,7 +19,6 @@ import android.content.Context
import android.graphics.Rect
import android.graphics.RectF
import android.util.MathUtils
-import android.view.Choreographer
import android.view.SurfaceControl
import android.view.animation.Animation
import android.view.animation.Transformation
@@ -31,27 +30,23 @@ import com.android.internal.policy.TransitionAnimation
import com.android.internal.protolog.ProtoLog
import com.android.wm.shell.RootTaskDisplayAreaOrganizer
import com.android.wm.shell.protolog.ShellProtoLogGroup
-import com.android.wm.shell.shared.annotations.ShellMainThread
import javax.inject.Inject
import kotlin.math.max
import kotlin.math.min
/** Class that handles customized predictive cross activity back animations. */
-@ShellMainThread
class CustomCrossActivityBackAnimation(
context: Context,
background: BackAnimationBackground,
rootTaskDisplayAreaOrganizer: RootTaskDisplayAreaOrganizer,
transaction: SurfaceControl.Transaction,
- choreographer: Choreographer,
private val customAnimationLoader: CustomAnimationLoader
) :
CrossActivityBackAnimation(
context,
background,
rootTaskDisplayAreaOrganizer,
- transaction,
- choreographer
+ transaction
) {
private var enterAnimation: Animation? = null
@@ -70,7 +65,6 @@ class CustomCrossActivityBackAnimation(
background,
rootTaskDisplayAreaOrganizer,
SurfaceControl.Transaction(),
- Choreographer.getInstance(),
CustomAnimationLoader(
TransitionAnimation(context, false /* debug */, "CustomCrossActivityBackAnimation")
)
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/back/DefaultCrossActivityBackAnimation.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/back/DefaultCrossActivityBackAnimation.kt
index 3b5eb3613d2a..c747e1e98956 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/back/DefaultCrossActivityBackAnimation.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/back/DefaultCrossActivityBackAnimation.kt
@@ -16,18 +16,15 @@
package com.android.wm.shell.back
import android.content.Context
-import android.view.Choreographer
import android.view.SurfaceControl
import android.window.BackEvent
import com.android.wm.shell.R
import com.android.wm.shell.RootTaskDisplayAreaOrganizer
import com.android.wm.shell.animation.Interpolators
-import com.android.wm.shell.shared.annotations.ShellMainThread
import javax.inject.Inject
import kotlin.math.max
/** Class that defines cross-activity animation. */
-@ShellMainThread
class DefaultCrossActivityBackAnimation
@Inject
constructor(
@@ -39,8 +36,7 @@ constructor(
context,
background,
rootTaskDisplayAreaOrganizer,
- SurfaceControl.Transaction(),
- Choreographer.getInstance()
+ SurfaceControl.Transaction()
) {
private val postCommitInterpolator = Interpolators.EMPHASIZED
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 e36f6e6c04c5..fca8a625811c 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
@@ -1230,10 +1230,14 @@ public class BubbleController implements ConfigurationChangeListener,
* A bubble was dragged and is released in dismiss target in Launcher.
*
* @param bubbleKey key of the bubble being dragged to dismiss target
+ * @param timestamp the timestamp of the removal
*/
- public void dragBubbleToDismiss(String bubbleKey) {
+ public void dragBubbleToDismiss(String bubbleKey, long timestamp) {
String selectedBubbleKey = mBubbleData.getSelectedBubbleKey();
- removeBubble(bubbleKey, Bubbles.DISMISS_USER_GESTURE);
+ if (mBubbleData.hasAnyBubbleWithKey(bubbleKey)) {
+ mBubbleData.dismissBubbleWithKey(
+ bubbleKey, Bubbles.DISMISS_USER_GESTURE_FROM_LAUNCHER, timestamp);
+ }
if (selectedBubbleKey != null && !selectedBubbleKey.equals(bubbleKey)) {
// We did not remove the selected bubble. Expand it again
mBubbleBarViewCallback.expansionChanged(/* isExpanded = */ true);
@@ -2458,8 +2462,8 @@ public class BubbleController implements ConfigurationChangeListener,
}
@Override
- public void dragBubbleToDismiss(String key) {
- mMainExecutor.execute(() -> mController.dragBubbleToDismiss(key));
+ public void dragBubbleToDismiss(String key, long timestamp) {
+ mMainExecutor.execute(() -> mController.dragBubbleToDismiss(key, timestamp));
}
@Override
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleData.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleData.java
index 4e6c517b9194..434b512a585c 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleData.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleData.java
@@ -150,8 +150,11 @@ public class BubbleData {
: null;
for (int i = 0; i < removedBubbles.size(); i++) {
Pair<Bubble, Integer> pair = removedBubbles.get(i);
- bubbleBarUpdate.removedBubbles.add(
- new RemovedBubble(pair.first.getKey(), pair.second));
+ // if the removal happened in launcher, don't send it back
+ if (pair.second != Bubbles.DISMISS_USER_GESTURE_FROM_LAUNCHER) {
+ bubbleBarUpdate.removedBubbles.add(
+ new RemovedBubble(pair.first.getKey(), pair.second));
+ }
}
if (orderChanged) {
// Include the new order
@@ -502,12 +505,34 @@ public class BubbleData {
dispatchPendingChanges();
}
+ /** Dismisses the bubble with the matching key, if it exists. */
+ public void dismissBubbleWithKey(String key, @DismissReason int reason) {
+ dismissBubbleWithKey(key, reason, mTimeSource.currentTimeMillis());
+ }
+
/**
* Dismisses the bubble with the matching key, if it exists.
+ *
+ * <p>This is used when the bubble was dismissed in launcher, where the {@code removalTimestamp}
+ * represents when the removal happened and can be used to check whether or not the bubble has
+ * been updated after the removal. If no updates, it's safe to remove the bubble, otherwise the
+ * removal is ignored.
*/
- public void dismissBubbleWithKey(String key, @DismissReason int reason) {
- doRemove(key, reason);
- dispatchPendingChanges();
+ public void dismissBubbleWithKey(String key, @DismissReason int reason, long removalTimestamp) {
+ boolean shouldRemove = true;
+ // if the bubble was removed from launcher, verify that the removal happened after the last
+ // time it was updated
+ if (reason == Bubbles.DISMISS_USER_GESTURE_FROM_LAUNCHER) {
+ // if the bubble was removed from launcher it must be active.
+ Bubble bubble = getBubbleInStackWithKey(key);
+ if (bubble != null && bubble.getLastActivity() > removalTimestamp) {
+ shouldRemove = false;
+ }
+ }
+ if (shouldRemove) {
+ doRemove(key, reason);
+ dispatchPendingChanges();
+ }
}
/**
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleExpandedView.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleExpandedView.java
index f7a5c271a729..d4d9d003bc0d 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleExpandedView.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleExpandedView.java
@@ -16,7 +16,7 @@
package com.android.wm.shell.bubbles;
-import static android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED;
+import static android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS;
import static android.app.ActivityTaskManager.INVALID_TASK_ID;
import static android.content.Intent.FLAG_ACTIVITY_MULTIPLE_TASK;
import static android.content.Intent.FLAG_ACTIVITY_NEW_DOCUMENT;
@@ -225,8 +225,7 @@ public class BubbleExpandedView extends LinearLayout {
options.setTaskAlwaysOnTop(true);
options.setLaunchedFromBubble(true);
options.setPendingIntentBackgroundActivityStartMode(
- MODE_BACKGROUND_ACTIVITY_START_ALLOWED);
- options.setPendingIntentBackgroundActivityLaunchAllowedByPermission(true);
+ MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS);
Intent fillInIntent = new Intent();
// Apply flags to make behaviour match documentLaunchMode=always.
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleTaskViewHelper.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleTaskViewHelper.java
index c79d9c4942bf..5e2141aa639e 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleTaskViewHelper.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleTaskViewHelper.java
@@ -15,7 +15,7 @@
*/
package com.android.wm.shell.bubbles;
-import static android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED;
+import static android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS;
import static android.app.ActivityTaskManager.INVALID_TASK_ID;
import static android.content.Intent.FLAG_ACTIVITY_MULTIPLE_TASK;
import static android.content.Intent.FLAG_ACTIVITY_NEW_DOCUMENT;
@@ -103,8 +103,7 @@ public class BubbleTaskViewHelper {
options.setTaskAlwaysOnTop(true);
options.setLaunchedFromBubble(true);
options.setPendingIntentBackgroundActivityStartMode(
- MODE_BACKGROUND_ACTIVITY_START_ALLOWED);
- options.setPendingIntentBackgroundActivityLaunchAllowedByPermission(true);
+ MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS);
Intent fillInIntent = new Intent();
// Apply flags to make behaviour match documentLaunchMode=always.
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/Bubbles.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/Bubbles.java
index 82af88d03b19..589dfd24624e 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/Bubbles.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/Bubbles.java
@@ -62,7 +62,7 @@ public interface Bubbles {
DISMISS_USER_CHANGED, DISMISS_GROUP_CANCELLED, DISMISS_INVALID_INTENT,
DISMISS_OVERFLOW_MAX_REACHED, DISMISS_SHORTCUT_REMOVED, DISMISS_PACKAGE_REMOVED,
DISMISS_NO_BUBBLE_UP, DISMISS_RELOAD_FROM_DISK, DISMISS_USER_ACCOUNT_REMOVED,
- DISMISS_SWITCH_TO_STACK})
+ DISMISS_SWITCH_TO_STACK, DISMISS_USER_GESTURE_FROM_LAUNCHER})
@Target({FIELD, LOCAL_VARIABLE, PARAMETER})
@interface DismissReason {
}
@@ -84,6 +84,7 @@ public interface Bubbles {
int DISMISS_RELOAD_FROM_DISK = 15;
int DISMISS_USER_ACCOUNT_REMOVED = 16;
int DISMISS_SWITCH_TO_STACK = 17;
+ int DISMISS_USER_GESTURE_FROM_LAUNCHER = 18;
/** Returns a binder that can be passed to an external process to manipulate Bubbles. */
default IBubbles createExternalInterface() {
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/IBubbles.aidl b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/IBubbles.aidl
index 1db556c04180..0907ddd1de83 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/IBubbles.aidl
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/IBubbles.aidl
@@ -33,7 +33,7 @@ interface IBubbles {
oneway void showBubble(in String key, in int topOnScreen) = 3;
- oneway void dragBubbleToDismiss(in String key) = 4;
+ oneway void dragBubbleToDismiss(in String key, in long timestamp) = 4;
oneway void removeAllBubbles() = 5;
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/shortcut/CreateBubbleShortcutActivity.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/shortcut/CreateBubbleShortcutActivity.kt
index a124f95d7431..c93c11eb2fc2 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/shortcut/CreateBubbleShortcutActivity.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/shortcut/CreateBubbleShortcutActivity.kt
@@ -20,10 +20,10 @@ import android.app.Activity
import android.content.pm.ShortcutManager
import android.graphics.drawable.Icon
import android.os.Bundle
+import com.android.internal.protolog.ProtoLog
import com.android.wm.shell.Flags
import com.android.wm.shell.R
import com.android.wm.shell.protolog.ShellProtoLogGroup.WM_SHELL_BUBBLES
-import com.android.wm.shell.util.KtProtoLog
/** Activity to create a shortcut to open bubbles */
class CreateBubbleShortcutActivity : Activity() {
@@ -31,7 +31,7 @@ class CreateBubbleShortcutActivity : Activity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
if (Flags.enableRetrievableBubbles()) {
- KtProtoLog.d(WM_SHELL_BUBBLES, "Creating a shortcut for bubbles")
+ ProtoLog.d(WM_SHELL_BUBBLES, "Creating a shortcut for bubbles")
createShortcut()
}
finish()
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/shortcut/ShowBubblesActivity.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/shortcut/ShowBubblesActivity.kt
index ae7940ca1b65..e578e9e76979 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/shortcut/ShowBubblesActivity.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/shortcut/ShowBubblesActivity.kt
@@ -21,9 +21,9 @@ import android.content.ComponentName
import android.content.Context
import android.content.Intent
import android.os.Bundle
+import com.android.internal.protolog.ProtoLog
import com.android.wm.shell.Flags
import com.android.wm.shell.protolog.ShellProtoLogGroup.WM_SHELL_BUBBLES
-import com.android.wm.shell.util.KtProtoLog
/** Activity that sends a broadcast to open bubbles */
class ShowBubblesActivity : Activity() {
@@ -37,7 +37,7 @@ class ShowBubblesActivity : Activity() {
// Set the package as the receiver is not exported
`package` = packageName
}
- KtProtoLog.v(WM_SHELL_BUBBLES, "Sending broadcast to show bubbles")
+ ProtoLog.v(WM_SHELL_BUBBLES, "Sending broadcast to show bubbles")
sendBroadcast(intent)
}
finish()
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/common/HandlerExecutor.java b/libs/WindowManager/Shell/src/com/android/wm/shell/common/HandlerExecutor.java
index bfee820870f1..736d954513b1 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/common/HandlerExecutor.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/HandlerExecutor.java
@@ -54,4 +54,11 @@ public class HandlerExecutor implements ShellExecutor {
public boolean hasCallback(Runnable r) {
return mHandler.hasCallbacks(r);
}
+
+ @Override
+ public void assertCurrentThread() {
+ if (!mHandler.getLooper().isCurrentThread()) {
+ throw new IllegalStateException("must be called on " + mHandler);
+ }
+ }
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/common/LaunchAdjacentController.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/common/LaunchAdjacentController.kt
index 81592c35e4ac..e92b0b59d2ef 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/common/LaunchAdjacentController.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/LaunchAdjacentController.kt
@@ -17,8 +17,8 @@ package com.android.wm.shell.common
import android.window.WindowContainerToken
import android.window.WindowContainerTransaction
+import com.android.internal.protolog.ProtoLog
import com.android.wm.shell.protolog.ShellProtoLogGroup.WM_SHELL_TASK_ORG
-import com.android.wm.shell.util.KtProtoLog
/**
* Controller to manage behavior of activities launched with
@@ -30,7 +30,7 @@ class LaunchAdjacentController(private val syncQueue: SyncTransactionQueue) {
var launchAdjacentEnabled: Boolean = true
set(value) {
if (field != value) {
- KtProtoLog.d(WM_SHELL_TASK_ORG, "set launch adjacent flag root enabled=%b", value)
+ ProtoLog.d(WM_SHELL_TASK_ORG, "set launch adjacent flag root enabled=%b", value)
field = value
container?.let { c ->
if (value) {
@@ -52,7 +52,7 @@ class LaunchAdjacentController(private val syncQueue: SyncTransactionQueue) {
* @see WindowContainerTransaction.setLaunchAdjacentFlagRoot
*/
fun setLaunchAdjacentRoot(container: WindowContainerToken) {
- KtProtoLog.d(WM_SHELL_TASK_ORG, "set new launch adjacent flag root container")
+ ProtoLog.d(WM_SHELL_TASK_ORG, "set new launch adjacent flag root container")
this.container = container
if (launchAdjacentEnabled) {
enableContainer(container)
@@ -67,7 +67,7 @@ class LaunchAdjacentController(private val syncQueue: SyncTransactionQueue) {
* @see WindowContainerTransaction.clearLaunchAdjacentFlagRoot
*/
fun clearLaunchAdjacentRoot() {
- KtProtoLog.d(WM_SHELL_TASK_ORG, "clear launch adjacent flag root container")
+ ProtoLog.d(WM_SHELL_TASK_ORG, "clear launch adjacent flag root container")
container?.let {
disableContainer(it)
container = null
@@ -75,14 +75,14 @@ class LaunchAdjacentController(private val syncQueue: SyncTransactionQueue) {
}
private fun enableContainer(container: WindowContainerToken) {
- KtProtoLog.v(WM_SHELL_TASK_ORG, "enable launch adjacent flag root container")
+ ProtoLog.v(WM_SHELL_TASK_ORG, "enable launch adjacent flag root container")
val wct = WindowContainerTransaction()
wct.setLaunchAdjacentFlagRoot(container)
syncQueue.queue(wct)
}
private fun disableContainer(container: WindowContainerToken) {
- KtProtoLog.v(WM_SHELL_TASK_ORG, "disable launch adjacent flag root container")
+ ProtoLog.v(WM_SHELL_TASK_ORG, "disable launch adjacent flag root container")
val wct = WindowContainerTransaction()
wct.clearLaunchAdjacentFlagRoot(container)
syncQueue.queue(wct)
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/common/MultiInstanceHelper.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/common/MultiInstanceHelper.kt
index 9e8dfb5f0c6f..a6be64070ac1 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/common/MultiInstanceHelper.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/MultiInstanceHelper.kt
@@ -23,9 +23,9 @@ import android.content.pm.PackageManager
import android.os.UserHandle
import android.view.WindowManager.PROPERTY_SUPPORTS_MULTI_INSTANCE_SYSTEM_UI
import com.android.internal.annotations.VisibleForTesting
+import com.android.internal.protolog.ProtoLog
import com.android.wm.shell.R
import com.android.wm.shell.protolog.ShellProtoLogGroup.WM_SHELL
-import com.android.wm.shell.util.KtProtoLog
import java.util.Arrays
/**
@@ -52,7 +52,7 @@ class MultiInstanceHelper @JvmOverloads constructor(
val packageName = componentName.packageName
for (pkg in staticAppsSupportingMultiInstance) {
if (pkg == packageName) {
- KtProtoLog.v(WM_SHELL, "application=%s in allowlist supports multi-instance",
+ ProtoLog.v(WM_SHELL, "application=%s in allowlist supports multi-instance",
packageName)
return true
}
@@ -70,10 +70,10 @@ class MultiInstanceHelper @JvmOverloads constructor(
// If the above call doesn't throw a NameNotFoundException, then the activity property
// should override the application property value
if (activityProp.isBoolean) {
- KtProtoLog.v(WM_SHELL, "activity=%s supports multi-instance", componentName)
+ ProtoLog.v(WM_SHELL, "activity=%s supports multi-instance", componentName)
return activityProp.boolean
} else {
- KtProtoLog.w(WM_SHELL, "Warning: property=%s for activity=%s has non-bool type=%d",
+ ProtoLog.w(WM_SHELL, "Warning: property=%s for activity=%s has non-bool type=%d",
PROPERTY_SUPPORTS_MULTI_INSTANCE_SYSTEM_UI, packageName, activityProp.type)
}
} catch (nnfe: PackageManager.NameNotFoundException) {
@@ -85,10 +85,10 @@ class MultiInstanceHelper @JvmOverloads constructor(
val appProp = packageManager.getProperty(
PROPERTY_SUPPORTS_MULTI_INSTANCE_SYSTEM_UI, packageName)
if (appProp.isBoolean) {
- KtProtoLog.v(WM_SHELL, "application=%s supports multi-instance", packageName)
+ ProtoLog.v(WM_SHELL, "application=%s supports multi-instance", packageName)
return appProp.boolean
} else {
- KtProtoLog.w(WM_SHELL,
+ ProtoLog.w(WM_SHELL,
"Warning: property=%s for application=%s has non-bool type=%d",
PROPERTY_SUPPORTS_MULTI_INSTANCE_SYSTEM_UI, packageName, appProp.type)
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/common/ShellExecutor.java b/libs/WindowManager/Shell/src/com/android/wm/shell/common/ShellExecutor.java
index f729164ed303..2c2961fd4b65 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/common/ShellExecutor.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/ShellExecutor.java
@@ -96,4 +96,11 @@ public interface ShellExecutor extends Executor {
* See {@link android.os.Handler#hasCallbacks(Runnable)}.
*/
boolean hasCallback(Runnable runnable);
+
+ /**
+ * May throw if the caller is not on the same thread as the executor.
+ */
+ default void assertCurrentThread() {
+ return;
+ }
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/common/pip/PipBoundsState.java b/libs/WindowManager/Shell/src/com/android/wm/shell/common/pip/PipBoundsState.java
index 64a1b0c804da..140d7765e5c1 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/common/pip/PipBoundsState.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/pip/PipBoundsState.java
@@ -30,6 +30,7 @@ import android.graphics.Rect;
import android.os.RemoteException;
import android.util.ArraySet;
import android.util.Size;
+import android.util.SparseArray;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.protolog.ProtoLog;
@@ -42,9 +43,7 @@ import java.io.PrintWriter;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;
-import java.util.HashMap;
import java.util.List;
-import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.function.Consumer;
@@ -69,26 +68,36 @@ public class PipBoundsState {
@Retention(RetentionPolicy.SOURCE)
public @interface StashType {}
+ public static final int NAMED_KCA_LAUNCHER_SHELF = 0;
+ public static final int NAMED_KCA_TABLETOP_MODE = 1;
+
+ @IntDef(prefix = { "NAMED_KCA_" }, value = {
+ NAMED_KCA_LAUNCHER_SHELF,
+ NAMED_KCA_TABLETOP_MODE
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface NamedKca {}
+
private static final String TAG = PipBoundsState.class.getSimpleName();
- private final @NonNull Rect mBounds = new Rect();
- private final @NonNull Rect mMovementBounds = new Rect();
- private final @NonNull Rect mNormalBounds = new Rect();
- private final @NonNull Rect mExpandedBounds = new Rect();
- private final @NonNull Rect mNormalMovementBounds = new Rect();
- private final @NonNull Rect mExpandedMovementBounds = new Rect();
- private final @NonNull PipDisplayLayoutState mPipDisplayLayoutState;
+ @NonNull private final Rect mBounds = new Rect();
+ @NonNull private final Rect mMovementBounds = new Rect();
+ @NonNull private final Rect mNormalBounds = new Rect();
+ @NonNull private final Rect mExpandedBounds = new Rect();
+ @NonNull private final Rect mNormalMovementBounds = new Rect();
+ @NonNull private final Rect mExpandedMovementBounds = new Rect();
+ @NonNull private final PipDisplayLayoutState mPipDisplayLayoutState;
private final Point mMaxSize = new Point();
private final Point mMinSize = new Point();
- private final @NonNull Context mContext;
+ @NonNull private final Context mContext;
private float mAspectRatio;
private int mStashedState = STASH_TYPE_NONE;
private int mStashOffset;
- private @Nullable PipReentryState mPipReentryState;
+ @Nullable private PipReentryState mPipReentryState;
private final LauncherState mLauncherState = new LauncherState();
- private final @NonNull SizeSpecSource mSizeSpecSource;
- private @Nullable ComponentName mLastPipComponentName;
- private final @NonNull MotionBoundsState mMotionBoundsState = new MotionBoundsState();
+ @NonNull private final SizeSpecSource mSizeSpecSource;
+ @Nullable private ComponentName mLastPipComponentName;
+ @NonNull private final MotionBoundsState mMotionBoundsState = new MotionBoundsState();
private boolean mIsImeShowing;
private int mImeHeight;
private boolean mIsShelfShowing;
@@ -120,12 +129,18 @@ public class PipBoundsState {
* as unrestricted keep clear area. Values in this map would be appended to
* {@link #getUnrestrictedKeepClearAreas()} and this is meant for internal usage only.
*/
- private final Map<String, Rect> mNamedUnrestrictedKeepClearAreas = new HashMap<>();
+ private final SparseArray<Rect> mNamedUnrestrictedKeepClearAreas = new SparseArray<>();
- private @Nullable Runnable mOnMinimalSizeChangeCallback;
- private @Nullable TriConsumer<Boolean, Integer, Boolean> mOnShelfVisibilityChangeCallback;
- private List<Consumer<Rect>> mOnPipExclusionBoundsChangeCallbacks = new ArrayList<>();
- private List<Consumer<Float>> mOnAspectRatioChangedCallbacks = new ArrayList<>();
+ @Nullable private Runnable mOnMinimalSizeChangeCallback;
+ @Nullable private TriConsumer<Boolean, Integer, Boolean> mOnShelfVisibilityChangeCallback;
+ private final List<Consumer<Rect>> mOnPipExclusionBoundsChangeCallbacks = new ArrayList<>();
+ private final List<Consumer<Float>> mOnAspectRatioChangedCallbacks = new ArrayList<>();
+
+ /**
+ * This is used to set the launcher shelf height ahead of non-auto-enter-pip animation,
+ * to avoid the race condition. See also {@link #NAMED_KCA_LAUNCHER_SHELF}.
+ */
+ public final Rect mCachedLauncherShelfHeightKeepClearArea = new Rect();
// the size of the current bounds relative to the max size spec
private float mBoundsScale;
@@ -430,17 +445,32 @@ public class PipBoundsState {
mUnrestrictedKeepClearAreas.addAll(unrestrictedAreas);
}
- /** Add a named unrestricted keep clear area. */
- public void addNamedUnrestrictedKeepClearArea(@NonNull String name, Rect unrestrictedArea) {
- mNamedUnrestrictedKeepClearAreas.put(name, unrestrictedArea);
+ /** Set a named unrestricted keep clear area. */
+ public void setNamedUnrestrictedKeepClearArea(
+ @NamedKca int tag, @Nullable Rect unrestrictedArea) {
+ if (unrestrictedArea == null) {
+ mNamedUnrestrictedKeepClearAreas.remove(tag);
+ } else {
+ mNamedUnrestrictedKeepClearAreas.put(tag, unrestrictedArea);
+ if (tag == NAMED_KCA_LAUNCHER_SHELF) {
+ mCachedLauncherShelfHeightKeepClearArea.set(unrestrictedArea);
+ }
+ }
}
- /** Remove a named unrestricted keep clear area. */
- public void removeNamedUnrestrictedKeepClearArea(@NonNull String name) {
- mNamedUnrestrictedKeepClearAreas.remove(name);
+ /**
+ * Forcefully set the keep-clear-area for launcher shelf height if applicable.
+ * This is used for entering PiP in button navigation mode to make sure the destination bounds
+ * calculation includes the shelf height, to avoid race conditions that such callback is sent
+ * from Launcher after the entering animation is started.
+ */
+ public void mayUseCachedLauncherShelfHeight() {
+ if (!mCachedLauncherShelfHeightKeepClearArea.isEmpty()) {
+ setNamedUnrestrictedKeepClearArea(
+ NAMED_KCA_LAUNCHER_SHELF, mCachedLauncherShelfHeightKeepClearArea);
+ }
}
-
/**
* @return restricted keep clear areas.
*/
@@ -454,9 +484,12 @@ public class PipBoundsState {
*/
@NonNull
public Set<Rect> getUnrestrictedKeepClearAreas() {
- if (mNamedUnrestrictedKeepClearAreas.isEmpty()) return mUnrestrictedKeepClearAreas;
+ if (mNamedUnrestrictedKeepClearAreas.size() == 0) return mUnrestrictedKeepClearAreas;
final Set<Rect> unrestrictedAreas = new ArraySet<>(mUnrestrictedKeepClearAreas);
- unrestrictedAreas.addAll(mNamedUnrestrictedKeepClearAreas.values());
+ for (int i = 0; i < mNamedUnrestrictedKeepClearAreas.size(); i++) {
+ final int key = mNamedUnrestrictedKeepClearAreas.keyAt(i);
+ unrestrictedAreas.add(mNamedUnrestrictedKeepClearAreas.get(key));
+ }
return unrestrictedAreas;
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/DividerView.java b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/DividerView.java
index 3ad60e7031e5..1bc179551825 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/DividerView.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/DividerView.java
@@ -492,6 +492,11 @@ public class DividerView extends FrameLayout implements View.OnTouchListener {
return mHideHandle;
}
+ /** Returns true if the divider is currently being physically controlled by the user. */
+ boolean isMoving() {
+ return mMoving;
+ }
+
private class DoubleTapListener extends GestureDetector.SimpleOnGestureListener {
@Override
public boolean onDoubleTap(MotionEvent e) {
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java
index bdef4f4b094c..51f9de8305f8 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java
@@ -652,9 +652,18 @@ public final class SplitLayout implements DisplayInsetsController.OnInsetsChange
.ofInt(from, to)
.setDuration(duration);
mDividerFlingAnimator.setInterpolator(Interpolators.FAST_OUT_SLOW_IN);
+
+ // If the divider is being physically controlled by the user, we use a cool parallax effect
+ // on the task windows. So if this "snap" animation is an extension of a user-controlled
+ // movement, we pass in true here to continue the parallax effect smoothly.
+ boolean isBeingMovedByUser = mSplitWindowManager.getDividerView() != null
+ && mSplitWindowManager.getDividerView().isMoving();
+
mDividerFlingAnimator.addUpdateListener(
animation -> updateDividerBounds(
- (int) animation.getAnimatedValue(), false /* shouldUseParallaxEffect */)
+ (int) animation.getAnimatedValue(),
+ isBeingMovedByUser /* shouldUseParallaxEffect */
+ )
);
mDividerFlingAnimator.addListener(new AnimatorListenerAdapter() {
@Override
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitWindowManager.java b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitWindowManager.java
index 5d121c23c6e1..46c1a43f9efe 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitWindowManager.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitWindowManager.java
@@ -37,7 +37,6 @@ import android.view.LayoutInflater;
import android.view.SurfaceControl;
import android.view.SurfaceControlViewHost;
import android.view.SurfaceSession;
-import android.view.View;
import android.view.WindowManager;
import android.view.WindowlessWindowManager;
@@ -192,7 +191,7 @@ public final class SplitWindowManager extends WindowlessWindowManager {
mDividerView.setInteractive(interactive, hideHandle, from);
}
- View getDividerView() {
+ DividerView getDividerView() {
return mDividerView;
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/api/CompatUIRepository.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/api/CompatUIRepository.kt
new file mode 100644
index 000000000000..cb54d89a5714
--- /dev/null
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/api/CompatUIRepository.kt
@@ -0,0 +1,39 @@
+/*
+ * 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.compatui.api
+
+/**
+ * Abstraction for the repository of all the available CompatUISpec
+ */
+interface CompatUIRepository {
+ /**
+ * Adds a {@link CompatUISpec} to the repository
+ * @throws IllegalStateException in case of illegal spec
+ */
+ fun addSpec(spec: CompatUISpec)
+
+ /**
+ * Iterates on the list of available {@link CompatUISpec} invoking
+ * fn for each of them.
+ */
+ fun iterateOn(fn: (CompatUISpec) -> Unit)
+
+ /**
+ * Returns the {@link CompatUISpec} for a given key
+ */
+ fun findSpec(name: String): CompatUISpec?
+} \ No newline at end of file
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/api/CompatUISpec.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/api/CompatUISpec.kt
new file mode 100644
index 000000000000..24c2c8c2aedf
--- /dev/null
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/api/CompatUISpec.kt
@@ -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 com.android.wm.shell.compatui.api
+
+/**
+ * Describes each compat ui component to the framework.
+ */
+data class CompatUISpec(
+ // Unique name for the component. It's used for debug and for generating the
+ // unique component identifier in the system.
+ val name: String
+) \ No newline at end of file
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/impl/DefaultCompatUIHandler.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/impl/DefaultCompatUIHandler.kt
index a181eafada7d..8408ea6ebc31 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/impl/DefaultCompatUIHandler.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/impl/DefaultCompatUIHandler.kt
@@ -19,12 +19,15 @@ package com.android.wm.shell.compatui.impl
import com.android.wm.shell.compatui.api.CompatUIEvent
import com.android.wm.shell.compatui.api.CompatUIHandler
import com.android.wm.shell.compatui.api.CompatUIInfo
+import com.android.wm.shell.compatui.api.CompatUIRepository
import java.util.function.Consumer
/**
* Default implementation of {@link CompatUIHandler} to handle CompatUI components
*/
-class DefaultCompatUIHandler : CompatUIHandler {
+class DefaultCompatUIHandler(
+ private val compatUIRepository: CompatUIRepository
+) : CompatUIHandler {
private var compatUIEventSender: Consumer<CompatUIEvent>? = null
override fun onCompatInfoChanged(compatUIInfo: CompatUIInfo) {
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/impl/DefaultCompatUIRepository.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/impl/DefaultCompatUIRepository.kt
new file mode 100644
index 000000000000..10d9425c85ea
--- /dev/null
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/compatui/impl/DefaultCompatUIRepository.kt
@@ -0,0 +1,41 @@
+/*
+ * 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.compatui.impl
+
+import com.android.wm.shell.compatui.api.CompatUIRepository
+import com.android.wm.shell.compatui.api.CompatUISpec
+
+/**
+ * Default {@link CompatUIRepository} implementation
+ */
+class DefaultCompatUIRepository : CompatUIRepository {
+
+ private val allSpecs = mutableMapOf<String, CompatUISpec>()
+
+ override fun addSpec(spec: CompatUISpec) {
+ if (allSpecs[spec.name] != null) {
+ throw IllegalStateException("Spec with id:${spec.name} already present")
+ }
+ allSpecs[spec.name] = spec
+ }
+
+ override fun iterateOn(fn: (CompatUISpec) -> Unit) =
+ allSpecs.values.forEach(fn)
+
+ override fun findSpec(name: String): CompatUISpec? =
+ allSpecs[name]
+} \ No newline at end of file
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellBaseModule.java b/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellBaseModule.java
index 9bdc0b2b55b4..4b548cbe77cc 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellBaseModule.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellBaseModule.java
@@ -72,7 +72,9 @@ import com.android.wm.shell.compatui.CompatUIConfiguration;
import com.android.wm.shell.compatui.CompatUIController;
import com.android.wm.shell.compatui.CompatUIShellCommandHandler;
import com.android.wm.shell.compatui.api.CompatUIHandler;
+import com.android.wm.shell.compatui.api.CompatUIRepository;
import com.android.wm.shell.compatui.impl.DefaultCompatUIHandler;
+import com.android.wm.shell.compatui.impl.DefaultCompatUIRepository;
import com.android.wm.shell.desktopmode.DesktopMode;
import com.android.wm.shell.desktopmode.DesktopModeTaskRepository;
import com.android.wm.shell.desktopmode.DesktopTasksController;
@@ -245,12 +247,13 @@ public abstract class WMShellBaseModule {
Lazy<DockStateReader> dockStateReader,
Lazy<CompatUIConfiguration> compatUIConfiguration,
Lazy<CompatUIShellCommandHandler> compatUIShellCommandHandler,
- Lazy<AccessibilityManager> accessibilityManager) {
+ Lazy<AccessibilityManager> accessibilityManager,
+ CompatUIRepository compatUIRepository) {
if (!context.getResources().getBoolean(R.bool.config_enableCompatUIController)) {
return Optional.empty();
}
if (Flags.appCompatUiFramework()) {
- return Optional.of(new DefaultCompatUIHandler());
+ return Optional.of(new DefaultCompatUIHandler(compatUIRepository));
}
return Optional.of(
new CompatUIController(
@@ -271,6 +274,12 @@ public abstract class WMShellBaseModule {
@WMSingleton
@Provides
+ static CompatUIRepository provideCompatUIRepository() {
+ return new DefaultCompatUIRepository();
+ }
+
+ @WMSingleton
+ @Provides
static SyncTransactionQueue provideSyncTransactionQueue(TransactionPool pool,
@ShellMainThread ShellExecutor mainExecutor) {
return new SyncTransactionQueue(pool, mainExecutor);
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 aa499d9ee8a0..700742acfb43 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
@@ -211,6 +211,7 @@ public abstract class WMShellModule {
@ShellMainThread ShellExecutor mainExecutor,
@ShellMainThread Handler mainHandler,
@ShellMainThread Choreographer mainChoreographer,
+ @ShellBackgroundThread ShellExecutor bgExecutor,
ShellInit shellInit,
IWindowManager windowManager,
ShellCommandHandler shellCommandHandler,
@@ -229,6 +230,7 @@ public abstract class WMShellModule {
mainExecutor,
mainHandler,
mainChoreographer,
+ bgExecutor,
shellInit,
shellCommandHandler,
windowManager,
@@ -245,7 +247,11 @@ public abstract class WMShellModule {
return new CaptionWindowDecorViewModel(
context,
mainHandler,
+ mainExecutor,
+ bgExecutor,
mainChoreographer,
+ windowManager,
+ shellInit,
taskOrganizer,
displayController,
rootTaskDisplayAreaOrganizer,
@@ -363,13 +369,14 @@ public abstract class WMShellModule {
Optional<WindowDecorViewModel> windowDecorViewModel,
Optional<DesktopTasksController> desktopTasksController,
MultiInstanceHelper multiInstanceHelper,
- @ShellMainThread ShellExecutor mainExecutor) {
+ @ShellMainThread ShellExecutor mainExecutor,
+ @ShellMainThread Handler mainHandler) {
return new SplitScreenController(context, shellInit, shellCommandHandler, shellController,
shellTaskOrganizer, syncQueue, rootTaskDisplayAreaOrganizer, displayController,
displayImeController, displayInsetsController, dragAndDropController, transitions,
transactionPool, iconProvider, recentTasks, launchAdjacentController,
windowDecorViewModel, desktopTasksController, null /* stageCoordinator */,
- multiInstanceHelper, mainExecutor);
+ multiInstanceHelper, mainExecutor, mainHandler);
}
//
@@ -527,7 +534,8 @@ public abstract class WMShellModule {
MultiInstanceHelper multiInstanceHelper,
@ShellMainThread ShellExecutor mainExecutor,
Optional<DesktopTasksLimiter> desktopTasksLimiter,
- Optional<RecentTasksController> recentTasksController) {
+ Optional<RecentTasksController> recentTasksController,
+ InteractionJankMonitor interactionJankMonitor) {
return new DesktopTasksController(context, shellInit, shellCommandHandler, shellController,
displayController, shellTaskOrganizer, syncQueue, rootTaskDisplayAreaOrganizer,
dragAndDropController, transitions, keyguardManager, enterDesktopTransitionHandler,
@@ -535,7 +543,8 @@ public abstract class WMShellModule {
dragToDesktopTransitionHandler, desktopModeTaskRepository,
desktopModeLoggerTransitionObserver, launchAdjacentController,
recentsTransitionHandler, multiInstanceHelper,
- mainExecutor, desktopTasksLimiter, recentTasksController.orElse(null));
+ mainExecutor, desktopTasksLimiter, recentTasksController.orElse(null),
+ interactionJankMonitor);
}
@WMSingleton
@@ -561,17 +570,19 @@ public abstract class WMShellModule {
Context context,
Transitions transitions,
RootTaskDisplayAreaOrganizer rootTaskDisplayAreaOrganizer,
- Optional<DesktopTasksLimiter> desktopTasksLimiter) {
+ Optional<DesktopTasksLimiter> desktopTasksLimiter,
+ InteractionJankMonitor interactionJankMonitor) {
return new DragToDesktopTransitionHandler(context, transitions,
- rootTaskDisplayAreaOrganizer);
+ rootTaskDisplayAreaOrganizer, interactionJankMonitor);
}
@WMSingleton
@Provides
static EnterDesktopTaskTransitionHandler provideEnterDesktopModeTaskTransitionHandler(
Transitions transitions,
- Optional<DesktopTasksLimiter> desktopTasksLimiter) {
- return new EnterDesktopTaskTransitionHandler(transitions);
+ Optional<DesktopTasksLimiter> desktopTasksLimiter,
+ InteractionJankMonitor interactionJankMonitor) {
+ return new EnterDesktopTaskTransitionHandler(transitions, interactionJankMonitor);
}
@WMSingleton
@@ -604,11 +615,12 @@ public abstract class WMShellModule {
Context context,
Optional<DesktopModeTaskRepository> desktopModeTaskRepository,
Transitions transitions,
+ ShellTaskOrganizer shellTaskOrganizer,
ShellInit shellInit
) {
return desktopModeTaskRepository.flatMap(repository ->
Optional.of(new DesktopTasksTransitionObserver(
- context, repository, transitions, shellInit))
+ context, repository, transitions, shellTaskOrganizer, shellInit))
);
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/pip/Pip1Module.java b/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/pip/Pip1Module.java
index 240cf3b96e89..037fbb235bd4 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/pip/Pip1Module.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/pip/Pip1Module.java
@@ -38,12 +38,10 @@ import com.android.wm.shell.common.pip.PipMediaController;
import com.android.wm.shell.common.pip.PipPerfHintController;
import com.android.wm.shell.common.pip.PipSnapAlgorithm;
import com.android.wm.shell.common.pip.PipUiEventLogger;
-import com.android.wm.shell.common.pip.PipUtils;
import com.android.wm.shell.common.pip.SizeSpecSource;
import com.android.wm.shell.dagger.WMShellBaseModule;
import com.android.wm.shell.dagger.WMSingleton;
import com.android.wm.shell.onehanded.OneHandedController;
-import com.android.wm.shell.pip.Pip;
import com.android.wm.shell.pip.PipAnimationController;
import com.android.wm.shell.pip.PipParamsChangedForwarder;
import com.android.wm.shell.pip.PipSurfaceTransactionHelper;
@@ -79,7 +77,7 @@ import java.util.Optional;
public abstract class Pip1Module {
@WMSingleton
@Provides
- static Optional<Pip> providePip1(Context context,
+ static Optional<PipController.PipImpl> providePip1(Context context,
ShellInit shellInit,
ShellCommandHandler shellCommandHandler,
ShellController shellController,
@@ -104,20 +102,16 @@ public abstract class Pip1Module {
TabletopModeController pipTabletopController,
Optional<OneHandedController> oneHandedController,
@ShellMainThread ShellExecutor mainExecutor) {
- if (PipUtils.isPip2ExperimentEnabled()) {
- return Optional.empty();
- } else {
- return Optional.ofNullable(PipController.create(
- context, shellInit, shellCommandHandler, shellController,
- displayController, pipAnimationController, pipAppOpsListener,
- pipBoundsAlgorithm,
- pipKeepClearAlgorithm, pipBoundsState, pipDisplayLayoutState,
- pipMotionHelper, pipMediaController, phonePipMenuController, pipTaskOrganizer,
- pipTransitionState, pipTouchHandler, pipTransitionController,
- windowManagerShellWrapper, taskStackListener, pipParamsChangedForwarder,
- displayInsetsController, pipTabletopController, oneHandedController,
- mainExecutor));
- }
+ return Optional.ofNullable(PipController.create(
+ context, shellInit, shellCommandHandler, shellController,
+ displayController, pipAnimationController, pipAppOpsListener,
+ pipBoundsAlgorithm,
+ pipKeepClearAlgorithm, pipBoundsState, pipDisplayLayoutState,
+ pipMotionHelper, pipMediaController, phonePipMenuController, pipTaskOrganizer,
+ pipTransitionState, pipTouchHandler, pipTransitionController,
+ windowManagerShellWrapper, taskStackListener, pipParamsChangedForwarder,
+ displayInsetsController, pipTabletopController, oneHandedController,
+ mainExecutor));
}
// Handler is used by Icon.loadDrawableAsync
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/pip/Pip2Module.java b/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/pip/Pip2Module.java
index 696831747865..ea7e9685dd92 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/pip/Pip2Module.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/pip/Pip2Module.java
@@ -81,6 +81,16 @@ public abstract class Pip2Module {
@WMSingleton
@Provides
+ static Optional<PipController.PipImpl> providePip2(Optional<PipController> pipController) {
+ if (pipController.isEmpty()) {
+ return Optional.empty();
+ } else {
+ return Optional.ofNullable(pipController.get().getPipImpl());
+ }
+ }
+
+ @WMSingleton
+ @Provides
static Optional<PipController> providePipController(Context context,
ShellInit shellInit,
ShellCommandHandler shellCommandHandler,
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/pip/PipModule.java b/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/pip/PipModule.java
index f2631eff890d..a3afe7860f2e 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/pip/PipModule.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/pip/PipModule.java
@@ -18,12 +18,16 @@ package com.android.wm.shell.dagger.pip;
import com.android.wm.shell.common.pip.PipUtils;
import com.android.wm.shell.dagger.WMSingleton;
+import com.android.wm.shell.pip.Pip;
import com.android.wm.shell.pip.PipTransitionController;
+import com.android.wm.shell.pip2.phone.PipController;
import com.android.wm.shell.pip2.phone.PipTransition;
import dagger.Module;
import dagger.Provides;
+import java.util.Optional;
+
/**
* Provides dependencies for external components / modules reference PiP and extracts away the
* selection of legacy and new PiP implementation.
@@ -44,4 +48,17 @@ public abstract class PipModule {
return legacyPipTransition;
}
}
+
+ @WMSingleton
+ @Provides
+ static Optional<Pip> providePip(
+ Optional<com.android.wm.shell.pip.phone.PipController.PipImpl> pip1,
+ Optional<PipController.PipImpl> pip2) {
+ if (PipUtils.isPip2ExperimentEnabled()) {
+ return Optional.ofNullable(pip2.orElse(null));
+
+ } else {
+ return Optional.ofNullable(pip1.orElse(null));
+ }
+ }
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeEventLogger.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeEventLogger.kt
index fbc11c19a5a2..400882a8da9a 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeEventLogger.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeEventLogger.kt
@@ -16,9 +16,9 @@
package com.android.wm.shell.desktopmode
+import com.android.internal.protolog.ProtoLog
import com.android.internal.util.FrameworkStatsLog
import com.android.wm.shell.protolog.ShellProtoLogGroup
-import com.android.wm.shell.util.KtProtoLog
/** Event logger for logging desktop mode session events */
class DesktopModeEventLogger {
@@ -27,7 +27,7 @@ class DesktopModeEventLogger {
* entering desktop mode
*/
fun logSessionEnter(sessionId: Int, enterReason: EnterReason) {
- KtProtoLog.v(
+ ProtoLog.v(
ShellProtoLogGroup.WM_SHELL_DESKTOP_MODE,
"DesktopModeLogger: Logging session enter, session: %s reason: %s",
sessionId,
@@ -47,7 +47,7 @@ class DesktopModeEventLogger {
* exiting desktop mode
*/
fun logSessionExit(sessionId: Int, exitReason: ExitReason) {
- KtProtoLog.v(
+ ProtoLog.v(
ShellProtoLogGroup.WM_SHELL_DESKTOP_MODE,
"DesktopModeLogger: Logging session exit, session: %s reason: %s",
sessionId,
@@ -67,7 +67,7 @@ class DesktopModeEventLogger {
* session id [sessionId]
*/
fun logTaskAdded(sessionId: Int, taskUpdate: TaskUpdate) {
- KtProtoLog.v(
+ ProtoLog.v(
ShellProtoLogGroup.WM_SHELL_DESKTOP_MODE,
"DesktopModeLogger: Logging task added, session: %s taskId: %s",
sessionId,
@@ -99,7 +99,7 @@ class DesktopModeEventLogger {
* session id [sessionId]
*/
fun logTaskRemoved(sessionId: Int, taskUpdate: TaskUpdate) {
- KtProtoLog.v(
+ ProtoLog.v(
ShellProtoLogGroup.WM_SHELL_DESKTOP_MODE,
"DesktopModeLogger: Logging task remove, session: %s taskId: %s",
sessionId,
@@ -131,7 +131,7 @@ class DesktopModeEventLogger {
* having session id [sessionId]
*/
fun logTaskInfoChanged(sessionId: Int, taskUpdate: TaskUpdate) {
- KtProtoLog.v(
+ ProtoLog.v(
ShellProtoLogGroup.WM_SHELL_DESKTOP_MODE,
"DesktopModeLogger: Logging task info changed, session: %s taskId: %s",
sessionId,
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeLoggerTransitionObserver.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeLoggerTransitionObserver.kt
index 275f725dc054..73aa7ceea68d 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeLoggerTransitionObserver.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeLoggerTransitionObserver.kt
@@ -50,7 +50,6 @@ import com.android.wm.shell.shared.desktopmode.DesktopModeStatus
import com.android.wm.shell.shared.TransitionUtil
import com.android.wm.shell.sysui.ShellInit
import com.android.wm.shell.transition.Transitions
-import com.android.wm.shell.util.KtProtoLog
/**
* A [Transitions.TransitionObserver] that observes transitions and the proposed changes to log
@@ -106,7 +105,7 @@ class DesktopModeLoggerTransitionObserver(
) {
// this was a new recents animation
if (info.isExitToRecentsTransition() && tasksSavedForRecents.isEmpty()) {
- KtProtoLog.v(
+ ProtoLog.v(
WM_SHELL_DESKTOP_MODE,
"DesktopModeLogger: Recents animation running, saving tasks for later"
)
@@ -132,7 +131,7 @@ class DesktopModeLoggerTransitionObserver(
info.flags == 0 &&
tasksSavedForRecents.isNotEmpty()
) {
- KtProtoLog.v(
+ ProtoLog.v(
WM_SHELL_DESKTOP_MODE,
"DesktopModeLogger: Canceled recents animation, restoring tasks"
)
@@ -202,7 +201,7 @@ class DesktopModeLoggerTransitionObserver(
}
}
- KtProtoLog.v(
+ ProtoLog.v(
WM_SHELL_DESKTOP_MODE,
"DesktopModeLogger: taskInfo map after processing changes %s",
postTransitionFreeformTasks.size()
@@ -348,7 +347,7 @@ class DesktopModeLoggerTransitionObserver(
else -> {
ProtoLog.w(
WM_SHELL_DESKTOP_MODE,
- "Unknown enter reason for transition type ${transitionInfo.type}",
+ "Unknown enter reason for transition type: %s",
transitionInfo.type
)
EnterReason.UNKNOWN_ENTER
@@ -369,7 +368,7 @@ class DesktopModeLoggerTransitionObserver(
else -> {
ProtoLog.w(
WM_SHELL_DESKTOP_MODE,
- "Unknown exit reason for transition type ${transitionInfo.type}",
+ "Unknown exit reason for transition type: %s",
transitionInfo.type
)
ExitReason.UNKNOWN_EXIT
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeTaskRepository.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeTaskRepository.kt
index df79b1575894..247cc42e51ed 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeTaskRepository.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeTaskRepository.kt
@@ -26,8 +26,8 @@ import android.window.WindowContainerToken
import androidx.core.util.forEach
import androidx.core.util.keyIterator
import androidx.core.util.valueIterator
+import com.android.internal.protolog.ProtoLog
import com.android.wm.shell.protolog.ShellProtoLogGroup.WM_SHELL_DESKTOP_MODE
-import com.android.wm.shell.util.KtProtoLog
import java.io.PrintWriter
import java.util.concurrent.Executor
import java.util.function.Consumer
@@ -88,14 +88,17 @@ class DesktopModeTaskRepository {
/** Add a [VisibleTasksListener] to be notified when freeform tasks are visible or not. */
fun addVisibleTasksListener(visibleTasksListener: VisibleTasksListener, executor: Executor) {
visibleTasksListeners[visibleTasksListener] = executor
- displayData.keyIterator().forEach { displayId ->
- val visibleTasksCount = getVisibleTaskCount(displayId)
+ displayData.keyIterator().forEach {
executor.execute {
- visibleTasksListener.onTasksVisibilityChanged(displayId, visibleTasksCount)
+ visibleTasksListener.onTasksVisibilityChanged(it, visibleTaskCount(it))
}
}
}
+ /** Returns a list of all [DisplayData]. */
+ private fun displayDataList(): Sequence<DisplayData> =
+ displayData.valueIterator().asSequence()
+
/**
* Add a Consumer which will inform other classes of changes to exclusion regions for all
* Desktop tasks.
@@ -142,7 +145,7 @@ class DesktopModeTaskRepository {
val added = displayData.getOrCreate(displayId).activeTasks.add(taskId)
if (added) {
- KtProtoLog.d(
+ ProtoLog.d(
WM_SHELL_DESKTOP_MODE,
"DesktopTaskRepo: add active task=%d displayId=%d",
taskId,
@@ -167,7 +170,7 @@ class DesktopModeTaskRepository {
}
}
if (result) {
- KtProtoLog.d(WM_SHELL_DESKTOP_MODE, "DesktopTaskRepo: remove active task=%d", taskId)
+ ProtoLog.d(WM_SHELL_DESKTOP_MODE, "DesktopTaskRepo: remove active task=%d", taskId)
}
return result
}
@@ -180,7 +183,7 @@ class DesktopModeTaskRepository {
fun addClosingTask(displayId: Int, taskId: Int): Boolean {
val added = displayData.getOrCreate(displayId).closingTasks.add(taskId)
if (added) {
- KtProtoLog.d(
+ ProtoLog.d(
WM_SHELL_DESKTOP_MODE,
"DesktopTaskRepo: added closing task=%d displayId=%d",
taskId,
@@ -203,42 +206,22 @@ class DesktopModeTaskRepository {
}
}
if (removed) {
- KtProtoLog.d(WM_SHELL_DESKTOP_MODE, "DesktopTaskRepo: remove closing task=%d", taskId)
+ ProtoLog.d(WM_SHELL_DESKTOP_MODE, "DesktopTaskRepo: remove closing task=%d", taskId)
}
return removed
}
- /** Check if a task with the given [taskId] was marked as an active task */
- fun isActiveTask(taskId: Int): Boolean {
- return displayData.valueIterator().asSequence().any { data ->
- data.activeTasks.contains(taskId)
- }
- }
-
- /** Check if a task with the given [taskId] was marked as a closing task */
- fun isClosingTask(taskId: Int): Boolean =
- displayData.valueIterator().asSequence().any { data -> taskId in data.closingTasks }
-
- /** Whether a task is visible. */
- fun isVisibleTask(taskId: Int): Boolean {
- return displayData.valueIterator().asSequence().any { data ->
- data.visibleTasks.contains(taskId)
- }
- }
-
- /** Return whether the given Task is minimized. */
- fun isMinimizedTask(taskId: Int): Boolean {
- return displayData.valueIterator().asSequence().any { data ->
- data.minimizedTasks.contains(taskId)
- }
- }
+ fun isActiveTask(taskId: Int) = displayDataList().any { taskId in it.activeTasks }
+ fun isClosingTask(taskId: Int) = displayDataList().any { taskId in it.closingTasks }
+ fun isVisibleTask(taskId: Int) = displayDataList().any { taskId in it.visibleTasks }
+ fun isMinimizedTask(taskId: Int) = displayDataList().any { taskId in it.minimizedTasks }
/**
* Check if a task with the given [taskId] is the only visible, non-closing, not-minimized task
* on its display
*/
fun isOnlyVisibleNonClosingTask(taskId: Int): Boolean =
- displayData.valueIterator().asSequence().any { data ->
+ displayDataList().any { data ->
data.visibleTasks
.subtract(data.closingTasks)
.subtract(data.minimizedTasks)
@@ -255,12 +238,6 @@ class DesktopModeTaskRepository {
ArraySet(displayData[displayId]?.minimizedTasks)
/**
- * Returns whether Desktop Mode is currently showing any tasks, i.e. whether any Desktop Tasks
- * are visible.
- */
- fun isDesktopModeShowing(displayId: Int): Boolean = getVisibleTaskCount(displayId) > 0
-
- /**
* Returns a list of Tasks IDs representing all active non-minimized Tasks on the given display,
* ordered from front to back.
*/
@@ -305,25 +282,25 @@ class DesktopModeTaskRepository {
return
}
- val prevCount = getVisibleTaskCount(displayId)
+ val prevCount = visibleTaskCount(displayId)
if (visible) {
displayData.getOrCreate(displayId).visibleTasks.add(taskId)
unminimizeTask(displayId, taskId)
} else {
displayData[displayId]?.visibleTasks?.remove(taskId)
}
- val newCount = getVisibleTaskCount(displayId)
+ val newCount = visibleTaskCount(displayId)
// Check if count changed
if (prevCount != newCount) {
- KtProtoLog.d(
+ ProtoLog.d(
WM_SHELL_DESKTOP_MODE,
"DesktopTaskRepo: update task visibility taskId=%d visible=%b displayId=%d",
taskId,
visible,
displayId
)
- KtProtoLog.d(
+ ProtoLog.d(
WM_SHELL_DESKTOP_MODE,
"DesktopTaskRepo: visibleTaskCount has changed from %d to %d",
prevCount,
@@ -340,8 +317,8 @@ class DesktopModeTaskRepository {
}
/** Get number of tasks that are marked as visible on given [displayId] */
- fun getVisibleTaskCount(displayId: Int): Int {
- KtProtoLog.d(
+ fun visibleTaskCount(displayId: Int): Int {
+ ProtoLog.d(
WM_SHELL_DESKTOP_MODE,
"DesktopTaskRepo: visibleTaskCount= %d",
displayData[displayId]?.visibleTasks?.size ?: 0
@@ -353,7 +330,7 @@ class DesktopModeTaskRepository {
// TODO(b/342417921): Identify if there is additional checks needed to move tasks for
// multi-display scenarios.
fun addOrMoveFreeformTaskToTop(displayId: Int, taskId: Int) {
- KtProtoLog.d(
+ ProtoLog.d(
WM_SHELL_DESKTOP_MODE,
"DesktopTaskRepo: add or move task to top: display=%d, taskId=%d",
displayId,
@@ -365,7 +342,7 @@ class DesktopModeTaskRepository {
/** Mark a Task as minimized. */
fun minimizeTask(displayId: Int, taskId: Int) {
- KtProtoLog.v(
+ ProtoLog.v(
WM_SHELL_DESKTOP_MODE,
"DesktopModeTaskRepository: minimize Task: display=%d, task=%d",
displayId,
@@ -376,7 +353,7 @@ class DesktopModeTaskRepository {
/** Mark a Task as non-minimized. */
fun unminimizeTask(displayId: Int, taskId: Int) {
- KtProtoLog.v(
+ ProtoLog.v(
WM_SHELL_DESKTOP_MODE,
"DesktopModeTaskRepository: unminimize Task: display=%d, task=%d",
displayId,
@@ -387,7 +364,7 @@ class DesktopModeTaskRepository {
/** Remove the task from the ordered list. */
fun removeFreeformTask(displayId: Int, taskId: Int) {
- KtProtoLog.d(
+ ProtoLog.d(
WM_SHELL_DESKTOP_MODE,
"DesktopTaskRepo: remove freeform task from ordered list: display=%d, taskId=%d",
displayId,
@@ -395,7 +372,7 @@ class DesktopModeTaskRepository {
)
displayData[displayId]?.freeformTasksInZOrder?.remove(taskId)
boundsBeforeMaximizeByTaskId.remove(taskId)
- KtProtoLog.d(
+ ProtoLog.d(
WM_SHELL_DESKTOP_MODE,
"DesktopTaskRepo: remaining freeform tasks: %s",
displayData[displayId]?.freeformTasksInZOrder?.toDumpString() ?: ""
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeUtils.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeUtils.kt
index 1bf125938e6f..da212e704b24 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeUtils.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopModeUtils.kt
@@ -66,7 +66,7 @@ fun calculateInitialBounds(
idealSize
}
} else {
- maximumSizeMaintainingAspectRatio(taskInfo, idealSize, appAspectRatio)
+ maximizeSizeGivenAspectRatio(taskInfo, idealSize, appAspectRatio)
}
}
ORIENTATION_PORTRAIT -> {
@@ -85,13 +85,13 @@ fun calculateInitialBounds(
} else {
if (isFixedOrientationLandscape(topActivityInfo.screenOrientation)) {
// Apply custom app width and calculate maximum size
- maximumSizeMaintainingAspectRatio(
+ maximizeSizeGivenAspectRatio(
taskInfo,
Size(customPortraitWidthForLandscapeApp, idealSize.height),
appAspectRatio
)
} else {
- maximumSizeMaintainingAspectRatio(taskInfo, idealSize, appAspectRatio)
+ maximizeSizeGivenAspectRatio(taskInfo, idealSize, appAspectRatio)
}
}
}
@@ -107,7 +107,7 @@ fun calculateInitialBounds(
* Calculates the largest size that can fit in a given area while maintaining a specific aspect
* ratio.
*/
-fun maximumSizeMaintainingAspectRatio(
+fun maximizeSizeGivenAspectRatio(
taskInfo: RunningTaskInfo,
targetArea: Size,
aspectRatio: Float
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 985901d5ac75..9fd2c274df2d 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
@@ -49,7 +49,11 @@ import android.window.TransitionRequestInfo
import android.window.WindowContainerTransaction
import androidx.annotation.BinderThread
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
+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.wm.shell.RootTaskDisplayAreaOrganizer
import com.android.wm.shell.ShellTaskOrganizer
@@ -68,6 +72,7 @@ import com.android.wm.shell.common.split.SplitScreenConstants.SPLIT_POSITION_BOT
import com.android.wm.shell.common.split.SplitScreenConstants.SPLIT_POSITION_TOP_OR_LEFT
import com.android.wm.shell.compatui.isTopActivityExemptFromDesktopWindowing
import com.android.wm.shell.desktopmode.DesktopModeTaskRepository.VisibleTasksListener
+import com.android.wm.shell.desktopmode.DesktopModeVisualIndicator.IndicatorType
import com.android.wm.shell.desktopmode.DragToDesktopTransitionHandler.DragToDesktopStateListener
import com.android.wm.shell.draganddrop.DragAndDropController
import com.android.wm.shell.protolog.ShellProtoLogGroup.WM_SHELL_DESKTOP_MODE
@@ -88,7 +93,6 @@ import com.android.wm.shell.sysui.ShellInit
import com.android.wm.shell.sysui.ShellSharedConstants
import com.android.wm.shell.transition.OneShotRemoteHandler
import com.android.wm.shell.transition.Transitions
-import com.android.wm.shell.util.KtProtoLog
import com.android.wm.shell.windowdecor.DragPositioningCallbackUtility
import com.android.wm.shell.windowdecor.MoveToDesktopAnimator
import com.android.wm.shell.windowdecor.OnTaskResizeAnimationListener
@@ -122,7 +126,8 @@ class DesktopTasksController(
private val multiInstanceHelper: MultiInstanceHelper,
@ShellMainThread private val mainExecutor: ShellExecutor,
private val desktopTasksLimiter: Optional<DesktopTasksLimiter>,
- private val recentTasksController: RecentTasksController?
+ private val recentTasksController: RecentTasksController?,
+ private val interactionJankMonitor: InteractionJankMonitor
) :
RemoteCallable<DesktopTasksController>,
Transitions.TransitionHandler,
@@ -159,18 +164,6 @@ class DesktopTasksController(
}
}
- private val transitionAreaHeight
- get() =
- context.resources.getDimensionPixelSize(
- com.android.wm.shell.R.dimen.desktop_mode_fullscreen_from_desktop_height
- )
-
- private val transitionAreaWidth
- get() =
- context.resources.getDimensionPixelSize(
- com.android.wm.shell.R.dimen.desktop_mode_transition_area_width
- )
-
/** Task id of the task currently being dragged from fullscreen/split. */
val draggingTaskId
get() = dragToDesktopTransitionHandler.draggingTaskId
@@ -186,7 +179,7 @@ class DesktopTasksController(
}
private fun onInit() {
- KtProtoLog.d(WM_SHELL_DESKTOP_MODE, "Initialize DesktopTasksController")
+ ProtoLog.d(WM_SHELL_DESKTOP_MODE, "Initialize DesktopTasksController")
shellCommandHandler.addDumpCallback(this::dump, this)
shellCommandHandler.addCommandCallback("desktopmode", desktopModeShellCommandHandler, this)
shellController.addExternalInterface(
@@ -200,7 +193,7 @@ class DesktopTasksController(
recentsTransitionHandler.addTransitionStateListener(
object : RecentsTransitionStateListener {
override fun onAnimationStateChanged(running: Boolean) {
- KtProtoLog.v(
+ ProtoLog.v(
WM_SHELL_DESKTOP_MODE,
"DesktopTasksController: recents animation state changed running=%b",
running
@@ -229,15 +222,23 @@ class DesktopTasksController(
dragToDesktopTransitionHandler.setSplitScreenController(controller)
}
+ /** Returns the transition type for the given remote transition. */
+ private fun transitionType(remoteTransition: RemoteTransition?): Int {
+ if (remoteTransition == null) {
+ ProtoLog.v(WM_SHELL_DESKTOP_MODE, "DesktopTasksController: remoteTransition is null")
+ return TRANSIT_NONE
+ }
+ return TRANSIT_TO_FRONT
+ }
+
/** Show all tasks, that are part of the desktop, on top of launcher */
fun showDesktopApps(displayId: Int, remoteTransition: RemoteTransition? = null) {
- KtProtoLog.v(WM_SHELL_DESKTOP_MODE, "DesktopTasksController: showDesktopApps")
+ ProtoLog.v(WM_SHELL_DESKTOP_MODE, "DesktopTasksController: showDesktopApps")
val wct = WindowContainerTransaction()
bringDesktopAppsToFront(displayId, wct)
if (Transitions.ENABLE_SHELL_TRANSITIONS) {
- // TODO(b/309014605): ensure remote transition is supplied once state is introduced
- val transitionType = if (remoteTransition == null) TRANSIT_NONE else TRANSIT_TO_FRONT
+ val transitionType = transitionType(remoteTransition)
val handler =
remoteTransition?.let {
OneShotRemoteHandler(transitions.mainExecutor, remoteTransition)
@@ -250,10 +251,12 @@ class DesktopTasksController(
}
}
- /** Get number of tasks that are marked as visible */
- fun getVisibleTaskCount(displayId: Int): Int {
- return desktopModeTaskRepository.getVisibleTaskCount(displayId)
- }
+ /** Gets number of visible tasks in [displayId]. */
+ fun visibleTaskCount(displayId: Int): Int =
+ desktopModeTaskRepository.visibleTaskCount(displayId)
+
+ /** Returns true if any tasks are visible in Desktop Mode. */
+ fun isDesktopModeShowing(displayId: Int): Boolean = visibleTaskCount(displayId) > 0
/** Enter desktop by using the focused task in given `displayId` */
fun moveFocusedTaskToDesktop(displayId: Int, transitionSource: DesktopModeTransitionSource) {
@@ -282,7 +285,7 @@ class DesktopTasksController(
moveToDesktop(allFocusedTasks[0].taskId, transitionSource = transitionSource)
}
else -> {
- KtProtoLog.w(
+ ProtoLog.w(
WM_SHELL_DESKTOP_MODE,
"DesktopTasksController: Cannot enter desktop, expected less " +
"than 3 focused tasks but found %d",
@@ -312,7 +315,7 @@ class DesktopTasksController(
transitionSource: DesktopModeTransitionSource,
): Boolean {
recentTasksController?.findTaskInBackground(taskId)?.let {
- KtProtoLog.v(
+ ProtoLog.v(
WM_SHELL_DESKTOP_MODE,
"DesktopTasksController: moveToDesktopFromNonRunningTask taskId=%d",
taskId
@@ -346,14 +349,14 @@ class DesktopTasksController(
) {
if (Flags.enableDesktopWindowingModalsPolicy()
&& isTopActivityExemptFromDesktopWindowing(context, task)) {
- KtProtoLog.w(
+ ProtoLog.w(
WM_SHELL_DESKTOP_MODE,
"DesktopTasksController: Cannot enter desktop, " +
"ineligible top activity found."
)
return
}
- KtProtoLog.v(
+ ProtoLog.v(
WM_SHELL_DESKTOP_MODE,
"DesktopTasksController: moveToDesktop taskId=%d",
task.taskId
@@ -379,12 +382,15 @@ class DesktopTasksController(
fun startDragToDesktop(
taskInfo: RunningTaskInfo,
dragToDesktopValueAnimator: MoveToDesktopAnimator,
+ taskSurface: SurfaceControl,
) {
- KtProtoLog.v(
+ ProtoLog.v(
WM_SHELL_DESKTOP_MODE,
"DesktopTasksController: startDragToDesktop taskId=%d",
taskInfo.taskId
)
+ interactionJankMonitor.begin(taskSurface, context,
+ CUJ_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_HOLD)
dragToDesktopTransitionHandler.startDragToDesktopTransition(
taskInfo.taskId,
dragToDesktopValueAnimator
@@ -396,7 +402,7 @@ class DesktopTasksController(
* [startDragToDesktop].
*/
private fun finalizeDragToDesktop(taskInfo: RunningTaskInfo, freeformBounds: Rect) {
- KtProtoLog.v(
+ ProtoLog.v(
WM_SHELL_DESKTOP_MODE,
"DesktopTasksController: finalizeDragToDesktop taskId=%d",
taskInfo.taskId
@@ -440,7 +446,7 @@ class DesktopTasksController(
}
if (!desktopModeTaskRepository.addClosingTask(displayId, taskId)) {
// Could happen if the task hasn't been removed from closing list after it disappeared
- KtProtoLog.w(
+ ProtoLog.w(
WM_SHELL_DESKTOP_MODE,
"DesktopTasksController: the task with taskId=%d is already closing!",
taskId
@@ -464,7 +470,7 @@ class DesktopTasksController(
/** Move a desktop app to split screen. */
fun moveToSplit(task: RunningTaskInfo) {
- KtProtoLog.v(
+ ProtoLog.v(
WM_SHELL_DESKTOP_MODE,
"DesktopTasksController: moveToSplit taskId=%d",
task.taskId
@@ -497,7 +503,7 @@ class DesktopTasksController(
* [startDragToDesktop].
*/
fun cancelDragToDesktop(task: RunningTaskInfo) {
- KtProtoLog.v(
+ ProtoLog.v(
WM_SHELL_DESKTOP_MODE,
"DesktopTasksController: cancelDragToDesktop taskId=%d",
task.taskId
@@ -512,7 +518,7 @@ class DesktopTasksController(
position: Point,
transitionSource: DesktopModeTransitionSource
) {
- KtProtoLog.v(
+ ProtoLog.v(
WM_SHELL_DESKTOP_MODE,
"DesktopTasksController: moveToFullscreen with animation taskId=%d",
task.taskId
@@ -540,7 +546,7 @@ class DesktopTasksController(
/** Move a task to the front */
fun moveTaskToFront(taskInfo: RunningTaskInfo) {
- KtProtoLog.v(
+ ProtoLog.v(
WM_SHELL_DESKTOP_MODE,
"DesktopTasksController: moveTaskToFront taskId=%d",
taskInfo.taskId
@@ -571,10 +577,10 @@ class DesktopTasksController(
fun moveToNextDisplay(taskId: Int) {
val task = shellTaskOrganizer.getRunningTaskInfo(taskId)
if (task == null) {
- KtProtoLog.w(WM_SHELL_DESKTOP_MODE, "moveToNextDisplay: taskId=%d not found", taskId)
+ ProtoLog.w(WM_SHELL_DESKTOP_MODE, "moveToNextDisplay: taskId=%d not found", taskId)
return
}
- KtProtoLog.v(
+ ProtoLog.v(
WM_SHELL_DESKTOP_MODE,
"moveToNextDisplay: taskId=%d taskDisplayId=%d",
taskId,
@@ -589,7 +595,7 @@ class DesktopTasksController(
newDisplayId = displayIds.firstOrNull { displayId -> displayId < task.displayId }
}
if (newDisplayId == null) {
- KtProtoLog.w(WM_SHELL_DESKTOP_MODE, "moveToNextDisplay: next display not found")
+ ProtoLog.w(WM_SHELL_DESKTOP_MODE, "moveToNextDisplay: next display not found")
return
}
moveToDisplay(task, newDisplayId)
@@ -601,7 +607,7 @@ class DesktopTasksController(
* No-op if task is already on that display per [RunningTaskInfo.displayId].
*/
private fun moveToDisplay(task: RunningTaskInfo, displayId: Int) {
- KtProtoLog.v(
+ ProtoLog.v(
WM_SHELL_DESKTOP_MODE,
"moveToDisplay: taskId=%d displayId=%d",
task.taskId,
@@ -609,13 +615,13 @@ class DesktopTasksController(
)
if (task.displayId == displayId) {
- KtProtoLog.d(WM_SHELL_DESKTOP_MODE, "moveToDisplay: task already on display")
+ ProtoLog.d(WM_SHELL_DESKTOP_MODE, "moveToDisplay: task already on display")
return
}
val displayAreaInfo = rootTaskDisplayAreaOrganizer.getDisplayAreaInfo(displayId)
if (displayAreaInfo == null) {
- KtProtoLog.w(WM_SHELL_DESKTOP_MODE, "moveToDisplay: display not found")
+ ProtoLog.w(WM_SHELL_DESKTOP_MODE, "moveToDisplay: display not found")
return
}
@@ -673,7 +679,7 @@ class DesktopTasksController(
} else {
// if non-resizable then calculate max bounds according to aspect ratio
val activityAspectRatio = calculateAspectRatio(taskInfo)
- val newSize = maximumSizeMaintainingAspectRatio(taskInfo,
+ val newSize = maximizeSizeGivenAspectRatio(taskInfo,
Size(stableBounds.width(), stableBounds.height()), activityAspectRatio)
val newBounds = centerInArea(
newSize, stableBounds, stableBounds.left, stableBounds.top)
@@ -770,18 +776,19 @@ class DesktopTasksController(
wct: WindowContainerTransaction,
newTaskIdInFront: Int? = null
): RunningTaskInfo? {
- KtProtoLog.v(
+ ProtoLog.v(
WM_SHELL_DESKTOP_MODE,
"DesktopTasksController: bringDesktopAppsToFront, newTaskIdInFront=%s",
newTaskIdInFront ?: "null"
)
- if (Flags.enableDesktopWindowingWallpaperActivity()) {
+ // Move home to front, ensures that we go back home when all desktop windows are closed
+ moveHomeTask(wct, toTop = true)
+
+ // Currently, we only handle the desktop on the default display really.
+ if (displayId == DEFAULT_DISPLAY && Flags.enableDesktopWindowingWallpaperActivity()) {
// Add translucent wallpaper activity to show the wallpaper underneath
addWallpaperActivity(wct)
- } else {
- // Move home to front
- moveHomeTask(wct, toTop = true)
}
val nonMinimizedTasksOrderedFrontToBack =
@@ -815,13 +822,12 @@ class DesktopTasksController(
}
private fun addWallpaperActivity(wct: WindowContainerTransaction) {
- KtProtoLog.v(WM_SHELL_DESKTOP_MODE, "DesktopTasksController: addWallpaper")
+ ProtoLog.v(WM_SHELL_DESKTOP_MODE, "DesktopTasksController: addWallpaper")
val intent = Intent(context, DesktopWallpaperActivity::class.java)
val options =
ActivityOptions.makeBasic().apply {
- isPendingIntentBackgroundActivityLaunchAllowedByPermission = true
pendingIntentBackgroundActivityStartMode =
- ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED
+ ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS
}
val pendingIntent =
PendingIntent.getActivity(
@@ -835,7 +841,7 @@ class DesktopTasksController(
private fun removeWallpaperActivity(wct: WindowContainerTransaction) {
desktopModeTaskRepository.wallpaperActivityToken?.let { token ->
- KtProtoLog.v(WM_SHELL_DESKTOP_MODE, "DesktopTasksController: removeWallpaper")
+ ProtoLog.v(WM_SHELL_DESKTOP_MODE, "DesktopTasksController: removeWallpaper")
wct.removeTask(token)
}
}
@@ -873,7 +879,7 @@ class DesktopTasksController(
transition: IBinder,
request: TransitionRequestInfo
): WindowContainerTransaction? {
- KtProtoLog.v(
+ ProtoLog.v(
WM_SHELL_DESKTOP_MODE,
"DesktopTasksController: handleRequest request=%s",
request
@@ -915,7 +921,7 @@ class DesktopTasksController(
}
if (!shouldHandleRequest) {
- KtProtoLog.v(
+ ProtoLog.v(
WM_SHELL_DESKTOP_MODE,
"DesktopTasksController: skipping handleRequest reason=%s",
reason
@@ -939,7 +945,7 @@ class DesktopTasksController(
}
}
}
- KtProtoLog.v(
+ ProtoLog.v(
WM_SHELL_DESKTOP_MODE,
"DesktopTasksController: handleRequest result=%s",
result ?: "null"
@@ -977,26 +983,32 @@ class DesktopTasksController(
task: RunningTaskInfo,
transition: IBinder
): WindowContainerTransaction? {
- KtProtoLog.v(WM_SHELL_DESKTOP_MODE, "DesktopTasksController: handleFreeformTaskLaunch")
+ ProtoLog.v(WM_SHELL_DESKTOP_MODE, "DesktopTasksController: handleFreeformTaskLaunch")
if (keyguardManager.isKeyguardLocked) {
// Do NOT handle freeform task launch when locked.
// It will be launched in fullscreen windowing mode (Details: b/160925539)
- KtProtoLog.v(WM_SHELL_DESKTOP_MODE, "DesktopTasksController: skip keyguard is locked")
+ ProtoLog.v(WM_SHELL_DESKTOP_MODE, "DesktopTasksController: skip keyguard is locked")
return null
}
- if (!desktopModeTaskRepository.isDesktopModeShowing(task.displayId)) {
- KtProtoLog.d(
+ val wct = WindowContainerTransaction()
+ if (!isDesktopModeShowing(task.displayId)) {
+ ProtoLog.d(
WM_SHELL_DESKTOP_MODE,
"DesktopTasksController: bring desktop tasks to front on transition" +
" taskId=%d",
task.taskId
)
- return WindowContainerTransaction().also { wct ->
- bringDesktopAppsToFrontBeforeShowingNewTask(task.displayId, wct, task.taskId)
- wct.reorder(task.token, true)
+ // We are outside of desktop mode and already existing desktop task is being launched.
+ // We should make this task go to fullscreen instead of freeform. Note that this means
+ // any re-launch of a freeform window outside of desktop will be in fullscreen.
+ if (desktopModeTaskRepository.isActiveTask(task.taskId)) {
+ addMoveToFullscreenChanges(wct, task)
+ return wct
}
+ bringDesktopAppsToFrontBeforeShowingNewTask(task.displayId, wct, task.taskId)
+ wct.reorder(task.token, true)
+ return wct
}
- val wct = WindowContainerTransaction()
if (useDesktopOverrideDensity()) {
wct.setDensityDpi(task.token, DESKTOP_DENSITY_OVERRIDE)
}
@@ -1014,9 +1026,9 @@ class DesktopTasksController(
task: RunningTaskInfo,
transition: IBinder
): WindowContainerTransaction? {
- KtProtoLog.v(WM_SHELL_DESKTOP_MODE, "DesktopTasksController: handleFullscreenTaskLaunch")
- if (desktopModeTaskRepository.isDesktopModeShowing(task.displayId)) {
- KtProtoLog.d(
+ ProtoLog.v(WM_SHELL_DESKTOP_MODE, "DesktopTasksController: handleFullscreenTaskLaunch")
+ if (isDesktopModeShowing(task.displayId)) {
+ ProtoLog.d(
WM_SHELL_DESKTOP_MODE,
"DesktopTasksController: switch fullscreen task to freeform on transition" +
" taskId=%d",
@@ -1048,31 +1060,33 @@ class DesktopTasksController(
/** Handle task closing by removing wallpaper activity if it's the last active task */
private fun handleTaskClosing(task: RunningTaskInfo): WindowContainerTransaction? {
- val wct = if (
- desktopModeTaskRepository.isOnlyVisibleNonClosingTask(task.taskId) &&
- desktopModeTaskRepository.wallpaperActivityToken != null
- ) {
+ ProtoLog.v(WM_SHELL_DESKTOP_MODE, "DesktopTasksController: handleTaskClosing")
+ val wct = WindowContainerTransaction()
+ if (desktopModeTaskRepository.isOnlyVisibleNonClosingTask(task.taskId)
+ && desktopModeTaskRepository.wallpaperActivityToken != null) {
// Remove wallpaper activity when the last active task is removed
- WindowContainerTransaction().also { wct -> removeWallpaperActivity(wct) }
- } else {
- null
+ removeWallpaperActivity(wct)
}
if (!desktopModeTaskRepository.addClosingTask(task.displayId, task.taskId)) {
// Could happen if the task hasn't been removed from closing list after it disappeared
- KtProtoLog.w(
+ ProtoLog.w(
WM_SHELL_DESKTOP_MODE,
"DesktopTasksController: the task with taskId=%d is already closing!",
task.taskId
)
}
- return wct
+ // If a CLOSE or TO_BACK is triggered on a desktop task, remove the task.
+ if (Flags.enableDesktopWindowingBackNavigation() &&
+ desktopModeTaskRepository.isVisibleTask(task.taskId)) {
+ wct.removeTask(task.token)
+ }
+ return if (wct.isEmpty) null else wct
}
private fun addMoveToDesktopChanges(
wct: WindowContainerTransaction,
taskInfo: RunningTaskInfo
) {
- val displayLayout = displayController.getDisplayLayout(taskInfo.displayId) ?: return
val tdaInfo = rootTaskDisplayAreaOrganizer.getDisplayAreaInfo(taskInfo.displayId)!!
val tdaWindowingMode = tdaInfo.configuration.windowConfiguration.windowingMode
val targetWindowingMode =
@@ -1082,9 +1096,6 @@ class DesktopTasksController(
} else {
WINDOWING_MODE_FREEFORM
}
- if (Flags.enableWindowingDynamicInitialBounds()) {
- wct.setBounds(taskInfo.token, calculateInitialBounds(displayLayout, taskInfo))
- }
wct.setWindowingMode(taskInfo.token, targetWindowingMode)
wct.reorder(taskInfo.token, true /* onTop */)
if (useDesktopOverrideDensity()) {
@@ -1110,6 +1121,10 @@ class DesktopTasksController(
if (useDesktopOverrideDensity()) {
wct.setDensityDpi(taskInfo.token, getDefaultDensityDpi())
}
+ if (desktopModeTaskRepository.isOnlyVisibleNonClosingTask(taskInfo.taskId)) {
+ // Remove wallpaper activity when leaving desktop mode
+ removeWallpaperActivity(wct)
+ }
}
/**
@@ -1125,6 +1140,10 @@ 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 (desktopModeTaskRepository.isOnlyVisibleNonClosingTask(taskInfo.taskId)) {
+ // Remove wallpaper activity when leaving desktop mode
+ removeWallpaperActivity(wct)
+ }
}
/** Returns the ID of the Task that will be minimized, or null if no task will be minimized. */
@@ -1323,33 +1342,42 @@ class DesktopTasksController(
*
* @param taskInfo the task being dragged.
* @param y height of drag, to be checked against status bar height.
+ * @return the [IndicatorType] used for the resulting transition
*/
fun onDragPositioningEndThroughStatusBar(
inputCoordinates: PointF,
taskInfo: RunningTaskInfo,
- ) {
- val indicator = getVisualIndicator() ?: return
+ taskSurface: SurfaceControl,
+ ): IndicatorType {
+ // End the drag_hold CUJ interaction.
+ interactionJankMonitor.end(CUJ_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_HOLD)
+ val indicator = getVisualIndicator() ?: return IndicatorType.NO_INDICATOR
val indicatorType = indicator.updateIndicatorType(inputCoordinates, taskInfo.windowingMode)
when (indicatorType) {
- DesktopModeVisualIndicator.IndicatorType.TO_DESKTOP_INDICATOR -> {
- val displayLayout = displayController.getDisplayLayout(taskInfo.displayId) ?: return
+ IndicatorType.TO_DESKTOP_INDICATOR -> {
+ val displayLayout = displayController.getDisplayLayout(taskInfo.displayId)
+ ?: return IndicatorType.NO_INDICATOR
+ // Start a new jank interaction for the drag release to desktop window animation.
+ interactionJankMonitor.begin(taskSurface, context,
+ CUJ_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_RELEASE, "to_desktop")
if (Flags.enableWindowingDynamicInitialBounds()) {
finalizeDragToDesktop(taskInfo, calculateInitialBounds(displayLayout, taskInfo))
} else {
finalizeDragToDesktop(taskInfo, getDefaultDesktopTaskBounds(displayLayout))
}
}
- DesktopModeVisualIndicator.IndicatorType.NO_INDICATOR,
- DesktopModeVisualIndicator.IndicatorType.TO_FULLSCREEN_INDICATOR -> {
+ IndicatorType.NO_INDICATOR,
+ IndicatorType.TO_FULLSCREEN_INDICATOR -> {
cancelDragToDesktop(taskInfo)
}
- DesktopModeVisualIndicator.IndicatorType.TO_SPLIT_LEFT_INDICATOR -> {
+ IndicatorType.TO_SPLIT_LEFT_INDICATOR -> {
requestSplit(taskInfo, leftOrTop = true)
}
- DesktopModeVisualIndicator.IndicatorType.TO_SPLIT_RIGHT_INDICATOR -> {
+ IndicatorType.TO_SPLIT_RIGHT_INDICATOR -> {
requestSplit(taskInfo, leftOrTop = false)
}
}
+ return indicatorType
}
/** Update the exclusion region for a specified task */
@@ -1388,8 +1416,7 @@ class DesktopTasksController(
onFinishCallback: Consumer<Boolean>
): Boolean {
// TODO(b/320797628): Pass through which display we are dropping onto
- val activeTasks = desktopModeTaskRepository.getActiveTasks(DEFAULT_DISPLAY)
- if (!activeTasks.any { desktopModeTaskRepository.isVisibleTask(it) }) {
+ if (!isDesktopModeShowing(DEFAULT_DISPLAY)) {
// Not currently in desktop mode, ignore the drop
return false
}
@@ -1398,7 +1425,7 @@ class DesktopTasksController(
if (!multiInstanceHelper.supportsMultiInstanceSplit(launchComponent)) {
// TODO(b/320797628): Should only return early if there is an existing running task, and
// notify the user as well. But for now, just ignore the drop.
- KtProtoLog.v(WM_SHELL_DESKTOP_MODE, "Dropped intent does not support multi-instance")
+ ProtoLog.v(WM_SHELL_DESKTOP_MODE, "Dropped intent does not support multi-instance")
return false
}
@@ -1411,7 +1438,6 @@ class DesktopTasksController(
setPendingIntentBackgroundActivityStartMode(
ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_DENIED
)
- isPendingIntentBackgroundActivityLaunchAllowedByPermission = true
}
val wct = WindowContainerTransaction()
wct.sendPendingIntent(launchIntent, null, opts.toBundle())
@@ -1489,7 +1515,7 @@ class DesktopTasksController(
private val listener: VisibleTasksListener =
object : VisibleTasksListener {
override fun onTasksVisibilityChanged(displayId: Int, visibleTasksCount: Int) {
- KtProtoLog.v(
+ ProtoLog.v(
WM_SHELL_DESKTOP_MODE,
"IDesktopModeImpl: onVisibilityChanged display=%d visible=%d",
displayId,
@@ -1534,11 +1560,11 @@ class DesktopTasksController(
}
override fun stashDesktopApps(displayId: Int) {
- KtProtoLog.w(WM_SHELL_DESKTOP_MODE, "IDesktopModeImpl: stashDesktopApps is deprecated")
+ ProtoLog.w(WM_SHELL_DESKTOP_MODE, "IDesktopModeImpl: stashDesktopApps is deprecated")
}
override fun hideStashedDesktopApps(displayId: Int) {
- KtProtoLog.w(
+ ProtoLog.w(
WM_SHELL_DESKTOP_MODE,
"IDesktopModeImpl: hideStashedDesktopApps is deprecated"
)
@@ -1548,8 +1574,8 @@ class DesktopTasksController(
val result = IntArray(1)
executeRemoteCallWithTaskPermission(
controller,
- "getVisibleTaskCount",
- { controller -> result[0] = controller.getVisibleTaskCount(displayId) },
+ "visibleTaskCount",
+ { controller -> result[0] = controller.visibleTaskCount(displayId) },
true /* blocking */
)
return result[0]
@@ -1565,7 +1591,7 @@ class DesktopTasksController(
}
override fun setTaskListener(listener: IDesktopTaskListener?) {
- KtProtoLog.v(
+ ProtoLog.v(
WM_SHELL_DESKTOP_MODE,
"IDesktopModeImpl: set task listener=%s",
listener ?: "null"
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksLimiter.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksLimiter.kt
index 3f5bd1a4f5c7..534cc22ada47 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksLimiter.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksLimiter.kt
@@ -23,12 +23,12 @@ import android.view.WindowManager.TRANSIT_TO_BACK
import android.window.TransitionInfo
import android.window.WindowContainerTransaction
import androidx.annotation.VisibleForTesting
+import com.android.internal.protolog.ProtoLog
import com.android.wm.shell.ShellTaskOrganizer
import com.android.wm.shell.protolog.ShellProtoLogGroup
import com.android.wm.shell.shared.desktopmode.DesktopModeStatus
import com.android.wm.shell.transition.Transitions
import com.android.wm.shell.transition.Transitions.TransitionObserver
-import com.android.wm.shell.util.KtProtoLog
/**
* Limits the number of tasks shown in Desktop Mode.
@@ -71,7 +71,7 @@ class DesktopTasksLimiter (
if (!taskRepository.isActiveTask(taskToMinimize.taskId)) return
if (!isTaskReorderedToBackOrInvisible(info, taskToMinimize)) {
- KtProtoLog.v(
+ ProtoLog.v(
ShellProtoLogGroup.WM_SHELL_DESKTOP_MODE,
"DesktopTasksLimiter: task %d is not reordered to back nor invis",
taskToMinimize.taskId)
@@ -109,7 +109,7 @@ class DesktopTasksLimiter (
}
override fun onTransitionFinished(transition: IBinder, aborted: Boolean) {
- KtProtoLog.v(
+ ProtoLog.v(
ShellProtoLogGroup.WM_SHELL_DESKTOP_MODE,
"DesktopTasksLimiter: transition %s finished", transition)
mPendingTransitionTokensAndTasks.remove(transition)
@@ -133,7 +133,7 @@ class DesktopTasksLimiter (
if (remainingMinimizedTasks.isEmpty()) {
return
}
- KtProtoLog.v(
+ ProtoLog.v(
ShellProtoLogGroup.WM_SHELL_DESKTOP_MODE,
"DesktopTasksLimiter: removing leftover minimized tasks: $remainingMinimizedTasks")
remainingMinimizedTasks.forEach { taskIdToRemove ->
@@ -150,7 +150,7 @@ class DesktopTasksLimiter (
* finished so we don't minimize the task if the transition fails.
*/
private fun markTaskMinimized(displayId: Int, taskId: Int) {
- KtProtoLog.v(
+ ProtoLog.v(
ShellProtoLogGroup.WM_SHELL_DESKTOP_MODE,
"DesktopTasksLimiter: marking %d as minimized", taskId)
taskRepository.minimizeTask(displayId, taskId)
@@ -169,7 +169,7 @@ class DesktopTasksLimiter (
wct: WindowContainerTransaction,
newFrontTaskInfo: RunningTaskInfo,
): RunningTaskInfo? {
- KtProtoLog.v(
+ ProtoLog.v(
ShellProtoLogGroup.WM_SHELL_DESKTOP_MODE,
"DesktopTasksLimiter: addMinimizeBackTaskChangesIfNeeded, newFrontTask=%d",
newFrontTaskInfo.taskId)
@@ -217,7 +217,7 @@ class DesktopTasksLimiter (
visibleFreeformTaskIdsOrderedFrontToBack: List<Int>
): RunningTaskInfo? {
if (visibleFreeformTaskIdsOrderedFrontToBack.size <= getMaxTaskLimit()) {
- KtProtoLog.v(
+ ProtoLog.v(
ShellProtoLogGroup.WM_SHELL_DESKTOP_MODE,
"DesktopTasksLimiter: no need to minimize; tasks below limit")
// No need to minimize anything
@@ -227,7 +227,7 @@ class DesktopTasksLimiter (
shellTaskOrganizer.getRunningTaskInfo(
visibleFreeformTaskIdsOrderedFrontToBack.last())
if (taskToMinimize == null) {
- KtProtoLog.e(
+ ProtoLog.e(
ShellProtoLogGroup.WM_SHELL_DESKTOP_MODE,
"DesktopTasksLimiter: taskToMinimize == null")
return null
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksTransitionObserver.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksTransitionObserver.kt
index f01f6450ae30..246fd9281975 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksTransitionObserver.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksTransitionObserver.kt
@@ -21,35 +21,38 @@ import android.os.IBinder
import android.view.SurfaceControl
import android.view.WindowManager
import android.window.TransitionInfo
+import android.window.WindowContainerTransaction
+import com.android.internal.protolog.ProtoLog
import com.android.window.flags.Flags.enableDesktopWindowingWallpaperActivity
+import com.android.wm.shell.ShellTaskOrganizer
import com.android.wm.shell.protolog.ShellProtoLogGroup.WM_SHELL_DESKTOP_MODE
import com.android.wm.shell.shared.desktopmode.DesktopModeStatus
import com.android.wm.shell.sysui.ShellInit
import com.android.wm.shell.transition.Transitions
-import com.android.wm.shell.util.KtProtoLog
/**
- * A [Transitions.TransitionObserver] that observes shell transitions and updates
- * the [DesktopModeTaskRepository] state TODO: b/332682201
- * This observes transitions related to desktop mode
- * and other transitions that originate both within and outside shell.
+ * A [Transitions.TransitionObserver] that observes shell transitions and updates the
+ * [DesktopModeTaskRepository] state TODO: b/332682201 This observes transitions related to desktop
+ * mode and other transitions that originate both within and outside shell.
*/
class DesktopTasksTransitionObserver(
context: Context,
private val desktopModeTaskRepository: DesktopModeTaskRepository,
private val transitions: Transitions,
+ private val shellTaskOrganizer: ShellTaskOrganizer,
shellInit: ShellInit
) : Transitions.TransitionObserver {
init {
- if (Transitions.ENABLE_SHELL_TRANSITIONS &&
- DesktopModeStatus.canEnterDesktopMode(context)) {
+ if (
+ Transitions.ENABLE_SHELL_TRANSITIONS && DesktopModeStatus.canEnterDesktopMode(context)
+ ) {
shellInit.addInitCallback(::onInit, this)
}
}
fun onInit() {
- KtProtoLog.d(WM_SHELL_DESKTOP_MODE, "DesktopTasksTransitionObserver: onInit")
+ ProtoLog.d(WM_SHELL_DESKTOP_MODE, "DesktopTasksTransitionObserver: onInit")
transitions.registerObserver(this)
}
@@ -83,8 +86,16 @@ class DesktopTasksTransitionObserver(
change.taskInfo?.let { taskInfo ->
if (DesktopWallpaperActivity.isWallpaperTask(taskInfo)) {
when (change.mode) {
- WindowManager.TRANSIT_OPEN ->
+ WindowManager.TRANSIT_OPEN -> {
desktopModeTaskRepository.wallpaperActivityToken = taskInfo.token
+ // After the task for the wallpaper is created, set it non-trimmable.
+ // This is important to prevent recents from trimming and removing the
+ // task.
+ shellTaskOrganizer.applyTransaction(
+ WindowContainerTransaction()
+ .setTaskTrimmableFromRecents(taskInfo.token, false)
+ )
+ }
WindowManager.TRANSIT_CLOSE ->
desktopModeTaskRepository.wallpaperActivityToken = null
else -> {}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopWallpaperActivity.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopWallpaperActivity.kt
index c4a4474689fa..1c2415c236ad 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopWallpaperActivity.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopWallpaperActivity.kt
@@ -21,8 +21,8 @@ import android.app.ActivityManager
import android.content.ComponentName
import android.os.Bundle
import android.view.WindowManager
+import com.android.internal.protolog.ProtoLog
import com.android.wm.shell.protolog.ShellProtoLogGroup.WM_SHELL_DESKTOP_MODE
-import com.android.wm.shell.util.KtProtoLog
/**
* A transparent activity used in the desktop mode to show the wallpaper under the freeform windows.
@@ -36,7 +36,7 @@ import com.android.wm.shell.util.KtProtoLog
class DesktopWallpaperActivity : Activity() {
override fun onCreate(savedInstanceState: Bundle?) {
- KtProtoLog.d(WM_SHELL_DESKTOP_MODE, "DesktopWallpaperActivity: onCreate")
+ ProtoLog.d(WM_SHELL_DESKTOP_MODE, "DesktopWallpaperActivity: onCreate")
super.onCreate(savedInstanceState)
window.addFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE)
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DragToDesktopTransitionHandler.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DragToDesktopTransitionHandler.kt
index d99b724c936f..9e79eddb0e59 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DragToDesktopTransitionHandler.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DragToDesktopTransitionHandler.kt
@@ -29,6 +29,10 @@ import android.window.TransitionInfo.Change
import android.window.TransitionRequestInfo
import android.window.WindowContainerToken
import android.window.WindowContainerTransaction
+import com.android.internal.protolog.ProtoLog
+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
+import com.android.internal.jank.InteractionJankMonitor
import com.android.wm.shell.RootTaskDisplayAreaOrganizer
import com.android.wm.shell.common.split.SplitScreenConstants.SPLIT_POSITION_BOTTOM_OR_RIGHT
import com.android.wm.shell.common.split.SplitScreenConstants.SPLIT_POSITION_TOP_OR_LEFT
@@ -42,7 +46,6 @@ import com.android.wm.shell.transition.Transitions.TRANSIT_DESKTOP_MODE_CANCEL_D
import com.android.wm.shell.transition.Transitions.TRANSIT_DESKTOP_MODE_END_DRAG_TO_DESKTOP
import com.android.wm.shell.transition.Transitions.TRANSIT_DESKTOP_MODE_START_DRAG_TO_DESKTOP
import com.android.wm.shell.transition.Transitions.TransitionHandler
-import com.android.wm.shell.util.KtProtoLog
import com.android.wm.shell.windowdecor.MoveToDesktopAnimator
import com.android.wm.shell.windowdecor.MoveToDesktopAnimator.Companion.DRAG_FREEFORM_SCALE
import com.android.wm.shell.windowdecor.OnTaskResizeAnimationListener
@@ -57,17 +60,20 @@ class DragToDesktopTransitionHandler(
private val context: Context,
private val transitions: Transitions,
private val taskDisplayAreaOrganizer: RootTaskDisplayAreaOrganizer,
- private val transactionSupplier: Supplier<SurfaceControl.Transaction>
+ private val interactionJankMonitor: InteractionJankMonitor,
+ private val transactionSupplier: Supplier<SurfaceControl.Transaction>,
) : TransitionHandler {
constructor(
context: Context,
transitions: Transitions,
- rootTaskDisplayAreaOrganizer: RootTaskDisplayAreaOrganizer
+ rootTaskDisplayAreaOrganizer: RootTaskDisplayAreaOrganizer,
+ interactionJankMonitor: InteractionJankMonitor
) : this(
context,
transitions,
rootTaskDisplayAreaOrganizer,
+ interactionJankMonitor,
Supplier { SurfaceControl.Transaction() }
)
@@ -114,7 +120,7 @@ class DragToDesktopTransitionHandler(
dragToDesktopAnimator: MoveToDesktopAnimator,
) {
if (inProgress) {
- KtProtoLog.v(
+ ProtoLog.v(
ShellProtoLogGroup.WM_SHELL_DESKTOP_MODE,
"DragToDesktop: Drag to desktop transition already in progress."
)
@@ -567,6 +573,8 @@ class DragToDesktopTransitionHandler(
onTaskResizeAnimationListener.onAnimationEnd(state.draggedTaskId)
startTransitionFinishCb.onTransitionFinished(null /* null */)
clearState()
+ interactionJankMonitor.end(
+ CUJ_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_RELEASE)
}
}
)
@@ -599,11 +607,15 @@ class DragToDesktopTransitionHandler(
) {
val state = transitionState ?: return
if (aborted && state.startTransitionToken == transition) {
- KtProtoLog.v(
+ ProtoLog.v(
ShellProtoLogGroup.WM_SHELL_DESKTOP_MODE,
"DragToDesktop: onTransitionConsumed() start transition aborted"
)
state.startAborted = true
+ // Cancel CUJ interaction if the transition is aborted.
+ interactionJankMonitor.cancel(CUJ_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_HOLD)
+ } else if (state.cancelTransitionToken != transition) {
+ interactionJankMonitor.cancel(CUJ_DESKTOP_MODE_ENTER_APP_HANDLE_DRAG_RELEASE)
}
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/EnterDesktopTaskTransitionHandler.java b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/EnterDesktopTaskTransitionHandler.java
index e5b624f91c54..04506c1e66f2 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/EnterDesktopTaskTransitionHandler.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/EnterDesktopTaskTransitionHandler.java
@@ -18,6 +18,7 @@ package com.android.wm.shell.desktopmode;
import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM;
+import static com.android.internal.jank.Cuj.CUJ_DESKTOP_MODE_ENTER_MODE_APP_HANDLE_MENU;
import static com.android.wm.shell.desktopmode.DesktopModeTransitionTypes.getEnterTransitionType;
import static com.android.wm.shell.desktopmode.DesktopModeTransitionTypes.isEnterDesktopModeTransition;
@@ -39,6 +40,7 @@ import android.window.WindowContainerTransaction;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
+import com.android.internal.jank.InteractionJankMonitor;
import com.android.wm.shell.common.desktopmode.DesktopModeTransitionSource;
import com.android.wm.shell.transition.Transitions;
import com.android.wm.shell.windowdecor.OnTaskResizeAnimationListener;
@@ -60,18 +62,21 @@ public class EnterDesktopTaskTransitionHandler implements Transitions.Transition
public static final int FREEFORM_ANIMATION_DURATION = 336;
private final List<IBinder> mPendingTransitionTokens = new ArrayList<>();
+ private final InteractionJankMonitor mInteractionJankMonitor;
private OnTaskResizeAnimationListener mOnTaskResizeAnimationListener;
public EnterDesktopTaskTransitionHandler(
- Transitions transitions) {
- this(transitions, SurfaceControl.Transaction::new);
+ Transitions transitions, InteractionJankMonitor interactionJankMonitor) {
+ this(transitions, interactionJankMonitor, SurfaceControl.Transaction::new);
}
public EnterDesktopTaskTransitionHandler(
Transitions transitions,
+ InteractionJankMonitor interactionJankMonitor,
Supplier<SurfaceControl.Transaction> supplier) {
mTransitions = transitions;
+ mInteractionJankMonitor = interactionJankMonitor;
mTransactionSupplier = supplier;
}
@@ -175,6 +180,7 @@ public class EnterDesktopTaskTransitionHandler implements Transitions.Transition
mOnTaskResizeAnimationListener.onAnimationEnd(taskInfo.taskId);
mTransitions.getMainExecutor().execute(
() -> finishCallback.onTransitionFinished(null));
+ mInteractionJankMonitor.end(CUJ_DESKTOP_MODE_ENTER_MODE_APP_HANDLE_MENU);
}
});
animator.start();
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/docs/debugging.md b/libs/WindowManager/Shell/src/com/android/wm/shell/docs/debugging.md
index b1cbe8d98397..84f6af4125b8 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/docs/debugging.md
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/docs/debugging.md
@@ -68,7 +68,7 @@ adb shell dumpsys SurfaceFlinger
## Tracing global SurfaceControl transaction updates
While Winscope traces are very useful, it sometimes doesn't give you enough information about which
-part of the code is initiating the transaction updates. In such cases, it can be helpful to get
+part of the code is initiating the transaction updates. In such cases, it can be helpful to get
stack traces when specific surface transaction calls are made, which is possible by enabling the
following system properties for example:
```shell
@@ -81,9 +81,11 @@ adb logcat -s "SurfaceControlRegistry"
# Disabling logging
adb shell setprop persist.wm.debug.sc.tx.log_match_call \"\"
adb shell setprop persist.wm.debug.sc.tx.log_match_name \"\"
-adb reboot
```
+A reboot is required to enable the logging. Once enabled, reboot is not needed to update the
+properties.
+
It is not necessary to set both `log_match_call` and `log_match_name`, but note logs can be quite
noisy if unfiltered.
@@ -97,7 +99,7 @@ adb reboot
adb logcat -s "SurfaceControlRegistry"
```
-## Tracing activity starts in the app process
+## Tracing activity starts & finishes in the app process
It's sometimes useful to know when to see a stack trace of when an activity starts in the app code
(ie. if you are repro'ing a bug related to activity starts). You can enable this system property to
@@ -113,6 +115,19 @@ adb shell setprop persist.wm.debug.start_activity \"\"
adb reboot
```
+Likewise, to trace where a finish() call may be made in the app process, you can enable this system
+property:
+```shell
+# Enabling
+adb shell setprop persist.wm.debug.finish_activity true
+adb reboot
+adb logcat -s "Instrumentation"
+
+# Disabling
+adb shell setprop persist.wm.debug.finish_activity \"\"
+adb reboot
+```
+
## Dumps
Because the Shell library is built as a part of SystemUI, dumping the state is currently done as a
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/draganddrop/DragAndDropController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/draganddrop/DragAndDropController.java
index b3c3a3dcf272..e00353d6ac82 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/draganddrop/DragAndDropController.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/draganddrop/DragAndDropController.java
@@ -52,6 +52,7 @@ import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.widget.FrameLayout;
+import android.window.WindowContainerToken;
import android.window.WindowContainerTransaction;
import androidx.annotation.BinderThread;
@@ -301,7 +302,7 @@ public class DragAndDropController implements RemoteCallable<DragAndDropControll
break;
}
}
- if (pd == null || !pd.isHandlingDrag) {
+ if (pd == null || pd.activeDragCount <= 0 || !pd.isHandlingDrag) {
// Not currently dragging
return;
}
@@ -332,9 +333,10 @@ public class DragAndDropController implements RemoteCallable<DragAndDropControll
mActiveDragDisplay = displayId;
pd.isHandlingDrag = DragUtils.canHandleDrag(event);
ProtoLog.v(ShellProtoLogGroup.WM_SHELL_DRAG_AND_DROP,
- "Clip description: handlingDrag=%b itemCount=%d mimeTypes=%s",
+ "Clip description: handlingDrag=%b itemCount=%d mimeTypes=%s flags=%s",
pd.isHandlingDrag, event.getClipData().getItemCount(),
- DragUtils.getMimeTypesConcatenated(description));
+ DragUtils.getMimeTypesConcatenated(description),
+ DragUtils.dragFlagsToString(event.getDragFlags()));
}
if (!pd.isHandlingDrag) {
@@ -353,6 +355,12 @@ public class DragAndDropController implements RemoteCallable<DragAndDropControll
pd.dragSession.initialize();
pd.activeDragCount++;
pd.dragLayout.prepare(pd.dragSession, mLogger.logStart(pd.dragSession));
+ if (pd.dragSession.hideDragSourceTaskId != -1) {
+ ProtoLog.v(ShellProtoLogGroup.WM_SHELL_DRAG_AND_DROP,
+ "Hiding task surface: taskId=%d", pd.dragSession.hideDragSourceTaskId);
+ mShellTaskOrganizer.setTaskSurfaceVisibility(
+ pd.dragSession.hideDragSourceTaskId, false /* visible */);
+ }
setDropTargetWindowVisibility(pd, View.VISIBLE);
notifyListeners(l -> {
l.onDragStarted();
@@ -382,6 +390,13 @@ public class DragAndDropController implements RemoteCallable<DragAndDropControll
if (pd.dragLayout.hasDropped()) {
mLogger.logDrop();
} else {
+ if (pd.dragSession.hideDragSourceTaskId != -1) {
+ ProtoLog.v(ShellProtoLogGroup.WM_SHELL_DRAG_AND_DROP,
+ "Re-showing task surface: taskId=%d",
+ pd.dragSession.hideDragSourceTaskId);
+ mShellTaskOrganizer.setTaskSurfaceVisibility(
+ pd.dragSession.hideDragSourceTaskId, true /* visible */);
+ }
pd.activeDragCount--;
pd.dragLayout.hide(event, () -> {
if (pd.activeDragCount == 0) {
@@ -435,7 +450,16 @@ public class DragAndDropController implements RemoteCallable<DragAndDropControll
private boolean handleDrop(DragEvent event, PerDisplay pd) {
final SurfaceControl dragSurface = event.getDragSurface();
pd.activeDragCount--;
- return pd.dragLayout.drop(event, dragSurface, () -> {
+ // Find the token of the task to hide as a part of entering split
+ WindowContainerToken hideTaskToken = null;
+ if (pd.dragSession.hideDragSourceTaskId != -1) {
+ ActivityManager.RunningTaskInfo info = mShellTaskOrganizer.getRunningTaskInfo(
+ pd.dragSession.hideDragSourceTaskId);
+ if (info != null) {
+ hideTaskToken = info.token;
+ }
+ }
+ return pd.dragLayout.drop(event, dragSurface, hideTaskToken, () -> {
if (pd.activeDragCount == 0) {
// Hide the window if another drag hasn't been started while animating the drop
setDropTargetWindowVisibility(pd, View.INVISIBLE);
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/draganddrop/DragAndDropPolicy.java b/libs/WindowManager/Shell/src/com/android/wm/shell/draganddrop/DragAndDropPolicy.java
index 9c7476d1a1b0..7e0362475f21 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/draganddrop/DragAndDropPolicy.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/draganddrop/DragAndDropPolicy.java
@@ -16,7 +16,7 @@
package com.android.wm.shell.draganddrop;
-import static android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED;
+import static android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS;
import static android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_DENIED;
import static android.app.ActivityTaskManager.INVALID_TASK_ID;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD;
@@ -59,6 +59,7 @@ import android.os.RemoteException;
import android.os.UserHandle;
import android.util.Log;
import android.util.Slog;
+import android.window.WindowContainerToken;
import androidx.annotation.IntDef;
import androidx.annotation.NonNull;
@@ -234,8 +235,13 @@ public class DragAndDropPolicy {
return null;
}
+ /**
+ * Handles the drop on a given {@param target}. If a {@param hideTaskToken} is set, then the
+ * handling of the drop will attempt to hide the given task as a part of the same window
+ * container transaction if possible.
+ */
@VisibleForTesting
- void handleDrop(Target target) {
+ void handleDrop(Target target, @Nullable WindowContainerToken hideTaskToken) {
if (target == null || !mTargets.contains(target)) {
return;
}
@@ -254,16 +260,17 @@ public class DragAndDropPolicy {
? mFullscreenStarter
: mSplitscreenStarter;
if (mSession.appData != null) {
- launchApp(mSession, starter, position);
+ launchApp(mSession, starter, position, hideTaskToken);
} else {
- launchIntent(mSession, starter, position);
+ launchIntent(mSession, starter, position, hideTaskToken);
}
}
/**
* Launches an app provided by SysUI.
*/
- private void launchApp(DragSession session, Starter starter, @SplitPosition int position) {
+ private void launchApp(DragSession session, Starter starter, @SplitPosition int position,
+ @Nullable WindowContainerToken hideTaskToken) {
ProtoLog.v(ShellProtoLogGroup.WM_SHELL_DRAG_AND_DROP, "Launching app data at position=%d",
position);
final ClipDescription description = session.getClipDescription();
@@ -273,8 +280,7 @@ public class DragAndDropPolicy {
baseActivityOpts.setDisallowEnterPictureInPictureWhileLaunching(true);
// Put BAL flags to avoid activity start aborted.
baseActivityOpts.setPendingIntentBackgroundActivityStartMode(
- MODE_BACKGROUND_ACTIVITY_START_ALLOWED);
- baseActivityOpts.setPendingIntentBackgroundActivityLaunchAllowedByPermission(true);
+ MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS);
final Bundle opts = baseActivityOpts.toBundle();
if (session.appData.hasExtra(EXTRA_ACTIVITY_OPTIONS)) {
opts.putAll(session.appData.getBundleExtra(EXTRA_ACTIVITY_OPTIONS));
@@ -283,8 +289,12 @@ public class DragAndDropPolicy {
if (isTask) {
final int taskId = session.appData.getIntExtra(EXTRA_TASK_ID, INVALID_TASK_ID);
- starter.startTask(taskId, position, opts);
+ starter.startTask(taskId, position, opts, hideTaskToken);
} else if (isShortcut) {
+ if (hideTaskToken != null) {
+ ProtoLog.v(ShellProtoLogGroup.WM_SHELL_DRAG_AND_DROP,
+ "Can not hide task token with starting shortcut");
+ }
final String packageName = session.appData.getStringExtra(EXTRA_PACKAGE_NAME);
final String id = session.appData.getStringExtra(EXTRA_SHORTCUT_ID);
starter.startShortcut(packageName, id, position, opts, user);
@@ -297,14 +307,15 @@ public class DragAndDropPolicy {
}
}
starter.startIntent(launchIntent, user.getIdentifier(), null /* fillIntent */,
- position, opts);
+ position, opts, hideTaskToken);
}
}
/**
* Launches an intent sender provided by an application.
*/
- private void launchIntent(DragSession session, Starter starter, @SplitPosition int position) {
+ private void launchIntent(DragSession session, Starter starter, @SplitPosition int position,
+ @Nullable WindowContainerToken hideTaskToken) {
ProtoLog.v(ShellProtoLogGroup.WM_SHELL_DRAG_AND_DROP, "Launching intent at position=%d",
position);
final ActivityOptions baseActivityOpts = ActivityOptions.makeBasic();
@@ -319,18 +330,20 @@ public class DragAndDropPolicy {
final Bundle opts = baseActivityOpts.toBundle();
starter.startIntent(session.launchableIntent,
session.launchableIntent.getCreatorUserHandle().getIdentifier(),
- null /* fillIntent */, position, opts);
+ null /* fillIntent */, position, opts, hideTaskToken);
}
/**
* Interface for actually committing the task launches.
*/
public interface Starter {
- void startTask(int taskId, @SplitPosition int position, @Nullable Bundle options);
+ void startTask(int taskId, @SplitPosition int position, @Nullable Bundle options,
+ @Nullable WindowContainerToken hideTaskToken);
void startShortcut(String packageName, String shortcutId, @SplitPosition int position,
@Nullable Bundle options, UserHandle user);
void startIntent(PendingIntent intent, int userId, Intent fillInIntent,
- @SplitPosition int position, @Nullable Bundle options);
+ @SplitPosition int position, @Nullable Bundle options,
+ @Nullable WindowContainerToken hideTaskToken);
void enterSplitScreen(int taskId, boolean leftOrTop);
/**
@@ -352,7 +365,12 @@ public class DragAndDropPolicy {
}
@Override
- public void startTask(int taskId, int position, @Nullable Bundle options) {
+ public void startTask(int taskId, int position, @Nullable Bundle options,
+ @Nullable WindowContainerToken hideTaskToken) {
+ if (hideTaskToken != null) {
+ ProtoLog.v(ShellProtoLogGroup.WM_SHELL_DRAG_AND_DROP,
+ "Default starter does not support hide task token");
+ }
try {
ActivityTaskManager.getService().startActivityFromRecents(taskId, options);
} catch (RemoteException e) {
@@ -375,7 +393,12 @@ public class DragAndDropPolicy {
@Override
public void startIntent(PendingIntent intent, int userId, @Nullable Intent fillInIntent,
- int position, @Nullable Bundle options) {
+ int position, @Nullable Bundle options,
+ @Nullable WindowContainerToken hideTaskToken) {
+ if (hideTaskToken != null) {
+ ProtoLog.v(ShellProtoLogGroup.WM_SHELL_DRAG_AND_DROP,
+ "Default starter does not support hide task token");
+ }
try {
intent.send(mContext, 0, fillInIntent, null, null, null, options);
} catch (PendingIntent.CanceledException e) {
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/draganddrop/DragLayout.java b/libs/WindowManager/Shell/src/com/android/wm/shell/draganddrop/DragLayout.java
index 910175ef3023..e4aa115347eb 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/draganddrop/DragLayout.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/draganddrop/DragLayout.java
@@ -51,8 +51,10 @@ import android.view.ViewTreeObserver;
import android.view.WindowInsets;
import android.view.WindowInsets.Type;
import android.widget.LinearLayout;
+import android.window.WindowContainerToken;
import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
import com.android.internal.logging.InstanceId;
import com.android.internal.protolog.ProtoLog;
@@ -291,6 +293,8 @@ public class DragLayout extends LinearLayout
int bgColor1 = getResizingBackgroundColor(taskInfo1).toArgb();
mDropZoneView1.setAppInfo(bgColor1, icon1);
mDropZoneView2.setAppInfo(bgColor1, icon1);
+ mDropZoneView1.setForceIgnoreBottomMargin(false);
+ mDropZoneView2.setForceIgnoreBottomMargin(false);
updateDropZoneSizes(null, null); // passing null splits the views evenly
} else {
// We use the first drop zone to show the fullscreen highlight, and don't need
@@ -483,13 +487,13 @@ public class DragLayout extends LinearLayout
/**
* Handles the drop onto a target and animates out the visible drop targets.
*/
- public boolean drop(DragEvent event, SurfaceControl dragSurface,
- Runnable dropCompleteCallback) {
+ public boolean drop(DragEvent event, @NonNull SurfaceControl dragSurface,
+ @Nullable WindowContainerToken hideTaskToken, Runnable dropCompleteCallback) {
final boolean handledDrop = mCurrentTarget != null;
mHasDropped = true;
// Process the drop
- mPolicy.handleDrop(mCurrentTarget);
+ mPolicy.handleDrop(mCurrentTarget, hideTaskToken);
// Start animating the drop UI out with the drag surface
hide(event, dropCompleteCallback);
@@ -499,7 +503,7 @@ public class DragLayout extends LinearLayout
return handledDrop;
}
- private void hideDragSurface(SurfaceControl dragSurface) {
+ private void hideDragSurface(@NonNull SurfaceControl dragSurface) {
final SurfaceControl.Transaction tx = new SurfaceControl.Transaction();
final ValueAnimator dragSurfaceAnimator = ValueAnimator.ofFloat(0f, 1f);
// Currently the splash icon animation runs with the default ValueAnimator duration of
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/draganddrop/DragSession.java b/libs/WindowManager/Shell/src/com/android/wm/shell/draganddrop/DragSession.java
index 3bedef21184e..dcbdfa349687 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/draganddrop/DragSession.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/draganddrop/DragSession.java
@@ -18,6 +18,7 @@ package com.android.wm.shell.draganddrop;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD;
import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED;
+import static android.content.ClipDescription.EXTRA_HIDE_DRAG_SOURCE_TASK_ID;
import android.app.ActivityManager;
import android.app.ActivityTaskManager;
@@ -27,6 +28,7 @@ import android.content.ClipData;
import android.content.ClipDescription;
import android.content.Intent;
import android.content.pm.ActivityInfo;
+import android.os.PersistableBundle;
import androidx.annotation.Nullable;
@@ -63,6 +65,7 @@ public class DragSession {
@WindowConfiguration.ActivityType
int runningTaskActType = ACTIVITY_TYPE_STANDARD;
boolean dragItemSupportsSplitscreen;
+ int hideDragSourceTaskId = -1;
DragSession(ActivityTaskManager activityTaskManager,
DisplayLayout dispLayout, ClipData data, int dragFlags) {
@@ -70,6 +73,11 @@ public class DragSession {
mInitialDragData = data;
mInitialDragFlags = dragFlags;
displayLayout = dispLayout;
+ hideDragSourceTaskId = data.getDescription().getExtras() != null
+ ? data.getDescription().getExtras().getInt(EXTRA_HIDE_DRAG_SOURCE_TASK_ID, -1)
+ : -1;
+ ProtoLog.v(ShellProtoLogGroup.WM_SHELL_DRAG_AND_DROP,
+ "Extracting drag source taskId: taskId=%d", hideDragSourceTaskId);
}
/**
@@ -84,16 +92,27 @@ public class DragSession {
* Updates the running task for this drag session.
*/
void updateRunningTask() {
+ final boolean hideDragSourceTask = hideDragSourceTaskId != -1;
final List<ActivityManager.RunningTaskInfo> tasks =
- mActivityTaskManager.getTasks(1, false /* filterOnlyVisibleRecents */);
+ mActivityTaskManager.getTasks(hideDragSourceTask ? 2 : 1,
+ false /* filterOnlyVisibleRecents */);
if (!tasks.isEmpty()) {
- final ActivityManager.RunningTaskInfo task = tasks.get(0);
- runningTaskInfo = task;
- runningTaskWinMode = task.getWindowingMode();
- runningTaskActType = task.getActivityType();
- ProtoLog.v(ShellProtoLogGroup.WM_SHELL_DRAG_AND_DROP,
- "Running task: id=%d component=%s", task.taskId,
- task.baseIntent != null ? task.baseIntent.getComponent() : "null");
+ for (int i = tasks.size() - 1; i >= 0; i--) {
+ final ActivityManager.RunningTaskInfo task = tasks.get(i);
+ if (hideDragSourceTask && hideDragSourceTaskId == task.taskId) {
+ ProtoLog.v(ShellProtoLogGroup.WM_SHELL_DRAG_AND_DROP,
+ "Skipping running task: id=%d component=%s", task.taskId,
+ task.baseIntent != null ? task.baseIntent.getComponent() : "null");
+ continue;
+ }
+ runningTaskInfo = task;
+ runningTaskWinMode = task.getWindowingMode();
+ runningTaskActType = task.getActivityType();
+ ProtoLog.v(ShellProtoLogGroup.WM_SHELL_DRAG_AND_DROP,
+ "Running task: id=%d component=%s", task.taskId,
+ task.baseIntent != null ? task.baseIntent.getComponent() : "null");
+ break;
+ }
}
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/draganddrop/DragUtils.java b/libs/WindowManager/Shell/src/com/android/wm/shell/draganddrop/DragUtils.java
index e215870f1894..22cfa328bfda 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/draganddrop/DragUtils.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/draganddrop/DragUtils.java
@@ -19,16 +19,28 @@ package com.android.wm.shell.draganddrop;
import static android.content.ClipDescription.MIMETYPE_APPLICATION_ACTIVITY;
import static android.content.ClipDescription.MIMETYPE_APPLICATION_SHORTCUT;
import static android.content.ClipDescription.MIMETYPE_APPLICATION_TASK;
+import static android.view.View.DRAG_FLAG_ACCESSIBILITY_ACTION;
+import static android.view.View.DRAG_FLAG_GLOBAL;
+import static android.view.View.DRAG_FLAG_GLOBAL_PERSISTABLE_URI_PERMISSION;
+import static android.view.View.DRAG_FLAG_GLOBAL_PREFIX_URI_PERMISSION;
+import static android.view.View.DRAG_FLAG_GLOBAL_SAME_APPLICATION;
+import static android.view.View.DRAG_FLAG_GLOBAL_URI_READ;
+import static android.view.View.DRAG_FLAG_GLOBAL_URI_WRITE;
+import static android.view.View.DRAG_FLAG_HIDE_CALLING_TASK_ON_DRAG_START;
+import static android.view.View.DRAG_FLAG_OPAQUE;
+import static android.view.View.DRAG_FLAG_REQUEST_SURFACE_FOR_RETURN_ANIMATION;
+import static android.view.View.DRAG_FLAG_START_INTENT_SENDER_ON_UNHANDLED_DRAG;
import android.app.PendingIntent;
import android.content.ClipData;
import android.content.ClipDescription;
import android.view.DragEvent;
-import android.view.View;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
+import java.util.StringJoiner;
+
/** Collection of utility classes for handling drag and drop. */
public class DragUtils {
private static final String TAG = "DragUtils";
@@ -76,7 +88,7 @@ public class DragUtils {
*/
@Nullable
public static PendingIntent getLaunchIntent(@NonNull ClipData data, int dragFlags) {
- if ((dragFlags & View.DRAG_FLAG_START_INTENT_SENDER_ON_UNHANDLED_DRAG) == 0) {
+ if ((dragFlags & DRAG_FLAG_START_INTENT_SENDER_ON_UNHANDLED_DRAG) == 0) {
// Disallow launching the intent if the app does not want to delegate it to the system
return null;
}
@@ -105,4 +117,35 @@ public class DragUtils {
}
return mimeTypes;
}
+
+ /**
+ * Returns the string description of the given {@param dragFlags}.
+ */
+ public static String dragFlagsToString(int dragFlags) {
+ StringJoiner str = new StringJoiner("|");
+ if ((dragFlags & DRAG_FLAG_GLOBAL) != 0) {
+ str.add("GLOBAL");
+ } else if ((dragFlags & DRAG_FLAG_GLOBAL_URI_READ) != 0) {
+ str.add("GLOBAL_URI_READ");
+ } else if ((dragFlags & DRAG_FLAG_GLOBAL_URI_WRITE) != 0) {
+ str.add("GLOBAL_URI_WRITE");
+ } else if ((dragFlags & DRAG_FLAG_GLOBAL_PERSISTABLE_URI_PERMISSION) != 0) {
+ str.add("GLOBAL_PERSISTABLE_URI_PERMISSION");
+ } else if ((dragFlags & DRAG_FLAG_GLOBAL_PREFIX_URI_PERMISSION) != 0) {
+ str.add("GLOBAL_PREFIX_URI_PERMISSION");
+ } else if ((dragFlags & DRAG_FLAG_OPAQUE) != 0) {
+ str.add("OPAQUE");
+ } else if ((dragFlags & DRAG_FLAG_ACCESSIBILITY_ACTION) != 0) {
+ str.add("ACCESSIBILITY_ACTION");
+ } else if ((dragFlags & DRAG_FLAG_REQUEST_SURFACE_FOR_RETURN_ANIMATION) != 0) {
+ str.add("REQUEST_SURFACE_FOR_RETURN_ANIMATION");
+ } else if ((dragFlags & DRAG_FLAG_GLOBAL_SAME_APPLICATION) != 0) {
+ str.add("GLOBAL_SAME_APPLICATION");
+ } else if ((dragFlags & DRAG_FLAG_START_INTENT_SENDER_ON_UNHANDLED_DRAG) != 0) {
+ str.add("START_INTENT_SENDER_ON_UNHANDLED_DRAG");
+ } else if ((dragFlags & DRAG_FLAG_HIDE_CALLING_TASK_ON_DRAG_START) != 0) {
+ str.add("HIDE_CALLING_TASK_ON_DRAG_START");
+ }
+ return str.toString();
+ }
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/draganddrop/DropZoneView.java b/libs/WindowManager/Shell/src/com/android/wm/shell/draganddrop/DropZoneView.java
index b6b49a87484e..18cd2d84d32d 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/draganddrop/DropZoneView.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/draganddrop/DropZoneView.java
@@ -151,6 +151,10 @@ public class DropZoneView extends FrameLayout {
/** Ignores the bottom margin provided by the insets. */
public void setForceIgnoreBottomMargin(boolean ignoreBottomMargin) {
+ if (DEBUG_LAYOUT) {
+ ProtoLog.v(ShellProtoLogGroup.WM_SHELL_DRAG_AND_DROP,
+ "setForceIgnoreBottomMargin: ignore=%b", ignoreBottomMargin);
+ }
mIgnoreBottomMargin = ignoreBottomMargin;
if (mMarginPercent > 0) {
mMarginView.invalidate();
@@ -159,8 +163,14 @@ public class DropZoneView extends FrameLayout {
/** Sets the bottom inset so the drop zones are above bottom navigation. */
public void setBottomInset(float bottom) {
+ if (DEBUG_LAYOUT) {
+ ProtoLog.v(ShellProtoLogGroup.WM_SHELL_DRAG_AND_DROP, "setBottomInset: inset=%f",
+ bottom);
+ }
mBottomInset = bottom;
- ((LayoutParams) mSplashScreenView.getLayoutParams()).bottomMargin = (int) bottom;
+ final LayoutParams lp = (LayoutParams) mSplashScreenView.getLayoutParams();
+ lp.bottomMargin = (int) bottom;
+ mSplashScreenView.setLayoutParams(lp);
if (mMarginPercent > 0) {
mMarginView.invalidate();
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipAnimationController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipAnimationController.java
index a8346a9b3b48..852382ddfba1 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipAnimationController.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipAnimationController.java
@@ -230,6 +230,7 @@ public class PipAnimationController {
/**
* Quietly cancel the animator by removing the listeners first.
+ * TODO(b/275003573): deprecate this, cancelling without the proper callbacks is problematic.
*/
static void quietCancel(@NonNull ValueAnimator animator) {
animator.removeAllUpdateListeners();
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTaskOrganizer.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTaskOrganizer.java
index 6e1e44b7ede0..723a53128bd0 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTaskOrganizer.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTaskOrganizer.java
@@ -1983,12 +1983,6 @@ public class PipTaskOrganizer implements ShellTaskOrganizer.TaskListener,
}
clearContentOverlay();
}
- if (mPipTransitionState.getTransitionState() == PipTransitionState.UNDEFINED) {
- // Avoid double removal, which is fatal.
- ProtoLog.w(ShellProtoLogGroup.WM_SHELL_PICTURE_IN_PICTURE,
- "%s: trying to remove overlay (%s) while in UNDEFINED state", TAG, surface);
- return;
- }
if (surface == null || !surface.isValid()) {
ProtoLog.w(ShellProtoLogGroup.WM_SHELL_PICTURE_IN_PICTURE,
"%s: trying to remove invalid content overlay (%s)", TAG, surface);
@@ -2032,7 +2026,7 @@ public class PipTaskOrganizer implements ShellTaskOrganizer.TaskListener,
removeContentOverlay(mPipOverlay, null /* callback */);
}
if (animator != null) {
- PipAnimationController.quietCancel(animator);
+ animator.cancel();
mPipAnimationController.resetAnimatorState();
}
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransition.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransition.java
index 87692ac52908..a52141c5f9d6 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransition.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransition.java
@@ -1020,6 +1020,9 @@ public class PipTransition extends PipTransitionController {
mPipMenuController.attach(leash);
}
+ // Make sure we have the launcher shelf into destination bounds calculation
+ // before the animator starts.
+ mPipBoundsState.mayUseCachedLauncherShelfHeight();
final Rect destinationBounds = mPipBoundsAlgorithm.getEntryDestinationBounds();
final Rect currentBounds = pipChange.getStartAbsBounds();
@@ -1173,8 +1176,13 @@ public class PipTransition extends PipTransitionController {
.setLayer(swipePipToHomeOverlay, Integer.MAX_VALUE);
}
- final Rect sourceBounds = pipTaskInfo.configuration.windowConfiguration.getBounds();
sendOnPipTransitionStarted(TRANSITION_DIRECTION_TO_PIP);
+ // Both Shell and Launcher calculate their own "adjusted" source-rect-hint values based on
+ // appBounds being source bounds when entering PiP.
+ final Rect sourceBounds = swipePipToHomeOverlay == null
+ ? pipTaskInfo.configuration.windowConfiguration.getBounds()
+ : mPipOrganizer.mAppBounds;
+
final PipAnimationController.PipTransitionAnimator animator =
mPipAnimationController.getAnimator(pipTaskInfo, leash, sourceBounds, sourceBounds,
destinationBounds, sourceHintRect, TRANSITION_DIRECTION_TO_PIP,
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransitionController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransitionController.java
index 8d36db97c511..fc9e2becf98c 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransitionController.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransitionController.java
@@ -192,6 +192,8 @@ public abstract class PipTransitionController implements Transitions.TransitionH
protected void sendOnPipTransitionStarted(
@PipAnimationController.TransitionDirection int direction) {
final Rect pipBounds = mPipBoundsState.getBounds();
+ ProtoLog.d(ShellProtoLogGroup.WM_SHELL_PICTURE_IN_PICTURE,
+ "sendOnPipTransitionStarted direction=%d, bounds=%s", direction, pipBounds);
for (Map.Entry<PipTransitionCallback, Executor> entry
: mPipTransitionCallbacks.entrySet()) {
entry.getValue().execute(
@@ -212,6 +214,8 @@ public abstract class PipTransitionController implements Transitions.TransitionH
protected void sendOnPipTransitionFinished(
@PipAnimationController.TransitionDirection int direction) {
+ ProtoLog.d(ShellProtoLogGroup.WM_SHELL_PICTURE_IN_PICTURE,
+ "sendOnPipTransitionFinished direction=%d", direction);
for (Map.Entry<PipTransitionCallback, Executor> entry
: mPipTransitionCallbacks.entrySet()) {
entry.getValue().execute(
@@ -232,6 +236,8 @@ public abstract class PipTransitionController implements Transitions.TransitionH
protected void sendOnPipTransitionCancelled(
@PipAnimationController.TransitionDirection int direction) {
+ ProtoLog.d(ShellProtoLogGroup.WM_SHELL_PICTURE_IN_PICTURE,
+ "sendOnPipTransitionCancelled direction=%d", direction);
for (Map.Entry<PipTransitionCallback, Executor> entry
: mPipTransitionCallbacks.entrySet()) {
entry.getValue().execute(
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipController.java
index d1d82755d12c..7451d2251588 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipController.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipController.java
@@ -374,7 +374,7 @@ public class PipController implements PipTransitionController.PipTransitionCallb
* Instantiates {@link PipController}, returns {@code null} if the feature not supported.
*/
@Nullable
- public static Pip create(Context context,
+ public static PipImpl create(Context context,
ShellInit shellInit,
ShellCommandHandler shellCommandHandler,
ShellController shellController,
@@ -646,9 +646,9 @@ public class PipController implements PipTransitionController.PipTransitionCallb
});
mTabletopModeController.registerOnTabletopModeChangedListener((isInTabletopMode) -> {
- final String tag = "tabletop-mode";
if (!isInTabletopMode) {
- mPipBoundsState.removeNamedUnrestrictedKeepClearArea(tag);
+ mPipBoundsState.setNamedUnrestrictedKeepClearArea(
+ PipBoundsState.NAMED_KCA_TABLETOP_MODE, null);
return;
}
@@ -657,14 +657,16 @@ public class PipController implements PipTransitionController.PipTransitionCallb
if (mTabletopModeController.getPreferredHalfInTabletopMode()
== TabletopModeController.PREFERRED_TABLETOP_HALF_TOP) {
// Prefer top, avoid the bottom half of the display.
- mPipBoundsState.addNamedUnrestrictedKeepClearArea(tag, new Rect(
- displayBounds.left, displayBounds.centerY(),
- displayBounds.right, displayBounds.bottom));
+ mPipBoundsState.setNamedUnrestrictedKeepClearArea(
+ PipBoundsState.NAMED_KCA_TABLETOP_MODE, new Rect(
+ displayBounds.left, displayBounds.centerY(),
+ displayBounds.right, displayBounds.bottom));
} else {
// Prefer bottom, avoid the top half of the display.
- mPipBoundsState.addNamedUnrestrictedKeepClearArea(tag, new Rect(
- displayBounds.left, displayBounds.top,
- displayBounds.right, displayBounds.centerY()));
+ mPipBoundsState.setNamedUnrestrictedKeepClearArea(
+ PipBoundsState.NAMED_KCA_TABLETOP_MODE, new Rect(
+ displayBounds.left, displayBounds.top,
+ displayBounds.right, displayBounds.centerY()));
}
// Try to move the PiP window if we have entered PiP mode.
@@ -916,10 +918,12 @@ public class PipController implements PipTransitionController.PipTransitionCallb
0, mPipBoundsState.getDisplayBounds().bottom - height,
mPipBoundsState.getDisplayBounds().right,
mPipBoundsState.getDisplayBounds().bottom);
- mPipBoundsState.addNamedUnrestrictedKeepClearArea(LAUNCHER_KEEP_CLEAR_AREA_TAG, rect);
+ mPipBoundsState.setNamedUnrestrictedKeepClearArea(
+ PipBoundsState.NAMED_KCA_LAUNCHER_SHELF, rect);
updatePipPositionForKeepClearAreas();
} else {
- mPipBoundsState.removeNamedUnrestrictedKeepClearArea(LAUNCHER_KEEP_CLEAR_AREA_TAG);
+ mPipBoundsState.setNamedUnrestrictedKeepClearArea(
+ PipBoundsState.NAMED_KCA_LAUNCHER_SHELF, null);
// postpone moving in response to hide of Launcher in case there's another change
mMainExecutor.removeCallbacks(mMovePipInResponseToKeepClearAreasChangeCallback);
mMainExecutor.executeDelayed(
@@ -968,8 +972,8 @@ public class PipController implements PipTransitionController.PipTransitionCallb
int launcherRotation, Rect hotseatKeepClearArea) {
// preemptively add the keep clear area for Hotseat, so that it is taken into account
// when calculating the entry destination bounds of PiP window
- mPipBoundsState.addNamedUnrestrictedKeepClearArea(LAUNCHER_KEEP_CLEAR_AREA_TAG,
- hotseatKeepClearArea);
+ mPipBoundsState.setNamedUnrestrictedKeepClearArea(
+ PipBoundsState.NAMED_KCA_LAUNCHER_SHELF, hotseatKeepClearArea);
onDisplayRotationChangedNotInPip(mContext, launcherRotation);
// cache current min/max size
Point minSize = mPipBoundsState.getMinSize();
@@ -1177,7 +1181,7 @@ public class PipController implements PipTransitionController.PipTransitionCallb
/**
* The interface for calls from outside the Shell, within the host process.
*/
- private class PipImpl implements Pip {
+ public class PipImpl implements Pip {
@Override
public void expandPip() {
mMainExecutor.execute(() -> {
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/animation/PipEnterExitAnimator.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/animation/PipEnterExitAnimator.java
new file mode 100644
index 000000000000..8a9302bcfc98
--- /dev/null
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/animation/PipEnterExitAnimator.java
@@ -0,0 +1,150 @@
+/*
+ * 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.pip2.animation;
+
+import android.animation.Animator;
+import android.animation.RectEvaluator;
+import android.animation.ValueAnimator;
+import android.annotation.IntDef;
+import android.content.Context;
+import android.graphics.Rect;
+import android.view.SurfaceControl;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+
+import com.android.wm.shell.R;
+import com.android.wm.shell.pip2.PipSurfaceTransactionHelper;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * Animator that handles bounds animations for entering / exiting PIP.
+ */
+public class PipEnterExitAnimator extends ValueAnimator
+ implements ValueAnimator.AnimatorUpdateListener, ValueAnimator.AnimatorListener {
+ @IntDef(prefix = {"BOUNDS_"}, value = {
+ BOUNDS_ENTER,
+ BOUNDS_EXIT
+ })
+
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface BOUNDS {}
+
+ public static final int BOUNDS_ENTER = 0;
+ public static final int BOUNDS_EXIT = 1;
+
+ @NonNull private final SurfaceControl mLeash;
+ private final SurfaceControl.Transaction mStartTransaction;
+ private final int mEnterAnimationDuration;
+ private final @BOUNDS int mDirection;
+
+ // optional callbacks for tracking animation start and end
+ @Nullable private Runnable mAnimationStartCallback;
+ @Nullable private Runnable mAnimationEndCallback;
+
+ private final Rect mBaseBounds = new Rect();
+ private final Rect mStartBounds = new Rect();
+ private final Rect mEndBounds = new Rect();
+
+ // Bounds updated by the evaluator as animator is running.
+ private final Rect mAnimatedRect = new Rect();
+
+ private final PipSurfaceTransactionHelper.SurfaceControlTransactionFactory
+ mSurfaceControlTransactionFactory;
+ private final RectEvaluator mRectEvaluator;
+ private final PipSurfaceTransactionHelper mPipSurfaceTransactionHelper;
+
+ public PipEnterExitAnimator(Context context,
+ @NonNull SurfaceControl leash,
+ SurfaceControl.Transaction startTransaction,
+ @NonNull Rect baseBounds,
+ @NonNull Rect startBounds,
+ @NonNull Rect endBounds,
+ @BOUNDS int direction) {
+ mLeash = leash;
+ mStartTransaction = startTransaction;
+ mBaseBounds.set(baseBounds);
+ mStartBounds.set(startBounds);
+ mAnimatedRect.set(startBounds);
+ mEndBounds.set(endBounds);
+ mRectEvaluator = new RectEvaluator(mAnimatedRect);
+ mPipSurfaceTransactionHelper = new PipSurfaceTransactionHelper(context);
+ mDirection = direction;
+
+ mSurfaceControlTransactionFactory =
+ new PipSurfaceTransactionHelper.VsyncSurfaceControlTransactionFactory();
+ mEnterAnimationDuration = context.getResources()
+ .getInteger(R.integer.config_pipEnterAnimationDuration);
+
+ setDuration(mEnterAnimationDuration);
+ setEvaluator(mRectEvaluator);
+ addListener(this);
+ addUpdateListener(this);
+ }
+
+ public void setAnimationStartCallback(@NonNull Runnable runnable) {
+ mAnimationStartCallback = runnable;
+ }
+
+ public void setAnimationEndCallback(@NonNull Runnable runnable) {
+ mAnimationEndCallback = runnable;
+ }
+
+ @Override
+ public void onAnimationStart(@NonNull Animator animation) {
+ if (mAnimationStartCallback != null) {
+ mAnimationStartCallback.run();
+ }
+ if (mStartTransaction != null) {
+ mStartTransaction.apply();
+ }
+ }
+
+ @Override
+ public void onAnimationEnd(@NonNull Animator animation) {
+ if (mAnimationEndCallback != null) {
+ mAnimationEndCallback.run();
+ }
+ }
+
+ @Override
+ public void onAnimationUpdate(@NonNull ValueAnimator animation) {
+ final SurfaceControl.Transaction tx = mSurfaceControlTransactionFactory.getTransaction();
+ final float fraction = getAnimatedFraction();
+ // TODO (b/350801661): implement fixed rotation
+
+ mPipSurfaceTransactionHelper.scaleAndCrop(tx, mLeash, null,
+ mBaseBounds, mAnimatedRect, null, isInPipDirection(), fraction)
+ .round(tx, mLeash, isInPipDirection())
+ .shadow(tx, mLeash, isInPipDirection());
+ tx.apply();
+ }
+
+ private boolean isInPipDirection() {
+ return mDirection == BOUNDS_ENTER;
+ }
+
+ // no-ops
+
+ @Override
+ public void onAnimationCancel(@NonNull Animator animation) {}
+
+ @Override
+ public void onAnimationRepeat(@NonNull Animator animation) {}
+}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipController.java
index 06adad626e9f..b939b169d8bd 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipController.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipController.java
@@ -55,6 +55,8 @@ import com.android.wm.shell.common.pip.PipBoundsAlgorithm;
import com.android.wm.shell.common.pip.PipBoundsState;
import com.android.wm.shell.common.pip.PipDisplayLayoutState;
import com.android.wm.shell.common.pip.PipUtils;
+import com.android.wm.shell.pip.Pip;
+import com.android.wm.shell.pip.PipTransitionController;
import com.android.wm.shell.protolog.ShellProtoLogGroup;
import com.android.wm.shell.sysui.ConfigurationChangeListener;
import com.android.wm.shell.sysui.ShellCommandHandler;
@@ -62,6 +64,7 @@ import com.android.wm.shell.sysui.ShellController;
import com.android.wm.shell.sysui.ShellInit;
import java.io.PrintWriter;
+import java.util.function.Consumer;
/**
* Manages the picture-in-picture (PIP) UI and states for Phones.
@@ -86,6 +89,8 @@ public class PipController implements ConfigurationChangeListener,
private final ShellTaskOrganizer mShellTaskOrganizer;
private final PipTransitionState mPipTransitionState;
private final ShellExecutor mMainExecutor;
+ private final PipImpl mImpl;
+ private Consumer<Boolean> mOnIsInPipStateChangedListener;
// Wrapper for making Binder calls into PiP animation listener hosted in launcher's Recents.
private PipAnimationListener mPipRecentsAnimationListener;
@@ -140,6 +145,7 @@ public class PipController implements ConfigurationChangeListener,
mPipTransitionState = pipTransitionState;
mPipTransitionState.addPipTransitionStateChangedListener(this);
mMainExecutor = mainExecutor;
+ mImpl = new PipImpl();
if (PipUtils.isPip2ExperimentEnabled()) {
shellInit.addInitCallback(this::onInit, this);
@@ -174,6 +180,10 @@ public class PipController implements ConfigurationChangeListener,
pipTransitionState, mainExecutor);
}
+ public PipImpl getPipImpl() {
+ return mImpl;
+ }
+
private void onInit() {
mShellCommandHandler.addDumpCallback(this::dump, this);
// Ensure that we have the display info in case we get calls to update the bounds before the
@@ -310,22 +320,29 @@ public class PipController implements ConfigurationChangeListener,
@Override
public void onPipTransitionStateChanged(@PipTransitionState.TransitionState int oldState,
@PipTransitionState.TransitionState int newState, @Nullable Bundle extra) {
- if (newState == PipTransitionState.SWIPING_TO_PIP) {
- Preconditions.checkState(extra != null,
- "No extra bundle for " + mPipTransitionState);
-
- SurfaceControl overlay = extra.getParcelable(
- SWIPE_TO_PIP_OVERLAY, SurfaceControl.class);
- Rect appBounds = extra.getParcelable(
- SWIPE_TO_PIP_APP_BOUNDS, Rect.class);
-
- Preconditions.checkState(appBounds != null,
- "App bounds can't be null for " + mPipTransitionState);
- mPipTransitionState.setSwipePipToHomeState(overlay, appBounds);
- } else if (newState == PipTransitionState.ENTERED_PIP) {
- if (mPipTransitionState.isInSwipePipToHomeTransition()) {
- mPipTransitionState.resetSwipePipToHomeState();
- }
+ switch (newState) {
+ case PipTransitionState.SWIPING_TO_PIP:
+ Preconditions.checkState(extra != null,
+ "No extra bundle for " + mPipTransitionState);
+
+ SurfaceControl overlay = extra.getParcelable(
+ SWIPE_TO_PIP_OVERLAY, SurfaceControl.class);
+ Rect appBounds = extra.getParcelable(
+ SWIPE_TO_PIP_APP_BOUNDS, Rect.class);
+
+ Preconditions.checkState(appBounds != null,
+ "App bounds can't be null for " + mPipTransitionState);
+ mPipTransitionState.setSwipePipToHomeState(overlay, appBounds);
+ break;
+ case PipTransitionState.ENTERED_PIP:
+ if (mPipTransitionState.isInSwipePipToHomeTransition()) {
+ mPipTransitionState.resetSwipePipToHomeState();
+ }
+ mOnIsInPipStateChangedListener.accept(true /* inPip */);
+ break;
+ case PipTransitionState.EXITED_PIP:
+ mOnIsInPipStateChangedListener.accept(false /* inPip */);
+ break;
}
}
@@ -355,6 +372,48 @@ public class PipController implements ConfigurationChangeListener,
mPipTransitionState.dump(pw, innerPrefix);
}
+ private void setOnIsInPipStateChangedListener(Consumer<Boolean> callback) {
+ mOnIsInPipStateChangedListener = callback;
+ if (mOnIsInPipStateChangedListener != null) {
+ callback.accept(mPipTransitionState.isInPip());
+ }
+ }
+
+ /**
+ * The interface for calls from outside the Shell, within the host process.
+ */
+ public class PipImpl implements Pip {
+ @Override
+ public void expandPip() {}
+
+ @Override
+ public void onSystemUiStateChanged(boolean isSysUiStateValid, long flag) {}
+
+ @Override
+ public void setOnIsInPipStateChangedListener(Consumer<Boolean> callback) {
+ mMainExecutor.execute(() -> {
+ PipController.this.setOnIsInPipStateChangedListener(callback);
+ });
+ }
+
+ @Override
+ public void addPipExclusionBoundsChangeListener(Consumer<Rect> listener) {
+ mMainExecutor.execute(() -> {
+ mPipBoundsState.addPipExclusionBoundsChangeCallback(listener);
+ });
+ }
+
+ @Override
+ public void removePipExclusionBoundsChangeListener(Consumer<Rect> listener) {
+ mMainExecutor.execute(() -> {
+ mPipBoundsState.removePipExclusionBoundsChangeCallback(listener);
+ });
+ }
+
+ @Override
+ public void showPictureInPictureMenu() {}
+ }
+
/**
* The interface for calls from outside the host process.
*/
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipMotionHelper.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipMotionHelper.java
index e277a8dbeb13..ea02de9d9704 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipMotionHelper.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipMotionHelper.java
@@ -816,6 +816,26 @@ public class PipMotionHelper implements PipAppOpsListener.Callback,
mPipBoundsState.getMotionBoundsState().onPhysicsAnimationEnded();
mSpringingToTouch = false;
mDismissalPending = false;
+
+ // Check whether new bounds after fling imply we need to update stash state too.
+ stashEndActionIfNeeded();
+ }
+
+ private void stashEndActionIfNeeded() {
+ boolean isStashing = mPipBoundsState.getBounds().right > mPipBoundsState
+ .getDisplayBounds().width() || mPipBoundsState.getBounds().left < 0;
+ if (!isStashing) {
+ return;
+ }
+
+ if (mPipBoundsState.getBounds().left < 0
+ && mPipBoundsState.getStashedState() != STASH_TYPE_LEFT) {
+ mPipBoundsState.setStashed(STASH_TYPE_LEFT);
+ } else if (mPipBoundsState.getBounds().left >= 0
+ && mPipBoundsState.getStashedState() != STASH_TYPE_RIGHT) {
+ mPipBoundsState.setStashed(STASH_TYPE_RIGHT);
+ }
+ mMenuController.hideMenu();
}
/**
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipTouchHandler.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipTouchHandler.java
index 0c4ed268fd28..53b80e8b7542 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipTouchHandler.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipTouchHandler.java
@@ -106,9 +106,6 @@ public class PipTouchHandler implements PipTransitionState.PipTransitionStateCha
private float mStashVelocityThreshold;
- // The reference inset bounds, used to determine the dismiss fraction
- private final Rect mInsetBounds = new Rect();
-
// Used to workaround an issue where the WM rotation happens before we are notified, allowing
// us to send stale bounds
private int mDeferResizeToNormalBoundsUntilRotation = -1;
@@ -206,17 +203,10 @@ public class PipTouchHandler implements PipTransitionState.PipTransitionStateCha
mMotionHelper, mainExecutor);
mTouchState = new PipTouchState(ViewConfiguration.get(context),
() -> {
- if (mPipBoundsState.isStashed()) {
- animateToUnStashedState();
- mPipUiEventLogger.log(
- PipUiEventLogger.PipUiEventEnum.PICTURE_IN_PICTURE_STASH_UNSTASHED);
- mPipBoundsState.setStashed(STASH_TYPE_NONE);
- } else {
- mMenuController.showMenuWithPossibleDelay(MENU_STATE_FULL,
- mPipBoundsState.getBounds(), true /* allowMenuTimeout */,
- willResizeMenu(),
- shouldShowResizeHandle());
- }
+ mMenuController.showMenuWithPossibleDelay(MENU_STATE_FULL,
+ mPipBoundsState.getBounds(), true /* allowMenuTimeout */,
+ willResizeMenu(),
+ shouldShowResizeHandle());
},
menuController::hideMenu,
mainExecutor);
@@ -438,7 +428,6 @@ public class PipTouchHandler implements PipTransitionState.PipTransitionStateCha
mPipBoundsState.setNormalMovementBounds(normalMovementBounds);
mPipBoundsState.setExpandedMovementBounds(expandedMovementBounds);
mDisplayRotation = displayRotation;
- mInsetBounds.set(insetBounds);
updateMovementBounds();
mMovementBoundsExtraOffsets = extraOffset;
@@ -748,10 +737,13 @@ public class PipTouchHandler implements PipTransitionState.PipTransitionStateCha
final Rect pipBounds = mPipBoundsState.getBounds();
final boolean onLeftEdge = pipBounds.left < mPipBoundsState.getDisplayBounds().left;
final Rect unStashedBounds = new Rect(0, pipBounds.top, 0, pipBounds.bottom);
- unStashedBounds.left = onLeftEdge ? mInsetBounds.left
- : mInsetBounds.right - pipBounds.width();
- unStashedBounds.right = onLeftEdge ? mInsetBounds.left + pipBounds.width()
- : mInsetBounds.right;
+
+ Rect insetBounds = new Rect();
+ mPipBoundsAlgorithm.getInsetBounds(insetBounds);
+ unStashedBounds.left = onLeftEdge ? insetBounds.left
+ : insetBounds.right - pipBounds.width();
+ unStashedBounds.right = onLeftEdge ? insetBounds.left + pipBounds.width()
+ : insetBounds.right;
mMotionHelper.animateToUnStashedBounds(unStashedBounds);
}
@@ -899,8 +891,7 @@ public class PipTouchHandler implements PipTransitionState.PipTransitionStateCha
// Reset the touch state on up before the fling settles
mTouchState.reset();
if (mEnableStash && shouldStash(vel, getPossiblyMotionBounds())) {
- // mMotionHelper.stashToEdge(vel.x, vel.y,
- // this::stashEndAction /* endAction */);
+ mMotionHelper.stashToEdge(vel.x, vel.y, null /* endAction */);
} else {
if (mPipBoundsState.isStashed()) {
// Reset stashed state if previously stashed
@@ -1030,8 +1021,10 @@ public class PipTouchHandler implements PipTransitionState.PipTransitionStateCha
* resized.
*/
private void updateMovementBounds() {
+ Rect insetBounds = new Rect();
+ mPipBoundsAlgorithm.getInsetBounds(insetBounds);
mPipBoundsAlgorithm.getMovementBounds(mPipBoundsState.getBounds(),
- mInsetBounds, mPipBoundsState.getMovementBounds(), mIsImeShowing ? mImeHeight : 0);
+ insetBounds, mPipBoundsState.getMovementBounds(), mIsImeShowing ? mImeHeight : 0);
mMotionHelper.onMovementBoundsChanged();
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipTransition.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipTransition.java
index 683d30d59b33..33703ad95a9c 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipTransition.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipTransition.java
@@ -53,6 +53,7 @@ import com.android.wm.shell.common.pip.PipUtils;
import com.android.wm.shell.pip.PipContentOverlay;
import com.android.wm.shell.pip.PipTransitionController;
import com.android.wm.shell.pip2.animation.PipAlphaAnimator;
+import com.android.wm.shell.pip2.animation.PipEnterExitAnimator;
import com.android.wm.shell.sysui.ShellInit;
import com.android.wm.shell.transition.Transitions;
@@ -378,12 +379,34 @@ public class PipTransition extends PipTransitionController implements
if (pipChange == null) {
return false;
}
- // cache the PiP task token and leash
+
WindowContainerToken pipTaskToken = pipChange.getContainer();
+ if (pipTaskToken == null) {
+ return false;
+ }
- startTransaction.apply();
- // TODO: b/275910498 Use a new implementation of the PiP animator here.
- finishCallback.onTransitionFinished(null);
+ WindowContainerTransaction finishWct = new WindowContainerTransaction();
+ SurfaceControl.Transaction tx = new SurfaceControl.Transaction();
+
+ Rect startBounds = pipChange.getStartAbsBounds();
+ Rect endBounds = pipChange.getEndAbsBounds();
+ SurfaceControl pipLeash = mPipTransitionState.mPinnedTaskLeash;
+ Preconditions.checkNotNull(pipLeash, "Leash is null for bounds transition.");
+
+ PipEnterExitAnimator animator = new PipEnterExitAnimator(mContext, pipLeash,
+ startTransaction, startBounds, startBounds, endBounds,
+ PipEnterExitAnimator.BOUNDS_ENTER);
+
+ tx.addTransactionCommittedListener(mPipScheduler.getMainExecutor(),
+ this::onClientDrawAtTransitionEnd);
+ finishWct.setBoundsChangeTransaction(pipTaskToken, tx);
+
+ animator.setAnimationEndCallback(() -> {
+ mPipTransitionState.setState(PipTransitionState.ENTERED_PIP);
+ finishCallback.onTransitionFinished(finishWct.isEmpty() ? null : finishWct);
+ });
+
+ animator.start();
return true;
}
@@ -421,10 +444,25 @@ public class PipTransition extends PipTransitionController implements
@NonNull SurfaceControl.Transaction startTransaction,
@NonNull SurfaceControl.Transaction finishTransaction,
@NonNull Transitions.TransitionFinishCallback finishCallback) {
- startTransaction.apply();
- // TODO: b/275910498 Use a new implementation of the PiP animator here.
- finishCallback.onTransitionFinished(null);
- mPipTransitionState.setState(PipTransitionState.EXITED_PIP);
+ TransitionInfo.Change pipChange = getPipChange(info);
+ if (pipChange == null) {
+ return false;
+ }
+
+ Rect startBounds = pipChange.getStartAbsBounds();
+ Rect endBounds = pipChange.getEndAbsBounds();
+ SurfaceControl pipLeash = mPipTransitionState.mPinnedTaskLeash;
+ Preconditions.checkNotNull(pipLeash, "Leash is null for bounds transition.");
+
+ PipEnterExitAnimator animator = new PipEnterExitAnimator(mContext, pipLeash,
+ startTransaction, startBounds, startBounds, endBounds,
+ PipEnterExitAnimator.BOUNDS_EXIT);
+ animator.setAnimationEndCallback(() -> {
+ finishCallback.onTransitionFinished(null);
+ mPipTransitionState.setState(PipTransitionState.EXITED_PIP);
+ });
+
+ animator.start();
return true;
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentTasksController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentTasksController.java
index fbb4bc42a6b8..d001b2c09f85 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentTasksController.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/recents/RecentTasksController.java
@@ -37,6 +37,7 @@ import android.util.Slog;
import android.util.SparseArray;
import android.util.SparseIntArray;
import android.view.IRecentsAnimationRunner;
+import android.window.WindowContainerToken;
import androidx.annotation.BinderThread;
import androidx.annotation.NonNull;
@@ -457,11 +458,31 @@ public class RecentTasksController implements TaskStackListenerCallback,
}
/**
- * Find the background task that match the given component.
+ * Returns the top running leaf task ignoring {@param ignoreTaskToken} if it is specified.
+ * NOTE: This path currently makes assumptions that ignoreTaskToken is for the top task.
+ */
+ @Nullable
+ public ActivityManager.RunningTaskInfo getTopRunningTask(
+ @Nullable WindowContainerToken ignoreTaskToken) {
+ List<ActivityManager.RunningTaskInfo> tasks = mActivityTaskManager.getTasks(2,
+ false /* filterOnlyVisibleRecents */);
+ for (int i = 0; i < tasks.size(); i++) {
+ final ActivityManager.RunningTaskInfo task = tasks.get(i);
+ if (task.token.equals(ignoreTaskToken)) {
+ continue;
+ }
+ return task;
+ }
+ return null;
+ }
+
+ /**
+ * Find the background task that match the given component. Ignores tasks match
+ * {@param ignoreTaskToken} if it is non-null.
*/
@Nullable
public ActivityManager.RecentTaskInfo findTaskInBackground(ComponentName componentName,
- int userId) {
+ int userId, @Nullable WindowContainerToken ignoreTaskToken) {
if (componentName == null) {
return null;
}
@@ -473,6 +494,9 @@ public class RecentTasksController implements TaskStackListenerCallback,
if (task.isVisible) {
continue;
}
+ if (task.token.equals(ignoreTaskToken)) {
+ continue;
+ }
if (componentName.equals(task.baseIntent.getComponent()) && userId == task.userId) {
return task;
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreen.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreen.java
index 8df287d12cbc..06c57bd7092d 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreen.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreen.java
@@ -113,6 +113,9 @@ public interface SplitScreen {
/** Called when device waking up finished. */
void onFinishedWakingUp();
+ /** Called when device starts going to sleep (screen off). */
+ void onStartedGoingToSleep();
+
/** Called when requested to go to fullscreen from the current active split app. */
void goToFullscreenFromSplit();
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreenController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreenController.java
index b4941a5b49b5..b8575565ef8a 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreenController.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreenController.java
@@ -50,6 +50,7 @@ import android.content.pm.LauncherApps;
import android.content.pm.ShortcutInfo;
import android.graphics.Rect;
import android.os.Bundle;
+import android.os.Handler;
import android.os.RemoteException;
import android.os.UserHandle;
import android.util.ArrayMap;
@@ -64,6 +65,7 @@ import android.view.SurfaceSession;
import android.view.WindowManager;
import android.widget.Toast;
import android.window.RemoteTransition;
+import android.window.WindowContainerToken;
import android.window.WindowContainerTransaction;
import androidx.annotation.BinderThread;
@@ -179,6 +181,7 @@ public class SplitScreenController implements DragAndDropPolicy.Starter,
private final LauncherApps mLauncherApps;
private final RootTaskDisplayAreaOrganizer mRootTDAOrganizer;
private final ShellExecutor mMainExecutor;
+ private final Handler mMainHandler;
private final SplitScreenImpl mImpl = new SplitScreenImpl();
private final DisplayController mDisplayController;
private final DisplayImeController mDisplayImeController;
@@ -226,7 +229,8 @@ public class SplitScreenController implements DragAndDropPolicy.Starter,
Optional<DesktopTasksController> desktopTasksController,
@Nullable StageCoordinator stageCoordinator,
MultiInstanceHelper multiInstanceHelper,
- ShellExecutor mainExecutor) {
+ ShellExecutor mainExecutor,
+ Handler mainHandler) {
mShellCommandHandler = shellCommandHandler;
mShellController = shellController;
mTaskOrganizer = shellTaskOrganizer;
@@ -235,6 +239,7 @@ public class SplitScreenController implements DragAndDropPolicy.Starter,
mLauncherApps = context.getSystemService(LauncherApps.class);
mRootTDAOrganizer = rootTDAOrganizer;
mMainExecutor = mainExecutor;
+ mMainHandler = mainHandler;
mDisplayController = displayController;
mDisplayImeController = displayImeController;
mDisplayInsetsController = displayInsetsController;
@@ -291,7 +296,7 @@ public class SplitScreenController implements DragAndDropPolicy.Starter,
return new StageCoordinator(mContext, DEFAULT_DISPLAY, mSyncQueue,
mTaskOrganizer, mDisplayController, mDisplayImeController,
mDisplayInsetsController, mTransitions, mTransactionPool, mIconProvider,
- mMainExecutor, mRecentTasksOptional, mLaunchAdjacentController,
+ mMainExecutor, mMainHandler, mRecentTasksOptional, mLaunchAdjacentController,
mWindowDecorViewModel);
}
@@ -447,13 +452,17 @@ public class SplitScreenController implements DragAndDropPolicy.Starter,
@Override
public void onKeyguardVisibilityChanged(boolean visible, boolean occluded,
boolean animatingDismiss) {
- mStageCoordinator.onKeyguardVisibilityChanged(visible);
+ mStageCoordinator.onKeyguardStateChanged(visible, occluded);
}
public void onFinishedWakingUp() {
mStageCoordinator.onFinishedWakingUp();
}
+ public void onStartedGoingToSleep() {
+ mStageCoordinator.onStartedGoingToSleep();
+ }
+
public void exitSplitScreenOnHide(boolean exitSplitScreenOnHide) {
mStageCoordinator.exitSplitScreenOnHide(exitSplitScreenOnHide);
}
@@ -526,7 +535,15 @@ public class SplitScreenController implements DragAndDropPolicy.Starter,
mStageCoordinator.requestEnterSplitSelect(taskInfo, wct, splitPosition, taskBounds);
}
- public void startTask(int taskId, @SplitPosition int position, @Nullable Bundle options) {
+ /**
+ * Starts an existing task into split.
+ * TODO(b/351900580): We should remove this path and use StageCoordinator#startTask() instead
+ * @param hideTaskToken is not supported.
+ */
+ public void startTask(int taskId, @SplitPosition int position, @Nullable Bundle options,
+ @Nullable WindowContainerToken hideTaskToken) {
+ ProtoLog.v(ShellProtoLogGroup.WM_SHELL_DRAG_AND_DROP,
+ "Legacy startTask does not support hide task token");
final int[] result = new int[1];
IRemoteAnimationRunner wrapper = new IRemoteAnimationRunner.Stub() {
@Override
@@ -584,8 +601,8 @@ public class SplitScreenController implements DragAndDropPolicy.Starter,
if (options == null) options = new Bundle();
final ActivityOptions activityOptions = ActivityOptions.fromBundle(options);
- if (samePackage(packageName, getPackageName(reverseSplitPosition(position)),
- user.getIdentifier(), getUserId(reverseSplitPosition(position)))) {
+ if (samePackage(packageName, getPackageName(reverseSplitPosition(position), null),
+ user.getIdentifier(), getUserId(reverseSplitPosition(position), null))) {
if (mMultiInstanceHelpher.supportsMultiInstanceSplit(
getShortcutComponent(packageName, shortcutId, user, mLauncherApps))) {
activityOptions.setApplyMultipleTaskFlagForShortcut(true);
@@ -676,10 +693,11 @@ public class SplitScreenController implements DragAndDropPolicy.Starter,
* See {@link #startIntent(PendingIntent, int, Intent, int, Bundle)}
* @param instanceId to be used by {@link SplitscreenEventLogger}
*/
- public void startIntent(PendingIntent intent, int userId, @Nullable Intent fillInIntent,
- @SplitPosition int position, @Nullable Bundle options, @NonNull InstanceId instanceId) {
+ public void startIntentWithInstanceId(PendingIntent intent, int userId,
+ @Nullable Intent fillInIntent, @SplitPosition int position, @Nullable Bundle options,
+ @NonNull InstanceId instanceId) {
mStageCoordinator.onRequestToSplit(instanceId, ENTER_REASON_LAUNCHER);
- startIntent(intent, userId, fillInIntent, position, options);
+ startIntent(intent, userId, fillInIntent, position, options, null /* hideTaskToken */);
}
private void startIntentAndTaskWithLegacyTransition(PendingIntent pendingIntent, int userId1,
@@ -825,9 +843,15 @@ public class SplitScreenController implements DragAndDropPolicy.Starter,
instanceId);
}
+ /**
+ * Starts the given intent into split.
+ * @param hideTaskToken If non-null, a task matching this token will be moved to back in the
+ * same window container transaction as the starting of the intent.
+ */
@Override
public void startIntent(PendingIntent intent, int userId1, @Nullable Intent fillInIntent,
- @SplitPosition int position, @Nullable Bundle options) {
+ @SplitPosition int position, @Nullable Bundle options,
+ @Nullable WindowContainerToken hideTaskToken) {
ProtoLog.v(ShellProtoLogGroup.WM_SHELL_SPLIT_SCREEN,
"startIntent(): intent=%s user=%d fillInIntent=%s position=%d", intent, userId1,
fillInIntent, position);
@@ -838,23 +862,24 @@ public class SplitScreenController implements DragAndDropPolicy.Starter,
fillInIntent.addFlags(FLAG_ACTIVITY_NO_USER_ACTION);
final String packageName1 = SplitScreenUtils.getPackageName(intent);
- final String packageName2 = getPackageName(reverseSplitPosition(position));
- final int userId2 = getUserId(reverseSplitPosition(position));
+ final String packageName2 = getPackageName(reverseSplitPosition(position), hideTaskToken);
+ final int userId2 = getUserId(reverseSplitPosition(position), hideTaskToken);
final ComponentName component = intent.getIntent().getComponent();
// To prevent accumulating large number of instances in the background, reuse task
// in the background. If we don't explicitly reuse, new may be created even if the app
// isn't multi-instance because WM won't automatically remove/reuse the previous instance
final ActivityManager.RecentTaskInfo taskInfo = mRecentTasksOptional
- .map(recentTasks -> recentTasks.findTaskInBackground(component, userId1))
+ .map(recentTasks -> recentTasks.findTaskInBackground(component, userId1,
+ hideTaskToken))
.orElse(null);
if (taskInfo != null) {
ProtoLog.v(ShellProtoLogGroup.WM_SHELL_SPLIT_SCREEN,
"Found suitable background task=%s", taskInfo);
if (ENABLE_SHELL_TRANSITIONS) {
- mStageCoordinator.startTask(taskInfo.taskId, position, options);
+ mStageCoordinator.startTask(taskInfo.taskId, position, options, hideTaskToken);
} else {
- startTask(taskInfo.taskId, position, options);
+ startTask(taskInfo.taskId, position, options, hideTaskToken);
}
ProtoLog.v(ShellProtoLogGroup.WM_SHELL_SPLIT_SCREEN, "Start task in background");
return;
@@ -879,19 +904,23 @@ public class SplitScreenController implements DragAndDropPolicy.Starter,
}
}
- mStageCoordinator.startIntent(intent, fillInIntent, position, options);
+ mStageCoordinator.startIntent(intent, fillInIntent, position, options, hideTaskToken);
}
- /** Retrieve package name of a specific split position if split screen is activated, otherwise
- * returns the package name of the top running task. */
+ /**
+ * Retrieve package name of a specific split position if split screen is activated, otherwise
+ * returns the package name of the top running task.
+ * TODO(b/351900580): Merge this with getUserId() so we don't make multiple binder calls
+ */
@Nullable
- private String getPackageName(@SplitPosition int position) {
+ private String getPackageName(@SplitPosition int position,
+ @Nullable WindowContainerToken ignoreTaskToken) {
ActivityManager.RunningTaskInfo taskInfo;
if (isSplitScreenVisible()) {
taskInfo = getTaskInfo(position);
} else {
taskInfo = mRecentTasksOptional
- .map(recentTasks -> recentTasks.getTopRunningTask())
+ .map(recentTasks -> recentTasks.getTopRunningTask(ignoreTaskToken))
.orElse(null);
if (!isValidToSplit(taskInfo)) {
return null;
@@ -901,15 +930,19 @@ public class SplitScreenController implements DragAndDropPolicy.Starter,
return taskInfo != null ? SplitScreenUtils.getPackageName(taskInfo.baseIntent) : null;
}
- /** Retrieve user id of a specific split position if split screen is activated, otherwise
- * returns the user id of the top running task. */
- private int getUserId(@SplitPosition int position) {
+ /**
+ * Retrieve user id of a specific split position if split screen is activated, otherwise
+ * returns the user id of the top running task.
+ * TODO: Merge this with getPackageName() so we don't make multiple binder calls
+ */
+ private int getUserId(@SplitPosition int position,
+ @Nullable WindowContainerToken ignoreTaskToken) {
ActivityManager.RunningTaskInfo taskInfo;
if (isSplitScreenVisible()) {
taskInfo = getTaskInfo(position);
} else {
taskInfo = mRecentTasksOptional
- .map(recentTasks -> recentTasks.getTopRunningTask())
+ .map(recentTasks -> recentTasks.getTopRunningTask(ignoreTaskToken))
.orElse(null);
if (!isValidToSplit(taskInfo)) {
return -1;
@@ -1176,6 +1209,11 @@ public class SplitScreenController implements DragAndDropPolicy.Starter,
}
@Override
+ public void onStartedGoingToSleep() {
+ mMainExecutor.execute(SplitScreenController.this::onStartedGoingToSleep);
+ }
+
+ @Override
public void goToFullscreenFromSplit() {
mMainExecutor.execute(SplitScreenController.this::goToFullscreenFromSplit);
}
@@ -1290,7 +1328,8 @@ public class SplitScreenController implements DragAndDropPolicy.Starter,
@Override
public void startTask(int taskId, int position, @Nullable Bundle options) {
executeRemoteCallWithTaskPermission(mController, "startTask",
- (controller) -> controller.startTask(taskId, position, options));
+ (controller) -> controller.startTask(taskId, position, options,
+ null /* hideTaskToken */));
}
@Override
@@ -1402,8 +1441,8 @@ public class SplitScreenController implements DragAndDropPolicy.Starter,
public void startIntent(PendingIntent intent, int userId, Intent fillInIntent, int position,
@Nullable Bundle options, InstanceId instanceId) {
executeRemoteCallWithTaskPermission(mController, "startIntent",
- (controller) -> controller.startIntent(intent, userId, fillInIntent, position,
- options, instanceId));
+ (controller) -> controller.startIntentWithInstanceId(intent, userId,
+ fillInIntent, position, options, instanceId));
}
@Override
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreenTransitions.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreenTransitions.java
index b3dab8527617..48d17ec6963f 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreenTransitions.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreenTransitions.java
@@ -68,6 +68,7 @@ class SplitScreenTransitions {
DismissSession mPendingDismiss = null;
EnterSession mPendingEnter = null;
TransitSession mPendingResize = null;
+ TransitSession mPendingRemotePassthrough = null;
private IBinder mAnimatingTransition = null;
private OneShotRemoteHandler mActiveRemoteHandler = null;
@@ -320,6 +321,11 @@ class SplitScreenTransitions {
return mPendingResize != null && mPendingResize.mTransition == transition;
}
+ boolean isPendingPassThrough(IBinder transition) {
+ return mPendingRemotePassthrough != null &&
+ mPendingRemotePassthrough.mTransition == transition;
+ }
+
@Nullable
private TransitSession getPendingTransition(IBinder transition) {
if (isPendingEnter(transition)) {
@@ -331,6 +337,9 @@ class SplitScreenTransitions {
} else if (isPendingResize(transition)) {
ProtoLog.d(WM_SHELL_SPLIT_SCREEN, "\tresolved resize transition");
return mPendingResize;
+ } else if (isPendingPassThrough(transition)) {
+ ProtoLog.d(WM_SHELL_SPLIT_SCREEN, "\tresolved passThrough transition");
+ return mPendingRemotePassthrough;
}
return null;
}
@@ -378,6 +387,19 @@ class SplitScreenTransitions {
extraTransitType, resizeAnim);
}
+ /** Sets a transition to enter split. */
+ void setRemotePassThroughTransition(@NonNull IBinder transition,
+ @Nullable RemoteTransition remoteTransition) {
+ mPendingRemotePassthrough = new TransitSession(
+ transition, null, null,
+ remoteTransition, Transitions.TRANSIT_SPLIT_PASSTHROUGH);
+
+ ProtoLog.v(WM_SHELL_TRANSITIONS, " splitTransition "
+ + " deduced remote passthrough split screen");
+ ProtoLog.d(WM_SHELL_SPLIT_SCREEN, "setRemotePassThrough: transitType=%d remote=%s",
+ Transitions.TRANSIT_SPLIT_PASSTHROUGH, remoteTransition);
+ }
+
/** Starts a transition to dismiss split. */
IBinder startDismissTransition(WindowContainerTransaction wct,
Transitions.TransitionHandler handler, @SplitScreen.StageType int dismissTop,
@@ -474,6 +496,12 @@ class SplitScreenTransitions {
mPendingResize.onConsumed(aborted);
mPendingResize = null;
ProtoLog.d(WM_SHELL_SPLIT_SCREEN, "onTransitionConsumed for resize transition");
+ } else if (isPendingPassThrough(transition)) {
+ mPendingRemotePassthrough.onConsumed(aborted);
+ mPendingRemotePassthrough.mRemoteHandler.onTransitionConsumed(transition, aborted,
+ finishT);
+ mPendingRemotePassthrough = null;
+ ProtoLog.d(WM_SHELL_SPLIT_SCREEN, "onTransitionConsumed for passThrough transition");
}
// TODO: handle transition consumed for active remote handler
@@ -495,6 +523,10 @@ class SplitScreenTransitions {
mPendingResize.onFinished(wct, mFinishTransaction);
mPendingResize = null;
ProtoLog.d(WM_SHELL_SPLIT_SCREEN, "onFinish for resize transition");
+ } else if (isPendingPassThrough(mAnimatingTransition)) {
+ mPendingRemotePassthrough.onFinished(wct, mFinishTransaction);
+ mPendingRemotePassthrough = null;
+ ProtoLog.d(WM_SHELL_SPLIT_SCREEN, "onFinish for passThrough transition");
}
mActiveRemoteHandler = null;
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 d9e97766e4fe..d7ee563b562c 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
@@ -16,7 +16,7 @@
package com.android.wm.shell.splitscreen;
-import static android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED;
+import static android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS;
import static android.app.ActivityTaskManager.INVALID_TASK_ID;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_RECENTS;
@@ -92,6 +92,7 @@ import android.graphics.Rect;
import android.hardware.devicestate.DeviceStateManager;
import android.os.Bundle;
import android.os.Debug;
+import android.os.Handler;
import android.os.IBinder;
import android.os.RemoteException;
import android.os.ServiceManager;
@@ -119,6 +120,7 @@ import android.window.WindowContainerTransaction;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.logging.InstanceId;
+import com.android.internal.policy.FoldLockSettingsObserver;
import com.android.internal.protolog.ProtoLog;
import com.android.internal.util.ArrayUtils;
import com.android.launcher3.icons.IconProvider;
@@ -191,7 +193,7 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
private SplitLayout mSplitLayout;
private ValueAnimator mDividerFadeInAnimator;
private boolean mDividerVisible;
- private boolean mKeyguardShowing;
+ private boolean mKeyguardActive;
private boolean mShowDecorImmediately;
private final SyncTransactionQueue mSyncQueue;
private final ShellTaskOrganizer mTaskOrganizer;
@@ -205,6 +207,7 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
private SplitScreenTransitions mSplitTransitions;
private final SplitscreenEventLogger mLogger;
private final ShellExecutor mMainExecutor;
+ private final Handler mMainHandler;
// Cache live tile tasks while entering recents, evict them from stages in finish transaction
// if user is opening another task(s).
private final ArrayList<Integer> mPausingTasks = new ArrayList<>();
@@ -233,7 +236,10 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
private boolean mIsExiting;
private boolean mIsRootTranslucent;
@VisibleForTesting
- int mTopStageAfterFoldDismiss;
+ @StageType int mLastActiveStage;
+ private boolean mBreakOnNextWake;
+ /** Used to get the Settings value for "Continue using apps on fold". */
+ private FoldLockSettingsObserver mFoldLockSettingsObserver;
private DefaultMixedHandler mMixedHandler;
private final Toast mSplitUnsupportedToast;
@@ -313,9 +319,8 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
ShellTaskOrganizer taskOrganizer, DisplayController displayController,
DisplayImeController displayImeController,
DisplayInsetsController displayInsetsController, Transitions transitions,
- TransactionPool transactionPool,
- IconProvider iconProvider, ShellExecutor mainExecutor,
- Optional<RecentTasksController> recentTasks,
+ TransactionPool transactionPool, IconProvider iconProvider, ShellExecutor mainExecutor,
+ Handler mainHandler, Optional<RecentTasksController> recentTasks,
LaunchAdjacentController launchAdjacentController,
Optional<WindowDecorViewModel> windowDecorViewModel) {
mContext = context;
@@ -324,6 +329,7 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
mTaskOrganizer = taskOrganizer;
mLogger = new SplitscreenEventLogger();
mMainExecutor = mainExecutor;
+ mMainHandler = mainHandler;
mRecentTasks = recentTasks;
mLaunchAdjacentController = launchAdjacentController;
mWindowDecorViewModel = windowDecorViewModel;
@@ -366,6 +372,9 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
// With shell transition, we should update recents tile each callback so set this to true by
// default.
mShouldUpdateRecents = ENABLE_SHELL_TRANSITIONS;
+ mFoldLockSettingsObserver =
+ new FoldLockSettingsObserver(mainHandler, context);
+ mFoldLockSettingsObserver.register();
}
@VisibleForTesting
@@ -373,9 +382,8 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
ShellTaskOrganizer taskOrganizer, MainStage mainStage, SideStage sideStage,
DisplayController displayController, DisplayImeController displayImeController,
DisplayInsetsController displayInsetsController, SplitLayout splitLayout,
- Transitions transitions, TransactionPool transactionPool,
- ShellExecutor mainExecutor,
- Optional<RecentTasksController> recentTasks,
+ Transitions transitions, TransactionPool transactionPool, ShellExecutor mainExecutor,
+ Handler mainHandler, Optional<RecentTasksController> recentTasks,
LaunchAdjacentController launchAdjacentController,
Optional<WindowDecorViewModel> windowDecorViewModel) {
mContext = context;
@@ -393,6 +401,7 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
this::onTransitionAnimationComplete, this);
mLogger = new SplitscreenEventLogger();
mMainExecutor = mainExecutor;
+ mMainHandler = mainHandler;
mRecentTasks = recentTasks;
mLaunchAdjacentController = launchAdjacentController;
mWindowDecorViewModel = windowDecorViewModel;
@@ -400,6 +409,9 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
transitions.addHandler(this);
mSplitUnsupportedToast = Toast.makeText(mContext,
R.string.dock_non_resizeble_failed_to_dock_text, Toast.LENGTH_SHORT);
+ mFoldLockSettingsObserver =
+ new FoldLockSettingsObserver(context.getMainThreadHandler(), context);
+ mFoldLockSettingsObserver.register();
}
public void setMixedHandler(DefaultMixedHandler mixedHandler) {
@@ -592,12 +604,21 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
}
}
- /** Use this method to launch an existing Task via a taskId */
- void startTask(int taskId, @SplitPosition int position, @Nullable Bundle options) {
+ /**
+ * Use this method to launch an existing Task via a taskId.
+ * @param hideTaskToken If non-null, a task matching this token will be moved to back in the
+ * same window container transaction as the starting of the intent.
+ */
+ void startTask(int taskId, @SplitPosition int position, @Nullable Bundle options,
+ @Nullable WindowContainerToken hideTaskToken) {
ProtoLog.d(WM_SHELL_SPLIT_SCREEN, "startTask: task=%d position=%d", taskId, position);
mSplitRequest = new SplitRequest(taskId, position);
final WindowContainerTransaction wct = new WindowContainerTransaction();
options = resolveStartStage(STAGE_TYPE_UNDEFINED, position, options, null /* wct */);
+ if (hideTaskToken != null) {
+ ProtoLog.d(WM_SHELL_SPLIT_SCREEN, "Reordering hide-task to bottom");
+ wct.reorder(hideTaskToken, false /* onTop */);
+ }
wct.startTask(taskId, options);
// If this should be mixed, send the task to avoid split handle transition directly.
if (mMixedHandler != null && mMixedHandler.isTaskInPip(taskId, mTaskOrganizer)) {
@@ -623,9 +644,13 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
extraTransitType, !mIsDropEntering);
}
- /** Launches an activity into split. */
+ /**
+ * Launches an activity into split.
+ * @param hideTaskToken If non-null, a task matching this token will be moved to back in the
+ * same window container transaction as the starting of the intent.
+ */
void startIntent(PendingIntent intent, Intent fillInIntent, @SplitPosition int position,
- @Nullable Bundle options) {
+ @Nullable Bundle options, @Nullable WindowContainerToken hideTaskToken) {
ProtoLog.d(WM_SHELL_SPLIT_SCREEN, "startIntent: intent=%s position=%d", intent.getIntent(),
position);
mSplitRequest = new SplitRequest(intent.getIntent(), position);
@@ -636,6 +661,10 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
final WindowContainerTransaction wct = new WindowContainerTransaction();
options = resolveStartStage(STAGE_TYPE_UNDEFINED, position, options, null /* wct */);
+ if (hideTaskToken != null) {
+ ProtoLog.d(WM_SHELL_SPLIT_SCREEN, "Reordering hide-task to bottom");
+ wct.reorder(hideTaskToken, false /* onTop */);
+ }
wct.sendPendingIntent(intent, fillInIntent, options);
// If this should be mixed, just send the intent to avoid split handle transition directly.
@@ -1487,51 +1516,80 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
}
}
- void onKeyguardVisibilityChanged(boolean showing) {
- mKeyguardShowing = showing;
+ /**
+ * Runs when keyguard state changes. The booleans here are a bit complicated, so for reference:
+ * @param active {@code true} if we are in a state where the keyguard *should* be shown
+ * -- still true when keyguard is "there" but is behind an app, or
+ * screen is off.
+ * @param occludingTaskRunning {@code true} when there is a running task that has
+ * FLAG_SHOW_WHEN_LOCKED -- also true when the task is
+ * just running on its own and keyguard is not active
+ * at all.
+ */
+ void onKeyguardStateChanged(boolean active, boolean occludingTaskRunning) {
+ mKeyguardActive = active;
if (!mMainStage.isActive()) {
return;
}
- ProtoLog.d(WM_SHELL_SPLIT_SCREEN, "onKeyguardVisibilityChanged: showing=%b", showing);
- setDividerVisibility(!mKeyguardShowing, null);
+ ProtoLog.d(WM_SHELL_SPLIT_SCREEN,
+ "onKeyguardVisibilityChanged: active=%b occludingTaskRunning=%b",
+ active, occludingTaskRunning);
+ setDividerVisibility(!mKeyguardActive, null);
+
+ if (active && occludingTaskRunning) {
+ dismissSplitKeepingLastActiveStage(EXIT_REASON_SCREEN_LOCKED_SHOW_ON_TOP);
+ }
}
void onFinishedWakingUp() {
ProtoLog.d(WM_SHELL_SPLIT_SCREEN, "onFinishedWakingUp");
- if (!mMainStage.isActive()) {
+ if (mBreakOnNextWake) {
+ dismissSplitKeepingLastActiveStage(EXIT_REASON_DEVICE_FOLDED);
+ }
+ }
+
+ void onStartedGoingToSleep() {
+ recordLastActiveStage();
+ }
+
+ /**
+ * Records the user's last focused stage -- main stage or side stage. Used to determine which
+ * stage of a split pair should be kept, in cases where system focus has moved elsewhere.
+ */
+ void recordLastActiveStage() {
+ if (!isSplitActive() || !isSplitScreenVisible()) {
+ mLastActiveStage = STAGE_TYPE_UNDEFINED;
+ } else if (mMainStage.isFocused()) {
+ mLastActiveStage = STAGE_TYPE_MAIN;
+ } else if (mSideStage.isFocused()) {
+ mLastActiveStage = STAGE_TYPE_SIDE;
+ }
+ }
+
+ /**
+ * Dismisses split, keeping the app that the user focused last in split screen. If the user was
+ * not in split screen, {@link #mLastActiveStage} should be set to STAGE_TYPE_UNDEFINED, and we
+ * will do a no-op.
+ */
+ void dismissSplitKeepingLastActiveStage(@ExitReason int reason) {
+ if (!mMainStage.isActive() || mLastActiveStage == STAGE_TYPE_UNDEFINED) {
+ // no-op
return;
}
- // Check if there's only one stage visible while keyguard occluded.
- final boolean mainStageVisible = mMainStage.mRootTaskInfo.isVisible;
- final boolean oneStageVisible =
- mMainStage.mRootTaskInfo.isVisible != mSideStage.mRootTaskInfo.isVisible;
- if (oneStageVisible && !ENABLE_SHELL_TRANSITIONS) {
- // Dismiss split because there's show-when-locked activity showing on top of keyguard.
- // Also make sure the task contains show-when-locked activity remains on top after split
- // dismissed.
- final StageTaskListener toTop = mainStageVisible ? mMainStage : mSideStage;
- exitSplitScreen(toTop, EXIT_REASON_SCREEN_LOCKED_SHOW_ON_TOP);
- }
-
- // Dismiss split if the flag record any side of stages.
- if (mTopStageAfterFoldDismiss != STAGE_TYPE_UNDEFINED) {
- if (ENABLE_SHELL_TRANSITIONS) {
- // Need manually clear here due to this transition might be aborted due to keyguard
- // on top and lead to no visible change.
- clearSplitPairedInRecents(EXIT_REASON_DEVICE_FOLDED);
- final WindowContainerTransaction wct = new WindowContainerTransaction();
- prepareExitSplitScreen(mTopStageAfterFoldDismiss, wct);
- mSplitTransitions.startDismissTransition(wct, this,
- mTopStageAfterFoldDismiss, EXIT_REASON_DEVICE_FOLDED);
- setSplitsVisible(false);
- } else {
- exitSplitScreen(
- mTopStageAfterFoldDismiss == STAGE_TYPE_MAIN ? mMainStage : mSideStage,
- EXIT_REASON_DEVICE_FOLDED);
- }
- mTopStageAfterFoldDismiss = STAGE_TYPE_UNDEFINED;
+ if (ENABLE_SHELL_TRANSITIONS) {
+ // Need manually clear here due to this transition might be aborted due to keyguard
+ // on top and lead to no visible change.
+ clearSplitPairedInRecents(reason);
+ final WindowContainerTransaction wct = new WindowContainerTransaction();
+ prepareExitSplitScreen(mLastActiveStage, wct);
+ mSplitTransitions.startDismissTransition(wct, this, mLastActiveStage, reason);
+ setSplitsVisible(false);
+ } else {
+ exitSplitScreen(mLastActiveStage == STAGE_TYPE_MAIN ? mMainStage : mSideStage, reason);
}
+
+ mBreakOnNextWake = false;
}
void exitSplitScreenOnHide(boolean exitSplitScreenOnHide) {
@@ -1892,8 +1950,8 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
}
// Put BAL flags to avoid activity start aborted. Otherwise, flows like shortcut to split
// will be canceled.
- options.setPendingIntentBackgroundActivityStartMode(MODE_BACKGROUND_ACTIVITY_START_ALLOWED);
- options.setPendingIntentBackgroundActivityLaunchAllowedByPermission(true);
+ options.setPendingIntentBackgroundActivityStartMode(
+ MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS);
// TODO (b/336477473): Disallow enter PiP when launching a task in split by default;
// this might have to be changed as more split-to-pip cujs are defined.
@@ -2206,11 +2264,11 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
ProtoLog.d(WM_SHELL_SPLIT_SCREEN,
"setDividerVisibility: visible=%b keyguardShowing=%b dividerAnimating=%b caller=%s",
- visible, mKeyguardShowing, mIsDividerRemoteAnimating, Debug.getCaller());
+ visible, mKeyguardActive, mIsDividerRemoteAnimating, Debug.getCaller());
// Defer showing divider bar after keyguard dismissed, so it won't interfere with keyguard
// dismissing animation.
- if (visible && mKeyguardShowing) {
+ if (visible && mKeyguardActive) {
ProtoLog.d(WM_SHELL_SPLIT_SCREEN,
" Defer showing divider bar due to keyguard showing.");
return;
@@ -2580,21 +2638,24 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
@VisibleForTesting
void onFoldedStateChanged(boolean folded) {
ProtoLog.d(WM_SHELL_SPLIT_SCREEN, "onFoldedStateChanged: folded=%b", folded);
- mTopStageAfterFoldDismiss = STAGE_TYPE_UNDEFINED;
- if (!folded) return;
-
- if (!isSplitActive() || !isSplitScreenVisible()) return;
- // To avoid split dismiss when user fold the device and unfold to use later, we only
- // record the flag here and try to dismiss on wakeUp callback to ensure split dismiss
- // when user interact on phone folded.
- if (mMainStage.isFocused()) {
- mTopStageAfterFoldDismiss = STAGE_TYPE_MAIN;
- } else if (mSideStage.isFocused()) {
- mTopStageAfterFoldDismiss = STAGE_TYPE_SIDE;
+ if (folded) {
+ recordLastActiveStage();
+ // If user folds and has the setting "Continue using apps on fold = NEVER", we assume
+ // they don't want to continue using split on the outer screen (i.e. we break split if
+ // they wake the device in its folded state).
+ mBreakOnNextWake = willSleepOnFold();
+ } else {
+ mBreakOnNextWake = false;
}
}
+ /** Returns true if the phone will sleep when it folds. */
+ @VisibleForTesting
+ boolean willSleepOnFold() {
+ return mFoldLockSettingsObserver != null && mFoldLockSettingsObserver.isSleepOnFold();
+ }
+
private Rect getSideStageBounds() {
return mSideStagePosition == SPLIT_POSITION_TOP_OR_LEFT
? mSplitLayout.getBounds1() : mSplitLayout.getBounds2();
@@ -2649,7 +2710,7 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
@Nullable TransitionRequestInfo request) {
final ActivityManager.RunningTaskInfo triggerTask = request.getTriggerTask();
if (triggerTask == null) {
- if (isSplitScreenVisible()) {
+ if (isSplitActive()) {
ProtoLog.d(WM_SHELL_SPLIT_SCREEN, "handleRequest: transition=%d display rotation",
request.getDebugId());
// Check if the display is rotating.
@@ -2659,6 +2720,10 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
&& displayChange.getStartRotation() != displayChange.getEndRotation()) {
mSplitLayout.setFreezeDividerWindow(true);
}
+ if (request.getRemoteTransition() != null) {
+ mSplitTransitions.setRemotePassThroughTransition(transition,
+ request.getRemoteTransition());
+ }
// Still want to monitor everything while in split-screen, so return non-null.
return new WindowContainerTransaction();
} else {
@@ -2985,6 +3050,13 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
notifySplitAnimationFinished();
return true;
}
+ } else if (mSplitTransitions.isPendingPassThrough(transition)) {
+ ProtoLog.d(WM_SHELL_SPLIT_SCREEN,
+ "startAnimation: passThrough transition=%d", info.getDebugId());
+ mSplitTransitions.mPendingRemotePassthrough.mRemoteHandler.startAnimation(transition,
+ info, startTransaction, finishTransaction, finishCallback);
+ notifySplitAnimationFinished();
+ return true;
}
return startPendingAnimation(transition, info, startTransaction, finishTransaction,
@@ -3556,7 +3628,8 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
pw.println(innerPrefix + "mDividerVisible=" + mDividerVisible);
pw.println(innerPrefix + "isSplitActive=" + isSplitActive());
pw.println(innerPrefix + "isSplitVisible=" + isSplitScreenVisible());
- pw.println(innerPrefix + "isLeftRightSplit=" + mSplitLayout.isLeftRightSplit());
+ pw.println(innerPrefix + "isLeftRightSplit="
+ + (mSplitLayout != null ? mSplitLayout.isLeftRightSplit() : "null"));
pw.println(innerPrefix + "MainStage");
pw.println(childPrefix + "stagePosition=" + splitPositionToString(getMainStagePosition()));
pw.println(childPrefix + "isActive=" + mMainStage.isActive());
@@ -3568,7 +3641,9 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
mSideStage.dump(pw, childPrefix);
pw.println(innerPrefix + "SideStageListener");
mSideStageListener.dump(pw, childPrefix);
- mSplitLayout.dump(pw, childPrefix);
+ if (mSplitLayout != null) {
+ mSplitLayout.dump(pw, childPrefix);
+ }
if (!mPausingTasks.isEmpty()) {
pw.println(childPrefix + "mPausingTasks=" + mPausingTasks);
}
@@ -3719,8 +3794,9 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
mSplitTransitions.startDismissTransition(wct, StageCoordinator.this, stageType,
EXIT_REASON_APP_DOES_NOT_SUPPORT_MULTIWINDOW);
Log.w(TAG, splitFailureMessage("onNoLongerSupportMultiWindow",
- "app package " + taskInfo.baseActivity.getPackageName()
- + " does not support splitscreen, or is a controlled activity type"));
+ "app package " + taskInfo.baseIntent.getComponent()
+ + " does not support splitscreen, or is a controlled activity"
+ + " type"));
if (splitScreenVisible) {
handleUnsupportedSplitStart();
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/tv/TvSplitScreenController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/tv/TvSplitScreenController.java
index e330f3ab65ab..b65e97899f3e 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/tv/TvSplitScreenController.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/tv/TvSplitScreenController.java
@@ -33,7 +33,6 @@ import com.android.wm.shell.common.ShellExecutor;
import com.android.wm.shell.common.SyncTransactionQueue;
import com.android.wm.shell.common.SystemWindows;
import com.android.wm.shell.common.TransactionPool;
-import com.android.wm.shell.draganddrop.DragAndDropController;
import com.android.wm.shell.recents.RecentTasksController;
import com.android.wm.shell.splitscreen.SplitScreenController;
import com.android.wm.shell.splitscreen.StageCoordinator;
@@ -88,7 +87,8 @@ public class TvSplitScreenController extends SplitScreenController {
syncQueue, rootTDAOrganizer, displayController, displayImeController,
displayInsetsController, null, transitions, transactionPool,
iconProvider, recentTasks, launchAdjacentController, Optional.empty(),
- Optional.empty(), null /* stageCoordinator */, multiInstanceHelper, mainExecutor);
+ Optional.empty(), null /* stageCoordinator */, multiInstanceHelper, mainExecutor,
+ mainHandler);
mTaskOrganizer = shellTaskOrganizer;
mSyncQueue = syncQueue;
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/tv/TvStageCoordinator.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/tv/TvStageCoordinator.java
index 79476919221e..81ca48fa6b3d 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/tv/TvStageCoordinator.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/tv/TvStageCoordinator.java
@@ -56,7 +56,7 @@ public class TvStageCoordinator extends StageCoordinator
SystemWindows systemWindows) {
super(context, displayId, syncQueue, taskOrganizer, displayController, displayImeController,
displayInsetsController, transitions, transactionPool, iconProvider,
- mainExecutor, recentTasks, launchAdjacentController, Optional.empty());
+ mainExecutor, mainHandler, recentTasks, launchAdjacentController, Optional.empty());
mTvSplitMenuController = new TvSplitMenuController(context, this,
systemWindows, mainHandler);
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/WindowlessSnapshotWindowCreator.java b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/WindowlessSnapshotWindowCreator.java
index 5c814dcc9b16..bad5baf24651 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/WindowlessSnapshotWindowCreator.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/WindowlessSnapshotWindowCreator.java
@@ -73,7 +73,7 @@ class WindowlessSnapshotWindowCreator {
final Display display = mDisplayManager.getDisplay(runningTaskInfo.displayId);
final StartingSurfaceDrawer.WindowlessStartingWindow wlw =
new StartingSurfaceDrawer.WindowlessStartingWindow(
- runningTaskInfo.configuration, rootSurface);
+ mContext.getResources().getConfiguration(), rootSurface);
final SurfaceControlViewHost mViewHost = new SurfaceControlViewHost(
mContext, display, wlw, "WindowlessSnapshotWindowCreator");
final Rect windowBounds = runningTaskInfo.configuration.windowConfiguration.getBounds();
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/WindowlessSplashWindowCreator.java b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/WindowlessSplashWindowCreator.java
index 98a803128587..f3725579bf48 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/WindowlessSplashWindowCreator.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/WindowlessSplashWindowCreator.java
@@ -76,7 +76,7 @@ class WindowlessSplashWindowCreator extends AbsSplashWindowCreator {
}
final StartingSurfaceDrawer.WindowlessStartingWindow wlw =
new StartingSurfaceDrawer.WindowlessStartingWindow(
- taskInfo.configuration, rootSurface);
+ mContext.getResources().getConfiguration(), rootSurface);
final SurfaceControlViewHost viewHost = new SurfaceControlViewHost(
myContext, display, wlw, "WindowlessSplashWindowCreator");
final String title = "Windowless Splash " + taskInfo.taskId;
@@ -95,7 +95,7 @@ class WindowlessSplashWindowCreator extends AbsSplashWindowCreator {
}
final FrameLayout rootLayout = new FrameLayout(
- mSplashscreenContentDrawer.createViewContextWrapper(mContext));
+ mSplashscreenContentDrawer.createViewContextWrapper(myContext));
viewHost.setView(rootLayout, lp);
final int bgColor = taskDescription.getBackgroundColor();
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/sysui/ShellInit.java b/libs/WindowManager/Shell/src/com/android/wm/shell/sysui/ShellInit.java
index 3a680097554f..287e779d8e24 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/sysui/ShellInit.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/sysui/ShellInit.java
@@ -27,6 +27,7 @@ import androidx.annotation.VisibleForTesting;
import com.android.internal.protolog.ProtoLog;
import com.android.wm.shell.common.ShellExecutor;
+import com.android.wm.shell.protolog.ShellProtoLogGroup;
import java.util.ArrayList;
@@ -47,6 +48,7 @@ public class ShellInit {
public ShellInit(ShellExecutor mainExecutor) {
mMainExecutor = mainExecutor;
+ ProtoLog.registerGroups(ShellProtoLogGroup.values());
}
/**
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/taskview/TaskViewTaskController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/taskview/TaskViewTaskController.java
index a126cbe41b00..9750d3ec99f5 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/taskview/TaskViewTaskController.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/taskview/TaskViewTaskController.java
@@ -535,7 +535,8 @@ public class TaskViewTaskController implements ShellTaskOrganizer.TaskListener {
WindowContainerTransaction wct = new WindowContainerTransaction();
if (mCaptionInsets != null) {
wct.addInsetsSource(mTaskToken, mCaptionInsetsOwner, 0,
- WindowInsets.Type.captionBar(), mCaptionInsets, null /* boundingRects */);
+ WindowInsets.Type.captionBar(), mCaptionInsets, null /* boundingRects */,
+ 0 /* flags */);
} else {
wct.removeInsetsSource(mTaskToken, mCaptionInsetsOwner, 0,
WindowInsets.Type.captionBar());
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultMixedHandler.java b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultMixedHandler.java
index 4f4b8097cfac..766a6b3f48ac 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultMixedHandler.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultMixedHandler.java
@@ -353,7 +353,7 @@ public class DefaultMixedHandler implements MixedTransitionHandler,
return this::setRecentsTransitionDuringKeyguard;
} else if (mDesktopTasksController != null
// Check on the default display. Recents/gesture nav is only available there
- && mDesktopTasksController.getVisibleTaskCount(DEFAULT_DISPLAY) > 0) {
+ && mDesktopTasksController.visibleTaskCount(DEFAULT_DISPLAY) > 0) {
return this::setRecentsTransitionDuringDesktop;
}
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultTransitionHandler.java b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultTransitionHandler.java
index 73b32a24246a..778478405dda 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultTransitionHandler.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultTransitionHandler.java
@@ -19,6 +19,7 @@ package com.android.wm.shell.transition;
import static android.app.ActivityOptions.ANIM_CLIP_REVEAL;
import static android.app.ActivityOptions.ANIM_CUSTOM;
import static android.app.ActivityOptions.ANIM_NONE;
+import static android.app.ActivityOptions.ANIM_FROM_STYLE;
import static android.app.ActivityOptions.ANIM_OPEN_CROSS_PROFILE_APPS;
import static android.app.ActivityOptions.ANIM_SCALE_UP;
import static android.app.ActivityOptions.ANIM_SCENE_TRANSITION;
@@ -40,6 +41,7 @@ import static android.view.WindowManager.LayoutParams.ROTATION_ANIMATION_UNSPECI
import static android.view.WindowManager.TRANSIT_CHANGE;
import static android.view.WindowManager.TRANSIT_KEYGUARD_UNOCCLUDE;
import static android.view.WindowManager.TRANSIT_RELAUNCH;
+import static android.view.WindowManager.TRANSIT_TO_BACK;
import static android.window.TransitionInfo.FLAG_CROSS_PROFILE_OWNER_THUMBNAIL;
import static android.window.TransitionInfo.FLAG_CROSS_PROFILE_WORK_THUMBNAIL;
import static android.window.TransitionInfo.FLAG_DISPLAY_HAS_ALERT_WINDOWS;
@@ -62,6 +64,7 @@ import static com.android.internal.policy.TransitionAnimation.WALLPAPER_TRANSITI
import static com.android.wm.shell.transition.TransitionAnimationHelper.edgeExtendWindow;
import static com.android.wm.shell.transition.TransitionAnimationHelper.getTransitionBackgroundColorIfSet;
import static com.android.wm.shell.transition.TransitionAnimationHelper.getTransitionTypeFromInfo;
+import static com.android.wm.shell.transition.TransitionAnimationHelper.isCoveredByOpaqueFullscreenChange;
import static com.android.wm.shell.transition.TransitionAnimationHelper.loadAttributeAnimation;
import android.animation.Animator;
@@ -352,6 +355,7 @@ public class DefaultTransitionHandler implements Transitions.TransitionHandler {
continue;
}
final boolean isTask = change.getTaskInfo() != null;
+ final boolean isFreeform = isTask && change.getTaskInfo().isFreeform();
final int mode = change.getMode();
boolean isSeamlessDisplayChange = false;
@@ -458,6 +462,16 @@ public class DefaultTransitionHandler implements Transitions.TransitionHandler {
final int layer = zSplitLine + numChanges - i;
startTransaction.setLayer(change.getLeash(), layer);
}
+ } else if (!isCoveredByOpaqueFullscreenChange(info, change)
+ && isFreeform
+ && TransitionUtil.isOpeningMode(type)
+ && change.getMode() == TRANSIT_TO_BACK) {
+ // Reparent the minimize-change to the root task so the minimizing Task
+ // isn't shown in front of other Tasks.
+ mRootTDAOrganizer.reparentToDisplayArea(
+ change.getTaskInfo().displayId,
+ change.getLeash(),
+ startTransaction);
} else if (isOnlyTranslucent && TransitionUtil.isOpeningType(info.getType())
&& TransitionUtil.isClosingType(mode)) {
// If there is a closing translucent task in an OPENING transition, we will
@@ -985,7 +999,8 @@ public class DefaultTransitionHandler implements Transitions.TransitionHandler {
final int animType = options.getType();
return animType == ANIM_CUSTOM || animType == ANIM_SCALE_UP
|| animType == ANIM_THUMBNAIL_SCALE_UP || animType == ANIM_THUMBNAIL_SCALE_DOWN
- || animType == ANIM_CLIP_REVEAL || animType == ANIM_OPEN_CROSS_PROFILE_APPS;
+ || animType == ANIM_CLIP_REVEAL || animType == ANIM_OPEN_CROSS_PROFILE_APPS
+ || animType == ANIM_FROM_STYLE;
}
private static void applyTransformation(long time, SurfaceControl.Transaction t,
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/TransitionAnimationHelper.java b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/TransitionAnimationHelper.java
index a5f071af6973..75e7ddf53f9f 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/TransitionAnimationHelper.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/TransitionAnimationHelper.java
@@ -36,6 +36,7 @@ import static com.android.internal.policy.TransitionAnimation.WALLPAPER_TRANSITI
import android.annotation.ColorInt;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.app.WindowConfiguration;
import android.graphics.BitmapShader;
import android.graphics.Canvas;
import android.graphics.Color;
@@ -72,6 +73,9 @@ public class TransitionAnimationHelper {
final int changeFlags = change.getFlags();
final boolean enter = TransitionUtil.isOpeningType(changeMode);
final boolean isTask = change.getTaskInfo() != null;
+ final boolean isFreeform = isTask && change.getTaskInfo().isFreeform();
+ final boolean isCoveredByOpaqueFullscreenChange =
+ isCoveredByOpaqueFullscreenChange(info, change);
final TransitionInfo.AnimationOptions options;
if (Flags.moveAnimationOptionsToChange()) {
options = change.getAnimationOptions();
@@ -107,6 +111,24 @@ public class TransitionAnimationHelper {
animAttr = enter
? R.styleable.WindowAnimation_wallpaperCloseEnterAnimation
: R.styleable.WindowAnimation_wallpaperCloseExitAnimation;
+ } else if (!isCoveredByOpaqueFullscreenChange
+ && isFreeform
+ && TransitionUtil.isOpeningMode(type)
+ && change.getMode() == TRANSIT_TO_BACK) {
+ // Set translucent here so TransitionAnimation loads the appropriate animations for
+ // translucent activities and tasks later
+ translucent = (changeFlags & FLAG_TRANSLUCENT) != 0;
+ // The main Task is launching or being brought to front, this Task is being minimized
+ animAttr = R.styleable.WindowAnimation_activityCloseExitAnimation;
+ } else if (!isCoveredByOpaqueFullscreenChange
+ && isFreeform
+ && type == TRANSIT_TO_FRONT
+ && change.getMode() == TRANSIT_TO_FRONT) {
+ // Set translucent here so TransitionAnimation loads the appropriate animations for
+ // translucent activities and tasks later
+ translucent = (changeFlags & FLAG_TRANSLUCENT) != 0;
+ // Bring the minimized Task back to front
+ animAttr = R.styleable.WindowAnimation_activityOpenEnterAnimation;
} else if (type == TRANSIT_OPEN) {
// We will translucent open animation for translucent activities and tasks. Choose
// WindowAnimation_activityOpenEnterAnimation and set translucent here, then
@@ -417,4 +439,25 @@ public class TransitionAnimationHelper {
return edgeExtensionLayer;
}
+
+ /**
+ * Returns whether there is an opaque fullscreen Change positioned in front of the given Change
+ * in the given TransitionInfo.
+ */
+ static boolean isCoveredByOpaqueFullscreenChange(
+ TransitionInfo info, TransitionInfo.Change change) {
+ // TransitionInfo#getChanges() are ordered from front to back
+ for (TransitionInfo.Change coveringChange : info.getChanges()) {
+ if (coveringChange == change) {
+ return false;
+ }
+ if ((coveringChange.getFlags() & FLAG_TRANSLUCENT) == 0
+ && coveringChange.getTaskInfo() != null
+ && coveringChange.getTaskInfo().getWindowingMode()
+ == WindowConfiguration.WINDOWING_MODE_FULLSCREEN) {
+ return true;
+ }
+ }
+ return false;
+ }
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java
index 21307a2edae0..874cca523ad1 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java
@@ -31,12 +31,14 @@ import static android.view.WindowManager.fixScale;
import static android.view.WindowManager.transitTypeToString;
import static android.window.TransitionInfo.FLAGS_IS_NON_APP_WINDOW;
import static android.window.TransitionInfo.FLAG_BACK_GESTURE_ANIMATED;
+import static android.window.TransitionInfo.FLAG_IN_TASK_WITH_EMBEDDED_ACTIVITY;
import static android.window.TransitionInfo.FLAG_IS_BEHIND_STARTING_WINDOW;
import static android.window.TransitionInfo.FLAG_IS_OCCLUDED;
import static android.window.TransitionInfo.FLAG_IS_WALLPAPER;
import static android.window.TransitionInfo.FLAG_NO_ANIMATION;
import static android.window.TransitionInfo.FLAG_STARTING_WINDOW_TRANSFER_RECIPIENT;
+import static com.android.window.flags.Flags.enforceShellThreadModel;
import static com.android.window.flags.Flags.ensureWallpaperInTransitions;
import static com.android.systemui.shared.Flags.returnAnimationFrameworkLibrary;
import static com.android.wm.shell.shared.TransitionUtil.isClosingType;
@@ -77,7 +79,6 @@ import androidx.annotation.BinderThread;
import com.android.internal.R;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.protolog.ProtoLog;
-import com.android.window.flags.Flags;
import com.android.wm.shell.RootTaskDisplayAreaOrganizer;
import com.android.wm.shell.ShellTaskOrganizer;
import com.android.wm.shell.common.DisplayController;
@@ -189,6 +190,9 @@ public class Transitions implements RemoteCallable<Transitions>,
// TRANSIT_FIRST_CUSTOM + 17
TaskFragmentOrganizer.TASK_FRAGMENT_TRANSIT_DRAG_RESIZE;
+ /** Remote Transition that split accepts but ultimately needs to be animated by the remote. */
+ public static final int TRANSIT_SPLIT_PASSTHROUGH = TRANSIT_FIRST_CUSTOM + 18;
+
/** Transition type for desktop mode transitions. */
public static final int TRANSIT_DESKTOP_MODE_TYPES =
WindowManager.TRANSIT_FIRST_CUSTOM + 100;
@@ -580,14 +584,6 @@ public class Transitions implements RemoteCallable<Transitions>,
final boolean isOpening = isOpeningType(transitType);
final boolean isClosing = isClosingType(transitType);
final int mode = change.getMode();
- // Ensure wallpapers stay in the back
- if (change.hasFlags(FLAG_IS_WALLPAPER) && Flags.ensureWallpaperInTransitions()) {
- if (mode == TRANSIT_OPEN || mode == TRANSIT_TO_FRONT) {
- return -zSplitLine + numChanges - i;
- } else {
- return -zSplitLine - i;
- }
- }
// Put all the OPEN/SHOW on top
if (mode == TRANSIT_OPEN || mode == TRANSIT_TO_FRONT) {
if (isOpening) {
@@ -806,14 +802,16 @@ public class Transitions implements RemoteCallable<Transitions>,
final int changeSize = info.getChanges().size();
boolean taskChange = false;
boolean transferStartingWindow = false;
- int noAnimationBehindStartingWindow = 0;
+ int animBehindStartingWindow = 0;
boolean allOccluded = changeSize > 0;
for (int i = changeSize - 1; i >= 0; --i) {
final TransitionInfo.Change change = info.getChanges().get(i);
taskChange |= change.getTaskInfo() != null;
transferStartingWindow |= change.hasFlags(FLAG_STARTING_WINDOW_TRANSFER_RECIPIENT);
- if (change.hasAllFlags(FLAG_IS_BEHIND_STARTING_WINDOW | FLAG_NO_ANIMATION)) {
- noAnimationBehindStartingWindow++;
+ if (change.hasAllFlags(FLAG_IS_BEHIND_STARTING_WINDOW | FLAG_NO_ANIMATION)
+ || change.hasAllFlags(
+ FLAG_IS_BEHIND_STARTING_WINDOW | FLAG_IN_TASK_WITH_EMBEDDED_ACTIVITY)) {
+ animBehindStartingWindow++;
}
if (!change.hasFlags(FLAG_IS_OCCLUDED)) {
allOccluded = false;
@@ -831,11 +829,11 @@ public class Transitions implements RemoteCallable<Transitions>,
// There does not need animation when:
// A. Transfer starting window. Apply transfer starting window directly if there is no other
// task change. Since this is an activity->activity situation, we can detect it by selecting
- // transitions with only 2 changes where
- // 1. neither are tasks, and
+ // transitions with changes where
+ // 1. none are tasks, and
// 2. one is a starting-window recipient, or all change is behind starting window.
- if (!taskChange && (transferStartingWindow || noAnimationBehindStartingWindow == changeSize)
- && changeSize == 2
+ if (!taskChange && (transferStartingWindow || animBehindStartingWindow == changeSize)
+ && changeSize >= 1
// B. It's visibility change if the TRANSIT_TO_BACK/TO_FRONT happened when all
// changes are underneath another change.
|| ((info.getType() == TRANSIT_TO_BACK || info.getType() == TRANSIT_TO_FRONT)
@@ -921,9 +919,12 @@ public class Transitions implements RemoteCallable<Transitions>,
}
// An existing animation is playing, so see if we can merge.
final ActiveTransition playing = track.mActiveTransition;
+ final IBinder playingToken = playing.mToken;
+ final IBinder readyToken = ready.mToken;
+
if (ready.mAborted) {
// record as merged since it is no-op. Calls back into processReadyQueue
- onMerged(playing, ready);
+ onMerged(playingToken, readyToken);
return;
}
ProtoLog.v(ShellProtoLogGroup.WM_SHELL_TRANSITIONS, "Transition %s ready while"
@@ -931,14 +932,31 @@ public class Transitions implements RemoteCallable<Transitions>,
+ " in case they can be merged", ready, playing);
mTransitionTracer.logMergeRequested(ready.mInfo.getDebugId(), playing.mInfo.getDebugId());
playing.mHandler.mergeAnimation(ready.mToken, ready.mInfo, ready.mStartT,
- playing.mToken, (wct) -> onMerged(playing, ready));
+ playing.mToken, (wct) -> onMerged(playingToken, readyToken));
}
- private void onMerged(@NonNull ActiveTransition playing, @NonNull ActiveTransition merged) {
+ private void onMerged(@NonNull IBinder playingToken, @NonNull IBinder mergedToken) {
+ if (enforceShellThreadModel()) {
+ mMainExecutor.assertCurrentThread();
+ }
+
+ ActiveTransition playing = mKnownTransitions.get(playingToken);
+ if (playing == null) {
+ Log.e(TAG, "Merging into a non-existent transition: " + playingToken);
+ return;
+ }
+
+ ActiveTransition merged = mKnownTransitions.get(mergedToken);
+ if (merged == null) {
+ Log.e(TAG, "Merging a non-existent transition: " + mergedToken);
+ return;
+ }
+
if (playing.getTrack() != merged.getTrack()) {
throw new IllegalStateException("Can't merge across tracks: " + merged + " into "
+ playing);
}
+
final Track track = mTracks.get(playing.getTrack());
ProtoLog.v(ShellProtoLogGroup.WM_SHELL_TRANSITIONS, "Transition was merged: %s into %s",
merged, playing);
@@ -1068,13 +1086,17 @@ public class Transitions implements RemoteCallable<Transitions>,
info.releaseAnimSurfaces();
}
- private void onFinish(IBinder token,
- @Nullable WindowContainerTransaction wct) {
+ private void onFinish(IBinder token, @Nullable WindowContainerTransaction wct) {
+ if (enforceShellThreadModel()) {
+ mMainExecutor.assertCurrentThread();
+ }
+
final ActiveTransition active = mKnownTransitions.get(token);
if (active == null) {
Log.e(TAG, "Trying to finish a non-existent transition: " + token);
return;
}
+
final Track track = mTracks.get(active.getTrack());
if (track == null || track.mActiveTransition != active) {
Log.e(TAG, "Trying to finish a non-running transition. Either remote crashed or "
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/util/KtProtoLog.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/util/KtProtoLog.kt
deleted file mode 100644
index ee6c81a3fa04..000000000000
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/util/KtProtoLog.kt
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (C) 2023 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.wm.shell.util
-
-import android.util.Log
-import com.android.internal.protolog.common.IProtoLogGroup
-import com.android.internal.protolog.ProtoLog
-
-/**
- * Log messages using an API similar to [com.android.internal.protolog.ProtoLog]. Useful for
- * logging from Kotlin classes as ProtoLog does not have support for Kotlin.
- *
- * All messages are logged to logcat if logging is enabled for that [IProtoLogGroup].
- */
-// TODO(b/168581922): remove once ProtoLog adds support for Kotlin
-class KtProtoLog {
- companion object {
- /** @see [com.android.internal.protolog.ProtoLog.d] */
- fun d(group: IProtoLogGroup, messageString: String, vararg args: Any) {
- if (group.isLogToLogcat) {
- Log.d(group.tag, String.format(messageString, *args))
- }
- }
-
- /** @see [com.android.internal.protolog.ProtoLog.v] */
- fun v(group: IProtoLogGroup, messageString: String, vararg args: Any) {
- if (group.isLogToLogcat) {
- Log.v(group.tag, String.format(messageString, *args))
- }
- }
-
- /** @see [com.android.internal.protolog.ProtoLog.i] */
- fun i(group: IProtoLogGroup, messageString: String, vararg args: Any) {
- if (group.isLogToLogcat) {
- Log.i(group.tag, String.format(messageString, *args))
- }
- }
-
- /** @see [com.android.internal.protolog.ProtoLog.w] */
- fun w(group: IProtoLogGroup, messageString: String, vararg args: Any) {
- if (group.isLogToLogcat) {
- Log.w(group.tag, String.format(messageString, *args))
- }
- }
-
- /** @see [com.android.internal.protolog.ProtoLog.e] */
- fun e(group: IProtoLogGroup, messageString: String, vararg args: Any) {
- if (group.isLogToLogcat) {
- Log.e(group.tag, String.format(messageString, *args))
- }
- }
-
- /** @see [com.android.internal.protolog.ProtoLog.wtf] */
- fun wtf(group: IProtoLogGroup, messageString: String, vararg args: Any) {
- if (group.isLogToLogcat) {
- Log.wtf(group.tag, String.format(messageString, *args))
- }
- }
- }
-}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecorViewModel.java b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecorViewModel.java
index 95e0d79c212e..5c230c0a505c 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecorViewModel.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecorViewModel.java
@@ -26,12 +26,20 @@ import static android.view.WindowManager.TRANSIT_CHANGE;
import android.app.ActivityManager.RunningTaskInfo;
import android.content.ContentResolver;
import android.content.Context;
+import android.graphics.Color;
+import android.graphics.Point;
import android.graphics.Rect;
+import android.graphics.Region;
+import android.hardware.input.InputManager;
import android.os.Handler;
+import android.os.RemoteException;
import android.provider.Settings;
+import android.util.Log;
import android.util.SparseArray;
import android.view.Choreographer;
import android.view.Display;
+import android.view.ISystemGestureExclusionListener;
+import android.view.IWindowManager;
import android.view.MotionEvent;
import android.view.SurfaceControl;
import android.view.View;
@@ -45,39 +53,78 @@ 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.ShellExecutor;
import com.android.wm.shell.common.SyncTransactionQueue;
import com.android.wm.shell.freeform.FreeformTaskTransitionStarter;
+import com.android.wm.shell.shared.annotations.ShellBackgroundThread;
import com.android.wm.shell.splitscreen.SplitScreenController;
+import com.android.wm.shell.sysui.ShellInit;
import com.android.wm.shell.transition.Transitions;
+import com.android.wm.shell.windowdecor.extension.TaskInfoKt;
/**
* View model for the window decoration with a caption and shadows. Works with
* {@link CaptionWindowDecoration}.
*/
public class CaptionWindowDecorViewModel implements WindowDecorViewModel {
+ private static final String TAG = "CaptionWindowDecorViewModel";
+
private final ShellTaskOrganizer mTaskOrganizer;
+ private final IWindowManager mWindowManager;
private final Context mContext;
private final Handler mMainHandler;
+ private final @ShellBackgroundThread ShellExecutor mBgExecutor;
+ private final ShellExecutor mMainExecutor;
private final Choreographer mMainChoreographer;
private final DisplayController mDisplayController;
private final RootTaskDisplayAreaOrganizer mRootTaskDisplayAreaOrganizer;
private final SyncTransactionQueue mSyncQueue;
private final Transitions mTransitions;
+ private final Region mExclusionRegion = Region.obtain();
+ private final InputManager mInputManager;
private TaskOperations mTaskOperations;
+ /**
+ * Whether to pilfer the next motion event to send cancellations to the windows below.
+ * Useful when the caption window is spy and the gesture should be handled by the system
+ * instead of by the app for their custom header content.
+ */
+ private boolean mShouldPilferCaptionEvents;
+
private final SparseArray<CaptionWindowDecoration> mWindowDecorByTaskId = new SparseArray<>();
+ private final ISystemGestureExclusionListener mGestureExclusionListener =
+ new ISystemGestureExclusionListener.Stub() {
+ @Override
+ public void onSystemGestureExclusionChanged(int displayId,
+ Region systemGestureExclusion, Region systemGestureExclusionUnrestricted) {
+ if (mContext.getDisplayId() != displayId) {
+ return;
+ }
+ mMainExecutor.execute(() -> {
+ mExclusionRegion.set(systemGestureExclusion);
+ });
+ }
+ };
+
public CaptionWindowDecorViewModel(
Context context,
Handler mainHandler,
+ @ShellBackgroundThread ShellExecutor bgExecutor,
+ ShellExecutor shellExecutor,
Choreographer mainChoreographer,
+ IWindowManager windowManager,
+ ShellInit shellInit,
ShellTaskOrganizer taskOrganizer,
DisplayController displayController,
RootTaskDisplayAreaOrganizer rootTaskDisplayAreaOrganizer,
SyncTransactionQueue syncQueue,
Transitions transitions) {
mContext = context;
+ mMainExecutor = shellExecutor;
mMainHandler = mainHandler;
+ mBgExecutor = bgExecutor;
+ mWindowManager = windowManager;
mMainChoreographer = mainChoreographer;
mTaskOrganizer = taskOrganizer;
mDisplayController = displayController;
@@ -87,6 +134,18 @@ public class CaptionWindowDecorViewModel implements WindowDecorViewModel {
if (!Transitions.ENABLE_SHELL_TRANSITIONS) {
mTaskOperations = new TaskOperations(null, mContext, mSyncQueue);
}
+ mInputManager = mContext.getSystemService(InputManager.class);
+
+ shellInit.addInitCallback(this::onInit, this);
+ }
+
+ private void onInit() {
+ try {
+ mWindowManager.registerSystemGestureExclusionListener(mGestureExclusionListener,
+ mContext.getDisplayId());
+ } catch (RemoteException e) {
+ Log.e(TAG, "Failed to register window manager callbacks", e);
+ }
}
@Override
@@ -178,8 +237,12 @@ public class CaptionWindowDecorViewModel implements WindowDecorViewModel {
}
private void setupCaptionColor(RunningTaskInfo taskInfo, CaptionWindowDecoration decoration) {
- final int statusBarColor = taskInfo.taskDescription.getStatusBarColor();
- decoration.setCaptionColor(statusBarColor);
+ if (TaskInfoKt.isTransparentCaptionBarAppearance(taskInfo)) {
+ decoration.setCaptionColor(Color.TRANSPARENT);
+ } else {
+ final int statusBarColor = taskInfo.taskDescription.getStatusBarColor();
+ decoration.setCaptionColor(statusBarColor);
+ }
}
private boolean shouldShowWindowDecor(RunningTaskInfo taskInfo) {
@@ -230,6 +293,7 @@ public class CaptionWindowDecorViewModel implements WindowDecorViewModel {
taskInfo,
taskSurface,
mMainHandler,
+ mBgExecutor,
mMainChoreographer,
mSyncQueue);
mWindowDecorByTaskId.put(taskInfo.taskId, windowDecoration);
@@ -301,6 +365,49 @@ public class CaptionWindowDecorViewModel implements WindowDecorViewModel {
mSyncQueue.queue(wct);
}
}
+ final CaptionWindowDecoration decoration = mWindowDecorByTaskId.get(mTaskId);
+
+ final int actionMasked = e.getActionMasked();
+ final boolean isDown = actionMasked == MotionEvent.ACTION_DOWN;
+ final boolean isUpOrCancel = actionMasked == MotionEvent.ACTION_CANCEL
+ || actionMasked == MotionEvent.ACTION_UP;
+ if (isDown) {
+ final boolean downInCustomizableCaptionRegion =
+ decoration.checkTouchEventInCustomizableRegion(e);
+ final boolean downInExclusionRegion = mExclusionRegion.contains(
+ (int) e.getRawX(), (int) e.getRawY());
+ final boolean isTransparentCaption =
+ TaskInfoKt.isTransparentCaptionBarAppearance(decoration.mTaskInfo);
+ // MotionEvent's coordinates are relative to view, we want location in window
+ // to offset position relative to caption as a whole.
+ int[] viewLocation = new int[2];
+ v.getLocationInWindow(viewLocation);
+ final boolean isResizeEvent = decoration.shouldResizeListenerHandleEvent(e,
+ new Point(viewLocation[0], viewLocation[1]));
+ // The caption window may be a spy window when the caption background is
+ // transparent, which means events will fall through to the app window. Make
+ // sure to cancel these events if they do not happen in the intersection of the
+ // customizable region and what the app reported as exclusion areas, because
+ // the drag-move or other caption gestures should take priority outside those
+ // regions.
+ mShouldPilferCaptionEvents = !(downInCustomizableCaptionRegion
+ && downInExclusionRegion && isTransparentCaption) && !isResizeEvent;
+ }
+
+ if (!mShouldPilferCaptionEvents) {
+ // The event will be handled by a window below or pilfered by resize handler.
+ return false;
+ }
+ // Otherwise pilfer so that windows below receive cancellations for this gesture, and
+ // continue normal handling as a caption gesture.
+ if (mInputManager != null) {
+ // TODO(b/352127475): Only pilfer once per gesture
+ mInputManager.pilferPointers(v.getViewRootImpl().getInputToken());
+ }
+ if (isUpOrCancel) {
+ // Gesture is finished, reset state.
+ mShouldPilferCaptionEvents = false;
+ }
return mDragDetector.onMotionEvent(e);
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecoration.java b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecoration.java
index d0ca5b0fdce6..cf42a49f7103 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecoration.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecoration.java
@@ -21,6 +21,8 @@ import static com.android.wm.shell.windowdecor.DragResizeWindowGeometry.getLarge
import static com.android.wm.shell.windowdecor.DragResizeWindowGeometry.getResizeEdgeHandleSize;
import android.annotation.NonNull;
+import android.annotation.SuppressLint;
+import android.app.ActivityManager;
import android.app.ActivityManager.RunningTaskInfo;
import android.app.WindowConfiguration;
import android.app.WindowConfiguration.WindowingMode;
@@ -28,22 +30,29 @@ import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.Resources;
import android.graphics.Color;
+import android.graphics.Point;
import android.graphics.Rect;
import android.graphics.drawable.GradientDrawable;
import android.graphics.drawable.VectorDrawable;
import android.os.Handler;
import android.util.Size;
import android.view.Choreographer;
+import android.view.MotionEvent;
import android.view.SurfaceControl;
import android.view.View;
import android.view.ViewConfiguration;
+import android.view.WindowManager;
import android.window.WindowContainerTransaction;
+import com.android.internal.annotations.VisibleForTesting;
import com.android.wm.shell.R;
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.ShellExecutor;
import com.android.wm.shell.common.SyncTransactionQueue;
+import com.android.wm.shell.shared.annotations.ShellBackgroundThread;
+import com.android.wm.shell.windowdecor.extension.TaskInfoKt;
/**
* Defines visuals and behaviors of a window decoration of a caption bar and shadows. It works with
@@ -52,6 +61,7 @@ import com.android.wm.shell.common.SyncTransactionQueue;
*/
public class CaptionWindowDecoration extends WindowDecoration<WindowDecorLinearLayout> {
private final Handler mHandler;
+ private final @ShellBackgroundThread ShellExecutor mBgExecutor;
private final Choreographer mChoreographer;
private final SyncTransactionQueue mSyncQueue;
@@ -72,10 +82,12 @@ public class CaptionWindowDecoration extends WindowDecoration<WindowDecorLinearL
RunningTaskInfo taskInfo,
SurfaceControl taskSurface,
Handler handler,
+ @ShellBackgroundThread ShellExecutor bgExecutor,
Choreographer choreographer,
SyncTransactionQueue syncQueue) {
super(context, displayController, taskOrganizer, taskInfo, taskSurface);
mHandler = handler;
+ mBgExecutor = bgExecutor;
mChoreographer = choreographer;
mSyncQueue = syncQueue;
}
@@ -177,12 +189,45 @@ public class CaptionWindowDecoration extends WindowDecoration<WindowDecorLinearL
shouldSetTaskPositionAndCrop);
}
+ @VisibleForTesting
+ static void updateRelayoutParams(
+ RelayoutParams relayoutParams,
+ ActivityManager.RunningTaskInfo taskInfo,
+ boolean applyStartTransactionOnDraw,
+ boolean setTaskCropAndPosition) {
+ relayoutParams.reset();
+ relayoutParams.mRunningTaskInfo = taskInfo;
+ relayoutParams.mLayoutResId = R.layout.caption_window_decor;
+ relayoutParams.mCaptionHeightId = getCaptionHeightIdStatic(taskInfo.getWindowingMode());
+ relayoutParams.mShadowRadiusId = taskInfo.isFocused
+ ? R.dimen.freeform_decor_shadow_focused_thickness
+ : R.dimen.freeform_decor_shadow_unfocused_thickness;
+ relayoutParams.mApplyStartTransactionOnDraw = applyStartTransactionOnDraw;
+ relayoutParams.mSetTaskPositionAndCrop = setTaskCropAndPosition;
+
+ if (TaskInfoKt.isTransparentCaptionBarAppearance(taskInfo)) {
+ // If the app is requesting to customize the caption bar, allow input to fall
+ // through to the windows below so that the app can respond to input events on
+ // their custom content.
+ relayoutParams.mInputFeatures |= WindowManager.LayoutParams.INPUT_FEATURE_SPY;
+ }
+ final RelayoutParams.OccludingCaptionElement backButtonElement =
+ new RelayoutParams.OccludingCaptionElement();
+ backButtonElement.mWidthResId = R.dimen.caption_left_buttons_width;
+ backButtonElement.mAlignment = RelayoutParams.OccludingCaptionElement.Alignment.START;
+ relayoutParams.mOccludingCaptionElements.add(backButtonElement);
+ // Then, the right-aligned section (minimize, maximize and close buttons).
+ final RelayoutParams.OccludingCaptionElement controlsElement =
+ new RelayoutParams.OccludingCaptionElement();
+ controlsElement.mWidthResId = R.dimen.caption_right_buttons_width;
+ controlsElement.mAlignment = RelayoutParams.OccludingCaptionElement.Alignment.END;
+ relayoutParams.mOccludingCaptionElements.add(controlsElement);
+ }
+
+ @SuppressLint("MissingPermission")
void relayout(RunningTaskInfo taskInfo,
SurfaceControl.Transaction startT, SurfaceControl.Transaction finishT,
boolean applyStartTransactionOnDraw, boolean setTaskCropAndPosition) {
- final int shadowRadiusID = taskInfo.isFocused
- ? R.dimen.freeform_decor_shadow_focused_thickness
- : R.dimen.freeform_decor_shadow_unfocused_thickness;
final boolean isFreeform =
taskInfo.getWindowingMode() == WindowConfiguration.WINDOWING_MODE_FREEFORM;
final boolean isDragResizeable = isFreeform && taskInfo.isResizeable;
@@ -191,18 +236,13 @@ public class CaptionWindowDecoration extends WindowDecoration<WindowDecorLinearL
final SurfaceControl oldDecorationSurface = mDecorationContainerSurface;
final WindowContainerTransaction wct = new WindowContainerTransaction();
- mRelayoutParams.reset();
- mRelayoutParams.mRunningTaskInfo = taskInfo;
- mRelayoutParams.mLayoutResId = R.layout.caption_window_decor;
- mRelayoutParams.mCaptionHeightId = getCaptionHeightId(taskInfo.getWindowingMode());
- mRelayoutParams.mShadowRadiusId = shadowRadiusID;
- mRelayoutParams.mApplyStartTransactionOnDraw = applyStartTransactionOnDraw;
- mRelayoutParams.mSetTaskPositionAndCrop = setTaskCropAndPosition;
+ updateRelayoutParams(mRelayoutParams, taskInfo, applyStartTransactionOnDraw,
+ setTaskCropAndPosition);
relayout(mRelayoutParams, startT, finishT, wct, oldRootView, mResult);
// After this line, mTaskInfo is up-to-date and should be used instead of taskInfo
- mTaskOrganizer.applyTransaction(wct);
+ mBgExecutor.execute(() -> mTaskOrganizer.applyTransaction(wct));
if (mResult.mRootView == null) {
// This means something blocks the window decor from showing, e.g. the task is hidden.
@@ -303,6 +343,17 @@ public class CaptionWindowDecoration extends WindowDecoration<WindowDecorLinearL
mDragResizeListener = null;
}
+ /**
+ * Checks whether the touch event falls inside the customizable caption region.
+ */
+ boolean checkTouchEventInCustomizableRegion(MotionEvent ev) {
+ return mResult.mCustomizableCaptionRegion.contains((int) ev.getRawX(), (int) ev.getRawY());
+ }
+
+ boolean shouldResizeListenerHandleEvent(@NonNull MotionEvent e, @NonNull Point offset) {
+ return mDragResizeListener != null && mDragResizeListener.shouldHandleEvent(e, offset);
+ }
+
@Override
public void close() {
closeDragResizeListener();
@@ -311,6 +362,10 @@ public class CaptionWindowDecoration extends WindowDecoration<WindowDecorLinearL
@Override
int getCaptionHeightId(@WindowingMode int windowingMode) {
+ return getCaptionHeightIdStatic(windowingMode);
+ }
+
+ private static int getCaptionHeightIdStatic(@WindowingMode int windowingMode) {
return R.dimen.freeform_decor_caption_height;
}
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 1be33e5d2d95..de1948331f40 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
@@ -22,6 +22,9 @@ import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM;
import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
import static android.app.WindowConfiguration.WINDOWING_MODE_MULTI_WINDOW;
import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED;
+import static android.content.Intent.ACTION_MAIN;
+import static android.content.Intent.CATEGORY_APP_BROWSER;
+import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
import static android.view.InputDevice.SOURCE_TOUCHSCREEN;
import static android.view.MotionEvent.ACTION_CANCEL;
import static android.view.MotionEvent.ACTION_HOVER_ENTER;
@@ -30,10 +33,13 @@ import static android.view.MotionEvent.ACTION_MOVE;
import static android.view.MotionEvent.ACTION_UP;
import static android.view.WindowInsets.Type.statusBars;
+import static com.android.internal.jank.Cuj.CUJ_DESKTOP_MODE_ENTER_MODE_APP_HANDLE_MENU;
import static com.android.wm.shell.common.split.SplitScreenConstants.SPLIT_POSITION_BOTTOM_OR_RIGHT;
import static com.android.wm.shell.common.split.SplitScreenConstants.SPLIT_POSITION_TOP_OR_LEFT;
import static com.android.wm.shell.compatui.AppCompatUtils.isTopActivityExemptFromDesktopWindowing;
import static com.android.wm.shell.desktopmode.DesktopModeVisualIndicator.IndicatorType.TO_FULLSCREEN_INDICATOR;
+import static com.android.wm.shell.desktopmode.DesktopModeVisualIndicator.IndicatorType.TO_SPLIT_LEFT_INDICATOR;
+import static com.android.wm.shell.desktopmode.DesktopModeVisualIndicator.IndicatorType.TO_SPLIT_RIGHT_INDICATOR;
import static com.android.wm.shell.protolog.ShellProtoLogGroup.WM_SHELL_DESKTOP_MODE;
import static com.android.wm.shell.splitscreen.SplitScreen.STAGE_TYPE_UNDEFINED;
@@ -42,11 +48,13 @@ import android.app.ActivityManager;
import android.app.ActivityManager.RunningTaskInfo;
import android.app.ActivityTaskManager;
import android.content.Context;
+import android.content.Intent;
import android.graphics.Point;
import android.graphics.PointF;
import android.graphics.Rect;
import android.graphics.Region;
import android.hardware.input.InputManager;
+import android.net.Uri;
import android.os.Handler;
import android.os.Looper;
import android.os.RemoteException;
@@ -91,6 +99,7 @@ import com.android.wm.shell.desktopmode.DesktopTasksController;
import com.android.wm.shell.desktopmode.DesktopTasksController.SnapPosition;
import com.android.wm.shell.desktopmode.DesktopWallpaperActivity;
import com.android.wm.shell.freeform.FreeformTaskTransitionStarter;
+import com.android.wm.shell.shared.annotations.ShellBackgroundThread;
import com.android.wm.shell.shared.desktopmode.DesktopModeStatus;
import com.android.wm.shell.splitscreen.SplitScreen;
import com.android.wm.shell.splitscreen.SplitScreen.StageType;
@@ -125,6 +134,7 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel {
private final ShellController mShellController;
private final Context mContext;
private final Handler mMainHandler;
+ private final @ShellBackgroundThread ShellExecutor mBgExecutor;
private final Choreographer mMainChoreographer;
private final DisplayController mDisplayController;
private final SyncTransactionQueue mSyncQueue;
@@ -176,6 +186,7 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel {
ShellExecutor shellExecutor,
Handler mainHandler,
Choreographer mainChoreographer,
+ @ShellBackgroundThread ShellExecutor bgExecutor,
ShellInit shellInit,
ShellCommandHandler shellCommandHandler,
IWindowManager windowManager,
@@ -194,6 +205,7 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel {
shellExecutor,
mainHandler,
mainChoreographer,
+ bgExecutor,
shellInit,
shellCommandHandler,
windowManager,
@@ -218,6 +230,7 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel {
ShellExecutor shellExecutor,
Handler mainHandler,
Choreographer mainChoreographer,
+ @ShellBackgroundThread ShellExecutor bgExecutor,
ShellInit shellInit,
ShellCommandHandler shellCommandHandler,
IWindowManager windowManager,
@@ -238,6 +251,7 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel {
mMainExecutor = shellExecutor;
mMainHandler = mainHandler;
mMainChoreographer = mainChoreographer;
+ mBgExecutor = bgExecutor;
mActivityTaskManager = mContext.getSystemService(ActivityTaskManager.class);
mTaskOrganizer = taskOrganizer;
mShellController = shellController;
@@ -314,7 +328,8 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel {
if (decoration == null) return;
final RunningTaskInfo oldTaskInfo = decoration.mTaskInfo;
- if (taskInfo.displayId != oldTaskInfo.displayId) {
+ if (taskInfo.displayId != oldTaskInfo.displayId
+ && !Flags.enableAdditionalWindowsAboveStatusBar()) {
removeTaskFromEventReceiver(oldTaskInfo.displayId);
incrementEventReceiverTasks(taskInfo.displayId);
}
@@ -378,7 +393,8 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel {
decoration.close();
final int displayId = taskInfo.displayId;
- if (mEventReceiversByDisplay.contains(displayId)) {
+ if (mEventReceiversByDisplay.contains(displayId)
+ && !Flags.enableAdditionalWindowsAboveStatusBar()) {
removeTaskFromEventReceiver(displayId);
}
// Remove the decoration from the cache last because WindowDecoration#close could still
@@ -410,6 +426,19 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel {
decoration.closeMaximizeMenu();
}
+ private void onOpenInBrowser(@NonNull DesktopModeWindowDecoration decor, @NonNull Uri uri) {
+ openInBrowser(uri);
+ decor.closeHandleMenu();
+ decor.closeMaximizeMenu();
+ }
+
+ private void openInBrowser(Uri uri) {
+ final Intent intent = Intent.makeMainSelectorActivity(ACTION_MAIN, CATEGORY_APP_BROWSER)
+ .setData(uri)
+ .addFlags(FLAG_ACTIVITY_NEW_TASK);
+ mContext.startActivity(intent);
+ }
+
private class DesktopModeTouchEventListener extends GestureDetector.SimpleOnGestureListener
implements View.OnClickListener, View.OnTouchListener, View.OnLongClickListener,
View.OnGenericMotionListener, DragDetector.MotionEventHandler {
@@ -473,6 +502,8 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel {
final WindowContainerTransaction wct = new WindowContainerTransaction();
// App sometimes draws before the insets from WindowDecoration#relayout have
// been added, so they must be added here
+ mInteractionJankMonitor.begin(decoration.mTaskSurface, mContext,
+ CUJ_DESKTOP_MODE_ENTER_MODE_APP_HANDLE_MENU);
mWindowDecorByTaskId.get(mTaskId).addCaptionInset(wct);
mDesktopTasksController.moveToDesktop(mTaskId, wct,
DesktopModeTransitionSource.APP_HANDLE_MENU_BUTTON);
@@ -488,7 +519,14 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel {
}
} else if (id == R.id.split_screen_button) {
decoration.closeHandleMenu();
+ // When the app enters split-select, the handle will no longer be visible, meaning
+ // we shouldn't receive input for it any longer.
+ decoration.disposeStatusBarInputLayer();
mDesktopTasksController.requestSplit(decoration.mTaskInfo);
+ } else if (id == R.id.open_in_browser_button) {
+ // TODO(b/346441962): let the decoration handle the click gesture and only call back
+ // to the ViewModel via #setOpenInBrowserClickListener
+ decoration.onOpenInBrowserClick();
} else if (id == R.id.collapse_menu_button) {
decoration.closeHandleMenu();
} else if (id == R.id.maximize_window) {
@@ -620,13 +658,32 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel {
final DesktopModeWindowDecoration decoration = mWindowDecorByTaskId.get(mTaskId);
final RunningTaskInfo taskInfo = decoration.mTaskInfo;
if (DesktopModeStatus.canEnterDesktopMode(mContext)
- && taskInfo.getWindowingMode() == WINDOWING_MODE_FULLSCREEN) {
- return false;
+ && !taskInfo.isFreeform()) {
+ return handleNonFreeformMotionEvent(decoration, v, e);
+ } else {
+ return handleFreeformMotionEvent(decoration, taskInfo, v, e);
+ }
+ }
+
+ private boolean handleNonFreeformMotionEvent(DesktopModeWindowDecoration decoration,
+ View v, MotionEvent e) {
+ final int id = v.getId();
+ if (id == R.id.caption_handle) {
+ handleCaptionThroughStatusBar(e, decoration);
+ final boolean wasDragging = mIsDragging;
+ updateDragStatus(e.getActionMasked());
+ // Only prevent onClick from receiving this event if it's a drag.
+ return wasDragging;
}
+ return false;
+ }
+
+ private boolean handleFreeformMotionEvent(DesktopModeWindowDecoration decoration,
+ RunningTaskInfo taskInfo, View v, MotionEvent e) {
+ final int id = v.getId();
if (mGestureDetector.onTouchEvent(e)) {
return true;
}
- final int id = v.getId();
final boolean touchingButton = (id == R.id.close_window || id == R.id.maximize_window
|| id == R.id.open_menu_button);
switch (e.getActionMasked()) {
@@ -635,7 +692,7 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel {
mDragPositioningCallback.onDragPositioningStart(
0 /* ctrlType */, e.getRawX(0),
e.getRawY(0));
- mIsDragging = false;
+ updateDragStatus(e.getActionMasked());
mHasLongClicked = false;
// Do not consume input event if a button is touched, otherwise it would
// prevent the button's ripple effect from showing.
@@ -655,7 +712,7 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel {
decoration.mTaskSurface,
e.getRawX(dragPointerIdx),
newTaskBounds);
- mIsDragging = true;
+ updateDragStatus(e.getActionMasked());
return true;
}
case MotionEvent.ACTION_UP:
@@ -685,7 +742,7 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel {
// onClick call that results.
return false;
} else {
- mIsDragging = false;
+ updateDragStatus(e.getActionMasked());
return true;
}
}
@@ -693,6 +750,21 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel {
return true;
}
+ private void updateDragStatus(int eventAction) {
+ switch (eventAction) {
+ case MotionEvent.ACTION_DOWN:
+ case MotionEvent.ACTION_UP:
+ case MotionEvent.ACTION_CANCEL: {
+ mIsDragging = false;
+ break;
+ }
+ case MotionEvent.ACTION_MOVE: {
+ mIsDragging = true;
+ break;
+ }
+ }
+ }
+
/**
* Perform a task size toggle on release of the double-tap, assuming no drag event
* was handled during the double-tap.
@@ -817,6 +889,10 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel {
*
* @param relevantDecor the window decoration of the focused task's caption. This method only
* handles motion events outside this caption's bounds.
+ * TODO(b/349135068): Outside-touch detection no longer works with the
+ * enableAdditionalWindowsAboveStatusBar flag enabled. This
+ * will be fixed once we can add FLAG_WATCH_OUTSIDE_TOUCH to relevant menus,
+ * at which point, all EventReceivers and external touch logic should be removed.
*/
private void handleEventOutsideCaption(MotionEvent ev,
DesktopModeWindowDecoration relevantDecor) {
@@ -869,9 +945,10 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel {
dragFromStatusBarAllowed = windowingMode == WINDOWING_MODE_FULLSCREEN
|| windowingMode == WINDOWING_MODE_MULTI_WINDOW;
}
-
- if (dragFromStatusBarAllowed
- && relevantDecor.checkTouchEventInFocusedCaptionHandle(ev)) {
+ final boolean shouldStartTransitionDrag =
+ relevantDecor.checkTouchEventInFocusedCaptionHandle(ev)
+ || Flags.enableAdditionalWindowsAboveStatusBar();
+ if (dragFromStatusBarAllowed && shouldStartTransitionDrag) {
mTransitionDragActive = true;
}
break;
@@ -885,8 +962,17 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel {
// Though this isn't a hover event, we need to update handle's hover state
// as it likely will change.
relevantDecor.updateHoverAndPressStatus(ev);
- mDesktopTasksController.onDragPositioningEndThroughStatusBar(
- new PointF(ev.getRawX(), ev.getRawY()), relevantDecor.mTaskInfo);
+ DesktopModeVisualIndicator.IndicatorType resultType =
+ mDesktopTasksController.onDragPositioningEndThroughStatusBar(
+ new PointF(ev.getRawX(), ev.getRawY()),
+ relevantDecor.mTaskInfo,
+ relevantDecor.mTaskSurface);
+ // If we are entering split select, handle will no longer be visible and
+ // should not be receiving any input.
+ if (resultType == TO_SPLIT_LEFT_INDICATOR
+ || resultType != TO_SPLIT_RIGHT_INDICATOR) {
+ relevantDecor.disposeStatusBarInputLayer();
+ }
mMoveToDesktopAnimator = null;
return;
} else {
@@ -898,7 +984,6 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel {
relevantDecor.checkTouchEvent(ev);
break;
}
-
case ACTION_MOVE: {
if (relevantDecor == null) {
return;
@@ -921,7 +1006,7 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel {
mContext, mDragToDesktopAnimationStartBounds,
relevantDecor.mTaskInfo, relevantDecor.mTaskSurface);
mDesktopTasksController.startDragToDesktop(relevantDecor.mTaskInfo,
- mMoveToDesktopAnimator);
+ mMoveToDesktopAnimator, relevantDecor.mTaskSurface);
}
}
if (mMoveToDesktopAnimator != null) {
@@ -1010,7 +1095,7 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel {
private void createInputChannel(int displayId) {
final InputManager inputManager = mContext.getSystemService(InputManager.class);
final InputMonitor inputMonitor =
- mInputMonitorFactory.create(inputManager, mContext);
+ mInputMonitorFactory.create(inputManager, displayId);
final EventReceiver eventReceiver = new EventReceiver(inputMonitor,
inputMonitor.getInputChannel(), Looper.myLooper());
mEventReceiversByDisplay.put(displayId, eventReceiver);
@@ -1058,10 +1143,12 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel {
mDesktopModeWindowDecorFactory.create(
mContext,
mDisplayController,
+ mSplitScreenController,
mTaskOrganizer,
taskInfo,
taskSurface,
mMainHandler,
+ mBgExecutor,
mMainChoreographer,
mSyncQueue,
mRootTaskDisplayAreaOrganizer);
@@ -1091,6 +1178,7 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel {
windowDecoration.setOnRightSnapClickListener((taskId, tag) -> {
onSnapResize(taskId, false /* isLeft */);
});
+ windowDecoration.setOpenInBrowserClickListener(this::onOpenInBrowser);
windowDecoration.setCaptionListeners(
touchEventListener, touchEventListener, touchEventListener, touchEventListener);
windowDecoration.setExclusionRegionListener(mExclusionRegionListener);
@@ -1098,7 +1186,9 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel {
windowDecoration.setDragDetector(touchEventListener.mDragDetector);
windowDecoration.relayout(taskInfo, startT, finishT,
false /* applyStartTransactionOnDraw */, false /* shouldSetTaskPositionAndCrop */);
- incrementEventReceiverTasks(taskInfo.displayId);
+ if (!Flags.enableAdditionalWindowsAboveStatusBar()) {
+ incrementEventReceiverTasks(taskInfo.displayId);
+ }
}
private RunningTaskInfo getOtherSplitTask(int taskId) {
@@ -1163,8 +1253,8 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel {
}
static class InputMonitorFactory {
- InputMonitor create(InputManager inputManager, Context context) {
- return inputManager.monitorGestureInput("caption-touch", context.getDisplayId());
+ InputMonitor create(InputManager inputManager, int displayId) {
+ return inputManager.monitorGestureInput("caption-touch", displayId);
}
}
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 b62194ca6239..6e883251ddde 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
@@ -24,11 +24,13 @@ import static android.view.MotionEvent.ACTION_DOWN;
import static android.view.MotionEvent.ACTION_UP;
import static com.android.launcher3.icons.BaseIconFactory.MODE_DEFAULT;
+import static com.android.wm.shell.common.split.SplitScreenConstants.SPLIT_POSITION_BOTTOM_OR_RIGHT;
import static com.android.wm.shell.windowdecor.DragResizeWindowGeometry.getFineResizeCornerSize;
import static com.android.wm.shell.windowdecor.DragResizeWindowGeometry.getLargeResizeCornerSize;
import static com.android.wm.shell.windowdecor.DragResizeWindowGeometry.getResizeEdgeHandleSize;
import android.annotation.NonNull;
+import android.annotation.SuppressLint;
import android.app.ActivityManager;
import android.app.WindowConfiguration.WindowingMode;
import android.content.ComponentName;
@@ -44,6 +46,7 @@ import android.graphics.PointF;
import android.graphics.Rect;
import android.graphics.Region;
import android.graphics.drawable.Drawable;
+import android.net.Uri;
import android.os.Handler;
import android.os.Trace;
import android.util.Log;
@@ -67,7 +70,9 @@ 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.ShellExecutor;
import com.android.wm.shell.common.SyncTransactionQueue;
+import com.android.wm.shell.shared.annotations.ShellBackgroundThread;
import com.android.wm.shell.shared.desktopmode.DesktopModeStatus;
import com.android.wm.shell.splitscreen.SplitScreenController;
import com.android.wm.shell.windowdecor.common.OnTaskActionClickListener;
@@ -88,13 +93,16 @@ import java.util.function.Supplier;
*/
public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLinearLayout> {
private static final String TAG = "DesktopModeWindowDecoration";
+ private static final int CAPTURED_LINK_TIMEOUT_MS = 7000;
@VisibleForTesting
static final long CLOSE_MAXIMIZE_MENU_DELAY_MS = 150L;
private final Handler mHandler;
+ private final @ShellBackgroundThread ShellExecutor mBgExecutor;
private final Choreographer mChoreographer;
private final SyncTransactionQueue mSyncQueue;
+ private final SplitScreenController mSplitScreenController;
private WindowDecorationViewHolder mWindowDecorViewHolder;
private View.OnClickListener mOnCaptionButtonClickListener;
@@ -124,6 +132,8 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
private Bitmap mResizeVeilBitmap;
private CharSequence mAppName;
+ private CapturedLink mCapturedLink;
+ private OpenInBrowserClickListener mOpenInBrowserClickListener;
private ExclusionRegionListener mExclusionRegionListener;
@@ -138,32 +148,37 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
// being hovered. There's a small delay after stopping the hover, to allow a quick reentry
// to cancel the close.
private final Runnable mCloseMaximizeWindowRunnable = this::closeMaximizeMenu;
+ private final Runnable mCapturedLinkExpiredRunnable = this::onCapturedLinkExpired;
DesktopModeWindowDecoration(
Context context,
DisplayController displayController,
+ SplitScreenController splitScreenController,
ShellTaskOrganizer taskOrganizer,
ActivityManager.RunningTaskInfo taskInfo,
SurfaceControl taskSurface,
Handler handler,
+ @ShellBackgroundThread ShellExecutor bgExecutor,
Choreographer choreographer,
SyncTransactionQueue syncQueue,
RootTaskDisplayAreaOrganizer rootTaskDisplayAreaOrganizer) {
- this (context, displayController, taskOrganizer, taskInfo, taskSurface,
- handler, choreographer, syncQueue, rootTaskDisplayAreaOrganizer,
- SurfaceControl.Builder::new, SurfaceControl.Transaction::new,
- WindowContainerTransaction::new, SurfaceControl::new,
- new SurfaceControlViewHostFactory() {},
+ this (context, displayController, splitScreenController, taskOrganizer, taskInfo,
+ taskSurface, handler, bgExecutor, choreographer, syncQueue,
+ rootTaskDisplayAreaOrganizer, SurfaceControl.Builder::new,
+ SurfaceControl.Transaction::new, WindowContainerTransaction::new,
+ SurfaceControl::new, new SurfaceControlViewHostFactory() {},
DefaultMaximizeMenuFactory.INSTANCE);
}
DesktopModeWindowDecoration(
Context context,
DisplayController displayController,
+ SplitScreenController splitScreenController,
ShellTaskOrganizer taskOrganizer,
ActivityManager.RunningTaskInfo taskInfo,
SurfaceControl taskSurface,
Handler handler,
+ @ShellBackgroundThread ShellExecutor bgExecutor,
Choreographer choreographer,
SyncTransactionQueue syncQueue,
RootTaskDisplayAreaOrganizer rootTaskDisplayAreaOrganizer,
@@ -177,7 +192,9 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
surfaceControlBuilderSupplier, surfaceControlTransactionSupplier,
windowContainerTransactionSupplier, surfaceControlSupplier,
surfaceControlViewHostFactory);
+ mSplitScreenController = splitScreenController;
mHandler = handler;
+ mBgExecutor = bgExecutor;
mChoreographer = choreographer;
mSyncQueue = syncQueue;
mRootTaskDisplayAreaOrganizer = rootTaskDisplayAreaOrganizer;
@@ -232,6 +249,10 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
mDragDetector.setTouchSlop(ViewConfiguration.get(mContext).getScaledTouchSlop());
}
+ void setOpenInBrowserClickListener(OpenInBrowserClickListener listener) {
+ mOpenInBrowserClickListener = listener;
+ }
+
@Override
void relayout(ActivityManager.RunningTaskInfo taskInfo) {
final SurfaceControl.Transaction t = mSurfaceControlTransactionSupplier.get();
@@ -319,12 +340,18 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
mHandler.post(mCurrentViewHostRunnable);
}
+ @SuppressLint("MissingPermission")
private void updateRelayoutParamsAndSurfaces(ActivityManager.RunningTaskInfo taskInfo,
SurfaceControl.Transaction startT, SurfaceControl.Transaction finishT,
boolean applyStartTransactionOnDraw, boolean shouldSetTaskPositionAndCrop) {
Trace.beginSection("DesktopModeWindowDecoration#updateRelayoutParamsAndSurfaces");
+
+ if (Flags.enableDesktopWindowingAppToWeb()) {
+ setCapturedLink(taskInfo.capturedLink, taskInfo.capturedLinkTimestamp);
+ }
+
if (isHandleMenuActive()) {
- mHandleMenu.relayout(startT);
+ mHandleMenu.relayout(startT, mResult.mCaptionX);
}
updateRelayoutParams(mRelayoutParams, mContext, taskInfo, applyStartTransactionOnDraw,
@@ -340,33 +367,69 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
// After this line, mTaskInfo is up-to-date and should be used instead of taskInfo
Trace.beginSection("DesktopModeWindowDecoration#relayout-applyWCT");
- mTaskOrganizer.applyTransaction(wct);
+ mBgExecutor.execute(() -> mTaskOrganizer.applyTransaction(wct));
Trace.endSection();
if (mResult.mRootView == null) {
// This means something blocks the window decor from showing, e.g. the task is hidden.
// Nothing is set up in this case including the decoration surface.
+ disposeStatusBarInputLayer();
Trace.endSection(); // DesktopModeWindowDecoration#updateRelayoutParamsAndSurfaces
return;
}
if (oldRootView != mResult.mRootView) {
+ disposeStatusBarInputLayer();
mWindowDecorViewHolder = createViewHolder();
}
Trace.beginSection("DesktopModeWindowDecoration#relayout-binding");
- mWindowDecorViewHolder.bindData(mTaskInfo);
+
+ final Point position = new Point();
+ if (isAppHandle(mWindowDecorViewHolder)) {
+ position.set(determineHandlePosition());
+ }
+ mWindowDecorViewHolder.bindData(mTaskInfo,
+ position,
+ mResult.mCaptionWidth,
+ mResult.mCaptionHeight,
+ isCaptionVisible());
Trace.endSection();
if (!mTaskInfo.isFocused) {
closeHandleMenu();
closeMaximizeMenu();
}
-
updateDragResizeListener(oldDecorationSurface);
updateMaximizeMenu(startT);
Trace.endSection(); // DesktopModeWindowDecoration#updateRelayoutParamsAndSurfaces
}
+ private boolean isCaptionVisible() {
+ return mTaskInfo.isVisible && mIsCaptionVisible;
+ }
+
+ private void setCapturedLink(Uri capturedLink, long timeStamp) {
+ if (capturedLink == null
+ || (mCapturedLink != null && mCapturedLink.mTimeStamp == timeStamp)) {
+ return;
+ }
+ mCapturedLink = new CapturedLink(capturedLink, timeStamp);
+ mHandler.postDelayed(mCapturedLinkExpiredRunnable, CAPTURED_LINK_TIMEOUT_MS);
+ }
+
+ private void onCapturedLinkExpired() {
+ mHandler.removeCallbacks(mCapturedLinkExpiredRunnable);
+ if (mCapturedLink != null) {
+ mCapturedLink.setExpired();
+ }
+ }
+
+ void onOpenInBrowserClick() {
+ if (mOpenInBrowserClickListener == null || mCapturedLink == null) return;
+ mOpenInBrowserClickListener.onClick(this, mCapturedLink.mUri);
+ onCapturedLinkExpired();
+ }
+
private void updateDragResizeListener(SurfaceControl oldDecorationSurface) {
if (!isDragResizable(mTaskInfo)) {
if (!mTaskInfo.positionInParent.equals(mPositionInParent)) {
@@ -426,6 +489,32 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
}
}
+ private Point determineHandlePosition() {
+ final Point position = new Point(mResult.mCaptionX, 0);
+ if (mSplitScreenController.getSplitPosition(mTaskInfo.taskId)
+ == SPLIT_POSITION_BOTTOM_OR_RIGHT
+ && mDisplayController.getDisplayLayout(mTaskInfo.displayId).isLandscape()
+ ) {
+ // If this is the right split task, add left stage's width.
+ final Rect leftStageBounds = new Rect();
+ mSplitScreenController.getStageBounds(leftStageBounds, new Rect());
+ position.x += leftStageBounds.width();
+ }
+ return position;
+ }
+
+ /**
+ * Dispose of the view used to forward inputs in status bar region. Intended to be
+ * used any time handle is no longer visible.
+ */
+ void disposeStatusBarInputLayer() {
+ if (!isAppHandle(mWindowDecorViewHolder)
+ || !Flags.enableAdditionalWindowsAboveStatusBar()) {
+ return;
+ }
+ ((AppHandleViewHolder) mWindowDecorViewHolder).disposeStatusBarInputLayer();
+ }
+
private WindowDecorationViewHolder createViewHolder() {
if (mRelayoutParams.mLayoutResId == R.layout.desktop_mode_app_handle) {
return new AppHandleViewHolder(
@@ -454,6 +543,10 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
throw new IllegalArgumentException("Unexpected layout resource id");
}
+ private boolean isAppHandle(WindowDecorationViewHolder viewHolder) {
+ return viewHolder instanceof AppHandleViewHolder;
+ }
+
@VisibleForTesting
static void updateRelayoutParams(
RelayoutParams relayoutParams,
@@ -492,9 +585,11 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
controlsElement.mWidthResId = R.dimen.desktop_mode_customizable_caption_margin_end;
controlsElement.mAlignment = RelayoutParams.OccludingCaptionElement.Alignment.END;
relayoutParams.mOccludingCaptionElements.add(controlsElement);
- } else if (isAppHandle) {
+ } else if (isAppHandle && !Flags.enableAdditionalWindowsAboveStatusBar()) {
// The focused decor (fullscreen/split) does not need to handle input because input in
// the App Handle is handled by the InputMonitor in DesktopModeWindowDecorViewModel.
+ // Note: This does not apply with the above flag enabled as the status bar input layer
+ // will forward events to the handle directly.
relayoutParams.mInputFeatures
|= WindowManager.LayoutParams.INPUT_FEATURE_NO_INPUT_CHANNEL;
}
@@ -817,21 +912,30 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
*/
void createHandleMenu(SplitScreenController splitScreenController) {
loadAppInfoIfNeeded();
- mHandleMenu = new HandleMenu.Builder(this)
- .setAppIcon(mAppIconBitmap)
- .setAppName(mAppName)
- .setOnClickListener(mOnCaptionButtonClickListener)
- .setOnTouchListener(mOnCaptionTouchListener)
- .setLayoutId(mRelayoutParams.mLayoutResId)
- .setWindowingButtonsVisible(DesktopModeStatus.canEnterDesktopMode(mContext))
- .setCaptionHeight(mResult.mCaptionHeight)
- .setDisplayController(mDisplayController)
- .setSplitScreenController(splitScreenController)
- .build();
+ mHandleMenu = new HandleMenu(
+ this,
+ mRelayoutParams.mLayoutResId,
+ mOnCaptionButtonClickListener,
+ mOnCaptionTouchListener,
+ mAppIconBitmap,
+ mAppName,
+ mDisplayController,
+ splitScreenController,
+ DesktopModeStatus.canEnterDesktopMode(mContext),
+ browserLinkAvailable(),
+ mResult.mCaptionWidth,
+ mResult.mCaptionHeight,
+ mResult.mCaptionX
+ );
mWindowDecorViewHolder.onHandleMenuOpened();
mHandleMenu.show();
}
+ @VisibleForTesting
+ boolean browserLinkAvailable() {
+ return mCapturedLink != null && !mCapturedLink.mExpired;
+ }
+
/**
* Close the handle menu window.
*/
@@ -913,10 +1017,17 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
* @return {@code true} if event is inside caption handle view, {@code false} if not
*/
boolean checkTouchEventInFocusedCaptionHandle(MotionEvent ev) {
- if (isHandleMenuActive() || !(mWindowDecorViewHolder
- instanceof AppHandleViewHolder)) {
+ if (isHandleMenuActive() || !isAppHandle(mWindowDecorViewHolder)
+ || Flags.enableAdditionalWindowsAboveStatusBar()) {
return false;
}
+ // The status bar input layer can only receive input in handle coordinates to begin with,
+ // so checking coordinates is unnecessary as input is always within handle bounds.
+ if (isAppHandle(mWindowDecorViewHolder)
+ && Flags.enableAdditionalWindowsAboveStatusBar()
+ && isCaptionVisible()) {
+ return true;
+ }
return checkTouchEventInCaption(ev);
}
@@ -950,7 +1061,7 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
* @param ev the MotionEvent to compare
*/
void checkTouchEvent(MotionEvent ev) {
- if (mResult.mRootView == null) return;
+ if (mResult.mRootView == null || Flags.enableAdditionalWindowsAboveStatusBar()) return;
final View caption = mResult.mRootView.findViewById(R.id.desktop_mode_caption);
final View handle = caption.findViewById(R.id.caption_handle);
final boolean inHandle = !isHandleMenuActive()
@@ -972,7 +1083,7 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
* @param ev the MotionEvent to compare against.
*/
void updateHoverAndPressStatus(MotionEvent ev) {
- if (mResult.mRootView == null) return;
+ if (mResult.mRootView == null || Flags.enableAdditionalWindowsAboveStatusBar()) return;
final View handle = mResult.mRootView.findViewById(R.id.caption_handle);
final boolean inHandle = !isHandleMenuActive()
&& checkTouchEventInFocusedCaptionHandle(ev);
@@ -982,15 +1093,11 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
// We want handle to remain pressed if the pointer moves outside of it during a drag.
handle.setPressed((inHandle && action == ACTION_DOWN)
|| (handle.isPressed() && action != ACTION_UP && action != ACTION_CANCEL));
- if (isHandleMenuActive() && !isHandleMenuAboveStatusBar()) {
+ if (isHandleMenuActive()) {
mHandleMenu.checkMotionEvent(ev);
}
}
- private boolean isHandleMenuAboveStatusBar() {
- return Flags.enableAdditionalWindowsAboveStatusBar() && !mTaskInfo.isFreeform();
- }
-
private boolean pointInView(View v, float x, float y) {
return v != null && v.getLeft() <= x && v.getRight() >= x
&& v.getTop() <= y && v.getBottom() >= y;
@@ -1002,6 +1109,7 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
closeHandleMenu();
mExclusionRegionListener.onExclusionRegionDismissed(mTaskInfo.taskId);
disposeResizeVeil();
+ disposeStatusBarInputLayer();
clearCurrentViewHostRunnable();
super.close();
}
@@ -1101,26 +1209,55 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin
DesktopModeWindowDecoration create(
Context context,
DisplayController displayController,
+ SplitScreenController splitScreenController,
ShellTaskOrganizer taskOrganizer,
ActivityManager.RunningTaskInfo taskInfo,
SurfaceControl taskSurface,
Handler handler,
+ @ShellBackgroundThread ShellExecutor bgExecutor,
Choreographer choreographer,
SyncTransactionQueue syncQueue,
RootTaskDisplayAreaOrganizer rootTaskDisplayAreaOrganizer) {
return new DesktopModeWindowDecoration(
context,
displayController,
+ splitScreenController,
taskOrganizer,
taskInfo,
taskSurface,
handler,
+ bgExecutor,
choreographer,
syncQueue,
rootTaskDisplayAreaOrganizer);
}
}
+ @VisibleForTesting
+ static class CapturedLink {
+ private final long mTimeStamp;
+ private final Uri mUri;
+ private boolean mExpired;
+
+ CapturedLink(@NonNull Uri uri, long timeStamp) {
+ mUri = uri;
+ mTimeStamp = timeStamp;
+ mExpired = false;
+ }
+
+ void setExpired() {
+ mExpired = true;
+ }
+ }
+
+
+ /** Listener for the handle menu's "Open in browser" button */
+ interface OpenInBrowserClickListener {
+
+ /** Inform the implementing class that the "Open in browser" button has been clicked */
+ void onClick(DesktopModeWindowDecoration decoration, Uri uri);
+ }
+
interface ExclusionRegionListener {
/** Inform the implementing class of this task's change in region resize handles */
void onExclusionRegionChanged(int taskId, Region region);
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DragDetector.java b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DragDetector.java
index da268988bac7..3fd3656ccbc5 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DragDetector.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DragDetector.java
@@ -19,7 +19,11 @@ package com.android.wm.shell.windowdecor;
import static android.view.InputDevice.SOURCE_TOUCHSCREEN;
import static android.view.MotionEvent.ACTION_CANCEL;
import static android.view.MotionEvent.ACTION_DOWN;
+import static android.view.MotionEvent.ACTION_HOVER_ENTER;
+import static android.view.MotionEvent.ACTION_HOVER_EXIT;
+import static android.view.MotionEvent.ACTION_HOVER_MOVE;
import static android.view.MotionEvent.ACTION_MOVE;
+import static android.view.MotionEvent.ACTION_POINTER_UP;
import static android.view.MotionEvent.ACTION_UP;
import android.graphics.PointF;
@@ -43,7 +47,7 @@ class DragDetector {
private final PointF mInputDownPoint = new PointF();
private int mTouchSlop;
private boolean mIsDragEvent;
- private int mDragPointerId;
+ private int mDragPointerId = -1;
private boolean mResultOfDownAction;
@@ -67,7 +71,7 @@ class DragDetector {
*
* @return the result returned by {@link #mEventHandler}, or the result when
* {@link #mEventHandler} handles the previous down event if the event shouldn't be passed
- */
+ */
boolean onMotionEvent(View v, MotionEvent ev) {
final boolean isTouchScreen =
(ev.getSource() & SOURCE_TOUCHSCREEN) == SOURCE_TOUCHSCREEN;
@@ -86,10 +90,14 @@ class DragDetector {
return mResultOfDownAction;
}
case ACTION_MOVE: {
- if (ev.findPointerIndex(mDragPointerId) == -1) {
- mDragPointerId = ev.getPointerId(0);
+ if (mDragPointerId == -1) {
+ // The primary pointer was lifted, ignore the rest of the gesture.
+ return mResultOfDownAction;
}
final int dragPointerIndex = ev.findPointerIndex(mDragPointerId);
+ if (dragPointerIndex == -1) {
+ throw new IllegalStateException("Failed to find primary pointer!");
+ }
if (!mIsDragEvent) {
float dx = ev.getRawX(dragPointerIndex) - mInputDownPoint.x;
float dy = ev.getRawY(dragPointerIndex) - mInputDownPoint.y;
@@ -99,22 +107,52 @@ class DragDetector {
}
// The event handler should only be notified about 'move' events if a drag has been
// detected.
- if (mIsDragEvent) {
- return mEventHandler.handleMotionEvent(v, ev);
- } else {
+ if (!mIsDragEvent) {
return mResultOfDownAction;
}
+ return mEventHandler.handleMotionEvent(v,
+ getSinglePointerEvent(ev, mDragPointerId));
+ }
+ case ACTION_HOVER_ENTER:
+ case ACTION_HOVER_MOVE:
+ case ACTION_HOVER_EXIT: {
+ return mEventHandler.handleMotionEvent(v,
+ getSinglePointerEvent(ev, mDragPointerId));
+ }
+ case ACTION_POINTER_UP: {
+ if (mDragPointerId == -1) {
+ // The primary pointer was lifted, ignore the rest of the gesture.
+ return mResultOfDownAction;
+ }
+ if (mDragPointerId != ev.getPointerId(ev.getActionIndex())) {
+ // Ignore a secondary pointer being lifted.
+ return mResultOfDownAction;
+ }
+ // The primary pointer is being lifted.
+ final int dragPointerId = mDragPointerId;
+ mDragPointerId = -1;
+ return mEventHandler.handleMotionEvent(v, getSinglePointerEvent(ev, dragPointerId));
}
case ACTION_UP:
case ACTION_CANCEL: {
+ final int dragPointerId = mDragPointerId;
resetState();
- return mEventHandler.handleMotionEvent(v, ev);
+ if (dragPointerId == -1) {
+ // The primary pointer was lifted, ignore the rest of the gesture.
+ return mResultOfDownAction;
+ }
+ return mEventHandler.handleMotionEvent(v, getSinglePointerEvent(ev, dragPointerId));
}
default:
- return mEventHandler.handleMotionEvent(v, ev);
+ // Ignore other events.
+ return mResultOfDownAction;
}
}
+ private static MotionEvent getSinglePointerEvent(MotionEvent ev, int pointerId) {
+ return ev.getPointerCount() > 1 ? ev.split(1 << pointerId) : ev;
+ }
+
void setTouchSlop(int touchSlop) {
mTouchSlop = touchSlop;
}
@@ -129,4 +167,4 @@ class DragDetector {
interface MotionEventHandler {
boolean handleMotionEvent(@Nullable View v, MotionEvent ev);
}
-}
+} \ No newline at end of file
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DragResizeInputListener.java b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DragResizeInputListener.java
index a3616f65f3b2..32df8b3b2c7c 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DragResizeInputListener.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DragResizeInputListener.java
@@ -468,8 +468,7 @@ class DragResizeInputListener implements AutoCloseable {
case MotionEvent.ACTION_HOVER_ENTER:
case MotionEvent.ACTION_HOVER_MOVE: {
updateCursorType(e.getDisplayId(), e.getDeviceId(),
- e.getPointerId(/*pointerIndex=*/0), e.getXCursorPosition(),
- e.getYCursorPosition());
+ e.getPointerId(/*pointerIndex=*/0), e.getX(), e.getY());
result = true;
break;
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DragResizeWindowGeometry.java b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DragResizeWindowGeometry.java
index b5d1d4a76342..ba5f0791a010 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DragResizeWindowGeometry.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DragResizeWindowGeometry.java
@@ -33,9 +33,6 @@ import android.graphics.Region;
import android.util.Size;
import android.view.MotionEvent;
-import androidx.annotation.Nullable;
-import androidx.annotation.VisibleForTesting;
-
import com.android.wm.shell.R;
import java.util.Objects;
@@ -44,11 +41,6 @@ import java.util.Objects;
* Geometry for a drag resize region for a particular window.
*/
final class DragResizeWindowGeometry {
- // TODO(b/337264971) clean up when no longer needed
- @VisibleForTesting static final boolean DEBUG = true;
- // The additional width to apply to edge resize bounds just for logging when a touch is
- // close.
- @VisibleForTesting static final int EDGE_DEBUG_BUFFER = 15;
private final int mTaskCornerRadius;
private final Size mTaskSize;
// The size of the handle applied to the edges of the window, for the user to drag resize.
@@ -60,8 +52,6 @@ final class DragResizeWindowGeometry {
private final @NonNull TaskCorners mFineTaskCorners;
// The bounds for each edge drag region, which can resize the task in one direction.
private final @NonNull TaskEdges mTaskEdges;
- // Extra-large edge bounds for logging to help debug when an edge resize is ignored.
- private final @Nullable TaskEdges mDebugTaskEdges;
DragResizeWindowGeometry(int taskCornerRadius, @NonNull Size taskSize,
int resizeHandleThickness, int fineCornerSize, int largeCornerSize) {
@@ -74,11 +64,6 @@ final class DragResizeWindowGeometry {
// Save touch areas for each edge.
mTaskEdges = new TaskEdges(mTaskSize, mResizeHandleThickness);
- if (DEBUG) {
- mDebugTaskEdges = new TaskEdges(mTaskSize, mResizeHandleThickness + EDGE_DEBUG_BUFFER);
- } else {
- mDebugTaskEdges = null;
- }
}
/**
@@ -120,13 +105,7 @@ final class DragResizeWindowGeometry {
*/
void union(@NonNull Region region) {
// Apply the edge resize regions.
- if (inDebugMode()) {
- // Use the larger edge sizes if we are debugging, to be able to log if we ignored a
- // touch due to the size of the edge region.
- mDebugTaskEdges.union(region);
- } else {
- mTaskEdges.union(region);
- }
+ mTaskEdges.union(region);
if (enableWindowingEdgeDragResize()) {
// Apply the corners as well for the larger corners, to ensure we capture all possible
@@ -219,10 +198,6 @@ final class DragResizeWindowGeometry {
@DragPositioningCallback.CtrlType
private int calculateEdgeResizeCtrlType(float x, float y) {
- if (inDebugMode() && (mDebugTaskEdges.contains((int) x, (int) y)
- && !mTaskEdges.contains((int) x, (int) y))) {
- return CTRL_TYPE_UNDEFINED;
- }
int ctrlType = CTRL_TYPE_UNDEFINED;
// mTaskCornerRadius is only used in comparing with corner regions. Comparisons with
// sides will use the bounds specified in setGeometry and not go into task bounds.
@@ -313,9 +288,7 @@ final class DragResizeWindowGeometry {
&& this.mResizeHandleThickness == other.mResizeHandleThickness
&& this.mFineTaskCorners.equals(other.mFineTaskCorners)
&& this.mLargeTaskCorners.equals(other.mLargeTaskCorners)
- && (inDebugMode()
- ? this.mDebugTaskEdges.equals(other.mDebugTaskEdges)
- : this.mTaskEdges.equals(other.mTaskEdges));
+ && this.mTaskEdges.equals(other.mTaskEdges);
}
@Override
@@ -326,11 +299,7 @@ final class DragResizeWindowGeometry {
mResizeHandleThickness,
mFineTaskCorners,
mLargeTaskCorners,
- (inDebugMode() ? mDebugTaskEdges : mTaskEdges));
- }
-
- private boolean inDebugMode() {
- return DEBUG && mDebugTaskEdges != null;
+ mTaskEdges);
}
/**
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenu.java b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenu.java
deleted file mode 100644
index df0836c1121d..000000000000
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenu.java
+++ /dev/null
@@ -1,516 +0,0 @@
-/*
- * Copyright (C) 2023 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.wm.shell.windowdecor;
-
-import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM;
-import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
-import static android.app.WindowConfiguration.WINDOWING_MODE_MULTI_WINDOW;
-import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED;
-import static android.view.MotionEvent.ACTION_DOWN;
-import static android.view.MotionEvent.ACTION_UP;
-
-import static com.android.wm.shell.common.split.SplitScreenConstants.SPLIT_POSITION_BOTTOM_OR_RIGHT;
-import static com.android.wm.shell.common.split.SplitScreenConstants.SPLIT_POSITION_TOP_OR_LEFT;
-
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.app.ActivityManager.RunningTaskInfo;
-import android.content.Context;
-import android.content.res.ColorStateList;
-import android.content.res.Configuration;
-import android.content.res.Resources;
-import android.content.res.TypedArray;
-import android.graphics.Bitmap;
-import android.graphics.Color;
-import android.graphics.Point;
-import android.graphics.PointF;
-import android.graphics.Rect;
-import android.view.MotionEvent;
-import android.view.SurfaceControl;
-import android.view.View;
-import android.widget.ImageButton;
-import android.widget.ImageView;
-import android.widget.TextView;
-import android.window.SurfaceSyncGroup;
-
-import androidx.annotation.VisibleForTesting;
-
-import com.android.window.flags.Flags;
-import com.android.wm.shell.R;
-import com.android.wm.shell.common.DisplayController;
-import com.android.wm.shell.common.DisplayLayout;
-import com.android.wm.shell.splitscreen.SplitScreenController;
-import com.android.wm.shell.windowdecor.additionalviewcontainer.AdditionalSystemViewContainer;
-import com.android.wm.shell.windowdecor.additionalviewcontainer.AdditionalViewContainer;
-
-/**
- * Handle menu opened when the appropriate button is clicked on.
- *
- * Displays up to 3 pills that show the following:
- * App Info: App name, app icon, and collapse button to close the menu.
- * Windowing Options(Proto 2 only): Buttons to change windowing modes.
- * Additional Options: Miscellaneous functions including screenshot and closing task.
- */
-class HandleMenu {
- private static final String TAG = "HandleMenu";
- private static final boolean SHOULD_SHOW_MORE_ACTIONS_PILL = false;
- private final Context mContext;
- private final DesktopModeWindowDecoration mParentDecor;
- @VisibleForTesting
- AdditionalViewContainer mHandleMenuViewContainer;
- // Position of the handle menu used for laying out the handle view.
- @VisibleForTesting
- final PointF mHandleMenuPosition = new PointF();
- // With the introduction of {@link AdditionalSystemViewContainer}, {@link mHandleMenuPosition}
- // may be in a different coordinate space than the input coordinates. Therefore, we still care
- // about the menu's coordinates relative to the display as a whole, so we need to maintain
- // those as well.
- final Point mGlobalMenuPosition = new Point();
- private final boolean mShouldShowWindowingPill;
- private final Bitmap mAppIconBitmap;
- private final CharSequence mAppName;
- private final View.OnClickListener mOnClickListener;
- private final View.OnTouchListener mOnTouchListener;
- private final RunningTaskInfo mTaskInfo;
- private final DisplayController mDisplayController;
- private final SplitScreenController mSplitScreenController;
- private final int mLayoutResId;
- private int mMarginMenuTop;
- private int mMarginMenuStart;
- private int mMenuHeight;
- private int mMenuWidth;
- private final int mCaptionHeight;
- private HandleMenuAnimator mHandleMenuAnimator;
-
-
- HandleMenu(DesktopModeWindowDecoration parentDecor, int layoutResId,
- View.OnClickListener onClickListener, View.OnTouchListener onTouchListener,
- Bitmap appIcon, CharSequence appName, DisplayController displayController,
- SplitScreenController splitScreenController, boolean shouldShowWindowingPill,
- int captionHeight) {
- mParentDecor = parentDecor;
- mContext = mParentDecor.mDecorWindowContext;
- mTaskInfo = mParentDecor.mTaskInfo;
- mDisplayController = displayController;
- mSplitScreenController = splitScreenController;
- mLayoutResId = layoutResId;
- mOnClickListener = onClickListener;
- mOnTouchListener = onTouchListener;
- mAppIconBitmap = appIcon;
- mAppName = appName;
- mShouldShowWindowingPill = shouldShowWindowingPill;
- mCaptionHeight = captionHeight;
- loadHandleMenuDimensions();
- updateHandleMenuPillPositions();
- }
-
- void show() {
- final SurfaceSyncGroup ssg = new SurfaceSyncGroup(TAG);
- SurfaceControl.Transaction t = new SurfaceControl.Transaction();
-
- createHandleMenuViewContainer(t, ssg);
- ssg.addTransaction(t);
- ssg.markSyncReady();
- setupHandleMenu();
- animateHandleMenu();
- }
-
- private void createHandleMenuViewContainer(SurfaceControl.Transaction t,
- SurfaceSyncGroup ssg) {
- final int x = (int) mHandleMenuPosition.x;
- final int y = (int) mHandleMenuPosition.y;
- if (!mTaskInfo.isFreeform() && Flags.enableAdditionalWindowsAboveStatusBar()) {
- mHandleMenuViewContainer = new AdditionalSystemViewContainer(mContext,
- R.layout.desktop_mode_window_decor_handle_menu, mTaskInfo.taskId,
- x, y, mMenuWidth, mMenuHeight);
- } else {
- mHandleMenuViewContainer = mParentDecor.addWindow(
- R.layout.desktop_mode_window_decor_handle_menu, "Handle Menu",
- t, ssg, x, y, mMenuWidth, mMenuHeight);
- }
- final View handleMenuView = mHandleMenuViewContainer.getView();
- mHandleMenuAnimator = new HandleMenuAnimator(handleMenuView, mMenuWidth, mCaptionHeight);
- }
-
- /**
- * Animates the appearance of the handle menu and its three pills.
- */
- private void animateHandleMenu() {
- if (mTaskInfo.getWindowingMode() == WINDOWING_MODE_FULLSCREEN
- || mTaskInfo.getWindowingMode() == WINDOWING_MODE_MULTI_WINDOW) {
- mHandleMenuAnimator.animateCaptionHandleExpandToOpen();
- } else {
- mHandleMenuAnimator.animateOpen();
- }
- }
-
- /**
- * Set up all three pills of the handle menu: app info pill, windowing pill, & more actions
- * pill.
- */
- private void setupHandleMenu() {
- final View handleMenu = mHandleMenuViewContainer.getView();
- handleMenu.setOnTouchListener(mOnTouchListener);
- setupAppInfoPill(handleMenu);
- if (mShouldShowWindowingPill) {
- setupWindowingPill(handleMenu);
- }
- setupMoreActionsPill(handleMenu);
- }
-
- /**
- * Set up interactive elements of handle menu's app info pill.
- */
- private void setupAppInfoPill(View handleMenu) {
- final HandleMenuImageButton collapseBtn =
- handleMenu.findViewById(R.id.collapse_menu_button);
- final ImageView appIcon = handleMenu.findViewById(R.id.application_icon);
- final TextView appName = handleMenu.findViewById(R.id.application_name);
- collapseBtn.setOnClickListener(mOnClickListener);
- collapseBtn.setTaskInfo(mTaskInfo);
- appIcon.setImageBitmap(mAppIconBitmap);
- appName.setText(mAppName);
- }
-
- /**
- * Set up interactive elements and color of handle menu's windowing pill.
- */
- private void setupWindowingPill(View handleMenu) {
- final ImageButton fullscreenBtn = handleMenu.findViewById(
- R.id.fullscreen_button);
- final ImageButton splitscreenBtn = handleMenu.findViewById(
- R.id.split_screen_button);
- final ImageButton floatingBtn = handleMenu.findViewById(R.id.floating_button);
- // TODO: Remove once implemented.
- floatingBtn.setVisibility(View.GONE);
-
- final ImageButton desktopBtn = handleMenu.findViewById(R.id.desktop_button);
- fullscreenBtn.setOnClickListener(mOnClickListener);
- splitscreenBtn.setOnClickListener(mOnClickListener);
- floatingBtn.setOnClickListener(mOnClickListener);
- desktopBtn.setOnClickListener(mOnClickListener);
- // The button corresponding to the windowing mode that the task is currently in uses a
- // different color than the others.
- final ColorStateList[] iconColors = getWindowingIconColor();
- final ColorStateList inActiveColorStateList = iconColors[0];
- final ColorStateList activeColorStateList = iconColors[1];
- final int windowingMode = mTaskInfo.getWindowingMode();
- fullscreenBtn.setImageTintList(windowingMode == WINDOWING_MODE_FULLSCREEN
- ? activeColorStateList : inActiveColorStateList);
- splitscreenBtn.setImageTintList(windowingMode == WINDOWING_MODE_MULTI_WINDOW
- ? activeColorStateList : inActiveColorStateList);
- floatingBtn.setImageTintList(windowingMode == WINDOWING_MODE_PINNED
- ? activeColorStateList : inActiveColorStateList);
- desktopBtn.setImageTintList(windowingMode == WINDOWING_MODE_FREEFORM
- ? activeColorStateList : inActiveColorStateList);
- }
-
- /**
- * Set up interactive elements & height of handle menu's more actions pill
- */
- private void setupMoreActionsPill(View handleMenu) {
- if (!SHOULD_SHOW_MORE_ACTIONS_PILL) {
- handleMenu.findViewById(R.id.more_actions_pill).setVisibility(View.GONE);
- }
- }
-
- /**
- * Returns array of windowing icon color based on current UI theme. First element of the
- * array is for inactive icons and the second is for active icons.
- */
- private ColorStateList[] getWindowingIconColor() {
- final int mode = mContext.getResources().getConfiguration().uiMode
- & Configuration.UI_MODE_NIGHT_MASK;
- final boolean isNightMode = (mode == Configuration.UI_MODE_NIGHT_YES);
- final TypedArray typedArray = mContext.obtainStyledAttributes(new int[]{
- com.android.internal.R.attr.materialColorOnSurface,
- com.android.internal.R.attr.materialColorPrimary});
- final int inActiveColor = typedArray.getColor(0, isNightMode ? Color.WHITE : Color.BLACK);
- final int activeColor = typedArray.getColor(1, isNightMode ? Color.WHITE : Color.BLACK);
- typedArray.recycle();
- return new ColorStateList[]{ColorStateList.valueOf(inActiveColor),
- ColorStateList.valueOf(activeColor)};
- }
-
- /**
- * Updates handle menu's position variables to reflect its next position.
- */
- private void updateHandleMenuPillPositions() {
- int menuX;
- final int menuY;
- final Rect taskBounds = mTaskInfo.getConfiguration().windowConfiguration.getBounds();
- updateGlobalMenuPosition(taskBounds);
- if (mLayoutResId == R.layout.desktop_mode_app_header) {
- // Align the handle menu to the left side of the caption.
- menuX = mMarginMenuStart;
- menuY = mMarginMenuTop;
- } else {
- if (Flags.enableAdditionalWindowsAboveStatusBar()) {
- // In a focused decor, we use global coordinates for handle menu. Therefore we
- // need to account for other factors like split stage and menu/handle width to
- // center the menu.
- final DisplayLayout layout = mDisplayController
- .getDisplayLayout(mTaskInfo.displayId);
- menuX = mGlobalMenuPosition.x + ((mMenuWidth - layout.width()) / 2);
- menuY = mGlobalMenuPosition.y + ((mMenuHeight - layout.height()) / 2);
- } else {
- menuX = (taskBounds.width() / 2) - (mMenuWidth / 2);
- menuY = mMarginMenuTop;
- }
- }
- // Handle Menu position setup.
- mHandleMenuPosition.set(menuX, menuY);
- }
-
- private void updateGlobalMenuPosition(Rect taskBounds) {
- if (mTaskInfo.isFreeform()) {
- mGlobalMenuPosition.set(taskBounds.left + mMarginMenuStart,
- taskBounds.top + mMarginMenuTop);
- } else if (mTaskInfo.getWindowingMode() == WINDOWING_MODE_FULLSCREEN) {
- mGlobalMenuPosition.set(
- (taskBounds.width() / 2) - (mMenuWidth / 2) + mMarginMenuStart,
- mMarginMenuTop
- );
- } else if (mTaskInfo.getWindowingMode() == WINDOWING_MODE_MULTI_WINDOW) {
- final int splitPosition = mSplitScreenController.getSplitPosition(mTaskInfo.taskId);
- final Rect leftOrTopStageBounds = new Rect();
- final Rect rightOrBottomStageBounds = new Rect();
- mSplitScreenController.getStageBounds(leftOrTopStageBounds,
- rightOrBottomStageBounds);
- // TODO(b/343561161): This needs to be calculated differently if the task is in
- // top/bottom split.
- if (splitPosition == SPLIT_POSITION_BOTTOM_OR_RIGHT) {
- mGlobalMenuPosition.set(leftOrTopStageBounds.width()
- + (rightOrBottomStageBounds.width() / 2)
- - (mMenuWidth / 2) + mMarginMenuStart,
- mMarginMenuTop);
- } else if (splitPosition == SPLIT_POSITION_TOP_OR_LEFT) {
- mGlobalMenuPosition.set((leftOrTopStageBounds.width() / 2)
- - (mMenuWidth / 2) + mMarginMenuStart,
- mMarginMenuTop);
- }
- }
- }
-
- /**
- * Update pill layout, in case task changes have caused positioning to change.
- */
- void relayout(SurfaceControl.Transaction t) {
- if (mHandleMenuViewContainer != null) {
- updateHandleMenuPillPositions();
- mHandleMenuViewContainer.setPosition(t, mHandleMenuPosition.x, mHandleMenuPosition.y);
- }
- }
-
- /**
- * Check a passed MotionEvent if a click or hover has occurred on any button on this caption
- * Note this should only be called when a regular onClick/onHover is not possible
- * (i.e. the button was clicked through status bar layer)
- *
- * @param ev the MotionEvent to compare against.
- */
- void checkMotionEvent(MotionEvent ev) {
- // If the menu view is above status bar, we can let the views handle input directly.
- if (isViewAboveStatusBar()) return;
- final View handleMenu = mHandleMenuViewContainer.getView();
- final HandleMenuImageButton collapse = handleMenu.findViewById(R.id.collapse_menu_button);
- final PointF inputPoint = translateInputToLocalSpace(ev);
- final boolean inputInCollapseButton = pointInView(collapse, inputPoint.x, inputPoint.y);
- final int action = ev.getActionMasked();
- collapse.setHovered(inputInCollapseButton && action != ACTION_UP);
- collapse.setPressed(inputInCollapseButton && action == ACTION_DOWN);
- if (action == ACTION_UP && inputInCollapseButton) {
- collapse.performClick();
- }
- }
-
- private boolean isViewAboveStatusBar() {
- return Flags.enableAdditionalWindowsAboveStatusBar()
- && !mTaskInfo.isFreeform();
- }
-
- // Translate the input point from display coordinates to the same space as the handle menu.
- private PointF translateInputToLocalSpace(MotionEvent ev) {
- return new PointF(ev.getX() - mHandleMenuPosition.x,
- ev.getY() - mHandleMenuPosition.y);
- }
-
- /**
- * A valid menu input is one of the following:
- * An input that happens in the menu views.
- * Any input before the views have been laid out.
- *
- * @param inputPoint the input to compare against.
- */
- boolean isValidMenuInput(PointF inputPoint) {
- if (!viewsLaidOut()) return true;
- if (!isViewAboveStatusBar()) {
- return pointInView(
- mHandleMenuViewContainer.getView(),
- inputPoint.x - mHandleMenuPosition.x,
- inputPoint.y - mHandleMenuPosition.y);
- } else {
- // Handle menu exists in a different coordinate space when added to WindowManager.
- // Therefore we must compare the provided input coordinates to global menu coordinates.
- // This includes factoring for split stage as input coordinates are relative to split
- // stage position, not relative to the display as a whole.
- PointF inputRelativeToMenu = new PointF(
- inputPoint.x - mGlobalMenuPosition.x,
- inputPoint.y - mGlobalMenuPosition.y
- );
- if (mSplitScreenController.getSplitPosition(mTaskInfo.taskId)
- == SPLIT_POSITION_BOTTOM_OR_RIGHT) {
- // TODO(b/343561161): This also needs to be calculated differently if
- // the task is in top/bottom split.
- Rect leftStageBounds = new Rect();
- mSplitScreenController.getStageBounds(leftStageBounds, new Rect());
- inputRelativeToMenu.x += leftStageBounds.width();
- }
- return pointInView(
- mHandleMenuViewContainer.getView(),
- inputRelativeToMenu.x,
- inputRelativeToMenu.y);
- }
- }
-
- private boolean pointInView(View v, float x, float y) {
- return v != null && v.getLeft() <= x && v.getRight() >= x
- && v.getTop() <= y && v.getBottom() >= y;
- }
-
- /**
- * Check if the views for handle menu can be seen.
- */
- private boolean viewsLaidOut() {
- return mHandleMenuViewContainer.getView().isLaidOut();
- }
-
- private void loadHandleMenuDimensions() {
- final Resources resources = mContext.getResources();
- mMenuWidth = loadDimensionPixelSize(resources,
- R.dimen.desktop_mode_handle_menu_width);
- mMenuHeight = getHandleMenuHeight(resources);
- mMarginMenuTop = loadDimensionPixelSize(resources,
- R.dimen.desktop_mode_handle_menu_margin_top);
- mMarginMenuStart = loadDimensionPixelSize(resources,
- R.dimen.desktop_mode_handle_menu_margin_start);
- }
-
- /**
- * Determines handle menu height based on if windowing pill should be shown.
- */
- private int getHandleMenuHeight(Resources resources) {
- int menuHeight = loadDimensionPixelSize(resources, R.dimen.desktop_mode_handle_menu_height);
- if (!mShouldShowWindowingPill) {
- menuHeight -= loadDimensionPixelSize(resources,
- R.dimen.desktop_mode_handle_menu_windowing_pill_height);
- }
- if (!SHOULD_SHOW_MORE_ACTIONS_PILL) {
- menuHeight -= loadDimensionPixelSize(resources,
- R.dimen.desktop_mode_handle_menu_more_actions_pill_height);
- }
- return menuHeight;
- }
-
- private int loadDimensionPixelSize(Resources resources, int resourceId) {
- if (resourceId == Resources.ID_NULL) {
- return 0;
- }
- return resources.getDimensionPixelSize(resourceId);
- }
-
- void close() {
- final Runnable after = () -> {
- mHandleMenuViewContainer.releaseView();
- mHandleMenuViewContainer = null;
- };
- if (mTaskInfo.getWindowingMode() == WINDOWING_MODE_FULLSCREEN
- || mTaskInfo.getWindowingMode() == WINDOWING_MODE_MULTI_WINDOW) {
- mHandleMenuAnimator.animateCollapseIntoHandleClose(after);
- } else {
- mHandleMenuAnimator.animateClose(after);
- }
- }
-
- static final class Builder {
- private final DesktopModeWindowDecoration mParent;
- private CharSequence mName;
- private Bitmap mAppIcon;
- private View.OnClickListener mOnClickListener;
- private View.OnTouchListener mOnTouchListener;
- private int mLayoutId;
- private boolean mShowWindowingPill;
- private int mCaptionHeight;
- private DisplayController mDisplayController;
- private SplitScreenController mSplitScreenController;
-
- Builder(@NonNull DesktopModeWindowDecoration parent) {
- mParent = parent;
- }
-
- Builder setAppName(@Nullable CharSequence name) {
- mName = name;
- return this;
- }
-
- Builder setAppIcon(@Nullable Bitmap appIcon) {
- mAppIcon = appIcon;
- return this;
- }
-
- Builder setOnClickListener(@Nullable View.OnClickListener onClickListener) {
- mOnClickListener = onClickListener;
- return this;
- }
-
- Builder setOnTouchListener(@Nullable View.OnTouchListener onTouchListener) {
- mOnTouchListener = onTouchListener;
- return this;
- }
-
- Builder setLayoutId(int layoutId) {
- mLayoutId = layoutId;
- return this;
- }
-
- Builder setWindowingButtonsVisible(boolean windowingButtonsVisible) {
- mShowWindowingPill = windowingButtonsVisible;
- return this;
- }
-
- Builder setCaptionHeight(int captionHeight) {
- mCaptionHeight = captionHeight;
- return this;
- }
-
- Builder setDisplayController(DisplayController displayController) {
- mDisplayController = displayController;
- return this;
- }
-
- Builder setSplitScreenController(SplitScreenController splitScreenController) {
- mSplitScreenController = splitScreenController;
- return this;
- }
-
- HandleMenu build() {
- return new HandleMenu(mParent, mLayoutId, mOnClickListener,
- mOnTouchListener, mAppIcon, mName, mDisplayController, mSplitScreenController,
- mShowWindowingPill, mCaptionHeight);
- }
- }
-}
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
new file mode 100644
index 000000000000..e174e83d11c9
--- /dev/null
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenu.kt
@@ -0,0 +1,499 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.wm.shell.windowdecor
+
+import android.annotation.ColorInt
+import android.annotation.DimenRes
+import android.app.ActivityManager
+import android.content.Context
+import android.content.res.ColorStateList
+import android.content.res.Resources
+import android.graphics.Bitmap
+import android.graphics.BlendMode
+import android.graphics.BlendModeColorFilter
+import android.graphics.Point
+import android.graphics.PointF
+import android.graphics.Rect
+import android.view.MotionEvent
+import android.view.SurfaceControl
+import android.view.View
+import android.widget.Button
+import android.widget.ImageButton
+import android.widget.ImageView
+import android.widget.TextView
+import android.window.SurfaceSyncGroup
+import androidx.annotation.VisibleForTesting
+import androidx.compose.ui.graphics.toArgb
+import androidx.core.view.isGone
+import com.android.window.flags.Flags
+import com.android.wm.shell.R
+import com.android.wm.shell.common.DisplayController
+import com.android.wm.shell.common.split.SplitScreenConstants
+import com.android.wm.shell.splitscreen.SplitScreenController
+import com.android.wm.shell.windowdecor.additionalviewcontainer.AdditionalSystemViewContainer
+import com.android.wm.shell.windowdecor.additionalviewcontainer.AdditionalViewContainer
+import com.android.wm.shell.windowdecor.common.DecorThemeUtil
+import com.android.wm.shell.windowdecor.extension.isFullscreen
+import com.android.wm.shell.windowdecor.extension.isMultiWindow
+import com.android.wm.shell.windowdecor.extension.isPinned
+
+/**
+ * Handle menu opened when the appropriate button is clicked on.
+ *
+ * Displays up to 3 pills that show the following:
+ * App Info: App name, app icon, and collapse button to close the menu.
+ * Windowing Options(Proto 2 only): Buttons to change windowing modes.
+ * Additional Options: Miscellaneous functions including screenshot and closing task.
+ */
+class HandleMenu(
+ private val parentDecor: DesktopModeWindowDecoration,
+ private val layoutResId: Int,
+ private val onClickListener: View.OnClickListener?,
+ private val onTouchListener: View.OnTouchListener?,
+ private val appIconBitmap: Bitmap?,
+ private val appName: CharSequence?,
+ private val displayController: DisplayController,
+ private val splitScreenController: SplitScreenController,
+ private val shouldShowWindowingPill: Boolean,
+ private val shouldShowBrowserPill: Boolean,
+ private val captionWidth: Int,
+ private val captionHeight: Int,
+ captionX: Int
+) {
+ private val context: Context = parentDecor.mDecorWindowContext
+ private val taskInfo: ActivityManager.RunningTaskInfo = parentDecor.mTaskInfo
+ private val decorThemeUtil = DecorThemeUtil(context)
+
+ private val isViewAboveStatusBar: Boolean
+ get() = (Flags.enableAdditionalWindowsAboveStatusBar() && !taskInfo.isFreeform)
+
+ private val pillElevation: Int = loadDimensionPixelSize(
+ R.dimen.desktop_mode_handle_menu_pill_elevation)
+ private val pillTopMargin: Int = loadDimensionPixelSize(
+ R.dimen.desktop_mode_handle_menu_pill_spacing_margin)
+ private val menuWidth = loadDimensionPixelSize(
+ R.dimen.desktop_mode_handle_menu_width) + pillElevation
+ private val menuHeight = getHandleMenuHeight()
+ private val marginMenuTop = loadDimensionPixelSize(R.dimen.desktop_mode_handle_menu_margin_top)
+ private val marginMenuStart = loadDimensionPixelSize(
+ R.dimen.desktop_mode_handle_menu_margin_start)
+
+ private var handleMenuAnimator: HandleMenuAnimator? = null
+
+ @VisibleForTesting
+ var handleMenuViewContainer: AdditionalViewContainer? = null
+
+ // Position of the handle menu used for laying out the handle view.
+ @VisibleForTesting
+ val handleMenuPosition: PointF = PointF()
+
+ // With the introduction of {@link AdditionalSystemViewContainer}, {@link mHandleMenuPosition}
+ // may be in a different coordinate space than the input coordinates. Therefore, we still care
+ // about the menu's coordinates relative to the display as a whole, so we need to maintain
+ // those as well.
+ private val globalMenuPosition: Point = Point()
+
+ init {
+ updateHandleMenuPillPositions(captionX)
+ }
+
+ fun show() {
+ val ssg = SurfaceSyncGroup(TAG)
+ val t = SurfaceControl.Transaction()
+
+ createHandleMenuViewContainer(t, ssg)
+ ssg.addTransaction(t)
+ ssg.markSyncReady()
+ setupHandleMenu()
+ animateHandleMenu()
+ }
+
+ private fun createHandleMenuViewContainer(
+ t: SurfaceControl.Transaction,
+ ssg: SurfaceSyncGroup
+ ) {
+ val x = handleMenuPosition.x.toInt()
+ val y = handleMenuPosition.y.toInt()
+ handleMenuViewContainer =
+ if (!taskInfo.isFreeform && Flags.enableAdditionalWindowsAboveStatusBar()) {
+ AdditionalSystemViewContainer(
+ context = context,
+ layoutId = R.layout.desktop_mode_window_decor_handle_menu,
+ taskId = taskInfo.taskId,
+ x = x,
+ y = y,
+ width = menuWidth,
+ height = menuHeight
+ )
+ } else {
+ parentDecor.addWindow(
+ R.layout.desktop_mode_window_decor_handle_menu, "Handle Menu",
+ t, ssg, x, y, menuWidth, menuHeight
+ )
+ }
+ handleMenuViewContainer?.view?.let { view ->
+ handleMenuAnimator =
+ HandleMenuAnimator(view, menuWidth, captionHeight.toFloat())
+ }
+ }
+
+ /**
+ * Animates the appearance of the handle menu and its three pills.
+ */
+ private fun animateHandleMenu() {
+ when {
+ taskInfo.isFullscreen || taskInfo.isMultiWindow -> {
+ handleMenuAnimator?.animateCaptionHandleExpandToOpen()
+ }
+ else -> {
+ handleMenuAnimator?.animateOpen()
+ }
+ }
+ }
+
+ /**
+ * Set up all three pills of the handle menu: app info pill, windowing pill, & more actions
+ * pill.
+ */
+ private fun setupHandleMenu() {
+ val handleMenu = handleMenuViewContainer?.view ?: return
+ handleMenu.setOnTouchListener(onTouchListener)
+
+ val style = calculateMenuStyle()
+ setupAppInfoPill(handleMenu, style)
+ if (shouldShowWindowingPill) {
+ setupWindowingPill(handleMenu, style)
+ }
+ setupMoreActionsPill(handleMenu, style)
+ setupOpenInBrowserPill(handleMenu, style)
+ }
+
+ /**
+ * Set up interactive elements of handle menu's app info pill.
+ */
+ private fun setupAppInfoPill(handleMenu: View, style: MenuStyle) {
+ val pill = handleMenu.requireViewById<View>(R.id.app_info_pill).apply {
+ background.colorFilter = BlendModeColorFilter(style.backgroundColor, BlendMode.MULTIPLY)
+ }
+
+ pill.requireViewById<HandleMenuImageButton>(R.id.collapse_menu_button)
+ .let { collapseBtn ->
+ collapseBtn.imageTintList = ColorStateList.valueOf(style.textColor)
+ collapseBtn.setOnClickListener(onClickListener)
+ collapseBtn.taskInfo = taskInfo
+ }
+ pill.requireViewById<ImageView>(R.id.application_icon).let { appIcon ->
+ appIcon.setImageBitmap(appIconBitmap)
+ }
+ pill.requireViewById<TextView>(R.id.application_name).let { appNameView ->
+ appNameView.text = appName
+ appNameView.setTextColor(style.textColor)
+ }
+ }
+
+ /**
+ * Set up interactive elements and color of handle menu's windowing pill.
+ */
+ private fun setupWindowingPill(handleMenu: View, style: MenuStyle) {
+ val pill = handleMenu.requireViewById<View>(R.id.windowing_pill).apply {
+ background.colorFilter = BlendModeColorFilter(style.backgroundColor, BlendMode.MULTIPLY)
+ }
+
+ val fullscreenBtn = pill.requireViewById<ImageButton>(R.id.fullscreen_button)
+ val splitscreenBtn = pill.requireViewById<ImageButton>(R.id.split_screen_button)
+ val floatingBtn = pill.requireViewById<ImageButton>(R.id.floating_button)
+ // TODO: Remove once implemented.
+ floatingBtn.visibility = View.GONE
+ val desktopBtn = handleMenu.requireViewById<ImageButton>(R.id.desktop_button)
+
+ fullscreenBtn.setOnClickListener(onClickListener)
+ splitscreenBtn.setOnClickListener(onClickListener)
+ floatingBtn.setOnClickListener(onClickListener)
+ desktopBtn.setOnClickListener(onClickListener)
+
+ fullscreenBtn.isSelected = taskInfo.isFullscreen
+ fullscreenBtn.imageTintList = style.windowingButtonColor
+ splitscreenBtn.isSelected = taskInfo.isMultiWindow
+ splitscreenBtn.imageTintList = style.windowingButtonColor
+ floatingBtn.isSelected = taskInfo.isPinned
+ floatingBtn.imageTintList = style.windowingButtonColor
+ desktopBtn.isSelected = taskInfo.isFreeform
+ desktopBtn.imageTintList = style.windowingButtonColor
+ }
+
+ /**
+ * Set up interactive elements & height of handle menu's more actions pill
+ */
+ private fun setupMoreActionsPill(handleMenu: View, style: MenuStyle) {
+ val pill = handleMenu.requireViewById<View>(R.id.more_actions_pill).apply {
+ isGone = !SHOULD_SHOW_MORE_ACTIONS_PILL
+ background.colorFilter = BlendModeColorFilter(style.backgroundColor, BlendMode.MULTIPLY)
+ }
+ pill.requireViewById<Button>(R.id.screenshot_button).let { screenshotBtn ->
+ screenshotBtn.setTextColor(style.textColor)
+ screenshotBtn.compoundDrawableTintList = ColorStateList.valueOf(style.textColor)
+ }
+ }
+
+ private fun setupOpenInBrowserPill(handleMenu: View, style: MenuStyle) {
+ val pill = handleMenu.requireViewById<View>(R.id.open_in_browser_pill).apply {
+ isGone = !shouldShowBrowserPill
+ background.colorFilter = BlendModeColorFilter(style.backgroundColor, BlendMode.MULTIPLY)
+ }
+
+ pill.requireViewById<Button>(R.id.open_in_browser_button).let { browserButton ->
+ browserButton.setOnClickListener(onClickListener)
+ browserButton.setTextColor(style.textColor)
+ browserButton.compoundDrawableTintList = ColorStateList.valueOf(style.textColor)
+ }
+ }
+
+ /**
+ * Updates handle menu's position variables to reflect its next position.
+ */
+ private fun updateHandleMenuPillPositions(captionX: Int) {
+ val menuX: Int
+ val menuY: Int
+ val taskBounds = taskInfo.getConfiguration().windowConfiguration.bounds
+ updateGlobalMenuPosition(taskBounds, captionX)
+ if (layoutResId == R.layout.desktop_mode_app_header) {
+ // Align the handle menu to the left side of the caption.
+ menuX = marginMenuStart
+ menuY = marginMenuTop
+ } else {
+ if (Flags.enableAdditionalWindowsAboveStatusBar()) {
+ // In a focused decor, we use global coordinates for handle menu. Therefore we
+ // need to account for other factors like split stage and menu/handle width to
+ // center the menu.
+ menuX = globalMenuPosition.x
+ menuY = globalMenuPosition.y
+ } else {
+ menuX = (taskBounds.width() / 2) - (menuWidth / 2)
+ menuY = marginMenuTop
+ }
+ }
+ // Handle Menu position setup.
+ handleMenuPosition.set(menuX.toFloat(), menuY.toFloat())
+ }
+
+ private fun updateGlobalMenuPosition(taskBounds: Rect, captionX: Int) {
+ val nonFreeformX = captionX + (captionWidth / 2) - (menuWidth / 2)
+ when {
+ taskInfo.isFreeform -> {
+ globalMenuPosition.set(
+ /* x = */ taskBounds.left + marginMenuStart,
+ /* y = */ taskBounds.top + marginMenuTop
+ )
+ }
+ taskInfo.isFullscreen -> {
+ globalMenuPosition.set(
+ /* x = */ nonFreeformX,
+ /* y = */ marginMenuTop
+ )
+ }
+ taskInfo.isMultiWindow -> {
+ val splitPosition = splitScreenController.getSplitPosition(taskInfo.taskId)
+ val leftOrTopStageBounds = Rect()
+ val rightOrBottomStageBounds = Rect()
+ splitScreenController.getStageBounds(leftOrTopStageBounds, rightOrBottomStageBounds)
+ // TODO(b/343561161): This needs to be calculated differently if the task is in
+ // top/bottom split.
+ when (splitPosition) {
+ SplitScreenConstants.SPLIT_POSITION_BOTTOM_OR_RIGHT -> {
+ globalMenuPosition.set(
+ /* x = */ leftOrTopStageBounds.width() + nonFreeformX,
+ /* y = */ marginMenuTop
+ )
+ }
+ SplitScreenConstants.SPLIT_POSITION_TOP_OR_LEFT -> {
+ globalMenuPosition.set(
+ /* x = */ nonFreeformX,
+ /* y = */ marginMenuTop
+ )
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Update pill layout, in case task changes have caused positioning to change.
+ */
+ fun relayout(
+ t: SurfaceControl.Transaction,
+ captionX: Int
+ ) {
+ handleMenuViewContainer?.let { container ->
+ updateHandleMenuPillPositions(captionX)
+ container.setPosition(t, handleMenuPosition.x, handleMenuPosition.y)
+ }
+ }
+
+ /**
+ * Check a passed MotionEvent if a click or hover has occurred on any button on this caption
+ * Note this should only be called when a regular onClick/onHover is not possible
+ * (i.e. the button was clicked through status bar layer)
+ *
+ * @param ev the MotionEvent to compare against.
+ */
+ fun checkMotionEvent(ev: MotionEvent) {
+ // If the menu view is above status bar, we can let the views handle input directly.
+ if (isViewAboveStatusBar) return
+ val handleMenu = handleMenuViewContainer?.view ?: return
+ val collapse = handleMenu.findViewById<HandleMenuImageButton>(R.id.collapse_menu_button)
+ val inputPoint = translateInputToLocalSpace(ev)
+ val inputInCollapseButton = pointInView(collapse, inputPoint.x, inputPoint.y)
+ val action = ev.actionMasked
+ collapse.isHovered = inputInCollapseButton && action != MotionEvent.ACTION_UP
+ collapse.isPressed = inputInCollapseButton && action == MotionEvent.ACTION_DOWN
+ if (action == MotionEvent.ACTION_UP && inputInCollapseButton) {
+ collapse.performClick()
+ }
+ }
+
+ // Translate the input point from display coordinates to the same space as the handle menu.
+ private fun translateInputToLocalSpace(ev: MotionEvent): PointF {
+ return PointF(
+ ev.x - handleMenuPosition.x,
+ ev.y - handleMenuPosition.y
+ )
+ }
+
+ /**
+ * A valid menu input is one of the following:
+ * An input that happens in the menu views.
+ * Any input before the views have been laid out.
+ *
+ * @param inputPoint the input to compare against.
+ */
+ fun isValidMenuInput(inputPoint: PointF): Boolean {
+ if (!viewsLaidOut()) return true
+ if (!isViewAboveStatusBar) {
+ return pointInView(
+ handleMenuViewContainer?.view,
+ inputPoint.x - handleMenuPosition.x,
+ inputPoint.y - handleMenuPosition.y
+ )
+ } else {
+ // Handle menu exists in a different coordinate space when added to WindowManager.
+ // Therefore we must compare the provided input coordinates to global menu coordinates.
+ // This includes factoring for split stage as input coordinates are relative to split
+ // stage position, not relative to the display as a whole.
+ val inputRelativeToMenu = PointF(
+ inputPoint.x - globalMenuPosition.x,
+ inputPoint.y - globalMenuPosition.y
+ )
+ if (splitScreenController.getSplitPosition(taskInfo.taskId)
+ == SplitScreenConstants.SPLIT_POSITION_BOTTOM_OR_RIGHT) {
+ // TODO(b/343561161): This also needs to be calculated differently if
+ // the task is in top/bottom split.
+ val leftStageBounds = Rect()
+ splitScreenController.getStageBounds(leftStageBounds, Rect())
+ inputRelativeToMenu.x += leftStageBounds.width().toFloat()
+ }
+ return pointInView(
+ handleMenuViewContainer?.view,
+ inputRelativeToMenu.x,
+ inputRelativeToMenu.y
+ )
+ }
+ }
+
+ private fun pointInView(v: View?, x: Float, y: Float): Boolean {
+ return v != null && v.left <= x && v.right >= x && v.top <= y && v.bottom >= y
+ }
+
+ /**
+ * Check if the views for handle menu can be seen.
+ */
+ private fun viewsLaidOut(): Boolean = handleMenuViewContainer?.view?.isLaidOut ?: false
+
+ /**
+ * Determines handle menu height based the max size and the visibility of pills.
+ */
+ private fun getHandleMenuHeight(): Int {
+ var menuHeight = loadDimensionPixelSize(
+ R.dimen.desktop_mode_handle_menu_height) + pillElevation
+ if (!shouldShowWindowingPill) {
+ menuHeight -= loadDimensionPixelSize(
+ R.dimen.desktop_mode_handle_menu_windowing_pill_height)
+ menuHeight -= pillTopMargin
+ }
+ if (!SHOULD_SHOW_MORE_ACTIONS_PILL) {
+ menuHeight -= loadDimensionPixelSize(
+ R.dimen.desktop_mode_handle_menu_more_actions_pill_height)
+ menuHeight -= pillTopMargin
+ }
+ if (!shouldShowBrowserPill) {
+ menuHeight -= loadDimensionPixelSize(
+ R.dimen.desktop_mode_handle_menu_open_in_browser_pill_height)
+ menuHeight -= pillTopMargin
+ }
+ return menuHeight
+ }
+
+ private fun loadDimensionPixelSize(@DimenRes resourceId: Int): Int {
+ if (resourceId == Resources.ID_NULL) {
+ return 0
+ }
+ return context.resources.getDimensionPixelSize(resourceId)
+ }
+
+ fun close() {
+ val after = {
+ handleMenuViewContainer?.releaseView()
+ handleMenuViewContainer = null
+ }
+ if (taskInfo.isFullscreen || taskInfo.isMultiWindow) {
+ handleMenuAnimator?.animateCollapseIntoHandleClose(after)
+ } else {
+ handleMenuAnimator?.animateClose(after)
+ }
+ }
+
+ private fun calculateMenuStyle(): MenuStyle {
+ val colorScheme = decorThemeUtil.getColorScheme(taskInfo)
+ return MenuStyle(
+ backgroundColor = colorScheme.surfaceBright.toArgb(),
+ textColor = colorScheme.onSurface.toArgb(),
+ windowingButtonColor = ColorStateList(
+ arrayOf(
+ intArrayOf(android.R.attr.state_pressed),
+ intArrayOf(android.R.attr.state_focused),
+ intArrayOf(android.R.attr.state_selected),
+ intArrayOf(),
+ ),
+ intArrayOf(
+ colorScheme.onSurface.toArgb(),
+ colorScheme.onSurface.toArgb(),
+ colorScheme.primary.toArgb(),
+ colorScheme.onSurface.toArgb(),
+ )
+ ),
+ )
+ }
+
+ private data class MenuStyle(
+ @ColorInt val backgroundColor: Int,
+ @ColorInt val textColor: Int,
+ val windowingButtonColor: ColorStateList,
+ )
+
+ companion object {
+ private const val TAG = "HandleMenu"
+ private const val SHOULD_SHOW_MORE_ACTIONS_PILL = false
+ }
+}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenuAnimator.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenuAnimator.kt
index 8c5d4a2c2ffb..e3d22342cc9b 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenuAnimator.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/HandleMenuAnimator.kt
@@ -26,6 +26,7 @@ import android.view.View.SCALE_Y
import android.view.View.TRANSLATION_Y
import android.view.View.TRANSLATION_Z
import android.view.ViewGroup
+import android.widget.Button
import androidx.core.animation.doOnEnd
import androidx.core.view.children
import com.android.wm.shell.R
@@ -72,6 +73,7 @@ class HandleMenuAnimator(
private val appInfoPill: ViewGroup = handleMenu.requireViewById(R.id.app_info_pill)
private val windowingPill: ViewGroup = handleMenu.requireViewById(R.id.windowing_pill)
private val moreActionsPill: ViewGroup = handleMenu.requireViewById(R.id.more_actions_pill)
+ private val openInBrowserPill: ViewGroup = handleMenu.requireViewById(R.id.open_in_browser_pill)
/** Animates the opening of the handle menu. */
fun animateOpen() {
@@ -80,6 +82,7 @@ class HandleMenuAnimator(
animateAppInfoPillOpen()
animateWindowingPillOpen()
animateMoreActionsPillOpen()
+ animateOpenInBrowserPill()
runAnimations()
}
@@ -94,6 +97,7 @@ class HandleMenuAnimator(
animateAppInfoPillOpen()
animateWindowingPillOpen()
animateMoreActionsPillOpen()
+ animateOpenInBrowserPill()
runAnimations()
}
@@ -104,11 +108,12 @@ class HandleMenuAnimator(
*
* @param after runs after the animation finishes.
*/
- fun animateCollapseIntoHandleClose(after: Runnable) {
+ fun animateCollapseIntoHandleClose(after: () -> Unit) {
appInfoCollapseToHandle()
animateAppInfoPillFadeOut()
windowingPillClose()
moreActionsPillClose()
+ openInBrowserPillClose()
runAnimations(after)
}
@@ -120,11 +125,12 @@ class HandleMenuAnimator(
* @param after runs after animation finishes.
*
*/
- fun animateClose(after: Runnable) {
+ fun animateClose(after: () -> Unit) {
appInfoPillCollapse()
animateAppInfoPillFadeOut()
windowingPillClose()
moreActionsPillClose()
+ openInBrowserPillClose()
runAnimations(after)
}
@@ -137,6 +143,7 @@ class HandleMenuAnimator(
appInfoPill.children.forEach { it.alpha = 0f }
windowingPill.alpha = 0f
moreActionsPill.alpha = 0f
+ openInBrowserPill.alpha = 0f
// Setup pivots.
handleMenu.pivotX = menuWidth / 2f
@@ -147,6 +154,9 @@ class HandleMenuAnimator(
moreActionsPill.pivotX = menuWidth / 2f
moreActionsPill.pivotY = appInfoPill.measuredHeight.toFloat()
+
+ openInBrowserPill.pivotX = menuWidth / 2f
+ openInBrowserPill.pivotY = appInfoPill.measuredHeight.toFloat()
}
private fun animateAppInfoPillOpen() {
@@ -268,12 +278,50 @@ class HandleMenuAnimator(
// More Actions Content Opacity Animation
moreActionsPill.children.forEach {
animators +=
- ObjectAnimator.ofFloat(it, ALPHA, 1f).apply {
+ ObjectAnimator.ofFloat(it, ALPHA, 1f).apply {
+ startDelay = BODY_ALPHA_OPEN_DELAY
+ duration = BODY_CONTENT_ALPHA_OPEN_DURATION
+ interpolator = Interpolators.FAST_OUT_SLOW_IN
+ }
+ }
+ }
+
+ private fun animateOpenInBrowserPill() {
+ // Open in Browser X & Y Scaling Animation
+ animators +=
+ ObjectAnimator.ofFloat(openInBrowserPill, SCALE_X, HALF_INITIAL_SCALE, 1f).apply {
+ startDelay = BODY_SCALE_OPEN_DELAY
+ duration = BODY_SCALE_OPEN_DURATION
+ }
+
+ animators +=
+ ObjectAnimator.ofFloat(openInBrowserPill, SCALE_Y, HALF_INITIAL_SCALE, 1f).apply {
+ startDelay = BODY_SCALE_OPEN_DELAY
+ duration = BODY_SCALE_OPEN_DURATION
+ }
+
+ // Open in Browser Opacity Animation
+ animators +=
+ ObjectAnimator.ofFloat(openInBrowserPill, ALPHA, 1f).apply {
+ startDelay = BODY_ALPHA_OPEN_DELAY
+ duration = BODY_ALPHA_OPEN_DURATION
+ }
+
+ // Open in Browser Elevation Animation
+ animators +=
+ ObjectAnimator.ofFloat(openInBrowserPill, TRANSLATION_Z, 1f).apply {
+ startDelay = ELEVATION_OPEN_DELAY
+ duration = BODY_ELEVATION_OPEN_DURATION
+ }
+
+ // Open in Browser Button Opacity Animation
+ val button = openInBrowserPill.requireViewById<Button>(R.id.open_in_browser_button)
+ animators +=
+ ObjectAnimator.ofFloat(button, ALPHA, 1f).apply {
startDelay = BODY_ALPHA_OPEN_DELAY
duration = BODY_CONTENT_ALPHA_OPEN_DURATION
interpolator = Interpolators.FAST_OUT_SLOW_IN
}
- }
}
private fun appInfoPillCollapse() {
@@ -379,14 +427,45 @@ class HandleMenuAnimator(
}
}
+ private fun openInBrowserPillClose() {
+ // Open in Browser X & Y Scaling Animation
+ animators +=
+ ObjectAnimator.ofFloat(openInBrowserPill, SCALE_X, HALF_INITIAL_SCALE).apply {
+ duration = BODY_CLOSE_DURATION
+ }
+
+ animators +=
+ ObjectAnimator.ofFloat(openInBrowserPill, SCALE_Y, HALF_INITIAL_SCALE).apply {
+ duration = BODY_CLOSE_DURATION
+ }
+
+ // Open in Browser Opacity Animation
+ animators +=
+ ObjectAnimator.ofFloat(openInBrowserPill, ALPHA, 0f).apply {
+ duration = BODY_CLOSE_DURATION
+ }
+
+ animators +=
+ ObjectAnimator.ofFloat(openInBrowserPill, ALPHA, 0f).apply {
+ duration = BODY_CLOSE_DURATION
+ }
+
+ // Upward Open in Browser y-translation Animation
+ val yStart: Float = -captionHeight / 2
+ animators +=
+ ObjectAnimator.ofFloat(openInBrowserPill, TRANSLATION_Y, yStart).apply {
+ duration = BODY_CLOSE_DURATION
+ }
+ }
+
/**
* Runs the list of hide animators concurrently.
*
* @param after runs after animation finishes.
*/
- private fun runAnimations(after: Runnable? = null) {
+ private fun runAnimations(after: (() -> Unit)? = null) {
runningAnimation?.apply {
- // Remove all listeners, so that after runnable isn't triggered upon cancel.
+ // Remove all listeners, so that the after function isn't triggered upon cancel.
removeAllListeners()
// If an animation runs while running animation is triggered, gracefully cancel.
cancel()
@@ -396,7 +475,7 @@ class HandleMenuAnimator(
playTogether(animators)
animators.clear()
doOnEnd {
- after?.run()
+ after?.invoke()
runningAnimation = null
}
start()
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/VeiledResizeTaskPositioner.java b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/VeiledResizeTaskPositioner.java
index 153221150992..b5b476d90d0e 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/VeiledResizeTaskPositioner.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/VeiledResizeTaskPositioner.java
@@ -18,6 +18,7 @@ package com.android.wm.shell.windowdecor;
import static android.view.WindowManager.TRANSIT_CHANGE;
+import static com.android.internal.jank.Cuj.CUJ_DESKTOP_MODE_DRAG_WINDOW;
import static com.android.internal.jank.Cuj.CUJ_DESKTOP_MODE_RESIZE_WINDOW;
import android.graphics.Point;
@@ -103,6 +104,9 @@ public class VeiledResizeTaskPositioner implements DragPositioningCallback,
wct.reorder(mDesktopWindowDecoration.mTaskInfo.token, true);
mTaskOrganizer.applyTransaction(wct);
}
+ } else {
+ mInteractionJankMonitor.begin(mDesktopWindowDecoration.mTaskSurface,
+ mDesktopWindowDecoration.mContext, CUJ_DESKTOP_MODE_DRAG_WINDOW);
}
mDragStartListener.onDragStart(mDesktopWindowDecoration.mTaskInfo.taskId);
mRepositionTaskBounds.set(mTaskBoundsAtDragStart);
@@ -157,11 +161,16 @@ public class VeiledResizeTaskPositioner implements DragPositioningCallback,
}
mInteractionJankMonitor.end(CUJ_DESKTOP_MODE_RESIZE_WINDOW);
} else {
- final WindowContainerTransaction wct = new WindowContainerTransaction();
DragPositioningCallbackUtility.updateTaskBounds(mRepositionTaskBounds,
mTaskBoundsAtDragStart, mRepositionStartPoint, x, y);
- wct.setBounds(mDesktopWindowDecoration.mTaskInfo.token, mRepositionTaskBounds);
- mTransitions.startTransition(TRANSIT_CHANGE, wct, this);
+ if (!mTaskBoundsAtDragStart.equals(mRepositionTaskBounds)) {
+ final WindowContainerTransaction wct = new WindowContainerTransaction();
+ wct.setBounds(mDesktopWindowDecoration.mTaskInfo.token, mRepositionTaskBounds);
+ mTransitions.startTransition(TRANSIT_CHANGE, wct, this);
+ } else {
+ // Drag-move ended where it originally started, no need to update WM.
+ mInteractionJankMonitor.end(CUJ_DESKTOP_MODE_DRAG_WINDOW);
+ }
}
mCtrlType = CTRL_TYPE_UNDEFINED;
@@ -202,6 +211,7 @@ public class VeiledResizeTaskPositioner implements DragPositioningCallback,
mCtrlType = CTRL_TYPE_UNDEFINED;
finishCallback.onTransitionFinished(null);
mIsResizingOrAnimatingResize = false;
+ mInteractionJankMonitor.end(CUJ_DESKTOP_MODE_DRAG_WINDOW);
return true;
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/WindowDecoration.java b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/WindowDecoration.java
index 03dbbb3bbb82..a691f59a2155 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/WindowDecoration.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/WindowDecoration.java
@@ -19,6 +19,7 @@ package com.android.wm.shell.windowdecor;
import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM;
import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
import static android.content.res.Configuration.DENSITY_DPI_UNDEFINED;
+import static android.view.InsetsSource.FLAG_FORCE_CONSUMING;
import static android.view.WindowInsets.Type.captionBar;
import static android.view.WindowInsets.Type.mandatorySystemGestures;
import static android.view.WindowInsets.Type.statusBars;
@@ -53,6 +54,7 @@ import android.window.WindowContainerToken;
import android.window.WindowContainerTransaction;
import com.android.internal.annotations.VisibleForTesting;
+import com.android.window.flags.Flags;
import com.android.wm.shell.ShellTaskOrganizer;
import com.android.wm.shell.common.DisplayController;
import com.android.wm.shell.shared.desktopmode.DesktopModeStatus;
@@ -105,7 +107,7 @@ public abstract class WindowDecoration<T extends View & TaskFocusStateConsumer>
* System-wide context. Only used to create context with overridden configurations.
*/
final Context mContext;
- final DisplayController mDisplayController;
+ final @NonNull DisplayController mDisplayController;
final ShellTaskOrganizer mTaskOrganizer;
final Supplier<SurfaceControl.Builder> mSurfaceControlBuilderSupplier;
final Supplier<SurfaceControl.Transaction> mSurfaceControlTransactionSupplier;
@@ -137,7 +139,7 @@ public abstract class WindowDecoration<T extends View & TaskFocusStateConsumer>
private SurfaceControlViewHost mViewHost;
private Configuration mWindowDecorConfig;
TaskDragResizer mTaskDragResizer;
- private boolean mIsCaptionVisible;
+ boolean mIsCaptionVisible;
/** The most recent set of insets applied to this window decoration. */
private WindowDecorationInsets mWindowDecorationInsets;
@@ -158,7 +160,7 @@ public abstract class WindowDecoration<T extends View & TaskFocusStateConsumer>
WindowDecoration(
Context context,
- DisplayController displayController,
+ @NonNull DisplayController displayController,
ShellTaskOrganizer taskOrganizer,
RunningTaskInfo taskInfo,
@NonNull SurfaceControl taskSurface,
@@ -506,6 +508,8 @@ public abstract class WindowDecoration<T extends View & TaskFocusStateConsumer>
mTaskDragResizer = taskDragResizer;
}
+ // TODO(b/346441962): Move these three methods closer to implementing or View-level classes to
+ // keep implementation details more encapsulated.
private void setCaptionVisibility(View rootView, boolean visible) {
if (rootView == null) {
return;
@@ -759,9 +763,12 @@ public abstract class WindowDecoration<T extends View & TaskFocusStateConsumer>
}
void addOrUpdate(WindowContainerTransaction wct) {
- wct.addInsetsSource(mToken, mOwner, INDEX, captionBar(), mFrame, mBoundingRects);
+ final @InsetsSource.Flags int captionSourceFlags =
+ Flags.enableCaptionCompatInsetForceConsumption() ? FLAG_FORCE_CONSUMING : 0;
+ wct.addInsetsSource(mToken, mOwner, INDEX, captionBar(), mFrame, mBoundingRects,
+ captionSourceFlags);
wct.addInsetsSource(mToken, mOwner, INDEX, mandatorySystemGestures(), mFrame,
- mBoundingRects);
+ mBoundingRects, 0 /* flags */);
}
void remove(WindowContainerTransaction wct) {
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/additionalviewcontainer/AdditionalSystemViewContainer.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/additionalviewcontainer/AdditionalSystemViewContainer.kt
index 6c2c8fd46bc9..6a354f10049b 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/additionalviewcontainer/AdditionalSystemViewContainer.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/additionalviewcontainer/AdditionalSystemViewContainer.kt
@@ -18,6 +18,7 @@ package com.android.wm.shell.windowdecor.additionalviewcontainer
import android.content.Context
import android.graphics.PixelFormat
+import android.view.Gravity
import android.view.LayoutInflater
import android.view.SurfaceControl
import android.view.View
@@ -29,31 +30,37 @@ import android.view.WindowManager
*/
class AdditionalSystemViewContainer(
private val context: Context,
- layoutId: Int,
taskId: Int,
x: Int,
y: Int,
width: Int,
- height: Int
+ height: Int,
+ layoutId: Int? = null
) : AdditionalViewContainer() {
override val view: View
+ val windowManager: WindowManager? = context.getSystemService(WindowManager::class.java)
init {
- view = LayoutInflater.from(context).inflate(layoutId, null)
+ if (layoutId != null) {
+ view = LayoutInflater.from(context).inflate(layoutId, null)
+ } else {
+ view = View(context)
+ }
val lp = WindowManager.LayoutParams(
width, height, x, y,
WindowManager.LayoutParams.TYPE_STATUS_BAR_ADDITIONAL,
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE,
PixelFormat.TRANSPARENT
- )
- lp.title = "Additional view container of Task=$taskId"
- lp.setTrustedOverlay()
- val wm: WindowManager? = context.getSystemService(WindowManager::class.java)
- wm?.addView(view, lp)
+ ).apply {
+ title = "Additional view container of Task=$taskId"
+ gravity = Gravity.LEFT or Gravity.TOP
+ setTrustedOverlay()
+ }
+ windowManager?.addView(view, lp)
}
override fun releaseView() {
- context.getSystemService(WindowManager::class.java)?.removeViewImmediate(view)
+ windowManager?.removeViewImmediate(view)
}
override fun setPosition(t: SurfaceControl.Transaction, x: Float, y: Float) {
@@ -61,6 +68,6 @@ class AdditionalSystemViewContainer(
this.x = x.toInt()
this.y = y.toInt()
}
- view.layoutParams = lp
+ windowManager?.updateViewLayout(view, lp)
}
}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/extension/TaskInfo.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/extension/TaskInfo.kt
index 7ade9876d28a..6f8e00143848 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/extension/TaskInfo.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/extension/TaskInfo.kt
@@ -18,6 +18,8 @@ package com.android.wm.shell.windowdecor.extension
import android.app.TaskInfo
import android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN
+import android.app.WindowConfiguration.WINDOWING_MODE_MULTI_WINDOW
+import android.app.WindowConfiguration.WINDOWING_MODE_PINNED
import android.view.WindowInsetsController.APPEARANCE_LIGHT_CAPTION_BARS
import android.view.WindowInsetsController.APPEARANCE_TRANSPARENT_CAPTION_BAR_BACKGROUND
@@ -33,5 +35,14 @@ val TaskInfo.isLightCaptionBarAppearance: Boolean
return (appearance and APPEARANCE_LIGHT_CAPTION_BARS) != 0
}
+/** Whether the task is in fullscreen windowing mode. */
val TaskInfo.isFullscreen: Boolean
get() = windowingMode == WINDOWING_MODE_FULLSCREEN
+
+/** Whether the task is in pinned windowing mode. */
+val TaskInfo.isPinned: Boolean
+ get() = windowingMode == WINDOWING_MODE_PINNED
+
+/** Whether the task is in multi-window windowing mode. */
+val TaskInfo.isMultiWindow: Boolean
+ get() = windowingMode == WINDOWING_MODE_MULTI_WINDOW
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/AppHandleViewHolder.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/AppHandleViewHolder.kt
index 8d822c252288..57d8cac2d336 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/AppHandleViewHolder.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/AppHandleViewHolder.kt
@@ -20,28 +20,43 @@ import android.app.ActivityManager.RunningTaskInfo
import android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM
import android.content.res.ColorStateList
import android.graphics.Color
+import android.graphics.Point
+import android.hardware.input.InputManager
+import android.view.MotionEvent.ACTION_DOWN
+import android.view.SurfaceControl
import android.view.View
+import android.view.View.OnClickListener
import android.view.WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS
+import android.view.WindowManager
import android.widget.ImageButton
+import com.android.window.flags.Flags
import com.android.wm.shell.R
import com.android.wm.shell.animation.Interpolators
+import com.android.wm.shell.windowdecor.additionalviewcontainer.AdditionalSystemViewContainer
/**
* A desktop mode window decoration used when the window is in full "focus" (i.e. fullscreen/split).
* It hosts a simple handle bar from which to initiate a drag motion to enter desktop mode.
*/
internal class AppHandleViewHolder(
- rootView: View,
- onCaptionTouchListener: View.OnTouchListener,
- onCaptionButtonClickListener: View.OnClickListener
+ rootView: View,
+ onCaptionTouchListener: View.OnTouchListener,
+ onCaptionButtonClickListener: OnClickListener
) : WindowDecorationViewHolder(rootView) {
companion object {
private const val CAPTION_HANDLE_ANIMATION_DURATION: Long = 100
}
-
+ private lateinit var taskInfo: RunningTaskInfo
+ private val windowManager = context.getSystemService(WindowManager::class.java)
private val captionView: View = rootView.requireViewById(R.id.desktop_mode_caption)
private val captionHandle: ImageButton = rootView.requireViewById(R.id.caption_handle)
+ private val inputManager = context.getSystemService(InputManager::class.java)
+
+ // An invisible View that takes up the same coordinates as captionHandle but is layered
+ // above the status bar. The purpose of this View is to receive input intended for
+ // captionHandle.
+ private var statusBarInputLayer: AdditionalSystemViewContainer? = null
init {
captionView.setOnTouchListener(onCaptionTouchListener)
@@ -49,8 +64,24 @@ internal class AppHandleViewHolder(
captionHandle.setOnClickListener(onCaptionButtonClickListener)
}
- override fun bindData(taskInfo: RunningTaskInfo) {
+ override fun bindData(
+ taskInfo: RunningTaskInfo,
+ position: Point,
+ width: Int,
+ height: Int,
+ isCaptionVisible: Boolean
+ ) {
captionHandle.imageTintList = ColorStateList.valueOf(getCaptionHandleBarColor(taskInfo))
+ this.taskInfo = taskInfo
+ if (!isCaptionVisible && hasStatusBarInputLayer()) {
+ disposeStatusBarInputLayer()
+ return
+ }
+ if (hasStatusBarInputLayer()) {
+ updateStatusBarInputLayer(position)
+ } else {
+ createStatusBarInputLayer(position, width, height)
+ }
}
override fun onHandleMenuOpened() {
@@ -61,6 +92,54 @@ internal class AppHandleViewHolder(
animateCaptionHandleAlpha(startValue = 0f, endValue = 1f)
}
+ private fun createStatusBarInputLayer(handlePosition: Point,
+ handleWidth: Int,
+ handleHeight: Int) {
+ if (!Flags.enableAdditionalWindowsAboveStatusBar()) return
+ statusBarInputLayer = AdditionalSystemViewContainer(context, taskInfo.taskId,
+ handlePosition.x, handlePosition.y, handleWidth, handleHeight)
+ val view = statusBarInputLayer?.view
+ val lp = view?.layoutParams as WindowManager.LayoutParams
+ lp.title = "Handle Input Layer of task " + taskInfo.taskId
+ lp.setTrustedOverlay()
+ // Make this window a spy window to enable it to pilfer pointers from the system-wide
+ // gesture listener that receives events before window. This is to prevent notification
+ // shade gesture when we swipe down to enter desktop.
+ lp.inputFeatures = WindowManager.LayoutParams.INPUT_FEATURE_SPY
+ view.setOnHoverListener { _, event ->
+ captionHandle.onHoverEvent(event)
+ }
+ // Caption handle is located within the status bar region, meaning the
+ // DisplayPolicy will attempt to transfer this input to status bar if it's
+ // a swipe down. Pilfer here to keep the gesture in handle alone.
+ view.setOnTouchListener { v, event ->
+ if (event.actionMasked == ACTION_DOWN) {
+ inputManager.pilferPointers(v.viewRootImpl.inputToken)
+ }
+ captionHandle.dispatchTouchEvent(event)
+ true
+ }
+ windowManager.updateViewLayout(view, lp)
+ }
+
+ private fun updateStatusBarInputLayer(globalPosition: Point) {
+ statusBarInputLayer?.setPosition(SurfaceControl.Transaction(), globalPosition.x.toFloat(),
+ globalPosition.y.toFloat()) ?: return
+ }
+
+ private fun hasStatusBarInputLayer(): Boolean {
+ return statusBarInputLayer != null
+ }
+
+ /**
+ * Remove the input layer from [WindowManager]. Should be used when caption handle
+ * is not visible.
+ */
+ fun disposeStatusBarInputLayer() {
+ statusBarInputLayer?.releaseView()
+ statusBarInputLayer = null
+ }
+
private fun getCaptionHandleBarColor(taskInfo: RunningTaskInfo): Int {
return if (shouldUseLightCaptionColors(taskInfo)) {
context.getColor(R.color.desktop_mode_caption_handle_bar_light)
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/AppHeaderViewHolder.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/AppHeaderViewHolder.kt
index 46127b177bc3..b704d9c001c8 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/AppHeaderViewHolder.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/AppHeaderViewHolder.kt
@@ -21,6 +21,7 @@ import android.content.res.ColorStateList
import android.content.res.Configuration
import android.graphics.Bitmap
import android.graphics.Color
+import android.graphics.Point
import android.graphics.drawable.LayerDrawable
import android.graphics.drawable.RippleDrawable
import android.graphics.drawable.ShapeDrawable
@@ -136,7 +137,13 @@ internal class AppHeaderViewHolder(
onMaximizeHoverAnimationFinishedListener
}
- override fun bindData(taskInfo: RunningTaskInfo) {
+ override fun bindData(
+ taskInfo: RunningTaskInfo,
+ position: Point,
+ width: Int,
+ height: Int,
+ isCaptionVisible: Boolean
+ ) {
if (Flags.enableThemedAppHeaders()) {
bindDataWithThemedHeaders(taskInfo)
} else {
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/WindowDecorationViewHolder.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/WindowDecorationViewHolder.kt
index 5ae8d252a908..2341b099699f 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/WindowDecorationViewHolder.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/WindowDecorationViewHolder.kt
@@ -17,6 +17,7 @@ package com.android.wm.shell.windowdecor.viewholder
import android.app.ActivityManager.RunningTaskInfo
import android.content.Context
+import android.graphics.Point
import android.view.View
/**
@@ -30,7 +31,13 @@ internal abstract class WindowDecorationViewHolder(rootView: View) {
* A signal to the view holder that new data is available and that the views should be updated to
* reflect it.
*/
- abstract fun bindData(taskInfo: RunningTaskInfo)
+ abstract fun bindData(
+ taskInfo: RunningTaskInfo,
+ position: Point,
+ width: Int,
+ height: Int,
+ isCaptionVisible: Boolean
+ )
/** Callback when the handle menu is opened. */
abstract fun onHandleMenuOpened()
diff --git a/libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/desktopmode/flicker/DesktopModeFlickerScenarios.kt b/libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/desktopmode/flicker/DesktopModeFlickerScenarios.kt
index c725b08d2f5e..430f80b9a927 100644
--- a/libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/desktopmode/flicker/DesktopModeFlickerScenarios.kt
+++ b/libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/desktopmode/flicker/DesktopModeFlickerScenarios.kt
@@ -20,6 +20,7 @@ import android.tools.flicker.AssertionInvocationGroup
import android.tools.flicker.assertors.assertions.AppLayerIsInvisibleAtEnd
import android.tools.flicker.assertors.assertions.AppLayerIsVisibleAlways
import android.tools.flicker.assertors.assertions.AppLayerIsVisibleAtStart
+import android.tools.flicker.assertors.assertions.AppWindowBecomesVisible
import android.tools.flicker.assertors.assertions.AppWindowHasDesktopModeInitialBoundsAtTheEnd
import android.tools.flicker.assertors.assertions.AppWindowHasSizeOfAtLeast
import android.tools.flicker.assertors.assertions.AppWindowIsInvisibleAtEnd
@@ -45,27 +46,30 @@ class DesktopModeFlickerScenarios {
FlickerConfigEntry(
scenarioId = ScenarioId("END_DRAG_TO_DESKTOP"),
extractor =
- ShellTransitionScenarioExtractor(
- transitionMatcher =
- object : ITransitionMatcher {
- override fun findAll(
- transitions: Collection<Transition>
- ): Collection<Transition> {
- return transitions.filter {
- it.type == TransitionType.DESKTOP_MODE_END_DRAG_TO_DESKTOP
+ ShellTransitionScenarioExtractor(
+ transitionMatcher =
+ object : ITransitionMatcher {
+ override fun findAll(
+ transitions: Collection<Transition>
+ ): Collection<Transition> {
+ return transitions.filter {
+ // TODO(351168217) Use jank CUJ to extract a longer trace
+ it.type == TransitionType.DESKTOP_MODE_END_DRAG_TO_DESKTOP
+ }
+ }
}
- }
- }
- ),
+ ),
assertions =
- AssertionTemplates.COMMON_ASSERTIONS +
+ AssertionTemplates.COMMON_ASSERTIONS +
listOf(
- AppLayerIsVisibleAlways(Components.DESKTOP_MODE_APP),
- AppWindowOnTopAtEnd(Components.DESKTOP_MODE_APP),
- AppWindowHasDesktopModeInitialBoundsAtTheEnd(
- Components.DESKTOP_MODE_APP
+ AppLayerIsVisibleAlways(Components.DESKTOP_MODE_APP),
+ AppWindowOnTopAtEnd(Components.DESKTOP_MODE_APP),
+ AppWindowHasDesktopModeInitialBoundsAtTheEnd(
+ Components.DESKTOP_MODE_APP
+ ),
+ AppWindowBecomesVisible(DESKTOP_WALLPAPER)
)
- ).associateBy({ it }, { AssertionInvocationGroup.BLOCKING }),
+ .associateBy({ it }, { AssertionInvocationGroup.BLOCKING }),
)
// Use this scenario for closing an app in desktop windowing, except the last app. For the
@@ -74,63 +78,65 @@ class DesktopModeFlickerScenarios {
FlickerConfigEntry(
scenarioId = ScenarioId("CLOSE_APP"),
extractor =
- ShellTransitionScenarioExtractor(
- transitionMatcher =
- object : ITransitionMatcher {
- override fun findAll(
- transitions: Collection<Transition>
- ): Collection<Transition> {
- // In case there are multiple windows closing, filter out the
- // last window closing. It should use the CLOSE_LAST_APP
- // scenario below.
- return transitions
- .filter { it.type == TransitionType.CLOSE }
- .sortedByDescending { it.id }
- .drop(1)
- }
- }
- ),
+ ShellTransitionScenarioExtractor(
+ transitionMatcher =
+ object : ITransitionMatcher {
+ override fun findAll(
+ transitions: Collection<Transition>
+ ): Collection<Transition> {
+ // In case there are multiple windows closing, filter out the
+ // last window closing. It should use the CLOSE_LAST_APP
+ // scenario below.
+ return transitions
+ .filter { it.type == TransitionType.CLOSE }
+ .sortedByDescending { it.id }
+ .drop(1)
+ }
+ }
+ ),
assertions =
- AssertionTemplates.COMMON_ASSERTIONS +
+ AssertionTemplates.COMMON_ASSERTIONS +
listOf(
- AppWindowOnTopAtStart(Components.DESKTOP_MODE_APP),
- AppLayerIsVisibleAtStart(Components.DESKTOP_MODE_APP),
- AppLayerIsInvisibleAtEnd(Components.DESKTOP_MODE_APP),
- ).associateBy({ it }, { AssertionInvocationGroup.BLOCKING }),
+ AppWindowOnTopAtStart(Components.DESKTOP_MODE_APP),
+ AppLayerIsVisibleAtStart(Components.DESKTOP_MODE_APP),
+ AppLayerIsInvisibleAtEnd(Components.DESKTOP_MODE_APP),
+ )
+ .associateBy({ it }, { AssertionInvocationGroup.BLOCKING }),
)
val CLOSE_LAST_APP =
FlickerConfigEntry(
scenarioId = ScenarioId("CLOSE_LAST_APP"),
extractor =
- ShellTransitionScenarioExtractor(
- transitionMatcher =
- object : ITransitionMatcher {
- override fun findAll(
- transitions: Collection<Transition>
- ): Collection<Transition> {
- val lastTransition =
- transitions
- .filter { it.type == TransitionType.CLOSE }
- .maxByOrNull { it.id }!!
- return listOf(lastTransition)
- }
- }
- ),
+ ShellTransitionScenarioExtractor(
+ transitionMatcher =
+ object : ITransitionMatcher {
+ override fun findAll(
+ transitions: Collection<Transition>
+ ): Collection<Transition> {
+ val lastTransition =
+ transitions
+ .filter { it.type == TransitionType.CLOSE }
+ .maxByOrNull { it.id }!!
+ return listOf(lastTransition)
+ }
+ }
+ ),
assertions =
- AssertionTemplates.COMMON_ASSERTIONS +
+ AssertionTemplates.COMMON_ASSERTIONS +
listOf(
- AppWindowIsInvisibleAtEnd(Components.DESKTOP_MODE_APP),
- LauncherWindowReplacesAppAsTopWindow(Components.DESKTOP_MODE_APP),
- AppWindowIsInvisibleAtEnd(DESKTOP_WALLPAPER)
- ).associateBy({ it }, { AssertionInvocationGroup.BLOCKING }),
+ AppWindowIsInvisibleAtEnd(Components.DESKTOP_MODE_APP),
+ LauncherWindowReplacesAppAsTopWindow(Components.DESKTOP_MODE_APP),
+ AppWindowIsInvisibleAtEnd(DESKTOP_WALLPAPER)
+ )
+ .associateBy({ it }, { AssertionInvocationGroup.BLOCKING }),
)
val CORNER_RESIZE =
FlickerConfigEntry(
scenarioId = ScenarioId("CORNER_RESIZE"),
extractor =
- TaggedScenarioExtractorBuilder()
+ TaggedScenarioExtractorBuilder()
.setTargetTag(CujType.CUJ_DESKTOP_MODE_RESIZE_WINDOW)
.setTransitionMatcher(
TaggedCujTransitionMatcher(associatedTransitionRequired = false)
@@ -143,16 +149,16 @@ class DesktopModeFlickerScenarios {
FlickerConfigEntry(
scenarioId = ScenarioId("CORNER_RESIZE_TO_MINIMUM_SIZE"),
extractor =
- TaggedScenarioExtractorBuilder()
+ TaggedScenarioExtractorBuilder()
.setTargetTag(CujType.CUJ_DESKTOP_MODE_RESIZE_WINDOW)
.setTransitionMatcher(
TaggedCujTransitionMatcher(associatedTransitionRequired = false)
- ).build(),
+ )
+ .build(),
assertions =
- AssertionTemplates.DESKTOP_MODE_APP_VISIBILITY_ASSERTIONS +
- listOf(
- AppWindowHasSizeOfAtLeast(Components.DESKTOP_MODE_APP, 770, 700)
- ).associateBy({ it }, { AssertionInvocationGroup.BLOCKING }),
+ AssertionTemplates.DESKTOP_MODE_APP_VISIBILITY_ASSERTIONS +
+ listOf(AppWindowHasSizeOfAtLeast(Components.DESKTOP_MODE_APP, 770, 700))
+ .associateBy({ it }, { AssertionInvocationGroup.BLOCKING }),
)
}
-} \ No newline at end of file
+}
diff --git a/libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/desktopmode/scenarios/DragAppWindowMultiWindow.kt b/libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/desktopmode/scenarios/DragAppWindowMultiWindow.kt
new file mode 100644
index 000000000000..bbf0ce5f8165
--- /dev/null
+++ b/libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/desktopmode/scenarios/DragAppWindowMultiWindow.kt
@@ -0,0 +1,66 @@
+/*
+ * 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.flicker.service.desktopmode.scenarios
+
+import com.android.server.wm.flicker.helpers.DesktopModeAppHelper
+import com.android.server.wm.flicker.helpers.ImeAppHelper
+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 org.junit.After
+import org.junit.Assume
+import org.junit.Before
+import org.junit.Ignore
+import org.junit.Test
+
+/** Base scenario test for window drag CUJ with multiple windows. */
+@Ignore("Base Test Class")
+abstract class DragAppWindowMultiWindow : DragAppWindowScenarioTestBase()
+{
+ private val imeAppHelper = ImeAppHelper(instrumentation)
+ private val testApp = DesktopModeAppHelper(SimpleAppHelper(instrumentation))
+ private val mailApp = DesktopModeAppHelper(MailAppHelper(instrumentation))
+ private val newTasksApp = DesktopModeAppHelper(NewTasksAppHelper(instrumentation))
+ private val imeApp = DesktopModeAppHelper(ImeAppHelper(instrumentation))
+
+ @Before
+ fun setup() {
+ Assume.assumeTrue(Flags.enableDesktopWindowingMode() && tapl.isTablet)
+ testApp.enterDesktopWithDrag(wmHelper, device)
+ mailApp.launchViaIntent(wmHelper)
+ newTasksApp.launchViaIntent(wmHelper)
+ imeApp.launchViaIntent(wmHelper)
+ }
+
+ @Test
+ override fun dragAppWindow() {
+ val (startXIme, startYIme) = getWindowDragStartCoordinate(imeAppHelper)
+
+ imeApp.dragWindow(startXIme, startYIme,
+ endX = startXIme + 150, endY = startYIme + 150,
+ wmHelper, device)
+ }
+
+ @After
+ fun teardown() {
+ testApp.exit(wmHelper)
+ mailApp.exit(wmHelper)
+ newTasksApp.exit(wmHelper)
+ imeApp.exit(wmHelper)
+ }
+}
diff --git a/libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/desktopmode/scenarios/DragAppWindowScenarioTestBase.kt b/libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/desktopmode/scenarios/DragAppWindowScenarioTestBase.kt
new file mode 100644
index 000000000000..a613ca1660ea
--- /dev/null
+++ b/libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/desktopmode/scenarios/DragAppWindowScenarioTestBase.kt
@@ -0,0 +1,55 @@
+/*
+ * 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.flicker.service.desktopmode.scenarios
+
+import android.app.Instrumentation
+import android.tools.NavBar
+import android.tools.Rotation
+import android.tools.device.apphelpers.StandardAppHelper
+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.wm.shell.flicker.service.common.Utils
+import org.junit.Ignore
+import org.junit.Rule
+import org.junit.Test
+
+/** Base test class for window drag CUJ. */
+@Ignore("Base Test Class")
+abstract class DragAppWindowScenarioTestBase {
+
+ val instrumentation: Instrumentation = InstrumentationRegistry.getInstrumentation()
+ val tapl = LauncherInstrumentation()
+ val wmHelper = WindowManagerStateHelper(instrumentation)
+ val device = UiDevice.getInstance(instrumentation)
+
+ @Rule
+ @JvmField
+ val testSetupRule = Utils.testSetupRule(NavBar.MODE_GESTURAL, Rotation.ROTATION_0)
+
+ @Test abstract fun dragAppWindow()
+
+ /** Return the top-center coordinate of the app header as the start coordinate. */
+ fun getWindowDragStartCoordinate(appHelper: StandardAppHelper): Pair<Int, Int> {
+ val windowRect = wmHelper.getWindowRegion(appHelper).bounds
+ // Set start x-coordinate as center of app header.
+ val startX = windowRect.centerX()
+ val startY = windowRect.top
+ return Pair(startX, startY)
+ }
+}
diff --git a/libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/desktopmode/scenarios/DragAppWindowSingleWindow.kt b/libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/desktopmode/scenarios/DragAppWindowSingleWindow.kt
new file mode 100644
index 000000000000..0655620d58b7
--- /dev/null
+++ b/libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/desktopmode/scenarios/DragAppWindowSingleWindow.kt
@@ -0,0 +1,53 @@
+/*
+ * 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.flicker.service.desktopmode.scenarios
+
+import com.android.server.wm.flicker.helpers.DesktopModeAppHelper
+import com.android.server.wm.flicker.helpers.SimpleAppHelper
+import com.android.window.flags.Flags
+import org.junit.After
+import org.junit.Assume
+import org.junit.Before
+import org.junit.Ignore
+import org.junit.Test
+
+/** Base scenario test for window drag CUJ with single window. */
+@Ignore("Base Test Class")
+abstract class DragAppWindowSingleWindow : DragAppWindowScenarioTestBase()
+{
+ private val simpleAppHelper = SimpleAppHelper(instrumentation)
+ private val testApp = DesktopModeAppHelper(simpleAppHelper)
+
+ @Before
+ fun setup() {
+ Assume.assumeTrue(Flags.enableDesktopWindowingMode() && tapl.isTablet)
+ testApp.enterDesktopWithDrag(wmHelper, device)
+ }
+
+ @Test
+ override fun dragAppWindow() {
+ val (startXTest, startYTest) = getWindowDragStartCoordinate(simpleAppHelper)
+ testApp.dragWindow(startXTest, startYTest,
+ endX = startXTest + 150, endY = startYTest + 150,
+ wmHelper, device)
+ }
+
+ @After
+ fun teardown() {
+ testApp.exit(wmHelper)
+ }
+}
diff --git a/libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/desktopmode/scenarios/EnterDesktopWithAppHandleMenu.kt b/libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/desktopmode/scenarios/EnterDesktopWithAppHandleMenu.kt
new file mode 100644
index 000000000000..47a215a97c00
--- /dev/null
+++ b/libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/desktopmode/scenarios/EnterDesktopWithAppHandleMenu.kt
@@ -0,0 +1,59 @@
+/*
+ * 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.flicker.service.desktopmode.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.SimpleAppHelper
+import com.android.window.flags.Flags
+import org.junit.After
+import org.junit.Assume
+import org.junit.Before
+import org.junit.Ignore
+import org.junit.Test
+
+/** Base test class for enter desktop with app handle menu CUJ. */
+@Ignore("Base Test Class")
+abstract class EnterDesktopWithAppHandleMenu {
+
+ private val instrumentation: Instrumentation = InstrumentationRegistry.getInstrumentation()
+ private val tapl = LauncherInstrumentation()
+ private val wmHelper = WindowManagerStateHelper(instrumentation)
+ private val device = UiDevice.getInstance(instrumentation)
+ private val simpleAppHelper = SimpleAppHelper(instrumentation)
+ private val testApp = DesktopModeAppHelper(simpleAppHelper)
+
+ @Before
+ fun setup() {
+ Assume.assumeTrue(Flags.enableDesktopWindowingMode() && tapl.isTablet)
+ }
+
+ @Test
+ open fun enterDesktopWithAppHandleMenu() {
+ simpleAppHelper.launchViaIntent(wmHelper)
+ testApp.enterDesktopModeFromAppHandleMenu(wmHelper, device)
+ }
+
+ @After
+ fun teardown() {
+ testApp.exit(wmHelper)
+ }
+}
diff --git a/libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/desktopmode/scenarios/ExitDesktopWithDragToTopDragZone.kt b/libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/desktopmode/scenarios/ExitDesktopWithDragToTopDragZone.kt
new file mode 100644
index 000000000000..0b6c9af17e7a
--- /dev/null
+++ b/libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/desktopmode/scenarios/ExitDesktopWithDragToTopDragZone.kt
@@ -0,0 +1,68 @@
+/*
+ * 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.flicker.service.desktopmode.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.SimpleAppHelper
+import com.android.window.flags.Flags
+import com.android.wm.shell.flicker.service.common.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
+
+
+@Ignore("Base Test Class")
+abstract class ExitDesktopWithDragToTopDragZone
+@JvmOverloads
+constructor(val rotation: Rotation = Rotation.ROTATION_0) {
+
+ 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))
+
+ @Rule @JvmField val testSetupRule = Utils.testSetupRule(NavBar.MODE_GESTURAL, rotation)
+
+ @Before
+ fun setup() {
+ Assume.assumeTrue(Flags.enableDesktopWindowingMode() && tapl.isTablet)
+ tapl.setEnableRotation(true)
+ tapl.setExpectedRotation(rotation.value)
+ testApp.enterDesktopWithDrag(wmHelper, device)
+ }
+
+ @Test
+ open fun exitDesktopWithDragToTopDragZone() {
+ testApp.exitDesktopWithDragToTopDragZone(wmHelper, device)
+ }
+
+ @After
+ fun teardown() {
+ testApp.exit(wmHelper)
+ }
+}
diff --git a/libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/desktopmode/scenarios/SwitchToOverviewFromDesktop.kt b/libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/desktopmode/scenarios/SwitchToOverviewFromDesktop.kt
new file mode 100644
index 000000000000..b4cadf4f300b
--- /dev/null
+++ b/libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/desktopmode/scenarios/SwitchToOverviewFromDesktop.kt
@@ -0,0 +1,70 @@
+/*
+ * 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.flicker.service.desktopmode.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.SimpleAppHelper
+import com.android.window.flags.Flags
+import com.android.wm.shell.flicker.service.common.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 test for opening recent apps overview from desktop mode.
+*
+* Navigation mode can be passed as a constructor parameter, by default it is set to gesture navigation.
+*/
+@Ignore("Base Test Class")
+abstract class SwitchToOverviewFromDesktop
+@JvmOverloads
+constructor(val navigationMode: NavBar = NavBar.MODE_GESTURAL) {
+
+ 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))
+
+ @Rule @JvmField val testSetupRule = Utils.testSetupRule(navigationMode, Rotation.ROTATION_0)
+
+ @Before
+ fun setup() {
+ Assume.assumeTrue(Flags.enableDesktopWindowingMode() && tapl.isTablet)
+ testApp.enterDesktopWithDrag(wmHelper, device)
+ }
+
+ @Test
+ open fun switchToOverview() {
+ tapl.getLaunchedAppState().switchToOverview()
+ }
+
+ @After
+ fun teardown() {
+ testApp.exit(wmHelper)
+ }
+}
diff --git a/libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/SwitchAppByDoubleTapDivider.kt b/libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/SwitchAppByDoubleTapDivider.kt
index db962e717a3b..2406bdeebdf2 100644
--- a/libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/SwitchAppByDoubleTapDivider.kt
+++ b/libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/splitscreen/scenarios/SwitchAppByDoubleTapDivider.kt
@@ -48,7 +48,10 @@ constructor(val rotation: Rotation = Rotation.ROTATION_0) {
@Before
fun setup() {
- tapl.workspace.switchToOverview().dismissAllTasks()
+ val overview = tapl.workspace.switchToOverview()
+ if (overview.hasTasks()) {
+ overview.dismissAllTasks()
+ }
tapl.setEnableRotation(true)
tapl.setExpectedRotation(rotation.value)
diff --git a/libs/WindowManager/Shell/tests/flicker/splitscreen/Android.bp b/libs/WindowManager/Shell/tests/flicker/splitscreen/Android.bp
index 3f2603aec86a..35b2f56bca92 100644
--- a/libs/WindowManager/Shell/tests/flicker/splitscreen/Android.bp
+++ b/libs/WindowManager/Shell/tests/flicker/splitscreen/Android.bp
@@ -107,7 +107,7 @@ android_test {
instrumentation_target_package: "com.android.wm.shell.flicker.splitscreen",
test_config_template: "AndroidTestTemplate.xml",
srcs: [
- ":WMShellFlickerTestsSplitScreenGroup1-src",
+ ":WMShellFlickerTestsSplitScreenGroup2-src",
],
static_libs: [
"WMShellFlickerTestsBase",
@@ -124,7 +124,7 @@ android_test {
instrumentation_target_package: "com.android.wm.shell.flicker.splitscreen",
test_config_template: "AndroidTestTemplate.xml",
srcs: [
- ":WMShellFlickerTestsSplitScreenGroup1-src",
+ ":WMShellFlickerTestsSplitScreenGroup3-src",
],
static_libs: [
"WMShellFlickerTestsBase",
diff --git a/libs/WindowManager/Shell/tests/unittest/Android.bp b/libs/WindowManager/Shell/tests/unittest/Android.bp
index 6b6954289a34..a0408652a29b 100644
--- a/libs/WindowManager/Shell/tests/unittest/Android.bp
+++ b/libs/WindowManager/Shell/tests/unittest/Android.bp
@@ -37,6 +37,7 @@ android_test {
],
static_libs: [
+ "TestParameterInjector",
"WindowManager-Shell",
"junit",
"flag-junit",
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/activityembedding/ActivityEmbeddingAnimationRunnerTests.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/activityembedding/ActivityEmbeddingAnimationRunnerTests.java
index 55b6bd278f20..bba9418db66a 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/activityembedding/ActivityEmbeddingAnimationRunnerTests.java
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/activityembedding/ActivityEmbeddingAnimationRunnerTests.java
@@ -46,12 +46,14 @@ import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.window.TransitionInfo;
-import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
import com.android.window.flags.Flags;
import com.android.wm.shell.transition.TransitionInfoBuilder;
+import com.google.testing.junit.testparameterinjector.TestParameter;
+import com.google.testing.junit.testparameterinjector.TestParameterInjector;
+
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
@@ -59,6 +61,7 @@ import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
import java.util.ArrayList;
+import java.util.Arrays;
/**
* Tests for {@link ActivityEmbeddingAnimationRunner}.
@@ -67,7 +70,7 @@ import java.util.ArrayList;
* atest WMShellUnitTests:ActivityEmbeddingAnimationRunnerTests
*/
@SmallTest
-@RunWith(AndroidJUnit4.class)
+@RunWith(TestParameterInjector.class)
public class ActivityEmbeddingAnimationRunnerTests extends ActivityEmbeddingAnimationTestBase {
@Rule
@@ -204,15 +207,13 @@ public class ActivityEmbeddingAnimationRunnerTests extends ActivityEmbeddingAnim
// TODO(b/243518738): Rewrite with TestParameter
@EnableFlags(Flags.FLAG_ACTIVITY_EMBEDDING_OVERLAY_PRESENTATION_FLAG)
@Test
- public void testCalculateParentBounds_flagEnabled() {
+ public void testCalculateParentBounds_flagEnabled_emptyParentSize() {
TransitionInfo.Change change;
final TransitionInfo.Change stubChange = createChange(0 /* flags */);
final Rect actualParentBounds = new Rect();
- Rect parentBounds = new Rect(0, 0, 2000, 2000);
- Rect endAbsBounds = new Rect(0, 0, 2000, 2000);
change = prepareChangeForParentBoundsCalculationTest(
new Point(0, 0) /* endRelOffset */,
- endAbsBounds,
+ new Rect(0, 0, 2000, 2000),
new Point() /* endParentSize */
);
@@ -220,69 +221,80 @@ public class ActivityEmbeddingAnimationRunnerTests extends ActivityEmbeddingAnim
assertTrue("Parent bounds must be empty because end parent size is not set.",
actualParentBounds.isEmpty());
+ }
- String testString = "Parent start with (0, 0)";
- change = prepareChangeForParentBoundsCalculationTest(
- new Point(endAbsBounds.left - parentBounds.left,
- endAbsBounds.top - parentBounds.top),
- endAbsBounds, new Point(parentBounds.width(), parentBounds.height()));
-
- calculateParentBounds(change, stubChange, actualParentBounds);
-
- assertEquals(testString + ": Parent bounds must be " + parentBounds, parentBounds,
- actualParentBounds);
-
- testString = "Container not start with (0, 0)";
- parentBounds = new Rect(0, 0, 2000, 2000);
- endAbsBounds = new Rect(1000, 500, 2000, 1500);
- change = prepareChangeForParentBoundsCalculationTest(
- new Point(endAbsBounds.left - parentBounds.left,
- endAbsBounds.top - parentBounds.top),
- endAbsBounds, new Point(parentBounds.width(), parentBounds.height()));
-
- calculateParentBounds(change, stubChange, actualParentBounds);
-
- assertEquals(testString + ": Parent bounds must be " + parentBounds, parentBounds,
- actualParentBounds);
-
- testString = "Parent container on the right";
- parentBounds = new Rect(1000, 0, 2000, 2000);
- endAbsBounds = new Rect(1000, 500, 1500, 1500);
- change = prepareChangeForParentBoundsCalculationTest(
- new Point(endAbsBounds.left - parentBounds.left,
- endAbsBounds.top - parentBounds.top),
- endAbsBounds, new Point(parentBounds.width(), parentBounds.height()));
-
- calculateParentBounds(change, stubChange, actualParentBounds);
-
- assertEquals(testString + ": Parent bounds must be " + parentBounds, parentBounds,
- actualParentBounds);
-
- testString = "Parent container on the bottom";
- parentBounds = new Rect(0, 1000, 2000, 2000);
- endAbsBounds = new Rect(500, 1500, 1500, 2000);
- change = prepareChangeForParentBoundsCalculationTest(
+ @EnableFlags(Flags.FLAG_ACTIVITY_EMBEDDING_OVERLAY_PRESENTATION_FLAG)
+ @Test
+ public void testCalculateParentBounds_flagEnabled(
+ @TestParameter ParentBoundsTestParameters params) {
+ final TransitionInfo.Change stubChange = createChange(0 /*flags*/);
+ final Rect parentBounds = params.getParentBounds();
+ final Rect endAbsBounds = params.getEndAbsBounds();
+ final TransitionInfo.Change change = prepareChangeForParentBoundsCalculationTest(
new Point(endAbsBounds.left - parentBounds.left,
endAbsBounds.top - parentBounds.top),
endAbsBounds, new Point(parentBounds.width(), parentBounds.height()));
+ final Rect actualParentBounds = new Rect();
calculateParentBounds(change, stubChange, actualParentBounds);
- assertEquals(testString + ": Parent bounds must be " + parentBounds, parentBounds,
- actualParentBounds);
-
- testString = "Parent container in the middle";
- parentBounds = new Rect(500, 500, 1500, 1500);
- endAbsBounds = new Rect(1000, 500, 1500, 1000);
- change = prepareChangeForParentBoundsCalculationTest(
- new Point(endAbsBounds.left - parentBounds.left,
- endAbsBounds.top - parentBounds.top),
- endAbsBounds, new Point(parentBounds.width(), parentBounds.height()));
-
- calculateParentBounds(change, stubChange, actualParentBounds);
+ assertEquals(parentBounds, actualParentBounds);
+ }
- assertEquals(testString + ": Parent bounds must be " + parentBounds, parentBounds,
- actualParentBounds);
+ private enum ParentBoundsTestParameters {
+ PARENT_START_WITH_0_0(
+ new int[]{0, 0, 2000, 2000},
+ new int[]{0, 0, 2000, 2000}),
+ CONTAINER_NOT_START_WITH_0_0(
+ new int[] {0, 0, 2000, 2000},
+ new int[] {1000, 500, 1500, 1500}),
+ PARENT_ON_THE_RIGHT(
+ new int[] {1000, 0, 2000, 2000},
+ new int[] {1000, 500, 1500, 1500}),
+ PARENT_ON_THE_BOTTOM(
+ new int[] {0, 1000, 2000, 2000},
+ new int[] {500, 1500, 1500, 2000}),
+ PARENT_IN_THE_MIDDLE(
+ new int[] {500, 500, 1500, 1500},
+ new int[] {1000, 500, 1500, 1000});
+
+ /**
+ * An int array to present {left, top, right, bottom} of the parent {@link Rect bounds}.
+ */
+ @NonNull
+ private final int[] mParentBounds;
+
+ /**
+ * An int array to present {left, top, right, bottom} of the absolute container
+ * {@link Rect bounds} after the transition finishes.
+ */
+ @NonNull
+ private final int[] mEndAbsBounds;
+
+ ParentBoundsTestParameters(
+ @NonNull int[] parentBounds, @NonNull int[] endAbsBounds) {
+ mParentBounds = parentBounds;
+ mEndAbsBounds = endAbsBounds;
+ }
+
+ @NonNull
+ private Rect getParentBounds() {
+ return asRect(mParentBounds);
+ }
+
+ @NonNull
+ private Rect getEndAbsBounds() {
+ return asRect(mEndAbsBounds);
+ }
+
+ @NonNull
+ private static Rect asRect(@NonNull int[] bounds) {
+ if (bounds.length != 4) {
+ throw new IllegalArgumentException("There must be exactly 4 elements in bounds, "
+ + "but found " + bounds.length + ": " + Arrays.toString(bounds));
+ }
+ return new Rect(bounds[0], bounds[1], bounds[2], bounds[3]);
+ }
}
@Test
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/back/CustomCrossActivityBackAnimationTest.kt b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/back/CustomCrossActivityBackAnimationTest.kt
index 8bf011192347..080ad901c656 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/back/CustomCrossActivityBackAnimationTest.kt
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/back/CustomCrossActivityBackAnimationTest.kt
@@ -25,7 +25,6 @@ import android.graphics.Rect
import android.os.RemoteException
import android.testing.AndroidTestingRunner
import android.testing.TestableLooper
-import android.view.Choreographer
import android.view.RemoteAnimationTarget
import android.view.SurfaceControl
import android.view.SurfaceControl.Transaction
@@ -37,8 +36,6 @@ import androidx.test.filters.SmallTest
import com.android.internal.policy.TransitionAnimation
import com.android.wm.shell.RootTaskDisplayAreaOrganizer
import com.android.wm.shell.ShellTestCase
-import java.util.concurrent.CountDownLatch
-import java.util.concurrent.TimeUnit
import junit.framework.TestCase.assertEquals
import org.junit.Assert
import org.junit.Before
@@ -50,12 +47,13 @@ import org.mockito.ArgumentMatchers.anyFloat
import org.mockito.ArgumentMatchers.anyInt
import org.mockito.ArgumentMatchers.eq
import org.mockito.Mock
-import org.mockito.Mockito.mock
import org.mockito.Mockito.never
import org.mockito.Mockito.times
import org.mockito.kotlin.spy
import org.mockito.kotlin.verify
import org.mockito.kotlin.whenever
+import java.util.concurrent.CountDownLatch
+import java.util.concurrent.TimeUnit
@SmallTest
@TestableLooper.RunWithLooper
@@ -82,7 +80,6 @@ class CustomCrossActivityBackAnimationTest : ShellTestCase() {
backAnimationBackground,
rootTaskDisplayAreaOrganizer,
transaction,
- mock(Choreographer::class.java),
customAnimationLoader
)
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/bubbles/BubbleDataTest.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/bubbles/BubbleDataTest.java
index 93e405131a58..c138a2498d35 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/bubbles/BubbleDataTest.java
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/bubbles/BubbleDataTest.java
@@ -27,6 +27,7 @@ import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.reset;
import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.verifyZeroInteractions;
import static org.mockito.Mockito.when;
@@ -255,6 +256,45 @@ public class BubbleDataTest extends ShellTestCase {
}
@Test
+ public void testRemoveBubbleInLauncher_beforeBubbleUpdate_processedAfter_shouldNotBeRemoved() {
+ sendUpdatedEntryAtTime(mEntryA1, 1000);
+ sendUpdatedEntryAtTime(mEntryA2, 2000);
+ mBubbleData.setListener(mListener);
+
+ sendUpdatedEntryAtTime(mEntryA2, 3000);
+
+ verifyUpdateReceived();
+ assertThat(mBubbleData.hasBubbleInStackWithKey(mEntryA2.getKey())).isTrue();
+ assertThat(mBubbleData.getBubbleInStackWithKey(mEntryA2.getKey()).getLastActivity())
+ .isEqualTo(3000);
+
+ // dismiss the bubble with a timestamp in the past
+ mBubbleData.dismissBubbleWithKey(
+ mEntryA2.getKey(), Bubbles.DISMISS_USER_GESTURE_FROM_LAUNCHER, 2500);
+
+ verifyNoMoreInteractions(mListener);
+ assertThat(mBubbleData.hasBubbleInStackWithKey(mEntryA2.getKey())).isTrue();
+ }
+
+ @Test
+ public void testRemoveBubbleInLauncher_isNotSentBackToLauncher() {
+ sendUpdatedEntryAtTime(mEntryA1, 1000);
+ sendUpdatedEntryAtTime(mEntryA2, 2000);
+ mBubbleData.setListener(mListener);
+
+ mBubbleData.dismissBubbleWithKey(
+ mEntryA2.getKey(), Bubbles.DISMISS_USER_GESTURE_FROM_LAUNCHER, 4000);
+ verifyUpdateReceived();
+
+ BubbleData.Update update = mUpdateCaptor.getValue();
+ assertThat(update.removedBubbles).hasSize(1);
+ assertThat(update.removedBubbles.getFirst().first.getKey()).isEqualTo(mBubbleA2.getKey());
+
+ BubbleBarUpdate bubbleBarUpdate = update.toBubbleBarUpdate();
+ assertThat(bubbleBarUpdate.removedBubbles).isEmpty();
+ }
+
+ @Test
public void ifSuppress_hideFlyout() {
// Setup
mBubbleData.setListener(mListener);
@@ -1415,15 +1455,13 @@ public class BubbleDataTest extends ShellTestCase {
sendUpdatedEntryAtTime(entry, postTime, true /* isTextChanged */);
}
- private void sendUpdatedEntryAtTime(BubbleEntry entry, long postTime,
- boolean textChanged) {
+ private void sendUpdatedEntryAtTime(BubbleEntry entry, long postTime, boolean textChanged) {
setPostTime(entry, postTime);
// BubbleController calls this:
Bubble b = mBubbleData.getOrCreateBubble(entry, null /* persistedBubble */);
b.setTextChangedForTest(textChanged);
// And then this
- mBubbleData.notificationEntryUpdated(b, false /* suppressFlyout*/,
- true /* showInShade */);
+ mBubbleData.notificationEntryUpdated(b, false /* suppressFlyout*/, true /* showInShade */);
}
private void changeExpandedStateAtTime(boolean shouldBeExpanded, long time) {
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/common/split/DividerViewTest.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/common/split/DividerViewTest.java
index 636c6326d213..f5847cc27071 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/common/split/DividerViewTest.java
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/common/split/DividerViewTest.java
@@ -70,7 +70,7 @@ public class DividerViewTest extends ShellTestCase {
mContext,
configuration, mCallbacks);
splitWindowManager.init(mSplitLayout, new InsetsState(), false /* isRestoring */);
- mDividerView = spy((DividerView) splitWindowManager.getDividerView());
+ mDividerView = spy(splitWindowManager.getDividerView());
}
@Test
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/compatui/impl/DefaultCompatUIRepositoryTest.kt b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/compatui/impl/DefaultCompatUIRepositoryTest.kt
new file mode 100644
index 000000000000..1a86cfd6b69e
--- /dev/null
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/compatui/impl/DefaultCompatUIRepositoryTest.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.wm.shell.compatui.impl
+
+import android.platform.test.flag.junit.DeviceFlagsValueProvider
+import android.testing.AndroidTestingRunner
+import androidx.test.filters.SmallTest
+import com.android.wm.shell.compatui.api.CompatUIRepository
+import com.android.wm.shell.compatui.api.CompatUISpec
+import org.junit.Assert.assertEquals
+import org.junit.Assert.assertNull
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+
+/**
+ * Tests for {@link DefaultCompatUIRepository}.
+ *
+ * Build/Install/Run:
+ * atest WMShellUnitTests:DefaultCompatUIRepositoryTest
+ */
+@RunWith(AndroidTestingRunner::class)
+@SmallTest
+class DefaultCompatUIRepositoryTest {
+
+ lateinit var repository: CompatUIRepository
+
+ @get:Rule
+ val mCheckFlagsRule = DeviceFlagsValueProvider.createCheckFlagsRule()
+
+ @Before
+ fun setUp() {
+ repository = DefaultCompatUIRepository()
+ }
+
+ @Test(expected = IllegalStateException::class)
+ fun `addSpec throws exception with specs with duplicate id`() {
+ repository.addSpec(CompatUISpec("one"))
+ repository.addSpec(CompatUISpec("one"))
+ }
+
+ @Test
+ fun `iterateOn invokes the consumer`() {
+ with(repository) {
+ addSpec(CompatUISpec("one"))
+ addSpec(CompatUISpec("two"))
+ addSpec(CompatUISpec("three"))
+ val consumer = object : (CompatUISpec) -> Unit {
+ var acc = ""
+ override fun invoke(spec: CompatUISpec) {
+ acc += spec.name
+ }
+ }
+ iterateOn(consumer)
+ assertEquals("onetwothree", consumer.acc)
+ }
+ }
+
+ @Test
+ fun `findSpec returns existing specs`() {
+ with(repository) {
+ val one = CompatUISpec("one")
+ val two = CompatUISpec("two")
+ val three = CompatUISpec("three")
+ addSpec(one)
+ addSpec(two)
+ addSpec(three)
+ assertEquals(findSpec("one"), one)
+ assertEquals(findSpec("two"), two)
+ assertEquals(findSpec("three"), three)
+ assertNull(findSpec("abc"))
+ }
+ }
+} \ No newline at end of file
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/compatui/impl/FakeCompatUIRepository.kt b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/compatui/impl/FakeCompatUIRepository.kt
new file mode 100644
index 000000000000..cdc524aff09f
--- /dev/null
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/compatui/impl/FakeCompatUIRepository.kt
@@ -0,0 +1,39 @@
+/*
+ * 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.compatui.impl
+
+import com.android.wm.shell.compatui.api.CompatUIRepository
+import com.android.wm.shell.compatui.api.CompatUISpec
+
+/**
+ * Fake implementation for {@link CompatUIRepository}
+ */
+class FakeCompatUIRepository : CompatUIRepository {
+ val allSpecs = mutableMapOf<String, CompatUISpec>()
+ override fun addSpec(spec: CompatUISpec) {
+ if (findSpec(spec.name) != null) {
+ throw IllegalStateException("Spec with name:${spec.name} already present")
+ }
+ allSpecs[spec.name] = spec
+ }
+
+ override fun iterateOn(fn: (CompatUISpec) -> Unit) =
+ allSpecs.values.forEach(fn)
+
+ override fun findSpec(name: String): CompatUISpec? =
+ allSpecs[name]
+} \ No newline at end of file
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopModeTaskRepositoryTest.kt b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopModeTaskRepositoryTest.kt
index 6612aee0cd12..18b08bfb0f47 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopModeTaskRepositoryTest.kt
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopModeTaskRepositoryTest.kt
@@ -337,65 +337,65 @@ class DesktopModeTaskRepositoryTest : ShellTestCase() {
}
@Test
- fun getVisibleTaskCount() {
+ fun visibleTaskCount_defaultDisplay_returnsCorrectCount() {
// No tasks, count is 0
- assertThat(repo.getVisibleTaskCount(DEFAULT_DISPLAY)).isEqualTo(0)
+ assertThat(repo.visibleTaskCount(DEFAULT_DISPLAY)).isEqualTo(0)
// New task increments count to 1
repo.updateVisibleFreeformTasks(DEFAULT_DISPLAY, taskId = 1, visible = true)
- assertThat(repo.getVisibleTaskCount(DEFAULT_DISPLAY)).isEqualTo(1)
+ assertThat(repo.visibleTaskCount(DEFAULT_DISPLAY)).isEqualTo(1)
// Visibility update to same task does not increase count
repo.updateVisibleFreeformTasks(DEFAULT_DISPLAY, taskId = 1, visible = true)
- assertThat(repo.getVisibleTaskCount(DEFAULT_DISPLAY)).isEqualTo(1)
+ assertThat(repo.visibleTaskCount(DEFAULT_DISPLAY)).isEqualTo(1)
// Second task visible increments count
repo.updateVisibleFreeformTasks(DEFAULT_DISPLAY, taskId = 2, visible = true)
- assertThat(repo.getVisibleTaskCount(DEFAULT_DISPLAY)).isEqualTo(2)
+ assertThat(repo.visibleTaskCount(DEFAULT_DISPLAY)).isEqualTo(2)
// Hiding a task decrements count
repo.updateVisibleFreeformTasks(DEFAULT_DISPLAY, taskId = 1, visible = false)
- assertThat(repo.getVisibleTaskCount(DEFAULT_DISPLAY)).isEqualTo(1)
+ assertThat(repo.visibleTaskCount(DEFAULT_DISPLAY)).isEqualTo(1)
// Hiding all tasks leaves count at 0
repo.updateVisibleFreeformTasks(DEFAULT_DISPLAY, taskId = 2, visible = false)
- assertThat(repo.getVisibleTaskCount(displayId = 9)).isEqualTo(0)
+ assertThat(repo.visibleTaskCount(displayId = 9)).isEqualTo(0)
// Hiding a not existing task, count remains at 0
repo.updateVisibleFreeformTasks(DEFAULT_DISPLAY, taskId = 999, visible = false)
- assertThat(repo.getVisibleTaskCount(DEFAULT_DISPLAY)).isEqualTo(0)
+ assertThat(repo.visibleTaskCount(DEFAULT_DISPLAY)).isEqualTo(0)
}
@Test
- fun getVisibleTaskCount_multipleDisplays() {
- assertThat(repo.getVisibleTaskCount(DEFAULT_DISPLAY)).isEqualTo(0)
- assertThat(repo.getVisibleTaskCount(SECOND_DISPLAY)).isEqualTo(0)
+ fun visibleTaskCount_multipleDisplays_returnsCorrectCount() {
+ assertThat(repo.visibleTaskCount(DEFAULT_DISPLAY)).isEqualTo(0)
+ assertThat(repo.visibleTaskCount(SECOND_DISPLAY)).isEqualTo(0)
// New task on default display increments count for that display only
repo.updateVisibleFreeformTasks(DEFAULT_DISPLAY, taskId = 1, visible = true)
- assertThat(repo.getVisibleTaskCount(DEFAULT_DISPLAY)).isEqualTo(1)
- assertThat(repo.getVisibleTaskCount(SECOND_DISPLAY)).isEqualTo(0)
+ assertThat(repo.visibleTaskCount(DEFAULT_DISPLAY)).isEqualTo(1)
+ assertThat(repo.visibleTaskCount(SECOND_DISPLAY)).isEqualTo(0)
// New task on secondary display, increments count for that display only
repo.updateVisibleFreeformTasks(SECOND_DISPLAY, taskId = 2, visible = true)
- assertThat(repo.getVisibleTaskCount(DEFAULT_DISPLAY)).isEqualTo(1)
- assertThat(repo.getVisibleTaskCount(SECOND_DISPLAY)).isEqualTo(1)
+ assertThat(repo.visibleTaskCount(DEFAULT_DISPLAY)).isEqualTo(1)
+ assertThat(repo.visibleTaskCount(SECOND_DISPLAY)).isEqualTo(1)
// Marking task visible on another display, updates counts for both displays
repo.updateVisibleFreeformTasks(SECOND_DISPLAY, taskId = 1, visible = true)
- assertThat(repo.getVisibleTaskCount(DEFAULT_DISPLAY)).isEqualTo(0)
- assertThat(repo.getVisibleTaskCount(SECOND_DISPLAY)).isEqualTo(2)
+ assertThat(repo.visibleTaskCount(DEFAULT_DISPLAY)).isEqualTo(0)
+ assertThat(repo.visibleTaskCount(SECOND_DISPLAY)).isEqualTo(2)
// Marking task that is on secondary display, hidden on default display, does not affect
// secondary display
repo.updateVisibleFreeformTasks(DEFAULT_DISPLAY, taskId = 1, visible = false)
- assertThat(repo.getVisibleTaskCount(DEFAULT_DISPLAY)).isEqualTo(0)
- assertThat(repo.getVisibleTaskCount(SECOND_DISPLAY)).isEqualTo(2)
+ assertThat(repo.visibleTaskCount(DEFAULT_DISPLAY)).isEqualTo(0)
+ assertThat(repo.visibleTaskCount(SECOND_DISPLAY)).isEqualTo(2)
// Hiding a task on that display, decrements count
repo.updateVisibleFreeformTasks(SECOND_DISPLAY, taskId = 1, visible = false)
- assertThat(repo.getVisibleTaskCount(DEFAULT_DISPLAY)).isEqualTo(0)
- assertThat(repo.getVisibleTaskCount(SECOND_DISPLAY)).isEqualTo(1)
+ assertThat(repo.visibleTaskCount(DEFAULT_DISPLAY)).isEqualTo(0)
+ assertThat(repo.visibleTaskCount(SECOND_DISPLAY)).isEqualTo(1)
}
@Test
@@ -494,28 +494,6 @@ class DesktopModeTaskRepositoryTest : ShellTestCase() {
}
@Test
- fun isDesktopModeShowing_noActiveTasks_returnsFalse() {
- assertThat(repo.isDesktopModeShowing(displayId = 0)).isFalse()
- }
-
- @Test
- fun isDesktopModeShowing_noTasksVisible_returnsFalse() {
- repo.addActiveTask(displayId = 0, taskId = 1)
- repo.addActiveTask(displayId = 0, taskId = 2)
-
- assertThat(repo.isDesktopModeShowing(displayId = 0)).isFalse()
- }
-
- @Test
- fun isDesktopModeShowing_tasksActiveAndVisible_returnsTrue() {
- repo.addActiveTask(displayId = 0, taskId = 1)
- repo.addActiveTask(displayId = 0, taskId = 2)
- repo.updateVisibleFreeformTasks(displayId = 0, taskId = 1, visible = true)
-
- assertThat(repo.isDesktopModeShowing(displayId = 0)).isTrue()
- }
-
- @Test
fun getActiveNonMinimizedTasksOrderedFrontToBack_returnsFreeformTasksInCorrectOrder() {
repo.addActiveTask(displayId = DEFAULT_DISPLAY, taskId = 1)
repo.addActiveTask(displayId = DEFAULT_DISPLAY, taskId = 2)
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 6cabbf90bbc2..37510ef4ba21 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
@@ -20,7 +20,6 @@ import android.app.ActivityManager.RecentTaskInfo
import android.app.ActivityManager.RunningTaskInfo
import android.app.KeyguardManager
import android.app.WindowConfiguration.ACTIVITY_TYPE_HOME
-import com.android.window.flags.Flags.FLAG_ENABLE_DESKTOP_WINDOWING_MODE
import android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD
import android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM
import android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN
@@ -67,7 +66,9 @@ 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.internal.jank.InteractionJankMonitor
import com.android.window.flags.Flags
+import com.android.window.flags.Flags.FLAG_ENABLE_DESKTOP_WINDOWING_MODE
import com.android.wm.shell.MockToken
import com.android.wm.shell.RootTaskDisplayAreaOrganizer
import com.android.wm.shell.ShellTaskOrganizer
@@ -125,11 +126,11 @@ import org.mockito.Mockito.clearInvocations
import org.mockito.Mockito.mock
import org.mockito.Mockito.spy
import org.mockito.Mockito.verify
-import org.mockito.Mockito.`when` as whenever
import org.mockito.kotlin.anyOrNull
import org.mockito.kotlin.atLeastOnce
import org.mockito.kotlin.capture
import org.mockito.quality.Strictness
+import org.mockito.Mockito.`when` as whenever
/**
* Test class for {@link DesktopTasksController}
@@ -166,6 +167,9 @@ class DesktopTasksControllerTest : ShellTestCase() {
@Mock lateinit var desktopModeLoggerTransitionObserver: DesktopModeLoggerTransitionObserver
@Mock lateinit var desktopModeVisualIndicator: DesktopModeVisualIndicator
@Mock lateinit var recentTasksController: RecentTasksController
+ @Mock
+ private lateinit var mockInteractionJankMonitor: InteractionJankMonitor
+ @Mock private lateinit var mockSurface: SurfaceControl
private lateinit var mockitoSession: StaticMockitoSession
private lateinit var controller: DesktopTasksController
@@ -248,7 +252,8 @@ class DesktopTasksControllerTest : ShellTestCase() {
multiInstanceHelper,
shellExecutor,
Optional.of(desktopTasksLimiter),
- recentTasksController)
+ recentTasksController,
+ mockInteractionJankMonitor)
}
@After
@@ -311,6 +316,50 @@ class DesktopTasksControllerTest : ShellTestCase() {
}
@Test
+ fun isDesktopModeShowing_noTasks_returnsFalse() {
+ assertThat(controller.isDesktopModeShowing(displayId = 0)).isFalse()
+ }
+
+ @Test
+ fun isDesktopModeShowing_noTasksVisible_returnsFalse() {
+ val task1 = setUpFreeformTask()
+ val task2 = setUpFreeformTask()
+ markTaskHidden(task1)
+ markTaskHidden(task2)
+
+ assertThat(controller.isDesktopModeShowing(displayId = 0)).isFalse()
+ }
+
+ @Test
+ fun isDesktopModeShowing_tasksActiveAndVisible_returnsTrue() {
+ val task1 = setUpFreeformTask()
+ val task2 = setUpFreeformTask()
+ markTaskVisible(task1)
+ markTaskHidden(task2)
+
+ assertThat(controller.isDesktopModeShowing(displayId = 0)).isTrue()
+ }
+
+ @Test
+ @EnableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
+ fun showDesktopApps_onSecondaryDisplay_desktopWallpaperEnabled_shouldNotShowWallpaper() {
+ val homeTask = setUpHomeTask(SECOND_DISPLAY)
+ val task1 = setUpFreeformTask(SECOND_DISPLAY)
+ val task2 = setUpFreeformTask(SECOND_DISPLAY)
+ markTaskHidden(task1)
+ markTaskHidden(task2)
+
+ controller.showDesktopApps(SECOND_DISPLAY, RemoteTransition(TestRemoteTransition()))
+
+ val wct = getLatestWct(type = TRANSIT_TO_FRONT, handlerClass = OneShotRemoteHandler::class.java)
+ assertThat(wct.hierarchyOps).hasSize(3)
+ // Expect order to be from bottom: home, task1, task2 (no wallpaper intent)
+ wct.assertReorderAt(index = 0, homeTask)
+ wct.assertReorderAt(index = 1, task1)
+ wct.assertReorderAt(index = 2, task2)
+ }
+
+ @Test
@DisableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
fun showDesktopApps_appsAlreadyVisible_bringsToFront_desktopWallpaperDisabled() {
val homeTask = setUpHomeTask()
@@ -330,6 +379,25 @@ class DesktopTasksControllerTest : ShellTestCase() {
}
@Test
+ @DisableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
+ fun showDesktopApps_onSecondaryDisplay_desktopWallpaperDisabled_shouldNotMoveLauncher() {
+ val homeTask = setUpHomeTask(SECOND_DISPLAY)
+ val task1 = setUpFreeformTask(SECOND_DISPLAY)
+ val task2 = setUpFreeformTask(SECOND_DISPLAY)
+ markTaskHidden(task1)
+ markTaskHidden(task2)
+
+ controller.showDesktopApps(SECOND_DISPLAY, RemoteTransition(TestRemoteTransition()))
+
+ val wct = getLatestWct(type = TRANSIT_TO_FRONT, handlerClass = OneShotRemoteHandler::class.java)
+ assertThat(wct.hierarchyOps).hasSize(3)
+ // Expect order to be from bottom: home, task1, task2
+ wct.assertReorderAt(index = 0, homeTask)
+ wct.assertReorderAt(index = 1, task1)
+ wct.assertReorderAt(index = 2, task2)
+ }
+
+ @Test
@EnableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
fun showDesktopApps_appsAlreadyVisible_bringsToFront_desktopWallpaperEnabled() {
val task1 = setUpFreeformTask()
@@ -427,6 +495,7 @@ class DesktopTasksControllerTest : ShellTestCase() {
@Test
@EnableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
fun showDesktopApps_twoDisplays_bringsToFrontOnlyOneDisplay_desktopWallpaperEnabled() {
+ val homeTaskDefaultDisplay = setUpHomeTask(DEFAULT_DISPLAY)
val taskDefaultDisplay = setUpFreeformTask(DEFAULT_DISPLAY)
setUpHomeTask(SECOND_DISPLAY)
val taskSecondDisplay = setUpFreeformTask(SECOND_DISPLAY)
@@ -436,10 +505,13 @@ class DesktopTasksControllerTest : ShellTestCase() {
controller.showDesktopApps(DEFAULT_DISPLAY, RemoteTransition(TestRemoteTransition()))
val wct = getLatestWct(type = TRANSIT_TO_FRONT, handlerClass = OneShotRemoteHandler::class.java)
- assertThat(wct.hierarchyOps).hasSize(2)
- // Expect order to be from bottom: wallpaper intent, task
- wct.assertPendingIntentAt(index = 0, desktopWallpaperIntent)
- wct.assertReorderAt(index = 1, taskDefaultDisplay)
+ assertThat(wct.hierarchyOps).hasSize(3)
+ // Move home to front
+ wct.assertReorderAt(index = 0, homeTaskDefaultDisplay)
+ // Add desktop wallpaper activity
+ wct.assertPendingIntentAt(index = 1, desktopWallpaperIntent)
+ // Move freeform task to front
+ wct.assertReorderAt(index = 2, taskDefaultDisplay)
}
@Test
@@ -464,7 +536,7 @@ class DesktopTasksControllerTest : ShellTestCase() {
@Test
@EnableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
fun showDesktopApps_desktopWallpaperEnabled_dontReorderMinimizedTask() {
- setUpHomeTask()
+ val homeTask = setUpHomeTask()
val freeformTask = setUpFreeformTask()
val minimizedTask = setUpFreeformTask()
@@ -474,172 +546,42 @@ class DesktopTasksControllerTest : ShellTestCase() {
controller.showDesktopApps(DEFAULT_DISPLAY, RemoteTransition(TestRemoteTransition()))
val wct = getLatestWct(type = TRANSIT_TO_FRONT, handlerClass = OneShotRemoteHandler::class.java)
- assertThat(wct.hierarchyOps).hasSize(2)
+ assertThat(wct.hierarchyOps).hasSize(3)
+ // Move home to front
+ wct.assertReorderAt(index = 0, homeTask, toTop = true)
// Add desktop wallpaper activity
- wct.assertPendingIntentAt(index = 0, desktopWallpaperIntent)
+ wct.assertPendingIntentAt(index = 1, desktopWallpaperIntent)
// Reorder freeform task to top, don't reorder the minimized task
- wct.assertReorderAt(index = 1, freeformTask, toTop = true)
+ wct.assertReorderAt(index = 2, freeformTask, toTop = true)
}
@Test
- fun getVisibleTaskCount_noTasks_returnsZero() {
- assertThat(controller.getVisibleTaskCount(DEFAULT_DISPLAY)).isEqualTo(0)
+ fun visibleTaskCount_noTasks_returnsZero() {
+ assertThat(controller.visibleTaskCount(DEFAULT_DISPLAY)).isEqualTo(0)
}
@Test
- fun getVisibleTaskCount_twoTasks_bothVisible_returnsTwo() {
+ fun visibleTaskCount_twoTasks_bothVisible_returnsTwo() {
setUpHomeTask()
setUpFreeformTask().also(::markTaskVisible)
setUpFreeformTask().also(::markTaskVisible)
- assertThat(controller.getVisibleTaskCount(DEFAULT_DISPLAY)).isEqualTo(2)
+ assertThat(controller.visibleTaskCount(DEFAULT_DISPLAY)).isEqualTo(2)
}
@Test
- fun getVisibleTaskCount_twoTasks_oneVisible_returnsOne() {
+ fun visibleTaskCount_twoTasks_oneVisible_returnsOne() {
setUpHomeTask()
setUpFreeformTask().also(::markTaskVisible)
setUpFreeformTask().also(::markTaskHidden)
- assertThat(controller.getVisibleTaskCount(DEFAULT_DISPLAY)).isEqualTo(1)
+ assertThat(controller.visibleTaskCount(DEFAULT_DISPLAY)).isEqualTo(1)
}
@Test
- fun getVisibleTaskCount_twoTasksVisibleOnDifferentDisplays_returnsOne() {
+ fun visibleTaskCount_twoTasksVisibleOnDifferentDisplays_returnsOne() {
setUpHomeTask()
setUpFreeformTask(DEFAULT_DISPLAY).also(::markTaskVisible)
setUpFreeformTask(SECOND_DISPLAY).also(::markTaskVisible)
- assertThat(controller.getVisibleTaskCount(SECOND_DISPLAY)).isEqualTo(1)
- }
-
- @Test
- @EnableFlags(Flags.FLAG_ENABLE_WINDOWING_DYNAMIC_INITIAL_BOUNDS)
- fun moveToDesktop_landscapeDevice_resizable_undefinedOrientation_defaultLandscapeBounds() {
- val task = setUpFullscreenTask()
- setUpLandscapeDisplay()
-
- controller.moveToDesktop(task, transitionSource = UNKNOWN)
- val wct = getLatestEnterDesktopWct()
- assertThat(findBoundsChange(wct, task)).isEqualTo(DEFAULT_LANDSCAPE_BOUNDS)
- }
-
- @Test
- @EnableFlags(Flags.FLAG_ENABLE_WINDOWING_DYNAMIC_INITIAL_BOUNDS)
- fun moveToDesktop_landscapeDevice_resizable_landscapeOrientation_defaultLandscapeBounds() {
- val task = setUpFullscreenTask(screenOrientation = SCREEN_ORIENTATION_LANDSCAPE)
- setUpLandscapeDisplay()
-
- controller.moveToDesktop(task, transitionSource = UNKNOWN)
- val wct = getLatestEnterDesktopWct()
- assertThat(findBoundsChange(wct, task)).isEqualTo(DEFAULT_LANDSCAPE_BOUNDS)
- }
-
- @Test
- @EnableFlags(Flags.FLAG_ENABLE_WINDOWING_DYNAMIC_INITIAL_BOUNDS)
- fun moveToDesktop_landscapeDevice_resizable_portraitOrientation_resizablePortraitBounds() {
- val task =
- setUpFullscreenTask(screenOrientation = SCREEN_ORIENTATION_PORTRAIT, shouldLetterbox = true)
- setUpLandscapeDisplay()
-
- controller.moveToDesktop(task, transitionSource = UNKNOWN)
- val wct = getLatestEnterDesktopWct()
- assertThat(findBoundsChange(wct, task)).isEqualTo(RESIZABLE_PORTRAIT_BOUNDS)
- }
-
- @Test
- @EnableFlags(Flags.FLAG_ENABLE_WINDOWING_DYNAMIC_INITIAL_BOUNDS)
- fun moveToDesktop_landscapeDevice_unResizable_landscapeOrientation_defaultLandscapeBounds() {
- val task =
- setUpFullscreenTask(isResizable = false, screenOrientation = SCREEN_ORIENTATION_LANDSCAPE)
- setUpLandscapeDisplay()
-
- controller.moveToDesktop(task, transitionSource = UNKNOWN)
- val wct = getLatestEnterDesktopWct()
- assertThat(findBoundsChange(wct, task)).isEqualTo(DEFAULT_LANDSCAPE_BOUNDS)
- }
-
- @Test
- @EnableFlags(Flags.FLAG_ENABLE_WINDOWING_DYNAMIC_INITIAL_BOUNDS)
- fun moveToDesktop_landscapeDevice_unResizable_portraitOrientation_unResizablePortraitBounds() {
- val task =
- setUpFullscreenTask(
- isResizable = false,
- screenOrientation = SCREEN_ORIENTATION_PORTRAIT,
- shouldLetterbox = true)
- setUpLandscapeDisplay()
-
- controller.moveToDesktop(task, transitionSource = UNKNOWN)
- val wct = getLatestEnterDesktopWct()
- assertThat(findBoundsChange(wct, task)).isEqualTo(UNRESIZABLE_PORTRAIT_BOUNDS)
- }
-
- @Test
- @EnableFlags(Flags.FLAG_ENABLE_WINDOWING_DYNAMIC_INITIAL_BOUNDS)
- fun moveToDesktop_portraitDevice_resizable_undefinedOrientation_defaultPortraitBounds() {
- val task = setUpFullscreenTask(deviceOrientation = ORIENTATION_PORTRAIT)
- setUpPortraitDisplay()
-
- controller.moveToDesktop(task, transitionSource = UNKNOWN)
- val wct = getLatestEnterDesktopWct()
- assertThat(findBoundsChange(wct, task)).isEqualTo(DEFAULT_PORTRAIT_BOUNDS)
- }
-
- @Test
- @EnableFlags(Flags.FLAG_ENABLE_WINDOWING_DYNAMIC_INITIAL_BOUNDS)
- fun moveToDesktop_portraitDevice_resizable_portraitOrientation_defaultPortraitBounds() {
- val task =
- setUpFullscreenTask(
- deviceOrientation = ORIENTATION_PORTRAIT,
- screenOrientation = SCREEN_ORIENTATION_PORTRAIT)
- setUpPortraitDisplay()
-
- controller.moveToDesktop(task, transitionSource = UNKNOWN)
- val wct = getLatestEnterDesktopWct()
- assertThat(findBoundsChange(wct, task)).isEqualTo(DEFAULT_PORTRAIT_BOUNDS)
- }
-
- @Test
- @EnableFlags(Flags.FLAG_ENABLE_WINDOWING_DYNAMIC_INITIAL_BOUNDS)
- fun moveToDesktop_portraitDevice_resizable_landscapeOrientation_resizableLandscapeBounds() {
- val task =
- setUpFullscreenTask(
- deviceOrientation = ORIENTATION_PORTRAIT,
- screenOrientation = SCREEN_ORIENTATION_LANDSCAPE,
- shouldLetterbox = true)
- setUpPortraitDisplay()
-
- controller.moveToDesktop(task, transitionSource = UNKNOWN)
- val wct = getLatestEnterDesktopWct()
- assertThat(findBoundsChange(wct, task)).isEqualTo(RESIZABLE_LANDSCAPE_BOUNDS)
- }
-
- @Test
- @EnableFlags(Flags.FLAG_ENABLE_WINDOWING_DYNAMIC_INITIAL_BOUNDS)
- fun moveToDesktop_portraitDevice_unResizable_portraitOrientation_defaultPortraitBounds() {
- val task =
- setUpFullscreenTask(
- isResizable = false,
- deviceOrientation = ORIENTATION_PORTRAIT,
- screenOrientation = SCREEN_ORIENTATION_PORTRAIT)
- setUpPortraitDisplay()
-
- controller.moveToDesktop(task, transitionSource = UNKNOWN)
- val wct = getLatestEnterDesktopWct()
- assertThat(findBoundsChange(wct, task)).isEqualTo(DEFAULT_PORTRAIT_BOUNDS)
- }
-
- @Test
- @EnableFlags(Flags.FLAG_ENABLE_WINDOWING_DYNAMIC_INITIAL_BOUNDS)
- fun moveToDesktop_portraitDevice_unResizable_landscapeOrientation_unResizableLandscapeBounds() {
- val task =
- setUpFullscreenTask(
- isResizable = false,
- deviceOrientation = ORIENTATION_PORTRAIT,
- screenOrientation = SCREEN_ORIENTATION_LANDSCAPE,
- shouldLetterbox = true)
- setUpPortraitDisplay()
-
- controller.moveToDesktop(task, transitionSource = UNKNOWN)
- val wct = getLatestEnterDesktopWct()
- assertThat(findBoundsChange(wct, task)).isEqualTo(UNRESIZABLE_LANDSCAPE_BOUNDS)
+ assertThat(controller.visibleTaskCount(SECOND_DISPLAY)).isEqualTo(1)
}
@Test
@@ -861,16 +803,19 @@ class DesktopTasksControllerTest : ShellTestCase() {
val taskLimit = desktopTasksLimiter.getMaxTaskLimit()
val freeformTasks = (1..taskLimit).map { _ -> setUpFreeformTask() }
val newTask = setUpFullscreenTask()
- setUpHomeTask()
+ val homeTask = setUpHomeTask()
controller.moveToDesktop(newTask, transitionSource = UNKNOWN)
val wct = getLatestEnterDesktopWct()
- assertThat(wct.hierarchyOps.size).isEqualTo(taskLimit + 1) // visible tasks + wallpaper
+ assertThat(wct.hierarchyOps.size).isEqualTo(taskLimit + 2) // tasks + home + wallpaper
+ // Move home to front
+ wct.assertReorderAt(0, homeTask)
// Add desktop wallpaper activity
- wct.assertPendingIntentAt(0, desktopWallpaperIntent)
+ wct.assertPendingIntentAt(1, desktopWallpaperIntent)
+ // Bring freeform tasks to front
wct.assertReorderSequenceInRange(
- range = 1..<(taskLimit + 1),
+ range = 2..<(taskLimit + 2),
*freeformTasks.drop(1).toTypedArray(), // Skipping freeformTasks[0]
newTask
)
@@ -888,6 +833,24 @@ class DesktopTasksControllerTest : ShellTestCase() {
}
@Test
+ fun moveToFullscreen_tdaFullscreen_windowingModeUndefined_removesWallpaperActivity() {
+ val task = setUpFreeformTask()
+ val wallpaperToken = MockToken().token()
+
+ desktopModeTaskRepository.wallpaperActivityToken = wallpaperToken
+ assertNotNull(rootTaskDisplayAreaOrganizer.getDisplayAreaInfo(DEFAULT_DISPLAY))
+ .configuration.windowConfiguration.windowingMode = WINDOWING_MODE_FULLSCREEN
+
+ controller.moveToFullscreen(task.taskId, transitionSource = UNKNOWN)
+
+ val wct = getLatestExitDesktopWct()
+ val taskChange = assertNotNull(wct.changes[task.token.asBinder()])
+ assertThat(taskChange.windowingMode).isEqualTo(WINDOWING_MODE_UNDEFINED)
+ // Removes wallpaper activity when leaving desktop
+ wct.assertRemoveAt(index = 0, wallpaperToken)
+ }
+
+ @Test
fun moveToFullscreen_tdaFreeform_windowingModeSetToFullscreen() {
val task = setUpFreeformTask()
val tda = rootTaskDisplayAreaOrganizer.getDisplayAreaInfo(DEFAULT_DISPLAY)!!
@@ -899,6 +862,44 @@ class DesktopTasksControllerTest : ShellTestCase() {
}
@Test
+ fun moveToFullscreen_tdaFreeform_windowingModeFullscreen_removesWallpaperActivity() {
+ val task = setUpFreeformTask()
+ val wallpaperToken = MockToken().token()
+
+ desktopModeTaskRepository.wallpaperActivityToken = wallpaperToken
+ assertNotNull(rootTaskDisplayAreaOrganizer.getDisplayAreaInfo(DEFAULT_DISPLAY))
+ .configuration.windowConfiguration.windowingMode = WINDOWING_MODE_FREEFORM
+
+ controller.moveToFullscreen(task.taskId, transitionSource = UNKNOWN)
+
+ val wct = getLatestExitDesktopWct()
+ val taskChange = assertNotNull(wct.changes[task.token.asBinder()])
+ assertThat(taskChange.windowingMode).isEqualTo(WINDOWING_MODE_FULLSCREEN)
+ // Removes wallpaper activity when leaving desktop
+ wct.assertRemoveAt(index = 0, wallpaperToken)
+ }
+
+ @Test
+ fun moveToFullscreen_multipleVisibleNonMinimizedTasks_doesNotRemoveWallpaperActivity() {
+ val task1 = setUpFreeformTask()
+ // Setup task2
+ setUpFreeformTask()
+ val wallpaperToken = MockToken().token()
+
+ desktopModeTaskRepository.wallpaperActivityToken = wallpaperToken
+ assertNotNull(rootTaskDisplayAreaOrganizer.getDisplayAreaInfo(DEFAULT_DISPLAY))
+ .configuration.windowConfiguration.windowingMode = WINDOWING_MODE_FULLSCREEN
+
+ controller.moveToFullscreen(task1.taskId, transitionSource = UNKNOWN)
+
+ val wct = getLatestExitDesktopWct()
+ val task1Change = assertNotNull(wct.changes[task1.token.asBinder()])
+ assertThat(task1Change.windowingMode).isEqualTo(WINDOWING_MODE_UNDEFINED)
+ // Does not remove wallpaper activity, as desktop still has a visible desktop task
+ assertThat(wct.hierarchyOps).isEmpty()
+ }
+
+ @Test
fun moveToFullscreen_nonExistentTask_doesNothing() {
controller.moveToFullscreen(999, transitionSource = UNKNOWN)
verifyExitDesktopWCTNotExecuted()
@@ -1198,6 +1199,22 @@ class DesktopTasksControllerTest : ShellTestCase() {
}
@Test
+ fun handleRequest_freeformTask_relaunchActiveTask_taskBecomesUndefined() {
+ assumeTrue(ENABLE_SHELL_TRANSITIONS)
+
+ val freeformTask = setUpFreeformTask()
+ markTaskHidden(freeformTask)
+
+ val wct =
+ controller.handleRequest(Binder(), createTransition(freeformTask))
+
+ // Should become undefined as the TDA is set to fullscreen. It will inherit from the TDA.
+ assertNotNull(wct, "should handle request")
+ assertThat(wct.changes[freeformTask.token.asBinder()]?.windowingMode)
+ .isEqualTo(WINDOWING_MODE_UNDEFINED)
+ }
+
+ @Test
@DisableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
fun handleRequest_freeformTask_desktopWallpaperDisabled_freeformNotVisible_reorderedToTop() {
assumeTrue(ENABLE_SHELL_TRANSITIONS)
@@ -1348,7 +1365,7 @@ class DesktopTasksControllerTest : ShellTestCase() {
.setActivityType(ACTIVITY_TYPE_STANDARD)
.setWindowingMode(WINDOWING_MODE_FULLSCREEN)
.build()
- val transition = createTransition(task = task, type = WindowManager.TRANSIT_CLOSE)
+ val transition = createTransition(task = task, type = TRANSIT_CLOSE)
val result = controller.handleRequest(Binder(), transition)
assertThat(result).isNull()
}
@@ -1442,8 +1459,11 @@ class DesktopTasksControllerTest : ShellTestCase() {
}
@Test
- @DisableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
- fun handleRequest_backTransition_singleActiveTaskNoTokenFlagDisabled_doesNotHandle() {
+ @DisableFlags(
+ Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY,
+ Flags.FLAG_ENABLE_DESKTOP_WINDOWING_BACK_NAVIGATION,
+ )
+ fun handleRequest_backTransition_singleTaskNoToken_noWallpaper_noBackNav_doesNotHandle() {
val task = setUpFreeformTask()
val result = controller.handleRequest(Binder(), createTransition(task, type = TRANSIT_TO_BACK))
@@ -1452,8 +1472,22 @@ class DesktopTasksControllerTest : ShellTestCase() {
}
@Test
+ @EnableFlags(
+ Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY,
+ Flags.FLAG_ENABLE_DESKTOP_WINDOWING_BACK_NAVIGATION
+ )
+ fun handleRequest_backTransition_singleTaskNoToken_withWallpaper_withBackNav_removesTask() {
+ val task = setUpFreeformTask()
+
+ val result = controller.handleRequest(Binder(), createTransition(task, type = TRANSIT_TO_BACK))
+
+ assertNotNull(result, "Should handle request").assertRemoveAt(0, task.token)
+ }
+
+ @Test
@EnableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
- fun handleRequest_backTransition_singleActiveTaskNoTokenFlagEnabled_doesNotHandle() {
+ @DisableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_BACK_NAVIGATION)
+ fun handleRequest_backTransition_singleTaskNoToken_noBackNav_doesNotHandle() {
val task = setUpFreeformTask()
val result = controller.handleRequest(Binder(), createTransition(task, type = TRANSIT_TO_BACK))
@@ -1462,8 +1496,11 @@ class DesktopTasksControllerTest : ShellTestCase() {
}
@Test
- @DisableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
- fun handleRequest_backTransition_singleActiveTaskWithTokenFlagDisabled_doesNotHandle() {
+ @DisableFlags(
+ Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY,
+ Flags.FLAG_ENABLE_DESKTOP_WINDOWING_BACK_NAVIGATION
+ )
+ fun handleRequest_backTransition_singleTaskWithToken_noWallpaper_noBackNav_doesNotHandle() {
val task = setUpFreeformTask()
desktopModeTaskRepository.wallpaperActivityToken = MockToken().token()
@@ -1473,22 +1510,42 @@ class DesktopTasksControllerTest : ShellTestCase() {
}
@Test
+ @EnableFlags(
+ Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY,
+ Flags.FLAG_ENABLE_DESKTOP_WINDOWING_BACK_NAVIGATION
+ )
+ fun handleRequest_backTransition_singleTask_withWallpaper_withBackNav_removesWallpaperAndTask() {
+ val task = setUpFreeformTask()
+ val wallpaperToken = MockToken().token()
+
+ desktopModeTaskRepository.wallpaperActivityToken = wallpaperToken
+ val result = controller.handleRequest(Binder(), createTransition(task, type = TRANSIT_TO_BACK))
+
+ // Should create remove wallpaper transaction
+ assertNotNull(result, "Should handle request").assertRemoveAt(index = 0, wallpaperToken)
+ result.assertRemoveAt(index = 1, task.token)
+ }
+
+ @Test
@EnableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
- fun handleRequest_backTransition_singleActiveTaskWithTokenFlagEnabled_handlesRequest() {
+ @DisableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_BACK_NAVIGATION)
+ fun handleRequest_backTransition_singleTaskWithToken_noBackNav_removesWallpaper() {
val task = setUpFreeformTask()
val wallpaperToken = MockToken().token()
desktopModeTaskRepository.wallpaperActivityToken = wallpaperToken
val result = controller.handleRequest(Binder(), createTransition(task, type = TRANSIT_TO_BACK))
- assertNotNull(result, "Should handle request")
- // Should create remove wallpaper transaction
- .assertRemoveAt(index = 0, wallpaperToken)
+ // Should create remove wallpaper transaction
+ assertNotNull(result, "Should handle request").assertRemoveAt(index = 0, wallpaperToken)
}
@Test
- @DisableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
- fun handleRequest_backTransition_multipleActiveTasksFlagDisabled_doesNotHandle() {
+ @DisableFlags(
+ Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY,
+ Flags.FLAG_ENABLE_DESKTOP_WINDOWING_BACK_NAVIGATION
+ )
+ fun handleRequest_backTransition_multipleTasks_noWallpaper_noBackNav_doesNotHandle() {
val task1 = setUpFreeformTask()
setUpFreeformTask()
@@ -1499,8 +1556,24 @@ class DesktopTasksControllerTest : ShellTestCase() {
}
@Test
+ @EnableFlags(
+ Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY,
+ Flags.FLAG_ENABLE_DESKTOP_WINDOWING_BACK_NAVIGATION
+ )
+ fun handleRequest_backTransition_multipleTasks_withWallpaper_withBackNav_removesTask() {
+ val task1 = setUpFreeformTask()
+ setUpFreeformTask()
+
+ desktopModeTaskRepository.wallpaperActivityToken = MockToken().token()
+ val result = controller.handleRequest(Binder(), createTransition(task1, type = TRANSIT_TO_BACK))
+
+ assertNotNull(result, "Should handle request").assertRemoveAt(index = 0, task1.token)
+ }
+
+ @Test
@EnableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
- fun handleRequest_backTransition_multipleActiveTasksFlagEnabled_doesNotHandle() {
+ @DisableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_BACK_NAVIGATION)
+ fun handleRequest_backTransition_multipleTasks_noBackNav_doesNotHandle() {
val task1 = setUpFreeformTask()
setUpFreeformTask()
@@ -1511,8 +1584,28 @@ class DesktopTasksControllerTest : ShellTestCase() {
}
@Test
+ @EnableFlags(
+ Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY,
+ Flags.FLAG_ENABLE_DESKTOP_WINDOWING_BACK_NAVIGATION
+ )
+ fun handleRequest_backTransition_multipleTasksSingleNonClosing_removesWallpaperAndTask() {
+ val task1 = setUpFreeformTask(displayId = DEFAULT_DISPLAY)
+ val task2 = setUpFreeformTask(displayId = DEFAULT_DISPLAY)
+ val wallpaperToken = MockToken().token()
+
+ desktopModeTaskRepository.wallpaperActivityToken = wallpaperToken
+ desktopModeTaskRepository.addClosingTask(displayId = DEFAULT_DISPLAY, taskId = task2.taskId)
+ val result = controller.handleRequest(Binder(), createTransition(task1, type = TRANSIT_TO_BACK))
+
+ // Should create remove wallpaper transaction
+ assertNotNull(result, "Should handle request").assertRemoveAt(index = 0, wallpaperToken)
+ result.assertRemoveAt(index = 1, task1.token)
+ }
+
+ @Test
@EnableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
- fun handleRequest_backTransition_multipleActiveTasksSingleNonClosing_handlesRequest() {
+ @DisableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_BACK_NAVIGATION)
+ fun handleRequest_backTransition_multipleTasksSingleNonClosing_noBackNav_removesWallpaper() {
val task1 = setUpFreeformTask(displayId = DEFAULT_DISPLAY)
val task2 = setUpFreeformTask(displayId = DEFAULT_DISPLAY)
val wallpaperToken = MockToken().token()
@@ -1521,14 +1614,33 @@ class DesktopTasksControllerTest : ShellTestCase() {
desktopModeTaskRepository.addClosingTask(displayId = DEFAULT_DISPLAY, taskId = task2.taskId)
val result = controller.handleRequest(Binder(), createTransition(task1, type = TRANSIT_TO_BACK))
- assertNotNull(result, "Should handle request")
- // Should create remove wallpaper transaction
- .assertRemoveAt(index = 0, wallpaperToken)
+ // Should create remove wallpaper transaction
+ assertNotNull(result, "Should handle request").assertRemoveAt(index = 0, wallpaperToken)
+ }
+
+ @Test
+ @EnableFlags(
+ Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY,
+ Flags.FLAG_ENABLE_DESKTOP_WINDOWING_BACK_NAVIGATION
+ )
+ fun handleRequest_backTransition_multipleTasksSingleNonMinimized_removesWallpaperAndTask() {
+ val task1 = setUpFreeformTask(displayId = DEFAULT_DISPLAY)
+ val task2 = setUpFreeformTask(displayId = DEFAULT_DISPLAY)
+ val wallpaperToken = MockToken().token()
+
+ desktopModeTaskRepository.wallpaperActivityToken = wallpaperToken
+ desktopModeTaskRepository.minimizeTask(displayId = DEFAULT_DISPLAY, taskId = task2.taskId)
+ val result = controller.handleRequest(Binder(), createTransition(task1, type = TRANSIT_TO_BACK))
+
+ // Should create remove wallpaper transaction
+ assertNotNull(result, "Should handle request").assertRemoveAt(index = 0, wallpaperToken)
+ result.assertRemoveAt(index = 1, task1.token)
}
@Test
@EnableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
- fun handleRequest_backTransition_multipleActiveTasksSingleNonMinimized_handlesRequest() {
+ @DisableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_BACK_NAVIGATION)
+ fun handleRequest_backTransition_multipleTasksSingleNonMinimized_noBackNav_removesWallpaper() {
val task1 = setUpFreeformTask(displayId = DEFAULT_DISPLAY)
val task2 = setUpFreeformTask(displayId = DEFAULT_DISPLAY)
val wallpaperToken = MockToken().token()
@@ -1537,14 +1649,36 @@ class DesktopTasksControllerTest : ShellTestCase() {
desktopModeTaskRepository.minimizeTask(displayId = DEFAULT_DISPLAY, taskId = task2.taskId)
val result = controller.handleRequest(Binder(), createTransition(task1, type = TRANSIT_TO_BACK))
- assertNotNull(result, "Should handle request")
- // Should create remove wallpaper transaction
- .assertRemoveAt(index = 0, wallpaperToken)
+ // Should create remove wallpaper transaction
+ assertNotNull(result, "Should handle request").assertRemoveAt(index = 0, wallpaperToken)
}
@Test
- @DisableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
- fun handleRequest_closeTransition_singleActiveTaskNoTokenFlagDisabled_doesNotHandle() {
+ @EnableFlags(
+ Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY,
+ Flags.FLAG_ENABLE_DESKTOP_WINDOWING_BACK_NAVIGATION
+ )
+ fun handleRequest_backTransition_nonMinimizadTask_withWallpaper_withBackNav_removesWallpaper() {
+ val task1 = setUpFreeformTask(displayId = DEFAULT_DISPLAY)
+ val task2 = setUpFreeformTask(displayId = DEFAULT_DISPLAY)
+ val wallpaperToken = MockToken().token()
+
+ desktopModeTaskRepository.wallpaperActivityToken = wallpaperToken
+ desktopModeTaskRepository.minimizeTask(displayId = DEFAULT_DISPLAY, taskId = task2.taskId)
+ // Task is being minimized so mark it as not visible.
+ desktopModeTaskRepository
+ .updateVisibleFreeformTasks(displayId = DEFAULT_DISPLAY, task2.taskId, false)
+ val result = controller.handleRequest(Binder(), createTransition(task2, type = TRANSIT_TO_BACK))
+
+ assertNull(result, "Should not handle request")
+ }
+
+ @Test
+ @DisableFlags(
+ Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY,
+ Flags.FLAG_ENABLE_DESKTOP_WINDOWING_BACK_NAVIGATION
+ )
+ fun handleRequest_closeTransition_singleTaskNoToken_noWallpaper_noBackNav_doesNotHandle() {
val task = setUpFreeformTask()
val result = controller.handleRequest(Binder(), createTransition(task, type = TRANSIT_CLOSE))
@@ -1553,8 +1687,22 @@ class DesktopTasksControllerTest : ShellTestCase() {
}
@Test
+ @EnableFlags(
+ Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY,
+ Flags.FLAG_ENABLE_DESKTOP_WINDOWING_BACK_NAVIGATION
+ )
+ fun handleRequest_closeTransition_singleTaskNoToken_withWallpaper_withBackNav_removesTask() {
+ val task = setUpFreeformTask()
+
+ val result = controller.handleRequest(Binder(), createTransition(task, type = TRANSIT_CLOSE))
+
+ assertNotNull(result, "Should handle request").assertRemoveAt(index = 0, task.token)
+ }
+
+ @Test
@EnableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
- fun handleRequest_closeTransition_singleActiveTaskNoTokenFlagEnabled_doesNotHandle() {
+ @DisableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_BACK_NAVIGATION)
+ fun handleRequest_closeTransition_singleTaskNoToken_noBackNav_doesNotHandle() {
val task = setUpFreeformTask()
val result = controller.handleRequest(Binder(), createTransition(task, type = TRANSIT_CLOSE))
@@ -1563,8 +1711,11 @@ class DesktopTasksControllerTest : ShellTestCase() {
}
@Test
- @DisableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
- fun handleRequest_closeTransition_singleActiveTaskWithTokenFlagDisabled_doesNotHandle() {
+ @DisableFlags(
+ Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY,
+ Flags.FLAG_ENABLE_DESKTOP_WINDOWING_BACK_NAVIGATION
+ )
+ fun handleRequest_closeTransition_singleTaskWithToken_noWallpaper_noBackNav_doesNotHandle() {
val task = setUpFreeformTask()
desktopModeTaskRepository.wallpaperActivityToken = MockToken().token()
@@ -1574,22 +1725,42 @@ class DesktopTasksControllerTest : ShellTestCase() {
}
@Test
+ @EnableFlags(
+ Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY,
+ Flags.FLAG_ENABLE_DESKTOP_WINDOWING_BACK_NAVIGATION
+ )
+ fun handleRequest_closeTransition_singleTaskWithToken_removesWallpaperAndTask() {
+ val task = setUpFreeformTask()
+ val wallpaperToken = MockToken().token()
+
+ desktopModeTaskRepository.wallpaperActivityToken = wallpaperToken
+ val result = controller.handleRequest(Binder(), createTransition(task, type = TRANSIT_CLOSE))
+
+ // Should create remove wallpaper transaction
+ assertNotNull(result, "Should handle request").assertRemoveAt(index = 0, wallpaperToken)
+ result.assertRemoveAt(index = 1, task.token)
+ }
+
+ @Test
@EnableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
- fun handleRequest_closeTransition_singleActiveTaskWithTokenFlagEnabled_handlesRequest() {
+ @DisableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_BACK_NAVIGATION)
+ fun handleRequest_closeTransition_singleTaskWithToken_withWallpaper_noBackNav_removesWallpaper() {
val task = setUpFreeformTask()
val wallpaperToken = MockToken().token()
desktopModeTaskRepository.wallpaperActivityToken = wallpaperToken
val result = controller.handleRequest(Binder(), createTransition(task, type = TRANSIT_CLOSE))
- assertNotNull(result, "Should handle request")
- // Should create remove wallpaper transaction
- .assertRemoveAt(index = 0, wallpaperToken)
+ // Should create remove wallpaper transaction
+ assertNotNull(result, "Should handle request").assertRemoveAt(index = 0, wallpaperToken)
}
@Test
- @DisableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
- fun handleRequest_closeTransition_multipleActiveTasksFlagDisabled_doesNotHandle() {
+ @DisableFlags(
+ Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY,
+ Flags.FLAG_ENABLE_DESKTOP_WINDOWING_BACK_NAVIGATION
+ )
+ fun handleRequest_closeTransition_multipleTasks_noWallpaper_noBackNav_doesNotHandle() {
val task1 = setUpFreeformTask()
setUpFreeformTask()
@@ -1600,8 +1771,25 @@ class DesktopTasksControllerTest : ShellTestCase() {
}
@Test
+ @EnableFlags(
+ Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY,
+ Flags.FLAG_ENABLE_DESKTOP_WINDOWING_BACK_NAVIGATION
+ )
+ fun handleRequest_closeTransition_multipleTasks_withWallpaper_withBackNav_removesTask() {
+ val task1 = setUpFreeformTask()
+ setUpFreeformTask()
+
+ desktopModeTaskRepository.wallpaperActivityToken = MockToken().token()
+ val result = controller.handleRequest(Binder(), createTransition(task1, type = TRANSIT_CLOSE))
+
+ assertNotNull(result, "Should handle request")
+ result.assertRemoveAt(index = 0, task1.token)
+ }
+
+ @Test
@EnableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
- fun handleRequest_closeTransition_multipleActiveTasksFlagEnabled_doesNotHandle() {
+ @DisableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_BACK_NAVIGATION)
+ fun handleRequest_closeTransition_multipleTasksFlagEnabled_noBackNav_doesNotHandle() {
val task1 = setUpFreeformTask()
setUpFreeformTask()
@@ -1612,8 +1800,28 @@ class DesktopTasksControllerTest : ShellTestCase() {
}
@Test
+ @EnableFlags(
+ Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY,
+ Flags.FLAG_ENABLE_DESKTOP_WINDOWING_BACK_NAVIGATION
+ )
+ fun handleRequest_closeTransition_multipleTasksSingleNonClosing_removesWallpaperAndTask() {
+ val task1 = setUpFreeformTask(displayId = DEFAULT_DISPLAY)
+ val task2 = setUpFreeformTask(displayId = DEFAULT_DISPLAY)
+ val wallpaperToken = MockToken().token()
+
+ desktopModeTaskRepository.wallpaperActivityToken = wallpaperToken
+ desktopModeTaskRepository.addClosingTask(displayId = DEFAULT_DISPLAY, taskId = task2.taskId)
+ val result = controller.handleRequest(Binder(), createTransition(task1, type = TRANSIT_CLOSE))
+
+ // Should create remove wallpaper transaction
+ assertNotNull(result, "Should handle request").assertRemoveAt(index = 0, wallpaperToken)
+ result.assertRemoveAt(index = 1, task1.token)
+ }
+
+ @Test
@EnableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
- fun handleRequest_closeTransition_multipleActiveTasksSingleNonClosing_handlesRequest() {
+ @DisableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_BACK_NAVIGATION)
+ fun handleRequest_closeTransition_multipleTasksSingleNonClosing_noBackNav_removesWallpaper() {
val task1 = setUpFreeformTask(displayId = DEFAULT_DISPLAY)
val task2 = setUpFreeformTask(displayId = DEFAULT_DISPLAY)
val wallpaperToken = MockToken().token()
@@ -1622,14 +1830,33 @@ class DesktopTasksControllerTest : ShellTestCase() {
desktopModeTaskRepository.addClosingTask(displayId = DEFAULT_DISPLAY, taskId = task2.taskId)
val result = controller.handleRequest(Binder(), createTransition(task1, type = TRANSIT_CLOSE))
- assertNotNull(result, "Should handle request")
- // Should create remove wallpaper transaction
- .assertRemoveAt(index = 0, wallpaperToken)
+ // Should create remove wallpaper transaction
+ assertNotNull(result, "Should handle request").assertRemoveAt(index = 0, wallpaperToken)
+ }
+
+ @Test
+ @EnableFlags(
+ Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY,
+ Flags.FLAG_ENABLE_DESKTOP_WINDOWING_BACK_NAVIGATION
+ )
+ fun handleRequest_closeTransition_multipleTasksOneNonMinimized_removesWallpaperAndTask() {
+ val task1 = setUpFreeformTask(displayId = DEFAULT_DISPLAY)
+ val task2 = setUpFreeformTask(displayId = DEFAULT_DISPLAY)
+ val wallpaperToken = MockToken().token()
+
+ desktopModeTaskRepository.wallpaperActivityToken = wallpaperToken
+ desktopModeTaskRepository.minimizeTask(displayId = DEFAULT_DISPLAY, taskId = task2.taskId)
+ val result = controller.handleRequest(Binder(), createTransition(task1, type = TRANSIT_CLOSE))
+
+ // Should create remove wallpaper transaction
+ assertNotNull(result, "Should handle request").assertRemoveAt(index = 0, wallpaperToken)
+ result.assertRemoveAt(index = 1, task1.token)
}
@Test
@EnableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
- fun handleRequest_closeTransition_multipleActiveTasksSingleNonMinimized_handlesRequest() {
+ @DisableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_BACK_NAVIGATION)
+ fun handleRequest_closeTransition_multipleTasksSingleNonMinimized_noBackNav_removesWallpaper() {
val task1 = setUpFreeformTask(displayId = DEFAULT_DISPLAY)
val task2 = setUpFreeformTask(displayId = DEFAULT_DISPLAY)
val wallpaperToken = MockToken().token()
@@ -1638,9 +1865,28 @@ class DesktopTasksControllerTest : ShellTestCase() {
desktopModeTaskRepository.minimizeTask(displayId = DEFAULT_DISPLAY, taskId = task2.taskId)
val result = controller.handleRequest(Binder(), createTransition(task1, type = TRANSIT_CLOSE))
- assertNotNull(result, "Should handle request")
- // Should create remove wallpaper transaction
- .assertRemoveAt(index = 0, wallpaperToken)
+ // Should create remove wallpaper transaction
+ assertNotNull(result, "Should handle request").assertRemoveAt(index = 0, wallpaperToken)
+ }
+
+ @Test
+ @EnableFlags(
+ Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY,
+ Flags.FLAG_ENABLE_DESKTOP_WINDOWING_BACK_NAVIGATION
+ )
+ fun handleRequest_closeTransition_minimizadTask_withWallpaper_withBackNav_removesWallpaper() {
+ val task1 = setUpFreeformTask(displayId = DEFAULT_DISPLAY)
+ val task2 = setUpFreeformTask(displayId = DEFAULT_DISPLAY)
+ val wallpaperToken = MockToken().token()
+
+ desktopModeTaskRepository.wallpaperActivityToken = wallpaperToken
+ desktopModeTaskRepository.minimizeTask(displayId = DEFAULT_DISPLAY, taskId = task2.taskId)
+ // Task is being minimized so mark it as not visible.
+ desktopModeTaskRepository
+ .updateVisibleFreeformTasks(displayId = DEFAULT_DISPLAY, task2.taskId, false)
+ val result = controller.handleRequest(Binder(), createTransition(task2, type = TRANSIT_TO_BACK))
+
+ assertNull(result, "Should not handle request")
}
@Test
@@ -1722,6 +1968,49 @@ class DesktopTasksControllerTest : ShellTestCase() {
}
@Test
+ fun moveFocusedTaskToFullscreen_onlyVisibleNonMinimizedTask_removesWallpaperActivity() {
+ val task1 = setUpFreeformTask()
+ val task2 = setUpFreeformTask()
+ val task3 = setUpFreeformTask()
+ val wallpaperToken = MockToken().token()
+
+ task1.isFocused = false
+ task2.isFocused = true
+ task3.isFocused = false
+ desktopModeTaskRepository.wallpaperActivityToken = wallpaperToken
+ desktopModeTaskRepository.minimizeTask(DEFAULT_DISPLAY, task1.taskId)
+ desktopModeTaskRepository.updateVisibleFreeformTasks(DEFAULT_DISPLAY, task3.taskId,
+ visible = false)
+
+ controller.enterFullscreen(DEFAULT_DISPLAY, transitionSource = UNKNOWN)
+
+ val wct = getLatestExitDesktopWct()
+ val taskChange = assertNotNull(wct.changes[task2.token.asBinder()])
+ assertThat(taskChange.windowingMode).isEqualTo(WINDOWING_MODE_UNDEFINED) // inherited FULLSCREEN
+ wct.assertRemoveAt(index = 0, wallpaperToken)
+ }
+
+ @Test
+ fun moveFocusedTaskToFullscreen_multipleVisibleTasks_doesNotRemoveWallpaperActivity() {
+ val task1 = setUpFreeformTask()
+ val task2 = setUpFreeformTask()
+ val task3 = setUpFreeformTask()
+ val wallpaperToken = MockToken().token()
+
+ task1.isFocused = false
+ task2.isFocused = true
+ task3.isFocused = false
+ desktopModeTaskRepository.wallpaperActivityToken = wallpaperToken
+ controller.enterFullscreen(DEFAULT_DISPLAY, transitionSource = UNKNOWN)
+
+ val wct = getLatestExitDesktopWct()
+ val taskChange = assertNotNull(wct.changes[task2.token.asBinder()])
+ assertThat(taskChange.windowingMode).isEqualTo(WINDOWING_MODE_UNDEFINED) // inherited FULLSCREEN
+ // Does not remove wallpaper activity, as desktop still has visible desktop tasks
+ assertThat(wct.hierarchyOps).isEmpty()
+ }
+
+ @Test
@EnableFlags(Flags.FLAG_ENABLE_WINDOWING_DYNAMIC_INITIAL_BOUNDS)
fun dragToDesktop_landscapeDevice_resizable_undefinedOrientation_defaultLandscapeBounds() {
val spyController = spy(controller)
@@ -1732,7 +2021,7 @@ class DesktopTasksControllerTest : ShellTestCase() {
val task = setUpFullscreenTask()
setUpLandscapeDisplay()
- spyController.onDragPositioningEndThroughStatusBar(PointF(800f, 1280f), task)
+ spyController.onDragPositioningEndThroughStatusBar(PointF(800f, 1280f), task, mockSurface)
val wct = getLatestDragToDesktopWct()
assertThat(findBoundsChange(wct, task)).isEqualTo(DEFAULT_LANDSCAPE_BOUNDS)
}
@@ -1748,7 +2037,7 @@ class DesktopTasksControllerTest : ShellTestCase() {
val task = setUpFullscreenTask(screenOrientation = SCREEN_ORIENTATION_LANDSCAPE)
setUpLandscapeDisplay()
- spyController.onDragPositioningEndThroughStatusBar(PointF(800f, 1280f), task)
+ spyController.onDragPositioningEndThroughStatusBar(PointF(800f, 1280f), task, mockSurface)
val wct = getLatestDragToDesktopWct()
assertThat(findBoundsChange(wct, task)).isEqualTo(DEFAULT_LANDSCAPE_BOUNDS)
}
@@ -1765,7 +2054,7 @@ class DesktopTasksControllerTest : ShellTestCase() {
setUpFullscreenTask(screenOrientation = SCREEN_ORIENTATION_PORTRAIT, shouldLetterbox = true)
setUpLandscapeDisplay()
- spyController.onDragPositioningEndThroughStatusBar(PointF(800f, 1280f), task)
+ spyController.onDragPositioningEndThroughStatusBar(PointF(800f, 1280f), task, mockSurface)
val wct = getLatestDragToDesktopWct()
assertThat(findBoundsChange(wct, task)).isEqualTo(RESIZABLE_PORTRAIT_BOUNDS)
}
@@ -1782,7 +2071,7 @@ class DesktopTasksControllerTest : ShellTestCase() {
setUpFullscreenTask(isResizable = false, screenOrientation = SCREEN_ORIENTATION_LANDSCAPE)
setUpLandscapeDisplay()
- spyController.onDragPositioningEndThroughStatusBar(PointF(800f, 1280f), task)
+ spyController.onDragPositioningEndThroughStatusBar(PointF(800f, 1280f), task, mockSurface)
val wct = getLatestDragToDesktopWct()
assertThat(findBoundsChange(wct, task)).isEqualTo(DEFAULT_LANDSCAPE_BOUNDS)
}
@@ -1802,7 +2091,7 @@ class DesktopTasksControllerTest : ShellTestCase() {
shouldLetterbox = true)
setUpLandscapeDisplay()
- spyController.onDragPositioningEndThroughStatusBar(PointF(800f, 1280f), task)
+ spyController.onDragPositioningEndThroughStatusBar(PointF(800f, 1280f), task, mockSurface)
val wct = getLatestDragToDesktopWct()
assertThat(findBoundsChange(wct, task)).isEqualTo(UNRESIZABLE_PORTRAIT_BOUNDS)
}
@@ -1818,7 +2107,7 @@ class DesktopTasksControllerTest : ShellTestCase() {
val task = setUpFullscreenTask(deviceOrientation = ORIENTATION_PORTRAIT)
setUpPortraitDisplay()
- spyController.onDragPositioningEndThroughStatusBar(PointF(800f, 1280f), task)
+ spyController.onDragPositioningEndThroughStatusBar(PointF(800f, 1280f), task, mockSurface)
val wct = getLatestDragToDesktopWct()
assertThat(findBoundsChange(wct, task)).isEqualTo(DEFAULT_PORTRAIT_BOUNDS)
}
@@ -1837,7 +2126,7 @@ class DesktopTasksControllerTest : ShellTestCase() {
screenOrientation = SCREEN_ORIENTATION_PORTRAIT)
setUpPortraitDisplay()
- spyController.onDragPositioningEndThroughStatusBar(PointF(800f, 1280f), task)
+ spyController.onDragPositioningEndThroughStatusBar(PointF(800f, 1280f), task, mockSurface)
val wct = getLatestDragToDesktopWct()
assertThat(findBoundsChange(wct, task)).isEqualTo(DEFAULT_PORTRAIT_BOUNDS)
}
@@ -1857,7 +2146,7 @@ class DesktopTasksControllerTest : ShellTestCase() {
shouldLetterbox = true)
setUpPortraitDisplay()
- spyController.onDragPositioningEndThroughStatusBar(PointF(800f, 1280f), task)
+ spyController.onDragPositioningEndThroughStatusBar(PointF(800f, 1280f), task, mockSurface)
val wct = getLatestDragToDesktopWct()
assertThat(findBoundsChange(wct, task)).isEqualTo(RESIZABLE_LANDSCAPE_BOUNDS)
}
@@ -1877,7 +2166,7 @@ class DesktopTasksControllerTest : ShellTestCase() {
screenOrientation = SCREEN_ORIENTATION_PORTRAIT)
setUpPortraitDisplay()
- spyController.onDragPositioningEndThroughStatusBar(PointF(800f, 1280f), task)
+ spyController.onDragPositioningEndThroughStatusBar(PointF(800f, 1280f), task, mockSurface)
val wct = getLatestDragToDesktopWct()
assertThat(findBoundsChange(wct, task)).isEqualTo(DEFAULT_PORTRAIT_BOUNDS)
}
@@ -1898,7 +2187,7 @@ class DesktopTasksControllerTest : ShellTestCase() {
shouldLetterbox = true)
setUpPortraitDisplay()
- spyController.onDragPositioningEndThroughStatusBar(PointF(200f, 200f), task)
+ spyController.onDragPositioningEndThroughStatusBar(PointF(200f, 200f), task, mockSurface)
val wct = getLatestDragToDesktopWct()
assertThat(findBoundsChange(wct, task)).isEqualTo(UNRESIZABLE_LANDSCAPE_BOUNDS)
}
@@ -1930,6 +2219,7 @@ class DesktopTasksControllerTest : ShellTestCase() {
eq(null))
}
+ @Test
fun enterSplit_freeformTaskIsMovedToSplit() {
val task1 = setUpFreeformTask()
val task2 = setUpFreeformTask()
@@ -1939,14 +2229,67 @@ class DesktopTasksControllerTest : ShellTestCase() {
task2.isFocused = true
task3.isFocused = false
- controller.enterSplit(DEFAULT_DISPLAY, false)
+ controller.enterSplit(DEFAULT_DISPLAY, leftOrTop = false)
verify(splitScreenController)
.requestEnterSplitSelect(
- task2,
+ eq(task2),
any(),
- SplitScreenConstants.SPLIT_POSITION_BOTTOM_OR_RIGHT,
- task2.configuration.windowConfiguration.bounds)
+ eq(SplitScreenConstants.SPLIT_POSITION_BOTTOM_OR_RIGHT),
+ eq(task2.configuration.windowConfiguration.bounds))
+ }
+
+ @Test
+ fun enterSplit_onlyVisibleNonMinimizedTask_removesWallpaperActivity() {
+ val task1 = setUpFreeformTask()
+ val task2 = setUpFreeformTask()
+ val task3 = setUpFreeformTask()
+ val wallpaperToken = MockToken().token()
+
+ task1.isFocused = false
+ task2.isFocused = true
+ task3.isFocused = false
+ desktopModeTaskRepository.wallpaperActivityToken = wallpaperToken
+ desktopModeTaskRepository.minimizeTask(DEFAULT_DISPLAY, task1.taskId)
+ desktopModeTaskRepository.updateVisibleFreeformTasks(DEFAULT_DISPLAY, task3.taskId,
+ visible = false)
+
+ controller.enterSplit(DEFAULT_DISPLAY, leftOrTop = false)
+
+ val wctArgument = ArgumentCaptor.forClass(WindowContainerTransaction::class.java)
+ verify(splitScreenController)
+ .requestEnterSplitSelect(
+ eq(task2),
+ wctArgument.capture(),
+ eq(SplitScreenConstants.SPLIT_POSITION_BOTTOM_OR_RIGHT),
+ eq(task2.configuration.windowConfiguration.bounds))
+ // Removes wallpaper activity when leaving desktop
+ wctArgument.value.assertRemoveAt(index = 0, wallpaperToken)
+ }
+
+ @Test
+ fun enterSplit_multipleVisibleNonMinimizedTasks_removesWallpaperActivity() {
+ val task1 = setUpFreeformTask()
+ val task2 = setUpFreeformTask()
+ val task3 = setUpFreeformTask()
+ val wallpaperToken = MockToken().token()
+
+ task1.isFocused = false
+ task2.isFocused = true
+ task3.isFocused = false
+ desktopModeTaskRepository.wallpaperActivityToken = wallpaperToken
+
+ controller.enterSplit(DEFAULT_DISPLAY, leftOrTop = false)
+
+ val wctArgument = ArgumentCaptor.forClass(WindowContainerTransaction::class.java)
+ verify(splitScreenController)
+ .requestEnterSplitSelect(
+ eq(task2),
+ wctArgument.capture(),
+ eq(SplitScreenConstants.SPLIT_POSITION_BOTTOM_OR_RIGHT),
+ eq(task2.configuration.windowConfiguration.bounds))
+ // Does not remove wallpaper activity, as desktop still has visible desktop tasks
+ assertThat(wctArgument.value.hierarchyOps).isEmpty()
}
@Test
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DragToDesktopTransitionHandlerTest.kt b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DragToDesktopTransitionHandlerTest.kt
index bbf523bc40d2..e4e2bd216c94 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DragToDesktopTransitionHandlerTest.kt
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DragToDesktopTransitionHandlerTest.kt
@@ -15,6 +15,7 @@ import android.window.TransitionInfo
import android.window.TransitionInfo.FLAG_IS_WALLPAPER
import android.window.WindowContainerTransaction
import androidx.test.filters.SmallTest
+import com.android.internal.jank.InteractionJankMonitor
import com.android.wm.shell.RootTaskDisplayAreaOrganizer
import com.android.wm.shell.ShellTestCase
import com.android.wm.shell.TestRunningTaskInfoBuilder
@@ -51,6 +52,8 @@ class DragToDesktopTransitionHandlerTest : ShellTestCase() {
@Mock private lateinit var taskDisplayAreaOrganizer: RootTaskDisplayAreaOrganizer
@Mock private lateinit var splitScreenController: SplitScreenController
@Mock private lateinit var dragAnimator: MoveToDesktopAnimator
+ @Mock
+ private lateinit var mockInteractionJankMonitor: InteractionJankMonitor
private val transactionSupplier = Supplier { mock<SurfaceControl.Transaction>() }
@@ -63,7 +66,8 @@ class DragToDesktopTransitionHandlerTest : ShellTestCase() {
context,
transitions,
taskDisplayAreaOrganizer,
- transactionSupplier
+ mockInteractionJankMonitor,
+ transactionSupplier,
)
.apply { setSplitScreenController(splitScreenController) }
}
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/draganddrop/DragAndDropPolicyTest.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/draganddrop/DragAndDropPolicyTest.java
index 582fb91559e5..97fa8d6ceca9 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/draganddrop/DragAndDropPolicyTest.java
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/draganddrop/DragAndDropPolicyTest.java
@@ -289,9 +289,9 @@ public class DragAndDropPolicyTest extends ShellTestCase {
ArrayList<Target> targets = assertExactTargetTypes(
mPolicy.getTargets(mInsets), TYPE_FULLSCREEN);
- mPolicy.handleDrop(filterTargetByType(targets, TYPE_FULLSCREEN));
+ mPolicy.handleDrop(filterTargetByType(targets, TYPE_FULLSCREEN), null /* hideTaskToken */);
verify(mFullscreenStarter).startIntent(any(), anyInt(), any(),
- eq(SPLIT_POSITION_UNDEFINED), any());
+ eq(SPLIT_POSITION_UNDEFINED), any(), any());
}
private void dragOverFullscreenApp_expectSplitScreenTargets(ClipData data) {
@@ -304,14 +304,14 @@ public class DragAndDropPolicyTest extends ShellTestCase {
ArrayList<Target> targets = assertExactTargetTypes(
mPolicy.getTargets(mInsets), TYPE_SPLIT_LEFT, TYPE_SPLIT_RIGHT);
- mPolicy.handleDrop(filterTargetByType(targets, TYPE_SPLIT_LEFT));
+ mPolicy.handleDrop(filterTargetByType(targets, TYPE_SPLIT_LEFT), null /* hideTaskToken */);
verify(mSplitScreenStarter).startIntent(any(), anyInt(), any(),
- eq(SPLIT_POSITION_TOP_OR_LEFT), any());
+ eq(SPLIT_POSITION_TOP_OR_LEFT), any(), any());
reset(mSplitScreenStarter);
- mPolicy.handleDrop(filterTargetByType(targets, TYPE_SPLIT_RIGHT));
+ mPolicy.handleDrop(filterTargetByType(targets, TYPE_SPLIT_RIGHT), null /* hideTaskToken */);
verify(mSplitScreenStarter).startIntent(any(), anyInt(), any(),
- eq(SPLIT_POSITION_BOTTOM_OR_RIGHT), any());
+ eq(SPLIT_POSITION_BOTTOM_OR_RIGHT), any(), any());
}
private void dragOverFullscreenAppPhone_expectVerticalSplitScreenTargets(ClipData data) {
@@ -324,14 +324,15 @@ public class DragAndDropPolicyTest extends ShellTestCase {
ArrayList<Target> targets = assertExactTargetTypes(
mPolicy.getTargets(mInsets), TYPE_SPLIT_TOP, TYPE_SPLIT_BOTTOM);
- mPolicy.handleDrop(filterTargetByType(targets, TYPE_SPLIT_TOP));
+ mPolicy.handleDrop(filterTargetByType(targets, TYPE_SPLIT_TOP), null /* hideTaskToken */);
verify(mSplitScreenStarter).startIntent(any(), anyInt(), any(),
- eq(SPLIT_POSITION_TOP_OR_LEFT), any());
+ eq(SPLIT_POSITION_TOP_OR_LEFT), any(), any());
reset(mSplitScreenStarter);
- mPolicy.handleDrop(filterTargetByType(targets, TYPE_SPLIT_BOTTOM));
+ mPolicy.handleDrop(filterTargetByType(targets, TYPE_SPLIT_BOTTOM),
+ null /* hideTaskToken */);
verify(mSplitScreenStarter).startIntent(any(), anyInt(), any(),
- eq(SPLIT_POSITION_BOTTOM_OR_RIGHT), any());
+ eq(SPLIT_POSITION_BOTTOM_OR_RIGHT), any(), any());
}
@Test
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/shared/desktopmode/DesktopModeFlagsTest.kt b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/shared/desktopmode/DesktopModeFlagsTest.kt
index 00f37da0ed36..dd19d76d88cf 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/shared/desktopmode/DesktopModeFlagsTest.kt
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/shared/desktopmode/DesktopModeFlagsTest.kt
@@ -26,6 +26,7 @@ import com.android.window.flags.Flags.FLAG_ENABLE_DESKTOP_WINDOWING_MODE
import com.android.window.flags.Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY
import com.android.window.flags.Flags.FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION
import com.android.wm.shell.ShellTestCase
+import com.android.wm.shell.shared.desktopmode.DesktopModeFlags.Companion.convertToToggleOverrideWithFallback
import com.android.wm.shell.shared.desktopmode.DesktopModeFlags.DESKTOP_WINDOWING_MODE
import com.android.wm.shell.shared.desktopmode.DesktopModeFlags.ToggleOverride.OVERRIDE_OFF
import com.android.wm.shell.shared.desktopmode.DesktopModeFlags.ToggleOverride.OVERRIDE_ON
@@ -183,112 +184,10 @@ class DesktopModeFlagsTest : ShellTestCase() {
}
@Test
- @EnableFlags(FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION)
- @DisableFlags(FLAG_ENABLE_DESKTOP_WINDOWING_MODE)
- fun isEnabled_noSystemProperty_overrideOn_featureFlagOff_returnsTrueAndStoresPropertyOn() {
- System.clearProperty(SYSTEM_PROPERTY_OVERRIDE_KEY)
- setOverride(OVERRIDE_ON.setting)
-
- assertThat(DESKTOP_WINDOWING_MODE.isEnabled(mContext)).isTrue()
- // Store System Property if not present
- assertThat(System.getProperty(SYSTEM_PROPERTY_OVERRIDE_KEY))
- .isEqualTo(OVERRIDE_ON.setting.toString())
- }
-
- @Test
- @EnableFlags(FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION, FLAG_ENABLE_DESKTOP_WINDOWING_MODE)
- fun isEnabled_noSystemProperty_overrideUnset_featureFlagOn_returnsTrueAndStoresPropertyUnset() {
- System.clearProperty(SYSTEM_PROPERTY_OVERRIDE_KEY)
- setOverride(OVERRIDE_UNSET.setting)
-
- assertThat(DESKTOP_WINDOWING_MODE.isEnabled(mContext)).isTrue()
- // Store System Property if not present
- assertThat(System.getProperty(SYSTEM_PROPERTY_OVERRIDE_KEY))
- .isEqualTo(OVERRIDE_UNSET.setting.toString())
- }
-
- @Test
- @EnableFlags(FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION)
- @DisableFlags(FLAG_ENABLE_DESKTOP_WINDOWING_MODE)
- fun isEnabled_noSystemProperty_overrideUnset_featureFlagOff_returnsFalseAndStoresPropertyUnset() {
- System.clearProperty(SYSTEM_PROPERTY_OVERRIDE_KEY)
- setOverride(OVERRIDE_UNSET.setting)
-
- assertThat(DESKTOP_WINDOWING_MODE.isEnabled(mContext)).isFalse()
- // Store System Property if not present
- assertThat(System.getProperty(SYSTEM_PROPERTY_OVERRIDE_KEY))
- .isEqualTo(OVERRIDE_UNSET.setting.toString())
- }
-
- @Test
- @EnableFlags(FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION, FLAG_ENABLE_DESKTOP_WINDOWING_MODE)
- @Suppress("ktlint:standard:max-line-length")
- fun isEnabled_systemPropertyNotInteger_overrideOff_featureFlagOn_returnsFalseAndStoresPropertyOff() {
- System.setProperty(SYSTEM_PROPERTY_OVERRIDE_KEY, "abc")
- setOverride(OVERRIDE_OFF.setting)
-
- assertThat(DESKTOP_WINDOWING_MODE.isEnabled(mContext)).isFalse()
- // Store System Property if currently invalid
- assertThat(System.getProperty(SYSTEM_PROPERTY_OVERRIDE_KEY))
- .isEqualTo(OVERRIDE_OFF.setting.toString())
- }
-
- @Test
- @EnableFlags(FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION, FLAG_ENABLE_DESKTOP_WINDOWING_MODE)
- @Suppress("ktlint:standard:max-line-length")
- fun isEnabled_systemPropertyInvalidInteger_overrideOff_featureFlagOn_returnsFalseAndStoresPropertyOff() {
- System.setProperty(SYSTEM_PROPERTY_OVERRIDE_KEY, "-2")
- setOverride(OVERRIDE_OFF.setting)
-
- assertThat(DESKTOP_WINDOWING_MODE.isEnabled(mContext)).isFalse()
- // Store System Property if currently invalid
- assertThat(System.getProperty(SYSTEM_PROPERTY_OVERRIDE_KEY))
- .isEqualTo(OVERRIDE_OFF.setting.toString())
- }
-
- @Test
- @EnableFlags(FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION, FLAG_ENABLE_DESKTOP_WINDOWING_MODE)
- fun isEnabled_systemPropertyOff_overrideOn_featureFlagOn_returnsFalseAndDoesNotUpdateProperty() {
- System.setProperty(SYSTEM_PROPERTY_OVERRIDE_KEY, OVERRIDE_OFF.setting.toString())
- setOverride(OVERRIDE_ON.setting)
-
- // Have a consistent override until reboot
- assertThat(DESKTOP_WINDOWING_MODE.isEnabled(mContext)).isFalse()
- assertThat(System.getProperty(SYSTEM_PROPERTY_OVERRIDE_KEY))
- .isEqualTo(OVERRIDE_OFF.setting.toString())
- }
-
- @Test
- @EnableFlags(FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION)
- @DisableFlags(FLAG_ENABLE_DESKTOP_WINDOWING_MODE)
- fun isEnabled_systemPropertyOn_overrideOff_featureFlagOff_returnsTrueAndDoesNotUpdateProperty() {
- System.setProperty(SYSTEM_PROPERTY_OVERRIDE_KEY, OVERRIDE_ON.setting.toString())
- setOverride(OVERRIDE_OFF.setting)
-
- // Have a consistent override until reboot
- assertThat(DESKTOP_WINDOWING_MODE.isEnabled(mContext)).isTrue()
- assertThat(System.getProperty(SYSTEM_PROPERTY_OVERRIDE_KEY))
- .isEqualTo(OVERRIDE_ON.setting.toString())
- }
-
- @Test
- @EnableFlags(FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION, FLAG_ENABLE_DESKTOP_WINDOWING_MODE)
- @Suppress("ktlint:standard:max-line-length")
- fun isEnabled_systemPropertyUnset_overrideOff_featureFlagOn_returnsTrueAndDoesNotUpdateProperty() {
- System.setProperty(SYSTEM_PROPERTY_OVERRIDE_KEY, OVERRIDE_UNSET.setting.toString())
- setOverride(OVERRIDE_OFF.setting)
-
- // Have a consistent override until reboot
- assertThat(DESKTOP_WINDOWING_MODE.isEnabled(mContext)).isTrue()
- assertThat(System.getProperty(SYSTEM_PROPERTY_OVERRIDE_KEY))
- .isEqualTo(OVERRIDE_UNSET.setting.toString())
- }
-
- @Test
@EnableFlags(
- FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION,
- FLAG_ENABLE_DESKTOP_WINDOWING_MODE,
- FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
+ FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION,
+ FLAG_ENABLE_DESKTOP_WINDOWING_MODE,
+ FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
fun isEnabled_dwFlagEnabled_overrideUnset_featureFlagOn_returnsTrue() {
setOverride(OVERRIDE_UNSET.setting)
@@ -308,9 +207,9 @@ class DesktopModeFlagsTest : ShellTestCase() {
@Test
@EnableFlags(
- FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION,
- FLAG_ENABLE_DESKTOP_WINDOWING_MODE,
- FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
+ FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION,
+ FLAG_ENABLE_DESKTOP_WINDOWING_MODE,
+ FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
fun isEnabled_dwFlagEnabled_overrideOn_featureFlagOn_returnsTrue() {
setOverride(OVERRIDE_ON.setting)
@@ -330,9 +229,9 @@ class DesktopModeFlagsTest : ShellTestCase() {
@Test
@EnableFlags(
- FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION,
- FLAG_ENABLE_DESKTOP_WINDOWING_MODE,
- FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
+ FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION,
+ FLAG_ENABLE_DESKTOP_WINDOWING_MODE,
+ FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
fun isEnabled_dwFlagEnabled_overrideOff_featureFlagOn_returnsFalse() {
setOverride(OVERRIDE_OFF.setting)
@@ -352,7 +251,7 @@ class DesktopModeFlagsTest : ShellTestCase() {
@Test
@EnableFlags(
- FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION, FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
+ FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION, FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
@DisableFlags(FLAG_ENABLE_DESKTOP_WINDOWING_MODE)
fun isEnabled_dwFlagDisabled_overrideUnset_featureFlagOn_returnsTrue() {
setOverride(OVERRIDE_UNSET.setting)
@@ -364,7 +263,7 @@ class DesktopModeFlagsTest : ShellTestCase() {
@Test
@EnableFlags(FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION)
@DisableFlags(
- FLAG_ENABLE_DESKTOP_WINDOWING_MODE, FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
+ FLAG_ENABLE_DESKTOP_WINDOWING_MODE, FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
fun isEnabled_dwFlagDisabled_overrideUnset_featureFlagOff_returnsFalse() {
setOverride(OVERRIDE_UNSET.setting)
@@ -374,7 +273,7 @@ class DesktopModeFlagsTest : ShellTestCase() {
@Test
@EnableFlags(
- FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION, FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
+ FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION, FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
@DisableFlags(FLAG_ENABLE_DESKTOP_WINDOWING_MODE)
fun isEnabled_dwFlagDisabled_overrideOn_featureFlagOn_returnsTrue() {
setOverride(OVERRIDE_ON.setting)
@@ -386,7 +285,7 @@ class DesktopModeFlagsTest : ShellTestCase() {
@Test
@EnableFlags(FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION)
@DisableFlags(
- FLAG_ENABLE_DESKTOP_WINDOWING_MODE, FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
+ FLAG_ENABLE_DESKTOP_WINDOWING_MODE, FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
fun isEnabled_dwFlagDisabled_overrideOn_featureFlagOff_returnTrue() {
setOverride(OVERRIDE_ON.setting)
@@ -396,7 +295,7 @@ class DesktopModeFlagsTest : ShellTestCase() {
@Test
@EnableFlags(
- FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION, FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
+ FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION, FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
@DisableFlags(FLAG_ENABLE_DESKTOP_WINDOWING_MODE)
fun isEnabled_dwFlagDisabled_overrideOff_featureFlagOn_returnsTrue() {
setOverride(OVERRIDE_OFF.setting)
@@ -408,7 +307,7 @@ class DesktopModeFlagsTest : ShellTestCase() {
@Test
@EnableFlags(FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION)
@DisableFlags(
- FLAG_ENABLE_DESKTOP_WINDOWING_MODE, FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
+ FLAG_ENABLE_DESKTOP_WINDOWING_MODE, FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
fun isEnabled_dwFlagDisabled_overrideOff_featureFlagOff_returnsFalse() {
setOverride(OVERRIDE_OFF.setting)
@@ -416,6 +315,19 @@ class DesktopModeFlagsTest : ShellTestCase() {
assertThat(WALLPAPER_ACTIVITY.isEnabled(mContext)).isFalse()
}
+ @Test
+ fun convertToToggleOverrideWithFallback_validInt_returnsToggleOverride() {
+ assertThat(convertToToggleOverrideWithFallback(0, OVERRIDE_UNSET)).isEqualTo(OVERRIDE_OFF)
+ assertThat(convertToToggleOverrideWithFallback(1, OVERRIDE_UNSET)).isEqualTo(OVERRIDE_ON)
+ assertThat(convertToToggleOverrideWithFallback(-1, OVERRIDE_ON)).isEqualTo(OVERRIDE_UNSET)
+ }
+
+ @Test
+ fun convertToToggleOverrideWithFallback_invalidInt_returnsFallback() {
+ assertThat(convertToToggleOverrideWithFallback(2, OVERRIDE_ON)).isEqualTo(OVERRIDE_ON)
+ assertThat(convertToToggleOverrideWithFallback(-2, OVERRIDE_UNSET)).isEqualTo(OVERRIDE_UNSET)
+ }
+
private fun setOverride(setting: Int?) {
val contentResolver = mContext.contentResolver
val key = Settings.Global.DEVELOPMENT_OVERRIDE_DESKTOP_MODE_FEATURES
@@ -431,12 +343,5 @@ class DesktopModeFlagsTest : ShellTestCase() {
DesktopModeFlags::class.java.getDeclaredField("cachedToggleOverride")
cachedToggleOverride.isAccessible = true
cachedToggleOverride.set(null, null)
-
- // Clear override cache stored in System property
- System.clearProperty(SYSTEM_PROPERTY_OVERRIDE_KEY)
- }
-
- private companion object {
- const val SYSTEM_PROPERTY_OVERRIDE_KEY = "sys.wmshell.desktopmode.dev_toggle_override"
}
}
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/splitscreen/SplitScreenControllerTests.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/splitscreen/SplitScreenControllerTests.java
index 3c387f0d7c34..1c5d5e963156 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/splitscreen/SplitScreenControllerTests.java
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/splitscreen/SplitScreenControllerTests.java
@@ -36,6 +36,7 @@ import static org.mockito.ArgumentMatchers.isA;
import static org.mockito.ArgumentMatchers.isNull;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.times;
@@ -49,6 +50,9 @@ import android.content.ComponentName;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
+import android.os.Handler;
+import android.window.IWindowContainerToken;
+import android.window.WindowContainerToken;
import androidx.test.annotation.UiThreadTest;
import androidx.test.ext.junit.runners.AndroidJUnit4;
@@ -100,6 +104,7 @@ public class SplitScreenControllerTests extends ShellTestCase {
@Mock SyncTransactionQueue mSyncQueue;
@Mock RootTaskDisplayAreaOrganizer mRootTDAOrganizer;
@Mock ShellExecutor mMainExecutor;
+ @Mock Handler mMainHandler;
@Mock DisplayController mDisplayController;
@Mock DisplayImeController mDisplayImeController;
@Mock DisplayInsetsController mDisplayInsetsController;
@@ -130,7 +135,7 @@ public class SplitScreenControllerTests extends ShellTestCase {
mDisplayInsetsController, mDragAndDropController, mTransitions, mTransactionPool,
mIconProvider, Optional.of(mRecentTasks), mLaunchAdjacentController,
Optional.of(mWindowDecorViewModel), Optional.of(mDesktopTasksController),
- mStageCoordinator, mMultiInstanceHelper, mMainExecutor));
+ mStageCoordinator, mMultiInstanceHelper, mMainExecutor, mMainHandler));
}
@Test
@@ -195,10 +200,10 @@ public class SplitScreenControllerTests extends ShellTestCase {
PendingIntent.getActivity(mContext, 0, startIntent, FLAG_IMMUTABLE);
mSplitScreenController.startIntent(pendingIntent, mContext.getUserId(), null,
- SPLIT_POSITION_TOP_OR_LEFT, null);
+ SPLIT_POSITION_TOP_OR_LEFT, null /* options */, null /* hideTaskToken */);
verify(mStageCoordinator).startIntent(eq(pendingIntent), mIntentCaptor.capture(),
- eq(SPLIT_POSITION_TOP_OR_LEFT), isNull());
+ eq(SPLIT_POSITION_TOP_OR_LEFT), isNull(), isNull());
assertEquals(FLAG_ACTIVITY_NO_USER_ACTION,
mIntentCaptor.getValue().getFlags() & FLAG_ACTIVITY_NO_USER_ACTION);
}
@@ -213,19 +218,20 @@ public class SplitScreenControllerTests extends ShellTestCase {
ActivityManager.RunningTaskInfo topRunningTask =
createTaskInfo(WINDOWING_MODE_FULLSCREEN, ACTIVITY_TYPE_STANDARD, startIntent);
doReturn(topRunningTask).when(mRecentTasks).getTopRunningTask();
+ doReturn(topRunningTask).when(mRecentTasks).getTopRunningTask(any());
mSplitScreenController.startIntent(pendingIntent, mContext.getUserId(), null,
- SPLIT_POSITION_TOP_OR_LEFT, null);
+ SPLIT_POSITION_TOP_OR_LEFT, null /* options */, null /* hideTaskToken */);
verify(mStageCoordinator).startIntent(eq(pendingIntent), mIntentCaptor.capture(),
- eq(SPLIT_POSITION_TOP_OR_LEFT), isNull());
+ eq(SPLIT_POSITION_TOP_OR_LEFT), isNull(), isNull());
assertEquals(FLAG_ACTIVITY_MULTIPLE_TASK,
mIntentCaptor.getValue().getFlags() & FLAG_ACTIVITY_MULTIPLE_TASK);
}
@Test
public void startIntent_multiInstancesNotSupported_startTaskInBackgroundBeforeSplitActivated() {
- doNothing().when(mSplitScreenController).startTask(anyInt(), anyInt(), any());
+ doNothing().when(mSplitScreenController).startTask(anyInt(), anyInt(), any(), any());
Intent startIntent = createStartIntent("startActivity");
PendingIntent pendingIntent =
PendingIntent.getActivity(mContext, 0, startIntent, FLAG_IMMUTABLE);
@@ -233,15 +239,16 @@ public class SplitScreenControllerTests extends ShellTestCase {
ActivityManager.RunningTaskInfo topRunningTask =
createTaskInfo(WINDOWING_MODE_FULLSCREEN, ACTIVITY_TYPE_STANDARD, startIntent);
doReturn(topRunningTask).when(mRecentTasks).getTopRunningTask();
+ doReturn(topRunningTask).when(mRecentTasks).getTopRunningTask(any());
// Put the same component into a task in the background
ActivityManager.RecentTaskInfo sameTaskInfo = new ActivityManager.RecentTaskInfo();
- doReturn(sameTaskInfo).when(mRecentTasks).findTaskInBackground(any(), anyInt());
+ doReturn(sameTaskInfo).when(mRecentTasks).findTaskInBackground(any(), anyInt(), any());
mSplitScreenController.startIntent(pendingIntent, mContext.getUserId(), null,
- SPLIT_POSITION_TOP_OR_LEFT, null);
+ SPLIT_POSITION_TOP_OR_LEFT, null /* options */, null /* hideTaskToken */);
verify(mStageCoordinator).startTask(anyInt(), eq(SPLIT_POSITION_TOP_OR_LEFT),
- isNull());
+ isNull(), isNull());
verify(mMultiInstanceHelper, never()).supportsMultiInstanceSplit(any());
verify(mStageCoordinator, never()).switchSplitPosition(any());
}
@@ -249,7 +256,7 @@ public class SplitScreenControllerTests extends ShellTestCase {
@Test
public void startIntent_multiInstancesSupported_startTaskInBackgroundAfterSplitActivated() {
doReturn(true).when(mMultiInstanceHelper).supportsMultiInstanceSplit(any());
- doNothing().when(mSplitScreenController).startTask(anyInt(), anyInt(), any());
+ doNothing().when(mSplitScreenController).startTask(anyInt(), anyInt(), any(), any());
Intent startIntent = createStartIntent("startActivity");
PendingIntent pendingIntent =
PendingIntent.getActivity(mContext, 0, startIntent, FLAG_IMMUTABLE);
@@ -261,13 +268,13 @@ public class SplitScreenControllerTests extends ShellTestCase {
SPLIT_POSITION_BOTTOM_OR_RIGHT);
// Put the same component into a task in the background
doReturn(new ActivityManager.RecentTaskInfo()).when(mRecentTasks)
- .findTaskInBackground(any(), anyInt());
+ .findTaskInBackground(any(), anyInt(), any());
mSplitScreenController.startIntent(pendingIntent, mContext.getUserId(), null,
- SPLIT_POSITION_TOP_OR_LEFT, null);
+ SPLIT_POSITION_TOP_OR_LEFT, null /* options */, null /* hideTaskToken */);
verify(mMultiInstanceHelper, never()).supportsMultiInstanceSplit(any());
verify(mStageCoordinator).startTask(anyInt(), eq(SPLIT_POSITION_TOP_OR_LEFT),
- isNull());
+ isNull(), isNull());
}
@Test
@@ -284,7 +291,7 @@ public class SplitScreenControllerTests extends ShellTestCase {
SPLIT_POSITION_BOTTOM_OR_RIGHT);
mSplitScreenController.startIntent(pendingIntent, mContext.getUserId(), null,
- SPLIT_POSITION_TOP_OR_LEFT, null);
+ SPLIT_POSITION_TOP_OR_LEFT, null /* options */, null /* hideTaskToken */);
verify(mStageCoordinator).switchSplitPosition(anyString());
}
@@ -312,6 +319,7 @@ public class SplitScreenControllerTests extends ShellTestCase {
info.supportsMultiWindow = true;
info.baseIntent = strIntent;
info.baseActivity = strIntent.getComponent();
+ info.token = new WindowContainerToken(mock(IWindowContainerToken.class));
ActivityInfo activityInfo = new ActivityInfo();
activityInfo.packageName = info.baseActivity.getPackageName();
activityInfo.name = info.baseActivity.getClassName();
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/splitscreen/SplitTestUtils.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/splitscreen/SplitTestUtils.java
index a3009a55198f..29d3fb4cc04e 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/splitscreen/SplitTestUtils.java
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/splitscreen/SplitTestUtils.java
@@ -22,6 +22,7 @@ import static org.mockito.Mockito.mock;
import android.app.ActivityManager;
import android.content.Context;
import android.graphics.Rect;
+import android.os.Handler;
import android.view.SurfaceControl;
import android.view.SurfaceSession;
@@ -77,13 +78,13 @@ public class SplitTestUtils {
DisplayController displayController, DisplayImeController imeController,
DisplayInsetsController insetsController, SplitLayout splitLayout,
Transitions transitions, TransactionPool transactionPool,
- ShellExecutor mainExecutor,
+ ShellExecutor mainExecutor, Handler mainHandler,
Optional<RecentTasksController> recentTasks,
LaunchAdjacentController launchAdjacentController,
Optional<WindowDecorViewModel> windowDecorViewModel) {
super(context, displayId, syncQueue, taskOrganizer, mainStage,
sideStage, displayController, imeController, insetsController, splitLayout,
- transitions, transactionPool, mainExecutor, recentTasks,
+ transitions, transactionPool, mainExecutor, mainHandler, recentTasks,
launchAdjacentController, windowDecorViewModel);
// Prepare root task for testing.
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/splitscreen/SplitTransitionTests.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/splitscreen/SplitTransitionTests.java
index 34b2eebb15a1..22b408cda0af 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/splitscreen/SplitTransitionTests.java
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/splitscreen/SplitTransitionTests.java
@@ -49,9 +49,12 @@ import static org.mockito.Mockito.verify;
import android.annotation.NonNull;
import android.app.ActivityManager;
+import android.os.Handler;
import android.os.IBinder;
+import android.os.RemoteException;
import android.view.SurfaceControl;
import android.view.SurfaceSession;
+import android.window.IRemoteTransition;
import android.window.RemoteTransition;
import android.window.TransitionInfo;
import android.window.TransitionRequestInfo;
@@ -107,6 +110,7 @@ public class SplitTransitionTests extends ShellTestCase {
@Mock private IconProvider mIconProvider;
@Mock private WindowDecorViewModel mWindowDecorViewModel;
@Mock private ShellExecutor mMainExecutor;
+ @Mock private Handler mMainHandler;
@Mock private LaunchAdjacentController mLaunchAdjacentController;
@Mock private DefaultMixedHandler mMixedHandler;
@Mock private SplitScreen.SplitInvocationListener mInvocationListener;
@@ -140,7 +144,7 @@ public class SplitTransitionTests extends ShellTestCase {
mStageCoordinator = new SplitTestUtils.TestStageCoordinator(mContext, DEFAULT_DISPLAY,
mSyncQueue, mTaskOrganizer, mMainStage, mSideStage, mDisplayController,
mDisplayImeController, mDisplayInsetsController, mSplitLayout, mTransitions,
- mTransactionPool, mMainExecutor, Optional.empty(),
+ mTransactionPool, mMainExecutor, mMainHandler, Optional.empty(),
mLaunchAdjacentController, Optional.empty());
mStageCoordinator.setMixedHandler(mMixedHandler);
mSplitScreenTransitions = mStageCoordinator.getSplitTransitions();
@@ -326,6 +330,32 @@ public class SplitTransitionTests extends ShellTestCase {
@Test
@UiThreadTest
+ public void testRemotePassThroughInvoked() throws RemoteException {
+ RemoteTransition remoteWrapper = mock(RemoteTransition.class);
+ IRemoteTransition remoteTransition = mock(IRemoteTransition.class);
+ IBinder remoteBinder = mock(IBinder.class);
+ doReturn(remoteBinder).when(remoteTransition).asBinder();
+ doReturn(remoteTransition).when(remoteWrapper).getRemoteTransition();
+
+ TransitionRequestInfo request = new TransitionRequestInfo(TRANSIT_CHANGE, null,
+ remoteWrapper);
+ IBinder transition = mock(IBinder.class);
+ mMainStage.activate(new WindowContainerTransaction(), false);
+ mStageCoordinator.handleRequest(transition, request);
+ TransitionInfo info = new TransitionInfoBuilder(TRANSIT_CHANGE, 0)
+ .build();
+ boolean accepted = mStageCoordinator.startAnimation(transition, info,
+ mock(SurfaceControl.Transaction.class),
+ mock(SurfaceControl.Transaction.class),
+ mock(Transitions.TransitionFinishCallback.class));
+ assertTrue(accepted);
+
+ verify(remoteTransition, times(1)).startAnimation(any(),
+ any(), any(), any());
+ }
+
+ @Test
+ @UiThreadTest
public void testEnterRecentsAndRestore() {
enterSplit();
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/splitscreen/StageCoordinatorTests.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/splitscreen/StageCoordinatorTests.java
index d18fec2f24ad..eaef704b7d78 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/splitscreen/StageCoordinatorTests.java
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/splitscreen/StageCoordinatorTests.java
@@ -138,7 +138,8 @@ public class StageCoordinatorTests extends ShellTestCase {
mStageCoordinator = spy(new StageCoordinator(mContext, DEFAULT_DISPLAY, mSyncQueue,
mTaskOrganizer, mMainStage, mSideStage, mDisplayController, mDisplayImeController,
mDisplayInsetsController, mSplitLayout, mTransitions, mTransactionPool,
- mMainExecutor, Optional.empty(), mLaunchAdjacentController, Optional.empty()));
+ mMainExecutor, mMainHandler, Optional.empty(), mLaunchAdjacentController,
+ Optional.empty()));
mDividerLeash = new SurfaceControl.Builder(mSurfaceSession).setName("fakeDivider").build();
when(mSplitLayout.getBounds1()).thenReturn(mBounds1);
@@ -347,8 +348,7 @@ public class StageCoordinatorTests extends ShellTestCase {
assertThat(options.getLaunchRootTask()).isEqualTo(mMainStage.mRootTaskInfo.token);
assertThat(options.getPendingIntentBackgroundActivityStartMode())
- .isEqualTo(ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED);
- assertThat(options.isPendingIntentBackgroundActivityLaunchAllowedByPermission()).isTrue();
+ .isEqualTo(ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS);
}
@Test
@@ -359,10 +359,11 @@ public class StageCoordinatorTests extends ShellTestCase {
mMainStage.mRootTaskInfo = new TestRunningTaskInfoBuilder().setVisible(true).build();
when(mStageCoordinator.isSplitActive()).thenReturn(true);
when(mStageCoordinator.isSplitScreenVisible()).thenReturn(true);
+ when(mStageCoordinator.willSleepOnFold()).thenReturn(true);
mStageCoordinator.onFoldedStateChanged(true);
- assertEquals(mStageCoordinator.mTopStageAfterFoldDismiss, STAGE_TYPE_MAIN);
+ assertEquals(mStageCoordinator.mLastActiveStage, STAGE_TYPE_MAIN);
mStageCoordinator.onFinishedWakingUp();
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/transition/DefaultTransitionHandlerTest.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/transition/DefaultTransitionHandlerTest.java
index 754a173ff069..6bc7e499159c 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/transition/DefaultTransitionHandlerTest.java
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/transition/DefaultTransitionHandlerTest.java
@@ -17,6 +17,7 @@
package com.android.wm.shell.transition;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD;
+import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM;
import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
import static android.view.WindowManager.TRANSIT_OPEN;
import static android.view.WindowManager.TRANSIT_SLEEP;
@@ -185,6 +186,73 @@ public class DefaultTransitionHandlerTest extends ShellTestCase {
verify(startT, never()).setColor(any(), any());
}
+ @Test
+ public void startAnimation_freeformOpenChange_doesntReparentTask() {
+ final TransitionInfo.Change openChange = new ChangeBuilder(TRANSIT_OPEN)
+ .setTask(createTaskInfo(
+ /* taskId= */ 1, /* windowingMode= */ WINDOWING_MODE_FULLSCREEN))
+ .build();
+ final TransitionInfo info = new TransitionInfoBuilder(TRANSIT_OPEN)
+ .addChange(openChange)
+ .build();
+ final IBinder token = new Binder();
+ final SurfaceControl.Transaction startT = MockTransactionPool.create();
+ final SurfaceControl.Transaction finishT = MockTransactionPool.create();
+
+ mTransitionHandler.startAnimation(token, info, startT, finishT,
+ mock(Transitions.TransitionFinishCallback.class));
+
+ verify(startT, never()).reparent(any(), any());
+ }
+
+ @Test
+ public void startAnimation_freeformMinimizeChange_underFullscreenChange_doesntReparentTask() {
+ final TransitionInfo.Change openChange = new ChangeBuilder(TRANSIT_OPEN)
+ .setTask(createTaskInfo(
+ /* taskId= */ 1, /* windowingMode= */ WINDOWING_MODE_FULLSCREEN))
+ .build();
+ final TransitionInfo.Change toBackChange = new ChangeBuilder(TRANSIT_TO_BACK)
+ .setTask(createTaskInfo(
+ /* taskId= */ 2, /* windowingMode= */ WINDOWING_MODE_FREEFORM))
+ .build();
+ final TransitionInfo info = new TransitionInfoBuilder(TRANSIT_OPEN)
+ .addChange(openChange)
+ .addChange(toBackChange)
+ .build();
+ final IBinder token = new Binder();
+ final SurfaceControl.Transaction startT = MockTransactionPool.create();
+ final SurfaceControl.Transaction finishT = MockTransactionPool.create();
+
+ mTransitionHandler.startAnimation(token, info, startT, finishT,
+ mock(Transitions.TransitionFinishCallback.class));
+
+ verify(startT, never()).reparent(any(), any());
+ }
+
+ @Test
+ public void startAnimation_freeform_minimizeAnimation_reparentsTask() {
+ final TransitionInfo.Change openChange = new ChangeBuilder(TRANSIT_OPEN)
+ .setTask(createTaskInfo(
+ /* taskId= */ 1, /* windowingMode= */ WINDOWING_MODE_FREEFORM))
+ .build();
+ final TransitionInfo.Change toBackChange = new ChangeBuilder(TRANSIT_TO_BACK)
+ .setTask(createTaskInfo(
+ /* taskId= */ 2, /* windowingMode= */ WINDOWING_MODE_FREEFORM))
+ .build();
+ final TransitionInfo info = new TransitionInfoBuilder(TRANSIT_OPEN)
+ .addChange(openChange)
+ .addChange(toBackChange)
+ .build();
+ final IBinder token = new Binder();
+ final SurfaceControl.Transaction startT = MockTransactionPool.create();
+ final SurfaceControl.Transaction finishT = MockTransactionPool.create();
+
+ mTransitionHandler.startAnimation(token, info, startT, finishT,
+ mock(Transitions.TransitionFinishCallback.class));
+
+ verify(startT).reparent(any(), any());
+ }
+
private static void mergeSync(Transitions.TransitionHandler handler, IBinder token) {
handler.mergeAnimation(
new Binder(),
@@ -195,10 +263,14 @@ public class DefaultTransitionHandlerTest extends ShellTestCase {
}
private static RunningTaskInfo createTaskInfo(int taskId) {
+ return createTaskInfo(taskId, WINDOWING_MODE_FULLSCREEN);
+ }
+
+ private static RunningTaskInfo createTaskInfo(int taskId, int windowingMode) {
RunningTaskInfo taskInfo = new RunningTaskInfo();
taskInfo.taskId = taskId;
taskInfo.topActivityType = ACTIVITY_TYPE_STANDARD;
- taskInfo.configuration.windowConfiguration.setWindowingMode(WINDOWING_MODE_FULLSCREEN);
+ taskInfo.configuration.windowConfiguration.setWindowingMode(windowingMode);
taskInfo.configuration.windowConfiguration.setActivityType(taskInfo.topActivityType);
taskInfo.token = mock(WindowContainerToken.class);
return taskInfo;
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/transition/TransitionAnimationHelperTest.kt b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/transition/TransitionAnimationHelperTest.kt
new file mode 100644
index 000000000000..bad14bbdb141
--- /dev/null
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/transition/TransitionAnimationHelperTest.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.wm.shell.transition
+
+import android.app.ActivityManager.RunningTaskInfo
+import android.app.WindowConfiguration
+import android.view.WindowManager
+import android.window.TransitionInfo
+import android.window.TransitionInfo.FLAG_TRANSLUCENT
+import com.android.internal.R
+import com.android.internal.policy.TransitionAnimation
+import com.android.wm.shell.ShellTestCase
+import com.android.wm.shell.TestRunningTaskInfoBuilder
+import org.junit.Test
+import org.mockito.ArgumentMatchers.anyBoolean
+import org.mockito.ArgumentMatchers.eq
+import org.mockito.Mock
+import org.mockito.Mockito.verify
+
+class TransitionAnimationHelperTest : ShellTestCase() {
+
+ @Mock
+ lateinit var transitionAnimation: TransitionAnimation
+
+ @Test
+ fun loadAttributeAnimation_freeform_taskOpen_taskToBackChange_returnsMinimizeAnim() {
+ val openChange = ChangeBuilder(WindowManager.TRANSIT_OPEN)
+ .setTask(createTaskInfo(WindowConfiguration.WINDOWING_MODE_FREEFORM))
+ .build()
+ val toBackChange = ChangeBuilder(WindowManager.TRANSIT_TO_BACK)
+ .setTask(createTaskInfo(WindowConfiguration.WINDOWING_MODE_FREEFORM))
+ .build()
+ val info = TransitionInfoBuilder(WindowManager.TRANSIT_OPEN)
+ .addChange(openChange)
+ .addChange(toBackChange)
+ .build()
+
+ loadAttributeAnimation(WindowManager.TRANSIT_OPEN, info, toBackChange)
+
+ verify(transitionAnimation).loadDefaultAnimationAttr(
+ eq(R.styleable.WindowAnimation_activityCloseExitAnimation), anyBoolean())
+ }
+
+ @Test
+ fun loadAttributeAnimation_freeform_taskToFront_taskToFrontChange_returnsUnminimizeAnim() {
+ val toFrontChange = ChangeBuilder(WindowManager.TRANSIT_TO_FRONT)
+ .setTask(createTaskInfo(WindowConfiguration.WINDOWING_MODE_FREEFORM))
+ .build()
+ val info = TransitionInfoBuilder(WindowManager.TRANSIT_TO_FRONT)
+ .addChange(toFrontChange)
+ .build()
+
+ loadAttributeAnimation(WindowManager.TRANSIT_TO_FRONT, info, toFrontChange)
+
+ verify(transitionAnimation).loadDefaultAnimationAttr(
+ eq(R.styleable.WindowAnimation_activityOpenEnterAnimation),
+ /* translucent= */ anyBoolean())
+ }
+
+ @Test
+ fun loadAttributeAnimation_fullscreen_taskOpen_returnsTaskOpenEnterAnim() {
+ val openChange = ChangeBuilder(WindowManager.TRANSIT_OPEN)
+ .setTask(createTaskInfo(WindowConfiguration.WINDOWING_MODE_FULLSCREEN))
+ .build()
+ val info = TransitionInfoBuilder(WindowManager.TRANSIT_OPEN).addChange(openChange).build()
+
+ loadAttributeAnimation(WindowManager.TRANSIT_OPEN, info, openChange)
+
+ verify(transitionAnimation).loadDefaultAnimationAttr(
+ eq(R.styleable.WindowAnimation_taskOpenEnterAnimation),
+ /* translucent= */ anyBoolean())
+ }
+
+ @Test
+ fun loadAttributeAnimation_freeform_taskOpen_taskToBackChange_passesTranslucent() {
+ val openChange = ChangeBuilder(WindowManager.TRANSIT_OPEN)
+ .setTask(createTaskInfo(WindowConfiguration.WINDOWING_MODE_FREEFORM))
+ .build()
+ val toBackChange = ChangeBuilder(WindowManager.TRANSIT_TO_BACK)
+ .setTask(createTaskInfo(WindowConfiguration.WINDOWING_MODE_FREEFORM))
+ .setFlags(FLAG_TRANSLUCENT)
+ .build()
+ val info = TransitionInfoBuilder(WindowManager.TRANSIT_OPEN)
+ .addChange(openChange)
+ .addChange(toBackChange)
+ .build()
+
+ loadAttributeAnimation(WindowManager.TRANSIT_OPEN, info, toBackChange)
+
+ verify(transitionAnimation).loadDefaultAnimationAttr(
+ eq(R.styleable.WindowAnimation_activityCloseExitAnimation),
+ /* translucent= */ eq(true))
+ }
+
+ private fun loadAttributeAnimation(
+ @WindowManager.TransitionType type: Int,
+ info: TransitionInfo,
+ change: TransitionInfo.Change,
+ wallpaperTransit: Int = TransitionAnimation.WALLPAPER_TRANSITION_NONE,
+ isDreamTransition: Boolean = false,
+ ) {
+ TransitionAnimationHelper.loadAttributeAnimation(
+ type, info, change, wallpaperTransit, transitionAnimation, isDreamTransition)
+ }
+
+ private fun createTaskInfo(windowingMode: Int): RunningTaskInfo {
+ val taskInfo = TestRunningTaskInfoBuilder()
+ .setWindowingMode(windowingMode)
+ .build()
+ return taskInfo
+ }
+} \ No newline at end of file
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/CaptionWindowDecorationTests.kt b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/CaptionWindowDecorationTests.kt
new file mode 100644
index 000000000000..261d4b5e7d1a
--- /dev/null
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/CaptionWindowDecorationTests.kt
@@ -0,0 +1,107 @@
+/*
+ * 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.windowdecor
+
+import android.app.ActivityManager
+import android.app.WindowConfiguration
+import android.content.ComponentName
+import android.testing.AndroidTestingRunner
+import android.view.Display
+import android.view.WindowInsetsController
+import androidx.test.filters.SmallTest
+import com.android.wm.shell.ShellTestCase
+import com.android.wm.shell.TestRunningTaskInfoBuilder
+import com.google.common.truth.Truth
+import org.junit.Test
+import org.junit.runner.RunWith
+
+@SmallTest
+@RunWith(AndroidTestingRunner::class)
+class CaptionWindowDecorationTests : ShellTestCase() {
+ @Test
+ fun updateRelayoutParams_freeformAndTransparentAppearance_allowsInputFallthrough() {
+ val taskInfo = createTaskInfo()
+ taskInfo.configuration.windowConfiguration.windowingMode =
+ WindowConfiguration.WINDOWING_MODE_FREEFORM
+ taskInfo.taskDescription!!.topOpaqueSystemBarsAppearance =
+ WindowInsetsController.APPEARANCE_TRANSPARENT_CAPTION_BAR_BACKGROUND
+ val relayoutParams = WindowDecoration.RelayoutParams()
+
+ CaptionWindowDecoration.updateRelayoutParams(
+ relayoutParams,
+ taskInfo,
+ true,
+ false
+ )
+
+ Truth.assertThat(relayoutParams.hasInputFeatureSpy()).isTrue()
+ }
+
+ @Test
+ fun updateRelayoutParams_freeformButOpaqueAppearance_disallowsInputFallthrough() {
+ val taskInfo = createTaskInfo()
+ taskInfo.configuration.windowConfiguration.windowingMode =
+ WindowConfiguration.WINDOWING_MODE_FREEFORM
+ taskInfo.taskDescription!!.topOpaqueSystemBarsAppearance = 0
+ val relayoutParams = WindowDecoration.RelayoutParams()
+
+ CaptionWindowDecoration.updateRelayoutParams(
+ relayoutParams,
+ taskInfo,
+ true,
+ false
+ )
+
+ Truth.assertThat(relayoutParams.hasInputFeatureSpy()).isFalse()
+ }
+
+ @Test
+ fun updateRelayoutParams_addOccludingCaptionElementCorrectly() {
+ val taskInfo = createTaskInfo()
+ val relayoutParams = WindowDecoration.RelayoutParams()
+ CaptionWindowDecoration.updateRelayoutParams(
+ relayoutParams,
+ taskInfo,
+ true,
+ false
+ )
+ Truth.assertThat(relayoutParams.mOccludingCaptionElements.size).isEqualTo(2)
+ Truth.assertThat(relayoutParams.mOccludingCaptionElements[0].mAlignment).isEqualTo(
+ WindowDecoration.RelayoutParams.OccludingCaptionElement.Alignment.START)
+ Truth.assertThat(relayoutParams.mOccludingCaptionElements[1].mAlignment).isEqualTo(
+ WindowDecoration.RelayoutParams.OccludingCaptionElement.Alignment.END)
+ }
+
+ private fun createTaskInfo(): ActivityManager.RunningTaskInfo {
+ val taskDescriptionBuilder =
+ ActivityManager.TaskDescription.Builder()
+ val taskInfo = TestRunningTaskInfoBuilder()
+ .setDisplayId(Display.DEFAULT_DISPLAY)
+ .setTaskDescriptionBuilder(taskDescriptionBuilder)
+ .setVisible(true)
+ .build()
+ taskInfo.realActivity = ComponentName(
+ "com.android.wm.shell.windowdecor",
+ "CaptionWindowDecorationTests"
+ )
+ taskInfo.baseActivity = ComponentName(
+ "com.android.wm.shell.windowdecor",
+ "CaptionWindowDecorationTests"
+ )
+ return taskInfo
+ }
+}
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 b1803e97b107..aeae0bebb697 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
@@ -30,6 +30,7 @@ import android.hardware.display.DisplayManager
import android.hardware.display.VirtualDisplay
import android.hardware.input.InputManager
import android.os.Handler
+import android.platform.test.annotations.DisableFlags
import android.platform.test.annotations.EnableFlags
import android.platform.test.annotations.RequiresFlagsEnabled
import android.platform.test.flag.junit.CheckFlagsRule
@@ -62,6 +63,7 @@ import com.android.wm.shell.RootTaskDisplayAreaOrganizer
import com.android.wm.shell.ShellTaskOrganizer
import com.android.wm.shell.ShellTestCase
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.DisplayInsetsController
import com.android.wm.shell.common.DisplayLayout
@@ -71,6 +73,7 @@ import com.android.wm.shell.desktopmode.DesktopTasksController
import com.android.wm.shell.desktopmode.DesktopTasksController.SnapPosition
import com.android.wm.shell.freeform.FreeformTaskTransitionStarter
import com.android.wm.shell.shared.desktopmode.DesktopModeStatus
+import com.android.wm.shell.splitscreen.SplitScreenController
import com.android.wm.shell.sysui.KeyguardChangeListener
import com.android.wm.shell.sysui.ShellCommandHandler
import com.android.wm.shell.sysui.ShellController
@@ -78,8 +81,6 @@ import com.android.wm.shell.sysui.ShellInit
import com.android.wm.shell.transition.Transitions
import com.android.wm.shell.windowdecor.DesktopModeWindowDecorViewModel.DesktopModeOnInsetsChangedListener
import com.android.wm.shell.windowdecor.common.OnTaskActionClickListener
-import java.util.Optional
-import java.util.function.Supplier
import org.junit.Assert.assertEquals
import org.junit.Before
import org.junit.Rule
@@ -99,6 +100,8 @@ import org.mockito.kotlin.eq
import org.mockito.kotlin.spy
import org.mockito.kotlin.whenever
import org.mockito.quality.Strictness
+import java.util.Optional
+import java.util.function.Supplier
/**
* Tests of [DesktopModeWindowDecorViewModel]
@@ -122,6 +125,7 @@ class DesktopModeWindowDecorViewModelTests : ShellTestCase() {
@Mock private lateinit var mockMainChoreographer: Choreographer
@Mock private lateinit var mockTaskOrganizer: ShellTaskOrganizer
@Mock private lateinit var mockDisplayController: DisplayController
+ @Mock private lateinit var mockSplitScreenController: SplitScreenController
@Mock private lateinit var mockDisplayLayout: DisplayLayout
@Mock private lateinit var displayInsetsController: DisplayInsetsController
@Mock private lateinit var mockSyncQueue: SyncTransactionQueue
@@ -136,6 +140,7 @@ class DesktopModeWindowDecorViewModelTests : ShellTestCase() {
@Mock private lateinit var mockShellCommandHandler: ShellCommandHandler
@Mock private lateinit var mockWindowManager: IWindowManager
@Mock private lateinit var mockInteractionJankMonitor: InteractionJankMonitor
+ private val bgExecutor = TestShellExecutor()
private val transactionFactory = Supplier<SurfaceControl.Transaction> {
SurfaceControl.Transaction()
@@ -155,6 +160,7 @@ class DesktopModeWindowDecorViewModelTests : ShellTestCase() {
mockShellExecutor,
mockMainHandler,
mockMainChoreographer,
+ bgExecutor,
shellInit,
mockShellCommandHandler,
mockWindowManager,
@@ -171,7 +177,7 @@ class DesktopModeWindowDecorViewModelTests : ShellTestCase() {
mockRootTaskDisplayAreaOrganizer,
windowDecorByTaskIdSpy, mockInteractionJankMonitor
)
-
+ desktopModeWindowDecorViewModel.setSplitScreenController(mockSplitScreenController)
whenever(mockDisplayController.getDisplayLayout(any())).thenReturn(mockDisplayLayout)
whenever(mockDisplayLayout.stableInsets()).thenReturn(STABLE_INSETS)
whenever(mockInputMonitorFactory.create(any(), any())).thenReturn(mockInputMonitor)
@@ -204,10 +210,12 @@ class DesktopModeWindowDecorViewModelTests : ShellTestCase() {
verify(mockDesktopModeWindowDecorFactory).create(
mContext,
mockDisplayController,
+ mockSplitScreenController,
mockTaskOrganizer,
task,
taskSurface,
mockMainHandler,
+ bgExecutor,
mockMainChoreographer,
mockSyncQueue,
mockRootTaskDisplayAreaOrganizer
@@ -228,10 +236,12 @@ class DesktopModeWindowDecorViewModelTests : ShellTestCase() {
verify(mockDesktopModeWindowDecorFactory, never()).create(
mContext,
mockDisplayController,
+ mockSplitScreenController,
mockTaskOrganizer,
task,
taskSurface,
mockMainHandler,
+ bgExecutor,
mockMainChoreographer,
mockSyncQueue,
mockRootTaskDisplayAreaOrganizer
@@ -243,10 +253,12 @@ class DesktopModeWindowDecorViewModelTests : ShellTestCase() {
verify(mockDesktopModeWindowDecorFactory, times(1)).create(
mContext,
mockDisplayController,
+ mockSplitScreenController,
mockTaskOrganizer,
task,
taskSurface,
mockMainHandler,
+ bgExecutor,
mockMainChoreographer,
mockSyncQueue,
mockRootTaskDisplayAreaOrganizer
@@ -254,6 +266,7 @@ class DesktopModeWindowDecorViewModelTests : ShellTestCase() {
}
@Test
+ @DisableFlags(Flags.FLAG_ENABLE_ADDITIONAL_WINDOWS_ABOVE_STATUS_BAR)
fun testCreateAndDisposeEventReceiver() {
val task = createTask(windowingMode = WINDOWING_MODE_FREEFORM)
setUpMockDecorationForTask(task)
@@ -266,6 +279,7 @@ class DesktopModeWindowDecorViewModelTests : ShellTestCase() {
}
@Test
+ @DisableFlags(Flags.FLAG_ENABLE_ADDITIONAL_WINDOWS_ABOVE_STATUS_BAR)
fun testEventReceiversOnMultipleDisplays() {
val secondaryDisplay = createVirtualDisplay() ?: return
val secondaryDisplayId = secondaryDisplay.display.displayId
@@ -344,7 +358,8 @@ class DesktopModeWindowDecorViewModelTests : ShellTestCase() {
onTaskChanging(task)
verify(mockDesktopModeWindowDecorFactory, never())
- .create(any(), any(), any(), eq(task), any(), any(), any(), any(), any())
+ .create(any(), any(), any(), any(), eq(task), any(), any(), any(), any(), any(),
+ any())
}
@Test
@@ -365,7 +380,8 @@ class DesktopModeWindowDecorViewModelTests : ShellTestCase() {
onTaskOpening(task)
verify(mockDesktopModeWindowDecorFactory)
- .create(any(), any(), any(), eq(task), any(), any(), any(), any(), any())
+ .create(any(), any(), any(), any(), eq(task), any(), any(), any(), any(),
+ any(), any())
} finally {
mockitoSession.finishMocking()
}
@@ -382,7 +398,8 @@ class DesktopModeWindowDecorViewModelTests : ShellTestCase() {
onTaskOpening(task)
verify(mockDesktopModeWindowDecorFactory, never())
- .create(any(), any(), any(), eq(task), any(), any(), any(), any(), any())
+ .create(any(), any(), any(), any(), eq(task), any(), any(), any(), any(), any(),
+ any())
}
@Test
@@ -399,7 +416,8 @@ class DesktopModeWindowDecorViewModelTests : ShellTestCase() {
onTaskOpening(task)
verify(mockDesktopModeWindowDecorFactory, never())
- .create(any(), any(), any(), eq(task), any(), any(), any(), any(), any())
+ .create(any(), any(), any(), any(), eq(task), any(), any(), any(), any(),
+ any(), any())
}
@Test
@@ -496,7 +514,8 @@ class DesktopModeWindowDecorViewModelTests : ShellTestCase() {
onTaskOpening(task)
verify(mockDesktopModeWindowDecorFactory, never())
- .create(any(), any(), any(), eq(task), any(), any(), any(), any(), any())
+ .create(any(), any(), any(), any(), eq(task), any(), any(), any(), any(), any(),
+ any())
} finally {
mockitoSession.finishMocking()
}
@@ -520,7 +539,8 @@ class DesktopModeWindowDecorViewModelTests : ShellTestCase() {
onTaskOpening(task)
verify(mockDesktopModeWindowDecorFactory)
- .create(any(), any(), any(), eq(task), any(), any(), any(), any(), any())
+ .create(any(), any(), any(), any(), eq(task), any(), any(), any(), any(), any(),
+ any())
} finally {
mockitoSession.finishMocking()
}
@@ -543,7 +563,8 @@ class DesktopModeWindowDecorViewModelTests : ShellTestCase() {
onTaskOpening(task)
verify(mockDesktopModeWindowDecorFactory)
- .create(any(), any(), any(), eq(task), any(), any(), any(), any(), any())
+ .create(any(), any(), any(), any(), eq(task), any(), any(), any(), any(), any(),
+ any())
} finally {
mockitoSession.finishMocking()
}
@@ -682,7 +703,7 @@ class DesktopModeWindowDecorViewModelTests : ShellTestCase() {
val decoration = mock(DesktopModeWindowDecoration::class.java)
whenever(
mockDesktopModeWindowDecorFactory.create(
- any(), any(), any(), eq(task), any(), any(), any(), any(), any())
+ any(), any(), any(), any(), eq(task), any(), any(), any(), any(), any(), any())
).thenReturn(decoration)
decoration.mTaskInfo = task
whenever(decoration.isFocused).thenReturn(task.isFocused)
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorationTests.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorationTests.java
index b355137a9077..412fef30d4fb 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorationTests.java
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorationTests.java
@@ -31,6 +31,7 @@ import static com.google.common.truth.Truth.assertThat;
import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertTrue;
+import static org.mockito.ArgumentMatchers.anyLong;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.any;
import static org.mockito.Mockito.anyInt;
@@ -50,6 +51,7 @@ import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.PointF;
+import android.net.Uri;
import android.os.Handler;
import android.os.SystemProperties;
import android.platform.test.annotations.DisableFlags;
@@ -80,9 +82,12 @@ import com.android.wm.shell.RootTaskDisplayAreaOrganizer;
import com.android.wm.shell.ShellTaskOrganizer;
import com.android.wm.shell.ShellTestCase;
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.ShellExecutor;
import com.android.wm.shell.common.SyncTransactionQueue;
import com.android.wm.shell.shared.desktopmode.DesktopModeStatus;
+import com.android.wm.shell.splitscreen.SplitScreenController;
import com.android.wm.shell.windowdecor.WindowDecoration.RelayoutParams;
import com.android.wm.shell.windowdecor.common.OnTaskActionClickListener;
@@ -118,11 +123,15 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase {
private static final String USE_ROUNDED_CORNERS_SYSPROP_KEY =
"persist.wm.debug.desktop_use_rounded_corners";
+ private static final Uri TEST_URI = Uri.parse("www.google.com");
+
@Rule public final SetFlagsRule mSetFlagsRule = new SetFlagsRule(DEVICE_DEFAULT);
@Mock
private DisplayController mMockDisplayController;
@Mock
+ private SplitScreenController mMockSplitScreenController;
+ @Mock
private ShellTaskOrganizer mMockShellTaskOrganizer;
@Mock
private Choreographer mMockChoreographer;
@@ -150,6 +159,8 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase {
private PackageManager mMockPackageManager;
@Mock
private Handler mMockHandler;
+ @Mock
+ private DesktopModeWindowDecoration.OpenInBrowserClickListener mMockOpenInBrowserClickListener;
@Captor
private ArgumentCaptor<Function1<Boolean, Unit>> mOnMaxMenuHoverChangeListener;
@Captor
@@ -159,6 +170,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase {
private SurfaceControl.Transaction mMockTransaction;
private StaticMockitoSession mMockitoSession;
private TestableContext mTestableContext;
+ private ShellExecutor mBgExecutor = new TestShellExecutor();
/** Set up run before test class. */
@BeforeClass
@@ -386,6 +398,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase {
}
@Test
+ @DisableFlags(Flags.FLAG_ENABLE_ADDITIONAL_WINDOWS_ABOVE_STATUS_BAR)
public void relayout_fullscreenTask_appliesTransactionImmediately() {
final ActivityManager.RunningTaskInfo taskInfo = createTaskInfo(/* visible= */ true);
final DesktopModeWindowDecoration spyWindowDecor = spy(createWindowDecoration(taskInfo));
@@ -412,6 +425,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase {
}
@Test
+ @DisableFlags(Flags.FLAG_ENABLE_ADDITIONAL_WINDOWS_ABOVE_STATUS_BAR)
public void relayout_fullscreenTask_doesNotCreateViewHostImmediately() {
final ActivityManager.RunningTaskInfo taskInfo = createTaskInfo(/* visible= */ true);
final DesktopModeWindowDecoration spyWindowDecor = spy(createWindowDecoration(taskInfo));
@@ -423,6 +437,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase {
}
@Test
+ @DisableFlags(Flags.FLAG_ENABLE_ADDITIONAL_WINDOWS_ABOVE_STATUS_BAR)
public void relayout_fullscreenTask_postsViewHostCreation() {
final ActivityManager.RunningTaskInfo taskInfo = createTaskInfo(/* visible= */ true);
final DesktopModeWindowDecoration spyWindowDecor = spy(createWindowDecoration(taskInfo));
@@ -451,6 +466,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase {
}
@Test
+ @DisableFlags(Flags.FLAG_ENABLE_ADDITIONAL_WINDOWS_ABOVE_STATUS_BAR)
public void relayout_removesExistingHandlerCallback() {
final ActivityManager.RunningTaskInfo taskInfo = createTaskInfo(/* visible= */ true);
final DesktopModeWindowDecoration spyWindowDecor = spy(createWindowDecoration(taskInfo));
@@ -465,6 +481,7 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase {
}
@Test
+ @DisableFlags(Flags.FLAG_ENABLE_ADDITIONAL_WINDOWS_ABOVE_STATUS_BAR)
public void close_removesExistingHandlerCallback() {
final ActivityManager.RunningTaskInfo taskInfo = createTaskInfo(/* visible= */ true);
final DesktopModeWindowDecoration spyWindowDecor = spy(createWindowDecoration(taskInfo));
@@ -555,6 +572,65 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase {
verify(mMockHandler).removeCallbacks(any());
}
+ @Test
+ @EnableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_APP_TO_WEB)
+ public void capturedLink_postsOnCapturedLinkExpiredRunnable() {
+ final ActivityManager.RunningTaskInfo taskInfo = createTaskInfo(true /* visible */);
+ final ArgumentCaptor<Runnable> runnableArgument = ArgumentCaptor.forClass(Runnable.class);
+ final DesktopModeWindowDecoration decor = createWindowDecoration(taskInfo);
+
+ decor.relayout(taskInfo);
+ // Assert captured link is set
+ assertTrue(decor.browserLinkAvailable());
+ // Asset runnable posted to set captured link to expired
+ verify(mMockHandler).postDelayed(runnableArgument.capture(), anyLong());
+ runnableArgument.getValue().run();
+ assertFalse(decor.browserLinkAvailable());
+ }
+
+ @Test
+ @EnableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_APP_TO_WEB)
+ public void capturedLink_capturedLinkNotResetToSameLink() {
+ final ActivityManager.RunningTaskInfo taskInfo = createTaskInfo(true /* visible */);
+ final DesktopModeWindowDecoration decor = createWindowDecoration(taskInfo);
+ final ArgumentCaptor<Runnable> runnableArgument = ArgumentCaptor.forClass(Runnable.class);
+
+ // Set captured link and run on captured link expired runnable
+ decor.relayout(taskInfo);
+ verify(mMockHandler).postDelayed(runnableArgument.capture(), anyLong());
+ runnableArgument.getValue().run();
+
+ decor.relayout(taskInfo);
+ // Assert captured link not set to same value twice
+ assertFalse(decor.browserLinkAvailable());
+ }
+
+ @Test
+ @EnableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_APP_TO_WEB)
+ public void capturedLink_capturedLinkExpiresAfterClick() {
+ final ActivityManager.RunningTaskInfo taskInfo = createTaskInfo(true /* visible */);
+ final DesktopModeWindowDecoration decor = createWindowDecoration(taskInfo);
+
+ decor.relayout(taskInfo);
+ // Assert captured link is set
+ assertTrue(decor.browserLinkAvailable());
+ decor.onOpenInBrowserClick();
+ //Assert Captured link expires after button is clicked
+ assertFalse(decor.browserLinkAvailable());
+ }
+
+ @Test
+ @EnableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_APP_TO_WEB)
+ public void capturedLink_openInBrowserListenerCalledOnClick() {
+ final ActivityManager.RunningTaskInfo taskInfo = createTaskInfo(true /* visible */);
+ final DesktopModeWindowDecoration decor = createWindowDecoration(taskInfo);
+
+ decor.relayout(taskInfo);
+ decor.onOpenInBrowserClick();
+
+ verify(mMockOpenInBrowserClickListener).onClick(any(), any());
+ }
+
private void createMaximizeMenu(DesktopModeWindowDecoration decoration, MaximizeMenu menu) {
final OnTaskActionClickListener l = (taskId, tag) -> {};
decoration.setOnMaximizeOrRestoreClickListener(l);
@@ -591,15 +667,16 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase {
ActivityManager.RunningTaskInfo taskInfo,
MaximizeMenuFactory maximizeMenuFactory) {
final DesktopModeWindowDecoration windowDecor = new DesktopModeWindowDecoration(mContext,
- mMockDisplayController, mMockShellTaskOrganizer, taskInfo, mMockSurfaceControl,
- mMockHandler, mMockChoreographer, mMockSyncQueue, mMockRootTaskDisplayAreaOrganizer,
+ mMockDisplayController, mMockSplitScreenController, mMockShellTaskOrganizer,
+ taskInfo, mMockSurfaceControl, mMockHandler, mBgExecutor, mMockChoreographer,
+ mMockSyncQueue, mMockRootTaskDisplayAreaOrganizer,
SurfaceControl.Builder::new, mMockTransactionSupplier,
WindowContainerTransaction::new, SurfaceControl::new,
- mMockSurfaceControlViewHostFactory,
- maximizeMenuFactory);
+ mMockSurfaceControlViewHostFactory, maximizeMenuFactory);
windowDecor.setCaptionListeners(mMockTouchEventListener, mMockTouchEventListener,
mMockTouchEventListener, mMockTouchEventListener);
windowDecor.setExclusionRegionListener(mMockExclusionRegionListener);
+ windowDecor.setOpenInBrowserClickListener(mMockOpenInBrowserClickListener);
return windowDecor;
}
@@ -615,6 +692,8 @@ public class DesktopModeWindowDecorationTests extends ShellTestCase {
"DesktopModeWindowDecorationTests");
taskInfo.baseActivity = new ComponentName("com.android.wm.shell.windowdecor",
"DesktopModeWindowDecorationTests");
+ taskInfo.capturedLink = TEST_URI;
+ taskInfo.capturedLinkTimestamp = System.currentTimeMillis();
return taskInfo;
}
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DragDetectorTest.kt b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DragDetectorTest.kt
index 3fbab0f9e2bb..56224b4b4025 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DragDetectorTest.kt
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DragDetectorTest.kt
@@ -85,6 +85,23 @@ class DragDetectorTest {
}
@Test
+ fun testNoMove_mouse_passesDownAndUp() {
+ assertTrue(dragDetector.onMotionEvent(
+ createMotionEvent(MotionEvent.ACTION_DOWN, isTouch = false)))
+ verify(eventHandler).handleMotionEvent(any(), argThat {
+ return@argThat it.action == MotionEvent.ACTION_DOWN && it.x == X && it.y == Y &&
+ it.source == InputDevice.SOURCE_MOUSE
+ })
+
+ assertTrue(dragDetector.onMotionEvent(
+ createMotionEvent(MotionEvent.ACTION_UP, isTouch = false)))
+ verify(eventHandler).handleMotionEvent(any(), argThat {
+ return@argThat it.action == MotionEvent.ACTION_UP && it.x == X && it.y == Y &&
+ it.source == InputDevice.SOURCE_MOUSE
+ })
+ }
+
+ @Test
fun testMoveInSlop_touch_passesDownAndUp() {
`when`(eventHandler.handleMotionEvent(any(), argThat {
return@argThat it.action == MotionEvent.ACTION_DOWN
@@ -166,6 +183,52 @@ class DragDetectorTest {
}
@Test
+ fun testDownMoveDown_shouldIgnoreTheSecondDownMotion() {
+ assertTrue(dragDetector.onMotionEvent(createMotionEvent(MotionEvent.ACTION_DOWN)))
+ verify(eventHandler).handleMotionEvent(any(), argThat {
+ return@argThat it.action == MotionEvent.ACTION_DOWN && it.x == X && it.y == Y &&
+ it.source == InputDevice.SOURCE_TOUCHSCREEN
+ })
+
+ val newX = X + SLOP + 1
+ assertTrue(dragDetector.onMotionEvent(createMotionEvent(MotionEvent.ACTION_MOVE, newX, Y)))
+ verify(eventHandler).handleMotionEvent(any(), argThat {
+ return@argThat it.action == MotionEvent.ACTION_MOVE && it.x == newX && it.y == Y &&
+ it.source == InputDevice.SOURCE_TOUCHSCREEN
+ })
+
+ assertTrue(dragDetector.onMotionEvent(createMotionEvent(MotionEvent.ACTION_DOWN)))
+ verify(eventHandler).handleMotionEvent(any(), argThat {
+ return@argThat it.action == MotionEvent.ACTION_MOVE && it.x == newX && it.y == Y &&
+ it.source == InputDevice.SOURCE_TOUCHSCREEN
+ })
+ }
+
+ @Test
+ fun testDownMouseMoveDownTouch_shouldIgnoreTheTouchDownMotion() {
+ assertTrue(dragDetector.onMotionEvent(
+ createMotionEvent(MotionEvent.ACTION_DOWN, isTouch = false)))
+ verify(eventHandler).handleMotionEvent(any(), argThat {
+ return@argThat it.action == MotionEvent.ACTION_DOWN && it.x == X && it.y == Y &&
+ it.source == InputDevice.SOURCE_MOUSE
+ })
+
+ val newX = X + SLOP + 1
+ assertTrue(dragDetector.onMotionEvent(
+ createMotionEvent(MotionEvent.ACTION_MOVE, newX, Y, isTouch = false)))
+ verify(eventHandler).handleMotionEvent(any(), argThat {
+ return@argThat it.action == MotionEvent.ACTION_MOVE && it.x == newX && it.y == Y &&
+ it.source == InputDevice.SOURCE_MOUSE
+ })
+
+ assertTrue(dragDetector.onMotionEvent(createMotionEvent(MotionEvent.ACTION_DOWN)))
+ verify(eventHandler).handleMotionEvent(any(), argThat {
+ return@argThat it.action == MotionEvent.ACTION_MOVE && it.x == newX && it.y == Y &&
+ it.source == InputDevice.SOURCE_MOUSE
+ })
+ }
+
+ @Test
fun testPassesHoverEnter() {
`when`(eventHandler.handleMotionEvent(any(), argThat {
it.action == MotionEvent.ACTION_HOVER_ENTER
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DragResizeWindowGeometryTests.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DragResizeWindowGeometryTests.java
index 4dea5a75a0e8..6a94cd8aa283 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DragResizeWindowGeometryTests.java
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DragResizeWindowGeometryTests.java
@@ -55,8 +55,6 @@ public class DragResizeWindowGeometryTests {
private static final Size TASK_SIZE = new Size(500, 1000);
private static final int TASK_CORNER_RADIUS = 10;
private static final int EDGE_RESIZE_THICKNESS = 15;
- private static final int EDGE_RESIZE_DEBUG_THICKNESS = EDGE_RESIZE_THICKNESS
- + (DragResizeWindowGeometry.DEBUG ? DragResizeWindowGeometry.EDGE_DEBUG_BUFFER : 0);
private static final int FINE_CORNER_SIZE = EDGE_RESIZE_THICKNESS * 2 + 10;
private static final int LARGE_CORNER_SIZE = FINE_CORNER_SIZE + 10;
private static final DragResizeWindowGeometry GEOMETRY = new DragResizeWindowGeometry(
@@ -91,14 +89,13 @@ public class DragResizeWindowGeometryTests {
EDGE_RESIZE_THICKNESS + 10, FINE_CORNER_SIZE, LARGE_CORNER_SIZE),
new DragResizeWindowGeometry(TASK_CORNER_RADIUS, TASK_SIZE,
EDGE_RESIZE_THICKNESS + 10, FINE_CORNER_SIZE, LARGE_CORNER_SIZE))
- .addEqualityGroup(new DragResizeWindowGeometry(TASK_CORNER_RADIUS, TASK_SIZE,
- EDGE_RESIZE_THICKNESS, FINE_CORNER_SIZE, LARGE_CORNER_SIZE + 5),
+ .addEqualityGroup(
new DragResizeWindowGeometry(TASK_CORNER_RADIUS, TASK_SIZE,
- EDGE_RESIZE_THICKNESS, FINE_CORNER_SIZE, LARGE_CORNER_SIZE + 5))
- .addEqualityGroup(new DragResizeWindowGeometry(TASK_CORNER_RADIUS, TASK_SIZE,
- EDGE_RESIZE_THICKNESS, FINE_CORNER_SIZE + 4, LARGE_CORNER_SIZE),
+ EDGE_RESIZE_THICKNESS + 10, FINE_CORNER_SIZE,
+ LARGE_CORNER_SIZE + 5),
new DragResizeWindowGeometry(TASK_CORNER_RADIUS, TASK_SIZE,
- EDGE_RESIZE_THICKNESS, FINE_CORNER_SIZE + 4, LARGE_CORNER_SIZE))
+ EDGE_RESIZE_THICKNESS + 10, FINE_CORNER_SIZE,
+ LARGE_CORNER_SIZE + 5))
.testEquals();
}
@@ -124,21 +121,21 @@ public class DragResizeWindowGeometryTests {
private static void verifyHorizontalEdge(@NonNull Region region, @NonNull Point point) {
assertThat(region.contains(point.x, point.y)).isTrue();
// Horizontally along the edge is still contained.
- assertThat(region.contains(point.x + EDGE_RESIZE_DEBUG_THICKNESS, point.y)).isTrue();
- assertThat(region.contains(point.x - EDGE_RESIZE_DEBUG_THICKNESS, point.y)).isTrue();
+ assertThat(region.contains(point.x + EDGE_RESIZE_THICKNESS, point.y)).isTrue();
+ assertThat(region.contains(point.x - EDGE_RESIZE_THICKNESS, point.y)).isTrue();
// Vertically along the edge is not contained.
- assertThat(region.contains(point.x, point.y - EDGE_RESIZE_DEBUG_THICKNESS)).isFalse();
- assertThat(region.contains(point.x, point.y + EDGE_RESIZE_DEBUG_THICKNESS)).isFalse();
+ assertThat(region.contains(point.x, point.y - EDGE_RESIZE_THICKNESS)).isFalse();
+ assertThat(region.contains(point.x, point.y + EDGE_RESIZE_THICKNESS)).isFalse();
}
private static void verifyVerticalEdge(@NonNull Region region, @NonNull Point point) {
assertThat(region.contains(point.x, point.y)).isTrue();
// Horizontally along the edge is not contained.
- assertThat(region.contains(point.x + EDGE_RESIZE_DEBUG_THICKNESS, point.y)).isFalse();
- assertThat(region.contains(point.x - EDGE_RESIZE_DEBUG_THICKNESS, point.y)).isFalse();
+ assertThat(region.contains(point.x + EDGE_RESIZE_THICKNESS, point.y)).isFalse();
+ assertThat(region.contains(point.x - EDGE_RESIZE_THICKNESS, point.y)).isFalse();
// Vertically along the edge is contained.
- assertThat(region.contains(point.x, point.y - EDGE_RESIZE_DEBUG_THICKNESS)).isTrue();
- assertThat(region.contains(point.x, point.y + EDGE_RESIZE_DEBUG_THICKNESS)).isTrue();
+ assertThat(region.contains(point.x, point.y - EDGE_RESIZE_THICKNESS)).isTrue();
+ assertThat(region.contains(point.x, point.y + EDGE_RESIZE_THICKNESS)).isTrue();
}
/**
@@ -151,10 +148,7 @@ public class DragResizeWindowGeometryTests {
public void testRegionUnion_edgeDragResizeEnabled_containsLargeCorners() {
Region region = new Region();
GEOMETRY.union(region);
- // Make sure we're choosing a point outside of any debug region buffer.
- final int cornerRadius = DragResizeWindowGeometry.DEBUG
- ? Math.max(LARGE_CORNER_SIZE / 2, EDGE_RESIZE_DEBUG_THICKNESS)
- : LARGE_CORNER_SIZE / 2;
+ final int cornerRadius = LARGE_CORNER_SIZE / 2;
new TestPoints(TASK_SIZE, cornerRadius).validateRegion(region);
}
@@ -168,9 +162,7 @@ public class DragResizeWindowGeometryTests {
public void testRegionUnion_edgeDragResizeDisabled_containsFineCorners() {
Region region = new Region();
GEOMETRY.union(region);
- final int cornerRadius = DragResizeWindowGeometry.DEBUG
- ? Math.max(LARGE_CORNER_SIZE / 2, EDGE_RESIZE_DEBUG_THICKNESS)
- : LARGE_CORNER_SIZE / 2;
+ final int cornerRadius = FINE_CORNER_SIZE / 2;
new TestPoints(TASK_SIZE, cornerRadius).validateRegion(region);
}
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/HandleMenuTest.kt b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/HandleMenuTest.kt
index 5582e0f46321..e548f8f1eb2a 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/HandleMenuTest.kt
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/HandleMenuTest.kt
@@ -22,10 +22,10 @@ import android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN
import android.app.WindowConfiguration.WINDOWING_MODE_MULTI_WINDOW
import android.graphics.Bitmap
import android.graphics.Color
+import android.graphics.Point
import android.graphics.Rect
-import android.platform.test.annotations.RequiresFlagsEnabled
-import android.platform.test.flag.junit.CheckFlagsRule
-import android.platform.test.flag.junit.DeviceFlagsValueProvider
+import android.platform.test.annotations.EnableFlags
+import android.platform.test.flag.junit.SetFlagsRule
import android.testing.AndroidTestingRunner
import android.testing.TestableLooper
import android.view.Display
@@ -33,6 +33,7 @@ import android.view.LayoutInflater
import android.view.SurfaceControl
import android.view.SurfaceControlViewHost
import android.view.View
+import androidx.core.graphics.toPointF
import androidx.test.filters.SmallTest
import com.android.window.flags.Flags
import com.android.wm.shell.R
@@ -46,6 +47,7 @@ import com.android.wm.shell.common.split.SplitScreenConstants.SPLIT_POSITION_UND
import com.android.wm.shell.splitscreen.SplitScreenController
import com.android.wm.shell.windowdecor.additionalviewcontainer.AdditionalSystemViewContainer
import com.android.wm.shell.windowdecor.additionalviewcontainer.AdditionalViewHostViewContainer
+import org.junit.Assert.assertEquals
import org.junit.Assert.assertTrue
import org.junit.Before
import org.junit.Rule
@@ -69,7 +71,7 @@ import org.mockito.kotlin.whenever
class HandleMenuTest : ShellTestCase() {
@JvmField
@Rule
- val mCheckFlagsRule: CheckFlagsRule = DeviceFlagsValueProvider.createCheckFlagsRule()
+ val setFlagsRule: SetFlagsRule = SetFlagsRule()
@Mock
private lateinit var mockDesktopWindowDecoration: DesktopModeWindowDecoration
@@ -92,6 +94,8 @@ class HandleMenuTest : ShellTestCase() {
private lateinit var handleMenu: HandleMenu
+ private val menuWidthWithElevation = MENU_WIDTH + MENU_PILL_ELEVATION
+
@Before
fun setUp() {
val mockAdditionalViewHostViewContainer = AdditionalViewHostViewContainer(
@@ -100,7 +104,7 @@ class HandleMenuTest : ShellTestCase() {
) {
SurfaceControl.Transaction()
}
- val menuView = LayoutInflater.from(context).inflate(
+ val menuView = LayoutInflater.from(mContext).inflate(
R.layout.desktop_mode_window_decor_handle_menu, null)
whenever(mockDesktopWindowDecoration.addWindow(
anyInt(), any(), any(), any(), anyInt(), anyInt(), anyInt(), anyInt())
@@ -110,50 +114,69 @@ class HandleMenuTest : ShellTestCase() {
whenever(displayLayout.width()).thenReturn(DISPLAY_BOUNDS.width())
whenever(displayLayout.height()).thenReturn(DISPLAY_BOUNDS.height())
whenever(displayLayout.isLandscape).thenReturn(true)
- mockDesktopWindowDecoration.mDecorWindowContext = context
+ mContext.orCreateTestableResources.apply {
+ addOverride(R.dimen.desktop_mode_handle_menu_width, MENU_WIDTH)
+ addOverride(R.dimen.desktop_mode_handle_menu_height, MENU_HEIGHT)
+ addOverride(R.dimen.desktop_mode_handle_menu_margin_top, MENU_TOP_MARGIN)
+ addOverride(R.dimen.desktop_mode_handle_menu_margin_start, MENU_START_MARGIN)
+ addOverride(R.dimen.desktop_mode_handle_menu_pill_elevation, MENU_PILL_ELEVATION)
+ addOverride(
+ R.dimen.desktop_mode_handle_menu_pill_spacing_margin, MENU_PILL_SPACING_MARGIN)
+ }
+ mockDesktopWindowDecoration.mDecorWindowContext = mContext
}
@Test
- @RequiresFlagsEnabled(Flags.FLAG_ENABLE_ADDITIONAL_WINDOWS_ABOVE_STATUS_BAR)
+ @EnableFlags(Flags.FLAG_ENABLE_ADDITIONAL_WINDOWS_ABOVE_STATUS_BAR)
fun testFullscreenMenuUsesSystemViewContainer() {
createTaskInfo(WINDOWING_MODE_FULLSCREEN, SPLIT_POSITION_UNDEFINED)
- val handleMenu = createAndShowHandleMenu()
- assertTrue(handleMenu.mHandleMenuViewContainer is AdditionalSystemViewContainer)
+ val handleMenu = createAndShowHandleMenu(SPLIT_POSITION_UNDEFINED)
+ assertTrue(handleMenu.handleMenuViewContainer is AdditionalSystemViewContainer)
// Verify menu is created at coordinates that, when added to WindowManager,
// show at the top-center of display.
- assertTrue(handleMenu.mHandleMenuPosition.equals(16f, -512f))
+ val expected = Point(DISPLAY_BOUNDS.centerX() - menuWidthWithElevation / 2, MENU_TOP_MARGIN)
+ assertEquals(expected.toPointF(), handleMenu.handleMenuPosition)
}
@Test
- @RequiresFlagsEnabled(Flags.FLAG_ENABLE_ADDITIONAL_WINDOWS_ABOVE_STATUS_BAR)
+ @EnableFlags(Flags.FLAG_ENABLE_ADDITIONAL_WINDOWS_ABOVE_STATUS_BAR)
fun testFreeformMenu_usesViewHostViewContainer() {
createTaskInfo(WINDOWING_MODE_FREEFORM, SPLIT_POSITION_UNDEFINED)
- handleMenu = createAndShowHandleMenu()
- assertTrue(handleMenu.mHandleMenuViewContainer is AdditionalViewHostViewContainer)
+ handleMenu = createAndShowHandleMenu(SPLIT_POSITION_UNDEFINED)
+ assertTrue(handleMenu.handleMenuViewContainer is AdditionalViewHostViewContainer)
// Verify menu is created near top-left of task.
- assertTrue(handleMenu.mHandleMenuPosition.equals(12f, 8f))
+ val expected = Point(MENU_START_MARGIN, MENU_TOP_MARGIN)
+ assertEquals(expected.toPointF(), handleMenu.handleMenuPosition)
}
@Test
- @RequiresFlagsEnabled(Flags.FLAG_ENABLE_ADDITIONAL_WINDOWS_ABOVE_STATUS_BAR)
+ @EnableFlags(Flags.FLAG_ENABLE_ADDITIONAL_WINDOWS_ABOVE_STATUS_BAR)
fun testSplitLeftMenu_usesSystemViewContainer() {
createTaskInfo(WINDOWING_MODE_MULTI_WINDOW, SPLIT_POSITION_TOP_OR_LEFT)
- handleMenu = createAndShowHandleMenu()
- assertTrue(handleMenu.mHandleMenuViewContainer is AdditionalSystemViewContainer)
+ handleMenu = createAndShowHandleMenu(SPLIT_POSITION_TOP_OR_LEFT)
+ assertTrue(handleMenu.handleMenuViewContainer is AdditionalSystemViewContainer)
// Verify menu is created at coordinates that, when added to WindowManager,
- // show at the top of split left task.
- assertTrue(handleMenu.mHandleMenuPosition.equals(-624f, -512f))
+ // show at the top-center of split left task.
+ val expected = Point(
+ SPLIT_LEFT_BOUNDS.centerX() - menuWidthWithElevation / 2,
+ MENU_TOP_MARGIN
+ )
+ assertEquals(expected.toPointF(), handleMenu.handleMenuPosition)
}
@Test
- @RequiresFlagsEnabled(Flags.FLAG_ENABLE_ADDITIONAL_WINDOWS_ABOVE_STATUS_BAR)
+ @EnableFlags(Flags.FLAG_ENABLE_ADDITIONAL_WINDOWS_ABOVE_STATUS_BAR)
fun testSplitRightMenu_usesSystemViewContainer() {
createTaskInfo(WINDOWING_MODE_MULTI_WINDOW, SPLIT_POSITION_BOTTOM_OR_RIGHT)
- handleMenu = createAndShowHandleMenu()
- assertTrue(handleMenu.mHandleMenuViewContainer is AdditionalSystemViewContainer)
+ handleMenu = createAndShowHandleMenu(SPLIT_POSITION_BOTTOM_OR_RIGHT)
+ assertTrue(handleMenu.handleMenuViewContainer is AdditionalSystemViewContainer)
// Verify menu is created at coordinates that, when added to WindowManager,
- // show at the top of split right task.
- assertTrue(handleMenu.mHandleMenuPosition.equals(656f, -512f))
+ // show at the top-center of split right task.
+ val expected = Point(
+ SPLIT_RIGHT_BOUNDS.centerX() - menuWidthWithElevation / 2,
+ MENU_TOP_MARGIN
+ )
+ assertEquals(expected.toPointF(), handleMenu.handleMenuPosition)
}
private fun createTaskInfo(windowingMode: Int, splitPosition: Int) {
@@ -178,27 +201,37 @@ class HandleMenuTest : ShellTestCase() {
.setBounds(bounds)
.setVisible(true)
.build()
- // Calculate captionX similar to how WindowDecoration calculates it.
- whenever(mockDesktopWindowDecoration.captionX).thenReturn(
- (mockDesktopWindowDecoration.mTaskInfo.configuration.windowConfiguration
- .bounds.width() - context.resources.getDimensionPixelSize(
- R.dimen.desktop_mode_fullscreen_decor_caption_width)) / 2)
whenever(splitScreenController.getSplitPosition(any())).thenReturn(splitPosition)
whenever(splitScreenController.getStageBounds(any(), any())).thenAnswer {
(it.arguments.first() as Rect).set(SPLIT_LEFT_BOUNDS)
+ (it.arguments[1] as Rect).set(SPLIT_RIGHT_BOUNDS)
}
}
- private fun createAndShowHandleMenu(): HandleMenu {
+ private fun createAndShowHandleMenu(splitPosition: Int): HandleMenu {
val layoutId = if (mockDesktopWindowDecoration.mTaskInfo.isFreeform) {
R.layout.desktop_mode_app_header
} else {
- R.layout.desktop_mode_app_header
+ R.layout.desktop_mode_app_handle
+ }
+ val captionX = when (mockDesktopWindowDecoration.mTaskInfo.windowingMode) {
+ WINDOWING_MODE_FULLSCREEN -> (DISPLAY_BOUNDS.width() / 2) - (HANDLE_WIDTH / 2)
+ WINDOWING_MODE_FREEFORM -> 0
+ WINDOWING_MODE_MULTI_WINDOW -> {
+ if (splitPosition == SPLIT_POSITION_TOP_OR_LEFT) {
+ (SPLIT_LEFT_BOUNDS.width() / 2) - (HANDLE_WIDTH / 2)
+ } else {
+ (SPLIT_RIGHT_BOUNDS.width() / 2) - (HANDLE_WIDTH / 2)
+ }
+ }
+ else -> error("Invalid windowing mode")
}
val handleMenu = HandleMenu(mockDesktopWindowDecoration, layoutId,
- onClickListener, onTouchListener, appIcon, appName, displayController,
- splitScreenController, true /* shouldShowWindowingPill */,
- 50 /* captionHeight */ )
+ onClickListener, onTouchListener, appIcon, appName, displayController,
+ splitScreenController, shouldShowWindowingPill = true,
+ shouldShowBrowserPill = true, captionWidth = HANDLE_WIDTH, captionHeight = 50,
+ captionX = captionX
+ )
handleMenu.show()
return handleMenu
}
@@ -208,5 +241,12 @@ class HandleMenuTest : ShellTestCase() {
private val FREEFORM_BOUNDS = Rect(500, 500, 2000, 1200)
private val SPLIT_LEFT_BOUNDS = Rect(0, 0, 1280, 1600)
private val SPLIT_RIGHT_BOUNDS = Rect(1280, 0, 2560, 1600)
+ private const val MENU_WIDTH = 200
+ private const val MENU_HEIGHT = 400
+ private const val MENU_TOP_MARGIN = 10
+ private const val MENU_START_MARGIN = 20
+ private const val MENU_PILL_ELEVATION = 2
+ private const val MENU_PILL_SPACING_MARGIN = 4
+ private const val HANDLE_WIDTH = 80
}
}
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/WindowDecorationTests.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/WindowDecorationTests.java
index 31c6479195c3..2d1bf14ffbb3 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/WindowDecorationTests.java
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/WindowDecorationTests.java
@@ -18,6 +18,8 @@ package com.android.wm.shell.windowdecor;
import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM;
import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
+import static android.platform.test.flag.junit.SetFlagsRule.DefaultInitValueType.DEVICE_DEFAULT;
+import static android.view.InsetsSource.FLAG_FORCE_CONSUMING;
import static android.view.WindowInsets.Type.captionBar;
import static android.view.WindowInsets.Type.mandatorySystemGestures;
import static android.view.WindowInsets.Type.statusBars;
@@ -54,6 +56,8 @@ import android.content.res.Resources;
import android.graphics.Color;
import android.graphics.Point;
import android.graphics.Rect;
+import android.platform.test.annotations.EnableFlags;
+import android.platform.test.flag.junit.SetFlagsRule;
import android.testing.AndroidTestingRunner;
import android.util.DisplayMetrics;
import android.view.AttachedSurfaceControl;
@@ -71,6 +75,7 @@ import android.window.WindowContainerTransaction;
import androidx.test.filters.SmallTest;
import com.android.dx.mockito.inline.extended.StaticMockitoSession;
+import com.android.window.flags.Flags;
import com.android.wm.shell.ShellTaskOrganizer;
import com.android.wm.shell.ShellTestCase;
import com.android.wm.shell.TestRunningTaskInfoBuilder;
@@ -80,6 +85,7 @@ import com.android.wm.shell.tests.R;
import com.android.wm.shell.windowdecor.additionalviewcontainer.AdditionalViewContainer;
import org.junit.Before;
+import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
@@ -105,6 +111,9 @@ public class WindowDecorationTests extends ShellTestCase {
private static final int CORNER_RADIUS = 20;
private static final int STATUS_BAR_INSET_SOURCE_ID = 0;
+ @Rule
+ public final SetFlagsRule mSetFlagsRule = new SetFlagsRule(DEVICE_DEFAULT);
+
private final WindowDecoration.RelayoutResult<TestView> mRelayoutResult =
new WindowDecoration.RelayoutResult<>();
@@ -260,7 +269,8 @@ public class WindowDecorationTests extends ShellTestCase {
eq(0 /* index */),
eq(WindowInsets.Type.captionBar()),
eq(new Rect(100, 300, 400, 364)),
- any());
+ any(),
+ anyInt());
verify(mMockSurfaceControlStartT).setCornerRadius(mMockTaskSurface, CORNER_RADIUS);
verify(mMockSurfaceControlFinishT).setCornerRadius(mMockTaskSurface, CORNER_RADIUS);
@@ -565,9 +575,9 @@ public class WindowDecorationTests extends ShellTestCase {
windowDecor.relayout(taskInfo);
verify(mMockWindowContainerTransaction).addInsetsSource(eq(taskInfo.token), any(),
- eq(0) /* index */, eq(captionBar()), any(), any());
+ eq(0) /* index */, eq(captionBar()), any(), any(), anyInt());
verify(mMockWindowContainerTransaction).addInsetsSource(eq(taskInfo.token), any(),
- eq(0) /* index */, eq(mandatorySystemGestures()), any(), any());
+ eq(0) /* index */, eq(mandatorySystemGestures()), any(), any(), anyInt());
}
@Test
@@ -654,9 +664,9 @@ public class WindowDecorationTests extends ShellTestCase {
// Never added.
verify(mMockWindowContainerTransaction, never()).addInsetsSource(eq(taskInfo.token), any(),
- eq(0) /* index */, eq(captionBar()), any(), any());
+ eq(0) /* index */, eq(captionBar()), any(), any(), anyInt());
verify(mMockWindowContainerTransaction, never()).addInsetsSource(eq(taskInfo.token), any(),
- eq(0) /* index */, eq(mandatorySystemGestures()), any(), any());
+ eq(0) /* index */, eq(mandatorySystemGestures()), any(), any(), anyInt());
// No need to remove them if they were never added.
verify(mMockWindowContainerTransaction, never()).removeInsetsSource(eq(taskInfo.token),
any(), eq(0) /* index */, eq(captionBar()));
@@ -681,9 +691,9 @@ public class WindowDecorationTests extends ShellTestCase {
mInsetsState.getOrCreateSource(STATUS_BAR_INSET_SOURCE_ID, captionBar()).setVisible(true);
windowDecor.relayout(taskInfo);
verify(mMockWindowContainerTransaction).addInsetsSource(eq(taskInfo.token), any(),
- eq(0) /* index */, eq(captionBar()), any(), any());
+ eq(0) /* index */, eq(captionBar()), any(), any(), anyInt());
verify(mMockWindowContainerTransaction).addInsetsSource(eq(taskInfo.token), any(),
- eq(0) /* index */, eq(mandatorySystemGestures()), any(), any());
+ eq(0) /* index */, eq(mandatorySystemGestures()), any(), any(), anyInt());
windowDecor.close();
@@ -738,9 +748,9 @@ public class WindowDecorationTests extends ShellTestCase {
// Insets should be applied twice.
verify(mMockWindowContainerTransaction, times(2)).addInsetsSource(eq(token), any(),
- eq(0) /* index */, eq(captionBar()), any(), any());
+ eq(0) /* index */, eq(captionBar()), any(), any(), anyInt());
verify(mMockWindowContainerTransaction, times(2)).addInsetsSource(eq(token), any(),
- eq(0) /* index */, eq(mandatorySystemGestures()), any(), any());
+ eq(0) /* index */, eq(mandatorySystemGestures()), any(), any(), anyInt());
}
@Test
@@ -765,9 +775,30 @@ public class WindowDecorationTests extends ShellTestCase {
// Insets should only need to be applied once.
verify(mMockWindowContainerTransaction, times(1)).addInsetsSource(eq(token), any(),
- eq(0) /* index */, eq(captionBar()), any(), any());
+ eq(0) /* index */, eq(captionBar()), any(), any(), anyInt());
verify(mMockWindowContainerTransaction, times(1)).addInsetsSource(eq(token), any(),
- eq(0) /* index */, eq(mandatorySystemGestures()), any(), any());
+ eq(0) /* index */, eq(mandatorySystemGestures()), any(), any(), anyInt());
+ }
+
+ @Test
+ @EnableFlags(Flags.FLAG_ENABLE_CAPTION_COMPAT_INSET_FORCE_CONSUMPTION)
+ public void testRelayout_captionInsetForceConsume() {
+ final Display defaultDisplay = mock(Display.class);
+ doReturn(defaultDisplay).when(mMockDisplayController)
+ .getDisplay(Display.DEFAULT_DISPLAY);
+ final WindowContainerToken token = TestRunningTaskInfoBuilder.createMockWCToken();
+ final TestRunningTaskInfoBuilder builder = new TestRunningTaskInfoBuilder()
+ .setDisplayId(Display.DEFAULT_DISPLAY)
+ .setVisible(true);
+
+ final ActivityManager.RunningTaskInfo taskInfo =
+ builder.setToken(token).setBounds(new Rect(0, 0, 1000, 1000)).build();
+ final TestWindowDecoration windowDecor = createWindowDecoration(taskInfo);
+ windowDecor.relayout(taskInfo);
+
+ // Caption inset source should be force-consuming.
+ verify(mMockWindowContainerTransaction).addInsetsSource(eq(token), any(),
+ eq(0) /* index */, eq(captionBar()), any(), any(), eq(FLAG_FORCE_CONSUMING));
}
@Test
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/additionalviewcontainer/AdditionalSystemViewContainerTest.kt b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/additionalviewcontainer/AdditionalSystemViewContainerTest.kt
index d3e996b12e1f..3b490550ab61 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/additionalviewcontainer/AdditionalSystemViewContainerTest.kt
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/additionalviewcontainer/AdditionalSystemViewContainerTest.kt
@@ -68,12 +68,12 @@ class AdditionalSystemViewContainerTest : ShellTestCase() {
fun testReleaseView_ViewRemoved() {
viewContainer = AdditionalSystemViewContainer(
mockContext,
- R.layout.desktop_mode_window_decor_handle_menu,
TASK_ID,
X,
Y,
WIDTH,
- HEIGHT
+ HEIGHT,
+ R.layout.desktop_mode_window_decor_handle_menu
)
verify(mockWindowManager).addView(eq(mockView), any())
viewContainer.releaseView()
diff --git a/libs/hwui/Android.bp b/libs/hwui/Android.bp
index 341599e79662..e302fa8b1fc3 100644
--- a/libs/hwui/Android.bp
+++ b/libs/hwui/Android.bp
@@ -114,16 +114,12 @@ cc_defaults {
"libbase",
"libharfbuzz_ng",
"libminikin",
- "server_configurable_flags",
- "libaconfig_storage_read_api_cc"
],
static_libs: [
"libui-types",
],
- whole_static_libs: ["hwui_flags_cc_lib"],
-
target: {
android: {
shared_libs: [
@@ -145,6 +141,8 @@ cc_defaults {
"libsync",
"libui",
"aconfig_text_flags_c_lib",
+ "server_configurable_flags",
+ "libaconfig_storage_read_api_cc",
],
static_libs: [
"libEGL_blobCache",
@@ -155,6 +153,7 @@ cc_defaults {
"libstatssocket_lazy",
"libtonemap",
],
+ whole_static_libs: ["hwui_flags_cc_lib"],
},
host: {
static_libs: [
@@ -419,7 +418,6 @@ cc_defaults {
],
static_libs: [
- "libnativehelper_lazy",
"libziparchive_for_incfs",
],
@@ -446,6 +444,7 @@ cc_defaults {
],
static_libs: [
"libgif",
+ "libnativehelper_lazy",
"libstatslog_hwui",
"libstatspull_lazy",
"libstatssocket_lazy",
@@ -464,6 +463,7 @@ cc_defaults {
],
static_libs: [
"libandroidfw",
+ "libnativehelper_jvm",
],
},
},
diff --git a/libs/hwui/apex/LayoutlibLoader.cpp b/libs/hwui/apex/LayoutlibLoader.cpp
index 70a9ef04d6f3..b4e6b7243ddc 100644
--- a/libs/hwui/apex/LayoutlibLoader.cpp
+++ b/libs/hwui/apex/LayoutlibLoader.cpp
@@ -28,6 +28,7 @@ using namespace std;
extern int register_android_graphics_Bitmap(JNIEnv*);
extern int register_android_graphics_BitmapFactory(JNIEnv*);
+extern int register_android_graphics_BitmapRegionDecoder(JNIEnv*);
extern int register_android_graphics_ByteBufferStreamAdaptor(JNIEnv* env);
extern int register_android_graphics_Camera(JNIEnv* env);
extern int register_android_graphics_CreateJavaOutputStreamAdaptor(JNIEnv* env);
@@ -41,6 +42,7 @@ extern int register_android_graphics_Shader(JNIEnv* env);
extern int register_android_graphics_RenderEffect(JNIEnv* env);
extern int register_android_graphics_Typeface(JNIEnv* env);
extern int register_android_graphics_YuvImage(JNIEnv* env);
+extern int register_android_graphics_drawable_AnimatedImageDrawable(JNIEnv* env);
namespace android {
@@ -51,7 +53,12 @@ extern int register_android_graphics_ColorFilter(JNIEnv* env);
extern int register_android_graphics_ColorSpace(JNIEnv* env);
extern int register_android_graphics_DrawFilter(JNIEnv* env);
extern int register_android_graphics_FontFamily(JNIEnv* env);
+extern int register_android_graphics_Gainmap(JNIEnv* env);
+extern int register_android_graphics_HardwareBufferRenderer(JNIEnv* env);
+extern int register_android_graphics_HardwareRendererObserver(JNIEnv* env);
extern int register_android_graphics_Matrix(JNIEnv* env);
+extern int register_android_graphics_Mesh(JNIEnv* env);
+extern int register_android_graphics_MeshSpecification(JNIEnv* env);
extern int register_android_graphics_Paint(JNIEnv* env);
extern int register_android_graphics_Path(JNIEnv* env);
extern int register_android_graphics_PathIterator(JNIEnv* env);
@@ -72,6 +79,7 @@ extern int register_android_graphics_text_GraphemeBreak(JNIEnv* env);
extern int register_android_util_PathParser(JNIEnv* env);
extern int register_android_view_DisplayListCanvas(JNIEnv* env);
extern int register_android_view_RenderNode(JNIEnv* env);
+extern int register_android_view_ThreadedRenderer(JNIEnv* env);
#define REG_JNI(name) { name }
struct RegJNIRec {
@@ -83,6 +91,8 @@ struct RegJNIRec {
static const std::unordered_map<std::string, RegJNIRec> gRegJNIMap = {
{"android.graphics.Bitmap", REG_JNI(register_android_graphics_Bitmap)},
{"android.graphics.BitmapFactory", REG_JNI(register_android_graphics_BitmapFactory)},
+ {"android.graphics.BitmapRegionDecoder",
+ REG_JNI(register_android_graphics_BitmapRegionDecoder)},
{"android.graphics.ByteBufferStreamAdaptor",
REG_JNI(register_android_graphics_ByteBufferStreamAdaptor)},
{"android.graphics.Camera", REG_JNI(register_android_graphics_Camera)},
@@ -95,11 +105,20 @@ static const std::unordered_map<std::string, RegJNIRec> gRegJNIMap = {
REG_JNI(register_android_graphics_CreateJavaOutputStreamAdaptor)},
{"android.graphics.DrawFilter", REG_JNI(register_android_graphics_DrawFilter)},
{"android.graphics.FontFamily", REG_JNI(register_android_graphics_FontFamily)},
+ {"android.graphics.Gainmap", REG_JNI(register_android_graphics_Gainmap)},
{"android.graphics.Graphics", REG_JNI(register_android_graphics_Graphics)},
+ {"android.graphics.HardwareBufferRenderer",
+ REG_JNI(register_android_graphics_HardwareBufferRenderer)},
+ {"android.graphics.HardwareRenderer", REG_JNI(register_android_view_ThreadedRenderer)},
+ {"android.graphics.HardwareRendererObserver",
+ REG_JNI(register_android_graphics_HardwareRendererObserver)},
{"android.graphics.ImageDecoder", REG_JNI(register_android_graphics_ImageDecoder)},
{"android.graphics.Interpolator", REG_JNI(register_android_graphics_Interpolator)},
{"android.graphics.MaskFilter", REG_JNI(register_android_graphics_MaskFilter)},
{"android.graphics.Matrix", REG_JNI(register_android_graphics_Matrix)},
+ {"android.graphics.Mesh", REG_JNI(register_android_graphics_Mesh)},
+ {"android.graphics.MeshSpecification",
+ REG_JNI(register_android_graphics_MeshSpecification)},
{"android.graphics.NinePatch", REG_JNI(register_android_graphics_NinePatch)},
{"android.graphics.Paint", REG_JNI(register_android_graphics_Paint)},
{"android.graphics.Path", REG_JNI(register_android_graphics_Path)},
@@ -118,6 +137,8 @@ static const std::unordered_map<std::string, RegJNIRec> gRegJNIMap = {
REG_JNI(register_android_graphics_animation_NativeInterpolatorFactory)},
{"android.graphics.animation.RenderNodeAnimator",
REG_JNI(register_android_graphics_animation_RenderNodeAnimator)},
+ {"android.graphics.drawable.AnimatedImageDrawable",
+ REG_JNI(register_android_graphics_drawable_AnimatedImageDrawable)},
{"android.graphics.drawable.AnimatedVectorDrawable",
REG_JNI(register_android_graphics_drawable_AnimatedVectorDrawable)},
{"android.graphics.drawable.VectorDrawable",
diff --git a/libs/hwui/hwui/DrawTextFunctor.h b/libs/hwui/hwui/DrawTextFunctor.h
index cfca48084d97..0efb2c81af01 100644
--- a/libs/hwui/hwui/DrawTextFunctor.h
+++ b/libs/hwui/hwui/DrawTextFunctor.h
@@ -17,7 +17,6 @@
#include <SkFontMetrics.h>
#include <SkRRect.h>
#include <SkTextBlob.h>
-#include <com_android_graphics_hwui_flags.h>
#include "../utils/Color.h"
#include "Canvas.h"
@@ -30,7 +29,19 @@
#include "hwui/PaintFilter.h"
#include "pipeline/skia/SkiaRecordingCanvas.h"
+#ifdef __ANDROID__
+#include <com_android_graphics_hwui_flags.h>
namespace flags = com::android::graphics::hwui::flags;
+#else
+namespace flags {
+constexpr bool high_contrast_text_luminance() {
+ return false;
+}
+constexpr bool high_contrast_text_small_text_rect() {
+ return false;
+}
+} // namespace flags
+#endif
namespace android {
diff --git a/libs/hwui/jni/MeshSpecification.cpp b/libs/hwui/jni/MeshSpecification.cpp
index ae9792df3d82..b943496ae9f7 100644
--- a/libs/hwui/jni/MeshSpecification.cpp
+++ b/libs/hwui/jni/MeshSpecification.cpp
@@ -126,7 +126,7 @@ static void MeshSpecification_safeUnref(SkMeshSpecification* meshSpec) {
SkSafeUnref(meshSpec);
}
-static jlong getMeshSpecificationFinalizer() {
+static jlong getMeshSpecificationFinalizer(CRITICAL_JNI_PARAMS) {
return static_cast<jlong>(reinterpret_cast<uintptr_t>(&MeshSpecification_safeUnref));
}
diff --git a/libs/hwui/jni/android_graphics_HardwareBufferRenderer.cpp b/libs/hwui/jni/android_graphics_HardwareBufferRenderer.cpp
index e3cdee6e7034..3b1b86160f3a 100644
--- a/libs/hwui/jni/android_graphics_HardwareBufferRenderer.cpp
+++ b/libs/hwui/jni/android_graphics_HardwareBufferRenderer.cpp
@@ -135,7 +135,7 @@ static void android_graphics_HardwareBufferRenderer_setLightAlpha(JNIEnv* env, j
proxy->setLightAlpha((uint8_t)(255 * ambientShadowAlpha), (uint8_t)(255 * spotShadowAlpha));
}
-static jlong android_graphics_HardwareBufferRenderer_getFinalizer() {
+static jlong android_graphics_HardwareBufferRenderer_getFinalizer(CRITICAL_JNI_PARAMS) {
return static_cast<jlong>(reinterpret_cast<uintptr_t>(&HardwareBufferRenderer_destroy));
}
diff --git a/libs/hwui/tests/common/TestUtils.cpp b/libs/hwui/tests/common/TestUtils.cpp
index ad963dd913cf..93118aeafaaf 100644
--- a/libs/hwui/tests/common/TestUtils.cpp
+++ b/libs/hwui/tests/common/TestUtils.cpp
@@ -40,6 +40,7 @@
namespace android {
namespace uirenderer {
+std::mutex TestUtils::sMutex;
std::unordered_map<int, TestUtils::CallCounts> TestUtils::sMockFunctorCounts{};
SkColor TestUtils::interpolateColor(float fraction, SkColor start, SkColor end) {
diff --git a/libs/hwui/tests/common/TestUtils.h b/libs/hwui/tests/common/TestUtils.h
index 0ede902b1b95..8ab2b16601c3 100644
--- a/libs/hwui/tests/common/TestUtils.h
+++ b/libs/hwui/tests/common/TestUtils.h
@@ -305,22 +305,26 @@ public:
.onSync =
[](int functor, void* client_data, const WebViewSyncData& data) {
expectOnRenderThread("onSync");
+ std::scoped_lock lock(sMutex);
sMockFunctorCounts[functor].sync++;
},
.onContextDestroyed =
[](int functor, void* client_data) {
expectOnRenderThread("onContextDestroyed");
+ std::scoped_lock lock(sMutex);
sMockFunctorCounts[functor].contextDestroyed++;
},
.onDestroyed =
[](int functor, void* client_data) {
expectOnRenderThread("onDestroyed");
+ std::scoped_lock lock(sMutex);
sMockFunctorCounts[functor].destroyed++;
},
.removeOverlays =
[](int functor, void* data,
void (*mergeTransaction)(ASurfaceTransaction*)) {
expectOnRenderThread("removeOverlays");
+ std::scoped_lock lock(sMutex);
sMockFunctorCounts[functor].removeOverlays++;
},
};
@@ -329,6 +333,7 @@ public:
callbacks.gles.draw = [](int functor, void* client_data, const DrawGlInfo& params,
const WebViewOverlayData& overlay_params) {
expectOnRenderThread("draw");
+ std::scoped_lock lock(sMutex);
sMockFunctorCounts[functor].glesDraw++;
};
break;
@@ -336,15 +341,18 @@ public:
callbacks.vk.initialize = [](int functor, void* data,
const VkFunctorInitParams& params) {
expectOnRenderThread("initialize");
+ std::scoped_lock lock(sMutex);
sMockFunctorCounts[functor].vkInitialize++;
};
callbacks.vk.draw = [](int functor, void* data, const VkFunctorDrawParams& params,
const WebViewOverlayData& overlayParams) {
expectOnRenderThread("draw");
+ std::scoped_lock lock(sMutex);
sMockFunctorCounts[functor].vkDraw++;
};
callbacks.vk.postDraw = [](int functor, void* data) {
expectOnRenderThread("postDraw");
+ std::scoped_lock lock(sMutex);
sMockFunctorCounts[functor].vkPostDraw++;
};
break;
@@ -352,11 +360,16 @@ public:
return callbacks;
}
- static CallCounts& countsForFunctor(int functor) { return sMockFunctorCounts[functor]; }
+ static CallCounts copyCountsForFunctor(int functor) {
+ std::scoped_lock lock(sMutex);
+ return sMockFunctorCounts[functor];
+ }
static SkFont defaultFont();
private:
+ // guards sMockFunctorCounts
+ static std::mutex sMutex;
static std::unordered_map<int, CallCounts> sMockFunctorCounts;
static void syncHierarchyPropertiesAndDisplayListImpl(RenderNode* node) {
diff --git a/libs/hwui/tests/unit/RenderNodeTests.cpp b/libs/hwui/tests/unit/RenderNodeTests.cpp
index e727ea899098..690a60a470bc 100644
--- a/libs/hwui/tests/unit/RenderNodeTests.cpp
+++ b/libs/hwui/tests/unit/RenderNodeTests.cpp
@@ -239,19 +239,21 @@ TEST(RenderNode, releasedCallback) {
TestUtils::runOnRenderThreadUnmanaged([&] (RenderThread&) {
TestUtils::syncHierarchyPropertiesAndDisplayList(node);
});
- auto& counts = TestUtils::countsForFunctor(functor);
+ auto counts = TestUtils::copyCountsForFunctor(functor);
EXPECT_EQ(1, counts.sync);
EXPECT_EQ(0, counts.destroyed);
TestUtils::recordNode(*node, [&](Canvas& canvas) {
canvas.drawWebViewFunctor(functor);
});
+ counts = TestUtils::copyCountsForFunctor(functor);
EXPECT_EQ(1, counts.sync);
EXPECT_EQ(0, counts.destroyed);
TestUtils::runOnRenderThreadUnmanaged([&] (RenderThread&) {
TestUtils::syncHierarchyPropertiesAndDisplayList(node);
});
+ counts = TestUtils::copyCountsForFunctor(functor);
EXPECT_EQ(2, counts.sync);
EXPECT_EQ(0, counts.destroyed);
@@ -265,6 +267,7 @@ TEST(RenderNode, releasedCallback) {
});
// Fence on any remaining post'd work
TestUtils::runOnRenderThreadUnmanaged([] (RenderThread&) {});
+ counts = TestUtils::copyCountsForFunctor(functor);
EXPECT_EQ(2, counts.sync);
EXPECT_EQ(1, counts.destroyed);
}
diff --git a/libs/hwui/tests/unit/SkiaDisplayListTests.cpp b/libs/hwui/tests/unit/SkiaDisplayListTests.cpp
index 064d42ec8941..26b47290d149 100644
--- a/libs/hwui/tests/unit/SkiaDisplayListTests.cpp
+++ b/libs/hwui/tests/unit/SkiaDisplayListTests.cpp
@@ -101,7 +101,7 @@ TEST(SkiaDisplayList, syncContexts) {
SkCanvas dummyCanvas;
int functor1 = TestUtils::createMockFunctor();
- auto& counts = TestUtils::countsForFunctor(functor1);
+ auto counts = TestUtils::copyCountsForFunctor(functor1);
skiaDL.mChildFunctors.push_back(
skiaDL.allocateDrawable<GLFunctorDrawable>(functor1, &dummyCanvas));
WebViewFunctor_release(functor1);
@@ -118,6 +118,7 @@ TEST(SkiaDisplayList, syncContexts) {
});
});
+ counts = TestUtils::copyCountsForFunctor(functor1);
EXPECT_EQ(counts.sync, 1);
EXPECT_EQ(counts.destroyed, 0);
EXPECT_EQ(vectorDrawable.mutateProperties()->getBounds(), bounds);
@@ -126,6 +127,7 @@ TEST(SkiaDisplayList, syncContexts) {
TestUtils::runOnRenderThread([](auto&) {
// Fence
});
+ counts = TestUtils::copyCountsForFunctor(functor1);
EXPECT_EQ(counts.destroyed, 1);
}
diff --git a/libs/hwui/tests/unit/WebViewFunctorManagerTests.cpp b/libs/hwui/tests/unit/WebViewFunctorManagerTests.cpp
index 5e8f13d261c7..09ce98a2e53d 100644
--- a/libs/hwui/tests/unit/WebViewFunctorManagerTests.cpp
+++ b/libs/hwui/tests/unit/WebViewFunctorManagerTests.cpp
@@ -40,7 +40,7 @@ TEST(WebViewFunctor, createDestroyGLES) {
TestUtils::runOnRenderThreadUnmanaged([](renderthread::RenderThread&) {
// Empty, don't care
});
- auto& counts = TestUtils::countsForFunctor(functor);
+ auto counts = TestUtils::copyCountsForFunctor(functor);
// We never initialized, so contextDestroyed == 0
EXPECT_EQ(0, counts.contextDestroyed);
EXPECT_EQ(1, counts.destroyed);
@@ -59,7 +59,7 @@ TEST(WebViewFunctor, createSyncHandleGLES) {
TestUtils::runOnRenderThreadUnmanaged([](renderthread::RenderThread&) {
// fence
});
- auto& counts = TestUtils::countsForFunctor(functor);
+ auto counts = TestUtils::copyCountsForFunctor(functor);
EXPECT_EQ(0, counts.sync);
EXPECT_EQ(0, counts.contextDestroyed);
EXPECT_EQ(0, counts.destroyed);
@@ -69,6 +69,7 @@ TEST(WebViewFunctor, createSyncHandleGLES) {
handle->sync(syncData);
});
+ counts = TestUtils::copyCountsForFunctor(functor);
EXPECT_EQ(1, counts.sync);
TestUtils::runOnRenderThreadUnmanaged([&](auto&) {
@@ -76,6 +77,7 @@ TEST(WebViewFunctor, createSyncHandleGLES) {
handle->sync(syncData);
});
+ counts = TestUtils::copyCountsForFunctor(functor);
EXPECT_EQ(2, counts.sync);
handle.clear();
@@ -84,6 +86,7 @@ TEST(WebViewFunctor, createSyncHandleGLES) {
// fence
});
+ counts = TestUtils::copyCountsForFunctor(functor);
EXPECT_EQ(2, counts.sync);
EXPECT_EQ(0, counts.contextDestroyed);
EXPECT_EQ(1, counts.destroyed);
@@ -98,7 +101,6 @@ TEST(WebViewFunctor, createSyncDrawGLES) {
auto handle = WebViewFunctorManager::instance().handleFor(functor);
ASSERT_TRUE(handle);
WebViewFunctor_release(functor);
- auto& counts = TestUtils::countsForFunctor(functor);
for (int i = 0; i < 5; i++) {
TestUtils::runOnRenderThreadUnmanaged([&](auto&) {
WebViewSyncData syncData;
@@ -112,6 +114,7 @@ TEST(WebViewFunctor, createSyncDrawGLES) {
TestUtils::runOnRenderThreadUnmanaged([](renderthread::RenderThread&) {
// fence
});
+ auto counts = TestUtils::copyCountsForFunctor(functor);
EXPECT_EQ(5, counts.sync);
EXPECT_EQ(10, counts.glesDraw);
EXPECT_EQ(1, counts.contextDestroyed);
@@ -127,13 +130,13 @@ TEST(WebViewFunctor, contextDestroyedGLES) {
auto handle = WebViewFunctorManager::instance().handleFor(functor);
ASSERT_TRUE(handle);
WebViewFunctor_release(functor);
- auto& counts = TestUtils::countsForFunctor(functor);
TestUtils::runOnRenderThreadUnmanaged([&](auto&) {
WebViewSyncData syncData;
handle->sync(syncData);
DrawGlInfo drawInfo;
handle->drawGl(drawInfo);
});
+ auto counts = TestUtils::copyCountsForFunctor(functor);
EXPECT_EQ(1, counts.sync);
EXPECT_EQ(1, counts.glesDraw);
EXPECT_EQ(0, counts.contextDestroyed);
@@ -141,6 +144,7 @@ TEST(WebViewFunctor, contextDestroyedGLES) {
TestUtils::runOnRenderThreadUnmanaged([](auto& rt) {
rt.destroyRenderingContext();
});
+ counts = TestUtils::copyCountsForFunctor(functor);
EXPECT_EQ(1, counts.sync);
EXPECT_EQ(1, counts.glesDraw);
EXPECT_EQ(1, counts.contextDestroyed);
@@ -151,6 +155,7 @@ TEST(WebViewFunctor, contextDestroyedGLES) {
DrawGlInfo drawInfo;
handle->drawGl(drawInfo);
});
+ counts = TestUtils::copyCountsForFunctor(functor);
EXPECT_EQ(2, counts.sync);
EXPECT_EQ(2, counts.glesDraw);
EXPECT_EQ(1, counts.contextDestroyed);
@@ -159,6 +164,7 @@ TEST(WebViewFunctor, contextDestroyedGLES) {
TestUtils::runOnRenderThreadUnmanaged([](renderthread::RenderThread&) {
// fence
});
+ counts = TestUtils::copyCountsForFunctor(functor);
EXPECT_EQ(2, counts.sync);
EXPECT_EQ(2, counts.glesDraw);
EXPECT_EQ(2, counts.contextDestroyed);
diff --git a/location/Android.bp b/location/Android.bp
index c0e102acad4d..bc02d1f852de 100644
--- a/location/Android.bp
+++ b/location/Android.bp
@@ -30,9 +30,6 @@ java_sdk_library {
"app-compat-annotations",
"unsupportedappusage", // for android.compat.annotation.UnsupportedAppUsage
],
- hidden_api_packages: [
- "com.android.internal.location",
- ],
aidl: {
include_dirs: [
"frameworks/base/location/java",
diff --git a/location/java/android/location/flags/location.aconfig b/location/java/android/location/flags/location.aconfig
index acfe473c260c..0edaaefbd75d 100644
--- a/location/java/android/location/flags/location.aconfig
+++ b/location/java/android/location/flags/location.aconfig
@@ -2,6 +2,20 @@ package: "android.location.flags"
container: "system"
flag {
+ name: "keep_gnss_stationary_throttling"
+ namespace: "location"
+ description: "Keeps stationary throttling for the GNSS provider even if the disable_stationary_throttling flag is true."
+ bug: "354000147"
+}
+
+flag {
+ name: "disable_stationary_throttling"
+ namespace: "location"
+ description: "Disables stationary throttling for all providers"
+ bug: "354000147"
+}
+
+flag {
name: "new_geocoder"
namespace: "location"
description: "Flag for new Geocoder APIs"
diff --git a/location/java/com/android/internal/location/package-info.java b/location/java/com/android/internal/location/package-info.java
new file mode 100644
index 000000000000..25573c15ce59
--- /dev/null
+++ b/location/java/com/android/internal/location/package-info.java
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+
+/**
+ * Exclude from API surfaces
+ *
+ * @hide
+ */
+package com.android.internal.location;
diff --git a/media/java/android/media/AudioManager.java b/media/java/android/media/AudioManager.java
index 124f1f0ddd43..25c767a88b17 100644
--- a/media/java/android/media/AudioManager.java
+++ b/media/java/android/media/AudioManager.java
@@ -7435,6 +7435,21 @@ public class AudioManager {
}
/**
+ * @hide
+ * Queries the volume policy
+ * @return the volume policy currently in use
+ */
+ @TestApi
+ @SuppressLint("UnflaggedApi") // @TestApi without associated feature.
+ public @NonNull VolumePolicy getVolumePolicy() {
+ try {
+ return getService().getVolumePolicy();
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
+ /**
* Set Hdmi Cec system audio mode.
*
* @param on whether to be on system audio mode
diff --git a/media/java/android/media/AudioSystem.java b/media/java/android/media/AudioSystem.java
index d148afd3c15d..a255f730b0f3 100644
--- a/media/java/android/media/AudioSystem.java
+++ b/media/java/android/media/AudioSystem.java
@@ -1636,7 +1636,8 @@ public class AudioSystem
/** @hide */ public static final int FORCE_ENCODED_SURROUND_NEVER = 13;
/** @hide */ public static final int FORCE_ENCODED_SURROUND_ALWAYS = 14;
/** @hide */ public static final int FORCE_ENCODED_SURROUND_MANUAL = 15;
- /** @hide */ public static final int NUM_FORCE_CONFIG = 16;
+ /** @hide */ public static final int FORCE_BT_BLE = 16;
+ /** @hide */ public static final int NUM_FORCE_CONFIG = 17;
/** @hide */ public static final int FORCE_DEFAULT = FORCE_NONE;
/** @hide */
@@ -1658,6 +1659,7 @@ public class AudioSystem
case FORCE_ENCODED_SURROUND_NEVER: return "FORCE_ENCODED_SURROUND_NEVER";
case FORCE_ENCODED_SURROUND_ALWAYS: return "FORCE_ENCODED_SURROUND_ALWAYS";
case FORCE_ENCODED_SURROUND_MANUAL: return "FORCE_ENCODED_SURROUND_MANUAL";
+ case FORCE_BT_BLE: return "FORCE_BT_BLE";
default: return "unknown config (" + config + ")" ;
}
}
@@ -2649,4 +2651,11 @@ public class AudioSystem
* @hide
*/
public static native boolean isBluetoothVariableLatencyEnabled();
+
+ /**
+ * Register a native listener for system property sysprop
+ * @param callback the listener which fires when the property changes
+ * @hide
+ */
+ public static native void listenForSystemPropertyChange(String sysprop, Runnable callback);
}
diff --git a/media/java/android/media/AudioTrack.java b/media/java/android/media/AudioTrack.java
index 73deb17d0055..03cd53580b1b 100644
--- a/media/java/android/media/AudioTrack.java
+++ b/media/java/android/media/AudioTrack.java
@@ -1797,6 +1797,7 @@ public class AudioTrack extends PlayerBase
(flags != 0 // cannot have any special flags
|| attributes.getUsage() != AudioAttributes.USAGE_MEDIA
|| (attributes.getContentType() != AudioAttributes.CONTENT_TYPE_UNKNOWN
+ && attributes.getContentType() != AudioAttributes.CONTENT_TYPE_SPEECH
&& attributes.getContentType() != AudioAttributes.CONTENT_TYPE_MUSIC
&& attributes.getContentType() != AudioAttributes.CONTENT_TYPE_MOVIE))) {
return false;
diff --git a/media/java/android/media/IAudioService.aidl b/media/java/android/media/IAudioService.aidl
index 08cc126fb1a8..d20b7f090e92 100644
--- a/media/java/android/media/IAudioService.aidl
+++ b/media/java/android/media/IAudioService.aidl
@@ -386,6 +386,8 @@ interface IAudioService {
void setVolumePolicy(in VolumePolicy policy);
+ VolumePolicy getVolumePolicy();
+
boolean hasRegisteredDynamicPolicy();
void registerRecordingCallback(in IRecordingConfigDispatcher rcdb);
@@ -760,14 +762,14 @@ interface IAudioService {
void unregisterLoudnessCodecUpdatesDispatcher(in ILoudnessCodecUpdatesDispatcher dispatcher);
- oneway void startLoudnessCodecUpdates(int sessionId);
+ void startLoudnessCodecUpdates(int sessionId);
- oneway void stopLoudnessCodecUpdates(int sessionId);
+ void stopLoudnessCodecUpdates(int sessionId);
- oneway void addLoudnessCodecInfo(int sessionId, int mediaCodecHash,
+ void addLoudnessCodecInfo(int sessionId, int mediaCodecHash,
in LoudnessCodecInfo codecInfo);
- oneway void removeLoudnessCodecInfo(int sessionId, in LoudnessCodecInfo codecInfo);
+ void removeLoudnessCodecInfo(int sessionId, in LoudnessCodecInfo codecInfo);
PersistableBundle getLoudnessParams(in LoudnessCodecInfo codecInfo);
diff --git a/media/java/android/media/VolumePolicy.java b/media/java/android/media/VolumePolicy.java
index b193b70bac2c..96de72dfd10d 100644
--- a/media/java/android/media/VolumePolicy.java
+++ b/media/java/android/media/VolumePolicy.java
@@ -16,39 +16,53 @@
package android.media;
+import android.annotation.NonNull;
+import android.annotation.SuppressLint;
+import android.annotation.TestApi;
import android.os.Parcel;
import android.os.Parcelable;
import java.util.Objects;
/** @hide */
+@TestApi
+@SuppressLint("UnflaggedApi") // @TestApi without associated feature.
public final class VolumePolicy implements Parcelable {
+ @SuppressLint("UnflaggedApi") // @TestApi without associated feature.
+ @NonNull
public static final VolumePolicy DEFAULT = new VolumePolicy(false, false, false, 400);
/**
* Accessibility volume policy where the STREAM_MUSIC volume (i.e. media volume) affects
* the STREAM_ACCESSIBILITY volume, and vice-versa.
*/
+ @SuppressLint("UnflaggedApi") // @TestApi without associated feature.
public static final int A11Y_MODE_MEDIA_A11Y_VOLUME = 0;
/**
* Accessibility volume policy where the STREAM_ACCESSIBILITY volume is independent from
* any other volume.
*/
+ @SuppressLint("UnflaggedApi") // @TestApi without associated feature.
public static final int A11Y_MODE_INDEPENDENT_A11Y_VOLUME = 1;
/** Allow volume adjustments lower from vibrate to enter ringer mode = silent */
+ @SuppressLint("UnflaggedApi") // @TestApi without associated feature.
public final boolean volumeDownToEnterSilent;
/** Allow volume adjustments higher to exit ringer mode = silent */
+ @SuppressLint("UnflaggedApi") // @TestApi without associated feature.
public final boolean volumeUpToExitSilent;
/** Automatically enter do not disturb when ringer mode = silent */
+ @SuppressLint("UnflaggedApi") // @TestApi without associated feature.
public final boolean doNotDisturbWhenSilent;
/** Only allow volume adjustment from vibrate to silent after this
number of milliseconds since an adjustment from normal to vibrate. */
+ @SuppressLint("UnflaggedApi") // @TestApi without associated feature.
public final int vibrateToSilentDebounce;
+ @SuppressLint("UnflaggedApi") // @TestApi without associated feature.
public VolumePolicy(boolean volumeDownToEnterSilent, boolean volumeUpToExitSilent,
boolean doNotDisturbWhenSilent, int vibrateToSilentDebounce) {
this.volumeDownToEnterSilent = volumeDownToEnterSilent;
@@ -82,19 +96,22 @@ public final class VolumePolicy implements Parcelable {
&& other.vibrateToSilentDebounce == vibrateToSilentDebounce;
}
+ @SuppressLint("UnflaggedApi") // @TestApi without associated feature.
@Override
public int describeContents() {
return 0;
}
+ @SuppressLint("UnflaggedApi") // @TestApi without associated feature.
@Override
- public void writeToParcel(Parcel dest, int flags) {
+ public void writeToParcel(@NonNull Parcel dest, int flags) {
dest.writeInt(volumeDownToEnterSilent ? 1 : 0);
dest.writeInt(volumeUpToExitSilent ? 1 : 0);
dest.writeInt(doNotDisturbWhenSilent ? 1 : 0);
dest.writeInt(vibrateToSilentDebounce);
}
+ @SuppressLint("UnflaggedApi") // @TestApi without associated feature.
public static final @android.annotation.NonNull Parcelable.Creator<VolumePolicy> CREATOR
= new Parcelable.Creator<VolumePolicy>() {
@Override
diff --git a/media/java/android/media/projection/MediaProjection.java b/media/java/android/media/projection/MediaProjection.java
index 40592915a3a8..1c5049e891e9 100644
--- a/media/java/android/media/projection/MediaProjection.java
+++ b/media/java/android/media/projection/MediaProjection.java
@@ -23,6 +23,7 @@ import android.compat.annotation.ChangeId;
import android.compat.annotation.EnabledSince;
import android.content.Context;
import android.hardware.display.DisplayManager;
+import android.hardware.display.DisplayManager.VirtualDisplayFlag;
import android.hardware.display.VirtualDisplay;
import android.hardware.display.VirtualDisplayConfig;
import android.os.Build;
@@ -140,6 +141,7 @@ public final class MediaProjection {
/**
* @hide
*/
+ @Nullable
public VirtualDisplay createVirtualDisplay(@NonNull String name,
int width, int height, int dpi, boolean isSecure, @Nullable Surface surface,
@Nullable VirtualDisplay.Callback callback, @Nullable Handler handler) {
@@ -192,6 +194,11 @@ public final class MediaProjection {
* <li>If attempting to create a new virtual display
* associated with this MediaProjection instance after it has
* been stopped by invoking {@link #stop()}.
+ * <li>If attempting to create a new virtual display
+ * associated with this MediaProjection instance after a
+ * {@link MediaProjection.Callback#onStop()} callback has been
+ * received due to the user or the system stopping the
+ * MediaProjection session.
* <li>If the target SDK is {@link
* android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE U} and up,
* and if this instance has already taken a recording through
@@ -208,12 +215,17 @@ public final class MediaProjection {
* {@link android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE U}.
* Instead, recording doesn't begin until the user re-grants
* consent in the dialog.
+ * @return The created {@link VirtualDisplay}, or {@code null} if no {@link VirtualDisplay}
+ * could be created.
* @see VirtualDisplay
* @see VirtualDisplay.Callback
*/
+ @SuppressWarnings("RequiresPermission")
+ @Nullable
public VirtualDisplay createVirtualDisplay(@NonNull String name,
- int width, int height, int dpi, int flags, @Nullable Surface surface,
- @Nullable VirtualDisplay.Callback callback, @Nullable Handler handler) {
+ int width, int height, int dpi, @VirtualDisplayFlag int flags,
+ @Nullable Surface surface, @Nullable VirtualDisplay.Callback callback,
+ @Nullable Handler handler) {
if (shouldMediaProjectionRequireCallback()) {
if (mCallbacks.isEmpty()) {
final IllegalStateException e = new IllegalStateException(
@@ -312,6 +324,10 @@ public final class MediaProjection {
* <p>Once a MediaProjection has been stopped, it's up to the application to release any
* resources it may be holding (e.g. releasing the {@link VirtualDisplay} and
* {@link Surface}).
+ *
+ * <p>After this callback any call to
+ * {@link MediaProjection#createVirtualDisplay} will fail, even if no such
+ * {@link VirtualDisplay} was ever created for this MediaProjection session.
*/
public void onStop() { }
diff --git a/media/java/android/media/projection/MediaProjectionManager.java b/media/java/android/media/projection/MediaProjectionManager.java
index 7ed67dcde913..7a7137aa7748 100644
--- a/media/java/android/media/projection/MediaProjectionManager.java
+++ b/media/java/android/media/projection/MediaProjectionManager.java
@@ -43,25 +43,31 @@ import java.util.Map;
/**
* Manages the retrieval of certain types of {@link MediaProjection} tokens.
*
- * <p><ol>An example flow of starting a media projection will be:
- * <li>Declare a foreground service with the type {@code mediaProjection} in
- * the {@code AndroidManifest.xml}.
- * </li>
- * <li>Create an intent by calling {@link MediaProjectionManager#createScreenCaptureIntent()}
- * and pass this intent to {@link Activity#startActivityForResult(Intent, int)}.
- * </li>
- * <li>On getting {@link Activity#onActivityResult(int, int, Intent)},
- * start the foreground service with the type
- * {@link android.content.pm.ServiceInfo#FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION}.
- * </li>
- * <li>Retrieve the media projection token by calling
- * {@link MediaProjectionManager#getMediaProjection(int, Intent)} with the result code and
- * intent from the {@link Activity#onActivityResult(int, int, Intent)} above.
- * </li>
- * <li>Start the screen capture session for media projection by calling
- * {@link MediaProjection#createVirtualDisplay(String, int, int, int, int, Surface,
- * android.hardware.display.VirtualDisplay.Callback, Handler)}.
- * </li>
+ * <p>
+ *
+ * <ol>
+ * An example flow of starting a media projection will be:
+ * <li>Declare a foreground service with the type {@code mediaProjection} in the {@code
+ * AndroidManifest.xml}.
+ * <li>Create an intent by calling {@link MediaProjectionManager#createScreenCaptureIntent()} and
+ * pass this intent to {@link Activity#startActivityForResult(Intent, int)}.
+ * <li>On getting {@link Activity#onActivityResult(int, int, Intent)}, start the foreground
+ * service with the type {@link
+ * android.content.pm.ServiceInfo#FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION}.
+ * <li>Retrieve the media projection token by calling {@link
+ * MediaProjectionManager#getMediaProjection(int, Intent)} with the result code and intent
+ * from the {@link Activity#onActivityResult(int, int, Intent)} above.
+ * <li>Register a {@link MediaProjection.Callback} by calling {@link
+ * MediaProjection#registerCallback(MediaProjection.Callback, Handler)}. This is required to
+ * receive notifications about when the {@link MediaProjection} or captured content changes
+ * state. When receiving an `onStop()` callback, the client must clean up any resources it is
+ * holding, e.g. the {@link VirtualDisplay} and {@link Surface}. The MediaProjection may
+ * further no longer create any new {@link VirtualDisplay}s via {@link
+ * MediaProjection#createVirtualDisplay(String, int, int, int, int, Surface,
+ * VirtualDisplay.Callback, Handler)}.
+ * <li>Start the screen capture session for media projection by calling {@link
+ * MediaProjection#createVirtualDisplay(String, int, int, int, int, Surface,
+ * android.hardware.display.VirtualDisplay.Callback, Handler)}.
* </ol>
*/
@SystemService(Context.MEDIA_PROJECTION_SERVICE)
@@ -257,6 +263,7 @@ public final class MediaProjectionManager {
* @see <a href="/guide/topics/large-screens/media-projection">
* Media projection developer guide</a>
*/
+ @Nullable
public MediaProjection getMediaProjection(int resultCode, @NonNull Intent resultData) {
if (resultCode != Activity.RESULT_OK || resultData == null) {
return null;
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/helpers/CameraTestUtils.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/helpers/CameraTestUtils.java
index 102d21acfd19..43acbb1eacc8 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/helpers/CameraTestUtils.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/helpers/CameraTestUtils.java
@@ -2246,6 +2246,8 @@ public class CameraTestUtils extends Assert {
clientAttribution.uid = -1; // USE_CALLING_UID
clientAttribution.pid = -1; // USE_CALLING_PID
clientAttribution.deviceId = contextAttribution.deviceId;
+ clientAttribution.packageName = context.getOpPackageName();
+ clientAttribution.attributionTag = context.getAttributionTag();
clientAttribution.next = new AttributionSourceState[0];
return clientAttribution;
}
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraBinderTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraBinderTest.java
index ad3374a7da6a..ac85ab7f6a6e 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraBinderTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraBinderTest.java
@@ -169,10 +169,8 @@ public class CameraBinderTest extends AndroidTestCase {
ICameraClient dummyCallbacks = new DummyCameraClient();
- String clientPackageName = getContext().getPackageName();
-
ICamera cameraUser = mUtils.getCameraService()
- .connect(dummyCallbacks, cameraId, clientPackageName,
+ .connect(dummyCallbacks, cameraId,
getContext().getApplicationInfo().targetSdkVersion,
ICameraService.ROTATION_OVERRIDE_NONE,
/*forceSlowJpegMode*/false,
@@ -267,8 +265,6 @@ public class CameraBinderTest extends AndroidTestCase {
ICameraDeviceCallbacks dummyCallbacks = new DummyCameraDeviceCallbacks();
- String clientPackageName = getContext().getPackageName();
- String clientAttributionTag = getContext().getAttributionTag();
AttributionSourceState clientAttribution =
CameraTestUtils.getClientAttribution(mContext);
clientAttribution.deviceId = DEVICE_ID_DEFAULT;
@@ -277,7 +273,6 @@ public class CameraBinderTest extends AndroidTestCase {
ICameraDeviceUser cameraUser =
mUtils.getCameraService().connectDevice(
dummyCallbacks, String.valueOf(cameraId),
- clientPackageName, clientAttributionTag,
0 /*oomScoreOffset*/,
getContext().getApplicationInfo().targetSdkVersion,
ICameraService.ROTATION_OVERRIDE_NONE, clientAttribution,
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraDeviceBinderTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraDeviceBinderTest.java
index 0ab1ee9095e0..35ad924cee74 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraDeviceBinderTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraDeviceBinderTest.java
@@ -242,9 +242,6 @@ public class CameraDeviceBinderTest extends AndroidTestCase {
ICameraDeviceCallbacks.Stub dummyCallbacks = new DummyCameraDeviceCallbacks();
- String clientPackageName = getContext().getPackageName();
- String clientAttributionTag = getContext().getAttributionTag();
-
mMockCb = spy(dummyCallbacks);
AttributionSourceState clientAttribution = CameraTestUtils.getClientAttribution(mContext);
@@ -252,7 +249,6 @@ public class CameraDeviceBinderTest extends AndroidTestCase {
clientAttribution.uid = ICameraService.USE_CALLING_UID;
mCameraUser = mUtils.getCameraService().connectDevice(mMockCb, mCameraId,
- clientPackageName, clientAttributionTag,
/*oomScoreOffset*/0, getContext().getApplicationInfo().targetSdkVersion,
ICameraService.ROTATION_OVERRIDE_NONE, clientAttribution, DEVICE_POLICY_DEFAULT);
assertNotNull(String.format("Camera %s was null", mCameraId), mCameraUser);
diff --git a/media/tests/mediatestutils/java/com/android/media/mediatestutils/TestUtils.java b/media/tests/mediatestutils/java/com/android/media/mediatestutils/TestUtils.java
index 7065e3a8f68a..46c72730cf5b 100644
--- a/media/tests/mediatestutils/java/com/android/media/mediatestutils/TestUtils.java
+++ b/media/tests/mediatestutils/java/com/android/media/mediatestutils/TestUtils.java
@@ -27,6 +27,7 @@ import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.MoreExecutors;
import java.lang.ref.WeakReference;
+import java.util.Collection;
import java.util.Objects;
import java.util.function.Consumer;
import java.util.function.Function;
@@ -35,12 +36,13 @@ import java.util.function.Predicate;
/** Utils for audio tests. */
public class TestUtils {
/**
- * Return a future for an intent delivered by a broadcast receiver which matches an
- * action and predicate.
+ * Return a future for an intent delivered by a broadcast receiver which matches an action and
+ * predicate.
+ *
* @param context - Context to register the receiver with
* @param action - String representing action to register receiver for
- * @param pred - Predicate which sets the future if evaluates to true, otherwise, leaves
- * the future unset. If the predicate throws, the future is set exceptionally
+ * @param pred - Predicate which sets the future if evaluates to true, otherwise, leaves the
+ * future unset. If the predicate throws, the future is set exceptionally
* @return - The future representing intent delivery matching predicate.
*/
public static ListenableFuture<Intent> getFutureForIntent(
@@ -76,20 +78,77 @@ public class TestUtils {
}
/**
- * Same as previous, but with no predicate.
+ * Return a future for an intent delivered by a broadcast receiver which matches one of a set of
+ * actions and predicate.
+ *
+ * @param context - Context to register the receiver with
+ * @param actionsCollection - Collection of actions which to listen for, completing on any
+ * @param pred - Predicate which sets the future if evaluates to true, otherwise, leaves the
+ * future unset. If the predicate throws, the future is set exceptionally
+ * @return - The future representing intent delivery matching predicate.
*/
+ public static ListenableFuture<Intent> getFutureForIntent(
+ Context context, Collection<String> actionsCollection, Predicate<Intent> pred) {
+ // These are evaluated async
+ Objects.requireNonNull(actionsCollection);
+ Objects.requireNonNull(pred);
+ if (actionsCollection.isEmpty()) {
+ throw new IllegalArgumentException("actionsCollection must not be empty");
+ }
+ return getFutureForListener(
+ (recv) ->
+ context.registerReceiver(
+ recv,
+ actionsCollection.stream()
+ .reduce(
+ new IntentFilter(),
+ (IntentFilter filter, String x) -> {
+ filter.addAction(x);
+ return filter;
+ },
+ (x, y) -> {
+ throw new IllegalStateException(
+ "No parallel support");
+ }),
+ Context.RECEIVER_EXPORTED),
+ (recv) -> {
+ try {
+ context.unregisterReceiver(recv);
+ } catch (IllegalArgumentException e) {
+ // Thrown when receiver is already unregistered, nothing to do
+ }
+ },
+ (completer) ->
+ new BroadcastReceiver() {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ try {
+ if (actionsCollection.contains(intent.getAction())
+ && pred.test(intent)) {
+ completer.set(intent);
+ }
+ } catch (Exception e) {
+ completer.setException(e);
+ }
+ }
+ },
+ "Intent receiver future for actions: " + actionsCollection);
+ }
+
+ /** Same as previous, but with no predicate. */
public static ListenableFuture<Intent> getFutureForIntent(Context context, String action) {
return getFutureForIntent(context, action, i -> true);
}
/**
* Return a future for a callback registered to a listener interface.
+ *
* @param registerFunc - Function which consumes the callback object for registration
- * @param unregisterFunc - Function which consumes the callback object for unregistration
- * This function is called when the future is completed or cancelled
+ * @param unregisterFunc - Function which consumes the callback object for unregistration This
+ * function is called when the future is completed or cancelled
* @param instantiateCallback - Factory function for the callback object, provided a completer
- * object (see {@code CallbackToFutureAdapter.Completer<T>}), which is a logical reference
- * to the future returned by this function
+ * object (see {@code CallbackToFutureAdapter.Completer<T>}), which is a logical reference
+ * to the future returned by this function
* @param debug - Debug string contained in future {@code toString} representation.
*/
public static <T, V> ListenableFuture<T> getFutureForListener(
diff --git a/nfc/Android.bp b/nfc/Android.bp
index 13ac2311bde3..0282e6f5c246 100644
--- a/nfc/Android.bp
+++ b/nfc/Android.bp
@@ -61,9 +61,6 @@ java_sdk_library {
"android.nfc",
"com.android.nfc",
],
- hidden_api_packages: [
- "com.android.nfc",
- ],
impl_library_visibility: [
"//frameworks/base:__subpackages__",
"//cts/hostsidetests/multidevices/nfc:__subpackages__",
diff --git a/nfc/java/android/nfc/AvailableNfcAntenna.java b/nfc/java/android/nfc/AvailableNfcAntenna.java
index 6e6512a04971..e76aeb07f106 100644
--- a/nfc/java/android/nfc/AvailableNfcAntenna.java
+++ b/nfc/java/android/nfc/AvailableNfcAntenna.java
@@ -28,13 +28,13 @@ import android.os.Parcelable;
public final class AvailableNfcAntenna implements Parcelable {
/**
* Location of the antenna on the Y axis in millimeters.
- * 0 is the bottom-left when the user is facing the screen
+ * 0 is the top-left when the user is facing the screen
* and the device orientation is Portrait.
*/
private final int mLocationX;
/**
* Location of the antenna on the Y axis in millimeters.
- * 0 is the bottom-left when the user is facing the screen
+ * 0 is the top-left when the user is facing the screen
* and the device orientation is Portrait.
*/
private final int mLocationY;
@@ -46,7 +46,7 @@ public final class AvailableNfcAntenna implements Parcelable {
/**
* Location of the antenna on the X axis in millimeters.
- * 0 is the bottom-left when the user is facing the screen
+ * 0 is the top-left when the user is facing the screen
* and the device orientation is Portrait.
*/
public int getLocationX() {
@@ -55,7 +55,7 @@ public final class AvailableNfcAntenna implements Parcelable {
/**
* Location of the antenna on the Y axis in millimeters.
- * 0 is the bottom-left when the user is facing the screen
+ * 0 is the top-left when the user is facing the screen
* and the device orientation is Portrait.
*/
public int getLocationY() {
diff --git a/nfc/java/android/nfc/INfcAdapter.aidl b/nfc/java/android/nfc/INfcAdapter.aidl
index fd77820afc81..90ca92f299a4 100644
--- a/nfc/java/android/nfc/INfcAdapter.aidl
+++ b/nfc/java/android/nfc/INfcAdapter.aidl
@@ -104,6 +104,7 @@ interface INfcAdapter
void notifyPollingLoop(in PollingFrame frame);
void notifyHceDeactivated();
+ void notifyTestHceData(in int technology, in byte[] data);
int sendVendorNciMessage(int mt, int gid, int oid, in byte[] payload);
void registerVendorExtensionCallback(in INfcVendorNciCallback callbacks);
void unregisterVendorExtensionCallback(in INfcVendorNciCallback callbacks);
diff --git a/nfc/java/android/nfc/NfcAdapter.java b/nfc/java/android/nfc/NfcAdapter.java
index 1dfc81e2108e..395f81d73351 100644
--- a/nfc/java/android/nfc/NfcAdapter.java
+++ b/nfc/java/android/nfc/NfcAdapter.java
@@ -963,22 +963,9 @@ public final class NfcAdapter {
throw new UnsupportedOperationException("You need a context on NfcAdapter to use the "
+ " NFC extras APIs");
}
- try {
- return sService.getNfcDtaInterface(mContext.getPackageName());
- } catch (RemoteException e) {
- attemptDeadServiceRecovery(e);
- // Try one more time
- if (sService == null) {
- Log.e(TAG, "Failed to recover NFC Service.");
- return null;
- }
- try {
- return sService.getNfcDtaInterface(mContext.getPackageName());
- } catch (RemoteException ee) {
- Log.e(TAG, "Failed to recover NFC Service.");
- }
- return null;
- }
+ return callServiceReturn(() -> sService.getNfcDtaInterface(mContext.getPackageName()),
+ null);
+
}
/**
@@ -1095,22 +1082,8 @@ public final class NfcAdapter {
@SystemApi
@FlaggedApi(Flags.FLAG_ENABLE_NFC_MAINLINE)
public @AdapterState int getAdapterState() {
- try {
- return sService.getState();
- } catch (RemoteException e) {
- attemptDeadServiceRecovery(e);
- // Try one more time
- if (sService == null) {
- Log.e(TAG, "Failed to recover NFC Service.");
- return NfcAdapter.STATE_OFF;
- }
- try {
- return sService.getState();
- } catch (RemoteException ee) {
- Log.e(TAG, "Failed to recover NFC Service.");
- }
- return NfcAdapter.STATE_OFF;
- }
+ return callServiceReturn(() -> sService.getState(), NfcAdapter.STATE_OFF);
+
}
/**
@@ -1134,22 +1107,8 @@ public final class NfcAdapter {
@FlaggedApi(Flags.FLAG_NFC_STATE_CHANGE)
@RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS)
public boolean enable() {
- try {
- return sService.enable(mContext.getPackageName());
- } catch (RemoteException e) {
- attemptDeadServiceRecovery(e);
- // Try one more time
- if (sService == null) {
- Log.e(TAG, "Failed to recover NFC Service.");
- return false;
- }
- try {
- return sService.enable(mContext.getPackageName());
- } catch (RemoteException ee) {
- Log.e(TAG, "Failed to recover NFC Service.");
- }
- return false;
- }
+ return callServiceReturn(() -> sService.enable(mContext.getPackageName()), false);
+
}
/**
@@ -1175,22 +1134,9 @@ public final class NfcAdapter {
@FlaggedApi(Flags.FLAG_NFC_STATE_CHANGE)
@RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS)
public boolean disable() {
- try {
- return sService.disable(true, mContext.getPackageName());
- } catch (RemoteException e) {
- attemptDeadServiceRecovery(e);
- // Try one more time
- if (sService == null) {
- Log.e(TAG, "Failed to recover NFC Service.");
- return false;
- }
- try {
- return sService.disable(true, mContext.getPackageName());
- } catch (RemoteException ee) {
- Log.e(TAG, "Failed to recover NFC Service.");
- }
- return false;
- }
+ return callServiceReturn(() -> sService.disable(true, mContext.getPackageName()),
+ false);
+
}
/**
@@ -1200,22 +1146,9 @@ public final class NfcAdapter {
@SystemApi
@RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS)
public boolean disable(boolean persist) {
- try {
- return sService.disable(persist, mContext.getPackageName());
- } catch (RemoteException e) {
- attemptDeadServiceRecovery(e);
- // Try one more time
- if (sService == null) {
- Log.e(TAG, "Failed to recover NFC Service.");
- return false;
- }
- try {
- return sService.disable(persist, mContext.getPackageName());
- } catch (RemoteException ee) {
- Log.e(TAG, "Failed to recover NFC Service.");
- }
- return false;
- }
+ return callServiceReturn(() -> sService.disable(persist, mContext.getPackageName()),
+ false);
+
}
/**
@@ -1241,12 +1174,7 @@ public final class NfcAdapter {
*/
@FlaggedApi(Flags.FLAG_NFC_OBSERVE_MODE)
public boolean isObserveModeSupported() {
- try {
- return sService.isObserveModeSupported();
- } catch (RemoteException e) {
- attemptDeadServiceRecovery(e);
- return false;
- }
+ return callServiceReturn(() -> sService.isObserveModeSupported(), false);
}
/**
@@ -1257,12 +1185,7 @@ public final class NfcAdapter {
@FlaggedApi(Flags.FLAG_NFC_OBSERVE_MODE)
public boolean isObserveModeEnabled() {
- try {
- return sService.isObserveModeEnabled();
- } catch (RemoteException e) {
- attemptDeadServiceRecovery(e);
- return false;
- }
+ return callServiceReturn(() -> sService.isObserveModeEnabled(), false);
}
/**
@@ -1286,12 +1209,8 @@ public final class NfcAdapter {
throw new UnsupportedOperationException("You need a context on NfcAdapter to use the "
+ " observe mode APIs");
}
- try {
- return sService.setObserveMode(enabled, mContext.getPackageName());
- } catch (RemoteException e) {
- attemptDeadServiceRecovery(e);
- return false;
- }
+ return callServiceReturn(() -> sService.setObserveMode(enabled, mContext.getPackageName()),
+ false);
}
/**
@@ -2057,22 +1976,8 @@ public final class NfcAdapter {
if (!sHasNfcFeature && !sHasCeFeature) {
throw new UnsupportedOperationException();
}
- try {
- return sService.setNfcSecure(enable);
- } catch (RemoteException e) {
- attemptDeadServiceRecovery(e);
- // Try one more time
- if (sService == null) {
- Log.e(TAG, "Failed to recover NFC Service.");
- return false;
- }
- try {
- return sService.setNfcSecure(enable);
- } catch (RemoteException ee) {
- Log.e(TAG, "Failed to recover NFC Service.");
- }
- return false;
- }
+ return callServiceReturn(() -> sService.setNfcSecure(enable), false);
+
}
/**
@@ -2088,22 +1993,8 @@ public final class NfcAdapter {
if (!sHasNfcFeature && !sHasCeFeature) {
throw new UnsupportedOperationException();
}
- try {
- return sService.deviceSupportsNfcSecure();
- } catch (RemoteException e) {
- attemptDeadServiceRecovery(e);
- // Try one more time
- if (sService == null) {
- Log.e(TAG, "Failed to recover NFC Service.");
- return false;
- }
- try {
- return sService.deviceSupportsNfcSecure();
- } catch (RemoteException ee) {
- Log.e(TAG, "Failed to recover NFC Service.");
- }
- return false;
- }
+ return callServiceReturn(() -> sService.deviceSupportsNfcSecure(), false);
+
}
/**
@@ -2121,22 +2012,8 @@ public final class NfcAdapter {
if (!sHasNfcFeature && !sHasCeFeature) {
throw new UnsupportedOperationException();
}
- try {
- return sService.getNfcAntennaInfo();
- } catch (RemoteException e) {
- attemptDeadServiceRecovery(e);
- // Try one more time
- if (sService == null) {
- Log.e(TAG, "Failed to recover NFC Service.");
- return null;
- }
- try {
- return sService.getNfcAntennaInfo();
- } catch (RemoteException ee) {
- Log.e(TAG, "Failed to recover NFC Service.");
- }
- return null;
- }
+ return callServiceReturn(() -> sService.getNfcAntennaInfo(), null);
+
}
/**
@@ -2154,22 +2031,8 @@ public final class NfcAdapter {
if (!sHasNfcFeature && !sHasCeFeature) {
throw new UnsupportedOperationException();
}
- try {
- return sService.isNfcSecureEnabled();
- } catch (RemoteException e) {
- attemptDeadServiceRecovery(e);
- // Try one more time
- if (sService == null) {
- Log.e(TAG, "Failed to recover NFC Service.");
- return false;
- }
- try {
- return sService.isNfcSecureEnabled();
- } catch (RemoteException ee) {
- Log.e(TAG, "Failed to recover NFC Service.");
- }
- return false;
- }
+ return callServiceReturn(() -> sService.isNfcSecureEnabled(), false);
+
}
/**
@@ -2185,22 +2048,8 @@ public final class NfcAdapter {
if (!sHasNfcFeature) {
throw new UnsupportedOperationException();
}
- try {
- return sService.enableReaderOption(enable);
- } catch (RemoteException e) {
- attemptDeadServiceRecovery(e);
- // Try one more time
- if (sService == null) {
- Log.e(TAG, "Failed to recover NFC Service.");
- return false;
- }
- try {
- return sService.enableReaderOption(enable);
- } catch (RemoteException ee) {
- Log.e(TAG, "Failed to recover NFC Service.");
- }
- return false;
- }
+ return callServiceReturn(() -> sService.enableReaderOption(enable), false);
+
}
/**
@@ -2214,22 +2063,8 @@ public final class NfcAdapter {
if (!sHasNfcFeature) {
throw new UnsupportedOperationException();
}
- try {
- return sService.isReaderOptionSupported();
- } catch (RemoteException e) {
- attemptDeadServiceRecovery(e);
- // Try one more time
- if (sService == null) {
- Log.e(TAG, "Failed to recover NFC Service.");
- return false;
- }
- try {
- return sService.isReaderOptionSupported();
- } catch (RemoteException ee) {
- Log.e(TAG, "Failed to recover NFC Service.");
- }
- return false;
- }
+ return callServiceReturn(() -> sService.isReaderOptionSupported(), false);
+
}
/**
@@ -2245,22 +2080,8 @@ public final class NfcAdapter {
if (!sHasNfcFeature) {
throw new UnsupportedOperationException();
}
- try {
- return sService.isReaderOptionEnabled();
- } catch (RemoteException e) {
- attemptDeadServiceRecovery(e);
- // Try one more time
- if (sService == null) {
- Log.e(TAG, "Failed to recover NFC Service.");
- return false;
- }
- try {
- return sService.isReaderOptionEnabled();
- } catch (RemoteException ee) {
- Log.e(TAG, "Failed to recover NFC Service.");
- }
- return false;
- }
+ return callServiceReturn(() -> sService.isReaderOptionEnabled(), false);
+
}
/**
@@ -2388,11 +2209,9 @@ public final class NfcAdapter {
synchronized (mLock) {
mTagRemovedListener = iListener;
}
- try {
- return sService.ignore(tag.getServiceHandle(), debounceMs, iListener);
- } catch (RemoteException e) {
- return false;
- }
+ final ITagRemovedCallback.Stub passedListener = iListener;
+ return callServiceReturn(() ->
+ sService.ignore(tag.getServiceHandle(), debounceMs, passedListener), false);
}
/**
@@ -2509,22 +2328,9 @@ public final class NfcAdapter {
throw new UnsupportedOperationException("You need a context on NfcAdapter to use the "
+ " NFC extras APIs");
}
- try {
- return sService.getNfcAdapterExtrasInterface(mContext.getPackageName());
- } catch (RemoteException e) {
- attemptDeadServiceRecovery(e);
- // Try one more time
- if (sService == null) {
- Log.e(TAG, "Failed to recover NFC Service.");
- return null;
- }
- try {
- return sService.getNfcAdapterExtrasInterface(mContext.getPackageName());
- } catch (RemoteException ee) {
- Log.e(TAG, "Failed to recover NFC Service.");
- }
- return null;
- }
+ return callServiceReturn(() ->
+ sService.getNfcAdapterExtrasInterface(mContext.getPackageName()), null);
+
}
void enforceResumed(Activity activity) {
@@ -2569,22 +2375,8 @@ public final class NfcAdapter {
if (!sHasNfcFeature && !sHasCeFeature) {
throw new UnsupportedOperationException();
}
- try {
- return sService.setControllerAlwaysOn(value);
- } catch (RemoteException e) {
- attemptDeadServiceRecovery(e);
- // Try one more time
- if (sService == null) {
- Log.e(TAG, "Failed to recover NFC Service.");
- return false;
- }
- try {
- return sService.setControllerAlwaysOn(value);
- } catch (RemoteException ee) {
- Log.e(TAG, "Failed to recover NFC Service.");
- }
- return false;
- }
+ return callServiceReturn(() -> sService.setControllerAlwaysOn(value), false);
+
}
/**
@@ -2600,22 +2392,8 @@ public final class NfcAdapter {
@SystemApi
@RequiresPermission(android.Manifest.permission.NFC_SET_CONTROLLER_ALWAYS_ON)
public boolean isControllerAlwaysOn() {
- try {
- return sService.isControllerAlwaysOn();
- } catch (RemoteException e) {
- attemptDeadServiceRecovery(e);
- // Try one more time
- if (sService == null) {
- Log.e(TAG, "Failed to recover NFC Service.");
- return false;
- }
- try {
- return sService.isControllerAlwaysOn();
- } catch (RemoteException ee) {
- Log.e(TAG, "Failed to recover NFC Service.");
- }
- return false;
- }
+ return callServiceReturn(() -> sService.isControllerAlwaysOn(), false);
+
}
/**
@@ -2634,22 +2412,8 @@ public final class NfcAdapter {
if (!sHasNfcFeature && !sHasCeFeature) {
throw new UnsupportedOperationException();
}
- try {
- return sService.isControllerAlwaysOnSupported();
- } catch (RemoteException e) {
- attemptDeadServiceRecovery(e);
- // Try one more time
- if (sService == null) {
- Log.e(TAG, "Failed to recover NFC Service.");
- return false;
- }
- try {
- return sService.isControllerAlwaysOnSupported();
- } catch (RemoteException ee) {
- Log.e(TAG, "Failed to recover NFC Service.");
- }
- return false;
- }
+ return callServiceReturn(() -> sService.isControllerAlwaysOnSupported(), false);
+
}
/**
@@ -2719,21 +2483,9 @@ public final class NfcAdapter {
Log.e(TAG, "TagIntentAppPreference is not supported");
throw new UnsupportedOperationException();
}
- try {
- return sService.setTagIntentAppPreferenceForUser(userId, pkg, allow);
- } catch (RemoteException e) {
- attemptDeadServiceRecovery(e);
- // Try one more time
- if (sService == null) {
- Log.e(TAG, "Failed to recover NFC Service.");
- }
- try {
- return sService.setTagIntentAppPreferenceForUser(userId, pkg, allow);
- } catch (RemoteException ee) {
- Log.e(TAG, "Failed to recover NFC Service.");
- }
- return TAG_INTENT_APP_PREF_RESULT_UNAVAILABLE;
- }
+ return callServiceReturn(() ->
+ sService.setTagIntentAppPreferenceForUser(userId, pkg, allow),
+ TAG_INTENT_APP_PREF_RESULT_UNAVAILABLE);
}
@@ -2808,22 +2560,8 @@ public final class NfcAdapter {
if (!sHasNfcFeature) {
throw new UnsupportedOperationException();
}
- try {
- return sService.isTagIntentAppPreferenceSupported();
- } catch (RemoteException e) {
- attemptDeadServiceRecovery(e);
- // Try one more time
- if (sService == null) {
- Log.e(TAG, "Failed to recover NFC Service.");
- return false;
- }
- try {
- return sService.isTagIntentAppPreferenceSupported();
- } catch (RemoteException ee) {
- Log.e(TAG, "Failed to recover NFC Service.");
- }
- return false;
- }
+ return callServiceReturn(() -> sService.isTagIntentAppPreferenceSupported(), false);
+
}
/**
@@ -2836,11 +2574,30 @@ public final class NfcAdapter {
@TestApi
@FlaggedApi(Flags.FLAG_NFC_READ_POLLING_LOOP)
public void notifyPollingLoop(@NonNull PollingFrame pollingFrame) {
+ callService(() -> sService.notifyPollingLoop(pollingFrame));
+ }
+
+
+ /**
+ * Notifies the system of new HCE data for tests.
+ *
+ * @hide
+ */
+ @FlaggedApi(Flags.FLAG_NFC_READ_POLLING_LOOP)
+ public void notifyTestHceData(int technology, byte[] data) {
+ callService(() -> sService.notifyTestHceData(technology, data));
+ }
+
+ interface ServiceCall {
+ void call() throws RemoteException;
+ }
+
+ void callService(ServiceCall call) {
try {
if (sService == null) {
attemptDeadServiceRecovery(null);
}
- sService.notifyPollingLoop(pollingFrame);
+ call.call();
} catch (RemoteException e) {
attemptDeadServiceRecovery(e);
// Try one more time
@@ -2849,39 +2606,46 @@ public final class NfcAdapter {
return;
}
try {
- sService.notifyPollingLoop(pollingFrame);
+ call.call();
} catch (RemoteException ee) {
Log.e(TAG, "Failed to recover NFC Service.");
}
}
}
-
- /**
- * Notifies the system of a an HCE session being deactivated.
- * *
- * @hide
- */
- @TestApi
- @FlaggedApi(Flags.FLAG_NFC_READ_POLLING_LOOP)
- public void notifyHceDeactivated() {
+ interface ServiceCallReturn<T> {
+ T call() throws RemoteException;
+ }
+ <T> T callServiceReturn(ServiceCallReturn<T> call, T defaultReturn) {
try {
if (sService == null) {
attemptDeadServiceRecovery(null);
}
- sService.notifyHceDeactivated();
+ return call.call();
} catch (RemoteException e) {
attemptDeadServiceRecovery(e);
// Try one more time
if (sService == null) {
Log.e(TAG, "Failed to recover NFC Service.");
- return;
+ return defaultReturn;
}
try {
- sService.notifyHceDeactivated();
+ return call.call();
} catch (RemoteException ee) {
Log.e(TAG, "Failed to recover NFC Service.");
}
}
+ return defaultReturn;
+ }
+
+ /**
+ * Notifies the system of a an HCE session being deactivated.
+ * *
+ * @hide
+ */
+ @TestApi
+ @FlaggedApi(Flags.FLAG_NFC_READ_POLLING_LOOP)
+ public void notifyHceDeactivated() {
+ callService(() -> sService.notifyHceDeactivated());
}
/**
@@ -2897,22 +2661,7 @@ public final class NfcAdapter {
if (!sHasNfcWlcFeature) {
throw new UnsupportedOperationException();
}
- try {
- return sService.setWlcEnabled(enable);
- } catch (RemoteException e) {
- attemptDeadServiceRecovery(e);
- // Try one more time
- if (sService == null) {
- Log.e(TAG, "Failed to recover NFC Service.");
- return false;
- }
- try {
- return sService.setWlcEnabled(enable);
- } catch (RemoteException ee) {
- Log.e(TAG, "Failed to recover NFC Service.");
- }
- return false;
- }
+ return callServiceReturn(() -> sService.setWlcEnabled(enable), false);
}
/**
@@ -2927,22 +2676,8 @@ public final class NfcAdapter {
if (!sHasNfcWlcFeature) {
throw new UnsupportedOperationException();
}
- try {
- return sService.isWlcEnabled();
- } catch (RemoteException e) {
- attemptDeadServiceRecovery(e);
- // Try one more time
- if (sService == null) {
- Log.e(TAG, "Failed to recover NFC Service.");
- return false;
- }
- try {
- return sService.isWlcEnabled();
- } catch (RemoteException ee) {
- Log.e(TAG, "Failed to recover NFC Service.");
- }
- return false;
- }
+ return callServiceReturn(() -> sService.isWlcEnabled(), false);
+
}
/**
@@ -3021,22 +2756,8 @@ public final class NfcAdapter {
if (!sHasNfcWlcFeature) {
throw new UnsupportedOperationException();
}
- try {
- return sService.getWlcListenerDeviceInfo();
- } catch (RemoteException e) {
- attemptDeadServiceRecovery(e);
- // Try one more time
- if (sService == null) {
- Log.e(TAG, "Failed to recover NFC Service.");
- return null;
- }
- try {
- return sService.getWlcListenerDeviceInfo();
- } catch (RemoteException ee) {
- Log.e(TAG, "Failed to recover NFC Service.");
- }
- return null;
- }
+ return callServiceReturn(() -> sService.getWlcListenerDeviceInfo(), null);
+
}
/**
diff --git a/nfc/java/android/nfc/NfcAntennaInfo.java b/nfc/java/android/nfc/NfcAntennaInfo.java
index b002ca21e8e3..c57b2e029cc5 100644
--- a/nfc/java/android/nfc/NfcAntennaInfo.java
+++ b/nfc/java/android/nfc/NfcAntennaInfo.java
@@ -64,9 +64,9 @@ public final class NfcAntennaInfo implements Parcelable {
/**
* Whether the device is foldable. When the device is foldable,
- * the 0, 0 is considered to be bottom-left when the device is unfolded and
+ * the 0, 0 is considered to be top-left when the device is unfolded and
* the screens are facing the user. For non-foldable devices 0, 0
- * is bottom-left when the user is facing the screen.
+ * is top-left when the user is facing the screen.
*/
public boolean isDeviceFoldable() {
return mDeviceFoldable;
diff --git a/packages/BackupRestoreConfirmation/res/values-el/strings.xml b/packages/BackupRestoreConfirmation/res/values-el/strings.xml
index 02234990606c..7142edf17c69 100644
--- a/packages/BackupRestoreConfirmation/res/values-el/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-el/strings.xml
@@ -16,7 +16,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="backup_confirm_title" msgid="827563724209303345">"Πλήρης δημιουργία αντιγράφων ασφαλείας"</string>
+ <string name="backup_confirm_title" msgid="827563724209303345">"Πλήρης δημιουργία αντιγράφου ασφαλείας"</string>
<string name="restore_confirm_title" msgid="5469365809567486602">"Πλήρης επαναφορά"</string>
<string name="backup_confirm_text" msgid="1878021282758896593">"Έχει ζητηθεί ένα πλήρες αντίγραφο ασφαλείας όλων των δεδομένων σε έναν συνδεδεμένο επιτραπέζιο υπολογιστή. Θέλετε να επιτραπεί αυτή η ενέργεια;\n\nΑν δεν έχετε ζητήσει οι ίδιοι αυτό το αντίγραφο ασφαλείας, μην επιτρέψετε την ενέργεια."</string>
<string name="allow_backup_button_label" msgid="4217228747769644068">"Δημιουργία αντιγράφων ασφαλείας για τα δεδομένα μου"</string>
diff --git a/packages/CarrierDefaultApp/res/values-fr-rCA/strings.xml b/packages/CarrierDefaultApp/res/values-fr-rCA/strings.xml
index 54dae628ba88..91da7dcdf977 100644
--- a/packages/CarrierDefaultApp/res/values-fr-rCA/strings.xml
+++ b/packages/CarrierDefaultApp/res/values-fr-rCA/strings.xml
@@ -16,7 +16,7 @@
<string name="ssl_error_continue" msgid="1138548463994095584">"Continuer quand même dans un navigateur"</string>
<string name="performance_boost_notification_channel" msgid="3475440855635538592">"Optimiseur de performances"</string>
<string name="performance_boost_notification_title" msgid="3126203390685781861">"Options 5G de votre fournisseur de services"</string>
- <string name="performance_boost_notification_detail" msgid="216569851036236346">"Consultez le site Web de %s pour voir les options concernant votre expérience de l\'application"</string>
+ <string name="performance_boost_notification_detail" msgid="216569851036236346">"Consultez le site Web de %s pour voir les options concernant votre expérience de l\'appli"</string>
<string name="performance_boost_notification_button_not_now" msgid="6459755324243683785">"Plus tard"</string>
<string name="performance_boost_notification_button_manage" msgid="4976836444046497973">"Gérer"</string>
<string name="slice_purchase_app_label" msgid="7170191659233241166">"Achetez un optimiseur de performances."</string>
diff --git a/packages/CompanionDeviceManager/res/values-fr-rCA/strings.xml b/packages/CompanionDeviceManager/res/values-fr-rCA/strings.xml
index 97abef773a52..5b5896109846 100644
--- a/packages/CompanionDeviceManager/res/values-fr-rCA/strings.xml
+++ b/packages/CompanionDeviceManager/res/values-fr-rCA/strings.xml
@@ -17,20 +17,20 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="app_label" msgid="4470785958457506021">"Gestionnaire d\'appareil compagnon"</string>
- <string name="confirmation_title" msgid="2244241995958340998">"Autoriser l\'application &lt;strong&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/strong&gt; à accéder à &lt;strong&gt;<xliff:g id="DEVICE_NAME">%2$s</xliff:g>&lt;/strong&gt;?"</string>
+ <string name="confirmation_title" msgid="2244241995958340998">"Autoriser l\'appli &lt;strong&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/strong&gt; à accéder à &lt;strong&gt;<xliff:g id="DEVICE_NAME">%2$s</xliff:g>&lt;/strong&gt;?"</string>
<string name="profile_name_watch" msgid="576290739483672360">"montre"</string>
<string name="chooser_title_non_profile" msgid="6035023914517087400">"Choisir un appareil qui sera géré par &lt;strong&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/strong&gt;"</string>
<string name="chooser_title" msgid="2235819929238267637">"Choisir un appareil (<xliff:g id="PROFILE_NAME">%1$s</xliff:g>) pour le configurer"</string>
- <string name="summary_watch" msgid="7962014927042971830">"Cette application sera autorisée à synchroniser des informations, comme le nom de l\'appelant, et à accéder à ces autorisations sur votre <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
+ <string name="summary_watch" msgid="7962014927042971830">"Cette appli sera autorisée à synchroniser des informations, comme le nom de l\'appelant, et à accéder à ces autorisations sur votre <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
<string name="confirmation_title_glasses" msgid="8288346850537727333">"Autoriser &lt;strong&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/strong&gt; à gérer &lt;strong&gt;<xliff:g id="DEVICE_NAME">%2$s</xliff:g>&lt;/strong&gt;?"</string>
<string name="profile_name_glasses" msgid="3506504967216601277">"appareil"</string>
- <string name="summary_glasses" msgid="2872254734959842579">"Cette application pourra accéder à ces autorisations sur votre <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
+ <string name="summary_glasses" msgid="2872254734959842579">"Cette appli pourra accéder à ces autorisations sur votre <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
<string name="title_app_streaming" msgid="2270331024626446950">"Autorisez &lt;strong&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/strong&gt; à accéder à ces informations à partir de votre téléphone"</string>
- <string name="title_app_streaming_with_mirroring" msgid="3364582597581570658">"Autoriser &lt;strong&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/strong&gt; à diffuser les applications de votre téléphone?"</string>
- <string name="summary_app_streaming" msgid="295548145144086753">"%1$s aura accès à tout ce qui est visible ou lu sur le téléphone, y compris l\'audio, les photos, les mots de passe et les messages.&lt;br/&gt;&lt;br/&gt;%1$s pourra diffuser des applications jusqu\'à ce que vous retiriez l\'accès à cette autorisation."</string>
+ <string name="title_app_streaming_with_mirroring" msgid="3364582597581570658">"Autoriser &lt;strong&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/strong&gt; à diffuser les applis de votre téléphone?"</string>
+ <string name="summary_app_streaming" msgid="295548145144086753">"%1$s aura accès à tout ce qui est visible ou lu sur le téléphone, y compris l\'audio, les photos, les mots de passe et les messages.&lt;br/&gt;&lt;br/&gt;%1$s pourra diffuser des applis jusqu\'à ce que vous retiriez l\'accès à cette autorisation."</string>
<string name="helper_title_app_streaming" msgid="4151687003439969765">"Services multiappareils"</string>
- <string name="helper_summary_app_streaming" msgid="2396773196949578425">"<xliff:g id="APP_NAME">%1$s</xliff:g> demande l\'autorisation au nom de votre <xliff:g id="DISPLAY_NAME">%2$s</xliff:g> pour diffuser des applications entre vos appareils"</string>
- <string name="helper_summary_app_streaming_with_mirroring" msgid="6138581029144467467">"<xliff:g id="APP_NAME">%1$s</xliff:g> demande l\'autorisation, au nom de votre <xliff:g id="DISPLAY_NAME">%2$s</xliff:g>, d\'afficher et de diffuser des applications entre vos appareils"</string>
+ <string name="helper_summary_app_streaming" msgid="2396773196949578425">"<xliff:g id="APP_NAME">%1$s</xliff:g> demande l\'autorisation au nom de votre <xliff:g id="DISPLAY_NAME">%2$s</xliff:g> pour diffuser des applis entre vos appareils"</string>
+ <string name="helper_summary_app_streaming_with_mirroring" msgid="6138581029144467467">"<xliff:g id="APP_NAME">%1$s</xliff:g> demande l\'autorisation, au nom de votre <xliff:g id="DISPLAY_NAME">%2$s</xliff:g>, d\'afficher et de diffuser des applis entre vos appareils"</string>
<string name="title_automotive_projection" msgid="3296005598978412847"></string>
<string name="summary_automotive_projection" msgid="8683801274662496164"></string>
<string name="title_computer" msgid="4693714143506569253">"Autorisez &lt;strong&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/strong&gt; à accéder à ces informations à partir de votre téléphone"</string>
@@ -38,18 +38,18 @@
<string name="helper_title_computer" msgid="4671071173916176037">"Services Google Play"</string>
<string name="helper_summary_computer" msgid="8774832742608187072">"<xliff:g id="APP_NAME">%1$s</xliff:g> demande l\'autorisation au nom de votre <xliff:g id="DISPLAY_NAME">%2$s</xliff:g> pour accéder aux photos, aux fichiers multimédias et aux notifications de votre téléphone"</string>
<string name="title_nearby_device_streaming" msgid="7269956847378799794">"Autoriser &lt;strong&gt;<xliff:g id="DEVICE_NAME">%1$s</xliff:g>&lt;/strong&gt; à effectuer cette action?"</string>
- <string name="title_nearby_device_streaming_with_mirroring" msgid="242855799919611657">"Autoriser &lt;strong&gt;<xliff:g id="DEVICE_NAME">%1$s</xliff:g>&lt;/strong&gt; à diffuser les applications et les fonctionnalités du système de votre téléphone?"</string>
- <string name="summary_nearby_device_streaming" msgid="4039565463149145573">"%1$s aura accès à tout ce qui est visible ou lu sur le téléphone, y compris l\'audio, les photos, les renseignements de paiement, les mots de passe et les messages.&lt;br/&gt;&lt;br/&gt;%1$s pourra diffuser des applications jusqu\'à ce que vous retiriez l\'accès à cette autorisation."</string>
- <string name="helper_summary_nearby_device_streaming" msgid="2063965070936844876">"<xliff:g id="APP_NAME">%1$s</xliff:g> demande l\'autorisation, au nom de votre <xliff:g id="DEVICE_NAME">%2$s</xliff:g>, de diffuser des applications et d\'autres fonctionnalités du système sur des appareils à proximité"</string>
+ <string name="title_nearby_device_streaming_with_mirroring" msgid="242855799919611657">"Autoriser &lt;strong&gt;<xliff:g id="DEVICE_NAME">%1$s</xliff:g>&lt;/strong&gt; à diffuser les applis et les fonctionnalités du système de votre téléphone?"</string>
+ <string name="summary_nearby_device_streaming" msgid="4039565463149145573">"%1$s aura accès à tout ce qui est visible ou lu sur le téléphone, y compris l\'audio, les photos, les renseignements de paiement, les mots de passe et les messages.&lt;br/&gt;&lt;br/&gt;%1$s pourra diffuser des applis jusqu\'à ce que vous retiriez l\'accès à cette autorisation."</string>
+ <string name="helper_summary_nearby_device_streaming" msgid="2063965070936844876">"<xliff:g id="APP_NAME">%1$s</xliff:g> demande l\'autorisation, au nom de votre <xliff:g id="DEVICE_NAME">%2$s</xliff:g>, de diffuser des applis et d\'autres fonctionnalités du système sur des appareils à proximité"</string>
<string name="profile_name_generic" msgid="6851028682723034988">"appareil"</string>
- <string name="summary_generic" msgid="1761976003668044801">"Cette application pourra synchroniser des informations, comme le nom de l\'appelant, entre votre téléphone et l\'appareil sélectionné"</string>
+ <string name="summary_generic" msgid="1761976003668044801">"Cette appli pourra synchroniser des informations, comme le nom de l\'appelant, entre votre téléphone et l\'appareil sélectionné"</string>
<string name="consent_yes" msgid="8344487259618762872">"Autoriser"</string>
<string name="consent_no" msgid="2640796915611404382">"Ne pas autoriser"</string>
<string name="consent_cancel" msgid="5655005528379285841">"Annuler"</string>
<string name="consent_back" msgid="2560683030046918882">"Retour"</string>
<string name="permission_expand" msgid="893185038020887411">"Développer <xliff:g id="PERMISSION_TYPE">%1$s</xliff:g>"</string>
<string name="permission_collapse" msgid="3320833884220844084">"Réduire <xliff:g id="PERMISSION_TYPE">%1$s</xliff:g>"</string>
- <string name="permission_sync_confirmation_title" msgid="4409622174437248702">"Accorder aux applications sur &lt;strong&gt;<xliff:g id="COMPANION_DEVICE_NAME">%1$s</xliff:g>&lt;/strong&gt; les autorisations déjà accordées sur &lt;strong&gt;<xliff:g id="PRIMARY_DEVICE_NAME">%2$s</xliff:g>&lt;/strong&gt;?"</string>
+ <string name="permission_sync_confirmation_title" msgid="4409622174437248702">"Accorder aux applis sur &lt;strong&gt;<xliff:g id="COMPANION_DEVICE_NAME">%1$s</xliff:g>&lt;/strong&gt; les autorisations déjà accordées sur &lt;strong&gt;<xliff:g id="PRIMARY_DEVICE_NAME">%2$s</xliff:g>&lt;/strong&gt;?"</string>
<string name="permission_sync_summary" msgid="765497944331294275">"Cela peut inclure l\'accès &lt;strong&gt;au microphone&lt;/strong&gt;, &lt;strong&gt;à l\'appareil photo&lt;/strong&gt;, et &lt;strong&gt;à la position&lt;/strong&gt;, ainsi que d\'autres autorisations sensibles sur &lt;strong&gt;<xliff:g id="COMPANION_DEVICE_NAME_0">%1$s</xliff:g>&lt;/strong&gt;. &lt;br/&gt;&lt;br/&gt;Vous pouvez modifier ces autorisations à tout moment dans vos paramètres sur &lt;strong&gt;<xliff:g id="COMPANION_DEVICE_NAME_1">%1$s</xliff:g>&lt;/strong&gt;."</string>
<string name="vendor_header_button_description" msgid="7994879208461111473">"Plus de renseignements"</string>
<string name="permission_phone" msgid="2661081078692784919">"Téléphone"</string>
@@ -62,7 +62,7 @@
<string name="permission_media_routing_control" msgid="5498639511586715253">"Modifier la sortie multimédia"</string>
<string name="permission_storage" msgid="6831099350839392343">"Photos et fichiers multimédias"</string>
<string name="permission_notifications" msgid="4099418516590632909">"Notifications"</string>
- <string name="permission_app_streaming" msgid="6009695219091526422">"Applications"</string>
+ <string name="permission_app_streaming" msgid="6009695219091526422">"Applis"</string>
<string name="permission_nearby_device_streaming" msgid="1023325519477349499">"Diffusion en continu"</string>
<string name="permission_phone_summary" msgid="8246321093970051702">"Passez et gérez des appels téléphoniques"</string>
<string name="permission_call_logs_summary" msgid="7545243592757693321">"Lisez et écrivez le journal d\'appels téléphoniques"</string>
@@ -72,11 +72,11 @@
<string name="permission_microphone_summary" msgid="4862628553869973259">"Enregistrez des fichiers audio"</string>
<string name="permission_nearby_devices_summary" msgid="1306752848196464817">"Trouvez et déterminez la position relative des appareils à proximité, et connectez-vous à ceux-ci"</string>
<string name="permission_notification_listener_access_summary" msgid="7856071768185367749">"Lisez toutes les notifications, y compris les renseignements tels que les contacts, les messages et les photos"</string>
- <string name="permission_notifications_summary" msgid="2272810466047367030">"• Lisez toutes les notifications, y compris les renseignements tels que les contacts, les messages et les photos&lt;br/&gt;• Envoyez des notifications&lt;br/&gt;&lt;br/&gt;Vous pouvez gérer la capacité de cette application à lire et à envoyer des notifications à tout moment dans Paramètres > Notifications."</string>
- <string name="permission_app_streaming_summary" msgid="606923325679670624">"Diffusez les applications de votre téléphone"</string>
+ <string name="permission_notifications_summary" msgid="2272810466047367030">"• Lisez toutes les notifications, y compris les renseignements tels que les contacts, les messages et les photos&lt;br/&gt;• Envoyez des notifications&lt;br/&gt;&lt;br/&gt;Vous pouvez gérer la capacité de cette appli à lire et à envoyer des notifications à tout moment dans Paramètres > Notifications."</string>
+ <string name="permission_app_streaming_summary" msgid="606923325679670624">"Diffusez les applis de votre téléphone"</string>
<string name="permission_storage_summary" msgid="3918240895519506417"></string>
- <string name="permission_nearby_device_streaming_summary" msgid="8280824871197081246">"Diffusez des applications et d\'autres fonctionnalités du système à partir de votre téléphone"</string>
- <string name="permission_media_routing_control_summary" msgid="2714631092321412250">"Accédez à une liste d\'appareils accessibles et contrôlez ceux qui diffusent du contenu audio ou vidéo à partir d\'autres applications"</string>
+ <string name="permission_nearby_device_streaming_summary" msgid="8280824871197081246">"Diffusez des applis et d\'autres fonctionnalités du système à partir de votre téléphone"</string>
+ <string name="permission_media_routing_control_summary" msgid="2714631092321412250">"Accédez à une liste d\'appareils accessibles et contrôlez ceux qui diffusent du contenu audio ou vidéo à partir d\'autres applis"</string>
<string name="device_type" product="default" msgid="8268703872070046263">"téléphone"</string>
<string name="device_type" product="tablet" msgid="5038791954983067774">"tablette"</string>
</resources>
diff --git a/packages/CompanionDeviceManager/src/com/android/companiondevicemanager/CompanionAssociationActivity.java b/packages/CompanionDeviceManager/src/com/android/companiondevicemanager/CompanionAssociationActivity.java
index 66ab81bf02b1..e00533422072 100644
--- a/packages/CompanionDeviceManager/src/com/android/companiondevicemanager/CompanionAssociationActivity.java
+++ b/packages/CompanionDeviceManager/src/com/android/companiondevicemanager/CompanionAssociationActivity.java
@@ -554,11 +554,18 @@ public class CompanionAssociationActivity extends FragmentActivity implements
mSelectedDevice = requireNonNull(selectedDevice);
Slog.d(TAG, "onDeviceClicked(): " + mSelectedDevice.toShortString());
-
+ // The permission consent dialog should not be displayed if it's a isSkipPrompt(true)
+ // AssociationRequest or when there is no device profile available
+ // for the multiple devices dialog.
+ // See AssociationRequestsProcessor#mayAssociateWithoutPrompt.
+ final String deviceProfile = mRequest.getDeviceProfile();
+ if (deviceProfile == null || mRequest.isSkipPrompt()) {
+ onUserSelectedDevice(mSelectedDevice);
+ return;
+ }
+ // The permission consent dialog should be displayed for the multiple device
+ // dialog if a device profile exists.
updateSingleDeviceUi();
-
- if (mRequest.isSkipPrompt()) return;
-
mSummary.setVisibility(View.VISIBLE);
mButtonAllow.setVisibility(View.VISIBLE);
mButtonNotAllow.setVisibility(View.VISIBLE);
@@ -588,9 +595,6 @@ public class CompanionAssociationActivity extends FragmentActivity implements
if (deviceProfile == null && mRequest.isSingleDevice()) {
summary = getHtmlFromResources(this, summaryResourceId, remoteDeviceName);
mConstraintList.setVisibility(View.GONE);
- } else if (deviceProfile == null) {
- onUserSelectedDevice(mSelectedDevice);
- return;
} else {
summary = getHtmlFromResources(
this, summaryResourceId, getString(R.string.device_type));
diff --git a/packages/CrashRecovery/aconfig/flags.aconfig b/packages/CrashRecovery/aconfig/flags.aconfig
index 225f8c685fe1..52e0cbbda03a 100644
--- a/packages/CrashRecovery/aconfig/flags.aconfig
+++ b/packages/CrashRecovery/aconfig/flags.aconfig
@@ -31,3 +31,11 @@ flag {
description: "Deletes flag and settings resets"
bug: "333847376"
}
+
+flag {
+ name: "refactor_crashrecovery"
+ namespace: "modularization"
+ description: "Refactor required CrashRecovery code"
+ bug: "289203818"
+ is_fixed_read_only: true
+}
diff --git a/packages/CredentialManager/res/values-el/strings.xml b/packages/CredentialManager/res/values-el/strings.xml
index 2f3aa0bce6f2..8436e21f01d3 100644
--- a/packages/CredentialManager/res/values-el/strings.xml
+++ b/packages/CredentialManager/res/values-el/strings.xml
@@ -53,7 +53,7 @@
<string name="save_password_on_other_device_title" msgid="5829084591948321207">"Θέλετε να αποθηκεύσετε τον κωδικό πρόσβασης σε κάποια άλλη συσκευή;"</string>
<string name="save_sign_in_on_other_device_title" msgid="2827990118560134692">"Θέλετε να αποθηκεύσετε τα στοιχεία σύνδεσης σε κάποια άλλη συσκευή;"</string>
<string name="use_provider_for_all_title" msgid="4201020195058980757">"Να χρησιμοποιηθεί το <xliff:g id="PROVIDERINFODISPLAYNAME">%1$s</xliff:g> για όλες τις συνδέσεις σας;"</string>
- <string name="use_provider_for_all_description" msgid="1998772715863958997">"Αυτός ο διαχειριστής κωδικών πρόσβασης για τον χρήστη <xliff:g id="USERNAME">%1$s</xliff:g> θα αποθηκεύει τους κωδικούς και τα κλειδιά πρόσβασης, για πιο εύκολη σύνδεση"</string>
+ <string name="use_provider_for_all_description" msgid="1998772715863958997">"Αυτή η διαχείριση κωδικών πρόσβασης για τον χρήστη <xliff:g id="USERNAME">%1$s</xliff:g> θα αποθηκεύει τους κωδικούς και τα κλειδιά πρόσβασης, για πιο εύκολη σύνδεση"</string>
<string name="set_as_default" msgid="4415328591568654603">"Ορισμός ως προεπιλογής"</string>
<string name="settings" msgid="6536394145760913145">"Ρυθμίσεις"</string>
<string name="use_once" msgid="9027366575315399714">"Χρήση μία φορά"</string>
diff --git a/packages/CredentialManager/res/values-fr-rCA/strings.xml b/packages/CredentialManager/res/values-fr-rCA/strings.xml
index d9715eefa955..d68de9fcd27c 100644
--- a/packages/CredentialManager/res/values-fr-rCA/strings.xml
+++ b/packages/CredentialManager/res/values-fr-rCA/strings.xml
@@ -32,9 +32,9 @@
<string name="passwordless_technology_title" msgid="2497513482056606668">"Technologie sans mot de passe"</string>
<string name="passwordless_technology_detail" msgid="6853928846532955882">"Les clés d\'accès vous permettent de vous connecter sans utiliser de mots de passe. Il vous suffit d\'utiliser votre empreinte digitale, la reconnaissance faciale, un NIP ou un schéma de balayage pour vérifier votre identité et créer un mot de passe."</string>
<string name="public_key_cryptography_title" msgid="6751970819265298039">"Cryptographie à clé publique"</string>
- <string name="public_key_cryptography_detail" msgid="6937631710280562213">"Selon les normes de l\'Alliance FIDO (y compris Google, Apple, Microsoft et plus) et du W3C, les clés d\'accès utilisent des biclés cryptographiques. Contrairement au nom d\'utilisateur et à la chaîne de caractères que nous utilisons pour les mots de passe, une biclé privée-publique est créée pour une application ou un site Web. La clé privée est stockée en toute sécurité sur votre appareil ou votre gestionnaire de mots de passe et confirme votre identité. La clé publique est partagée avec le serveur de l\'application ou du site Web. Avec les clés correspondantes, vous pouvez vous inscrire et vous connecter instantanément."</string>
+ <string name="public_key_cryptography_detail" msgid="6937631710280562213">"Selon les normes de l\'Alliance FIDO (y compris Google, Apple, Microsoft et plus) et du W3C, les clés d\'accès utilisent des biclés cryptographiques. Contrairement au nom d\'utilisateur et à la chaîne de caractères que nous utilisons pour les mots de passe, une biclé privée-publique est créée pour une appli ou un site Web. La clé privée est stockée en toute sécurité sur votre appareil ou votre gestionnaire de mots de passe et confirme votre identité. La clé publique est partagée avec le serveur de l\'appli ou du site Web. Avec les clés correspondantes, vous pouvez vous inscrire et vous connecter instantanément."</string>
<string name="improved_account_security_title" msgid="1069841917893513424">"Sécurité accrue du compte"</string>
- <string name="improved_account_security_detail" msgid="9123750251551844860">"Chaque clé est exclusivement liée à l\'application ou au site Web pour lequel elle a été créée, de sorte que vous ne pourrez jamais vous connecter par erreur à une application ou à un site Web frauduleux. En outre, comme les serveurs ne conservent que les clés publiques, le piratage informatique est beaucoup plus difficile."</string>
+ <string name="improved_account_security_detail" msgid="9123750251551844860">"Chaque clé est exclusivement liée à l\'appli ou au site Web pour lequel elle a été créée, de sorte que vous ne pourrez jamais vous connecter par erreur à une appli ou à un site Web frauduleux. En outre, comme les serveurs ne conservent que les clés publiques, le piratage informatique est beaucoup plus difficile."</string>
<string name="seamless_transition_title" msgid="5335622196351371961">"Transition fluide"</string>
<string name="seamless_transition_detail" msgid="4475509237171739843">"À mesure que nous nous dirigeons vers un avenir sans mot de passe, ils resteront toujours utilisés parallèlement aux clés d\'accès."</string>
<string name="choose_provider_title" msgid="8870795677024868108">"Choisir où enregistrer vos <xliff:g id="CREATETYPES">%1$s</xliff:g>"</string>
diff --git a/packages/CredentialManager/res/values-iw/strings.xml b/packages/CredentialManager/res/values-iw/strings.xml
index 46ad865c256b..51f163922203 100644
--- a/packages/CredentialManager/res/values-iw/strings.xml
+++ b/packages/CredentialManager/res/values-iw/strings.xml
@@ -80,7 +80,7 @@
<string name="get_dialog_title_choose_option_for" msgid="4976380044745029107">"רוצה לבחור אפשרות עבור <xliff:g id="APP_NAME">%1$s</xliff:g>?"</string>
<string name="get_dialog_title_use_info_on" msgid="8863708099535435146">"להשתמש במידע הזה בשביל <xliff:g id="APP_NAME">%1$s</xliff:g>?"</string>
<string name="get_dialog_use_saved_passkey_for" msgid="4618100798664888512">"כניסה בדרך אחרת"</string>
- <string name="snackbar_action" msgid="37373514216505085">"הצגת האפשרויות"</string>
+ <string name="snackbar_action" msgid="37373514216505085">"עיון באפשרויות"</string>
<string name="get_dialog_button_label_continue" msgid="6446201694794283870">"המשך"</string>
<string name="get_dialog_title_sign_in_options" msgid="2092876443114893618">"אפשרויות כניסה לחשבון"</string>
<string name="button_label_view_more" msgid="3429098227286495651">"עוד מידע"</string>
diff --git a/packages/CredentialManager/res/values-pa/strings.xml b/packages/CredentialManager/res/values-pa/strings.xml
index 517fd82e614a..309299cbf88c 100644
--- a/packages/CredentialManager/res/values-pa/strings.xml
+++ b/packages/CredentialManager/res/values-pa/strings.xml
@@ -32,7 +32,7 @@
<string name="passwordless_technology_title" msgid="2497513482056606668">"ਪਾਸਵਰਡ ਰਹਿਤ ਤਕਨਾਲੋਜੀ"</string>
<string name="passwordless_technology_detail" msgid="6853928846532955882">"ਪਾਸਕੀਆਂ ਤੁਹਾਨੂੰ ਪਾਸਵਰਡਾਂ \'ਤੇ ਭਰੋਸਾ ਕੀਤੇ ਬਿਨਾਂ ਸਾਈਨ-ਇਨ ਕਰਨ ਦੀ ਆਗਿਆ ਦਿੰਦੀਆਂ ਹਨ। ਤੁਹਾਨੂੰ ਆਪਣੀ ਪਛਾਣ ਦੀ ਪੁਸ਼ਟੀ ਕਰਨ ਅਤੇ ਪਾਸਕੀ ਬਣਾਉਣ ਲਈ ਸਿਰਫ਼ ਆਪਣੇ ਫਿੰਗਰਪ੍ਰਿੰਟ, ਚਿਹਰਾ ਪਛਾਣ, ਪਿੰਨ ਜਾਂ ਸਵਾਈਪ ਪੈਟਰਨ ਦੀ ਵਰਤੋਂ ਕਰਨ ਦੀ ਲੋੜ ਹੈ।"</string>
<string name="public_key_cryptography_title" msgid="6751970819265298039">"ਜਨਤਕ ਕੁੰਜੀ ਕ੍ਰਿਪਟੋਗ੍ਰਾਫ਼ੀ"</string>
- <string name="public_key_cryptography_detail" msgid="6937631710280562213">"FIDO ਗਠਜੋੜ (ਜਿਸ ਵਿੱਚ Google, Apple, Microsoft ਅਤੇ ਹੋਰ ਸ਼ਾਮਲ ਹਨ) ਅਤੇ W3C ਮਿਆਰਾਂ ਦੇ ਆਧਾਰ \'ਤੇ ਪਾਸਕੀਆਂ ਕ੍ਰਿਪਟੋਗ੍ਰਾਫ਼ਿਕ ਕੁੰਜੀਆਂ ਦੇ ਜੋੜੇ ਵਰਤਦੀਆਂ ਹਨ। ਪਾਸਵਰਡ ਲਈ ਵਰਤੀ ਜਾਂਦੀ ਅੱਖਰ-ਚਿੰਨ੍ਹਾਂ ਦੀ ਸਤਰ ਅਤੇ ਵਰਤੋਂਕਾਰ ਨਾਮ ਤੋਂ ਅਲੱਗ, ਐਪ ਜਾਂ ਵੈੱਬਸਾਈਟ ਲਈ ਨਿੱਜੀ-ਜਨਤਕ ਕੁੰਜੀ ਜੋੜਾ ਬਣਾਇਆ ਜਾਂਦਾ ਹੈ। ਨਿੱਜੀ ਕੁੰਜੀ ਤੁਹਾਡੇ ਡੀਵਾਈਸ ਜਾਂ ਪਾਸਵਰਡ ਪ੍ਰਬੰਧਕ \'ਤੇ ਸੁਰੱਖਿਅਤ ਢੰਗ ਨਾਲ ਸਟੋਰ ਕੀਤੀ ਜਾਂਦੀ ਹੈ ਅਤੇ ਤੁਹਾਡੀ ਪਛਾਣ ਦੀ ਪੁਸ਼ਟੀ ਕਰਦੀ ਹੈ। ਜਨਤਕ ਕੁੰਜੀ ਐਪ ਜਾਂ ਵੈੱਬਸਾਈਟ ਸਰਵਰ ਨਾਲ ਸਾਂਝੀ ਕੀਤੀ ਜਾਂਦੀ ਹੈ। ਸੰਬੰਧਿਤ ਕੁੰਜੀਆਂ ਨਾਲ, ਤੁਸੀਂ ਤੁਰੰਤ ਰਜਿਸਟਰ ਅਤੇ ਸਾਈਨ-ਇਨ ਕਰ ਸਕਦੇ ਹੋ।"</string>
+ <string name="public_key_cryptography_detail" msgid="6937631710280562213">"FIDO ਗਠਜੋੜ (Google, Apple, Microsoft ਅਤੇ ਹੋਰ) ਅਤੇ W3C ਮਿਆਰਾਂ ਦੇ ਆਧਾਰ \'ਤੇ ਪਾਸਕੀਆਂ ਕ੍ਰਿਪਟੋਗ੍ਰਾਫ਼ਿਕ ਕੁੰਜੀਆਂ ਦੇ ਜੋੜੇ ਵਰਤਦੀਆਂ ਹਨ। ਪਾਸਵਰਡ ਲਈ ਵਰਤੀ ਜਾਂਦੀ ਅੱਖਰ-ਚਿੰਨ੍ਹਾਂ ਦੀ ਸਤਰ ਅਤੇ ਵਰਤੋਂਕਾਰ ਨਾਮ ਤੋਂ ਅਲੱਗ, ਐਪ ਜਾਂ ਵੈੱਬਸਾਈਟ ਲਈ ਪ੍ਰਾਈਵੇਟ-ਜਨਤਕ ਕੁੰਜੀ ਜੋੜਾ ਬਣਾਇਆ ਜਾਂਦਾ ਹੈ। ਪ੍ਰਾਈਵੇਟ ਕੁੰਜੀ ਤੁਹਾਡੇ ਡੀਵਾਈਸ ਜਾਂ ਪਾਸਵਰਡ ਪ੍ਰਬੰਧਕ \'ਤੇ ਸੁਰੱਖਿਅਤ ਢੰਗ ਨਾਲ ਸਟੋਰ ਕੀਤੀ ਜਾਂਦੀ ਹੈ ਅਤੇ ਤੁਹਾਡੀ ਪਛਾਣ ਦੀ ਪੁਸ਼ਟੀ ਕਰਦੀ ਹੈ। ਜਨਤਕ ਕੁੰਜੀ ਐਪ ਜਾਂ ਵੈੱਬਸਾਈਟ ਸਰਵਰ ਨਾਲ ਸਾਂਝੀ ਕੀਤੀ ਜਾਂਦੀ ਹੈ। ਸੰਬੰਧਿਤ ਕੁੰਜੀਆਂ ਨਾਲ, ਤੁਸੀਂ ਤੁਰੰਤ ਰਜਿਸਟਰ ਅਤੇ ਸਾਈਨ-ਇਨ ਕਰ ਸਕਦੇ ਹੋ।"</string>
<string name="improved_account_security_title" msgid="1069841917893513424">"ਬਿਹਤਰ ਖਾਤਾ ਸੁਰੱਖਿਆ"</string>
<string name="improved_account_security_detail" msgid="9123750251551844860">"ਹਰੇਕ ਕੁੰਜੀ ਖਾਸ ਤੌਰ \'ਤੇ ਉਸ ਐਪ ਜਾਂ ਵੈੱਬਸਾਈਟ ਨਾਲ ਲਿੰਕ ਹੁੰਦੀ ਹੈ ਜਿਸ ਲਈ ਉਹ ਬਣਾਈ ਗਈ ਸੀ, ਇਸ ਲਈ ਤੁਸੀਂ ਕਦੇ ਵੀ ਗਲਤੀ ਨਾਲ ਕਿਸੇ ਧੋਖਾਧੜੀ ਵਾਲੀ ਐਪ ਜਾਂ ਵੈੱਬਸਾਈਟ \'ਤੇ ਸਾਈਨ-ਇਨ ਨਹੀਂ ਕਰ ਸਕਦੇ। ਇਸ ਤੋਂ ਇਲਾਵਾ, ਸਿਰਫ਼ ਜਨਤਕ ਕੁੰਜੀਆਂ ਵਾਲੇ ਸਰਵਰਾਂ \'ਤੇ, ਹੈਕਿੰਗ ਕਰਨਾ ਬਹੁਤ ਔਖਾ ਹੁੰਦਾ ਹੈ।"</string>
<string name="seamless_transition_title" msgid="5335622196351371961">"ਸਹਿਜ ਪਰਿਵਰਤਨ"</string>
diff --git a/packages/CredentialManager/wear/res/values-af/strings.xml b/packages/CredentialManager/wear/res/values-af/strings.xml
new file mode 100644
index 000000000000..44e46f4bef65
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-af/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Eiebewysbestuurder"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Gebruik toegangsleutel?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Gebruik wagwoord?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Maak toe"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Gaan voort"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Aanmeldopsies"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Aanmeldopsies"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Bestuur aanmeldings"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Kies ’n aanmelding"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Kies toegangsleutel"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Kies wagwoord"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Meld aan op foon"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Geen aanmeldinligting nie"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Tik om te ontsluit"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-am/strings.xml b/packages/CredentialManager/wear/res/values-am/strings.xml
new file mode 100644
index 000000000000..4aa4af184752
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-am/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"የመግቢያ ማስረጃ አስተዳዳሪ"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"የይለፍ ቁልፍ ይጠቀማሉ?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"የይለፍ ቃል ይጠቀማሉ?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"አሰናብት"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"ቀጥል"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"የመግቢያ አማራጮች"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"የመግቢያ አማራጮች"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"መግቢያዎችን ያስተዳድሩ"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"መግቢያ ይምረጡ"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"የይለፍ ቁልፍ ይምረጡ"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"የይለፍ ቃል ይምረጡ"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"በስልክ ላይ ግባ"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"ምንም የመግቢያ መረጃ የለም"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"ለመክፈት መታ ያድርጉ"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-ar/strings.xml b/packages/CredentialManager/wear/res/values-ar/strings.xml
new file mode 100644
index 000000000000..43a651ea4300
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-ar/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Credential Manager"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"هل تريد استخدام مفتاح المرور؟"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"هل تريد استخدام كلمة المرور؟"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"إغلاق"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"متابعة"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"خيارات تسجيل الدخول"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"خيارات تسجيل الدخول"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"إداراة عمليات تسجيل الدخول"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"اختيار معلومات تسجيل الدخول"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"اختيار مفتاح المرور"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"اختيار كلمة المرور"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"تسجيل الدخول على الهاتف"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"لا تتوفّر معلومات تسجيل دخول"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"انقر لفتح القفل"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-as/strings.xml b/packages/CredentialManager/wear/res/values-as/strings.xml
new file mode 100644
index 000000000000..7b6055dd5372
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-as/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"ক্ৰিডেনশ্বিয়েল পৰিচালক"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"পাছকী ব্যৱহাৰ কৰিবনে?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"পাছৱৰ্ড ব্যৱহাৰ কৰিবনে?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"অগ্ৰাহ্য কৰক"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"অব্যাহত ৰাখক"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"ছাইন ইন কৰাৰ বিকল্প"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"ছাইন ইন কৰাৰ বিকল্প"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"ছাইন ইন পৰিচালনা কৰক"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"এটা ছাইন ইনৰ উপায় বাছনি কৰক"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"পাছকী বাছনি কৰক"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"পাছৱৰ্ড বাছনি কৰক"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"ফ’নত ছাইন ইন কৰক"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"ছাইন ইনৰ তথ্য নাই"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"আনলক কৰিবলৈ টিপক"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-az/strings.xml b/packages/CredentialManager/wear/res/values-az/strings.xml
new file mode 100644
index 000000000000..3f2700295495
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-az/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Giriş Məlumatları Meneceri"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Giriş açarı istifadə edilsin?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Parol istifadə edilsin?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Ləğv edin"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Davam edin"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Giriş seçimləri"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Giriş seçimləri"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Girişləri idarə edin"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Giriş seçin"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Giriş açarı seçin"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Parol seçin"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Telefonda daxil olun"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Giriş məlumatı yoxdur"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Kiliddən çıxarmaq üçün toxunun"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-b+sr+Latn/strings.xml b/packages/CredentialManager/wear/res/values-b+sr+Latn/strings.xml
new file mode 100644
index 000000000000..fd5a59a87657
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-b+sr+Latn/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Menadžer akreditiva"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Želite da koristite pristupni ključ?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Želite da koristite lozinku?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Odbaci"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Nastavi"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Opcije za prijavljivanje"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Opcije za prijavljivanje"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Upravljajte prijavljivanjima"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Odaberite prijavljivanje"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Odaberite pristupni ključ"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Odaberite lozinku"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Prijavite se na telefonu"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Nema podataka za prijavljivanje"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Dodirnite da biste otključali"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-be/strings.xml b/packages/CredentialManager/wear/res/values-be/strings.xml
new file mode 100644
index 000000000000..275924748e0c
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-be/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Credential Manager"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Выкарыстаць ключ доступу?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Выкарыстаць пароль?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Закрыць"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Працягнуць"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Спосабы ўваходу"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Спосабы ўваходу"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Кіраванне спосабамі ўваходу"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Выберыце спосаб уваходу"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Выберыце ключ доступу"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Выберыце пароль"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Увайсці на тэлефоне"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Няма даных для ўваходу"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Націсніце, каб разблакіраваць"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-bg/strings.xml b/packages/CredentialManager/wear/res/values-bg/strings.xml
new file mode 100644
index 000000000000..0b6b8d5705a2
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-bg/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Мениджър на идентификационни данни"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Искате ли да използвате ключ за достъп?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Искате ли да използвате парола?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Отхвърляне"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Напред"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Опции за влизане в профила"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Опции за влизане в профила"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Управление на данните за вход"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Избиране на данни за вход"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Избиране на ключ за достъп"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Избиране на парола"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Вход в профила на телефона"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Няма данни за вход"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Докоснете, за да отключите"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-bn/strings.xml b/packages/CredentialManager/wear/res/values-bn/strings.xml
new file mode 100644
index 000000000000..a28da2d38a07
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-bn/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"ক্রেডেনশিয়াল ম্যানেজার"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"পাসকী ব্যবহার করতে চান?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"পাসওয়ার্ড ব্যবহার করতে চান?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"বাতিল করুন"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"চালিয়ে যান"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"সাইন-ইন করার বিকল্প"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"সাইন-ইন করার বিকল্প"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"সাইন-ইন সংক্রান্ত ক্রেডেনশিয়াল ম্যানেজ করুন"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"সাইন-ইন করার বিকল্প বেছে নিন"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"পাসকী বেছে নিন"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"পাসওয়ার্ড বেছে নিন"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"ফোনে সাইন-ইন করুন"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"সাইন-ইন সংক্রান্ত তথ্য দেওয়া নেই"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"আনলক করতে ট্যাপ করুন"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-bs/strings.xml b/packages/CredentialManager/wear/res/values-bs/strings.xml
new file mode 100644
index 000000000000..da71c4638f1e
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-bs/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Upravitelj akreditiva"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Koristiti pristupni ključ?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Koristiti lozinku?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Odbaci"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Nastavi"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Načini prijave"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Načini prijave"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Upravljajte prijavama"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Odaberite prijavu"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Odaberite pristupni ključ"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Odaberite lozinku"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Prijavite se na telefonu"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Nema podataka za prijavu"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Dodirnite da otključate"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-ca/strings.xml b/packages/CredentialManager/wear/res/values-ca/strings.xml
new file mode 100644
index 000000000000..6bb5854c98ae
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-ca/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Gestor de credencials"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Vols utilitzar la clau d\'accés?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Vols utilitzar la contrasenya?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Ignora"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Continua"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Opcions d\'inici de sessió"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Opcions d\'inici de sessió"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Gestiona els inicis de sessió"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Tria un inici de sessió"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Tria una clau d\'accés"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Tria una contrasenya"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Inicia la sessió al telèfon"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Sense informació d\'inici de sessió"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Toca per desbloquejar"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-cs/strings.xml b/packages/CredentialManager/wear/res/values-cs/strings.xml
new file mode 100644
index 000000000000..ba60a8c6440a
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-cs/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Správce oprávnění"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Použít přístupový klíč?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Použít heslo?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Zavřít"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Pokračovat"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Možnosti přihlášení"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Možnosti přihlášení"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Spravovat přihlášení"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Vyberte přihlášení"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Vyberte přístupový klíč"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Vyberte heslo"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Přihlásit se z telefonu"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Žádné informace o přihlášení"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Klepnutím odemknete"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-da/strings.xml b/packages/CredentialManager/wear/res/values-da/strings.xml
new file mode 100644
index 000000000000..d4450673ffb6
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-da/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Loginadministrator"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Vil du bruge en adgangsnøgle?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Vil du bruge en adgangskode?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Luk"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Fortsæt"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Loginmetoder"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Loginmetoder"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Administrer loginmetoder"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Vælg et login"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Vælg adgangsnøgle"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Vælg adgangskode"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Log ind via telefonen"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Ingen loginoplysninger"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Tryk for at låse op"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-de/strings.xml b/packages/CredentialManager/wear/res/values-de/strings.xml
new file mode 100644
index 000000000000..b5107c5f158b
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-de/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Credential Manager"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Passkey verwenden?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Passwort verwenden?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Schließen"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Weiter"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Anmeldeoptionen"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Anmeldeoptionen"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Anmeldungen verwalten"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Anmeldung auswählen"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Passkey auswählen"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Passwort auswählen"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Auf dem Smartphone anmelden"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Keine Anmeldedaten"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Zum Entsperren tippen"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-el/strings.xml b/packages/CredentialManager/wear/res/values-el/strings.xml
new file mode 100644
index 000000000000..ca241273022f
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-el/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Διαχείριση διαπιστευτηρίων"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Χρήση κλειδιού πρόσβασης;"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Χρήση κωδικού πρόσβασης;"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Παράβλεψη"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Συνέχεια"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Επιλογές σύνδεσης"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Επιλογές σύνδεσης"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Διαχείριση στοιχείων σύνδεσης"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Επιλογή σύνδεσης"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Επιλογή κλειδιού πρόσβασης"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Επιλογή κωδικού πρόσβασης"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Σύνδεση στο τηλέφωνο"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Δεν υπάρχουν πληροφορίες σύνδεσης"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Πατήστε για ξεκλείδωμα"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-en-rAU/strings.xml b/packages/CredentialManager/wear/res/values-en-rAU/strings.xml
new file mode 100644
index 000000000000..75a0a0067e31
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-en-rAU/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Credential Manager"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Use passkey?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Use password?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Dismiss"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Continue"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Sign-in options"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Sign-in options"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Manage sign-ins"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Choose a sign-in"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Choose passkey"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Choose password"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Sign in on phone"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"No sign-in info"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Tap to unlock"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-en-rCA/strings.xml b/packages/CredentialManager/wear/res/values-en-rCA/strings.xml
new file mode 100644
index 000000000000..a8a2b7aa7f63
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-en-rCA/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Credential Manager"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Use passkey?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Use password?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Dismiss"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Continue"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Sign-in Options"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Sign-in Options"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Manage sign-ins"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Choose a sign in"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Choose passkey"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Choose password"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Sign in on phone"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"No sign-in info"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Tap to unlock"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-en-rGB/strings.xml b/packages/CredentialManager/wear/res/values-en-rGB/strings.xml
new file mode 100644
index 000000000000..75a0a0067e31
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-en-rGB/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Credential Manager"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Use passkey?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Use password?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Dismiss"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Continue"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Sign-in options"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Sign-in options"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Manage sign-ins"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Choose a sign-in"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Choose passkey"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Choose password"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Sign in on phone"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"No sign-in info"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Tap to unlock"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-en-rIN/strings.xml b/packages/CredentialManager/wear/res/values-en-rIN/strings.xml
new file mode 100644
index 000000000000..75a0a0067e31
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-en-rIN/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Credential Manager"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Use passkey?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Use password?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Dismiss"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Continue"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Sign-in options"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Sign-in options"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Manage sign-ins"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Choose a sign-in"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Choose passkey"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Choose password"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Sign in on phone"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"No sign-in info"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Tap to unlock"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-en-rXC/strings.xml b/packages/CredentialManager/wear/res/values-en-rXC/strings.xml
new file mode 100644
index 000000000000..fbdd5cfff1dc
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-en-rXC/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‏‎‎‎‏‏‏‏‎‏‎‏‏‏‏‏‏‏‏‎‎‏‏‎‎‏‏‏‏‎‏‏‎‎‎‏‏‎‎‏‏‎‎‏‎‏‎‏‎‎‎‏‏‎‎‎‏‏‏‏‎‎‏‏‏‏‎‎‏‎‎‏‏‏‏‏‎‎‎‎‎Credential Manager‎‏‎‎‏‎"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‏‎‎‎‏‏‏‏‎‏‎‏‏‏‏‎‎‏‎‎‏‏‏‏‏‎‎‎‏‏‏‎‏‏‏‏‎‎‎‎‏‏‏‏‎‏‎‏‏‏‏‎‏‏‎‏‎‎‏‎‏‏‎‏‏‎‎‏‏‎‎‏‏‏‎‎‏‎Use passkey?‎‏‎‎‏‎"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‏‎‎‎‏‏‏‏‎‏‎‏‏‏‏‏‏‏‎‎‎‎‎‎‏‎‎‏‏‎‏‎‎‎‏‏‏‏‏‎‏‎‎‏‎‏‏‏‎‎‏‏‎‏‏‏‎‏‏‎‎‏‏‎‎‎‎‎‏‎‎‎‏‎‎‎‏‏‎‎‎Use password?‎‏‎‎‏‎"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‏‎‎‎‏‏‏‏‎‏‎‏‏‏‏‎‎‏‏‎‏‏‎‏‏‏‎‏‏‏‎‏‎‎‏‏‎‏‎‎‎‏‏‎‏‏‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‎‎‏‎‎‏‏‎‎‏‎‎‏‎‏‏‎Dismiss‎‏‎‎‏‎"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‏‎‎‎‏‏‏‏‎‏‎‏‏‏‏‏‏‏‏‏‎‏‏‏‏‏‎‎‎‏‎‎‏‏‏‏‎‎‏‏‎‎‎‏‎‎‎‏‏‏‏‎‎‎‎‏‏‏‎‎‏‏‎‏‏‎‎‏‎‎‎‎‏‏‏‏‎‎‎‏‎Continue‎‏‎‎‏‎"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‏‎‎‎‏‏‏‏‎‏‎‏‏‏‎‏‏‏‏‎‎‎‏‏‎‏‏‏‏‎‏‎‎‎‎‎‎‏‎‏‎‎‎‏‎‏‎‎‎‏‏‏‏‎‏‏‎‏‏‎‏‏‎‏‏‏‎‎‎‎‎‎‏‏‏‎‎Sign-in Options‎‏‎‎‏‎"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‏‎‎‎‏‏‏‏‎‏‎‏‏‏‏‏‏‏‎‏‏‏‎‏‎‏‎‎‎‏‎‎‎‏‎‎‎‏‎‏‎‎‏‏‎‏‏‎‏‏‎‎‏‏‏‎‏‎‎‎‎‏‎‎‏‏‎‏‏‎‏‏‏‎‏‏‏‎‎‎‎Sign-in Options‎‏‎‎‏‎"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‏‎‎‎‏‏‏‏‎‏‎‏‏‏‏‏‏‏‎‏‏‏‏‎‎‏‏‎‏‏‎‎‎‏‎‏‏‏‏‏‏‎‎‏‎‎‎‏‏‎‏‎‎‎‎‏‎‎‏‏‎‏‎‏‎‎‏‏‎‏‎‎‏‏‏‏‎‏‎‎‎Manage sign-ins‎‏‎‎‏‎"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‏‎‎‎‏‏‏‏‎‏‎‏‏‏‏‏‎‏‏‎‎‏‎‎‎‏‎‏‏‏‎‏‎‏‏‎‏‎‎‎‏‏‎‏‎‏‏‏‎‎‎‎‏‏‏‎‎‏‎‎‏‎‎‎‎‎‎‎‏‎‏‏‎‎‎‏‎‏‎‎Choose a sign in‎‏‎‎‏‎"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‏‎‎‎‏‏‏‏‎‏‎‏‏‏‏‏‏‏‏‏‎‏‎‏‎‏‏‎‎‏‎‏‎‏‎‏‏‏‎‏‏‏‎‎‏‏‏‎‏‎‏‏‏‏‏‎‏‏‏‎‎‏‏‏‎‏‎‎‎‎‎‏‎‎‏‏‏‎‎‏‎Choose passkey‎‏‎‎‏‎"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‏‎‎‎‏‏‏‏‎‏‎‏‏‏‏‏‏‏‏‎‏‎‎‏‏‎‎‏‏‏‏‎‏‎‏‏‎‏‏‏‎‎‏‎‏‏‎‎‎‎‏‏‏‎‎‎‏‎‎‎‏‏‏‎‎‏‏‎‎‏‎‏‏‎‏‏‏‏‏‎‎Choose password‎‏‎‎‏‎"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‏‎‎‎‏‏‏‏‎‏‎‏‏‏‏‏‏‏‏‎‏‎‎‏‏‎‏‏‏‎‏‎‏‏‎‎‏‎‎‎‎‏‎‏‎‎‏‎‏‏‎‎‏‏‎‎‎‎‎‎‎‏‏‏‎‏‎‏‏‎‎‏‎‎‏‎‎‎‏‏‎Sign in on phone‎‏‎‎‏‎"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‏‎‎‎‏‏‏‏‎‏‎‏‏‏‏‎‏‏‏‎‎‎‎‎‎‎‏‏‎‏‎‎‏‏‎‎‎‎‏‎‏‎‏‎‎‏‏‏‎‎‏‏‏‏‎‏‏‎‏‏‎‎‏‏‏‏‏‎‎‎‏‏‏‏‏‏‎‏‎No sign-in info‎‏‎‎‏‎"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‏‎‎‎‏‏‏‏‎‏‎‏‏‏‏‏‎‏‏‏‎‏‏‏‏‏‏‎‏‏‏‎‎‎‏‎‎‎‏‎‎‎‎‏‎‎‎‏‎‎‏‏‏‏‏‎‎‎‏‏‎‎‎‏‏‏‏‏‎‎‎‎‎‏‏‏‎‎‎‎Tap to unlock‎‏‎‎‏‎"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-es-rUS/strings.xml b/packages/CredentialManager/wear/res/values-es-rUS/strings.xml
new file mode 100644
index 000000000000..97bb3e056ec8
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-es-rUS/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Credential Manager"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"¿Quieres usar una llave de acceso?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"¿Quieres usar una contraseña?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Descartar"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Continuar"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Opción para acceder"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Opción para acceder"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Administrar accesos"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Elige un acceso"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Elige una llave de acceso"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Elige una contraseña"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Acceder desde el teléfono"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"No hay información de acceso"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Presiona para desbloquear"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-es/strings.xml b/packages/CredentialManager/wear/res/values-es/strings.xml
new file mode 100644
index 000000000000..275ac147ce3c
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-es/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Gestor de credenciales"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"¿Usar llave de acceso?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"¿Usar contraseña?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Cerrar"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Continuar"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Opciones de inicio de sesión"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Opciones de inicio de sesión"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Gestionar inicios de sesión"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Elige un inicio de sesión"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Elige una llave de acceso"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Elige una contraseña"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Iniciar sesión en el teléfono"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"No hay información de inicio de sesión"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Toca para desbloquear"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-et/strings.xml b/packages/CredentialManager/wear/res/values-et/strings.xml
new file mode 100644
index 000000000000..c1fdc61e6048
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-et/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Mandaatide haldur"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Kas kasutada pääsuvõtit?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Kas kasutada parooli?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Loobu"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Jätka"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Sisselogimise valikud"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Sisselogimise valikud"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Sisselogimisteabe haldamine"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Valige sisselogimisteave"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Valige pääsuvõti"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Valige parool"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Logi telefonis sisse"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Sisselogimisteave puudub"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Avamiseks puudutage"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-eu/strings.xml b/packages/CredentialManager/wear/res/values-eu/strings.xml
new file mode 100644
index 000000000000..352164b2bb35
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-eu/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Credential Manager"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Sarbide-gako bat erabili nahi duzu?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Pasahitz bat erabili nahi duzu?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Baztertu"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Egin aurrera"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Saioa hasteko moduak"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Saioa hasteko moduak"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Kudeatu saioa hasteko moduak"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Aukeratu saioa hasteko modu bat"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Aukeratu sarbide-gako bat"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Aukeratu pasahitz bat"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Hasi saioa telefonoan"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Ez dago saioa hasteko informaziorik"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Desblokeatzeko, sakatu hau"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-fa/strings.xml b/packages/CredentialManager/wear/res/values-fa/strings.xml
new file mode 100644
index 000000000000..80537695c95c
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-fa/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Credential Manager"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"از گذرکلید استفاده می‌کنید؟"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"از گذرواژه استفاده می‌کنید؟"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"رد کردن"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"ادامه"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"گزینه‌های ورود به سیستم"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"گزینه‌های ورود به سیستم"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"مدیریت ورود به سیستم"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"ورود به سیستم را انتخاب کنید"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"گذرکلید را انتخاب کنید"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"گذرواژه را انتخاب کنید"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"ورود به سیستم در تلفن"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"اطلاعات ورود به سیستم موجود نیست"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"برای باز کردن قفل، تک‌ضرب بزنید"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-fi/strings.xml b/packages/CredentialManager/wear/res/values-fi/strings.xml
new file mode 100644
index 000000000000..855f025e1b81
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-fi/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Kirjautumistietojen hallinta"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Käytetäänkö avainkoodia?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Käytetäänkö salasanaa?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Hylkää"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Jatka"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Kirjautumisvaihtoehdot"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Kirjautumisvaihtoehdot"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Muuta kirjautumistietoja"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Valitse kirjautumistapa"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Valitse avainkoodi"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Valitse salasana"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Kirjaudu sisään puhelimella"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Ei kirjautumistietoja"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Avaa napauttamalla"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-fr-rCA/strings.xml b/packages/CredentialManager/wear/res/values-fr-rCA/strings.xml
new file mode 100644
index 000000000000..6a04cbb29861
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-fr-rCA/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Gestionnaire d\'authentifiants"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Utiliser la clé d\'accès?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Utiliser le mot de passe?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Fermer"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Continuer"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Options de connexion"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Options de connexion"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Gérer les identifiants de connexion"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Choisir un identifiant de connexion"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Choisir la clé d\'accès"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Choisir le mot de passe"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Se connecter sur le téléphone"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Aucun renseignement de connexion"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Toucher pour déverrouiller"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-fr/strings.xml b/packages/CredentialManager/wear/res/values-fr/strings.xml
new file mode 100644
index 000000000000..fbecd31fb95a
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-fr/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Credential Manager"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Utiliser la clé d\'accès ?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Utiliser le mot de passe ?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Ignorer"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Continuer"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Options de connexion"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Options de connexion"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Gérer les connexions"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Choisir une connexion"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Choisir une clé d\'accès"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Choisir un mot de passe"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Se connecter sur le téléphone"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Aucune information de connexion"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Appuyer pour déverrouiller"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-gl/strings.xml b/packages/CredentialManager/wear/res/values-gl/strings.xml
new file mode 100644
index 000000000000..376b08f48d80
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-gl/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Credential Manager"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Queres usar a clave de acceso?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Queres usar o contrasinal?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Pechar"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Continuar"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Opcións de inicio de sesión"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Opcións de inicio de sesión"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Xestionar os métodos de inicio de sesión"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Seleccionar un método de inicio de sesión"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Seleccionar unha clave de acceso"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Seleccionar un contrasinal"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Iniciar sesión no teléfono"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Sen información de inicio de sesión"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Toca para desbloquear"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-gu/strings.xml b/packages/CredentialManager/wear/res/values-gu/strings.xml
new file mode 100644
index 000000000000..ff8d2989253a
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-gu/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"લૉગ ઇન વિગતોના મેનેજર"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"પાસકીનો ઉપયોગ કરીએ?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"પાસવર્ડનો ઉપયોગ કરીએ?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"છોડી દો"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"ચાલુ રાખો"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"સાઇન-ઇનના વિકલ્પો"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"સાઇન-ઇનના વિકલ્પો"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"સાઇન-ઇન મેનેજ કરો"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"સાઇન ઇન કરવાની કોઈ રીત પસંદ કરો"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"પાસકી પસંદ કરો"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"પાસવર્ડ પસંદ કરો"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"ફોન પર સાઇન ઇન કરો"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"કોઈ સાઇન-ઇન માહિતી નથી"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"અનલૉક કરવા માટે ટૅપ કરો"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-hi/strings.xml b/packages/CredentialManager/wear/res/values-hi/strings.xml
new file mode 100644
index 000000000000..a061453e72a4
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-hi/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Credential Manager"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"क्या आपको पासकी का इस्तेमाल करना है?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"क्या आपको पासवर्ड का इस्तेमाल करना है?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"खारिज करें"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"जारी रखें"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"साइन इन करने के विकल्प"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"साइन इन करने के विकल्प"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"साइन-इन क्रेडेंशियल मैनेज करें"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"साइन इन करने का कोई तरीका चुनें"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"कोई पासकी चुनें"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"कोई पासवर्ड चुनें"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"फ़ोन पर साइन इन करें"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"साइन-इन के लिए कोई क्रेडेंशियल मौजूद नहीं है"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"अनलॉक करने के लिए टैप करें"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-hr/strings.xml b/packages/CredentialManager/wear/res/values-hr/strings.xml
new file mode 100644
index 000000000000..2adcad5bf0af
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-hr/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Upravitelj vjerodajnicama"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Želite li upotrijebiti pristupni ključ?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Želite li upotrijebiti zaporku?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Odbaci"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Nastavi"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Opcije prijave"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Opcije prijave"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Upravljanje prijavama"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Odaberite prijavu"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Odaberite pristupni ključ"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Odaberite zaporku"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Prijavite se na telefonu"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Nema podataka o prijavi"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Dodirnite za otključavanje"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-hu/strings.xml b/packages/CredentialManager/wear/res/values-hu/strings.xml
new file mode 100644
index 000000000000..f2cb4975ce4e
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-hu/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Tanúsítványkezelő"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Azonosítókulcsot szeretne használni?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Jelszót szeretne használni?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Elvetés"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Tovább"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Bejelentkezési lehetőségek"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Bejelentkezési lehetőségek"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Bejelentkezési adatok kezelése"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Bejelentkezési mód kiválasztása"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Azonosítókulcs kiválasztása"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Jelszó kiválasztása"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Bejelentkezés telefonon"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Nincsenek bejelentkezési adatok"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Koppintson ide a feloldáshoz"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-hy/strings.xml b/packages/CredentialManager/wear/res/values-hy/strings.xml
new file mode 100644
index 000000000000..cea111294f36
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-hy/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Մուտքի տվյալների կառավարիչ"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Օգտագործե՞լ մուտքի բանալին"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Օգտագործե՞լ գաղտնաբառը"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Փակել"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Շարունակել"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Մուտք գործելու եղանակներ"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Մուտք գործելու եղանակներ"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Մուտքի կառավարում"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Ընտրեք մուտք գործելու եղանակը"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Ընտրեք մուտքի բանալին"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Ընտրեք գաղտնաբառը"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Մուտք գործել հեռախոսում"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Մուտքի տվյալներ չկան"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Հպեք ապակողպելու համար"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-in/strings.xml b/packages/CredentialManager/wear/res/values-in/strings.xml
new file mode 100644
index 000000000000..2e527e253976
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-in/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Credential Manager"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Gunakan kunci sandi?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Gunakan sandi?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Tutup"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Lanjutkan"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Opsi Login"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Opsi Login"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Kelola login"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Pilih login"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Pilih kunci sandi"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Pilih sandi"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Login di ponsel"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Tidak ada info login"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Ketuk untuk membuka kunci"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-is/strings.xml b/packages/CredentialManager/wear/res/values-is/strings.xml
new file mode 100644
index 000000000000..fcd9ce59ee9d
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-is/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Skilríkjastjórnun"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Nota aðgangslykil?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Nota aðgangsorð?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Hunsa"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Halda áfram"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Innskráningarkostir"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Innskráningarkostir"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Stjórna innskráningu"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Velja innskráningu"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Velja aðgangslykil"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Velja aðgangsorð"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Skráðu þig inn á síma"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Engar innskráningarupplýsingar"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Ýttu til að opna"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-it/strings.xml b/packages/CredentialManager/wear/res/values-it/strings.xml
new file mode 100644
index 000000000000..0b398fda87b9
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-it/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Gestore delle credenziali"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Vuoi utilizzare la passkey?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Vuoi utilizzare la password?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Ignora"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Continua"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Opzioni di accesso"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Opzioni di accesso"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Gestisci gli accessi"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Scegli un accesso"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Scegli passkey"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Scegli password"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Accedi dallo smartphone"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Nessun dato di accesso"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Tocca per sbloccare"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-iw/strings.xml b/packages/CredentialManager/wear/res/values-iw/strings.xml
new file mode 100644
index 000000000000..4fb203d43386
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-iw/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Credential Manager"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"להשתמש במפתח גישה?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"להשתמש בסיסמה?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"סגירה"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"המשך"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"אמצעי כניסה"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"אמצעי כניסה"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"ניהול הכניסות"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"בחירת אמצעי כניסה"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"בחירת מפתח גישה"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"בחירת סיסמה"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"כניסה לחשבון בטלפון"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"אין פרטי כניסה"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"צריך להקיש כדי לבטל את הנעילה"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-ja/strings.xml b/packages/CredentialManager/wear/res/values-ja/strings.xml
new file mode 100644
index 000000000000..05a04e32a94d
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-ja/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"認証情報マネージャー"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"パスキーを使用しますか?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"パスワードを使用しますか?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"閉じる"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"続行"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"ログイン オプション"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"ログイン オプション"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"ログインの管理"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"ログインの選択"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"パスキーの選択"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"パスワードの選択"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"スマートフォンでログイン"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"ログイン情報はありません"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"タップしてロック解除"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-ka/strings.xml b/packages/CredentialManager/wear/res/values-ka/strings.xml
new file mode 100644
index 000000000000..2164d1ec7f6a
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-ka/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"ავტორიზაციის მონაცემების მმართველი"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"გსურთ წვდომის გასაღების გამოყენება?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"გსურთ პაროლის გამოყენება?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"დახურვა"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"გაგრძელება"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"სისტემაში შესვლის ვარიანტები"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"სისტემაში შესვლის ვარიანტები"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"სისტემაში შესვლის მართვა"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"სისტემაში შესვლის არჩევა"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"წვდომის გასაღების არჩევა"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"პაროლის არჩევა"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"სისტემაში შესვლა ტელეფონით"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"სისტემაში შესვლისთვის ინფორმაცია არ არის"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"შეეხეთ განსაბლოკად"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-kk/strings.xml b/packages/CredentialManager/wear/res/values-kk/strings.xml
new file mode 100644
index 000000000000..ca6cd7db8998
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-kk/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Тіркелу деректері менеджері"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Кіру кілтін пайдалану керек пе?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Құпия сөзін пайдалану керек пе?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Жабу"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Жалғастыру"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Аккаунтқа кіру әдістері"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Аккаунтқа кіру әдістері"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Аккаунтқа кіру әрекеттерін басқару"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Аккаунтқа кіру жолын таңдаңыз"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Кіру кілтін таңдаңыз"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Құпия сөз таңдаңыз"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Аккаунтқа телефон арқылы кіру"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Аккаунтқа кіру ақпараты жоқ."</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Құлыпты ашу үшін түртіңіз."</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-km/strings.xml b/packages/CredentialManager/wear/res/values-km/strings.xml
new file mode 100644
index 000000000000..9dcaeb87c891
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-km/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Credential Manager"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"ប្រើកូដសម្ងាត់ឬ?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"ប្រើពាក្យ​សម្ងាត់ឬ?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"ច្រានចោល"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"បន្ត"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"ជម្រើសចូលគណនី"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"ជម្រើសចូលគណនី"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"គ្រប់គ្រងការចូល​គណនី"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"ជ្រើសរើសការចូល​គណនី"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"ជ្រើសរើសកូដសម្ងាត់"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"ជ្រើសរើសពាក្យ​សម្ងាត់"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"ចូលនៅលើទូរសព្ទ"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"គ្មានព័ត៌មានចូលគណនីទេ"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"ចុចដើម្បីដោះសោ"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-kn/strings.xml b/packages/CredentialManager/wear/res/values-kn/strings.xml
new file mode 100644
index 000000000000..fc2f65eecf22
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-kn/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"ಕ್ರೆಡೆನ್ಶಿಯಲ್ ಮ್ಯಾನೇಜರ್"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"ಪಾಸ್‌ಕೀ ಅನ್ನು ಬಳಸಬೇಕೆ?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"ಪಾಸ್‌ವರ್ಡ್ ಅನ್ನು ಬಳಸಬೇಕೆ?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"ವಜಾಗೊಳಿಸಿ"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"ಮುಂದುವರಿಸಿ"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"ಸೈನ್ ಇನ್ ಆಯ್ಕೆಗಳು"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"ಸೈನ್ ಇನ್ ಆಯ್ಕೆಗಳು"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"ಸೈನ್-ಇನ್‌ಗಳನ್ನು ನಿರ್ವಹಿಸಿ"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"ಸೈನ್-ಇನ್ ಅನ್ನು ಆರಿಸಿ"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"ಪಾಸ್‌ಕೀ ಅನ್ನು ಆರಿಸಿ"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"ಪಾಸ್‌ವರ್ಡ್ ಅನ್ನು ಆರಿಸಿ"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"ಫೋನ್‌ನಲ್ಲಿ ಸೈನ್ ಇನ್ ಮಾಡಿ"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"ಯಾವುದೇ ಸೈನ್ ಇನ್ ಮಾಹಿತಿಯಿಲ್ಲ"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"ಅನ್‌ಲಾಕ್ ಮಾಡಲು ಟ್ಯಾಪ್ ಮಾಡಿ"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-ko/strings.xml b/packages/CredentialManager/wear/res/values-ko/strings.xml
new file mode 100644
index 000000000000..a07fb2ab6e21
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-ko/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"인증 관리자"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"패스키를 사용하시겠습니까?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"비밀번호를 사용하시겠습니까?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"닫기"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"계속"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"로그인 옵션"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"로그인 옵션"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"로그인 정보 관리"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"로그인 선택"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"패스키 선택"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"비밀번호 선택"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"휴대전화에서 로그인하기"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"로그인 정보 없음"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"탭하여 잠금 해제하기"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-ky/strings.xml b/packages/CredentialManager/wear/res/values-ky/strings.xml
new file mode 100644
index 000000000000..418d2f19dea0
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-ky/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Credential Manager"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Киргизүүчү ачкычты колдоносузбу?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Сырсөздү колдоносузбу?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Жабуу"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Улантуу"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Аккаунтка кирүү параметрлери"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Аккаунтка кирүү параметрлери"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Кирүү параметрлерин тескөө"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Кирүүнү тандаңыз"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Киргизүүчү ачкычты тандаңыз"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Сырсөздү тандаңыз"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Аккаунтка телефондон кирүү"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Аккаунтка кирүү маалыматы жок"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Кулпусун ачуу үчүн таптаңыз"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-lo/strings.xml b/packages/CredentialManager/wear/res/values-lo/strings.xml
new file mode 100644
index 000000000000..c48f88fa921e
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-lo/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"ຕົວຈັດການຂໍ້ມູນການເຂົ້າສູ່ລະບົບ"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"ໃຊ້ກະແຈຜ່ານບໍ?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"ໃຊ້ລະຫັດຜ່ານບໍ?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"ປິດໄວ້"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"ສືບຕໍ່"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"ຕົວເລືອກການເຂົ້າສູ່ລະບົບ"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"ຕົວເລືອກການເຂົ້າສູ່ລະບົບ"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"ຈັດການການເຂົ້າສູ່ລະບົບ"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"ເລືອກການເຂົ້າສູ່ລະບົບ"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"ເລືອກກະແຈຜ່ານ"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"ເລືອກລະຫັດຜ່ານ"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"ເຂົ້າສູ່ລະບົບຢູ່ໂທລະສັບ"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"ບໍ່ມີຂໍ້ມູນການເຂົ້າສູ່ລະບົບ"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"ແຕະເພື່ອປົດລັອກ"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-lt/strings.xml b/packages/CredentialManager/wear/res/values-lt/strings.xml
new file mode 100644
index 000000000000..b313e874d341
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-lt/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Prisijungimo duomenų tvarkytuvė"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Naudoti prieigos raktą?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Naudoti slaptažodį?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Atsisakyti"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Tęsti"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Prisijungimo parinktys"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Prisijungimo parinktys"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Prisijungimo informacijos tvarkymas"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Pasirinkti prisijungimą"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Pasirinkite prieigos raktus"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Pasirinkite slaptažodį"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Prisijungti telefone"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Prisijungimo informacijos nėra"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Palieskite, kad atrakintumėte"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-lv/strings.xml b/packages/CredentialManager/wear/res/values-lv/strings.xml
new file mode 100644
index 000000000000..efeedec1b837
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-lv/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Akreditācijas datu pārvaldnieks"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Vai izmantot piekļuves atslēgu?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Vai izmantot paroli?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Nerādīt"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Turpināt"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Pierakstīšanās opcijas"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Pierakstīšanās opcijas"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Pierakstīšanās informācijas pārvaldība"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Izvēlieties pierakstīšanās veidu"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Izvēlieties piekļuves atslēgu"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Izvēlieties paroli"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Pierakstīties tālrunī"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Nav pierakstīšanās informācijas"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Pieskarieties, lai atbloķētu"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-mk/strings.xml b/packages/CredentialManager/wear/res/values-mk/strings.xml
new file mode 100644
index 000000000000..a4d807388700
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-mk/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Управување со акредитиви"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Да се користи криптографски клуч?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Да се користи лозинка?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Отфрли"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Продолжи"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Опции за најавување"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Опции за најавување"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Управувајте со најавувањата"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Изберете најавување"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Изберете криптографски клуч"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Изберете лозинка"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Најавете се на телефонот"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Нема податоци за најавување"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Допрете за да отклучите"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-ml/strings.xml b/packages/CredentialManager/wear/res/values-ml/strings.xml
new file mode 100644
index 000000000000..a93514809c57
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-ml/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"ക്രെഡൻഷ്യൽ മാനേജർ"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"പാസ്‌കീ ഉപയോഗിക്കുക"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"പാസ്‌വേഡ് ഉപയോഗിക്കണോ?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"ഡിസ്‌മിസ് ചെയ്യുക"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"തുടരുക"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"സൈൻ ഇൻ ചെയ്യൽ ഓപ്ഷനുകൾ"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"സൈൻ ഇൻ ചെയ്യൽ ഓപ്ഷനുകൾ"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"സൈൻ ഇൻ ചെയ്യലുകൾ മാനേജ് ചെയ്യുക"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"ഒരു സൈൻ-ഇൻ തിരഞ്ഞെടുക്കുക"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"പാസ്‌കീ തിരഞ്ഞെടുക്കുക"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"പാസ്‌കീ തിരഞ്ഞെടുക്കുക"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"ഫോണിൽ സൈൻ ഇൻ ചെയ്യുക"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"സൈൻ ഇൻ വിവരങ്ങളൊന്നുമില്ല"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"അൺലോക്ക് ചെയ്യാൻ ടാപ്പ് ചെയ്യുക"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-mn/strings.xml b/packages/CredentialManager/wear/res/values-mn/strings.xml
new file mode 100644
index 000000000000..b5772684102c
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-mn/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Мандат үнэмлэхийн менежер"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Нэвтрэх түлхүүр ашиглах уу?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Нууц үг ашиглах уу?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Хаах"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Үргэлжлүүлэх"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Нэвтрэх сонголт"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Нэвтрэх сонголт"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Нэвтрэх сонголтыг удирдах"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Нэвтрэх сонголт хийх"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Нэвтрэх түлхүүр сонгох"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Нууц үг сонгох"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Утсан дээр нэвтрэх"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Ямар ч нэвтрэх мэдээлэл байхгүй"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Түгжээг тайлахын тулд товшино уу"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-mr/strings.xml b/packages/CredentialManager/wear/res/values-mr/strings.xml
new file mode 100644
index 000000000000..e966d308ec21
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-mr/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"क्रेडेंशियल व्यवस्थापक"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"पासकी वापरायची आहे का?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"पासवर्ड वापरायचा आहे का?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"डिसमिस करा"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"पुढे सुरू ठेवा"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"साइन-इन पर्याय"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"साइन-इन पर्याय"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"साइन-इन व्यवस्थापित करा"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"साइन इन निवडा"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"पासकी निवडा"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"पासवर्ड निवडा"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"फोनवर साइन इन करा"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"साइन-इनची कोणतीही माहिती नाही"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"अनलॉक करण्यासाठी टॅप करा"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-ms/strings.xml b/packages/CredentialManager/wear/res/values-ms/strings.xml
new file mode 100644
index 000000000000..772bf194c77c
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-ms/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Pengurus Bukti Kelayakan"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Gunakan kunci laluan?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Gunakan kata laluan?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Ketepikan"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Teruskan"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Pilihan Log Masuk"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Pilihan Log Masuk"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Urus log masuk"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Pilih log masuk"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Pilih kunci laluan"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Pilih kata laluan"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Log masuk pada telefon"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Tiada maklumat log masuk"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Ketik untuk membuka kunci"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-my/strings.xml b/packages/CredentialManager/wear/res/values-my/strings.xml
new file mode 100644
index 000000000000..7c38b9ef40a8
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-my/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Credential Manager"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"လျှို့ဝှက်ကီး သုံးမလား။"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"စကားဝှက် သုံးမလား။"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"ပယ်ရန်"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"ရှေ့ဆက်ရန်"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"လက်မှတ်ထိုးဝင်နည်းများ"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"လက်မှတ်ထိုးဝင်နည်းများ"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"လက်မှတ်ထိုးဝင်မှုများ စီမံခြင်း"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"လက်မှတ်ထိုးဝင်မှု ရွေးခြင်း"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"လျှို့ဝှက်ကီးရွေးခြင်း"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"စကားဝှက်ရွေးခြင်း"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"ဖုန်းတွင် လက်မှတ်ထိုးဝင်ရန်"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"လက်မှတ်ထိုးဝင်ရန် အချက်အလက် မရှိပါ"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"ဖွင့်ရန် တို့ပါ"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-nb/strings.xml b/packages/CredentialManager/wear/res/values-nb/strings.xml
new file mode 100644
index 000000000000..0c45c9cdb30a
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-nb/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Legitimasjonsbehandling"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Vil du bruke passnøkkel?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Vil du bruke passord?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Lukk"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Fortsett"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Påloggingsalternativer"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Påloggingsalternativer"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Administrer pålogginger"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Velg en pålogging"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Velg passnøkkel"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Velg passord"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Logg på med telefonen"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Ingen påloggingsinformasjon"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Trykk for å låse opp"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-ne/strings.xml b/packages/CredentialManager/wear/res/values-ne/strings.xml
new file mode 100644
index 000000000000..de92acd419c1
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-ne/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"क्रिडेन्सियल म्यानेजर"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"पासकी प्रयोग गर्ने हो?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"पासवर्ड प्रयोग गर्ने हो?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"खारेज गर्नुहोस्"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"जारी राख्नुहोस्"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"साइन इनसम्बन्धी विकल्पहरू"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"साइन इनसम्बन्धी विकल्पहरू"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"साइन इनसम्बन्धी जानकारी व्यवस्थापन गर्नुहोस्"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"साइन इन गर्ने तरिका छनौट गर्नुहोस्"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"पासकी छनौट गर्नुहोस्"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"पासवर्ड छनौट गर्नुहोस्"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"फोनमा साइन इन गर्नुहोस्"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"साइन इनसम्बन्धी जानकारी उपलब्ध छैन"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"अनलक गर्न ट्याप गर्नुहोस्"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-nl/strings.xml b/packages/CredentialManager/wear/res/values-nl/strings.xml
new file mode 100644
index 000000000000..1a15ead6abd2
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-nl/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Manager Inloggegevens"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Toegangssleutel gebruiken?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Wachtwoord gebruiken?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Sluiten"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Doorgaan"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Inlogopties"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Inlogopties"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Logins beheren"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Een login kiezen"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Toegangssleutel kiezen"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Wachtwoord kiezen"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Inloggen op telefoon"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Geen inloggegevens"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Tik om te ontgrendelen"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-or/strings.xml b/packages/CredentialManager/wear/res/values-or/strings.xml
new file mode 100644
index 000000000000..00270de6e26f
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-or/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"କ୍ରେଡେନସିଆଲ ମେନେଜର"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"ପାସକୀ ବ୍ୟବହାର କରିବେ?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"ପାସୱାର୍ଡ ବ୍ୟବହାର କରିବେ?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"ଖାରଜ କରନ୍ତୁ"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"ଜାରି ରଖନ୍ତୁ"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"ସାଇନ-ଇନ ବିକଳ୍ପଗୁଡ଼ିକ"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"ସାଇନ-ଇନ ବିକଳ୍ପଗୁଡ଼ିକ"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"ସାଇନ-ଇନ ପରିଚାଳନା କରନ୍ତୁ"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"ଏକ ସାଇନ ଇନ ବାଛନ୍ତୁ"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"ପାସକୀ ବାଛନ୍ତୁ"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"ପାସୱାର୍ଡ ବାଛନ୍ତୁ"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"ଫୋନରେ ସାଇନ ଇନ କରନ୍ତୁ"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"କୌଣସି ସାଇନ-ଇନ ସୂଚନା ନାହିଁ"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"ଅନଲକ କରିବାକୁ ଟାପ କରନ୍ତୁ"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-pa/strings.xml b/packages/CredentialManager/wear/res/values-pa/strings.xml
new file mode 100644
index 000000000000..a1ba4fd80a6e
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-pa/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"ਕ੍ਰੀਡੈਂਸ਼ੀਅਲ ਪ੍ਰਬੰਧਕ"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"ਕੀ ਪਾਸਕੀ ਨੂੰ ਵਰਤਣਾ ਹੈ?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"ਕੀ ਪਾਸਵਰਡ ਨੂੰ ਵਰਤਣਾ ਹੈ?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"ਖਾਰਜ ਕਰੋ"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"ਜਾਰੀ ਰੱਖੋ"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"ਸਾਈਨ-ਇਨ ਵਿਕਲਪ"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"ਸਾਈਨ-ਇਨ ਵਿਕਲਪ"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"ਸਾਈਨ-ਇਨਾਂ ਦਾ ਪ੍ਰਬੰਧਨ ਕਰੋ"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"ਸਾਈਨ-ਇਨ ਕਰਨ ਦਾ ਵਿਕਲਪ ਚੁਣੋ"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"ਪਾਸਕੀ ਚੁਣੋ"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"ਪਾਸਵਰਡ ਚੁਣੋ"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"ਫ਼ੋਨ \'ਤੇ ਸਾਈਨ-ਇਨ ਕਰੋ"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"ਕੋਈ ਸਾਈਨ-ਇਨ ਜਾਣਕਾਰੀ ਉਪਲਬਧ ਨਹੀਂ ਹੈ"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"ਅਣਲਾਕ ਕਰਨ ਲਈ ਟੈਪ ਕਰੋ"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-pl/strings.xml b/packages/CredentialManager/wear/res/values-pl/strings.xml
new file mode 100644
index 000000000000..345a24a617e1
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-pl/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Credential Manager"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Użyć klucza dostępu?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Użyć hasła?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Zamknij"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Dalej"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Opcje logowania"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Opcje logowania"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Zarządzanie danymi logowania"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Wybierz dane logowania"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Wybierz klucz dostępu"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Wybierz hasło"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Zaloguj się na telefonie"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Brak danych logowania"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Dotknij, aby odblokować"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-pt-rPT/strings.xml b/packages/CredentialManager/wear/res/values-pt-rPT/strings.xml
new file mode 100644
index 000000000000..acec24c31a41
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-pt-rPT/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Gestor de credenciais"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Usar a chave de acesso?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Usar a palavra-passe?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Ignorar"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Continuar"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Opções de início de sessão"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Opções de início de sessão"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Faça a gestão dos inícios de sessão"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Escolha um início de sessão"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Escolha a chave de acesso"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Escolha a palavra-passe"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Iniciar sessão no telemóvel"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Sem informações de início de sessão"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Tocar para desbloquear"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-pt/strings.xml b/packages/CredentialManager/wear/res/values-pt/strings.xml
new file mode 100644
index 000000000000..c451b256b078
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-pt/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Credential Manager"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Usar chave de acesso?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Usar senha?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Dispensar"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Continuar"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Opções de login"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Opções de login"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Gerenciar logins"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Escolher opção de login"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Escolher chave de acesso"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Escolher senha"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Fazer login no smartphone"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Nenhuma informação de login"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Toque para desbloquear"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-ro/strings.xml b/packages/CredentialManager/wear/res/values-ro/strings.xml
new file mode 100644
index 000000000000..adb45ec28c6a
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-ro/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Credential Manager"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Folosești cheia de acces?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Folosești parola?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Închide"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Continuă"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Opțiuni de conectare"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Opțiuni de conectare"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Gestionează datele de conectare"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Alege setul de date de conectare"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Alege cheia de acces"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Alege parola"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Conectează-te pe telefon"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Fără informații de conectare"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Atinge pentru a debloca"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-ru/strings.xml b/packages/CredentialManager/wear/res/values-ru/strings.xml
new file mode 100644
index 000000000000..692e7a7798b9
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-ru/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Менеджер учетных данных"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Использовать ключ доступа?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Использовать пароль?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Закрыть"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Продолжить"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Способы входа"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Способы входа"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Управление входом"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Выберите способ входа"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Выберите ключ доступа"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Выберите пароль"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Войти в аккаунт на телефоне"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Нет данных для входа"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Разблокировать"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-si/strings.xml b/packages/CredentialManager/wear/res/values-si/strings.xml
new file mode 100644
index 000000000000..0849e8eeed34
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-si/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"අක්තපත්‍ර කළමනාකරු"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"මුරයතුර භාවිත කරන්න ද?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"මුරපදය භාවිත කරන්න ද?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"අස් කරන්න"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"ඉදිරියට යන්න"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"පුරනය වීමේ විකල්ප"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"පුරනය වීමේ විකල්ප"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"පුරනය වීම් කළමනාකරණය කරන්න"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"පුරනය වීමක් තෝරා ගන්න"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"මුරයතුර තෝරා ගන්න"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"මුරපදය තෝරා ගන්න"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"දුරකථනයෙන් පුරන්න"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"පුරනය වීමේ තතු නැත"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"අගුළු හැරීමට තට්ටු කරන්න"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-sk/strings.xml b/packages/CredentialManager/wear/res/values-sk/strings.xml
new file mode 100644
index 000000000000..fa40ec651f30
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-sk/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Správca prihlasovacích údajov"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Chcete použiť prístupový kľúč?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Chcete použiť heslo?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Zavrieť"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Pokračovať"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Možnosti prihlásenia"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Možnosti prihlásenia"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Správa prihlasovacích údajov"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Vyberte prihlásenie"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Vyberte prístupový kľúč"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Vyberte heslo"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Prihlásiť sa v telefóne"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Žiadne prihlasovacie údaje"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Odomknite klepnutím"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-sl/strings.xml b/packages/CredentialManager/wear/res/values-sl/strings.xml
new file mode 100644
index 000000000000..b76165edb907
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-sl/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Upravitelj poverilnic"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Želite uporabiti ključ za dostop?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Želite uporabiti geslo?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Opusti"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Naprej"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Možnosti prijave"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Možnosti prijave"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Upravljanje podatkov za prijavo"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Izbira prijave"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Izbira ključa za dostop"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Izbira gesla"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Prijava v telefonu"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Ni nobenih podatkov za prijavo"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Dotaknite se, da odklenete"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-sq/strings.xml b/packages/CredentialManager/wear/res/values-sq/strings.xml
new file mode 100644
index 000000000000..246cd0b6308d
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-sq/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Menaxheri i kredencialeve"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Të përdoret çelësi i kalimit?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Të përdoret fjalëkalimi?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Hiq"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Vazhdo"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Opsionet për identifikimin"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Opsionet për identifikimin"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Menaxho identifikimet"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Zgjidh një identifikim"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Zgjidh çelësin e kalimit"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Zgjidh fjalëkalimin"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Identifikohu në telefon"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Nuk ka informacione për identifikimin"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Trokit për të shkyçur"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-sr/strings.xml b/packages/CredentialManager/wear/res/values-sr/strings.xml
new file mode 100644
index 000000000000..97cdcbcd99ca
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-sr/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Менаџер акредитива"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Желите да користите приступни кључ?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Желите да користите лозинку?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Одбаци"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Настави"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Опције за пријављивање"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Опције за пријављивање"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Управљајте пријављивањима"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Одаберите пријављивање"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Одаберите приступни кључ"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Одаберите лозинку"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Пријавите се на телефону"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Нема података за пријављивање"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Додирните да бисте откључали"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-sv/strings.xml b/packages/CredentialManager/wear/res/values-sv/strings.xml
new file mode 100644
index 000000000000..2d0254a60465
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-sv/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Credential Manager"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Vill du använda nyckeln?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Vill du använda lösenordet?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Stäng"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Fortsätt"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Inloggningsalternativ"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Inloggningsalternativ"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Hantera inloggningar"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Välj en inloggning"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Välj nyckel"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Välj lösenord"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Logga in på telefon"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Inga inloggningsuppgifter"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Tryck för att låsa upp"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-sw/strings.xml b/packages/CredentialManager/wear/res/values-sw/strings.xml
new file mode 100644
index 000000000000..509c404c7926
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-sw/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Kidhibiti cha Vitambulisho"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Ungependa kutumia ufunguo wa siri?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Ungependa kutumia nenosiri?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Ondoa"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Endelea"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Chaguo za Kuingia katika Akaunti"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Chaguo za Kuingia katika Akaunti"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Dhibiti michakato ya kuingia katika akaunti"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Chagua mbinu ya kuingia katika akaunti"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Chagua ufunguo wa siri"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Chagua nenosiri"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Ingia katika akaunti kwenye simu"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Hakuna maelezo ya kuingia katika akaunti"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Gusa ili ufungue"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-ta/strings.xml b/packages/CredentialManager/wear/res/values-ta/strings.xml
new file mode 100644
index 000000000000..9f88c81b45c0
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-ta/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"அனுமதிச் சான்று நிர்வாகி"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"கடவுச்சாவியைப் பயன்படுத்தவா?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"கடவுச்சொல்லைப் பயன்படுத்தவா?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"மூடு"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"தொடர்க"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"உள்நுழைவு விருப்பங்கள்"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"உள்நுழைவு விருப்பங்கள்"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"உள்நுழைவுகளை நிர்வகித்தல்"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"உள்நுழைவைத் தேர்வுசெய்தல்"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"கடவுச்சாவியைத் தேர்வுசெய்தல்"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"கடவுச்சொல்லைத் தேர்வுசெய்தல்"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"மொபைலில் உள்நுழைக"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"உள்நுழைவுத் தகவல் இல்லை"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"அன்லாக் செய்ய தட்டவும்"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-te/strings.xml b/packages/CredentialManager/wear/res/values-te/strings.xml
new file mode 100644
index 000000000000..086b109b1933
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-te/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"సైన్-ఇన్ మేనేజర్"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"పాస్-కీని ఉపయోగిస్తారా?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"పాస్‌వర్డ్‌ను ఉపయోగిస్తారా?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"విస్మరించండి"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"కొనసాగించండి"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"సైన్ ఇన్ ఆప్షన్‌లు"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"సైన్ ఇన్ ఆప్షన్‌లు"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"సైన్‌ ఇన్‌లను మేనేజ్ చేయండి"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"సైన్ ఇన్‌ను ఎంచుకోండి"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"పాస్-కీని ఎంచుకోండి"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"పాస్‌వర్డ్‌ను ఎంచుకోండి"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"ఫోన్‌లో సైన్ ఇన్ చేయండి"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"సైన్ ఇన్ సమాచారం ఏదీ లేదు"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"అన్‌లాక్ చేయడానికి ట్యాప్ చేయండి"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-th/strings.xml b/packages/CredentialManager/wear/res/values-th/strings.xml
new file mode 100644
index 000000000000..5d4f7998378e
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-th/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Credential Manager"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"ใช้พาสคีย์ไหม"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"ใช้รหัสผ่านไหม"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"ปิด"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"ต่อไป"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"ตัวเลือกการลงชื่อเข้าใช้"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"ตัวเลือกการลงชื่อเข้าใช้"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"จัดการการลงชื่อเข้าใช้"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"เลือกการลงชื่อเข้าใช้"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"เลือกพาสคีย์"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"เลือกรหัสผ่าน"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"ลงชื่อเข้าใช้บนโทรศัพท์"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"ไม่มีข้อมูลการลงชื่อเข้าใช้"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"แตะเพื่อปลดล็อก"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-tl/strings.xml b/packages/CredentialManager/wear/res/values-tl/strings.xml
new file mode 100644
index 000000000000..bd3e67238882
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-tl/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Credential Manager"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Gamitin ang passkey?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Gamitin ang password?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"I-dismiss"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Magpatuloy"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Mga Opsyon sa Pag-sign in"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Mga Opsyon sa Pag-sign in"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Pamahalaan ang mga pag-sign in"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Pumili ng pag-sign in"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Pumili ng passkey"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Pumili ng password"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Mag-sign in sa telepono"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Walang impormasyon sa pag-sign in"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"I-tap para i-unlock"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-tr/strings.xml b/packages/CredentialManager/wear/res/values-tr/strings.xml
new file mode 100644
index 000000000000..a4f512bb31e0
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-tr/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Kimlik Bilgisi Yöneticisi"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Geçiş anahtarı kullanılsın mı?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Şifre kullanılsın mı?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Kapat"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Devam"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Oturum açma seçenekleri"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Oturum açma seçenekleri"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Oturum açma bilgilerini yönetin"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Oturum açma bilgilerini seçin"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Geçiş anahtarı seçin"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Şifre seçin"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Telefonda oturum açın"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Oturum açma bilgisi yok"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Kilidi açmak için dokunun"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-uk/strings.xml b/packages/CredentialManager/wear/res/values-uk/strings.xml
new file mode 100644
index 000000000000..78b4db3f64fd
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-uk/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Менеджер облікових даних"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Використати ключ доступу?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Використати пароль?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Закрити"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Продовжити"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Способи входу"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Способи входу"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Керування даними для входу"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Виберіть спосіб входу"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Виберіть ключ доступу"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Виберіть пароль"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Увійти на телефоні"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Немає даних для входу"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Натисніть, щоб розблокувати"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-ur/strings.xml b/packages/CredentialManager/wear/res/values-ur/strings.xml
new file mode 100644
index 000000000000..60bf163a1a5f
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-ur/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"اسناد مینیجر"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"پاس کی کا استعمال کریں؟"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"پاس ورڈ کا استعمال کریں؟"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"برخاست کریں"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"جاری رکھیں"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"سائن ان کے اختیارات"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"سائن ان کے اختیارات"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"سائن انز کا نظم کریں"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"سائن ان کا انتخاب کریں"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"پاس کی کا انتخاب کریں"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"پاس ورڈ منتخب کریں"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"فون پر سائن ان کریں"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"سائن ان کی کوئی معلومات نہیں"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"غیر مقفل کرنے کیلئے تھپتھپائیں"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-uz/strings.xml b/packages/CredentialManager/wear/res/values-uz/strings.xml
new file mode 100644
index 000000000000..3b630c792032
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-uz/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Hisob maʼlumotlari boshqaruvi"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Kirish kaliti ishlatilsinmi?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Parol ishlatilsinmi?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Yopish"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Davom etish"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Kirish parametrlari"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Kirish parametrlari"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Kirishni boshqarish"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Kirish axborotini tanlash"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Kalit tanlash"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Parol tanlash"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Telefonda hisobga kirish"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Kirish axboroti topilmadi"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Qulfni ochish uchun bosing"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-vi/strings.xml b/packages/CredentialManager/wear/res/values-vi/strings.xml
new file mode 100644
index 000000000000..476d9bcaf9c8
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-vi/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Trình quản lý thông tin xác thực"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Dùng khoá truy cập?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Dùng mật khẩu?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Đóng"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Tiếp tục"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Phương thức đăng nhập"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Phương thức đăng nhập"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Quản lý thông tin đăng nhập"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Chọn một phương thức đăng nhập"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Chọn khoá truy cập"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Chọn mật khẩu"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Đăng nhập trên điện thoại"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Không có thông tin đăng nhập"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Nhấn để mở khoá"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-zh-rCN/strings.xml b/packages/CredentialManager/wear/res/values-zh-rCN/strings.xml
new file mode 100644
index 000000000000..15f0de608a4b
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-zh-rCN/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Credential Manager"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"要使用通行密钥吗?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"要使用密码吗?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"关闭"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"继续"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"登录方式"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"登录方式"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"管理登录方式"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"选择登录方式"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"选择通行密钥"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"选择密码"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"在手机上登录"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"无登录信息"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"点按即可解锁"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-zh-rHK/strings.xml b/packages/CredentialManager/wear/res/values-zh-rHK/strings.xml
new file mode 100644
index 000000000000..4e0484918baf
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-zh-rHK/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"憑證管理工具"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"要使用密鑰嗎?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"要使用密碼嗎?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"關閉"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"繼續"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"登入方式"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"登入方式"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"管理登入方式"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"選擇登入憑證"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"選擇密鑰"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"選擇密碼"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"在手機上登入"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"沒有登入資料"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"輕按即可解鎖"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-zh-rTW/strings.xml b/packages/CredentialManager/wear/res/values-zh-rTW/strings.xml
new file mode 100644
index 000000000000..82149e3b4a64
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-zh-rTW/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Credential Manager"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"要使用密碼金鑰嗎?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"要使用密碼嗎?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"關閉"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"繼續"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"登入選項"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"登入選項"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"管理登入憑證"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"選擇登入憑證"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"選擇密碼金鑰"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"選擇密碼"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"在手機上登入"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"沒有登入資訊"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"輕觸即可解鎖"</string>
+</resources>
diff --git a/packages/CredentialManager/wear/res/values-zu/strings.xml b/packages/CredentialManager/wear/res/values-zu/strings.xml
new file mode 100644
index 000000000000..c7fd5a8812ed
--- /dev/null
+++ b/packages/CredentialManager/wear/res/values-zu/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2023 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name" msgid="7384524142163511792">"Umphathi wokuqinisekisa"</string>
+ <string name="use_passkey_title" msgid="716598039340757817">"Sebenzisa ukhiye wokudlula?"</string>
+ <string name="use_password_title" msgid="4655101984031246476">"Sebenzisa iphasiwedi?"</string>
+ <string name="dialog_dismiss_button" msgid="989567669882005067">"Cashisa"</string>
+ <string name="dialog_continue_button" msgid="8630290044077052145">"Qhubeka"</string>
+ <string name="dialog_sign_in_options_button" msgid="448002958902615054">"Okungakhethwa kukho kokungena ngemvume"</string>
+ <string name="sign_in_options_title" msgid="6720572645638986680">"Okungakhethwa kukho kokungena ngemvume"</string>
+ <string name="provider_list_title" msgid="6803918216129492212">"Phatha ukungena ngemvume"</string>
+ <string name="choose_sign_in_title" msgid="3616025924746872202">"Khetha ukungena ngemvume"</string>
+ <string name="choose_passkey_title" msgid="8459270617632817465">"Khetha ukhiye wokudlula"</string>
+ <string name="choose_password_title" msgid="7610721820858017214">"Khetha iphasiwedi"</string>
+ <string name="sign_in_on_phone_button" msgid="7618621977586522403">"Ngena ngemvume kufoni"</string>
+ <string name="locked_credential_entry_label_subtext_no_sign_in" msgid="1733094937495140605">"Alukho ulwazi lokungena ngemvume"</string>
+ <string name="locked_credential_entry_label_subtext_tap_to_unlock" msgid="4320941096211904568">"Thepha ukuze uvule"</string>
+</resources>
diff --git a/packages/InputDevices/res/values-am/strings.xml b/packages/InputDevices/res/values-am/strings.xml
index fd507613a6f5..a6f5f3a7018f 100644
--- a/packages/InputDevices/res/values-am/strings.xml
+++ b/packages/InputDevices/res/values-am/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"ታይላንድኛ (ፓታሾት)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"ሰርቢያኛ (ላቲን)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"ሞንቴኔግሮኛ (ላቲን)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"ሰርቢያኛ (ሲሪሊክኛ)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"ሞንቴኔግሮኛ (ሲሪሊክኛ)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-ar/strings.xml b/packages/InputDevices/res/values-ar/strings.xml
index ac730385c6e1..f92d0def3b7e 100644
--- a/packages/InputDevices/res/values-ar/strings.xml
+++ b/packages/InputDevices/res/values-ar/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"‏التايلاندية (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"الصربية (اللاتينية)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"لغة الجبل الأسود (اللاتينية)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"الصربية (السيريلية)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"لغة الجبل الأسود (السيريلية)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-as/strings.xml b/packages/InputDevices/res/values-as/strings.xml
index 1162c723ed6c..8084da395175 100644
--- a/packages/InputDevices/res/values-as/strings.xml
+++ b/packages/InputDevices/res/values-as/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"থাই (পাটাচ’টে)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"ছাৰ্বিয়ান (লেটিন)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"মণ্টেনেগ্ৰিণ (লেটিন)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"ছাৰ্বিয়ান (চিৰিলিক)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"মণ্টেনেগ্ৰিণ (চিৰিলিক)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-az/strings.xml b/packages/InputDevices/res/values-az/strings.xml
index 6a6a99d10b36..068a771d9c50 100644
--- a/packages/InputDevices/res/values-az/strings.xml
+++ b/packages/InputDevices/res/values-az/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"Tay (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"Serb dili (Latın)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"Monteneqro dili (Latın)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"Serb dili (Kiril)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"Monteneqro dili (Kiril)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-b+sr+Latn/strings.xml b/packages/InputDevices/res/values-b+sr+Latn/strings.xml
index 96ac10cb8f64..334b03218f91 100644
--- a/packages/InputDevices/res/values-b+sr+Latn/strings.xml
+++ b/packages/InputDevices/res/values-b+sr+Latn/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"tajski (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"srpski (latinica)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"crnogorski (latinica)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"srpski (ćirilica)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"crnogorski (ćirilica)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-be/strings.xml b/packages/InputDevices/res/values-be/strings.xml
index e8341a112d7a..c11266512978 100644
--- a/packages/InputDevices/res/values-be/strings.xml
+++ b/packages/InputDevices/res/values-be/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"Тайская (Патачотэ)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"Сербская (лацініца)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"Чарнагорская (лацініца)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"Сербская (кірыліца)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"Чарнагорская (кірыліца)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-bg/strings.xml b/packages/InputDevices/res/values-bg/strings.xml
index b6a5b0036651..8a650b283f4f 100644
--- a/packages/InputDevices/res/values-bg/strings.xml
+++ b/packages/InputDevices/res/values-bg/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"тайландски (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"сръбски (латиница)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"черногорски (латиница)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"сръбски (кирилица)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"черногорски (кирилица)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-bn/strings.xml b/packages/InputDevices/res/values-bn/strings.xml
index 353b6dc6310f..02ab5075b991 100644
--- a/packages/InputDevices/res/values-bn/strings.xml
+++ b/packages/InputDevices/res/values-bn/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"থাই (পাট্টাচোটে)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"সার্বিয়ান (ল্যাটিন)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"মন্টেনেগ্রিন (ল্যাটিন)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"সার্বিয়ান (সিরিলিক)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"মন্টেনেগ্রিন (সিরিলিক)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-bs/strings.xml b/packages/InputDevices/res/values-bs/strings.xml
index 0145b0ac14ac..e1aef5d67d89 100644
--- a/packages/InputDevices/res/values-bs/strings.xml
+++ b/packages/InputDevices/res/values-bs/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"tajlandski (pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"srpski (latinica)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"crnogorski (latinica)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"srpski (ćirilica)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"crnogorski (ćirilica)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-ca/strings.xml b/packages/InputDevices/res/values-ca/strings.xml
index d729c9190409..f9b2e5eb342a 100644
--- a/packages/InputDevices/res/values-ca/strings.xml
+++ b/packages/InputDevices/res/values-ca/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"Tai (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"Serbi (llatí)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"Montenegrí (llatí)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"Serbi (ciríl·lic)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"Montenegrí (ciríl·lic)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-cs/strings.xml b/packages/InputDevices/res/values-cs/strings.xml
index 170fa58b50b9..72efbc4cc999 100644
--- a/packages/InputDevices/res/values-cs/strings.xml
+++ b/packages/InputDevices/res/values-cs/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"thajština (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"srbština (latinka)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"černohorština (latinka)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"srbština (cyrilice)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"černohorština (cyrilice)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-da/strings.xml b/packages/InputDevices/res/values-da/strings.xml
index 47fcfb19ea2b..6ce0b8b9febe 100644
--- a/packages/InputDevices/res/values-da/strings.xml
+++ b/packages/InputDevices/res/values-da/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"Thai (pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"Serbisk (latinsk)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"Montenegrinsk (latinsk)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"Serbisk (kyrillisk)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"Montenegrinsk (kyrillisk)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-de/strings.xml b/packages/InputDevices/res/values-de/strings.xml
index 1f6b65d76c4b..0dc4e2a0aa49 100644
--- a/packages/InputDevices/res/values-de/strings.xml
+++ b/packages/InputDevices/res/values-de/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"Thailändisch (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"Serbisch (lat. Alphabet)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"Montenegrinisch (lat. Alphabet)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"Serbisch (kyrillisch)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"Montenegrinisch (kyrillisch)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-el/strings.xml b/packages/InputDevices/res/values-el/strings.xml
index 2a9dd8c42537..08357db6b06b 100644
--- a/packages/InputDevices/res/values-el/strings.xml
+++ b/packages/InputDevices/res/values-el/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"Ταϊλανδικά (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"Σερβικά (Λατινικά)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"Μαυροβουνιακά (Λατινικά)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"Σερβικά (Κυριλλικά)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"Μαυροβουνιακά (Κυριλλικά)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-en-rAU/strings.xml b/packages/InputDevices/res/values-en-rAU/strings.xml
index e27fb6416b6d..0e9e6ebb7f38 100644
--- a/packages/InputDevices/res/values-en-rAU/strings.xml
+++ b/packages/InputDevices/res/values-en-rAU/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"Thai (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"Serbian (Latin)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"Montenegrin (Latin)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"Serbian (Cyrillic)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"Montenegrin (Cyrillic)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-en-rGB/strings.xml b/packages/InputDevices/res/values-en-rGB/strings.xml
index e27fb6416b6d..0e9e6ebb7f38 100644
--- a/packages/InputDevices/res/values-en-rGB/strings.xml
+++ b/packages/InputDevices/res/values-en-rGB/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"Thai (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"Serbian (Latin)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"Montenegrin (Latin)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"Serbian (Cyrillic)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"Montenegrin (Cyrillic)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-en-rIN/strings.xml b/packages/InputDevices/res/values-en-rIN/strings.xml
index e27fb6416b6d..0e9e6ebb7f38 100644
--- a/packages/InputDevices/res/values-en-rIN/strings.xml
+++ b/packages/InputDevices/res/values-en-rIN/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"Thai (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"Serbian (Latin)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"Montenegrin (Latin)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"Serbian (Cyrillic)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"Montenegrin (Cyrillic)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-es-rUS/strings.xml b/packages/InputDevices/res/values-es-rUS/strings.xml
index 049edf494b71..321b9a595dfa 100644
--- a/packages/InputDevices/res/values-es-rUS/strings.xml
+++ b/packages/InputDevices/res/values-es-rUS/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"Tailandés (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"Serbio (latino)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"Montenegrino (latino)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"Serbio (cirílico)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"Montenegrino (cirílico)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-es/strings.xml b/packages/InputDevices/res/values-es/strings.xml
index b6e27c537969..98076524b5e8 100644
--- a/packages/InputDevices/res/values-es/strings.xml
+++ b/packages/InputDevices/res/values-es/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"Tailandés (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"Serbio (latino)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"Montenegrino (latino)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"Serbio (cirílico)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"Montenegrino (cirílico)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-et/strings.xml b/packages/InputDevices/res/values-et/strings.xml
index cecf304d1c11..eb7ea9fd2843 100644
--- a/packages/InputDevices/res/values-et/strings.xml
+++ b/packages/InputDevices/res/values-et/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"Tai (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"Serbia (ladina)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"Montenegro (ladina)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"serbia (kirillitsa)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"montenegro (kirillitsa)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-eu/strings.xml b/packages/InputDevices/res/values-eu/strings.xml
index 481b315bf413..53707598b264 100644
--- a/packages/InputDevices/res/values-eu/strings.xml
+++ b/packages/InputDevices/res/values-eu/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"Thailandiarra (pattachote-a)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"Serbiarra (latindarra)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"Montenegroarra (latindarra)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"Serbiarra (zirilikoa)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"Montenegroarra (zirilikoa)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-fa/strings.xml b/packages/InputDevices/res/values-fa/strings.xml
index 9614fef9396c..9bbf4e36fa16 100644
--- a/packages/InputDevices/res/values-fa/strings.xml
+++ b/packages/InputDevices/res/values-fa/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"تایلندی (پاتاچوته)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"صربی (لاتین)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"مونته‌نگرویی (لاتین)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"صربی (سیریلیک)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"مونته‌نگرویی (سیریلیک)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-fi/strings.xml b/packages/InputDevices/res/values-fi/strings.xml
index afae51ba623c..3e88c2085373 100644
--- a/packages/InputDevices/res/values-fi/strings.xml
+++ b/packages/InputDevices/res/values-fi/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"thai (pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"serbia (latinalainen)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"montenegro (latinalainen)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"serbia (kyrillinen)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"montenegro (kyrillinen)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-fr-rCA/strings.xml b/packages/InputDevices/res/values-fr-rCA/strings.xml
index f2d79df6d469..690fbad6ab12 100644
--- a/packages/InputDevices/res/values-fr-rCA/strings.xml
+++ b/packages/InputDevices/res/values-fr-rCA/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"Thaï (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"Serbe (latin)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"Monténégrin (latin)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"Serbe (cyrillique)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"Monténégrin (cyrillique)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-fr/strings.xml b/packages/InputDevices/res/values-fr/strings.xml
index 61891c3dad50..70bd250738f7 100644
--- a/packages/InputDevices/res/values-fr/strings.xml
+++ b/packages/InputDevices/res/values-fr/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"Thaï (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"Serbe (latin)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"Monténégrin (latin)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"Serbe (cyrillique)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"Monténégrin (cyrillique)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-gu/strings.xml b/packages/InputDevices/res/values-gu/strings.xml
index f04b2d2c1453..3f1b31a8a6c8 100644
--- a/packages/InputDevices/res/values-gu/strings.xml
+++ b/packages/InputDevices/res/values-gu/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"થાઇ (પટ્ટાશોટે)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"સર્બિયન (લેટિન)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"મોંટેનેગ્રીન (લેટિન)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"સર્બિયન (સિરિલિક)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"મોંટેનેગ્રીન (સિરિલિક)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-hi/strings.xml b/packages/InputDevices/res/values-hi/strings.xml
index 1017ef118822..db59ebac7805 100644
--- a/packages/InputDevices/res/values-hi/strings.xml
+++ b/packages/InputDevices/res/values-hi/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"थाई (पटैचोटे)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"सर्बियन (लैटिन)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"मॉन्टेनीग्रिन (लैटिन)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"सर्बियन (सिरिलिक)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"मोंटेनेग्रिन (सिरिलिक)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-hr/strings.xml b/packages/InputDevices/res/values-hr/strings.xml
index bc630bc35108..905dce25b4aa 100644
--- a/packages/InputDevices/res/values-hr/strings.xml
+++ b/packages/InputDevices/res/values-hr/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"tajski (pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"srpski (latinica)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"crnogorski (latinica)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"srpski (ćirilica)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"crnogorski (ćirilica)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-hu/strings.xml b/packages/InputDevices/res/values-hu/strings.xml
index 5155543c2318..4c8e7b8de6ba 100644
--- a/packages/InputDevices/res/values-hu/strings.xml
+++ b/packages/InputDevices/res/values-hu/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"thai (pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"szerb (latin betűs)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"montenegrói (latin betűs)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"szerb (cirill betűs)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"montenegrói (cirill betűs)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-hy/strings.xml b/packages/InputDevices/res/values-hy/strings.xml
index 8097438055eb..ae56fc5b1620 100644
--- a/packages/InputDevices/res/values-hy/strings.xml
+++ b/packages/InputDevices/res/values-hy/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"թայերեն (պատաչոտ)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"սերբերեն (լատինատառ)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"չեռնոգորերեն (լատինատառ)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"սերբերեն (կյուրեղատառ)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"չեռնոգորերեն (կյուրեղատառ)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-in/strings.xml b/packages/InputDevices/res/values-in/strings.xml
index 1c52e9c3a569..52bc03943abd 100644
--- a/packages/InputDevices/res/values-in/strings.xml
+++ b/packages/InputDevices/res/values-in/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"Thai (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"Serbia (Latin)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"Montenegro (Latin)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"Serbia (Sirilik)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"Montenegro (Sirilik)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-is/strings.xml b/packages/InputDevices/res/values-is/strings.xml
index bf428bae38c3..0f516cef370e 100644
--- a/packages/InputDevices/res/values-is/strings.xml
+++ b/packages/InputDevices/res/values-is/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"Taílenskt (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"Serbneska (latneskt)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"Svartfellska (latneskt)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"Serbneska (kyrillískt)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"Svartfellska (kyrillískt)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-it/strings.xml b/packages/InputDevices/res/values-it/strings.xml
index bb3b12cc2d5c..f77b87cc67be 100644
--- a/packages/InputDevices/res/values-it/strings.xml
+++ b/packages/InputDevices/res/values-it/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"Thai (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"Serbo (latino)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"Montenegrino (latino)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"Serbo (cirillico)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"Montenegrino (cirillico)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-iw/strings.xml b/packages/InputDevices/res/values-iw/strings.xml
index f44235a1fec6..0e400e2d0fa4 100644
--- a/packages/InputDevices/res/values-iw/strings.xml
+++ b/packages/InputDevices/res/values-iw/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"‏תאית (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"סרבית (לטינית)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"מונטנגרית (לטינית)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"סרבית (אותיות קיריליות)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"מונטנגרית (אותיות קיריליות)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-ja/strings.xml b/packages/InputDevices/res/values-ja/strings.xml
index 55b9642d612b..b1830ebda199 100644
--- a/packages/InputDevices/res/values-ja/strings.xml
+++ b/packages/InputDevices/res/values-ja/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"タイ語(Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"セルビア語(ラテン文字)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"モンテネグロ語(ラテン)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"セルビア語(キリル)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"モンテネグロ語(キリル)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-ka/strings.xml b/packages/InputDevices/res/values-ka/strings.xml
index 8696fb26c0fb..75c72b91df94 100644
--- a/packages/InputDevices/res/values-ka/strings.xml
+++ b/packages/InputDevices/res/values-ka/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"ტაილანდური (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"სერბული (ლათინური)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"მონტენეგრული (ლათინური)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"სერბული (კირილიცა)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"მონტენეგრული (კირილიცა)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-kk/strings.xml b/packages/InputDevices/res/values-kk/strings.xml
index 2e7236c25c84..c0a58685bc52 100644
--- a/packages/InputDevices/res/values-kk/strings.xml
+++ b/packages/InputDevices/res/values-kk/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"Тай (паттачот)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"Серб (латын жазуы)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"Черногор (латын жазуы)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"Сербия (кириллица)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"Черногория (кириллица)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-km/strings.xml b/packages/InputDevices/res/values-km/strings.xml
index 2689258ad8ab..6c3db64fa1e9 100644
--- a/packages/InputDevices/res/values-km/strings.xml
+++ b/packages/InputDevices/res/values-km/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"ថៃ (ប៉ាតាឈោត)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"ស៊ែប៊ី (ឡាតាំង)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"ម៉ុងតេណេហ្គ្រោ (ឡាតាំង)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"សែប៊ី (ស៊ីរីលីក)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"ម៉ុងតេណេហ្គ្រោ (ស៊ីរីលីក)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-kn/strings.xml b/packages/InputDevices/res/values-kn/strings.xml
index 34d90535a775..0f4c5229c4d4 100644
--- a/packages/InputDevices/res/values-kn/strings.xml
+++ b/packages/InputDevices/res/values-kn/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"ಥಾಯ್ (ಪಟ್ಟಚೋಟ್)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"ಸೆರ್ಬಿಯನ್ (ಲ್ಯಾಟಿನ್)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"ಮೊಂಟೆನೆಗ್ರಿನ್ (ಲ್ಯಾಟಿನ್)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"ಸೆರ್ಬಿಯನ್ (ಸಿರಿಲಿಕ್)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"ಮೊಂಟೆನೆಗ್ರಿನ್ (ಸಿರಿಲಿಕ್)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-ko/strings.xml b/packages/InputDevices/res/values-ko/strings.xml
index ad99961cc813..dcfb3b4ece40 100644
--- a/packages/InputDevices/res/values-ko/strings.xml
+++ b/packages/InputDevices/res/values-ko/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"태국어(Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"세르비아어(로마자)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"몬테네그로어(로마자)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"세르비아어(키릴 자모)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"몬테네그로어(키릴)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-ky/strings.xml b/packages/InputDevices/res/values-ky/strings.xml
index 79ff71e04cc2..c0b3d3a1d9b3 100644
--- a/packages/InputDevices/res/values-ky/strings.xml
+++ b/packages/InputDevices/res/values-ky/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"Тайча (Pattachote баскычтобу)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"Сербче (Латын)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"Монтенегрочо (Латын)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"Сербче (Кирилл)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"Черногориялыкча (Кирилл)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-lo/strings.xml b/packages/InputDevices/res/values-lo/strings.xml
index 2427d1c9b672..c2e5a2beded5 100644
--- a/packages/InputDevices/res/values-lo/strings.xml
+++ b/packages/InputDevices/res/values-lo/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"ໄທ (ປັດຕະໂຊຕິ)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"ເຊີບຽນ (ລາຕິນ)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"ມອນເທເນກຣິນ (ລາຕິນ)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"ເຊີບຽນ (ຊີຣິວລິກ)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"ມອນເທເນກຣິນ (ຊີຣິວລິກ)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-lt/strings.xml b/packages/InputDevices/res/values-lt/strings.xml
index 48010bc3a66b..9a98e8eb5b13 100644
--- a/packages/InputDevices/res/values-lt/strings.xml
+++ b/packages/InputDevices/res/values-lt/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"Tajų („Pattachote“)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"Serbų (lotynų rašmenys)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"Juodkalniečių (lotynų rašmenys)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"Serbų (kirilica)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"Juodkalniečių (kirilica)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-lv/strings.xml b/packages/InputDevices/res/values-lv/strings.xml
index a2e8f8fd2972..d3422b210757 100644
--- a/packages/InputDevices/res/values-lv/strings.xml
+++ b/packages/InputDevices/res/values-lv/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"Taju (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"Serbu (latīņu)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"Melnkalniešu (latīņu)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"Serbu (kirilica)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"Melnkalniešu (kirilica)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-mk/strings.xml b/packages/InputDevices/res/values-mk/strings.xml
index 13cc8e189188..ccb09392aed3 100644
--- a/packages/InputDevices/res/values-mk/strings.xml
+++ b/packages/InputDevices/res/values-mk/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"тајландски (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"српски (латиница)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"црногорски (латиница)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"српски (кирилица)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"црногорски (кирилица)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-ml/strings.xml b/packages/InputDevices/res/values-ml/strings.xml
index fda477bfe38f..5a7b601baa97 100644
--- a/packages/InputDevices/res/values-ml/strings.xml
+++ b/packages/InputDevices/res/values-ml/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"തായ് (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"സെർബിയൻ (ലാറ്റിൻ)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"മോണ്ടിനെഗ്രിൻ (ലാറ്റിൻ)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"സെർബിയൻ (സിറിലിക്)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"മോണ്ടിനെഗ്രിൻ (സിറിലിക്)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-mn/strings.xml b/packages/InputDevices/res/values-mn/strings.xml
index a6d3320ee1fd..0044eb24bc6a 100644
--- a/packages/InputDevices/res/values-mn/strings.xml
+++ b/packages/InputDevices/res/values-mn/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"Тай (паттачоте)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"Серби (латин)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"Монтенегро (латин)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"Серби (кирилл)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"Монтенегро (кирилл)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-mr/strings.xml b/packages/InputDevices/res/values-mr/strings.xml
index faae021e4187..d306dda71553 100644
--- a/packages/InputDevices/res/values-mr/strings.xml
+++ b/packages/InputDevices/res/values-mr/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"थाई (पट्टाचोटे)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"सर्बियन (लॅटिन)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"मॉन्टेनेग्रिन (लॅटिन)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"सर्बियन (सिरिलिक)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"मॉन्टेनेग्रिन (सिरिलिक)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-ms/strings.xml b/packages/InputDevices/res/values-ms/strings.xml
index 9f142607ac63..d1b16547f8e6 100644
--- a/packages/InputDevices/res/values-ms/strings.xml
+++ b/packages/InputDevices/res/values-ms/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"Thai (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"Serbia (Latin)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"Montenegrin (Latin)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"Serbia (Cyril)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"Montenegrin (Cyril)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-my/strings.xml b/packages/InputDevices/res/values-my/strings.xml
index bb2602724ae1..fb553446dbd4 100644
--- a/packages/InputDevices/res/values-my/strings.xml
+++ b/packages/InputDevices/res/values-my/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"ထိုင်း (ပတ်တာချုတ်)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"ဆားဘီးယား (လက်တင်)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"မွန်တီနီဂရင်း (လက်တင်)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"ဆားဘီးယား (စီရီလစ်)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"မွန်တီနီဂရင်း (စီရီလစ်)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-nb/strings.xml b/packages/InputDevices/res/values-nb/strings.xml
index 402d7eeca7ab..7ac2a822667a 100644
--- a/packages/InputDevices/res/values-nb/strings.xml
+++ b/packages/InputDevices/res/values-nb/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"Thai (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"Serbisk (latinsk)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"Montenegrisk (latinsk)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"Serbisk (kyrillisk)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"Montenegrisk (kyrillisk)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-ne/strings.xml b/packages/InputDevices/res/values-ne/strings.xml
index a60cf36d8fb6..113489d65d96 100644
--- a/packages/InputDevices/res/values-ne/strings.xml
+++ b/packages/InputDevices/res/values-ne/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"थाई (पत्ताचोते)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"सर्बियाली (ल्याटिन)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"मोन्टेनिग्रिन (ल्याटिन)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"सर्बियाली (सिरिलिक)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"मोन्टेनिग्रिन (सिरिलिक)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-nl/strings.xml b/packages/InputDevices/res/values-nl/strings.xml
index bb0c945494d2..0e954e9b9ed3 100644
--- a/packages/InputDevices/res/values-nl/strings.xml
+++ b/packages/InputDevices/res/values-nl/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"Thai (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"Servisch (Latijns)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"Montenegrijns (Latijns)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"Servisch (Cyrillisch)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"Montenegrijns (Cyrillisch)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-or/strings.xml b/packages/InputDevices/res/values-or/strings.xml
index 2bf862b144f7..d9d852008275 100644
--- a/packages/InputDevices/res/values-or/strings.xml
+++ b/packages/InputDevices/res/values-or/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"ଥାଇ (ପାଟ୍ଟାଚୋଟେ)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"ସର୍ବିଆନ (ଲାଟିନ)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"ମଣ୍ଟେନେଗ୍ରିନ (ଲାଟିନ)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"ସର୍ବିଆନ (ସିରିଲିକ)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"ମଣ୍ଟେନେଗ୍ରିନ (ସିରିଲିକ)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-pa/strings.xml b/packages/InputDevices/res/values-pa/strings.xml
index c1fee5feb968..85b0d195f05f 100644
--- a/packages/InputDevices/res/values-pa/strings.xml
+++ b/packages/InputDevices/res/values-pa/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"ਥਾਈ (ਪੈਟਾਸ਼ੋਟੇ)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"ਸਰਬੀਆਈ (ਲਾਤੀਨੀ)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"ਮਾਂਟੇਨੀਗਰਿਨ (ਲਾਤੀਨੀ)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"ਸਰਬੀਆਈ (ਸਿਰਿਲਿਕ)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"ਮਾਂਟੇਨੀਗਰਿਨ (ਸਿਰਿਲਿਕ)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-pl/strings.xml b/packages/InputDevices/res/values-pl/strings.xml
index d3e4a3a9cb11..7fb90d2454f6 100644
--- a/packages/InputDevices/res/values-pl/strings.xml
+++ b/packages/InputDevices/res/values-pl/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"tajski (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"serbski (alfabet łaciński)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"czarnogórski (alfabet łaciński)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"serbski (cyrylica)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"czarnogórski (cyrylica)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-pt-rBR/strings.xml b/packages/InputDevices/res/values-pt-rBR/strings.xml
index 94a10c504b1f..2b92c811be64 100644
--- a/packages/InputDevices/res/values-pt-rBR/strings.xml
+++ b/packages/InputDevices/res/values-pt-rBR/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"Tailandês (pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"Sérvio (latim)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"Montenegrino (latim)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"Sérvio (cirílico)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"Montenegrino (cirílico)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-pt-rPT/strings.xml b/packages/InputDevices/res/values-pt-rPT/strings.xml
index 8c227761d9c3..98cf7e2df754 100644
--- a/packages/InputDevices/res/values-pt-rPT/strings.xml
+++ b/packages/InputDevices/res/values-pt-rPT/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"Tailandês (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"Sérvio (latim)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"Montenegrino (latim)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"Sérvio (cirílico)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"Montenegrino (cirílico)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-pt/strings.xml b/packages/InputDevices/res/values-pt/strings.xml
index 94a10c504b1f..2b92c811be64 100644
--- a/packages/InputDevices/res/values-pt/strings.xml
+++ b/packages/InputDevices/res/values-pt/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"Tailandês (pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"Sérvio (latim)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"Montenegrino (latim)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"Sérvio (cirílico)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"Montenegrino (cirílico)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-ro/strings.xml b/packages/InputDevices/res/values-ro/strings.xml
index 654f168ce9bf..71d19958263e 100644
--- a/packages/InputDevices/res/values-ro/strings.xml
+++ b/packages/InputDevices/res/values-ro/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"Thailandeză (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"Sârbă (caractere latine)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"Muntenegreană (caractere latine)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"Sârbă (caractere chirilice)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"Muntenegreană (Chirilică)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-ru/strings.xml b/packages/InputDevices/res/values-ru/strings.xml
index 05b1b25d1c7f..13130fc9ca1f 100644
--- a/packages/InputDevices/res/values-ru/strings.xml
+++ b/packages/InputDevices/res/values-ru/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"Тайский (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"Сербский (латиница)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"Черногорский (латиница)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"Сербский (кириллица)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"Черногорский (кириллица)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-si/strings.xml b/packages/InputDevices/res/values-si/strings.xml
index 8d36553db34c..80c674d00bca 100644
--- a/packages/InputDevices/res/values-si/strings.xml
+++ b/packages/InputDevices/res/values-si/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"තායි (පට්ටචෝටේ)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"සර්බියානු (ලතින්)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"මොන්ටෙනේග්‍රීන් (ලතින්)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"සර්බියානු (සිරිලික්)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"මොන්ටෙනේග්‍රීන් (සිරිලික්)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-sk/strings.xml b/packages/InputDevices/res/values-sk/strings.xml
index 33e1651b98a8..6ce98cc34bca 100644
--- a/packages/InputDevices/res/values-sk/strings.xml
+++ b/packages/InputDevices/res/values-sk/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"thajčina (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"srbčina (latinka)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"čiernohorčina (latinka)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"srbčina (cyrilika)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"čiernohorčina (cyrilika)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-sl/strings.xml b/packages/InputDevices/res/values-sl/strings.xml
index e40cca7fd850..29264231e6f6 100644
--- a/packages/InputDevices/res/values-sl/strings.xml
+++ b/packages/InputDevices/res/values-sl/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"tajščina (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"srbščina (latinica)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"črnogorščina (latinica)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"srbščina (cirilica)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"črnogorščina (cirilica)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-sq/strings.xml b/packages/InputDevices/res/values-sq/strings.xml
index 46405ba3ce18..06f76f3d6c4a 100644
--- a/packages/InputDevices/res/values-sq/strings.xml
+++ b/packages/InputDevices/res/values-sq/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"Tajlandisht (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"Serbisht (latine)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"Malazisht (latine)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"Serbisht (cirilike)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"Malazisht (cirilike)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-sr/strings.xml b/packages/InputDevices/res/values-sr/strings.xml
index 56420409a54e..1172fef2c0a9 100644
--- a/packages/InputDevices/res/values-sr/strings.xml
+++ b/packages/InputDevices/res/values-sr/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"тајски (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"српски (латиница)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"црногорски (латиница)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"српски (ћирилица)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"црногорски (ћирилица)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-sv/strings.xml b/packages/InputDevices/res/values-sv/strings.xml
index 9ba122786974..946854ca00bb 100644
--- a/packages/InputDevices/res/values-sv/strings.xml
+++ b/packages/InputDevices/res/values-sv/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"thailändska (pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"serbiska (latinskt)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"montenegrinska (latinskt)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"serbiska (kyrilliskt)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"montenegrinska (kyrilliskt)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-sw/strings.xml b/packages/InputDevices/res/values-sw/strings.xml
index 5da85421c2d4..c3578d8b5fbd 100644
--- a/packages/InputDevices/res/values-sw/strings.xml
+++ b/packages/InputDevices/res/values-sw/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"Kitai (Kipatachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"Kiserbia (Kilatini)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"Kimontenegri (Kilatini)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"Kiserbia (Kisiriliki)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"Kimontenegri (Kisiriliki)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-ta/strings.xml b/packages/InputDevices/res/values-ta/strings.xml
index becffd3f0c91..5c3f57e361b7 100644
--- a/packages/InputDevices/res/values-ta/strings.xml
+++ b/packages/InputDevices/res/values-ta/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"தாய் (பட்டாசொட்டே)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"செர்பியன் (லத்தீன்)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"மாண்டினெக்ரன் (லத்தீன்)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"செர்பியன் (சிரிலிக்)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"மாண்டினெக்ரன் (சிரிலிக்)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-te/strings.xml b/packages/InputDevices/res/values-te/strings.xml
index 1d2fcb4e530a..a0674d665ed9 100644
--- a/packages/InputDevices/res/values-te/strings.xml
+++ b/packages/InputDevices/res/values-te/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"థాయ్ (పత్తచోత్)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"సెర్బియన్ (లాటిన్)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"మాంటెనెగ్రిన్ (లాటిన్)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"సెర్బియన్ (సిరిలిక్)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"మాంటెనెగ్రిన్ (సిరిలిక్)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-th/strings.xml b/packages/InputDevices/res/values-th/strings.xml
index 318a3bba8c55..a9465961f06a 100644
--- a/packages/InputDevices/res/values-th/strings.xml
+++ b/packages/InputDevices/res/values-th/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"ไทย (ปัตตะโชติ)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"เซอร์เบีย (ละติน)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"มอนเตเนโกร (ละติน)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"เซอร์เบีย (ซีริลลิก)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"มอนเตเนโกร (ซีริลลิก)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-tl/strings.xml b/packages/InputDevices/res/values-tl/strings.xml
index 062dff0dec0f..0a5d3cc6c1d6 100644
--- a/packages/InputDevices/res/values-tl/strings.xml
+++ b/packages/InputDevices/res/values-tl/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"Thai (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"Serbian (Latin)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"Montenegrin (Latin)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"Serbian (Cyrillic)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"Montenegrin (Cyrillic)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-tr/strings.xml b/packages/InputDevices/res/values-tr/strings.xml
index c6d38f4a7022..f37a098f0714 100644
--- a/packages/InputDevices/res/values-tr/strings.xml
+++ b/packages/InputDevices/res/values-tr/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"Tayca (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"Sırpça (Latin)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"Karadağca (Latin)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"Sırpça (Kiril)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"Karadağca (Kiril)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-uk/strings.xml b/packages/InputDevices/res/values-uk/strings.xml
index 357747b41413..d496dfa3910b 100644
--- a/packages/InputDevices/res/values-uk/strings.xml
+++ b/packages/InputDevices/res/values-uk/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"Тайська (паттачоте)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"Сербська (латиниця)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"Чорногорська (латиниця)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"Сербська (кирилиця)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"Чорногорська (кирилиця)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-ur/strings.xml b/packages/InputDevices/res/values-ur/strings.xml
index 7b4c10499469..7293858ee413 100644
--- a/packages/InputDevices/res/values-ur/strings.xml
+++ b/packages/InputDevices/res/values-ur/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"تھائی (پٹاچوٹے)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"سربیائی (لاطینی)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"مونٹے نیگریائی (لاطینی)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"سربیائی (سیریلک)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"مونٹے نیگریائی (سیریلک)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-uz/strings.xml b/packages/InputDevices/res/values-uz/strings.xml
index 60e740598b4e..f212e2c4108e 100644
--- a/packages/InputDevices/res/values-uz/strings.xml
+++ b/packages/InputDevices/res/values-uz/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"Tay (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"Serb (lotin)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"Chernogor (lotin)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"Serb (kirill)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"Chernogor (kirill)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-vi/strings.xml b/packages/InputDevices/res/values-vi/strings.xml
index 6fe39d2a84a4..f3d2cc48fb96 100644
--- a/packages/InputDevices/res/values-vi/strings.xml
+++ b/packages/InputDevices/res/values-vi/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"Tiếng Thái (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"Tiếng Serbia (Latinh)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"Tiếng Montenegro (Latinh)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"Tiếng Serbia (Chữ Kirin)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"Tiếng Montenegro (Chữ Kirin)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-zh-rCN/strings.xml b/packages/InputDevices/res/values-zh-rCN/strings.xml
index 6e96e5d46a83..1f74d3436557 100644
--- a/packages/InputDevices/res/values-zh-rCN/strings.xml
+++ b/packages/InputDevices/res/values-zh-rCN/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"泰语 (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"塞尔维亚语(拉丁字母)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"黑山语(拉丁字母)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"塞尔维亚语(西里尔字母)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"黑山语(西里尔字母)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-zh-rHK/strings.xml b/packages/InputDevices/res/values-zh-rHK/strings.xml
index 3d1a895d4641..9c6864a7bec6 100644
--- a/packages/InputDevices/res/values-zh-rHK/strings.xml
+++ b/packages/InputDevices/res/values-zh-rHK/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"泰文 (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"塞爾維亞文 (拉丁)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"蒙特內哥羅文 (拉丁)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"塞爾維亞文 (西里爾字母)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"蒙特內哥羅文 (西里爾字母)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-zh-rTW/strings.xml b/packages/InputDevices/res/values-zh-rTW/strings.xml
index 26be41bce094..f4159c983bb4 100644
--- a/packages/InputDevices/res/values-zh-rTW/strings.xml
+++ b/packages/InputDevices/res/values-zh-rTW/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"泰文 (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"塞爾維亞文 (拉丁字母)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"蒙特內哥羅文 (拉丁字母)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"塞爾維亞文 (西里爾字母)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"蒙特內哥羅文 (西里爾字母)"</string>
</resources>
diff --git a/packages/InputDevices/res/values-zu/strings.xml b/packages/InputDevices/res/values-zu/strings.xml
index f6f6a774526a..ead5a4557901 100644
--- a/packages/InputDevices/res/values-zu/strings.xml
+++ b/packages/InputDevices/res/values-zu/strings.xml
@@ -54,8 +54,6 @@
<string name="keyboard_layout_thai_pattachote" msgid="2547992342794252205">"Isi-Thai (Pattachote)"</string>
<string name="keyboard_layout_serbian_latin" msgid="3128791759390046571">"IsiSerbian (Latin)"</string>
<string name="keyboard_layout_montenegrin_latin" msgid="1467832503378949945">"IsiMontenegrin (Latin)"</string>
- <!-- no translation found for keyboard_layout_serbian_cyrillic (7013541044323542196) -->
- <skip />
- <!-- no translation found for keyboard_layout_montenegrin_cyrillic (2391253952894077421) -->
- <skip />
+ <string name="keyboard_layout_serbian_cyrillic" msgid="7013541044323542196">"Serbian (Cyrillic)"</string>
+ <string name="keyboard_layout_montenegrin_cyrillic" msgid="2391253952894077421">"Montenegrin (Cyrillic)"</string>
</resources>
diff --git a/packages/PackageInstaller/res/values-fr-rCA/strings.xml b/packages/PackageInstaller/res/values-fr-rCA/strings.xml
index 60075e6703fb..2e423396fbd8 100644
--- a/packages/PackageInstaller/res/values-fr-rCA/strings.xml
+++ b/packages/PackageInstaller/res/values-fr-rCA/strings.xml
@@ -23,55 +23,55 @@
<string name="cancel" msgid="1018267193425558088">"Annuler"</string>
<string name="installing" msgid="4921993079741206516">"Installation en cours…"</string>
<string name="installing_app" msgid="1165095864863849422">"Installation de <xliff:g id="PACKAGE_LABEL">%1$s</xliff:g> en cours…"</string>
- <string name="install_done" msgid="5987363587661783896">"Application installée."</string>
- <string name="install_confirm_question" msgid="7663733664476363311">"Voulez-vous installer cette application?"</string>
- <string name="install_confirm_question_update" msgid="3348888852318388584">"Voulez-vous mettre à jour cette application?"</string>
- <string name="install_confirm_question_update_owner_reminder" product="tablet" msgid="7994800761970572198">"&lt;p&gt;Mettre à jour cette application à partir de &lt;b&gt;<xliff:g id="NEW_UPDATE_OWNER">%1$s</xliff:g>&lt;/b&gt;?&lt;/p&gt;&lt;p&gt;Cette application reçoit normalement des mises à jour de &lt;b&gt;<xliff:g id="EXISTING_UPDATE_OWNER">%2$s</xliff:g>&lt;/b&gt;. En effectuant une mise à jour à partir d\'une source différente, vous pourriez recevoir des mises à jour futures à partir de n\'importe quelle source sur votre tablette. Le fonctionnement de l\'application peut en être modifié.&lt;/p&gt;"</string>
- <string name="install_confirm_question_update_owner_reminder" product="tv" msgid="2435174886412089791">"&lt;p&gt;Mettre à jour cette application à partir de &lt;b&gt;<xliff:g id="NEW_UPDATE_OWNER">%1$s</xliff:g>&lt;/b&gt;?&lt;/p&gt;&lt;p&gt;Cette application reçoit normalement des mises à jour de &lt;b&gt;<xliff:g id="EXISTING_UPDATE_OWNER">%2$s</xliff:g>&lt;/b&gt;. En effectuant une mise à jour à partir d\'une source différente, vous pourriez recevoir des mises à jour futures à partir de n\'importe quelle source sur votre téléviseur. Le fonctionnement de l\'application peut en être modifié.&lt;/p&gt;"</string>
- <string name="install_confirm_question_update_owner_reminder" product="default" msgid="7155138616126795839">"&lt;p&gt;Mettre à jour cette application à partir de &lt;b&gt;<xliff:g id="NEW_UPDATE_OWNER">%1$s</xliff:g>&lt;/b&gt;?&lt;/p&gt;&lt;p&gt;Cette application reçoit normalement des mises à jour de &lt;b&gt;<xliff:g id="EXISTING_UPDATE_OWNER">%2$s</xliff:g>&lt;/b&gt;. En effectuant une mise à jour à partir d\'une source différente, vous pourriez recevoir des mises à jour futures à partir de n\'importe quelle source sur votre téléphone. Le fonctionnement de l\'application peut en être modifié.&lt;/p&gt;"</string>
- <string name="install_failed" msgid="5777824004474125469">"Application non installée."</string>
+ <string name="install_done" msgid="5987363587661783896">"Appli installée."</string>
+ <string name="install_confirm_question" msgid="7663733664476363311">"Voulez-vous installer cette appli?"</string>
+ <string name="install_confirm_question_update" msgid="3348888852318388584">"Voulez-vous mettre à jour cette appli?"</string>
+ <string name="install_confirm_question_update_owner_reminder" product="tablet" msgid="7994800761970572198">"&lt;p&gt;Mettre à jour cette appli à partir de &lt;b&gt;<xliff:g id="NEW_UPDATE_OWNER">%1$s</xliff:g>&lt;/b&gt;?&lt;/p&gt;&lt;p&gt;Cette appli reçoit normalement des mises à jour de &lt;b&gt;<xliff:g id="EXISTING_UPDATE_OWNER">%2$s</xliff:g>&lt;/b&gt;. En effectuant une mise à jour à partir d\'une source différente, vous pourriez recevoir des mises à jour futures à partir de n\'importe quelle source sur votre tablette. Le fonctionnement de l\'appli peut en être modifié.&lt;/p&gt;"</string>
+ <string name="install_confirm_question_update_owner_reminder" product="tv" msgid="2435174886412089791">"&lt;p&gt;Mettre à jour cette appli à partir de &lt;b&gt;<xliff:g id="NEW_UPDATE_OWNER">%1$s</xliff:g>&lt;/b&gt;?&lt;/p&gt;&lt;p&gt;Cette appli reçoit normalement des mises à jour de &lt;b&gt;<xliff:g id="EXISTING_UPDATE_OWNER">%2$s</xliff:g>&lt;/b&gt;. En effectuant une mise à jour à partir d\'une source différente, vous pourriez recevoir des mises à jour futures à partir de n\'importe quelle source sur votre téléviseur. Le fonctionnement de l\'appli peut en être modifié.&lt;/p&gt;"</string>
+ <string name="install_confirm_question_update_owner_reminder" product="default" msgid="7155138616126795839">"&lt;p&gt;Mettre à jour cette appli à partir de &lt;b&gt;<xliff:g id="NEW_UPDATE_OWNER">%1$s</xliff:g>&lt;/b&gt;?&lt;/p&gt;&lt;p&gt;Cette appli reçoit normalement des mises à jour de &lt;b&gt;<xliff:g id="EXISTING_UPDATE_OWNER">%2$s</xliff:g>&lt;/b&gt;. En effectuant une mise à jour à partir d\'une source différente, vous pourriez recevoir des mises à jour futures à partir de n\'importe quelle source sur votre téléphone. Le fonctionnement de l\'appli peut en être modifié.&lt;/p&gt;"</string>
+ <string name="install_failed" msgid="5777824004474125469">"Appli non installée."</string>
<string name="install_failed_blocked" msgid="8512284352994752094">"L\'installation du paquet a été bloquée."</string>
- <string name="install_failed_conflict" msgid="3493184212162521426">"L\'application n\'a pas été installée, car le paquet entre en conflit avec un paquet existant."</string>
- <string name="install_failed_incompatible" product="tablet" msgid="6019021440094927928">"L\'application n\'a pas été installée, car elle n\'est pas compatible avec votre tablette."</string>
- <string name="install_failed_incompatible" product="tv" msgid="2890001324362291683">"Cette application n\'est pas compatible avec votre téléviseur."</string>
- <string name="install_failed_incompatible" product="default" msgid="7254630419511645826">"L\'application n\'a pas été installée, car elle n\'est pas compatible avec votre téléphone."</string>
- <string name="install_failed_invalid_apk" msgid="8581007676422623930">"L\'application n\'a pas été installée, car elle ne semble pas être valide."</string>
+ <string name="install_failed_conflict" msgid="3493184212162521426">"L\'appli n\'a pas été installée, car le paquet entre en conflit avec un paquet existant."</string>
+ <string name="install_failed_incompatible" product="tablet" msgid="6019021440094927928">"L\'appli n\'a pas été installée, car elle n\'est pas compatible avec votre tablette."</string>
+ <string name="install_failed_incompatible" product="tv" msgid="2890001324362291683">"Cette appli n\'est pas compatible avec votre téléviseur."</string>
+ <string name="install_failed_incompatible" product="default" msgid="7254630419511645826">"L\'appli n\'a pas été installée, car elle n\'est pas compatible avec votre téléphone."</string>
+ <string name="install_failed_invalid_apk" msgid="8581007676422623930">"L\'appli n\'a pas été installée, car elle ne semble pas être valide."</string>
<string name="install_failed_msg" product="tablet" msgid="6298387264270562442">"Impossible d\'installer <xliff:g id="APP_NAME">%1$s</xliff:g> sur votre tablette."</string>
<string name="install_failed_msg" product="tv" msgid="1920009940048975221">"<xliff:g id="APP_NAME">%1$s</xliff:g> n\'a pas pu être installée sur votre téléviseur."</string>
<string name="install_failed_msg" product="default" msgid="6484461562647915707">"Impossible d\'installer <xliff:g id="APP_NAME">%1$s</xliff:g> sur votre téléphone."</string>
<string name="launch" msgid="3952550563999890101">"Ouvrir"</string>
- <string name="unknown_apps_admin_dlg_text" msgid="4456572224020176095">"Votre administrateur n\'autorise pas l\'installation d\'applications obtenues à partir de sources inconnues"</string>
- <string name="unknown_apps_user_restriction_dlg_text" msgid="151020786933988344">"Cet utilisateur ne peut pas installer d\'applications inconnues"</string>
- <string name="install_apps_user_restriction_dlg_text" msgid="2154119597001074022">"Cet utilisateur n\'est pas autorisé à installer des applications"</string>
+ <string name="unknown_apps_admin_dlg_text" msgid="4456572224020176095">"Votre administrateur n\'autorise pas l\'installation d\'applis obtenues à partir de sources inconnues"</string>
+ <string name="unknown_apps_user_restriction_dlg_text" msgid="151020786933988344">"Cet utilisateur ne peut pas installer d\'applis inconnues"</string>
+ <string name="install_apps_user_restriction_dlg_text" msgid="2154119597001074022">"Cet utilisateur n\'est pas autorisé à installer des applis"</string>
<string name="ok" msgid="7871959885003339302">"OK"</string>
<string name="archive" msgid="4447791830199354721">"Archiver"</string>
<string name="update_anyway" msgid="8792432341346261969">"Mettre à jour malgré tout"</string>
<string name="manage_applications" msgid="5400164782453975580">"Gérer les applis"</string>
<string name="out_of_space_dlg_title" msgid="4156690013884649502">"Espace insuffisant"</string>
<string name="out_of_space_dlg_text" msgid="8727714096031856231">"Impossible d\'installer <xliff:g id="APP_NAME">%1$s</xliff:g>. Veuillez libérer de l\'espace, puis réessayer."</string>
- <string name="app_not_found_dlg_title" msgid="5107924008597470285">"Application non trouvée"</string>
- <string name="app_not_found_dlg_text" msgid="5219983779377811611">"L\'application ne figure pas dans la liste des applications installées."</string>
+ <string name="app_not_found_dlg_title" msgid="5107924008597470285">"Appli non trouvée"</string>
+ <string name="app_not_found_dlg_text" msgid="5219983779377811611">"L\'appli ne figure pas dans la liste des applis installées."</string>
<string name="user_is_not_allowed_dlg_title" msgid="6915293433252210232">"Non autorisée"</string>
<string name="user_is_not_allowed_dlg_text" msgid="3468447791330611681">"L\'utilisateur actuel n\'est pas autorisé à effectuer cette désinstallation."</string>
<string name="generic_error_dlg_title" msgid="5863195085927067752">"Erreur"</string>
- <string name="generic_error_dlg_text" msgid="5287861443265795232">"L\'application n\'a pas pu être désinstallée."</string>
- <string name="uninstall_application_title" msgid="4045420072401428123">"Désinstaller l\'application"</string>
+ <string name="generic_error_dlg_text" msgid="5287861443265795232">"L\'appli n\'a pas pu être désinstallée."</string>
+ <string name="uninstall_application_title" msgid="4045420072401428123">"Désinstaller l\'appli"</string>
<string name="uninstall_update_title" msgid="824411791011583031">"Désinstaller mise à jour"</string>
- <string name="uninstall_activity_text" msgid="1928194674397770771">"<xliff:g id="ACTIVITY_NAME">%1$s</xliff:g> fait partie de l\'application suivante :"</string>
- <string name="uninstall_application_text" msgid="3816830743706143980">"Voulez-vous désinstaller cette application?"</string>
+ <string name="uninstall_activity_text" msgid="1928194674397770771">"<xliff:g id="ACTIVITY_NAME">%1$s</xliff:g> fait partie de l\'appli suivante :"</string>
+ <string name="uninstall_application_text" msgid="3816830743706143980">"Voulez-vous désinstaller cette appli?"</string>
<string name="archive_application_text" msgid="8482325710714386348">"Vos données personnelles seront enregistrées"</string>
- <string name="archive_application_text_all_users" msgid="3151229641681672580">"Archiver cette application pour tous les utilisateurs? Vos données personnelles seront enregistrées"</string>
- <string name="archive_application_text_current_user_work_profile" msgid="1450487362134779752">"Archiver cette application sur votre profil professionnel? Vos données personnelles seront enregistrées"</string>
- <string name="archive_application_text_user" msgid="2586558895535581451">"Archiver cette application pour <xliff:g id="USERNAME">%1$s</xliff:g>? Vos données personnelles seront enregistrées"</string>
- <string name="archive_application_text_current_user_private_profile" msgid="1958423158655599132">"Voulez-vous archiver cette application de votre Espace privé? Vos données personnelles seront enregistrées"</string>
- <string name="uninstall_application_text_all_users" msgid="575491774380227119">"Voulez-vous désinstaller cette application pour "<b>"tous"</b>" les utilisateurs? L\'application et ses données seront supprimées pour "<b>"tous"</b>" les utilisateurs de l\'appareil."</string>
- <string name="uninstall_application_text_user" msgid="498072714173920526">"Voulez-vous désinstaller cette application pour l\'utilisateur <xliff:g id="USERNAME">%1$s</xliff:g>?"</string>
- <string name="uninstall_application_text_current_user_work_profile" msgid="8788387739022366193">"Voulez-vous désinstaller cette application de votre profil professionnel?"</string>
- <string name="uninstall_update_text" msgid="863648314632448705">"Remplacer cette application par la version d\'usine? Toutes les données seront supprimées."</string>
- <string name="uninstall_update_text_multiuser" msgid="8992883151333057227">"Remplacer cette application par la version d\'usine? Toutes les données seront supprimées. Cela touchera tous les utilisateurs de cet appareil, y compris ceux qui utilisent un profil professionnel."</string>
- <string name="uninstall_keep_data" msgid="7002379587465487550">"Garder <xliff:g id="SIZE">%1$s</xliff:g> de données d\'application."</string>
- <string name="uninstall_application_text_current_user_clone_profile" msgid="835170400160011636">"Voulez-vous supprimer cette application?"</string>
- <string name="uninstall_application_text_with_clone_instance" msgid="6944473334273349036">"Voulez-vous désinstaller cette application? Le clone de <xliff:g id="PACKAGE_LABEL">%1$s</xliff:g> sera aussi supprimé."</string>
+ <string name="archive_application_text_all_users" msgid="3151229641681672580">"Archiver cette appli pour tous les utilisateurs? Vos données personnelles seront enregistrées"</string>
+ <string name="archive_application_text_current_user_work_profile" msgid="1450487362134779752">"Archiver cette appli sur votre profil professionnel? Vos données personnelles seront enregistrées"</string>
+ <string name="archive_application_text_user" msgid="2586558895535581451">"Archiver cette appli pour <xliff:g id="USERNAME">%1$s</xliff:g>? Vos données personnelles seront enregistrées"</string>
+ <string name="archive_application_text_current_user_private_profile" msgid="1958423158655599132">"Voulez-vous archiver cette appli de votre Espace privé? Vos données personnelles seront enregistrées"</string>
+ <string name="uninstall_application_text_all_users" msgid="575491774380227119">"Voulez-vous désinstaller cette appli pour "<b>"tous"</b>" les utilisateurs? L\'appli et ses données seront supprimées pour "<b>"tous"</b>" les utilisateurs de l\'appareil."</string>
+ <string name="uninstall_application_text_user" msgid="498072714173920526">"Voulez-vous désinstaller cette appli pour l\'utilisateur <xliff:g id="USERNAME">%1$s</xliff:g>?"</string>
+ <string name="uninstall_application_text_current_user_work_profile" msgid="8788387739022366193">"Voulez-vous désinstaller cette appli de votre profil professionnel?"</string>
+ <string name="uninstall_update_text" msgid="863648314632448705">"Remplacer cette appli par la version d\'usine? Toutes les données seront supprimées."</string>
+ <string name="uninstall_update_text_multiuser" msgid="8992883151333057227">"Remplacer cette appli par la version d\'usine? Toutes les données seront supprimées. Cela touchera tous les utilisateurs de cet appareil, y compris ceux qui utilisent un profil professionnel."</string>
+ <string name="uninstall_keep_data" msgid="7002379587465487550">"Garder <xliff:g id="SIZE">%1$s</xliff:g> de données d\'appli."</string>
+ <string name="uninstall_application_text_current_user_clone_profile" msgid="835170400160011636">"Voulez-vous supprimer cette appli?"</string>
+ <string name="uninstall_application_text_with_clone_instance" msgid="6944473334273349036">"Voulez-vous désinstaller cette appli? Le clone de <xliff:g id="PACKAGE_LABEL">%1$s</xliff:g> sera aussi supprimé."</string>
<string name="uninstall_application_text_current_user_private_profile" msgid="867004464945674674">"Voulez-vous désinstaller cette appli de votre espace privé?"</string>
<string name="uninstalling_notification_channel" msgid="840153394325714653">"Désinstallations en cours…"</string>
<string name="uninstall_failure_notification_channel" msgid="1136405866767576588">"Désinstallations échouées"</string>
@@ -83,47 +83,47 @@
<string name="uninstall_failed" msgid="1847750968168364332">"Échec de la désinstallation."</string>
<string name="uninstall_failed_app" msgid="5506028705017601412">"La désinstallation de <xliff:g id="PACKAGE_LABEL">%1$s</xliff:g> n\'a pas réussi."</string>
<string name="uninstalling_cloned_app" msgid="1826380164974984870">"Suppression du clone <xliff:g id="PACKAGE_LABEL">%1$s</xliff:g>…"</string>
- <string name="uninstall_failed_device_policy_manager" msgid="785293813665540305">"Impossible de désinstaller une application d\'administration de l\'appareil active"</string>
- <string name="uninstall_failed_device_policy_manager_of_user" msgid="4813104025494168064">"Impossible de désinstaller une application d\'administration de l\'appareil active pour <xliff:g id="USERNAME">%1$s</xliff:g>"</string>
- <string name="uninstall_all_blocked_profile_owner" msgid="2009393666026751501">"Cette application est nécessaire pour certains utilisateurs ou profils, et elle a été désinstallée pour d\'autres"</string>
- <string name="uninstall_blocked_profile_owner" msgid="6373897407002404848">"Cette application est nécessaire pour votre profil et ne peut pas être désinstallée."</string>
- <string name="uninstall_blocked_device_owner" msgid="6724602931761073901">"Imposs. de désinst. l\'application : elle est requise par l\'admin de l\'appareil."</string>
- <string name="manage_device_administrators" msgid="3092696419363842816">"Gérer les applications d\'administration d\'appareils"</string>
+ <string name="uninstall_failed_device_policy_manager" msgid="785293813665540305">"Impossible de désinstaller une appli d\'administration de l\'appareil active"</string>
+ <string name="uninstall_failed_device_policy_manager_of_user" msgid="4813104025494168064">"Impossible de désinstaller une appli d\'administration de l\'appareil active pour <xliff:g id="USERNAME">%1$s</xliff:g>"</string>
+ <string name="uninstall_all_blocked_profile_owner" msgid="2009393666026751501">"Cette appli est nécessaire pour certains utilisateurs ou profils, et elle a été désinstallée pour d\'autres"</string>
+ <string name="uninstall_blocked_profile_owner" msgid="6373897407002404848">"Cette appli est nécessaire pour votre profil et ne peut pas être désinstallée."</string>
+ <string name="uninstall_blocked_device_owner" msgid="6724602931761073901">"Imposs. de désinst. l\'appli : elle est requise par l\'admin de l\'appareil."</string>
+ <string name="manage_device_administrators" msgid="3092696419363842816">"Gérer les applis d\'administration d\'appareils"</string>
<string name="manage_users" msgid="1243995386982560813">"Gérer les utilisateurs"</string>
<string name="uninstall_failed_msg" msgid="2176744834786696012">"Impossible de désinstaller <xliff:g id="APP_NAME">%1$s</xliff:g>."</string>
<string name="Parse_error_dlg_text" msgid="1661404001063076789">"Un problème est survenu lors de l\'analyse du paquet."</string>
- <string name="message_staging" msgid="8032722385658438567">"Pré-production de l\'application en cours…"</string>
+ <string name="message_staging" msgid="8032722385658438567">"Pré-production de l\'appli en cours…"</string>
<string name="app_name_unknown" msgid="6881210203354323926">"Inconnue"</string>
- <string name="untrusted_external_source_warning" product="tablet" msgid="7067510047443133095">"À des fins de sécurité, l\'installation d\'applications inconnues provenant de cette source n\'est pas autorisée sur cette tablette. Vous pouvez modifier cette option dans les paramètres."</string>
- <string name="untrusted_external_source_warning" product="tv" msgid="7057271609532508035">"À des fins de sécurité, l\'installation d\'applications inconnues provenant de cette source n\'est pas autorisée sur ce téléviseur. Vous pouvez modifier cette option dans les paramètres."</string>
- <string name="untrusted_external_source_warning" product="watch" msgid="7195163388090818636">"À des fins de sécurité, l\'installation d\'applications inconnues provenant de cette source n\'est pas autorisée sur cette montre. Vous pouvez modifier cette option dans les paramètres."</string>
- <string name="untrusted_external_source_warning" product="default" msgid="8444191224459138919">"À des fins de sécurité, l\'installation d\'applications inconnues provenant de cette source n\'est pas autorisée sur ce téléphone. Vous pouvez modifier cette option dans les paramètres."</string>
- <string name="anonymous_source_warning" product="default" msgid="2784902545920822500">"Votre téléphone et vos données personnelles sont plus vulnérables aux attaques provenant d\'applications inconnues. En installant cette application, vous acceptez d\'être le seul responsable de tout dommage causé à votre téléphone ou de toute perte de données pouvant découler de l\'utilisation de telles applications."</string>
- <string name="anonymous_source_warning" product="tablet" msgid="3939101621438855516">"Votre tablette et vos données personnelles sont plus vulnérables aux attaques provenant d\'applications inconnues. En installant cette application, vous acceptez d\'être le seul responsable de tout dommage causé à votre tablette ou de toute perte de données pouvant découler de l\'utilisation de telles applications."</string>
- <string name="anonymous_source_warning" product="tv" msgid="5599483539528168566">"Votre téléviseur et vos données personnelles sont plus vulnérables aux attaques d\'applications inconnues. En installant cette application, vous acceptez d\'être le seul responsable de tout dommage causé à votre téléviseur ou de toute perte de données pouvant découler de son utilisation."</string>
+ <string name="untrusted_external_source_warning" product="tablet" msgid="7067510047443133095">"À des fins de sécurité, l\'installation d\'applis inconnues provenant de cette source n\'est pas autorisée sur cette tablette. Vous pouvez modifier cette option dans les paramètres."</string>
+ <string name="untrusted_external_source_warning" product="tv" msgid="7057271609532508035">"À des fins de sécurité, l\'installation d\'applis inconnues provenant de cette source n\'est pas autorisée sur ce téléviseur. Vous pouvez modifier cette option dans les paramètres."</string>
+ <string name="untrusted_external_source_warning" product="watch" msgid="7195163388090818636">"À des fins de sécurité, l\'installation d\'applis inconnues provenant de cette source n\'est pas autorisée sur cette montre. Vous pouvez modifier cette option dans les paramètres."</string>
+ <string name="untrusted_external_source_warning" product="default" msgid="8444191224459138919">"À des fins de sécurité, l\'installation d\'applis inconnues provenant de cette source n\'est pas autorisée sur ce téléphone. Vous pouvez modifier cette option dans les paramètres."</string>
+ <string name="anonymous_source_warning" product="default" msgid="2784902545920822500">"Votre téléphone et vos données personnelles sont plus vulnérables aux attaques provenant d\'applis inconnues. En installant cette appli, vous acceptez d\'être le seul responsable de tout dommage causé à votre téléphone ou de toute perte de données pouvant découler de l\'utilisation de telles applis."</string>
+ <string name="anonymous_source_warning" product="tablet" msgid="3939101621438855516">"Votre tablette et vos données personnelles sont plus vulnérables aux attaques provenant d\'applis inconnues. En installant cette appli, vous acceptez d\'être le seul responsable de tout dommage causé à votre tablette ou de toute perte de données pouvant découler de l\'utilisation de telles applis."</string>
+ <string name="anonymous_source_warning" product="tv" msgid="5599483539528168566">"Votre téléviseur et vos données personnelles sont plus vulnérables aux attaques d\'applis inconnues. En installant cette appli, vous acceptez d\'être le seul responsable de tout dommage causé à votre téléviseur ou de toute perte de données pouvant découler de son utilisation."</string>
<string name="cloned_app_label" msgid="7503612829833756160">"Clone de <xliff:g id="PACKAGE_LABEL">%1$s</xliff:g>"</string>
<string name="archiving_app_label" msgid="1127085259724124725">"Archiver <xliff:g id="PACKAGE_LABEL">%1$s</xliff:g>?"</string>
<string name="anonymous_source_continue" msgid="4375745439457209366">"Continuer"</string>
<string name="external_sources_settings" msgid="4046964413071713807">"Paramètres"</string>
<string name="wear_app_channel" msgid="1960809674709107850">"Installer/désinstaller applis Google Wear"</string>
- <string name="app_installed_notification_channel_description" msgid="2695385797601574123">"Notification d\'application installée"</string>
+ <string name="app_installed_notification_channel_description" msgid="2695385797601574123">"Notification d\'appli installée"</string>
<string name="notification_installation_success_message" msgid="6450467996056038442">"Installation réussie"</string>
<string name="notification_installation_success_status" msgid="3172502643504323321">"Installation de « <xliff:g id="APPNAME">%1$s</xliff:g> » réussie"</string>
<string name="unarchive_application_title" msgid="7958278328280721421">"Restaurer <xliff:g id="APPNAME">%1$s</xliff:g> à partir de <xliff:g id="INSTALLERNAME">%2$s</xliff:g>?"</string>
- <string name="unarchive_body_text" msgid="8244155079861708964">"Le téléchargement de cette application commencera en arrière-plan"</string>
+ <string name="unarchive_body_text" msgid="8244155079861708964">"Le téléchargement de cette appli commencera en arrière-plan"</string>
<string name="restore" msgid="8460854736328970444">"Restaurer"</string>
<string name="unarchive_error_offline_title" msgid="4021785324565678605">"Vous êtes hors ligne"</string>
- <string name="unarchive_error_offline_body" msgid="2256042209364094099">"Pour restaurer cette application, vérifiez votre connexion Internet et réessayez."</string>
+ <string name="unarchive_error_offline_body" msgid="2256042209364094099">"Pour restaurer cette appli, vérifiez votre connexion Internet et réessayez."</string>
<string name="unarchive_error_generic_title" msgid="7123457671482449992">"Un problème est survenu"</string>
- <string name="unarchive_error_generic_body" msgid="4486803312463813079">"Un problème est survenu lors de la restauration de cette application"</string>
+ <string name="unarchive_error_generic_body" msgid="4486803312463813079">"Un problème est survenu lors de la restauration de cette appli"</string>
<string name="unarchive_error_storage_title" msgid="5080723357273852630">"Espace de stockage insuffisant"</string>
- <string name="unarchive_error_storage_body" msgid="6879544407568780524">"Pour restaurer cette application, vous devez libérer de l\'espace de stockage sur cet appareil. Espace de stockage requis : <xliff:g id="BYTES">%1$s</xliff:g>"</string>
+ <string name="unarchive_error_storage_body" msgid="6879544407568780524">"Pour restaurer cette appli, vous devez libérer de l\'espace de stockage sur cet appareil. Espace de stockage requis : <xliff:g id="BYTES">%1$s</xliff:g>"</string>
<string name="unarchive_action_required_title" msgid="4971245740162604619">"Action requise"</string>
- <string name="unarchive_action_required_body" msgid="1679431572983989231">"Suivez les étapes suivantes pour restaurer cette application"</string>
+ <string name="unarchive_action_required_body" msgid="1679431572983989231">"Suivez les étapes suivantes pour restaurer cette appli"</string>
<string name="unarchive_error_installer_disabled_title" msgid="4815715617014985605">"<xliff:g id="INSTALLERNAME">%1$s</xliff:g> est désactivé"</string>
- <string name="unarchive_error_installer_disabled_body" msgid="4820821285907011729">"Pour restaurer cette application, activez <xliff:g id="INSTALLERNAME">%1$s</xliff:g> dans les paramètres"</string>
+ <string name="unarchive_error_installer_disabled_body" msgid="4820821285907011729">"Pour restaurer cette appli, activez <xliff:g id="INSTALLERNAME">%1$s</xliff:g> dans les paramètres"</string>
<string name="unarchive_error_installer_uninstalled_title" msgid="3748354109176326489">"<xliff:g id="INSTALLERNAME">%1$s</xliff:g> est désinstallé"</string>
- <string name="unarchive_error_installer_uninstalled_body" msgid="944733542444183204">"Pour restaurer cette application, vous devrez installer <xliff:g id="INSTALLERNAME">%1$s</xliff:g>"</string>
+ <string name="unarchive_error_installer_uninstalled_body" msgid="944733542444183204">"Pour restaurer cette appli, vous devrez installer <xliff:g id="INSTALLERNAME">%1$s</xliff:g>"</string>
<string name="unarchive_action_required_continue" msgid="5711202111224184257">"Continuer"</string>
<string name="unarchive_clear_storage_button" msgid="1549537154535608744">"Effacer le stockage"</string>
<string name="unarchive_settings_button" msgid="3504171760009177425">"Paramètres"</string>
diff --git a/packages/PackageInstaller/src/com/android/packageinstaller/v2/model/InstallRepository.kt b/packages/PackageInstaller/src/com/android/packageinstaller/v2/model/InstallRepository.kt
index c260426d47f5..186b69b4107b 100644
--- a/packages/PackageInstaller/src/com/android/packageinstaller/v2/model/InstallRepository.kt
+++ b/packages/PackageInstaller/src/com/android/packageinstaller/v2/model/InstallRepository.kt
@@ -206,7 +206,7 @@ class InstallRepository(private val context: Context) {
return InstallAborted(ABORT_REASON_INTERNAL_ERROR)
}
- val restriction = getDevicePolicyRestrictions()
+ val restriction = getDevicePolicyRestrictions(isTrustedSource)
if (restriction != null) {
val adminSupportDetailsIntent =
devicePolicyManager!!.createAdminSupportIntent(restriction)
@@ -237,18 +237,25 @@ class InstallRepository(private val context: Context) {
intent: Intent,
callingUid: Int,
): Boolean {
- val isNotUnknownSource = intent.getBooleanExtra(Intent.EXTRA_NOT_UNKNOWN_SOURCE, false)
- return (sourceInfo != null && sourceInfo.isPrivilegedApp
- && (isNotUnknownSource
- || isPermissionGranted(context, Manifest.permission.INSTALL_PACKAGES, callingUid)))
+ val isPrivilegedAndKnown = sourceInfo != null && sourceInfo.isPrivilegedApp &&
+ intent.getBooleanExtra(Intent.EXTRA_NOT_UNKNOWN_SOURCE, false)
+ val isInstallPkgPermissionGranted =
+ isPermissionGranted(context, Manifest.permission.INSTALL_PACKAGES, callingUid)
+
+ return isPrivilegedAndKnown || isInstallPkgPermissionGranted
}
- private fun getDevicePolicyRestrictions(): String? {
- val restrictions = arrayOf(
- UserManager.DISALLOW_INSTALL_APPS,
- UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES,
- UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES_GLOBALLY
- )
+ private fun getDevicePolicyRestrictions(isTrustedSource: Boolean): String? {
+ val restrictions: Array<String> = if (isTrustedSource) {
+ arrayOf(UserManager.DISALLOW_INSTALL_APPS)
+ } else {
+ arrayOf(
+ UserManager.DISALLOW_INSTALL_APPS,
+ UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES,
+ UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES_GLOBALLY
+ )
+ }
+
for (restriction in restrictions) {
if (!userManager!!.hasUserRestrictionForUser(restriction, Process.myUserHandle())) {
continue
@@ -905,8 +912,10 @@ class InstallRepository(private val context: Context) {
"message: $message"
)
}
+
+ val shouldReturnResult = intent.getBooleanExtra(Intent.EXTRA_RETURN_RESULT, false)
+
if (statusCode == PackageInstaller.STATUS_SUCCESS) {
- val shouldReturnResult = intent.getBooleanExtra(Intent.EXTRA_RETURN_RESULT, false)
val resultIntent = if (shouldReturnResult) {
Intent().putExtra(Intent.EXTRA_INSTALL_RESULT, PackageManager.INSTALL_SUCCEEDED)
} else {
@@ -915,12 +924,34 @@ class InstallRepository(private val context: Context) {
}
_installResult.setValue(InstallSuccess(appSnippet, shouldReturnResult, resultIntent))
} else {
- if (statusCode != PackageInstaller.STATUS_FAILURE_ABORTED) {
+ // TODO (b/346655018): Use INSTALL_FAILED_ABORTED legacyCode in the condition
+ // statusCode can be STATUS_FAILURE_ABORTED if:
+ // 1. GPP blocks an install.
+ // 2. User denies ownership update explicitly.
+ // InstallFailed dialog must not be shown only when the user denies ownership update. We
+ // must show this dialog for all other install failures.
+
+ val userDenied =
+ statusCode == PackageInstaller.STATUS_FAILURE_ABORTED &&
+ legacyStatus != PackageManager.INSTALL_FAILED_VERIFICATION_TIMEOUT &&
+ legacyStatus != PackageManager.INSTALL_FAILED_VERIFICATION_FAILURE
+
+ if (shouldReturnResult) {
+ val resultIntent = Intent().putExtra(Intent.EXTRA_INSTALL_RESULT, legacyStatus)
_installResult.setValue(
- InstallFailed(appSnippet, statusCode, legacyStatus, message)
+ InstallFailed(
+ legacyCode = legacyStatus,
+ statusCode = statusCode,
+ shouldReturnResult = true,
+ resultIntent = resultIntent
+ )
)
- } else {
+ } else if (userDenied) {
_installResult.setValue(InstallAborted(ABORT_REASON_INTERNAL_ERROR))
+ } else {
+ _installResult.setValue(
+ InstallFailed(appSnippet, legacyStatus, statusCode, message)
+ )
}
}
}
diff --git a/packages/PackageInstaller/src/com/android/packageinstaller/v2/model/InstallStages.kt b/packages/PackageInstaller/src/com/android/packageinstaller/v2/model/InstallStages.kt
index 5dd4d2905f47..8de8fbb3e688 100644
--- a/packages/PackageInstaller/src/com/android/packageinstaller/v2/model/InstallStages.kt
+++ b/packages/PackageInstaller/src/com/android/packageinstaller/v2/model/InstallStages.kt
@@ -19,6 +19,7 @@ package com.android.packageinstaller.v2.model
import android.app.Activity
import android.content.Intent
import android.content.pm.PackageManager
+import android.content.pm.PackageInstaller
import android.graphics.drawable.Drawable
sealed class InstallStage(val stageCode: Int) {
@@ -77,11 +78,10 @@ data class InstallSuccess(
val shouldReturnResult: Boolean = false,
/**
*
- * * If the caller is requesting a result back, this will hold the Intent with
- * [Intent.EXTRA_INSTALL_RESULT] set to [PackageManager.INSTALL_SUCCEEDED] which is sent
- * back to the caller.
+ * * If the caller is requesting a result back, this will hold an Intent with
+ * [Intent.EXTRA_INSTALL_RESULT] set to [PackageManager.INSTALL_SUCCEEDED].
*
- * * If the caller doesn't want the result back, this will hold the Intent that launches
+ * * If the caller doesn't want the result back, this will hold an Intent that launches
* the newly installed / updated app if a launchable activity exists.
*/
val resultIntent: Intent? = null,
@@ -95,17 +95,23 @@ data class InstallSuccess(
}
data class InstallFailed(
- private val appSnippet: PackageUtil.AppSnippet,
+ private val appSnippet: PackageUtil.AppSnippet? = null,
val legacyCode: Int,
val statusCode: Int,
- val message: String?,
+ val message: String? = null,
+ val shouldReturnResult: Boolean = false,
+ /**
+ * If the caller is requesting a result back, this will hold an Intent with
+ * [Intent.EXTRA_INSTALL_RESULT] set to the [PackageInstaller.EXTRA_LEGACY_STATUS].
+ */
+ val resultIntent: Intent? = null
) : InstallStage(STAGE_FAILED) {
val appIcon: Drawable?
- get() = appSnippet.icon
+ get() = appSnippet?.icon
val appLabel: String?
- get() = appSnippet.label as String?
+ get() = appSnippet?.label as String?
}
data class InstallAborted(
diff --git a/packages/PackageInstaller/src/com/android/packageinstaller/v2/model/PackageUtil.kt b/packages/PackageInstaller/src/com/android/packageinstaller/v2/model/PackageUtil.kt
index 85728528a25c..828a95fcbb01 100644
--- a/packages/PackageInstaller/src/com/android/packageinstaller/v2/model/PackageUtil.kt
+++ b/packages/PackageInstaller/src/com/android/packageinstaller/v2/model/PackageUtil.kt
@@ -130,8 +130,8 @@ object PackageUtil {
* @param context the [Context] object
* @param callingUid the UID of the caller of Pia
* @param isTrustedSource indicates whether install request is coming from a privileged app
- * that has passed EXTRA_NOT_UNKNOWN_SOURCE as `true` in the installation intent, or that has
- * the [INSTALL_PACKAGES][Manifest.permission.INSTALL_PACKAGES] permission granted.
+ * that has passed EXTRA_NOT_UNKNOWN_SOURCE as `true` in the installation intent, or an app that
+ * has the [INSTALL_PACKAGES][Manifest.permission.INSTALL_PACKAGES] permission granted.
*
* @return `true` if the package is either a system downloads provider, a document manager,
* a trusted source, or has declared the
diff --git a/packages/PackageInstaller/src/com/android/packageinstaller/v2/ui/InstallLaunch.kt b/packages/PackageInstaller/src/com/android/packageinstaller/v2/ui/InstallLaunch.kt
index 31b9ccbdb838..e2ab31662380 100644
--- a/packages/PackageInstaller/src/com/android/packageinstaller/v2/ui/InstallLaunch.kt
+++ b/packages/PackageInstaller/src/com/android/packageinstaller/v2/ui/InstallLaunch.kt
@@ -171,15 +171,20 @@ class InstallLaunch : FragmentActivity(), InstallActionListener {
val successIntent = success.resultIntent
setResult(Activity.RESULT_OK, successIntent, true)
} else {
- val successFragment = InstallSuccessFragment(success)
- showDialogInner(successFragment)
+ val successDialog = InstallSuccessFragment(success)
+ showDialogInner(successDialog)
}
}
InstallStage.STAGE_FAILED -> {
val failed = installStage as InstallFailed
- val failedDialog = InstallFailedFragment(failed)
- showDialogInner(failedDialog)
+ if (failed.shouldReturnResult) {
+ val failureIntent = failed.resultIntent
+ setResult(Activity.RESULT_FIRST_USER, failureIntent, true)
+ } else {
+ val failureDialog = InstallFailedFragment(failed)
+ showDialogInner(failureDialog)
+ }
}
else -> {
diff --git a/packages/PrintSpooler/res/values-fr-rCA/strings.xml b/packages/PrintSpooler/res/values-fr-rCA/strings.xml
index 6ffad709b2f3..c2b82afa238a 100644
--- a/packages/PrintSpooler/res/values-fr-rCA/strings.xml
+++ b/packages/PrintSpooler/res/values-fr-rCA/strings.xml
@@ -33,7 +33,7 @@
<string name="pages_range_example" msgid="8558694453556945172">"p. ex. 1-5, 8, 11-13"</string>
<string name="print_preview" msgid="8010217796057763343">"Aperçu avant impression"</string>
<string name="install_for_print_preview" msgid="6366303997385509332">"Installer un lecteur PDF pour voir l\'aperçu"</string>
- <string name="printing_app_crashed" msgid="854477616686566398">"L\'application à l\'origine de l\'impression a planté"</string>
+ <string name="printing_app_crashed" msgid="854477616686566398">"L\'appli à l\'origine de l\'impression a planté"</string>
<string name="generating_print_job" msgid="3119608742651698916">"Génération tâche impression…"</string>
<string name="save_as_pdf" msgid="5718454119847596853">"Enregistrer au format PDF"</string>
<string name="all_printers" msgid="5018829726861876202">"Toutes les imprimantes…"</string>
diff --git a/packages/SettingsLib/AppPreference/res/values-fr-rCA/strings.xml b/packages/SettingsLib/AppPreference/res/values-fr-rCA/strings.xml
index 7be1e97f51e0..4771382de59b 100644
--- a/packages/SettingsLib/AppPreference/res/values-fr-rCA/strings.xml
+++ b/packages/SettingsLib/AppPreference/res/values-fr-rCA/strings.xml
@@ -17,5 +17,5 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="install_type_instant" msgid="7217305006127216917">"Application instantanée"</string>
+ <string name="install_type_instant" msgid="7217305006127216917">"Appli instantanée"</string>
</resources>
diff --git a/packages/SettingsLib/CollapsingToolbarBaseActivity/Android.bp b/packages/SettingsLib/CollapsingToolbarBaseActivity/Android.bp
index 483403971864..b56b944955d7 100644
--- a/packages/SettingsLib/CollapsingToolbarBaseActivity/Android.bp
+++ b/packages/SettingsLib/CollapsingToolbarBaseActivity/Android.bp
@@ -20,6 +20,7 @@ android_library {
static_libs: [
"androidx.annotation_annotation",
"androidx.core_core",
+ "androidx.activity_activity",
"com.google.android.material_material",
"SettingsLibSettingsTransition",
"SettingsLibSettingsTheme",
diff --git a/packages/SettingsLib/CollapsingToolbarBaseActivity/src/com/android/settingslib/collapsingtoolbar/CollapsingToolbarAppCompatActivity.java b/packages/SettingsLib/CollapsingToolbarBaseActivity/src/com/android/settingslib/collapsingtoolbar/CollapsingToolbarAppCompatActivity.java
index 8b27626a08e4..465905170347 100644
--- a/packages/SettingsLib/CollapsingToolbarBaseActivity/src/com/android/settingslib/collapsingtoolbar/CollapsingToolbarAppCompatActivity.java
+++ b/packages/SettingsLib/CollapsingToolbarBaseActivity/src/com/android/settingslib/collapsingtoolbar/CollapsingToolbarAppCompatActivity.java
@@ -64,6 +64,7 @@ public class CollapsingToolbarAppCompatActivity extends AppCompatActivity {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
+ EdgeToEdgeUtils.enable(this);
super.onCreate(savedInstanceState);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
DynamicColors.applyToActivityIfAvailable(this);
diff --git a/packages/SettingsLib/CollapsingToolbarBaseActivity/src/com/android/settingslib/collapsingtoolbar/CollapsingToolbarBaseActivity.java b/packages/SettingsLib/CollapsingToolbarBaseActivity/src/com/android/settingslib/collapsingtoolbar/CollapsingToolbarBaseActivity.java
index 86ce2ab6109f..3965303d3ba5 100644
--- a/packages/SettingsLib/CollapsingToolbarBaseActivity/src/com/android/settingslib/collapsingtoolbar/CollapsingToolbarBaseActivity.java
+++ b/packages/SettingsLib/CollapsingToolbarBaseActivity/src/com/android/settingslib/collapsingtoolbar/CollapsingToolbarBaseActivity.java
@@ -57,6 +57,7 @@ public class CollapsingToolbarBaseActivity extends FragmentActivity {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
+ EdgeToEdgeUtils.enable(this);
super.onCreate(savedInstanceState);
// for backward compatibility on R devices or wearable devices due to small device size.
if (mCustomizeLayoutResId > 0 && (Build.VERSION.SDK_INT < Build.VERSION_CODES.S
diff --git a/packages/SettingsLib/CollapsingToolbarBaseActivity/src/com/android/settingslib/collapsingtoolbar/EdgeToEdgeUtils.java b/packages/SettingsLib/CollapsingToolbarBaseActivity/src/com/android/settingslib/collapsingtoolbar/EdgeToEdgeUtils.java
new file mode 100644
index 000000000000..6e53012e1245
--- /dev/null
+++ b/packages/SettingsLib/CollapsingToolbarBaseActivity/src/com/android/settingslib/collapsingtoolbar/EdgeToEdgeUtils.java
@@ -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.settingslib.collapsingtoolbar;
+
+import android.os.Build;
+
+import androidx.activity.ComponentActivity;
+import androidx.activity.EdgeToEdge;
+import androidx.annotation.NonNull;
+import androidx.core.graphics.Insets;
+import androidx.core.view.ViewCompat;
+import androidx.core.view.WindowInsetsCompat;
+
+/**
+ * Util class for edge to edge.
+ */
+public class EdgeToEdgeUtils {
+ private EdgeToEdgeUtils() {
+ }
+
+ /**
+ * Enable Edge to Edge and handle overlaps using insets. It should be called before
+ * setContentView.
+ */
+ static void enable(@NonNull ComponentActivity activity) {
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.VANILLA_ICE_CREAM) {
+ return;
+ }
+
+ EdgeToEdge.enable(activity);
+
+ ViewCompat.setOnApplyWindowInsetsListener(activity.findViewById(android.R.id.content),
+ (v, windowInsets) -> {
+ Insets insets = windowInsets.getInsets(
+ WindowInsetsCompat.Type.systemBars()
+ | WindowInsetsCompat.Type.ime()
+ | WindowInsetsCompat.Type.displayCutout());
+ int statusBarHeight = activity.getWindow().getDecorView().getRootWindowInsets()
+ .getInsets(WindowInsetsCompat.Type.statusBars()).top;
+ // Apply the insets paddings to the view.
+ v.setPadding(insets.left, statusBarHeight, insets.right, insets.bottom);
+
+ // Return CONSUMED if you don't want the window insets to keep being
+ // passed down to descendant views.
+ return WindowInsetsCompat.CONSUMED;
+ });
+ }
+}
diff --git a/packages/SettingsLib/IllustrationPreference/src/com/android/settingslib/widget/IllustrationPreference.java b/packages/SettingsLib/IllustrationPreference/src/com/android/settingslib/widget/IllustrationPreference.java
index bbf0315aa475..4387b6f061c3 100644
--- a/packages/SettingsLib/IllustrationPreference/src/com/android/settingslib/widget/IllustrationPreference.java
+++ b/packages/SettingsLib/IllustrationPreference/src/com/android/settingslib/widget/IllustrationPreference.java
@@ -16,6 +16,8 @@
package com.android.settingslib.widget;
+import static android.view.View.IMPORTANT_FOR_ACCESSIBILITY_YES;
+
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
@@ -122,6 +124,8 @@ public class IllustrationPreference extends Preference {
public void onBindViewHolder(PreferenceViewHolder holder) {
super.onBindViewHolder(holder);
+ final FrameLayout illustrationFrame = (FrameLayout) holder.findViewById(
+ R.id.illustration_frame);
final ImageView backgroundView =
(ImageView) holder.findViewById(R.id.background_view);
final FrameLayout middleGroundLayout =
@@ -130,15 +134,15 @@ public class IllustrationPreference extends Preference {
(LottieAnimationView) holder.findViewById(R.id.lottie_view);
if (illustrationView != null && !TextUtils.isEmpty(mContentDescription)) {
illustrationView.setContentDescription(mContentDescription);
- illustrationView.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES);
+ illustrationView.setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_YES);
+ final View illustrationContainer = (View) illustrationFrame.getParent();
+ illustrationContainer.setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_YES);
}
// To solve the problem of non-compliant illustrations, we set the frame height
// to 300dp and set the length of the short side of the screen to
// the width of the frame.
final int screenWidth = getContext().getResources().getDisplayMetrics().widthPixels;
final int screenHeight = getContext().getResources().getDisplayMetrics().heightPixels;
- final FrameLayout illustrationFrame = (FrameLayout) holder.findViewById(
- R.id.illustration_frame);
final LayoutParams lp = (LayoutParams) illustrationFrame.getLayoutParams();
lp.width = screenWidth < screenHeight ? screenWidth : screenHeight;
illustrationFrame.setLayoutParams(lp);
diff --git a/packages/SettingsLib/LayoutPreference/res/layout/settings_entity_header.xml b/packages/SettingsLib/LayoutPreference/res/layout/settings_entity_header.xml
index c629d96bcf4b..b967405b5c63 100644
--- a/packages/SettingsLib/LayoutPreference/res/layout/settings_entity_header.xml
+++ b/packages/SettingsLib/LayoutPreference/res/layout/settings_entity_header.xml
@@ -18,38 +18,19 @@
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/entity_header"
- style="@style/EntityHeader"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:paddingStart="?android:attr/listPreferredItemPaddingStart"
- android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
- android:orientation="horizontal">
+ style="@style/SettingsLibEntityHeader">
<LinearLayout
android:id="@+id/entity_header_content"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_centerHorizontal="true"
- android:gravity="center_horizontal"
- android:orientation="vertical">
+ style="@style/SettingsLibEntityHeaderContent">
<ImageView
android:id="@+id/entity_header_icon"
- android:layout_width="48dp"
- android:layout_height="48dp"
- android:scaleType="fitCenter"
- android:antialias="true"/>
+ style="@style/SettingsLibEntityHeaderIcon"/>
<TextView
android:id="@+id/entity_header_title"
- style="@style/TextAppearance.EntityHeaderTitle"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:singleLine="false"
- android:gravity="center"
- android:ellipsize="marquee"
- android:textDirection="locale"
- android:layout_marginTop="8dp"/>
+ style="@style/SettingsLibEntityHeaderTitle"/>
<TextView
android:id="@+id/install_type"
diff --git a/packages/SettingsLib/LayoutPreference/res/values/styles.xml b/packages/SettingsLib/LayoutPreference/res/values/styles.xml
index f958037cfca6..c9d35975a907 100644
--- a/packages/SettingsLib/LayoutPreference/res/values/styles.xml
+++ b/packages/SettingsLib/LayoutPreference/res/values/styles.xml
@@ -22,6 +22,39 @@
<item name="android:paddingEnd">16dp</item>
</style>
+ <style name="SettingsLibEntityHeader" parent="EntityHeader">
+ <item name="android:layout_width">match_parent</item>
+ <item name="android:layout_height">wrap_content</item>
+ <item name="android:paddingStart">?android:attr/listPreferredItemPaddingStart</item>
+ <item name="android:paddingEnd">?android:attr/listPreferredItemPaddingEnd</item>
+ </style>
+
+ <style name="SettingsLibEntityHeaderContent">
+ <item name="android:layout_width">wrap_content</item>
+ <item name="android:layout_height">wrap_content</item>
+ <item name="android:layout_centerHorizontal">true</item>
+ <item name="android:orientation">vertical</item>
+ <item name="android:gravity">center_horizontal</item>
+ </style>
+
+ <style name="SettingsLibEntityHeaderIcon">
+ <item name="android:layout_width">48dp</item>
+ <item name="android:layout_height">48dp</item>
+ <item name="android:scaleType">fitCenter</item>
+ <item name="android:antialias">true</item>
+ </style>
+
+ <style name="SettingsLibEntityHeaderTitle">
+ <item name="android:layout_width">wrap_content</item>
+ <item name="android:layout_height">wrap_content</item>
+ <item name="android:layout_marginTop">8dp</item>
+ <item name="android:singleLine">false</item>
+ <item name="android:gravity">center</item>
+ <item name="android:ellipsize">marquee</item>
+ <item name="android:textDirection">locale</item>
+ <item name="android:textAppearance">@style/TextAppearance.EntityHeaderTitle</item>
+ </style>
+
<style name="CrossProfileEntityHeaderIcon">
<item name="android:layout_width">48dp</item>
<item name="android:layout_height">48dp</item>
@@ -52,4 +85,4 @@
<item name="android:fontFamily">google-sans-medium</item>
<item name="android:layout_marginTop">8dp</item>
</style>
-</resources> \ No newline at end of file
+</resources>
diff --git a/packages/SettingsLib/SettingsTheme/res/values-v35/themes.xml b/packages/SettingsLib/SettingsTheme/res/values-v35/themes.xml
index 6052be3b52e2..b6e80c784f10 100644
--- a/packages/SettingsLib/SettingsTheme/res/values-v35/themes.xml
+++ b/packages/SettingsLib/SettingsTheme/res/values-v35/themes.xml
@@ -22,6 +22,9 @@
<item name="android:textColorPrimary">@color/settingslib_materialColorOnSurface</item>
<item name="android:textColorSecondary">@color/settingslib_text_color_secondary</item>
<item name="android:textColorTertiary">@color/settingslib_materialColorOutline</item>
+ <!-- Set up edge-to-edge configuration for top app bar -->
+ <item name="android:clipToPadding">false</item>
+ <item name="android:clipChildren">false</item>
</style>
<style name="Theme.SettingsBase" parent="Theme.SettingsBase_v35" />
diff --git a/packages/SettingsLib/Spa/build.gradle.kts b/packages/SettingsLib/Spa/build.gradle.kts
index d6345cec7c30..f36344aa4846 100644
--- a/packages/SettingsLib/Spa/build.gradle.kts
+++ b/packages/SettingsLib/Spa/build.gradle.kts
@@ -29,7 +29,7 @@ val androidTop: String = File(rootDir, "../../../../..").canonicalPath
allprojects {
extra["androidTop"] = androidTop
- extra["jetpackComposeVersion"] = "1.7.0-beta02"
+ extra["jetpackComposeVersion"] = "1.7.0-beta05"
}
subprojects {
diff --git a/packages/SettingsLib/Spa/gallery/AndroidManifest.xml b/packages/SettingsLib/Spa/gallery/AndroidManifest.xml
index df5644b8aad0..26453609fc43 100644
--- a/packages/SettingsLib/Spa/gallery/AndroidManifest.xml
+++ b/packages/SettingsLib/Spa/gallery/AndroidManifest.xml
@@ -46,20 +46,6 @@
</intent-filter>
</provider>
- <provider android:name="com.android.settingslib.spa.slice.SpaSliceProvider"
- android:authorities="com.android.spa.gallery.slice.provider"
- android:exported="true" >
- <intent-filter>
- <action android:name="android.intent.action.VIEW" />
- <category android:name="android.app.slice.category.SLICE" />
- </intent-filter>
- </provider>
-
- <receiver
- android:name="com.android.settingslib.spa.slice.SpaSliceBroadcastReceiver"
- android:exported="false">
- </receiver>
-
<activity
android:name="com.android.settingslib.spa.debug.BlankActivity"
android:exported="true">
diff --git a/packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/GallerySpaEnvironment.kt b/packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/GallerySpaEnvironment.kt
index 91bd7916b0ab..ffd28798d82f 100644
--- a/packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/GallerySpaEnvironment.kt
+++ b/packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/GallerySpaEnvironment.kt
@@ -55,7 +55,6 @@ import com.android.settingslib.spa.gallery.ui.CategoryPageProvider
import com.android.settingslib.spa.gallery.ui.CopyablePageProvider
import com.android.settingslib.spa.gallery.scaffold.ScrollablePagerPageProvider
import com.android.settingslib.spa.gallery.ui.SpinnerPageProvider
-import com.android.settingslib.spa.slice.SpaSliceBroadcastReceiver
/**
* Enum to define all SPP name here.
@@ -120,9 +119,7 @@ class GallerySpaEnvironment(context: Context) : SpaEnvironment(context) {
override val logger = DebugLogger()
override val browseActivityClass = GalleryMainActivity::class.java
- override val sliceBroadcastReceiverClass = SpaSliceBroadcastReceiver::class.java
// For debugging
override val searchProviderAuthorities = "com.android.spa.gallery.search.provider"
- override val sliceProviderAuthorities = "com.android.spa.gallery.slice.provider"
}
diff --git a/packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/preference/PreferencePageProvider.kt b/packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/preference/PreferencePageProvider.kt
index 96de1a778c97..6d1d34628efa 100644
--- a/packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/preference/PreferencePageProvider.kt
+++ b/packages/SettingsLib/Spa/gallery/src/com/android/settingslib/spa/gallery/preference/PreferencePageProvider.kt
@@ -27,7 +27,6 @@ import androidx.compose.runtime.remember
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
import com.android.settingslib.spa.framework.common.EntrySearchData
-import com.android.settingslib.spa.framework.common.EntrySliceData
import com.android.settingslib.spa.framework.common.EntryStatusData
import com.android.settingslib.spa.framework.common.SettingsEntry
import com.android.settingslib.spa.framework.common.SettingsEntryBuilder
@@ -35,10 +34,8 @@ import com.android.settingslib.spa.framework.common.SettingsPageProvider
import com.android.settingslib.spa.framework.common.SpaEnvironmentFactory
import com.android.settingslib.spa.framework.common.createSettingsPage
import com.android.settingslib.spa.framework.theme.SettingsTheme
-import com.android.settingslib.spa.framework.util.createIntent
import com.android.settingslib.spa.gallery.R
import com.android.settingslib.spa.gallery.SettingsPageProviderEnum
-import com.android.settingslib.spa.gallery.preference.PreferencePageModel.Companion.ASYNC_PREFERENCE_SUMMARY
import com.android.settingslib.spa.gallery.preference.PreferencePageModel.Companion.ASYNC_PREFERENCE_TITLE
import com.android.settingslib.spa.gallery.preference.PreferencePageModel.Companion.AUTO_UPDATE_PREFERENCE_TITLE
import com.android.settingslib.spa.gallery.preference.PreferencePageModel.Companion.DISABLE_PREFERENCE_SUMMARY
@@ -48,15 +45,10 @@ import com.android.settingslib.spa.gallery.preference.PreferencePageModel.Compan
import com.android.settingslib.spa.gallery.preference.PreferencePageModel.Companion.SIMPLE_PREFERENCE_KEYWORDS
import com.android.settingslib.spa.gallery.preference.PreferencePageModel.Companion.SIMPLE_PREFERENCE_SUMMARY
import com.android.settingslib.spa.gallery.preference.PreferencePageModel.Companion.SIMPLE_PREFERENCE_TITLE
-import com.android.settingslib.spa.slice.createBrowsePendingIntent
-import com.android.settingslib.spa.slice.provider.createDemoActionSlice
-import com.android.settingslib.spa.slice.provider.createDemoBrowseSlice
-import com.android.settingslib.spa.slice.provider.createDemoSlice
import com.android.settingslib.spa.widget.preference.Preference
import com.android.settingslib.spa.widget.preference.PreferenceModel
import com.android.settingslib.spa.widget.preference.SimplePreferenceMacro
import com.android.settingslib.spa.widget.ui.SettingsIcon
-import kotlinx.coroutines.delay
private const val TAG = "PreferencePage"
@@ -139,26 +131,6 @@ object PreferencePageProvider : SettingsPageProvider {
override val enabled = { model.asyncEnable.value }
}
)
- }
- .setSliceDataFn { sliceUri, _ ->
- val createSliceImpl = { s: String ->
- createDemoBrowseSlice(
- sliceUri = sliceUri,
- title = ASYNC_PREFERENCE_TITLE,
- summary = s,
- )
- }
- return@setSliceDataFn object : EntrySliceData() {
- init {
- postValue(createSliceImpl("(loading)"))
- }
-
- override suspend fun asyncRunner() {
- spaLogger.message(TAG, "Async entry loading")
- delay(2000L)
- postValue(createSliceImpl(ASYNC_PREFERENCE_SUMMARY))
- }
- }
}.build()
)
entryList.add(
@@ -176,28 +148,6 @@ object PreferencePageProvider : SettingsPageProvider {
}
}
)
- }
- .setSliceDataFn { sliceUri, args ->
- val createSliceImpl = { v: Int ->
- createDemoActionSlice(
- sliceUri = sliceUri,
- title = MANUAL_UPDATE_PREFERENCE_TITLE,
- summary = "manual update value $v",
- )
- }
-
- return@setSliceDataFn object : EntrySliceData() {
- private var tick = args?.getString("init")?.toInt() ?: 0
-
- init {
- postValue(createSliceImpl(tick))
- }
-
- override suspend fun asyncAction() {
- tick++
- postValue(createSliceImpl(tick))
- }
- }
}.build()
)
entryList.add(
@@ -216,33 +166,6 @@ object PreferencePageProvider : SettingsPageProvider {
}
}
)
- }
- .setSliceDataFn { sliceUri, args ->
- val createSliceImpl = { v: Int ->
- createDemoBrowseSlice(
- sliceUri = sliceUri,
- title = AUTO_UPDATE_PREFERENCE_TITLE,
- summary = "auto update value $v",
- )
- }
-
- return@setSliceDataFn object : EntrySliceData() {
- private var tick = args?.getString("init")?.toInt() ?: 0
-
- init {
- postValue(createSliceImpl(tick))
- }
-
- override suspend fun asyncRunner() {
- spaLogger.message(TAG, "autoUpdater.active")
- while (true) {
- delay(1000L)
- tick++
- spaLogger.message(TAG, "autoUpdater.value $tick")
- postValue(createSliceImpl(tick))
- }
- }
- }
}.build()
)
@@ -272,22 +195,6 @@ object PreferencePageProvider : SettingsPageProvider {
clickRoute = SettingsPageProviderEnum.PREFERENCE.name
)
}
- .setSliceDataFn { sliceUri, _ ->
- val intent = owner.createIntent()?.createBrowsePendingIntent()
- ?: return@setSliceDataFn null
- return@setSliceDataFn object : EntrySliceData() {
- init {
- postValue(
- createDemoSlice(
- sliceUri = sliceUri,
- title = PAGE_TITLE,
- summary = "Injected Entry",
- intent = intent,
- )
- )
- }
- }
- }
}
override fun getTitle(arguments: Bundle?): String {
diff --git a/packages/SettingsLib/Spa/gradle/libs.versions.toml b/packages/SettingsLib/Spa/gradle/libs.versions.toml
index a842009a09bb..1cca73af9a42 100644
--- a/packages/SettingsLib/Spa/gradle/libs.versions.toml
+++ b/packages/SettingsLib/Spa/gradle/libs.versions.toml
@@ -15,7 +15,7 @@
#
[versions]
-agp = "8.5.0"
+agp = "8.5.1"
compose-compiler = "1.5.11"
dexmaker-mockito = "2.28.3"
jvm = "17"
diff --git a/packages/SettingsLib/Spa/gradle/wrapper/gradle-8.8-bin.zip b/packages/SettingsLib/Spa/gradle/wrapper/gradle-8.9-bin.zip
index 77e6ad3f2117..9a97e4674448 100644
--- a/packages/SettingsLib/Spa/gradle/wrapper/gradle-8.8-bin.zip
+++ b/packages/SettingsLib/Spa/gradle/wrapper/gradle-8.9-bin.zip
Binary files differ
diff --git a/packages/SettingsLib/Spa/gradle/wrapper/gradle-wrapper.jar b/packages/SettingsLib/Spa/gradle/wrapper/gradle-wrapper.jar
index e6441136f3d4..2c3521197d7c 100644
--- a/packages/SettingsLib/Spa/gradle/wrapper/gradle-wrapper.jar
+++ b/packages/SettingsLib/Spa/gradle/wrapper/gradle-wrapper.jar
Binary files differ
diff --git a/packages/SettingsLib/Spa/gradle/wrapper/gradle-wrapper.properties b/packages/SettingsLib/Spa/gradle/wrapper/gradle-wrapper.properties
index 91d2a3ab217d..9f29c77d55f6 100644
--- a/packages/SettingsLib/Spa/gradle/wrapper/gradle-wrapper.properties
+++ b/packages/SettingsLib/Spa/gradle/wrapper/gradle-wrapper.properties
@@ -16,6 +16,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=gradle-8.8-bin.zip
+distributionUrl=gradle-8.9-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/packages/SettingsLib/Spa/gradlew b/packages/SettingsLib/Spa/gradlew
index b740cf13397a..f5feea6d6b11 100755
--- a/packages/SettingsLib/Spa/gradlew
+++ b/packages/SettingsLib/Spa/gradlew
@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
+# SPDX-License-Identifier: Apache-2.0
+#
##############################################################################
#
@@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
-APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
+APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
+' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
diff --git a/packages/SettingsLib/Spa/spa/Android.bp b/packages/SettingsLib/Spa/spa/Android.bp
index 6df0e9956f27..ac44a1be4cff 100644
--- a/packages/SettingsLib/Spa/spa/Android.bp
+++ b/packages/SettingsLib/Spa/spa/Android.bp
@@ -25,9 +25,6 @@ android_library {
use_resource_processor: true,
static_libs: [
"SettingsLibColor",
- "androidx.slice_slice-builders",
- "androidx.slice_slice-core",
- "androidx.slice_slice-view",
"androidx.compose.animation_animation",
"androidx.compose.material3_material3",
"androidx.compose.material_material-icons-extended",
diff --git a/packages/SettingsLib/Spa/spa/build.gradle.kts b/packages/SettingsLib/Spa/spa/build.gradle.kts
index 9b8ecf773661..ce3d96e2d388 100644
--- a/packages/SettingsLib/Spa/spa/build.gradle.kts
+++ b/packages/SettingsLib/Spa/spa/build.gradle.kts
@@ -53,17 +53,14 @@ android {
dependencies {
api(project(":SettingsLibColor"))
- api("androidx.appcompat:appcompat:1.7.0-rc01")
- api("androidx.slice:slice-builders:1.1.0-alpha02")
- api("androidx.slice:slice-core:1.1.0-alpha02")
- api("androidx.slice:slice-view:1.1.0-alpha02")
- api("androidx.compose.material3:material3:1.3.0-beta02")
+ api("androidx.appcompat:appcompat:1.7.0")
+ api("androidx.compose.material3:material3:1.3.0-beta04")
api("androidx.compose.material:material-icons-extended:$jetpackComposeVersion")
api("androidx.compose.runtime:runtime-livedata:$jetpackComposeVersion")
api("androidx.compose.ui:ui-tooling-preview:$jetpackComposeVersion")
api("androidx.lifecycle:lifecycle-livedata-ktx")
api("androidx.lifecycle:lifecycle-runtime-compose")
- api("androidx.navigation:navigation-compose:2.8.0-beta02")
+ api("androidx.navigation:navigation-compose:2.8.0-beta05")
api("com.github.PhilJay:MPAndroidChart:v3.1.0-alpha")
api("com.google.android.material:material:1.11.0")
debugApi("androidx.compose.ui:ui-tooling:$jetpackComposeVersion")
@@ -97,10 +94,6 @@ tasks.register<JacocoReport>("coverageReport") {
// Excludes debug functions
"com/android/settingslib/spa/framework/compose/TimeMeasurer*",
-
- // Excludes slice demo presenter & provider
- "com/android/settingslib/spa/slice/presenter/Demo*",
- "com/android/settingslib/spa/slice/provider/Demo*",
)
)
}
diff --git a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/debug/DebugActivity.kt b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/debug/DebugActivity.kt
index 14af5084d625..296579333115 100644
--- a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/debug/DebugActivity.kt
+++ b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/debug/DebugActivity.kt
@@ -16,7 +16,6 @@
package com.android.settingslib.spa.debug
-import android.net.Uri
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
@@ -41,8 +40,6 @@ import com.android.settingslib.spa.framework.theme.SettingsTheme
import com.android.settingslib.spa.framework.util.SESSION_BROWSE
import com.android.settingslib.spa.framework.util.SESSION_SEARCH
import com.android.settingslib.spa.framework.util.createIntent
-import com.android.settingslib.spa.slice.fromEntry
-import com.android.settingslib.spa.slice.presenter.SliceDemo
import com.android.settingslib.spa.widget.preference.Preference
import com.android.settingslib.spa.widget.preference.PreferenceModel
import com.android.settingslib.spa.widget.scaffold.HomeScaffold
@@ -52,7 +49,6 @@ private const val TAG = "DebugActivity"
private const val ROUTE_ROOT = "root"
private const val ROUTE_All_PAGES = "pages"
private const val ROUTE_All_ENTRIES = "entries"
-private const val ROUTE_All_SLICES = "slices"
private const val ROUTE_PAGE = "page"
private const val ROUTE_ENTRY = "entry"
private const val PARAM_NAME_PAGE_ID = "pid"
@@ -87,7 +83,6 @@ class DebugActivity : ComponentActivity() {
composable(route = ROUTE_ROOT) { RootPage() }
composable(route = ROUTE_All_PAGES) { AllPages() }
composable(route = ROUTE_All_ENTRIES) { AllEntries() }
- composable(route = ROUTE_All_SLICES) { AllSlices() }
composable(
route = "$ROUTE_PAGE/{$PARAM_NAME_PAGE_ID}",
arguments = listOf(
@@ -109,8 +104,6 @@ class DebugActivity : ComponentActivity() {
val entryRepository by spaEnvironment.entryRepository
val allPageWithEntry = remember { entryRepository.getAllPageWithEntry() }
val allEntry = remember { entryRepository.getAllEntries() }
- val allSliceEntry =
- remember { entryRepository.getAllEntries().filter { it.hasSliceSupport } }
HomeScaffold(title = "Settings Debug") {
Preference(object : PreferenceModel {
override val title = "List All Pages (${allPageWithEntry.size})"
@@ -120,10 +113,6 @@ class DebugActivity : ComponentActivity() {
override val title = "List All Entries (${allEntry.size})"
override val onClick = navigator(route = ROUTE_All_ENTRIES)
})
- Preference(object : PreferenceModel {
- override val title = "List All Slices (${allSliceEntry.size})"
- override val onClick = navigator(route = ROUTE_All_SLICES)
- })
}
}
@@ -152,18 +141,6 @@ class DebugActivity : ComponentActivity() {
}
}
- @Composable
- fun AllSlices() {
- val entryRepository by spaEnvironment.entryRepository
- val authority = spaEnvironment.sliceProviderAuthorities
- val allSliceEntry =
- remember { entryRepository.getAllEntries().filter { it.hasSliceSupport } }
- RegularScaffold(title = "All Slices (${allSliceEntry.size})") {
- for (entry in allSliceEntry) {
- SliceDemo(sliceUri = Uri.Builder().fromEntry(entry, authority).build())
- }
- }
- }
@Composable
fun OnePage(arguments: Bundle?) {
diff --git a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/debug/DebugFormat.kt b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/debug/DebugFormat.kt
index 444a3f0fd634..06d105ba61d8 100644
--- a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/debug/DebugFormat.kt
+++ b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/debug/DebugFormat.kt
@@ -70,7 +70,6 @@ fun SettingsEntry.debugContent(entryRepository: SettingsEntryRepository): String
"allowSearch = $isAllowSearch",
"isSearchDynamic = $isSearchDataDynamic",
"isSearchMutable = $hasMutableStatus",
- "hasSlice = $hasSliceSupport",
"------ SEARCH ------",
"search_path = $entryPathWithTitle",
searchData?.debugContent() ?: "no search data",
diff --git a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/common/EntrySliceData.kt b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/common/EntrySliceData.kt
deleted file mode 100644
index fc551a88f6c5..000000000000
--- a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/common/EntrySliceData.kt
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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.spa.framework.common
-
-import androidx.lifecycle.LiveData
-import androidx.slice.Slice
-import kotlinx.coroutines.CoroutineScope
-import kotlinx.coroutines.Dispatchers
-import kotlinx.coroutines.Job
-import kotlinx.coroutines.launch
-
-open class EntrySliceData : LiveData<Slice?>() {
- private val asyncRunnerScope = CoroutineScope(Dispatchers.IO)
- private var asyncRunnerJob: Job? = null
- private var asyncActionJob: Job? = null
- private var isActive = false
-
- open suspend fun asyncRunner() {}
-
- open suspend fun asyncAction() {}
-
- override fun onActive() {
- asyncRunnerJob?.cancel()
- asyncRunnerJob = asyncRunnerScope.launch { asyncRunner() }
- isActive = true
- }
-
- override fun onInactive() {
- asyncRunnerJob?.cancel()
- asyncRunnerJob = null
- asyncActionJob?.cancel()
- asyncActionJob = null
- isActive = false
- }
-
- fun isActive(): Boolean {
- return isActive
- }
-
- fun doAction() {
- asyncActionJob?.cancel()
- asyncActionJob = asyncRunnerScope.launch { asyncAction() }
- }
-}
diff --git a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/common/SettingsEntry.kt b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/common/SettingsEntry.kt
index 90581b99160d..3f53091c8a63 100644
--- a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/common/SettingsEntry.kt
+++ b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/common/SettingsEntry.kt
@@ -16,7 +16,6 @@
package com.android.settingslib.spa.framework.common
-import android.net.Uri
import android.os.Bundle
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
@@ -42,7 +41,6 @@ val LocalEntryDataProvider =
typealias UiLayerRenderer = @Composable (arguments: Bundle?) -> Unit
typealias StatusDataGetter = (arguments: Bundle?) -> EntryStatusData?
typealias SearchDataGetter = (arguments: Bundle?) -> EntrySearchData?
-typealias SliceDataGetter = (sliceUri: Uri, arguments: Bundle?) -> EntrySliceData?
/**
* Defines data of a Settings entry.
@@ -80,9 +78,6 @@ data class SettingsEntry(
// If so, for instance, we'll reindex its status for search.
val hasMutableStatus: Boolean = false,
- // Indicate whether the entry has SliceProvider support.
- val hasSliceSupport: Boolean = false,
-
/**
* ========================================
* Defines entry APIs to get data here.
@@ -102,12 +97,6 @@ data class SettingsEntry(
private val searchDataImpl: SearchDataGetter = { null },
/**
- * API to get Slice data of this entry. The Slice data is implemented as a LiveData,
- * and is associated with the Slice's lifecycle (pin / unpin) by the framework.
- */
- private val sliceDataImpl: SliceDataGetter = { _: Uri, _: Bundle? -> null },
-
- /**
* API to Render UI of this entry directly. For now, we use it in the internal injection, to
* support the case that the injection page owner wants to maintain both data and UI of the
* injected entry. In the long term, we may deprecate the @Composable Page() API in SPP, and
@@ -137,10 +126,6 @@ data class SettingsEntry(
return searchDataImpl(fullArgument(runtimeArguments))
}
- fun getSliceData(sliceUri: Uri, runtimeArguments: Bundle? = null): EntrySliceData? {
- return sliceDataImpl(sliceUri, fullArgument(runtimeArguments))
- }
-
@Composable
fun UiLayout(runtimeArguments: Bundle? = null) {
val arguments = remember { fullArgument(runtimeArguments) }
diff --git a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/common/SettingsEntryBuilder.kt b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/common/SettingsEntryBuilder.kt
index 0d489e895017..ddb571d1392f 100644
--- a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/common/SettingsEntryBuilder.kt
+++ b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/common/SettingsEntryBuilder.kt
@@ -16,7 +16,6 @@
package com.android.settingslib.spa.framework.common
-import android.net.Uri
import android.os.Bundle
import androidx.compose.runtime.remember
import com.android.settingslib.spa.framework.util.genEntryId
@@ -36,13 +35,11 @@ class SettingsEntryBuilder(private val name: String, private val owner: Settings
private var isAllowSearch: Boolean = false
private var isSearchDataDynamic: Boolean = false
private var hasMutableStatus: Boolean = false
- private var hasSliceSupport: Boolean = false
// Functions
private var uiLayoutFn: UiLayerRenderer = { }
private var statusDataFn: StatusDataGetter = { null }
private var searchDataFn: SearchDataGetter = { null }
- private var sliceDataFn: SliceDataGetter = { _: Uri, _: Bundle? -> null }
fun build(): SettingsEntry {
val page = fromPage ?: owner
@@ -58,16 +55,13 @@ class SettingsEntryBuilder(private val name: String, private val owner: Settings
toPage = toPage,
// attributes
- // TODO: set isEnabled & (isAllowSearch, hasSliceSupport) separately
isAllowSearch = isEnabled && isAllowSearch,
isSearchDataDynamic = isSearchDataDynamic,
hasMutableStatus = hasMutableStatus,
- hasSliceSupport = isEnabled && hasSliceSupport,
// functions
statusDataImpl = statusDataFn,
searchDataImpl = searchDataFn,
- sliceDataImpl = sliceDataFn,
uiLayoutImpl = uiLayoutFn,
)
}
@@ -123,12 +117,6 @@ class SettingsEntryBuilder(private val name: String, private val owner: Settings
return this
}
- fun setSliceDataFn(fn: SliceDataGetter): SettingsEntryBuilder {
- this.sliceDataFn = fn
- this.hasSliceSupport = true
- return this
- }
-
fun setUiLayoutFn(fn: UiLayerRenderer): SettingsEntryBuilder {
this.uiLayoutFn = fn
return this
diff --git a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/common/SettingsPageProvider.kt b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/common/SettingsPageProvider.kt
index 95c7d2371b3d..cc5351a3b81d 100644
--- a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/common/SettingsPageProvider.kt
+++ b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/common/SettingsPageProvider.kt
@@ -57,8 +57,8 @@ interface SettingsPageProvider {
/**
* The API to indicate whether the page is enabled or not.
* During SPA page migration, one can use it to enable certain pages in one release.
- * When the page is disabled, all its related functionalities, such as browsing, search,
- * slice provider, are disabled as well.
+ * When the page is disabled, all its related functionalities, such as browsing and search,
+ * are disabled as well.
*/
fun isEnabled(arguments: Bundle?): Boolean = true
diff --git a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/common/SpaEnvironment.kt b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/common/SpaEnvironment.kt
index 2d956d5eddb2..11ae9e92b5ff 100644
--- a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/common/SpaEnvironment.kt
+++ b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/common/SpaEnvironment.kt
@@ -17,12 +17,10 @@
package com.android.settingslib.spa.framework.common
import android.app.Activity
-import android.content.BroadcastReceiver
import android.content.Context
import android.util.Log
import androidx.compose.runtime.Composable
import androidx.compose.ui.platform.LocalContext
-import com.android.settingslib.spa.slice.SettingsSliceDataRepository
private const val TAG = "SpaEnvironment"
@@ -69,8 +67,6 @@ abstract class SpaEnvironment(context: Context) {
val entryRepository = lazy { SettingsEntryRepository(pageProviderRepository.value) }
- val sliceDataRepository = lazy { SettingsSliceDataRepository(entryRepository.value) }
-
// The application context. Use local context as fallback when applicationContext is not
// available (e.g. in Robolectric test).
val appContext: Context = context.applicationContext ?: context
@@ -78,14 +74,12 @@ abstract class SpaEnvironment(context: Context) {
// Set your SpaLogger implementation, for any SPA events logging.
open val logger: SpaLogger = object : SpaLogger {}
- // Specify class name of browse activity and slice broadcast receiver, which is used to
+ // Specify class name of browse activity, which is used to
// generate the necessary intents.
open val browseActivityClass: Class<out Activity>? = null
- open val sliceBroadcastReceiverClass: Class<out BroadcastReceiver>? = null
// Specify provider authorities for debugging purpose.
open val searchProviderAuthorities: String? = null
- open val sliceProviderAuthorities: String? = null
// TODO: add other environment setup here.
companion object {
diff --git a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/util/SpaIntent.kt b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/util/SpaIntent.kt
index d8c35a36d061..9e8ca0cd71a4 100644
--- a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/util/SpaIntent.kt
+++ b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/util/SpaIntent.kt
@@ -25,7 +25,6 @@ import com.android.settingslib.spa.framework.common.SpaEnvironmentFactory
const val SESSION_UNKNOWN = "unknown"
const val SESSION_BROWSE = "browse"
const val SESSION_SEARCH = "search"
-const val SESSION_SLICE = "slice"
const val SESSION_EXTERNAL = "external"
const val KEY_DESTINATION = "spaActivityDestination"
diff --git a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/search/SpaSearchContract.kt b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/search/SpaSearchContract.kt
index 780933d3c9e2..e5bbb8f027bf 100644
--- a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/search/SpaSearchContract.kt
+++ b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/search/SpaSearchContract.kt
@@ -50,7 +50,6 @@ enum class ColumnEnum(val id: String) {
INTENT_TARGET_PACKAGE("intentTargetPackage"),
INTENT_TARGET_CLASS("intentTargetClass"),
INTENT_EXTRAS("intentExtras"),
- SLICE_URI("sliceUri"),
ENTRY_DISABLED("entryDisabled"),
}
@@ -71,7 +70,6 @@ enum class QueryEnum(
ColumnEnum.INTENT_TARGET_PACKAGE,
ColumnEnum.INTENT_TARGET_CLASS,
ColumnEnum.INTENT_EXTRAS,
- ColumnEnum.SLICE_URI,
)
),
SEARCH_DYNAMIC_DATA_QUERY(
@@ -85,7 +83,6 @@ enum class QueryEnum(
ColumnEnum.INTENT_TARGET_PACKAGE,
ColumnEnum.INTENT_TARGET_CLASS,
ColumnEnum.INTENT_EXTRAS,
- ColumnEnum.SLICE_URI,
)
),
SEARCH_IMMUTABLE_STATUS_DATA_QUERY(
@@ -115,7 +112,6 @@ enum class QueryEnum(
ColumnEnum.INTENT_TARGET_PACKAGE,
ColumnEnum.INTENT_TARGET_CLASS,
ColumnEnum.INTENT_EXTRAS,
- ColumnEnum.SLICE_URI,
ColumnEnum.ENTRY_DISABLED,
)
),
@@ -130,7 +126,6 @@ enum class QueryEnum(
ColumnEnum.INTENT_TARGET_PACKAGE,
ColumnEnum.INTENT_TARGET_CLASS,
ColumnEnum.INTENT_EXTRAS,
- ColumnEnum.SLICE_URI,
ColumnEnum.ENTRY_DISABLED,
)
),
diff --git a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/search/SpaSearchProvider.kt b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/search/SpaSearchProvider.kt
index eacb28c29bc3..65f700cb8b94 100644
--- a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/search/SpaSearchProvider.kt
+++ b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/search/SpaSearchProvider.kt
@@ -32,8 +32,6 @@ import com.android.settingslib.spa.framework.common.SettingsEntry
import com.android.settingslib.spa.framework.common.SpaEnvironmentFactory
import com.android.settingslib.spa.framework.util.SESSION_SEARCH
import com.android.settingslib.spa.framework.util.createIntent
-import com.android.settingslib.spa.slice.fromEntry
-
private const val TAG = "SpaSearchProvider"
@@ -217,11 +215,6 @@ class SpaSearchProvider : ContentProvider() {
.add(ColumnEnum.INTENT_TARGET_CLASS.id, spaEnvironment.browseActivityClass?.name)
.add(ColumnEnum.INTENT_EXTRAS.id, marshall(intent.extras))
}
- if (entry.hasSliceSupport)
- row.add(
- ColumnEnum.SLICE_URI.id, Uri.Builder()
- .fromEntry(entry, spaEnvironment.sliceProviderAuthorities)
- )
}
private fun fetchStatusData(entry: SettingsEntry, cursor: MatrixCursor) {
@@ -252,11 +245,6 @@ class SpaSearchProvider : ContentProvider() {
.add(ColumnEnum.INTENT_TARGET_CLASS.id, spaEnvironment.browseActivityClass?.name)
.add(ColumnEnum.INTENT_EXTRAS.id, marshall(intent.extras))
}
- if (entry.hasSliceSupport)
- row.add(
- ColumnEnum.SLICE_URI.id, Uri.Builder()
- .fromEntry(entry, spaEnvironment.sliceProviderAuthorities)
- )
// Fetch status data. We can add runtime arguments later if necessary
val statusData = entry.getStatusData() ?: return
row.add(ColumnEnum.ENTRY_DISABLED.id, statusData.isDisabled)
diff --git a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/slice/SettingsSliceDataRepository.kt b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/slice/SettingsSliceDataRepository.kt
deleted file mode 100644
index 7a4750dfb134..000000000000
--- a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/slice/SettingsSliceDataRepository.kt
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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.spa.slice
-
-import android.net.Uri
-import android.util.Log
-import com.android.settingslib.spa.framework.common.EntrySliceData
-import com.android.settingslib.spa.framework.common.SettingsEntryRepository
-import com.android.settingslib.spa.framework.util.getEntryId
-
-private const val TAG = "SliceDataRepository"
-
-class SettingsSliceDataRepository(private val entryRepository: SettingsEntryRepository) {
- // The map of slice uri to its EntrySliceData, a.k.a. LiveData<Slice?>
- private val sliceDataMap: MutableMap<String, EntrySliceData> = mutableMapOf()
-
- // Note: mark this function synchronized, so that we can get the same livedata during the
- // whole lifecycle of a Slice.
- @Synchronized
- fun getOrBuildSliceData(sliceUri: Uri): EntrySliceData? {
- val sliceString = sliceUri.getSliceId() ?: return null
- return sliceDataMap[sliceString] ?: buildLiveDataImpl(sliceUri)?.let {
- sliceDataMap[sliceString] = it
- it
- }
- }
-
- fun getActiveSliceData(sliceUri: Uri): EntrySliceData? {
- val sliceString = sliceUri.getSliceId() ?: return null
- val sliceData = sliceDataMap[sliceString] ?: return null
- return if (sliceData.isActive()) sliceData else null
- }
-
- private fun buildLiveDataImpl(sliceUri: Uri): EntrySliceData? {
- Log.d(TAG, "buildLiveData: $sliceUri")
-
- val entryId = sliceUri.getEntryId() ?: return null
- val entry = entryRepository.getEntry(entryId) ?: return null
- if (!entry.hasSliceSupport) return null
- val arguments = sliceUri.getRuntimeArguments()
- return entry.getSliceData(runtimeArguments = arguments, sliceUri = sliceUri)
- }
-}
diff --git a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/slice/SliceUtil.kt b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/slice/SliceUtil.kt
deleted file mode 100644
index f3628903dc6d..000000000000
--- a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/slice/SliceUtil.kt
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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.spa.slice
-
-import android.app.Activity
-import android.app.PendingIntent
-import android.content.BroadcastReceiver
-import android.content.ComponentName
-import android.content.Context
-import android.content.Intent
-import android.net.Uri
-import android.os.Bundle
-import com.android.settingslib.spa.framework.common.SettingsEntry
-import com.android.settingslib.spa.framework.common.SpaEnvironmentFactory
-import com.android.settingslib.spa.framework.util.KEY_DESTINATION
-import com.android.settingslib.spa.framework.util.KEY_HIGHLIGHT_ENTRY
-import com.android.settingslib.spa.framework.util.SESSION_SLICE
-import com.android.settingslib.spa.framework.util.SPA_INTENT_RESERVED_KEYS
-import com.android.settingslib.spa.framework.util.appendSpaParams
-import com.android.settingslib.spa.framework.util.getDestination
-import com.android.settingslib.spa.framework.util.getEntryId
-
-// Defines SliceUri, which contains special query parameters:
-// -- KEY_DESTINATION: The route that this slice is navigated to.
-// -- KEY_HIGHLIGHT_ENTRY: The entry id of this slice
-// Other parameters can considered as runtime parameters.
-// Use {entryId, runtimeParams} as the unique Id of this Slice.
-typealias SliceUri = Uri
-
-fun SliceUri.getEntryId(): String? {
- return getQueryParameter(KEY_HIGHLIGHT_ENTRY)
-}
-
-fun SliceUri.getDestination(): String? {
- return getQueryParameter(KEY_DESTINATION)
-}
-
-fun SliceUri.getRuntimeArguments(): Bundle {
- val params = Bundle()
- for (queryName in queryParameterNames) {
- if (SPA_INTENT_RESERVED_KEYS.contains(queryName)) continue
- params.putString(queryName, getQueryParameter(queryName))
- }
- return params
-}
-
-fun SliceUri.getSliceId(): String? {
- val entryId = getEntryId() ?: return null
- val params = getRuntimeArguments()
- return "${entryId}_$params"
-}
-
-fun Uri.Builder.appendSpaParams(
- destination: String? = null,
- entryId: String? = null,
- runtimeArguments: Bundle? = null
-): Uri.Builder {
- if (destination != null) appendQueryParameter(KEY_DESTINATION, destination)
- if (entryId != null) appendQueryParameter(KEY_HIGHLIGHT_ENTRY, entryId)
- if (runtimeArguments != null) {
- for (key in runtimeArguments.keySet()) {
- appendQueryParameter(key, runtimeArguments.getString(key, ""))
- }
- }
- return this
-}
-
-fun Uri.Builder.fromEntry(
- entry: SettingsEntry,
- authority: String?,
- runtimeArguments: Bundle? = null
-): Uri.Builder {
- if (authority == null) return this
- val sp = entry.containerPage()
- return scheme("content").authority(authority).appendSpaParams(
- destination = sp.buildRoute(),
- entryId = entry.id,
- runtimeArguments = runtimeArguments
- )
-}
-
-fun SliceUri.createBroadcastPendingIntent(): PendingIntent? {
- val context = SpaEnvironmentFactory.instance.appContext
- val sliceBroadcastClass =
- SpaEnvironmentFactory.instance.sliceBroadcastReceiverClass ?: return null
- val entryId = getEntryId() ?: return null
- return createBroadcastPendingIntent(context, sliceBroadcastClass, entryId)
-}
-
-fun SliceUri.createBrowsePendingIntent(): PendingIntent? {
- val context = SpaEnvironmentFactory.instance.appContext
- val browseActivityClass = SpaEnvironmentFactory.instance.browseActivityClass ?: return null
- val destination = getDestination() ?: return null
- val entryId = getEntryId()
- return createBrowsePendingIntent(context, browseActivityClass, destination, entryId)
-}
-
-fun Intent.createBrowsePendingIntent(): PendingIntent? {
- val context = SpaEnvironmentFactory.instance.appContext
- val browseActivityClass = SpaEnvironmentFactory.instance.browseActivityClass ?: return null
- val destination = getDestination() ?: return null
- val entryId = getEntryId()
- return createBrowsePendingIntent(context, browseActivityClass, destination, entryId)
-}
-
-private fun createBrowsePendingIntent(
- context: Context,
- browseActivityClass: Class<out Activity>,
- destination: String,
- entryId: String?
-): PendingIntent {
- val intent = Intent().setComponent(ComponentName(context, browseActivityClass))
- .appendSpaParams(destination, entryId, SESSION_SLICE)
- .apply {
- // Set both extra and data (which is a Uri) in Slice Intent:
- // 1) extra is used in SPA navigation framework
- // 2) data is used in Slice framework
- data = Uri.Builder().appendSpaParams(destination, entryId).build()
- flags = Intent.FLAG_ACTIVITY_NEW_TASK
- }
-
- return PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_IMMUTABLE)
-}
-
-private fun createBroadcastPendingIntent(
- context: Context,
- sliceBroadcastClass: Class<out BroadcastReceiver>,
- entryId: String
-): PendingIntent {
- val intent = Intent().setComponent(ComponentName(context, sliceBroadcastClass))
- .apply { data = Uri.Builder().appendSpaParams(entryId = entryId).build() }
- return PendingIntent.getBroadcast(
- context, 0 /* requestCode */, intent,
- PendingIntent.FLAG_CANCEL_CURRENT or PendingIntent.FLAG_MUTABLE
- )
-}
diff --git a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/slice/SpaSliceBroadcastReceiver.kt b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/slice/SpaSliceBroadcastReceiver.kt
deleted file mode 100644
index 39cb43180f58..000000000000
--- a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/slice/SpaSliceBroadcastReceiver.kt
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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.spa.slice
-
-import android.content.BroadcastReceiver
-import android.content.Context
-import android.content.Intent
-import com.android.settingslib.spa.framework.common.SpaEnvironmentFactory
-
-class SpaSliceBroadcastReceiver : BroadcastReceiver() {
- override fun onReceive(context: Context?, intent: Intent?) {
- val sliceRepository by SpaEnvironmentFactory.instance.sliceDataRepository
- val sliceUri = intent?.data ?: return
- val sliceData = sliceRepository.getActiveSliceData(sliceUri) ?: return
- sliceData.doAction()
- }
-}
diff --git a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/slice/SpaSliceProvider.kt b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/slice/SpaSliceProvider.kt
deleted file mode 100644
index 3496f02a70e4..000000000000
--- a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/slice/SpaSliceProvider.kt
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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.spa.slice
-
-import android.net.Uri
-import android.util.Log
-import androidx.lifecycle.Observer
-import androidx.slice.Slice
-import androidx.slice.SliceProvider
-import com.android.settingslib.spa.framework.common.EntrySliceData
-import com.android.settingslib.spa.framework.common.SpaEnvironmentFactory
-import kotlinx.coroutines.Dispatchers
-import kotlinx.coroutines.runBlocking
-import kotlinx.coroutines.withContext
-
-private const val TAG = "SpaSliceProvider"
-
-class SpaSliceProvider : SliceProvider(), Observer<Slice?> {
- private fun getOrPutSliceData(sliceUri: Uri): EntrySliceData? {
- if (!SpaEnvironmentFactory.isReady()) return null
- val sliceRepository by SpaEnvironmentFactory.instance.sliceDataRepository
- return sliceRepository.getOrBuildSliceData(sliceUri)
- }
-
- override fun onBindSlice(sliceUri: Uri): Slice? {
- if (context == null) return null
- Log.d(TAG, "onBindSlice: $sliceUri")
- return getOrPutSliceData(sliceUri)?.value
- }
-
- override fun onSlicePinned(sliceUri: Uri) {
- Log.d(TAG, "onSlicePinned: $sliceUri")
- super.onSlicePinned(sliceUri)
- val sliceLiveData = getOrPutSliceData(sliceUri) ?: return
- runBlocking {
- withContext(Dispatchers.Main) {
- sliceLiveData.observeForever(this@SpaSliceProvider)
- }
- }
- }
-
- override fun onSliceUnpinned(sliceUri: Uri) {
- Log.d(TAG, "onSliceUnpinned: $sliceUri")
- super.onSliceUnpinned(sliceUri)
- val sliceLiveData = getOrPutSliceData(sliceUri) ?: return
- runBlocking {
- withContext(Dispatchers.Main) {
- sliceLiveData.removeObserver(this@SpaSliceProvider)
- }
- }
- }
-
- override fun onChanged(value: Slice?) {
- val uri = value?.uri ?: return
- Log.d(TAG, "onChanged: $uri")
- context?.contentResolver?.notifyChange(uri, null)
- }
-
- override fun onCreateSliceProvider(): Boolean {
- Log.d(TAG, "onCreateSliceProvider")
- return true
- }
-}
diff --git a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/slice/presenter/Demo.kt b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/slice/presenter/Demo.kt
deleted file mode 100644
index 007f47bd3c82..000000000000
--- a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/slice/presenter/Demo.kt
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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.spa.slice.presenter
-
-import android.net.Uri
-import androidx.compose.material3.HorizontalDivider
-import androidx.compose.runtime.Composable
-import androidx.compose.runtime.remember
-import androidx.compose.ui.platform.LocalContext
-import androidx.compose.ui.viewinterop.AndroidView
-import androidx.lifecycle.compose.LocalLifecycleOwner
-import androidx.slice.widget.SliceLiveData
-import androidx.slice.widget.SliceView
-
-@Composable
-fun SliceDemo(sliceUri: Uri) {
- val context = LocalContext.current
- val lifecycleOwner = LocalLifecycleOwner.current
- val sliceData = remember {
- SliceLiveData.fromUri(context, sliceUri)
- }
-
- HorizontalDivider()
- AndroidView(
- factory = { localContext ->
- val view = SliceView(localContext)
- view.setShowTitleItems(true)
- view.isScrollable = false
- view
- },
- update = { view -> sliceData.observe(lifecycleOwner, view) }
- )
-}
diff --git a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/slice/provider/Demo.kt b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/slice/provider/Demo.kt
deleted file mode 100644
index e4a738631474..000000000000
--- a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/slice/provider/Demo.kt
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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.spa.slice.provider
-
-import android.app.PendingIntent
-import android.content.Context
-import android.net.Uri
-import androidx.core.R
-import androidx.core.graphics.drawable.IconCompat
-import androidx.slice.Slice
-import androidx.slice.SliceManager
-import androidx.slice.builders.ListBuilder
-import androidx.slice.builders.SliceAction
-import com.android.settingslib.spa.framework.common.SpaEnvironmentFactory
-import com.android.settingslib.spa.slice.createBroadcastPendingIntent
-import com.android.settingslib.spa.slice.createBrowsePendingIntent
-
-fun createDemoBrowseSlice(sliceUri: Uri, title: String, summary: String): Slice? {
- val intent = sliceUri.createBrowsePendingIntent() ?: return null
- return createDemoSlice(sliceUri, title, summary, intent)
-}
-
-fun createDemoActionSlice(sliceUri: Uri, title: String, summary: String): Slice? {
- val intent = sliceUri.createBroadcastPendingIntent() ?: return null
- return createDemoSlice(sliceUri, title, summary, intent)
-}
-
-fun createDemoSlice(sliceUri: Uri, title: String, summary: String, intent: PendingIntent): Slice? {
- val context = SpaEnvironmentFactory.instance.appContext
- if (!SliceManager.getInstance(context).pinnedSlices.contains(sliceUri)) return null
- return ListBuilder(context, sliceUri, ListBuilder.INFINITY)
- .addRow(ListBuilder.RowBuilder().apply {
- setPrimaryAction(createSliceAction(context, intent))
- setTitle(title)
- setSubtitle(summary)
- }).build()
-}
-
-private fun createSliceAction(context: Context, intent: PendingIntent): SliceAction {
- return SliceAction.create(
- intent,
- IconCompat.createWithResource(context, R.drawable.notification_action_background),
- ListBuilder.ICON_IMAGE,
- "Enter app"
- )
-}
diff --git a/packages/SettingsLib/Spa/tests/src/com/android/settingslib/spa/framework/common/SettingsEntryTest.kt b/packages/SettingsLib/Spa/tests/src/com/android/settingslib/spa/framework/common/SettingsEntryTest.kt
index ce349795c8c6..d0a040c003b5 100644
--- a/packages/SettingsLib/Spa/tests/src/com/android/settingslib/spa/framework/common/SettingsEntryTest.kt
+++ b/packages/SettingsLib/Spa/tests/src/com/android/settingslib/spa/framework/common/SettingsEntryTest.kt
@@ -17,7 +17,6 @@
package com.android.settingslib.spa.framework.common
import android.content.Context
-import android.net.Uri
import androidx.compose.runtime.Composable
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.core.os.bundleOf
@@ -25,8 +24,6 @@ import androidx.test.core.app.ApplicationProvider
import androidx.test.ext.junit.runners.AndroidJUnit4
import com.android.settingslib.spa.framework.util.genEntryId
import com.android.settingslib.spa.framework.util.genPageId
-import com.android.settingslib.spa.slice.appendSpaParams
-import com.android.settingslib.spa.slice.getEntryId
import com.android.settingslib.spa.tests.testutils.SpaEnvironmentForTest
import com.android.settingslib.spa.tests.testutils.createSettingsPage
import com.google.common.truth.Truth.assertThat
@@ -76,7 +73,6 @@ class SettingsEntryTest {
assertThat(entry.isAllowSearch).isFalse()
assertThat(entry.isSearchDataDynamic).isFalse()
assertThat(entry.hasMutableStatus).isFalse()
- assertThat(entry.hasSliceSupport).isFalse()
}
@Test
@@ -137,7 +133,6 @@ class SettingsEntryTest {
.setIsSearchDataDynamic(false)
.setHasMutableStatus(true)
.setSearchDataFn { null }
- .setSliceDataFn { _, _ -> null }
val entry = entryBuilder.build()
assertThat(entry.id).isEqualTo(genEntryId("myEntry", owner))
assertThat(entry.label).isEqualTo("myEntryDisplay")
@@ -146,7 +141,6 @@ class SettingsEntryTest {
assertThat(entry.isAllowSearch).isTrue()
assertThat(entry.isSearchDataDynamic).isFalse()
assertThat(entry.hasMutableStatus).isTrue()
- assertThat(entry.hasSliceSupport).isTrue()
// Test disabled Spp
val ownerDisabled = createSettingsPage("SppDisabled")
@@ -156,7 +150,6 @@ class SettingsEntryTest {
.setIsSearchDataDynamic(false)
.setHasMutableStatus(true)
.setSearchDataFn { null }
- .setSliceDataFn { _, _ -> null }
val entryDisabled = entryBuilderDisabled.build()
assertThat(entryDisabled.id).isEqualTo(genEntryId("myEntry", ownerDisabled))
assertThat(entryDisabled.label).isEqualTo("myEntryDisplay")
@@ -165,7 +158,6 @@ class SettingsEntryTest {
assertThat(entryDisabled.isAllowSearch).isFalse()
assertThat(entryDisabled.isSearchDataDynamic).isFalse()
assertThat(entryDisabled.hasMutableStatus).isTrue()
- assertThat(entryDisabled.hasSliceSupport).isFalse()
// Clear search data fn
val entry2 = entryBuilder.clearSearchDataFn().build()
@@ -181,7 +173,6 @@ class SettingsEntryTest {
assertThat(entry3.isAllowSearch).isFalse()
assertThat(entry3.isSearchDataDynamic).isFalse()
assertThat(entry3.hasMutableStatus).isTrue()
- assertThat(entry3.hasSliceSupport).isFalse()
}
@Test
@@ -200,7 +191,6 @@ class SettingsEntryTest {
assertThat(entry.isAllowSearch).isTrue()
assertThat(entry.isSearchDataDynamic).isFalse()
assertThat(entry.hasMutableStatus).isFalse()
- assertThat(entry.hasSliceSupport).isFalse()
val searchData = entry.getSearchData(rtArguments)
val statusData = entry.getStatusData(rtArguments)
assertThat(searchData?.title).isEqualTo("myTitle")
@@ -208,25 +198,4 @@ class SettingsEntryTest {
assertThat(statusData?.isDisabled).isTrue()
assertThat(statusData?.isSwitchOff).isTrue()
}
-
- @Test
- fun testSetSliceDataFn() {
- SpaEnvironmentFactory.reset(spaEnvironment)
- val owner = createSettingsPage("SppHome")
- val entryId = genEntryId("myEntry", owner)
- val emptySliceData = EntrySliceData()
-
- val entryBuilder = SettingsEntryBuilder.create(owner, "myEntry").setSliceDataFn { uri, _ ->
- return@setSliceDataFn if (uri.getEntryId() == entryId) emptySliceData else null
- }
- val entry = entryBuilder.build()
- assertThat(entry.id).isEqualTo(entryId)
- assertThat(entry.hasSliceSupport).isTrue()
- assertThat(entry.getSliceData(Uri.EMPTY)).isNull()
- assertThat(
- entry.getSliceData(
- Uri.Builder().scheme("content").appendSpaParams(entryId = entryId).build()
- )
- ).isEqualTo(emptySliceData)
- }
}
diff --git a/packages/SettingsLib/Spa/tests/src/com/android/settingslib/spa/slice/SettingsSliceDataRepositoryTest.kt b/packages/SettingsLib/Spa/tests/src/com/android/settingslib/spa/slice/SettingsSliceDataRepositoryTest.kt
deleted file mode 100644
index 341a4a5134f9..000000000000
--- a/packages/SettingsLib/Spa/tests/src/com/android/settingslib/spa/slice/SettingsSliceDataRepositoryTest.kt
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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.spa.slice
-
-import android.content.Context
-import android.net.Uri
-import androidx.arch.core.executor.testing.InstantTaskExecutorRule
-import androidx.lifecycle.Observer
-import androidx.slice.Slice
-import androidx.test.core.app.ApplicationProvider
-import androidx.test.ext.junit.runners.AndroidJUnit4
-import com.android.settingslib.spa.framework.common.SpaEnvironmentFactory
-import com.android.settingslib.spa.framework.common.createSettingsPage
-import com.android.settingslib.spa.framework.util.genEntryId
-import com.android.settingslib.spa.tests.testutils.SpaEnvironmentForTest
-import com.android.settingslib.spa.tests.testutils.SppHome
-import com.android.settingslib.spa.tests.testutils.SppLayer2
-import com.google.common.truth.Truth.assertThat
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-
-@RunWith(AndroidJUnit4::class)
-class SettingsSliceDataRepositoryTest {
- @get:Rule val instantTaskExecutorRule = InstantTaskExecutorRule()
-
- private val context: Context = ApplicationProvider.getApplicationContext()
- private val spaEnvironment =
- SpaEnvironmentForTest(context, listOf(SppHome.createSettingsPage()))
- private val sliceDataRepository by spaEnvironment.sliceDataRepository
-
- @Test
- fun getOrBuildSliceDataTest() {
- SpaEnvironmentFactory.reset(spaEnvironment)
-
- // Slice empty
- assertThat(sliceDataRepository.getOrBuildSliceData(Uri.EMPTY)).isNull()
-
- // Slice supported
- val page = SppLayer2.createSettingsPage()
- val entryId = genEntryId("Layer2Entry1", page)
- val sliceUri = Uri.Builder().appendSpaParams(page.buildRoute(), entryId).build()
- assertThat(sliceUri.getDestination()).isEqualTo("SppLayer2")
- assertThat(sliceUri.getSliceId()).isEqualTo("${entryId}_Bundle[{}]")
- val sliceData = sliceDataRepository.getOrBuildSliceData(sliceUri)
- assertThat(sliceData).isNotNull()
- assertThat(sliceDataRepository.getOrBuildSliceData(sliceUri)).isSameInstanceAs(sliceData)
-
- // Slice unsupported
- val entryId2 = genEntryId("Layer2Entry2", page)
- val sliceUri2 = Uri.Builder().appendSpaParams(page.buildRoute(), entryId2).build()
- assertThat(sliceUri2.getDestination()).isEqualTo("SppLayer2")
- assertThat(sliceUri2.getSliceId()).isEqualTo("${entryId2}_Bundle[{}]")
- assertThat(sliceDataRepository.getOrBuildSliceData(sliceUri2)).isNull()
- }
-
- @Test
- fun getActiveSliceDataTest() {
- SpaEnvironmentFactory.reset(spaEnvironment)
-
- val page = SppLayer2.createSettingsPage()
- val entryId = genEntryId("Layer2Entry1", page)
- val sliceUri = Uri.Builder().appendSpaParams(page.buildRoute(), entryId).build()
-
- // build slice data first
- val sliceData = sliceDataRepository.getOrBuildSliceData(sliceUri)
-
- // slice data is inactive
- assertThat(sliceData!!.isActive()).isFalse()
- assertThat(sliceDataRepository.getActiveSliceData(sliceUri)).isNull()
-
- // slice data is active
- val observer = Observer<Slice?> { }
- sliceData.observeForever(observer)
- assertThat(sliceData.isActive()).isTrue()
- assertThat(sliceDataRepository.getActiveSliceData(sliceUri)).isSameInstanceAs(sliceData)
-
- // slice data is inactive again
- sliceData.removeObserver(observer)
- assertThat(sliceData.isActive()).isFalse()
- assertThat(sliceDataRepository.getActiveSliceData(sliceUri)).isNull()
- }
-}
diff --git a/packages/SettingsLib/Spa/tests/src/com/android/settingslib/spa/slice/SliceUtilTest.kt b/packages/SettingsLib/Spa/tests/src/com/android/settingslib/spa/slice/SliceUtilTest.kt
deleted file mode 100644
index d1c4e5110f60..000000000000
--- a/packages/SettingsLib/Spa/tests/src/com/android/settingslib/spa/slice/SliceUtilTest.kt
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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.spa.slice
-
-import android.content.Context
-import android.content.Intent
-import android.net.Uri
-import androidx.core.os.bundleOf
-import androidx.test.core.app.ApplicationProvider
-import androidx.test.ext.junit.runners.AndroidJUnit4
-import com.android.settingslib.spa.framework.common.SpaEnvironmentFactory
-import com.android.settingslib.spa.tests.testutils.SpaEnvironmentForTest
-import com.google.common.truth.Truth.assertThat
-import org.junit.Test
-import org.junit.runner.RunWith
-
-@RunWith(AndroidJUnit4::class)
-class SliceUtilTest {
- private val context: Context = ApplicationProvider.getApplicationContext()
- private val spaEnvironment = SpaEnvironmentForTest(context)
-
- @Test
- fun sliceUriTest() {
- assertThat(Uri.EMPTY.getEntryId()).isNull()
- assertThat(Uri.EMPTY.getDestination()).isNull()
- assertThat(Uri.EMPTY.getRuntimeArguments().size()).isEqualTo(0)
- assertThat(Uri.EMPTY.getSliceId()).isNull()
-
- // valid slice uri
- val dest = "myRoute"
- val entryId = "myEntry"
- val sliceUriWithoutParams = Uri.Builder().appendSpaParams(dest, entryId).build()
- assertThat(sliceUriWithoutParams.getEntryId()).isEqualTo(entryId)
- assertThat(sliceUriWithoutParams.getDestination()).isEqualTo(dest)
- assertThat(sliceUriWithoutParams.getRuntimeArguments().size()).isEqualTo(0)
- assertThat(sliceUriWithoutParams.getSliceId()).isEqualTo("${entryId}_Bundle[{}]")
-
- val sliceUriWithParams =
- Uri.Builder().appendSpaParams(dest, entryId, bundleOf("p1" to "v1")).build()
- assertThat(sliceUriWithParams.getEntryId()).isEqualTo(entryId)
- assertThat(sliceUriWithParams.getDestination()).isEqualTo(dest)
- assertThat(sliceUriWithParams.getRuntimeArguments().size()).isEqualTo(1)
- assertThat(sliceUriWithParams.getSliceId()).isEqualTo("${entryId}_Bundle[{p1=v1}]")
- }
-
- @Test
- fun createBroadcastPendingIntentTest() {
- SpaEnvironmentFactory.reset(spaEnvironment)
-
- // Empty Slice Uri
- assertThat(Uri.EMPTY.createBroadcastPendingIntent()).isNull()
-
- // Valid Slice Uri
- val dest = "myRoute"
- val entryId = "myEntry"
- val sliceUriWithoutParams = Uri.Builder().appendSpaParams(dest, entryId).build()
- val pendingIntent = sliceUriWithoutParams.createBroadcastPendingIntent()
- assertThat(pendingIntent).isNotNull()
- assertThat(pendingIntent!!.isBroadcast).isTrue()
- assertThat(pendingIntent.isImmutable).isFalse()
- }
-
- @Test
- fun createBrowsePendingIntentTest() {
- SpaEnvironmentFactory.reset(spaEnvironment)
-
- // Empty Slice Uri
- assertThat(Uri.EMPTY.createBrowsePendingIntent()).isNull()
-
- // Empty Intent
- assertThat(Intent().createBrowsePendingIntent()).isNull()
-
- // Valid Slice Uri
- val dest = "myRoute"
- val entryId = "myEntry"
- val sliceUri = Uri.Builder().appendSpaParams(dest, entryId).build()
- val pendingIntent = sliceUri.createBrowsePendingIntent()
- assertThat(pendingIntent).isNotNull()
- assertThat(pendingIntent!!.isActivity).isTrue()
- assertThat(pendingIntent.isImmutable).isTrue()
-
- // Valid Intent
- val intent = Intent().apply {
- putExtra("spaActivityDestination", dest)
- putExtra("highlightEntry", entryId)
- }
- val pendingIntent2 = intent.createBrowsePendingIntent()
- assertThat(pendingIntent2).isNotNull()
- assertThat(pendingIntent2!!.isActivity).isTrue()
- assertThat(pendingIntent2.isImmutable).isTrue()
- }
-} \ No newline at end of file
diff --git a/packages/SettingsLib/Spa/tests/src/com/android/settingslib/spa/tests/testutils/SpaEnvironmentForTest.kt b/packages/SettingsLib/Spa/tests/src/com/android/settingslib/spa/tests/testutils/SpaEnvironmentForTest.kt
index 22a5ca328755..9fcf886e52ca 100644
--- a/packages/SettingsLib/Spa/tests/src/com/android/settingslib/spa/tests/testutils/SpaEnvironmentForTest.kt
+++ b/packages/SettingsLib/Spa/tests/src/com/android/settingslib/spa/tests/testutils/SpaEnvironmentForTest.kt
@@ -17,9 +17,7 @@
package com.android.settingslib.spa.tests.testutils
import android.app.Activity
-import android.content.BroadcastReceiver
import android.content.Context
-import android.content.Intent
import android.os.Bundle
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
@@ -27,7 +25,6 @@ import androidx.navigation.NavType
import androidx.navigation.navArgument
import com.android.settingslib.spa.framework.BrowseActivity
import com.android.settingslib.spa.framework.common.EntrySearchData
-import com.android.settingslib.spa.framework.common.EntrySliceData
import com.android.settingslib.spa.framework.common.EntryStatusData
import com.android.settingslib.spa.framework.common.LogCategory
import com.android.settingslib.spa.framework.common.LogEvent
@@ -75,9 +72,6 @@ class SpaLoggerForTest : SpaLogger {
}
class BlankActivity : BrowseActivity()
-class BlankSliceBroadcastReceiver : BroadcastReceiver() {
- override fun onReceive(p0: Context?, p1: Intent?) {}
-}
object SppHome : SettingsPageProvider {
override val name = "SppHome"
@@ -149,15 +143,7 @@ object SppLayer2 : SettingsPageProvider {
override fun buildEntry(arguments: Bundle?): List<SettingsEntry> {
val owner = this.createSettingsPage()
return listOf(
- SettingsEntryBuilder.create(owner, "Layer2Entry1")
- .setSliceDataFn { _, _ ->
- return@setSliceDataFn object : EntrySliceData() {
- init {
- postValue(null)
- }
- }
- }
- .build(),
+ SettingsEntryBuilder.create(owner, "Layer2Entry1").build(),
SettingsEntryBuilder.create(owner, "Layer2Entry2").build(),
)
}
@@ -216,8 +202,6 @@ class SpaEnvironmentForTest(
context: Context,
rootPages: List<SettingsPage> = emptyList(),
override val browseActivityClass: Class<out Activity>? = BlankActivity::class.java,
- override val sliceBroadcastReceiverClass: Class<out BroadcastReceiver>? =
- BlankSliceBroadcastReceiver::class.java,
override val logger: SpaLogger = object : SpaLogger {}
) : SpaEnvironment(context) {
diff --git a/packages/SettingsLib/SpaPrivileged/res/values-fr-rCA/strings.xml b/packages/SettingsLib/SpaPrivileged/res/values-fr-rCA/strings.xml
index a271ff52e801..7e73c4816cc2 100644
--- a/packages/SettingsLib/SpaPrivileged/res/values-fr-rCA/strings.xml
+++ b/packages/SettingsLib/SpaPrivileged/res/values-fr-rCA/strings.xml
@@ -17,7 +17,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="no_applications" msgid="5800789569715871963">"Aucune application"</string>
+ <string name="no_applications" msgid="5800789569715871963">"Aucune appli"</string>
<string name="menu_show_system" msgid="906304605807554788">"Afficher le système"</string>
<string name="menu_hide_system" msgid="374571689914923020">"Masquer le système"</string>
<string name="app_permission_summary_allowed" msgid="6115213465364138103">"Autorisé"</string>
diff --git a/packages/SettingsLib/SpaPrivileged/src/com/android/settingslib/spaprivileged/template/preference/RestrictedSwitchPreferenceModel.kt b/packages/SettingsLib/SpaPrivileged/src/com/android/settingslib/spaprivileged/template/preference/RestrictedSwitchPreferenceModel.kt
index c9934adfad22..fb23637a9f4c 100644
--- a/packages/SettingsLib/SpaPrivileged/src/com/android/settingslib/spaprivileged/template/preference/RestrictedSwitchPreferenceModel.kt
+++ b/packages/SettingsLib/SpaPrivileged/src/com/android/settingslib/spaprivileged/template/preference/RestrictedSwitchPreferenceModel.kt
@@ -115,7 +115,7 @@ internal class RestrictedSwitchPreferenceModel(
content: @Composable (SwitchPreferenceModel) -> Unit,
) {
val context = LocalContext.current
- val restrictedSwitchPreferenceModel = remember(restrictedMode, model.title) {
+ val restrictedSwitchPreferenceModel = remember(restrictedMode, model) {
RestrictedSwitchPreferenceModel(context, model, restrictedMode)
}
restrictedSwitchPreferenceModel.RestrictionWrapper {
diff --git a/packages/SettingsLib/Tile/src/com/android/settingslib/drawer/TileUtils.java b/packages/SettingsLib/Tile/src/com/android/settingslib/drawer/TileUtils.java
index b949cd58a862..ac0b9b45aba6 100644
--- a/packages/SettingsLib/Tile/src/com/android/settingslib/drawer/TileUtils.java
+++ b/packages/SettingsLib/Tile/src/com/android/settingslib/drawer/TileUtils.java
@@ -15,6 +15,7 @@
*/
package com.android.settingslib.drawer;
+import android.annotation.TargetApi;
import android.app.ActivityManager;
import android.content.ContentResolver;
import android.content.Context;
@@ -25,7 +26,9 @@ import android.content.pm.ComponentInfo;
import android.content.pm.PackageManager;
import android.content.pm.ProviderInfo;
import android.content.pm.ResolveInfo;
+import android.graphics.drawable.Icon;
import android.net.Uri;
+import android.os.Build;
import android.os.Bundle;
import android.os.RemoteException;
import android.os.UserHandle;
@@ -36,6 +39,8 @@ import android.util.ArrayMap;
import android.util.Log;
import android.util.Pair;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
import androidx.annotation.VisibleForTesting;
import java.util.ArrayList;
@@ -102,6 +107,9 @@ public class TileUtils {
/** The key used to get the package name of the icon resource for the preference. */
static final String EXTRA_PREFERENCE_ICON_PACKAGE = "com.android.settings.icon_package";
+ /** The key used for the raw byte data of the icon for the preference. */
+ static final String EXTRA_PREFERENCE_ICON_RAW = "com.android.settings.icon_raw";
+
/**
* Name of the meta-data item that should be set in the AndroidManifest.xml
* to specify the key that should be used for the preference.
@@ -518,6 +526,24 @@ public class TileUtils {
}
/**
+ * Retrieves an icon stored in the Bundle as a Parcel with key EXTRA_PREFERENCE_ICON_RAW
+ */
+ @TargetApi(Build.VERSION_CODES.TIRAMISU)
+ @Nullable
+ public static Icon getRawIconFromUri(@NonNull Context context, @Nullable Uri uri,
+ @NonNull Map<String, IContentProvider> providerMap) {
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) {
+ return null;
+ }
+ final Bundle bundle = getBundleFromUri(context, uri, providerMap, null /* bundle */);
+ if (bundle == null) {
+ return null;
+ }
+
+ return bundle.getParcelable(EXTRA_PREFERENCE_ICON_RAW, Icon.class);
+ }
+
+ /**
* Gets text associated with the input key from the content provider.
*
* @param context context
@@ -564,8 +590,9 @@ public class TileUtils {
return getBundleFromUri(context, uri, providerMap, bundle);
}
- private static Bundle getBundleFromUri(Context context, Uri uri,
- Map<String, IContentProvider> providerMap, Bundle bundle) {
+ @Nullable
+ private static Bundle getBundleFromUri(@NonNull Context context, @Nullable Uri uri,
+ @NonNull Map<String, IContentProvider> providerMap, @Nullable Bundle bundle) {
final Pair<String, String> args = getMethodAndKey(uri);
if (args == null) {
return null;
@@ -593,8 +620,9 @@ public class TileUtils {
}
}
- private static IContentProvider getProviderFromUri(Context context, Uri uri,
- Map<String, IContentProvider> providerMap) {
+ @Nullable
+ private static IContentProvider getProviderFromUri(@NonNull Context context, @Nullable Uri uri,
+ @NonNull Map<String, IContentProvider> providerMap) {
if (uri == null) {
return null;
}
@@ -609,7 +637,8 @@ public class TileUtils {
}
/** Returns method and key of the complete uri. */
- private static Pair<String, String> getMethodAndKey(Uri uri) {
+ @Nullable
+ private static Pair<String, String> getMethodAndKey(@Nullable Uri uri) {
if (uri == null) {
return null;
}
diff --git a/packages/SettingsLib/aconfig/settingslib.aconfig b/packages/SettingsLib/aconfig/settingslib.aconfig
index 38c871c698c9..403e219f3467 100644
--- a/packages/SettingsLib/aconfig/settingslib.aconfig
+++ b/packages/SettingsLib/aconfig/settingslib.aconfig
@@ -102,3 +102,13 @@ flag {
purpose: PURPOSE_BUGFIX
}
}
+
+flag {
+ name: "extreme_power_low_state_vulnerability"
+ namespace: "pixel_energizer"
+ description: "the battery saver can pause all non-essential apps and their corresponding notification when device is in locked state to introduce the security vulnerability"
+ bug: "346513692"
+ metadata {
+ purpose: PURPOSE_BUGFIX
+ }
+}
diff --git a/packages/SettingsLib/res/layout/zen_mode_duration_dialog.xml b/packages/SettingsLib/res/layout/zen_mode_duration_dialog.xml
index 6552296bc4e4..bc5ec6911939 100644
--- a/packages/SettingsLib/res/layout/zen_mode_duration_dialog.xml
+++ b/packages/SettingsLib/res/layout/zen_mode_duration_dialog.xml
@@ -28,7 +28,7 @@
android:layout_height="match_parent"
android:orientation="vertical">
- <com.android.settingslib.notification.ZenRadioLayout
+ <com.android.settingslib.notification.modes.ZenRadioLayout
android:id="@+id/zen_duration_conditions"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -46,7 +46,7 @@
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"/>
- </com.android.settingslib.notification.ZenRadioLayout>
+ </com.android.settingslib.notification.modes.ZenRadioLayout>
</LinearLayout>
</ScrollView> \ No newline at end of file
diff --git a/packages/SettingsLib/res/values-af/strings.xml b/packages/SettingsLib/res/values-af/strings.xml
index 2db6f627e29e..193d0bc6e4e3 100644
--- a/packages/SettingsLib/res/values-af/strings.xml
+++ b/packages/SettingsLib/res/values-af/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Laat laai van GPU-ontfoutlae vir ontfoutapps toe"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Aktiveer woordryke verkoperloginskrywing"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Sluit bykomende toestelspesifieke verkoperloglêers by foutverslae in, wat privaat inligting kan bevat, meer batterykrag kan gebruik, en/of meer berging kan gebruik."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Deaktiveer ná een dag"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Breedsprakige verkoperloginskrywing het geëindig"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Geaktiveer vir een dag"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Aktiveer vir nog een dag"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Deaktiveer ná een dag"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Geaktiveer vir ’n onbepaalde tyd"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Vensteranimasieskaal"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Oorganganimasieskaal"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Animator-tydsduurskaal"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Maak dat enige program na eksterne berging geskryf kan word, ongeag manifeswaardes"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Dwing aktiwiteite om verstelbaar te wees"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Maak die groottes van alle aktiwiteite verstelbaar vir veelvuldige vensters, ongeag manifeswaardes."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Aktiveer vormvrye vensters"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Aktiveer steun vir eksperimentele vormvrye vensters."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Aktiveer vryevormvensters (vorige)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Aktiveer steun vir eksperimentele vorige vryevormvensters."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Werkskerm-rugsteunwagwoord"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Volle rekenaarrugsteune word nie tans beskerm nie"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Tik om die wagwoord vir volledige rekenaarrugsteune te verander of te verwyder"</string>
diff --git a/packages/SettingsLib/res/values-am/strings.xml b/packages/SettingsLib/res/values-am/strings.xml
index 732ec6fad3ab..606a01ce9a2f 100644
--- a/packages/SettingsLib/res/values-am/strings.xml
+++ b/packages/SettingsLib/res/values-am/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"ለስህተት ማረሚያ መተግበሪያዎች የጂፒዩ ንብርብሮችን መስቀልን ፍቀድ"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"የዝርክርክ ቃላት አቅራቢ ምዝግብ ማስታወሻን መያዝ አንቃ"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"በሳንካ ሪፖርቶች ውስጥ ተጨማሪ መሣሪያ-ተኮር የአቅራቢ ምዝግብ ማስታወሻዎችን ያካትቱ፣ ይህም የግል መረጃን ሊይዝ፣ ተጨማሪ ባትሪ ሊፈጅ እና/ወይም ተጨማሪ ማከማቻ ሊጠቀም ይችላል።"</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"ከአንድ ቀን በኋላ አሰናክል"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"የብዙ ቃላት አቅራቢ መግቢያ አብቅቷል"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"ለአንድ ቀን ነቅቷል"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"ለአንድ ተጨማሪ ቀን አንቃ"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"ከአንድ ቀን በኋላ ይሰናከላል"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"ያለገደብ ነቅቷል"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"የ Window እነማ ልኬት ለውጥ"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"የእነማ ልኬት ለውጥ ሽግግር"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"እነማ አድራጊ ቆይታ መለኪያ"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"የዝርዝር ሰነዶች እሴቶች ግምት ውስጥ ሳያስገባ ማንኛውም መተግበሪያ ወደ ውጫዊ ማከማቻው ለመጻፍ ብቁ ያደርጋል"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"እንቅስቃሴዎች ዳግመኛ እንዲመጣጠኑ አስገድድ"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"የዝርዝር ሰነድ እሴቶች ምንም ይሁኑ ምን ለበርካታ መስኮቶች ሁሉንም እንቅስቃሴዎች መጠናቸው የሚቀየሩ እንዲሆኑ ያደርጋቸዋል።"</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"የነጻ ቅርጽ መስኮቶችን ያንቁ"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"የሙከራ ነፃ መልክ መስኮቶች ድጋፍን አንቃ"</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"ነፃ ቅርጽ መስኮቶች (የቆየ) ያንቁ"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"የሙከራ የቆዩ የነፃ ቅርጽ መስኮቶች ድጋፍን ያንቁ።"</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"የዴስክቶፕ መጠባበቂያ ይለፍ ቃል"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"ዴስክቶፕ ሙሉ ምትኬዎች በአሁኑ ሰዓት አልተጠበቁም"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"የዴስክቶፕ ሙሉ ምትኬዎች የይለፍ ቃሉን ለመለወጥ ወይም ለማስወገድ ነካ ያድርጉ"</string>
diff --git a/packages/SettingsLib/res/values-ar/strings.xml b/packages/SettingsLib/res/values-ar/strings.xml
index 2964930736db..3da23c82c1d3 100644
--- a/packages/SettingsLib/res/values-ar/strings.xml
+++ b/packages/SettingsLib/res/values-ar/strings.xml
@@ -436,8 +436,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"تأهيل أي تطبيق بحيث تتم كتابته على وحدة تخزين خارجية، بغض النظر عن قيم البيان"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"فرض إمكانية تغيير حجم الأنشطة"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"السماح بتغيير حجم جميع الأنشطة لتناسب تعدد النوافذ، بغض النظر عن قيم البيان"</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"تفعيل النوافذ الحرة"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"إتاحة استخدام النوافذ الحرة التجريبية"</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"تفعيل النوافذ الحرة (القديمة)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"تفعيل عرض النوافذ الحرة التجريبية القديمة"</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"كلمة مرور احتياطية للكمبيوتر"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"النُسخ الاحتياطية الكاملة لسطح المكتب غير محمية في الوقت الحالي"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"انقر لتغيير كلمة مرور النسخ الاحتياطية الكاملة لسطح المكتب أو إزالتها."</string>
diff --git a/packages/SettingsLib/res/values-as/strings.xml b/packages/SettingsLib/res/values-as/strings.xml
index e73462e31ab2..da17f8007efd 100644
--- a/packages/SettingsLib/res/values-as/strings.xml
+++ b/packages/SettingsLib/res/values-as/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"ডিবাগ এপসমূহৰ বাবে জিপিইউ ডিবাগ তৰপ ল\'ড কৰিবলৈ অনুমতি দিয়ক"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"বিক্ৰেতাৰ ভাৰ্ব’ছ লগিং সক্ষম কৰক"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"বাগ ৰিপ’ৰ্টসমূহত অতিৰিক্ত ডিভাইচ নিৰ্দিষ্ট বিক্ৰেতাৰ লগসমূহ অন্তৰ্ভুক্ত কৰক, য’ত ব্যক্তিগত তথ্য থাকিব পাৰে, যি অধিক বেটাৰী আৰু/অথবা ষ্ট’ৰেজ ব্যৱহাৰ কৰিব পাৰে।"</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"এদিনৰ পাছত অক্ষম কৰক"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"ভাৰ্ব’ছ বিক্ৰেতাৰ লগ ইন সমাপ্ত হৈছে"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"এদিনৰ বাবে সক্ষম কৰক"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"আৰু এদিনৰ বাবে সক্ষম কৰক"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"এদিনৰ পাছত অক্ষম কৰে"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"অনিৰ্দিষ্ট কালৰ বাবে সক্ষম কৰা আছে"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"ৱিণ্ড\' এনিমেশ্বন স্কেল"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"ট্ৰাঞ্জিশ্বন এনিমেশ্বন স্কেল"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"এনিমেটৰ কালদৈৰ্ঘ্য স্কেল"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"মেনিফেষ্টৰ মান যিয়েই নহওক, বাহ্যিক ষ্ট’ৰেজত লিখিবলৈ যিকোনো এপক উপযুক্ত কৰি তোলে"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"বলেৰে কাৰ্যকলাপসমূহৰ আকাৰ সলনি কৰিব পৰা কৰক"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"মেনিফেষ্টৰ মান যিয়েই নহওক, মাল্টি-ৱিণ্ডৰ বাবে আটাইবোৰ কাৰ্যকলাপৰ আকাৰ সলনি কৰিব পৰা কৰক।"</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"ফ্ৰিফৰ্ম ৱিণ্ড\'জ সক্ষম কৰক"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"পৰীক্ষামূলক ফ্ৰী-ফৰ্ম ৱিণ্ড’বোৰৰ বাবে সহায়তা সক্ষম কৰক৷"</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"ফ্ৰীফৰ্ম ৱিণ্ড’ সক্ষম কৰ (লিগেচী)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"পৰীক্ষামূলক লিগেচী ফ্ৰীফৰ্ম ৱিণ্ড’ৰ সমৰ্থন সক্ষম কৰক।"</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"ডেস্কটপ বেকআপ পাছৱৰ্ড"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"ডেস্কটপৰ পূৰ্ণ বেকআপ এতিয়ালৈকে সংৰক্ষিত অৱস্থাত নাই"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"ডেস্কটপ সম্পূৰ্ণ বেকআপৰ বাবে পাছৱৰ্ডটো সলনি কৰিবলৈ বা আঁতৰাবলৈ টিপক"</string>
diff --git a/packages/SettingsLib/res/values-az/strings.xml b/packages/SettingsLib/res/values-az/strings.xml
index 2ae6cd3bf15e..5ae1c6e291fa 100644
--- a/packages/SettingsLib/res/values-az/strings.xml
+++ b/packages/SettingsLib/res/values-az/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Qrafik prosessor qatları sazlanmasının yüklənməsinə icazə verilsin"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Təfsilatlı təchizatçı jurnalı"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Xəta hesabatına təchizatçının cihaz haqqında əlavə qeydləri daxil edilsin. Qeydlərdə şəxsi məlumatlar ola, onlar artıq yer tuta və enerji sərfiyyatını artıra bilər."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Bir gündən sonra deaktiv edin"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Təchizatçının çox sözlülüyə girişi bitib"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Birgünlük aktivləşdirilib"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Daha bir gün üçün aktivləşdirin"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Bir gün sonra deaktiv olur"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Qeyri-müəyyən müddətə aktivləşdirilib"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Pəncərə animasiyası"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Keçid animasiyası"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Animasiya müddəti"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Manifest dəyərindən asılı olmayaraq tətbiqlərin xarici daşıyıcılarda saxlanmasına icazə verilsin"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Çoxpəncərəli rejimdə ölçü dəyişdirilməsi"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Manifest dəyərindən asılı olmayaraq çoxpəncərəli rejimdə pəncərə ölçüsünün dəyişdirilməsinə icazə verilsin"</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"İxtiyari formada pəncərə yaradılsın"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Eksperimental olaraq ixtiyari formada pəncərə yaradılsın"</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"İxtiyari formada pəncərələri (köhnə) aktivləşdirin"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Təcrübi köhnə ixtiyari formada pəncərələr üçün dəstəyi aktivləşdirin."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Masaüstü rezerv parolu"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Masaüstü tam rezervlər hazırda qorunmayıblar."</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Masaüstünün tam rezerv kopyalanması üçün parolu dəyişmək və ya silmək üçün basın"</string>
diff --git a/packages/SettingsLib/res/values-b+sr+Latn/strings.xml b/packages/SettingsLib/res/values-b+sr+Latn/strings.xml
index e1e93ef8f1ea..2b92c52ff3fd 100644
--- a/packages/SettingsLib/res/values-b+sr+Latn/strings.xml
+++ b/packages/SettingsLib/res/values-b+sr+Latn/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Učitava otklanjanje grešaka GPU-a u apl. za otklanjanje grešaka"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Opširne evidencije prodavca"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Uvrštava u izveštaje o greškama dodatne posebne evidencije prodavca za uređaje, koje mogu da sadrže privatne podatke, da troše više baterije i/ili da koriste više memorije."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Onemogući posle jednog dana"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Detaljno evidentiranje prodavca je završeno"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Omogućeno na jedan dan"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Omogući još jedan dan"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Onemogućeno posle jednog dana"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Omogućeno neograničeno"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Razmera animacije prozora"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Razmera animacije prelaza"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Animatorova razmera trajanja"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Omogućava upisivanje svih aplikacija u spoljnu memoriju, bez obzira na vrednosti manifesta"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Prinudno omogući promenu veličine aktivnosti"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Omogućava promenu veličine svih aktivnosti za režim sa više prozora, bez obzira na vrednosti manifesta."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Omogući prozore proizvoljnog formata"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Omogućava podršku za eksperimentalne prozore proizvoljnog formata."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Omogući prozore proizvoljnog formata (zastarelo)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Omogućava podršku za zastarele eksperimentalne prozore proizvoljnog formata."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Lozinka rezervne kopije za računar"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Rezervne kopije čitavog sistema trenutno nisu zaštićene"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Dodirnite da biste promenili ili uklonili lozinku za pravljenje rezervnih kopija čitavog sistema na računaru"</string>
diff --git a/packages/SettingsLib/res/values-be/strings.xml b/packages/SettingsLib/res/values-be/strings.xml
index 00eb95d877c1..e676fdf97555 100644
--- a/packages/SettingsLib/res/values-be/strings.xml
+++ b/packages/SettingsLib/res/values-be/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Загружаць слаі адладкі GPU для праграм адладкі"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Уключыць падрабязны журнал пастаўшчыка"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Дадаваць у справаздачы пра памылкі дадатковыя журналы пастаўшчыка для пэўнай прылады (могуць утрымлівацца прыватныя даныя, можа павышацца выкарыстанне акумулятара і/ці памяці)."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Адключыць праз адзін дзень"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Вядзенне дэталёвага журнала пастаўшчыка завершана"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Уключана на адзін дзень"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Уключыць яшчэ на адзін дзень"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Будзе адключана праз адзін дзень"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Уключана без абмежавання па часе"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Маштаб анімацыі акна"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Маштаб перадачы анімацыі"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Працягласць анімацыі"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Робіць любую праграму даступнай для запісу ў знешняе сховішча, незалежна ад значэнняў маніфеста"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Зрабіць вокны дзеянняў даступнымі для змены памеру"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Зрабіць усе віды дзейнасці даступнымі для змены памеру ў рэжыме некалькіх вокнаў, незалежна ад значэнняў маніфеста."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Уключыць адвольную форму вокнаў"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Уключыць падтрымку для эксперыментальнай адвольнай формы акна."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Уключыць адвольную форму вокнаў (устарэлая налада)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Уключыць падтрымку для эксперыментальнай адвольнай формы вокнаў (устарэлая налада)."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Пароль для рэз. копіі ПК"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Поўнае рэзервовае капіраванне працоўнага стала зараз не абаронена"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Краніце, каб змяніць або выдаліць пароль для поўнага рэзервовага капіравання працоўнага стала"</string>
diff --git a/packages/SettingsLib/res/values-bg/strings.xml b/packages/SettingsLib/res/values-bg/strings.xml
index a2db0f96b74a..c64e2ead6952 100644
--- a/packages/SettingsLib/res/values-bg/strings.xml
+++ b/packages/SettingsLib/res/values-bg/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Разреш. на зарежд. на слоевете за отстр. на грешки в ГП за съотв. прилож."</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Активиране на подробно регистр. на файлове за доставчиците"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Включване на допълнителни регистрационни файлове за доставчиците на конкретни устройства в сигналите за програмни грешки, които може да съдържат поверителна информация, да изразходват батерията в по-голяма степен и/или да използват повече място в хранилището."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Да се деактивира след един ден"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Подробното регистриране на файлове за доставчиците приключи"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Активирано за един ден"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Да се активира за още един ден"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Ще се деактивира след един ден"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Активирано за неопределено време"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Скала на прозореца на аним."</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Скала на преходната анимация"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Скала за Animator"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Всички приложения ще отговарят на условията да бъдат записвани във външното хранилище независимо от стойностите в манифеста"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Възможност за преоразмеряване на активностите"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Дава възможност за преоразмеряване на всички активности в режима за няколко прозореца независимо от стойностите в манифеста."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Активиране на прозорците в свободна форма"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Активиране на поддръжката за експерименталните прозорци в свободна форма."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Актив. на прозорците в свободна форма (наследени)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Активиране на поддръжката за експерименталните наследени прозорци в свободна форма."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Парола за резервни копия"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Понастоящем пълните резервни копия за настолен компютър не са защитени"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Докоснете, за да промените или премахнете паролата за пълни резервни копия на настолния компютър"</string>
diff --git a/packages/SettingsLib/res/values-bn/strings.xml b/packages/SettingsLib/res/values-bn/strings.xml
index f8118f4a0f69..531795ab5cc9 100644
--- a/packages/SettingsLib/res/values-bn/strings.xml
+++ b/packages/SettingsLib/res/values-bn/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"ডিবাগ অ্যাপের জন্য GPU ডিবাগ স্তর লোড হতে দিন"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"ভারবোস ভেন্ডর লগ-ইন চালু করুন"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"সমস্যা সংক্রান্ত রিপোর্টগুলিতে অতিরিক্ত ডিভাইস-নির্দিষ্ট ভেন্ডরের লগগুলি অন্তর্ভুক্ত করুন, যার মধ্যে ব্যক্তিগত তথ্য থাকতে পারে, আরও বেশি ব্যাটারি ব্যবহার করতে পারে, এবং/অথবা আরও স্টোরেজ ব্যবহার করতে পারে।"</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"এক দিন পরে বন্ধ করুন"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"ভারবোস ভেন্ডর লগিংয়ের সুবিধা বন্ধ হয়ে গেছে"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"এক দিনের জন্য চালু করা হয়েছে"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"আরও এক দিনের জন্য চালু করুন"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"এক দিন পরে বন্ধ হয়ে যায়"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"অনির্দিষ্টকালের জন্য চালু করা হয়েছে"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"উইন্ডো অ্যানিমেশন স্কেল"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"ট্র্যানজিশন অ্যানিমেশন স্কেল"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"অ্যানিমেটর সময়কাল স্কেল"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"ম্যানিফেস্ট মানের নির্বিশেষে যেকোনও অ্যাপকে এক্সটারনাল স্টোরেজে ইনস্টল করার উপযুক্ত বানায়"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"আকার পরিবর্তনযোগ্য করার জন্য ক্রিয়াকলাপগুলিকে জোর করুন"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"ম্যানিফেস্ট মানগুলির নির্বিশেষে মাল্টি-উইন্ডোর জন্য সমস্ত ক্রিয়াকলাপগুলির আকার পরিবর্তনযোগ্য করুন৷"</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"ফ্রি-ফর্ম উইন্ডো চালু করুন"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"পরীক্ষামূলক ফ্রি-ফর্ম উইন্ডোগুলির জন্য সহায়তা সক্ষম করুন৷"</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"ফ্রিফর্ম উইন্ডো (লিগ্যাসি) চালু করুন"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"এক্সপেরিমেন্টাল ফ্রিফর্ম উইন্ডোর জন্য সহায়তা চালু করুন।"</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"ডেস্কটপ ব্যাকআপ পাসওয়ার্ড"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"ডেস্কটপ পূর্ণ ব্যাকআপ বর্তমানে সুরক্ষিত নয়"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"ডেস্কটপের সম্পূর্ণ ব্যাকআপের পাসওয়ার্ডটি পরিবর্তন করতে বা মুছে ফেলতে আলতো চাপুন"</string>
diff --git a/packages/SettingsLib/res/values-bs/strings.xml b/packages/SettingsLib/res/values-bs/strings.xml
index 2288f05140e5..93b4ffb2d0da 100644
--- a/packages/SettingsLib/res/values-bs/strings.xml
+++ b/packages/SettingsLib/res/values-bs/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Omogućite slojeve za otkl. grešaka na GPU-u za apl. za otkl. grešaka"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Omogući opširni zapisnik"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"U izvještaje o greškama uključite dodatne zapisnike dobavljača specifične za uređaj, koji mogu sadržavati lične informacije, povećati potrošnju baterije i/ili koristiti više prostora za pohranu."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Onemogući nakon jednog dana"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Opširno zapisivanje dobavljača je završeno"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Omogućeno je na jedan dan"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Omogući još jedan dan"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Onemogućava se nakon jednog dana"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Omogućeno je na neograničeno vrijeme"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Skala animacije prozora"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Skala animacije prijelaza"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Skala trajanja animatora"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Omogućava upisivanje svih aplikacija u vanjsku pohranu, bez obzira na prikazane vrijednosti"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Nametni aktivnostima mijenjanje veličina"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Omogućava mijenjanje veličine svih aktivnosti za prikaz s više prozora, bez obzira na prikazane vrijednosti"</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Omogući prozore nepravilnih oblika"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Omogućava podršku za eksperimentalne prozore nepravilnih oblika."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Omogući prilagodljive prozore (staro)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Omogućite podršku za eksperimentalne stare prilagodljive prozore."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Lozinka sigurnosne kopije za računar"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Potpune sigurnosne kopije za računare trenutno nisu zaštićene"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Dodirnite da promijenite ili uklonite lozinku za potpune rezervne kopije s radne površine"</string>
diff --git a/packages/SettingsLib/res/values-ca/strings.xml b/packages/SettingsLib/res/values-ca/strings.xml
index 61a6e82f19c4..0e6b3d8651c2 100644
--- a/packages/SettingsLib/res/values-ca/strings.xml
+++ b/packages/SettingsLib/res/values-ca/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Permet carregar capes de depuració de GPU en aplicacions de depuració"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Activa el registre detallat del proveïdor"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Inclou altres registres de proveïdor específics del dispositiu als informes d’errors; és possible que continguin informació privada, consumeixin més bateria o utilitzin més espai d\'emmagatzematge"</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Desactiva passat un dia"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"El registre del proveïdor detallat ha finalitzat"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"S\'ha activat durant un dia"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Activa durant un dia més"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Es desactiva passat un dia"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"S\'ha activat indefinidament"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Escala d\'animació de la finestra"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Escala d\'animació de la transició"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Escala de durada de l\'animació"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Permet que qualsevol aplicació es pugui escriure en un dispositiu d’emmagatzematge extern, independentment dels valors del manifest"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Força l\'ajust de la mida de les activitats"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Permet ajustar la mida de totes les activitats per al mode multifinestra, independentment dels valors del manifest"</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Activa les finestres amb format lliure"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Activa la compatibilitat amb finestres experimentals amb format lliure"</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Activa les finestres amb format lliure (heretat)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Activa la compatibilitat amb les finestres de format lliure heretades i experimentals."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Contrasenya per a còpies d\'ordinador"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Les còpies de seguretat completes d\'ordinador no estan protegides"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Toca per canviar o suprimir la contrasenya per a les còpies de seguretat completes de l\'ordinador"</string>
diff --git a/packages/SettingsLib/res/values-cs/strings.xml b/packages/SettingsLib/res/values-cs/strings.xml
index 34444308495e..b04c9080ac46 100644
--- a/packages/SettingsLib/res/values-cs/strings.xml
+++ b/packages/SettingsLib/res/values-cs/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Povolit načítání vrstev ladění GPU pro ladicí aplikace"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Povolit podrobné protokolování dodavatele"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Zahrnovat do zpráv o chybách dodatečné protokoly dodavatelů specifické pro zařízení, které mohou obsahovat soukromé údaje, více vybíjet baterii nebo využívat více místa v úložišti."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Po jednom dni vypnout"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Podrobné protokolování dodavatele bylo ukončeno"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Zapnuto na jeden den"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Ponechat zapnuté ještě jeden den"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Po jednom dni se vypne"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Zapnuto na neomezenou dobu"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Měřítko animace okna"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Měřítko animace přeměny"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Měřítko délky animace"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Každou aplikaci bude možné zapsat do externího úložiště, bez ohledu na hodnoty manifestu"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Vynutit možnost změny velikosti aktivit"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Umožní změnu velikosti všech aktivit na několik oken (bez ohledu na hodnoty manifestu)"</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Aktivovat okna s volným tvarem"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Aktivuje podporu experimentálních oken s volným tvarem"</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Aktivovat okna s volným tvarem (starší nastavení)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Aktivuje podporu starších experimentálních oken s volným tvarem."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Heslo pro zálohy v počítači"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Úplné zálohy v počítači nejsou v současné době chráněny"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Tuto možnost vyberte, chcete-li změnit nebo odebrat heslo pro úplné zálohy do počítače"</string>
diff --git a/packages/SettingsLib/res/values-da/arrays.xml b/packages/SettingsLib/res/values-da/arrays.xml
index 3c5135bb87e8..3d2d6c7a5681 100644
--- a/packages/SettingsLib/res/values-da/arrays.xml
+++ b/packages/SettingsLib/res/values-da/arrays.xml
@@ -156,13 +156,13 @@
<item msgid="1241278021345116816">"Optimeret til lydkvalitet (990 kbps/909 kbps)"</item>
<item msgid="3523665555859696539">"Afbalancer lyd- og forbindelseskvalitet (660 kbps/606 kbps)"</item>
<item msgid="886408010459747589">"Optimeret til forbindelseskvalitet (330 kbps/303 kbps)"</item>
- <item msgid="3808414041654351577">"Bedste resultat (tilpasset bithastighed)"</item>
+ <item msgid="3808414041654351577">"Bedste resultat (adaptiv bithastighed)"</item>
</string-array>
<string-array name="bluetooth_a2dp_codec_ldac_playback_quality_summaries">
<item msgid="804499336721569838">"Optimeret til lydkvalitet"</item>
<item msgid="7451422070435297462">"Afbalancer lyd- og forbindelseskvalitet"</item>
<item msgid="6173114545795428901">"Optimeret til forbindelseskvalitet"</item>
- <item msgid="4349908264188040530">"Bedste resultat (tilpasset bithastighed)"</item>
+ <item msgid="4349908264188040530">"Bedste resultat (adaptiv bithastighed)"</item>
</string-array>
<string-array name="bluetooth_audio_active_device_summaries">
<item msgid="8019740759207729126"></item>
diff --git a/packages/SettingsLib/res/values-da/strings.xml b/packages/SettingsLib/res/values-da/strings.xml
index 1bff907a86c7..6e526dbedde9 100644
--- a/packages/SettingsLib/res/values-da/strings.xml
+++ b/packages/SettingsLib/res/values-da/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Tillad, at fejlretningslag indlæses for grafikprocessor i apps til fejlretning"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Aktivér detaljeret leverandørlogging"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Medtag yderligere enhedsspecifikke leverandørlogfiler i fejlrapporter, som muligvis indeholder personlige oplysninger. Dette bruger muligvis mere batteri og/eller lagerplads."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Deaktiver efter én dag"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Detaljeret leverandørlogging er slut"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Aktiveret i én dag"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Aktivér i én dag mere"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Deaktiveres efter én dag"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Aktiveret på ubestemt tid"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Animationsskala for vindue"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Overgangsanimationsskala"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Animatorvarighedsskala"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Gør det muligt at overføre enhver app til et eksternt lager uafhængigt af manifestværdier"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Gennemtving, at aktiviteter kan tilpasses"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Tillad, at alle aktiviteter kan tilpasses flere vinduer uafhængigt af manifestværdier"</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Aktivér vinduer i frit format"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Aktivér understøttelse af eksperimentelle vinduer i frit format"</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Aktivér vinduer i frit format (forældet)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Aktivér understøttelse af eksperimentelle forældede vinduer i frit format."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Kode til lokal sikkerhedskopi"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Lokale komplette backups er i øjeblikket ikke beskyttet"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Tryk for at skifte eller fjerne adgangskoden til fuld lokal sikkerhedskopiering"</string>
diff --git a/packages/SettingsLib/res/values-de/strings.xml b/packages/SettingsLib/res/values-de/strings.xml
index 64139a912fc1..504a9daa148a 100644
--- a/packages/SettingsLib/res/values-de/strings.xml
+++ b/packages/SettingsLib/res/values-de/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Debug-Apps das Laden von GPU-Debug-Ebenen erlauben"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Ausführliche Protokollierung aktivieren"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Schließt zusätzliche gerätespezifische Anbieterprotokolle in Fehlerberichten ein, die private Informationen enthalten, den Akkuverbrauch erhöhen und/oder zusätzlichen Speicher benötigen können."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Nach einem Tag deaktivieren"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Ausführliche Vendoren-Protokollierung beendet"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Für einen Tag aktiviert"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Für einen weiteren Tag aktivieren"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Wird nach einem Tag deaktiviert"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Auf unbestimmte Zeit aktiviert"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Fensteranimationsfaktor"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Übergangsanimationsfaktor"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Animationsdauerfaktor"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Jede App kann, ungeachtet der Manifestwerte, in den externen Speicher geschrieben werden"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Aktivitätengröße darf immer angepasst werden"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Die Größe aller Aktivitäten darf, ungeachtet der Manifestwerte, für die Mehrfensterdarstellung angepasst werden"</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Freiform-Fenster zulassen"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Unterstützung für experimentelle Freiform-Fenster aktivieren"</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Freiform-Fenster zulassen (Legacy)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Unterstützung für experimentelle Legacy-Freiform-Fenster aktivieren."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Passwort für Desktop-Sicherung"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Vollständige Desktop-Sicherungen sind momentan nicht passwortgeschützt"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Zum Ändern oder Entfernen des Passworts für vollständige Desktop-Sicherungen tippen"</string>
diff --git a/packages/SettingsLib/res/values-el/strings.xml b/packages/SettingsLib/res/values-el/strings.xml
index f8a6944d84d2..cad445fa41f8 100644
--- a/packages/SettingsLib/res/values-el/strings.xml
+++ b/packages/SettingsLib/res/values-el/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Φόρτωση επιπ. εντοπ. σφ. GPU για εφαρμ. αντιμ. σφ."</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Ενεργ. λεπτ. καταγραφής προμ."</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Συμπερίληψη πρόσθετων αρχείων καταγραφής προμηθευτή για συγκεκριμένες συσκευές στις αναφορές σφαλμάτων, τα οποία ενδέχεται να περιέχουν ιδιωτικές πληροφορίες, να χρησιμοποιούν περισσότερη μπαταρία ή/και να χρησιμοποιούν περισσότερο αποθηκευτικό χώρο."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Απενεργοποίηση μετά από μία ημέρα"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Η λεπτομερής καταγραφή προμηθευτή έχει λήξει"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Έχει ενεργοποιηθεί για μία ημέρα"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Ενεργοποίηση για μία ακόμα ημέρα"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Απενεργοποιείται μετά από μία ημέρα"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Έχει ενεργοποιηθεί επ\' αόριστον"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Κλίμακα κίνησης παραθύρου"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Κλίμακα κίνησης μετάβασης"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Κλίμ. διάρ. Animator"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Κάνει κάθε εφαρμογή κατάλληλη για εγγραφή σε εξωτερικό αποθηκευτικό χώρο, ανεξάρτητα από τις τιμές του μανιφέστου"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Αναγκαστική δυνατότητα αλλαγής μεγέθους δραστηριοτήτων"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Να έχουν όλες οι δραστηριότητες δυνατότητα αλλαγής μεγέθους για την προβολή πολλαπλών παραθύρων, ανεξάρτητα από τις τιμές του μανιφέστου."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Ενεργοποίηση παραθύρων ελεύθερης μορφής"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Ενεργοποίηση υποστήριξης για πειραματικά παράθυρα ελεύθερης μορφής."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Ενεργ. παραθύρων ελεύθερης μορφής (παλαιού τύπου)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Ενεργοποίηση υποστήριξης για πειραματικά παράθυρα ελεύθερης μορφής παλαιού τύπου."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Εφ/κός κωδικός desktop"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Τα πλήρη αντίγραφα ασφαλείας επιφάνειας εργασίας δεν προστατεύονται αυτή τη στιγμή"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Πατήστε για αλλαγή ή κατάργηση του κωδικού πρόσβασης για τα πλήρη αντίγραφα ασφαλείας επιφάνειας εργασίας"</string>
diff --git a/packages/SettingsLib/res/values-en-rAU/strings.xml b/packages/SettingsLib/res/values-en-rAU/strings.xml
index a6367f1059b4..ad436646c5e1 100644
--- a/packages/SettingsLib/res/values-en-rAU/strings.xml
+++ b/packages/SettingsLib/res/values-en-rAU/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Allow loading GPU debug layers for debug apps"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Enable verbose vendor logging"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Include additional device-specific vendor logs in bug reports, which may contain private information, use more battery and/or use more storage."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Disable after one day"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Verbose vendor logging has ended"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Enabled for one day"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Enable for one more day"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Disables after one day"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Enabled indefinitely"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Window animation scale"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Transition animation scale"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Animator duration scale"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Makes any app eligible to be written to external storage, regardless of manifest values"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Force activities to be resizeable"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Make all activities resizeable for multi-window, regardless of manifest values."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Enable freeform windows"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Enable support for experimental freeform windows."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Enable freeform windows (legacy)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Enable support for experimental legacy freeform windows."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Desktop backup password"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Desktop full backups aren\'t currently protected"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Tap to change or remove the password for desktop full backups"</string>
diff --git a/packages/SettingsLib/res/values-en-rCA/strings.xml b/packages/SettingsLib/res/values-en-rCA/strings.xml
index 975cc5ee7b88..a77d6c66447d 100644
--- a/packages/SettingsLib/res/values-en-rCA/strings.xml
+++ b/packages/SettingsLib/res/values-en-rCA/strings.xml
@@ -430,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Makes any app eligible to be written to external storage, regardless of manifest values"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Force activities to be resizable"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Make all activities resizable for multi-window, regardless of manifest values."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Enable freeform windows"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Enable support for experimental freeform windows."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Enable freeform windows (legacy)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Enable support for experimental legacy freeform windows."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Desktop backup password"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Desktop full backups aren’t currently protected"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Tap to change or remove the password for desktop full backups"</string>
diff --git a/packages/SettingsLib/res/values-en-rGB/strings.xml b/packages/SettingsLib/res/values-en-rGB/strings.xml
index a6367f1059b4..ad436646c5e1 100644
--- a/packages/SettingsLib/res/values-en-rGB/strings.xml
+++ b/packages/SettingsLib/res/values-en-rGB/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Allow loading GPU debug layers for debug apps"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Enable verbose vendor logging"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Include additional device-specific vendor logs in bug reports, which may contain private information, use more battery and/or use more storage."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Disable after one day"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Verbose vendor logging has ended"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Enabled for one day"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Enable for one more day"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Disables after one day"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Enabled indefinitely"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Window animation scale"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Transition animation scale"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Animator duration scale"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Makes any app eligible to be written to external storage, regardless of manifest values"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Force activities to be resizeable"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Make all activities resizeable for multi-window, regardless of manifest values."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Enable freeform windows"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Enable support for experimental freeform windows."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Enable freeform windows (legacy)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Enable support for experimental legacy freeform windows."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Desktop backup password"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Desktop full backups aren\'t currently protected"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Tap to change or remove the password for desktop full backups"</string>
diff --git a/packages/SettingsLib/res/values-en-rIN/strings.xml b/packages/SettingsLib/res/values-en-rIN/strings.xml
index a6367f1059b4..ad436646c5e1 100644
--- a/packages/SettingsLib/res/values-en-rIN/strings.xml
+++ b/packages/SettingsLib/res/values-en-rIN/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Allow loading GPU debug layers for debug apps"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Enable verbose vendor logging"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Include additional device-specific vendor logs in bug reports, which may contain private information, use more battery and/or use more storage."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Disable after one day"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Verbose vendor logging has ended"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Enabled for one day"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Enable for one more day"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Disables after one day"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Enabled indefinitely"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Window animation scale"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Transition animation scale"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Animator duration scale"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Makes any app eligible to be written to external storage, regardless of manifest values"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Force activities to be resizeable"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Make all activities resizeable for multi-window, regardless of manifest values."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Enable freeform windows"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Enable support for experimental freeform windows."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Enable freeform windows (legacy)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Enable support for experimental legacy freeform windows."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Desktop backup password"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Desktop full backups aren\'t currently protected"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Tap to change or remove the password for desktop full backups"</string>
diff --git a/packages/SettingsLib/res/values-en-rXC/strings.xml b/packages/SettingsLib/res/values-en-rXC/strings.xml
index 7411487899f3..8d6520f992b2 100644
--- a/packages/SettingsLib/res/values-en-rXC/strings.xml
+++ b/packages/SettingsLib/res/values-en-rXC/strings.xml
@@ -430,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‏‏‎‏‏‎‎‏‎‏‎‎‎‎‎‏‏‎‎‏‎‏‏‎‎‏‎‏‎‎‎‏‎‏‏‏‏‎‏‎‏‏‎‎‏‏‎‏‏‎‎‎‎‏‎‎‏‎‏‏‏‎‎Makes any app eligible to be written to external storage, regardless of manifest values‎‏‎‎‏‎"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‏‎‎‎‏‏‎‎‏‎‎‎‏‏‎‎‏‏‎‏‎‏‎‏‏‎‎‏‎‏‏‎‎‏‏‎‎‎‎‎‏‎‎‎‎‎‎‏‎‎‎‏‏‎‎‎‏‏‎‏‏‎‎Force activities to be resizable‎‏‎‎‏‎"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‎‏‎‎‎‏‎‏‎‎‎‏‏‏‏‏‎‎‏‏‏‎‏‎‏‎‎‏‎‎‏‎‏‎‎‎‏‎‏‎‏‏‎‎‏‎‎‏‏‎‏‎‏‎‎‏‏‎‏‎‏‏‎‎Make all activities resizable for multi-window, regardless of manifest values.‎‏‎‎‏‎"</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‏‎‏‎‎‏‎‏‏‏‎‏‎‏‏‎‎‎‎‏‎‎‏‎‎‎‏‏‎‏‎‎‎‎‏‏‎‏‎‎‏‎‏‏‎‏‎‏‏‎‎‏‏‎‎‎‎‎‏‏‎‏‎Enable freeform windows‎‏‎‎‏‎"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‎‏‏‏‎‎‏‎‏‎‎‏‏‎‎‎‎‎‏‏‎‏‏‏‏‏‏‏‏‏‎‎‏‏‎‏‎‏‏‏‎‎‏‏‏‎‎‏‎‎‏‏‎‎‏‎‎‏‎‏‎‏‏‎Enable support for experimental freeform windows.‎‏‎‎‏‎"</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‏‏‎‏‎‎‏‎‏‏‎‏‏‎‎‎‎‏‎‏‎‎‏‏‎‎‎‏‏‏‏‎‎‎‏‏‎‎‎‏‎‎‎‎‎‏‎‎‏‎‏‏‎‏‎‏‏‏‎‎‏‎‎Enable freeform windows (legacy)‎‏‎‎‏‎"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‎‏‏‏‏‏‏‎‎‎‏‏‏‏‎‏‏‏‎‎‏‎‎‏‎‏‎‏‎‎‏‏‏‎‎‏‎‎‏‎‏‏‎‏‎‏‏‏‎‎‎‎‎‏‎‏‏‏‎‏‏‏‎‎Enable support for experimental legacy freeform windows.‎‏‎‎‏‎"</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‎‎‎‎‎‎‎‏‎‎‎‏‎‎‏‎‏‎‏‏‏‎‎‏‎‎‏‎‎‏‏‏‎‏‎‎‏‎‏‎‏‎‎‏‎‎‏‏‎‏‏‏‏‏‏‏‎‏‎‏‎‏‎Desktop backup password‎‏‎‎‏‎"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‏‎‏‎‏‎‎‎‎‏‏‏‏‏‎‎‏‏‏‏‎‏‎‎‏‏‏‏‏‎‏‏‏‎‎‎‏‏‏‎‏‏‏‎‏‏‎‏‎‎‏‏‏‎‏‏‏‏‎‎‏‎‎Desktop full backups aren’t currently protected‎‏‎‎‏‎"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‎‏‏‎‏‏‏‏‎‏‏‎‎‎‏‏‏‎‎‎‎‎‎‏‏‎‎‎‎‎‏‎‏‎‏‎‏‏‏‏‏‎‎‎‏‏‎‏‏‎‎‏‎‏‎‏‎‏‎‏‏‏‏‎Tap to change or remove the password for desktop full backups‎‏‎‎‏‎"</string>
diff --git a/packages/SettingsLib/res/values-es-rUS/strings.xml b/packages/SettingsLib/res/values-es-rUS/strings.xml
index 3c95fd29ca6f..2cf0fe317cb6 100644
--- a/packages/SettingsLib/res/values-es-rUS/strings.xml
+++ b/packages/SettingsLib/res/values-es-rUS/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Permite cargar capas de depuración de GPU para apps de depuración"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Habilitar registro detallado"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Incluye otros registros de proveedor específicos del dispositivo en los informes de errores, que podrían contener información privada, consumir más batería o usar más espacio de almacenamiento."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Inhabilitar luego de un día"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Finalizó el registro de verbosidad del proveedor"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Habilitado por un día"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Habilitar por un día más"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Se inhabilita luego de un día"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Habilitado por tiempo indefinido"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Escala de animación de ventana"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Escala de animación de transición"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Escala de duración de animador"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Cualquier app puede escribirse en un almacenamiento externo, sin importar los valores del manifiesto"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Forzar actividades para que cambien de tamaño"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Permitir que todas las actividades puedan cambiar de tamaño para el modo multiventana, sin importar los valores del manifiesto."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Habilitar ventanas de forma libre"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Permite la compatibilidad con ventanas de forma libre experimentales."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Habilitar ventanas de formato libre (heredado)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Permitir la compatibilidad con ventanas de formato libre experimentales (heredado)"</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Contraseñas"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Tus copias de seguridad de escritorio no están protegidas por contraseña"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Presiona para cambiar o quitar la contraseña de las copias de seguridad completas de tu escritorio."</string>
diff --git a/packages/SettingsLib/res/values-es/strings.xml b/packages/SettingsLib/res/values-es/strings.xml
index 28bfb383eac6..e012a4180eed 100644
--- a/packages/SettingsLib/res/values-es/strings.xml
+++ b/packages/SettingsLib/res/values-es/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Permite cargar capas de depuración de GPU en aplicaciones de depuración"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Habilitar registro de proveedor detallado"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Incluye otros registros de proveedor específicos del dispositivo en informes de errores, lo que puede añadir información privada, usar más batería u ocupar más espacio de almacenamiento."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Inhabilitar después de un día"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"El registro de proveedor detallado ha finalizado"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Habilitado durante un día"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Habilitar durante un día más"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Se inhabilita después de un día"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Habilitado indefinidamente"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Escala de animación de ventana"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Escala de animación de transición"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Escala de duración de animación"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Permite que cualquier aplicación se pueda escribir en un almacenamiento externo independientemente de los valores de manifiesto"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Forzar que las actividades puedan cambiar de tamaño"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Permite que todas las actividades puedan cambiar de tamaño en multiventana independientemente de los valores de manifiesto"</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Habilitar ventanas de forma libre"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Permite la compatibilidad con ventanas de forma libre experimentales"</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Habilitar ventanas de forma libre (antiguo)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Habilita la compatibilidad con ventanas de forma libre antiguas y experimentales."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Contraseña para copias de ordenador"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Las copias de seguridad completas de ordenador no están protegidas"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Toca para cambiar o quitar la contraseña de las copias de seguridad completas del escritorio"</string>
diff --git a/packages/SettingsLib/res/values-et/strings.xml b/packages/SettingsLib/res/values-et/strings.xml
index 25bc4874a17a..70b436cf0249 100644
--- a/packages/SettingsLib/res/values-et/strings.xml
+++ b/packages/SettingsLib/res/values-et/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"GPU silumise kihtide laadimise lubamine silumisrakendustele"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Luba paljusõnaline logimine"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Veaaruannetesse kaasatakse täiendavad seadmepõhised teenusepakkuja logid, mis võivad sisaldada privaatset teavet, kasutada rohkem akut ja/või salvestusruumi."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Keela ühe päeva pärast"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Tootja paljusõnaline logimine on lõppenud"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Lubatud üheks päevaks"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Luba veel üheks päevaks"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Keelatakse ühe päeva pärast"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Lubatud määramata ajaks"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Akna animatsioonimastaap"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Ülemineku animatsioonimastaap"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Animaatori kestuse mastaap"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Lubab mis tahes rakendusi kirjutada välisesse salvestusruumi manifesti väärtustest olenemata"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Muuda tegevuste suurused muudetavaks"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Muudetakse kõigi tegevuste suurused mitme aknaga vaates muudetavaks (manifesti väärtustest olenemata)."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Luba vabas vormis aknad"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Lubatakse katseliste vabavormis akende tugi."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Luba vabas vormis aknad (pärand)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Lubatakse katseliste pärand vabas vormis akende tugi."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Arvutivarunduse parool"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Täielikud arvutivarundused pole praegu kaitstud"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Puudutage täielike arvutivarunduste parooli muutmiseks või eemaldamiseks"</string>
diff --git a/packages/SettingsLib/res/values-eu/strings.xml b/packages/SettingsLib/res/values-eu/strings.xml
index 4b9cb836185a..1c80af8bb65f 100644
--- a/packages/SettingsLib/res/values-eu/strings.xml
+++ b/packages/SettingsLib/res/values-eu/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Eman GPUaren arazketa-geruzak kargatzeko baimena arazketa-aplikazioei"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Gaitu saltzaileen erregistro xehatuak"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Sartu gailuaren berariazko saltzaileen erregistro gehigarriak akatsen txostenetan; baliteke haiek informazio pribatua izatea, bateria gehiago erabiltzea eta/edo biltegiratzeko toki gehiago hartzea."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Desgaitu egun baten buruan"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Saltzailearen erregistro xehatua amaitu da"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Egun baterako gaituta"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Gaitu beste egun batez"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Egun baten buruan desgaituko da"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Mugarik gabe gaituta"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Leihoen animazio-eskala"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Trantsizioen animazio-eskala"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Animatzailearen iraupen-eskala"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Aplikazioek kanpoko memorian idatz dezakete, ezarritako balioak kontuan izan gabe"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Behartu jardueren tamaina doitu ahal izatera"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Eman aukera jarduera guztien tamaina doitzeko, leiho batean baino gehiagotan erabili ahal izan daitezen, ezarritako balioak kontuan izan gabe"</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Gaitu estilo libreko leihoak"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Onartu estilo libreko leiho esperimentalak"</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Gaitu estilo libreko leihoak (aurreko bertsiokoak)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Onartu aurreko bertsioko estilo libreko leiho esperimentalak."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Babeskopien pasahitz lokala"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Une honetan, ordenagailuko babeskopia osoak ez daude babestuta"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Ordenagailuko eduki guztiaren babeskopia egiteko erabiltzen den pasahitza aldatzeko edo kentzeko, sakatu hau"</string>
diff --git a/packages/SettingsLib/res/values-fa/strings.xml b/packages/SettingsLib/res/values-fa/strings.xml
index 27e203b91b53..5e4d29a959b2 100644
--- a/packages/SettingsLib/res/values-fa/strings.xml
+++ b/packages/SettingsLib/res/values-fa/strings.xml
@@ -406,20 +406,14 @@
<string name="track_frame_time" msgid="522674651937771106">"‏پرداز زدن HWUI نمایه"</string>
<string name="enable_gpu_debug_layers" msgid="4986675516188740397">"‏فعال کردن لایه‌های اشکال‌زدایی GPU"</string>
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"‏مجاز کردن بارگیری لایه‌های اشکال‌زدایی GPU برای برنامه‌های اشکا‌ل‌زدایی"</string>
- <string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"فعال کردن گزارش‌گیری مفصل فروشنده"</string>
+ <string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"فعال کردن ثبت گزارش مفصل فروشنده"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"شامل گزارشات اشکال تکمیلی ورود به سیستم فروشنده ویژه دستگاه می‌شود که ممکن است دربرگیرنده اطلاعات خصوصی، استفاده بیشتر از باتری، و/یا استفاده بیشتر از فضای ذخیره‌سازی باشد."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"غیرفعال کردن پس‌از یک روز"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"ثبت گزارش مفصل فروشنده پایان یافته است"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"برای یک روز فعال شد"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"فعال کردن برای یک روز دیگر"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"پس‌از یک روز غیرفعال می‌شود"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"به‌طور نامحدود فعال شد"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"مقیاس پویانمایی پنجره"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"مقیاس پویانمایی انتقالی"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"مقیاس طول مدت انیماتور"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"بدون توجه به مقادیر آشکار، هر برنامه‌ای را برای نوشتن در حافظه خارجی واجد شرایط می‌کند"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"اجبار فعالیت‌ها به قابل تغییر اندازه بودن"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"بدون توجه به مقادیر مانیفست، اندازه همه فعالیت‌ها برای حالت چند پنجره‌ای می‌تواند تغییر کند."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"فعال کردن پنجره‌های آزاد"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"فعال کردن پشتیبانی برای پنجره‌های آزاد آزمایشی."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"فعال کردن پنجره‌های با قالب آزاد (قدیمی)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"فعال کردن پشتیبانی از پنجره‌های با قالب آزاد قدیمی آزمایشی."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"گذرواژه پشتیبان‌گیری محلی"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"پشتیبان‌گیری کامل رایانه درحال حاضر محافظت نمی‌شود"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"برای تغییر یا حذف گذرواژه برای نسخه‌های پشتیبان کامل رایانه‌ای تک‌ضرب بزنید"</string>
diff --git a/packages/SettingsLib/res/values-fi/strings.xml b/packages/SettingsLib/res/values-fi/strings.xml
index a8222b9fee4c..ad0cab36ce17 100644
--- a/packages/SettingsLib/res/values-fi/strings.xml
+++ b/packages/SettingsLib/res/values-fi/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Salli GPU:n virheenkorjauskerrosten lataus"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Käytä laajennettua kirjausta"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Sisällytä virheraportteihin muita laitekohtaisia myyjälokeja, jotka voivat sisältää yksityisiä tietoja, käyttää enemmän akkua ja/tai käyttää enemmän tallennustilaa"</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Poista käytöstä yhden päivän jälkeen"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Tarjoajien laajennettu kirjaus on päättynyt"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Käytössä päivän ajan"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Pidä käytössä vielä yhden päivän ajan"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Poistuu käytöstä yhden päivän jälkeen"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Käytössä toistaiseksi"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Ikkuna"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Siirtymä"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Animaattori"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Mahdollistaa sovelluksen tietojen tallentamisen ulkoiseen tallennustilaan luetteloarvoista riippumatta"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Pakota kaikki toiminnot hyväksymään koon muutos"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Pakota kaikki toiminnot hyväksymään koon muuttaminen usean ikkunan tilassa luettelon arvoista riippumatta"</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Ota käyttöön vapaamuotoiset ikkunat"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Ota kokeellisten vapaamuotoisten ikkunoiden tuki käyttöön"</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Ota vapaamuotoiset ikkunat käyttöön (vanha)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Ota kokeellinen vapaamuotoisten ikkunoiden tuki käyttöön (vanha)."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Varmuuskop. salasana"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Tietokoneen kaikkien tietojen varmuuskopiointia ei ole tällä hetkellä suojattu"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Vaihda tai poista tietokoneen kaikkien tietojen varmuuskopioinnin salasana koskettamalla."</string>
diff --git a/packages/SettingsLib/res/values-fr-rCA/strings.xml b/packages/SettingsLib/res/values-fr-rCA/strings.xml
index cdc1e44ae3bf..45e70f88839d 100644
--- a/packages/SettingsLib/res/values-fr-rCA/strings.xml
+++ b/packages/SettingsLib/res/values-fr-rCA/strings.xml
@@ -182,8 +182,8 @@
<string name="accessibility_wifi_security_type_none" msgid="162352241518066966">"Réseau ouvert"</string>
<string name="accessibility_wifi_security_type_secured" msgid="2399774097343238942">"Réseau sécurisé"</string>
<string name="process_kernel_label" msgid="950292573930336765">"Système d\'exploitation Android"</string>
- <string name="data_usage_uninstalled_apps" msgid="1933665711856171491">"Applications supprimées"</string>
- <string name="data_usage_uninstalled_apps_users" msgid="5533981546921913295">"Applications et utilisateurs supprimés"</string>
+ <string name="data_usage_uninstalled_apps" msgid="1933665711856171491">"Applis supprimées"</string>
+ <string name="data_usage_uninstalled_apps_users" msgid="5533981546921913295">"Applis et utilisateurs supprimés"</string>
<string name="data_usage_ota" msgid="7984667793701597001">"Mises à jour du système"</string>
<string name="tether_settings_title_usb" msgid="3728686573430917722">"Partage de connexion par USB"</string>
<string name="tether_settings_title_wifi" msgid="4803402057533895526">"Point d\'accès Wi-Fi mobile"</string>
@@ -241,7 +241,7 @@
<string name="category_clone" msgid="1554511758987195974">"Cloner"</string>
<string name="development_settings_title" msgid="140296922921597393">"Options pour les développeurs"</string>
<string name="development_settings_enable" msgid="4285094651288242183">"Activer les options pour les développeurs"</string>
- <string name="development_settings_summary" msgid="8718917813868735095">"Définir les options pour le développement de l\'application"</string>
+ <string name="development_settings_summary" msgid="8718917813868735095">"Définir les options pour le développement de l\'appli"</string>
<string name="development_settings_not_available" msgid="355070198089140951">"Les options proposées aux développeurs ne sont pas disponibles pour cet utilisateur."</string>
<string name="vpn_settings_not_available" msgid="2894137119965668920">"Les paramètres de RPV ne sont pas disponibles pour cet utilisateur"</string>
<string name="tethering_settings_not_available" msgid="266821736434699780">"Les paramètres de partage de connexion ne sont pas disponibles pour cet utilisateur"</string>
@@ -288,8 +288,8 @@
<string name="confirm_enable_oem_unlock_title" msgid="8249318129774367535">"Permettre le déverrouillage par le fabricant?"</string>
<string name="confirm_enable_oem_unlock_text" msgid="854131050791011970">"AVERTISSEMENT : Les fonctionnalités de protection de l\'appareil ne fonctionneront pas sur cet appareil lorsque ce paramètre est activé."</string>
<string name="mock_location_app" msgid="6269380172542248304">"Sélectionner l\'appli de position fictive"</string>
- <string name="mock_location_app_not_set" msgid="6972032787262831155">"Aucune application de position fictive définie"</string>
- <string name="mock_location_app_set" msgid="4706722469342913843">"Application de position fictive : <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
+ <string name="mock_location_app_not_set" msgid="6972032787262831155">"Aucune appli de position fictive définie"</string>
+ <string name="mock_location_app_set" msgid="4706722469342913843">"Appli de position fictive : <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
<string name="debug_networking_category" msgid="6829757985772659599">"Réseautage"</string>
<string name="wifi_display_certification" msgid="1805579519992520381">"Certification de l\'affichage sans fil"</string>
<string name="wifi_verbose_logging" msgid="1785910450009679371">"Autoriser enreg. données Wi-Fi détaillées"</string>
@@ -343,30 +343,30 @@
<string name="mobile_data_always_on_summary" msgid="1112156365594371019">"Toujours garder les données cellulaires actives, même lorsque le Wi-Fi est activé (pour la commutation rapide entre les réseaux)."</string>
<string name="tethering_hardware_offload_summary" msgid="7801345335142803029">"Utiliser l\'accélération matérielle du partage de connexion si possible"</string>
<string name="adb_warning_title" msgid="7708653449506485728">"Autoriser le débogage USB?"</string>
- <string name="adb_warning_message" msgid="8145270656419669221">"Le débogage USB est conçu uniquement pour le développement. Utilisez-le pour copier des données entre votre ordinateur et votre appareil, installer des applications sur votre appareil sans notification et lire les données de journal."</string>
+ <string name="adb_warning_message" msgid="8145270656419669221">"Le débogage USB est conçu uniquement pour le développement. Utilisez-le pour copier des données entre votre ordinateur et votre appareil, installer des applis sur votre appareil sans notification et lire les données de journal."</string>
<string name="adbwifi_warning_title" msgid="727104571653031865">"Autoriser le débogage sans fil?"</string>
- <string name="adbwifi_warning_message" msgid="8005936574322702388">"Le débogage sans fil est conçu uniquement aux fin de conception. Utilisez-le pour copier des données entre votre ordinateur et votre appareil, installer des applications sur votre appareil sans notification et lire les données de journal."</string>
+ <string name="adbwifi_warning_message" msgid="8005936574322702388">"Le débogage sans fil est conçu uniquement aux fin de conception. Utilisez-le pour copier des données entre votre ordinateur et votre appareil, installer des applis sur votre appareil sans notification et lire les données de journal."</string>
<string name="adb_keys_warning_message" msgid="2968555274488101220">"Voulez-vous vraiment désactiver l\'accès au débogage USB de tous les ordinateurs précédemment autorisés?"</string>
<string name="dev_settings_warning_title" msgid="8251234890169074553">"Activer les paramètres de développement?"</string>
- <string name="dev_settings_warning_message" msgid="37741686486073668">"Ces paramètres sont en cours de développement. Ils peuvent endommager votre appareil et les applications qui s\'y trouvent, ou provoquer leur dysfonctionnement."</string>
+ <string name="dev_settings_warning_message" msgid="37741686486073668">"Ces paramètres sont en cours de développement. Ils peuvent endommager votre appareil et les applis qui s\'y trouvent, ou provoquer leur dysfonctionnement."</string>
<string name="verify_apps_over_usb_title" msgid="6031809675604442636">"Vérifier les applis par USB"</string>
- <string name="verify_apps_over_usb_summary" msgid="1317933737581167839">"Vérifier que les applications installées par ADB/ADT ne présentent pas de comportement dangereux."</string>
+ <string name="verify_apps_over_usb_summary" msgid="1317933737581167839">"Vérifier que les applis installées par ADB/ADT ne présentent pas de comportement dangereux."</string>
<string name="bluetooth_show_devices_without_names_summary" msgid="780964354377854507">"Les appareils Bluetooth sans nom (adresses MAC seulement) seront affichés"</string>
<string name="bluetooth_disable_absolute_volume_summary" msgid="2006309932135547681">"Désactive la fonctionnalité de volume absolu par Bluetooth en cas de problème de volume sur les appareils à distance, par exemple si le volume est trop élevé ou s\'il ne peut pas être contrôlé."</string>
<string name="bluetooth_enable_gabeldorsche_summary" msgid="2054730331770712629">"Active la pile de la fonctionnalité Bluetooth Gabeldorsche."</string>
<string name="enhanced_connectivity_summary" msgid="1576414159820676330">"Active la fonctionnalité Connectivité améliorée."</string>
<string name="enable_terminal_title" msgid="3834790541986303654">"Terminal local"</string>
- <string name="enable_terminal_summary" msgid="2481074834856064500">"Activer l\'application Terminal permettant l\'accès au shell local"</string>
+ <string name="enable_terminal_summary" msgid="2481074834856064500">"Activer l\'appli Terminal permettant l\'accès au shell local"</string>
<string name="hdcp_checking_title" msgid="3155692785074095986">"Vérification HDCP"</string>
<string name="hdcp_checking_dialog_title" msgid="7691060297616217781">"Configurer vérification HDCP"</string>
<string name="debug_debugging_category" msgid="535341063709248842">"Débogage"</string>
- <string name="debug_app" msgid="8903350241392391766">"Sélectionner une application à déboguer"</string>
- <string name="debug_app_not_set" msgid="1934083001283807188">"Aucune application à déboguer définie"</string>
- <string name="debug_app_set" msgid="6599535090477753651">"Application à déboguer : <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
- <string name="select_application" msgid="2543228890535466325">"Sél. application"</string>
+ <string name="debug_app" msgid="8903350241392391766">"Sélectionner une appli à déboguer"</string>
+ <string name="debug_app_not_set" msgid="1934083001283807188">"Aucune appli à déboguer définie"</string>
+ <string name="debug_app_set" msgid="6599535090477753651">"Appli à déboguer : <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
+ <string name="select_application" msgid="2543228890535466325">"Sél. appli"</string>
<string name="no_application" msgid="9038334538870247690">"Aucune"</string>
<string name="wait_for_debugger" msgid="7461199843335409809">"Attendre l\'intervention du débogueur"</string>
- <string name="wait_for_debugger_summary" msgid="6846330006113363286">"Avant de s\'exécuter, l\'application déboguée doit attendre que le débogueur soit attaché."</string>
+ <string name="wait_for_debugger_summary" msgid="6846330006113363286">"Avant de s\'exécuter, l\'appli déboguée doit attendre que le débogueur soit attaché."</string>
<string name="debug_input_category" msgid="7349460906970849771">"Entrée"</string>
<string name="debug_drawing_category" msgid="5066171112313666619">"Dessin"</string>
<string name="debug_hw_drawing_category" msgid="5830815169336975162">"Accélération matérielle"</string>
@@ -401,43 +401,37 @@
<string name="transparent_navigation_bar_summary" msgid="5454359021817330722">"Rendre la couleur d\'arrière-plan de la barre de navigation transparente par défaut"</string>
<string name="window_blurs" msgid="6831008984828425106">"Autoriser le flou au niveau des fenêtres"</string>
<string name="force_msaa" msgid="4081288296137775550">"Forcer MSAA 4x"</string>
- <string name="force_msaa_summary" msgid="9070437493586769500">"Activer MSAA 4x dans les applications OpenGL ES 2.0"</string>
+ <string name="force_msaa_summary" msgid="9070437493586769500">"Activer MSAA 4x dans les applis OpenGL ES 2.0"</string>
<string name="show_non_rect_clip" msgid="7499758654867881817">"Déboguer opérations de découpage non rectangulaire"</string>
<string name="track_frame_time" msgid="522674651937771106">"Rendu HWUI du profil"</string>
<string name="enable_gpu_debug_layers" msgid="4986675516188740397">"Activer couches débogage GPU"</string>
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Autoriser couches débogage GPU pour applis de débogage"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Activer le journal détaillé des fournisseurs"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Incluez les journaux supplémentaires du fournisseur propres à l\'appareil dans les rapports de bogue. Ils peuvent contenir des données personnelles, épuiser la pile plus rapidement et/ou utiliser plus d\'espace de stockage."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Désactiver après une journée"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Le journal détaillé des fournisseurs est terminé"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Activé pour une journée"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Activer pour une journée de plus"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Se désactive après une journée"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Activé indéfiniment"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Échelle animation fenêtres"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Éch. d\'animation des transitions"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Échelle durée animation"</string>
<string name="overlay_display_devices_title" msgid="5411894622334469607">"Simuler affich. secondaires"</string>
- <string name="debug_applications_category" msgid="5394089406638954196">"Applications"</string>
+ <string name="debug_applications_category" msgid="5394089406638954196">"Applis"</string>
<string name="immediately_destroy_activities" msgid="1826287490705167403">"Ne pas conserver activités"</string>
<string name="immediately_destroy_activities_summary" msgid="6289590341144557614">"Supprimer immédiatement les activités abandonnées"</string>
<string name="app_process_limit_title" msgid="8361367869453043007">"Limite processus arr.-plan"</string>
<string name="show_all_anrs" msgid="9160563836616468726">"Afficher ANR arrière-plan"</string>
- <string name="show_all_anrs_summary" msgid="8562788834431971392">"Afficher le message « L\'application ne répond plus » pour les applications en arrière-plan"</string>
+ <string name="show_all_anrs_summary" msgid="8562788834431971392">"Afficher le message « L\'appli ne répond plus » pour les applis en arrière-plan"</string>
<string name="show_notification_channel_warnings" msgid="3448282400127597331">"Affich. avertiss. canal notification"</string>
<string name="show_notification_channel_warnings_summary" msgid="68031143745094339">"Afficher avertiss. à l\'écran quand une appli présente une notif. sans canal valide"</string>
<string name="force_allow_on_external" msgid="9187902444231637880">"Forcer l\'autor. d\'applis sur stockage externe"</string>
- <string name="force_allow_on_external_summary" msgid="8525425782530728238">"Rend possible l\'enregistrement de toute application sur un espace de stockage externe, indépendamment des valeurs du fichier manifeste"</string>
+ <string name="force_allow_on_external_summary" msgid="8525425782530728238">"Rend possible l\'enregistrement de toute appli sur un espace de stockage externe, indépendamment des valeurs du fichier manifeste"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Forcer les activités à être redimensionnables"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Permet de redimensionner toutes les activités pour le mode multi-fenêtre, indépendamment des valeurs du fichier manifeste."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Activer les fenêtres de forme libre"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Activer la compatibilité avec les fenêtres de forme libre expérimentales."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Activer fenêtres de forme libre (patrimoniales)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Activer la prise en charge des fenêtres de forme libre patrimoniales expérimentales."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Mot de passe sauvegarde PC"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Les sauvegardes complètes sur PC ne sont pas protégées actuellement"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Touchez pour modifier ou supprimer le mot de passe utilisé pour les sauvegardes complètes sur ordinateur."</string>
@@ -455,14 +449,14 @@
<item msgid="4548987861791236754">"Couleurs naturelles, comme l\'œil les voit"</item>
<item msgid="1282170165150762976">"Couleurs optimisées pour le contenu numérique"</item>
</string-array>
- <string name="inactive_apps_title" msgid="5372523625297212320">"Applications en veille"</string>
- <string name="inactive_app_inactive_summary" msgid="3161222402614236260">"Application inactive. Touchez ici pour l\'activer."</string>
- <string name="inactive_app_active_summary" msgid="8047630990208722344">"Application active. Touchez ici pour la désactiver."</string>
- <string name="standby_bucket_summary" msgid="5128193447550429600">"État de l\'application en veille :<xliff:g id="BUCKET"> %s</xliff:g>"</string>
+ <string name="inactive_apps_title" msgid="5372523625297212320">"Applis en veille"</string>
+ <string name="inactive_app_inactive_summary" msgid="3161222402614236260">"Appli inactive. Touchez ici pour l\'activer."</string>
+ <string name="inactive_app_active_summary" msgid="8047630990208722344">"Appli active. Touchez ici pour la désactiver."</string>
+ <string name="standby_bucket_summary" msgid="5128193447550429600">"État de l\'appli en veille :<xliff:g id="BUCKET"> %s</xliff:g>"</string>
<string name="transcode_settings_title" msgid="2581975870429850549">"Paramètres de transcodage des éléments multimédias"</string>
<string name="transcode_user_control" msgid="6176368544817731314">"Remplacer les valeurs par défaut de transcodage"</string>
<string name="transcode_enable_all" msgid="2411165920039166710">"Activer le transcodage"</string>
- <string name="transcode_default" msgid="3784803084573509491">"Présumer que les applications prennent en charge les formats modernes"</string>
+ <string name="transcode_default" msgid="3784803084573509491">"Présumer que les applis prennent en charge les formats modernes"</string>
<string name="transcode_notification" msgid="5560515979793436168">"Afficher les notifications de transcodage"</string>
<string name="transcode_disable_cache" msgid="3160069309377467045">"Désactiver le cache de transcodage"</string>
<string name="runningservices_settings_title" msgid="6460099290493086515">"Services en cours d\'exécution"</string>
@@ -547,9 +541,9 @@
<string name="retail_demo_reset_title" msgid="1866911701095959800">"Mot de passe obligatoire"</string>
<string name="active_input_method_subtypes" msgid="4232680535471633046">"Modes de saisie actifs"</string>
<string name="use_system_language_to_select_input_method_subtypes" msgid="4865195835541387040">"Utiliser les langues du système"</string>
- <string name="failed_to_open_app_settings_toast" msgid="764897252657692092">"Échec de l\'ouverture des paramètres de l\'application <xliff:g id="SPELL_APPLICATION_NAME">%1$s</xliff:g>."</string>
- <string name="ime_security_warning" msgid="6547562217880551450">"Ce mode de saisie est susceptible d\'enregistrer le texte que vous saisissez, y compris vos données personnelles, telles que les mots de passe et les numéros de carte de paiement. Il provient de l\'application <xliff:g id="IME_APPLICATION_NAME">%1$s</xliff:g>. Voulez-vous vraiment l\'activer?"</string>
- <string name="direct_boot_unaware_dialog_message" msgid="7845398276735021548">"Remarque : Après un redémarrage, vous ne pouvez pas lancer cette application tant que vous n\'avez pas déverrouillé votre téléphone."</string>
+ <string name="failed_to_open_app_settings_toast" msgid="764897252657692092">"Échec de l\'ouverture des paramètres de l\'appli <xliff:g id="SPELL_APPLICATION_NAME">%1$s</xliff:g>."</string>
+ <string name="ime_security_warning" msgid="6547562217880551450">"Ce mode de saisie est susceptible d\'enregistrer le texte que vous saisissez, y compris vos données personnelles, telles que les mots de passe et les numéros de carte de paiement. Il provient de l\'appli <xliff:g id="IME_APPLICATION_NAME">%1$s</xliff:g>. Voulez-vous vraiment l\'activer?"</string>
+ <string name="direct_boot_unaware_dialog_message" msgid="7845398276735021548">"Remarque : Après un redémarrage, vous ne pouvez pas lancer cette appli tant que vous n\'avez pas déverrouillé votre téléphone."</string>
<string name="ims_reg_title" msgid="8197592958123671062">"État d\'enregistrement IMS"</string>
<string name="ims_reg_status_registered" msgid="884916398194885457">"Enregistré"</string>
<string name="ims_reg_status_not_registered" msgid="2989287366045704694">"Non enregistré"</string>
@@ -567,7 +561,7 @@
<string name="alarms_and_reminders_label" msgid="6918395649731424294">"Alarmes et rappels"</string>
<string name="alarms_and_reminders_switch_title" msgid="4939393911531826222">"Autoriser la création d\'alarmes et de rappels"</string>
<string name="alarms_and_reminders_title" msgid="8819933264635406032">"Alarmes et rappels"</string>
- <string name="alarms_and_reminders_footer_title" msgid="6302587438389079695">"Autorisez cette application à créer des alarmes et à programmer des actions urgentes. Cela permet à l’application de s\'exécuter en arrière-plan, ce qui peut nécessiter plus de pile.\n\nSi cette autorisation est désactivée, les alarmes existantes et les événements en temps réel programmés par cette application ne fonctionneront pas."</string>
+ <string name="alarms_and_reminders_footer_title" msgid="6302587438389079695">"Autorisez cette appli à créer des alarmes et à programmer des actions urgentes. Cela permet à l’appli de s\'exécuter en arrière-plan, ce qui peut nécessiter plus de pile.\n\nSi cette autorisation est désactivée, les alarmes existantes et les événements en temps réel programmés par cette appli ne fonctionneront pas."</string>
<string name="keywords_alarms_and_reminders" msgid="6633360095891110611">"horaire, alarme, rappel, horloge"</string>
<string name="zen_mode_settings_title" msgid="7374070457626419755">"Ne pas déranger"</string>
<string name="zen_mode_enable_dialog_turn_on" msgid="6418297231575050426">"Activer"</string>
@@ -619,20 +613,20 @@
<string name="blob_expires_text" msgid="7882727111491739331">"Expirent le <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="shared_data_delete_failure_text" msgid="3842701391009628947">"Une erreur s\'est produite lors de la suppression des données partagées."</string>
<string name="shared_data_no_accessors_dialog_text" msgid="8903738462570715315">"Il n\'y a aucun bail octroyé pour ces données partagées. Souhaitez-vous les supprimer?"</string>
- <string name="accessor_info_title" msgid="8289823651512477787">"Applications qui partagent des données"</string>
- <string name="accessor_no_description_text" msgid="7510967452505591456">"Aucune description fournie par l\'application."</string>
+ <string name="accessor_info_title" msgid="8289823651512477787">"Applis qui partagent des données"</string>
+ <string name="accessor_no_description_text" msgid="7510967452505591456">"Aucune description fournie par l\'appli."</string>
<string name="accessor_expires_text" msgid="4625619273236786252">"Le bail expire le <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="delete_blob_text" msgid="2819192607255625697">"Supprimer les données partagées"</string>
<string name="delete_blob_confirmation_text" msgid="7807446938920827280">"Voulez-vous vraiment supprimer ces données partagées?"</string>
- <string name="user_add_user_item_summary" msgid="5748424612724703400">"Les utilisateurs disposent de leurs propres applications et de leur propre contenu."</string>
- <string name="user_add_profile_item_summary" msgid="5418602404308968028">"Vous pouvez limiter l\'accès aux applications et au contenu depuis votre compte."</string>
+ <string name="user_add_user_item_summary" msgid="5748424612724703400">"Les utilisateurs disposent de leurs propres applis et de leur propre contenu."</string>
+ <string name="user_add_profile_item_summary" msgid="5418602404308968028">"Vous pouvez limiter l\'accès aux applis et au contenu depuis votre compte."</string>
<string name="user_add_user_item_title" msgid="2394272381086965029">"Utilisateur"</string>
<string name="user_add_profile_item_title" msgid="3111051717414643029">"Profil limité"</string>
<string name="user_add_user_title" msgid="5457079143694924885">"Ajouter un utilisateur?"</string>
- <string name="user_add_user_message_long" msgid="1527434966294733380">"Vous pouvez partager cet appareil avec d\'autres personnes en ajoutant des utilisateurs. Chaque utilisateur dispose de son propre espace, où il peut personnaliser, entre autres, ses applications et son fond d\'écran. Chacun peut également modifier les paramètres de l\'appareil, comme les réseaux Wi-Fi, qui touchent tous les utilisateurs.\n\nLorsque vous ajoutez un utilisateur, celui-ci doit configurer son propre espace.\n\nTout utilisateur peut mettre à jour les applications pour les autres utilisateurs. Il se peut que les paramètres et les services d\'accessibilité ne soient pas transférés aux nouveaux utilisateurs."</string>
- <string name="user_add_user_message_short" msgid="3295959985795716166">"Lorsque vous ajoutez un utilisateur, celui-ci doit configurer son espace.\n\nTout utilisateur peut mettre à jour les applications pour tous les autres utilisateurs."</string>
+ <string name="user_add_user_message_long" msgid="1527434966294733380">"Vous pouvez partager cet appareil avec d\'autres personnes en ajoutant des utilisateurs. Chaque utilisateur dispose de son propre espace, où il peut personnaliser, entre autres, ses applis et son fond d\'écran. Chacun peut également modifier les paramètres de l\'appareil, comme les réseaux Wi-Fi, qui touchent tous les utilisateurs.\n\nLorsque vous ajoutez un utilisateur, celui-ci doit configurer son propre espace.\n\nTout utilisateur peut mettre à jour les applis pour les autres utilisateurs. Il se peut que les paramètres et les services d\'accessibilité ne soient pas transférés aux nouveaux utilisateurs."</string>
+ <string name="user_add_user_message_short" msgid="3295959985795716166">"Lorsque vous ajoutez un utilisateur, celui-ci doit configurer son espace.\n\nTout utilisateur peut mettre à jour les applis pour tous les autres utilisateurs."</string>
<string name="user_grant_admin_title" msgid="5157031020083343984">"Définir cet utilisateur comme administrateur?"</string>
- <string name="user_grant_admin_message" msgid="1673791931033486709">"Les administrateurs ont des privilèges spéciaux que les autres utilisateurs n\'ont pas. Un administrateur peut gérer tous les utilisateurs, mettre à jour ou réinitialiser cet appareil, modifier les paramètres, voir toutes les applications installées et accorder ou révoquer les privilèges d\'administrateur à d\'autres personnes."</string>
+ <string name="user_grant_admin_message" msgid="1673791931033486709">"Les administrateurs ont des privilèges spéciaux que les autres utilisateurs n\'ont pas. Un administrateur peut gérer tous les utilisateurs, mettre à jour ou réinitialiser cet appareil, modifier les paramètres, voir toutes les applis installées et accorder ou révoquer les privilèges d\'administrateur à d\'autres personnes."</string>
<string name="user_grant_admin_button" msgid="5441486731331725756">"Définir comme administrateur"</string>
<string name="user_setup_dialog_title" msgid="8037342066381939995">"Configurer l\'utilisateur?"</string>
<string name="user_setup_dialog_message" msgid="269931619868102841">"Assurez-vous que la personne est disponible et qu\'elle peut utiliser l\'appareil pour configurer son espace."</string>
@@ -644,7 +638,7 @@
<string name="user_new_profile_name" msgid="2405500423304678841">"Nouveau profil"</string>
<string name="user_info_settings_title" msgid="6351390762733279907">"Informations sur l\'utilisateur"</string>
<string name="profile_info_settings_title" msgid="105699672534365099">"Informations de profil"</string>
- <string name="user_need_lock_message" msgid="4311424336209509301">"Avant de créer un profil limité, vous devez définir un écran de verrouillage pour protéger vos applications et vos données personnelles."</string>
+ <string name="user_need_lock_message" msgid="4311424336209509301">"Avant de créer un profil limité, vous devez définir un écran de verrouillage pour protéger vos applis et vos données personnelles."</string>
<string name="user_set_lock_button" msgid="1427128184982594856">"Définir verrouillage écran"</string>
<string name="user_switch_to_user" msgid="6975428297154968543">"Passer à <xliff:g id="USER_NAME">%s</xliff:g>"</string>
<string name="creating_new_user_dialog_message" msgid="7232880257538970375">"Création d\'un utilisateur en cours…"</string>
@@ -663,9 +657,9 @@
<string name="guest_remove_guest_confirm_button" msgid="7858123434954143879">"Retirer"</string>
<string name="guest_resetting" msgid="7822120170191509566">"Réinitialisation de la session Invité en cours…"</string>
<string name="guest_reset_and_restart_dialog_title" msgid="3396657008451616041">"Réinitialiser la session d\'invité?"</string>
- <string name="guest_reset_and_restart_dialog_message" msgid="2764425635305200790">"Une nouvelle session d\'invité sera lancée, et toutes les applications et données de la session en cours seront supprimées"</string>
+ <string name="guest_reset_and_restart_dialog_message" msgid="2764425635305200790">"Une nouvelle session d\'invité sera lancée, et toutes les applis et données de la session en cours seront supprimées"</string>
<string name="guest_exit_dialog_title" msgid="1846494656849381804">"Quitter le mode Invité?"</string>
- <string name="guest_exit_dialog_message" msgid="1743218864242719783">"Les applications et les données de la session d\'invité en cours seront supprimées"</string>
+ <string name="guest_exit_dialog_message" msgid="1743218864242719783">"Les applis et les données de la session d\'invité en cours seront supprimées"</string>
<string name="grant_admin" msgid="4323199171790522574">"Oui, le définir comme administrateur"</string>
<string name="not_grant_admin" msgid="3557849576157702485">"Non, ne pas le définir comme administrateur"</string>
<string name="guest_exit_dialog_button" msgid="1736401897067442044">"Quitter"</string>
@@ -724,14 +718,14 @@
<string name="keyboard_layout_default_label" msgid="1997292217218546957">"Par défaut"</string>
<string name="turn_screen_on_title" msgid="2662312432042116026">"Commande d\'activation de l\'écran"</string>
<string name="allow_turn_screen_on" msgid="6194845766392742639">"Autoriser l\'activation de l\'écran"</string>
- <string name="allow_turn_screen_on_description" msgid="43834403291575164">"Autorisez une application à activer l\'écran. Lorsque vous accordez cette autorisation, l\'application peut activer l\'écran à tout moment sans que vous lui demandiez."</string>
+ <string name="allow_turn_screen_on_description" msgid="43834403291575164">"Autorisez une appli à activer l\'écran. Lorsque vous accordez cette autorisation, l\'appli peut activer l\'écran à tout moment sans que vous lui demandiez."</string>
<string name="bt_le_audio_broadcast_dialog_title" msgid="5392738488989777074">"Arrêter la diffusion de <xliff:g id="APP_NAME">%1$s</xliff:g>?"</string>
<string name="bt_le_audio_broadcast_dialog_sub_title" msgid="268234802198852753">"Si vous diffusez <xliff:g id="SWITCHAPP">%1$s</xliff:g> ou changez la sortie, votre diffusion actuelle s\'arrêtera"</string>
<string name="bt_le_audio_broadcast_dialog_switch_app" msgid="5749813313369517812">"Diffuser <xliff:g id="SWITCHAPP">%1$s</xliff:g>"</string>
<string name="bt_le_audio_broadcast_dialog_different_output" msgid="2638402023060391333">"Changer la sortie"</string>
<string name="back_navigation_animation" msgid="8105467568421689484">"Animations pour le retour prédictif"</string>
<string name="back_navigation_animation_summary" msgid="741292224121599456">"Activer les animations système pour le retour prédictif."</string>
- <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Ce paramètre permet d\'activer les animations du système pour l\'animation des gestes prédictifs. Cela exige de définir le paramètre enableOnBackInvokedCallback à Vrai pour chaque application dans le fichier de configuration."</string>
+ <string name="back_navigation_animation_dialog" msgid="8696966520944625596">"Ce paramètre permet d\'activer les animations du système pour l\'animation des gestes prédictifs. Cela exige de définir le paramètre enableOnBackInvokedCallback à Vrai pour chaque appli dans le fichier de configuration."</string>
<string name="font_scale_percentage" msgid="2624057443622817886">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
<string name="not_specified" msgid="5423502443185110328">"Non précisé"</string>
<string name="neuter" msgid="2075249330106127310">"Neutre"</string>
diff --git a/packages/SettingsLib/res/values-fr/strings.xml b/packages/SettingsLib/res/values-fr/strings.xml
index 300dca1ea255..c60e8ce1f6c5 100644
--- a/packages/SettingsLib/res/values-fr/strings.xml
+++ b/packages/SettingsLib/res/values-fr/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Autoriser le chargement de couches de débogage GPU"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Activer la journalisation détaillée du fournisseur"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Inclure les journaux supplémentaires du fournisseur, spécifiques à l\'appareil, dans les rapports de bug. Ils peuvent contenir des informations personnelles, solliciter davantage la batterie et/ou utiliser plus d\'espace de stockage."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Désactiver après un jour"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"La journalisation détaillée du fournisseur est terminée"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Activée pour un jour"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Activer pour un jour de plus"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Désactivation après un jour"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Activée indéfiniment"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Échelle d\'animation des fenêtres"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Échelle d\'animation des transitions"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Échelle de durée d\'animation"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Autoriser l\'enregistrement de toute application sur un espace de stockage externe, indépendamment des valeurs du fichier manifeste"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Forcer le redimensionnement des activités"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Rendre toutes les activités redimensionnables pour le mode multifenêtre, indépendamment des valeurs du fichier manifeste"</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Activer les fenêtres de forme libre"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Activer la compatibilité avec les fenêtres de forme libre expérimentales"</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Activer les anciennes fenêtres de forme libre"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Permet d\'activer la compatibilité avec les anciennes fenêtres de forme libre expérimentales."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Mot de passe de sauvegarde ordi"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Les sauvegardes complètes sur ordi ne sont actuellement pas protégées"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Appuyez pour modifier ou supprimer le mot de passe des sauvegardes complètes sur ordi."</string>
diff --git a/packages/SettingsLib/res/values-gl/strings.xml b/packages/SettingsLib/res/values-gl/strings.xml
index d00d6d3a5fd8..4f82af38aab7 100644
--- a/packages/SettingsLib/res/values-gl/strings.xml
+++ b/packages/SettingsLib/res/values-gl/strings.xml
@@ -436,8 +436,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Permite que calquera aplicación compatible se poida escribir nun almacenamento externo, independentemente dos valores do manifesto"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Forzar o axuste do tamaño das actividades"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Permite axustar o tamaño de todas as actividades para o modo multiventá, independentemente dos valores do manifesto"</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Activar ventás de forma libre"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Activa a compatibilidade con ventás de forma libre experimentais"</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Activar ventás de forma libre (antigas)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Activa a compatibilidade coas ventás de forma libre experimentais antigas."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Contrasinal para copias"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"As copias de seguranza de ordenador completas non están protexidas"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Toca para cambiar ou quitar o contrasinal para as copias de seguranza completas de ordenador"</string>
diff --git a/packages/SettingsLib/res/values-gu/strings.xml b/packages/SettingsLib/res/values-gu/strings.xml
index 0c204f7b9b69..b44f0c72041c 100644
--- a/packages/SettingsLib/res/values-gu/strings.xml
+++ b/packages/SettingsLib/res/values-gu/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"ડિબગ ઍપ માટે GPU ડિબગ સ્તરો લોડ કરવાની મંજૂરી આપો"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"વર્બોઝ વેન્ડર લૉગિંગ ચાલુ કરો"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"ખામીની જાણકારીમાં ડિવાઇસથી જોડાયેલા ચોક્કસ વેન્ડર લૉગ શામેલ કરો, જેમાં ખાનગી માહિતી શામેલ હોઈ શકે છે, તે વધુ બૅટરીનો ઉપયોગ કરી શકે છે અને/અથવા વધુ સ્ટોરેજનો ઉપયોગ કરી શકે છે."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"એક દિવસ પછી બંધ કરો"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"શબ્દબહુલ વિક્રેતા લૉગિંગ સમાપ્ત થયું"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"એક દિવસ માટે ચાલુ કર્યું"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"વધુ એક દિવસ માટે ચાલુ કરો"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"એક દિવસ પછી બંધ કરે છે"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"અનિશ્ચિત સમય માટે ચાલુ કર્યું"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"વિન્ડો ઍનિમેશન સ્કેલ"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"ટ્રાન્ઝિશન ઍનિમેશન સ્કેલ"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"ઍનિમેટર અવધિ સ્કેલ"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"મેનિફેસ્ટ મૂલ્યોને ધ્યાનમાં લીધા સિવાય, કોઈપણ ઍપને બાહ્ય સ્ટોરેજ પર લખાવા માટે લાયક બનાવે છે"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"પ્રવૃત્તિઓને ફરીથી કદ યોગ્ય થવા માટે ફરજ પાડો"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"મૅનિફેસ્ટ મૂલ્યોને ધ્યાનમાં લીધા સિવાય, તમામ પ્રવૃત્તિઓને મલ્ટી-વિન્ડો માટે ફરીથી કદ બદલી શકે તેવી બનાવો."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"ફ્રીફોર્મ વિન્ડો ચાલુ કરો"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"પ્રાયોગિક ફ્રીફોર્મ વિન્ડો માટે સપોર્ટને ચાલુ કરો."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"ફ્રીફોર્મ વિન્ડો ચાલુ કરો (જૂની)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"પ્રાયોગિક જૂની ફ્રીફોર્મ વિન્ડો માટે સપોર્ટ મેળવવાની સુવિધા ચાલુ કરો."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"ડેસ્કટૉપ બૅકઅપ પાસવર્ડ"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"ડેસ્કટૉપ સંપૂર્ણ બૅકઅપ હાલમાં સુરક્ષિત નથી"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"ડેસ્કટૉપ સંપૂર્ણ બેકઅપ્સ માટેનો પાસવર્ડ બદલવા અથવા દૂર કરવા માટે ટૅચ કરો"</string>
diff --git a/packages/SettingsLib/res/values-hi/strings.xml b/packages/SettingsLib/res/values-hi/strings.xml
index 2c938a610c0b..246f66e8dcc3 100644
--- a/packages/SettingsLib/res/values-hi/strings.xml
+++ b/packages/SettingsLib/res/values-hi/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"डीबग ऐप के लिए जीपीयू डीबग लेयर लोड करने दें"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"वर्बोस वेंडर लॉगिंग चालू करें"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"गड़बड़ियों की रिपोर्ट में डिवाइस से जुड़े अतिरिक्त वेंडर लॉग शामिल करें. इन लॉग में निजी जानकारी, बैटरी का ज़्यादा इस्तेमाल, और/या डिवाइस का स्टोरेज ज़्यादा इस्तेमाल करने की जानकारी हो सकती है."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"एक दिन बाद बंद करें"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"वर्बोस वेंडर लॉगिंग खत्म हो चुका है"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"एक दिन के लिए चालू किया गया"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"एक और दिन के लिए चालू करें"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"एक दिन के बाद बंद होगा"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"अनिश्चित समय के लिए चालू किया गया"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"विंडो ऐनिमेशन स्‍केल"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"ट्रांज़िशन ऐनिमेशन स्‍केल"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"ऐनिमेटर ड्यूरेशन स्केल"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"इससे कोई भी ऐप्लिकेशन बाहरी स्टोरेज में रखने लायक बन जाता है, चाहे उसकी मेनिफ़ेस्ट वैल्यू कुछ भी हो"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"विंडो के हिसाब से गतिविधियों का साइज़ बदल दें"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"सभी गतिविधियों को मल्टी-विंडो (एक से ज़्यादा ऐप्लिकेशन, एक साथ) के लिए साइज़ बदलने लायक बनाएं, चाहे उनकी मेनिफ़ेस्ट वैल्यू कुछ भी हो."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"फ़्रीफ़ॉर्म विंडो (एक साथ कई विंडो दिखाना) चालू करें"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"फ़्रीफ़ॉर्म विंडो आज़माने की सुविधा चालू करें."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"फ़्रीफ़ॉर्म विंडो वाला लेगसी मोड चालू करें"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"एक्सपेरिमेंट के तौर पर उपलब्ध फ़्रीफ़ॉर्म विंडो वाला लेगसी मोड चालू करें."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"डेस्‍कटॉप बैकअप पासवर्ड"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"डेस्‍कटॉप का पूरा बैकअप फ़िलहाल सुरक्षित नहीं है"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"डेस्कटॉप के पूरे बैक अप का पासवर्ड बदलने या हटाने के लिए टैप करें"</string>
diff --git a/packages/SettingsLib/res/values-hr/strings.xml b/packages/SettingsLib/res/values-hr/strings.xml
index 260e9c2f7b43..f4bb6ea36e54 100644
--- a/packages/SettingsLib/res/values-hr/strings.xml
+++ b/packages/SettingsLib/res/values-hr/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Omogućuje učitavanje slojeva za otklanjanje pogrešaka GPU-a za aplikacije za otklanjanje pogrešaka"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Omogući opširni zapisnik"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Uključite dodatne zapisnike dobavljača pojedinog uređaja u izvješća o programskim pogreškama koja mogu sadržavati privatne podatke, trošiti više baterije i/ili zauzeti više prostora za pohranu."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Onemogući nakon jednog dana"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Opširno bilježenje dobavljača je završilo"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Omogućeno na jedan dan"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Omogući još jedan dan"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Onemogućuje se nakon jednog dana"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Omogućeno na neograničeno vrijeme"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Brzina animacije prozora"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Brzina animacije prijelaza"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Razmjer duljine animatora"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Aplikacije se mogu zapisivati u vanjsku pohranu neovisno o vrijednostima manifesta"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Nametni mogućnost promjene veličine za aktivnosti"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Omogući mijenjanje veličine svih aktivnosti za više prozora, neovisno o vrijednostima manifesta."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Omogući prozore slobodnog oblika"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Omogućuje podršku za eksperimentalne prozore slobodnog oblika."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Omogući prozore slobodnog oblika (naslijeđeno)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Omogući podršku za eksperimentalne naslijeđene prozore slobodnog oblika."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Zaporka sigurnosne kopije"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Potpune sigurnosne kopije na stolnom računalu trenutačno nisu zaštićene"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Dodirnite da biste promijenili ili uklonili zaporku za potpune sigurnosne kopije na računalu"</string>
diff --git a/packages/SettingsLib/res/values-hu/strings.xml b/packages/SettingsLib/res/values-hu/strings.xml
index b16f4a3dc2e3..db739d56c8a3 100644
--- a/packages/SettingsLib/res/values-hu/strings.xml
+++ b/packages/SettingsLib/res/values-hu/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"GPU-hibakeresési rétegek betöltésének engedélyezése"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Részletes szolgáltatói naplózás engedélyezése"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"További eszközspecifikus szolgáltatói naplók felvétele a hibajelentésekbe. Ezek a naplók tartalmazhatnak privát információkat, ezenkívül előfordulhat, hogy jobban merítik az akkumulátort, illetve nagyobb tárhelyet foglalnak el."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Letiltás egy nap után"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"A részletes szolgáltatói naplózás lezárult"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Egy napra engedélyezve"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Engedélyezés még egy napra"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Letilt egy nap után"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Határozatlan időre engedélyezve"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Ablakanimáció tempója"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Áttűnési animáció tempója"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Animáció tempója"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Lehetővé teszi bármely alkalmazás külső tárhelyre való írását a jegyzékértékektől függetlenül"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Tevékenységek átméretezésének kényszerítése"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Legyen az összes tevékenység átméretezhető a többablakos megjelenítés érdekében a jegyzékértékektől függetlenül."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Szabad formájú ablakok engedélyezése"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Kísérleti, szabad formájú ablakok támogatásának engedélyezése."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Szabad formájú ablakok engedélyezése (régi)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Kísérleti, régi szabad formájú ablakok támogatásának engedélyezése."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Asztali mentés jelszava"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Az asztali teljes biztonsági mentések jelenleg nem védettek."</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Koppintson ide az asztali teljes mentések jelszavának módosításához vagy eltávolításához"</string>
diff --git a/packages/SettingsLib/res/values-hy/strings.xml b/packages/SettingsLib/res/values-hy/strings.xml
index bd9e564a27af..717313fbb2bf 100644
--- a/packages/SettingsLib/res/values-hy/strings.xml
+++ b/packages/SettingsLib/res/values-hy/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Թույլատրել GPU վրիպազերծման շերտերի բեռնումը վրիպազերծման հավելվածների համար"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Մատակարարի մանրամասն գրանցամատյան"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Վրիպակների հաշվետվություններում ներառել կոնկրետ սարքի վերաբերյալ մատակարարի լրացուցիչ մատյանները։ Դա կարող է պարունակել խիստ անձնական տեղեկություններ, ավելի արագ սպառել մարտկոցի լիցքը և/կամ ավելի շատ տարածք օգտագործել։"</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Անջատել մեկ օր հետո"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Մատակարարի մանրամասն մատյանի վարումն ավարտված է"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Միացնել մեկ օրով"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Միացնել ևս մեկ օրով"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Կանջատվի մեկ օր հետո"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Միացված է առանց ժամանակային սահմանափակման"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Պատուհանի շարժապատկեր"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Անցումների շարժապատկեր"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Շարժանկարի տևողության սանդղակ"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Թույլ է տալիս ցանկացած հավելված պահել արտաքին սարքում՝ մանիֆեստի արժեքներից անկախ"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Չափերի փոփոխում բազմապատուհան ռեժիմում"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Բոլոր ակտիվությունների չափերը բազմապատուհան ռեժիմի համար դարձնել փոփոխելի՝ մանիֆեստի արժեքներից անկախ:"</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Ակտիվացնել կամայական ձևի պատուհանները"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Միացնել ազատ ձևի փորձնական պատուհանների աջակցումը:"</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Միացնել կամայական ձևի պատուհանները (հնացած)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Միացնել կամայական ձևի պատուհանների ստեղծման հնացած փորձնական գործառույթի աջակցումը:"</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Աշխատասեղանի պահուստավորման գաղտնաբառ"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Աշխատասեղանի ամբողջական պահուստավորումները այժմ պաշտպանված չեն"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Հպեք՝ աշխատասեղանի ամբողջական պահուստավորման գաղտնաբառը փոխելու կամ հեռացնելու համար"</string>
diff --git a/packages/SettingsLib/res/values-in/strings.xml b/packages/SettingsLib/res/values-in/strings.xml
index b3a1291d0fb0..748d5ed4b239 100644
--- a/packages/SettingsLib/res/values-in/strings.xml
+++ b/packages/SettingsLib/res/values-in/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Izinkan lapisan debug GPU dimuat di aplikasi debug"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Aktifkan logging vendor panjang"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Sertakan log vendor tambahan khusus perangkat dalam laporan bug, yang mungkin berisi informasi pribadi. Meningkatkan penggunaan baterai dan/atau ruang penyimpanan."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Nonaktifkan setelah satu hari"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Logging panjang untuk vendor telah berakhir"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Diaktifkan selama satu hari"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Aktifkan selama satu hari lagi"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Dinonaktifkan setelah satu hari"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Diaktifkan tanpa batas waktu"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Skala animasi jendela"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Skala animasi transisi"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Skala durasi animator"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Membuat semua aplikasi dapat ditulis ke penyimpanan eksternal, terlepas dari nilai manifes"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Paksa aktivitas agar ukurannya dapat diubah"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Membuat semua aktivitas dapat diubah ukurannya untuk banyak jendela, terlepas dari nilai manifes."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Aktifkan jendela berformat bebas"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Aktifkan dukungan untuk jendela eksperimental berformat bebas."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Aktifkan jendela freeform (versi lama)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Aktifkan dukungan untuk jendela freeform eksperimental versi lama."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Sandi cadangan desktop"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Saat ini cadangan desktop penuh tidak dilindungi"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Ketuk guna mengubah atau menghapus sandi untuk cadangan lengkap desktop"</string>
diff --git a/packages/SettingsLib/res/values-is/strings.xml b/packages/SettingsLib/res/values-is/strings.xml
index 7712b8aed985..7871cb283bfe 100644
--- a/packages/SettingsLib/res/values-is/strings.xml
+++ b/packages/SettingsLib/res/values-is/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Leyfa villuleit skjákorts fyrir villuleit forrita"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Nákvæm skráning söluaðila"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Taka með viðbótarannála söluaðila fyrir tiltekin tæki í villutilkynningum, sem gætu innihaldið viðkvæmar upplýsingar, notað meiri rafhlöðuorku og/eða þurft meira geymslupláss."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Slökkva eftir einn dag"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Nákvæmri skráningu söluaðila er lokið"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Kveikt í einn dag"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Kveikja eftir einn dag"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Slokknar eftir einn dag"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Kveikt án tímamarka"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Kvarði gluggahreyfinga"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Lengd hreyfiumbreytinga"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Tímalengd hreyfiáhrifa"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Gerir öll forrit skrifanleg í ytra geymslurými, óháð gildum í upplýsingaskrá"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Þvinga breytanlega stærð virkni"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Gera stærð allrar virkni breytanlega svo að hún henti fyrir marga glugga, óháð gildum í upplýsingaskrá."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Virkja glugga með frjálsu sniði"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Virkja stuðning við glugga með frjálsu sniði á tilraunastigi."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Virkja glugga á frjálsu sniði (eldra)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Virkja stuðning við eldri tilraunaglugga á frjálsu sniði."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Aðgangsorð tölvuafritunar"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Heildarafritun á tölvu er ekki varin sem stendur."</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Ýttu til að breyta eða fjarlægja aðgangsorðið fyrir heildarafritun á tölvu"</string>
diff --git a/packages/SettingsLib/res/values-it/strings.xml b/packages/SettingsLib/res/values-it/strings.xml
index a661700e009d..26b67b468e80 100644
--- a/packages/SettingsLib/res/values-it/strings.xml
+++ b/packages/SettingsLib/res/values-it/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Consenti caricamento livelli debug GPU per app di debug"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Attiva log dettagliati fornitori"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Includi log aggiuntivi di fornitori relativi a un dispositivo specifico nelle segnalazioni di bug che potrebbero contenere informazioni private, causare un maggior consumo della batteria e/o utilizzare più spazio di archiviazione"</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Disattiva dopo un giorno"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Log dettagliati fornitori terminati"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Impostazione attivata per un giorno"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Attiva per un altro giorno"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Impostazione disattivata dopo un giorno"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Impostazione attivata a tempo indeterminato"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Scala animazione finestra"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Scala animazione transizione"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Scala durata animatore"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Consente l\'installazione di qualsiasi app su memoria esterna, indipendentemente dai valori manifest"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Imponi formato modificabile alle attività"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Rendi il formato di tutte le attività modificabile per la modalità multi-finestra, indipendentemente dai valori manifest"</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Attiva finestre a forma libera"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Attiva il supporto delle finestre a forma libera sperimentali"</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Attiva finestre a forma libera (legacy)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Attiva il supporto delle finestre a forma libera sperimentali legacy."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Password di backup desktop"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"I backup desktop completi non sono attualmente protetti"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Tocca per modificare o rimuovere la password per i backup desktop completi"</string>
diff --git a/packages/SettingsLib/res/values-iw/strings.xml b/packages/SettingsLib/res/values-iw/strings.xml
index fe674bcab81a..f7c96842f64b 100644
--- a/packages/SettingsLib/res/values-iw/strings.xml
+++ b/packages/SettingsLib/res/values-iw/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"‏טעינת שכבות לניפוי באגים ב-GPU לאפליקציות ניפוי באגים"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"הפעלת רישום ספקים מפורט ביומן"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"הוספת רישומי יומן של יצרנים למכשירים ספציפיים בדוחות על באגים. דוחות אלה עשויים להכיל מידע פרטי, להגביר את צריכת הסוללה ולצרוך נפח אחסון גדול יותר."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"השבתה אחרי יום אחד"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"רישום הספקים המפורט ביומן הסתיים"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"בוצעה הפעלה ליום אחד"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"הפעלה ליום אחד נוסף"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"מתבצעת השבתה אחרי יום אחד"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"בוצעה הפעלה ללא הגבלת זמן"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"קנה מידה לאנימציה של חלון"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"קנה מידה לאנימציית מעבר"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"קנה מידה למשך זמן אנימציה"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"מאפשר כתיבה של כל אפליקציה באחסון חיצוני, ללא התחשבות בערכי המניפסט"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"אילוץ יכולת קביעת גודל של הפעילויות"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"מאפשר יכולת קביעת גודל של כל הפעילויות לריבוי חלונות, ללא התחשבות בערכי המניפסט."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"הפעלת האפשרות לשנות את הגודל והמיקום של החלונות"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"הפעלת תמיכה בתכונה הניסיונית של שינוי הגודל והמיקום של החלונות."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"הפעלת שינוי הגודל והמיקום של החלונות (מדור קודם)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"הפעלת תמיכה בתכונה הניסיונית מדור קודם של שינוי הגודל והמיקום של החלונות."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"סיסמת גיבוי שולחן העבודה"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"גיבויים מלאים בשולחן העבודה אינם מוגנים כעת"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"יש להקיש כדי לשנות או להסיר את הסיסמה לגיבויים מלאים בשולחן העבודה"</string>
diff --git a/packages/SettingsLib/res/values-ja/strings.xml b/packages/SettingsLib/res/values-ja/strings.xml
index f5ee5c4357c6..cafa95d3c66b 100644
--- a/packages/SettingsLib/res/values-ja/strings.xml
+++ b/packages/SettingsLib/res/values-ja/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"デバッグアプリに GPU デバッグレイヤの読み込みを許可"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"ベンダーの詳細なロギングを有効にする"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"バグレポートには、その他のデバイス固有のベンダーログが含まれます。これには、非公開の情報が含まれることがあります。また、バッテリーやストレージの使用量が増えることもあります。"</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"1 日後に無効にする"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"ベンダーの詳細なロギングが終了しました"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"1 日間有効にしました"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"あと 1 日有効にする"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"1 日後に無効にします"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"期限なしで有効にしました"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"ウィンドウ アニメ スケール"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"トランジション アニメ スケール"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Animator 再生時間スケール"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"マニフェストの値に関係なく、すべてのアプリを外部ストレージに書き込めるようになります"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"アクティビティをサイズ変更可能にする"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"マニフェストの値に関係なく、マルチウィンドウですべてのアクティビティのサイズを変更できるようにします。"</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"フリーフォーム ウィンドウを有効にする"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"試験運用機能のフリーフォーム ウィンドウのサポートを有効にします。"</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"フリーフォーム ウィンドウを有効にする(従来版)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"従来の試験運用版のフリーフォーム ウィンドウのサポートを有効にします。"</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"PC バックアップ パスワード"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"デスクトップのフルバックアップは現在保護されていません"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"デスクトップのフルバックアップ用のパスワードを変更または削除する場合にタップします"</string>
diff --git a/packages/SettingsLib/res/values-ka/strings.xml b/packages/SettingsLib/res/values-ka/strings.xml
index 1c5822c466e8..10a660bdc492 100644
--- a/packages/SettingsLib/res/values-ka/strings.xml
+++ b/packages/SettingsLib/res/values-ka/strings.xml
@@ -412,18 +412,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"გასამართი აპებისთვის GPU-ს შეცდომების გამართვის შრეების გაშვების დაშვება"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"ჟურნალებში მომწოდებელთა დაწვრილებითი აღრიცხვის ჩართვა"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"გამყიდველის მოწყობილობისთვის სპეციფიკური დამატებითი ჟურნალები შევიდეს სისტემის ხარვეზის ანგარიშებში, რომლებიც შეიძლება შეიცავდეს პირად ინფორმაციას, ხარჯავდეს ბატარეის მეტ მუხტს და/ან იყენებდეს მეტ მეხსიერებას."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"ერთი დღის შემდეგ გათიშვა"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"მომწოდებელთა დეტალური აღრიცხვა დასრულდა"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"ჩართულია ერთი დღით"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"კიდევ ერთი დღით ჩართვა"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"გაითიშება ერთი დღის შემდეგ"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"ჩართულია განუსაზღვრელი დროით"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"ფანჯარა: მასშტაბი"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"გადასვლის მასშტაბი"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"ანიმაციების ხანგრძლივობის მასშტაბი"</string>
@@ -440,8 +434,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"აპები ჩაიწერება გარე მეხსიერებაზე აღწერის ფაილების მნიშვნელობების მიუხედავად"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"ზომაცვლადი აქტივობების იძულება"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"მანიფესტის მნიშვნელობების მიუხედავად, მრავალი ფანჯრის რეჟიმისთვის ყველა აქტივობის ზომაცვლადად გადაქცევა."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"თავისუფალი ფორმის მქონე ფანჯრების ჩართვა"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"თავისუფალი ფორმის მქონე ფანჯრების მხარდაჭერის ექსპერიმენტული ფუნქციის ჩართვა."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"თავისუფალი ფორმის ფანჯრების ჩართვა (მოძველებული)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"თავისუფალი ფორმის ექსპერიმენტული მოძველებული ფანჯრების ჩართვა."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"დესკტოპის სარეზერვო ასლის პაროლი"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"დესკტოპის სრული სარეზერვო ასლები ამჟამად დაცული არ არის"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"შეეხეთ დესკტოპის სრული სარეზერვო ასლების პაროლის შესაცვლელად ან წასაშლელად"</string>
diff --git a/packages/SettingsLib/res/values-kk/strings.xml b/packages/SettingsLib/res/values-kk/strings.xml
index ef9b0050fa65..536b624badef 100644
--- a/packages/SettingsLib/res/values-kk/strings.xml
+++ b/packages/SettingsLib/res/values-kk/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"GPU түзету қабаттарының жүктелуіне рұқсат ету"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Жеткізуші туралы толық мәліметті тіркеу"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Қате туралы есепте жеткізушінің құрылғыға қатысты қосымша ақпараты қамтылады. Мұнда жеке ақпарат көрсетілуі, батарея шығыны артуы және/немесе қосымша жад пайдаланылуы мүмкін."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Бір күннен кейін өшіру"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Жеткізушінің сөз мөлшерін тіркеуі аяқталды"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Тағы бір күнге қосылды."</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Тағы бір күнге қосу"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Бір күннен кейін өшіріледі."</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Белгісіз уақытқа қосылды."</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Терезе анимациясының өлшемі"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Ауысу анимациясының өлшемі"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Аниматор ұзақтығы"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Манифест мәндеріне қарамастан, кез келген қолданбаны сыртқы жадқа жазуға рұқсат беру"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Әрекеттердің өлшемін өзгертуге рұқсат ету"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Манифест мәндеріне қарамастан, бірнеше терезе режимінде барлық әрекеттердің өлшемін өзгертуге рұқсат беру"</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Еркін пішінді терезелерге рұқсат беру"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Еркін пішінді терезелерді құру эксперименттік функиясын қосу"</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Еркін пішінді терезелерге рұқсат беру (бұрынғы)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Эксперименттік бұрынғы еркін пішінді терезелерді қолдауға рұқсат береді."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Компьютердегі сақтық көшірме құпия сөзі"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Компьютердегі толық сақтық көшірмелер қазір қорғалмаған."</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Үстелдік компьютердің толық сақтық көшірмелерінің кілтсөзін өзгерту немесе жою үшін түртіңіз"</string>
diff --git a/packages/SettingsLib/res/values-km/strings.xml b/packages/SettingsLib/res/values-km/strings.xml
index 199b1141c54a..baef5d87dadf 100644
--- a/packages/SettingsLib/res/values-km/strings.xml
+++ b/packages/SettingsLib/res/values-km/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"អនុញ្ញាតឱ្យ​ផ្ទុក​ស្រទាប់​ជួស​ជុល GPU សម្រាប់​កម្មវិធី​ជួសជុល"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"បើកការកត់ត្រាអ្នកផ្គត់ផ្គង់ឥតសំចៃ"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"រួមបញ្ចូលកំណត់​ហេតុ​អ្នកផ្គត់ផ្គង់​ពាក់ព័ន្ធ​នឹងឧបករណ៍បន្ថែមទៀតនៅក្នុងរបាយការណ៍​អំពីបញ្ហា ដែលអាច​មានផ្ទុកព័ត៌មាន​ឯកជន ប្រើប្រាស់​ថ្មច្រើនជាង និង/ឬប្រើប្រាស់​ទំហំផ្ទុកច្រើនជាង។"</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"បិទក្រោយពេលមួយថ្ងៃ"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"ការចុះកំណត់ហេតុអ្នកផ្គត់ផ្គង់លម្អិតបានចប់"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"បានបើករយៈពេលមួយថ្ងៃ"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"បើករយៈពេលលើសពីមួយថ្ងៃ"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"បិទក្រោយពេលមួយថ្ងៃ"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"បានបើកដោយគ្មានពេលកំណត់"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"មាត្រដ្ឋាន​ចលនា​វិនដូ"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"មាត្រដ្ឋាន​ដំណើរ​ផ្លាស់ប្ដូរ​ចលនា"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"មាត្រដ្ឋាន​រយៈពេល​នៃ​កម្មវិធី​ចលនា"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"ធ្វើឲ្យកម្មវិធីទាំងឡាយមានសិទ្ធិសរសេរទៅកាន់ឧបករណ៍ផ្ទុកខាងក្រៅ ដោយមិនគិតពីតម្លៃមេនីហ្វេសថ៍"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"បង្ខំឲ្យសកម្មភាពអាចប្តូរទំហំបាន"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"ធ្វើឲ្យសកម្មភាពទាំងអស់អាចប្តូរទំហំបានសម្រាប់ពហុវិនដូ ដោយមិនគិតពីតម្លៃមេនីហ្វេសថ៍។"</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"បើកដំណើរការផ្ទាំងវិនដូទម្រង់សេរី"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"បើកឱ្យអាចប្រើផ្ទាំងវិនដូទម្រង់សេរីពិសោធន៍។"</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"បើកវិនដូទម្រង់សេរី (ចាស់)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"បើកជំនួយសម្រាប់វិនដូទម្រង់សេរីចាស់ក្នុងដំណាក់កាលពិសោធន៍។"</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"ពាក្យ​សម្ងាត់​បម្រុង​ទុក​លើកុំព្យូទ័រ"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"បច្ចុប្បន្ន ការ​បម្រុង​ទុក​ពេញលេញនៅលើកុំព្យូទ័រមិន​ត្រូវ​បាន​ការពារ​ទេ"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"ប៉ះដើម្បីប្ដូរ ឬយកពាក្យសម្ងាត់ចេញសម្រាប់ការបម្រុងទុកពេញលេញលើកុំព្យូទ័រ"</string>
diff --git a/packages/SettingsLib/res/values-kn/strings.xml b/packages/SettingsLib/res/values-kn/strings.xml
index 6ff80d80279d..a203ea785e12 100644
--- a/packages/SettingsLib/res/values-kn/strings.xml
+++ b/packages/SettingsLib/res/values-kn/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"ಡೀಬಗ್ ಅಪ್ಲಿಕೇಶನ್‌ಗಳಿಗಾಗಿ GPU ಡೀಬಗ್ ಲೇಯರ್‌ಗಳನ್ನು ಲೋಡ್ ಮಾಡುವುದನ್ನು ಅನುಮತಿಸಿ"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"ವರ್‌ಬೋಸ್ ವೆಂಡರ್ ಲಾಗಿಂಗ್‌ ಸಕ್ರಿಯಗೊಳಿಸಿ"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"ಬಗ್ ವರದಿಗಳಲ್ಲಿ ಹೆಚ್ಚುವರಿ ಸಾಧನ ನಿರ್ದಿಷ್ಟ ವೆಂಡರ್ ಲಾಗ್‌ಗಳು ಒಳಗೊಂಡಿದೆ, ಇದು ಖಾಸಗಿ ಮಾಹಿತಿ, ಹೆಚ್ಚಿನ ಬ್ಯಾಟರಿ ಬಳಕೆ ಮತ್ತು/ಅಥವಾ ಹೆಚ್ಚಿನ ಸಂಗ್ರಹಣೆಯ ಬಳಕೆಯನ್ನು ಒಳಗೊಂಡಿರಬಹುದು."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"ಒಂದು ದಿನದ ನಂತರ ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಿ"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"ಶಬ್ದ ಬಾಹುಳ್ಯ ಲಾಗಿಂಗ್ ಕೊನೆಗೊಂಡಿದೆ"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"ಒಂದು ದಿನಕ್ಕೆ ಸಕ್ರಿಯಗೊಳಿಸಲಾಗಿದೆ"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"ಇನ್ನೂ ಒಂದು ದಿನದವರೆಗೆ ಸಕ್ರಿಯಗೊಳಿಸಿ"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"ಒಂದು ದಿನದ ನಂತರ ನಿಷ್ಕ್ರಿಯಗೊಳ್ಳುತ್ತದೆ"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"ಅನಿರ್ದಿಷ್ಟವಾಗಿ ಸಕ್ರಿಯಗೊಳಿಸಲಾಗಿದೆ"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Window ಅನಿಮೇಶನ್ ಸ್ಕೇಲ್‌"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"ಪರಿವರ್ತನೆ ಅನಿಮೇಶನ್ ಸ್ಕೇಲ್‌"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"ಅನಿಮೇಟರ್ ಅವಧಿಯ ಪ್ರಮಾಣ"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"ಮ್ಯಾನಿಫೆಸ್ಟ್ ಮೌಲ್ಯಗಳು ಯಾವುದೇ ಆಗಿದ್ದರೂ, ಬಾಹ್ಯ ಸಂಗ್ರಹಣೆಗೆ ಬರೆಯಲು ಯಾವುದೇ ಅಪ್ಲಿಕೇಶನ್‌ ಅನ್ನು ಅರ್ಹಗೊಳಿಸುತ್ತದೆ"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"ಚಟುವಟಿಕೆಗಳನ್ನು ಮರುಗಾತ್ರಗೊಳಿಸುವಂತೆ ಒತ್ತಾಯ ಮಾಡಿ"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"ಮ್ಯಾನಿಫೆಸ್ಟ್ ಮೌಲ್ಯಗಳನ್ನು ಪರಿಗಣಿಸದೇ, ಬಹು-ವಿಂಡೊಗೆ ಎಲ್ಲಾ ಚಟುವಟಿಕೆಗಳನ್ನು ಮರುಗಾತ್ರಗೊಳಿಸುವಂತೆ ಮಾಡಿ."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"ಮುಕ್ತಸ್ವರೂಪದ ವಿಂಡೊಗಳನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಿ"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"ಪ್ರಾಯೋಗಿಕ ಫ್ರೀಫಾರ್ಮ್ ವಿಂಡೊಗಳಿಗೆ ಬೆಂಬಲವನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಿ."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"ಫ್ರೀಫಾರ್ಮ್ ವಿಂಡೋಗಳನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಿ (ಲೆಗಸಿ)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"ಪ್ರಾಯೋಗಿಕ ಲೆಗಸಿ ಫ್ರೀಫಾರ್ಮ್ ವಿಂಡೋಗಳಿಗೆ ಬೆಂಬಲವನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಿ."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"ಡೆಸ್ಕ್‌ಟಾಪ್ ಬ್ಯಾಕಪ್ ಪಾಸ್‌ವರ್ಡ್"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"ಡೆಸ್ಕ್‌ಟಾಪ್‌‌ ಪೂರ್ಣ ಬ್ಯಾಕಪ್‌‌ಗಳನ್ನು ಪ್ರಸ್ತುತ ರಕ್ಷಿಸಲಾಗಿಲ್ಲ"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"ಡೆಸ್ಕ್‌ಟಾಪ್‌ನ ಪೂರ್ಣ ಬ್ಯಾಕಪ್‌ಗಳಿಗೆ ಪಾಸ್‌ವರ್ಡ್‌ ಬದಲಾಯಿಸಲು ಅಥವಾ ತೆಗೆದುಹಾಕಲು ಟ್ಯಾಪ್ ಮಾಡಿ"</string>
diff --git a/packages/SettingsLib/res/values-ko/strings.xml b/packages/SettingsLib/res/values-ko/strings.xml
index af5f9d4c5230..67f1ecdb8e85 100644
--- a/packages/SettingsLib/res/values-ko/strings.xml
+++ b/packages/SettingsLib/res/values-ko/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"디버그 앱에 GPU 디버그 레이어 로드 허용"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"상세 공급업체 로깅 사용 설정"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"버그 신고에 추가적인 기기별 공급업체 로그를 포함합니다. 여기에는 개인정보가 포함될 수 있으며, 배터리 또는 저장공간 사용량이 늘어날 수 있습니다."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"1일 후 사용 중지"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"상세 공급업체 로깅 종료됨"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"1일간 사용 설정됨"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"1일 더 사용 설정"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"1일 후 사용 중지"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"무기한 사용 설정됨"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"창 애니메이션 배율"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"전환 애니메이션 배율"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Animator 길이 배율"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"매니페스트 값과 관계없이 모든 앱이 외부 저장소에 작성되도록 허용"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"활동의 크기가 조정 가능하도록 설정"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"모든 활동을 매니페스트 값에 관계없이 멀티 윈도우용으로 크기 조정 가능하도록 설정"</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"자유 형식 창 사용"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"자유 형식 창 지원 사용"</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"자유 형식 창 사용(레거시)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"실험적인 레거시 자유 형식 창에 대한 지원을 사용하도록 설정합니다."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"데스크톱 백업 비밀번호"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"데스크톱 전체 백업에 비밀번호가 설정되어 있지 않음"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"데스크톱 전체 백업에 대한 비밀번호를 변경하거나 삭제하려면 탭하세요."</string>
diff --git a/packages/SettingsLib/res/values-ky/strings.xml b/packages/SettingsLib/res/values-ky/strings.xml
index 1d3f44ade109..73532645873a 100644
--- a/packages/SettingsLib/res/values-ky/strings.xml
+++ b/packages/SettingsLib/res/values-ky/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"GPU мүчүлүштүктөрдү оңдоо катмарларын иштетет"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Кызмат көрсөтүүчүнүн журналы"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Кызмат көрсөтүүчүнүн түзмөккө байланыштуу кошумча жазуулары мүчүлүштүк тууралуу кабарларга кошулат. Анда купуя маалымат камтылып, батарея тезирээк отуруп жана/же сактагычтан көбүрөөк орун ээлеши мүмкүн."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Бир күндөн кийин өчүрүү"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Кепти дааналатуучунун журналынын аягына чыкты"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Бир күнгө иштетилди"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Дагы бир күнгө иштетүү"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Бир күндөн кийин өчүрүлөт"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Белгисиз убакытка иштетилди"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Терезелердин анимациясы"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Өткөрүү анимацснн шкаласы"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Анимациянын узактыгы"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Манифест маанилерине карабастан бардык колдонмолорду тышкы сактагычка сактоого уруксат берет"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Бир нече терезе режиминде өлчөмдү өзгөртүү"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Бир нече терезе режиминде өлчөмдү өзгөртүүгө уруксат берет (манифесттин маанилерине карабастан)"</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Эркин формадагы терезелерди түзүүнү иштетүү"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Эркин формадагы терезелерди түзүү боюнча сынамык функциясы иштетилет."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Эркин формадагы терезелерди түзүүнү иштетүү (эски)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Эркин формадагы эски терезелерди түзүү боюнча сынамык функциясы иштетилет."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Камдык көчүрмөнүн сырсөзү"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Толук камдык көчүрмөлөр учурда корголгон эмес"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Иш тактасынын камдалган сырсөзүн өзгөртүү же алып салуу үчүн таптап коюңуз"</string>
diff --git a/packages/SettingsLib/res/values-lo/strings.xml b/packages/SettingsLib/res/values-lo/strings.xml
index d99759b625b6..3680e8d13b1f 100644
--- a/packages/SettingsLib/res/values-lo/strings.xml
+++ b/packages/SettingsLib/res/values-lo/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"ອະນຸຍາດການໂຫລດຊັ້ນຂໍ້ມູນດີບັກ GPU ສຳລັບແອັບດີບັກ"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"ເປີດໃຊ້ການບັນທຶກຜູ້ຂາຍແບບລະອຽດ"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"ຮວມທັງການລາຍງານຂໍ້ຜິດພາດການເຂົ້າສູ່ລະບົບຂອງຜູ້ຂາຍສະເພາະອຸປະກອນເພີ່ມເຕີມ, ເຊິ່ງອາດມີຂໍ້ມູນສ່ວນຕົວ, ໃຊ້ແບັດເຕີຣີຫຼາຍຂຶ້ນ ແລະ/ຫຼື ໃຊ້ບ່ອນຈັດເກັບຂໍ້ມູນເພີ່ມເຕີມ."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"ປິດການນຳໃຊ້ຫຼັງຈາກ 1 ມື້"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"ການບັນທຶກຜູ້ຂາຍແບບລະອຽດສິ້ນສຸດແລ້ວ"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"ເປີດການນຳໃຊ້ອີກ 1 ມື້ແລ້ວ"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"ເປີດການນຳໃຊ້ອີກ 1 ມື້"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"ປິດການນຳໃຊ້ຫຼັງຈາກ 1 ມື້"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"ເປີດການນຳໃຊ້ແບບບໍ່ມີກຳນົດສິ້ນສຸດແລ້ວ"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"ຂະໜາດໜ້າ​ຈໍ​ຂອງອະນິເມຊັນ"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"ຂະໜາດສະຫຼັບອະນິເມຊັນ"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"ໄລຍະເວລາອະນິເມຊັນ"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"ເຮັດໃຫ້ທຸກແອັບມີສິດໄດ້ຮັບການຂຽນໃສ່ພື້ນທີ່ຈັດເກັບຂໍ້ມູນພາຍນອກ, ໂດຍບໍ່ຄຳນຶງເຖິງຄ່າ manifest"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"ບັງ​ຄັງ​ໃຫ້​ການ​ເຄື່ອນ​ໄຫວ​ປ່ຽນ​ຂະ​ໜາດ​ໄດ້"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"ເຮັດໃຫ້ທຸກການ​ເຄື່ອນ​ໄຫວສາມາດປັບຂະໜາດໄດ້ສຳລັບຫຼາຍໜ້າຈໍ, ໂດຍບໍ່ຄຳນຶງເຖິງຄ່າ manifest."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"ເປີດໃຊ້ໜ້າຈໍຮູບແບບອິດສະຫຼະ"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"ເປີດໃຊ້ການຮອງຮັບໜ້າຈໍຮູບແບບອິດສະຫຼະແບບທົດລອງ."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"ເປີດການນຳໃຊ້ໜ້າຈໍຮູບແບບອິດສະຫຼະ (ແບບເກົ່າ)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"ເປີດການນຳໃຊ້ການຮອງຮັບໜ້າຈໍຮູບແບບອິດສະຫຼະແບບເກົ່າເວີຊັນທົດລອງ."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"ລະຫັດຜ່ານການສຳຮອງຂໍ້ມູນເດັສທັອບ"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"ການ​ສຳຮອງ​ຂໍ້ມູນ​ເຕັມຮູບແບບ​ໃນ​ເດັສທັອບ​ຍັງ​ບໍ່​ໄດ້​ຮັບ​ການ​ປ້ອງກັນ​ໃນ​ເວລາ​ນີ້"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"ແຕະເພື່ອປ່ຽນ ຫຼື ລຶບລະຫັດຂອງການສຳຮອງຂໍ້ມູນເຕັມຮູບແບບໃນເດັສທັອບ"</string>
diff --git a/packages/SettingsLib/res/values-lt/strings.xml b/packages/SettingsLib/res/values-lt/strings.xml
index 204afc72d0e2..4f0d6b082479 100644
--- a/packages/SettingsLib/res/values-lt/strings.xml
+++ b/packages/SettingsLib/res/values-lt/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Leisti įkelti graf. proc. der. sluoks. der. progr."</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Įg. daugiaž. pasl. teik. reg."</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Į pranešimus apie riktą įtraukiami papildomi konkretaus įrenginio paslaugų teikėjo žurnalai, kuriuose gali būti privačios informacijos, kurie gali naudoti daugiau akumuliatoriaus energijos ir (arba) daugiau vietos saugykloje."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Išjungti po vienos dienos"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Išsamus paslaugų teikėjo registravimas žurnale baigtas"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Įgalinta vienai dienai"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Įgalinti dar vienai dienai"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Bus išjungta po vienos dienos"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Įgalinta neribotam laikui"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Lango animacijos mast."</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Animuoto perėjimo mast."</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Animator. trukmės skalė"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Nustatoma, kad visas programas būtų galima įrašyti į išorinę saugyklą, nepaisant aprašo verčių"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Priv. nust., kad veiksm. b. g. atl. kelių d. lang."</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Nustatyti, kad visus veiksmus būtų galima atlikti kelių dydžių languose, nepaisant aprašo verčių."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Įgalinti laisvos formos langus"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Įgalinti eksperimentinių laisvos formos langų palaikymą."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Įgalinti laisvos formos langus (pasenę)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Įgalinti eksperimentinių pasenusių laisvos formos langų palaikymą."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Viet. atsrg. kop. slapt."</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Šiuo metu visos vietinės atsarginės kopijos neapsaugotos"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Jei norite pakeisti ar pašalinti visų stalinio kompiuterio atsarginių kopijų slaptažodį, palieskite"</string>
diff --git a/packages/SettingsLib/res/values-lv/strings.xml b/packages/SettingsLib/res/values-lv/strings.xml
index 71d11d562a62..e571b84ae681 100644
--- a/packages/SettingsLib/res/values-lv/strings.xml
+++ b/packages/SettingsLib/res/values-lv/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Atļaut GPU atkļūd. slāņu ielādi atkļūd. lietotnēm"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Iespējot izvērsto reģistrēšanu"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Iekļaut kļūdu pārskatos konkrētas ierīces papildu nodrošinātāju žurnālus (var iekļaut privātu informāciju, patērēt vairāk akumulatora enerģijas un/vai aizņemt vairāk vietas krātuvē)."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Atspējot pēc vienas dienas"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Detalizētā nodrošinātāju reģistrēšana ir beigusies"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Iespējota uz vienu dienu"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Iespējot uz vēl vienu dienu"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Tiek atspējota pēc vienas dienas"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Iespējota uz nenoteiktu laiku"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Loga animācijas mērogs"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Pārejas animācijas mērogs"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Animācijas ilguma mērogs"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Ļauj jebkuru lietotni ierakstīt ārējā krātuvē neatkarīgi no manifesta vērtības."</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Pielāgot darbības"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Pielāgot visas darbības vairāku logu režīmam neatkarīgi no vērtībām manifestā."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Iespējot brīvās formas logus"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Iespējot eksperimentālo brīvās formas logu atbalstu."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Iespējot brīvās formas logus (mantots režīms)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Iespējot atbalstu eksperimentālajam, mantotajam brīvās formas logu režīmam."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Datora dublējuma parole"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Darbvirsmas pilnie dublējumi pašlaik nav aizsargāti."</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Pieskarieties, lai mainītu vai noņemtu paroli pilniem datora dublējumiem."</string>
diff --git a/packages/SettingsLib/res/values-mk/strings.xml b/packages/SettingsLib/res/values-mk/strings.xml
index 537f8b55a330..ab30556856b7 100644
--- a/packages/SettingsLib/res/values-mk/strings.xml
+++ b/packages/SettingsLib/res/values-mk/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Дозволи вчитување GPU-слоеви за отстранув. грешки"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Опширна евиденција на продавачи"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Вклучува дополнителна евиденција на продавачи во извештаите за грешки за конкретен уред, којашто може да содржи приватни податоци, повеќе да ја користи батеријата и/или да користи повеќе капацитет."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Оневозможи по еден ден"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Опширната евиденција на продавачи заврши"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Овозможено за еден ден"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Овозможи за уште еден ден"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Се оневозможува по еден ден"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Овозможено на неодредено време"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Брзина на анимации за прозорци"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Брзина на преодни анимации"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Брзина на општи анимации"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Сите апликации ќе бидат подобни за запишување во надворешната меморија, независно од вредностите на манифестот"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Наметни променлива големина на активностите"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Сите активности ќе имаат променлива големина во режимот со повеќе прозорци, независно од вредностите на манифестот."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Овозможи прозорци со слободна форма"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Овозможи поддршка за експериментални прозорци со слободна форма."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Овозможи прозорци со менлива големина (застарено)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Овозможете поддршка за експериментални застарени прозорци со менлива големина."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Лозинка за бекап на компјутер"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Целосниот бекап на компјутерот во моментов не е заштитен"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Допрете за да се промени или отстрани лозинката за целосен бекап на компјутерот"</string>
diff --git a/packages/SettingsLib/res/values-ml/strings.xml b/packages/SettingsLib/res/values-ml/strings.xml
index c096260cf70a..d19069157b45 100644
--- a/packages/SettingsLib/res/values-ml/strings.xml
+++ b/packages/SettingsLib/res/values-ml/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"ഡീബഗ് ആപ്പുകൾക്കായി GPU ഡീബഗ് ലെയറുകൾ ലോഡ് ചെയ്യാൻ അനുവദിക്കുക"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"വെർബോസ് വെണ്ടർ ലോഗ് ചെയ്യൽ പ്രവർത്തനക്ഷമമാക്കൂ"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"ബഗ് റിപ്പോർട്ടുകളിൽ ഉപകരണ-നിർദ്ദിഷ്ട വെണ്ടർ അധിക ലോഗുകൾ ഉൾപ്പെടുത്തുക, അതിൽ സ്വകാര്യ വിവരങ്ങൾ അടങ്ങിയിരിക്കാം, കൂടുതൽ ബാറ്ററി ഉപയോഗിക്കാം കൂടാതെ/അല്ലെങ്കിൽ കൂടുതൽ സ്‌റ്റോറേജ് ഇടം ഉപയോഗിക്കാം."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"ഒരു ദിവസത്തിന് ശേഷം പ്രവർത്തനരഹിതമാക്കുക"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"വെർബോസ് വെണ്ടർ ലോഗിംഗ് അവസാനിച്ചു"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"ഒരു ദിവസത്തേക്ക് പ്രവർത്തനക്ഷമമാക്കി"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"ഒരു ദിവസത്തേക്ക് കൂടി പ്രവർത്തനക്ഷമമാക്കുക"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"ഒരു ദിവസത്തിന് ശേഷം പ്രവർത്തനരഹിതമാക്കും"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"അനിശ്ചിതകാലത്തേക്ക് പ്രവർത്തനക്ഷമമാക്കി"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"വിൻഡോ ആനിമേഷൻ സ്‌കെയിൽ"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"ട്രാൻസിഷൻ ആനിമേഷൻ സ്‌കെയിൽ"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"ആനിമേറ്റർ ദൈർഘ്യ സ്‌കെയിൽ"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"മാനിഫെസ്റ്റ് മൂല്യങ്ങൾ പരിഗണിക്കാതെ, ബാഹ്യ സ്റ്റോറേജിലേക്ക് എഴുതപ്പെടുന്നതിന് ഏതൊരു ആപ്പിനെയും യോഗ്യമാക്കുന്നു"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"വലുപ്പം മാറ്റാൻ പ്രവർത്തനങ്ങളെ നിർബന്ധിക്കുക"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"മാനിഫെസ്റ്റ് മൂല്യങ്ങൾ പരിഗണിക്കാതെ, എല്ലാ ആക്ടിവിറ്റികളെയും മൾട്ടി-വിൻഡോയ്ക്കായി വലുപ്പം മാറ്റുക."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"ഫ്രീഫോം വിൻഡോകൾ പ്രവർത്തനക്ഷമമാക്കുക"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"പരീക്ഷണാത്മക ഫ്രീഫോം വിൻഡോകൾക്കുള്ള പിന്തുണ പ്രവർത്തനക്ഷമമാക്കുക."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"ഫ്രീഫോം വിൻഡോകൾ പ്രവർത്തനക്ഷമമാക്കുക (ലെഗസി)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"പരീക്ഷണാത്മക ലെഗസി ഫ്രീഫോം വിൻഡോകൾക്കുള്ള പിന്തുണ പ്രവർത്തനക്ഷമമാക്കുക."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"ഡെ‌സ്‌ക്ടോപ്പ് ബാക്കപ്പ് പാസ്‌വേഡ്"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"ഡെസ്‌ക്‌ടോപ്പ് പൂർണ്ണ ബാക്കപ്പുകൾ നിലവിൽ പരിരക്ഷിച്ചിട്ടില്ല"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"ഡെസ്‌ക്‌ടോപ്പ് പൂർണ്ണ ബാക്കപ്പുകൾക്കായി പാസ്‌വേഡുകൾ മാറ്റാനോ നീക്കംചെയ്യാനോ ടാപ്പുചെയ്യുക"</string>
diff --git a/packages/SettingsLib/res/values-mn/strings.xml b/packages/SettingsLib/res/values-mn/strings.xml
index b3bca99253c0..c0a79392e0f3 100644
--- a/packages/SettingsLib/res/values-mn/strings.xml
+++ b/packages/SettingsLib/res/values-mn/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Дебаг хийх аппад GPU дебаг хийх давхарга ачаалахыг зөвшөөрөх"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Нийлүүлэгчийн дэлгэрэнгүй логийг идэвхжүүлэх"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Төхөөрөмжийн тодорхойлсон нийлүүлэгчийн нэвтрэх үеийн алдааны нэмэлт мэдээг оруулах бөгөөд энэ нь хувийн мэдээлэл агуулж, батарейг илүү ашиглах болон/эсвэл хадгалах сан илүү ашиглаж болзошгүй."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Нэг хоногийн дараа идэвхгүй болгох"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Нийлүүлэгчийн нуршсан дэлгэрэнгүй байдлын лог дууссан"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Нэг хоногийн турш идэвхжүүлсэн"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Дахин нэг хоногийн турш идэвхжүүлэх"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Нэг хоногийн дараа идэвхгүй болгоно"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Тодорхойгүй хугацаанд идэвхжүүлсэн"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Цонхны анимацийн масштаб"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Шилжилтийн анимацийн масштаб"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Анимацийн хугацааны масштаб"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Манифест утгыг нь үл хамааран дурын апп-г гадаад санах ойд бичих боломжтой болгодог"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Үйл ажиллагааны хэмжээг өөрчилж болохуйц болгох"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Тодорхойлогч файлын утгыг үл хамааран, бүх үйл ажиллагааны хэмжээг олон цонхонд өөрчилж болохуйц болгоно уу."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Чөлөөт хэлбэрийн цонхыг идэвхжүүлэх"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Туршилтын чөлөөт хэлбэрийн цонхны дэмжлэгийг идэвхжүүлнэ үү."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Чөлөөт хэлбэрийн цонхыг идэвхжүүлэх (уламжлалт)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Туршилтын чөлөөт хэлбэрийн уламжлалт цонхны дэмжлэгийг идэвхжүүлнэ үү."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Компьютерын нөөцлөлтийн нууц үг"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Компьютерын бүрэн нөөцлөлт одоогоор хамгаалалтгүй байна"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Компьютерийн бүтэн нөөцлөлтийн нууц үгийг өөрчлөх, устгах бол дарна уу"</string>
diff --git a/packages/SettingsLib/res/values-mr/strings.xml b/packages/SettingsLib/res/values-mr/strings.xml
index f6467fa740ad..4842a9925170 100644
--- a/packages/SettingsLib/res/values-mr/strings.xml
+++ b/packages/SettingsLib/res/values-mr/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"डीबग अ‍ॅप्ससाठी GPU डीबग स्तर लोड करण्याची अनुमती द्या"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"व्हर्बोझ विक्रेता लॉगिंग सुरू करा"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"बग रिपोर्टमध्ये अतिरिक्त डिव्हाइस-विशिष्ट विक्रेता लॉगचा समावेश करा ज्यामध्ये खाजगी माहिती असू शकते, अधिक बॅटरी आणि/किंवा अधिक स्टोरेज वापरले जाईल."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"एका दिवसानंतर बंद करा"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"व्हर्बाेस विक्रेता लॉगिंग संपले आहे"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"एका दिवसासाठी सुरू केले आहे"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"आणखी एका दिवसासाठी सुरू करा"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"एका दिवसानंतर बंद करते"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"अनिश्‍चितपणे सुरू केले आहे"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"विंडो ॲनिमेशन स्केल"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"ट्रांझिशन ॲनिमेशन स्केल"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"ॲनिमेटर कालावधी स्केल"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"मॅनिफेस्‍ट मूल्ये काहीही असू देत, कोणत्याही अ‍ॅपला बाह्य स्टोरेजवर राइट करण्यासाठी पात्र बनविते"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"ॲक्टिव्हिटीचा आकार बदलण्यायोग्य होण्याची सक्ती करा"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"मॅनिफेस्‍ट मूल्ये काहीही असू देत, एकाहून अधिक विंडोसाठी सर्व अ‍ॅक्टिव्हिटीचा आकार बदलण्यायोग्य करा."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"freeform windows सुरू करा"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"प्रायोगिक freeform windows साठी सपोर्ट सुरू करा."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"फ्रीफॉर्म विंडो सुरू करा (लेगसी)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"प्रायोगिक लेगसी फ्रीफॉर्म विंडोसाठी सपोर्ट सुरू करा."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"डेस्कटॉप बॅकअप पासवर्ड"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"डेस्कटॉप पूर्ण बॅक अप सध्या संरक्षित नाहीत"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"डेस्कटॉपच्या पूर्ण बॅकअपसाठी असलेला पासवर्ड बदलण्यासाठी किंवा काढण्यासाठी टॅप करा"</string>
diff --git a/packages/SettingsLib/res/values-ms/strings.xml b/packages/SettingsLib/res/values-ms/strings.xml
index 3301b5472673..01d640998744 100644
--- a/packages/SettingsLib/res/values-ms/strings.xml
+++ b/packages/SettingsLib/res/values-ms/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Benarkan pemuatan lapisan nyahpepijat GPU untuk apl penyahpepijatan"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Dayakan pengelogan vendor berjela"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Sertakan log tambahan vendor khusus peranti dalam laporan pepijat, yang mungkin mengandungi maklumat peribadi, menggunakan lebih banyak kuasa bateri dan/atau menggunakan lebih banyak storan."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Lumpuhkan selepas satu hari"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Pengelogan vendor berjela telah tamat"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Didayakan untuk satu hari"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Dayakan untuk satu hari lagi"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Dilumpuhkan selepas satu hari"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Didayakan selama-lamanya"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Skala animasi tetingkap"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Skala animasi peralihan"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Skala tempoh juruanimasi"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Menjadikan sebarang apl layak ditulis ke storan luaran, tanpa mengambil kira nilai manifes"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Paksa aktiviti supaya boleh diubah saiz"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Bolehkan semua saiz aktiviti diubah untuk berbilang tetingkap, tanpa mengambil kira nilai manifes."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Dayakan tetingkap bentuk bebas"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Dayakan sokongan untuk tetingkap bentuk bebas percubaan."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Dayakan tetingkap bentuk bebas (lama)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Dayakan sokongan untuk tetingkap bentuk bebas lama yang bersifat percubaan."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Kata laluan sandaran desktop"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Sandaran penuh desktop tidak dilindungi pada masa ini"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Ketik untuk menukar atau mengalih keluar kata laluan untuk sandaran penuh desktop"</string>
diff --git a/packages/SettingsLib/res/values-my/strings.xml b/packages/SettingsLib/res/values-my/strings.xml
index 79f1bc3ddd82..92b630dc3422 100644
--- a/packages/SettingsLib/res/values-my/strings.xml
+++ b/packages/SettingsLib/res/values-my/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"အမှားရှာအက်ပ်များအတွက် GPU အမှားရှာအလွှာများ ဖွင့်ခွင့်ပြုသည်"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"အကျယ်ရှင်းလင်းချက်ပံ့ပိုးသူ မှတ်တမ်းဖွင့်ရန်"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"ချွတ်ယွင်းမှု အစီရင်ခံချက်တွင် စက်ပစ္စည်းအလိုက် ထုတ်လုပ်သူမှတ်တမ်းများကို ထည့်သွင်းခြင်းဖြင့် ကိုယ်ရေးကိုယ်တာ အချက်အလက်များ ပါဝင်ခြင်း၊ ဘက်ထရီပိုသုံးခြင်း နှင့်/သို့မဟုတ် သိုလှောင်ခန်းပိုသုံးခြင်းတို့ ဖြစ်စေနိုင်သည်။"</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"တစ်ရက်ကြာပြီးနောက် ပိတ်ရန်"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"အကျယ်ချဲ့ရှင်းပြသည့် ထုတ်လုပ်သူမှတ်တမ်း ပြီးသွားပါပြီ"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"တစ်ရက်စာ ဖွင့်ထားသည်"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"နောက်ထပ်တစ်ရက် ဖွင့်ရန်"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"တစ်ရက်ကြာပြီးနောက် ပိတ်မည်"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"အကန့်အသတ်မရှိ ဖွင့်ထားသည်"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"လှုပ်ရှားသက်ဝင်ပုံစကေး"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"သက်ဝင်အသွင်ပြောင်းခြင်း"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"လှုပ်ရှားမှုကြာချိန်စကေး"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"သတ်မှတ်တန်ဖိုးများ မည်သို့ပင်ရှိစေ ပြင်ပသိုလှောင်ခန်းများသို့ မည်သည့်အက်ပ်ကိုမဆို ဝင်ရောက်ခွင့်ပြုသည်"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"လုပ်ဆောင်ချက်များ အရွယ်ပြောင်းနိုင်ခြင်း"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"သတ်မှတ်တန်ဖိုး မည်သို့ပင်ရှိစေ ဝင်းဒိုးများ၏ လုပ်ဆောင်မှုအားလုံးကို အရွယ်အစားပြင်သည်။"</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"ပုံစံမျိုးစုံ ဝင်းဒိုးများ ဖွင့်ရန်"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"ပုံစံမျိုးစုံဝင်းဒိုးများ စမ်းသပ်ခြင်းအတွက် ပံ့ပိုးမှုကို ဖွင့်သည်"</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"အလွတ်ပုံစံ ဝင်းဒိုးများ ဖွင့်ပါ (အဟောင်း)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"အလွတ်ပုံစံဝင်းဒိုးအဟောင်းများ စမ်းသပ်ရန် ပံ့ပိုးမှုရယူပါ။"</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"ဒက်စ်တော့ အရန်စကားဝှက်"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"ဒက်စ်တော့ တစ်ခုလုံး အရန်သိမ်းဆည်းခြင်းကို လက်ရှိတွင် ကာကွယ်မထားပါ"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"ဒက်စ်တော့ အပြည့်အဝ အရန်သိမ်းခြင်းအတွက် စကားဝှက်ကို ပြောင်းရန် သို့မဟုတ် ဖယ်ရှားရန် တို့ပါ။"</string>
diff --git a/packages/SettingsLib/res/values-nb/strings.xml b/packages/SettingsLib/res/values-nb/strings.xml
index 23031c37dbf3..75b04ad04bf1 100644
--- a/packages/SettingsLib/res/values-nb/strings.xml
+++ b/packages/SettingsLib/res/values-nb/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Tillat GPU-feilsøkingslag for feilsøkingsapper"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Detaljert leverandørlogging"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Inkluder flere enhetsspesifikke leverandørlogger i feilrapporter, som kan inneholde privat informasjon, bruke mer batteri og/eller bruke mer lagringsplass."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Deaktiver etter én dag"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Detaljert leverandørloggføring er avsluttet"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Aktivert i én dag"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Aktiver i én dag til"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Deaktiveres etter én dag"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Aktivert på ubestemt tid"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Animasjonsskala for vindu"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Animasjonsskala for overgang"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Varighetsskala for animasjoner"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Dette gjør at alle apper kan lagres på eksterne lagringsmedier – uavhengig av manifestverdier"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Alle aktiviteter kan endre størrelse"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Gjør at alle aktiviteter kan endre størrelse for flervindusmodus, uavhengig av manifestverdier."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Slå på vinduer i fritt format"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Slå på støtte for vinduer i eksperimentelt fritt format."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Slå på vinduer i fritt format (eldre versjon)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Slå på støtte for eldre versjon av vinduer i eksperimentelt fritt format."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Passord for sikkerhetskopiering på datamaskin"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Fullstendig sikkerhetskopiering på datamaskin er ikke beskyttet"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Trykk for å endre eller fjerne passordet for fullstendige sikkerhetskopier på datamaskinen"</string>
diff --git a/packages/SettingsLib/res/values-ne/strings.xml b/packages/SettingsLib/res/values-ne/strings.xml
index 38e137d28767..b25285486985 100644
--- a/packages/SettingsLib/res/values-ne/strings.xml
+++ b/packages/SettingsLib/res/values-ne/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"डिबग एपका लागि GPU का डिबग लेयर लोड गर्नुहोस्"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"भर्बोज भेन्डर लगिङ अन गर्नुहोस्"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"बग रिपोर्टहरूमा डिभाइस विशेषका विक्रेताका अतिरिक्त लगहरू समावेश गर्नुहोस्। यी लगमा निजी जानकारी समावेश हुन सक्छन्, यिनले ब्याट्रीको खपत बढाउन र/वा थप भण्डारण प्रयोग गर्न सक्छन्।"</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"एक दिनपछि अफ गर्नुहोस्"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Verbose भेन्डर लगिङ अन्त्य भएको छ"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"एक दिनका लागि अन गरियो"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"थप एक दिनका लागि अन गर्नुहोस्"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"एक दिनपछि अफ हुन्छ"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"अनिश्चितकालीन रूपमा अन गरियो"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"विन्डो एनिमेसन स्केल"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"संक्रमण एनिमेसन स्केल"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"एनिमेसनको अवधि मापन"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"तोकिएको नियमको ख्याल नगरी एपलाई बाह्य भण्डारणमा चल्ने बनाउनुहोस्"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"बलपूर्वक एपहरूको आकार मिलाउन मिल्ने बनाउनुहोस्"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"तोकिएको नियमको ख्याल नगरी एपलाई एकभन्दा बढी विन्डोमा रिसाइज गर्न सकिने बनाउनुहोस्।"</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"फ्रिफर्म विन्डोहरू अन गर्नुहोस्"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"प्रयोगात्मक फ्रिफर्म विन्डोहरू चल्ने बनाउनुहोस्"</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"फ्रिफर्म विन्डोहरू अन गर्नुहोस् (लिगेसी)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"प्रयोगात्मक लिगेसी फ्रिफर्म विन्डोहरू चल्ने बनाउनुहोस्"</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"डेस्कटप ब्याकअप पासवर्ड"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"हाल डेस्कटपका सबै ब्याकअप पासवर्ड सुरक्षित छैनन्"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"डेस्कटप पूर्ण ब्याकअपको लागि पासवर्ड बदल्न वा हटाउन ट्याप गर्नुहोस्"</string>
diff --git a/packages/SettingsLib/res/values-nl/strings.xml b/packages/SettingsLib/res/values-nl/strings.xml
index 9e0088f1b1d0..8577f4853b23 100644
--- a/packages/SettingsLib/res/values-nl/strings.xml
+++ b/packages/SettingsLib/res/values-nl/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Sta laden van GPU-foutopsporingslagen toe voor foutopsporingsapps"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Uitgebreide leverancierslogboeken aanzetten"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Neem aanvullende apparaatspecifieke leverancierslogboeken op in bugrapporten. Deze kunnen privégegevens bevatten, meer batterijlading gebruiken en/of meer opslagruimte gebruiken"</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Uitzetten na één dag"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Uitgebreide leverancierslogboekregistratie is beëindigd"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Aangezet voor één dag"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Aanzetten voor nog één dag"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Wordt uitgezet na één dag"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Aangezet voor onbepaalde tijd"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Venster­animatieschaal"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Overgangs­animatieschaal"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Duur van animatieschaal"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Hiermee komt elke app in aanmerking voor schrijven naar externe opslag, ongeacht de manifestwaarden"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Formaat activiteiten geforceerd aanpasbaar maken"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Maak het formaat van alle activiteiten aanpasbaar, ongeacht de manifestwaarden"</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Vensters met vrije vorm aanzetten"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Zet ondersteuning voor vensters met experimentele vrije vorm aan"</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Vensters met vrije vorm aanzetten (verouderd)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Zet ondersteuning voor verouderde vensters met experimentele vrije vorm aan."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Wachtwoord desktopback-up"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Volledige back-ups naar desktops zijn momenteel niet beveiligd"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Tik om het wachtwoord voor volledige back-ups naar desktops te wijzigen of te verwijderen"</string>
diff --git a/packages/SettingsLib/res/values-or/strings.xml b/packages/SettingsLib/res/values-or/strings.xml
index 8d4e5cc8cf8f..9fdb99b64bb7 100644
--- a/packages/SettingsLib/res/values-or/strings.xml
+++ b/packages/SettingsLib/res/values-or/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"ଡିବଗ୍‌ ଆପ୍‌ଗୁଡ଼ିକ ପାଇଁ GPU ଡିବଗ୍‌ ଲେୟର୍‌ ଲୋଡ୍ କରିବାର ଅନୁମତି ଦିଅନ୍ତୁ"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"ଭର୍ବୋସ ଭେଣ୍ଡର୍ ଲଗିଂ ସକ୍ଷମ କରନ୍ତୁ"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"ବଗ୍ ରିପୋର୍ଟଗୁଡ଼ିକରେ ଅତିରିକ୍ତ ଡିଭାଇସ୍-ନିର୍ଦ୍ଦିଷ୍ଟ ଲଗଗୁଡ଼ିକ ସାମିଲ କରନ୍ତୁ, ଯେଉଁଥିରେ ବ୍ୟକ୍ତିଗତ ସୂଚନା ଥାଇପାରେ, ଯାହା ଅଧିକ ବ୍ୟାଟେରୀ ଏବଂ/କିମ୍ବା ଅଧିକ ଷ୍ଟୋରେଜ୍ ବ୍ୟବହାର କରିପାରେ।"</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"ଗୋଟିଏ ଦିନ ପରେ ଅକ୍ଷମ କରନ୍ତୁ"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"ଭର୍ବୋସ ଭେଣ୍ଡର ଲଗିଂ ସମାପ୍ତ ହୋଇଯାଇଛି"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"ଗୋଟିଏ ଦିନ ପାଇଁ ସକ୍ଷମ କରାଯାଇଛି"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"ଆଉ ଗୋଟିଏ ଦିନ ପାଇଁ ସକ୍ଷମ କରନ୍ତୁ"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"ଗୋଟିଏ ଦିନ ପରେ ଅକ୍ଷମ ହେବ"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"ଅନିର୍ଦ୍ଦିଷ୍ଟ ସମୟ ପାଇଁ ସକ୍ଷମ କରାଯାଇଛି"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"ୱିଣ୍ଡୋ ଆନିମେସନ୍‌ ସ୍କେଲ୍‌"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"ଟ୍ରାଞ୍ଜିସନ୍‌ ଆନିମେସନ୍‌ ସ୍କେଲ୍‌"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"ଆନିମେଟର୍‌ ଅବଧି ସ୍କେଲ୍‌"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"ଯେକୌଣସି ଆପ୍‌କୁ ଏକ୍ସଟର୍ନଲ୍ ଷ୍ଟୋରେଜ୍‌ରେ ଲେଖାଯୋଗ୍ୟ କରନ୍ତୁ, ମେନିଫେଷ୍ଟ ମୂଲ୍ୟ ଯାହା ହୋଇଥାଉ ନା କାହିଁକି"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"ୱିଣ୍ଡୋ ହିସାବରେ କାର୍ଯ୍ୟକଳାପର ଆକାର ବଦଳାନ୍ତୁ"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"ମାନିଫେଷ୍ଟ ମୂଲ୍ୟ ଯାହା ହୋଇଥାଉ ନା କାହିଁକି, ଏକାଧିକ-ୱିଣ୍ଡୋ ପାଇଁ ସମସ୍ତ କାର୍ଯ୍ୟକଳାପକୁ ରିସାଇଜ କରନ୍ତୁ।"</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"ଫ୍ରିଫର୍ମ ୱିଣ୍ଡୋକୁ ସକ୍ଷମ କରନ୍ତୁ"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"ପରୀକ୍ଷାମୂଳକ ଫ୍ରିଫର୍ମ ୱିଣ୍ଡୋଗୁଡ଼ିକ ପାଇଁ ସପୋର୍ଟକୁ ସକ୍ଷମ କରନ୍ତୁ।"</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"ଫ୍ରିଫର୍ମ ୱିଣ୍ଡୋ ସକ୍ଷମ କରନ୍ତୁ (ଲିଗାସି)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"ପରୀକ୍ଷାମୂଳକ ଲିଗାସି ଫ୍ରିଫର୍ମ ୱିଣ୍ଡୋ ପାଇଁ ସପୋର୍ଟ ସକ୍ଷମ କରନ୍ତୁ।"</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"ଡେସ୍କଟପ ବେକଅପ ପାସୱାର୍ଡ"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"ଡେସ୍କଟପ୍‌ର ସମ୍ପୂର୍ଣ୍ଣ ବ୍ୟାକଅପ୍‌ଗୁଡ଼ିକ ବର୍ତ୍ତମାନ ସୁରକ୍ଷିତ ନୁହେଁ"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"ଡେସ୍କଟପ୍‌ର ସମ୍ପୂର୍ଣ୍ଣ ବ୍ୟାକ୍‌ଅପ୍‌ ପାଇଁ ପାସ୍‌ୱର୍ଡ ବଦଳାଇବା କିମ୍ୱା କାଢ଼ିଦେବା ନିମନ୍ତେ ଟାପ୍‌ କରନ୍ତୁ"</string>
diff --git a/packages/SettingsLib/res/values-pa/strings.xml b/packages/SettingsLib/res/values-pa/strings.xml
index 54c9b54c8de2..64981a7a1dec 100644
--- a/packages/SettingsLib/res/values-pa/strings.xml
+++ b/packages/SettingsLib/res/values-pa/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"ਡੀਬੱਗ ਐਪਾਂ ਲਈ GPU ਡੀਬੱਗ ਤਹਿਆਂ ਨੂੰ ਲੋਡ ਹੋਣ ਦਿਓ"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"ਵਰਬੋਸ ਵਿਕਰੇਤਾ ਲੌਗਿੰਗ ਚਾਲੂ ਕਰੋ"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"ਬੱਗ ਰਿਪੋਰਟਾਂ ਵਿੱਚ ਵਧੀਕ ਡੀਵਾਈਸ ਮੁਤਾਬਕ ਵਿਕਰੇਤਾ ਲੌਗ ਸ਼ਾਮਲ ਕਰੋ, ਜਿਨ੍ਹਾਂ ਵਿੱਚ ਪ੍ਰਾਈਵੇਟ ਜਾਣਕਾਰੀ, ਬੈਟਰੀ ਦੀ ਵਧੇਰੇ ਵਰਤੋਂ ਅਤੇ/ਜਾਂ ਜ਼ਿਆਦਾ ਸਟੋਰੇਜ ਸ਼ਾਮਲ ਹੋ ਸਕਦੀ ਹੈ।"</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"ਇੱਕ ਦਿਨ ਬਾਅਦ ਬੰਦ ਕਰੋ"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"ਵਰਬੋਸ ਵਿਕਰੇਤਾ ਲੌਗਿੰਗ ਸਮਾਪਤ ਹੋ ਗਈ ਹੈ"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"ਇੱਕ ਦਿਨ ਲਈ ਚਾਲੂ ਕੀਤਾ ਗਿਆ"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"ਇੱਕ ਹੋਰ ਦਿਨ ਲਈ ਚਾਲੂ ਕਰੋ"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"ਇੱਕ ਦਿਨ ਬਾਅਦ ਬੰਦ ਹੋ ਜਾਵੇਗਾ"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"ਅਣਮਿੱਥੇ ਸਮੇਂ ਲਈ ਚਾਲੂ ਕੀਤਾ ਗਿਆ"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"ਵਿੰਡੋ ਐਨੀਮੇਸ਼ਨ ਸਕੇਲ"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"ਟ੍ਰਾਂਜ਼ਿਸ਼ਨ ਐਨੀਮੇਸ਼ਨ ਸਕੇਲ"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"ਐਨੀਮੇਟਰ ਮਿਆਦ ਸਕੇਲ"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"ਮੈਨੀਫੈਸਟ ਮੁੱਲਾਂ ਦੀ ਪਰਵਾਹ ਕੀਤੇ ਬਿਨਾਂ, ਕਿਸੇ ਵੀ ਐਪ ਨੂੰ ਬਾਹਰੀ ਸਟੋਰੇਜ \'ਤੇ ਲਿਖਣ ਦੇ ਯੋਗ ਬਣਾਉਂਦੀ ਹੈ"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"ਸਰਗਰਮੀਆਂ ਨੂੰ ਜ਼ਬਰਦਸਤੀ ਆਕਾਰ ਬਦਲਣਯੋਗ ਬਣਾਓ"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"ਮੈਨੀਫ਼ੈਸਟ ਮੁੱਲਾਂ ਦੀ ਪਰਵਾਹ ਕੀਤੇ ਬਿਨਾਂ, ਮਲਟੀ-ਵਿੰਡੋ ਲਈ ਸਾਰੀਆਂ ਸਰਗਰਮੀਆਂ ਨੂੰ ਆਕਾਰ ਬਦਲਣਯੋਗ ਬਣਾਓ।"</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"ਫ੍ਰੀਫਾਰਮ ਵਿੰਡੋਜ਼ ਨੂੰ ਚਾਲੂ ਕਰੋ"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"ਪ੍ਰਯੋਗਮਈ ਫ੍ਰੀਫਾਰਮ ਵਿੰਡੋਜ਼ ਲਈ ਸਮਰਥਨ ਨੂੰ ਚਾਲੂ ਕਰੋ।"</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"ਫ੍ਰੀਫਾਰਮ ਵਿੰਡੋਆਂ ਚਾਲੂ ਕਰੋ (ਵਿਰਾਸਤੀ)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"ਪ੍ਰਯੋਗਮਈ ਵਿਰਾਸਤੀ ਫ੍ਰੀਫਾਰਮ ਵਿੰਡੋਆਂ ਲਈ ਸਹਾਇਤਾ ਚਾਲੂ ਕਰੋ।"</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"ਡੈਸਕਟਾਪ ਬੈਕਅੱਪ ਪਾਸਵਰਡ"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"ਡੈਸਕਟਾਪ ਦੇ ਪੂਰੇ ਬੈਕਅੱਪ ਇਸ ਵੇਲੇ ਸੁਰੱਖਿਅਤ ਨਹੀਂ ਹਨ"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"ਡੈਸਕਟਾਪ ਦੇ ਮੁਕੰਮਲ ਬੈਕਅੱਪਾਂ ਲਈ ਪਾਸਵਰਡ ਨੂੰ ਬਦਲਣ ਜਾਂ ਹਟਾਉਣ ਲਈ ਟੈਪ ਕਰੋ"</string>
diff --git a/packages/SettingsLib/res/values-pl/strings.xml b/packages/SettingsLib/res/values-pl/strings.xml
index ef096876e802..a1ca4a6b8fcd 100644
--- a/packages/SettingsLib/res/values-pl/strings.xml
+++ b/packages/SettingsLib/res/values-pl/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Zezwalaj na ładowanie warstw debugowania GPU"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Włącz szczegółowe rejestrowanie dostawcy"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Dołączaj do raportów o błędach dodatkowe dane dostawcy dotyczące konkretnego urządzenia, które mogą zawierać dane prywatne oraz wykorzystywać więcej baterii lub pamięci"</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Wyłącz po 1 dniu"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Szczegółowe rejestrowanie dostawcy zostało zakończone"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Włączone na 1 dzień"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Włącz na jeszcze 1 dzień"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Wyłączy się po 1 dniu"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Włączone bez ograniczeń czasowych"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Skala animacji okna"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Skala animacji przejścia"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Skala długości animacji"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Pozwala na zapis aplikacji w pamięci zewnętrznej niezależnie od wartości w pliku manifestu"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Wymuś zmianę rozmiaru okien aktywności"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Zezwalaj na zmianę rozmiaru wszystkich okien aktywności w trybie wielu okien niezależnie od ustawień w pliku manifestu"</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Włącz dowolny rozmiar okien"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Włącz obsługę eksperymentalnej funkcji dowolnego rozmiaru okien"</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Włącz dowolny rozmiar okien (starsza wersja)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Włącz obsługę eksperymentalnej funkcji dowolnego rozmiaru okien w starszej wersji"</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Hasło kopii zapasowej"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Pełne kopie zapasowe na komputerze nie są obecnie chronione"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Dotknij, by zmienić lub usunąć hasło pełnych kopii zapasowych na komputerze."</string>
diff --git a/packages/SettingsLib/res/values-pt-rBR/strings.xml b/packages/SettingsLib/res/values-pt-rBR/strings.xml
index e441f058f3e1..13f9c40f329b 100644
--- a/packages/SettingsLib/res/values-pt-rBR/strings.xml
+++ b/packages/SettingsLib/res/values-pt-rBR/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Permitir carregamento de camadas de depuração de GPU p/ apps de depuração"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Ativar registro detalhado de fornecedor"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Incluir mais registros de fornecedores específicos do dispositivo em relatórios de bugs. Isso pode aumentar o uso da bateria e/ou do armazenamento, e os relatórios podem conter informações particulares."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Desativar depois de 1 dia"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"O registro detalhado de fornecedor foi encerrado"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Ativado por 1 dia"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Ativar por mais 1 dia"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"É desativado depois de 1 dia"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Ativado indefinidamente"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Escala de animação da janela"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Escala de animação de transição"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Escala de duração do Animator"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Qualificar apps para gravação em armazenamento externo, independentemente dos valores do manifesto"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Forçar atividades a serem redimensionáveis"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Tornar todas as atividades redimensionáveis para várias janelas, independentemente dos valores do manifesto"</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Ativar janelas de forma livre"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Ativar a compatibilidade com janelas experimentais de forma livre"</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Ativar janelas de forma livre (legado)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Ativar a compatibilidade com janelas experimentais legadas de forma livre."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Senha de backup local"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Os backups completos não estão protegidos no momento"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Toque para alterar ou remover a senha de backups completos do desktop"</string>
diff --git a/packages/SettingsLib/res/values-pt-rPT/strings.xml b/packages/SettingsLib/res/values-pt-rPT/strings.xml
index 7aed3f4ad709..260e58e0b365 100644
--- a/packages/SettingsLib/res/values-pt-rPT/strings.xml
+++ b/packages/SettingsLib/res/values-pt-rPT/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Permite carregamento de camadas de depuração de GPU para apps de depuração"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Ativ. registo do fornecedor"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Inclua registos adicionais de fornecedores específicos de dispositivos em relatórios de erros, que podem conter informações privadas, utilizar mais bateria e/ou utilizar mais armazenamento."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Desativar após um dia"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"O registo verboso de fornecedor terminou"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Ativado durante um dia"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Ativar durante mais um dia"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"É desativado após um dia"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Ativado indefinidamente"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Escala de animação de transição"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Escala de animação de transição"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Escala de duração de animação"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Torna qualquer aplicação elegível para ser gravada no armazenamento externo, independentemente dos valores do manifesto"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Forçar as atividades a serem redimensionáveis"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Tornar todas as atividades redimensionáveis para várias janelas, independentemente dos valores do manifesto."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Ativar janelas de forma livre"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Ativar a compatibilidade com janelas de forma livre experimentais."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Ativar janelas de forma livre (antigo)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Ativar compatibilidade com janelas de forma livre antigas experimentais."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Palavra-passe cópia do computador"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"As cópias de segurança completas no ambiente de trabalho não estão atualmente protegidas"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Tocar para alterar ou remover a palavra-passe para cópias de segurança completas no ambiente de trabalho"</string>
diff --git a/packages/SettingsLib/res/values-pt/strings.xml b/packages/SettingsLib/res/values-pt/strings.xml
index e441f058f3e1..13f9c40f329b 100644
--- a/packages/SettingsLib/res/values-pt/strings.xml
+++ b/packages/SettingsLib/res/values-pt/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Permitir carregamento de camadas de depuração de GPU p/ apps de depuração"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Ativar registro detalhado de fornecedor"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Incluir mais registros de fornecedores específicos do dispositivo em relatórios de bugs. Isso pode aumentar o uso da bateria e/ou do armazenamento, e os relatórios podem conter informações particulares."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Desativar depois de 1 dia"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"O registro detalhado de fornecedor foi encerrado"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Ativado por 1 dia"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Ativar por mais 1 dia"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"É desativado depois de 1 dia"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Ativado indefinidamente"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Escala de animação da janela"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Escala de animação de transição"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Escala de duração do Animator"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Qualificar apps para gravação em armazenamento externo, independentemente dos valores do manifesto"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Forçar atividades a serem redimensionáveis"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Tornar todas as atividades redimensionáveis para várias janelas, independentemente dos valores do manifesto"</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Ativar janelas de forma livre"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Ativar a compatibilidade com janelas experimentais de forma livre"</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Ativar janelas de forma livre (legado)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Ativar a compatibilidade com janelas experimentais legadas de forma livre."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Senha de backup local"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Os backups completos não estão protegidos no momento"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Toque para alterar ou remover a senha de backups completos do desktop"</string>
diff --git a/packages/SettingsLib/res/values-ro/strings.xml b/packages/SettingsLib/res/values-ro/strings.xml
index 9a79bdf5be2d..5f8f367e109b 100644
--- a/packages/SettingsLib/res/values-ro/strings.xml
+++ b/packages/SettingsLib/res/values-ro/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Permite încărcarea nivelurilor de depanare GPU pentru aplicațiile de depanare"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Activează înregistrarea detaliată a furnizorilor"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Include alte jurnale ale furnizorilor de dispozitive în rapoartele de eroare, care pot conține informații private, folosește mai multă baterie și/sau mai mult spațiu de stocare."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Dezactivează după o zi"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Înregistrarea detaliată a furnizorilor s-a încheiat"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Activată timp de o zi"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Activează timp de încă o zi"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Se dezactivează după o zi"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Activată pe termen nedefinit"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Scară animație fereastră"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Scară tranziție animații"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Scară durată Animator"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Permite scrierea oricărei aplicații eligibile în stocarea externă, indiferent de valorile manifestului"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Forțează redimensionarea activităților"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Permite redimensionarea tuturor activităților pentru modul cu ferestre multiple, indiferent de valorile manifestului."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Activează ferestrele cu formă liberă"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Activează compatibilitatea pentru ferestrele experimentale cu formă liberă."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Activează ferestrele cu formă liberă (vechi)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Activează compatibilitatea pentru ferestrele experimentale vechi cu formă liberă."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Parolă backup computer"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"În prezent, backupurile complete pe computer nu sunt protejate"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Atinge ca să modifici sau să elimini parola pentru backupurile complete pe desktop"</string>
diff --git a/packages/SettingsLib/res/values-ru/strings.xml b/packages/SettingsLib/res/values-ru/strings.xml
index b768cd969c64..f492b65612c5 100644
--- a/packages/SettingsLib/res/values-ru/strings.xml
+++ b/packages/SettingsLib/res/values-ru/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Включить загрузку слоев отладки графического процессора"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Подробный журнал поставщика"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Включать в информацию об ошибках дополнительные записи поставщика об устройстве, которые могут содержать личные данные и занимать больше места. Также это может увеличить расход заряда батареи."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Отключить через день"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Ведение подробного журнала поставщика завершено"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Включено на один день"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Включить ещё на один день"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Отключится через один день"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Включено без ограничения по времени"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Анимация окон"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Анимация переходов"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Длительность анимации"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Разрешить сохранение приложений на внешних накопителях (независимо от значений в манифесте)"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Изменение размера в многооконном режиме"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Разрешить изменение размера окон в многооконном режиме (независимо от значений в манифесте)"</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Разрешить создание окон произвольной формы"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Включить экспериментальную функцию создания окон произвольной формы"</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Разрешить окна произвольной формы (устаревшее)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Включить устаревшую экспериментальную функцию для создания окон произвольной формы"</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Пароль для резервного копирования"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Полные локальные резервные копии в настоящее время не защищены"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Нажмите, чтобы изменить или удалить пароль для резервного копирования"</string>
diff --git a/packages/SettingsLib/res/values-si/strings.xml b/packages/SettingsLib/res/values-si/strings.xml
index e6095e80a13b..42cde8b7cc2c 100644
--- a/packages/SettingsLib/res/values-si/strings.xml
+++ b/packages/SettingsLib/res/values-si/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"නිදොසීමේ යෙදුම්වලට GPU නිදොසීමේ ස්තර පූරණයට ඉඩ දෙ."</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"verbose vendor පිරීම සබල කරන්න"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"පුද්ගලික තොරතුරු අන්තර්ගත විය හැකි, වැඩි බැටරි බලයක් භාවිත කිරීමට සහ/හෝ වැඩි ගබඩා ඉඩක් භාවිත කිරීමට හැකි අමතර උපාංග නිශ්චිත විකුණුම්කරු ලොග, දෝෂ වාර්තාවල අඩංගු වේ."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"එක දිනකට පසු අබල කරන්න"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"වචන බහුලකමේ විකුණුම්කරු ලොග් කිරීම නිමා වී ඇත"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"එක් දිනක් සඳහා සබල කර ඇත"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"තවත් එක් දිනක් සඳහා සබල කරන්න"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"දිනකට පසු අබල කරයි"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"දින නියමයක් නොමැතිව සබල කර ඇත"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"කවුළු සජීවිකරණ පරිමාණය"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"සංක්‍රමණ සජීවන පරිමාණය"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"සජීවක කාල පරාස පරිමාණය"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"මැනිෆෙස්ට් අගයන් නොසලකා, ඕනෑම යෙදුමක් බාහිර ගබඩාවට ලිවීමට සුදුසුකම් ලබා දෙයි"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"ක්‍රියාකාරකම් ප්‍රතිප්‍රමාණ කළ හැකි බවට බල කරන්න"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"මැනිෆෙස්ට් අගයන් නොසලකා, සියලු ක්‍රියාකාරකම් බහු-කවුළුව සඳහා ප්‍රතිප්‍රමාණ කළ හැකි බවට පත් කරන්න."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"අනියම් හැඩැති කවුළු සබල කරන්න"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"පරීක්ෂණාත්මක අනියම් හැඩැති කවුළු සඳහා සහාය සබල කරන්න."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"නිදහස් ආකෘති කවුළු සබල කරන්න (ලෙගසිය)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"පරීක්ෂණාත්මක ලෙගසි නිදහස් ආකෘති කවුළු සඳහා සහාය සබල කරන්න."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"ඩෙස්ක්ටොප් උපස්ථ මුරපදය"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"ඩෙස්ක්ටොප් සම්පූර්ණ උපස්ථ දැනට ආරක්ෂා කර නොමැත"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"ඩෙස්ක්ටොප් සම්පූර්ණ උපස්ථ සඳහා මුරපදය වෙනස් කිරීමට හෝ ඉවත් කිරීමට තට්ටු කරන්න"</string>
diff --git a/packages/SettingsLib/res/values-sk/strings.xml b/packages/SettingsLib/res/values-sk/strings.xml
index 317336239b53..6bf0cdba4d7a 100644
--- a/packages/SettingsLib/res/values-sk/strings.xml
+++ b/packages/SettingsLib/res/values-sk/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Povoliť načítanie vrstiev ladenia grafického procesora na ladenie aplikácií"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Aktivovať podrobný zápis dodávateľov do denníka"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Zahŕňať do hlásení chýb ďalšie denníky dodávateľa pre konkrétne zariadenie, ktoré môžu obsahovať osobné údaje, zvýšiť spotrebu batérie alebo zabrať viac ukladacieho priestoru"</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Deaktivovať po jednom dni"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Podrobné zapisovanie do denníka dodávateľa bolo ukončené"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Aktivované na jeden deň"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Aktivovať ešte na deň"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Deaktivuje sa po jednom dni"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Aktivované na neurčito"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Mierka animácie okna"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Mierka animácie premeny"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Mierka dĺžky animácie"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Umožniť zapísať akúkoľvek aplikáciu do externého úložiska bez ohľadu na hodnoty v manifeste"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Vynútiť možnosť zmeny veľkosti aktivít"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Umožniť zmeniť veľkosť všetkých aktivít na niekoľko okien (bez ohľadu na hodnoty manifestu)"</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Povoliť okná s voľným tvarom"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Povoliť podporu pre experimentálne okná s voľným tvarom"</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Povolenie meniteľných okien (starých)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Povoľte podporu pre experimentálne staré meniteľné okná."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Heslo pre zálohy v počítači"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Úplné zálohy v počítači nie sú momentálne chránené"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Klepnutím zmeníte alebo odstránite heslo pre úplné zálohy do počítača"</string>
diff --git a/packages/SettingsLib/res/values-sl/strings.xml b/packages/SettingsLib/res/values-sl/strings.xml
index 7ce5d465a3d1..869958f5ccc4 100644
--- a/packages/SettingsLib/res/values-sl/strings.xml
+++ b/packages/SettingsLib/res/values-sl/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Aplikacijam za odpravljanje napak dovoli nalaganje slojev za odpravljanje napak GPE."</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Omogoči podrobno beleženje za ponudnika"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Vključi dodatne dnevnike ponudnika, odvisne od posamezne naprave, v poročila o napakah. Takšno poročilo lahko vsebuje zasebne podatke, porabi več energije baterije in/ali več shrambe."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Onemogoči čez en dan"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Podrobno beleženje za ponudnika je končano"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Omogočeno za en dan"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Omogoči za še en dan"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Onemogočeno bo čez en dan"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Omogočeno brez časovne omejitve"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Merilo animacije okna"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Merilo animacije prehoda"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Merilo trajanja animacije"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Poskrbi, da je ne glede na vrednosti v manifestu mogoče vsako aplikacijo zapisati v zunanjo shrambo."</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Vsili spremembo velikosti za aktivnosti"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Poskrbi, da je ne glede na vrednosti v manifestu mogoče vsem aktivnostim spremeniti velikost za način z več okni."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Omogoči okna svobodne oblike"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Omogoči podporo za poskusna okna svobodne oblike."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Omogoči okna svobodne oblike (starejše)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Omogoči podporo za poskusna okna svobodne oblike starejše različice."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Geslo za varnostno kopijo namizja"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Popolne varnostne kopije namizja trenutno niso zaščitene."</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Dotaknite se, če želite spremeniti ali odstraniti geslo za popolno varnostno kopiranje namizja"</string>
diff --git a/packages/SettingsLib/res/values-sq/strings.xml b/packages/SettingsLib/res/values-sq/strings.xml
index 313fbc2a2c0d..0c1bf6cb4021 100644
--- a/packages/SettingsLib/res/values-sq/strings.xml
+++ b/packages/SettingsLib/res/values-sq/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Lejo ngarkimin e shtresave të korrigjimit të GPU-së për aplikacionet e korrigjimit"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Aktivizo evidencat e tregtuesit me shumë fjalë"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Përfshi evidenca shtesë të treguesve specifike për pajisjen në raportet e defekteve, që mund të përfshijnë informacion privat, mund të përdorin më shumë bateri dhe/ose të përdorin më shumë hapësirë ruajtëse."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Çaktivizo pas një dite"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Evidencat e detajuara të shitësit janë mbyllur"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Aktivizuar për një ditë"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Aktivizo për një ditë më shumë"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Çaktivizohet pas një dite"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Aktivizuar për një kohë të papërcaktuar"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Animacioni i dritares"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Animacioni kalimtar"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Kohëzgjatja e animatorit"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Bën që çdo aplikacion të jetë i përshtatshëm për t\'u shkruar në hapësirën ruajtëse të jashtme, pavarësisht nga vlerat e manifestit"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Detyro madhësinë e ndryshueshme për aktivitetet"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Bëj që të gjitha aktivitetet të kenë madhësi të ndryshueshme për përdorimin me shumë dritare, pavarësisht vlerave të manifestit."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Aktivizo dritaret me formë të lirë"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Aktivizo mbështetjen për dritaret eksperimentale me formë të lirë."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Aktivizo dritaret me formë të lirë (të vjetra)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Aktivizo mbështetjen për dritaret eksperimentale me formë të lirë të versionit të vjetër."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Fjalëkalimi i rezervimit të desktopit"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Rezervimet e plota të desktopit nuk janë të mbrojtura aktualisht"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Trokit për të ndryshuar ose hequr fjalëkalimin për rezervime të plota të desktopit"</string>
diff --git a/packages/SettingsLib/res/values-sr/strings.xml b/packages/SettingsLib/res/values-sr/strings.xml
index 217da2c56417..2b004cbac886 100644
--- a/packages/SettingsLib/res/values-sr/strings.xml
+++ b/packages/SettingsLib/res/values-sr/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Учитава отклањање грешака GPU-a у апл. за отклањање грешака"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Опширне евиденције продавца"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Уврштава у извештаје о грешкама додатне посебне евиденције продавца за уређаје, које могу да садрже приватне податке, да троше више батерије и/или да користе више меморије."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Онемогући после једног дана"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Детаљно евидентирање продавца је завршено"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Омогућено на један дан"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Омогући још један дан"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Онемогућено после једног дана"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Омогућено неограничено"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Размера анимације прозора"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Размера анимације прелаза"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Аниматорова размера трајања"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Омогућава уписивање свих апликација у спољну меморију, без обзира на вредности манифеста"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Принудно омогући промену величине активности"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Омогућава промену величине свих активности за режим са више прозора, без обзира на вредности манифеста."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Омогући прозоре произвољног формата"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Омогућава подршку за експерименталне прозоре произвољног формата."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Омогући прозоре произвољног формата (застарело)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Омогућава подршку за застареле експерименталне прозоре произвољног формата."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Лозинка резервне копије за рачунар"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Резервне копије читавог система тренутно нису заштићене"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Додирните да бисте променили или уклонили лозинку за прављење резервних копија читавог система на рачунару"</string>
diff --git a/packages/SettingsLib/res/values-sv/strings.xml b/packages/SettingsLib/res/values-sv/strings.xml
index 38faa8cde5ba..06ed90e08cf0 100644
--- a/packages/SettingsLib/res/values-sv/strings.xml
+++ b/packages/SettingsLib/res/values-sv/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Tillåt att felsökningsappar läser in GPU-felsökningslager"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Aktivera utförlig loggning för leverantörer"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Ta med ytterligare enhetsspecifika leverantörsloggar i felrapporter. Dessa kan innehålla privata uppgifter samt använda mer batteri och/eller mer lagringsutrymme."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Inaktivera efter en dag"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Utförlig leverantörsloggning har avslutats"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Aktiverat i en dag"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Aktivera i en dag till"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Inaktiveras efter en dag"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Aktiverat tills vidare"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Skala – fönsteranimering"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Skala – övergångsanimering"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Längdskala för Animator"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Allar appar kan skrivas till extern lagring, oavsett manifestvärden"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Framtvinga storleksanpassning för aktiviteter"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Gör det möjligt att ändra storleken på alla aktiviteter i flerfönsterläge, oavsett manifestvärden."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Aktivera frihandsfönster"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Aktivera stöd för experimentella frihandsfönster."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Aktivera frihandsfönster (äldre)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Aktivera stöd för äldre experimentella frihandsfönster."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Lösenord för säkerhetskopia av datorn"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"De fullständiga säkerhetskopiorna av datorn är för närvarande inte skyddade"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Tryck om du vill ändra eller ta bort lösenordet för fullständig säkerhetskopiering av datorn"</string>
diff --git a/packages/SettingsLib/res/values-sw/strings.xml b/packages/SettingsLib/res/values-sw/strings.xml
index 744a79e8f4f4..08aa7840a9fc 100644
--- a/packages/SettingsLib/res/values-sw/strings.xml
+++ b/packages/SettingsLib/res/values-sw/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Ruhusu upakiaji wa safu za utatuzi wa GPU za programu za utatuzi"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Washa uwekaji kumbukumbu za muuzaji kwa kutumia sauti"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Jumuisha kumbukumbu zaidi za muuzaji ambazo ni mahususi kwa kifaa kwenye ripoti za hitilafu, ambazo huenda zikawa na maelezo ya faragha, zikatumia chaji nyingi ya betri na/au zikatumia nafasi kubwa ya hifadhi."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Zima baada ya siku moja"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Mchakato wa kuweka kumbukumbu ya kina ya muuzaji umekamilika"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Umewasha kwa siku moja"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Washa kwa siku moja zaidi"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Utazima baada ya siku moja"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Umewasha kwa muda usiojulikana"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Uhuishaji kwenye dirisha"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Mageuzi ya kipimo cha uhuishaji"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Mizani ya muda wa uhuishaji"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Huruhusu programu yoyote iwekwe kwenye hifadhi ya nje, bila kujali thamani za faili ya maelezo"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Lazimisha shughuli ziweze kubadilishwa ukubwa"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Fanya shughuli zote ziweze kubadilishwa ukubwa kwenye madirisha mengi, bila kuzingatia thamani za faili ya maelezo."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Washa madirisha yenye muundo huru"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Ruhusu uwezo wa kutumia madirisha ya majaribio yenye muundo huru."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Washa madirisha yenye muundo huru (yaliyopitwa na wakati)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Ruhusu matumizi ya madirisha ya majaribio yenye muundo huru yaliyopitwa na wakati."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Nenosiri la hifadhi rudufu ya eneo kazi"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Hifadhi rudufu kamili za eneo kazi hazijalindwa kwa sasa"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Gusa ili ubadilishe au uondoe nenosiri la hifadhi rudufu kamili za eneo kazi"</string>
diff --git a/packages/SettingsLib/res/values-ta/strings.xml b/packages/SettingsLib/res/values-ta/strings.xml
index 113a139176bb..5972756108f4 100644
--- a/packages/SettingsLib/res/values-ta/strings.xml
+++ b/packages/SettingsLib/res/values-ta/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"பிழைத்திருத்த ஆப்ஸிற்கு, GPU பிழைத்திருத்த லேயர்களை ஏற்றுவதற்கு அனுமதி"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"வெர்போஸ் வெண்டார் பதிவை இயக்கு"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"பிழை அறிக்கைகளில் சாதனம் சார்ந்த கூடுதல் வெண்டார் பதிவுகளைச் சேர்க்கவும். அவற்றில் தனிப்பட்ட தகவல்கள், அதிக பேட்டரி உபயோகம் மற்றும்/அல்லது அதிக சேமிப்பிட உபயோகம் குறித்த தகவல்கள் இருக்கக்கூடும்."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"ஒரு நாளுக்குப் பிறகு முடக்கு"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"விற்பனையாளரின் அதிவிவரப் பதிவு முடிந்துவிட்டது"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"ஒரு நாளுக்கு இயக்கப்பட்டுள்ளது"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"இன்னும் ஒரு நாள் இயக்கு"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"ஒரு நாளுக்குப் பிறகு முடக்கப்படும்"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"காலவரம்பின்றி இயக்கப்பட்டுள்ளது"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"சாளர அனிமேஷன் வேகம்"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"அனிமேஷன் மாற்றத்தின் வேகம்"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"அனிமேட்டர் கால அளவு"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"மேனிஃபெஸ்ட் மதிப்புகளைப் பொருட்படுத்தாமல், எல்லா ஆப்ஸையும் வெளிப்புறச் சேமிப்பிடத்தில் எழுத அனுமதிக்கும்"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"செயல்பாடுகளை அளவுமாறக்கூடியதாக அமை"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"மேனிஃபெஸ்ட் மதிப்புகளைப் பொருட்படுத்தாமல், பல சாளரத்திற்கு எல்லா செயல்பாடுகளையும் அளவுமாறக்கூடியதாக அமை."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"குறிப்பிட்ட வடிவமில்லாத சாளரங்களை இயக்கு"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"சாளரங்களை அளவுமாற்ற மற்றும் எங்கும் நகர்த்த அனுமதிக்கும் பரிசோதனைக்குரிய அம்சத்திற்கான ஆதரவை இயக்கு."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"குறிப்பிட்ட வடிவமில்லாத சாளரத்தை இயக்குதல் (லெகஸி)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"பரிசோதனைக்குரிய, குறிப்பிட்ட வடிவமில்லாத பழைய சாளரங்களுக்கான ஆதரவை இயக்குதல்."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"டெஸ்க்டாப் காப்புப்பிரதி கடவுச்சொல்"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"டெஸ்க்டாப்பின் முழு காப்புப்பிரதிகள் தற்போது பாதுகாக்கப்படவில்லை"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"டெஸ்க்டாப்பின் முழுக் காப்புப் பிரதிகளுக்கான கடவுச்சொல்லை மாற்ற அல்லது அகற்ற, தட்டவும்"</string>
diff --git a/packages/SettingsLib/res/values-te/strings.xml b/packages/SettingsLib/res/values-te/strings.xml
index 83f2faaab9c8..1df1823ea01b 100644
--- a/packages/SettingsLib/res/values-te/strings.xml
+++ b/packages/SettingsLib/res/values-te/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"డీబగ్ యాప్‌ల కోసం GPU డీబగ్ లేయర్‌లను లోడ్ చేయడాన్ని అనుమతించండి"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"వివరణాత్మక వెండార్‌ లాగింగ్‌ను ఎనేబుల్ చేయండి"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"బగ్ రిపోర్ట్‌లలో అదనపు పరికర-నిర్దిష్ట వెండార్ లాగ్‌లను చేర్చండి, అవి ప్రైవేట్ సమాచారాన్ని కలిగి ఉండవచ్చు, మరింత బ్యాటరీని, మరియు/లేదా మరింత స్టోరేజ్‌ను ఉపయోగించవచ్చు."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"ఒక రోజు తర్వాత డిజేబుల్ చేయండి"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"వెర్బోస్ వెండర్ లాగింగ్ ముగిసింది"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"ఒక రోజు పాటు ఎనేబుల్ చేసి ఉంది"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"ఇంకొక రోజు ఎనేబుల్ చేసి ఉంచండి"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"ఒక రోజు తర్వాత డిజేబుల్ అవుతుంది"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"నిరవధికంగా ఎనేబుల్ చేయబడింది"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"విండో యానిమేషన్ స్కేల్"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"ట్రాన్సిషన్ యానిమేషన్ స్కేల్"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"యానిమేటర్ వ్యవధి స్కేల్"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"ఏ యాప్‌ను అయినా మానిఫెస్ట్ విలువలతో సంబంధం లేకుండా బాహ్య స్టోరేజ్‌లో సేవ్ చేయడానికి అనుమతిస్తుంది"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"యాక్టివిటీ విండోల సైజ్‌ మార్చ‌గ‌లిగేలా నిర్బంధించు"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"మానిఫెస్ట్ విలువలతో సంబంధం లేకుండా అన్ని యాక్టివిటీస్‌ను పలు రకాల విండోల్లో సరిపోయేటట్లు సైజ్‌ మార్చగలిగేలా చేస్తుంది."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"స్వతంత్ర రూప విండోలను ఎనేబుల్ చేయండి"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"ప్రయోగాత్మక స్వతంత్ర రూప విండోల కోసం సపోర్ట్‌ను ఎనేబుల్ చేస్తుంది."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"ఫ్రీఫార్మ్ విండోలను ఎనేబుల్ చేయండి (లెగసీ)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"ప్రయోగాత్మక లెగసీ ఫ్రీఫార్మ్ విండోలకు సంబంధించిన సపోర్ట్‌ను ఎనేబుల్ చేయండి."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"డెస్క్‌టాప్ బ్యాకప్ పాస్‌వర్డ్"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"డెస్క్‌టాప్ పూర్తి బ్యాకప్‌లు ప్రస్తుతం రక్షించబడలేదు"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"డెస్క్‌టాప్ పూర్తి బ్యాకప్‌ల కోసం పాస్‌వర్డ్‌ను మార్చడానికి లేదా తీసివేయడానికి నొక్కండి"</string>
diff --git a/packages/SettingsLib/res/values-th/strings.xml b/packages/SettingsLib/res/values-th/strings.xml
index ef315924465d..c26f02d8636b 100644
--- a/packages/SettingsLib/res/values-th/strings.xml
+++ b/packages/SettingsLib/res/values-th/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"อนุญาตให้โหลดเลเยอร์การแก้ไขข้อบกพร่อง GPU สำหรับแอปแก้ไขข้อบกพร่อง"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"เปิดการบันทึกเวนเดอร์แบบละเอียด"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"รวมบันทึกเวนเดอร์เพิ่มเติมเฉพาะอุปกรณ์ไว้ในรายงานข้อบกพร่อง ซึ่งอาจมีข้อมูลส่วนตัว ใช้แบตเตอรี่มากขึ้น และ/หรือใช้พื้นที่เก็บข้อมูลมากขึ้น"</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"ปิดใช้หลังจากผ่านไป 1 วัน"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"การบันทึกข้อมูลเวนเดอร์แบบละเอียดสิ้นสุดแล้ว"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"เปิดใช้อีก 1 วันแล้ว"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"เปิดใช้อีก 1 วัน"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"ปิดใช้หลังจากผ่านไป 1 วัน"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"เปิดใช้แบบไม่มีกำหนดสิ้นสุดแล้ว"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"อัตราการเคลื่อนไหวของหน้าต่าง"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"อัตราการเคลื่อนไหวของการเปลี่ยนภาพ"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"อัตราความเร็วตามตัวสร้างภาพเคลื่อนไหว"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"ทำให้เขียนแอปในที่จัดเก็บข้อมูลภายนอกได้ โดยไม่คำนึงถึงค่าในไฟล์ Manifest"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"บังคับให้กิจกรรมปรับขนาดได้"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"ทำให้กิจกรรมทั้งหมดปรับขนาดได้สำหรับหน้าต่างหลายบาน โดยไม่คำนึงถึงค่าในไฟล์ Manifest"</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"เปิดใช้หน้าต่างรูปแบบอิสระ"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"เปิดการสนับสนุนหน้าต่างรูปแบบอิสระแบบทดลอง"</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"เปิดใช้หน้าต่างรูปแบบอิสระ (แบบเดิม)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"เปิดใช้การรองรับหน้าต่างรูปแบบอิสระแบบเดิมเวอร์ชันทดลอง"</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"รหัสผ่านการสำรองข้อมูลในเดสก์ท็อป"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"การสำรองข้อมูลเต็มรูปแบบในเดสก์ท็อปไม่ได้รับการป้องกันในขณะนี้"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"แตะเพื่อเปลี่ยนแปลงหรือลบรหัสผ่านสำหรับการสำรองข้อมูลเต็มรูปแบบในเดสก์ท็อป"</string>
diff --git a/packages/SettingsLib/res/values-tl/strings.xml b/packages/SettingsLib/res/values-tl/strings.xml
index 90acd6fa0647..1c038f6a8742 100644
--- a/packages/SettingsLib/res/values-tl/strings.xml
+++ b/packages/SettingsLib/res/values-tl/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Payagang i-load ang GPU debug layer sa debug app"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"I-enable ang verbose vendor logging"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Magsama sa mga ulat ng bug ng mga karagdagang log ng vendor na partikular sa device, na posibleng may pribadong impormasyon, gumamit ng mas maraming baterya, at/o gumamit ng mas malaking storage."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"I-disable pagkalipas ng isang araw"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Tapos na ang verbose vendor logging"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Naka-enable para sa isang araw"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"I-enable para sa isa pang araw"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Magdi-disable pagkalipas ng isang araw"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Naka-enable nang walang katapusan"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Scale ng window animation"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Scale ng transition animation"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Scale ng tagal ng animator"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Ginagawang kwalipikado ang anumang app na mailagay sa external na storage, anuman ang mga value ng manifest"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Sapilitang gawing resizable ang mga aktibidad"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Gawing nare-resize ang lahat ng aktibidad para sa multi-window, anuman ang mga value ng manifest."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"I-enable ang mga freeform window"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"I-enable ang suporta para sa mga pang-eksperimentong freeform window."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"I-enable ang mga freeform window (legacy)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"I-enable ang suporta para sa mga pang-eksperimentong legacy na freeform window."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Password ng pag-backup ng desktop"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Kasalukuyang hindi pinoprotektahan ang mga buong pag-backup ng desktop"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"I-tap upang baguhin o alisin ang password para sa mga kumpletong pag-back up sa desktop"</string>
diff --git a/packages/SettingsLib/res/values-tr/strings.xml b/packages/SettingsLib/res/values-tr/strings.xml
index a30c3ee5c24d..79ace3f79986 100644
--- a/packages/SettingsLib/res/values-tr/strings.xml
+++ b/packages/SettingsLib/res/values-tr/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Hata ayıklama uygulamaları için GPU hata ayıklama katmanlarının yüklenmesine izin ver"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Ayrıntılı satıcı günlüğünü etkinleştir"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Hata raporlarına cihaza özgü ek satıcı günlükleri ekle. Bu günlükler gizli bilgiler içerebilir, daha fazla pil ve/veya daha fazla depolama alanı kullanabilir."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"1 gün sonra devre dışı bırak"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Ayrıntılı satıcı günlüğü sona erdi"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"1 günlüğüne etkinleştirildi"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"1 gün daha etkinleştir"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"1 gün sonra devre dışı bırakılır"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Süresiz olarak etkinleştirildi"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Pencere animasyonu ölçeği"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Geçiş animasyonu ölçeği"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Animatör süre ölçeği"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Manifest değerlerinden bağımsız olarak uygulamaları harici depolamaya yazmak için uygun hale getirir"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Etkinlikleri yeniden boyutlandırılabilmeye zorla"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Manifest değerlerinden bağımsız olarak, tüm etkinlikleri birden fazla pencerede yeniden boyutlandırılabilir yap."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Serbest biçimli pencereleri etkinleştir"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Deneysel serbest biçimli pencere desteğini etkinleştir."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Serbest biçimli pencereleri (eski) etkinleştir"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Deneysel eski serbest biçimli pencere desteğini etkinleştir."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Masaüstü yedekleme şifresi"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Masaüstü tam yedeklemeleri şu an korunmuyor"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Masaüstü tam yedeklemelerinin şifresini değiştirmek veya kaldırmak için dokunun"</string>
diff --git a/packages/SettingsLib/res/values-uk/strings.xml b/packages/SettingsLib/res/values-uk/strings.xml
index c94e745bfcd4..de416d2f7db8 100644
--- a/packages/SettingsLib/res/values-uk/strings.xml
+++ b/packages/SettingsLib/res/values-uk/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Дозволити завантажувати шари налагодження ГП для додатків налагодження"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Увімкнути докладний журнал постачальника"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Включати у звіти про помилки додаткові записи постачальника про пристрій, які можуть містити особисті дані, призводити до надмірного споживання заряду акумулятора та/або використовувати більший обсяг пам\'яті."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Вимкнути через один день"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Ведення детального журналу постачальника завершено"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Увімкнено на один день"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Увімкнути ще на один день"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Вимикається через один день"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Увімкнено на необмежений час"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Анімація вікон"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Анімація переходів"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Тривалість анімації"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Можна записувати додатки в зовнішню пам’ять, незалежно від значень у маніфесті"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Примусово масштабувати активність"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Масштабувати активність на кілька вікон, незалежно від значень у файлі маніфесту."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Увімкнути вікна довільного формату"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Увімкнути експериментальні вікна довільного формату."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Увімкнути старий формат вікон змінного розміру"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Увімкнути підтримку експериментального старого формату вікон змінного розміру."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Пароль рез. копії на ПК"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Повні резервні копії на комп’ютері наразі не захищені"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Торкніться, щоб змінити або видалити пароль для повного резервного копіювання на комп’ютер"</string>
diff --git a/packages/SettingsLib/res/values-ur/strings.xml b/packages/SettingsLib/res/values-ur/strings.xml
index 3d2c89c26fa3..309283266417 100644
--- a/packages/SettingsLib/res/values-ur/strings.xml
+++ b/packages/SettingsLib/res/values-ur/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"‏ڈیبگ ایپس کیلئے GPU ڈیبگ پرتوں کو لوڈ کرنے دیں"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"وربوس وینڈر لاگنگ فعال کریں"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"اضافی آلہ کے مخصوص وینڈر لاگز کو بگ رپورٹس میں شامل کریں، جن میں نجی معلومات، بیٹری کا زیادہ استعمال اور/یا اسٹوریج کا زیادہ استعمال شامل ہوسکتے ہیں۔"</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"ایک دن کے بعد غیر فعال کریں"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"وربوس وینڈر لاگنگ بند ہو گیا ہے"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"ایک دن کے لئے فعال ہو گیا"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"ایک اور دن کے لئے فعال کریں"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"ایک دن کے بعد غیر فعال ہو جائے گا"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"غیر معینہ مدت کے لئے فعال کر دیا گیا"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"ونڈو اینیمیشن اسکیل"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"ٹرانزیشن اینیمیشن اسکیل"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"اینیمیٹر دورانیے کا اسکیل"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"‏manifest اقدار سے قطع نظر، کسی بھی ایپ کو بیرونی اسٹوریج پر لکھے جانے کا اہل بناتا ہے"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"سرگرمیوں کو ری سائز ایبل بنائیں"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"مینی فیسٹ اقدار سے قطع نظر، ملٹی ونڈو کیلئے تمام سرگرمیوں کو ری سائز ایبل بنائیں۔"</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"‏freeform ونڈوز فعال کریں"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"تجرباتی فری فارم ونڈوز کیلئے سپورٹ فعال کریں۔"</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"‏فریفارم ونڈوز کو فعال کریں (legacy)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"‏تجرباتی legacy فری فارم ونڈوز کیلئے سپورٹ فعال کریں۔"</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"ڈیسک ٹاپ کا بیک اپ پاس ورڈ"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"ڈیسک ٹاپ کے مکمل بیک اپس فی الحال محفوظ کیے ہوئے نہیں ہیں"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"ڈیسک ٹاپ کے مکمل بیک اپس کیلئے پاس ورڈ کو تبدیل کرنے یا ہٹانے کیلئے تھپتھپائیں"</string>
diff --git a/packages/SettingsLib/res/values-uz/strings.xml b/packages/SettingsLib/res/values-uz/strings.xml
index 93ffac82a583..7502412b2d92 100644
--- a/packages/SettingsLib/res/values-uz/strings.xml
+++ b/packages/SettingsLib/res/values-uz/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Grafik protsessorni tuzatish qatlamlarini yuklashni yoqish"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Taʼminotchining batafsil jurnali"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Xatoliklar hisobotiga shaxsiy maʼlumotlari bor va koʻp joy olishi mumkin boʻlgan qurilma haqida taʼminotchining qoʻshimcha yozuvlari kiradi. Bunda batareya quvvati tezroq sarflanishi mumkin."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Bir kundan keyin faolsizlantirish"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Taʼminotchi tafsilotlarini qayd qilish tugadi"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Bir kunga yoqilgan"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Yana bir kunga yoqish"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Bir kundan keyin faolsizlantiriladi"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Oʻchirilmaguncha yoqilgan"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Oynalar animatsiyasi"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"O‘tish animatsiyasi"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Animatsiya tezligi"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Manifest qiymatidan qat’i nazar istalgan ilovani tashqi xotiraga saqlash imkonini beradi"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Harakatlarni moslashuvchan o‘lchamga keltirish"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Manifest qiymatidan qat’i nazar barcha harakatlarni ko‘p oynali rejimga moslashtirish."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Erkin shakldagi oynalarni yoqish"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Erkin shakldagi oynalar yaratish uchun mo‘ljallangan tajribaviy funksiyani yoqish."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Erkin shakldagi oynalarni (eskirgan) yoqish"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Eskirgan erkin shakldagi oynalar yaratish uchun moʻljallangan tajribaviy funksiyani yoqish."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Zaxira nusxa uchun parol"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Kompyuterdagi zaxira nusxalar hozirgi vaqtda himoyalanmagan"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Ish stoli to‘liq zaxira nusxalari parolini o‘zgartirish yoki o‘chirish uchun bu yerni bosing"</string>
diff --git a/packages/SettingsLib/res/values-vi/strings.xml b/packages/SettingsLib/res/values-vi/strings.xml
index 414ad37bf072..02f0aa1c7227 100644
--- a/packages/SettingsLib/res/values-vi/strings.xml
+++ b/packages/SettingsLib/res/values-vi/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Cho phép tải lớp gỡ lỗi GPU cho ứng dụng gỡ lỗi"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Bật tùy chọn ghi nhật ký chi tiết của nhà cung cấp"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Đưa thêm nhật ký của nhà cung cấp dành riêng cho thiết bị vào các báo cáo lỗi. Nhật ký này có thể chứa thông tin cá nhân, dùng nhiều pin hơn và/hoặc chiếm nhiều dung lượng lưu trữ hơn."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Tắt sau một ngày"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Quá trình ghi nhật ký chi tiết của nhà cung cấp đã kết thúc"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Đã bật trong một ngày"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Bật thêm một ngày nữa"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Tắt sau một ngày"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Đã bật vô thời hạn"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Tỷ lệ hình động của cửa sổ"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Tỷ lệ hình động chuyển tiếp"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Tỷ lệ thời lượng của trình tạo hình động"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Cho phép ghi mọi ứng dụng đủ điều kiện vào bộ nhớ ngoài, bất kể giá trị tệp kê khai là gì"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Buộc các hoạt động có thể thay đổi kích thước"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Cho phép thay đổi kích thước của tất cả các hoạt động cho nhiều cửa sổ, bất kể giá trị tệp kê khai là gì."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Bật cửa sổ dạng tự do"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Bật tính năng hỗ trợ cửa sổ dạng tự do thử nghiệm."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Bật cửa sổ có thể đổi kích thước (cũ)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Bật tính năng hỗ trợ cửa sổ có thể đổi kích thước thử nghiệm (cũ)."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Mật khẩu cho bản sao lưu qua máy tính"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Các bản sao lưu đầy đủ qua máy tính hiện không được bảo vệ"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Nhấn để thay đổi hoặc xóa mật khẩu dành cho các bản sao lưu đầy đủ vào máy tính"</string>
@@ -575,7 +569,7 @@
<string name="zen_mode_settings_summary_off" msgid="3832876036123504076">"Không bao giờ"</string>
<string name="zen_interruption_level_priority" msgid="5392140786447823299">"Chỉ cho các mục ưu tiên"</string>
<string name="zen_mode_and_condition" msgid="8877086090066332516">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>. <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
- <string name="zen_alarm_warning_indef" msgid="4146527909616457163">"Bạn sẽ không nghe thấy báo thức tiếp theo lúc <xliff:g id="WHEN">%1$s</xliff:g> của mình trừ khi bạn tắt chức năng này trước"</string>
+ <string name="zen_alarm_warning_indef" msgid="4146527909616457163">"Bạn sẽ không nghe thấy báo thức tiếp theo lúc <xliff:g id="WHEN">%1$s</xliff:g> của mình trừ phi bạn tắt chức năng này trước"</string>
<string name="zen_alarm_warning" msgid="245729928048586280">"Bạn sẽ không nghe thấy báo thức tiếp theo lúc <xliff:g id="WHEN">%1$s</xliff:g> của mình"</string>
<string name="alarm_template" msgid="3346777418136233330">"lúc <xliff:g id="WHEN">%1$s</xliff:g>"</string>
<string name="alarm_template_far" msgid="6382760514842998629">"vào <xliff:g id="WHEN">%1$s</xliff:g>"</string>
diff --git a/packages/SettingsLib/res/values-zh-rCN/strings.xml b/packages/SettingsLib/res/values-zh-rCN/strings.xml
index c0a8f2d51c31..a551121e0922 100644
--- a/packages/SettingsLib/res/values-zh-rCN/strings.xml
+++ b/packages/SettingsLib/res/values-zh-rCN/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"允许为调试应用加载 GPU 调试层"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"启用详细供应商日志记录"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"在 bug 报告中包含其他设备特定的供应商日志,这些日志可能会含有隐私信息、消耗更多电量和/或使用更多存储空间。"</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"一天后停用"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"详细供应商日志记录已结束"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"已启用一天"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"再启用一天"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"一天后停用"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"已无限期启用"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"窗口动画缩放"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"过渡动画缩放"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Animator 时长缩放"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"允许将任何应用写入外部存储设备(无论清单值是什么)"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"强制将 activity 设为可调整大小"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"将所有 activity 设为可配合多窗口环境调整大小(无论清单值是什么)。"</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"启用可自由调整的窗口"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"启用可自由调整的窗口这一实验性功能。"</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"启用可自由调整的窗口(旧版)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"实现对实验性旧版可自由调整的窗口的支持。"</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"桌面备份密码"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"桌面完整备份当前未设置密码保护"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"点按即可更改或移除用于保护桌面完整备份的密码"</string>
diff --git a/packages/SettingsLib/res/values-zh-rHK/strings.xml b/packages/SettingsLib/res/values-zh-rHK/strings.xml
index 74f2678b1cce..6f8c537dafeb 100644
--- a/packages/SettingsLib/res/values-zh-rHK/strings.xml
+++ b/packages/SettingsLib/res/values-zh-rHK/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"允許為偵錯應用程式載入 GPU 偵錯圖層"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"啟用詳細供應商記錄"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"在錯誤報告中加入其他裝置專屬供應商記錄,其中可能包含私人資料,並會耗用更多電量及/或儲存空間。"</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"在一天後停用"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"詳細供應商記錄已結束"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"已啟用一天"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"啟用多一天"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"在一天後停用"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"已無限期啟用"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"視窗動畫比例"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"轉場動畫比例"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Animator 片長比例"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"在任何資訊清單值下,允許將所有符合資格的應用程式寫入到外部儲存完間"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"強制將活動設為可調整尺寸"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"在任何資訊清單值下,允許系統配合多重視窗環境調整所有活動的尺寸。"</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"啟用自由形態視窗"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"啟用實驗版自由形態視窗的支援功能。"</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"啟用自由形態視窗 (舊的)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"啟用舊的實驗版自由形態視窗的支援功能。"</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"桌面電腦備份密碼"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"桌面電腦的完整備份目前未受保護"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"輕按即可變更或移除桌面電腦完整備份的密碼"</string>
diff --git a/packages/SettingsLib/res/values-zh-rTW/strings.xml b/packages/SettingsLib/res/values-zh-rTW/strings.xml
index 5b068e35daa1..2806b0262356 100644
--- a/packages/SettingsLib/res/values-zh-rTW/strings.xml
+++ b/packages/SettingsLib/res/values-zh-rTW/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"允許載入 GPU 偵錯圖層為應用程式偵錯"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"啟用詳細供應商記錄功能"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"在錯誤報告中附上其他的裝置專屬供應商記錄。如果你這麼做,可能會增加電池用量及/或占用較多儲存空間,報告中可能也會包含私人資訊。"</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"一天後停用"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"已停用詳細供應商記錄功能"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"已啟用一天"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"再啟用一天"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"一天後停用"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"已無限期啟用"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"視窗動畫比例"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"轉場動畫比例"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"動畫影片長度比例"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"允許將任何應用程式寫入外部儲存空間 (無論資訊清單值為何)"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"將活動強制設為可調整大小"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"將所有活動設為可配合多重視窗環境調整大小 (無論資訊清單值為何)。"</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"啟用自由形式視窗"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"啟用實驗版自由形式視窗的支援功能。"</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"啟用自由形式視窗 (舊版)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"啟用實驗性舊版自由形式視窗支援功能。"</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"電腦備份密碼"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"尚未設定密碼保護電腦的完整備份"</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"輕觸即可變更或移除電腦完整備份的密碼"</string>
diff --git a/packages/SettingsLib/res/values-zu/strings.xml b/packages/SettingsLib/res/values-zu/strings.xml
index da152cefaf49..570c4243f944 100644
--- a/packages/SettingsLib/res/values-zu/strings.xml
+++ b/packages/SettingsLib/res/values-zu/strings.xml
@@ -408,18 +408,12 @@
<string name="enable_gpu_debug_layers_summary" msgid="4921521407377170481">"Vumela izendlalelo zokususa amaphutha ze-GPU ngezinhlelo zokusebenza zokususa amaphutha"</string>
<string name="enable_verbose_vendor_logging" msgid="1196698788267682072">"Nika amandla ilogu yomthengisi we-verbose"</string>
<string name="enable_verbose_vendor_logging_summary" msgid="5426292185780393708">"Faka phakathi amalogu athize womthengisi wedivayisi angeziwe, angase afake phakathi ulwazi oluyimfihlo, kusebenzisa ibhethri eningi, futhi/noma kusebenzisa isitoreji esiningi."</string>
- <!-- no translation found for enable_verbose_vendor_logging_checkbox (3864578373293835530) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_title (6811217272559843592) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_summary (5226524769774370942) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_notification_action (1190831050259046071) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_will_disable (6175431593394522553) -->
- <skip />
- <!-- no translation found for verbose_vendor_logging_preference_summary_on (9017757242481762036) -->
- <skip />
+ <string name="enable_verbose_vendor_logging_checkbox" msgid="3864578373293835530">"Khubaza ngemva kosuku olulodwa"</string>
+ <string name="verbose_vendor_logging_notification_title" msgid="6811217272559843592">"Ukungena komthengisi weverbose kuphelile"</string>
+ <string name="verbose_vendor_logging_notification_summary" msgid="5226524769774370942">"Nika amandla usuku olulodwa"</string>
+ <string name="verbose_vendor_logging_notification_action" msgid="1190831050259046071">"Nika amandla usuku olulodwa olwengeziwe"</string>
+ <string name="verbose_vendor_logging_preference_summary_will_disable" msgid="6175431593394522553">"Khubaza ngemva kosuku olulodwa"</string>
+ <string name="verbose_vendor_logging_preference_summary_on" msgid="9017757242481762036">"Kunikwe amandla isikhathi esinganqunyiwe"</string>
<string name="window_animation_scale_title" msgid="5236381298376812508">"Iwindi yesilinganisi sesithombe esinyakazayo"</string>
<string name="transition_animation_scale_title" msgid="1278477690695439337">"Isilinganiso sesithombe soku"</string>
<string name="animator_duration_scale_title" msgid="7082913931326085176">"Isilinganiso sobude besikhathi somenzi womfanekiso onyakazayo"</string>
@@ -436,8 +430,8 @@
<string name="force_allow_on_external_summary" msgid="8525425782530728238">"Yenza noma uluphi uhlelo lokusebenza lifaneleke ukuthi libhalwe kusitoreji sangaphandle, ngaphandle kwamavelu we-manifest"</string>
<string name="force_resizable_activities" msgid="7143612144399959606">"Imisebenzi yamandla izonikezwa usayizi omusha"</string>
<string name="force_resizable_activities_summary" msgid="2490382056981583062">"Yenza yonke imisebenzi ibe nosayizi abasha kumawindi amaningi, ngokunganaki amavelu e-manifest."</string>
- <string name="enable_freeform_support" msgid="7599125687603914253">"Nika amandla amawindi e-freeform"</string>
- <string name="enable_freeform_support_summary" msgid="1822862728719276331">"Nika amandla usekelo lwe-windows yokuhlola kwe-freeform."</string>
+ <string name="enable_freeform_support" msgid="8409932201445109106">"Vumela amawindi efreeform (ifa)"</string>
+ <string name="enable_freeform_support_summary" msgid="2242481082356957934">"Nika amandla amawindi efreeform efa elisahlolwa."</string>
<string name="local_backup_password_title" msgid="4631017948933578709">"Iphasiwedi yokusekela ngokulondoloza ye-Desktop"</string>
<string name="local_backup_password_summary_none" msgid="7646898032616361714">"Ukusekela ngokulondoloza okugcwele kwe-Desktop akuvikelekile okwamanje."</string>
<string name="local_backup_password_summary_change" msgid="1707357670383995567">"Thepha ukushintsha noma ukususa iphasiwedi yokwenziwa kwezipele ngokugcwele kwideskithophu"</string>
diff --git a/packages/SettingsLib/res/values/strings.xml b/packages/SettingsLib/res/values/strings.xml
index cfd74d4b9f42..ce997bf15b91 100644
--- a/packages/SettingsLib/res/values/strings.xml
+++ b/packages/SettingsLib/res/values/strings.xml
@@ -1010,10 +1010,8 @@
<!-- UI debug setting: force allow on external summary [CHAR LIMIT=150] -->
<string name="force_resizable_activities_summary">Make all activities resizable for multi-window, regardless of manifest values.</string>
- <!-- UI debug setting: enable legacy freeform window support [CHAR LIMIT=50] -->
- <string name="enable_freeform_support">Enable freeform windows (legacy)</string>
- <!-- UI debug setting: enable legacy freeform window support summary [CHAR LIMIT=150] -->
- <string name="enable_freeform_support_summary">Enable support for experimental legacy freeform windows.</string>
+ <!-- Title for a toggle that enables support for windows to be in freeform (apps run in resizable windows). [CHAR LIMIT=50] -->
+ <string name="enable_freeform_support">Enable freeform window support</string>
<!-- Local (desktop) backup password menu title [CHAR LIMIT=25] -->
<string name="local_backup_password_title">Desktop backup password</string>
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManagerExt.kt b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManagerExt.kt
new file mode 100644
index 000000000000..2eaa804152e4
--- /dev/null
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManagerExt.kt
@@ -0,0 +1,39 @@
+/*
+ * 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.bluetooth
+
+import kotlinx.coroutines.channels.awaitClose
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.callbackFlow
+import kotlinx.coroutines.launch
+
+/** [Flow] for [BluetoothCallback] device profile connection state change events */
+val BluetoothEventManager.onProfileConnectionStateChanged: Flow<ProfileConnectionState>
+ get() = callbackFlow {
+ val callback =
+ object : BluetoothCallback {
+ override fun onProfileConnectionStateChanged(
+ cachedDevice: CachedBluetoothDevice,
+ @BluetoothCallback.ConnectionState state: Int,
+ bluetoothProfile: Int
+ ) {
+ launch { send(ProfileConnectionState(cachedDevice, state, bluetoothProfile)) }
+ }
+ }
+ registerCallback(callback)
+ awaitClose { unregisterCallback(callback) }
+ }
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothLeBroadcastAssistantCallbackExt.kt b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothLeBroadcastAssistantCallbackExt.kt
new file mode 100644
index 000000000000..91a99aed6db5
--- /dev/null
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothLeBroadcastAssistantCallbackExt.kt
@@ -0,0 +1,85 @@
+/*
+ * 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.bluetooth
+
+import android.bluetooth.BluetoothDevice
+import android.bluetooth.BluetoothLeBroadcastAssistant
+import android.bluetooth.BluetoothLeBroadcastMetadata
+import android.bluetooth.BluetoothLeBroadcastReceiveState
+import com.android.internal.util.ConcurrentUtils
+import kotlinx.coroutines.channels.awaitClose
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.callbackFlow
+import kotlinx.coroutines.launch
+
+/** [Flow] for [BluetoothLeBroadcastAssistant.Callback] source connected/removed events */
+val LocalBluetoothLeBroadcastAssistant.onSourceConnectedOrRemoved: Flow<Unit>
+ get() = callbackFlow {
+ val callback =
+ object : BluetoothLeBroadcastAssistant.Callback {
+ override fun onReceiveStateChanged(
+ sink: BluetoothDevice,
+ sourceId: Int,
+ state: BluetoothLeBroadcastReceiveState
+ ) {
+ if (BluetoothUtils.isConnected(state)) {
+ launch { send(Unit) }
+ }
+ }
+
+ override fun onSourceRemoved(sink: BluetoothDevice, sourceId: Int, reason: Int) {
+ launch { send(Unit) }
+ }
+
+ override fun onSearchStarted(reason: Int) {}
+
+ override fun onSearchStartFailed(reason: Int) {}
+
+ override fun onSearchStopped(reason: Int) {}
+
+ override fun onSearchStopFailed(reason: Int) {}
+
+ override fun onSourceFound(source: BluetoothLeBroadcastMetadata) {}
+
+ override fun onSourceAdded(sink: BluetoothDevice, sourceId: Int, reason: Int) {}
+
+ override fun onSourceAddFailed(
+ sink: BluetoothDevice,
+ source: BluetoothLeBroadcastMetadata,
+ reason: Int
+ ) {}
+
+ override fun onSourceModified(sink: BluetoothDevice, sourceId: Int, reason: Int) {}
+
+ override fun onSourceModifyFailed(
+ sink: BluetoothDevice,
+ sourceId: Int,
+ reason: Int
+ ) {}
+
+ override fun onSourceRemoveFailed(
+ sink: BluetoothDevice,
+ sourceId: Int,
+ reason: Int
+ ) {}
+ }
+ registerServiceCallBack(
+ ConcurrentUtils.DIRECT_EXECUTOR,
+ callback,
+ )
+ awaitClose { unregisterServiceCallBack(callback) }
+ }
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/ProfileConnectionState.kt b/packages/SettingsLib/src/com/android/settingslib/bluetooth/ProfileConnectionState.kt
new file mode 100644
index 000000000000..45aaa66e7f95
--- /dev/null
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/ProfileConnectionState.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.settingslib.bluetooth
+
+data class ProfileConnectionState(
+ val cachedDevice: CachedBluetoothDevice,
+ @BluetoothCallback.ConnectionState val state: Int,
+ val bluetoothProfile: Int,
+) \ No newline at end of file
diff --git a/packages/SettingsLib/src/com/android/settingslib/fuelgauge/BatterySaverUtils.java b/packages/SettingsLib/src/com/android/settingslib/fuelgauge/BatterySaverUtils.java
index 8bdbee38ab85..9be3159716b8 100644
--- a/packages/SettingsLib/src/com/android/settingslib/fuelgauge/BatterySaverUtils.java
+++ b/packages/SettingsLib/src/com/android/settingslib/fuelgauge/BatterySaverUtils.java
@@ -16,11 +16,15 @@
package com.android.settingslib.fuelgauge;
+import static android.provider.Settings.Secure.EXTRA_LOW_POWER_WARNING_ACKNOWLEDGED;
+import static android.provider.Settings.Secure.LOW_POWER_WARNING_ACKNOWLEDGED;
+
import static com.android.settingslib.fuelgauge.BatterySaverLogging.ACTION_SAVER_STATE_MANUAL_UPDATE;
import static com.android.settingslib.fuelgauge.BatterySaverLogging.EXTRA_POWER_SAVE_MODE_MANUAL_ENABLED;
import static com.android.settingslib.fuelgauge.BatterySaverLogging.EXTRA_POWER_SAVE_MODE_MANUAL_ENABLED_REASON;
import static com.android.settingslib.fuelgauge.BatterySaverLogging.SaverManualEnabledReason;
+import android.app.KeyguardManager;
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
@@ -33,6 +37,10 @@ import android.util.KeyValueListParser;
import android.util.Log;
import android.util.Slog;
+import androidx.core.util.Function;
+
+import com.android.settingslib.flags.Flags;
+
/**
* Utilities related to battery saver.
*/
@@ -125,6 +133,19 @@ public class BatterySaverUtils {
Log.d(TAG, "Battery saver turning " + (enable ? "ON" : "OFF") + ", reason: " + reason);
}
final ContentResolver cr = context.getContentResolver();
+ final PowerManager powerManager = context.getSystemService(PowerManager.class);
+
+ if (Flags.extremePowerLowStateVulnerability()) {
+ var keyguardManager = context.getSystemService(KeyguardManager.class);
+ if (enable
+ && needFirstTimeWarning
+ && keyguardManager != null
+ && keyguardManager.isDeviceLocked()) {
+ var result = powerManager.setPowerSaveModeEnabled(true);
+ Log.d(TAG, "Device is locked, setPowerSaveModeEnabled by default. " + result);
+ return result;
+ }
+ }
final Bundle confirmationExtras = new Bundle(1);
confirmationExtras.putBoolean(EXTRA_CONFIRM_TEXT_ONLY, false);
@@ -136,7 +157,7 @@ public class BatterySaverUtils {
setBatterySaverConfirmationAcknowledged(context);
}
- if (context.getSystemService(PowerManager.class).setPowerSaveModeEnabled(enable)) {
+ if (powerManager.setPowerSaveModeEnabled(enable)) {
if (enable) {
final int count =
Secure.getInt(cr, Secure.LOW_POWER_MANUAL_ACTIVATION_COUNT, 0) + 1;
@@ -173,10 +194,7 @@ public class BatterySaverUtils {
* @see #EXTRA_POWER_SAVE_MODE_TRIGGER_LEVEL
*/
public static boolean maybeShowBatterySaverConfirmation(Context context, Bundle extras) {
- if (Secure.getInt(context.getContentResolver(),
- Secure.LOW_POWER_WARNING_ACKNOWLEDGED, 0) != 0
- && Secure.getInt(context.getContentResolver(),
- Secure.EXTRA_LOW_POWER_WARNING_ACKNOWLEDGED, 0) != 0) {
+ if (isBatterySaverConfirmationHasBeenShowedBefore(context)) {
// Already shown.
return false;
}
@@ -184,6 +202,17 @@ public class BatterySaverUtils {
return true;
}
+ /**
+ * Returns {@code true} if the battery saver confirmation warning has been acknowledged by the
+ * user in the past before.
+ */
+ public static boolean isBatterySaverConfirmationHasBeenShowedBefore(Context context) {
+ Function<String, Integer> secureGetInt =
+ key -> Secure.getInt(context.getContentResolver(), key, /* def= */ 0);
+ return secureGetInt.apply(LOW_POWER_WARNING_ACKNOWLEDGED) != 0
+ && secureGetInt.apply(EXTRA_LOW_POWER_WARNING_ACKNOWLEDGED) != 0;
+ }
+
private static void recordBatterySaverEnabledReason(Context context, boolean enable,
@SaverManualEnabledReason int reason) {
final Bundle enabledReasonExtras = new Bundle(2);
diff --git a/packages/SettingsLib/src/com/android/settingslib/fuelgauge/BatteryUtils.java b/packages/SettingsLib/src/com/android/settingslib/fuelgauge/BatteryUtils.java
index ca3af53681fe..85713607f917 100644
--- a/packages/SettingsLib/src/com/android/settingslib/fuelgauge/BatteryUtils.java
+++ b/packages/SettingsLib/src/com/android/settingslib/fuelgauge/BatteryUtils.java
@@ -83,6 +83,12 @@ public final class BatteryUtils {
return userManager.isManagedProfile() && !userManager.isSystemUser();
}
+ /** Returns true if current user is a private profile user. */
+ public static boolean isPrivateProfile(Context context) {
+ final UserManager userManager = context.getSystemService(UserManager.class);
+ return userManager.isPrivateProfile();
+ }
+
private static Boolean sChargingStringV2Enabled = null;
/** Returns {@code true} if the charging string v2 is enabled. */
diff --git a/packages/SettingsLib/src/com/android/settingslib/media/RouterInfoMediaManager.java b/packages/SettingsLib/src/com/android/settingslib/media/RouterInfoMediaManager.java
index 6571dd7ba398..eced7b3a116b 100644
--- a/packages/SettingsLib/src/com/android/settingslib/media/RouterInfoMediaManager.java
+++ b/packages/SettingsLib/src/com/android/settingslib/media/RouterInfoMediaManager.java
@@ -29,6 +29,7 @@ import android.media.session.MediaController;
import android.os.UserHandle;
import android.text.TextUtils;
+import androidx.annotation.GuardedBy;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@@ -41,7 +42,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
-import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Consumer;
import java.util.stream.Collectors;
@@ -65,7 +65,9 @@ public final class RouterInfoMediaManager extends InfoMediaManager {
refreshDevices();
};
- private final AtomicReference<MediaRouter2.ScanToken> mScanToken = new AtomicReference<>();
+ @GuardedBy("this")
+ @Nullable
+ private MediaRouter2.ScanToken mScanToken;
// TODO (b/321969740): Plumb target UserHandle between UMO and RouterInfoMediaManager.
/* package */ RouterInfoMediaManager(
@@ -101,8 +103,13 @@ public final class RouterInfoMediaManager extends InfoMediaManager {
@Override
protected void startScanOnRouter() {
if (Flags.enableScreenOffScanning()) {
- MediaRouter2.ScanRequest request = new MediaRouter2.ScanRequest.Builder().build();
- mScanToken.compareAndSet(null, mRouter.requestScan(request));
+ synchronized (this) {
+ if (mScanToken == null) {
+ MediaRouter2.ScanRequest request =
+ new MediaRouter2.ScanRequest.Builder().build();
+ mScanToken = mRouter.requestScan(request);
+ }
+ }
} else {
mRouter.startScan();
}
@@ -120,9 +127,11 @@ public final class RouterInfoMediaManager extends InfoMediaManager {
@Override
protected void stopScanOnRouter() {
if (Flags.enableScreenOffScanning()) {
- MediaRouter2.ScanToken token = mScanToken.getAndSet(null);
- if (token != null) {
- mRouter.cancelScanRequest(token);
+ synchronized (this) {
+ if (mScanToken != null) {
+ mRouter.cancelScanRequest(mScanToken);
+ mScanToken = null;
+ }
}
} else {
mRouter.stopScan();
diff --git a/packages/SettingsLib/src/com/android/settingslib/mobile/dataservice/DataServiceUtils.java b/packages/SettingsLib/src/com/android/settingslib/mobile/dataservice/DataServiceUtils.java
index 8868837e4cff..714f9519f378 100644
--- a/packages/SettingsLib/src/com/android/settingslib/mobile/dataservice/DataServiceUtils.java
+++ b/packages/SettingsLib/src/com/android/settingslib/mobile/dataservice/DataServiceUtils.java
@@ -18,9 +18,7 @@ package com.android.settingslib.mobile.dataservice;
import android.telephony.SubscriptionInfo;
import android.telephony.SubscriptionManager;
-import android.telephony.UiccCardInfo;
import android.telephony.UiccPortInfo;
-import android.telephony.UiccSlotInfo;
import android.telephony.UiccSlotMapping;
public class DataServiceUtils {
@@ -71,59 +69,9 @@ public class DataServiceUtils {
public static final String COLUMN_ID = "sudId";
/**
- * The name of the physical slot index column, see
- * {@link UiccSlotMapping#getPhysicalSlotIndex()}.
- */
- public static final String COLUMN_PHYSICAL_SLOT_INDEX = "physicalSlotIndex";
-
- /**
- * The name of the logical slot index column, see
- * {@link UiccSlotMapping#getLogicalSlotIndex()}.
- */
- public static final String COLUMN_LOGICAL_SLOT_INDEX = "logicalSlotIndex";
-
- /**
- * The name of the card ID column, see {@link UiccCardInfo#getCardId()}.
- */
- public static final String COLUMN_CARD_ID = "cardId";
-
- /**
- * The name of the eUICC state column, see {@link UiccCardInfo#isEuicc()}.
- */
- public static final String COLUMN_IS_EUICC = "isEuicc";
-
- /**
- * The name of the multiple enabled profiles supported state column, see
- * {@link UiccCardInfo#isMultipleEnabledProfilesSupported()}.
- */
- public static final String COLUMN_IS_MULTIPLE_ENABLED_PROFILES_SUPPORTED =
- "isMultipleEnabledProfilesSupported";
-
- /**
- * The name of the card state column, see {@link UiccSlotInfo#getCardStateInfo()}.
- */
- public static final String COLUMN_CARD_STATE = "cardState";
-
- /**
- * The name of the extended APDU supported state column, see
- * {@link UiccSlotInfo#getIsExtendedApduSupported()}.
- */
- public static final String COLUMN_IS_EXTENDED_APDU_SUPPORTED = "isExtendedApduSupported";
-
- /**
- * The name of the removable state column, see {@link UiccSlotInfo#isRemovable()}.
- */
- public static final String COLUMN_IS_REMOVABLE = "isRemovable";
-
- /**
* The name of the active state column, see {@link UiccPortInfo#isActive()}.
*/
public static final String COLUMN_IS_ACTIVE = "isActive";
-
- /**
- * The name of the port index column, see {@link UiccPortInfo#getPortIndex()}.
- */
- public static final String COLUMN_PORT_INDEX = "portIndex";
}
/**
@@ -150,74 +98,17 @@ public class DataServiceUtils {
public static final String COLUMN_SIM_SLOT_INDEX = "simSlotIndex";
/**
- * The name of the carrier ID column, see {@link SubscriptionInfo#getCarrierId()}.
- */
- public static final String COLUMN_CARRIER_ID = "carrierId";
-
- /**
- * The name of the display name column, see {@link SubscriptionInfo#getDisplayName()}.
- */
- public static final String COLUMN_DISPLAY_NAME = "displayName";
-
- /**
- * The name of the carrier name column, see {@link SubscriptionInfo#getCarrierName()}.
- */
- public static final String COLUMN_CARRIER_NAME = "carrierName";
-
- /**
- * The name of the data roaming state column, see
- * {@link SubscriptionInfo#getDataRoaming()}.
- */
- public static final String COLUMN_DATA_ROAMING = "dataRoaming";
-
- /**
- * The name of the mcc column, see {@link SubscriptionInfo#getMccString()}.
- */
- public static final String COLUMN_MCC = "mcc";
-
- /**
- * The name of the mnc column, see {@link SubscriptionInfo#getMncString()}.
- */
- public static final String COLUMN_MNC = "mnc";
-
- /**
- * The name of the country ISO column, see {@link SubscriptionInfo#getCountryIso()}.
- */
- public static final String COLUMN_COUNTRY_ISO = "countryIso";
-
- /**
* The name of the embedded state column, see {@link SubscriptionInfo#isEmbedded()}.
*/
public static final String COLUMN_IS_EMBEDDED = "isEmbedded";
/**
- * The name of the card ID column, see {@link SubscriptionInfo#getCardId()}.
- */
- public static final String COLUMN_CARD_ID = "cardId";
-
- /**
- * The name of the port index column, see {@link SubscriptionInfo#getPortIndex()}.
- */
- public static final String COLUMN_PORT_INDEX = "portIndex";
-
- /**
* The name of the opportunistic state column, see
* {@link SubscriptionInfo#isOpportunistic()}.
*/
public static final String COLUMN_IS_OPPORTUNISTIC = "isOpportunistic";
/**
- * The name of the groupUUID column, see {@link SubscriptionInfo#getGroupUuid()}.
- */
- public static final String COLUMN_GROUP_UUID = "groupUUID";
-
- /**
- * The name of the subscription type column, see
- * {@link SubscriptionInfo#getSubscriptionType()}}.
- */
- public static final String COLUMN_SUBSCRIPTION_TYPE = "subscriptionType";
-
- /**
* The name of the uniqueName column,
* {@see SubscriptionUtil#getUniqueSubscriptionDisplayName(SubscriptionInfo, Context)}.
*/
@@ -231,19 +122,6 @@ public class DataServiceUtils {
public static final String COLUMN_IS_SUBSCRIPTION_VISIBLE = "isSubscriptionVisible";
/**
- * The name of the formatted phone number column,
- * {@see SubscriptionUtil#getFormattedPhoneNumber(Context, SubscriptionInfo)}.
- */
- public static final String COLUMN_FORMATTED_PHONE_NUMBER = "getFormattedPhoneNumber";
-
- /**
- * The name of the first removable subscription state column,
- * {@see SubscriptionUtil#getFirstRemovableSubscription(Context)}.
- */
- public static final String COLUMN_IS_FIRST_REMOVABLE_SUBSCRIPTION =
- "isFirstRemovableSubscription";
-
- /**
* The name of the default subscription selection column,
* {@see SubscriptionUtil#getSubscriptionOrDefault(Context, int)}.
*/
@@ -257,24 +135,12 @@ public class DataServiceUtils {
public static final String COLUMN_IS_VALID_SUBSCRIPTION = "isValidSubscription";
/**
- * The name of the usable subscription column,
- * {@link SubscriptionManager#isUsableSubscriptionId(int)}.
- */
- public static final String COLUMN_IS_USABLE_SUBSCRIPTION = "isUsableSubscription";
-
- /**
* The name of the active subscription column,
* {@link SubscriptionManager#isActiveSubscriptionId(int)}.
*/
public static final String COLUMN_IS_ACTIVE_SUBSCRIPTION_ID = "isActiveSubscription";
/**
- * The name of the available subscription column,
- * {@see SubscriptionUtil#getAvailableSubscription(Context, ProxySubscriptionManager, int)}.
- */
- public static final String COLUMN_IS_AVAILABLE_SUBSCRIPTION = "isAvailableSubscription";
-
- /**
* The name of the active data subscription state column, see
* {@link SubscriptionManager#getActiveDataSubscriptionId()}.
*/
diff --git a/packages/SettingsLib/src/com/android/settingslib/mobile/dataservice/MobileNetworkDatabase.java b/packages/SettingsLib/src/com/android/settingslib/mobile/dataservice/MobileNetworkDatabase.java
index c92204fa1f39..5f7fa278082b 100644
--- a/packages/SettingsLib/src/com/android/settingslib/mobile/dataservice/MobileNetworkDatabase.java
+++ b/packages/SettingsLib/src/com/android/settingslib/mobile/dataservice/MobileNetworkDatabase.java
@@ -19,14 +19,13 @@ package com.android.settingslib.mobile.dataservice;
import android.content.Context;
import android.util.Log;
-import java.util.List;
-import java.util.Objects;
-
import androidx.lifecycle.LiveData;
import androidx.room.Database;
import androidx.room.Room;
import androidx.room.RoomDatabase;
-import androidx.sqlite.db.SupportSQLiteDatabase;
+
+import java.util.List;
+import java.util.Objects;
@Database(entities = {SubscriptionInfoEntity.class, UiccInfoEntity.class,
MobileNetworkInfoEntity.class}, exportSchema = false, version = 1)
@@ -132,13 +131,6 @@ public abstract class MobileNetworkDatabase extends RoomDatabase {
}
/**
- * Query the UICC info by the subscription ID from the UiccInfoEntity table.
- */
- public LiveData<UiccInfoEntity> queryUiccInfoById(String id) {
- return mUiccInfoDao().queryUiccInfoById(id);
- }
-
- /**
* Delete the subscriptionInfo info by the subscription ID from the SubscriptionInfoEntity
* table.
*/
diff --git a/packages/SettingsLib/src/com/android/settingslib/mobile/dataservice/SubscriptionInfoDao.java b/packages/SettingsLib/src/com/android/settingslib/mobile/dataservice/SubscriptionInfoDao.java
index e6b1cfb440fa..060eab6681c6 100644
--- a/packages/SettingsLib/src/com/android/settingslib/mobile/dataservice/SubscriptionInfoDao.java
+++ b/packages/SettingsLib/src/com/android/settingslib/mobile/dataservice/SubscriptionInfoDao.java
@@ -40,15 +40,6 @@ public interface SubscriptionInfoDao {
+ DataServiceUtils.SubscriptionInfoData.COLUMN_ID + " = :subId")
SubscriptionInfoEntity querySubInfoById(String subId);
- @Query("SELECT * FROM " + DataServiceUtils.SubscriptionInfoData.TABLE_NAME + " WHERE "
- + DataServiceUtils.SubscriptionInfoData.COLUMN_IS_ACTIVE_SUBSCRIPTION_ID
- + " = :isActiveSubscription" + " AND "
- + DataServiceUtils.SubscriptionInfoData.COLUMN_IS_SUBSCRIPTION_VISIBLE
- + " = :isSubscriptionVisible" + " ORDER BY "
- + DataServiceUtils.SubscriptionInfoData.COLUMN_SIM_SLOT_INDEX)
- LiveData<List<SubscriptionInfoEntity>> queryActiveSubInfos(
- boolean isActiveSubscription, boolean isSubscriptionVisible);
-
@Query("SELECT COUNT(*) FROM " + DataServiceUtils.SubscriptionInfoData.TABLE_NAME)
int count();
diff --git a/packages/SettingsLib/src/com/android/settingslib/mobile/dataservice/SubscriptionInfoEntity.java b/packages/SettingsLib/src/com/android/settingslib/mobile/dataservice/SubscriptionInfoEntity.java
index 361a24612b3a..88e6a57bf45b 100644
--- a/packages/SettingsLib/src/com/android/settingslib/mobile/dataservice/SubscriptionInfoEntity.java
+++ b/packages/SettingsLib/src/com/android/settingslib/mobile/dataservice/SubscriptionInfoEntity.java
@@ -19,7 +19,6 @@ package com.android.settingslib.mobile.dataservice;
import android.text.TextUtils;
import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.PrimaryKey;
@@ -28,39 +27,19 @@ import java.util.Objects;
@Entity(tableName = DataServiceUtils.SubscriptionInfoData.TABLE_NAME)
public class SubscriptionInfoEntity {
- public SubscriptionInfoEntity(@NonNull String subId, int simSlotIndex, int carrierId,
- String displayName, String carrierName, int dataRoaming, String mcc, String mnc,
- String countryIso, boolean isEmbedded, int cardId, int portIndex,
- boolean isOpportunistic, @Nullable String groupUUID, int subscriptionType,
- String uniqueName, boolean isSubscriptionVisible, @Nullable String formattedPhoneNumber,
- boolean isFirstRemovableSubscription, boolean isDefaultSubscriptionSelection,
- boolean isValidSubscription, boolean isUsableSubscription,
- boolean isActiveSubscriptionId, boolean isAvailableSubscription,
- boolean isActiveDataSubscriptionId) {
+ public SubscriptionInfoEntity(@NonNull String subId, int simSlotIndex, boolean isEmbedded,
+ boolean isOpportunistic, String uniqueName, boolean isSubscriptionVisible,
+ boolean isDefaultSubscriptionSelection, boolean isValidSubscription,
+ boolean isActiveSubscriptionId, boolean isActiveDataSubscriptionId) {
this.subId = subId;
this.simSlotIndex = simSlotIndex;
- this.carrierId = carrierId;
- this.displayName = displayName;
- this.carrierName = carrierName;
- this.dataRoaming = dataRoaming;
- this.mcc = mcc;
- this.mnc = mnc;
- this.countryIso = countryIso;
this.isEmbedded = isEmbedded;
- this.cardId = cardId;
- this.portIndex = portIndex;
this.isOpportunistic = isOpportunistic;
- this.groupUUID = groupUUID;
- this.subscriptionType = subscriptionType;
this.uniqueName = uniqueName;
this.isSubscriptionVisible = isSubscriptionVisible;
- this.formattedPhoneNumber = formattedPhoneNumber;
- this.isFirstRemovableSubscription = isFirstRemovableSubscription;
this.isDefaultSubscriptionSelection = isDefaultSubscriptionSelection;
this.isValidSubscription = isValidSubscription;
- this.isUsableSubscription = isUsableSubscription;
this.isActiveSubscriptionId = isActiveSubscriptionId;
- this.isAvailableSubscription = isAvailableSubscription;
this.isActiveDataSubscriptionId = isActiveDataSubscriptionId;
}
@@ -72,59 +51,18 @@ public class SubscriptionInfoEntity {
@ColumnInfo(name = DataServiceUtils.SubscriptionInfoData.COLUMN_SIM_SLOT_INDEX)
public int simSlotIndex;
- @ColumnInfo(name = DataServiceUtils.SubscriptionInfoData.COLUMN_CARRIER_ID)
- public int carrierId;
-
- @ColumnInfo(name = DataServiceUtils.SubscriptionInfoData.COLUMN_DISPLAY_NAME)
- public String displayName;
-
- @ColumnInfo(name = DataServiceUtils.SubscriptionInfoData.COLUMN_CARRIER_NAME)
- public String carrierName;
-
- @ColumnInfo(name = DataServiceUtils.SubscriptionInfoData.COLUMN_DATA_ROAMING)
- public int dataRoaming;
-
- @ColumnInfo(name = DataServiceUtils.SubscriptionInfoData.COLUMN_MCC)
- public String mcc;
-
- @ColumnInfo(name = DataServiceUtils.SubscriptionInfoData.COLUMN_MNC)
- public String mnc;
-
- @ColumnInfo(name = DataServiceUtils.SubscriptionInfoData.COLUMN_COUNTRY_ISO)
- public String countryIso;
-
@ColumnInfo(name = DataServiceUtils.SubscriptionInfoData.COLUMN_IS_EMBEDDED)
public boolean isEmbedded;
- @ColumnInfo(name = DataServiceUtils.SubscriptionInfoData.COLUMN_CARD_ID)
- public int cardId;
-
- @ColumnInfo(name = DataServiceUtils.SubscriptionInfoData.COLUMN_PORT_INDEX)
- public int portIndex;
-
@ColumnInfo(name = DataServiceUtils.SubscriptionInfoData.COLUMN_IS_OPPORTUNISTIC)
public boolean isOpportunistic;
- @ColumnInfo(name = DataServiceUtils.SubscriptionInfoData.COLUMN_GROUP_UUID)
- @Nullable
- public String groupUUID;
-
- @ColumnInfo(name = DataServiceUtils.SubscriptionInfoData.COLUMN_SUBSCRIPTION_TYPE)
- public int subscriptionType;
-
@ColumnInfo(name = DataServiceUtils.SubscriptionInfoData.COLUMN_UNIQUE_NAME)
public String uniqueName;
@ColumnInfo(name = DataServiceUtils.SubscriptionInfoData.COLUMN_IS_SUBSCRIPTION_VISIBLE)
public boolean isSubscriptionVisible;
- @ColumnInfo(name = DataServiceUtils.SubscriptionInfoData.COLUMN_FORMATTED_PHONE_NUMBER)
- @Nullable
- public String formattedPhoneNumber;
-
- @ColumnInfo(name = DataServiceUtils.SubscriptionInfoData.COLUMN_IS_FIRST_REMOVABLE_SUBSCRIPTION)
- public boolean isFirstRemovableSubscription;
-
@ColumnInfo(name =
DataServiceUtils.SubscriptionInfoData.COLUMN_IS_DEFAULT_SUBSCRIPTION_SELECTION)
public boolean isDefaultSubscriptionSelection;
@@ -132,15 +70,9 @@ public class SubscriptionInfoEntity {
@ColumnInfo(name = DataServiceUtils.SubscriptionInfoData.COLUMN_IS_VALID_SUBSCRIPTION)
public boolean isValidSubscription;
- @ColumnInfo(name = DataServiceUtils.SubscriptionInfoData.COLUMN_IS_USABLE_SUBSCRIPTION)
- public boolean isUsableSubscription;
-
@ColumnInfo(name = DataServiceUtils.SubscriptionInfoData.COLUMN_IS_ACTIVE_SUBSCRIPTION_ID)
public boolean isActiveSubscriptionId;
- @ColumnInfo(name = DataServiceUtils.SubscriptionInfoData.COLUMN_IS_AVAILABLE_SUBSCRIPTION)
- public boolean isAvailableSubscription;
-
@ColumnInfo(name = DataServiceUtils.SubscriptionInfoData.COLUMN_IS_ACTIVE_DATA_SUBSCRIPTION)
public boolean isActiveDataSubscriptionId;
@@ -165,28 +97,13 @@ public class SubscriptionInfoEntity {
return Objects.hash(
subId,
simSlotIndex,
- carrierId,
- displayName,
- carrierName,
- dataRoaming,
- mcc,
- mnc,
- countryIso,
isEmbedded,
- cardId,
- portIndex,
isOpportunistic,
- groupUUID,
- subscriptionType,
uniqueName,
isSubscriptionVisible,
- formattedPhoneNumber,
- isFirstRemovableSubscription,
isDefaultSubscriptionSelection,
isValidSubscription,
- isUsableSubscription,
isActiveSubscriptionId,
- isAvailableSubscription,
isActiveDataSubscriptionId);
}
@@ -202,28 +119,13 @@ public class SubscriptionInfoEntity {
SubscriptionInfoEntity info = (SubscriptionInfoEntity) obj;
return TextUtils.equals(subId, info.subId)
&& simSlotIndex == info.simSlotIndex
- && carrierId == info.carrierId
- && TextUtils.equals(displayName, info.displayName)
- && TextUtils.equals(carrierName, info.carrierName)
- && dataRoaming == info.dataRoaming
- && TextUtils.equals(mcc, info.mcc)
- && TextUtils.equals(mnc, info.mnc)
- && TextUtils.equals(countryIso, info.countryIso)
&& isEmbedded == info.isEmbedded
- && cardId == info.cardId
- && portIndex == info.portIndex
&& isOpportunistic == info.isOpportunistic
- && TextUtils.equals(groupUUID, info.groupUUID)
- && subscriptionType == info.subscriptionType
&& TextUtils.equals(uniqueName, info.uniqueName)
&& isSubscriptionVisible == info.isSubscriptionVisible
- && TextUtils.equals(formattedPhoneNumber, info.formattedPhoneNumber)
- && isFirstRemovableSubscription == info.isFirstRemovableSubscription
&& isDefaultSubscriptionSelection == info.isDefaultSubscriptionSelection
&& isValidSubscription == info.isValidSubscription
- && isUsableSubscription == info.isUsableSubscription
&& isActiveSubscriptionId == info.isActiveSubscriptionId
- && isAvailableSubscription == info.isAvailableSubscription
&& isActiveDataSubscriptionId == info.isActiveDataSubscriptionId;
}
@@ -233,50 +135,20 @@ public class SubscriptionInfoEntity {
.append(subId)
.append(", simSlotIndex = ")
.append(simSlotIndex)
- .append(", carrierId = ")
- .append(carrierId)
- .append(", displayName = ")
- .append(displayName)
- .append(", carrierName = ")
- .append(carrierName)
- .append(", dataRoaming = ")
- .append(dataRoaming)
- .append(", mcc = ")
- .append(mcc)
- .append(", mnc = ")
- .append(mnc)
- .append(", countryIso = ")
- .append(countryIso)
.append(", isEmbedded = ")
.append(isEmbedded)
- .append(", cardId = ")
- .append(cardId)
- .append(", portIndex = ")
- .append(portIndex)
.append(", isOpportunistic = ")
.append(isOpportunistic)
- .append(", groupUUID = ")
- .append(groupUUID)
- .append(", subscriptionType = ")
- .append(subscriptionType)
.append(", uniqueName = ")
.append(uniqueName)
.append(", isSubscriptionVisible = ")
.append(isSubscriptionVisible)
- .append(", formattedPhoneNumber = ")
- .append(formattedPhoneNumber)
- .append(", isFirstRemovableSubscription = ")
- .append(isFirstRemovableSubscription)
.append(", isDefaultSubscriptionSelection = ")
.append(isDefaultSubscriptionSelection)
.append(", isValidSubscription = ")
.append(isValidSubscription)
- .append(", isUsableSubscription = ")
- .append(isUsableSubscription)
.append(", isActiveSubscriptionId = ")
.append(isActiveSubscriptionId)
- .append(", isAvailableSubscription = ")
- .append(isAvailableSubscription)
.append(", isActiveDataSubscriptionId = ")
.append(isActiveDataSubscriptionId)
.append(")}");
diff --git a/packages/SettingsLib/src/com/android/settingslib/mobile/dataservice/UiccInfoDao.java b/packages/SettingsLib/src/com/android/settingslib/mobile/dataservice/UiccInfoDao.java
index 7e60421d0ab4..90e5189fdf1d 100644
--- a/packages/SettingsLib/src/com/android/settingslib/mobile/dataservice/UiccInfoDao.java
+++ b/packages/SettingsLib/src/com/android/settingslib/mobile/dataservice/UiccInfoDao.java
@@ -16,14 +16,14 @@
package com.android.settingslib.mobile.dataservice;
-import java.util.List;
-
import androidx.lifecycle.LiveData;
import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;
+import java.util.List;
+
@Dao
public interface UiccInfoDao {
@@ -34,14 +34,6 @@ public interface UiccInfoDao {
+ DataServiceUtils.UiccInfoData.COLUMN_ID)
LiveData<List<UiccInfoEntity>> queryAllUiccInfos();
- @Query("SELECT * FROM " + DataServiceUtils.UiccInfoData.TABLE_NAME + " WHERE "
- + DataServiceUtils.UiccInfoData.COLUMN_ID + " = :subId")
- LiveData<UiccInfoEntity> queryUiccInfoById(String subId);
-
- @Query("SELECT * FROM " + DataServiceUtils.UiccInfoData.TABLE_NAME + " WHERE "
- + DataServiceUtils.UiccInfoData.COLUMN_IS_EUICC + " = :isEuicc")
- LiveData<List<UiccInfoEntity>> queryUiccInfosByEuicc(boolean isEuicc);
-
@Query("SELECT COUNT(*) FROM " + DataServiceUtils.UiccInfoData.TABLE_NAME)
int count();
diff --git a/packages/SettingsLib/src/com/android/settingslib/mobile/dataservice/UiccInfoEntity.java b/packages/SettingsLib/src/com/android/settingslib/mobile/dataservice/UiccInfoEntity.java
index 2ccf295007dc..0f80edf52d80 100644
--- a/packages/SettingsLib/src/com/android/settingslib/mobile/dataservice/UiccInfoEntity.java
+++ b/packages/SettingsLib/src/com/android/settingslib/mobile/dataservice/UiccInfoEntity.java
@@ -26,20 +26,9 @@ import androidx.room.PrimaryKey;
@Entity(tableName = DataServiceUtils.UiccInfoData.TABLE_NAME)
public class UiccInfoEntity {
- public UiccInfoEntity(@NonNull String subId, @NonNull String physicalSlotIndex,
- int logicalSlotIndex, int cardId, boolean isEuicc,
- boolean isMultipleEnabledProfilesSupported, int cardState, boolean isRemovable,
- boolean isActive, int portIndex) {
+ public UiccInfoEntity(@NonNull String subId, boolean isActive) {
this.subId = subId;
- this.physicalSlotIndex = physicalSlotIndex;
- this.logicalSlotIndex = logicalSlotIndex;
- this.cardId = cardId;
- this.isEuicc = isEuicc;
- this.isMultipleEnabledProfilesSupported = isMultipleEnabledProfilesSupported;
- this.cardState = cardState;
- this.isRemovable = isRemovable;
this.isActive = isActive;
- this.portIndex = portIndex;
}
@PrimaryKey
@@ -47,48 +36,14 @@ public class UiccInfoEntity {
@NonNull
public String subId;
- @ColumnInfo(name = DataServiceUtils.UiccInfoData.COLUMN_PHYSICAL_SLOT_INDEX)
- @NonNull
- public String physicalSlotIndex;
-
- @ColumnInfo(name = DataServiceUtils.UiccInfoData.COLUMN_LOGICAL_SLOT_INDEX)
- public int logicalSlotIndex;
-
- @ColumnInfo(name = DataServiceUtils.UiccInfoData.COLUMN_CARD_ID)
- public int cardId;
-
- @ColumnInfo(name = DataServiceUtils.UiccInfoData.COLUMN_IS_EUICC)
- public boolean isEuicc;
-
- @ColumnInfo(name = DataServiceUtils.UiccInfoData.COLUMN_IS_MULTIPLE_ENABLED_PROFILES_SUPPORTED)
- public boolean isMultipleEnabledProfilesSupported;
-
- @ColumnInfo(name = DataServiceUtils.UiccInfoData.COLUMN_CARD_STATE)
- public int cardState;
-
- @ColumnInfo(name = DataServiceUtils.UiccInfoData.COLUMN_IS_REMOVABLE)
- public boolean isRemovable;
-
@ColumnInfo(name = DataServiceUtils.UiccInfoData.COLUMN_IS_ACTIVE)
public boolean isActive;
- @ColumnInfo(name = DataServiceUtils.UiccInfoData.COLUMN_PORT_INDEX)
- public int portIndex;
-
-
@Override
public int hashCode() {
int result = 17;
result = 31 * result + subId.hashCode();
- result = 31 * result + physicalSlotIndex.hashCode();
- result = 31 * result + logicalSlotIndex;
- result = 31 * result + cardId;
- result = 31 * result + Boolean.hashCode(isEuicc);
- result = 31 * result + Boolean.hashCode(isMultipleEnabledProfilesSupported);
- result = 31 * result + cardState;
- result = 31 * result + Boolean.hashCode(isRemovable);
result = 31 * result + Boolean.hashCode(isActive);
- result = 31 * result + portIndex;
return result;
}
@@ -102,40 +57,15 @@ public class UiccInfoEntity {
}
UiccInfoEntity info = (UiccInfoEntity) obj;
- return TextUtils.equals(subId, info.subId)
- && TextUtils.equals(physicalSlotIndex, info.physicalSlotIndex)
- && logicalSlotIndex == info.logicalSlotIndex
- && cardId == info.cardId
- && isEuicc == info.isEuicc
- && isMultipleEnabledProfilesSupported == info.isMultipleEnabledProfilesSupported
- && cardState == info.cardState
- && isRemovable == info.isRemovable
- && isActive == info.isActive
- && portIndex == info.portIndex;
+ return TextUtils.equals(subId, info.subId) && isActive == info.isActive;
}
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append(" {UiccInfoEntity(subId = ")
.append(subId)
- .append(", logicalSlotIndex = ")
- .append(physicalSlotIndex)
- .append(", logicalSlotIndex = ")
- .append(logicalSlotIndex)
- .append(", cardId = ")
- .append(cardId)
- .append(", isEuicc = ")
- .append(isEuicc)
- .append(", isMultipleEnabledProfilesSupported = ")
- .append(isMultipleEnabledProfilesSupported)
- .append(", cardState = ")
- .append(cardState)
- .append(", isRemovable = ")
- .append(isRemovable)
.append(", isActive = ")
.append(isActive)
- .append(", portIndex = ")
- .append(portIndex)
.append(")}");
return builder.toString();
}
diff --git a/packages/SettingsLib/src/com/android/settingslib/notification/data/repository/FakeZenModeRepository.kt b/packages/SettingsLib/src/com/android/settingslib/notification/data/repository/FakeZenModeRepository.kt
index 7f6a8ed1718e..49b974fa3f00 100644
--- a/packages/SettingsLib/src/com/android/settingslib/notification/data/repository/FakeZenModeRepository.kt
+++ b/packages/SettingsLib/src/com/android/settingslib/notification/data/repository/FakeZenModeRepository.kt
@@ -18,6 +18,10 @@ package com.android.settingslib.notification.data.repository
import android.app.NotificationManager
import android.provider.Settings
+import com.android.settingslib.notification.modes.TestModeBuilder
+import com.android.settingslib.notification.modes.ZenMode
+import java.time.Duration
+import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.asStateFlow
@@ -32,6 +36,10 @@ class FakeZenModeRepository : ZenModeRepository {
override val globalZenMode: StateFlow<Int>
get() = mutableZenMode.asStateFlow()
+ private val mutableModesFlow: MutableStateFlow<List<ZenMode>> = MutableStateFlow(listOf())
+ override val modes: Flow<List<ZenMode>>
+ get() = mutableModesFlow.asStateFlow()
+
init {
updateNotificationPolicy()
}
@@ -43,6 +51,38 @@ class FakeZenModeRepository : ZenModeRepository {
fun updateZenMode(zenMode: Int) {
mutableZenMode.value = zenMode
}
+
+ fun addModes(zenModes: List<ZenMode>) {
+ mutableModesFlow.value += zenModes
+ }
+
+ fun addMode(id: String, active: Boolean = false) {
+ mutableModesFlow.value += newMode(id, active)
+ }
+
+ fun removeMode(id: String) {
+ mutableModesFlow.value = mutableModesFlow.value.filter { it.id != id }
+ }
+
+ override fun activateMode(zenMode: ZenMode, duration: Duration?) {
+ activateMode(zenMode.id)
+ }
+
+ override fun deactivateMode(zenMode: ZenMode) {
+ deactivateMode(zenMode.id)
+ }
+
+ fun activateMode(id: String) {
+ val oldMode = mutableModesFlow.value.find { it.id == id } ?: return
+ removeMode(id)
+ mutableModesFlow.value += TestModeBuilder(oldMode).setActive(true).build()
+ }
+
+ fun deactivateMode(id: String) {
+ val oldMode = mutableModesFlow.value.find { it.id == id } ?: return
+ removeMode(id)
+ mutableModesFlow.value += TestModeBuilder(oldMode).setActive(false).build()
+ }
}
fun FakeZenModeRepository.updateNotificationPolicy(
@@ -61,5 +101,8 @@ fun FakeZenModeRepository.updateNotificationPolicy(
suppressedVisualEffects,
state,
priorityConversationSenders,
- )
- )
+ ))
+
+private fun newMode(id: String, active: Boolean = false): ZenMode {
+ return TestModeBuilder().setId(id).setName("Mode $id").setActive(active).build()
+}
diff --git a/packages/SettingsLib/src/com/android/settingslib/notification/data/repository/ZenModeRepository.kt b/packages/SettingsLib/src/com/android/settingslib/notification/data/repository/ZenModeRepository.kt
index 58541418d812..0ff7f84a08b9 100644
--- a/packages/SettingsLib/src/com/android/settingslib/notification/data/repository/ZenModeRepository.kt
+++ b/packages/SettingsLib/src/com/android/settingslib/notification/data/repository/ZenModeRepository.kt
@@ -16,19 +16,31 @@
package com.android.settingslib.notification.data.repository
+import android.annotation.SuppressLint
import android.app.NotificationManager
+import android.app.NotificationManager.EXTRA_NOTIFICATION_POLICY
import android.content.BroadcastReceiver
+import android.content.ContentResolver
import android.content.Context
import android.content.Intent
import android.content.IntentFilter
+import android.database.ContentObserver
+import android.os.Handler
+import android.provider.Settings
import com.android.settingslib.flags.Flags
+import com.android.settingslib.notification.modes.ZenMode
+import com.android.settingslib.notification.modes.ZenModesBackend
+import java.time.Duration
import kotlin.coroutines.CoroutineContext
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.channels.awaitClose
+import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.callbackFlow
+import kotlinx.coroutines.flow.distinctUntilChanged
import kotlinx.coroutines.flow.filter
+import kotlinx.coroutines.flow.flowOf
import kotlinx.coroutines.flow.flowOn
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.onStart
@@ -43,21 +55,34 @@ interface ZenModeRepository {
/** @see NotificationManager.getZenMode */
val globalZenMode: StateFlow<Int?>
+
+ /** A list of all existing priority modes. */
+ val modes: Flow<List<ZenMode>>
+
+ fun activateMode(zenMode: ZenMode, duration: Duration? = null)
+
+ fun deactivateMode(zenMode: ZenMode)
}
+@SuppressLint("SharedFlowCreation")
class ZenModeRepositoryImpl(
private val context: Context,
private val notificationManager: NotificationManager,
+ private val backend: ZenModesBackend,
+ private val contentResolver: ContentResolver,
val scope: CoroutineScope,
val backgroundCoroutineContext: CoroutineContext,
+ // This is nullable just to simplify testing, since SettingsLib doesn't have a good way
+ // to create a fake handler.
+ val backgroundHandler: Handler?,
) : ZenModeRepository {
- private val notificationBroadcasts =
+ private val notificationBroadcasts by lazy {
callbackFlow {
val receiver =
object : BroadcastReceiver() {
override fun onReceive(context: Context?, intent: Intent?) {
- intent?.action?.let { action -> launch { send(action) } }
+ intent?.let { launch { send(it) } }
}
}
@@ -69,42 +94,101 @@ class ZenModeRepositoryImpl(
if (Flags.volumePanelBroadcastFix() && android.app.Flags.modesApi())
addAction(
NotificationManager.ACTION_CONSOLIDATED_NOTIFICATION_POLICY_CHANGED)
- })
+ },
+ /* broadcastPermission = */ null,
+ /* scheduler = */ if (Flags.volumePanelBroadcastFix()) {
+ backgroundHandler
+ } else {
+ null
+ },
+ )
awaitClose { context.unregisterReceiver(receiver) }
}
.let {
if (Flags.volumePanelBroadcastFix()) {
+ // Share the flow to avoid having multiple broadcasts.
it.flowOn(backgroundCoroutineContext)
- .stateIn(scope, SharingStarted.WhileSubscribed(), null)
+ .shareIn(started = SharingStarted.WhileSubscribed(), scope = scope)
} else {
- it.shareIn(
- started = SharingStarted.WhileSubscribed(),
- scope = scope,
- )
+ it.shareIn(started = SharingStarted.WhileSubscribed(), scope = scope)
}
}
+ }
- override val consolidatedNotificationPolicy: StateFlow<NotificationManager.Policy?> =
+ override val consolidatedNotificationPolicy: StateFlow<NotificationManager.Policy?> by lazy {
if (Flags.volumePanelBroadcastFix() && android.app.Flags.modesApi())
flowFromBroadcast(NotificationManager.ACTION_CONSOLIDATED_NOTIFICATION_POLICY_CHANGED) {
- notificationManager.consolidatedNotificationPolicy
+ // If available, get the value from extras to avoid a potential binder call.
+ it?.extras?.getParcelable(EXTRA_NOTIFICATION_POLICY)
+ ?: notificationManager.consolidatedNotificationPolicy
}
else
flowFromBroadcast(NotificationManager.ACTION_NOTIFICATION_POLICY_CHANGED) {
notificationManager.consolidatedNotificationPolicy
}
+ }
- override val globalZenMode: StateFlow<Int?> =
+ override val globalZenMode: StateFlow<Int?> by lazy {
flowFromBroadcast(NotificationManager.ACTION_INTERRUPTION_FILTER_CHANGED) {
notificationManager.zenMode
}
+ }
- private fun <T> flowFromBroadcast(intentAction: String, mapper: () -> T) =
+ private fun <T> flowFromBroadcast(intentAction: String, mapper: (Intent?) -> T) =
notificationBroadcasts
- .filter { intentAction == it }
- .map { mapper() }
- .onStart { emit(mapper()) }
+ .filter { intentAction == it.action }
+ .map { mapper(it) }
+ .onStart { emit(mapper(null)) }
.flowOn(backgroundCoroutineContext)
.stateIn(scope, SharingStarted.WhileSubscribed(), null)
+
+ private val zenConfigChanged by lazy {
+ if (android.app.Flags.modesUi()) {
+ callbackFlow {
+ // emit an initial value
+ trySend(Unit)
+
+ val observer =
+ object : ContentObserver(backgroundHandler) {
+ override fun onChange(selfChange: Boolean) {
+ trySend(Unit)
+ }
+ }
+
+ contentResolver.registerContentObserver(
+ Settings.Global.getUriFor(Settings.Global.ZEN_MODE),
+ /* notifyForDescendants= */ false,
+ observer)
+ contentResolver.registerContentObserver(
+ Settings.Global.getUriFor(Settings.Global.ZEN_MODE_CONFIG_ETAG),
+ /* notifyForDescendants= */ false,
+ observer)
+
+ awaitClose { contentResolver.unregisterContentObserver(observer) }
+ }
+ .flowOn(backgroundCoroutineContext)
+ } else {
+ flowOf(Unit)
+ }
+ }
+
+ override val modes: Flow<List<ZenMode>> by lazy {
+ if (android.app.Flags.modesUi()) {
+ zenConfigChanged
+ .map { backend.modes }
+ .distinctUntilChanged()
+ .flowOn(backgroundCoroutineContext)
+ } else {
+ flowOf(emptyList())
+ }
+ }
+
+ override fun activateMode(zenMode: ZenMode, duration: Duration?) {
+ backend.activateMode(zenMode, duration)
+ }
+
+ override fun deactivateMode(zenMode: ZenMode) {
+ backend.deactivateMode(zenMode)
+ }
}
diff --git a/packages/SettingsLib/src/com/android/settingslib/notification/modes/TestModeBuilder.java b/packages/SettingsLib/src/com/android/settingslib/notification/modes/TestModeBuilder.java
new file mode 100644
index 000000000000..2f7cdd617081
--- /dev/null
+++ b/packages/SettingsLib/src/com/android/settingslib/notification/modes/TestModeBuilder.java
@@ -0,0 +1,183 @@
+/*
+ * 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.notification.modes;
+
+import android.app.AutomaticZenRule;
+import android.app.NotificationManager;
+import android.content.ComponentName;
+import android.net.Uri;
+import android.service.notification.Condition;
+import android.service.notification.ZenDeviceEffects;
+import android.service.notification.ZenModeConfig;
+import android.service.notification.ZenPolicy;
+
+import androidx.annotation.DrawableRes;
+import androidx.annotation.Nullable;
+
+import java.util.Random;
+
+public class TestModeBuilder {
+
+ private String mId;
+ private AutomaticZenRule mRule;
+ private ZenModeConfig.ZenRule mConfigZenRule;
+
+ public static final ZenMode EXAMPLE = new TestModeBuilder().build();
+ public static final ZenMode MANUAL_DND = ZenMode.manualDndMode(
+ new AutomaticZenRule.Builder("Manual DND", Uri.parse("rule://dnd"))
+ .setInterruptionFilter(NotificationManager.INTERRUPTION_FILTER_PRIORITY)
+ .setZenPolicy(new ZenPolicy.Builder().disallowAllSounds().build())
+ .build(),
+ true /* isActive */
+ );
+
+ public TestModeBuilder() {
+ // Reasonable defaults
+ int id = new Random().nextInt(1000);
+ mId = "rule_" + id;
+ mRule = new AutomaticZenRule.Builder("Test Rule #" + id, Uri.parse("rule://" + id))
+ .setPackage("some_package")
+ .setInterruptionFilter(NotificationManager.INTERRUPTION_FILTER_PRIORITY)
+ .setZenPolicy(new ZenPolicy.Builder().disallowAllSounds().build())
+ .build();
+ mConfigZenRule = new ZenModeConfig.ZenRule();
+ mConfigZenRule.enabled = true;
+ mConfigZenRule.pkg = "some_package";
+ }
+
+ public TestModeBuilder(ZenMode previous) {
+ mId = previous.getId();
+ mRule = previous.getRule();
+
+ mConfigZenRule = new ZenModeConfig.ZenRule();
+ mConfigZenRule.enabled = previous.getRule().isEnabled();
+ mConfigZenRule.pkg = previous.getRule().getPackageName();
+ setActive(previous.isActive());
+ }
+
+ public TestModeBuilder setId(String id) {
+ mId = id;
+ return this;
+ }
+
+ public TestModeBuilder setAzr(AutomaticZenRule rule) {
+ mRule = rule;
+ mConfigZenRule.pkg = rule.getPackageName();
+ mConfigZenRule.conditionId = rule.getConditionId();
+ mConfigZenRule.enabled = rule.isEnabled();
+ return this;
+ }
+
+ public TestModeBuilder setConfigZenRule(ZenModeConfig.ZenRule configZenRule) {
+ mConfigZenRule = configZenRule;
+ return this;
+ }
+
+ public TestModeBuilder setName(String name) {
+ mRule.setName(name);
+ mConfigZenRule.name = name;
+ return this;
+ }
+
+ public TestModeBuilder setPackage(String pkg) {
+ mRule.setPackageName(pkg);
+ mConfigZenRule.pkg = pkg;
+ return this;
+ }
+
+ public TestModeBuilder setOwner(ComponentName owner) {
+ mRule.setOwner(owner);
+ mConfigZenRule.component = owner;
+ return this;
+ }
+
+ public TestModeBuilder setConfigurationActivity(ComponentName configActivity) {
+ mRule.setConfigurationActivity(configActivity);
+ mConfigZenRule.configurationActivity = configActivity;
+ return this;
+ }
+
+ public TestModeBuilder setConditionId(Uri conditionId) {
+ mRule.setConditionId(conditionId);
+ mConfigZenRule.conditionId = conditionId;
+ return this;
+ }
+
+ public TestModeBuilder setType(@AutomaticZenRule.Type int type) {
+ mRule.setType(type);
+ mConfigZenRule.type = type;
+ return this;
+ }
+
+ public TestModeBuilder setInterruptionFilter(
+ @NotificationManager.InterruptionFilter int interruptionFilter) {
+ mRule.setInterruptionFilter(interruptionFilter);
+ mConfigZenRule.zenMode = NotificationManager.zenModeFromInterruptionFilter(
+ interruptionFilter, NotificationManager.INTERRUPTION_FILTER_PRIORITY);
+ return this;
+ }
+
+ public TestModeBuilder setZenPolicy(@Nullable ZenPolicy policy) {
+ mRule.setZenPolicy(policy);
+ mConfigZenRule.zenPolicy = policy;
+ return this;
+ }
+
+ public TestModeBuilder setDeviceEffects(@Nullable ZenDeviceEffects deviceEffects) {
+ mRule.setDeviceEffects(deviceEffects);
+ mConfigZenRule.zenDeviceEffects = deviceEffects;
+ return this;
+ }
+
+ public TestModeBuilder setEnabled(boolean enabled) {
+ mRule.setEnabled(enabled);
+ mConfigZenRule.enabled = enabled;
+ return this;
+ }
+
+ public TestModeBuilder setManualInvocationAllowed(boolean allowed) {
+ mRule.setManualInvocationAllowed(allowed);
+ mConfigZenRule.allowManualInvocation = allowed;
+ return this;
+ }
+
+ public TestModeBuilder setTriggerDescription(@Nullable String triggerDescription) {
+ mRule.setTriggerDescription(triggerDescription);
+ mConfigZenRule.triggerDescription = triggerDescription;
+ return this;
+ }
+
+ public TestModeBuilder setIconResId(@DrawableRes int iconResId) {
+ mRule.setIconResId(iconResId);
+ return this;
+ }
+
+ public TestModeBuilder setActive(boolean active) {
+ if (active) {
+ mConfigZenRule.enabled = true;
+ mConfigZenRule.condition = new Condition(mRule.getConditionId(), "...",
+ Condition.STATE_TRUE);
+ } else {
+ mConfigZenRule.condition = null;
+ }
+ return this;
+ }
+
+ public ZenMode build() {
+ return new ZenMode(mId, mRule, mConfigZenRule);
+ }
+}
diff --git a/packages/SettingsLib/src/com/android/settingslib/notification/modes/ZenMode.java b/packages/SettingsLib/src/com/android/settingslib/notification/modes/ZenMode.java
index 2cc911234404..03a2b7526f62 100644
--- a/packages/SettingsLib/src/com/android/settingslib/notification/modes/ZenMode.java
+++ b/packages/SettingsLib/src/com/android/settingslib/notification/modes/ZenMode.java
@@ -286,11 +286,7 @@ public class ZenMode implements Parcelable {
mRule, oldCondition, conditionId));
}
- public boolean canEditName() {
- return !isManualDnd();
- }
-
- public boolean canEditIcon() {
+ public boolean canEditNameAndIcon() {
return !isManualDnd();
}
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 9dbf23eba7a5..eb33a7a10524 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
@@ -16,33 +16,84 @@
package com.android.settingslib.volume.data.repository
+import android.bluetooth.BluetoothAdapter
+import android.bluetooth.BluetoothCsipSetCoordinator
+import android.bluetooth.BluetoothDevice
import android.bluetooth.BluetoothLeBroadcast
import android.bluetooth.BluetoothLeBroadcastMetadata
+import android.bluetooth.BluetoothProfile
+import android.bluetooth.BluetoothVolumeControl
+import android.content.ContentResolver
+import android.content.Context
+import android.database.ContentObserver
+import android.provider.Settings
+import androidx.annotation.IntRange
import com.android.internal.util.ConcurrentUtils
+import com.android.settingslib.bluetooth.BluetoothUtils
import com.android.settingslib.bluetooth.LocalBluetoothManager
+import com.android.settingslib.bluetooth.onProfileConnectionStateChanged
+import com.android.settingslib.bluetooth.onSourceConnectedOrRemoved
import com.android.settingslib.flags.Flags
+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
import kotlin.coroutines.CoroutineContext
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.channels.awaitClose
import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.SharingStarted
+import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.callbackFlow
+import kotlinx.coroutines.flow.distinctUntilChanged
+import kotlinx.coroutines.flow.emptyFlow
+import kotlinx.coroutines.flow.filter
+import kotlinx.coroutines.flow.flatMapLatest
import kotlinx.coroutines.flow.flowOf
import kotlinx.coroutines.flow.flowOn
+import kotlinx.coroutines.flow.map
+import kotlinx.coroutines.flow.merge
import kotlinx.coroutines.flow.onStart
+import kotlinx.coroutines.flow.runningFold
+import kotlinx.coroutines.flow.stateIn
import kotlinx.coroutines.launch
+import kotlinx.coroutines.withContext
+
+typealias GroupIdToVolumes = Map<Int, Int>
/** Provides audio sharing functionality. */
interface AudioSharingRepository {
/** Whether the device is in audio sharing. */
val inAudioSharing: Flow<Boolean>
+
+ /** The secondary headset groupId in audio sharing. */
+ val secondaryGroupId: StateFlow<Int>
+
+ /** The headset groupId to volume map during audio sharing. */
+ val volumeMap: StateFlow<GroupIdToVolumes>
+
+ /** Set the volume of secondary headset during audio sharing. */
+ suspend fun setSecondaryVolume(
+ @IntRange(from = AUDIO_SHARING_VOLUME_MIN.toLong(), to = AUDIO_SHARING_VOLUME_MAX.toLong())
+ volume: Int
+ )
+
+ companion object {
+ const val AUDIO_SHARING_VOLUME_MIN = 0
+ const val AUDIO_SHARING_VOLUME_MAX = 255
+ }
}
+@OptIn(ExperimentalCoroutinesApi::class)
class AudioSharingRepositoryImpl(
- private val localBluetoothManager: LocalBluetoothManager?,
- backgroundCoroutineContext: CoroutineContext,
+ private val context: Context,
+ private val contentResolver: ContentResolver,
+ private val btManager: LocalBluetoothManager?,
+ private val coroutineScope: CoroutineScope,
+ private val backgroundCoroutineContext: CoroutineContext,
) : AudioSharingRepository {
override val inAudioSharing: Flow<Boolean> =
if (Flags.enableLeAudioSharing()) {
- localBluetoothManager?.profileManager?.leAudioBroadcastProfile?.let { leBroadcast ->
+ btManager?.profileManager?.leAudioBroadcastProfile?.let { leBroadcast ->
callbackFlow {
val listener =
object : BluetoothLeBroadcast.Callback {
@@ -92,9 +143,117 @@ class AudioSharingRepositoryImpl(
flowOf(false)
}
+ private val primaryChange: Flow<Unit> = callbackFlow {
+ val callback =
+ object : ContentObserver(null) {
+ override fun onChange(selfChange: Boolean) {
+ launch { send(Unit) }
+ }
+ }
+ contentResolver.registerContentObserver(
+ Settings.Secure.getUriFor(BluetoothUtils.getPrimaryGroupIdUriForBroadcast()),
+ false,
+ callback)
+ awaitClose { contentResolver.unregisterContentObserver(callback) }
+ }
+
+ override val secondaryGroupId: StateFlow<Int> =
+ if (Flags.volumeDialogAudioSharingFix()) {
+ merge(
+ btManager
+ ?.profileManager
+ ?.leAudioBroadcastAssistantProfile
+ ?.onSourceConnectedOrRemoved
+ ?.map { getSecondaryGroupId() } ?: emptyFlow(),
+ btManager
+ ?.eventManager
+ ?.onProfileConnectionStateChanged
+ ?.filter { profileConnection ->
+ profileConnection.state == BluetoothAdapter.STATE_DISCONNECTED &&
+ profileConnection.bluetoothProfile ==
+ BluetoothProfile.LE_AUDIO_BROADCAST_ASSISTANT
+ }
+ ?.map { getSecondaryGroupId() } ?: emptyFlow(),
+ primaryChange.map { getSecondaryGroupId() })
+ .onStart { emit(getSecondaryGroupId()) }
+ .distinctUntilChanged()
+ .flowOn(backgroundCoroutineContext)
+ } else {
+ emptyFlow()
+ }
+ .stateIn(coroutineScope, SharingStarted.WhileSubscribed(), getSecondaryGroupId())
+
+ override val volumeMap: StateFlow<GroupIdToVolumes> =
+ if (Flags.volumeDialogAudioSharingFix()) {
+ btManager?.profileManager?.volumeControlProfile?.let { volumeControl ->
+ inAudioSharing.flatMapLatest { isSharing ->
+ if (isSharing) {
+ callbackFlow {
+ val callback =
+ object : BluetoothVolumeControl.Callback {
+ override fun onDeviceVolumeChanged(
+ device: BluetoothDevice,
+ @IntRange(
+ from = AUDIO_SHARING_VOLUME_MIN.toLong(),
+ to = AUDIO_SHARING_VOLUME_MAX.toLong())
+ volume: Int
+ ) {
+ launch { send(Pair(device, volume)) }
+ }
+ }
+ // Once registered, we will receive the initial volume of all
+ // connected BT devices on VolumeControlProfile via callbacks
+ volumeControl.registerCallback(
+ ConcurrentUtils.DIRECT_EXECUTOR, callback)
+ awaitClose { volumeControl.unregisterCallback(callback) }
+ }
+ .runningFold(emptyMap<Int, Int>()) { acc, value ->
+ val groupId =
+ BluetoothUtils.getGroupId(
+ btManager.cachedDeviceManager?.findDevice(value.first))
+ if (groupId != BluetoothCsipSetCoordinator.GROUP_ID_INVALID) {
+ acc + Pair(groupId, value.second)
+ } else {
+ acc
+ }
+ }
+ .distinctUntilChanged()
+ .flowOn(backgroundCoroutineContext)
+ } else {
+ emptyFlow()
+ }
+ }
+ } ?: emptyFlow()
+ } else {
+ emptyFlow()
+ }
+ .stateIn(coroutineScope, SharingStarted.WhileSubscribed(), emptyMap())
+
+ override suspend fun setSecondaryVolume(
+ @IntRange(from = AUDIO_SHARING_VOLUME_MIN.toLong(), to = AUDIO_SHARING_VOLUME_MAX.toLong())
+ volume: Int
+ ) {
+ withContext(backgroundCoroutineContext) {
+ if (Flags.volumeDialogAudioSharingFix()) {
+ btManager?.profileManager?.volumeControlProfile?.let {
+ // Find secondary headset and set volume.
+ val cachedDevice =
+ BluetoothUtils.getSecondaryDeviceForBroadcast(context, btManager)
+ if (cachedDevice != null) {
+ it.setDeviceVolume(cachedDevice.device, volume, /* isGroupOp= */ true)
+ }
+ }
+ }
+ }
+ }
+
private fun isBroadcasting(): Boolean {
return Flags.enableLeAudioSharing() &&
- (localBluetoothManager?.profileManager?.leAudioBroadcastProfile?.isEnabled(null)
- ?: false)
+ (btManager?.profileManager?.leAudioBroadcastProfile?.isEnabled(null) ?: false)
+ }
+
+ private fun getSecondaryGroupId(): Int {
+ return BluetoothUtils.getGroupId(
+ BluetoothUtils.getSecondaryDeviceForBroadcast(context, btManager))
}
}
diff --git a/packages/SettingsLib/tests/integ/src/com/android/settingslib/inputmethod/InputMethodPreferenceTest.java b/packages/SettingsLib/tests/integ/src/com/android/settingslib/inputmethod/InputMethodPreferenceTest.java
index 1e75014d2017..3906749ae494 100644
--- a/packages/SettingsLib/tests/integ/src/com/android/settingslib/inputmethod/InputMethodPreferenceTest.java
+++ b/packages/SettingsLib/tests/integ/src/com/android/settingslib/inputmethod/InputMethodPreferenceTest.java
@@ -24,9 +24,9 @@ import android.os.UserHandle;
import android.view.inputmethod.InputMethodInfo;
import android.view.inputmethod.InputMethodSubtype;
-import androidx.test.InstrumentationRegistry;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
-import androidx.test.runner.AndroidJUnit4;
+import androidx.test.platform.app.InstrumentationRegistry;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -109,7 +109,7 @@ public class InputMethodPreferenceTest {
final boolean systemIme,
final String name) {
return new InputMethodPreference(
- InstrumentationRegistry.getTargetContext(),
+ InstrumentationRegistry.getInstrumentation().getTargetContext(),
createInputMethodInfo(systemIme, name),
title,
true /* isAllowedByOrganization */,
@@ -119,7 +119,8 @@ public class InputMethodPreferenceTest {
private static InputMethodInfo createInputMethodInfo(
final boolean systemIme, final String name) {
- final Context targetContext = InstrumentationRegistry.getTargetContext();
+ final Context targetContext =
+ InstrumentationRegistry.getInstrumentation().getTargetContext();
final Locale systemLocale = targetContext
.getResources()
.getConfiguration()
diff --git a/packages/SettingsLib/tests/integ/src/com/android/settingslib/inputmethod/InputMethodSubtypePreferenceTest.java b/packages/SettingsLib/tests/integ/src/com/android/settingslib/inputmethod/InputMethodSubtypePreferenceTest.java
index f1c0beae0dc0..2c3478d6e235 100644
--- a/packages/SettingsLib/tests/integ/src/com/android/settingslib/inputmethod/InputMethodSubtypePreferenceTest.java
+++ b/packages/SettingsLib/tests/integ/src/com/android/settingslib/inputmethod/InputMethodSubtypePreferenceTest.java
@@ -18,9 +18,9 @@ package com.android.settingslib.inputmethod;
import android.text.TextUtils;
-import androidx.test.InstrumentationRegistry;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
-import androidx.test.runner.AndroidJUnit4;
+import androidx.test.platform.app.InstrumentationRegistry;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -104,7 +104,7 @@ public class InputMethodSubtypePreferenceTest {
final Locale subtypeLocale = TextUtils.isEmpty(subtypeLanguageTag)
? null : Locale.forLanguageTag(subtypeLanguageTag);
return new InputMethodSubtypePreference(
- InstrumentationRegistry.getTargetContext(),
+ InstrumentationRegistry.getInstrumentation().getTargetContext(),
key,
subtypeName,
subtypeLocale,
diff --git a/packages/SettingsLib/tests/integ/src/com/android/settingslib/volume/data/repository/AudioSharingRepositoryTest.kt b/packages/SettingsLib/tests/integ/src/com/android/settingslib/volume/data/repository/AudioSharingRepositoryTest.kt
index 1c80ef4fe4d4..000664dd1552 100644
--- a/packages/SettingsLib/tests/integ/src/com/android/settingslib/volume/data/repository/AudioSharingRepositoryTest.kt
+++ b/packages/SettingsLib/tests/integ/src/com/android/settingslib/volume/data/repository/AudioSharingRepositoryTest.kt
@@ -16,15 +16,33 @@
package com.android.settingslib.volume.data.repository
+import android.bluetooth.BluetoothAdapter
+import android.bluetooth.BluetoothDevice
import android.bluetooth.BluetoothLeBroadcast
+import android.bluetooth.BluetoothLeBroadcastAssistant
+import android.bluetooth.BluetoothLeBroadcastReceiveState
+import android.bluetooth.BluetoothProfile
+import android.bluetooth.BluetoothVolumeControl
+import android.content.ContentResolver
+import android.content.Context
+import android.database.ContentObserver
import android.platform.test.annotations.DisableFlags
import android.platform.test.annotations.EnableFlags
import android.platform.test.flag.junit.SetFlagsRule
+import android.provider.Settings
+import androidx.test.core.app.ApplicationProvider
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.settingslib.bluetooth.BluetoothCallback
+import com.android.settingslib.bluetooth.BluetoothEventManager
+import com.android.settingslib.bluetooth.BluetoothUtils
+import com.android.settingslib.bluetooth.CachedBluetoothDevice
+import com.android.settingslib.bluetooth.CachedBluetoothDeviceManager
import com.android.settingslib.bluetooth.LocalBluetoothLeBroadcast
+import com.android.settingslib.bluetooth.LocalBluetoothLeBroadcastAssistant
import com.android.settingslib.bluetooth.LocalBluetoothManager
import com.android.settingslib.bluetooth.LocalBluetoothProfileManager
+import com.android.settingslib.bluetooth.VolumeControlProfile
import com.android.settingslib.flags.Flags
import com.google.common.truth.Truth
import kotlinx.coroutines.ExperimentalCoroutinesApi
@@ -39,6 +57,9 @@ import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.ArgumentCaptor
import org.mockito.ArgumentMatchers.any
+import org.mockito.ArgumentMatchers.anyBoolean
+import org.mockito.ArgumentMatchers.anyInt
+import org.mockito.ArgumentMatchers.eq
import org.mockito.Captor
import org.mockito.Mock
import org.mockito.Mockito.never
@@ -52,27 +73,76 @@ import org.mockito.junit.MockitoRule
@RunWith(AndroidJUnit4::class)
class AudioSharingRepositoryTest {
@get:Rule val mockito: MockitoRule = MockitoJUnit.rule()
+
@get:Rule val setFlagsRule: SetFlagsRule = SetFlagsRule()
- @Mock private lateinit var localBluetoothManager: LocalBluetoothManager
- @Mock private lateinit var localBluetoothProfileManager: LocalBluetoothProfileManager
- @Mock private lateinit var localBluetoothLeBroadcast: LocalBluetoothLeBroadcast
+ @Mock private lateinit var btManager: LocalBluetoothManager
+
+ @Mock private lateinit var profileManager: LocalBluetoothProfileManager
+
+ @Mock private lateinit var broadcast: LocalBluetoothLeBroadcast
+
+ @Mock private lateinit var assistant: LocalBluetoothLeBroadcastAssistant
+
+ @Mock private lateinit var volumeControl: VolumeControlProfile
+
+ @Mock private lateinit var eventManager: BluetoothEventManager
+
+ @Mock private lateinit var deviceManager: CachedBluetoothDeviceManager
+
+ @Mock private lateinit var device1: BluetoothDevice
+
+ @Mock private lateinit var device2: BluetoothDevice
+
+ @Mock private lateinit var cachedDevice1: CachedBluetoothDevice
+
+ @Mock private lateinit var cachedDevice2: CachedBluetoothDevice
+
+ @Mock private lateinit var receiveState: BluetoothLeBroadcastReceiveState
+
+ @Mock private lateinit var contentResolver: ContentResolver
@Captor
- private lateinit var leBroadcastCallbackCaptor: ArgumentCaptor<BluetoothLeBroadcast.Callback>
- private val testScope = TestScope()
+ private lateinit var broadcastCallbackCaptor: ArgumentCaptor<BluetoothLeBroadcast.Callback>
+
+ @Captor
+ private lateinit var assistantCallbackCaptor:
+ ArgumentCaptor<BluetoothLeBroadcastAssistant.Callback>
+
+ @Captor private lateinit var btCallbackCaptor: ArgumentCaptor<BluetoothCallback>
+
+ @Captor private lateinit var contentObserverCaptor: ArgumentCaptor<ContentObserver>
+ @Captor
+ private lateinit var volumeCallbackCaptor: ArgumentCaptor<BluetoothVolumeControl.Callback>
+
+ private val testScope = TestScope()
+ private val context: Context = ApplicationProvider.getApplicationContext()
private lateinit var underTest: AudioSharingRepository
@Before
fun setup() {
- `when`(localBluetoothManager.profileManager).thenReturn(localBluetoothProfileManager)
- `when`(localBluetoothProfileManager.leAudioBroadcastProfile)
- .thenReturn(localBluetoothLeBroadcast)
- `when`(localBluetoothLeBroadcast.isEnabled(null)).thenReturn(true)
+ `when`(btManager.profileManager).thenReturn(profileManager)
+ `when`(profileManager.leAudioBroadcastProfile).thenReturn(broadcast)
+ `when`(profileManager.leAudioBroadcastAssistantProfile).thenReturn(assistant)
+ `when`(profileManager.volumeControlProfile).thenReturn(volumeControl)
+ `when`(btManager.eventManager).thenReturn(eventManager)
+ `when`(btManager.cachedDeviceManager).thenReturn(deviceManager)
+ `when`(broadcast.isEnabled(null)).thenReturn(true)
+ `when`(cachedDevice1.groupId).thenReturn(TEST_GROUP_ID1)
+ `when`(cachedDevice1.device).thenReturn(device1)
+ `when`(deviceManager.findDevice(device1)).thenReturn(cachedDevice1)
+ `when`(cachedDevice2.groupId).thenReturn(TEST_GROUP_ID2)
+ `when`(cachedDevice2.device).thenReturn(device2)
+ `when`(deviceManager.findDevice(device2)).thenReturn(cachedDevice2)
+ `when`(receiveState.bisSyncState).thenReturn(arrayListOf(TEST_RECEIVE_STATE_CONTENT))
+ `when`(assistant.getAllSources(any())).thenReturn(listOf(receiveState))
underTest =
AudioSharingRepositoryImpl(
- localBluetoothManager,
+ context,
+ contentResolver,
+ btManager,
+ testScope.backgroundScope,
testScope.testScheduler,
)
}
@@ -84,9 +154,9 @@ class AudioSharingRepositoryTest {
val states = mutableListOf<Boolean?>()
underTest.inAudioSharing.onEach { states.add(it) }.launchIn(backgroundScope)
runCurrent()
- triggerAudioSharingStateChange(false)
+ triggerAudioSharingStateChange(TriggerType.BROADCAST_STOP, broadcastStopped)
runCurrent()
- triggerAudioSharingStateChange(true)
+ triggerAudioSharingStateChange(TriggerType.BROADCAST_START, broadcastStarted)
runCurrent()
Truth.assertThat(states).containsExactly(true, false, true)
@@ -102,19 +172,229 @@ class AudioSharingRepositoryTest {
runCurrent()
Truth.assertThat(states).containsExactly(false)
- verify(localBluetoothLeBroadcast, never()).registerServiceCallBack(any(), any())
- verify(localBluetoothLeBroadcast, never()).isEnabled(any())
+ verify(broadcast, never()).registerServiceCallBack(any(), any())
+ verify(broadcast, never()).isEnabled(any())
+ }
+ }
+
+ @Test
+ @EnableFlags(Flags.FLAG_VOLUME_DIALOG_AUDIO_SHARING_FIX)
+ fun secondaryGroupIdChange_emitValues() {
+ testScope.runTest {
+ val groupIds = mutableListOf<Int?>()
+ underTest.secondaryGroupId.onEach { groupIds.add(it) }.launchIn(backgroundScope)
+ runCurrent()
+ triggerSourceAdded()
+ runCurrent()
+ triggerContentObserverChange()
+ runCurrent()
+ triggerSourceRemoved()
+ runCurrent()
+ triggerSourceAdded()
+ runCurrent()
+ triggerProfileConnectionChange(
+ BluetoothAdapter.STATE_CONNECTING, BluetoothProfile.LE_AUDIO_BROADCAST_ASSISTANT)
+ runCurrent()
+ triggerProfileConnectionChange(
+ BluetoothAdapter.STATE_DISCONNECTED, BluetoothProfile.LE_AUDIO)
+ runCurrent()
+ triggerProfileConnectionChange(
+ BluetoothAdapter.STATE_DISCONNECTED, BluetoothProfile.LE_AUDIO_BROADCAST_ASSISTANT)
+ runCurrent()
+
+ Truth.assertThat(groupIds)
+ .containsExactly(
+ TEST_GROUP_ID_INVALID,
+ TEST_GROUP_ID2,
+ TEST_GROUP_ID1,
+ TEST_GROUP_ID_INVALID,
+ TEST_GROUP_ID2,
+ TEST_GROUP_ID_INVALID)
}
}
- private fun triggerAudioSharingStateChange(inAudioSharing: Boolean) {
- verify(localBluetoothLeBroadcast)
- .registerServiceCallBack(any(), leBroadcastCallbackCaptor.capture())
- `when`(localBluetoothLeBroadcast.isEnabled(null)).thenReturn(inAudioSharing)
- if (inAudioSharing) {
- leBroadcastCallbackCaptor.value.onBroadcastStarted(0, 0)
- } else {
- leBroadcastCallbackCaptor.value.onBroadcastStopped(0, 0)
+ @Test
+ @DisableFlags(Flags.FLAG_VOLUME_DIALOG_AUDIO_SHARING_FIX)
+ fun secondaryGroupIdChange_audioSharingFlagOff_returnFalse() {
+ testScope.runTest {
+ val groupIds = mutableListOf<Int?>()
+ underTest.secondaryGroupId.onEach { groupIds.add(it) }.launchIn(backgroundScope)
+ runCurrent()
+
+ Truth.assertThat(groupIds).containsExactly(TEST_GROUP_ID_INVALID)
+ verify(assistant, never()).registerServiceCallBack(any(), any())
+ verify(eventManager, never()).registerCallback(any())
+ }
+ }
+
+ @Test
+ @EnableFlags(Flags.FLAG_VOLUME_DIALOG_AUDIO_SHARING_FIX)
+ fun volumeMapChange_emitValues() {
+ testScope.runTest {
+ val volumeMaps = mutableListOf<GroupIdToVolumes?>()
+ underTest.volumeMap.onEach { volumeMaps.add(it) }.launchIn(backgroundScope)
+ runCurrent()
+ triggerVolumeMapChange(Pair(device1, TEST_VOLUME1))
+ runCurrent()
+ triggerVolumeMapChange(Pair(device1, TEST_VOLUME2))
+ runCurrent()
+ triggerAudioSharingStateChange(TriggerType.BROADCAST_STOP, broadcastStopped)
+ runCurrent()
+ verify(volumeControl).unregisterCallback(any())
+ runCurrent()
+
+ Truth.assertThat(volumeMaps)
+ .containsExactly(
+ emptyMap<Int, Int>(),
+ mapOf(TEST_GROUP_ID1 to TEST_VOLUME1),
+ mapOf(TEST_GROUP_ID1 to TEST_VOLUME2))
+ }
+ }
+
+ @Test
+ @DisableFlags(Flags.FLAG_VOLUME_DIALOG_AUDIO_SHARING_FIX)
+ fun volumeMapChange_audioSharingFlagOff_returnFalse() {
+ testScope.runTest {
+ val volumeMaps = mutableListOf<GroupIdToVolumes?>()
+ underTest.volumeMap.onEach { volumeMaps.add(it) }.launchIn(backgroundScope)
+ runCurrent()
+
+ Truth.assertThat(volumeMaps).isEmpty()
+ verify(broadcast, never()).registerServiceCallBack(any(), any())
+ verify(volumeControl, never()).registerCallback(any(), any())
+ }
+ }
+
+ @Test
+ @EnableFlags(Flags.FLAG_VOLUME_DIALOG_AUDIO_SHARING_FIX)
+ fun setSecondaryVolume_setValue() {
+ testScope.runTest {
+ Settings.Secure.putInt(
+ context.contentResolver,
+ BluetoothUtils.getPrimaryGroupIdUriForBroadcast(),
+ TEST_GROUP_ID2)
+ `when`(assistant.allConnectedDevices).thenReturn(listOf(device1, device2))
+ underTest.setSecondaryVolume(TEST_VOLUME1)
+
+ runCurrent()
+ verify(volumeControl).setDeviceVolume(device1, TEST_VOLUME1, true)
+ }
+ }
+
+ @Test
+ @DisableFlags(Flags.FLAG_VOLUME_DIALOG_AUDIO_SHARING_FIX)
+ fun setSecondaryVolume_audioSharingFlagOff_doNothing() {
+ testScope.runTest {
+ Settings.Secure.putInt(
+ context.contentResolver,
+ BluetoothUtils.getPrimaryGroupIdUriForBroadcast(),
+ TEST_GROUP_ID2)
+ `when`(assistant.allConnectedDevices).thenReturn(listOf(device1, device2))
+ underTest.setSecondaryVolume(TEST_VOLUME1)
+
+ runCurrent()
+ verify(volumeControl, never()).setDeviceVolume(any(), anyInt(), anyBoolean())
+ }
+ }
+
+ private fun triggerAudioSharingStateChange(
+ type: TriggerType,
+ broadcastAction: BluetoothLeBroadcast.Callback.() -> Unit
+ ) {
+ verify(broadcast).registerServiceCallBack(any(), broadcastCallbackCaptor.capture())
+ when (type) {
+ TriggerType.BROADCAST_START -> {
+ `when`(broadcast.isEnabled(null)).thenReturn(true)
+ broadcastCallbackCaptor.value.broadcastAction()
+ }
+ TriggerType.BROADCAST_STOP -> {
+ `when`(broadcast.isEnabled(null)).thenReturn(false)
+ broadcastCallbackCaptor.value.broadcastAction()
+ }
+ }
+ }
+
+ private fun triggerSourceAdded() {
+ verify(assistant).registerServiceCallBack(any(), assistantCallbackCaptor.capture())
+ Settings.Secure.putInt(
+ context.contentResolver,
+ BluetoothUtils.getPrimaryGroupIdUriForBroadcast(),
+ TEST_GROUP_ID1)
+ `when`(assistant.allConnectedDevices).thenReturn(listOf(device1, device2))
+ assistantCallbackCaptor.value.sourceAdded(device1, receiveState)
+ }
+
+ private fun triggerSourceRemoved() {
+ verify(assistant).registerServiceCallBack(any(), assistantCallbackCaptor.capture())
+ `when`(assistant.allConnectedDevices).thenReturn(listOf(device1))
+ Settings.Secure.putInt(
+ context.contentResolver,
+ BluetoothUtils.getPrimaryGroupIdUriForBroadcast(),
+ TEST_GROUP_ID1)
+ assistantCallbackCaptor.value.sourceRemoved(device2)
+ }
+
+ private fun triggerProfileConnectionChange(state: Int, profile: Int) {
+ verify(eventManager).registerCallback(btCallbackCaptor.capture())
+ `when`(assistant.allConnectedDevices).thenReturn(listOf(device1))
+ Settings.Secure.putInt(
+ context.contentResolver,
+ BluetoothUtils.getPrimaryGroupIdUriForBroadcast(),
+ TEST_GROUP_ID1)
+ btCallbackCaptor.value.onProfileConnectionStateChanged(cachedDevice2, state, profile)
+ }
+
+ private fun triggerContentObserverChange() {
+ verify(contentResolver)
+ .registerContentObserver(
+ eq(Settings.Secure.getUriFor(BluetoothUtils.getPrimaryGroupIdUriForBroadcast())),
+ eq(false),
+ contentObserverCaptor.capture())
+ `when`(assistant.allConnectedDevices).thenReturn(listOf(device1, device2))
+ Settings.Secure.putInt(
+ context.contentResolver,
+ BluetoothUtils.getPrimaryGroupIdUriForBroadcast(),
+ TEST_GROUP_ID2)
+ contentObserverCaptor.value.primaryChanged()
+ }
+
+ private fun triggerVolumeMapChange(change: Pair<BluetoothDevice, Int>) {
+ verify(volumeControl).registerCallback(any(), volumeCallbackCaptor.capture())
+ volumeCallbackCaptor.value.onDeviceVolumeChanged(change.first, change.second)
+ }
+
+ private enum class TriggerType {
+ BROADCAST_START,
+ BROADCAST_STOP
+ }
+
+ private companion object {
+ const val TEST_GROUP_ID_INVALID = -1
+ const val TEST_GROUP_ID1 = 1
+ const val TEST_GROUP_ID2 = 2
+ const val TEST_SOURCE_ID = 1
+ const val TEST_BROADCAST_ID = 1
+ const val TEST_REASON = 1
+ const val TEST_RECEIVE_STATE_CONTENT = 1L
+ const val TEST_VOLUME1 = 10
+ const val TEST_VOLUME2 = 20
+
+ val broadcastStarted: BluetoothLeBroadcast.Callback.() -> Unit = {
+ onBroadcastStarted(TEST_REASON, TEST_BROADCAST_ID)
+ }
+ val broadcastStopped: BluetoothLeBroadcast.Callback.() -> Unit = {
+ onBroadcastStopped(TEST_REASON, TEST_BROADCAST_ID)
}
+ val sourceAdded:
+ BluetoothLeBroadcastAssistant.Callback.(
+ sink: BluetoothDevice, state: BluetoothLeBroadcastReceiveState) -> Unit =
+ { sink, state ->
+ onReceiveStateChanged(sink, TEST_SOURCE_ID, state)
+ }
+ val sourceRemoved: BluetoothLeBroadcastAssistant.Callback.(sink: BluetoothDevice) -> Unit =
+ { sink ->
+ onSourceRemoved(sink, TEST_SOURCE_ID, TEST_REASON)
+ }
+ val primaryChanged: ContentObserver.() -> Unit = { onChange(false) }
}
}
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/fuelgauge/BatterySaverUtilsTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/fuelgauge/BatterySaverUtilsTest.java
index 80301c02dd6a..b143b22c511b 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/fuelgauge/BatterySaverUtilsTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/fuelgauge/BatterySaverUtilsTest.java
@@ -28,23 +28,31 @@ import static com.google.common.truth.Truth.assertThat;
import static org.junit.Assert.assertEquals;
import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
+import android.app.KeyguardManager;
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.os.PowerManager;
+import android.platform.test.annotations.EnableFlags;
+import android.platform.test.flag.junit.SetFlagsRule;
import android.provider.Settings.Global;
import android.provider.Settings.Secure;
+import com.android.settingslib.flags.Flags;
+
import org.junit.Before;
+import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
+import org.mockito.junit.MockitoJUnit;
+import org.mockito.junit.MockitoRule;
import org.robolectric.RobolectricTestRunner;
import java.util.List;
@@ -54,26 +62,22 @@ public class BatterySaverUtilsTest {
private static final int BATTERY_SAVER_THRESHOLD_1 = 15;
private static final int BATTERY_SAVER_THRESHOLD_2 = 20;
- @Mock
- private Context mMockContext;
-
- @Mock
- private ContentResolver mMockResolver;
+ @Rule(order = 0) public final SetFlagsRule mSetFlagsRule = new SetFlagsRule();
+ @Rule(order = 1) public final MockitoRule mMockitoRule = MockitoJUnit.rule();
- @Mock
- private PowerManager mMockPowerManager;
+ @Mock private Context mMockContext;
+ @Mock private ContentResolver mMockResolver;
+ @Mock private PowerManager mMockPowerManager;
@Before
public void setUp() throws Exception {
- MockitoAnnotations.initMocks(this);
-
when(mMockContext.getContentResolver()).thenReturn(mMockResolver);
when(mMockContext.getSystemService(eq(PowerManager.class))).thenReturn(mMockPowerManager);
when(mMockPowerManager.setPowerSaveModeEnabled(anyBoolean())).thenReturn(true);
}
@Test
- public void testSetPowerSaveMode_enableWithWarning_firstCall_needConfirmationWarning() {
+ public void setPowerSaveMode_enableWithWarning_firstCall_needConfirmationWarning() {
Secure.putString(mMockResolver, Secure.LOW_POWER_WARNING_ACKNOWLEDGED, "null");
Secure.putString(mMockResolver, Secure.EXTRA_LOW_POWER_WARNING_ACKNOWLEDGED, "null");
Secure.putString(mMockResolver, Secure.LOW_POWER_MANUAL_ACTIVATION_COUNT, "null");
@@ -96,7 +100,7 @@ public class BatterySaverUtilsTest {
}
@Test
- public void testSetPowerSaveMode_enableWithWarning_secondCall_expectUpdateIntent() {
+ public void setPowerSaveMode_enableWithWarning_secondCall_expectUpdateIntent() {
// Already acked.
Secure.putInt(mMockResolver, Secure.LOW_POWER_WARNING_ACKNOWLEDGED, 1);
Secure.putInt(mMockResolver, Secure.EXTRA_LOW_POWER_WARNING_ACKNOWLEDGED, 1);
@@ -119,7 +123,7 @@ public class BatterySaverUtilsTest {
}
@Test
- public void testSetPowerSaveMode_enableWithWarning_thirdCall_expectUpdateIntent() {
+ public void setPowerSaveMode_enableWithWarning_thirdCall_expectUpdateIntent() {
// Already acked.
Secure.putInt(mMockResolver, Secure.LOW_POWER_WARNING_ACKNOWLEDGED, 1);
Secure.putInt(mMockResolver, Secure.EXTRA_LOW_POWER_WARNING_ACKNOWLEDGED, 1);
@@ -142,7 +146,7 @@ public class BatterySaverUtilsTest {
}
@Test
- public void testSetPowerSaveMode_enableWithWarning_5thCall_needAutoSuggestionWarning() {
+ public void setPowerSaveMode_enableWithWarning_5thCall_needAutoSuggestionWarning() {
// Already acked.
Secure.putInt(mMockResolver, Secure.LOW_POWER_WARNING_ACKNOWLEDGED, 1);
Secure.putInt(mMockResolver, Secure.EXTRA_LOW_POWER_WARNING_ACKNOWLEDGED, 1);
@@ -166,7 +170,7 @@ public class BatterySaverUtilsTest {
}
@Test
- public void testSetPowerSaveMode_enableWithoutWarning_expectUpdateIntent() {
+ public void setPowerSaveMode_enableWithoutWarning_expectUpdateIntent() {
Secure.putString(mMockResolver, Secure.LOW_POWER_WARNING_ACKNOWLEDGED, "null");
Secure.putString(mMockResolver, Secure.EXTRA_LOW_POWER_WARNING_ACKNOWLEDGED, "null");
Secure.putString(mMockResolver, Secure.LOW_POWER_MANUAL_ACTIVATION_COUNT, "null");
@@ -187,17 +191,17 @@ public class BatterySaverUtilsTest {
}
@Test
- public void testSetPowerSaveMode_disableWithoutWarning_expectUpdateIntent() {
+ public void setPowerSaveMode_disableWithoutWarning_expectUpdateIntent() {
verifyDisablePowerSaveMode(/* needFirstTimeWarning= */ false);
}
@Test
- public void testSetPowerSaveMode_disableWithWarning_expectUpdateIntent() {
+ public void setPowerSaveMode_disableWithWarning_expectUpdateIntent() {
verifyDisablePowerSaveMode(/* needFirstTimeWarning= */ true);
}
@Test
- public void testEnsureAutoBatterysaver_setNewPositiveValue_doNotOverwrite() {
+ public void ensureAutoBatterysaver_setNewPositiveValue_doNotOverwrite() {
Global.putInt(mMockResolver, Global.LOW_POWER_MODE_TRIGGER_LEVEL, 0);
BatterySaverUtils.ensureAutoBatterySaver(mMockContext, BATTERY_SAVER_THRESHOLD_1);
@@ -212,7 +216,7 @@ public class BatterySaverUtilsTest {
}
@Test
- public void testSetAutoBatterySaverTriggerLevel_setSuppressSuggestion() {
+ public void setAutoBatterySaverTriggerLevel_setSuppressSuggestion() {
Global.putString(mMockResolver, Global.LOW_POWER_MODE_TRIGGER_LEVEL, "null");
Secure.putString(mMockResolver, Secure.SUPPRESS_AUTO_BATTERY_SAVER_SUGGESTION, "null");
@@ -230,7 +234,7 @@ public class BatterySaverUtilsTest {
}
@Test
- public void testGetBatterySaverScheduleKey_returnExpectedKey() {
+ public void getBatterySaverScheduleKey_returnExpectedKey() {
Global.putInt(mMockResolver, Global.LOW_POWER_MODE_TRIGGER_LEVEL, 0);
Global.putInt(mMockResolver, Global.AUTOMATIC_POWER_SAVE_MODE,
PowerManager.POWER_SAVE_MODE_TRIGGER_PERCENTAGE);
@@ -253,8 +257,25 @@ public class BatterySaverUtilsTest {
KEY_NO_SCHEDULE);
}
+ @EnableFlags(Flags.FLAG_EXTREME_POWER_LOW_STATE_VULNERABILITY)
+ @Test
+ public void setPowerSaveMode_1stTimeAndDeviceLocked_enableBatterySaver() {
+ var keyguardManager = mock(KeyguardManager.class);
+ when(mMockContext.getSystemService(KeyguardManager.class)).thenReturn(keyguardManager);
+ when(keyguardManager.isDeviceLocked()).thenReturn(true);
+ when(mMockPowerManager.setPowerSaveModeEnabled(true)).thenReturn(true);
+
+ var enableResult = BatterySaverUtils.setPowerSaveMode(
+ mMockContext,
+ /* enable= */ true,
+ /* needFirstTimeWarning= */ true,
+ /* reason= */ 0);
+
+ assertThat(enableResult).isTrue();
+ }
+
@Test
- public void testSetBatterySaverScheduleMode_setSchedule() {
+ public void setBatterySaverScheduleMode_setSchedule() {
BatterySaverUtils.setBatterySaverScheduleMode(mMockContext, KEY_NO_SCHEDULE, -1);
assertThat(Global.getInt(mMockResolver, Global.AUTOMATIC_POWER_SAVE_MODE, -1))
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/fuelgauge/BatteryUtilsTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/fuelgauge/BatteryUtilsTest.java
index 6424352d2c1b..465798ccb6c2 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/fuelgauge/BatteryUtilsTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/fuelgauge/BatteryUtilsTest.java
@@ -23,11 +23,11 @@ import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.eq;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
import static org.robolectric.Shadows.shadowOf;
import android.accessibilityservice.AccessibilityServiceInfo;
import android.content.Context;
-import android.content.Intent;
import android.content.IntentFilter;
import android.os.UserManager;
import android.provider.Settings;
@@ -41,7 +41,6 @@ import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.robolectric.RobolectricTestRunner;
-import org.robolectric.Shadows;
import org.robolectric.shadows.ShadowAccessibilityManager;
import java.util.Arrays;
@@ -59,12 +58,15 @@ public class BatteryUtilsTest {
private AccessibilityServiceInfo mAccessibilityServiceInfo1;
@Mock
private AccessibilityServiceInfo mAccessibilityServiceInfo2;
+ @Mock
+ private UserManager mUserManager;
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
mContext = spy(ApplicationProvider.getApplicationContext());
doReturn(mContext).when(mContext).getApplicationContext();
+ when(mContext.getSystemService(UserManager.class)).thenReturn(mUserManager);
mAccessibilityManager = spy(mContext.getSystemService(AccessibilityManager.class));
mShadowAccessibilityManager = shadowOf(mAccessibilityManager);
doReturn(mAccessibilityManager).when(mContext)
@@ -108,13 +110,23 @@ public class BatteryUtilsTest {
@Test
public void isWorkProfile_workProfileMode_returnTrue() {
- final UserManager userManager = mContext.getSystemService(UserManager.class);
- Shadows.shadowOf(userManager).setManagedProfile(true);
- Shadows.shadowOf(userManager).setIsSystemUser(false);
+ doReturn(true).when(mUserManager).isManagedProfile();
assertThat(BatteryUtils.isWorkProfile(mContext)).isTrue();
}
+ @Test
+ public void isPrivateProfile_defaultValue_returnFalse() {
+ assertThat(BatteryUtils.isPrivateProfile(mContext)).isFalse();
+ }
+
+ @Test
+ public void isPrivateProfile_privateProfileMode_returnTrue() {
+ doReturn(true).when(mUserManager).isPrivateProfile();
+
+ assertThat(BatteryUtils.isPrivateProfile(mContext)).isTrue();
+ }
+
private void setTtsPackageName(String defaultTtsPackageName) {
Settings.Secure.putString(mContext.getContentResolver(),
Settings.Secure.TTS_DEFAULT_SYNTH, defaultTtsPackageName);
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/notification/data/repository/ZenModeRepositoryTest.kt b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/notification/data/repository/ZenModeRepositoryTest.kt
index 5294ce382aa9..67c73b1c8f5a 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/notification/data/repository/ZenModeRepositoryTest.kt
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/notification/data/repository/ZenModeRepositoryTest.kt
@@ -18,13 +18,20 @@ package com.android.settingslib.notification.data.repository
import android.app.NotificationManager
import android.content.BroadcastReceiver
+import android.content.ContentResolver
import android.content.Context
import android.content.Intent
+import android.database.ContentObserver
+import android.os.Parcelable
import android.platform.test.annotations.DisableFlags
import android.platform.test.annotations.EnableFlags
+import android.platform.test.flag.junit.SetFlagsRule
import android.provider.Settings.Global
import androidx.test.filters.SmallTest
import com.android.settingslib.flags.Flags
+import com.android.settingslib.notification.modes.TestModeBuilder
+import com.android.settingslib.notification.modes.ZenMode
+import com.android.settingslib.notification.modes.ZenModesBackend
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.launchIn
@@ -33,9 +40,11 @@ import kotlinx.coroutines.test.TestScope
import kotlinx.coroutines.test.runCurrent
import kotlinx.coroutines.test.runTest
import org.junit.Before
+import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.ArgumentCaptor
+import org.mockito.ArgumentMatchers.eq
import org.mockito.Captor
import org.mockito.Mock
import org.mockito.Mockito.any
@@ -48,13 +57,22 @@ import org.robolectric.RobolectricTestRunner
@RunWith(RobolectricTestRunner::class)
@SmallTest
class ZenModeRepositoryTest {
+ @get:Rule val setFlagsRule = SetFlagsRule()
@Mock private lateinit var context: Context
@Mock private lateinit var notificationManager: NotificationManager
+ @Mock private lateinit var zenModesBackend: ZenModesBackend
+
+ @Mock private lateinit var contentResolver: ContentResolver
+
@Captor private lateinit var receiverCaptor: ArgumentCaptor<BroadcastReceiver>
+ @Captor private lateinit var zenModeObserverCaptor: ArgumentCaptor<ContentObserver>
+
+ @Captor private lateinit var zenConfigObserverCaptor: ArgumentCaptor<ContentObserver>
+
private lateinit var underTest: ZenModeRepository
private val testScope: TestScope = TestScope()
@@ -67,12 +85,15 @@ class ZenModeRepositoryTest {
ZenModeRepositoryImpl(
context,
notificationManager,
+ zenModesBackend,
+ contentResolver,
testScope.backgroundScope,
testScope.testScheduler,
+ backgroundHandler = null,
)
}
- @DisableFlags(android.app.Flags.FLAG_MODES_API, Flags.FLAG_VOLUME_PANEL_BROADCAST_FIX)
+ @DisableFlags(Flags.FLAG_VOLUME_PANEL_BROADCAST_FIX)
@Test
fun consolidatedPolicyChanges_repositoryEmits_flagsOff() {
testScope.runTest {
@@ -87,9 +108,7 @@ class ZenModeRepositoryTest {
triggerIntent(NotificationManager.ACTION_NOTIFICATION_POLICY_CHANGED)
runCurrent()
- assertThat(values)
- .containsExactlyElementsIn(listOf(null, testPolicy1, testPolicy2))
- .inOrder()
+ assertThat(values).containsExactly(null, testPolicy1, testPolicy2).inOrder()
}
}
@@ -108,9 +127,27 @@ class ZenModeRepositoryTest {
triggerIntent(NotificationManager.ACTION_CONSOLIDATED_NOTIFICATION_POLICY_CHANGED)
runCurrent()
- assertThat(values)
- .containsExactlyElementsIn(listOf(null, testPolicy1, testPolicy2))
- .inOrder()
+ assertThat(values).containsExactly(null, testPolicy1, testPolicy2).inOrder()
+ }
+ }
+
+ @EnableFlags(android.app.Flags.FLAG_MODES_API, Flags.FLAG_VOLUME_PANEL_BROADCAST_FIX)
+ @Test
+ fun consolidatedPolicyChanges_repositoryEmitsFromExtras() {
+ testScope.runTest {
+ val values = mutableListOf<NotificationManager.Policy?>()
+ `when`(notificationManager.consolidatedNotificationPolicy).thenReturn(testPolicy1)
+ underTest.consolidatedNotificationPolicy
+ .onEach { values.add(it) }
+ .launchIn(backgroundScope)
+ runCurrent()
+
+ triggerIntent(
+ NotificationManager.ACTION_CONSOLIDATED_NOTIFICATION_POLICY_CHANGED,
+ extras = mapOf(NotificationManager.EXTRA_NOTIFICATION_POLICY to testPolicy2))
+ runCurrent()
+
+ assertThat(values).containsExactly(null, testPolicy1, testPolicy2).inOrder()
}
}
@@ -127,15 +164,68 @@ class ZenModeRepositoryTest {
runCurrent()
assertThat(values)
- .containsExactlyElementsIn(
- listOf(null, Global.ZEN_MODE_OFF, Global.ZEN_MODE_ALARMS))
+ .containsExactly(null, Global.ZEN_MODE_OFF, Global.ZEN_MODE_ALARMS)
.inOrder()
}
}
- private fun triggerIntent(action: String) {
- verify(context).registerReceiver(receiverCaptor.capture(), any())
- receiverCaptor.value.onReceive(context, Intent(action))
+ @EnableFlags(android.app.Flags.FLAG_MODES_UI)
+ @Test
+ fun modesListEmitsOnSettingsChange() {
+ testScope.runTest {
+ val values = mutableListOf<List<ZenMode>>()
+ val modes1 = listOf(TestModeBuilder().setId("One").build())
+ `when`(zenModesBackend.modes).thenReturn(modes1)
+ underTest.modes.onEach { values.add(it) }.launchIn(backgroundScope)
+ runCurrent()
+
+ // zen mode change triggers update
+ val modes2 = listOf(TestModeBuilder().setId("Two").build())
+ `when`(zenModesBackend.modes).thenReturn(modes2)
+ triggerZenModeSettingUpdate()
+ runCurrent()
+
+ // zen config change also triggers update
+ val modes3 = listOf(TestModeBuilder().setId("Three").build())
+ `when`(zenModesBackend.modes).thenReturn(modes3)
+ triggerZenConfigSettingUpdate()
+ runCurrent()
+
+ // setting update with no list change doesn't trigger update
+ triggerZenModeSettingUpdate()
+ runCurrent()
+
+ assertThat(values).containsExactly(modes1, modes2, modes3).inOrder()
+ }
+ }
+
+ private fun triggerIntent(action: String, extras: Map<String, Parcelable>? = null) {
+ verify(context).registerReceiver(receiverCaptor.capture(), any(), any(), any())
+ val intent = Intent(action)
+ if (extras?.isNotEmpty() == true) {
+ extras.forEach { (key, value) -> intent.putExtra(key, value) }
+ }
+ receiverCaptor.value.onReceive(context, intent)
+ }
+
+ private fun triggerZenModeSettingUpdate() {
+ verify(contentResolver)
+ .registerContentObserver(
+ eq(Global.getUriFor(Global.ZEN_MODE)),
+ eq(false),
+ zenModeObserverCaptor.capture(),
+ )
+ zenModeObserverCaptor.value.onChange(false)
+ }
+
+ private fun triggerZenConfigSettingUpdate() {
+ verify(contentResolver)
+ .registerContentObserver(
+ eq(Global.getUriFor(Global.ZEN_MODE_CONFIG_ETAG)),
+ eq(false),
+ zenConfigObserverCaptor.capture(),
+ )
+ zenConfigObserverCaptor.value.onChange(false)
}
private companion object {
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/notification/modes/ZenModeTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/notification/modes/ZenModeTest.java
index 9e543122e707..e705f97202a3 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/notification/modes/ZenModeTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/notification/modes/ZenModeTest.java
@@ -56,12 +56,14 @@ public class ZenModeTest {
assertThat(zenMode.getId()).isEqualTo("id");
assertThat(zenMode.getRule()).isEqualTo(ZEN_RULE);
assertThat(zenMode.isManualDnd()).isFalse();
+ assertThat(zenMode.canEditNameAndIcon()).isTrue();
assertThat(zenMode.canBeDeleted()).isTrue();
assertThat(zenMode.isActive()).isTrue();
ZenMode manualMode = ZenMode.manualDndMode(ZEN_RULE, false);
assertThat(manualMode.getId()).isEqualTo(ZenMode.MANUAL_DND_MODE_ID);
assertThat(manualMode.isManualDnd()).isTrue();
+ assertThat(manualMode.canEditNameAndIcon()).isFalse();
assertThat(manualMode.canBeDeleted()).isFalse();
assertThat(manualMode.isActive()).isFalse();
}
diff --git a/packages/SettingsProvider/src/android/provider/settings/backup/SecureSettings.java b/packages/SettingsProvider/src/android/provider/settings/backup/SecureSettings.java
index d4a4703d5caf..2b8b23e3dba8 100644
--- a/packages/SettingsProvider/src/android/provider/settings/backup/SecureSettings.java
+++ b/packages/SettingsProvider/src/android/provider/settings/backup/SecureSettings.java
@@ -228,6 +228,7 @@ public class SecureSettings {
Settings.Secure.ACCESSIBILITY_MAGNIFICATION_ALWAYS_ON_ENABLED,
Settings.Secure.ACCESSIBILITY_MAGNIFICATION_JOYSTICK_ENABLED,
Settings.Secure.ACCESSIBILITY_MAGNIFICATION_TWO_FINGER_TRIPLE_TAP_ENABLED,
+ Settings.Secure.ACCESSIBILITY_MOUSE_KEYS_ENABLED,
Settings.Secure.ACCESSIBILITY_PINCH_TO_ZOOM_ANYWHERE_ENABLED,
Settings.Secure.ACCESSIBILITY_SINGLE_FINGER_PANNING_ENABLED,
Settings.Secure.ODI_CAPTIONS_VOLUME_UI_ENABLED,
@@ -281,5 +282,6 @@ public class SecureSettings {
Settings.Secure.ON_DEVICE_INFERENCE_UNBIND_TIMEOUT_MS,
Settings.Secure.ON_DEVICE_INTELLIGENCE_IDLE_TIMEOUT_MS,
Settings.Secure.MANDATORY_BIOMETRICS,
+ Settings.Secure.MANDATORY_BIOMETRICS_REQUIREMENTS_SATISFIED,
};
}
diff --git a/packages/SettingsProvider/src/android/provider/settings/validators/SecureSettingsValidators.java b/packages/SettingsProvider/src/android/provider/settings/validators/SecureSettingsValidators.java
index 6df1c45bd2ac..cc5302bdd99a 100644
--- a/packages/SettingsProvider/src/android/provider/settings/validators/SecureSettingsValidators.java
+++ b/packages/SettingsProvider/src/android/provider/settings/validators/SecureSettingsValidators.java
@@ -439,6 +439,9 @@ public class SecureSettingsValidators {
VALIDATORS.put(Secure.ON_DEVICE_INFERENCE_UNBIND_TIMEOUT_MS, ANY_LONG_VALIDATOR);
VALIDATORS.put(Secure.ON_DEVICE_INTELLIGENCE_UNBIND_TIMEOUT_MS, ANY_LONG_VALIDATOR);
VALIDATORS.put(Secure.ON_DEVICE_INTELLIGENCE_IDLE_TIMEOUT_MS, NONE_NEGATIVE_LONG_VALIDATOR);
+ VALIDATORS.put(Secure.ACCESSIBILITY_MOUSE_KEYS_ENABLED, BOOLEAN_VALIDATOR);
VALIDATORS.put(Secure.MANDATORY_BIOMETRICS, new InclusiveIntegerRangeValidator(0, 1));
+ VALIDATORS.put(Secure.MANDATORY_BIOMETRICS_REQUIREMENTS_SATISFIED,
+ new InclusiveIntegerRangeValidator(0, 1));
}
}
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DeviceConfigService.java b/packages/SettingsProvider/src/com/android/providers/settings/DeviceConfigService.java
index e77cf2fa6543..8b0772bb644d 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/DeviceConfigService.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/DeviceConfigService.java
@@ -42,6 +42,7 @@ import android.provider.Settings.Config.SyncDisabledMode;
import android.provider.UpdatableDeviceConfigServiceReadiness;
import android.util.Slog;
+import com.android.internal.pm.pkg.component.AconfigFlags;
import com.android.internal.util.FastPrintWriter;
import java.io.File;
@@ -189,22 +190,13 @@ public final class DeviceConfigService extends Binder {
public static HashMap<String, String> getAllFlags(IContentProvider provider) {
HashMap<String, String> allFlags = new HashMap<String, String>();
- try {
- Bundle args = new Bundle();
- args.putInt(Settings.CALL_METHOD_USER_KEY,
- ActivityManager.getService().getCurrentUser().id);
- Bundle b = provider.call(new AttributionSource(Process.myUid(),
- resolveCallingPackage(), null), Settings.AUTHORITY,
- Settings.CALL_METHOD_LIST_CONFIG, null, args);
- if (b != null) {
- Map<String, String> flagsToValues =
- (HashMap) b.getSerializable(Settings.NameValueTable.VALUE);
- allFlags.putAll(flagsToValues);
+ for (DeviceConfig.Properties properties : DeviceConfig.getAllProperties()) {
+ List<String> keys = new ArrayList<>(properties.getKeyset());
+ for (String flagName : properties.getKeyset()) {
+ String fullName = properties.getNamespace() + "/" + flagName;
+ allFlags.put(fullName, properties.getString(flagName, null));
}
- } catch (RemoteException e) {
- throw new RuntimeException("Failed in IPC", e);
}
-
return allFlags;
}
@@ -425,7 +417,13 @@ public final class DeviceConfigService extends Binder {
DeviceConfig.setProperty(namespace, key, value, makeDefault);
break;
case OVERRIDE:
- DeviceConfig.setLocalOverride(namespace, key, value);
+ AconfigFlags.Permission permission =
+ (new AconfigFlags()).getFlagPermission(key);
+ if (permission == AconfigFlags.Permission.READ_ONLY) {
+ pout.println("cannot override read-only flag " + key);
+ } else {
+ DeviceConfig.setLocalOverride(namespace, key, value);
+ }
break;
case CLEAR_OVERRIDE:
DeviceConfig.clearLocalOverride(namespace, key);
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
index 54f0d7a4d853..e8ef620d6c0c 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
@@ -44,6 +44,7 @@ import static com.android.providers.settings.SettingsState.isSystemSettingsKey;
import static com.android.providers.settings.SettingsState.makeKey;
import android.Manifest;
+import android.aconfigd.AconfigdFlagInfo;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.app.ActivityManager;
@@ -1371,10 +1372,27 @@ public class SettingsProvider extends ContentProvider {
}
}
+ Map<String, AconfigdFlagInfo> aconfigFlagInfos =
+ settingsState.getAconfigDefaultFlags();
+
for (int i = 0; i < nameCount; i++) {
String name = names.get(i);
Setting setting = settingsState.getSettingLocked(name);
- if (prefix == null || setting.getName().startsWith(prefix)) {
+ if (prefix == null || name.startsWith(prefix)) {
+ if (Flags.ignoreXmlForReadOnlyFlags()) {
+ int slashIndex = name.indexOf("/");
+ boolean validSlashIndex = slashIndex != -1
+ && slashIndex != 0
+ && slashIndex != name.length();
+ if (validSlashIndex) {
+ String flagName = name.substring(slashIndex + 1);
+ AconfigdFlagInfo flagInfo = aconfigFlagInfos.get(flagName);
+ if (flagInfo != null && !flagInfo.getIsReadWrite()) {
+ continue;
+ }
+ }
+ }
+
flagsToValues.put(setting.getName(), setting.getValue());
}
}
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java
index 861c405b1542..452edd924a26 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java
@@ -740,8 +740,6 @@ final class SettingsState {
// The settings provider must hold its lock when calling here.
@GuardedBy("mLock")
public void removeSettingsForPackageLocked(String packageName) {
- boolean removedSomething = false;
-
final int settingCount = mSettings.size();
for (int i = settingCount - 1; i >= 0; i--) {
String name = mSettings.keyAt(i);
@@ -752,14 +750,9 @@ final class SettingsState {
}
Setting setting = mSettings.valueAt(i);
if (packageName.equals(setting.packageName)) {
- mSettings.removeAt(i);
- removedSomething = true;
+ deleteSettingLocked(setting.name);
}
}
-
- if (removedSomething) {
- scheduleWriteIfNeededLocked();
- }
}
// The settings provider must hold its lock when calling here.
@@ -781,6 +774,13 @@ final class SettingsState {
}
}
+ @NonNull
+ public Map<String, AconfigdFlagInfo> getAconfigDefaultFlags() {
+ synchronized (mLock) {
+ return mAconfigDefaultFlags;
+ }
+ }
+
// The settings provider must hold its lock when calling here.
public Setting getSettingLocked(String name) {
if (TextUtils.isEmpty(name)) {
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/device_config_service.aconfig b/packages/SettingsProvider/src/com/android/providers/settings/device_config_service.aconfig
index d20fbf591a25..4f5955b1c6ca 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/device_config_service.aconfig
+++ b/packages/SettingsProvider/src/com/android/providers/settings/device_config_service.aconfig
@@ -41,3 +41,14 @@ flag {
description: "If this flag is detected as true on boot, writes a logfile to track storage migration correctness."
bug: "328444881"
}
+
+flag {
+ name: "ignore_xml_for_read_only_flags"
+ namespace: "core_experiments_team_internal"
+ description: "When enabled, ignore any flag in the SettingsProvider XML for RO flags."
+ bug: "345007098"
+ is_fixed_read_only: true
+ metadata {
+ purpose: PURPOSE_BUGFIX
+ }
+}
diff --git a/packages/SettingsProvider/test/src/com/android/providers/settings/DeviceConfigServiceTest.java b/packages/SettingsProvider/test/src/com/android/providers/settings/DeviceConfigServiceTest.java
index 8dd51b2b8d11..8de0c35ffa12 100644
--- a/packages/SettingsProvider/test/src/com/android/providers/settings/DeviceConfigServiceTest.java
+++ b/packages/SettingsProvider/test/src/com/android/providers/settings/DeviceConfigServiceTest.java
@@ -22,8 +22,6 @@ import static junit.framework.Assert.assertNull;
import android.content.ContentResolver;
import android.os.Bundle;
-import android.platform.test.annotations.RequiresFlagsDisabled;
-import android.platform.test.annotations.RequiresFlagsEnabled;
import android.platform.test.flag.junit.CheckFlagsRule;
import android.platform.test.flag.junit.DeviceFlagsValueProvider;
import android.provider.Settings;
@@ -73,24 +71,9 @@ public class DeviceConfigServiceTest {
}
/**
- * Test that setting overrides are properly disabled when the flag is off.
- */
- @Test
- @RequiresFlagsDisabled("com.android.providers.settings.support_overrides")
- public void testOverrideDisabled() throws IOException {
- final String newValue = "value2";
-
- executeShellCommand("device_config put " + sNamespace + " " + sKey + " " + sValue);
- executeShellCommand("device_config override " + sNamespace + " " + sKey + " " + newValue);
- String result = readShellCommandOutput("device_config get " + sNamespace + " " + sKey);
- assertEquals(sValue + "\n", result);
- }
-
- /**
* Test that overrides are readable and can be cleared.
*/
@Test
- @RequiresFlagsEnabled("com.android.providers.settings.support_overrides")
public void testOverride() throws IOException {
final String newValue = "value2";
diff --git a/packages/SettingsProvider/test/src/com/android/providers/settings/SettingsStateTest.java b/packages/SettingsProvider/test/src/com/android/providers/settings/SettingsStateTest.java
index 4b4ced3c0753..48ce49dbfb3a 100644
--- a/packages/SettingsProvider/test/src/com/android/providers/settings/SettingsStateTest.java
+++ b/packages/SettingsProvider/test/src/com/android/providers/settings/SettingsStateTest.java
@@ -988,7 +988,40 @@ public class SettingsStateTest {
}
@Test
- public void testGetFlagOverrideToSync() {
+ public void testMemoryUsagePerPackage_StatsUpdatedOnAppDataCleared() {
+ SettingsState settingsState =
+ new SettingsState(
+ InstrumentationRegistry.getContext(), mLock, mSettingsFile, 1,
+ SettingsState.MAX_BYTES_PER_APP_PACKAGE_LIMITED, Looper.getMainLooper());
+ final String testKey1 = SETTING_NAME;
+ final String testKey2 = SETTING_NAME + "_2";
+ final String testValue1 = Strings.repeat("A", 9000);
+ final String testValue2 = Strings.repeat("A", 9001);
+ final String packageName = "p";
+ // Inserting the first setting should be okay
+ settingsState.insertSettingLocked(testKey1, testValue1, null, true, packageName);
+ int expectedMemUsageForPackage = (testKey1.length() + testValue1.length()
+ + testValue1.length() /* size for default */) * Character.BYTES;
+ assertEquals(expectedMemUsageForPackage, settingsState.getMemoryUsage(packageName));
+ // Inserting the second setting should fail
+ try {
+ settingsState.insertSettingLocked(testKey2, testValue2, null, true, packageName);
+ fail("Should throw because it exceeded max memory usage per package");
+ } catch (IllegalStateException ex) {
+ assertTrue(ex.getMessage().startsWith("You are adding too many system settings."));
+ }
+ // Now clear app data and check that the memory usage is cleared
+ settingsState.removeSettingsForPackageLocked(packageName);
+ assertEquals(0, settingsState.getMemoryUsage(packageName));
+ // Try inserting the second setting again and it should go through
+ settingsState.insertSettingLocked(testKey2, testValue2, null, true, packageName);
+ expectedMemUsageForPackage = (testKey2.length() + testValue2.length()
+ + testValue2.length() /* size for default */) * Character.BYTES;
+ assertEquals(expectedMemUsageForPackage, settingsState.getMemoryUsage(packageName));
+ }
+
+ @Test
+ public void testGetFlagOverrideToSync() {
int configKey = SettingsState.makeKey(SettingsState.SETTINGS_TYPE_CONFIG, 0);
Object lock = new Object();
SettingsState settingsState =
diff --git a/packages/Shell/res/values-fr-rCA/strings.xml b/packages/Shell/res/values-fr-rCA/strings.xml
index 54ae9542c032..760905049c88 100644
--- a/packages/Shell/res/values-fr-rCA/strings.xml
+++ b/packages/Shell/res/values-fr-rCA/strings.xml
@@ -28,7 +28,7 @@
<string name="bugreport_finished_pending_screenshot_text" product="tv" msgid="2343263822812016950">"Sélectionnez pour partager le rapport de bogue sans saisie d\'écran ou attendez que la saisie soit prête"</string>
<string name="bugreport_finished_pending_screenshot_text" product="watch" msgid="1474435374470177193">"Touchez pour partager le rapport de bogue sans saisie d\'écran ou attendez que la saisie soit prête"</string>
<string name="bugreport_finished_pending_screenshot_text" product="default" msgid="1474435374470177193">"Touchez pour partager le rapport de bogue sans saisie d\'écran ou attendez que la saisie soit prête"</string>
- <string name="bugreport_confirm" msgid="5917407234515812495">"Les rapports de bogue contiennent des données des fichiers journaux du système, y compris des données que vous considérez comme sensibles (comme des renseignements sur l\'utilisation des applications et des données de localisation). Ne partagez les rapports de bogue qu\'avec les applications et les personnes en qui vous avez confiance."</string>
+ <string name="bugreport_confirm" msgid="5917407234515812495">"Les rapports de bogue contiennent des données des fichiers journaux du système, y compris des données que vous considérez comme sensibles (comme des renseignements sur l\'utilisation des applis et des données de localisation). Ne partagez les rapports de bogue qu\'avec les applis et les personnes en qui vous avez confiance."</string>
<string name="bugreport_confirm_dont_repeat" msgid="6179945398364357318">"Ne plus afficher"</string>
<string name="bugreport_storage_title" msgid="5332488144740527109">"Rapports de bogues"</string>
<string name="bugreport_unreadable_text" msgid="586517851044535486">"Impossible de lire le fichier du rapport de bogue"</string>
diff --git a/packages/Shell/res/values-nb/strings.xml b/packages/Shell/res/values-nb/strings.xml
index 876bd9d7548f..db83f295ed87 100644
--- a/packages/Shell/res/values-nb/strings.xml
+++ b/packages/Shell/res/values-nb/strings.xml
@@ -35,7 +35,7 @@
<string name="bugreport_add_details_to_zip_failed" msgid="1302931926486712371">"Kunne ikke legge til informasjon fra feilrapporten i ZIP-filen"</string>
<string name="bugreport_unnamed" msgid="2800582406842092709">"uten navn"</string>
<string name="bugreport_info_action" msgid="2158204228510576227">"Detaljer"</string>
- <string name="bugreport_screenshot_action" msgid="8677781721940614995">"Skjermdump"</string>
+ <string name="bugreport_screenshot_action" msgid="8677781721940614995">"Skjermbilde"</string>
<string name="bugreport_screenshot_taken" msgid="5684211273096253120">"Skjermdumpen er tatt."</string>
<string name="bugreport_screenshot_failed" msgid="5853049140806834601">"Skjermdumpen kunne ikke tas."</string>
<string name="bugreport_info_dialog_title" msgid="1355948594292983332">"Detaljer om feilrapport <xliff:g id="ID">#%d</xliff:g>"</string>
diff --git a/packages/SimAppDialog/res/values-fr-rCA/strings.xml b/packages/SimAppDialog/res/values-fr-rCA/strings.xml
index b6075855a3bb..0ce7a2a5db1c 100644
--- a/packages/SimAppDialog/res/values-fr-rCA/strings.xml
+++ b/packages/SimAppDialog/res/values-fr-rCA/strings.xml
@@ -17,10 +17,10 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="app_name" msgid="8898068901680117589">"Boîte de dialogue de l\'application SIM"</string>
+ <string name="app_name" msgid="8898068901680117589">"Boîte de dialogue de l\'appli SIM"</string>
<string name="install_carrier_app_title" msgid="334729104862562585">"Activer le service cellulaire"</string>
- <string name="install_carrier_app_description" msgid="4014303558674923797">"Pour que le nouveau module SIM fonctionne correctement, vous devez installer l\'application <xliff:g id="ID_1">%1$s</xliff:g>"</string>
+ <string name="install_carrier_app_description" msgid="4014303558674923797">"Pour que le nouveau module SIM fonctionne correctement, vous devez installer l\'appli <xliff:g id="ID_1">%1$s</xliff:g>"</string>
<string name="install_carrier_app_description_default" msgid="7356830245205847840">"Pour que le nouveau module SIM fonctionne, vous devez installer l\'appli du fournisseur de services"</string>
<string name="install_carrier_app_defer_action" msgid="2558576736886876209">"Pas maintenant"</string>
- <string name="install_carrier_app_download_action" msgid="7859229305958538064">"Télécharger l\'application"</string>
+ <string name="install_carrier_app_download_action" msgid="7859229305958538064">"Télécharger l\'appli"</string>
</resources>
diff --git a/packages/SystemUI/Android.bp b/packages/SystemUI/Android.bp
index 469b9cef0411..4e01a71df113 100644
--- a/packages/SystemUI/Android.bp
+++ b/packages/SystemUI/Android.bp
@@ -539,6 +539,7 @@ android_library {
"androidx.preference_preference",
"androidx.appcompat_appcompat",
"androidx.concurrent_concurrent-futures",
+ "androidx.concurrent_concurrent-futures-ktx",
"androidx.mediarouter_mediarouter",
"androidx.palette_palette",
"androidx.legacy_legacy-preference-v14",
@@ -555,6 +556,7 @@ android_library {
"androidx.exifinterface_exifinterface",
"androidx.room_room-runtime",
"androidx.room_room-ktx",
+ "androidx.datastore_datastore-preferences",
"com.google.android.material_material",
"device_state_flags_lib",
"kotlinx_coroutines_android",
@@ -580,7 +582,6 @@ android_library {
"androidx.activity_activity-compose",
"androidx.compose.animation_animation-graphics",
"androidx.lifecycle_lifecycle-viewmodel-compose",
- "device_policy_aconfig_flags_lib",
],
libs: [
"keepanno-annotations",
@@ -668,6 +669,7 @@ android_library {
],
asset_dirs: [
"tests/goldens",
+ "schemas",
],
static_libs: [
"SystemUI-res",
@@ -707,7 +709,9 @@ android_library {
"androidx-constraintlayout_constraintlayout",
"androidx.exifinterface_exifinterface",
"androidx.room_room-runtime",
+ "androidx.room_room-testing",
"androidx.room_room-ktx",
+ "androidx.datastore_datastore-preferences",
"device_state_flags_lib",
"kotlinx-coroutines-android",
"kotlinx-coroutines-core",
@@ -787,7 +791,11 @@ android_library {
"android.test.mock",
"keepanno-annotations",
],
- kotlincflags: ["-Xjvm-default=all"],
+ kotlincflags: [
+ "-Xjvm-default=all",
+ // TODO(b/352363800): Why do we need this?
+ "-J-Xmx8192M",
+ ],
aaptflags: [
"--extra-packages",
"com.android.systemui",
@@ -1018,7 +1026,5 @@ android_app {
},
required: [
"privapp_whitelist_com.android.systemui",
- "wmshell.protolog.json.gz",
- "wmshell.protolog.pb",
],
}
diff --git a/packages/SystemUI/accessibility/accessibilitymenu/res/values-bn/strings.xml b/packages/SystemUI/accessibility/accessibilitymenu/res/values-bn/strings.xml
index 9a0ebef6c639..00cc44217aed 100644
--- a/packages/SystemUI/accessibility/accessibilitymenu/res/values-bn/strings.xml
+++ b/packages/SystemUI/accessibility/accessibilitymenu/res/values-bn/strings.xml
@@ -23,7 +23,7 @@
<string name="accessibility_menu_description" msgid="4458354794093858297">"আপনার ডিভাইস নিয়ন্ত্রণ করতে, \'অ্যাক্সেসিবিলিটি মেনু\' একটি বড় অন-স্ক্রিন মেনু দেখায়। আপনি ফোন লক, ভলিউম ও উজ্জ্বলতা নিয়ন্ত্রণ, স্ক্রিনশট নেওয়া এবং আরও অনেক কিছু করতে পারবেন।"</string>
<string name="accessibility_menu_summary" msgid="340071398148208130">"বড় করে দেখানো মেনুর মাধ্যমে ডিভাইস নিয়ন্ত্রণ করুন"</string>
<string name="accessibility_menu_settings_name" msgid="1716888058785672611">"অ্যাক্সেসিবিলিটি মেনুর সেটিংস"</string>
- <string name="accessibility_menu_large_buttons_title" msgid="8978499601044961736">"বোতাম বড় করা"</string>
+ <string name="accessibility_menu_large_buttons_title" msgid="8978499601044961736">"বড় বোতাম"</string>
<string name="accessibility_menu_large_buttons_summary" msgid="236873938502785311">"অ্যাক্সেসিবিলিটি মেনু বোতামের সাইজ বাড়ান"</string>
<string name="pref_help_title" msgid="6871558837025010641">"সহায়তা"</string>
<string name="brightness_percentage_label" msgid="7391554573977867369">"উজ্জ্বলতা <xliff:g id="PERCENTAGE">%1$s</xliff:g> %%"</string>
diff --git a/packages/SystemUI/accessibility/accessibilitymenu/res/values-fr-rCA/strings.xml b/packages/SystemUI/accessibility/accessibilitymenu/res/values-fr-rCA/strings.xml
index 87a95037178e..e60eac0459c5 100644
--- a/packages/SystemUI/accessibility/accessibilitymenu/res/values-fr-rCA/strings.xml
+++ b/packages/SystemUI/accessibility/accessibilitymenu/res/values-fr-rCA/strings.xml
@@ -21,7 +21,7 @@
<string name="previous_button_content_description" msgid="840869171117765966">"Aller à l\'écran précédent"</string>
<string name="next_button_content_description" msgid="6810058269847364406">"Aller à l\'écran suivant"</string>
<string name="accessibility_menu_description" msgid="4458354794093858297">"Le menu Accessibilité propose un grand espace à l\'écran à l\'aide duquel vous pouvez contrôler votre appareil. Utilisez-le pour verrouiller votre appareil, régler le volume et la luminosité, prendre des captures d\'écran et plus."</string>
- <string name="accessibility_menu_summary" msgid="340071398148208130">"contrôler l\'appareil à l\'aide d\'un menu de grande taille"</string>
+ <string name="accessibility_menu_summary" msgid="340071398148208130">"Contrôle l\'appareil à l\'aide d\'un menu de grande taille"</string>
<string name="accessibility_menu_settings_name" msgid="1716888058785672611">"Paramètres du menu Accessibilité"</string>
<string name="accessibility_menu_large_buttons_title" msgid="8978499601044961736">"Boutons de grande taille"</string>
<string name="accessibility_menu_large_buttons_summary" msgid="236873938502785311">"Augmenter la taille des boutons du menu Accessibilité"</string>
diff --git a/packages/SystemUI/accessibility/accessibilitymenu/res/values-hi/strings.xml b/packages/SystemUI/accessibility/accessibilitymenu/res/values-hi/strings.xml
index 3d59c0b62ac4..c9e8858b38a8 100644
--- a/packages/SystemUI/accessibility/accessibilitymenu/res/values-hi/strings.xml
+++ b/packages/SystemUI/accessibility/accessibilitymenu/res/values-hi/strings.xml
@@ -22,7 +22,7 @@
<string name="next_button_content_description" msgid="6810058269847364406">"अगली स्क्रीन पर जाएं"</string>
<string name="accessibility_menu_description" msgid="4458354794093858297">"सुलभता मेन्यू, डिवाइस की स्क्रीन पर दिखने वाला एक बड़ा मेन्यू होता है. इस मेन्यू में जाकर, डिवाइस को लॉक करने, स्क्रीनशॉट लेने, स्क्रीन की रोशनी और आवाज़ को कंट्रोल करने जैसे कई काम किए जा सकते हैं."</string>
<string name="accessibility_menu_summary" msgid="340071398148208130">"बड़े मेन्यू की मदद से डिवाइस को कंट्रोल करें"</string>
- <string name="accessibility_menu_settings_name" msgid="1716888058785672611">"सुलभता मेन्यू सेटिंग"</string>
+ <string name="accessibility_menu_settings_name" msgid="1716888058785672611">"सुलभता मेन्यू की सेटिंग"</string>
<string name="accessibility_menu_large_buttons_title" msgid="8978499601044961736">"बड़े बटन"</string>
<string name="accessibility_menu_large_buttons_summary" msgid="236873938502785311">"सुलभता मेन्यू के बटनाें का साइज़ बढ़ाएं"</string>
<string name="pref_help_title" msgid="6871558837025010641">"सहायता"</string>
diff --git a/packages/SystemUI/accessibility/accessibilitymenu/res/values-hr/strings.xml b/packages/SystemUI/accessibility/accessibilitymenu/res/values-hr/strings.xml
index 36fcfdcd9eb3..c5388a8d6c74 100644
--- a/packages/SystemUI/accessibility/accessibilitymenu/res/values-hr/strings.xml
+++ b/packages/SystemUI/accessibility/accessibilitymenu/res/values-hr/strings.xml
@@ -22,9 +22,9 @@
<string name="next_button_content_description" msgid="6810058269847364406">"Idi na sljedeći zaslon"</string>
<string name="accessibility_menu_description" msgid="4458354794093858297">"Izbornik pristupačnosti veliki je zaslonski izbornik koji vam omogućuje upravljanje uređajem. Putem njega možete zaključati uređaj, upravljati glasnoćom i svjetlinom, izrađivati snimke zaslona i drugo."</string>
<string name="accessibility_menu_summary" msgid="340071398148208130">"Upravljajte uređajem pomoću velikog izbornika"</string>
- <string name="accessibility_menu_settings_name" msgid="1716888058785672611">"Postavke izbornika pristupačnosti"</string>
+ <string name="accessibility_menu_settings_name" msgid="1716888058785672611">"Postavke izbornika za pristupačnost"</string>
<string name="accessibility_menu_large_buttons_title" msgid="8978499601044961736">"Veliki gumbi"</string>
- <string name="accessibility_menu_large_buttons_summary" msgid="236873938502785311">"Povećanje veličine gumba izbornika Pristupačnosti"</string>
+ <string name="accessibility_menu_large_buttons_summary" msgid="236873938502785311">"Povećaj veličinu gumba izbornika za pristupačnost"</string>
<string name="pref_help_title" msgid="6871558837025010641">"Pomoć"</string>
<string name="brightness_percentage_label" msgid="7391554573977867369">"Svjetlina <xliff:g id="PERCENTAGE">%1$s</xliff:g> %%"</string>
<string name="music_volume_percentage_label" msgid="398635599662604706">"Glasnoća glazbe <xliff:g id="PERCENTAGE">%1$s</xliff:g> %%"</string>
diff --git a/packages/SystemUI/accessibility/accessibilitymenu/res/values-nb/strings.xml b/packages/SystemUI/accessibility/accessibilitymenu/res/values-nb/strings.xml
index 09830520dd74..e95d0edbf320 100644
--- a/packages/SystemUI/accessibility/accessibilitymenu/res/values-nb/strings.xml
+++ b/packages/SystemUI/accessibility/accessibilitymenu/res/values-nb/strings.xml
@@ -12,7 +12,7 @@
<string name="lockscreen_label" msgid="648347953557887087">"Låseskjerm"</string>
<string name="quick_settings_label" msgid="2999117381487601865">"Hurtiginnstillinger"</string>
<string name="notifications_label" msgid="6829741046963013567">"Varsler"</string>
- <string name="screenshot_label" msgid="863978141223970162">"Skjermdump"</string>
+ <string name="screenshot_label" msgid="863978141223970162">"Skjermbilde"</string>
<string name="screenshot_utterance" msgid="1430760563401895074">"Ta skjermbilde"</string>
<string name="volume_up_label" msgid="8592766918780362870">"Volum opp"</string>
<string name="volume_down_label" msgid="8574981863656447346">"Volum ned"</string>
diff --git a/packages/SystemUI/accessibility/accessibilitymenu/res/values-nl/strings.xml b/packages/SystemUI/accessibility/accessibilitymenu/res/values-nl/strings.xml
index 7535c2b0f538..1e28bff6ca7e 100644
--- a/packages/SystemUI/accessibility/accessibilitymenu/res/values-nl/strings.xml
+++ b/packages/SystemUI/accessibility/accessibilitymenu/res/values-nl/strings.xml
@@ -24,7 +24,7 @@
<string name="accessibility_menu_summary" msgid="340071398148208130">"Bedien het apparaat via een groot menu"</string>
<string name="accessibility_menu_settings_name" msgid="1716888058785672611">"Instellingen toegankelijkheidsmenu"</string>
<string name="accessibility_menu_large_buttons_title" msgid="8978499601044961736">"Grote knoppen"</string>
- <string name="accessibility_menu_large_buttons_summary" msgid="236873938502785311">"Vergroot knoppen in het toegankelijkheidsmenu"</string>
+ <string name="accessibility_menu_large_buttons_summary" msgid="236873938502785311">"Maak knoppen in toegankelijkheidsmenu groter"</string>
<string name="pref_help_title" msgid="6871558837025010641">"Hulp"</string>
<string name="brightness_percentage_label" msgid="7391554573977867369">"Helderheid <xliff:g id="PERCENTAGE">%1$s</xliff:g>%%"</string>
<string name="music_volume_percentage_label" msgid="398635599662604706">"Muziekvolume <xliff:g id="PERCENTAGE">%1$s</xliff:g>%%"</string>
diff --git a/packages/SystemUI/accessibility/accessibilitymenu/res/values-sk/strings.xml b/packages/SystemUI/accessibility/accessibilitymenu/res/values-sk/strings.xml
index 62f63a8739d4..3c92f83b19aa 100644
--- a/packages/SystemUI/accessibility/accessibilitymenu/res/values-sk/strings.xml
+++ b/packages/SystemUI/accessibility/accessibilitymenu/res/values-sk/strings.xml
@@ -22,9 +22,9 @@
<string name="next_button_content_description" msgid="6810058269847364406">"Prejsť na ďalšiu obrazovku"</string>
<string name="accessibility_menu_description" msgid="4458354794093858297">"Ponuka dostupnosti spustí na obrazovke telefónu veľkú ponuku, pomocou ktorej môžete ovládať svoje zariadenie. Môžete ho uzamknúť, ovládať hlasitosť a jas, vytvárať snímky obrazovky a mnoho ďalšieho."</string>
<string name="accessibility_menu_summary" msgid="340071398148208130">"Ovládanie zariadenia pomocou veľkej ponuky"</string>
- <string name="accessibility_menu_settings_name" msgid="1716888058785672611">"Nastavenia ponuky dostupnosti"</string>
+ <string name="accessibility_menu_settings_name" msgid="1716888058785672611">"Nastavenia ponuky Dostupnosť"</string>
<string name="accessibility_menu_large_buttons_title" msgid="8978499601044961736">"Veľké tlačidlá"</string>
- <string name="accessibility_menu_large_buttons_summary" msgid="236873938502785311">"Zväčšiť tlačidlá ponuky dostupnosti"</string>
+ <string name="accessibility_menu_large_buttons_summary" msgid="236873938502785311">"Zväčšiť tlačidlá ponuky Dostupnosť"</string>
<string name="pref_help_title" msgid="6871558837025010641">"Pomocník"</string>
<string name="brightness_percentage_label" msgid="7391554573977867369">"Jas: <xliff:g id="PERCENTAGE">%1$s</xliff:g> %%"</string>
<string name="music_volume_percentage_label" msgid="398635599662604706">"Hlasitosť hudby: <xliff:g id="PERCENTAGE">%1$s</xliff:g> %%"</string>
diff --git a/packages/SystemUI/aconfig/communal.aconfig b/packages/SystemUI/aconfig/communal.aconfig
index afcd8a9624c8..f2b5efa6a571 100644
--- a/packages/SystemUI/aconfig/communal.aconfig
+++ b/packages/SystemUI/aconfig/communal.aconfig
@@ -8,12 +8,3 @@ flag {
bug: "304584416"
}
-flag {
- name: "enable_widget_picker_size_filter"
- namespace: "communal"
- description: "Enables passing a size filter to the widget picker"
- bug: "345482907"
- metadata {
- purpose: PURPOSE_BUGFIX
- }
-}
diff --git a/packages/SystemUI/aconfig/systemui.aconfig b/packages/SystemUI/aconfig/systemui.aconfig
index 3f165a3bcb63..02e042327d66 100644
--- a/packages/SystemUI/aconfig/systemui.aconfig
+++ b/packages/SystemUI/aconfig/systemui.aconfig
@@ -591,10 +591,13 @@ flag {
}
flag {
- name: "screenshot_shelf_ui2"
+ name: "screenshot_save_image_exporter"
namespace: "systemui"
- description: "Use new shelf UI flow for screenshots"
- bug: "329659738"
+ description: "Save all screenshots using ImageExporter"
+ bug: "352308052"
+ metadata {
+ purpose: PURPOSE_BUGFIX
+ }
}
flag {
@@ -824,13 +827,6 @@ flag {
}
flag {
- name: "media_controls_refactor"
- namespace: "systemui"
- description: "Refactors media code to follow the recommended architecture"
- bug: "326408371"
-}
-
-flag {
name: "qs_tile_focus_state"
namespace: "systemui"
description: "enables new focus outline for qs tiles when focused on with physical keyboard"
@@ -874,6 +870,13 @@ flag {
}
flag {
+ name: "qs_ui_refactor_compose_fragment"
+ namespace: "systemui"
+ description: "Uses a different QS fragment in NPVC that uses the new compose UI and recommended architecture. This flag depends on qs_ui_refactor flag."
+ bug: "325099249"
+}
+
+flag {
name: "remove_dream_overlay_hide_on_touch"
namespace: "systemui"
description: "Removes logic to hide the dream overlay on user interaction, as it conflicts with various transitions"
@@ -985,6 +988,16 @@ flag {
}
flag {
+ name: "communal_scene_ktf_refactor"
+ namespace: "systemui"
+ description: "refactors the syncing mechanism between communal STL and KTF state."
+ bug: "327225415"
+ metadata {
+ purpose: PURPOSE_BUGFIX
+ }
+}
+
+flag {
name: "app_clips_backlinks"
namespace: "systemui"
description: "Enables Backlinks improvement feature in App Clips"
@@ -1157,3 +1170,77 @@ flag {
purpose: PURPOSE_BUGFIX
}
}
+
+flag {
+ namespace: "systemui"
+ name: "qs_register_setting_observer_on_bg_thread"
+ description: "Registers Quick Settings content providers on background thread"
+ bug: "351766769"
+ metadata {
+ purpose: PURPOSE_BUGFIX
+ }
+}
+
+flag {
+ name: "sounddose_customization"
+ namespace: "systemui"
+ description: "Enables custom actions for sounddose notifications"
+ bug: "345227709"
+}
+
+flag {
+ namespace: "systemui"
+ name: "register_content_observers_async"
+ description: "Use new Async API to register content observers"
+ bug: "316922634"
+ metadata {
+ purpose: PURPOSE_BUGFIX
+ }
+}
+
+flag {
+ name: "msdl_feedback"
+ namespace: "systemui"
+ description: "Enables MSDL feedback in SysUI surfaces."
+ bug: "352600066"
+}
+
+flag {
+ namespace: "systemui"
+ name: "remove_update_listener_in_qs_icon_view_impl"
+ description: "Remove update listeners in QsIconViewImpl class to avoid memory leak."
+ bug: "327078684"
+ metadata {
+ purpose: PURPOSE_BUGFIX
+ }
+}
+
+flag {
+ name: "sim_pin_race_condition_on_restart"
+ namespace: "systemui"
+ description: "The SIM PIN screen may be shown incorrectly on reboot"
+ bug: "351426938"
+ metadata {
+ purpose: PURPOSE_BUGFIX
+ }
+}
+
+flag {
+ name: "sim_pin_talkback_fix_for_double_submit"
+ namespace: "systemui"
+ description: "The SIM PIN entry screens show the wrong message due"
+ bug: "346932439"
+ metadata {
+ purpose: PURPOSE_BUGFIX
+ }
+}
+
+flag {
+ name: "lockscreen_preview_renderer_create_on_main_thread"
+ namespace: "systemui"
+ description: "Force preview renderer to be created on the main thread"
+ bug: "343732179"
+ metadata {
+ purpose: PURPOSE_BUGFIX
+ }
+} \ No newline at end of file
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/BouncerContent.kt b/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/BouncerContent.kt
index b8f9ca82f072..f655ac1d207b 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/BouncerContent.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/BouncerContent.kt
@@ -83,6 +83,7 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.android.compose.PlatformButton
import com.android.compose.animation.Easings
import com.android.compose.animation.scene.ElementKey
+import com.android.compose.animation.scene.MutableSceneTransitionLayoutState
import com.android.compose.animation.scene.SceneKey
import com.android.compose.animation.scene.SceneScope
import com.android.compose.animation.scene.SceneTransitionLayout
@@ -516,13 +517,22 @@ private fun FoldAware(
val currentSceneKey =
if (isSplitAroundTheFold) SceneKeys.SplitSceneKey else SceneKeys.ContiguousSceneKey
- SceneTransitionLayout(
- currentScene = currentSceneKey,
- onChangeScene = {},
- transitions = SceneTransitions,
- modifier = modifier,
- enableInterruptions = false,
- ) {
+ val state = remember {
+ MutableSceneTransitionLayoutState(
+ currentSceneKey,
+ SceneTransitions,
+ enableInterruptions = false,
+ )
+ }
+
+ // Update state whenever currentSceneKey has changed.
+ LaunchedEffect(state, currentSceneKey) {
+ if (currentSceneKey != state.transitionState.currentScene) {
+ state.setTargetScene(currentSceneKey, coroutineScope = this)
+ }
+ }
+
+ SceneTransitionLayout(state, modifier = modifier) {
scene(SceneKeys.ContiguousSceneKey) {
FoldableScene(
aboveFold = aboveFold,
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalContainer.kt b/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalContainer.kt
index d0466313cf81..35db9e0c2bb8 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalContainer.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalContainer.kt
@@ -28,7 +28,6 @@ import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.unit.dp
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.android.compose.animation.scene.Back
-import com.android.compose.animation.scene.CommunalSwipeDetector
import com.android.compose.animation.scene.Edge
import com.android.compose.animation.scene.ElementKey
import com.android.compose.animation.scene.ElementMatcher
@@ -46,7 +45,7 @@ import com.android.systemui.Flags.glanceableHubBackGesture
import com.android.systemui.communal.shared.model.CommunalBackgroundType
import com.android.systemui.communal.shared.model.CommunalScenes
import com.android.systemui.communal.shared.model.CommunalTransitionKeys
-import com.android.systemui.communal.ui.compose.Dimensions.SlideOffsetY
+import com.android.systemui.communal.ui.compose.Dimensions.Companion.SlideOffsetY
import com.android.systemui.communal.ui.compose.extensions.allowGestures
import com.android.systemui.communal.ui.viewmodel.CommunalViewModel
import com.android.systemui.communal.util.CommunalColors
@@ -210,7 +209,6 @@ fun CommunalContainer(
backgroundType = backgroundType,
colors = colors,
content = content,
- modifier = Modifier.horizontalNestedScrollToScene(),
)
}
}
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalHub.kt b/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalHub.kt
index b7d6e09515ac..68e968fdfb4e 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalHub.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalHub.kt
@@ -16,6 +16,8 @@
package com.android.systemui.communal.ui.compose
+import android.content.Context
+import android.content.res.Configuration
import android.graphics.drawable.Icon
import android.os.Bundle
import android.util.SizeF
@@ -40,6 +42,7 @@ import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.focusable
+import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.BoxScope
@@ -64,6 +67,7 @@ import androidx.compose.foundation.lazy.grid.GridItemSpan
import androidx.compose.foundation.lazy.grid.LazyGridState
import androidx.compose.foundation.lazy.grid.LazyHorizontalGrid
import androidx.compose.foundation.lazy.grid.rememberLazyGridState
+import androidx.compose.foundation.selection.selectable
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Add
@@ -94,6 +98,7 @@ import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.setValue
+import androidx.compose.runtime.snapshotFlow
import androidx.compose.ui.Alignment
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.Modifier
@@ -113,6 +118,7 @@ import androidx.compose.ui.layout.boundsInWindow
import androidx.compose.ui.layout.onGloballyPositioned
import androidx.compose.ui.layout.onSizeChanged
import androidx.compose.ui.layout.positionInWindow
+import androidx.compose.ui.platform.LocalConfiguration
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.platform.testTag
@@ -126,6 +132,7 @@ import androidx.compose.ui.semantics.onClick
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.semantics.testTagsAsResourceId
import androidx.compose.ui.text.style.TextAlign
+import androidx.compose.ui.unit.Density
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.IntSize
import androidx.compose.ui.unit.LayoutDirection
@@ -171,7 +178,11 @@ fun CommunalHub(
var removeButtonCoordinates: LayoutCoordinates? by remember { mutableStateOf(null) }
var toolbarSize: IntSize? by remember { mutableStateOf(null) }
var gridCoordinates: LayoutCoordinates? by remember { mutableStateOf(null) }
- val gridState = rememberLazyGridState()
+
+ val gridState =
+ rememberLazyGridState(viewModel.savedFirstScrollIndex, viewModel.savedFirstScrollOffset)
+ viewModel.clearPersistedScrollPosition()
+
val contentListState = rememberContentListState(widgetConfigurator, communalContent, viewModel)
val reorderingWidgets by viewModel.reorderingWidgets.collectAsStateWithLifecycle()
val selectedKey = viewModel.selectedKey.collectAsStateWithLifecycle()
@@ -187,6 +198,8 @@ fun CommunalHub(
val contentPadding = gridContentPadding(viewModel.isEditMode, toolbarSize)
val contentOffset = beforeContentPadding(contentPadding).toOffset()
+ ObserveScrollEffect(gridState, viewModel)
+
if (!viewModel.isEditMode) {
ScrollOnUpdatedLiveContentEffect(communalContent, gridState)
}
@@ -379,6 +392,10 @@ fun CommunalHub(
}
}
+val hubDimensions: Dimensions
+ @Composable
+ get() = Dimensions(LocalContext.current, LocalConfiguration.current, LocalDensity.current)
+
@Composable
private fun DisclaimerBottomSheetContent(onButtonClicked: () -> Unit) {
val colors = LocalAndroidColorScheme.current
@@ -420,6 +437,20 @@ private fun DisclaimerBottomSheetContent(onButtonClicked: () -> Unit) {
}
}
+@Composable
+private fun ObserveScrollEffect(
+ gridState: LazyGridState,
+ communalViewModel: BaseCommunalViewModel
+) {
+
+ LaunchedEffect(gridState) {
+ snapshotFlow {
+ Pair(gridState.firstVisibleItemIndex, gridState.firstVisibleItemScrollOffset)
+ }
+ .collect { communalViewModel.onScrollPositionUpdated(it.first, it.second) }
+ }
+}
+
/**
* Observes communal content and scrolls to any added or updated live content, e.g. a new media
* session is started, or a paused timer is resumed.
@@ -486,7 +517,6 @@ private fun BoxScope.CommunalHubLazyGrid(
gridState = gridState,
contentListState = contentListState,
contentOffset = contentOffset,
- updateDragPositionForRemove = updateDragPositionForRemove
)
// A full size box in background that listens to widget drops from the picker.
@@ -494,7 +524,7 @@ private fun BoxScope.CommunalHubLazyGrid(
// for android drag events.
Box(Modifier.fillMaxSize().dragAndDropTarget(dragAndDropTargetState)) {}
} else {
- gridModifier = gridModifier.height(Dimensions.GridHeight)
+ gridModifier = gridModifier.height(hubDimensions.GridHeight)
}
LazyHorizontalGrid(
@@ -572,7 +602,7 @@ private fun EmptyStateCta(
) {
val colors = LocalAndroidColorScheme.current
Card(
- modifier = Modifier.height(Dimensions.GridHeight).padding(contentPadding),
+ modifier = Modifier.height(hubDimensions.GridHeight).padding(contentPadding),
colors = CardDefaults.cardColors(containerColor = Color.Transparent),
border = BorderStroke(3.dp, colors.secondary),
shape = RoundedCornerShape(size = 80.dp)
@@ -661,10 +691,7 @@ private fun Toolbar(
val addWidgetText = stringResource(R.string.hub_mode_add_widget_button_text)
ToolbarButton(
isPrimary = !removeEnabled,
- modifier =
- Modifier.align(Alignment.CenterStart).semantics {
- contentDescription = addWidgetText
- },
+ modifier = Modifier.align(Alignment.CenterStart),
onClick = onOpenWidgetPicker,
) {
Icon(Icons.Default.Add, null)
@@ -701,7 +728,7 @@ private fun Toolbar(
),
verticalAlignment = Alignment.CenterVertically
) {
- Icon(Icons.Default.Close, stringResource(R.string.button_to_remove_widget))
+ Icon(Icons.Default.Close, contentDescription = null)
Text(
text = stringResource(R.string.button_to_remove_widget),
)
@@ -714,10 +741,7 @@ private fun Toolbar(
modifier = Modifier.align(Alignment.CenterEnd),
onClick = onEditDone,
) {
- Icon(
- Icons.Default.Check,
- stringResource(id = R.string.hub_mode_editing_exit_button_text)
- )
+ Icon(Icons.Default.Check, contentDescription = null)
Text(
text = stringResource(R.string.hub_mode_editing_exit_button_text),
)
@@ -945,12 +969,30 @@ private fun WidgetContent(
val clickActionLabel = stringResource(R.string.accessibility_action_label_select_widget)
val removeWidgetActionLabel = stringResource(R.string.accessibility_action_label_remove_widget)
val placeWidgetActionLabel = stringResource(R.string.accessibility_action_label_place_widget)
+ val unselectWidgetActionLabel =
+ stringResource(R.string.accessibility_action_label_unselect_widget)
val selectedKey by viewModel.selectedKey.collectAsStateWithLifecycle()
val selectedIndex =
selectedKey?.let { key -> contentListState.list.indexOfFirst { it.key == key } }
+
+ val isSelected = selectedKey == model.key
+
+ val selectableModifier =
+ if (viewModel.isEditMode) {
+ Modifier.selectable(
+ selected = isSelected,
+ onClick = { viewModel.setSelectedKey(model.key) },
+ interactionSource = remember { MutableInteractionSource() },
+ indication = null,
+ )
+ } else {
+ Modifier
+ }
+
Box(
modifier =
modifier
+ .then(selectableModifier)
.thenIf(!viewModel.isEditMode && model.inQuietMode) {
Modifier.pointerInput(Unit) {
// consume tap to prevent the child view from triggering interactions with
@@ -962,26 +1004,15 @@ private fun WidgetContent(
}
.thenIf(viewModel.isEditMode) {
Modifier.semantics {
+ onClick(clickActionLabel, null)
contentDescription = accessibilityLabel
- onClick(label = clickActionLabel, action = null)
val deleteAction =
CustomAccessibilityAction(removeWidgetActionLabel) {
contentListState.onRemove(index)
contentListState.onSaveList()
true
}
- val selectWidgetAction =
- CustomAccessibilityAction(clickActionLabel) {
- val currentWidgetKey =
- index?.let {
- keyAtIndexIfEditable(contentListState.list, index)
- }
- viewModel.setSelectedKey(currentWidgetKey)
- true
- }
-
- val actions = mutableListOf(deleteAction, selectWidgetAction)
-
+ val actions = mutableListOf(deleteAction)
if (selectedIndex != null && selectedIndex != index) {
actions.add(
CustomAccessibilityAction(placeWidgetActionLabel) {
@@ -993,6 +1024,21 @@ private fun WidgetContent(
)
}
+ if (!selected) {
+ actions.add(
+ CustomAccessibilityAction(clickActionLabel) {
+ viewModel.setSelectedKey(model.key)
+ true
+ }
+ )
+ } else {
+ actions.add(
+ CustomAccessibilityAction(unselectWidgetActionLabel) {
+ viewModel.setSelectedKey(null)
+ true
+ }
+ )
+ }
customActions = actions
}
}
@@ -1247,7 +1293,7 @@ private fun gridContentPadding(isEditMode: Boolean, toolbarSize: IntSize?): Padd
return PaddingValues(
start = Dimensions.ItemSpacing,
end = Dimensions.ItemSpacing,
- top = Dimensions.GridTopSpacing,
+ top = hubDimensions.GridTopSpacing,
)
}
val context = LocalContext.current
@@ -1256,7 +1302,8 @@ private fun gridContentPadding(isEditMode: Boolean, toolbarSize: IntSize?): Padd
val screenHeight = with(density) { windowMetrics.bounds.height().toDp() }
val toolbarHeight = with(density) { Dimensions.ToolbarPaddingTop + toolbarSize.height.toDp() }
val verticalPadding =
- ((screenHeight - toolbarHeight - Dimensions.GridHeight + Dimensions.GridTopSpacing) / 2)
+ ((screenHeight - toolbarHeight - hubDimensions.GridHeight + hubDimensions.GridTopSpacing) /
+ 2)
.coerceAtLeast(Dimensions.Spacing)
return PaddingValues(
start = Dimensions.ToolbarPaddingHorizontal,
@@ -1312,29 +1359,44 @@ data class ContentPaddingInPx(val start: Float, val top: Float) {
fun toOffset(): Offset = Offset(start, top)
}
-object Dimensions {
- val CardHeightFull = 530.dp
- val GridTopSpacing = 114.dp
+class Dimensions(val context: Context, val config: Configuration, val density: Density) {
+ val GridTopSpacing: Dp
+ get() {
+ if (config.orientation == Configuration.ORIENTATION_LANDSCAPE) {
+ return 114.dp
+ } else {
+ val windowMetrics =
+ WindowMetricsCalculator.getOrCreate().computeCurrentWindowMetrics(context)
+ val screenHeight = with(density) { windowMetrics.bounds.height().toDp() }
+
+ return (screenHeight - CardHeightFull) / 2
+ }
+ }
+
val GridHeight = CardHeightFull + GridTopSpacing
- val ItemSpacing = 50.dp
- val CardHeightHalf = (CardHeightFull - ItemSpacing) / 2
- val CardHeightThird = (CardHeightFull - (2 * ItemSpacing)) / 3
- val CardWidth = 360.dp
- val CardOutlineWidth = 3.dp
- val Spacing = ItemSpacing / 2
-
- // The sizing/padding of the toolbar in glanceable hub edit mode
- val ToolbarPaddingTop = 27.dp
- val ToolbarPaddingHorizontal = ItemSpacing
- val ToolbarButtonPaddingHorizontal = 24.dp
- val ToolbarButtonPaddingVertical = 16.dp
- val ButtonPadding =
- PaddingValues(
- vertical = ToolbarButtonPaddingVertical,
- horizontal = ToolbarButtonPaddingHorizontal,
- )
- val IconSize = 40.dp
- val SlideOffsetY = 30.dp
+
+ companion object {
+ val CardHeightFull = 530.dp
+ val ItemSpacing = 50.dp
+ val CardHeightHalf = (CardHeightFull - ItemSpacing) / 2
+ val CardHeightThird = (CardHeightFull - (2 * ItemSpacing)) / 3
+ val CardWidth = 360.dp
+ val CardOutlineWidth = 3.dp
+ val Spacing = ItemSpacing / 2
+
+ // The sizing/padding of the toolbar in glanceable hub edit mode
+ val ToolbarPaddingTop = 27.dp
+ val ToolbarPaddingHorizontal = ItemSpacing
+ val ToolbarButtonPaddingHorizontal = 24.dp
+ val ToolbarButtonPaddingVertical = 16.dp
+ val ButtonPadding =
+ PaddingValues(
+ vertical = ToolbarButtonPaddingVertical,
+ horizontal = ToolbarButtonPaddingHorizontal,
+ )
+ val IconSize = 40.dp
+ val SlideOffsetY = 30.dp
+ }
}
private object Colors {
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/DragAndDropTargetState.kt b/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/DragAndDropTargetState.kt
index 9e6f22a69dbc..0c293948dd3c 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/DragAndDropTargetState.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/DragAndDropTargetState.kt
@@ -18,17 +18,13 @@ package com.android.systemui.communal.ui.compose
import android.content.ClipDescription
import android.view.DragEvent
-import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.draganddrop.dragAndDropTarget
import androidx.compose.foundation.gestures.Orientation
import androidx.compose.foundation.gestures.scrollBy
-import androidx.compose.foundation.lazy.grid.LazyGridItemInfo
import androidx.compose.foundation.lazy.grid.LazyGridState
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
-import androidx.compose.runtime.MutableState
import androidx.compose.runtime.getValue
-import androidx.compose.runtime.mutableFloatStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.rememberUpdatedState
@@ -45,8 +41,7 @@ import com.android.systemui.communal.ui.compose.extensions.firstItemAtOffset
import com.android.systemui.communal.util.WidgetPickerIntentUtils
import com.android.systemui.communal.util.WidgetPickerIntentUtils.getWidgetExtraFromIntent
import kotlinx.coroutines.CoroutineScope
-import kotlinx.coroutines.delay
-import kotlinx.coroutines.isActive
+import kotlinx.coroutines.channels.Channel
import kotlinx.coroutines.launch
/**
@@ -59,32 +54,22 @@ internal fun rememberDragAndDropTargetState(
gridState: LazyGridState,
contentOffset: Offset,
contentListState: ContentListState,
- updateDragPositionForRemove: (offset: Offset) -> Boolean,
): DragAndDropTargetState {
val scope = rememberCoroutineScope()
- val autoScrollSpeed = remember { mutableFloatStateOf(0f) }
- // Threshold of distance from edges that should start auto-scroll - chosen to be a narrow value
- // that allows differentiating intention of scrolling from intention of dragging over the first
- // visible item.
val autoScrollThreshold = with(LocalDensity.current) { 60.dp.toPx() }
val state =
- remember(gridState, contentListState) {
+ remember(gridState, contentOffset, contentListState, autoScrollThreshold, scope) {
DragAndDropTargetState(
state = gridState,
contentOffset = contentOffset,
contentListState = contentListState,
- scope = scope,
- autoScrollSpeed = autoScrollSpeed,
autoScrollThreshold = autoScrollThreshold,
- updateDragPositionForRemove = updateDragPositionForRemove,
+ scope = scope,
)
}
- LaunchedEffect(autoScrollSpeed.floatValue) {
- if (autoScrollSpeed.floatValue != 0f) {
- while (isActive) {
- gridState.scrollBy(autoScrollSpeed.floatValue)
- delay(10)
- }
+ LaunchedEffect(state) {
+ for (diff in state.scrollChannel) {
+ gridState.scrollBy(diff)
}
}
return state
@@ -96,7 +81,6 @@ internal fun rememberDragAndDropTargetState(
* @see androidx.compose.foundation.draganddrop.dragAndDropTarget
* @see DragEvent
*/
-@OptIn(ExperimentalFoundationApi::class)
@Composable
internal fun Modifier.dragAndDropTarget(
dragDropTargetState: DragAndDropTargetState,
@@ -122,6 +106,10 @@ internal fun Modifier.dragAndDropTarget(
return state.onDrop(event)
}
+ override fun onExited(event: DragAndDropEvent) {
+ state.onExited()
+ }
+
override fun onEnded(event: DragAndDropEvent) {
state.onEnded()
}
@@ -149,19 +137,17 @@ internal class DragAndDropTargetState(
private val state: LazyGridState,
private val contentOffset: Offset,
private val contentListState: ContentListState,
- private val scope: CoroutineScope,
- private val autoScrollSpeed: MutableState<Float>,
private val autoScrollThreshold: Float,
- private val updateDragPositionForRemove: (offset: Offset) -> Boolean,
+ private val scope: CoroutineScope,
) {
/**
* The placeholder item that is treated as if it is being dragged across the grid. It is added
* to grid once drag and drop event is started and removed when event ends.
*/
private var placeHolder = CommunalContentModel.WidgetPlaceholder()
-
private var placeHolderIndex: Int? = null
- private var isOnRemoveButton = false
+
+ internal val scrollChannel = Channel<Float>()
fun onStarted() {
// assume item will be added to the end.
@@ -170,39 +156,39 @@ internal class DragAndDropTargetState(
}
fun onMoved(event: DragAndDropEvent) {
- val dragEvent = event.toAndroidDragEvent()
- isOnRemoveButton = updateDragPositionForRemove(Offset(dragEvent.x, dragEvent.y))
- if (!isOnRemoveButton) {
- findTargetItem(dragEvent)?.apply {
- var scrollIndex: Int? = null
- var scrollOffset: Int? = null
- if (placeHolderIndex == state.firstVisibleItemIndex) {
- // Save info about the first item before the move, to neutralize the automatic
- // keeping first item first.
- scrollIndex = placeHolderIndex
- scrollOffset = state.firstVisibleItemScrollOffset
- }
+ val dragOffset = event.toOffset()
- autoScrollIfNearEdges(dragEvent)
+ val targetItem =
+ state.layoutInfo.visibleItemsInfo
+ .asSequence()
+ .filter { item -> contentListState.isItemEditable(item.index) }
+ .firstItemAtOffset(dragOffset - contentOffset)
- if (contentListState.isItemEditable(this.index)) {
- movePlaceholderTo(this.index)
- placeHolderIndex = this.index
- }
+ if (targetItem != null) {
+ var scrollIndex: Int? = null
+ var scrollOffset: Int? = null
+ if (placeHolderIndex == state.firstVisibleItemIndex) {
+ // Save info about the first item before the move, to neutralize the automatic
+ // keeping first item first.
+ scrollIndex = placeHolderIndex
+ scrollOffset = state.firstVisibleItemScrollOffset
+ }
- if (scrollIndex != null && scrollOffset != null) {
- // this is needed to neutralize automatic keeping the first item first.
- scope.launch { state.scrollToItem(scrollIndex, scrollOffset) }
- }
+ if (contentListState.isItemEditable(targetItem.index)) {
+ movePlaceholderTo(targetItem.index)
+ placeHolderIndex = targetItem.index
}
+
+ if (scrollIndex != null && scrollOffset != null) {
+ // this is needed to neutralize automatic keeping the first item first.
+ scope.launch { state.scrollToItem(scrollIndex, scrollOffset) }
+ }
+ } else {
+ computeAutoscroll(dragOffset).takeIf { it != 0f }?.let { scrollChannel.trySend(it) }
}
}
fun onDrop(event: DragAndDropEvent): Boolean {
- autoScrollSpeed.value = 0f
- if (isOnRemoveButton) {
- return false
- }
return placeHolderIndex?.let { dropIndex ->
val widgetExtra = event.maybeWidgetExtra() ?: return false
val (componentName, user) = widgetExtra
@@ -221,39 +207,35 @@ internal class DragAndDropTargetState(
}
fun onEnded() {
- autoScrollSpeed.value = 0f
placeHolderIndex = null
contentListState.list.remove(placeHolder)
- isOnRemoveButton = updateDragPositionForRemove(Offset.Zero)
}
- private fun autoScrollIfNearEdges(dragEvent: DragEvent) {
+ fun onExited() {
+ onEnded()
+ }
+
+ private fun computeAutoscroll(dragOffset: Offset): Float {
val orientation = state.layoutInfo.orientation
val distanceFromStart =
if (orientation == Orientation.Horizontal) {
- dragEvent.x
+ dragOffset.x
} else {
- dragEvent.y
+ dragOffset.y
}
val distanceFromEnd =
if (orientation == Orientation.Horizontal) {
- state.layoutInfo.viewportSize.width - dragEvent.x
+ state.layoutInfo.viewportEndOffset - dragOffset.x
} else {
- state.layoutInfo.viewportSize.height - dragEvent.y
+ state.layoutInfo.viewportEndOffset - dragOffset.y
}
- autoScrollSpeed.value =
- when {
- distanceFromEnd < autoScrollThreshold -> autoScrollThreshold - distanceFromEnd
- distanceFromStart < autoScrollThreshold ->
- -(autoScrollThreshold - distanceFromStart)
- else -> 0f
- }
- }
- private fun findTargetItem(dragEvent: DragEvent): LazyGridItemInfo? =
- state.layoutInfo.visibleItemsInfo.firstItemAtOffset(
- Offset(dragEvent.x, dragEvent.y) - contentOffset
- )
+ return when {
+ distanceFromEnd < autoScrollThreshold -> autoScrollThreshold - distanceFromEnd
+ distanceFromStart < autoScrollThreshold -> distanceFromStart - autoScrollThreshold
+ else -> 0f
+ }
+ }
private fun movePlaceholderTo(index: Int) {
val currentIndex = contentListState.list.indexOf(placeHolder)
@@ -271,4 +253,6 @@ internal class DragAndDropTargetState(
val clipData = this.toAndroidDragEvent().clipData.takeIf { it.itemCount != 0 }
return clipData?.getItemAt(0)?.intent?.let { intent -> getWidgetExtraFromIntent(intent) }
}
+
+ private fun DragAndDropEvent.toOffset() = this.toAndroidDragEvent().run { Offset(x, y) }
}
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/section/CommunalPopupSection.kt b/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/section/CommunalPopupSection.kt
index 1ea73e144962..b4c1a2e85daf 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/section/CommunalPopupSection.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/section/CommunalPopupSection.kt
@@ -23,6 +23,8 @@ import androidx.compose.animation.core.tween
import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
import androidx.compose.foundation.background
+import androidx.compose.foundation.focusable
+import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
@@ -39,9 +41,13 @@ import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
+import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
+import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
+import androidx.compose.ui.focus.FocusRequester
+import androidx.compose.ui.focus.focusRequester
import androidx.compose.ui.graphics.TransformOrigin
import androidx.compose.ui.graphics.graphicsLayer
import androidx.compose.ui.res.stringResource
@@ -54,6 +60,7 @@ import com.android.systemui.communal.ui.viewmodel.CommunalViewModel
import com.android.systemui.communal.ui.viewmodel.PopupType
import com.android.systemui.res.R
import javax.inject.Inject
+import kotlinx.coroutines.delay
class CommunalPopupSection
@Inject
@@ -91,6 +98,15 @@ constructor(
onClick: () -> Unit,
onDismissRequest: () -> Unit,
) {
+ val interactionSource = remember { MutableInteractionSource() }
+ val focusRequester = remember { FocusRequester() }
+
+ LaunchedEffect(Unit) {
+ // Adding a delay to ensure the animation completes before requesting focus
+ delay(250)
+ focusRequester.requestFocus()
+ }
+
Popup(
alignment = Alignment.TopCenter,
offset = IntOffset(0, 40),
@@ -100,6 +116,8 @@ constructor(
Button(
modifier =
Modifier.height(56.dp)
+ .focusRequester(focusRequester)
+ .focusable(interactionSource = interactionSource)
.graphicsLayer { transformOrigin = TransformOrigin(0f, 0f) }
.animateEnterExit(
enter =
@@ -142,8 +160,7 @@ constructor(
) {
Icon(
imageVector = Icons.Outlined.Widgets,
- contentDescription =
- stringResource(R.string.button_to_configure_widgets_text),
+ contentDescription = null,
tint = colors.onSecondary,
modifier = Modifier.size(20.dp)
)
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/LockscreenContent.kt b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/LockscreenContent.kt
index 887e3494b49e..25e91bed5808 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/LockscreenContent.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/LockscreenContent.kt
@@ -16,6 +16,7 @@
package com.android.systemui.keyguard.ui.composable
+import androidx.compose.foundation.layout.Box
import androidx.compose.runtime.Composable
import androidx.compose.runtime.DisposableEffect
import androidx.compose.runtime.getValue
@@ -48,6 +49,16 @@ class LockscreenContent(
fun SceneScope.Content(
modifier: Modifier = Modifier,
) {
+ val isContentVisible: Boolean by viewModel.isContentVisible.collectAsStateWithLifecycle()
+ if (!isContentVisible) {
+ // If the content isn't supposed to be visible, show a large empty box as it's needed
+ // for scene transition animations (can't just skip rendering everything or shared
+ // elements won't have correct final/initial bounds from animating in and out of the
+ // lockscreen scene).
+ Box(modifier)
+ return
+ }
+
val coroutineScope = rememberCoroutineScope()
val blueprintId by viewModel.blueprintId(coroutineScope).collectAsStateWithLifecycle()
val view = LocalView.current
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/LockscreenLongPress.kt b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/LockscreenLongPress.kt
index c34fb38f8558..c9938552a3d5 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/LockscreenLongPress.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/LockscreenLongPress.kt
@@ -55,7 +55,7 @@ fun LockscreenLongPress(
modifier
.pointerInput(isEnabled) {
if (isEnabled) {
- detectLongPressGesture { viewModel.onLongPress() }
+ detectLongPressGesture { viewModel.onLongPress(isA11yAction = false) }
}
}
.pointerInput(Unit) {
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/blueprint/DefaultBlueprint.kt b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/blueprint/DefaultBlueprint.kt
index 0a4c6fd21922..7400711e36df 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/blueprint/DefaultBlueprint.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/blueprint/DefaultBlueprint.kt
@@ -67,8 +67,7 @@ constructor(
@Composable
override fun SceneScope.Content(modifier: Modifier) {
val isUdfpsVisible = viewModel.isUdfpsVisible
- val shouldUseSplitNotificationShade by
- viewModel.shouldUseSplitNotificationShade.collectAsStateWithLifecycle()
+ val isShadeLayoutWide by viewModel.isShadeLayoutWide.collectAsStateWithLifecycle()
val unfoldTranslations by viewModel.unfoldTranslations.collectAsStateWithLifecycle()
LockscreenLongPress(
@@ -100,7 +99,7 @@ constructor(
}
)
}
- if (shouldUseSplitNotificationShade) {
+ if (isShadeLayoutWide) {
with(notificationSection) {
Notifications(
burnInParams = null,
@@ -112,7 +111,7 @@ constructor(
}
}
}
- if (!shouldUseSplitNotificationShade) {
+ if (!isShadeLayoutWide) {
with(notificationSection) {
Notifications(
burnInParams = null,
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/blueprint/ShortcutsBesideUdfpsBlueprint.kt b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/blueprint/ShortcutsBesideUdfpsBlueprint.kt
index 065f2a2172b1..72cf83269760 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/blueprint/ShortcutsBesideUdfpsBlueprint.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/blueprint/ShortcutsBesideUdfpsBlueprint.kt
@@ -69,8 +69,7 @@ constructor(
@Composable
override fun SceneScope.Content(modifier: Modifier) {
val isUdfpsVisible = viewModel.isUdfpsVisible
- val shouldUseSplitNotificationShade by
- viewModel.shouldUseSplitNotificationShade.collectAsStateWithLifecycle()
+ val isShadeLayoutWide by viewModel.isShadeLayoutWide.collectAsStateWithLifecycle()
val unfoldTranslations by viewModel.unfoldTranslations.collectAsStateWithLifecycle()
LockscreenLongPress(
@@ -102,7 +101,7 @@ constructor(
},
)
}
- if (shouldUseSplitNotificationShade) {
+ if (isShadeLayoutWide) {
with(notificationSection) {
Notifications(
burnInParams = null,
@@ -114,7 +113,7 @@ constructor(
}
}
}
- if (!shouldUseSplitNotificationShade) {
+ if (!isShadeLayoutWide) {
with(notificationSection) {
Notifications(
burnInParams = null,
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/NotificationSection.kt b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/NotificationSection.kt
index 7f80dfa703bc..859c0366a52f 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/NotificationSection.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/NotificationSection.kt
@@ -90,10 +90,16 @@ constructor(
*/
@Composable
fun SceneScope.Notifications(burnInParams: BurnInParameters?, modifier: Modifier = Modifier) {
- val shouldUseSplitNotificationShade by
- lockscreenContentViewModel.shouldUseSplitNotificationShade.collectAsStateWithLifecycle()
val areNotificationsVisible by
- lockscreenContentViewModel.areNotificationsVisible.collectAsStateWithLifecycle()
+ lockscreenContentViewModel
+ .areNotificationsVisible(sceneKey)
+ .collectAsStateWithLifecycle(initialValue = false)
+ if (!areNotificationsVisible) {
+ return
+ }
+
+ val isShadeLayoutWide by
+ lockscreenContentViewModel.isShadeLayoutWide.collectAsStateWithLifecycle()
val splitShadeTopMargin: Dp =
if (Flags.centralizedStatusBarHeightFix()) {
LargeScreenHeaderHelper.getLargeScreenHeaderHeight(LocalContext.current).dp
@@ -101,19 +107,13 @@ constructor(
dimensionResource(id = R.dimen.large_screen_shade_header_height)
}
- if (!areNotificationsVisible) {
- return
- }
-
ConstrainedNotificationStack(
stackScrollView = stackScrollView.get(),
viewModel = viewModel,
modifier =
modifier
.fillMaxWidth()
- .thenIf(shouldUseSplitNotificationShade) {
- Modifier.padding(top = splitShadeTopMargin)
- }
+ .thenIf(isShadeLayoutWide) { Modifier.padding(top = splitShadeTopMargin) }
.let {
if (burnInParams == null) {
it
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/StatusBarSection.kt b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/StatusBarSection.kt
index 166aa70c1d4a..f9e22525237b 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/StatusBarSection.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/StatusBarSection.kt
@@ -28,7 +28,6 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.unit.dp
import androidx.compose.ui.viewinterop.AndroidView
-import com.android.compose.animation.scene.ElementKey
import com.android.compose.animation.scene.SceneScope
import com.android.compose.modifiers.height
import com.android.keyguard.dagger.KeyguardStatusBarViewComponent
@@ -83,29 +82,20 @@ constructor(
componentFactory.build(view, provider).keyguardStatusBarViewController
}
- MovableElement(
- key = StatusBarElementKey,
- modifier = modifier,
- ) {
- content {
- AndroidView(
- factory = {
- notificationPanelView.get().findViewById<View>(R.id.keyguard_header)?.let {
- (it.parent as ViewGroup).removeView(it)
- }
+ AndroidView(
+ factory = {
+ notificationPanelView.get().findViewById<View>(R.id.keyguard_header)?.let {
+ (it.parent as ViewGroup).removeView(it)
+ }
- viewController.init()
- view
- },
- modifier =
- Modifier.fillMaxWidth().padding(horizontal = 16.dp).height {
- Utils.getStatusBarHeaderHeightKeyguard(context)
- },
- update = { viewController.setDisplayCutout(viewDisplayCutout) }
- )
- }
- }
+ viewController.init()
+ view
+ },
+ modifier =
+ Modifier.fillMaxWidth().padding(horizontal = 16.dp).height {
+ Utils.getStatusBarHeaderHeightKeyguard(context)
+ },
+ update = { viewController.setDisplayCutout(viewDisplayCutout) }
+ )
}
}
-
-private val StatusBarElementKey = ElementKey("StatusBar")
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/TopAreaSection.kt b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/TopAreaSection.kt
index 067315381773..0cd4b6816a61 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/TopAreaSection.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/TopAreaSection.kt
@@ -26,6 +26,7 @@ import androidx.compose.foundation.layout.wrapContentSize
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
+import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalDensity
@@ -33,6 +34,7 @@ import androidx.compose.ui.unit.Density
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.IntOffset
import androidx.lifecycle.compose.collectAsStateWithLifecycle
+import com.android.compose.animation.scene.MutableSceneTransitionLayoutState
import com.android.compose.animation.scene.SceneScope
import com.android.compose.animation.scene.SceneTransitionLayout
import com.android.compose.modifiers.thenIf
@@ -78,13 +80,22 @@ constructor(
WeatherClockScenes.splitShadeLargeClockScene
}
- SceneTransitionLayout(
- modifier = modifier,
- currentScene = currentScene,
- onChangeScene = {},
- transitions = ClockTransition.defaultClockTransitions,
- enableInterruptions = false,
- ) {
+ val state = remember {
+ MutableSceneTransitionLayoutState(
+ currentScene,
+ ClockTransition.defaultClockTransitions,
+ enableInterruptions = false,
+ )
+ }
+
+ // Update state whenever currentSceneKey has changed.
+ LaunchedEffect(state, currentScene) {
+ if (currentScene != state.transitionState.currentScene) {
+ state.setTargetScene(currentScene, coroutineScope = this)
+ }
+ }
+
+ SceneTransitionLayout(state, modifier) {
scene(splitShadeLargeClockScene) {
LargeClockWithSmartSpace(
shouldOffSetClockToOneHalf = !hasCustomPositionUpdatedAnimation
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/media/controls/ui/composable/MediaCarousel.kt b/packages/SystemUI/compose/features/src/com/android/systemui/media/controls/ui/composable/MediaCarousel.kt
index 581f3a5cacff..f8bd633d99a6 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/media/controls/ui/composable/MediaCarousel.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/media/controls/ui/composable/MediaCarousel.kt
@@ -16,8 +16,10 @@
package com.android.systemui.media.controls.ui.composable
+import android.view.View
import android.view.ViewGroup
import android.widget.FrameLayout
+import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.runtime.Composable
@@ -26,7 +28,6 @@ import androidx.compose.ui.layout.layout
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.res.dimensionResource
import androidx.compose.ui.viewinterop.AndroidView
-import androidx.core.view.contains
import com.android.compose.animation.scene.ElementKey
import com.android.compose.animation.scene.SceneScope
import com.android.systemui.media.controls.ui.controller.MediaCarouselController
@@ -34,9 +35,10 @@ import com.android.systemui.media.controls.ui.view.MediaHost
import com.android.systemui.res.R
import com.android.systemui.util.animation.MeasurementInput
-private object MediaCarousel {
+object MediaCarousel {
object Elements {
- internal val Content = ElementKey("MediaCarouselContent")
+ internal val Content =
+ ElementKey(debugName = "MediaCarouselContent", scenePicker = MediaScenePicker)
}
}
@@ -61,40 +63,43 @@ fun SceneScope.MediaCarousel(
mediaHost.measurementInput = MeasurementInput(layoutWidth, layoutHeight)
carouselController.setSceneContainerSize(layoutWidth, layoutHeight)
- AndroidView(
- modifier =
- modifier
- .element(MediaCarousel.Elements.Content)
- .height(mediaHeight)
- .fillMaxWidth()
- .layout { measurable, constraints ->
- val placeable = measurable.measure(constraints)
+ MovableElement(
+ key = MediaCarousel.Elements.Content,
+ modifier = modifier.height(mediaHeight).fillMaxWidth()
+ ) {
+ content {
+ AndroidView(
+ modifier =
+ Modifier.fillMaxSize().layout { measurable, constraints ->
+ val placeable = measurable.measure(constraints)
- // Notify controller to size the carousel for the current space
- mediaHost.measurementInput = MeasurementInput(placeable.width, placeable.height)
- carouselController.setSceneContainerSize(placeable.width, placeable.height)
+ // Notify controller to size the carousel for the current space
+ mediaHost.measurementInput =
+ MeasurementInput(placeable.width, placeable.height)
+ carouselController.setSceneContainerSize(placeable.width, placeable.height)
- layout(placeable.width, placeable.height) { placeable.placeRelative(0, 0) }
+ layout(placeable.width, placeable.height) { placeable.placeRelative(0, 0) }
+ },
+ factory = { context ->
+ FrameLayout(context).apply {
+ layoutParams =
+ FrameLayout.LayoutParams(
+ FrameLayout.LayoutParams.MATCH_PARENT,
+ FrameLayout.LayoutParams.MATCH_PARENT,
+ )
+ }
},
- factory = { context ->
- FrameLayout(context).apply {
- val mediaFrame = carouselController.mediaFrame
- (mediaFrame.parent as? ViewGroup)?.removeView(mediaFrame)
- addView(mediaFrame)
- layoutParams =
- FrameLayout.LayoutParams(
- FrameLayout.LayoutParams.MATCH_PARENT,
- FrameLayout.LayoutParams.MATCH_PARENT,
- )
- }
- },
- update = {
- if (it.contains(carouselController.mediaFrame)) {
- return@AndroidView
- }
- val mediaFrame = carouselController.mediaFrame
- (mediaFrame.parent as? ViewGroup)?.removeView(mediaFrame)
- it.addView(mediaFrame)
- },
- )
+ update = { it.setView(carouselController.mediaFrame) },
+ onRelease = { it.removeAllViews() }
+ )
+ }
+ }
+}
+
+private fun ViewGroup.setView(view: View) {
+ if (view.parent == this) {
+ return
+ }
+ (view.parent as? ViewGroup)?.removeView(view)
+ addView(view)
}
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/media/controls/ui/composable/MediaScenePicker.kt b/packages/SystemUI/compose/features/src/com/android/systemui/media/controls/ui/composable/MediaScenePicker.kt
new file mode 100644
index 000000000000..a22bc34381fd
--- /dev/null
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/media/controls/ui/composable/MediaScenePicker.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.media.controls.ui.composable
+
+import com.android.compose.animation.scene.ElementKey
+import com.android.compose.animation.scene.ElementScenePicker
+import com.android.compose.animation.scene.SceneKey
+import com.android.compose.animation.scene.TransitionState
+import com.android.systemui.scene.shared.model.Scenes
+
+/** [ElementScenePicker] implementation for the media carousel object. */
+object MediaScenePicker : ElementScenePicker {
+
+ const val SHADE_FRACTION = 0.66f
+ private val scenes =
+ setOf(
+ Scenes.Lockscreen,
+ Scenes.Shade,
+ Scenes.QuickSettings,
+ Scenes.QuickSettingsShade,
+ Scenes.Communal
+ )
+
+ override fun sceneDuringTransition(
+ element: ElementKey,
+ transition: TransitionState.Transition,
+ fromSceneZIndex: Float,
+ toSceneZIndex: Float
+ ): SceneKey? {
+ return when {
+ // TODO: 352052894 - update with the actual scene picking
+ transition.isTransitioning(from = Scenes.Lockscreen, to = Scenes.Shade) -> {
+ if (transition.progress < SHADE_FRACTION) {
+ Scenes.Lockscreen
+ } else {
+ Scenes.Shade
+ }
+ }
+
+ // TODO: 345467290 - update with the actual scene picking
+ transition.isTransitioning(from = Scenes.Shade, to = Scenes.Lockscreen) -> {
+ if (transition.progress < 1f - SHADE_FRACTION) {
+ Scenes.Shade
+ } else {
+ Scenes.Lockscreen
+ }
+ }
+
+ // TODO: 345467290 - update with the actual scene picking
+ transition.isTransitioningBetween(Scenes.QuickSettings, Scenes.Shade) -> {
+ Scenes.QuickSettings
+ }
+
+ // TODO: 340216785 - update with the actual scene picking
+ else -> pickSingleSceneIn(scenes, transition, element)
+ }
+ }
+}
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/notifications/ui/composable/Notifications.kt b/packages/SystemUI/compose/features/src/com/android/systemui/notifications/ui/composable/Notifications.kt
index 12ca99720513..c4970c5b43f9 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/notifications/ui/composable/Notifications.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/notifications/ui/composable/Notifications.kt
@@ -145,6 +145,7 @@ fun SceneScope.HeadsUpNotificationSpace(
}
// Note: boundsInWindow doesn't scroll off the screen
stackScrollView.setHeadsUpTop(boundsInWindow.top)
+ stackScrollView.setHeadsUpBottom(boundsInWindow.bottom)
}
)
}
@@ -198,6 +199,7 @@ fun SceneScope.SnoozeableHeadsUpNotificationSpace(
LaunchedEffect(scrollableState.isScrollInProgress) {
if (!scrollableState.isScrollInProgress && scrollOffset <= minScrollOffset) {
+ viewModel.setHeadsUpAnimatingAway(false)
viewModel.snoozeHun()
}
}
@@ -337,7 +339,7 @@ fun SceneScope.NotificationScrollingStack(
// expanded, reset scrim offset.
LaunchedEffect(stackHeight, scrimOffset) {
snapshotFlow { stackHeight.intValue < minVisibleScrimHeight() && scrimOffset.value < 0f }
- .collect { shouldCollapse -> if (shouldCollapse) scrimOffset.snapTo(0f) }
+ .collect { shouldCollapse -> if (shouldCollapse) scrimOffset.animateTo(0f, tween()) }
}
// if we receive scroll delta from NSSL, offset the scrim and placeholder accordingly.
@@ -470,7 +472,11 @@ fun SceneScope.NotificationScrollingStack(
)
}
if (shouldIncludeHeadsUpSpace) {
- HeadsUpNotificationSpace(stackScrollView = stackScrollView, viewModel = viewModel)
+ HeadsUpNotificationSpace(
+ stackScrollView = stackScrollView,
+ viewModel = viewModel,
+ modifier = Modifier.padding(top = topPadding)
+ )
}
}
}
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/qs/ui/composable/QuickSettingsScene.kt b/packages/SystemUI/compose/features/src/com/android/systemui/qs/ui/composable/QuickSettingsScene.kt
index 2d5d25913074..3cf8e70d458f 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/qs/ui/composable/QuickSettingsScene.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/qs/ui/composable/QuickSettingsScene.kt
@@ -305,8 +305,7 @@ private fun SceneScope.QuickSettingsScene(
if (isCustomizerShowing) {
Modifier.fillMaxHeight().align(Alignment.TopCenter)
} else {
- Modifier.verticalNestedScrollToScene()
- .verticalScroll(
+ Modifier.verticalScroll(
scrollState,
enabled = isScrollable,
)
@@ -408,7 +407,7 @@ private fun SceneScope.QuickSettingsScene(
HeadsUpNotificationSpace(
stackScrollView = notificationStackScrollView,
viewModel = notificationsPlaceholderViewModel,
- modifier = Modifier.align(Alignment.BottomCenter),
+ modifier = Modifier.align(Alignment.BottomCenter).navigationBarsPadding(),
isPeekFromBottom = true,
)
NotificationScrollingStack(
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/transitions/ToShadeTransition.kt b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/transitions/ToShadeTransition.kt
index df47cbab4b90..7d46c7570dac 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/transitions/ToShadeTransition.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/transitions/ToShadeTransition.kt
@@ -25,6 +25,8 @@ import com.android.compose.animation.scene.Edge
import com.android.compose.animation.scene.TransitionBuilder
import com.android.compose.animation.scene.UserActionDistance
import com.android.compose.animation.scene.UserActionDistanceScope
+import com.android.systemui.media.controls.ui.composable.MediaCarousel
+import com.android.systemui.media.controls.ui.composable.MediaScenePicker
import com.android.systemui.notifications.ui.composable.Notifications
import com.android.systemui.qs.ui.composable.QuickSettings
import com.android.systemui.scene.shared.model.Scenes
@@ -59,10 +61,13 @@ fun TransitionBuilder.toShadeTransition(
fade(QuickSettings.Elements.SplitShadeQuickSettings)
fade(QuickSettings.Elements.FooterActions)
}
- translate(
- QuickSettings.Elements.QuickQuickSettings,
- y = -ShadeHeader.Dimensions.CollapsedHeight * .66f
- )
+
+ val qsTranslation = ShadeHeader.Dimensions.CollapsedHeight * MediaScenePicker.SHADE_FRACTION
+ val qsExpansionDiff =
+ ShadeHeader.Dimensions.ExpandedHeight - ShadeHeader.Dimensions.CollapsedHeight
+
+ translate(QuickSettings.Elements.QuickQuickSettings, y = -qsTranslation)
+ translate(MediaCarousel.Elements.Content, y = -(qsExpansionDiff + qsTranslation))
translate(Notifications.Elements.NotificationScrim, Edge.Top, false)
}
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/ShadeScene.kt b/packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/ShadeScene.kt
index 4a6599a04fab..ece8b40ad332 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/ShadeScene.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/ShadeScene.kt
@@ -34,9 +34,11 @@ import androidx.compose.foundation.layout.displayCutoutPadding
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
+import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.navigationBars
import androidx.compose.foundation.layout.navigationBarsPadding
import androidx.compose.foundation.layout.padding
+import androidx.compose.foundation.layout.systemBars
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.verticalScroll
@@ -51,6 +53,7 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.CompositingStrategy
import androidx.compose.ui.graphics.graphicsLayer
+import androidx.compose.ui.input.pointer.pointerInteropFilter
import androidx.compose.ui.layout.Layout
import androidx.compose.ui.layout.layoutId
import androidx.compose.ui.platform.LocalDensity
@@ -60,6 +63,7 @@ import androidx.compose.ui.unit.dp
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.android.compose.animation.scene.ElementKey
import com.android.compose.animation.scene.LowestZIndexScenePicker
+import com.android.compose.animation.scene.NestedScrollBehavior
import com.android.compose.animation.scene.SceneScope
import com.android.compose.animation.scene.TransitionState
import com.android.compose.animation.scene.UserAction
@@ -255,6 +259,8 @@ private fun SceneScope.SingleShade(
val mediaOffset by
animateSceneDpAsState(value = InQQS, key = MediaLandscapeTopOffset, canOverflow = false)
+ val navBarHeight = WindowInsets.systemBars.asPaddingValues().calculateBottomPadding()
+
Box(
modifier =
modifier.thenIf(shouldPunchHoleBehindScrim) {
@@ -358,11 +364,22 @@ private fun SceneScope.SingleShade(
notificationsPlaceable.placeRelative(x = 0, y = maxNotifScrimTop.value.roundToInt())
}
}
- NotificationStackCutoffGuideline(
- stackScrollView = notificationStackScrollView,
- viewModel = notificationsPlaceholderViewModel,
- modifier = Modifier.align(Alignment.BottomCenter).navigationBarsPadding()
- )
+ Box(
+ modifier =
+ Modifier.align(Alignment.BottomCenter)
+ .height(navBarHeight)
+ .pointerInteropFilter { true }
+ .verticalNestedScrollToScene(
+ topBehavior = NestedScrollBehavior.EdgeAlways,
+ isExternalOverscrollGesture = { false }
+ )
+ ) {
+ NotificationStackCutoffGuideline(
+ stackScrollView = notificationStackScrollView,
+ viewModel = notificationsPlaceholderViewModel,
+ modifier = Modifier.align(Alignment.TopCenter)
+ )
+ }
}
}
@@ -497,8 +514,7 @@ private fun SceneScope.SplitShade(
.sysuiResTag("expanded_qs_scroll_view")
.weight(1f)
.thenIf(!isCustomizerShowing) {
- Modifier.verticalNestedScrollToScene()
- .verticalScroll(
+ Modifier.verticalScroll(
quickSettingsScrollState,
enabled = isScrollable
)
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/statusbar/ui/composable/StatusBar.kt b/packages/SystemUI/compose/features/src/com/android/systemui/statusbar/ui/composable/StatusBar.kt
deleted file mode 100644
index f514ab4a710b..000000000000
--- a/packages/SystemUI/compose/features/src/com/android/systemui/statusbar/ui/composable/StatusBar.kt
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2023 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package com.android.systemui.statusbar.ui.composable
-
-import androidx.compose.foundation.layout.Arrangement
-import androidx.compose.foundation.layout.Row
-import androidx.compose.foundation.layout.defaultMinSize
-import androidx.compose.foundation.layout.fillMaxWidth
-import androidx.compose.foundation.layout.padding
-import androidx.compose.material3.Text
-import androidx.compose.runtime.Composable
-import androidx.compose.ui.Alignment
-import androidx.compose.ui.Modifier
-import androidx.compose.ui.unit.dp
-
-@Composable
-fun StatusBar(
- modifier: Modifier = Modifier,
-) {
- // TODO(b/272780101): implement.
- Row(
- modifier = modifier.fillMaxWidth().defaultMinSize(minHeight = 48.dp).padding(4.dp),
- horizontalArrangement = Arrangement.Center,
- verticalAlignment = Alignment.CenterVertically,
- ) {
- Text("Status bar")
- }
-}
diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/AnimateToScene.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/AnimateToScene.kt
index ea740a8d8de4..82c85d1fa38b 100644
--- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/AnimateToScene.kt
+++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/AnimateToScene.kt
@@ -30,7 +30,7 @@ import kotlinx.coroutines.launch
* the currently running transition, if there is one.
*/
internal fun CoroutineScope.animateToScene(
- layoutState: BaseSceneTransitionLayoutState,
+ layoutState: MutableSceneTransitionLayoutStateImpl,
target: SceneKey,
transitionKey: TransitionKey?,
): TransitionState.Transition? {
@@ -154,7 +154,7 @@ internal fun CoroutineScope.animateToScene(
}
private fun CoroutineScope.animate(
- layoutState: BaseSceneTransitionLayoutState,
+ layoutState: MutableSceneTransitionLayoutStateImpl,
targetScene: SceneKey,
transitionKey: TransitionKey?,
isInitiatedByUserInput: Boolean,
diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/DraggableHandler.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/DraggableHandler.kt
index d95b388eb347..5b328b8cdd9c 100644
--- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/DraggableHandler.kt
+++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/DraggableHandler.kt
@@ -52,11 +52,19 @@ internal interface DraggableHandler {
* and [onStop] methods.
*/
internal interface DragController {
- /** Drag the current scene by [delta] pixels. */
- fun onDrag(delta: Float)
+ /**
+ * Drag the current scene by [delta] pixels.
+ *
+ * @return the consumed [delta]
+ */
+ fun onDrag(delta: Float): Float
- /** Starts a transition to a target scene. */
- fun onStop(velocity: Float, canChangeScene: Boolean)
+ /**
+ * Starts a transition to a target scene.
+ *
+ * @return the consumed [velocity]
+ */
+ fun onStop(velocity: Float, canChangeScene: Boolean): Float
}
internal class DraggableHandlerImpl(
@@ -64,6 +72,7 @@ internal class DraggableHandlerImpl(
internal val orientation: Orientation,
internal val coroutineScope: CoroutineScope,
) : DraggableHandler {
+ internal val nestedScrollKey = Any()
/** The [DraggableHandler] can only have one active [DragController] at a time. */
private var dragController: DragControllerImpl? = null
@@ -184,31 +193,33 @@ internal class DraggableHandlerImpl(
): Swipes {
val fromSource =
startedPosition?.let { position ->
- layoutImpl.swipeSourceDetector.source(
- fromScene.targetSize,
- position.round(),
- layoutImpl.density,
- orientation,
- )
+ layoutImpl.swipeSourceDetector
+ .source(
+ fromScene.targetSize,
+ position.round(),
+ layoutImpl.density,
+ orientation,
+ )
+ ?.resolve(layoutImpl.layoutDirection)
}
val upOrLeft =
- Swipe(
+ Swipe.Resolved(
direction =
when (orientation) {
- Orientation.Horizontal -> SwipeDirection.Left
- Orientation.Vertical -> SwipeDirection.Up
+ Orientation.Horizontal -> SwipeDirection.Resolved.Left
+ Orientation.Vertical -> SwipeDirection.Resolved.Up
},
pointerCount = pointersDown,
fromSource = fromSource,
)
val downOrRight =
- Swipe(
+ Swipe.Resolved(
direction =
when (orientation) {
- Orientation.Horizontal -> SwipeDirection.Right
- Orientation.Vertical -> SwipeDirection.Down
+ Orientation.Horizontal -> SwipeDirection.Resolved.Right
+ Orientation.Vertical -> SwipeDirection.Resolved.Down
},
pointerCount = pointersDown,
fromSource = fromSource,
@@ -269,8 +280,10 @@ private class DragControllerImpl(
*
* @return the consumed delta
*/
- override fun onDrag(delta: Float) {
- if (delta == 0f || !isDrivingTransition || swipeTransition.isFinishing) return
+ override fun onDrag(delta: Float): Float {
+ if (delta == 0f || !isDrivingTransition || swipeTransition.isFinishing) {
+ return 0f
+ }
swipeTransition.dragOffset += delta
val (fromScene, acceleratedOffset) =
@@ -286,7 +299,7 @@ private class DragControllerImpl(
if (result == null) {
onStop(velocity = delta, canChangeScene = true)
- return
+ return 0f
}
if (
@@ -311,6 +324,8 @@ private class DragControllerImpl(
updateTransition(swipeTransition)
}
+
+ return delta
}
/**
@@ -348,10 +363,10 @@ private class DragControllerImpl(
}
}
- override fun onStop(velocity: Float, canChangeScene: Boolean) {
+ override fun onStop(velocity: Float, canChangeScene: Boolean): Float {
// The state was changed since the drag started; don't do anything.
if (!isDrivingTransition || swipeTransition.isFinishing) {
- return
+ return 0f
}
// Important: Make sure that all the code here references the current transition when
@@ -367,9 +382,6 @@ private class DragControllerImpl(
// immediately go back B => A.
if (targetScene != swipeTransition._currentScene) {
swipeTransition._currentScene = targetScene
- with(draggableHandler.layoutImpl.state) {
- draggableHandler.coroutineScope.onChangeScene(targetScene.key)
- }
}
swipeTransition.animateOffset(
@@ -440,7 +452,7 @@ private class DragControllerImpl(
if (result == null) {
// We will not animate
swipeTransition.snapToScene(fromScene.key)
- return
+ return 0f
}
val newSwipeTransition =
@@ -462,6 +474,9 @@ private class DragControllerImpl(
animateTo(targetScene = fromScene, targetOffset = 0f)
}
}
+
+ // The onStop animation consumes any remaining velocity.
+ return velocity
}
/**
@@ -509,7 +524,7 @@ private class DragControllerImpl(
}
private fun SwipeTransition(
- layoutState: BaseSceneTransitionLayoutState,
+ layoutState: MutableSceneTransitionLayoutStateImpl,
coroutineScope: CoroutineScope,
fromScene: Scene,
result: UserActionResult,
@@ -564,7 +579,7 @@ private fun SwipeTransition(old: SwipeTransition): SwipeTransition {
private class SwipeTransition(
val layoutImpl: SceneTransitionLayoutImpl,
- val layoutState: BaseSceneTransitionLayoutState,
+ val layoutState: MutableSceneTransitionLayoutStateImpl,
val coroutineScope: CoroutineScope,
override val key: TransitionKey?,
val _fromScene: Scene,
@@ -833,10 +848,10 @@ private object DefaultSwipeDistance : UserActionDistance {
/** The [Swipe] associated to a given fromScene, startedPosition and pointersDown. */
private class Swipes(
- val upOrLeft: Swipe?,
- val downOrRight: Swipe?,
- val upOrLeftNoSource: Swipe?,
- val downOrRightNoSource: Swipe?,
+ val upOrLeft: Swipe.Resolved?,
+ val downOrRight: Swipe.Resolved?,
+ val upOrLeftNoSource: Swipe.Resolved?,
+ val downOrRightNoSource: Swipe.Resolved?,
) {
/** The [UserActionResult] associated to up and down swipes. */
var upOrLeftResult: UserActionResult? = null
@@ -844,7 +859,7 @@ private class Swipes(
fun computeSwipesResults(fromScene: Scene): Pair<UserActionResult?, UserActionResult?> {
val userActions = fromScene.userActions
- fun result(swipe: Swipe?): UserActionResult? {
+ fun result(swipe: Swipe.Resolved?): UserActionResult? {
return userActions[swipe ?: return null]
}
@@ -910,9 +925,9 @@ private class Swipes(
internal class NestedScrollHandlerImpl(
private val layoutImpl: SceneTransitionLayoutImpl,
private val orientation: Orientation,
- private val topOrLeftBehavior: NestedScrollBehavior,
- private val bottomOrRightBehavior: NestedScrollBehavior,
- private val isExternalOverscrollGesture: () -> Boolean,
+ internal var topOrLeftBehavior: NestedScrollBehavior,
+ internal var bottomOrRightBehavior: NestedScrollBehavior,
+ internal var isExternalOverscrollGesture: () -> Boolean,
private val pointersInfoOwner: PointersInfoOwner,
) {
private val layoutState = layoutImpl.state
@@ -940,25 +955,27 @@ internal class NestedScrollHandlerImpl(
when {
amount < 0f -> {
val actionUpOrLeft =
- Swipe(
+ Swipe.Resolved(
direction =
when (orientation) {
- Orientation.Horizontal -> SwipeDirection.Left
- Orientation.Vertical -> SwipeDirection.Up
+ Orientation.Horizontal -> SwipeDirection.Resolved.Left
+ Orientation.Vertical -> SwipeDirection.Resolved.Up
},
pointerCount = pointersInfo().pointersDown,
+ fromSource = null,
)
fromScene.userActions[actionUpOrLeft]
}
amount > 0f -> {
val actionDownOrRight =
- Swipe(
+ Swipe.Resolved(
direction =
when (orientation) {
- Orientation.Horizontal -> SwipeDirection.Right
- Orientation.Vertical -> SwipeDirection.Down
+ Orientation.Horizontal -> SwipeDirection.Resolved.Right
+ Orientation.Vertical -> SwipeDirection.Resolved.Down
},
pointerCount = pointersInfo().pointersDown,
+ fromSource = null,
)
fromScene.userActions[actionDownOrRight]
}
@@ -1079,17 +1096,13 @@ internal class NestedScrollHandlerImpl(
// TODO(b/297842071) We should handle the overscroll or slow drag if the gesture is
// initiated in a nested child.
controller.onDrag(delta = offsetAvailable)
-
- offsetAvailable
},
onStop = { velocityAvailable ->
val controller = dragController ?: error("Should be called after onStart")
- controller.onStop(velocity = velocityAvailable, canChangeScene = canChangeScene)
-
- dragController = null
- // The onDragStopped animation consumes any remaining velocity.
- velocityAvailable
+ controller
+ .onStop(velocity = velocityAvailable, canChangeScene = canChangeScene)
+ .also { dragController = null }
},
)
}
@@ -1104,7 +1117,7 @@ internal class NestedScrollHandlerImpl(
internal const val OffsetVisibilityThreshold = 0.5f
private object NoOpDragController : DragController {
- override fun onDrag(delta: Float) {}
+ override fun onDrag(delta: Float) = 0f
- override fun onStop(velocity: Float, canChangeScene: Boolean) {}
+ override fun onStop(velocity: Float, canChangeScene: Boolean) = 0f
}
diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/EdgeDetector.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/EdgeDetector.kt
index b0dc3a144533..97c0cef30388 100644
--- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/EdgeDetector.kt
+++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/EdgeDetector.kt
@@ -21,14 +21,28 @@ import androidx.compose.ui.unit.Density
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.IntOffset
import androidx.compose.ui.unit.IntSize
+import androidx.compose.ui.unit.LayoutDirection
import androidx.compose.ui.unit.dp
/** The edge of a [SceneTransitionLayout]. */
-enum class Edge : SwipeSource {
- Left,
- Right,
- Top,
- Bottom,
+enum class Edge(private val resolveEdge: (LayoutDirection) -> Resolved) : SwipeSource {
+ Top(resolveEdge = { Resolved.Top }),
+ Bottom(resolveEdge = { Resolved.Bottom }),
+ Left(resolveEdge = { Resolved.Left }),
+ Right(resolveEdge = { Resolved.Right }),
+ Start(resolveEdge = { if (it == LayoutDirection.Ltr) Resolved.Left else Resolved.Right }),
+ End(resolveEdge = { if (it == LayoutDirection.Ltr) Resolved.Right else Resolved.Left });
+
+ override fun resolve(layoutDirection: LayoutDirection): Resolved {
+ return resolveEdge(layoutDirection)
+ }
+
+ enum class Resolved : SwipeSource.Resolved {
+ Left,
+ Right,
+ Top,
+ Bottom,
+ }
}
val DefaultEdgeDetector = FixedSizeEdgeDetector(40.dp)
diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/MultiPointerDraggable.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/MultiPointerDraggable.kt
index cdcfc84ce92a..2b78b5adaa62 100644
--- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/MultiPointerDraggable.kt
+++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/MultiPointerDraggable.kt
@@ -41,7 +41,6 @@ import androidx.compose.ui.node.DelegatingNode
import androidx.compose.ui.node.ModifierNodeElement
import androidx.compose.ui.node.ObserverModifierNode
import androidx.compose.ui.node.PointerInputModifierNode
-import androidx.compose.ui.node.TraversableNode
import androidx.compose.ui.node.currentValueOf
import androidx.compose.ui.node.findNearestAncestor
import androidx.compose.ui.node.observeReads
@@ -139,16 +138,12 @@ internal class MultiPointerDraggableNode(
DelegatingNode(),
PointerInputModifierNode,
CompositionLocalConsumerModifierNode,
- TraversableNode,
- PointersInfoOwner,
ObserverModifierNode {
private val pointerInputHandler: suspend PointerInputScope.() -> Unit = { pointerInput() }
private val delegate = delegate(SuspendingPointerInputModifierNode(pointerInputHandler))
private val velocityTracker = VelocityTracker()
private var previousEnabled: Boolean = false
- override val traverseKey: Any = TRAVERSE_KEY
-
var enabled: () -> Boolean = enabled
set(value) {
// Reset the pointer input whenever enabled changed.
@@ -208,7 +203,7 @@ internal class MultiPointerDraggableNode(
private var startedPosition: Offset? = null
private var pointersDown: Int = 0
- override fun pointersInfo(): PointersInfo {
+ internal fun pointersInfo(): PointersInfo {
return PointersInfo(
startedPosition = startedPosition,
// Note: We could have 0 pointers during fling or for other reasons.
@@ -241,43 +236,50 @@ internal class MultiPointerDraggableNode(
}
}
- awaitPointerEventScope {
- while (isActive) {
- try {
- detectDragGestures(
- orientation = orientation,
- startDragImmediately = startDragImmediately,
- onDragStart = { startedPosition, overSlop, pointersDown ->
- velocityTracker.resetTracking()
- onDragStarted(startedPosition, overSlop, pointersDown)
- },
- onDrag = { controller, change, amount ->
- velocityTracker.addPointerInputChange(change)
- controller.onDrag(amount)
- },
- onDragEnd = { controller ->
- val viewConfiguration = currentValueOf(LocalViewConfiguration)
- val maxVelocity =
- viewConfiguration.maximumFlingVelocity.let { Velocity(it, it) }
- val velocity = velocityTracker.calculateVelocity(maxVelocity)
- controller.onStop(
- velocity =
- when (orientation) {
- Orientation.Horizontal -> velocity.x
- Orientation.Vertical -> velocity.y
- },
- canChangeScene = true,
- )
- },
- onDragCancel = { controller ->
- controller.onStop(velocity = 0f, canChangeScene = true)
- },
- swipeDetector = swipeDetector
- )
- } catch (exception: CancellationException) {
- // If the coroutine scope is active, we can just restart the drag cycle.
- if (!isActive) {
- throw exception
+ // The order is important here: we want to make sure that the previous PointerEventScope
+ // is initialized first. This ensures that the following PointerEventScope doesn't
+ // receive more events than the first one.
+ launch {
+ awaitPointerEventScope {
+ while (isActive) {
+ try {
+ detectDragGestures(
+ orientation = orientation,
+ startDragImmediately = startDragImmediately,
+ onDragStart = { startedPosition, overSlop, pointersDown ->
+ velocityTracker.resetTracking()
+ onDragStarted(startedPosition, overSlop, pointersDown)
+ },
+ onDrag = { controller, change, amount ->
+ velocityTracker.addPointerInputChange(change)
+ controller.onDrag(amount)
+ },
+ onDragEnd = { controller ->
+ val viewConfiguration = currentValueOf(LocalViewConfiguration)
+ val maxVelocity =
+ viewConfiguration.maximumFlingVelocity.let {
+ Velocity(it, it)
+ }
+ val velocity = velocityTracker.calculateVelocity(maxVelocity)
+ controller.onStop(
+ velocity =
+ when (orientation) {
+ Orientation.Horizontal -> velocity.x
+ Orientation.Vertical -> velocity.y
+ },
+ canChangeScene = true,
+ )
+ },
+ onDragCancel = { controller ->
+ controller.onStop(velocity = 0f, canChangeScene = true)
+ },
+ swipeDetector = swipeDetector
+ )
+ } catch (exception: CancellationException) {
+ // If the coroutine scope is active, we can just restart the drag cycle.
+ if (!isActive) {
+ throw exception
+ }
}
}
}
diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/NestedScrollToScene.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/NestedScrollToScene.kt
index ddff2f709082..945043d8fe95 100644
--- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/NestedScrollToScene.kt
+++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/NestedScrollToScene.kt
@@ -18,12 +18,13 @@ package com.android.compose.animation.scene
import androidx.compose.foundation.gestures.Orientation
import androidx.compose.ui.Modifier
+import androidx.compose.ui.geometry.Offset
+import androidx.compose.ui.input.nestedscroll.NestedScrollConnection
+import androidx.compose.ui.input.nestedscroll.NestedScrollSource
import androidx.compose.ui.input.nestedscroll.nestedScrollModifierNode
-import androidx.compose.ui.node.DelegatableNode
import androidx.compose.ui.node.DelegatingNode
import androidx.compose.ui.node.ModifierNodeElement
import androidx.compose.ui.platform.InspectorInfo
-import com.android.compose.nestedscroll.PriorityNestedScrollConnection
/**
* Defines the behavior of the [SceneTransitionLayout] when a scrollable component is scrolled.
@@ -67,7 +68,11 @@ enum class NestedScrollBehavior(val canStartOnPostFling: Boolean) {
* In addition, during scene transitions, scroll events are consumed by the
* [SceneTransitionLayout] instead of the scrollable component.
*/
- EdgeAlways(canStartOnPostFling = true),
+ EdgeAlways(canStartOnPostFling = true);
+
+ companion object {
+ val Default = EdgeNoPreview
+ }
}
internal fun Modifier.nestedScrollToScene(
@@ -122,37 +127,60 @@ private data class NestedScrollToSceneElement(
}
private class NestedScrollToSceneNode(
- layoutImpl: SceneTransitionLayoutImpl,
- orientation: Orientation,
- topOrLeftBehavior: NestedScrollBehavior,
- bottomOrRightBehavior: NestedScrollBehavior,
- isExternalOverscrollGesture: () -> Boolean,
+ private var layoutImpl: SceneTransitionLayoutImpl,
+ private var orientation: Orientation,
+ private var topOrLeftBehavior: NestedScrollBehavior,
+ private var bottomOrRightBehavior: NestedScrollBehavior,
+ private var isExternalOverscrollGesture: () -> Boolean,
) : DelegatingNode() {
- lateinit var pointersInfoOwner: PointersInfoOwner
- private var priorityNestedScrollConnection: PriorityNestedScrollConnection =
- scenePriorityNestedScrollConnection(
- layoutImpl = layoutImpl,
- orientation = orientation,
- topOrLeftBehavior = topOrLeftBehavior,
- bottomOrRightBehavior = bottomOrRightBehavior,
- isExternalOverscrollGesture = isExternalOverscrollGesture,
- pointersInfoOwner = { pointersInfoOwner.pointersInfo() }
- )
-
- private var nestedScrollNode: DelegatableNode =
- nestedScrollModifierNode(
- connection = priorityNestedScrollConnection,
- dispatcher = null,
- )
+ private var scrollBehaviorOwner: ScrollBehaviorOwner? = null
+
+ private fun requireScrollBehaviorOwner(): ScrollBehaviorOwner {
+ var behaviorOwner = scrollBehaviorOwner
+ if (behaviorOwner == null) {
+ behaviorOwner = requireScrollBehaviorOwner(layoutImpl.draggableHandler(orientation))
+ scrollBehaviorOwner = behaviorOwner
+ }
+ return behaviorOwner
+ }
- override fun onAttach() {
- pointersInfoOwner = requireAncestorPointersInfoOwner()
- delegate(nestedScrollNode)
+ private val updateScrollBehaviorsConnection =
+ object : NestedScrollConnection {
+ /**
+ * When using [NestedScrollConnection.onPostScroll], we can specify the desired behavior
+ * before our parent components. This gives them the option to override our behavior if
+ * they choose.
+ *
+ * The behavior can be communicated at every scroll gesture to ensure that the hierarchy
+ * is respected, even if one of our descendant nodes changes behavior after we set it.
+ */
+ override fun onPostScroll(
+ consumed: Offset,
+ available: Offset,
+ source: NestedScrollSource,
+ ): Offset {
+ // If we have some remaining scroll, that scroll can be used to initiate a
+ // transition between scenes. We can assume that the behavior is only needed if
+ // there is some remaining amount.
+ if (available != Offset.Zero) {
+ requireScrollBehaviorOwner()
+ .updateScrollBehaviors(
+ topOrLeftBehavior = topOrLeftBehavior,
+ bottomOrRightBehavior = bottomOrRightBehavior,
+ isExternalOverscrollGesture = isExternalOverscrollGesture,
+ )
+ }
+
+ return Offset.Zero
+ }
+ }
+
+ init {
+ delegate(nestedScrollModifierNode(updateScrollBehaviorsConnection, dispatcher = null))
}
override fun onDetach() {
- // Make sure we reset the scroll connection when this modifier is removed from composition
- priorityNestedScrollConnection.reset()
+ scrollBehaviorOwner = null
}
fun update(
@@ -162,43 +190,10 @@ private class NestedScrollToSceneNode(
bottomOrRightBehavior: NestedScrollBehavior,
isExternalOverscrollGesture: () -> Boolean,
) {
- // Clean up the old nested scroll connection
- priorityNestedScrollConnection.reset()
- undelegate(nestedScrollNode)
-
- // Create a new nested scroll connection
- priorityNestedScrollConnection =
- scenePriorityNestedScrollConnection(
- layoutImpl = layoutImpl,
- orientation = orientation,
- topOrLeftBehavior = topOrLeftBehavior,
- bottomOrRightBehavior = bottomOrRightBehavior,
- isExternalOverscrollGesture = isExternalOverscrollGesture,
- pointersInfoOwner = pointersInfoOwner,
- )
- nestedScrollNode =
- nestedScrollModifierNode(
- connection = priorityNestedScrollConnection,
- dispatcher = null,
- )
- delegate(nestedScrollNode)
+ this.layoutImpl = layoutImpl
+ this.orientation = orientation
+ this.topOrLeftBehavior = topOrLeftBehavior
+ this.bottomOrRightBehavior = bottomOrRightBehavior
+ this.isExternalOverscrollGesture = isExternalOverscrollGesture
}
}
-
-private fun scenePriorityNestedScrollConnection(
- layoutImpl: SceneTransitionLayoutImpl,
- orientation: Orientation,
- topOrLeftBehavior: NestedScrollBehavior,
- bottomOrRightBehavior: NestedScrollBehavior,
- isExternalOverscrollGesture: () -> Boolean,
- pointersInfoOwner: PointersInfoOwner,
-) =
- NestedScrollHandlerImpl(
- layoutImpl = layoutImpl,
- orientation = orientation,
- topOrLeftBehavior = topOrLeftBehavior,
- bottomOrRightBehavior = bottomOrRightBehavior,
- isExternalOverscrollGesture = isExternalOverscrollGesture,
- pointersInfoOwner = pointersInfoOwner,
- )
- .connection
diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/PredictiveBackHandler.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/PredictiveBackHandler.kt
index dfb8c499b4c9..d3e2a1cfbb3f 100644
--- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/PredictiveBackHandler.kt
+++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/PredictiveBackHandler.kt
@@ -35,7 +35,7 @@ import kotlinx.coroutines.launch
@Composable
internal fun PredictiveBackHandler(
- state: BaseSceneTransitionLayoutState,
+ state: MutableSceneTransitionLayoutStateImpl,
coroutineScope: CoroutineScope,
targetSceneForBack: SceneKey? = null,
) {
@@ -56,13 +56,7 @@ internal fun PredictiveBackHandler(
progress.collect { backEvent -> transition.dragProgress = backEvent.progress }
// Back gesture successful.
- transition.animateTo(
- if (state.canChangeScene(targetSceneForBack)) {
- targetSceneForBack
- } else {
- fromScene
- }
- )
+ transition.animateTo(targetSceneForBack)
} catch (e: CancellationException) {
// Back gesture cancelled.
transition.animateTo(fromScene)
@@ -71,7 +65,7 @@ internal fun PredictiveBackHandler(
}
private class PredictiveBackTransition(
- val state: BaseSceneTransitionLayoutState,
+ val state: MutableSceneTransitionLayoutStateImpl,
val coroutineScope: CoroutineScope,
fromScene: SceneKey,
toScene: SceneKey,
@@ -105,12 +99,15 @@ private class PredictiveBackTransition(
return it
}
- currentScene = scene
+ if (scene != currentScene && state.transitionState == this && state.canChangeScene(scene)) {
+ currentScene = scene
+ }
+
val targetProgress =
- when (scene) {
+ when (currentScene) {
fromScene -> 0f
toScene -> 1f
- else -> error("scene $scene should be either $fromScene or $toScene")
+ else -> error("scene $currentScene should be either $fromScene or $toScene")
}
val animatable = Animatable(dragProgress).also { progressAnimatable = it }
diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/PunchHole.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/PunchHole.kt
deleted file mode 100644
index b346a70e61f9..000000000000
--- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/PunchHole.kt
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * Copyright (C) 2023 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.compose.animation.scene
-
-import androidx.compose.runtime.Stable
-import androidx.compose.ui.Modifier
-import androidx.compose.ui.geometry.Offset
-import androidx.compose.ui.geometry.Size
-import androidx.compose.ui.graphics.BlendMode
-import androidx.compose.ui.graphics.Color
-import androidx.compose.ui.graphics.CompositingStrategy
-import androidx.compose.ui.graphics.Outline
-import androidx.compose.ui.graphics.RectangleShape
-import androidx.compose.ui.graphics.Shape
-import androidx.compose.ui.graphics.drawOutline
-import androidx.compose.ui.graphics.drawscope.ContentDrawScope
-import androidx.compose.ui.graphics.drawscope.DrawScope
-import androidx.compose.ui.graphics.drawscope.translate
-import androidx.compose.ui.layout.LayoutCoordinates
-import androidx.compose.ui.layout.Measurable
-import androidx.compose.ui.layout.MeasureResult
-import androidx.compose.ui.layout.MeasureScope
-import androidx.compose.ui.node.DelegatingNode
-import androidx.compose.ui.node.DrawModifierNode
-import androidx.compose.ui.node.GlobalPositionAwareModifierNode
-import androidx.compose.ui.node.LayoutModifierNode
-import androidx.compose.ui.node.ModifierNodeElement
-import androidx.compose.ui.unit.Constraints
-import androidx.compose.ui.unit.LayoutDirection
-import androidx.compose.ui.unit.toSize
-
-/**
- * Punch a hole in this node with the given [size], [offset] and [shape].
- *
- * Punching a hole in an element will "remove" any pixel drawn by that element in the hole area.
- * This can be used to make content drawn below an opaque element visible. For example, if we have
- * [this lockscreen scene](http://shortn/_VYySFnJDhN) drawn below
- * [this shade scene](http://shortn/_fpxGUk0Rg7) and punch a hole in the latter using the big clock
- * time bounds and a RoundedCornerShape(10dp), [this](http://shortn/_qt80IvORFj) would be the
- * result.
- */
-@Stable
-fun Modifier.punchHole(
- size: () -> Size,
- offset: () -> Offset,
- shape: Shape = RectangleShape,
-): Modifier = this.then(PunchHoleElement(size, offset, shape))
-
-/**
- * Punch a hole in this node using the bounds of [coords] and the given [shape].
- *
- * You can use [androidx.compose.ui.layout.onGloballyPositioned] to get the last coordinates of a
- * node.
- */
-@Stable
-fun Modifier.punchHole(
- coords: () -> LayoutCoordinates?,
- shape: Shape = RectangleShape,
-): Modifier = this.then(PunchHoleWithBoundsElement(coords, shape))
-
-private data class PunchHoleElement(
- private val size: () -> Size,
- private val offset: () -> Offset,
- private val shape: Shape,
-) : ModifierNodeElement<PunchHoleNode>() {
- override fun create(): PunchHoleNode = PunchHoleNode(size, offset, { shape })
-
- override fun update(node: PunchHoleNode) {
- node.size = size
- node.offset = offset
- node.shape = { shape }
- }
-}
-
-private class PunchHoleNode(
- var size: () -> Size,
- var offset: () -> Offset,
- var shape: () -> Shape,
-) : Modifier.Node(), DrawModifierNode, LayoutModifierNode {
- private var lastSize: Size = Size.Unspecified
- private var lastLayoutDirection: LayoutDirection = LayoutDirection.Ltr
- private var lastOutline: Outline? = null
-
- override fun MeasureScope.measure(
- measurable: Measurable,
- constraints: Constraints
- ): MeasureResult {
- return measurable.measure(constraints).run {
- layout(width, height) {
- placeWithLayer(0, 0) { compositingStrategy = CompositingStrategy.Offscreen }
- }
- }
- }
-
- override fun ContentDrawScope.draw() {
- drawContent()
-
- val holeSize = size()
- if (holeSize != Size.Zero) {
- val offset = offset()
- translate(offset.x, offset.y) { drawHole(holeSize) }
- }
- }
-
- private fun DrawScope.drawHole(size: Size) {
- if (shape == RectangleShape) {
- drawRect(Color.Black, size = size, blendMode = BlendMode.DstOut)
- return
- }
-
- val outline =
- if (size == lastSize && layoutDirection == lastLayoutDirection) {
- lastOutline!!
- } else {
- val newOutline = shape().createOutline(size, layoutDirection, this)
- lastSize = size
- lastLayoutDirection = layoutDirection
- lastOutline = newOutline
- newOutline
- }
-
- drawOutline(
- outline,
- Color.Black,
- blendMode = BlendMode.DstOut,
- )
- }
-}
-
-private data class PunchHoleWithBoundsElement(
- private val coords: () -> LayoutCoordinates?,
- private val shape: Shape,
-) : ModifierNodeElement<PunchHoleWithBoundsNode>() {
- override fun create(): PunchHoleWithBoundsNode = PunchHoleWithBoundsNode(coords, shape)
-
- override fun update(node: PunchHoleWithBoundsNode) {
- node.holeCoords = coords
- node.shape = shape
- }
-}
-
-private class PunchHoleWithBoundsNode(
- var holeCoords: () -> LayoutCoordinates?,
- var shape: Shape,
-) : DelegatingNode(), DrawModifierNode, GlobalPositionAwareModifierNode {
- private val delegate = delegate(PunchHoleNode(::holeSize, ::holeOffset, ::shape))
- private var lastCoords: LayoutCoordinates? = null
-
- override fun onGloballyPositioned(coordinates: LayoutCoordinates) {
- this.lastCoords = coordinates
- }
-
- override fun ContentDrawScope.draw() = with(delegate) { draw() }
-
- private fun holeSize(): Size {
- return holeCoords()?.size?.toSize() ?: Size.Zero
- }
-
- private fun holeOffset(): Offset {
- val holeCoords = holeCoords() ?: return Offset.Zero
- val lastCoords = lastCoords ?: error("draw() was called before onGloballyPositioned()")
- return lastCoords.localPositionOf(holeCoords, relativeToSource = Offset.Zero)
- }
-}
diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/Scene.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/Scene.kt
index 936f4ba0efef..a49f1af97183 100644
--- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/Scene.kt
+++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/Scene.kt
@@ -37,7 +37,7 @@ internal class Scene(
val key: SceneKey,
layoutImpl: SceneTransitionLayoutImpl,
content: @Composable SceneScope.() -> Unit,
- actions: Map<UserAction, UserActionResult>,
+ actions: Map<UserAction.Resolved, UserActionResult>,
zIndex: Float,
) {
internal val scope = SceneScopeImpl(layoutImpl, this)
@@ -54,8 +54,8 @@ internal class Scene(
}
private fun checkValid(
- userActions: Map<UserAction, UserActionResult>
- ): Map<UserAction, UserActionResult> {
+ userActions: Map<UserAction.Resolved, UserActionResult>
+ ): Map<UserAction.Resolved, UserActionResult> {
userActions.forEach { (action, result) ->
if (key == result.toScene) {
error(
diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayout.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayout.kt
index 7c8fce8f297d..2fc4526b31f2 100644
--- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayout.kt
+++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayout.kt
@@ -28,10 +28,13 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.input.nestedscroll.NestedScrollConnection
import androidx.compose.ui.platform.LocalDensity
+import androidx.compose.ui.platform.LocalLayoutDirection
import androidx.compose.ui.unit.Density
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.IntOffset
import androidx.compose.ui.unit.IntSize
+import androidx.compose.ui.unit.LayoutDirection
+import com.android.compose.animation.scene.UserAction.Resolved
/**
* [SceneTransitionLayout] is a container that automatically animates its content whenever its state
@@ -48,7 +51,6 @@ import androidx.compose.ui.unit.IntSize
* @param transitionInterceptionThreshold used during a scene transition. For the scene to be
* intercepted, the progress value must be above the threshold, and below (1 - threshold).
* @param scenes the configuration of the different scenes of this layout.
- * @see updateSceneTransitionLayoutState
*/
@Composable
fun SceneTransitionLayout(
@@ -70,56 +72,6 @@ fun SceneTransitionLayout(
)
}
-/**
- * [SceneTransitionLayout] is a container that automatically animates its content whenever
- * [currentScene] changes, using the transitions defined in [transitions].
- *
- * Note: You should use [androidx.compose.animation.AnimatedContent] instead of
- * [SceneTransitionLayout] if it fits your need. Use [SceneTransitionLayout] over AnimatedContent if
- * you need support for swipe gestures, shared elements or transitions defined declaratively outside
- * UI code.
- *
- * @param currentScene the current scene
- * @param onChangeScene a mutator that should set [currentScene] to the given scene when called.
- * This is called when the user commits a transition to a new scene because of a [UserAction], for
- * instance by triggering back navigation or by swiping to a new scene.
- * @param transitions the definition of the transitions used to animate a change of scene.
- * @param swipeSourceDetector the source detector used to detect which source a swipe is started
- * from, if any.
- * @param transitionInterceptionThreshold used during a scene transition. For the scene to be
- * intercepted, the progress value must be above the threshold, and below (1 - threshold).
- * @param scenes the configuration of the different scenes of this layout.
- */
-@Composable
-fun SceneTransitionLayout(
- currentScene: SceneKey,
- onChangeScene: (SceneKey) -> Unit,
- transitions: SceneTransitions,
- modifier: Modifier = Modifier,
- swipeSourceDetector: SwipeSourceDetector = DefaultEdgeDetector,
- swipeDetector: SwipeDetector = DefaultSwipeDetector,
- @FloatRange(from = 0.0, to = 0.5) transitionInterceptionThreshold: Float = 0f,
- enableInterruptions: Boolean = DEFAULT_INTERRUPTIONS_ENABLED,
- scenes: SceneTransitionLayoutScope.() -> Unit,
-) {
- val state =
- updateSceneTransitionLayoutState(
- currentScene,
- onChangeScene,
- transitions,
- enableInterruptions = enableInterruptions,
- )
-
- SceneTransitionLayout(
- state,
- modifier,
- swipeSourceDetector,
- swipeDetector,
- transitionInterceptionThreshold,
- scenes,
- )
-}
-
interface SceneTransitionLayoutScope {
/**
* Add a scene to this layout, identified by [key].
@@ -255,8 +207,8 @@ interface BaseSceneScope : ElementStateScope {
* @param rightBehavior when we should perform the overscroll animation at the right.
*/
fun Modifier.horizontalNestedScrollToScene(
- leftBehavior: NestedScrollBehavior = NestedScrollBehavior.EdgeNoPreview,
- rightBehavior: NestedScrollBehavior = NestedScrollBehavior.EdgeNoPreview,
+ leftBehavior: NestedScrollBehavior = NestedScrollBehavior.Default,
+ rightBehavior: NestedScrollBehavior = NestedScrollBehavior.Default,
isExternalOverscrollGesture: () -> Boolean = { false },
): Modifier
@@ -268,8 +220,8 @@ interface BaseSceneScope : ElementStateScope {
* @param bottomBehavior when we should perform the overscroll animation at the bottom.
*/
fun Modifier.verticalNestedScrollToScene(
- topBehavior: NestedScrollBehavior = NestedScrollBehavior.EdgeNoPreview,
- bottomBehavior: NestedScrollBehavior = NestedScrollBehavior.EdgeNoPreview,
+ topBehavior: NestedScrollBehavior = NestedScrollBehavior.Default,
+ bottomBehavior: NestedScrollBehavior = NestedScrollBehavior.Default,
isExternalOverscrollGesture: () -> Boolean = { false },
): Modifier
@@ -395,34 +347,71 @@ interface ElementBoxScope {
@Stable @ElementDsl interface MovableElementContentScope : BaseSceneScope, ElementBoxScope
/** An action performed by the user. */
-sealed interface UserAction {
+sealed class UserAction {
infix fun to(scene: SceneKey): Pair<UserAction, UserActionResult> {
return this to UserActionResult(toScene = scene)
}
+
+ /** Resolve this into a [Resolved] user action given [layoutDirection]. */
+ internal abstract fun resolve(layoutDirection: LayoutDirection): Resolved
+
+ /** A resolved [UserAction] that does not depend on the layout direction. */
+ internal sealed class Resolved
}
/** The user navigated back, either using a gesture or by triggering a KEYCODE_BACK event. */
-data object Back : UserAction
+data object Back : UserAction() {
+ override fun resolve(layoutDirection: LayoutDirection): Resolved = Resolved
+
+ internal object Resolved : UserAction.Resolved()
+}
/** The user swiped on the container. */
data class Swipe(
val direction: SwipeDirection,
val pointerCount: Int = 1,
val fromSource: SwipeSource? = null,
-) : UserAction {
+) : UserAction() {
companion object {
val Left = Swipe(SwipeDirection.Left)
val Up = Swipe(SwipeDirection.Up)
val Right = Swipe(SwipeDirection.Right)
val Down = Swipe(SwipeDirection.Down)
+ val Start = Swipe(SwipeDirection.Start)
+ val End = Swipe(SwipeDirection.End)
}
+
+ override fun resolve(layoutDirection: LayoutDirection): UserAction.Resolved {
+ return Resolved(
+ direction = direction.resolve(layoutDirection),
+ pointerCount = pointerCount,
+ fromSource = fromSource?.resolve(layoutDirection),
+ )
+ }
+
+ /** A resolved [Swipe] that does not depend on the layout direction. */
+ internal data class Resolved(
+ val direction: SwipeDirection.Resolved,
+ val pointerCount: Int,
+ val fromSource: SwipeSource.Resolved?,
+ ) : UserAction.Resolved()
}
-enum class SwipeDirection(val orientation: Orientation) {
- Up(Orientation.Vertical),
- Down(Orientation.Vertical),
- Left(Orientation.Horizontal),
- Right(Orientation.Horizontal),
+enum class SwipeDirection(internal val resolve: (LayoutDirection) -> Resolved) {
+ Up(resolve = { Resolved.Up }),
+ Down(resolve = { Resolved.Down }),
+ Left(resolve = { Resolved.Left }),
+ Right(resolve = { Resolved.Right }),
+ Start(resolve = { if (it == LayoutDirection.Ltr) Resolved.Left else Resolved.Right }),
+ End(resolve = { if (it == LayoutDirection.Ltr) Resolved.Right else Resolved.Left });
+
+ /** A resolved [SwipeDirection] that does not depend on the layout direction. */
+ internal enum class Resolved(val orientation: Orientation) {
+ Up(Orientation.Vertical),
+ Down(Orientation.Vertical),
+ Left(Orientation.Horizontal),
+ Right(Orientation.Horizontal),
+ }
}
/**
@@ -437,6 +426,16 @@ interface SwipeSource {
override fun equals(other: Any?): Boolean
override fun hashCode(): Int
+
+ /** Resolve this into a [Resolved] swipe source given [layoutDirection]. */
+ fun resolve(layoutDirection: LayoutDirection): Resolved
+
+ /** A resolved [SwipeSource] that does not depend on the layout direction. */
+ interface Resolved {
+ override fun equals(other: Any?): Boolean
+
+ override fun hashCode(): Int
+ }
}
interface SwipeSourceDetector {
@@ -511,11 +510,13 @@ internal fun SceneTransitionLayoutForTesting(
scenes: SceneTransitionLayoutScope.() -> Unit,
) {
val density = LocalDensity.current
+ val layoutDirection = LocalLayoutDirection.current
val coroutineScope = rememberCoroutineScope()
val layoutImpl = remember {
SceneTransitionLayoutImpl(
- state = state as BaseSceneTransitionLayoutState,
+ state = state as MutableSceneTransitionLayoutStateImpl,
density = density,
+ layoutDirection = layoutDirection,
swipeSourceDetector = swipeSourceDetector,
transitionInterceptionThreshold = transitionInterceptionThreshold,
builder = scenes,
@@ -526,7 +527,7 @@ internal fun SceneTransitionLayoutForTesting(
// TODO(b/317014852): Move this into the SideEffect {} again once STLImpl.scenes is not a
// SnapshotStateMap anymore.
- layoutImpl.updateScenes(scenes)
+ layoutImpl.updateScenes(scenes, layoutDirection)
SideEffect {
if (state != layoutImpl.state) {
@@ -537,6 +538,7 @@ internal fun SceneTransitionLayoutForTesting(
}
layoutImpl.density = density
+ layoutImpl.layoutDirection = layoutDirection
layoutImpl.swipeSourceDetector = swipeSourceDetector
layoutImpl.transitionInterceptionThreshold = transitionInterceptionThreshold
}
diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayoutImpl.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayoutImpl.kt
index 609541925bc5..32db0b7cd9fe 100644
--- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayoutImpl.kt
+++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayoutImpl.kt
@@ -33,6 +33,7 @@ import androidx.compose.ui.node.ModifierNodeElement
import androidx.compose.ui.unit.Constraints
import androidx.compose.ui.unit.Density
import androidx.compose.ui.unit.IntSize
+import androidx.compose.ui.unit.LayoutDirection
import androidx.compose.ui.util.fastForEach
import androidx.compose.ui.util.fastForEachReversed
import com.android.compose.ui.util.lerp
@@ -43,8 +44,9 @@ internal typealias MovableElementContent = @Composable (@Composable () -> Unit)
@Stable
internal class SceneTransitionLayoutImpl(
- internal val state: BaseSceneTransitionLayoutState,
+ internal val state: MutableSceneTransitionLayoutStateImpl,
internal var density: Density,
+ internal var layoutDirection: LayoutDirection,
internal var swipeSourceDetector: SwipeSourceDetector,
internal var transitionInterceptionThreshold: Float,
builder: SceneTransitionLayoutScope.() -> Unit,
@@ -114,7 +116,7 @@ internal class SceneTransitionLayoutImpl(
private set
init {
- updateScenes(builder)
+ updateScenes(builder, layoutDirection)
// DraggableHandlerImpl must wait for the scenes to be initialized, in order to access the
// current scene (required for SwipeTransition).
@@ -147,7 +149,10 @@ internal class SceneTransitionLayoutImpl(
return scenes[key] ?: error("Scene $key is not configured")
}
- internal fun updateScenes(builder: SceneTransitionLayoutScope.() -> Unit) {
+ internal fun updateScenes(
+ builder: SceneTransitionLayoutScope.() -> Unit,
+ layoutDirection: LayoutDirection,
+ ) {
// Keep a reference of the current scenes. After processing [builder], the scenes that were
// not configured will be removed.
val scenesToRemove = scenes.keys.toMutableSet()
@@ -163,11 +168,13 @@ internal class SceneTransitionLayoutImpl(
) {
scenesToRemove.remove(key)
+ val resolvedUserActions =
+ userActions.mapKeys { it.key.resolve(layoutDirection) }
val scene = scenes[key]
if (scene != null) {
// Update an existing scene.
scene.content = content
- scene.userActions = userActions
+ scene.userActions = resolvedUserActions
scene.zIndex = zIndex
} else {
// New scene.
@@ -176,7 +183,7 @@ internal class SceneTransitionLayoutImpl(
key,
this@SceneTransitionLayoutImpl,
content,
- userActions,
+ resolvedUserActions,
zIndex,
)
}
@@ -213,7 +220,7 @@ internal class SceneTransitionLayoutImpl(
@Composable
private fun BackHandler() {
val targetSceneForBack =
- scene(state.transitionState.currentScene).userActions[Back]?.toScene
+ scene(state.transitionState.currentScene).userActions[Back.Resolved]?.toScene
PredictiveBackHandler(state, coroutineScope, targetSceneForBack)
}
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 5b4fbf036083..48bc251f1f87 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
@@ -22,13 +22,9 @@ import androidx.compose.animation.core.Animatable
import androidx.compose.animation.core.AnimationVector1D
import androidx.compose.animation.core.spring
import androidx.compose.foundation.gestures.Orientation
-import androidx.compose.runtime.Composable
-import androidx.compose.runtime.LaunchedEffect
-import androidx.compose.runtime.SideEffect
import androidx.compose.runtime.Stable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
-import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.util.fastAll
import androidx.compose.ui.util.fastFilter
@@ -38,14 +34,12 @@ import com.android.compose.animation.scene.transition.link.StateLink
import kotlin.math.absoluteValue
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Job
-import kotlinx.coroutines.channels.Channel
import kotlinx.coroutines.launch
/**
* The state of a [SceneTransitionLayout].
*
* @see MutableSceneTransitionLayoutState
- * @see updateSceneTransitionLayoutState
*/
@Stable
sealed interface SceneTransitionLayoutState {
@@ -152,55 +146,6 @@ fun MutableSceneTransitionLayoutState(
)
}
-/**
- * Sets up a [SceneTransitionLayoutState] and keeps it synced with [currentScene], [onChangeScene]
- * and [transitions]. New transitions will automatically be started whenever [currentScene] is
- * changed.
- *
- * @param currentScene the current scene
- * @param onChangeScene a mutator that should set [currentScene] to the given scene when called.
- * This is called when the user commits a transition to a new scene because of a [UserAction], for
- * instance by triggering back navigation or by swiping to a new scene.
- * @param transitions the definition of the transitions used to animate a change of scene.
- * @param canChangeScene whether we can transition to the given scene. This is called when the user
- * commits a transition to a new scene because of a [UserAction]. If [canChangeScene] returns
- * `true`, then [onChangeScene] will be called right afterwards with the same [SceneKey]. If it
- * returns `false`, the user action will be cancelled and we will animate back to the current
- * scene.
- * @param stateLinks the [StateLink] connecting this [SceneTransitionLayoutState] to other
- * [SceneTransitionLayoutState]s.
- */
-@Composable
-fun updateSceneTransitionLayoutState(
- currentScene: SceneKey,
- onChangeScene: (SceneKey) -> Unit,
- transitions: SceneTransitions = SceneTransitions.Empty,
- canChangeScene: (SceneKey) -> Boolean = { true },
- stateLinks: List<StateLink> = emptyList(),
- enableInterruptions: Boolean = DEFAULT_INTERRUPTIONS_ENABLED,
-): SceneTransitionLayoutState {
- return remember {
- HoistedSceneTransitionLayoutState(
- currentScene,
- transitions,
- onChangeScene,
- canChangeScene,
- stateLinks,
- enableInterruptions,
- )
- }
- .apply {
- update(
- currentScene,
- onChangeScene,
- canChangeScene,
- transitions,
- stateLinks,
- enableInterruptions,
- )
- }
-}
-
@Stable
sealed interface TransitionState {
/**
@@ -255,7 +200,7 @@ sealed interface TransitionState {
* transition.
*
* Important: These will be set exactly once, when this transition is
- * [started][BaseSceneTransitionLayoutState.startTransition].
+ * [started][MutableSceneTransitionLayoutStateImpl.startTransition].
*/
internal var transformationSpec: TransformationSpecImpl = TransformationSpec.Empty
private var fromOverscrollSpec: OverscrollSpecImpl? = null
@@ -387,13 +332,16 @@ sealed interface TransitionState {
}
}
-internal abstract class BaseSceneTransitionLayoutState(
+/** A [MutableSceneTransitionLayoutState] that holds the value for the current scene. */
+internal class MutableSceneTransitionLayoutStateImpl(
initialScene: SceneKey,
- protected var stateLinks: List<StateLink>,
+ override var transitions: SceneTransitions = transitions {},
+ internal val canChangeScene: (SceneKey) -> Boolean = { true },
+ private val stateLinks: List<StateLink> = emptyList(),
// TODO(b/290930950): Remove this flag.
- internal var enableInterruptions: Boolean,
-) : SceneTransitionLayoutState {
+ internal val enableInterruptions: Boolean = DEFAULT_INTERRUPTIONS_ENABLED,
+) : MutableSceneTransitionLayoutState {
private val creationThread: Thread = Thread.currentThread()
/**
@@ -429,17 +377,6 @@ internal abstract class BaseSceneTransitionLayoutState(
@VisibleForTesting
internal val finishedTransitions = mutableMapOf<TransitionState.Transition, SceneKey>()
- /** Whether we can transition to the given [scene]. */
- internal abstract fun canChangeScene(scene: SceneKey): Boolean
-
- /**
- * Called when the [current scene][TransitionState.currentScene] should be changed to [scene].
- *
- * When this is called, the source of truth for the current scene should be changed so that
- * [transitionState] will animate and settle to [scene].
- */
- internal abstract fun CoroutineScope.onChangeScene(scene: SceneKey)
-
internal fun checkThread() {
val current = Thread.currentThread()
if (current !== creationThread) {
@@ -464,6 +401,20 @@ internal abstract class BaseSceneTransitionLayoutState(
return transition.isTransitioningBetween(scene, other)
}
+ override fun setTargetScene(
+ targetScene: SceneKey,
+ coroutineScope: CoroutineScope,
+ transitionKey: TransitionKey?,
+ ): TransitionState.Transition? {
+ checkThread()
+
+ return coroutineScope.animateToScene(
+ layoutState = this@MutableSceneTransitionLayoutStateImpl,
+ target = targetScene,
+ transitionKey = transitionKey,
+ )
+ }
+
/**
* Start a new [transition].
*
@@ -655,7 +606,7 @@ internal abstract class BaseSceneTransitionLayoutState(
}
}
- fun snapToScene(scene: SceneKey) {
+ override fun snapToScene(scene: SceneKey) {
checkThread()
// Force finish all transitions.
@@ -729,89 +680,6 @@ internal abstract class BaseSceneTransitionLayoutState(
}
}
-/**
- * A [SceneTransitionLayout] whose current scene/source of truth is hoisted (its current value comes
- * from outside).
- */
-internal class HoistedSceneTransitionLayoutState(
- initialScene: SceneKey,
- override var transitions: SceneTransitions,
- private var changeScene: (SceneKey) -> Unit,
- private var canChangeScene: (SceneKey) -> Boolean,
- stateLinks: List<StateLink> = emptyList(),
- enableInterruptions: Boolean = DEFAULT_INTERRUPTIONS_ENABLED,
-) : BaseSceneTransitionLayoutState(initialScene, stateLinks, enableInterruptions) {
- private val targetSceneChannel = Channel<SceneKey>(Channel.CONFLATED)
-
- override fun canChangeScene(scene: SceneKey): Boolean = canChangeScene.invoke(scene)
-
- override fun CoroutineScope.onChangeScene(scene: SceneKey) = changeScene.invoke(scene)
-
- @Composable
- fun update(
- currentScene: SceneKey,
- onChangeScene: (SceneKey) -> Unit,
- canChangeScene: (SceneKey) -> Boolean,
- transitions: SceneTransitions,
- stateLinks: List<StateLink>,
- enableInterruptions: Boolean,
- ) {
- SideEffect {
- this.changeScene = onChangeScene
- this.canChangeScene = canChangeScene
- this.transitions = transitions
- this.stateLinks = stateLinks
- this.enableInterruptions = enableInterruptions
-
- targetSceneChannel.trySend(currentScene)
- }
-
- LaunchedEffect(targetSceneChannel) {
- for (newKey in targetSceneChannel) {
- // Inspired by AnimateAsState.kt: let's poll the last value to avoid being one frame
- // late.
- val newKey = targetSceneChannel.tryReceive().getOrNull() ?: newKey
- animateToScene(
- layoutState = this@HoistedSceneTransitionLayoutState,
- target = newKey,
- transitionKey = null,
- )
- }
- }
- }
-}
-
-/** A [MutableSceneTransitionLayoutState] that holds the value for the current scene. */
-internal class MutableSceneTransitionLayoutStateImpl(
- initialScene: SceneKey,
- override var transitions: SceneTransitions = transitions {},
- private val canChangeScene: (SceneKey) -> Boolean = { true },
- stateLinks: List<StateLink> = emptyList(),
- enableInterruptions: Boolean = DEFAULT_INTERRUPTIONS_ENABLED,
-) :
- MutableSceneTransitionLayoutState,
- BaseSceneTransitionLayoutState(initialScene, stateLinks, enableInterruptions) {
- override fun setTargetScene(
- targetScene: SceneKey,
- coroutineScope: CoroutineScope,
- transitionKey: TransitionKey?,
- ): TransitionState.Transition? {
- checkThread()
-
- return coroutineScope.animateToScene(
- layoutState = this@MutableSceneTransitionLayoutStateImpl,
- target = targetScene,
- transitionKey = transitionKey,
- )
- }
-
- override fun canChangeScene(scene: SceneKey): Boolean = canChangeScene.invoke(scene)
-
- override fun CoroutineScope.onChangeScene(scene: SceneKey) {
- setTargetScene(scene, coroutineScope = this)
- }
-}
-
private const val TAG = "SceneTransitionLayoutState"
/** Whether support for interruptions in enabled by default. */
diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SwipeToScene.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SwipeToScene.kt
index 171e2430c004..b8010f25f9a4 100644
--- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SwipeToScene.kt
+++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SwipeToScene.kt
@@ -20,11 +20,15 @@ import androidx.compose.foundation.gestures.Orientation
import androidx.compose.runtime.Stable
import androidx.compose.ui.Modifier
import androidx.compose.ui.geometry.Offset
+import androidx.compose.ui.input.nestedscroll.nestedScrollModifierNode
import androidx.compose.ui.input.pointer.PointerEvent
import androidx.compose.ui.input.pointer.PointerEventPass
+import androidx.compose.ui.node.DelegatableNode
import androidx.compose.ui.node.DelegatingNode
import androidx.compose.ui.node.ModifierNodeElement
import androidx.compose.ui.node.PointerInputModifierNode
+import androidx.compose.ui.node.TraversableNode
+import androidx.compose.ui.node.findNearestAncestor
import androidx.compose.ui.unit.IntSize
/**
@@ -53,7 +57,7 @@ private class SwipeToSceneNode(
draggableHandler: DraggableHandlerImpl,
swipeDetector: SwipeDetector,
) : DelegatingNode(), PointerInputModifierNode {
- private val delegate =
+ private val multiPointerDraggableNode =
delegate(
MultiPointerDraggableNode(
orientation = draggableHandler.orientation,
@@ -74,21 +78,41 @@ private class SwipeToSceneNode(
// Make sure to update the delegate orientation. Note that this will automatically
// reset the underlying pointer input handler, so previous gestures will be
// cancelled.
- delegate.orientation = value.orientation
+ multiPointerDraggableNode.orientation = value.orientation
}
}
+ private val nestedScrollHandlerImpl =
+ NestedScrollHandlerImpl(
+ layoutImpl = draggableHandler.layoutImpl,
+ orientation = draggableHandler.orientation,
+ topOrLeftBehavior = NestedScrollBehavior.Default,
+ bottomOrRightBehavior = NestedScrollBehavior.Default,
+ isExternalOverscrollGesture = { false },
+ pointersInfoOwner = { multiPointerDraggableNode.pointersInfo() },
+ )
+
+ init {
+ delegate(nestedScrollModifierNode(nestedScrollHandlerImpl.connection, dispatcher = null))
+ delegate(ScrollBehaviorOwnerNode(draggableHandler.nestedScrollKey, nestedScrollHandlerImpl))
+ }
+
+ override fun onDetach() {
+ // Make sure we reset the scroll connection when this modifier is removed from composition
+ nestedScrollHandlerImpl.connection.reset()
+ }
+
override fun onPointerEvent(
pointerEvent: PointerEvent,
pass: PointerEventPass,
bounds: IntSize,
- ) = delegate.onPointerEvent(pointerEvent, pass, bounds)
+ ) = multiPointerDraggableNode.onPointerEvent(pointerEvent, pass, bounds)
- override fun onCancelPointerInput() = delegate.onCancelPointerInput()
+ override fun onCancelPointerInput() = multiPointerDraggableNode.onCancelPointerInput()
private fun enabled(): Boolean {
return draggableHandler.isDrivingTransition ||
- currentScene().shouldEnableSwipes(delegate.orientation)
+ currentScene().shouldEnableSwipes(multiPointerDraggableNode.orientation)
}
private fun currentScene(): Scene {
@@ -98,7 +122,9 @@ private class SwipeToSceneNode(
/** Whether swipe should be enabled in the given [orientation]. */
private fun Scene.shouldEnableSwipes(orientation: Orientation): Boolean {
- return userActions.keys.any { it is Swipe && it.direction.orientation == orientation }
+ return userActions.keys.any {
+ it is Swipe.Resolved && it.direction.orientation == orientation
+ }
}
private fun startDragImmediately(startedPosition: Offset): Boolean {
@@ -116,3 +142,43 @@ private class SwipeToSceneNode(
return currentScene().shouldEnableSwipes(oppositeOrientation)
}
}
+
+/** Find the [ScrollBehaviorOwner] for the current orientation. */
+internal fun DelegatableNode.requireScrollBehaviorOwner(
+ draggableHandler: DraggableHandlerImpl
+): ScrollBehaviorOwner {
+ val ancestorNode =
+ checkNotNull(findNearestAncestor(draggableHandler.nestedScrollKey)) {
+ "This should never happen! Couldn't find a ScrollBehaviorOwner. " +
+ "Are we inside an SceneTransitionLayout?"
+ }
+ return ancestorNode as ScrollBehaviorOwner
+}
+
+internal fun interface ScrollBehaviorOwner {
+ fun updateScrollBehaviors(
+ topOrLeftBehavior: NestedScrollBehavior,
+ bottomOrRightBehavior: NestedScrollBehavior,
+ isExternalOverscrollGesture: () -> Boolean,
+ )
+}
+
+/**
+ * We need a node that receives the desired behavior.
+ *
+ * TODO(b/353234530) move this logic into [SwipeToSceneNode]
+ */
+private class ScrollBehaviorOwnerNode(
+ override val traverseKey: Any,
+ val nestedScrollHandlerImpl: NestedScrollHandlerImpl
+) : Modifier.Node(), TraversableNode, ScrollBehaviorOwner {
+ override fun updateScrollBehaviors(
+ topOrLeftBehavior: NestedScrollBehavior,
+ bottomOrRightBehavior: NestedScrollBehavior,
+ isExternalOverscrollGesture: () -> Boolean
+ ) {
+ nestedScrollHandlerImpl.topOrLeftBehavior = topOrLeftBehavior
+ nestedScrollHandlerImpl.bottomOrRightBehavior = bottomOrRightBehavior
+ nestedScrollHandlerImpl.isExternalOverscrollGesture = isExternalOverscrollGesture
+ }
+}
diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/EdgeTranslate.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/EdgeTranslate.kt
index aa8dc38fdd8f..7daefd0d5d77 100644
--- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/EdgeTranslate.kt
+++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/EdgeTranslate.kt
@@ -44,26 +44,26 @@ internal class EdgeTranslate(
return value
}
- return when (edge) {
- Edge.Top ->
+ return when (edge.resolve(layoutImpl.layoutDirection)) {
+ Edge.Resolved.Top ->
if (startsOutsideLayoutBounds) {
Offset(value.x, -elementSize.height.toFloat())
} else {
Offset(value.x, 0f)
}
- Edge.Left ->
+ Edge.Resolved.Left ->
if (startsOutsideLayoutBounds) {
Offset(-elementSize.width.toFloat(), value.y)
} else {
Offset(0f, value.y)
}
- Edge.Bottom ->
+ Edge.Resolved.Bottom ->
if (startsOutsideLayoutBounds) {
Offset(value.x, sceneSize.height.toFloat())
} else {
Offset(value.x, (sceneSize.height - elementSize.height).toFloat())
}
- Edge.Right ->
+ Edge.Resolved.Right ->
if (startsOutsideLayoutBounds) {
Offset(sceneSize.width.toFloat(), value.y)
} else {
diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transition/link/StateLink.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transition/link/StateLink.kt
index 6c299463f978..2018d6e37b57 100644
--- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transition/link/StateLink.kt
+++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transition/link/StateLink.kt
@@ -16,7 +16,7 @@
package com.android.compose.animation.scene.transition.link
-import com.android.compose.animation.scene.BaseSceneTransitionLayoutState
+import com.android.compose.animation.scene.MutableSceneTransitionLayoutStateImpl
import com.android.compose.animation.scene.SceneKey
import com.android.compose.animation.scene.SceneTransitionLayoutState
import com.android.compose.animation.scene.TransitionKey
@@ -25,7 +25,7 @@ import com.android.compose.animation.scene.TransitionState
/** A link between a source (implicit) and [target] `SceneTransitionLayoutState`. */
class StateLink(target: SceneTransitionLayoutState, val transitionLinks: List<TransitionLink>) {
- internal val target = target as BaseSceneTransitionLayoutState
+ internal val target = target as MutableSceneTransitionLayoutStateImpl
/**
* Links two transitions (source and target) together.
diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/CommunalSwipeDetector.kt b/packages/SystemUI/compose/scene/src/com/android/systemui/communal/ui/compose/CommunalSwipeDetector.kt
index 7be34cabfaf8..3fda9b85a5c2 100644
--- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/CommunalSwipeDetector.kt
+++ b/packages/SystemUI/compose/scene/src/com/android/systemui/communal/ui/compose/CommunalSwipeDetector.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.compose.animation.scene
+package com.android.systemui.communal.ui.compose
import androidx.compose.foundation.gestures.Orientation
import androidx.compose.ui.input.pointer.PointerInputChange
@@ -22,10 +22,12 @@ import androidx.compose.ui.input.pointer.positionChange
import androidx.compose.ui.unit.Density
import androidx.compose.ui.unit.IntOffset
import androidx.compose.ui.unit.IntSize
+import com.android.compose.animation.scene.Edge
+import com.android.compose.animation.scene.SwipeDetector
+import com.android.compose.animation.scene.SwipeSource
+import com.android.compose.animation.scene.SwipeSourceDetector
import kotlin.math.abs
-private const val TRAVEL_RATIO_THRESHOLD = .5f
-
/**
* {@link CommunalSwipeDetector} provides an implementation of {@link SwipeDetector} and {@link
* SwipeSourceDetector} to enable fullscreen swipe handling to transition to and from the glanceable
@@ -33,6 +35,10 @@ private const val TRAVEL_RATIO_THRESHOLD = .5f
*/
class CommunalSwipeDetector(private var lastDirection: SwipeSource? = null) :
SwipeSourceDetector, SwipeDetector {
+ companion object {
+ private const val TRAVEL_RATIO_THRESHOLD = .5f
+ }
+
override fun source(
layoutSize: IntSize,
position: IntOffset,
diff --git a/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/DraggableHandlerTest.kt b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/DraggableHandlerTest.kt
index ff83d4b93af8..c8bbb149a042 100644
--- a/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/DraggableHandlerTest.kt
+++ b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/DraggableHandlerTest.kt
@@ -25,6 +25,7 @@ import androidx.compose.ui.input.nestedscroll.NestedScrollConnection
import androidx.compose.ui.input.nestedscroll.NestedScrollSource
import androidx.compose.ui.unit.Density
import androidx.compose.ui.unit.IntSize
+import androidx.compose.ui.unit.LayoutDirection
import androidx.compose.ui.unit.Velocity
import androidx.test.ext.junit.runners.AndroidJUnit4
import com.android.compose.animation.scene.NestedScrollBehavior.DuringTransitionBetweenScenes
@@ -61,8 +62,24 @@ class DraggableHandlerTest {
canChangeScene = { canChangeScene(it) },
)
- val mutableUserActionsA = mutableMapOf(Swipe.Up to SceneB, Swipe.Down to SceneC)
- val mutableUserActionsB = mutableMapOf(Swipe.Up to SceneC, Swipe.Down to SceneA)
+ var layoutDirection = LayoutDirection.Rtl
+ set(value) {
+ field = value
+ layoutImpl.updateScenes(scenesBuilder, layoutDirection)
+ }
+
+ var mutableUserActionsA = mapOf(Swipe.Up to SceneB, Swipe.Down to SceneC)
+ set(value) {
+ field = value
+ layoutImpl.updateScenes(scenesBuilder, layoutDirection)
+ }
+
+ var mutableUserActionsB = mapOf(Swipe.Up to SceneC, Swipe.Down to SceneA)
+ set(value) {
+ field = value
+ layoutImpl.updateScenes(scenesBuilder, layoutDirection)
+ }
+
private val scenesBuilder: SceneTransitionLayoutScope.() -> Unit = {
scene(
key = SceneA,
@@ -94,6 +111,7 @@ class DraggableHandlerTest {
SceneTransitionLayoutImpl(
state = layoutState,
density = Density(1f),
+ layoutDirection = LayoutDirection.Ltr,
swipeSourceDetector = DefaultEdgeDetector,
transitionInterceptionThreshold = transitionInterceptionThreshold,
builder = scenesBuilder,
@@ -194,7 +212,8 @@ class DraggableHandlerTest {
draggableHandler: DraggableHandler,
startedPosition: Offset = Offset.Zero,
overSlop: Float = 0f,
- pointersDown: Int = 1
+ pointersDown: Int = 1,
+ expectedConsumed: Boolean = true,
): DragController {
val dragController =
draggableHandler.onDragStarted(
@@ -204,17 +223,23 @@ class DraggableHandlerTest {
)
// MultiPointerDraggable will always call onDelta with the initial overSlop right after
- dragController.onDragDelta(pixels = overSlop)
+ dragController.onDragDelta(pixels = overSlop, expectedConsumed = expectedConsumed)
return dragController
}
- fun DragController.onDragDelta(pixels: Float) {
- onDrag(delta = pixels)
+ fun DragController.onDragDelta(pixels: Float, expectedConsumed: Boolean = true) {
+ val consumed = onDrag(delta = pixels)
+ assertThat(consumed).isEqualTo(if (expectedConsumed) pixels else 0f)
}
- fun DragController.onDragStopped(velocity: Float, canChangeScene: Boolean = true) {
- onStop(velocity, canChangeScene)
+ fun DragController.onDragStopped(
+ velocity: Float,
+ canChangeScene: Boolean = true,
+ expectedConsumed: Boolean = true
+ ) {
+ val consumed = onStop(velocity, canChangeScene)
+ assertThat(consumed).isEqualTo(if (expectedConsumed) velocity else 0f)
}
fun NestedScrollConnection.scroll(
@@ -342,10 +367,18 @@ class DraggableHandlerTest {
@Test
fun onDragStartedWithoutActionsInBothDirections_stayIdle() = runGestureTest {
- onDragStarted(horizontalDraggableHandler, overSlop = up(fractionOfScreen = 0.3f))
+ onDragStarted(
+ horizontalDraggableHandler,
+ overSlop = up(fractionOfScreen = 0.3f),
+ expectedConsumed = false,
+ )
assertIdle(currentScene = SceneA)
- onDragStarted(horizontalDraggableHandler, overSlop = down(fractionOfScreen = 0.3f))
+ onDragStarted(
+ horizontalDraggableHandler,
+ overSlop = down(fractionOfScreen = 0.3f),
+ expectedConsumed = false,
+ )
assertIdle(currentScene = SceneA)
}
@@ -466,26 +499,24 @@ class DraggableHandlerTest {
dragController1.onDragStopped(velocity = -velocityThreshold)
assertTransition(currentScene = SceneB, fromScene = SceneA, toScene = SceneB)
- mutableUserActionsA.remove(Swipe.Up)
- mutableUserActionsA.remove(Swipe.Down)
- mutableUserActionsB.remove(Swipe.Up)
- mutableUserActionsB.remove(Swipe.Down)
+ mutableUserActionsA = emptyMap()
+ mutableUserActionsB = emptyMap()
// start accelaratedScroll and scroll over to B -> null
val dragController2 = onDragStartedImmediately()
- dragController2.onDragDelta(pixels = up(fractionOfScreen = 0.5f))
- dragController2.onDragDelta(pixels = up(fractionOfScreen = 0.5f))
+ dragController2.onDragDelta(pixels = up(fractionOfScreen = 0.5f), expectedConsumed = false)
+ dragController2.onDragDelta(pixels = up(fractionOfScreen = 0.5f), expectedConsumed = false)
// here onDragStopped is already triggered, but subsequent onDelta/onDragStopped calls may
// still be called. Make sure that they don't crash or change the scene
- dragController2.onDragDelta(pixels = up(fractionOfScreen = 0.5f))
+ dragController2.onDragDelta(pixels = up(fractionOfScreen = 0.5f), expectedConsumed = false)
dragController2.onDragStopped(velocity = 0f)
advanceUntilIdle()
assertIdle(SceneB)
// These events can still come in after the animation has settled
- dragController2.onDragDelta(pixels = up(fractionOfScreen = 0.5f))
+ dragController2.onDragDelta(pixels = up(fractionOfScreen = 0.5f), expectedConsumed = false)
dragController2.onDragStopped(velocity = 0f)
assertIdle(SceneB)
}
@@ -495,7 +526,7 @@ class DraggableHandlerTest {
val dragController1 = onDragStarted(overSlop = up(fractionOfScreen = 0.1f))
assertTransition(fromScene = SceneA, toScene = SceneB, progress = 0.1f)
- mutableUserActionsA[Swipe.Up] = UserActionResult(SceneC)
+ mutableUserActionsA += Swipe.Up to UserActionResult(SceneC)
dragController1.onDragDelta(pixels = up(fractionOfScreen = 0.1f))
// target stays B even though UserActions changed
assertTransition(fromScene = SceneA, toScene = SceneB, progress = 0.2f)
@@ -512,7 +543,7 @@ class DraggableHandlerTest {
val dragController1 = onDragStarted(overSlop = up(fractionOfScreen = 0.1f))
assertTransition(fromScene = SceneA, toScene = SceneB, progress = 0.1f)
- mutableUserActionsA[Swipe.Up] = UserActionResult(SceneC)
+ mutableUserActionsA += Swipe.Up to UserActionResult(SceneC)
dragController1.onDragDelta(pixels = up(fractionOfScreen = 0.1f))
dragController1.onDragStopped(velocity = down(fractionOfScreen = 0.1f))
@@ -829,7 +860,7 @@ class DraggableHandlerTest {
assertThat(progress).isEqualTo(0.2f)
// this should be ignored, we are scrolling now!
- dragController.onDragStopped(-velocityThreshold)
+ dragController.onDragStopped(-velocityThreshold, expectedConsumed = false)
assertTransition(currentScene = SceneA)
nestedScroll.scroll(available = -offsetY10)
@@ -1149,8 +1180,7 @@ class DraggableHandlerTest {
overscroll(SceneA, Orientation.Vertical) { fade(TestElements.Foo) }
}
- mutableUserActionsA.clear()
- mutableUserActionsA[Swipe.Up] = UserActionResult(SceneB)
+ mutableUserActionsA = mapOf(Swipe.Up to UserActionResult(SceneB))
val middle = Offset(SCREEN_SIZE / 2f, SCREEN_SIZE / 2f)
val dragController = onDragStarted(startedPosition = middle, overSlop = down(1f))
@@ -1178,8 +1208,7 @@ class DraggableHandlerTest {
overscroll(SceneA, Orientation.Vertical) { fade(TestElements.Foo) }
}
- mutableUserActionsA.clear()
- mutableUserActionsA[Swipe.Down] = UserActionResult(SceneC)
+ mutableUserActionsA = mapOf(Swipe.Down to UserActionResult(SceneC))
val middle = Offset(SCREEN_SIZE / 2f, SCREEN_SIZE / 2f)
val dragController = onDragStarted(startedPosition = middle, overSlop = up(1f))
@@ -1220,7 +1249,8 @@ class DraggableHandlerTest {
@Test
fun requireFullDistanceSwipe() = runGestureTest {
- mutableUserActionsA[Swipe.Up] = UserActionResult(SceneB, requiresFullDistanceSwipe = true)
+ mutableUserActionsA +=
+ Swipe.Up to UserActionResult(SceneB, requiresFullDistanceSwipe = true)
val controller = onDragStarted(overSlop = up(fractionOfScreen = 0.9f))
assertTransition(fromScene = SceneA, toScene = SceneB, progress = 0.9f)
diff --git a/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/ElementTest.kt b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/ElementTest.kt
index 1ae999282afa..c91151e41605 100644
--- a/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/ElementTest.kt
+++ b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/ElementTest.kt
@@ -203,26 +203,28 @@ class ElementTest {
val elementSize = 50.dp
val elementOffset = 20.dp
- lateinit var changeScene: (SceneKey) -> Unit
-
- rule.testTransition(
- from = SceneA,
- to = SceneB,
- transitionLayout = { currentScene, onChangeScene ->
- changeScene = onChangeScene
-
- SceneTransitionLayout(
- currentScene,
- onChangeScene,
+ val state =
+ rule.runOnUiThread {
+ MutableSceneTransitionLayoutState(
+ SceneA,
transitions {
from(SceneA, to = SceneB) { spec = tween }
from(SceneB, to = SceneC) { spec = tween }
},
- // Disable interruptions so that the current transition is directly removed when
- // starting a new one.
+ // Disable interruptions so that the current transition is directly removed
+ // when starting a new one.
enableInterruptions = false,
- ) {
+ )
+ }
+
+ lateinit var coroutineScope: CoroutineScope
+ rule.testTransition(
+ state = state,
+ to = SceneB,
+ transitionLayout = { state ->
+ coroutineScope = rememberCoroutineScope()
+ SceneTransitionLayout(state) {
scene(SceneA) {
Box(Modifier.size(layoutSize)) {
// Transformed element
@@ -243,7 +245,7 @@ class ElementTest {
onElement(TestElements.Bar).assertExists()
// Start transition from SceneB to SceneC
- changeScene(SceneC)
+ rule.runOnUiThread { state.setTargetScene(SceneC, coroutineScope) }
}
at(3 * frameDuration) { onElement(TestElements.Bar).assertIsNotDisplayed() }
@@ -340,18 +342,16 @@ class ElementTest {
@Test
fun elementIsReusedBetweenScenes() {
- var currentScene by mutableStateOf(SceneA)
+ val state = rule.runOnUiThread { MutableSceneTransitionLayoutState(SceneA) }
var sceneCState by mutableStateOf(0)
val key = TestElements.Foo
var nullableLayoutImpl: SceneTransitionLayoutImpl? = null
+ lateinit var coroutineScope: CoroutineScope
rule.setContent {
+ coroutineScope = rememberCoroutineScope()
SceneTransitionLayoutForTesting(
- state =
- updateSceneTransitionLayoutState(
- currentScene = currentScene,
- onChangeScene = { currentScene = it }
- ),
+ state = state,
onLayoutImpl = { nullableLayoutImpl = it },
) {
scene(SceneA) { /* Nothing */ }
@@ -375,7 +375,7 @@ class ElementTest {
assertThat(layoutImpl.elements).isEmpty()
// Scene B: element is in the map.
- currentScene = SceneB
+ rule.runOnUiThread { state.setTargetScene(SceneB, coroutineScope) }
rule.waitForIdle()
assertThat(layoutImpl.elements.keys).containsExactly(key)
@@ -383,7 +383,7 @@ class ElementTest {
assertThat(element.sceneStates.keys).containsExactly(SceneB)
// Scene C, state 0: the same element is reused.
- currentScene = SceneC
+ rule.runOnUiThread { state.setTargetScene(SceneC, coroutineScope) }
sceneCState = 0
rule.waitForIdle()
@@ -472,12 +472,13 @@ class ElementTest {
@Test
fun elementModifierSupportsUpdates() {
+ val state = rule.runOnUiThread { MutableSceneTransitionLayoutState(SceneA) }
var key by mutableStateOf(TestElements.Foo)
var nullableLayoutImpl: SceneTransitionLayoutImpl? = null
rule.setContent {
SceneTransitionLayoutForTesting(
- state = updateSceneTransitionLayoutState(currentScene = SceneA, onChangeScene = {}),
+ state = state,
onLayoutImpl = { nullableLayoutImpl = it },
) {
scene(SceneA) { Box(Modifier.element(key)) }
@@ -521,11 +522,12 @@ class ElementTest {
rule.waitUntil(timeoutMillis = 10_000) { animationFinished }
}
+ val state = rule.runOnUiThread { MutableSceneTransitionLayoutState(SceneA) }
rule.setContent {
scrollScope = rememberCoroutineScope()
SceneTransitionLayoutForTesting(
- state = updateSceneTransitionLayoutState(currentScene = SceneA, onChangeScene = {}),
+ state = state,
onLayoutImpl = { nullableLayoutImpl = it },
) {
scene(SceneA) {
@@ -795,8 +797,6 @@ class ElementTest {
scene(SceneB, userActions = mapOf(Swipe.Up to SceneA)) {
Box(
Modifier
- // Unconsumed scroll gesture will be intercepted by STL
- .verticalNestedScrollToScene()
// A scrollable that does not consume the scroll gesture
.scrollable(
rememberScrollableState(consumeScrollDelta = { 0f }),
@@ -873,8 +873,6 @@ class ElementTest {
) {
Box(
Modifier
- // Unconsumed scroll gesture will be intercepted by STL
- .verticalNestedScrollToScene()
// A scrollable that does not consume the scroll gesture
.scrollable(
rememberScrollableState(consumeScrollDelta = { 0f }),
diff --git a/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/MultiPointerDraggableTest.kt b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/MultiPointerDraggableTest.kt
index ecafb170535d..b98400a70ea4 100644
--- a/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/MultiPointerDraggableTest.kt
+++ b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/MultiPointerDraggableTest.kt
@@ -49,6 +49,21 @@ import org.junit.runner.RunWith
class MultiPointerDraggableTest {
@get:Rule val rule = createComposeRule()
+ private class SimpleDragController(
+ val onDrag: () -> Unit,
+ val onStop: () -> Unit,
+ ) : DragController {
+ override fun onDrag(delta: Float): Float {
+ onDrag()
+ return delta
+ }
+
+ override fun onStop(velocity: Float, canChangeScene: Boolean): Float {
+ onStop()
+ return velocity
+ }
+ }
+
@Test
fun cancellingPointerCallsOnDragStopped() {
val size = 200f
@@ -70,15 +85,10 @@ class MultiPointerDraggableTest {
startDragImmediately = { false },
onDragStarted = { _, _, _ ->
started = true
- object : DragController {
- override fun onDrag(delta: Float) {
- dragged = true
- }
-
- override fun onStop(velocity: Float, canChangeScene: Boolean) {
- stopped = true
- }
- }
+ SimpleDragController(
+ onDrag = { dragged = true },
+ onStop = { stopped = true },
+ )
},
)
)
@@ -142,15 +152,10 @@ class MultiPointerDraggableTest {
startDragImmediately = { true },
onDragStarted = { _, _, _ ->
started = true
- object : DragController {
- override fun onDrag(delta: Float) {
- dragged = true
- }
-
- override fun onStop(velocity: Float, canChangeScene: Boolean) {
- stopped = true
- }
- }
+ SimpleDragController(
+ onDrag = { dragged = true },
+ onStop = { stopped = true },
+ )
},
)
.pointerInput(Unit) {
@@ -218,15 +223,10 @@ class MultiPointerDraggableTest {
startDragImmediately = { false },
onDragStarted = { _, _, _ ->
started = true
- object : DragController {
- override fun onDrag(delta: Float) {
- dragged = true
- }
-
- override fun onStop(velocity: Float, canChangeScene: Boolean) {
- stopped = true
- }
- }
+ SimpleDragController(
+ onDrag = { dragged = true },
+ onStop = { stopped = true },
+ )
},
)
) {
@@ -341,15 +341,10 @@ class MultiPointerDraggableTest {
startDragImmediately = { false },
onDragStarted = { _, _, _ ->
started = true
- object : DragController {
- override fun onDrag(delta: Float) {
- dragged = true
- }
-
- override fun onStop(velocity: Float, canChangeScene: Boolean) {
- stopped = true
- }
- }
+ SimpleDragController(
+ onDrag = { dragged = true },
+ onStop = { stopped = true },
+ )
},
)
) {
@@ -447,15 +442,10 @@ class MultiPointerDraggableTest {
startDragImmediately = { false },
onDragStarted = { _, _, _ ->
verticalStarted = true
- object : DragController {
- override fun onDrag(delta: Float) {
- verticalDragged = true
- }
-
- override fun onStop(velocity: Float, canChangeScene: Boolean) {
- verticalStopped = true
- }
- }
+ SimpleDragController(
+ onDrag = { verticalDragged = true },
+ onStop = { verticalStopped = true },
+ )
},
)
.multiPointerDraggable(
@@ -464,15 +454,10 @@ class MultiPointerDraggableTest {
startDragImmediately = { false },
onDragStarted = { _, _, _ ->
horizontalStarted = true
- object : DragController {
- override fun onDrag(delta: Float) {
- horizontalDragged = true
- }
-
- override fun onStop(velocity: Float, canChangeScene: Boolean) {
- horizontalStopped = true
- }
- }
+ SimpleDragController(
+ onDrag = { horizontalDragged = true },
+ onStop = { horizontalStopped = true },
+ )
},
)
)
@@ -567,11 +552,10 @@ class MultiPointerDraggableTest {
},
onDragStarted = { _, _, _ ->
started = true
- object : DragController {
- override fun onDrag(delta: Float) {}
-
- override fun onStop(velocity: Float, canChangeScene: Boolean) {}
- }
+ SimpleDragController(
+ onDrag = { /* do nothing */ },
+ onStop = { /* do nothing */ },
+ )
},
)
) {}
diff --git a/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/NestedScrollToSceneTest.kt b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/NestedScrollToSceneTest.kt
new file mode 100644
index 000000000000..311a58018840
--- /dev/null
+++ b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/NestedScrollToSceneTest.kt
@@ -0,0 +1,269 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.compose.animation.scene
+
+import androidx.compose.foundation.gestures.Orientation.Vertical
+import androidx.compose.foundation.gestures.rememberScrollableState
+import androidx.compose.foundation.gestures.scrollable
+import androidx.compose.foundation.layout.Spacer
+import androidx.compose.foundation.layout.fillMaxSize
+import androidx.compose.foundation.layout.size
+import androidx.compose.runtime.Composable
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.geometry.Offset
+import androidx.compose.ui.platform.LocalViewConfiguration
+import androidx.compose.ui.test.junit4.createComposeRule
+import androidx.compose.ui.test.onRoot
+import androidx.compose.ui.test.performTouchInput
+import androidx.compose.ui.unit.Dp
+import androidx.compose.ui.unit.dp
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import com.android.compose.animation.scene.TestScenes.SceneA
+import com.android.compose.animation.scene.TestScenes.SceneB
+import com.android.compose.animation.scene.subjects.assertThat
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+
+@RunWith(AndroidJUnit4::class)
+class NestedScrollToSceneTest {
+ @get:Rule val rule = createComposeRule()
+
+ private var touchSlop = 0f
+ private val layoutWidth: Dp = 200.dp
+ private val layoutHeight = 400.dp
+
+ private fun setup2ScenesAndScrollTouchSlop(
+ modifierSceneA: @Composable SceneScope.() -> Modifier = { Modifier },
+ ): MutableSceneTransitionLayoutState {
+ val state =
+ rule.runOnUiThread {
+ MutableSceneTransitionLayoutState(SceneA, transitions = EmptyTestTransitions)
+ }
+
+ rule.setContent {
+ touchSlop = LocalViewConfiguration.current.touchSlop
+ SceneTransitionLayout(
+ state = state,
+ modifier = Modifier.size(layoutWidth, layoutHeight)
+ ) {
+ scene(SceneA, userActions = mapOf(Swipe.Up to SceneB)) {
+ Spacer(modifierSceneA().fillMaxSize())
+ }
+ scene(SceneB, userActions = mapOf(Swipe.Down to SceneA)) {
+ Spacer(Modifier.fillMaxSize())
+ }
+ }
+ }
+
+ pointerDownAndScrollTouchSlop()
+
+ assertThat(state.transitionState).isIdle()
+
+ return state
+ }
+
+ private fun pointerDownAndScrollTouchSlop() {
+ rule.onRoot().performTouchInput {
+ val middleTop = Offset((layoutWidth / 2).toPx(), 0f)
+ down(middleTop)
+ // Scroll touchSlop
+ moveBy(Offset(0f, touchSlop), delayMillis = 1_000)
+ }
+ }
+
+ private fun scrollDown(percent: Float = 1f) {
+ rule.onRoot().performTouchInput {
+ moveBy(Offset(0f, layoutHeight.toPx() * percent), delayMillis = 1_000)
+ }
+ }
+
+ private fun scrollUp(percent: Float = 1f) = scrollDown(-percent)
+
+ private fun pointerUp() {
+ rule.onRoot().performTouchInput { up() }
+ }
+
+ @Test
+ fun scrollableElementsInSTL_shouldHavePriority() {
+ val state = setup2ScenesAndScrollTouchSlop {
+ Modifier
+ // A scrollable that consumes the scroll gesture
+ .scrollable(rememberScrollableState { it }, Vertical)
+ }
+
+ scrollUp(percent = 0.5f)
+
+ // Consumed by the scrollable element
+ assertThat(state.transitionState).isIdle()
+ }
+
+ @Test
+ fun unconsumedScrollEvents_canBeConsumedBySTLByDefault() {
+ val state = setup2ScenesAndScrollTouchSlop {
+ Modifier
+ // A scrollable that does not consume the scroll gesture
+ .scrollable(rememberScrollableState { 0f }, Vertical)
+ }
+
+ scrollUp(percent = 0.5f)
+ // STL will start a transition with the remaining scroll
+ val transition = assertThat(state.transitionState).isTransition()
+ assertThat(transition).hasProgress(0.5f)
+
+ scrollUp(percent = 1f)
+ assertThat(transition).hasProgress(1.5f)
+ }
+
+ @Test
+ fun customizeStlNestedScrollBehavior_DuringTransitionBetweenScenes() {
+ var canScroll = true
+ val state = setup2ScenesAndScrollTouchSlop {
+ Modifier.verticalNestedScrollToScene(
+ bottomBehavior = NestedScrollBehavior.DuringTransitionBetweenScenes
+ )
+ .scrollable(rememberScrollableState { if (canScroll) it else 0f }, Vertical)
+ }
+
+ scrollUp(percent = 0.5f)
+ assertThat(state.transitionState).isIdle()
+
+ // Reach the end of the scrollable element
+ canScroll = false
+ scrollUp(percent = 0.5f)
+ assertThat(state.transitionState).isIdle()
+
+ pointerUp()
+ assertThat(state.transitionState).isIdle()
+
+ // Start a new gesture
+ pointerDownAndScrollTouchSlop()
+ scrollUp(percent = 0.5f)
+ assertThat(state.transitionState).isIdle()
+ }
+
+ @Test
+ fun customizeStlNestedScrollBehavior_EdgeNoPreview() {
+ var canScroll = true
+ val state = setup2ScenesAndScrollTouchSlop {
+ Modifier.verticalNestedScrollToScene(
+ bottomBehavior = NestedScrollBehavior.EdgeNoPreview
+ )
+ .scrollable(rememberScrollableState { if (canScroll) it else 0f }, Vertical)
+ }
+
+ scrollUp(percent = 0.5f)
+ assertThat(state.transitionState).isIdle()
+
+ // Reach the end of the scrollable element
+ canScroll = false
+ scrollUp(percent = 0.5f)
+ assertThat(state.transitionState).isIdle()
+
+ pointerUp()
+ assertThat(state.transitionState).isIdle()
+
+ // Start a new gesture
+ pointerDownAndScrollTouchSlop()
+ scrollUp(percent = 0.5f)
+ val transition = assertThat(state.transitionState).isTransition()
+ assertThat(transition).hasProgress(0.5f)
+
+ pointerUp()
+ rule.waitForIdle()
+ assertThat(state.transitionState).isIdle()
+ assertThat(state.transitionState).hasCurrentScene(SceneB)
+ }
+
+ @Test
+ fun customizeStlNestedScrollBehavior_EdgeWithPreview() {
+ var canScroll = true
+ val state = setup2ScenesAndScrollTouchSlop {
+ Modifier.verticalNestedScrollToScene(
+ bottomBehavior = NestedScrollBehavior.EdgeWithPreview
+ )
+ .scrollable(rememberScrollableState { if (canScroll) it else 0f }, Vertical)
+ }
+
+ scrollUp(percent = 0.5f)
+ assertThat(state.transitionState).isIdle()
+
+ // Reach the end of the scrollable element
+ canScroll = false
+ scrollUp(percent = 0.5f)
+ val transition1 = assertThat(state.transitionState).isTransition()
+ assertThat(transition1).hasProgress(0.5f)
+
+ pointerUp()
+ rule.waitForIdle()
+ assertThat(state.transitionState).isIdle()
+ assertThat(state.transitionState).hasCurrentScene(SceneA)
+
+ // Start a new gesture
+ pointerDownAndScrollTouchSlop()
+ scrollUp(percent = 0.5f)
+ val transition2 = assertThat(state.transitionState).isTransition()
+ assertThat(transition2).hasProgress(0.5f)
+
+ pointerUp()
+ rule.waitForIdle()
+ assertThat(state.transitionState).isIdle()
+ assertThat(state.transitionState).hasCurrentScene(SceneB)
+ }
+
+ @Test
+ fun customizeStlNestedScrollBehavior_EdgeAlways() {
+ var canScroll = true
+ val state = setup2ScenesAndScrollTouchSlop {
+ Modifier.verticalNestedScrollToScene(bottomBehavior = NestedScrollBehavior.EdgeAlways)
+ .scrollable(rememberScrollableState { if (canScroll) it else 0f }, Vertical)
+ }
+
+ scrollUp(percent = 0.5f)
+ assertThat(state.transitionState).isIdle()
+
+ // Reach the end of the scrollable element
+ canScroll = false
+ scrollUp(percent = 0.5f)
+ val transition = assertThat(state.transitionState).isTransition()
+ assertThat(transition).hasProgress(0.5f)
+
+ pointerUp()
+ rule.waitForIdle()
+ assertThat(state.transitionState).isIdle()
+ assertThat(state.transitionState).hasCurrentScene(SceneB)
+ }
+
+ @Test
+ fun customizeStlNestedScrollBehavior_multipleRequests() {
+ val state = setup2ScenesAndScrollTouchSlop {
+ Modifier
+ // This verticalNestedScrollToScene is closer the STL (an ancestor node)
+ .verticalNestedScrollToScene(bottomBehavior = NestedScrollBehavior.EdgeAlways)
+ // Another verticalNestedScrollToScene modifier
+ .verticalNestedScrollToScene(
+ bottomBehavior = NestedScrollBehavior.DuringTransitionBetweenScenes
+ )
+ .scrollable(rememberScrollableState { 0f }, Vertical)
+ }
+
+ scrollUp(percent = 0.5f)
+ // EdgeAlways always consume the remaining scroll, DuringTransitionBetweenScenes does not.
+ val transition = assertThat(state.transitionState).isTransition()
+ assertThat(transition).hasProgress(0.5f)
+ }
+}
diff --git a/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/ObservableTransitionStateTest.kt b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/ObservableTransitionStateTest.kt
index 55431354b693..f717301dba38 100644
--- a/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/ObservableTransitionStateTest.kt
+++ b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/ObservableTransitionStateTest.kt
@@ -40,7 +40,13 @@ class ObservableTransitionStateTest {
@Test
fun testObservableTransitionState() = runTest {
- lateinit var state: SceneTransitionLayoutState
+ val state =
+ rule.runOnUiThread {
+ MutableSceneTransitionLayoutState(
+ SceneA,
+ EmptyTestTransitions,
+ )
+ }
// Collect the current observable state into [observableState].
// TODO(b/290184746): Use collectValues {} once it is extracted into a library that can be
@@ -63,16 +69,9 @@ class ObservableTransitionStateTest {
}
rule.testTransition(
- from = SceneA,
+ state = state,
to = SceneB,
- transitionLayout = { currentScene, onChangeScene ->
- state =
- updateSceneTransitionLayoutState(
- currentScene,
- onChangeScene,
- EmptyTestTransitions
- )
-
+ transitionLayout = {
SceneTransitionLayout(state = state) {
scene(SceneA) {}
scene(SceneB) {}
diff --git a/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/PredictiveBackHandlerTest.kt b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/PredictiveBackHandlerTest.kt
new file mode 100644
index 000000000000..6522eb33bd49
--- /dev/null
+++ b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/PredictiveBackHandlerTest.kt
@@ -0,0 +1,159 @@
+/*
+ * 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.compose.animation.scene
+
+import androidx.activity.BackEventCompat
+import androidx.activity.ComponentActivity
+import androidx.compose.foundation.layout.Box
+import androidx.compose.foundation.layout.fillMaxSize
+import androidx.compose.runtime.rememberCoroutineScope
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.test.junit4.createAndroidComposeRule
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import com.android.compose.animation.scene.TestScenes.SceneA
+import com.android.compose.animation.scene.TestScenes.SceneB
+import com.android.compose.animation.scene.TestScenes.SceneC
+import com.android.compose.animation.scene.subjects.assertThat
+import com.google.common.truth.Truth.assertThat
+import kotlinx.coroutines.CoroutineScope
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+
+@RunWith(AndroidJUnit4::class)
+class PredictiveBackHandlerTest {
+ // We use createAndroidComposeRule() here and not createComposeRule() because we need an
+ // activity for testBack().
+ @get:Rule val rule = createAndroidComposeRule<ComponentActivity>()
+
+ @Test
+ fun testBack() {
+ val layoutState = rule.runOnUiThread { MutableSceneTransitionLayoutState(SceneA) }
+ rule.setContent {
+ SceneTransitionLayout(layoutState) {
+ scene(SceneA, mapOf(Back to SceneB)) { Box(Modifier.fillMaxSize()) }
+ scene(SceneB) { Box(Modifier.fillMaxSize()) }
+ }
+ }
+
+ assertThat(layoutState.transitionState).hasCurrentScene(SceneA)
+
+ rule.runOnUiThread { rule.activity.onBackPressedDispatcher.onBackPressed() }
+ rule.waitForIdle()
+ assertThat(layoutState.transitionState).hasCurrentScene(SceneB)
+ }
+
+ @Test
+ fun testPredictiveBack() {
+ val layoutState = rule.runOnUiThread { MutableSceneTransitionLayoutState(SceneA) }
+ rule.setContent {
+ SceneTransitionLayout(layoutState) {
+ scene(SceneA, mapOf(Back to SceneB)) { Box(Modifier.fillMaxSize()) }
+ scene(SceneB) { Box(Modifier.fillMaxSize()) }
+ }
+ }
+
+ assertThat(layoutState.transitionState).hasCurrentScene(SceneA)
+
+ // Start back.
+ val dispatcher = rule.activity.onBackPressedDispatcher
+ rule.runOnUiThread {
+ dispatcher.dispatchOnBackStarted(backEvent())
+ dispatcher.dispatchOnBackProgressed(backEvent(progress = 0.4f))
+ }
+
+ val transition = assertThat(layoutState.transitionState).isTransition()
+ assertThat(transition).hasFromScene(SceneA)
+ assertThat(transition).hasToScene(SceneB)
+ assertThat(transition).hasProgress(0.4f)
+
+ // Cancel it.
+ rule.runOnUiThread { dispatcher.dispatchOnBackCancelled() }
+ rule.waitForIdle()
+ assertThat(layoutState.transitionState).hasCurrentScene(SceneA)
+ assertThat(layoutState.transitionState).isIdle()
+
+ // Start again and commit it.
+ rule.runOnUiThread {
+ dispatcher.dispatchOnBackStarted(backEvent())
+ dispatcher.dispatchOnBackProgressed(backEvent(progress = 0.4f))
+ dispatcher.onBackPressed()
+ }
+ rule.waitForIdle()
+ assertThat(layoutState.transitionState).hasCurrentScene(SceneB)
+ assertThat(layoutState.transitionState).isIdle()
+ }
+
+ @Test
+ fun interruptedPredictiveBackDoesNotCallCanChangeScene() {
+ var canChangeSceneCalled = false
+ val layoutState =
+ rule.runOnUiThread {
+ MutableSceneTransitionLayoutState(
+ SceneA,
+ canChangeScene = {
+ canChangeSceneCalled = true
+ true
+ },
+ )
+ }
+
+ lateinit var coroutineScope: CoroutineScope
+ rule.setContent {
+ coroutineScope = rememberCoroutineScope()
+ SceneTransitionLayout(layoutState) {
+ scene(SceneA, mapOf(Back to SceneB)) { Box(Modifier.fillMaxSize()) }
+ scene(SceneB) { Box(Modifier.fillMaxSize()) }
+ scene(SceneC) { Box(Modifier.fillMaxSize()) }
+ }
+ }
+
+ assertThat(layoutState.transitionState).hasCurrentScene(SceneA)
+
+ // Start back.
+ val dispatcher = rule.activity.onBackPressedDispatcher
+ rule.runOnUiThread { dispatcher.dispatchOnBackStarted(backEvent()) }
+
+ val predictiveTransition = assertThat(layoutState.transitionState).isTransition()
+ assertThat(predictiveTransition).hasFromScene(SceneA)
+ assertThat(predictiveTransition).hasToScene(SceneB)
+
+ // Start a new transition to C.
+ rule.runOnUiThread { layoutState.setTargetScene(SceneC, coroutineScope) }
+ val newTransition = assertThat(layoutState.transitionState).isTransition()
+ assertThat(newTransition).hasFromScene(SceneA)
+ assertThat(newTransition).hasToScene(SceneC)
+
+ // Commit the back gesture. It shouldn't call canChangeScene given that the back transition
+ // was interrupted.
+ rule.runOnUiThread { dispatcher.onBackPressed() }
+ rule.waitForIdle()
+ assertThat(layoutState.transitionState).hasCurrentScene(SceneC)
+ assertThat(layoutState.transitionState).isIdle()
+ assertThat(predictiveTransition).hasCurrentScene(SceneA)
+ assertThat(canChangeSceneCalled).isFalse()
+ }
+
+ private fun backEvent(progress: Float = 0f): BackEventCompat {
+ return BackEventCompat(
+ touchX = 0f,
+ touchY = 0f,
+ progress = progress,
+ swipeEdge = BackEventCompat.EDGE_LEFT,
+ )
+ }
+}
diff --git a/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/SceneTransitionLayoutStateTest.kt b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/SceneTransitionLayoutStateTest.kt
index 41bf630e9ae4..52cceecadbf9 100644
--- a/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/SceneTransitionLayoutStateTest.kt
+++ b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/SceneTransitionLayoutStateTest.kt
@@ -153,7 +153,7 @@ class SceneTransitionLayoutStateTest {
sourceTo: SceneKey? = SceneB,
targetFrom: SceneKey? = SceneC,
targetTo: SceneKey = SceneD
- ): Pair<BaseSceneTransitionLayoutState, BaseSceneTransitionLayoutState> {
+ ): Pair<MutableSceneTransitionLayoutStateImpl, MutableSceneTransitionLayoutStateImpl> {
val parentState = MutableSceneTransitionLayoutState(parentInitialScene)
val link =
listOf(
@@ -164,8 +164,8 @@ class SceneTransitionLayoutStateTest {
)
val childState = MutableSceneTransitionLayoutState(childInitialScene, stateLinks = link)
return Pair(
- parentState as BaseSceneTransitionLayoutState,
- childState as BaseSceneTransitionLayoutState
+ parentState as MutableSceneTransitionLayoutStateImpl,
+ childState as MutableSceneTransitionLayoutStateImpl
)
}
@@ -187,7 +187,7 @@ class SceneTransitionLayoutStateTest {
@Test
fun linkedTransition_transitiveLink() {
val parentParentState =
- MutableSceneTransitionLayoutState(SceneB) as BaseSceneTransitionLayoutState
+ MutableSceneTransitionLayoutState(SceneB) as MutableSceneTransitionLayoutStateImpl
val parentLink =
listOf(
StateLink(
@@ -197,7 +197,7 @@ class SceneTransitionLayoutStateTest {
)
val parentState =
MutableSceneTransitionLayoutState(SceneC, stateLinks = parentLink)
- as BaseSceneTransitionLayoutState
+ as MutableSceneTransitionLayoutStateImpl
val link =
listOf(
StateLink(
@@ -207,7 +207,7 @@ class SceneTransitionLayoutStateTest {
)
val childState =
MutableSceneTransitionLayoutState(SceneA, stateLinks = link)
- as BaseSceneTransitionLayoutState
+ as MutableSceneTransitionLayoutStateImpl
val childTransition = transition(SceneA, SceneB)
diff --git a/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/SceneTransitionLayoutTest.kt b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/SceneTransitionLayoutTest.kt
index 1c8efb82fd24..1ec10793363e 100644
--- a/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/SceneTransitionLayoutTest.kt
+++ b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/SceneTransitionLayoutTest.kt
@@ -16,8 +16,6 @@
package com.android.compose.animation.scene
-import androidx.activity.BackEventCompat
-import androidx.activity.ComponentActivity
import androidx.compose.animation.core.FastOutSlowInEasing
import androidx.compose.animation.core.LinearEasing
import androidx.compose.animation.core.tween
@@ -31,6 +29,8 @@ import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
+import androidx.compose.runtime.remember
+import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
@@ -41,7 +41,7 @@ import androidx.compose.ui.test.assertHeightIsEqualTo
import androidx.compose.ui.test.assertIsDisplayed
import androidx.compose.ui.test.assertPositionInRootIsEqualTo
import androidx.compose.ui.test.assertWidthIsEqualTo
-import androidx.compose.ui.test.junit4.createAndroidComposeRule
+import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.test.onChild
import androidx.compose.ui.test.onNodeWithTag
import androidx.compose.ui.test.onNodeWithText
@@ -58,6 +58,7 @@ import com.android.compose.test.assertSizeIsEqualTo
import com.android.compose.test.subjects.DpOffsetSubject
import com.android.compose.test.subjects.assertThat
import com.google.common.truth.Truth.assertThat
+import kotlinx.coroutines.CoroutineScope
import org.junit.Assert.assertThrows
import org.junit.Rule
import org.junit.Test
@@ -69,23 +70,27 @@ class SceneTransitionLayoutTest {
private val LayoutSize = 300.dp
}
- private var currentScene by mutableStateOf(SceneA)
- private lateinit var layoutState: SceneTransitionLayoutState
+ private lateinit var coroutineScope: CoroutineScope
+ private lateinit var layoutState: MutableSceneTransitionLayoutState
+ private var currentScene: SceneKey
+ get() = layoutState.transitionState.currentScene
+ set(value) {
+ rule.runOnUiThread { layoutState.setTargetScene(value, coroutineScope) }
+ }
- // We use createAndroidComposeRule() here and not createComposeRule() because we need an
- // activity for testBack().
- @get:Rule val rule = createAndroidComposeRule<ComponentActivity>()
+ @get:Rule val rule = createComposeRule()
/** The content under test. */
@Composable
private fun TestContent(enableInterruptions: Boolean = true) {
- layoutState =
- updateSceneTransitionLayoutState(
- currentScene,
- { currentScene = it },
+ coroutineScope = rememberCoroutineScope()
+ layoutState = remember {
+ MutableSceneTransitionLayoutState(
+ SceneA,
EmptyTestTransitions,
enableInterruptions = enableInterruptions,
)
+ }
SceneTransitionLayout(
state = layoutState,
@@ -164,52 +169,6 @@ class SceneTransitionLayoutTest {
}
@Test
- fun testBack() {
- rule.setContent { TestContent() }
-
- assertThat(layoutState.transitionState).hasCurrentScene(SceneA)
-
- rule.runOnUiThread { rule.activity.onBackPressedDispatcher.onBackPressed() }
- rule.waitForIdle()
- assertThat(layoutState.transitionState).hasCurrentScene(SceneB)
- }
-
- @Test
- fun testPredictiveBack() {
- rule.setContent { TestContent() }
-
- assertThat(layoutState.transitionState).hasCurrentScene(SceneA)
-
- // Start back.
- val dispatcher = rule.activity.onBackPressedDispatcher
- rule.runOnUiThread {
- dispatcher.dispatchOnBackStarted(backEvent())
- dispatcher.dispatchOnBackProgressed(backEvent(progress = 0.4f))
- }
-
- val transition = assertThat(layoutState.transitionState).isTransition()
- assertThat(transition).hasFromScene(SceneA)
- assertThat(transition).hasToScene(SceneB)
- assertThat(transition).hasProgress(0.4f)
-
- // Cancel it.
- rule.runOnUiThread { dispatcher.dispatchOnBackCancelled() }
- rule.waitForIdle()
- assertThat(layoutState.transitionState).hasCurrentScene(SceneA)
- assertThat(layoutState.transitionState).isIdle()
-
- // Start again and commit it.
- rule.runOnUiThread {
- dispatcher.dispatchOnBackStarted(backEvent())
- dispatcher.dispatchOnBackProgressed(backEvent(progress = 0.4f))
- dispatcher.onBackPressed()
- }
- rule.waitForIdle()
- assertThat(layoutState.transitionState).hasCurrentScene(SceneB)
- assertThat(layoutState.transitionState).isIdle()
- }
-
- @Test
fun testTransitionState() {
rule.setContent { TestContent() }
assertThat(layoutState.transitionState).isIdle()
@@ -218,23 +177,15 @@ class SceneTransitionLayoutTest {
// We will advance the clock manually.
rule.mainClock.autoAdvance = false
- // Change the current scene. Until composition is triggered, this won't change the layout
- // state.
+ // Change the current scene.
currentScene = SceneB
- assertThat(layoutState.transitionState).isIdle()
- assertThat(layoutState.transitionState).hasCurrentScene(SceneA)
-
- // On the next frame, we will recompose because currentScene changed, which will start the
- // transition (i.e. it will change the transitionState to be a Transition) in a
- // LaunchedEffect.
- rule.mainClock.advanceTimeByFrame()
val transition = assertThat(layoutState.transitionState).isTransition()
assertThat(transition).hasFromScene(SceneA)
assertThat(transition).hasToScene(SceneB)
assertThat(transition).hasProgress(0f)
// Then, on the next frame, the animator we started gets its initial value and clock
- // starting time. We are now at progress = 0f.
+ // starting time. We are still at progress = 0f.
rule.mainClock.advanceTimeByFrame()
assertThat(transition).hasProgress(0f)
@@ -275,12 +226,9 @@ class SceneTransitionLayoutTest {
// Pause animations to test the state mid-transition.
rule.mainClock.autoAdvance = false
- // Go to scene B and let the animation start. See [testLayoutState()] and
- // [androidx.compose.ui.test.MainTestClock] to understand why we need to advance the clock
- // by 2 frames to be at the start of the animation.
+ // Go to scene B and let the animation start.
currentScene = SceneB
rule.mainClock.advanceTimeByFrame()
- rule.mainClock.advanceTimeByFrame()
// Advance to the middle of the animation.
rule.mainClock.advanceTimeBy(TestTransitionDuration / 2)
@@ -311,7 +259,6 @@ class SceneTransitionLayoutTest {
// Animate to scene C, let the animation start then go to the middle of the transition.
currentScene = SceneC
rule.mainClock.advanceTimeByFrame()
- rule.mainClock.advanceTimeByFrame()
rule.mainClock.advanceTimeBy(TestTransitionDuration / 2)
// In Scene C, foo is at the bottom start of the layout and has a size of 150.dp. The
@@ -409,24 +356,24 @@ class SceneTransitionLayoutTest {
fun multipleTransitionsWillComposeMultipleScenes() {
val duration = 10 * 16L
- var currentScene: SceneKey by mutableStateOf(SceneA)
- lateinit var state: SceneTransitionLayoutState
- rule.setContent {
- state =
- updateSceneTransitionLayoutState(
- currentScene = currentScene,
- onChangeScene = { currentScene = it },
- transitions =
- transitions {
- from(SceneA, to = SceneB) {
- spec = tween(duration.toInt(), easing = LinearEasing)
- }
- from(SceneB, to = SceneC) {
- spec = tween(duration.toInt(), easing = LinearEasing)
- }
+ val state =
+ rule.runOnUiThread {
+ MutableSceneTransitionLayoutState(
+ SceneA,
+ transitions {
+ from(SceneA, to = SceneB) {
+ spec = tween(duration.toInt(), easing = LinearEasing)
}
+ from(SceneB, to = SceneC) {
+ spec = tween(duration.toInt(), easing = LinearEasing)
+ }
+ }
)
+ }
+ lateinit var coroutineScope: CoroutineScope
+ rule.setContent {
+ coroutineScope = rememberCoroutineScope()
SceneTransitionLayout(state) {
scene(SceneA) { Box(Modifier.testTag("aRoot").fillMaxSize()) }
scene(SceneB) { Box(Modifier.testTag("bRoot").fillMaxSize()) }
@@ -444,12 +391,11 @@ class SceneTransitionLayoutTest {
rule.mainClock.autoAdvance = false
// Start A => B and go to the middle of the transition.
- currentScene = SceneB
+ rule.runOnUiThread { state.setTargetScene(SceneB, coroutineScope) }
- // We need to tick 2 frames after changing [currentScene] before the animation actually
+ // We need to tick 1 frames after changing [currentScene] before the animation actually
// starts.
rule.mainClock.advanceTimeByFrame()
- rule.mainClock.advanceTimeByFrame()
rule.mainClock.advanceTimeBy(duration / 2)
rule.waitForIdle()
@@ -462,8 +408,7 @@ class SceneTransitionLayoutTest {
rule.onNodeWithTag("cRoot").assertDoesNotExist()
// Start B => C.
- currentScene = SceneC
- rule.mainClock.advanceTimeByFrame()
+ rule.runOnUiThread { state.setTargetScene(SceneC, coroutineScope) }
rule.mainClock.advanceTimeByFrame()
rule.waitForIdle()
@@ -517,12 +462,7 @@ class SceneTransitionLayoutTest {
assertThrows(IllegalStateException::class.java) {
rule.setContent {
SceneTransitionLayout(
- state =
- updateSceneTransitionLayoutState(
- currentScene = currentScene,
- onChangeScene = { currentScene = it },
- transitions = EmptyTestTransitions
- ),
+ state = remember { MutableSceneTransitionLayoutState(SceneA) },
modifier = Modifier.size(LayoutSize),
) {
// from SceneA to SceneA
@@ -560,13 +500,4 @@ class SceneTransitionLayoutTest {
assertThat(keyInB).isEqualTo(SceneB)
assertThat(keyInC).isEqualTo(SceneC)
}
-
- private fun backEvent(progress: Float = 0f): BackEventCompat {
- return BackEventCompat(
- touchX = 0f,
- touchY = 0f,
- progress = progress,
- swipeEdge = BackEventCompat.EDGE_LEFT,
- )
- }
}
diff --git a/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/SwipeToSceneTest.kt b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/SwipeToSceneTest.kt
index 25ea2eef85e9..0766e00bfccc 100644
--- a/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/SwipeToSceneTest.kt
+++ b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/SwipeToSceneTest.kt
@@ -23,11 +23,13 @@ import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.offset
import androidx.compose.foundation.layout.size
import androidx.compose.runtime.Composable
+import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.geometry.Offset
+import androidx.compose.ui.platform.LocalLayoutDirection
import androidx.compose.ui.platform.LocalViewConfiguration
import androidx.compose.ui.platform.testTag
import androidx.compose.ui.test.assertPositionInRootIsEqualTo
@@ -37,10 +39,12 @@ import androidx.compose.ui.test.performTouchInput
import androidx.compose.ui.test.swipeWithVelocity
import androidx.compose.ui.unit.Density
import androidx.compose.ui.unit.IntSize
+import androidx.compose.ui.unit.LayoutDirection
import androidx.compose.ui.unit.dp
import androidx.test.ext.junit.runners.AndroidJUnit4
import com.android.compose.animation.scene.TestScenes.SceneA
import com.android.compose.animation.scene.TestScenes.SceneB
+import com.android.compose.animation.scene.TestScenes.SceneC
import com.android.compose.animation.scene.subjects.assertThat
import com.google.common.truth.Truth.assertThat
import org.junit.Rule
@@ -634,4 +638,152 @@ class SwipeToSceneTest {
// Foo should be translated by (20dp, 30dp).
rule.onNode(isElement(TestElements.Foo)).assertPositionInRootIsEqualTo(20.dp, 30.dp)
}
+
+ @Test
+ fun startEnd_ltrLayout() {
+ val state =
+ rule.runOnUiThread {
+ MutableSceneTransitionLayoutState(
+ initialScene = SceneA,
+ transitions =
+ transitions {
+ from(SceneA, to = SceneB) {
+ // We go to B by swiping to the start (left in LTR), so we make
+ // scene B appear from the end (right) edge.
+ translate(SceneB.rootElementKey, Edge.End)
+ }
+
+ from(SceneA, to = SceneC) {
+ // We go to C by swiping to the end (right in LTR), so we make
+ // scene C appear from the start (left) edge.
+ translate(SceneC.rootElementKey, Edge.Start)
+ }
+ },
+ )
+ }
+
+ val layoutSize = 200.dp
+ var touchSlop = 0f
+ rule.setContent {
+ touchSlop = LocalViewConfiguration.current.touchSlop
+ SceneTransitionLayout(state, Modifier.size(layoutSize)) {
+ scene(SceneA, userActions = mapOf(Swipe.Start to SceneB, Swipe.End to SceneC)) {
+ Box(Modifier.fillMaxSize())
+ }
+ scene(SceneB) { Box(Modifier.element(SceneB.rootElementKey).fillMaxSize()) }
+ scene(SceneC) { Box(Modifier.element(SceneC.rootElementKey).fillMaxSize()) }
+ }
+ }
+
+ // Swipe to the left (start).
+ rule.onRoot().performTouchInput {
+ val middle = (layoutSize / 2).toPx()
+ down(Offset(middle, middle))
+ moveBy(Offset(-touchSlop, 0f), delayMillis = 1_000)
+ }
+
+ // Scene B should come from the right (end) edge.
+ var transition = assertThat(state.transitionState).isTransition()
+ assertThat(transition).hasFromScene(SceneA)
+ assertThat(transition).hasToScene(SceneB)
+ rule
+ .onNode(isElement(SceneB.rootElementKey))
+ .assertPositionInRootIsEqualTo(layoutSize, 0.dp)
+
+ // Release to go back to A.
+ rule.onRoot().performTouchInput { up() }
+ rule.waitForIdle()
+ assertThat(state.transitionState).isIdle()
+ assertThat(state.transitionState).hasCurrentScene(SceneA)
+
+ // Swipe to the right (end).
+ rule.onRoot().performTouchInput {
+ val middle = (layoutSize / 2).toPx()
+ down(Offset(middle, middle))
+ moveBy(Offset(touchSlop, 0f), delayMillis = 1_000)
+ }
+
+ // Scene C should come from the left (start) edge.
+ transition = assertThat(state.transitionState).isTransition()
+ assertThat(transition).hasFromScene(SceneA)
+ assertThat(transition).hasToScene(SceneC)
+ rule
+ .onNode(isElement(SceneC.rootElementKey))
+ .assertPositionInRootIsEqualTo(-layoutSize, 0.dp)
+ }
+
+ @Test
+ fun startEnd_rtlLayout() {
+ val state =
+ rule.runOnUiThread {
+ MutableSceneTransitionLayoutState(
+ initialScene = SceneA,
+ transitions =
+ transitions {
+ from(SceneA, to = SceneB) {
+ // We go to B by swiping to the start (right in RTL), so we make
+ // scene B appear from the end (left) edge.
+ translate(SceneB.rootElementKey, Edge.End)
+ }
+
+ from(SceneA, to = SceneC) {
+ // We go to C by swiping to the end (left in RTL), so we make
+ // scene C appear from the start (right) edge.
+ translate(SceneC.rootElementKey, Edge.Start)
+ }
+ },
+ )
+ }
+
+ val layoutSize = 200.dp
+ var touchSlop = 0f
+ rule.setContent {
+ touchSlop = LocalViewConfiguration.current.touchSlop
+ CompositionLocalProvider(LocalLayoutDirection provides LayoutDirection.Rtl) {
+ SceneTransitionLayout(state, Modifier.size(layoutSize)) {
+ scene(SceneA, userActions = mapOf(Swipe.Start to SceneB, Swipe.End to SceneC)) {
+ Box(Modifier.fillMaxSize())
+ }
+ scene(SceneB) { Box(Modifier.element(SceneB.rootElementKey).fillMaxSize()) }
+ scene(SceneC) { Box(Modifier.element(SceneC.rootElementKey).fillMaxSize()) }
+ }
+ }
+ }
+
+ // Swipe to the left (end).
+ rule.onRoot().performTouchInput {
+ val middle = (layoutSize / 2).toPx()
+ down(Offset(middle, middle))
+ moveBy(Offset(-touchSlop, 0f), delayMillis = 1_000)
+ }
+
+ // Scene C should come from the right (start) edge.
+ var transition = assertThat(state.transitionState).isTransition()
+ assertThat(transition).hasFromScene(SceneA)
+ assertThat(transition).hasToScene(SceneC)
+ rule
+ .onNode(isElement(SceneC.rootElementKey))
+ .assertPositionInRootIsEqualTo(layoutSize, 0.dp)
+
+ // Release to go back to A.
+ rule.onRoot().performTouchInput { up() }
+ rule.waitForIdle()
+ assertThat(state.transitionState).isIdle()
+ assertThat(state.transitionState).hasCurrentScene(SceneA)
+
+ // Swipe to the right (start).
+ rule.onRoot().performTouchInput {
+ val middle = (layoutSize / 2).toPx()
+ down(Offset(middle, middle))
+ moveBy(Offset(touchSlop, 0f), delayMillis = 1_000)
+ }
+
+ // Scene C should come from the left (end) edge.
+ transition = assertThat(state.transitionState).isTransition()
+ assertThat(transition).hasFromScene(SceneA)
+ assertThat(transition).hasToScene(SceneB)
+ rule
+ .onNode(isElement(SceneB.rootElementKey))
+ .assertPositionInRootIsEqualTo(-layoutSize, 0.dp)
+ }
}
diff --git a/packages/SystemUI/compose/scene/tests/utils/src/com/android/compose/animation/scene/TestSceneScope.kt b/packages/SystemUI/compose/scene/tests/utils/src/com/android/compose/animation/scene/TestSceneScope.kt
index de46f7209c84..fbd557f3cbb3 100644
--- a/packages/SystemUI/compose/scene/tests/utils/src/com/android/compose/animation/scene/TestSceneScope.kt
+++ b/packages/SystemUI/compose/scene/tests/utils/src/com/android/compose/animation/scene/TestSceneScope.kt
@@ -27,12 +27,6 @@ fun TestSceneScope(
content: @Composable SceneScope.() -> Unit,
) {
val currentScene = remember { SceneKey("current") }
- SceneTransitionLayout(
- currentScene,
- onChangeScene = { /* do nothing */},
- transitions = remember { transitions {} },
- modifier,
- ) {
- scene(currentScene, content = content)
- }
+ val state = remember { MutableSceneTransitionLayoutState(currentScene) }
+ SceneTransitionLayout(state, modifier) { scene(currentScene, content = content) }
}
diff --git a/packages/SystemUI/compose/scene/tests/utils/src/com/android/compose/animation/scene/TestTransition.kt b/packages/SystemUI/compose/scene/tests/utils/src/com/android/compose/animation/scene/TestTransition.kt
index 6724851dbec5..a37d78ef8a71 100644
--- a/packages/SystemUI/compose/scene/tests/utils/src/com/android/compose/animation/scene/TestTransition.kt
+++ b/packages/SystemUI/compose/scene/tests/utils/src/com/android/compose/animation/scene/TestTransition.kt
@@ -19,13 +19,14 @@ package com.android.compose.animation.scene
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
-import androidx.compose.runtime.mutableStateOf
+import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.semantics.SemanticsNode
import androidx.compose.ui.test.SemanticsNodeInteraction
import androidx.compose.ui.test.SemanticsNodeInteractionsProvider
import androidx.compose.ui.test.junit4.ComposeContentTestRule
+import kotlinx.coroutines.CoroutineScope
import platform.test.motion.MotionTestRule
import platform.test.motion.RecordedMotion
import platform.test.motion.compose.ComposeRecordingSpec
@@ -95,20 +96,24 @@ fun ComposeContentTestRule.testTransition(
builder: TransitionTestBuilder.() -> Unit,
) {
testTransition(
- from = fromScene,
+ state =
+ runOnUiThread {
+ MutableSceneTransitionLayoutState(
+ fromScene,
+ transitions { from(fromScene, to = toScene, builder = transition) }
+ )
+ },
to = toScene,
- transitionLayout = { currentScene, onChangeScene ->
+ transitionLayout = { state ->
SceneTransitionLayout(
- currentScene,
- onChangeScene,
- transitions { from(fromScene, to = toScene, builder = transition) },
+ state,
layoutModifier,
) {
scene(fromScene, content = fromSceneContent)
scene(toScene, content = toSceneContent)
}
},
- builder,
+ builder = builder,
)
}
@@ -172,21 +177,19 @@ fun MotionTestRule<ComposeToolkit>.recordTransition(
)
}
-/**
- * Test the transition between two scenes of [transitionLayout][SceneTransitionLayout] at different
- * points in time.
- */
+/** Test the transition from [state] to [to]. */
fun ComposeContentTestRule.testTransition(
- from: SceneKey,
+ state: MutableSceneTransitionLayoutState,
to: SceneKey,
- transitionLayout:
- @Composable
- (
- currentScene: SceneKey,
- onChangeScene: (SceneKey) -> Unit,
- ) -> Unit,
+ transitionLayout: @Composable (state: MutableSceneTransitionLayoutState) -> Unit,
builder: TransitionTestBuilder.() -> Unit,
) {
+ val currentScene = state.transitionState.currentScene
+ check(currentScene != to) {
+ "The 'to' scene (${to.debugName}) should be different from the state current scene " +
+ "(${currentScene.debugName})"
+ }
+
val test = transitionTest(builder)
val assertionScope =
object : TransitionTestAssertionScope {
@@ -198,8 +201,11 @@ fun ComposeContentTestRule.testTransition(
}
}
- var currentScene by mutableStateOf(from)
- setContent { transitionLayout(currentScene, { currentScene = it }) }
+ lateinit var coroutineScope: CoroutineScope
+ setContent {
+ coroutineScope = rememberCoroutineScope()
+ transitionLayout(state)
+ }
// Wait for the UI to be idle then test the before state.
waitForIdle()
@@ -209,14 +215,8 @@ fun ComposeContentTestRule.testTransition(
mainClock.autoAdvance = false
// Change the current scene.
- currentScene = to
-
- // Advance by a frame to trigger recomposition, which will start the transition (i.e. it will
- // change the transitionState to be a Transition) in a LaunchedEffect.
- mainClock.advanceTimeByFrame()
-
- // Advance by another frame so that the animator we started gets its initial value and clock
- // starting time. We are now at progress = 0f.
+ runOnUiThread { state.setTargetScene(to, coroutineScope) }
+ waitForIdle()
mainClock.advanceTimeByFrame()
waitForIdle()
diff --git a/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/ClockRegistry.kt b/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/ClockRegistry.kt
index 51c008ab686a..9b725eb9eb5a 100644
--- a/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/ClockRegistry.kt
+++ b/packages/SystemUI/customization/src/com/android/systemui/shared/clocks/ClockRegistry.kt
@@ -17,7 +17,6 @@ import android.app.ActivityManager
import android.app.UserSwitchObserver
import android.content.Context
import android.database.ContentObserver
-import android.graphics.drawable.Drawable
import android.net.Uri
import android.os.UserHandle
import android.provider.Settings
@@ -33,6 +32,7 @@ import com.android.systemui.plugins.clocks.ClockController
import com.android.systemui.plugins.clocks.ClockId
import com.android.systemui.plugins.clocks.ClockMessageBuffers
import com.android.systemui.plugins.clocks.ClockMetadata
+import com.android.systemui.plugins.clocks.ClockPickerConfig
import com.android.systemui.plugins.clocks.ClockProvider
import com.android.systemui.plugins.clocks.ClockProviderPlugin
import com.android.systemui.plugins.clocks.ClockSettings
@@ -341,6 +341,7 @@ open class ClockRegistry(
}
private var isClockChanged = AtomicBoolean(false)
+
private fun triggerOnCurrentClockChanged() {
val shouldSchedule = isClockChanged.compareAndSet(false, true)
if (!shouldSchedule) {
@@ -355,6 +356,7 @@ open class ClockRegistry(
}
private var isClockListChanged = AtomicBoolean(false)
+
private fun triggerOnAvailableClocksChanged() {
val shouldSchedule = isClockListChanged.compareAndSet(false, true)
if (!shouldSchedule) {
@@ -458,6 +460,7 @@ open class ClockRegistry(
}
private var isQueued = AtomicBoolean(false)
+
fun verifyLoadedProviders() {
val shouldSchedule = isQueued.compareAndSet(false, true)
if (!shouldSchedule) {
@@ -565,8 +568,8 @@ open class ClockRegistry(
return availableClocks.map { (_, clock) -> clock.metadata }
}
- fun getClockThumbnail(clockId: ClockId): Drawable? =
- availableClocks[clockId]?.provider?.getClockThumbnail(clockId)
+ fun getClockPickerConfig(clockId: ClockId): ClockPickerConfig? =
+ availableClocks[clockId]?.provider?.getClockPickerConfig(clockId)
fun createExampleClock(clockId: ClockId): ClockController? = createClock(clockId)
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 20f87a059656..4802e3447eb2 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
@@ -15,13 +15,13 @@ package com.android.systemui.shared.clocks
import android.content.Context
import android.content.res.Resources
-import android.graphics.drawable.Drawable
import android.view.LayoutInflater
import com.android.systemui.customization.R
import com.android.systemui.plugins.clocks.ClockController
import com.android.systemui.plugins.clocks.ClockId
import com.android.systemui.plugins.clocks.ClockMessageBuffers
import com.android.systemui.plugins.clocks.ClockMetadata
+import com.android.systemui.plugins.clocks.ClockPickerConfig
import com.android.systemui.plugins.clocks.ClockProvider
import com.android.systemui.plugins.clocks.ClockSettings
@@ -60,12 +60,17 @@ class DefaultClockProvider(
)
}
- override fun getClockThumbnail(id: ClockId): Drawable? {
+ override fun getClockPickerConfig(id: ClockId): ClockPickerConfig {
if (id != DEFAULT_CLOCK_ID) {
throw IllegalArgumentException("$id is unsupported by $TAG")
}
- // TODO: Update placeholder to actual resource
- return resources.getDrawable(R.drawable.clock_default_thumbnail, null)
+ return ClockPickerConfig(
+ DEFAULT_CLOCK_ID,
+ resources.getString(R.string.clock_default_name),
+ resources.getString(R.string.clock_default_description),
+ // TODO(b/352049256): Update placeholder to actual resource
+ resources.getDrawable(R.drawable.clock_default_thumbnail, null),
+ )
}
}
diff --git a/packages/SystemUI/lint-baseline.xml b/packages/SystemUI/lint-baseline.xml
index 525839de0a60..b4c839f08607 100644
--- a/packages/SystemUI/lint-baseline.xml
+++ b/packages/SystemUI/lint-baseline.xml
@@ -9168,39 +9168,6 @@
<issue
id="UnclosedTrace"
- message="The `beginSection()` call is not always closed with a matching `endSection()` because the code in between may return early"
- errorLine1=" Trace.beginSection(&quot;KeyguardViewMediator#handleKeyguardDone&quot;);"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="frameworks/base/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java"
- line="2654"
- column="15"/>
- </issue>
-
- <issue
- id="UnclosedTrace"
- message="The `beginSection()` call is not always closed with a matching `endSection()` because the code in between may return early"
- errorLine1=" Trace.beginSection(&quot;KeyguardViewMediator#handleShow&quot;);"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="frameworks/base/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java"
- line="2780"
- column="15"/>
- </issue>
-
- <issue
- id="UnclosedTrace"
- message="The `beginSection()` call is not always closed with a matching `endSection()` because the code in between may return early"
- errorLine1=" Trace.beginSection(&quot;KeyguardViewMediator#handleStartKeyguardExitAnimation&quot;);"
- errorLine2=" ~~~~~~~~~~~~">
- <location
- file="frameworks/base/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java"
- line="3011"
- column="15"/>
- </issue>
-
- <issue
- id="UnclosedTrace"
message="The `traceBegin()` call is not always closed with a matching `traceEnd()` because the code in between may return early"
errorLine1=" Trace.traceBegin(Trace.TRACE_TAG_APP, &quot;MediaControlPanel#bindPlayer&lt;&quot; + key + &quot;>&quot;);"
errorLine2=" ~~~~~~~~~~">
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/ambient/touch/ShadeTouchHandlerTest.java b/packages/SystemUI/multivalentTests/src/com/android/systemui/ambient/touch/ShadeTouchHandlerTest.java
deleted file mode 100644
index 07d889066438..000000000000
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/ambient/touch/ShadeTouchHandlerTest.java
+++ /dev/null
@@ -1,187 +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.systemui.ambient.touch;
-
-
-import static com.google.common.truth.Truth.assertThat;
-
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import android.app.DreamManager;
-import android.platform.test.annotations.DisableFlags;
-import android.platform.test.annotations.EnableFlags;
-import android.view.GestureDetector;
-import android.view.MotionEvent;
-
-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.shade.ShadeViewController;
-import com.android.systemui.shared.system.InputChannelCompat;
-import com.android.systemui.statusbar.phone.CentralSurfaces;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Captor;
-import org.mockito.Mock;
-import org.mockito.Mockito;
-import org.mockito.MockitoAnnotations;
-
-import java.util.Optional;
-
-@SmallTest
-@RunWith(AndroidJUnit4.class)
-public class ShadeTouchHandlerTest extends SysuiTestCase {
- @Mock
- CentralSurfaces mCentralSurfaces;
-
- @Mock
- ShadeViewController mShadeViewController;
-
- @Mock
- DreamManager mDreamManager;
-
- @Mock
- TouchHandler.TouchSession mTouchSession;
-
- ShadeTouchHandler mTouchHandler;
-
- @Captor
- ArgumentCaptor<GestureDetector.OnGestureListener> mGestureListenerCaptor;
- @Captor
- ArgumentCaptor<InputChannelCompat.InputEventListener> mInputListenerCaptor;
-
- private static final int TOUCH_HEIGHT = 20;
-
- @Before
- public void setup() {
- MockitoAnnotations.initMocks(this);
-
- mTouchHandler = new ShadeTouchHandler(Optional.of(mCentralSurfaces), mShadeViewController,
- mDreamManager, TOUCH_HEIGHT);
- }
-
- // Verifies that a swipe down in the gesture region is captured by the shade touch handler.
- @Test
- public void testSwipeDown_captured() {
- final boolean captured = swipe(Direction.DOWN);
-
- assertThat(captured).isTrue();
- }
-
- // Verifies that a swipe in the upward direction is not captured.
- @Test
- public void testSwipeUp_notCaptured() {
- final boolean captured = swipe(Direction.UP);
-
- // Motion events not captured as the swipe is going in the wrong direction.
- assertThat(captured).isFalse();
- }
-
- // Verifies that a swipe down forwards captured touches to central surfaces for handling.
- @Test
- @EnableFlags(Flags.FLAG_COMMUNAL_HUB)
- public void testSwipeDown_communalEnabled_sentToCentralSurfaces() {
- swipe(Direction.DOWN);
-
- // Both motion events are sent for central surfaces to process.
- verify(mCentralSurfaces, times(2)).handleExternalShadeWindowTouch(any());
- }
-
- // Verifies that a swipe down forwards captured touches to the shade view for handling.
- @Test
- @DisableFlags(Flags.FLAG_COMMUNAL_HUB)
- public void testSwipeDown_communalDisabled_sentToShadeView() {
- swipe(Direction.DOWN);
-
- // Both motion events are sent for the shade view to process.
- verify(mShadeViewController, times(2)).handleExternalTouch(any());
- }
-
- // Verifies that a swipe down while dreaming forwards captured touches to the shade view for
- // handling.
- @Test
- public void testSwipeDown_dreaming_sentToShadeView() {
- when(mDreamManager.isDreaming()).thenReturn(true);
-
- swipe(Direction.DOWN);
-
- // Both motion events are sent for the shade view to process.
- verify(mShadeViewController, times(2)).handleExternalTouch(any());
- }
-
- // Verifies that a swipe up is not forwarded to central surfaces.
- @Test
- @EnableFlags(Flags.FLAG_COMMUNAL_HUB)
- public void testSwipeUp_communalEnabled_touchesNotSent() {
- swipe(Direction.UP);
-
- // Motion events are not sent for central surfaces to process as the swipe is going in the
- // wrong direction.
- verify(mCentralSurfaces, never()).handleExternalShadeWindowTouch(any());
- }
-
- // Verifies that a swipe up is not forwarded to the shade view.
- @Test
- @DisableFlags(Flags.FLAG_COMMUNAL_HUB)
- public void testSwipeUp_communalDisabled_touchesNotSent() {
- swipe(Direction.UP);
-
- // Motion events are not sent for the shade view to process as the swipe is going in the
- // wrong direction.
- verify(mShadeViewController, never()).handleExternalTouch(any());
- }
-
- /**
- * Simulates a swipe in the given direction and returns true if the touch was intercepted by the
- * touch handler's gesture listener.
- * <p>
- * Swipe down starts from a Y coordinate of 0 and goes downward. Swipe up starts from the edge
- * of the gesture region, {@link #TOUCH_HEIGHT}, and goes upward to 0.
- */
- private boolean swipe(Direction direction) {
- Mockito.clearInvocations(mTouchSession);
- mTouchHandler.onSessionStart(mTouchSession);
-
- verify(mTouchSession).registerGestureListener(mGestureListenerCaptor.capture());
- verify(mTouchSession).registerInputListener(mInputListenerCaptor.capture());
-
- final float startY = direction == Direction.UP ? TOUCH_HEIGHT : 0;
- final float endY = direction == Direction.UP ? 0 : TOUCH_HEIGHT;
-
- // Send touches to the input and gesture listener.
- final MotionEvent event1 = MotionEvent.obtain(0, 0, MotionEvent.ACTION_MOVE, 0, startY, 0);
- final MotionEvent event2 = MotionEvent.obtain(0, 0, MotionEvent.ACTION_MOVE, 0, endY, 0);
- mInputListenerCaptor.getValue().onInputEvent(event1);
- mInputListenerCaptor.getValue().onInputEvent(event2);
- final boolean captured = mGestureListenerCaptor.getValue().onScroll(event1, event2, 0,
- startY - endY);
-
- return captured;
- }
-
- private enum Direction {
- DOWN, UP,
- }
-}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/ambient/touch/ShadeTouchHandlerTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/ambient/touch/ShadeTouchHandlerTest.kt
new file mode 100644
index 000000000000..7fd9ce20ab92
--- /dev/null
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/ambient/touch/ShadeTouchHandlerTest.kt
@@ -0,0 +1,188 @@
+/*
+ * 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.ambient.touch
+
+import android.app.DreamManager
+import android.platform.test.annotations.DisableFlags
+import android.platform.test.annotations.EnableFlags
+import android.view.GestureDetector
+import android.view.MotionEvent
+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.ambient.touch.TouchHandler.TouchSession
+import com.android.systemui.communal.domain.interactor.communalSettingsInteractor
+import com.android.systemui.flags.Flags.COMMUNAL_SERVICE_ENABLED
+import com.android.systemui.flags.fakeFeatureFlagsClassic
+import com.android.systemui.shade.ShadeViewController
+import com.android.systemui.shared.system.InputChannelCompat
+import com.android.systemui.statusbar.phone.CentralSurfaces
+import com.android.systemui.testKosmos
+import com.google.common.truth.Truth
+import java.util.Optional
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.kotlin.any
+import org.mockito.kotlin.argumentCaptor
+import org.mockito.kotlin.clearInvocations
+import org.mockito.kotlin.mock
+import org.mockito.kotlin.never
+import org.mockito.kotlin.times
+import org.mockito.kotlin.verify
+import org.mockito.kotlin.whenever
+
+@SmallTest
+@RunWith(AndroidJUnit4::class)
+class ShadeTouchHandlerTest : SysuiTestCase() {
+ private var kosmos = testKosmos()
+
+ private var mCentralSurfaces = mock<CentralSurfaces>()
+ private var mShadeViewController = mock<ShadeViewController>()
+ private var mDreamManager = mock<DreamManager>()
+ private var mTouchSession = mock<TouchSession>()
+
+ private lateinit var mTouchHandler: ShadeTouchHandler
+
+ private var mGestureListenerCaptor = argumentCaptor<GestureDetector.OnGestureListener>()
+ private var mInputListenerCaptor = argumentCaptor<InputChannelCompat.InputEventListener>()
+
+ @Before
+ fun setup() {
+ mTouchHandler =
+ ShadeTouchHandler(
+ Optional.of(mCentralSurfaces),
+ mShadeViewController,
+ mDreamManager,
+ kosmos.communalSettingsInteractor,
+ TOUCH_HEIGHT
+ )
+ }
+
+ // Verifies that a swipe down in the gesture region is captured by the shade touch handler.
+ @Test
+ fun testSwipeDown_captured() {
+ val captured = swipe(Direction.DOWN)
+ Truth.assertThat(captured).isTrue()
+ }
+
+ // Verifies that a swipe in the upward direction is not captured.
+ @Test
+ fun testSwipeUp_notCaptured() {
+ val captured = swipe(Direction.UP)
+
+ // Motion events not captured as the swipe is going in the wrong direction.
+ Truth.assertThat(captured).isFalse()
+ }
+
+ // Verifies that a swipe down forwards captured touches to central surfaces for handling.
+ @Test
+ @EnableFlags(Flags.FLAG_COMMUNAL_HUB)
+ fun testSwipeDown_communalEnabled_sentToCentralSurfaces() {
+ kosmos.fakeFeatureFlagsClassic.set(COMMUNAL_SERVICE_ENABLED, true)
+
+ swipe(Direction.DOWN)
+
+ // Both motion events are sent for central surfaces to process.
+ verify(mCentralSurfaces, times(2)).handleExternalShadeWindowTouch(any())
+ }
+
+ // Verifies that a swipe down forwards captured touches to the shade view for handling.
+ @Test
+ @DisableFlags(Flags.FLAG_COMMUNAL_HUB)
+ fun testSwipeDown_communalDisabled_sentToShadeView() {
+ swipe(Direction.DOWN)
+
+ // Both motion events are sent for the shade view to process.
+ verify(mShadeViewController, times(2)).handleExternalTouch(any())
+ }
+
+ // Verifies that a swipe down while dreaming forwards captured touches to the shade view for
+ // handling.
+ @Test
+ fun testSwipeDown_dreaming_sentToShadeView() {
+ whenever(mDreamManager.isDreaming).thenReturn(true)
+ swipe(Direction.DOWN)
+
+ // Both motion events are sent for the shade view to process.
+ verify(mShadeViewController, times(2)).handleExternalTouch(any())
+ }
+
+ // Verifies that a swipe up is not forwarded to central surfaces.
+ @Test
+ @EnableFlags(Flags.FLAG_COMMUNAL_HUB)
+ fun testSwipeUp_communalEnabled_touchesNotSent() {
+ kosmos.fakeFeatureFlagsClassic.set(COMMUNAL_SERVICE_ENABLED, true)
+
+ swipe(Direction.UP)
+
+ // Motion events are not sent for central surfaces to process as the swipe is going in the
+ // wrong direction.
+ verify(mCentralSurfaces, never()).handleExternalShadeWindowTouch(any())
+ }
+
+ // Verifies that a swipe up is not forwarded to the shade view.
+ @Test
+ @DisableFlags(Flags.FLAG_COMMUNAL_HUB)
+ fun testSwipeUp_communalDisabled_touchesNotSent() {
+ swipe(Direction.UP)
+
+ // Motion events are not sent for the shade view to process as the swipe is going in the
+ // wrong direction.
+ verify(mShadeViewController, never()).handleExternalTouch(any())
+ }
+
+ @Test
+ fun testCancelMotionEvent_popsTouchSession() {
+ swipe(Direction.DOWN)
+ val event = MotionEvent.obtain(0, 0, MotionEvent.ACTION_CANCEL, 0f, 0f, 0)
+ mInputListenerCaptor.lastValue.onInputEvent(event)
+ verify(mTouchSession).pop()
+ }
+
+ /**
+ * Simulates a swipe in the given direction and returns true if the touch was intercepted by the
+ * touch handler's gesture listener.
+ *
+ * Swipe down starts from a Y coordinate of 0 and goes downward. Swipe up starts from the edge
+ * of the gesture region, [.TOUCH_HEIGHT], and goes upward to 0.
+ */
+ private fun swipe(direction: Direction): Boolean {
+ clearInvocations(mTouchSession)
+ mTouchHandler.onSessionStart(mTouchSession)
+ verify(mTouchSession).registerGestureListener(mGestureListenerCaptor.capture())
+ verify(mTouchSession).registerInputListener(mInputListenerCaptor.capture())
+ val startY = (if (direction == Direction.UP) TOUCH_HEIGHT else 0).toFloat()
+ val endY = (if (direction == Direction.UP) 0 else TOUCH_HEIGHT).toFloat()
+
+ // Send touches to the input and gesture listener.
+ val event1 = MotionEvent.obtain(0, 0, MotionEvent.ACTION_MOVE, 0f, startY, 0)
+ val event2 = MotionEvent.obtain(0, 0, MotionEvent.ACTION_MOVE, 0f, endY, 0)
+ mInputListenerCaptor.lastValue.onInputEvent(event1)
+ mInputListenerCaptor.lastValue.onInputEvent(event2)
+ return mGestureListenerCaptor.lastValue.onScroll(event1, event2, 0f, startY - endY)
+ }
+
+ private enum class Direction {
+ DOWN,
+ UP
+ }
+
+ companion object {
+ private const val TOUCH_HEIGHT = 20
+ }
+}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/bouncer/domain/interactor/PrimaryBouncerInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/bouncer/domain/interactor/PrimaryBouncerInteractorTest.kt
index 546a6b7a43a2..d5e1fae215c7 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/bouncer/domain/interactor/PrimaryBouncerInteractorTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/bouncer/domain/interactor/PrimaryBouncerInteractorTest.kt
@@ -160,6 +160,12 @@ class PrimaryBouncerInteractorTest : SysuiTestCase() {
}
@Test
+ fun testShowReturnsFalseWhenDelegateIsNotSet() {
+ whenever(bouncerView.delegate).thenReturn(null)
+ assertThat(underTest.show(true)).isEqualTo(false)
+ }
+
+ @Test
fun testShow_isResumed() {
whenever(repository.primaryBouncerShow.value).thenReturn(true)
whenever(keyguardSecurityModel.getSecurityMode(anyInt()))
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/bouncer/ui/viewmodel/BouncerMessageViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/bouncer/ui/viewmodel/BouncerMessageViewModelTest.kt
index f9f7df820217..4f5d0e58ce01 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/bouncer/ui/viewmodel/BouncerMessageViewModelTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/bouncer/ui/viewmodel/BouncerMessageViewModelTest.kt
@@ -29,6 +29,7 @@ import com.android.systemui.authentication.domain.interactor.authenticationInter
import com.android.systemui.authentication.shared.model.AuthenticationMethodModel
import com.android.systemui.authentication.shared.model.AuthenticationMethodModel.Pattern
import com.android.systemui.authentication.shared.model.AuthenticationMethodModel.Pin
+import com.android.systemui.biometrics.FaceHelpMessageDebouncer
import com.android.systemui.biometrics.data.repository.FaceSensorInfo
import com.android.systemui.biometrics.data.repository.fakeFacePropertyRepository
import com.android.systemui.biometrics.data.repository.fakeFingerprintPropertyRepository
@@ -36,7 +37,7 @@ import com.android.systemui.biometrics.shared.model.SensorStrength
import com.android.systemui.bouncer.domain.interactor.bouncerInteractor
import com.android.systemui.bouncer.shared.flag.fakeComposeBouncerFlags
import com.android.systemui.coroutines.collectLastValue
-import com.android.systemui.deviceentry.domain.interactor.DeviceEntryInteractor
+import com.android.systemui.deviceentry.domain.interactor.DeviceUnlockedInteractor
import com.android.systemui.deviceentry.shared.model.ErrorFaceAuthenticationStatus
import com.android.systemui.deviceentry.shared.model.FailedFaceAuthenticationStatus
import com.android.systemui.deviceentry.shared.model.HelpFaceAuthenticationStatus
@@ -75,15 +76,20 @@ class BouncerMessageViewModelTest : SysuiTestCase() {
private val authenticationInteractor by lazy { kosmos.authenticationInteractor }
private val bouncerInteractor by lazy { kosmos.bouncerInteractor }
private lateinit var underTest: BouncerMessageViewModel
+ private val ignoreHelpMessageId = 1
@Before
fun setUp() {
kosmos.fakeUserRepository.setUserInfos(listOf(PRIMARY_USER))
kosmos.fakeComposeBouncerFlags.composeBouncerEnabled = true
+ overrideResource(
+ R.array.config_face_acquire_device_entry_ignorelist,
+ intArrayOf(ignoreHelpMessageId)
+ )
underTest = kosmos.bouncerMessageViewModel
overrideResource(R.string.kg_trust_agent_disabled, "Trust agent is unavailable")
kosmos.fakeSystemPropertiesHelper.set(
- DeviceEntryInteractor.SYS_BOOT_REASON_PROP,
+ DeviceUnlockedInteractor.SYS_BOOT_REASON_PROP,
"not mainline reboot"
)
}
@@ -379,7 +385,15 @@ class BouncerMessageViewModelTest : SysuiTestCase() {
runCurrent()
kosmos.fakeDeviceEntryFaceAuthRepository.setAuthenticationStatus(
- HelpFaceAuthenticationStatus(1, "some helpful message")
+ HelpFaceAuthenticationStatus(0, "some helpful message", 0)
+ )
+ runCurrent()
+ kosmos.fakeDeviceEntryFaceAuthRepository.setAuthenticationStatus(
+ HelpFaceAuthenticationStatus(
+ 0,
+ "some helpful message",
+ FaceHelpMessageDebouncer.DEFAULT_WINDOW_MS
+ )
)
runCurrent()
assertThat(bouncerMessage?.text).isEqualTo("Enter PIN")
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/CommunalBackupRestoreStartableTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/CommunalBackupRestoreStartableTest.kt
index 722eb2b9b622..60aea92ab3bd 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/CommunalBackupRestoreStartableTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/CommunalBackupRestoreStartableTest.kt
@@ -20,6 +20,9 @@ import android.appwidget.AppWidgetManager
import android.content.Context
import android.content.Intent
import android.content.mockedContext
+import android.os.Handler
+import android.os.fakeExecutorHandler
+import android.provider.Settings.Secure.USER_SETUP_COMPLETE
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
@@ -27,11 +30,13 @@ import com.android.systemui.broadcast.FakeBroadcastDispatcher
import com.android.systemui.broadcast.broadcastDispatcher
import com.android.systemui.communal.domain.interactor.CommunalInteractor
import com.android.systemui.communal.widgets.CommunalWidgetModule
+import com.android.systemui.concurrency.fakeExecutor
import com.android.systemui.kosmos.testScope
import com.android.systemui.log.logcatLogBuffer
import com.android.systemui.testKosmos
-import com.android.systemui.util.mockito.any
-import com.android.systemui.util.mockito.kotlinArgumentCaptor
+import com.android.systemui.util.concurrency.FakeExecutor
+import com.android.systemui.util.settings.SecureSettings
+import com.android.systemui.util.settings.fakeSettings
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.test.runTest
import org.junit.Before
@@ -41,6 +46,8 @@ import org.mockito.Mock
import org.mockito.Mockito.never
import org.mockito.Mockito.verify
import org.mockito.MockitoAnnotations
+import org.mockito.kotlin.any
+import org.mockito.kotlin.argumentCaptor
@SmallTest
@RunWith(AndroidJUnit4::class)
@@ -50,10 +57,13 @@ class CommunalBackupRestoreStartableTest : SysuiTestCase() {
@Mock private lateinit var communalInteractor: CommunalInteractor
- private val mapCaptor = kotlinArgumentCaptor<Map<Int, Int>>()
+ private val mapCaptor = argumentCaptor<Map<Int, Int>>()
private lateinit var context: Context
private lateinit var broadcastDispatcher: FakeBroadcastDispatcher
+ private lateinit var secureSettings: SecureSettings
+ private lateinit var handler: Handler
+ private lateinit var fakeExecutor: FakeExecutor
private lateinit var underTest: CommunalBackupRestoreStartable
@Before
@@ -62,18 +72,28 @@ class CommunalBackupRestoreStartableTest : SysuiTestCase() {
context = kosmos.mockedContext
broadcastDispatcher = kosmos.broadcastDispatcher
+ secureSettings = kosmos.fakeSettings
+ handler = kosmos.fakeExecutorHandler
+ fakeExecutor = kosmos.fakeExecutor
+
+ secureSettings.putInt(USER_SETUP_COMPLETE, 0)
underTest =
CommunalBackupRestoreStartable(
broadcastDispatcher,
communalInteractor,
logcatLogBuffer("CommunalBackupRestoreStartable"),
+ secureSettings,
+ handler,
)
}
@Test
- fun testRestoreWidgetsUponHostRestored() =
+ fun restoreWidgets_userSetUpComplete_performRestore() =
testScope.runTest {
+ // User set up complete
+ secureSettings.putInt(USER_SETUP_COMPLETE, 1)
+
underTest.start()
// Verify restore widgets not called
@@ -94,7 +114,7 @@ class CommunalBackupRestoreStartableTest : SysuiTestCase() {
// Verify restore widgets called
verify(communalInteractor).restoreWidgets(mapCaptor.capture())
- val oldToNewWidgetIdMap = mapCaptor.value
+ val oldToNewWidgetIdMap = mapCaptor.firstValue
assertThat(oldToNewWidgetIdMap)
.containsExactlyEntriesIn(
mapOf(
@@ -106,10 +126,54 @@ class CommunalBackupRestoreStartableTest : SysuiTestCase() {
}
@Test
- fun testDoNotRestoreWidgetsIfNotForCommunalWidgetHost() =
+ fun restoreWidgets_userSetUpNotComplete_restoreWhenUserSetupComplete() =
testScope.runTest {
underTest.start()
+ // Verify restore widgets not called
+ verify(communalInteractor, never()).restoreWidgets(any())
+
+ // Trigger app widget host restored
+ val intent =
+ Intent().apply {
+ action = AppWidgetManager.ACTION_APPWIDGET_HOST_RESTORED
+ putExtra(
+ AppWidgetManager.EXTRA_HOST_ID,
+ CommunalWidgetModule.APP_WIDGET_HOST_ID
+ )
+ putExtra(AppWidgetManager.EXTRA_APPWIDGET_OLD_IDS, intArrayOf(1, 2, 3))
+ putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, intArrayOf(7, 8, 9))
+ }
+ broadcastDispatcher.sendIntentToMatchingReceiversOnly(context, intent)
+
+ // Verify restore widgets not called because user setup not complete
+ verify(communalInteractor, never()).restoreWidgets(any())
+
+ // User setup complete
+ secureSettings.putInt(USER_SETUP_COMPLETE, 1)
+ fakeExecutor.runAllReady()
+
+ // Verify restore widgets called
+ verify(communalInteractor).restoreWidgets(mapCaptor.capture())
+ val oldToNewWidgetIdMap = mapCaptor.firstValue
+ assertThat(oldToNewWidgetIdMap)
+ .containsExactlyEntriesIn(
+ mapOf(
+ Pair(1, 7),
+ Pair(2, 8),
+ Pair(3, 9),
+ )
+ )
+ }
+
+ @Test
+ fun restoreWidgets_broadcastNotForCommunalWidgetHost_doNotPerformRestore() =
+ testScope.runTest {
+ // User set up complete
+ secureSettings.putInt(USER_SETUP_COMPLETE, 1)
+
+ underTest.start()
+
// Trigger app widget host restored, but for another host
val hostId = CommunalWidgetModule.APP_WIDGET_HOST_ID + 1
val intent =
@@ -126,8 +190,11 @@ class CommunalBackupRestoreStartableTest : SysuiTestCase() {
}
@Test
- fun testAbortRestoreWidgetsIfOldToNewIdsMappingInvalid() =
+ fun restoreWidgets_oldToNewIdsMappingInvalid_abortRestore() =
testScope.runTest {
+ // User set up complete
+ secureSettings.putInt(USER_SETUP_COMPLETE, 1)
+
underTest.start()
// Trigger app widget host restored, but new ids list is one too many for old ids
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/CommunalDreamStartableTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/CommunalDreamStartableTest.kt
index dcc9c7aacdf0..76920e406bff 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/CommunalDreamStartableTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/CommunalDreamStartableTest.kt
@@ -22,6 +22,9 @@ 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.communal.domain.interactor.communalSettingsInteractor
+import com.android.systemui.flags.Flags.COMMUNAL_SERVICE_ENABLED
+import com.android.systemui.flags.fakeFeatureFlagsClassic
import com.android.systemui.keyguard.data.repository.fakeKeyguardRepository
import com.android.systemui.keyguard.data.repository.fakeKeyguardTransitionRepository
import com.android.systemui.keyguard.data.repository.keyguardRepository
@@ -61,9 +64,12 @@ class CommunalDreamStartableTest : SysuiTestCase() {
@Before
fun setUp() {
+ kosmos.fakeFeatureFlagsClassic.set(COMMUNAL_SERVICE_ENABLED, true)
+
underTest =
CommunalDreamStartable(
powerInteractor = kosmos.powerInteractor,
+ communalSettingsInteractor = kosmos.communalSettingsInteractor,
keyguardInteractor = kosmos.keyguardInteractor,
keyguardTransitionInteractor = kosmos.keyguardTransitionInteractor,
dreamManager = dreamManager,
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/CommunalOngoingContentStartableTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/CommunalOngoingContentStartableTest.kt
new file mode 100644
index 000000000000..9113617095e2
--- /dev/null
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/CommunalOngoingContentStartableTest.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.communal
+
+import android.platform.test.annotations.EnableFlags
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.SmallTest
+import com.android.systemui.Flags.FLAG_COMMUNAL_HUB
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.communal.data.repository.fakeCommunalMediaRepository
+import com.android.systemui.communal.data.repository.fakeCommunalSmartspaceRepository
+import com.android.systemui.communal.domain.interactor.communalInteractor
+import com.android.systemui.communal.domain.interactor.communalSettingsInteractor
+import com.android.systemui.communal.domain.interactor.setCommunalEnabled
+import com.android.systemui.flags.Flags
+import com.android.systemui.flags.fakeFeatureFlagsClassic
+import com.android.systemui.kosmos.applicationCoroutineScope
+import com.android.systemui.kosmos.testScope
+import com.android.systemui.testKosmos
+import com.google.common.truth.Truth.assertThat
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.test.runCurrent
+import kotlinx.coroutines.test.runTest
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+
+@OptIn(ExperimentalCoroutinesApi::class)
+@SmallTest
+@EnableFlags(FLAG_COMMUNAL_HUB)
+@RunWith(AndroidJUnit4::class)
+class CommunalOngoingContentStartableTest : SysuiTestCase() {
+ private val kosmos = testKosmos()
+ private val testScope = kosmos.testScope
+
+ private val mediaRepository = kosmos.fakeCommunalMediaRepository
+ private val smartspaceRepository = kosmos.fakeCommunalSmartspaceRepository
+
+ private lateinit var underTest: CommunalOngoingContentStartable
+
+ @Before
+ fun setUp() {
+ kosmos.fakeFeatureFlagsClassic.set(Flags.COMMUNAL_SERVICE_ENABLED, true)
+ underTest =
+ CommunalOngoingContentStartable(
+ bgScope = kosmos.applicationCoroutineScope,
+ communalInteractor = kosmos.communalInteractor,
+ communalMediaRepository = mediaRepository,
+ communalSettingsInteractor = kosmos.communalSettingsInteractor,
+ communalSmartspaceRepository = smartspaceRepository,
+ )
+ }
+
+ @Test
+ fun testListenForOngoingContentWhenCommunalIsEnabled() =
+ testScope.runTest {
+ underTest.start()
+ runCurrent()
+
+ assertThat(mediaRepository.isListening()).isFalse()
+ assertThat(smartspaceRepository.isListening()).isFalse()
+
+ kosmos.setCommunalEnabled(true)
+ runCurrent()
+
+ assertThat(mediaRepository.isListening()).isTrue()
+ assertThat(smartspaceRepository.isListening()).isTrue()
+
+ kosmos.setCommunalEnabled(false)
+ runCurrent()
+
+ assertThat(mediaRepository.isListening()).isFalse()
+ assertThat(smartspaceRepository.isListening()).isFalse()
+ }
+}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/CommunalSceneStartableTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/CommunalSceneStartableTest.kt
index cf145471e55f..4ad020f94c89 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/CommunalSceneStartableTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/CommunalSceneStartableTest.kt
@@ -16,17 +16,23 @@
package com.android.systemui.communal
+import android.platform.test.annotations.EnableFlags
import android.provider.Settings
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.systemui.Flags.FLAG_COMMUNAL_HUB
import com.android.systemui.SysuiTestCase
import com.android.systemui.communal.domain.interactor.communalInteractor
import com.android.systemui.communal.domain.interactor.communalSceneInteractor
+import com.android.systemui.communal.domain.interactor.communalSettingsInteractor
import com.android.systemui.communal.domain.interactor.setCommunalAvailable
import com.android.systemui.communal.shared.model.CommunalScenes
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.dock.dockManager
import com.android.systemui.dock.fakeDockManager
+import com.android.systemui.flags.Flags.COMMUNAL_SERVICE_ENABLED
+import com.android.systemui.flags.fakeFeatureFlagsClassic
+import com.android.systemui.flags.featureFlagsClassic
import com.android.systemui.keyguard.data.repository.fakeKeyguardRepository
import com.android.systemui.keyguard.data.repository.fakeKeyguardTransitionRepository
import com.android.systemui.keyguard.domain.interactor.keyguardInteractor
@@ -57,6 +63,7 @@ import org.mockito.kotlin.whenever
@OptIn(ExperimentalCoroutinesApi::class)
@SmallTest
@RunWith(AndroidJUnit4::class)
+@EnableFlags(FLAG_COMMUNAL_HUB)
class CommunalSceneStartableTest : SysuiTestCase() {
private val kosmos = testKosmos()
@@ -66,16 +73,19 @@ class CommunalSceneStartableTest : SysuiTestCase() {
fun setUp() {
with(kosmos) {
fakeSettings.putInt(Settings.System.SCREEN_OFF_TIMEOUT, SCREEN_TIMEOUT)
+ kosmos.fakeFeatureFlagsClassic.set(COMMUNAL_SERVICE_ENABLED, true)
underTest =
CommunalSceneStartable(
dockManager = dockManager,
communalInteractor = communalInteractor,
+ communalSettingsInteractor = communalSettingsInteractor,
communalSceneInteractor = communalSceneInteractor,
keyguardTransitionInteractor = keyguardTransitionInteractor,
keyguardInteractor = keyguardInteractor,
systemSettings = fakeSettings,
notificationShadeWindowController = notificationShadeWindowController,
+ featureFlagsClassic = kosmos.fakeFeatureFlagsClassic,
applicationScope = applicationCoroutineScope,
bgScope = applicationCoroutineScope,
mainDispatcher = testDispatcher,
@@ -93,7 +103,7 @@ class CommunalSceneStartableTest : SysuiTestCase() {
}
@Test
- fun keyguardGoesAway_forceBlankScene() =
+ fun keyguardGoesAway_whenLaunchingWidget_doNotForceBlankScene() =
with(kosmos) {
testScope.runTest {
val scene by collectLastValue(communalSceneInteractor.currentScene)
@@ -101,6 +111,27 @@ class CommunalSceneStartableTest : SysuiTestCase() {
communalSceneInteractor.changeScene(CommunalScenes.Communal)
assertThat(scene).isEqualTo(CommunalScenes.Communal)
+ communalSceneInteractor.setIsLaunchingWidget(true)
+ fakeKeyguardTransitionRepository.sendTransitionSteps(
+ from = KeyguardState.PRIMARY_BOUNCER,
+ to = KeyguardState.GONE,
+ testScope = this
+ )
+
+ assertThat(scene).isEqualTo(CommunalScenes.Communal)
+ }
+ }
+
+ @Test
+ fun keyguardGoesAway_whenNotLaunchingWidget_forceBlankScene() =
+ with(kosmos) {
+ testScope.runTest {
+ val scene by collectLastValue(communalSceneInteractor.currentScene)
+
+ communalSceneInteractor.changeScene(CommunalScenes.Communal)
+ assertThat(scene).isEqualTo(CommunalScenes.Communal)
+
+ communalSceneInteractor.setIsLaunchingWidget(false)
fakeKeyguardTransitionRepository.sendTransitionSteps(
from = KeyguardState.PRIMARY_BOUNCER,
to = KeyguardState.GONE,
@@ -451,6 +482,24 @@ class CommunalSceneStartableTest : SysuiTestCase() {
}
}
+ @Test
+ fun transitionFromDozingToGlanceableHub_forcesCommunal() =
+ with(kosmos) {
+ testScope.runTest {
+ val scene by collectLastValue(communalSceneInteractor.currentScene)
+ communalSceneInteractor.changeScene(CommunalScenes.Blank)
+ assertThat(scene).isEqualTo(CommunalScenes.Blank)
+
+ fakeKeyguardTransitionRepository.sendTransitionSteps(
+ from = KeyguardState.DOZING,
+ to = KeyguardState.GLANCEABLE_HUB,
+ testScope = this
+ )
+
+ assertThat(scene).isEqualTo(CommunalScenes.Communal)
+ }
+ }
+
private fun TestScope.updateDocked(docked: Boolean) =
with(kosmos) {
runCurrent()
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/data/db/DefaultWidgetPopulationTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/data/db/DefaultWidgetPopulationTest.kt
new file mode 100644
index 000000000000..ad2c42fd1f09
--- /dev/null
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/data/db/DefaultWidgetPopulationTest.kt
@@ -0,0 +1,157 @@
+/*
+ * 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.communal.data.db
+
+import android.content.ComponentName
+import android.os.UserHandle
+import android.os.UserManager
+import androidx.sqlite.db.SupportSQLiteDatabase
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.SmallTest
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.communal.data.db.DefaultWidgetPopulation.SkipReason.RESTORED_FROM_BACKUP
+import com.android.systemui.communal.widgets.CommunalWidgetHost
+import com.android.systemui.kosmos.applicationCoroutineScope
+import com.android.systemui.kosmos.testScope
+import com.android.systemui.log.logcatLogBuffer
+import com.android.systemui.testKosmos
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.test.runCurrent
+import kotlinx.coroutines.test.runTest
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.ArgumentMatchers.anyInt
+import org.mockito.kotlin.any
+import org.mockito.kotlin.anyOrNull
+import org.mockito.kotlin.eq
+import org.mockito.kotlin.mock
+import org.mockito.kotlin.never
+import org.mockito.kotlin.verify
+
+@SmallTest
+@OptIn(ExperimentalCoroutinesApi::class)
+@RunWith(AndroidJUnit4::class)
+class DefaultWidgetPopulationTest : SysuiTestCase() {
+ private val kosmos = testKosmos()
+ private val testScope = kosmos.testScope
+
+ private val communalWidgetHost =
+ mock<CommunalWidgetHost> {
+ var nextId = 0
+ on { allocateIdAndBindWidget(any(), anyOrNull()) }.thenAnswer { nextId++ }
+ }
+ private val communalWidgetDao = mock<CommunalWidgetDao>()
+ private val database = mock<SupportSQLiteDatabase>()
+ private val mainUser = UserHandle(0)
+ private val userManager =
+ mock<UserManager> {
+ on { mainUser }.thenReturn(mainUser)
+ on { getUserSerialNumber(0) }.thenReturn(0)
+ }
+
+ private val defaultWidgets =
+ arrayOf(
+ "com.android.test_package_1/fake_widget_1",
+ "com.android.test_package_2/fake_widget_2",
+ "com.android.test_package_3/fake_widget_3",
+ )
+
+ private lateinit var underTest: DefaultWidgetPopulation
+
+ @Before
+ fun setUp() {
+ underTest =
+ DefaultWidgetPopulation(
+ bgScope = kosmos.applicationCoroutineScope,
+ communalWidgetHost = communalWidgetHost,
+ communalWidgetDaoProvider = { communalWidgetDao },
+ defaultWidgets = defaultWidgets,
+ logBuffer = logcatLogBuffer("DefaultWidgetPopulationTest"),
+ userManager = userManager,
+ )
+ }
+
+ @Test
+ fun testPopulateDefaultWidgetsWhenDatabaseCreated() =
+ testScope.runTest {
+ // Database created
+ underTest.onCreate(database)
+ runCurrent()
+
+ // Verify default widgets bound
+ verify(communalWidgetHost)
+ .allocateIdAndBindWidget(
+ provider = eq(ComponentName.unflattenFromString(defaultWidgets[0])!!),
+ user = eq(mainUser),
+ )
+ verify(communalWidgetHost)
+ .allocateIdAndBindWidget(
+ provider = eq(ComponentName.unflattenFromString(defaultWidgets[1])!!),
+ user = eq(mainUser),
+ )
+ verify(communalWidgetHost)
+ .allocateIdAndBindWidget(
+ provider = eq(ComponentName.unflattenFromString(defaultWidgets[2])!!),
+ user = eq(mainUser),
+ )
+
+ // Verify default widgets added in database
+ verify(communalWidgetDao)
+ .addWidget(
+ widgetId = 0,
+ componentName = defaultWidgets[0],
+ priority = 3,
+ userSerialNumber = 0,
+ )
+ verify(communalWidgetDao)
+ .addWidget(
+ widgetId = 1,
+ componentName = defaultWidgets[1],
+ priority = 2,
+ userSerialNumber = 0,
+ )
+ verify(communalWidgetDao)
+ .addWidget(
+ widgetId = 2,
+ componentName = defaultWidgets[2],
+ priority = 1,
+ userSerialNumber = 0,
+ )
+ }
+
+ @Test
+ fun testSkipDefaultWidgetsPopulation() =
+ testScope.runTest {
+ // Skip default widgets population
+ underTest.skipDefaultWidgetsPopulation(RESTORED_FROM_BACKUP)
+
+ // Database created
+ underTest.onCreate(database)
+ runCurrent()
+
+ // Verify no widget bounded or added to the database
+ verify(communalWidgetHost, never()).allocateIdAndBindWidget(any(), any())
+ verify(communalWidgetDao, never())
+ .addWidget(
+ widgetId = anyInt(),
+ componentName = any(),
+ priority = anyInt(),
+ userSerialNumber = anyInt(),
+ )
+ }
+}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/data/repository/CommunalMediaRepositoryImplTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/data/repository/CommunalMediaRepositoryImplTest.kt
index 407bf4cac633..dd280223f203 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/data/repository/CommunalMediaRepositoryImplTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/data/repository/CommunalMediaRepositoryImplTest.kt
@@ -20,46 +20,41 @@ import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.collectLastValue
+import com.android.systemui.kosmos.testScope
import com.android.systemui.log.table.TableLogBuffer
import com.android.systemui.media.controls.domain.pipeline.MediaDataManager
import com.android.systemui.media.controls.shared.model.MediaData
-import com.android.systemui.util.mockito.KotlinArgumentCaptor
+import com.android.systemui.testKosmos
import com.android.systemui.util.mockito.whenever
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.ExperimentalCoroutinesApi
-import kotlinx.coroutines.test.StandardTestDispatcher
-import kotlinx.coroutines.test.TestScope
import kotlinx.coroutines.test.runCurrent
import kotlinx.coroutines.test.runTest
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
-import org.mockito.Mock
import org.mockito.Mockito.verify
-import org.mockito.MockitoAnnotations
+import org.mockito.kotlin.argumentCaptor
+import org.mockito.kotlin.mock
@OptIn(ExperimentalCoroutinesApi::class)
@SmallTest
@RunWith(AndroidJUnit4::class)
@android.platform.test.annotations.EnabledOnRavenwood
class CommunalMediaRepositoryImplTest : SysuiTestCase() {
- @Mock private lateinit var mediaDataManager: MediaDataManager
- @Mock private lateinit var mediaData: MediaData
- @Mock private lateinit var tableLogBuffer: TableLogBuffer
+ private val mediaDataManager = mock<MediaDataManager>()
+ private val mediaData = mock<MediaData>()
+ private val tableLogBuffer = mock<TableLogBuffer>()
private lateinit var underTest: CommunalMediaRepositoryImpl
- private val mediaDataListenerCaptor: KotlinArgumentCaptor<MediaDataManager.Listener> by lazy {
- KotlinArgumentCaptor(MediaDataManager.Listener::class.java)
- }
+ private val mediaDataListenerCaptor = argumentCaptor<MediaDataManager.Listener>()
- private val testDispatcher = StandardTestDispatcher()
- private val testScope = TestScope(testDispatcher)
+ private val kosmos = testKosmos()
+ private val testScope = kosmos.testScope
@Before
fun setUp() {
- MockitoAnnotations.initMocks(this)
-
underTest =
CommunalMediaRepositoryImpl(
mediaDataManager,
@@ -78,6 +73,8 @@ class CommunalMediaRepositoryImplTest : SysuiTestCase() {
@Test
fun mediaModel_updatesWhenMediaDataLoaded() =
testScope.runTest {
+ underTest.startListening()
+
// Listener is added
verify(mediaDataManager).addListener(mediaDataListenerCaptor.capture())
@@ -89,7 +86,7 @@ class CommunalMediaRepositoryImplTest : SysuiTestCase() {
// Change to media available and notify the listener.
whenever(mediaDataManager.hasActiveMediaOrRecommendation()).thenReturn(true)
whenever(mediaData.createdTimestampMillis).thenReturn(1234L)
- mediaDataListenerCaptor.value.onMediaDataLoaded("key", null, mediaData)
+ mediaDataListenerCaptor.firstValue.onMediaDataLoaded("key", null, mediaData)
runCurrent()
// Media active now returns true.
@@ -100,12 +97,14 @@ class CommunalMediaRepositoryImplTest : SysuiTestCase() {
@Test
fun mediaModel_updatesWhenMediaDataRemoved() =
testScope.runTest {
+ underTest.startListening()
+
// Listener is added
verify(mediaDataManager).addListener(mediaDataListenerCaptor.capture())
// Change to media available and notify the listener.
whenever(mediaDataManager.hasActiveMediaOrRecommendation()).thenReturn(true)
- mediaDataListenerCaptor.value.onMediaDataLoaded("key", null, mediaData)
+ mediaDataListenerCaptor.firstValue.onMediaDataLoaded("key", null, mediaData)
runCurrent()
// Media active now returns true.
@@ -114,7 +113,7 @@ class CommunalMediaRepositoryImplTest : SysuiTestCase() {
// Change to media unavailable and notify the listener.
whenever(mediaDataManager.hasActiveMediaOrRecommendation()).thenReturn(false)
- mediaDataListenerCaptor.value.onMediaDataRemoved("key", false)
+ mediaDataListenerCaptor.firstValue.onMediaDataRemoved("key", false)
runCurrent()
// Media active now returns false.
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/data/repository/CommunalPrefsRepositoryImplTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/data/repository/CommunalPrefsRepositoryImplTest.kt
index a8bdc7c632d2..1f5e30ca4a0d 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/data/repository/CommunalPrefsRepositoryImplTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/data/repository/CommunalPrefsRepositoryImplTest.kt
@@ -88,24 +88,6 @@ class CommunalPrefsRepositoryImplTest : SysuiTestCase() {
}
@Test
- fun isDisclaimerDismissed_byDefault_isFalse() =
- testScope.runTest {
- val isDisclaimerDismissed by
- collectLastValue(underTest.isDisclaimerDismissed(MAIN_USER))
- assertThat(isDisclaimerDismissed).isFalse()
- }
-
- @Test
- fun isDisclaimerDismissed_onSet_isTrue() =
- testScope.runTest {
- val isDisclaimerDismissed by
- collectLastValue(underTest.isDisclaimerDismissed(MAIN_USER))
-
- underTest.setDisclaimerDismissed(MAIN_USER)
- assertThat(isDisclaimerDismissed).isTrue()
- }
-
- @Test
fun getSharedPreferences_whenFileRestored() =
testScope.runTest {
val isCtaDismissed by collectLastValue(underTest.isCtaDismissed(MAIN_USER))
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/data/repository/CommunalSettingsRepositoryImplTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/data/repository/CommunalSettingsRepositoryImplTest.kt
index 0169f99fc822..06b710eb86eb 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/data/repository/CommunalSettingsRepositoryImplTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/data/repository/CommunalSettingsRepositoryImplTest.kt
@@ -68,6 +68,38 @@ class CommunalSettingsRepositoryImplTest : SysuiTestCase() {
@EnableFlags(FLAG_COMMUNAL_HUB)
@Test
+ fun getFlagEnabled_bothEnabled() {
+ kosmos.fakeFeatureFlagsClassic.set(COMMUNAL_SERVICE_ENABLED, true)
+
+ assertThat(underTest.getFlagEnabled()).isTrue()
+ }
+
+ @DisableFlags(FLAG_COMMUNAL_HUB)
+ @Test
+ fun getFlagEnabled_bothDisabled() {
+ kosmos.fakeFeatureFlagsClassic.set(COMMUNAL_SERVICE_ENABLED, false)
+
+ assertThat(underTest.getFlagEnabled()).isFalse()
+ }
+
+ @DisableFlags(FLAG_COMMUNAL_HUB)
+ @Test
+ fun getFlagEnabled_onlyClassicFlagEnabled() {
+ kosmos.fakeFeatureFlagsClassic.set(COMMUNAL_SERVICE_ENABLED, true)
+
+ assertThat(underTest.getFlagEnabled()).isFalse()
+ }
+
+ @EnableFlags(FLAG_COMMUNAL_HUB)
+ @Test
+ fun getFlagEnabled_onlyTrunkFlagEnabled() {
+ kosmos.fakeFeatureFlagsClassic.set(COMMUNAL_SERVICE_ENABLED, false)
+
+ assertThat(underTest.getFlagEnabled()).isFalse()
+ }
+
+ @EnableFlags(FLAG_COMMUNAL_HUB)
+ @Test
fun secondaryUserIsInvalid() =
testScope.runTest {
val enabledState by collectLastValue(underTest.getEnabledState(SECONDARY_USER))
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/data/repository/CommunalSmartspaceRepositoryImplTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/data/repository/CommunalSmartspaceRepositoryImplTest.kt
new file mode 100644
index 000000000000..c1816ed3e5bf
--- /dev/null
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/data/repository/CommunalSmartspaceRepositoryImplTest.kt
@@ -0,0 +1,319 @@
+/*
+ * 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.communal.data.repository
+
+import android.app.smartspace.SmartspaceTarget
+import android.app.smartspace.flags.Flags.FLAG_REMOTE_VIEWS
+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.SysuiTestCase
+import com.android.systemui.communal.smartspace.CommunalSmartspaceController
+import com.android.systemui.concurrency.fakeExecutor
+import com.android.systemui.coroutines.collectLastValue
+import com.android.systemui.kosmos.testScope
+import com.android.systemui.plugins.BcSmartspaceDataPlugin.SmartspaceTargetListener
+import com.android.systemui.testKosmos
+import com.android.systemui.util.time.fakeSystemClock
+import com.google.common.truth.Truth.assertThat
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.test.runCurrent
+import kotlinx.coroutines.test.runTest
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.kotlin.any
+import org.mockito.kotlin.argumentCaptor
+import org.mockito.kotlin.doReturn
+import org.mockito.kotlin.mock
+import org.mockito.kotlin.never
+import org.mockito.kotlin.verify
+
+@SmallTest
+@OptIn(ExperimentalCoroutinesApi::class)
+@RunWith(AndroidJUnit4::class)
+class CommunalSmartspaceRepositoryImplTest : SysuiTestCase() {
+ private val kosmos = testKosmos()
+ private val testScope = kosmos.testScope
+
+ private val listenerCaptor = argumentCaptor<SmartspaceTargetListener>()
+
+ private val smartspaceController = mock<CommunalSmartspaceController>()
+ private val fakeExecutor = kosmos.fakeExecutor
+ private val systemClock = kosmos.fakeSystemClock
+
+ private lateinit var underTest: CommunalSmartspaceRepositoryImpl
+
+ @Before
+ fun setUp() {
+ underTest =
+ CommunalSmartspaceRepositoryImpl(
+ smartspaceController,
+ fakeExecutor,
+ systemClock,
+ )
+ }
+
+ @DisableFlags(FLAG_REMOTE_VIEWS)
+ @Test
+ fun startListening_remoteViewsFlagDisabled_doNotListenForSmartspaceUpdates() =
+ testScope.runTest {
+ underTest.startListening()
+ fakeExecutor.runAllReady()
+
+ verify(smartspaceController, never()).addListener(any())
+ }
+
+ @EnableFlags(FLAG_REMOTE_VIEWS)
+ @Test
+ fun startListening_remoteViewsFlagEnabled_listenForSmartspaceUpdates() =
+ testScope.runTest {
+ underTest.startListening()
+ fakeExecutor.runAllReady()
+
+ // Verify listener added
+ val listener = captureSmartspaceTargetListener()
+
+ underTest.stopListening()
+ fakeExecutor.runAllReady()
+
+ // Verify listener removed
+ verify(smartspaceController).removeListener(listener)
+ }
+
+ @EnableFlags(FLAG_REMOTE_VIEWS)
+ @Test
+ fun communalTimers_onlyShowTimersWithRemoteViews() =
+ testScope.runTest {
+ underTest.startListening()
+
+ val communalTimers by collectLastValue(underTest.timers)
+ runCurrent()
+ fakeExecutor.runAllReady()
+
+ with(captureSmartspaceTargetListener()) {
+ onSmartspaceTargetsUpdated(
+ listOf(
+ // Invalid. Not a timer
+ mock<SmartspaceTarget> {
+ on { smartspaceTargetId }.doReturn("weather")
+ on { featureType }.doReturn(SmartspaceTarget.FEATURE_WEATHER)
+ },
+ // Invalid. RemoteViews absent
+ mock<SmartspaceTarget> {
+ on { smartspaceTargetId }.doReturn("timer-0-started")
+ on { featureType }.doReturn(SmartspaceTarget.FEATURE_TIMER)
+ on { remoteViews }.doReturn(null)
+ on { creationTimeMillis }.doReturn(1000)
+ },
+ // Valid
+ mock<SmartspaceTarget> {
+ on { smartspaceTargetId }.doReturn("timer-1-started")
+ on { featureType }.doReturn(SmartspaceTarget.FEATURE_TIMER)
+ on { remoteViews }.doReturn(mock())
+ on { creationTimeMillis }.doReturn(2000)
+ },
+ )
+ )
+ }
+ runCurrent()
+
+ // Verify that only the valid target is listed
+ assertThat(communalTimers).hasSize(1)
+ assertThat(communalTimers?.first()?.smartspaceTargetId).isEqualTo("timer-1-started")
+ }
+
+ @EnableFlags(FLAG_REMOTE_VIEWS)
+ @Test
+ fun communalTimers_cacheCreationTime() =
+ testScope.runTest {
+ underTest.startListening()
+
+ val communalTimers by collectLastValue(underTest.timers)
+ runCurrent()
+ fakeExecutor.runAllReady()
+
+ val listener = captureSmartspaceTargetListener()
+ listener.onSmartspaceTargetsUpdated(
+ listOf(
+ mock<SmartspaceTarget> {
+ on { smartspaceTargetId }.doReturn("timer-0-started")
+ on { featureType }.doReturn(SmartspaceTarget.FEATURE_TIMER)
+ on { remoteViews }.doReturn(mock())
+ on { creationTimeMillis }.doReturn(1000)
+ },
+ )
+ )
+ runCurrent()
+
+ // Verify that the creation time is the current time, not the creation time passed in
+ // the target, because this value can be inaccurate (due to b/318535930).
+ val currentTime = systemClock.currentTimeMillis()
+ assertThat(communalTimers?.get(0)?.createdTimestampMillis).isEqualTo(currentTime)
+ assertThat(communalTimers?.get(0)?.createdTimestampMillis).isNotEqualTo(1000)
+
+ // A second timer is added.
+ listener.onSmartspaceTargetsUpdated(
+ listOf(
+ mock<SmartspaceTarget> {
+ on { smartspaceTargetId }.doReturn("timer-0-started")
+ on { featureType }.doReturn(SmartspaceTarget.FEATURE_TIMER)
+ on { remoteViews }.doReturn(mock())
+ on { creationTimeMillis }.doReturn(2000)
+ },
+ mock<SmartspaceTarget> {
+ on { smartspaceTargetId }.doReturn("timer-1-started")
+ on { featureType }.doReturn(SmartspaceTarget.FEATURE_TIMER)
+ on { remoteViews }.doReturn(mock())
+ on { creationTimeMillis }.doReturn(3000)
+ },
+ )
+ )
+ runCurrent()
+
+ // Verify that the created timestamp for the first time is consistent
+ assertThat(communalTimers?.get(0)?.createdTimestampMillis).isEqualTo(currentTime)
+
+ // Verify that the second timer has a new creation time
+ assertThat(communalTimers?.get(1)?.createdTimestampMillis)
+ .isEqualTo(systemClock.currentTimeMillis())
+ }
+
+ @EnableFlags(FLAG_REMOTE_VIEWS)
+ @Test
+ fun communalTimers_creationTimeRemovedFromCacheWhenTimerRemoved() =
+ testScope.runTest {
+ underTest.startListening()
+
+ val communalTimers by collectLastValue(underTest.timers)
+ runCurrent()
+ fakeExecutor.runAllReady()
+
+ // Start timer 0
+ val listener = captureSmartspaceTargetListener()
+ listener.onSmartspaceTargetsUpdated(
+ listOf(
+ mock<SmartspaceTarget> {
+ on { smartspaceTargetId }.doReturn("timer-0-started")
+ on { featureType }.doReturn(SmartspaceTarget.FEATURE_TIMER)
+ on { remoteViews }.doReturn(mock())
+ on { creationTimeMillis }.doReturn(1000)
+ },
+ )
+ )
+ runCurrent()
+
+ // Verify timer 0 creation time
+ val expectedCreationTimeForTimer0 = systemClock.currentTimeMillis()
+ assertThat(communalTimers?.first()?.createdTimestampMillis)
+ .isEqualTo(expectedCreationTimeForTimer0)
+
+ // Advance some time
+ systemClock.advanceTime(1000)
+
+ // Start timer 1
+ listener.onSmartspaceTargetsUpdated(
+ listOf(
+ mock<SmartspaceTarget> {
+ on { smartspaceTargetId }.doReturn("timer-0-started")
+ on { featureType }.doReturn(SmartspaceTarget.FEATURE_TIMER)
+ on { remoteViews }.doReturn(mock())
+ on { creationTimeMillis }.doReturn(1000)
+ },
+ mock<SmartspaceTarget> {
+ on { smartspaceTargetId }.doReturn("timer-1-started")
+ on { featureType }.doReturn(SmartspaceTarget.FEATURE_TIMER)
+ on { remoteViews }.doReturn(mock())
+ on { creationTimeMillis }.doReturn(2000)
+ },
+ )
+ )
+ runCurrent()
+
+ // Verify timer 1 creation time is new
+ val expectedCreationTimeForTimer1 = expectedCreationTimeForTimer0 + 1000
+ assertThat(communalTimers?.get(1)?.createdTimestampMillis)
+ .isEqualTo(expectedCreationTimeForTimer1)
+
+ // Removed timer 0
+ listener.onSmartspaceTargetsUpdated(
+ listOf(
+ mock<SmartspaceTarget> {
+ on { smartspaceTargetId }.doReturn("timer-1-started")
+ on { featureType }.doReturn(SmartspaceTarget.FEATURE_TIMER)
+ on { remoteViews }.doReturn(mock())
+ on { creationTimeMillis }.doReturn(2000)
+ },
+ )
+ )
+ runCurrent()
+
+ // Verify timer 0 removed, and timer 1 creation time is correct
+ assertThat(communalTimers).hasSize(1)
+ assertThat(communalTimers?.first()?.createdTimestampMillis)
+ .isEqualTo(expectedCreationTimeForTimer1)
+
+ // Advance some time
+ systemClock.advanceTime(1000)
+
+ // Start timer 0 again. Technically this is a new timer, but timers can reused stable
+ // ids.
+ listener.onSmartspaceTargetsUpdated(
+ listOf(
+ mock<SmartspaceTarget> {
+ on { smartspaceTargetId }.doReturn("timer-1-started")
+ on { featureType }.doReturn(SmartspaceTarget.FEATURE_TIMER)
+ on { remoteViews }.doReturn(mock())
+ on { creationTimeMillis }.doReturn(2000)
+ },
+ mock<SmartspaceTarget> {
+ on { smartspaceTargetId }.doReturn("timer-0-started")
+ on { featureType }.doReturn(SmartspaceTarget.FEATURE_TIMER)
+ on { remoteViews }.doReturn(mock())
+ on { creationTimeMillis }.doReturn(3000)
+ },
+ )
+ )
+ runCurrent()
+
+ // Verify new timer added, and timer 1 creation time is still correct
+ assertThat(communalTimers).hasSize(2)
+ assertThat(communalTimers?.get(0)?.createdTimestampMillis)
+ .isEqualTo(expectedCreationTimeForTimer1)
+
+ // Verify creation time for the new timer is new, meaning that cache for timer 0 was
+ // removed when it was removed
+ assertThat(communalTimers?.get(1)?.createdTimestampMillis)
+ .isEqualTo(expectedCreationTimeForTimer1 + 1000)
+ }
+
+ @Test
+ fun stableId() {
+ assertThat(CommunalSmartspaceRepositoryImpl.stableId("timer-0-12345-started"))
+ .isEqualTo("timer-0")
+ assertThat(CommunalSmartspaceRepositoryImpl.stableId("timer-1-67890-paused"))
+ .isEqualTo("timer-1")
+ assertThat(CommunalSmartspaceRepositoryImpl.stableId("i_am_an_unexpected_id"))
+ .isEqualTo("i_am_an_unexpected_id")
+ }
+
+ private fun captureSmartspaceTargetListener(): SmartspaceTargetListener {
+ verify(smartspaceController).addListener(listenerCaptor.capture())
+ return listenerCaptor.firstValue
+ }
+}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/data/repository/CommunalWidgetRepositoryImplTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/data/repository/CommunalWidgetRepositoryImplTest.kt
index 6ce6cdb32a12..c707ebf0a2c4 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/data/repository/CommunalWidgetRepositoryImplTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/data/repository/CommunalWidgetRepositoryImplTest.kt
@@ -24,6 +24,7 @@ import android.content.ComponentName
import android.content.applicationContext
import android.graphics.Bitmap
import android.os.UserHandle
+import android.os.userManager
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
@@ -33,6 +34,7 @@ import com.android.systemui.communal.data.backup.CommunalBackupUtils
import com.android.systemui.communal.data.db.CommunalItemRank
import com.android.systemui.communal.data.db.CommunalWidgetDao
import com.android.systemui.communal.data.db.CommunalWidgetItem
+import com.android.systemui.communal.data.db.defaultWidgetPopulation
import com.android.systemui.communal.nano.CommunalHubState
import com.android.systemui.communal.proto.toByteArray
import com.android.systemui.communal.shared.model.CommunalWidgetContentModel
@@ -47,10 +49,6 @@ import com.android.systemui.log.LogBuffer
import com.android.systemui.log.logcatLogBuffer
import com.android.systemui.res.R
import com.android.systemui.testKosmos
-import com.android.systemui.util.mockito.any
-import com.android.systemui.util.mockito.mock
-import com.android.systemui.util.mockito.whenever
-import com.android.systemui.util.mockito.withArgCaptor
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.MutableStateFlow
@@ -59,11 +57,16 @@ import kotlinx.coroutines.test.runTest
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
+import org.mockito.ArgumentMatchers.anyInt
import org.mockito.Mock
import org.mockito.Mockito.eq
import org.mockito.Mockito.never
import org.mockito.Mockito.verify
import org.mockito.MockitoAnnotations
+import org.mockito.kotlin.any
+import org.mockito.kotlin.argumentCaptor
+import org.mockito.kotlin.mock
+import org.mockito.kotlin.whenever
@OptIn(ExperimentalCoroutinesApi::class)
@SmallTest
@@ -77,6 +80,9 @@ class CommunalWidgetRepositoryImplTest : SysuiTestCase() {
@Mock private lateinit var communalWidgetDao: CommunalWidgetDao
@Mock private lateinit var backupManager: BackupManager
+ private val communalHubStateCaptor = argumentCaptor<CommunalHubState>()
+ private val componentNameCaptor = argumentCaptor<ComponentName>()
+
private lateinit var backupUtils: CommunalBackupUtils
private lateinit var logBuffer: LogBuffer
private lateinit var fakeWidgets: MutableStateFlow<Map<CommunalItemRank, CommunalWidgetItem>>
@@ -85,6 +91,10 @@ class CommunalWidgetRepositoryImplTest : SysuiTestCase() {
private val kosmos = testKosmos()
private val testScope = kosmos.testScope
private val packageChangeRepository = kosmos.fakePackageChangeRepository
+ private val userManager = kosmos.userManager
+
+ private val mainUser = UserHandle(0)
+ private val workProfile = UserHandle(10)
private val fakeAllowlist =
listOf(
@@ -109,6 +119,9 @@ class CommunalWidgetRepositoryImplTest : SysuiTestCase() {
whenever(communalWidgetDao.getWidgets()).thenReturn(fakeWidgets)
whenever(communalWidgetHost.appWidgetProviders).thenReturn(fakeProviders)
+ whenever(userManager.mainUser).thenReturn(mainUser)
+
+ restoreUser(mainUser)
underTest =
CommunalWidgetRepositoryImpl(
@@ -121,6 +134,8 @@ class CommunalWidgetRepositoryImplTest : SysuiTestCase() {
backupManager,
backupUtils,
packageChangeRepository,
+ userManager,
+ kosmos.defaultWidgetPopulation,
)
}
@@ -128,7 +143,7 @@ class CommunalWidgetRepositoryImplTest : SysuiTestCase() {
fun communalWidgets_queryWidgetsFromDb() =
testScope.runTest {
val communalItemRankEntry = CommunalItemRank(uid = 1L, rank = 1)
- val communalWidgetItemEntry = CommunalWidgetItem(uid = 1L, 1, "pk_name/cls_name", 1L)
+ val communalWidgetItemEntry = CommunalWidgetItem(uid = 1L, 1, "pk_name/cls_name", 1L, 0)
fakeWidgets.value = mapOf(communalItemRankEntry to communalWidgetItemEntry)
fakeProviders.value = mapOf(1 to providerInfoA)
@@ -154,13 +169,13 @@ class CommunalWidgetRepositoryImplTest : SysuiTestCase() {
fakeWidgets.value =
mapOf(
CommunalItemRank(uid = 1L, rank = 1) to
- CommunalWidgetItem(uid = 1L, 1, "pk_1/cls_1", 1L),
+ CommunalWidgetItem(uid = 1L, 1, "pk_1/cls_1", 1L, 0),
CommunalItemRank(uid = 2L, rank = 2) to
- CommunalWidgetItem(uid = 2L, 2, "pk_2/cls_2", 2L),
+ CommunalWidgetItem(uid = 2L, 2, "pk_2/cls_2", 2L, 0),
CommunalItemRank(uid = 3L, rank = 3) to
- CommunalWidgetItem(uid = 3L, 3, "pk_3/cls_3", 3L),
+ CommunalWidgetItem(uid = 3L, 3, "pk_3/cls_3", 3L, 0),
CommunalItemRank(uid = 4L, rank = 4) to
- CommunalWidgetItem(uid = 4L, 4, "pk_4/cls_4", 4L),
+ CommunalWidgetItem(uid = 4L, 4, "pk_4/cls_4", 4L, 0),
)
fakeProviders.value =
mapOf(
@@ -192,9 +207,9 @@ class CommunalWidgetRepositoryImplTest : SysuiTestCase() {
fakeWidgets.value =
mapOf(
CommunalItemRank(uid = 1L, rank = 1) to
- CommunalWidgetItem(uid = 1L, 1, "pk_1/cls_1", 1L),
+ CommunalWidgetItem(uid = 1L, 1, "pk_1/cls_1", 1L, 0),
CommunalItemRank(uid = 2L, rank = 2) to
- CommunalWidgetItem(uid = 2L, 2, "pk_2/cls_2", 2L),
+ CommunalWidgetItem(uid = 2L, 2, "pk_2/cls_2", 2L, 0),
)
fakeProviders.value =
mapOf(
@@ -249,7 +264,6 @@ class CommunalWidgetRepositoryImplTest : SysuiTestCase() {
val provider = ComponentName("pkg_name", "cls_name")
val id = 1
val priority = 1
- val user = UserHandle(0)
whenever(communalWidgetHost.getAppWidgetInfo(id))
.thenReturn(PROVIDER_INFO_REQUIRES_CONFIGURATION)
whenever(
@@ -259,11 +273,12 @@ class CommunalWidgetRepositoryImplTest : SysuiTestCase() {
)
)
.thenReturn(id)
- underTest.addWidget(provider, user, priority, kosmos.widgetConfiguratorSuccess)
+ underTest.addWidget(provider, mainUser, priority, kosmos.widgetConfiguratorSuccess)
runCurrent()
- verify(communalWidgetHost).allocateIdAndBindWidget(provider, user)
- verify(communalWidgetDao).addWidget(id, provider, priority)
+ verify(communalWidgetHost).allocateIdAndBindWidget(provider, mainUser)
+ verify(communalWidgetDao)
+ .addWidget(id, provider, priority, testUserSerialNumber(mainUser))
// Verify backup requested
verify(backupManager).dataChanged()
@@ -275,7 +290,6 @@ class CommunalWidgetRepositoryImplTest : SysuiTestCase() {
val provider = ComponentName("pkg_name", "cls_name")
val id = 1
val priority = 1
- val user = UserHandle(0)
whenever(communalWidgetHost.getAppWidgetInfo(id))
.thenReturn(PROVIDER_INFO_REQUIRES_CONFIGURATION)
whenever(
@@ -285,11 +299,12 @@ class CommunalWidgetRepositoryImplTest : SysuiTestCase() {
)
)
.thenReturn(id)
- underTest.addWidget(provider, user, priority, kosmos.widgetConfiguratorFail)
+ underTest.addWidget(provider, mainUser, priority, kosmos.widgetConfiguratorFail)
runCurrent()
- verify(communalWidgetHost).allocateIdAndBindWidget(provider, user)
- verify(communalWidgetDao, never()).addWidget(id, provider, priority)
+ verify(communalWidgetHost).allocateIdAndBindWidget(provider, mainUser)
+ verify(communalWidgetDao, never())
+ .addWidget(anyInt(), any<ComponentName>(), anyInt(), anyInt())
verify(appWidgetHost).deleteAppWidgetId(id)
// Verify backup not requested
@@ -302,7 +317,6 @@ class CommunalWidgetRepositoryImplTest : SysuiTestCase() {
val provider = ComponentName("pkg_name", "cls_name")
val id = 1
val priority = 1
- val user = UserHandle(0)
whenever(communalWidgetHost.getAppWidgetInfo(id))
.thenReturn(PROVIDER_INFO_REQUIRES_CONFIGURATION)
whenever(
@@ -312,13 +326,14 @@ class CommunalWidgetRepositoryImplTest : SysuiTestCase() {
)
)
.thenReturn(id)
- underTest.addWidget(provider, user, priority) {
+ underTest.addWidget(provider, mainUser, priority) {
throw IllegalStateException("some error")
}
runCurrent()
- verify(communalWidgetHost).allocateIdAndBindWidget(provider, user)
- verify(communalWidgetDao, never()).addWidget(id, provider, priority)
+ verify(communalWidgetHost).allocateIdAndBindWidget(provider, mainUser)
+ verify(communalWidgetDao, never())
+ .addWidget(anyInt(), any<ComponentName>(), anyInt(), anyInt())
verify(appWidgetHost).deleteAppWidgetId(id)
// Verify backup not requested
@@ -331,7 +346,6 @@ class CommunalWidgetRepositoryImplTest : SysuiTestCase() {
val provider = ComponentName("pkg_name", "cls_name")
val id = 1
val priority = 1
- val user = UserHandle(0)
whenever(communalWidgetHost.getAppWidgetInfo(id))
.thenReturn(PROVIDER_INFO_CONFIGURATION_OPTIONAL)
whenever(
@@ -341,11 +355,12 @@ class CommunalWidgetRepositoryImplTest : SysuiTestCase() {
)
)
.thenReturn(id)
- underTest.addWidget(provider, user, priority, kosmos.widgetConfiguratorFail)
+ underTest.addWidget(provider, mainUser, priority, kosmos.widgetConfiguratorFail)
runCurrent()
- verify(communalWidgetHost).allocateIdAndBindWidget(provider, user)
- verify(communalWidgetDao).addWidget(id, provider, priority)
+ verify(communalWidgetHost).allocateIdAndBindWidget(provider, mainUser)
+ verify(communalWidgetDao)
+ .addWidget(id, provider, priority, testUserSerialNumber(mainUser))
// Verify backup requested
verify(backupManager).dataChanged()
@@ -444,11 +459,8 @@ class CommunalWidgetRepositoryImplTest : SysuiTestCase() {
runCurrent()
// Verify state restored, and widget 2 skipped
- val restoredState =
- withArgCaptor<CommunalHubState> {
- verify(communalWidgetDao).restoreCommunalHubState(capture())
- }
- val restoredWidgets = restoredState.widgets.toList()
+ verify(communalWidgetDao).restoreCommunalHubState(communalHubStateCaptor.capture())
+ val restoredWidgets = communalHubStateCaptor.firstValue.widgets.toList()
assertThat(restoredWidgets).hasSize(1)
val restoredWidget = restoredWidgets.first()
@@ -474,11 +486,8 @@ class CommunalWidgetRepositoryImplTest : SysuiTestCase() {
runCurrent()
// Verify widget 1 and 2 are restored, and are now 11 and 12.
- val restoredState =
- withArgCaptor<CommunalHubState> {
- verify(communalWidgetDao).restoreCommunalHubState(capture())
- }
- val restoredWidgets = restoredState.widgets.toList()
+ verify(communalWidgetDao).restoreCommunalHubState(communalHubStateCaptor.capture())
+ val restoredWidgets = communalHubStateCaptor.firstValue.widgets.toList()
assertThat(restoredWidgets).hasSize(2)
val restoredWidget1 = restoredWidgets[0]
@@ -512,11 +521,8 @@ class CommunalWidgetRepositoryImplTest : SysuiTestCase() {
runCurrent()
// Verify widget 1 and 2 are restored, and are now 1 and 12.
- val restoredState =
- withArgCaptor<CommunalHubState> {
- verify(communalWidgetDao).restoreCommunalHubState(capture())
- }
- val restoredWidgets = restoredState.widgets.toList()
+ verify(communalWidgetDao).restoreCommunalHubState(communalHubStateCaptor.capture())
+ val restoredWidgets = communalHubStateCaptor.firstValue.widgets.toList()
assertThat(restoredWidgets).hasSize(2)
val restoredWidget1 = restoredWidgets[0]
@@ -533,14 +539,134 @@ class CommunalWidgetRepositoryImplTest : SysuiTestCase() {
}
@Test
+ fun restoreWidgets_undefinedUser_restoredAsMain() =
+ testScope.runTest {
+ // Write two widgets to file, both of which have user serial number undefined.
+ val fakeState =
+ CommunalHubState().apply {
+ widgets =
+ listOf(
+ CommunalHubState.CommunalWidgetItem().apply {
+ widgetId = 1
+ componentName = "pk_name/fake_widget_1"
+ rank = 1
+ userSerialNumber =
+ CommunalWidgetItem.USER_SERIAL_NUMBER_UNDEFINED
+ },
+ CommunalHubState.CommunalWidgetItem().apply {
+ widgetId = 2
+ componentName = "pk_name/fake_widget_2"
+ rank = 2
+ userSerialNumber =
+ CommunalWidgetItem.USER_SERIAL_NUMBER_UNDEFINED
+ },
+ )
+ .toTypedArray()
+ }
+ backupUtils.writeBytesToDisk(fakeState.toByteArray())
+
+ // Set up app widget host with widget ids.
+ setAppWidgetIds(listOf(11, 12))
+
+ // Restore widgets.
+ underTest.restoreWidgets(mapOf(Pair(1, 11), Pair(2, 12)))
+ runCurrent()
+
+ // Verify widget 1 and 2 are restored with the main user.
+ verify(communalWidgetDao).restoreCommunalHubState(communalHubStateCaptor.capture())
+ val restoredWidgets = communalHubStateCaptor.firstValue.widgets.toList()
+ assertThat(restoredWidgets).hasSize(2)
+
+ val restoredWidget1 = restoredWidgets[0]
+ assertThat(restoredWidget1.widgetId).isEqualTo(11)
+ assertThat(restoredWidget1.userSerialNumber).isEqualTo(testUserSerialNumber(mainUser))
+
+ val restoredWidget2 = restoredWidgets[1]
+ assertThat(restoredWidget2.widgetId).isEqualTo(12)
+ assertThat(restoredWidget2.userSerialNumber).isEqualTo(testUserSerialNumber(mainUser))
+ }
+
+ @Test
+ fun restoreWidgets_workProfileNotRestored_widgetSkipped() =
+ testScope.runTest {
+ // Write fake state to file
+ backupUtils.writeBytesToDisk(fakeStateWithWorkProfile.toByteArray())
+
+ // Set up app widget host with widget ids.
+ // (b/349852237) It's possible that the platform restores widgets even though their user
+ // is not restored.
+ setAppWidgetIds(listOf(11, 12))
+
+ // Restore widgets.
+ underTest.restoreWidgets(mapOf(Pair(1, 11), Pair(2, 12)))
+ runCurrent()
+
+ // Verify only widget 1 is restored. Widget 2 is skipped because it belongs to a work
+ // profile, which is not restored.
+ verify(communalWidgetDao).restoreCommunalHubState(communalHubStateCaptor.capture())
+ val restoredWidgets = communalHubStateCaptor.firstValue.widgets.toList()
+ assertThat(restoredWidgets).hasSize(1)
+
+ val restoredWidget = restoredWidgets[0]
+ assertThat(restoredWidget.widgetId).isEqualTo(11)
+ assertThat(restoredWidget.userSerialNumber).isEqualTo(testUserSerialNumber(mainUser))
+ }
+
+ @Test
+ fun restoreWidgets_workProfileRestored_manuallyBindWidget() =
+ testScope.runTest {
+ // Write fake state to file
+ backupUtils.writeBytesToDisk(fakeStateWithWorkProfile.toByteArray())
+
+ // Set up app widget host with widget ids.
+ // (b/349852237) It's possible that the platform restores widgets even though their user
+ // is not restored.
+ setAppWidgetIds(listOf(11, 12))
+
+ // Restore work profile.
+ restoreUser(workProfile)
+
+ val newWidgetId = 13
+ whenever(communalWidgetHost.allocateIdAndBindWidget(any(), any()))
+ .thenReturn(newWidgetId)
+
+ // Restore widgets.
+ underTest.restoreWidgets(mapOf(Pair(1, 11), Pair(2, 12)))
+ runCurrent()
+
+ // Verify widget 1 is restored.
+ verify(communalWidgetDao).restoreCommunalHubState(communalHubStateCaptor.capture())
+ val restoredWidgets = communalHubStateCaptor.firstValue.widgets.toList()
+ assertThat(restoredWidgets).hasSize(1)
+
+ val restoredWidget = restoredWidgets[0]
+ assertThat(restoredWidget.widgetId).isEqualTo(11)
+ assertThat(restoredWidget.userSerialNumber).isEqualTo(testUserSerialNumber(mainUser))
+
+ // Verify widget 2 (now 12) is removed from platform
+ verify(appWidgetHost).deleteAppWidgetId(12)
+
+ // Verify work profile widget is manually bound
+ verify(communalWidgetDao)
+ .addWidget(
+ eq(newWidgetId),
+ componentNameCaptor.capture(),
+ eq(2),
+ eq(testUserSerialNumber(workProfile))
+ )
+ assertThat(componentNameCaptor.firstValue)
+ .isEqualTo(ComponentName("pk_name", "fake_widget_2"))
+ }
+
+ @Test
fun pendingWidgets() =
testScope.runTest {
fakeWidgets.value =
mapOf(
CommunalItemRank(uid = 1L, rank = 1) to
- CommunalWidgetItem(uid = 1L, 1, "pk_1/cls_1", 1L),
+ CommunalWidgetItem(uid = 1L, 1, "pk_1/cls_1", 1L, 0),
CommunalItemRank(uid = 2L, rank = 2) to
- CommunalWidgetItem(uid = 2L, 2, "pk_2/cls_2", 2L),
+ CommunalWidgetItem(uid = 2L, 2, "pk_2/cls_2", 2L, 0),
)
// Widget 1 is installed
@@ -554,7 +680,7 @@ class CommunalWidgetRepositoryImplTest : SysuiTestCase() {
sessionId = 1,
packageName = "pk_2",
icon = fakeIcon,
- user = UserHandle.CURRENT,
+ user = mainUser,
)
)
)
@@ -572,7 +698,7 @@ class CommunalWidgetRepositoryImplTest : SysuiTestCase() {
priority = 2,
packageName = "pk_2",
icon = fakeIcon,
- user = UserHandle.CURRENT,
+ user = mainUser,
),
)
}
@@ -583,7 +709,7 @@ class CommunalWidgetRepositoryImplTest : SysuiTestCase() {
fakeWidgets.value =
mapOf(
CommunalItemRank(uid = 1L, rank = 1) to
- CommunalWidgetItem(uid = 1L, 1, "pk_1/cls_1", 1L),
+ CommunalWidgetItem(uid = 1L, 1, "pk_1/cls_1", 1L, 0),
)
// Widget 1 is pending install
@@ -594,7 +720,7 @@ class CommunalWidgetRepositoryImplTest : SysuiTestCase() {
sessionId = 1,
packageName = "pk_1",
icon = fakeIcon,
- user = UserHandle.CURRENT,
+ user = mainUser,
)
)
)
@@ -607,7 +733,7 @@ class CommunalWidgetRepositoryImplTest : SysuiTestCase() {
priority = 1,
packageName = "pk_1",
icon = fakeIcon,
- user = UserHandle.CURRENT,
+ user = mainUser,
),
)
@@ -633,6 +759,20 @@ class CommunalWidgetRepositoryImplTest : SysuiTestCase() {
whenever(appWidgetHost.appWidgetIds).thenReturn(ids.toIntArray())
}
+ // Commonly the user id and user serial number are the same, but for testing purposes use a
+ // simple algorithm to map a user id to a different user serial number to make sure the correct
+ // value is used.
+ private fun testUserSerialNumber(user: UserHandle): Int {
+ return user.identifier + 100
+ }
+
+ private fun restoreUser(user: UserHandle) {
+ whenever(backupManager.getUserForAncestralSerialNumber(user.identifier.toLong()))
+ .thenReturn(user)
+ whenever(userManager.getUserSerialNumber(user.identifier))
+ .thenReturn(testUserSerialNumber(user))
+ }
+
private companion object {
val PROVIDER_INFO_REQUIRES_CONFIGURATION =
AppWidgetProviderInfo().apply { configure = ComponentName("test.pkg", "test.cmp") }
@@ -650,11 +790,32 @@ class CommunalWidgetRepositoryImplTest : SysuiTestCase() {
widgetId = 1
componentName = "pk_name/fake_widget_1"
rank = 1
+ userSerialNumber = 0
+ },
+ CommunalHubState.CommunalWidgetItem().apply {
+ widgetId = 2
+ componentName = "pk_name/fake_widget_2"
+ rank = 2
+ userSerialNumber = 0
+ },
+ )
+ .toTypedArray()
+ }
+ val fakeStateWithWorkProfile =
+ CommunalHubState().apply {
+ widgets =
+ listOf(
+ CommunalHubState.CommunalWidgetItem().apply {
+ widgetId = 1
+ componentName = "pk_name/fake_widget_1"
+ rank = 1
+ userSerialNumber = 0
},
CommunalHubState.CommunalWidgetItem().apply {
widgetId = 2
componentName = "pk_name/fake_widget_2"
rank = 2
+ userSerialNumber = 10
},
)
.toTypedArray()
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/domain/interactor/CommunalInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/domain/interactor/CommunalInteractorTest.kt
index 7b26db50814e..9539c0492056 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/domain/interactor/CommunalInteractorTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/domain/interactor/CommunalInteractorTest.kt
@@ -19,7 +19,6 @@ package com.android.systemui.communal.domain.interactor
import android.app.admin.DevicePolicyManager
import android.app.admin.devicePolicyManager
-import android.app.smartspace.SmartspaceTarget
import android.appwidget.AppWidgetProviderInfo
import android.content.Intent
import android.content.pm.UserInfo
@@ -36,14 +35,17 @@ import com.android.compose.animation.scene.ObservableTransitionState
import com.android.systemui.Flags.FLAG_COMMUNAL_HUB
import com.android.systemui.SysuiTestCase
import com.android.systemui.broadcast.broadcastDispatcher
+import com.android.systemui.communal.data.model.CommunalSmartspaceTimer
import com.android.systemui.communal.data.repository.FakeCommunalMediaRepository
import com.android.systemui.communal.data.repository.FakeCommunalPrefsRepository
import com.android.systemui.communal.data.repository.FakeCommunalSceneRepository
+import com.android.systemui.communal.data.repository.FakeCommunalSmartspaceRepository
import com.android.systemui.communal.data.repository.FakeCommunalTutorialRepository
import com.android.systemui.communal.data.repository.FakeCommunalWidgetRepository
import com.android.systemui.communal.data.repository.fakeCommunalMediaRepository
import com.android.systemui.communal.data.repository.fakeCommunalPrefsRepository
import com.android.systemui.communal.data.repository.fakeCommunalSceneRepository
+import com.android.systemui.communal.data.repository.fakeCommunalSmartspaceRepository
import com.android.systemui.communal.data.repository.fakeCommunalTutorialRepository
import com.android.systemui.communal.data.repository.fakeCommunalWidgetRepository
import com.android.systemui.communal.domain.model.CommunalContentModel
@@ -69,8 +71,6 @@ import com.android.systemui.scene.domain.interactor.sceneInteractor
import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.settings.FakeUserTracker
import com.android.systemui.settings.fakeUserTracker
-import com.android.systemui.smartspace.data.repository.FakeSmartspaceRepository
-import com.android.systemui.smartspace.data.repository.fakeSmartspaceRepository
import com.android.systemui.testKosmos
import com.android.systemui.user.data.repository.FakeUserRepository
import com.android.systemui.user.data.repository.fakeUserRepository
@@ -84,6 +84,7 @@ import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.flowOf
+import kotlinx.coroutines.test.advanceTimeBy
import kotlinx.coroutines.test.runCurrent
import kotlinx.coroutines.test.runTest
import org.junit.Before
@@ -114,7 +115,7 @@ class CommunalInteractorTest : SysuiTestCase() {
private lateinit var communalRepository: FakeCommunalSceneRepository
private lateinit var mediaRepository: FakeCommunalMediaRepository
private lateinit var widgetRepository: FakeCommunalWidgetRepository
- private lateinit var smartspaceRepository: FakeSmartspaceRepository
+ private lateinit var smartspaceRepository: FakeCommunalSmartspaceRepository
private lateinit var userRepository: FakeUserRepository
private lateinit var keyguardRepository: FakeKeyguardRepository
private lateinit var communalPrefsRepository: FakeCommunalPrefsRepository
@@ -135,7 +136,7 @@ class CommunalInteractorTest : SysuiTestCase() {
communalRepository = kosmos.fakeCommunalSceneRepository
mediaRepository = kosmos.fakeCommunalMediaRepository
widgetRepository = kosmos.fakeCommunalWidgetRepository
- smartspaceRepository = kosmos.fakeSmartspaceRepository
+ smartspaceRepository = kosmos.fakeCommunalSmartspaceRepository
userRepository = kosmos.fakeUserRepository
keyguardRepository = kosmos.fakeKeyguardRepository
editWidgetsActivityStarter = kosmos.editWidgetsActivityStarter
@@ -265,44 +266,6 @@ class CommunalInteractorTest : SysuiTestCase() {
}
@Test
- fun smartspace_onlyShowTimersWithRemoteViews() =
- testScope.runTest {
- // Keyguard showing, and tutorial completed.
- keyguardRepository.setKeyguardShowing(true)
- keyguardRepository.setKeyguardOccluded(false)
- tutorialRepository.setTutorialSettingState(HUB_MODE_TUTORIAL_COMPLETED)
-
- // Not a timer
- val target1 = mock(SmartspaceTarget::class.java)
- whenever(target1.smartspaceTargetId).thenReturn("target1")
- whenever(target1.featureType).thenReturn(SmartspaceTarget.FEATURE_WEATHER)
- whenever(target1.remoteViews).thenReturn(mock(RemoteViews::class.java))
- whenever(target1.creationTimeMillis).thenReturn(0L)
-
- // Does not have RemoteViews
- val target2 = mock(SmartspaceTarget::class.java)
- whenever(target2.smartspaceTargetId).thenReturn("target2")
- whenever(target2.featureType).thenReturn(SmartspaceTarget.FEATURE_TIMER)
- whenever(target2.remoteViews).thenReturn(null)
- whenever(target2.creationTimeMillis).thenReturn(0L)
-
- // Timer and has RemoteViews
- val target3 = mock(SmartspaceTarget::class.java)
- whenever(target3.smartspaceTargetId).thenReturn("target3")
- whenever(target3.featureType).thenReturn(SmartspaceTarget.FEATURE_TIMER)
- whenever(target3.remoteViews).thenReturn(mock(RemoteViews::class.java))
- whenever(target3.creationTimeMillis).thenReturn(0L)
-
- val targets = listOf(target1, target2, target3)
- smartspaceRepository.setCommunalSmartspaceTargets(targets)
-
- val smartspaceContent by collectLastValue(underTest.getOngoingContent(true))
- assertThat(smartspaceContent?.size).isEqualTo(1)
- assertThat(smartspaceContent?.get(0)?.key)
- .isEqualTo(CommunalContentModel.KEY.smartspace("target3"))
- }
-
- @Test
fun smartspaceDynamicSizing_oneCard_fullSize() =
testSmartspaceDynamicSizing(
totalTargets = 1,
@@ -387,12 +350,12 @@ class CommunalInteractorTest : SysuiTestCase() {
keyguardRepository.setKeyguardOccluded(false)
tutorialRepository.setTutorialSettingState(HUB_MODE_TUTORIAL_COMPLETED)
- val targets = mutableListOf<SmartspaceTarget>()
+ val targets = mutableListOf<CommunalSmartspaceTimer>()
for (index in 0 until totalTargets) {
targets.add(smartspaceTimer(index.toString()))
}
- smartspaceRepository.setCommunalSmartspaceTargets(targets)
+ smartspaceRepository.setTimers(targets)
val smartspaceContent by collectLastValue(underTest.getOngoingContent(true))
assertThat(smartspaceContent?.size).isEqualTo(totalTargets)
@@ -441,18 +404,18 @@ class CommunalInteractorTest : SysuiTestCase() {
// Timer1 started
val timer1 = smartspaceTimer("timer1", timestamp = 1L)
- smartspaceRepository.setCommunalSmartspaceTargets(listOf(timer1))
+ smartspaceRepository.setTimers(listOf(timer1))
// Umo started
mediaRepository.mediaActive(timestamp = 2L)
// Timer2 started
val timer2 = smartspaceTimer("timer2", timestamp = 3L)
- smartspaceRepository.setCommunalSmartspaceTargets(listOf(timer1, timer2))
+ smartspaceRepository.setTimers(listOf(timer1, timer2))
// Timer3 started
val timer3 = smartspaceTimer("timer3", timestamp = 4L)
- smartspaceRepository.setCommunalSmartspaceTargets(listOf(timer1, timer2, timer3))
+ smartspaceRepository.setTimers(listOf(timer1, timer2, timer3))
val ongoingContent by collectLastValue(underTest.getOngoingContent(true))
assertThat(ongoingContent?.size).isEqualTo(4)
@@ -1089,15 +1052,33 @@ class CommunalInteractorTest : SysuiTestCase() {
assertThat(showCommunalFromOccluded).isTrue()
}
- private fun smartspaceTimer(id: String, timestamp: Long = 0L): SmartspaceTarget {
- val timer = mock(SmartspaceTarget::class.java)
- whenever(timer.smartspaceTargetId).thenReturn(id)
- whenever(timer.featureType).thenReturn(SmartspaceTarget.FEATURE_TIMER)
- whenever(timer.remoteViews).thenReturn(mock(RemoteViews::class.java))
- whenever(timer.creationTimeMillis).thenReturn(timestamp)
- return timer
+ private fun smartspaceTimer(id: String, timestamp: Long = 0L): CommunalSmartspaceTimer {
+ return CommunalSmartspaceTimer(
+ smartspaceTargetId = id,
+ createdTimestampMillis = timestamp,
+ remoteViews = mock(RemoteViews::class.java)
+ )
}
+ @Test
+ fun dismissDisclaimerSetsDismissedFlag() =
+ testScope.runTest {
+ val disclaimerDismissed by collectLastValue(underTest.isDisclaimerDismissed)
+ assertThat(disclaimerDismissed).isFalse()
+ underTest.setDisclaimerDismissed()
+ assertThat(disclaimerDismissed).isTrue()
+ }
+
+ @Test
+ fun dismissDisclaimerTimeoutResetsDismissedFlag() =
+ testScope.runTest {
+ val disclaimerDismissed by collectLastValue(underTest.isDisclaimerDismissed)
+ underTest.setDisclaimerDismissed()
+ assertThat(disclaimerDismissed).isTrue()
+ advanceTimeBy(CommunalInteractor.DISCLAIMER_RESET_MILLIS)
+ assertThat(disclaimerDismissed).isFalse()
+ }
+
private fun setKeyguardFeaturesDisabled(user: UserInfo, disabledFlags: Int) {
whenever(kosmos.devicePolicyManager.getKeyguardDisabledFeatures(nullable(), eq(user.id)))
.thenReturn(disabledFlags)
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/domain/interactor/CommunalPrefsInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/domain/interactor/CommunalPrefsInteractorTest.kt
index 7b79d2817478..9a92f76f90c6 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/domain/interactor/CommunalPrefsInteractorTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/domain/interactor/CommunalPrefsInteractorTest.kt
@@ -74,40 +74,6 @@ class CommunalPrefsInteractorTest : SysuiTestCase() {
assertThat(isCtaDismissed).isFalse()
}
- @Test
- fun setDisclaimerDismissed_currentUser() =
- testScope.runTest {
- setSelectedUser(MAIN_USER)
- val isDisclaimerDismissed by collectLastValue(underTest.isDisclaimerDismissed)
-
- assertThat(isDisclaimerDismissed).isFalse()
- underTest.setDisclaimerDismissed(MAIN_USER)
- assertThat(isDisclaimerDismissed).isTrue()
- }
-
- @Test
- fun setDisclaimerDismissed_anotherUser() =
- testScope.runTest {
- setSelectedUser(MAIN_USER)
- val isDisclaimerDismissed by collectLastValue(underTest.isDisclaimerDismissed)
-
- assertThat(isDisclaimerDismissed).isFalse()
- underTest.setDisclaimerDismissed(SECONDARY_USER)
- assertThat(isDisclaimerDismissed).isFalse()
- }
-
- @Test
- fun isDisclaimerDismissed_userSwitch() =
- testScope.runTest {
- setSelectedUser(MAIN_USER)
- underTest.setDisclaimerDismissed(MAIN_USER)
- val isDisclaimerDismissed by collectLastValue(underTest.isDisclaimerDismissed)
-
- assertThat(isDisclaimerDismissed).isTrue()
- setSelectedUser(SECONDARY_USER)
- assertThat(isDisclaimerDismissed).isFalse()
- }
-
private suspend fun setSelectedUser(user: UserInfo) {
with(kosmos.fakeUserRepository) {
setUserInfos(listOf(user))
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/domain/interactor/CommunalSceneTransitionInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/domain/interactor/CommunalSceneTransitionInteractorTest.kt
new file mode 100644
index 000000000000..f7f70c154ce6
--- /dev/null
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/domain/interactor/CommunalSceneTransitionInteractorTest.kt
@@ -0,0 +1,685 @@
+/*
+ * 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.communal.domain.interactor
+
+import android.platform.test.annotations.EnableFlags
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.SmallTest
+import com.android.compose.animation.scene.ObservableTransitionState
+import com.android.compose.animation.scene.ObservableTransitionState.Idle
+import com.android.systemui.Flags.FLAG_COMMUNAL_HUB
+import com.android.systemui.Flags.FLAG_COMMUNAL_SCENE_KTF_REFACTOR
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.communal.data.repository.communalSceneRepository
+import com.android.systemui.communal.shared.model.CommunalScenes
+import com.android.systemui.coroutines.collectLastValue
+import com.android.systemui.coroutines.collectValues
+import com.android.systemui.flags.DisableSceneContainer
+import com.android.systemui.flags.Flags
+import com.android.systemui.flags.fakeFeatureFlagsClassic
+import com.android.systemui.keyguard.data.repository.fakeKeyguardRepository
+import com.android.systemui.keyguard.data.repository.keyguardTransitionRepository
+import com.android.systemui.keyguard.data.repository.realKeyguardTransitionRepository
+import com.android.systemui.keyguard.shared.model.KeyguardState.DREAMING
+import com.android.systemui.keyguard.shared.model.KeyguardState.GLANCEABLE_HUB
+import com.android.systemui.keyguard.shared.model.KeyguardState.LOCKSCREEN
+import com.android.systemui.keyguard.shared.model.KeyguardState.OCCLUDED
+import com.android.systemui.keyguard.shared.model.TransitionInfo
+import com.android.systemui.keyguard.shared.model.TransitionModeOnCanceled
+import com.android.systemui.keyguard.shared.model.TransitionState.CANCELED
+import com.android.systemui.keyguard.shared.model.TransitionState.FINISHED
+import com.android.systemui.keyguard.shared.model.TransitionState.RUNNING
+import com.android.systemui.keyguard.shared.model.TransitionState.STARTED
+import com.android.systemui.keyguard.shared.model.TransitionStep
+import com.android.systemui.kosmos.testScope
+import com.android.systemui.testKosmos
+import com.google.common.truth.Truth.assertThat
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.flow.MutableSharedFlow
+import kotlinx.coroutines.flow.MutableStateFlow
+import kotlinx.coroutines.flow.flowOf
+import kotlinx.coroutines.launch
+import kotlinx.coroutines.test.runCurrent
+import kotlinx.coroutines.test.runTest
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+
+@OptIn(ExperimentalCoroutinesApi::class)
+@SmallTest
+@RunWith(AndroidJUnit4::class)
+@EnableFlags(FLAG_COMMUNAL_HUB, FLAG_COMMUNAL_SCENE_KTF_REFACTOR)
+@DisableSceneContainer
+class CommunalSceneTransitionInteractorTest : SysuiTestCase() {
+
+ private val kosmos =
+ testKosmos().apply { keyguardTransitionRepository = realKeyguardTransitionRepository }
+ private val testScope = kosmos.testScope
+
+ private val underTest by lazy { kosmos.communalSceneTransitionInteractor }
+ private val keyguardTransitionRepository by lazy { kosmos.realKeyguardTransitionRepository }
+
+ private val ownerName = CommunalSceneTransitionInteractor::class.java.simpleName
+ private val progress = MutableSharedFlow<Float>()
+
+ private val sceneTransitions =
+ MutableStateFlow<ObservableTransitionState>(Idle(CommunalScenes.Blank))
+
+ private val blankToHub =
+ ObservableTransitionState.Transition(
+ fromScene = CommunalScenes.Blank,
+ toScene = CommunalScenes.Communal,
+ currentScene = flowOf(CommunalScenes.Blank),
+ progress = progress,
+ isInitiatedByUserInput = false,
+ isUserInputOngoing = flowOf(false),
+ )
+
+ private val hubToBlank =
+ ObservableTransitionState.Transition(
+ fromScene = CommunalScenes.Communal,
+ toScene = CommunalScenes.Blank,
+ currentScene = flowOf(CommunalScenes.Communal),
+ progress = progress,
+ isInitiatedByUserInput = false,
+ isUserInputOngoing = flowOf(false),
+ )
+
+ @Before
+ fun setup() {
+ kosmos.fakeFeatureFlagsClassic.set(Flags.COMMUNAL_SERVICE_ENABLED, true)
+ underTest.start()
+ kosmos.communalSceneRepository.setTransitionState(sceneTransitions)
+ testScope.launch { keyguardTransitionRepository.emitInitialStepsFromOff(LOCKSCREEN) }
+ }
+
+ /** Transition from blank to glanceable hub. This is the default case. */
+ @Test
+ fun transition_from_blank_end_in_hub() =
+ testScope.runTest {
+ sceneTransitions.value = blankToHub
+
+ val currentStep by collectLastValue(keyguardTransitionRepository.transitions)
+
+ assertThat(currentStep)
+ .isEqualTo(
+ TransitionStep(
+ from = LOCKSCREEN,
+ to = GLANCEABLE_HUB,
+ transitionState = STARTED,
+ value = 0f,
+ ownerName = ownerName,
+ )
+ )
+
+ progress.emit(0.4f)
+ assertThat(currentStep)
+ .isEqualTo(
+ TransitionStep(
+ from = LOCKSCREEN,
+ to = GLANCEABLE_HUB,
+ transitionState = RUNNING,
+ value = 0.4f,
+ ownerName = ownerName,
+ )
+ )
+
+ progress.emit(1f)
+ assertThat(currentStep)
+ .isEqualTo(
+ TransitionStep(
+ from = LOCKSCREEN,
+ to = GLANCEABLE_HUB,
+ transitionState = RUNNING,
+ value = 1f,
+ ownerName = ownerName,
+ )
+ )
+
+ sceneTransitions.value = Idle(CommunalScenes.Communal)
+ assertThat(currentStep)
+ .isEqualTo(
+ TransitionStep(
+ from = LOCKSCREEN,
+ to = GLANCEABLE_HUB,
+ transitionState = FINISHED,
+ value = 1f,
+ ownerName = ownerName,
+ )
+ )
+ }
+
+ /** Transition from hub to lockscreen. */
+ @Test
+ fun transition_from_hub_end_in_lockscreen() =
+ testScope.runTest {
+ sceneTransitions.value = hubToBlank
+
+ val currentStep by collectLastValue(keyguardTransitionRepository.transitions)
+
+ assertThat(currentStep)
+ .isEqualTo(
+ TransitionStep(
+ from = GLANCEABLE_HUB,
+ to = LOCKSCREEN,
+ transitionState = STARTED,
+ value = 0f,
+ ownerName = ownerName,
+ )
+ )
+
+ progress.emit(0.4f)
+ assertThat(currentStep)
+ .isEqualTo(
+ TransitionStep(
+ from = GLANCEABLE_HUB,
+ to = LOCKSCREEN,
+ transitionState = RUNNING,
+ value = 0.4f,
+ ownerName = ownerName,
+ )
+ )
+
+ sceneTransitions.value = Idle(CommunalScenes.Blank)
+ assertThat(currentStep)
+ .isEqualTo(
+ TransitionStep(
+ from = GLANCEABLE_HUB,
+ to = LOCKSCREEN,
+ transitionState = FINISHED,
+ value = 1f,
+ ownerName = ownerName,
+ )
+ )
+ }
+
+ /** Transition from hub to dream. */
+ @Test
+ fun transition_from_hub_end_in_dream() =
+ testScope.runTest {
+ kosmos.fakeKeyguardRepository.setDreaming(true)
+ runCurrent()
+
+ sceneTransitions.value = hubToBlank
+
+ val currentStep by collectLastValue(keyguardTransitionRepository.transitions)
+
+ assertThat(currentStep)
+ .isEqualTo(
+ TransitionStep(
+ from = GLANCEABLE_HUB,
+ to = DREAMING,
+ transitionState = STARTED,
+ value = 0f,
+ ownerName = ownerName,
+ )
+ )
+
+ progress.emit(0.4f)
+ assertThat(currentStep)
+ .isEqualTo(
+ TransitionStep(
+ from = GLANCEABLE_HUB,
+ to = DREAMING,
+ transitionState = RUNNING,
+ value = 0.4f,
+ ownerName = ownerName,
+ )
+ )
+
+ sceneTransitions.value = Idle(CommunalScenes.Blank)
+ assertThat(currentStep)
+ .isEqualTo(
+ TransitionStep(
+ from = GLANCEABLE_HUB,
+ to = DREAMING,
+ transitionState = FINISHED,
+ value = 1f,
+ ownerName = ownerName,
+ )
+ )
+ }
+
+ /** Transition from blank to hub, then settle back in blank. */
+ @Test
+ fun transition_from_blank_end_in_blank() =
+ testScope.runTest {
+ sceneTransitions.value = blankToHub
+
+ val currentStep by collectLastValue(keyguardTransitionRepository.transitions)
+ val allSteps by collectValues(keyguardTransitionRepository.transitions)
+
+ assertThat(currentStep)
+ .isEqualTo(
+ TransitionStep(
+ from = LOCKSCREEN,
+ to = GLANCEABLE_HUB,
+ transitionState = STARTED,
+ value = 0f,
+ ownerName = ownerName,
+ )
+ )
+
+ progress.emit(0.4f)
+ assertThat(currentStep)
+ .isEqualTo(
+ TransitionStep(
+ from = LOCKSCREEN,
+ to = GLANCEABLE_HUB,
+ transitionState = RUNNING,
+ value = 0.4f,
+ ownerName = ownerName,
+ )
+ )
+
+ val numToDrop = allSteps.size
+ // Settle back in blank
+ sceneTransitions.value = Idle(CommunalScenes.Blank)
+
+ // Assert that KTF reversed transition back to lockscreen.
+ assertThat(allSteps.drop(numToDrop))
+ .containsExactly(
+ TransitionStep(
+ from = LOCKSCREEN,
+ to = GLANCEABLE_HUB,
+ transitionState = CANCELED,
+ value = 0.4f,
+ ownerName = ownerName,
+ ),
+ // Transition back to lockscreen
+ TransitionStep(
+ from = GLANCEABLE_HUB,
+ to = LOCKSCREEN,
+ transitionState = STARTED,
+ value = 0.6f,
+ ownerName = ownerName,
+ ),
+ TransitionStep(
+ from = GLANCEABLE_HUB,
+ to = LOCKSCREEN,
+ transitionState = FINISHED,
+ value = 1f,
+ ownerName = ownerName,
+ ),
+ )
+ .inOrder()
+ }
+
+ @Test
+ fun transition_to_occluded_with_changed_scene_respected_just_once() =
+ testScope.runTest {
+ underTest.onSceneAboutToChange(CommunalScenes.Blank, OCCLUDED)
+ runCurrent()
+ sceneTransitions.value = hubToBlank
+
+ val currentStep by collectLastValue(keyguardTransitionRepository.transitions)
+
+ assertThat(currentStep)
+ .isEqualTo(
+ TransitionStep(
+ from = GLANCEABLE_HUB,
+ to = OCCLUDED,
+ transitionState = STARTED,
+ value = 0f,
+ ownerName = ownerName,
+ )
+ )
+
+ sceneTransitions.value = blankToHub
+ assertThat(currentStep)
+ .isEqualTo(
+ TransitionStep(
+ from = OCCLUDED,
+ to = GLANCEABLE_HUB,
+ transitionState = STARTED,
+ value = 0f,
+ ownerName = ownerName,
+ )
+ )
+
+ sceneTransitions.value = hubToBlank
+ assertThat(currentStep)
+ .isEqualTo(
+ TransitionStep(
+ from = GLANCEABLE_HUB,
+ to = LOCKSCREEN,
+ transitionState = STARTED,
+ value = 0f,
+ ownerName = ownerName,
+ )
+ )
+ }
+
+ @Test
+ fun transition_from_blank_interrupted() =
+ testScope.runTest {
+ sceneTransitions.value = blankToHub
+
+ val currentStep by collectLastValue(keyguardTransitionRepository.transitions)
+ val allSteps by collectValues(keyguardTransitionRepository.transitions)
+
+ assertThat(currentStep)
+ .isEqualTo(
+ TransitionStep(
+ from = LOCKSCREEN,
+ to = GLANCEABLE_HUB,
+ transitionState = STARTED,
+ value = 0f,
+ ownerName = ownerName,
+ )
+ )
+
+ progress.emit(0.4f)
+ assertThat(currentStep)
+ .isEqualTo(
+ TransitionStep(
+ from = LOCKSCREEN,
+ to = GLANCEABLE_HUB,
+ transitionState = RUNNING,
+ value = 0.4f,
+ ownerName = ownerName,
+ )
+ )
+
+ val numToDrop = allSteps.size
+ // Transition back from hub to blank, interrupting
+ // the current transition.
+ sceneTransitions.value = hubToBlank
+
+ assertThat(allSteps.drop(numToDrop))
+ .containsExactly(
+ TransitionStep(
+ from = LOCKSCREEN,
+ to = GLANCEABLE_HUB,
+ value = 1f,
+ transitionState = FINISHED,
+ ownerName = ownerName,
+ ),
+ TransitionStep(
+ from = GLANCEABLE_HUB,
+ to = LOCKSCREEN,
+ value = 0f,
+ transitionState = STARTED,
+ ownerName = ownerName,
+ ),
+ )
+ .inOrder()
+
+ progress.emit(0.1f)
+ assertThat(currentStep)
+ .isEqualTo(
+ TransitionStep(
+ from = GLANCEABLE_HUB,
+ to = LOCKSCREEN,
+ transitionState = RUNNING,
+ value = 0.1f,
+ ownerName = ownerName,
+ )
+ )
+ }
+
+ /**
+ * Blank -> Hub transition interrupted by a new Blank -> Hub transition. KTF state should not be
+ * updated in this case.
+ */
+ @Test
+ fun transition_to_hub_duplicate_does_not_change_ktf() =
+ testScope.runTest {
+ sceneTransitions.value =
+ ObservableTransitionState.Transition(
+ fromScene = CommunalScenes.Blank,
+ toScene = CommunalScenes.Communal,
+ currentScene = flowOf(CommunalScenes.Blank),
+ progress = progress,
+ isInitiatedByUserInput = false,
+ isUserInputOngoing = flowOf(false),
+ )
+
+ val currentStep by collectLastValue(keyguardTransitionRepository.transitions)
+ val allSteps by collectValues(keyguardTransitionRepository.transitions)
+
+ assertThat(currentStep)
+ .isEqualTo(
+ TransitionStep(
+ from = LOCKSCREEN,
+ to = GLANCEABLE_HUB,
+ transitionState = STARTED,
+ value = 0f,
+ ownerName = ownerName,
+ )
+ )
+
+ progress.emit(0.4f)
+ assertThat(currentStep)
+ .isEqualTo(
+ TransitionStep(
+ from = LOCKSCREEN,
+ to = GLANCEABLE_HUB,
+ transitionState = RUNNING,
+ value = 0.4f,
+ ownerName = ownerName,
+ )
+ )
+
+ val sizeBefore = allSteps.size
+ val newProgress = MutableSharedFlow<Float>()
+ sceneTransitions.value =
+ ObservableTransitionState.Transition(
+ fromScene = CommunalScenes.Blank,
+ toScene = CommunalScenes.Communal,
+ currentScene = flowOf(CommunalScenes.Blank),
+ progress = newProgress,
+ isInitiatedByUserInput = true,
+ isUserInputOngoing = flowOf(true),
+ )
+
+ // No new KTF steps emitted as a result of the new transition.
+ assertThat(allSteps).hasSize(sizeBefore)
+
+ // Progress is now tracked by the new flow.
+ newProgress.emit(0.1f)
+ assertThat(currentStep)
+ .isEqualTo(
+ TransitionStep(
+ from = LOCKSCREEN,
+ to = GLANCEABLE_HUB,
+ transitionState = RUNNING,
+ value = 0.1f,
+ ownerName = ownerName,
+ )
+ )
+ }
+
+ /**
+ * STL: Hub -> Blank, then interrupt in KTF LS -> OCCLUDED, then STL still finishes in Blank.
+ * After a KTF transition is started (GLANCEABLE_HUB -> LOCKSCREEN) KTF immediately considers
+ * the active scene to be LOCKSCREEN. This means that all listeners for LOCKSCREEN are active
+ * and may start a new transition LOCKSCREEN -> *. Here we test LOCKSCREEN -> OCCLUDED.
+ *
+ * KTF is allowed to already start and play the other transition, while the STL transition may
+ * finish later (gesture completes much later). When we eventually settle the STL transition in
+ * Blank we do not want to force KTF back to its original destination (LOCKSCREEN). Instead, for
+ * this scenario the settle can be ignored.
+ */
+ @Test
+ fun transition_to_blank_interrupted_by_ktf_transition_then_finish_in_blank() =
+ testScope.runTest {
+ sceneTransitions.value = hubToBlank
+
+ val currentStep by collectLastValue(keyguardTransitionRepository.transitions)
+
+ assertThat(currentStep)
+ .isEqualTo(
+ TransitionStep(
+ from = GLANCEABLE_HUB,
+ to = LOCKSCREEN,
+ transitionState = STARTED,
+ value = 0f,
+ ownerName = ownerName,
+ )
+ )
+
+ progress.emit(0.4f)
+ assertThat(currentStep)
+ .isEqualTo(
+ TransitionStep(
+ from = GLANCEABLE_HUB,
+ to = LOCKSCREEN,
+ transitionState = RUNNING,
+ value = 0.4f,
+ ownerName = ownerName,
+ )
+ )
+
+ // Start another transition externally while our scene
+ // transition is happening.
+ keyguardTransitionRepository.startTransition(
+ TransitionInfo(
+ ownerName = "external",
+ from = LOCKSCREEN,
+ to = OCCLUDED,
+ animator = null,
+ modeOnCanceled = TransitionModeOnCanceled.RESET
+ )
+ )
+
+ assertThat(currentStep)
+ .isEqualTo(
+ TransitionStep(
+ from = LOCKSCREEN,
+ to = OCCLUDED,
+ transitionState = STARTED,
+ value = 0f,
+ ownerName = "external",
+ )
+ )
+
+ // Scene progress should not affect KTF transition anymore
+ progress.emit(0.7f)
+ assertThat(currentStep)
+ .isEqualTo(
+ TransitionStep(
+ from = LOCKSCREEN,
+ to = OCCLUDED,
+ transitionState = STARTED,
+ value = 0f,
+ ownerName = "external",
+ )
+ )
+
+ // Scene transition still finishes but should not impact KTF transition
+ sceneTransitions.value = Idle(CommunalScenes.Blank)
+
+ assertThat(currentStep)
+ .isEqualTo(
+ TransitionStep(
+ from = LOCKSCREEN,
+ to = OCCLUDED,
+ transitionState = STARTED,
+ value = 0f,
+ ownerName = "external",
+ )
+ )
+ }
+
+ /**
+ * STL: Hub -> Blank, then interrupt in KTF LS -> OCCLUDED, then STL finishes back in Hub.
+ *
+ * This is similar to the previous scenario but the gesture may have been interrupted by any
+ * other transition. KTF needs to immediately finish in GLANCEABLE_HUB (there is a jump cut).
+ */
+ @Test
+ fun transition_to_blank_interrupted_by_ktf_transition_then_finish_in_hub() =
+ testScope.runTest {
+ sceneTransitions.value = hubToBlank
+
+ val currentStep by collectLastValue(keyguardTransitionRepository.transitions)
+
+ assertThat(currentStep)
+ .isEqualTo(
+ TransitionStep(
+ from = GLANCEABLE_HUB,
+ to = LOCKSCREEN,
+ transitionState = STARTED,
+ value = 0f,
+ ownerName = ownerName,
+ )
+ )
+
+ progress.emit(0.4f)
+ assertThat(currentStep)
+ .isEqualTo(
+ TransitionStep(
+ from = GLANCEABLE_HUB,
+ to = LOCKSCREEN,
+ transitionState = RUNNING,
+ value = 0.4f,
+ ownerName = ownerName,
+ )
+ )
+
+ // Start another transition externally while our scene
+ // transition is happening.
+ keyguardTransitionRepository.startTransition(
+ TransitionInfo(
+ ownerName = "external",
+ from = LOCKSCREEN,
+ to = OCCLUDED,
+ animator = null,
+ modeOnCanceled = TransitionModeOnCanceled.RESET
+ )
+ )
+
+ assertThat(currentStep)
+ .isEqualTo(
+ TransitionStep(
+ from = LOCKSCREEN,
+ to = OCCLUDED,
+ transitionState = STARTED,
+ value = 0f,
+ ownerName = "external",
+ )
+ )
+
+ // Scene progress should not affect KTF transition anymore
+ progress.emit(0.7f)
+ assertThat(currentStep)
+ .isEqualTo(
+ TransitionStep(
+ from = LOCKSCREEN,
+ to = OCCLUDED,
+ transitionState = STARTED,
+ value = 0f,
+ ownerName = "external",
+ )
+ )
+
+ // We land back in communal.
+ sceneTransitions.value = Idle(CommunalScenes.Communal)
+
+ assertThat(currentStep)
+ .isEqualTo(
+ TransitionStep(
+ from = OCCLUDED,
+ to = GLANCEABLE_HUB,
+ transitionState = FINISHED,
+ value = 1f,
+ ownerName = ownerName,
+ )
+ )
+ }
+}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/domain/interactor/CommunalSettingsInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/domain/interactor/CommunalSettingsInteractorTest.kt
new file mode 100644
index 000000000000..e4916b1a7e46
--- /dev/null
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/domain/interactor/CommunalSettingsInteractorTest.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.systemui.communal.domain.interactor
+
+import android.app.admin.DevicePolicyManager
+import android.app.admin.devicePolicyManager
+import android.content.Intent
+import android.content.pm.UserInfo
+import android.os.UserManager
+import android.os.userManager
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.SmallTest
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.broadcast.broadcastDispatcher
+import com.android.systemui.coroutines.collectLastValue
+import com.android.systemui.kosmos.testScope
+import com.android.systemui.settings.FakeUserTracker
+import com.android.systemui.settings.fakeUserTracker
+import com.android.systemui.testKosmos
+import com.android.systemui.user.data.repository.FakeUserRepository
+import com.android.systemui.user.data.repository.fakeUserRepository
+import kotlinx.coroutines.test.runTest
+import org.junit.Assert.assertEquals
+import org.junit.Assert.assertNotNull
+import org.junit.Assert.assertNull
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.ArgumentMatchers
+import org.mockito.kotlin.anyOrNull
+import org.mockito.kotlin.whenever
+
+@SmallTest
+@RunWith(AndroidJUnit4::class)
+class CommunalSettingsInteractorTest : SysuiTestCase() {
+
+ private lateinit var userManager: UserManager
+ private lateinit var userRepository: FakeUserRepository
+ private lateinit var userTracker: FakeUserTracker
+
+ private val kosmos = testKosmos()
+ private val testScope = kosmos.testScope
+
+ private lateinit var underTest: CommunalSettingsInteractor
+
+ @Before
+ fun setUp() {
+ userManager = kosmos.userManager
+ userRepository = kosmos.fakeUserRepository
+ userTracker = kosmos.fakeUserTracker
+
+ val userInfos = listOf(MAIN_USER_INFO, USER_INFO_WORK)
+ userRepository.setUserInfos(userInfos)
+ userTracker.set(
+ userInfos = userInfos,
+ selectedUserIndex = 0,
+ )
+
+ underTest = kosmos.communalSettingsInteractor
+ }
+
+ @Test
+ fun filterUsers_dontFilteredUsersWhenAllAreAllowed() =
+ testScope.runTest {
+ // If no users have any keyguard features disabled...
+ val disallowedUser by
+ collectLastValue(underTest.workProfileUserDisallowedByDevicePolicy)
+ // ...then the disallowed user should be null
+ assertNull(disallowedUser)
+ }
+
+ @Test
+ fun filterUsers_filterWorkProfileUserWhenDisallowed() =
+ testScope.runTest {
+ // If the work profile user has keyguard widgets disabled...
+ setKeyguardFeaturesDisabled(
+ USER_INFO_WORK,
+ DevicePolicyManager.KEYGUARD_DISABLE_WIDGETS_ALL
+ )
+ // ...then the disallowed user match the work profile
+ val disallowedUser by
+ collectLastValue(underTest.workProfileUserDisallowedByDevicePolicy)
+ assertNotNull(disallowedUser)
+ assertEquals(USER_INFO_WORK.id, disallowedUser!!.id)
+ }
+
+ private fun setKeyguardFeaturesDisabled(user: UserInfo, disabledFlags: Int) {
+ whenever(
+ kosmos.devicePolicyManager.getKeyguardDisabledFeatures(
+ anyOrNull(),
+ ArgumentMatchers.eq(user.id)
+ )
+ )
+ .thenReturn(disabledFlags)
+ kosmos.broadcastDispatcher.sendIntentToMatchingReceiversOnly(
+ context,
+ Intent(DevicePolicyManager.ACTION_DEVICE_POLICY_MANAGER_STATE_CHANGED),
+ )
+ }
+
+ private companion object {
+ val MAIN_USER_INFO = UserInfo(0, "primary", UserInfo.FLAG_MAIN)
+ val USER_INFO_WORK =
+ UserInfo(
+ 10,
+ "work",
+ /* iconPath= */ "",
+ /* flags= */ 0,
+ UserManager.USER_TYPE_PROFILE_MANAGED,
+ )
+ }
+}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/smartspace/SmartspaceInteractionHandlerTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/smartspace/SmartspaceInteractionHandlerTest.kt
index 0cd3fb28e299..d51d3567dd8d 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/smartspace/SmartspaceInteractionHandlerTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/smartspace/SmartspaceInteractionHandlerTest.kt
@@ -26,14 +26,23 @@ import androidx.core.util.component2
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
+import com.android.systemui.communal.domain.interactor.communalSceneInteractor
+import com.android.systemui.communal.widgets.CommunalTransitionAnimatorController
import com.android.systemui.communal.widgets.SmartspaceAppWidgetHostView
+import com.android.systemui.coroutines.collectLastValue
+import com.android.systemui.kosmos.testScope
import com.android.systemui.plugins.ActivityStarter
+import com.android.systemui.testKosmos
+import kotlinx.coroutines.test.runTest
+import org.junit.Assert.assertFalse
+import org.junit.Assert.assertTrue
+import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
+import org.mockito.kotlin.any
import org.mockito.kotlin.eq
import org.mockito.kotlin.isNull
import org.mockito.kotlin.mock
-import org.mockito.kotlin.notNull
import org.mockito.kotlin.refEq
import org.mockito.kotlin.verify
@@ -41,6 +50,7 @@ import org.mockito.kotlin.verify
@RunWith(AndroidJUnit4::class)
class SmartspaceInteractionHandlerTest : SysuiTestCase() {
private val activityStarter = mock<ActivityStarter>()
+ private val kosmos = testKosmos()
private val testIntent =
PendingIntent.getActivity(
@@ -51,29 +61,43 @@ class SmartspaceInteractionHandlerTest : SysuiTestCase() {
)
private val testResponse = RemoteResponse.fromPendingIntent(testIntent)
- private val underTest: SmartspaceInteractionHandler by lazy {
- SmartspaceInteractionHandler(activityStarter)
+ private lateinit var underTest: SmartspaceInteractionHandler
+
+ @Before
+ fun setUp() {
+ with(kosmos) {
+ underTest = SmartspaceInteractionHandler(activityStarter, communalSceneInteractor)
+ }
}
@Test
fun launchAnimatorIsUsedForSmartspaceView() {
- val parent = FrameLayout(context)
- val view = SmartspaceAppWidgetHostView(context)
- parent.addView(view)
- val (fillInIntent, activityOptions) = testResponse.getLaunchOptions(view)
+ with(kosmos) {
+ testScope.runTest {
+ val launching by collectLastValue(communalSceneInteractor.isLaunchingWidget)
+ assertFalse(launching!!)
- underTest.onInteraction(view, testIntent, testResponse)
+ val parent = FrameLayout(context)
+ val view = SmartspaceAppWidgetHostView(context)
+ parent.addView(view)
+ val (fillInIntent, activityOptions) = testResponse.getLaunchOptions(view)
- // Verify that we pass in a non-null animation controller
- verify(activityStarter)
- .startPendingIntentWithoutDismissing(
- /* intent = */ eq(testIntent),
- /* dismissShade = */ eq(false),
- /* intentSentUiThreadCallback = */ isNull(),
- /* animationController = */ notNull(),
- /* fillInIntent = */ refEq(fillInIntent),
- /* extraOptions = */ refEq(activityOptions.toBundle()),
- )
+ underTest.onInteraction(view, testIntent, testResponse)
+
+ // Verify that we set the state correctly
+ assertTrue(launching!!)
+ // Verify that we pass in a non-null Communal animation controller
+ verify(activityStarter)
+ .startPendingIntentWithoutDismissing(
+ /* intent = */ eq(testIntent),
+ /* dismissShade = */ eq(false),
+ /* intentSentUiThreadCallback = */ isNull(),
+ /* animationController = */ any<CommunalTransitionAnimatorController>(),
+ /* fillInIntent = */ refEq(fillInIntent),
+ /* extraOptions = */ refEq(activityOptions.toBundle()),
+ )
+ }
+ }
}
@Test
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/view/viewmodel/CommunalEditModeViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/view/viewmodel/CommunalEditModeViewModelTest.kt
index 0190ccba3caa..f8906adc33d4 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/view/viewmodel/CommunalEditModeViewModelTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/view/viewmodel/CommunalEditModeViewModelTest.kt
@@ -16,7 +16,6 @@
package com.android.systemui.communal.view.viewmodel
-import android.app.smartspace.SmartspaceTarget
import android.appwidget.AppWidgetProviderInfo
import android.content.ActivityNotFoundException
import android.content.Intent
@@ -32,12 +31,16 @@ import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.internal.logging.UiEventLogger
import com.android.systemui.SysuiTestCase
+import com.android.systemui.communal.data.model.CommunalSmartspaceTimer
import com.android.systemui.communal.data.repository.FakeCommunalMediaRepository
+import com.android.systemui.communal.data.repository.FakeCommunalSmartspaceRepository
import com.android.systemui.communal.data.repository.FakeCommunalTutorialRepository
import com.android.systemui.communal.data.repository.FakeCommunalWidgetRepository
import com.android.systemui.communal.data.repository.fakeCommunalMediaRepository
+import com.android.systemui.communal.data.repository.fakeCommunalSmartspaceRepository
import com.android.systemui.communal.data.repository.fakeCommunalTutorialRepository
import com.android.systemui.communal.data.repository.fakeCommunalWidgetRepository
+import com.android.systemui.communal.domain.interactor.CommunalInteractor
import com.android.systemui.communal.domain.interactor.CommunalSceneInteractor
import com.android.systemui.communal.domain.interactor.communalInteractor
import com.android.systemui.communal.domain.interactor.communalPrefsInteractor
@@ -57,13 +60,12 @@ import com.android.systemui.kosmos.testScope
import com.android.systemui.log.logcatLogBuffer
import com.android.systemui.media.controls.ui.view.MediaHost
import com.android.systemui.settings.fakeUserTracker
-import com.android.systemui.smartspace.data.repository.FakeSmartspaceRepository
-import com.android.systemui.smartspace.data.repository.fakeSmartspaceRepository
import com.android.systemui.testKosmos
import com.android.systemui.user.data.repository.fakeUserRepository
import com.android.systemui.util.mockito.any
import com.android.systemui.util.mockito.whenever
import com.google.common.truth.Truth.assertThat
+import kotlinx.coroutines.test.advanceTimeBy
import kotlinx.coroutines.test.runTest
import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue
@@ -76,6 +78,8 @@ import org.mockito.Mockito
import org.mockito.Mockito.never
import org.mockito.Mockito.verify
import org.mockito.MockitoAnnotations
+import org.mockito.kotlin.eq
+import org.mockito.kotlin.spy
@SmallTest
@RunWith(AndroidJUnit4::class)
@@ -91,9 +95,10 @@ class CommunalEditModeViewModelTest : SysuiTestCase() {
private lateinit var tutorialRepository: FakeCommunalTutorialRepository
private lateinit var widgetRepository: FakeCommunalWidgetRepository
- private lateinit var smartspaceRepository: FakeSmartspaceRepository
+ private lateinit var smartspaceRepository: FakeCommunalSmartspaceRepository
private lateinit var mediaRepository: FakeCommunalMediaRepository
private lateinit var communalSceneInteractor: CommunalSceneInteractor
+ private lateinit var communalInteractor: CommunalInteractor
private val testableResources = context.orCreateTestableResources
@@ -105,9 +110,10 @@ class CommunalEditModeViewModelTest : SysuiTestCase() {
tutorialRepository = kosmos.fakeCommunalTutorialRepository
widgetRepository = kosmos.fakeCommunalWidgetRepository
- smartspaceRepository = kosmos.fakeSmartspaceRepository
+ smartspaceRepository = kosmos.fakeCommunalSmartspaceRepository
mediaRepository = kosmos.fakeCommunalMediaRepository
communalSceneInteractor = kosmos.communalSceneInteractor
+ communalInteractor = spy(kosmos.communalInteractor)
kosmos.fakeUserRepository.setUserInfos(listOf(MAIN_USER_INFO))
kosmos.fakeUserTracker.set(
userInfos = listOf(MAIN_USER_INFO),
@@ -119,7 +125,7 @@ class CommunalEditModeViewModelTest : SysuiTestCase() {
underTest =
CommunalEditModeViewModel(
communalSceneInteractor,
- kosmos.communalInteractor,
+ communalInteractor,
kosmos.communalSettingsInteractor,
kosmos.keyguardTransitionInteractor,
mediaHost,
@@ -152,11 +158,15 @@ class CommunalEditModeViewModelTest : SysuiTestCase() {
widgetRepository.setCommunalWidgets(widgets)
// Smartspace available.
- val target = Mockito.mock(SmartspaceTarget::class.java)
- whenever(target.smartspaceTargetId).thenReturn("target")
- whenever(target.featureType).thenReturn(SmartspaceTarget.FEATURE_TIMER)
- whenever(target.remoteViews).thenReturn(Mockito.mock(RemoteViews::class.java))
- smartspaceRepository.setCommunalSmartspaceTargets(listOf(target))
+ smartspaceRepository.setTimers(
+ listOf(
+ CommunalSmartspaceTimer(
+ smartspaceTargetId = "target",
+ createdTimestampMillis = 0L,
+ remoteViews = Mockito.mock(RemoteViews::class.java),
+ )
+ )
+ )
// Media playing.
mediaRepository.mediaActive()
@@ -342,6 +352,31 @@ class CommunalEditModeViewModelTest : SysuiTestCase() {
assertThat(showDisclaimer).isFalse()
}
+ @Test
+ fun showDisclaimer_trueWhenTimeout() =
+ testScope.runTest {
+ underTest.setEditModeState(EditModeState.SHOWING)
+ kosmos.fakeUserRepository.setSelectedUserInfo(MAIN_USER_INFO)
+
+ val showDisclaimer by collectLastValue(underTest.showDisclaimer)
+
+ assertThat(showDisclaimer).isTrue()
+ underTest.onDisclaimerDismissed()
+ assertThat(showDisclaimer).isFalse()
+ advanceTimeBy(CommunalInteractor.DISCLAIMER_RESET_MILLIS)
+ assertThat(showDisclaimer).isTrue()
+ }
+
+ @Test
+ fun scrollPosition_persistedOnEditCleanup() {
+ val index = 2
+ val offset = 30
+ underTest.onScrollPositionUpdated(index, offset)
+ underTest.cleanupEditModeState()
+
+ verify(communalInteractor).setScrollPosition(eq(index), eq(offset))
+ }
+
private companion object {
val MAIN_USER_INFO = UserInfo(0, "primary", UserInfo.FLAG_MAIN)
const val WIDGET_PICKER_PACKAGE_NAME = "widget_picker_package_name"
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/view/viewmodel/CommunalViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/view/viewmodel/CommunalViewModelTest.kt
index d33877462ec6..c480aa8e4a3d 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/view/viewmodel/CommunalViewModelTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/view/viewmodel/CommunalViewModelTest.kt
@@ -16,7 +16,6 @@
package com.android.systemui.communal.view.viewmodel
-import android.app.smartspace.SmartspaceTarget
import android.appwidget.AppWidgetProviderInfo
import android.content.pm.UserInfo
import android.os.UserHandle
@@ -27,14 +26,18 @@ import androidx.test.filters.SmallTest
import com.android.compose.animation.scene.ObservableTransitionState
import com.android.systemui.Flags.FLAG_COMMUNAL_HUB
import com.android.systemui.SysuiTestCase
+import com.android.systemui.communal.data.model.CommunalSmartspaceTimer
import com.android.systemui.communal.data.repository.FakeCommunalMediaRepository
import com.android.systemui.communal.data.repository.FakeCommunalSceneRepository
+import com.android.systemui.communal.data.repository.FakeCommunalSmartspaceRepository
import com.android.systemui.communal.data.repository.FakeCommunalTutorialRepository
import com.android.systemui.communal.data.repository.FakeCommunalWidgetRepository
import com.android.systemui.communal.data.repository.fakeCommunalMediaRepository
import com.android.systemui.communal.data.repository.fakeCommunalSceneRepository
+import com.android.systemui.communal.data.repository.fakeCommunalSmartspaceRepository
import com.android.systemui.communal.data.repository.fakeCommunalTutorialRepository
import com.android.systemui.communal.data.repository.fakeCommunalWidgetRepository
+import com.android.systemui.communal.domain.interactor.CommunalInteractor
import com.android.systemui.communal.domain.interactor.communalInteractor
import com.android.systemui.communal.domain.interactor.communalSceneInteractor
import com.android.systemui.communal.domain.interactor.communalSettingsInteractor
@@ -78,8 +81,6 @@ import com.android.systemui.settings.fakeUserTracker
import com.android.systemui.shade.ShadeTestUtil
import com.android.systemui.shade.domain.interactor.shadeInteractor
import com.android.systemui.shade.shadeTestUtil
-import com.android.systemui.smartspace.data.repository.FakeSmartspaceRepository
-import com.android.systemui.smartspace.data.repository.fakeSmartspaceRepository
import com.android.systemui.statusbar.KeyguardIndicationController
import com.android.systemui.testKosmos
import com.android.systemui.user.data.repository.FakeUserRepository
@@ -97,7 +98,9 @@ import org.mockito.Mock
import org.mockito.Mockito
import org.mockito.Mockito.verify
import org.mockito.MockitoAnnotations
+import org.mockito.kotlin.eq
import org.mockito.kotlin.mock
+import org.mockito.kotlin.spy
import org.mockito.kotlin.whenever
import platform.test.runner.parameterized.ParameterizedAndroidJunit4
import platform.test.runner.parameterized.Parameters
@@ -115,12 +118,13 @@ class CommunalViewModelTest(flags: FlagsParameterization) : SysuiTestCase() {
private lateinit var keyguardRepository: FakeKeyguardRepository
private lateinit var tutorialRepository: FakeCommunalTutorialRepository
private lateinit var widgetRepository: FakeCommunalWidgetRepository
- private lateinit var smartspaceRepository: FakeSmartspaceRepository
+ private lateinit var smartspaceRepository: FakeCommunalSmartspaceRepository
private lateinit var mediaRepository: FakeCommunalMediaRepository
private lateinit var userRepository: FakeUserRepository
private lateinit var shadeTestUtil: ShadeTestUtil
private lateinit var keyguardTransitionRepository: FakeKeyguardTransitionRepository
private lateinit var communalRepository: FakeCommunalSceneRepository
+ private lateinit var communalInteractor: CommunalInteractor
private lateinit var underTest: CommunalViewModel
@@ -136,7 +140,7 @@ class CommunalViewModelTest(flags: FlagsParameterization) : SysuiTestCase() {
keyguardTransitionRepository = kosmos.fakeKeyguardTransitionRepository
tutorialRepository = kosmos.fakeCommunalTutorialRepository
widgetRepository = kosmos.fakeCommunalWidgetRepository
- smartspaceRepository = kosmos.fakeSmartspaceRepository
+ smartspaceRepository = kosmos.fakeCommunalSmartspaceRepository
mediaRepository = kosmos.fakeCommunalMediaRepository
userRepository = kosmos.fakeUserRepository
shadeTestUtil = kosmos.shadeTestUtil
@@ -154,6 +158,8 @@ class CommunalViewModelTest(flags: FlagsParameterization) : SysuiTestCase() {
kosmos.powerInteractor.setAwakeForTest()
+ communalInteractor = spy(kosmos.communalInteractor)
+
underTest =
CommunalViewModel(
kosmos.testDispatcher,
@@ -164,7 +170,7 @@ class CommunalViewModelTest(flags: FlagsParameterization) : SysuiTestCase() {
kosmos.keyguardInteractor,
mock<KeyguardIndicationController>(),
kosmos.communalSceneInteractor,
- kosmos.communalInteractor,
+ communalInteractor,
kosmos.communalSettingsInteractor,
kosmos.communalTutorialInteractor,
kosmos.shadeInteractor,
@@ -222,11 +228,15 @@ class CommunalViewModelTest(flags: FlagsParameterization) : SysuiTestCase() {
widgetRepository.setCommunalWidgets(widgets)
// Smartspace available.
- val target = Mockito.mock(SmartspaceTarget::class.java)
- whenever(target.smartspaceTargetId).thenReturn("target")
- whenever(target.featureType).thenReturn(SmartspaceTarget.FEATURE_TIMER)
- whenever(target.remoteViews).thenReturn(Mockito.mock(RemoteViews::class.java))
- smartspaceRepository.setCommunalSmartspaceTargets(listOf(target))
+ smartspaceRepository.setTimers(
+ listOf(
+ CommunalSmartspaceTimer(
+ smartspaceTargetId = "target",
+ createdTimestampMillis = 0L,
+ remoteViews = Mockito.mock(RemoteViews::class.java),
+ )
+ )
+ )
// Media playing.
mediaRepository.mediaActive()
@@ -293,7 +303,7 @@ class CommunalViewModelTest(flags: FlagsParameterization) : SysuiTestCase() {
widgetRepository.setCommunalWidgets(emptyList())
// UMO playing
mediaRepository.mediaActive()
- smartspaceRepository.setCommunalSmartspaceTargets(emptyList())
+ smartspaceRepository.setTimers(emptyList())
val isEmptyState by collectLastValue(underTest.isEmptyState)
assertThat(isEmptyState).isTrue()
@@ -314,7 +324,7 @@ class CommunalViewModelTest(flags: FlagsParameterization) : SysuiTestCase() {
),
)
mediaRepository.mediaInactive()
- smartspaceRepository.setCommunalSmartspaceTargets(emptyList())
+ smartspaceRepository.setTimers(emptyList())
val isEmptyState by collectLastValue(underTest.isEmptyState)
assertThat(isEmptyState).isFalse()
@@ -689,11 +699,15 @@ class CommunalViewModelTest(flags: FlagsParameterization) : SysuiTestCase() {
advanceTimeBy(60L)
// New timer available
- val target = Mockito.mock(SmartspaceTarget::class.java)
- whenever<String?>(target.smartspaceTargetId).thenReturn("target")
- whenever(target.featureType).thenReturn(SmartspaceTarget.FEATURE_TIMER)
- whenever(target.remoteViews).thenReturn(Mockito.mock(RemoteViews::class.java))
- smartspaceRepository.setCommunalSmartspaceTargets(listOf(target))
+ smartspaceRepository.setTimers(
+ listOf(
+ CommunalSmartspaceTimer(
+ smartspaceTargetId = "target",
+ createdTimestampMillis = 0L,
+ remoteViews = Mockito.mock(RemoteViews::class.java),
+ )
+ )
+ )
runCurrent()
// Still only emits widgets and the CTA tile
@@ -748,11 +762,15 @@ class CommunalViewModelTest(flags: FlagsParameterization) : SysuiTestCase() {
assertThat(communalContent).hasSize(3)
// When new timer available
- val target = Mockito.mock(SmartspaceTarget::class.java)
- whenever(target.smartspaceTargetId).thenReturn("target")
- whenever(target.featureType).thenReturn(SmartspaceTarget.FEATURE_TIMER)
- whenever(target.remoteViews).thenReturn(Mockito.mock(RemoteViews::class.java))
- smartspaceRepository.setCommunalSmartspaceTargets(listOf(target))
+ smartspaceRepository.setTimers(
+ listOf(
+ CommunalSmartspaceTimer(
+ smartspaceTargetId = "target",
+ createdTimestampMillis = 0L,
+ remoteViews = Mockito.mock(RemoteViews::class.java),
+ )
+ )
+ )
runCurrent()
// Then emits timer, widgets and the CTA tile
@@ -767,6 +785,16 @@ class CommunalViewModelTest(flags: FlagsParameterization) : SysuiTestCase() {
.isInstanceOf(CommunalContentModel.CtaTileInViewMode::class.java)
}
+ @Test
+ fun scrollPosition_persistedOnEditEntry() {
+ val index = 2
+ val offset = 30
+ underTest.onScrollPositionUpdated(index, offset)
+ underTest.onOpenWidgetEditor(false)
+
+ verify(communalInteractor).setScrollPosition(eq(index), eq(offset))
+ }
+
private suspend fun setIsMainUser(isMainUser: Boolean) {
val user = if (isMainUser) MAIN_USER_INFO else SECONDARY_USER_INFO
with(userRepository) {
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/widgets/CommunalTransitionAnimatorControllerTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/widgets/CommunalTransitionAnimatorControllerTest.kt
new file mode 100644
index 000000000000..e36fd75445e2
--- /dev/null
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/widgets/CommunalTransitionAnimatorControllerTest.kt
@@ -0,0 +1,128 @@
+/*
+ * 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.communal.widgets
+
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.SmallTest
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.animation.ActivityTransitionAnimator
+import com.android.systemui.communal.domain.interactor.communalSceneInteractor
+import com.android.systemui.communal.shared.model.CommunalScenes
+import com.android.systemui.coroutines.collectLastValue
+import com.android.systemui.kosmos.testScope
+import com.android.systemui.testKosmos
+import com.google.common.truth.Truth
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.test.advanceTimeBy
+import kotlinx.coroutines.test.runTest
+import org.junit.Assert.assertFalse
+import org.junit.Assert.assertTrue
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.kotlin.mock
+import org.mockito.kotlin.verify
+
+@ExperimentalCoroutinesApi
+@SmallTest
+@RunWith(AndroidJUnit4::class)
+class CommunalTransitionAnimatorControllerTest : SysuiTestCase() {
+ private val controller = mock<ActivityTransitionAnimator.Controller>()
+ private val kosmos = testKosmos()
+
+ private lateinit var underTest: CommunalTransitionAnimatorController
+
+ @Before
+ fun setUp() {
+ with(kosmos) {
+ underTest = CommunalTransitionAnimatorController(controller, communalSceneInteractor)
+ }
+ }
+
+ @Test
+ fun doNotAnimate_launchingWidgetStateIsCleared() {
+ with(kosmos) {
+ testScope.runTest {
+ val launching by collectLastValue(communalSceneInteractor.isLaunchingWidget)
+
+ communalSceneInteractor.setIsLaunchingWidget(true)
+ assertTrue(launching!!)
+
+ underTest.onIntentStarted(willAnimate = false)
+ assertFalse(launching!!)
+ verify(controller).onIntentStarted(willAnimate = false)
+ }
+ }
+ }
+
+ @Test
+ fun animationCancelled_launchingWidgetStateIsCleared() {
+ with(kosmos) {
+ testScope.runTest {
+ val launching by collectLastValue(communalSceneInteractor.isLaunchingWidget)
+ val scene by collectLastValue(communalSceneInteractor.currentScene)
+
+ communalSceneInteractor.changeScene(CommunalScenes.Communal)
+ Truth.assertThat(scene).isEqualTo(CommunalScenes.Communal)
+ communalSceneInteractor.setIsLaunchingWidget(true)
+ assertTrue(launching!!)
+
+ underTest.onIntentStarted(willAnimate = true)
+ assertTrue(launching!!)
+ verify(controller).onIntentStarted(willAnimate = true)
+
+ underTest.onTransitionAnimationStart(isExpandingFullyAbove = true)
+ assertTrue(launching!!)
+ verify(controller).onTransitionAnimationStart(isExpandingFullyAbove = true)
+
+ underTest.onTransitionAnimationCancelled(newKeyguardOccludedState = true)
+ assertFalse(launching!!)
+ verify(controller).onTransitionAnimationCancelled(newKeyguardOccludedState = true)
+ }
+ }
+ }
+
+ @Test
+ fun animationComplete_launchingWidgetStateIsClearedAndSceneIsChanged() {
+ with(kosmos) {
+ testScope.runTest {
+ val launching by collectLastValue(communalSceneInteractor.isLaunchingWidget)
+ val scene by collectLastValue(communalSceneInteractor.currentScene)
+
+ communalSceneInteractor.changeScene(CommunalScenes.Communal)
+ Truth.assertThat(scene).isEqualTo(CommunalScenes.Communal)
+ communalSceneInteractor.setIsLaunchingWidget(true)
+ assertTrue(launching!!)
+
+ underTest.onIntentStarted(willAnimate = true)
+ assertTrue(launching!!)
+ verify(controller).onIntentStarted(willAnimate = true)
+
+ underTest.onTransitionAnimationStart(isExpandingFullyAbove = true)
+ assertTrue(launching!!)
+ verify(controller).onTransitionAnimationStart(isExpandingFullyAbove = true)
+
+ testScope.advanceTimeBy(ActivityTransitionAnimator.TIMINGS.totalDuration)
+
+ underTest.onTransitionAnimationEnd(isExpandingFullyAbove = true)
+ assertFalse(launching!!)
+ Truth.assertThat(scene).isEqualTo(CommunalScenes.Blank)
+ verify(controller).onTransitionAnimationEnd(isExpandingFullyAbove = true)
+ }
+ }
+ }
+}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/widgets/WidgetInteractionHandlerTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/widgets/WidgetInteractionHandlerTest.kt
index 70448955eff0..ea8b5ab70cd9 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/widgets/WidgetInteractionHandlerTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/widgets/WidgetInteractionHandlerTest.kt
@@ -26,13 +26,21 @@ import androidx.core.util.component2
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
+import com.android.systemui.communal.domain.interactor.communalSceneInteractor
+import com.android.systemui.coroutines.collectLastValue
+import com.android.systemui.kosmos.testScope
import com.android.systemui.plugins.ActivityStarter
+import com.android.systemui.testKosmos
+import kotlinx.coroutines.test.runTest
+import org.junit.Assert.assertFalse
+import org.junit.Assert.assertTrue
+import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
+import org.mockito.kotlin.any
import org.mockito.kotlin.eq
import org.mockito.kotlin.isNull
import org.mockito.kotlin.mock
-import org.mockito.kotlin.notNull
import org.mockito.kotlin.refEq
import org.mockito.kotlin.verify
@@ -40,6 +48,7 @@ import org.mockito.kotlin.verify
@RunWith(AndroidJUnit4::class)
class WidgetInteractionHandlerTest : SysuiTestCase() {
private val activityStarter = mock<ActivityStarter>()
+ private val kosmos = testKosmos()
private val testIntent =
PendingIntent.getActivity(
@@ -50,30 +59,44 @@ class WidgetInteractionHandlerTest : SysuiTestCase() {
)
private val testResponse = RemoteResponse.fromPendingIntent(testIntent)
- private val underTest: WidgetInteractionHandler by lazy {
- WidgetInteractionHandler(activityStarter)
+ private lateinit var underTest: WidgetInteractionHandler
+
+ @Before
+ fun setUp() {
+ with(kosmos) {
+ underTest = WidgetInteractionHandler(activityStarter, communalSceneInteractor)
+ }
}
@Test
fun launchAnimatorIsUsedForWidgetView() {
- val parent = FrameLayout(context)
- val view = CommunalAppWidgetHostView(context)
- parent.addView(view)
- val (fillInIntent, activityOptions) = testResponse.getLaunchOptions(view)
+ with(kosmos) {
+ testScope.runTest {
+ val launching by collectLastValue(communalSceneInteractor.isLaunchingWidget)
+ assertFalse(launching!!)
- underTest.onInteraction(view, testIntent, testResponse)
+ val parent = FrameLayout(context)
+ val view = CommunalAppWidgetHostView(context)
+ parent.addView(view)
+ val (fillInIntent, activityOptions) = testResponse.getLaunchOptions(view)
- // Verify that we pass in a non-null animation controller
- verify(activityStarter)
- .startPendingIntentMaybeDismissingKeyguard(
- /* intent = */ eq(testIntent),
- /* dismissShade = */ eq(false),
- /* intentSentUiThreadCallback = */ isNull(),
- /* animationController = */ notNull(),
- /* fillInIntent = */ refEq(fillInIntent),
- /* extraOptions = */ refEq(activityOptions.toBundle()),
- /* customMessage */ isNull(),
- )
+ underTest.onInteraction(view, testIntent, testResponse)
+
+ // Verify that we set the state correctly
+ assertTrue(launching!!)
+ // Verify that we pass in a non-null Communal animation controller
+ verify(activityStarter)
+ .startPendingIntentMaybeDismissingKeyguard(
+ /* intent = */ eq(testIntent),
+ /* dismissShade = */ eq(false),
+ /* intentSentUiThreadCallback = */ isNull(),
+ /* animationController = */ any<CommunalTransitionAnimatorController>(),
+ /* fillInIntent = */ refEq(fillInIntent),
+ /* extraOptions = */ refEq(activityOptions.toBundle()),
+ /* customMessage */ isNull(),
+ )
+ }
+ }
}
@Test
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/deviceentry/data/repository/DeviceEntryFaceAuthRepositoryTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/deviceentry/data/repository/DeviceEntryFaceAuthRepositoryTest.kt
index 2546f27cb351..2bf50b3daa2f 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/deviceentry/data/repository/DeviceEntryFaceAuthRepositoryTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/deviceentry/data/repository/DeviceEntryFaceAuthRepositoryTest.kt
@@ -52,7 +52,6 @@ import com.android.systemui.deviceentry.shared.FaceAuthUiEvent.FACE_AUTH_TRIGGER
import com.android.systemui.deviceentry.shared.model.ErrorFaceAuthenticationStatus
import com.android.systemui.deviceentry.shared.model.FaceAuthenticationStatus
import com.android.systemui.deviceentry.shared.model.FaceDetectionStatus
-import com.android.systemui.deviceentry.shared.model.HelpFaceAuthenticationStatus
import com.android.systemui.deviceentry.shared.model.SuccessFaceAuthenticationStatus
import com.android.systemui.display.data.repository.displayRepository
import com.android.systemui.dump.DumpManager
@@ -79,7 +78,6 @@ import com.android.systemui.log.table.TableLogBuffer
import com.android.systemui.power.domain.interactor.PowerInteractor.Companion.setAsleepForTest
import com.android.systemui.power.domain.interactor.PowerInteractor.Companion.setAwakeForTest
import com.android.systemui.power.domain.interactor.powerInteractor
-import com.android.systemui.res.R
import com.android.systemui.statusbar.commandQueue
import com.android.systemui.statusbar.phone.KeyguardBypassController
import com.android.systemui.testKosmos
@@ -478,29 +476,6 @@ class DeviceEntryFaceAuthRepositoryTest : SysuiTestCase() {
}
@Test
- fun faceHelpMessagesAreIgnoredBasedOnConfig() =
- testScope.runTest {
- overrideResource(
- R.array.config_face_acquire_device_entry_ignorelist,
- intArrayOf(10, 11)
- )
- underTest = createDeviceEntryFaceAuthRepositoryImpl()
- initCollectors()
- allPreconditionsToRunFaceAuthAreTrue()
-
- underTest.requestAuthenticate(FACE_AUTH_TRIGGERED_SWIPE_UP_ON_BOUNCER)
- faceAuthenticateIsCalled()
-
- authenticationCallback.value.onAuthenticationHelp(9, "help msg")
- authenticationCallback.value.onAuthenticationHelp(10, "Ignored help msg")
- authenticationCallback.value.onAuthenticationHelp(11, "Ignored help msg")
-
- val response = authStatus() as HelpFaceAuthenticationStatus
- assertThat(response.msg).isEqualTo("help msg")
- assertThat(response.msgId).isEqualTo(response.msgId)
- }
-
- @Test
fun dumpDoesNotErrorOutWhenFaceManagerOrBypassControllerIsNull() =
testScope.runTest {
fakeUserRepository.setSelectedUserInfo(primaryUser)
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryInteractorTest.kt
index 546510b2f144..3253edfb5fca 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryInteractorTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryInteractorTest.kt
@@ -20,7 +20,6 @@ import android.testing.TestableLooper
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.compose.animation.scene.SceneKey
-import com.android.internal.widget.LockPatternUtils
import com.android.systemui.SysuiTestCase
import com.android.systemui.authentication.data.repository.FakeAuthenticationRepository
import com.android.systemui.authentication.data.repository.fakeAuthenticationRepository
@@ -32,27 +31,14 @@ import com.android.systemui.bouncer.domain.interactor.alternateBouncerInteractor
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.coroutines.collectValues
import com.android.systemui.deviceentry.data.repository.fakeDeviceEntryRepository
-import com.android.systemui.deviceentry.shared.model.DeviceEntryRestrictionReason
-import com.android.systemui.deviceentry.shared.model.DeviceEntryRestrictionReason.AdaptiveAuthRequest
-import com.android.systemui.deviceentry.shared.model.DeviceEntryRestrictionReason.BouncerLockedOut
-import com.android.systemui.deviceentry.shared.model.DeviceEntryRestrictionReason.DeviceNotUnlockedSinceReboot
-import com.android.systemui.deviceentry.shared.model.DeviceEntryRestrictionReason.NonStrongBiometricsSecurityTimeout
-import com.android.systemui.deviceentry.shared.model.DeviceEntryRestrictionReason.PolicyLockdown
-import com.android.systemui.deviceentry.shared.model.DeviceEntryRestrictionReason.SecurityTimeout
-import com.android.systemui.deviceentry.shared.model.DeviceEntryRestrictionReason.TrustAgentDisabled
-import com.android.systemui.deviceentry.shared.model.DeviceEntryRestrictionReason.UnattendedUpdate
-import com.android.systemui.deviceentry.shared.model.DeviceEntryRestrictionReason.UserLockdown
import com.android.systemui.flags.EnableSceneContainer
-import com.android.systemui.flags.fakeSystemPropertiesHelper
import com.android.systemui.keyguard.data.repository.biometricSettingsRepository
import com.android.systemui.keyguard.data.repository.deviceEntryFingerprintAuthRepository
-import com.android.systemui.keyguard.data.repository.fakeBiometricSettingsRepository
import com.android.systemui.keyguard.data.repository.fakeDeviceEntryFaceAuthRepository
import com.android.systemui.keyguard.data.repository.fakeDeviceEntryFingerprintAuthRepository
import com.android.systemui.keyguard.data.repository.fakeKeyguardRepository
import com.android.systemui.keyguard.data.repository.fakeKeyguardTransitionRepository
import com.android.systemui.keyguard.data.repository.fakeTrustRepository
-import com.android.systemui.keyguard.shared.model.AuthenticationFlags
import com.android.systemui.keyguard.shared.model.KeyguardState
import com.android.systemui.keyguard.shared.model.SuccessFingerprintAuthenticationStatus
import com.android.systemui.kosmos.testScope
@@ -61,7 +47,6 @@ import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.testKosmos
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.ExperimentalCoroutinesApi
-import kotlinx.coroutines.test.TestScope
import kotlinx.coroutines.test.runCurrent
import kotlinx.coroutines.test.runTest
import org.junit.Before
@@ -438,231 +423,6 @@ class DeviceEntryInteractorTest : SysuiTestCase() {
assertThat(isUnlocked).isTrue()
}
- @Test
- fun deviceEntryRestrictionReason_whenFaceOrFingerprintOrTrust_alwaysNull() =
- testScope.runTest {
- kosmos.fakeBiometricSettingsRepository.setIsFaceAuthEnrolledAndEnabled(false)
- kosmos.fakeBiometricSettingsRepository.setIsFingerprintAuthEnrolledAndEnabled(false)
- kosmos.fakeTrustRepository.setTrustUsuallyManaged(false)
- runCurrent()
-
- verifyRestrictionReasonsForAuthFlags(
- LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_BOOT to null,
- LockPatternUtils.StrongAuthTracker.SOME_AUTH_REQUIRED_AFTER_USER_REQUEST to null,
- LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_LOCKOUT to null,
- LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_TIMEOUT to null,
- LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_USER_LOCKDOWN to null,
- LockPatternUtils.StrongAuthTracker
- .STRONG_AUTH_REQUIRED_AFTER_NON_STRONG_BIOMETRICS_TIMEOUT to null,
- LockPatternUtils.StrongAuthTracker.SOME_AUTH_REQUIRED_AFTER_TRUSTAGENT_EXPIRED to
- null,
- LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_FOR_UNATTENDED_UPDATE to
- null,
- LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_DPM_LOCK_NOW to null
- )
- }
-
- @Test
- fun deviceEntryRestrictionReason_whenFaceIsEnrolledAndEnabled_mapsToAuthFlagsState() =
- testScope.runTest {
- kosmos.fakeBiometricSettingsRepository.setIsFaceAuthEnrolledAndEnabled(true)
- kosmos.fakeBiometricSettingsRepository.setIsFingerprintAuthEnrolledAndEnabled(false)
- kosmos.fakeTrustRepository.setTrustUsuallyManaged(false)
- kosmos.fakeSystemPropertiesHelper.set(
- DeviceEntryInteractor.SYS_BOOT_REASON_PROP,
- "not mainline reboot"
- )
- runCurrent()
-
- verifyRestrictionReasonsForAuthFlags(
- LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_BOOT to
- DeviceNotUnlockedSinceReboot,
- LockPatternUtils.StrongAuthTracker.SOME_AUTH_REQUIRED_AFTER_ADAPTIVE_AUTH_REQUEST to
- AdaptiveAuthRequest,
- LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_LOCKOUT to
- BouncerLockedOut,
- LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_TIMEOUT to
- SecurityTimeout,
- LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_USER_LOCKDOWN to
- UserLockdown,
- LockPatternUtils.StrongAuthTracker
- .STRONG_AUTH_REQUIRED_AFTER_NON_STRONG_BIOMETRICS_TIMEOUT to
- NonStrongBiometricsSecurityTimeout,
- LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_FOR_UNATTENDED_UPDATE to
- UnattendedUpdate,
- LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_DPM_LOCK_NOW to
- PolicyLockdown,
- LockPatternUtils.StrongAuthTracker.SOME_AUTH_REQUIRED_AFTER_USER_REQUEST to null,
- LockPatternUtils.StrongAuthTracker.SOME_AUTH_REQUIRED_AFTER_TRUSTAGENT_EXPIRED to
- null,
- )
- }
-
- @Test
- fun deviceEntryRestrictionReason_whenFingerprintIsEnrolledAndEnabled_mapsToAuthFlagsState() =
- testScope.runTest {
- kosmos.fakeBiometricSettingsRepository.setIsFaceAuthEnrolledAndEnabled(false)
- kosmos.fakeBiometricSettingsRepository.setIsFingerprintAuthEnrolledAndEnabled(true)
- kosmos.fakeTrustRepository.setTrustUsuallyManaged(false)
- kosmos.fakeSystemPropertiesHelper.set(
- DeviceEntryInteractor.SYS_BOOT_REASON_PROP,
- "not mainline reboot"
- )
- runCurrent()
-
- verifyRestrictionReasonsForAuthFlags(
- LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_BOOT to
- DeviceNotUnlockedSinceReboot,
- LockPatternUtils.StrongAuthTracker.SOME_AUTH_REQUIRED_AFTER_ADAPTIVE_AUTH_REQUEST to
- AdaptiveAuthRequest,
- LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_LOCKOUT to
- BouncerLockedOut,
- LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_TIMEOUT to
- SecurityTimeout,
- LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_USER_LOCKDOWN to
- UserLockdown,
- LockPatternUtils.StrongAuthTracker
- .STRONG_AUTH_REQUIRED_AFTER_NON_STRONG_BIOMETRICS_TIMEOUT to
- NonStrongBiometricsSecurityTimeout,
- LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_FOR_UNATTENDED_UPDATE to
- UnattendedUpdate,
- LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_DPM_LOCK_NOW to
- PolicyLockdown,
- LockPatternUtils.StrongAuthTracker.SOME_AUTH_REQUIRED_AFTER_USER_REQUEST to null,
- LockPatternUtils.StrongAuthTracker.SOME_AUTH_REQUIRED_AFTER_TRUSTAGENT_EXPIRED to
- null,
- )
- }
-
- @Test
- fun deviceEntryRestrictionReason_whenTrustAgentIsEnabled_mapsToAuthFlagsState() =
- testScope.runTest {
- kosmos.fakeBiometricSettingsRepository.setIsFaceAuthEnrolledAndEnabled(false)
- kosmos.fakeBiometricSettingsRepository.setIsFingerprintAuthEnrolledAndEnabled(false)
- kosmos.fakeTrustRepository.setTrustUsuallyManaged(true)
- kosmos.fakeTrustRepository.setCurrentUserTrustManaged(false)
- kosmos.fakeSystemPropertiesHelper.set(
- DeviceEntryInteractor.SYS_BOOT_REASON_PROP,
- "not mainline reboot"
- )
- runCurrent()
-
- verifyRestrictionReasonsForAuthFlags(
- LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_BOOT to
- DeviceNotUnlockedSinceReboot,
- LockPatternUtils.StrongAuthTracker.SOME_AUTH_REQUIRED_AFTER_ADAPTIVE_AUTH_REQUEST to
- AdaptiveAuthRequest,
- LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_LOCKOUT to
- BouncerLockedOut,
- LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_TIMEOUT to
- SecurityTimeout,
- LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_USER_LOCKDOWN to
- UserLockdown,
- LockPatternUtils.StrongAuthTracker
- .STRONG_AUTH_REQUIRED_AFTER_NON_STRONG_BIOMETRICS_TIMEOUT to
- NonStrongBiometricsSecurityTimeout,
- LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_FOR_UNATTENDED_UPDATE to
- UnattendedUpdate,
- LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_DPM_LOCK_NOW to
- PolicyLockdown,
- LockPatternUtils.StrongAuthTracker.SOME_AUTH_REQUIRED_AFTER_USER_REQUEST to
- TrustAgentDisabled,
- LockPatternUtils.StrongAuthTracker.SOME_AUTH_REQUIRED_AFTER_TRUSTAGENT_EXPIRED to
- TrustAgentDisabled,
- )
- }
-
- @Test
- fun deviceEntryRestrictionReason_whenDeviceRebootedForMainlineUpdate_mapsToTheCorrectReason() =
- testScope.runTest {
- val deviceEntryRestrictionReason by
- collectLastValue(underTest.deviceEntryRestrictionReason)
- kosmos.fakeSystemPropertiesHelper.set(
- DeviceEntryInteractor.SYS_BOOT_REASON_PROP,
- DeviceEntryInteractor.REBOOT_MAINLINE_UPDATE
- )
- kosmos.fakeBiometricSettingsRepository.setAuthenticationFlags(
- AuthenticationFlags(
- userId = 1,
- flag = LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_BOOT
- )
- )
- runCurrent()
-
- kosmos.fakeBiometricSettingsRepository.setIsFaceAuthEnrolledAndEnabled(false)
- kosmos.fakeBiometricSettingsRepository.setIsFingerprintAuthEnrolledAndEnabled(false)
- kosmos.fakeTrustRepository.setTrustUsuallyManaged(false)
- runCurrent()
-
- assertThat(deviceEntryRestrictionReason).isNull()
-
- kosmos.fakeBiometricSettingsRepository.setIsFaceAuthEnrolledAndEnabled(true)
- runCurrent()
-
- assertThat(deviceEntryRestrictionReason)
- .isEqualTo(DeviceEntryRestrictionReason.DeviceNotUnlockedSinceMainlineUpdate)
-
- kosmos.fakeBiometricSettingsRepository.setIsFaceAuthEnrolledAndEnabled(false)
- kosmos.fakeBiometricSettingsRepository.setIsFingerprintAuthEnrolledAndEnabled(true)
- runCurrent()
-
- assertThat(deviceEntryRestrictionReason)
- .isEqualTo(DeviceEntryRestrictionReason.DeviceNotUnlockedSinceMainlineUpdate)
-
- kosmos.fakeBiometricSettingsRepository.setIsFingerprintAuthEnrolledAndEnabled(false)
- kosmos.fakeTrustRepository.setTrustUsuallyManaged(true)
- runCurrent()
-
- assertThat(deviceEntryRestrictionReason)
- .isEqualTo(DeviceEntryRestrictionReason.DeviceNotUnlockedSinceMainlineUpdate)
- }
-
- @Test
- fun reportUserPresent_whenDeviceEntered() =
- testScope.runTest {
- val isDeviceEntered by collectLastValue(underTest.isDeviceEntered)
- assertThat(isDeviceEntered).isFalse()
- assertThat(kosmos.fakeDeviceEntryRepository.userPresentCount).isEqualTo(0)
-
- kosmos.fakeDeviceEntryFingerprintAuthRepository.setAuthenticationStatus(
- SuccessFingerprintAuthenticationStatus(0, true)
- )
- runCurrent()
- switchToScene(Scenes.Gone)
- assertThat(isDeviceEntered).isTrue()
- assertThat(kosmos.fakeDeviceEntryRepository.userPresentCount).isEqualTo(1)
-
- switchToScene(Scenes.Lockscreen)
- assertThat(isDeviceEntered).isFalse()
- assertThat(kosmos.fakeDeviceEntryRepository.userPresentCount).isEqualTo(1)
-
- kosmos.fakeDeviceEntryFingerprintAuthRepository.setAuthenticationStatus(
- SuccessFingerprintAuthenticationStatus(0, true)
- )
- switchToScene(Scenes.Gone)
- assertThat(isDeviceEntered).isTrue()
- assertThat(kosmos.fakeDeviceEntryRepository.userPresentCount).isEqualTo(2)
- }
-
- private fun TestScope.verifyRestrictionReasonsForAuthFlags(
- vararg authFlagToDeviceEntryRestriction: Pair<Int, DeviceEntryRestrictionReason?>
- ) {
- val deviceEntryRestrictionReason by collectLastValue(underTest.deviceEntryRestrictionReason)
-
- authFlagToDeviceEntryRestriction.forEach { (flag, expectedReason) ->
- kosmos.fakeBiometricSettingsRepository.setAuthenticationFlags(
- AuthenticationFlags(userId = 1, flag = flag)
- )
- runCurrent()
-
- if (expectedReason == null) {
- assertThat(deviceEntryRestrictionReason).isNull()
- } else {
- assertThat(deviceEntryRestrictionReason).isEqualTo(expectedReason)
- }
- }
- }
-
private fun switchToScene(sceneKey: SceneKey) {
sceneInteractor.changeScene(sceneKey, "reason")
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/deviceentry/domain/interactor/DeviceUnlockedInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/deviceentry/domain/interactor/DeviceUnlockedInteractorTest.kt
index a7a7bea313fe..c2acc5ff6689 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/deviceentry/domain/interactor/DeviceUnlockedInteractorTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/deviceentry/domain/interactor/DeviceUnlockedInteractorTest.kt
@@ -19,17 +19,20 @@ package com.android.systemui.deviceentry.domain.interactor
import android.content.pm.UserInfo
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.internal.widget.LockPatternUtils
import com.android.systemui.SysuiTestCase
import com.android.systemui.authentication.data.repository.fakeAuthenticationRepository
-import com.android.systemui.authentication.domain.interactor.authenticationInteractor
import com.android.systemui.authentication.shared.model.AuthenticationMethodModel
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.deviceentry.data.repository.fakeDeviceEntryRepository
+import com.android.systemui.deviceentry.shared.model.DeviceEntryRestrictionReason
import com.android.systemui.deviceentry.shared.model.DeviceUnlockSource
+import com.android.systemui.flags.fakeSystemPropertiesHelper
+import com.android.systemui.keyguard.data.repository.fakeBiometricSettingsRepository
import com.android.systemui.keyguard.data.repository.fakeDeviceEntryFaceAuthRepository
import com.android.systemui.keyguard.data.repository.fakeDeviceEntryFingerprintAuthRepository
import com.android.systemui.keyguard.data.repository.fakeTrustRepository
-import com.android.systemui.keyguard.domain.interactor.trustInteractor
+import com.android.systemui.keyguard.shared.model.AuthenticationFlags
import com.android.systemui.keyguard.shared.model.SuccessFingerprintAuthenticationStatus
import com.android.systemui.kosmos.testScope
import com.android.systemui.power.domain.interactor.PowerInteractor.Companion.setAsleepForTest
@@ -40,6 +43,7 @@ import com.android.systemui.user.data.model.SelectionStatus
import com.android.systemui.user.data.repository.fakeUserRepository
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.test.TestScope
import kotlinx.coroutines.test.runCurrent
import kotlinx.coroutines.test.runTest
import org.junit.Before
@@ -54,18 +58,8 @@ class DeviceUnlockedInteractorTest : SysuiTestCase() {
private val kosmos = testKosmos()
private val testScope = kosmos.testScope
private val authenticationRepository = kosmos.fakeAuthenticationRepository
- private val deviceEntryRepository = kosmos.fakeDeviceEntryRepository
-
- val underTest =
- DeviceUnlockedInteractor(
- applicationScope = testScope.backgroundScope,
- authenticationInteractor = kosmos.authenticationInteractor,
- deviceEntryRepository = deviceEntryRepository,
- trustInteractor = kosmos.trustInteractor,
- faceAuthInteractor = kosmos.deviceEntryFaceAuthInteractor,
- fingerprintAuthInteractor = kosmos.deviceEntryFingerprintAuthInteractor,
- powerInteractor = kosmos.powerInteractor,
- )
+
+ val underTest = kosmos.deviceUnlockedInteractor
@Before
fun setup() {
@@ -100,6 +94,30 @@ class DeviceUnlockedInteractorTest : SysuiTestCase() {
}
@Test
+ fun deviceUnlockStatus_whenUnlockedAndAuthMethodIsPinAndInLockdown_isFalse() =
+ testScope.runTest {
+ val deviceUnlockStatus by collectLastValue(underTest.deviceUnlockStatus)
+ val isInLockdown by collectLastValue(underTest.isInLockdown)
+
+ authenticationRepository.setAuthenticationMethod(AuthenticationMethodModel.Pin)
+ kosmos.fakeDeviceEntryFingerprintAuthRepository.setAuthenticationStatus(
+ SuccessFingerprintAuthenticationStatus(0, true)
+ )
+ kosmos.fakeBiometricSettingsRepository.setAuthenticationFlags(
+ AuthenticationFlags(
+ userId = 1,
+ flag =
+ LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_USER_LOCKDOWN,
+ )
+ )
+ runCurrent()
+ assertThat(isInLockdown).isTrue()
+
+ assertThat(deviceUnlockStatus?.isUnlocked).isFalse()
+ assertThat(deviceUnlockStatus?.deviceUnlockSource).isNull()
+ }
+
+ @Test
fun deviceUnlockStatus_whenUnlockedAndAuthMethodIsSim_isFalse() =
testScope.runTest {
val deviceUnlockStatus by collectLastValue(underTest.deviceUnlockStatus)
@@ -221,6 +239,218 @@ class DeviceUnlockedInteractorTest : SysuiTestCase() {
assertThat(deviceUnlockStatus?.isUnlocked).isFalse()
}
+ @Test
+ fun deviceEntryRestrictionReason_whenFaceOrFingerprintOrTrust_alwaysNull() =
+ testScope.runTest {
+ kosmos.fakeBiometricSettingsRepository.setIsFaceAuthEnrolledAndEnabled(false)
+ kosmos.fakeBiometricSettingsRepository.setIsFingerprintAuthEnrolledAndEnabled(false)
+ kosmos.fakeTrustRepository.setTrustUsuallyManaged(false)
+ runCurrent()
+
+ verifyRestrictionReasonsForAuthFlags(
+ LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_BOOT to null,
+ LockPatternUtils.StrongAuthTracker.SOME_AUTH_REQUIRED_AFTER_USER_REQUEST to null,
+ LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_LOCKOUT to null,
+ LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_TIMEOUT to null,
+ LockPatternUtils.StrongAuthTracker
+ .STRONG_AUTH_REQUIRED_AFTER_NON_STRONG_BIOMETRICS_TIMEOUT to null,
+ LockPatternUtils.StrongAuthTracker.SOME_AUTH_REQUIRED_AFTER_TRUSTAGENT_EXPIRED to
+ null,
+ LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_FOR_UNATTENDED_UPDATE to
+ null,
+ )
+ }
+
+ @Test
+ fun deviceEntryRestrictionReason_whenFaceOrFingerprintOrTrust_whenLockdown() =
+ testScope.runTest {
+ kosmos.fakeBiometricSettingsRepository.setIsFaceAuthEnrolledAndEnabled(false)
+ kosmos.fakeBiometricSettingsRepository.setIsFingerprintAuthEnrolledAndEnabled(false)
+ kosmos.fakeTrustRepository.setTrustUsuallyManaged(false)
+ runCurrent()
+
+ verifyRestrictionReasonsForAuthFlags(
+ LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_USER_LOCKDOWN to
+ DeviceEntryRestrictionReason.UserLockdown,
+ LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_DPM_LOCK_NOW to
+ DeviceEntryRestrictionReason.PolicyLockdown
+ )
+ }
+
+ @Test
+ fun deviceEntryRestrictionReason_whenFaceIsEnrolledAndEnabled_mapsToAuthFlagsState() =
+ testScope.runTest {
+ kosmos.fakeBiometricSettingsRepository.setIsFaceAuthEnrolledAndEnabled(true)
+ kosmos.fakeBiometricSettingsRepository.setIsFingerprintAuthEnrolledAndEnabled(false)
+ kosmos.fakeTrustRepository.setTrustUsuallyManaged(false)
+ kosmos.fakeSystemPropertiesHelper.set(
+ DeviceUnlockedInteractor.SYS_BOOT_REASON_PROP,
+ "not mainline reboot"
+ )
+ runCurrent()
+
+ verifyRestrictionReasonsForAuthFlags(
+ LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_BOOT to
+ DeviceEntryRestrictionReason.DeviceNotUnlockedSinceReboot,
+ LockPatternUtils.StrongAuthTracker.SOME_AUTH_REQUIRED_AFTER_ADAPTIVE_AUTH_REQUEST to
+ DeviceEntryRestrictionReason.AdaptiveAuthRequest,
+ LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_LOCKOUT to
+ DeviceEntryRestrictionReason.BouncerLockedOut,
+ LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_TIMEOUT to
+ DeviceEntryRestrictionReason.SecurityTimeout,
+ LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_USER_LOCKDOWN to
+ DeviceEntryRestrictionReason.UserLockdown,
+ LockPatternUtils.StrongAuthTracker
+ .STRONG_AUTH_REQUIRED_AFTER_NON_STRONG_BIOMETRICS_TIMEOUT to
+ DeviceEntryRestrictionReason.NonStrongBiometricsSecurityTimeout,
+ LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_FOR_UNATTENDED_UPDATE to
+ DeviceEntryRestrictionReason.UnattendedUpdate,
+ LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_DPM_LOCK_NOW to
+ DeviceEntryRestrictionReason.PolicyLockdown,
+ LockPatternUtils.StrongAuthTracker.SOME_AUTH_REQUIRED_AFTER_USER_REQUEST to null,
+ LockPatternUtils.StrongAuthTracker.SOME_AUTH_REQUIRED_AFTER_TRUSTAGENT_EXPIRED to
+ null,
+ )
+ }
+
+ @Test
+ fun deviceEntryRestrictionReason_whenFingerprintIsEnrolledAndEnabled_mapsToAuthFlagsState() =
+ testScope.runTest {
+ kosmos.fakeBiometricSettingsRepository.setIsFaceAuthEnrolledAndEnabled(false)
+ kosmos.fakeBiometricSettingsRepository.setIsFingerprintAuthEnrolledAndEnabled(true)
+ kosmos.fakeTrustRepository.setTrustUsuallyManaged(false)
+ kosmos.fakeSystemPropertiesHelper.set(
+ DeviceUnlockedInteractor.SYS_BOOT_REASON_PROP,
+ "not mainline reboot"
+ )
+ runCurrent()
+
+ verifyRestrictionReasonsForAuthFlags(
+ LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_BOOT to
+ DeviceEntryRestrictionReason.DeviceNotUnlockedSinceReboot,
+ LockPatternUtils.StrongAuthTracker.SOME_AUTH_REQUIRED_AFTER_ADAPTIVE_AUTH_REQUEST to
+ DeviceEntryRestrictionReason.AdaptiveAuthRequest,
+ LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_LOCKOUT to
+ DeviceEntryRestrictionReason.BouncerLockedOut,
+ LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_TIMEOUT to
+ DeviceEntryRestrictionReason.SecurityTimeout,
+ LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_USER_LOCKDOWN to
+ DeviceEntryRestrictionReason.UserLockdown,
+ LockPatternUtils.StrongAuthTracker
+ .STRONG_AUTH_REQUIRED_AFTER_NON_STRONG_BIOMETRICS_TIMEOUT to
+ DeviceEntryRestrictionReason.NonStrongBiometricsSecurityTimeout,
+ LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_FOR_UNATTENDED_UPDATE to
+ DeviceEntryRestrictionReason.UnattendedUpdate,
+ LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_DPM_LOCK_NOW to
+ DeviceEntryRestrictionReason.PolicyLockdown,
+ LockPatternUtils.StrongAuthTracker.SOME_AUTH_REQUIRED_AFTER_USER_REQUEST to null,
+ LockPatternUtils.StrongAuthTracker.SOME_AUTH_REQUIRED_AFTER_TRUSTAGENT_EXPIRED to
+ null,
+ )
+ }
+
+ @Test
+ fun deviceEntryRestrictionReason_whenTrustAgentIsEnabled_mapsToAuthFlagsState() =
+ testScope.runTest {
+ kosmos.fakeBiometricSettingsRepository.setIsFaceAuthEnrolledAndEnabled(false)
+ kosmos.fakeBiometricSettingsRepository.setIsFingerprintAuthEnrolledAndEnabled(false)
+ kosmos.fakeTrustRepository.setTrustUsuallyManaged(true)
+ kosmos.fakeTrustRepository.setCurrentUserTrustManaged(false)
+ kosmos.fakeSystemPropertiesHelper.set(
+ DeviceUnlockedInteractor.SYS_BOOT_REASON_PROP,
+ "not mainline reboot"
+ )
+ runCurrent()
+
+ verifyRestrictionReasonsForAuthFlags(
+ LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_BOOT to
+ DeviceEntryRestrictionReason.DeviceNotUnlockedSinceReboot,
+ LockPatternUtils.StrongAuthTracker.SOME_AUTH_REQUIRED_AFTER_ADAPTIVE_AUTH_REQUEST to
+ DeviceEntryRestrictionReason.AdaptiveAuthRequest,
+ LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_LOCKOUT to
+ DeviceEntryRestrictionReason.BouncerLockedOut,
+ LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_TIMEOUT to
+ DeviceEntryRestrictionReason.SecurityTimeout,
+ LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_USER_LOCKDOWN to
+ DeviceEntryRestrictionReason.UserLockdown,
+ LockPatternUtils.StrongAuthTracker
+ .STRONG_AUTH_REQUIRED_AFTER_NON_STRONG_BIOMETRICS_TIMEOUT to
+ DeviceEntryRestrictionReason.NonStrongBiometricsSecurityTimeout,
+ LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_FOR_UNATTENDED_UPDATE to
+ DeviceEntryRestrictionReason.UnattendedUpdate,
+ LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_DPM_LOCK_NOW to
+ DeviceEntryRestrictionReason.PolicyLockdown,
+ LockPatternUtils.StrongAuthTracker.SOME_AUTH_REQUIRED_AFTER_USER_REQUEST to
+ DeviceEntryRestrictionReason.TrustAgentDisabled,
+ LockPatternUtils.StrongAuthTracker.SOME_AUTH_REQUIRED_AFTER_TRUSTAGENT_EXPIRED to
+ DeviceEntryRestrictionReason.TrustAgentDisabled,
+ )
+ }
+
+ @Test
+ fun deviceEntryRestrictionReason_whenDeviceRebootedForMainlineUpdate_mapsToTheCorrectReason() =
+ testScope.runTest {
+ val deviceEntryRestrictionReason by
+ collectLastValue(underTest.deviceEntryRestrictionReason)
+ kosmos.fakeSystemPropertiesHelper.set(
+ DeviceUnlockedInteractor.SYS_BOOT_REASON_PROP,
+ DeviceUnlockedInteractor.REBOOT_MAINLINE_UPDATE
+ )
+ kosmos.fakeBiometricSettingsRepository.setAuthenticationFlags(
+ AuthenticationFlags(
+ userId = 1,
+ flag = LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_BOOT
+ )
+ )
+ runCurrent()
+
+ kosmos.fakeBiometricSettingsRepository.setIsFaceAuthEnrolledAndEnabled(false)
+ kosmos.fakeBiometricSettingsRepository.setIsFingerprintAuthEnrolledAndEnabled(false)
+ kosmos.fakeTrustRepository.setTrustUsuallyManaged(false)
+ runCurrent()
+
+ assertThat(deviceEntryRestrictionReason).isNull()
+
+ kosmos.fakeBiometricSettingsRepository.setIsFaceAuthEnrolledAndEnabled(true)
+ runCurrent()
+
+ assertThat(deviceEntryRestrictionReason)
+ .isEqualTo(DeviceEntryRestrictionReason.DeviceNotUnlockedSinceMainlineUpdate)
+
+ kosmos.fakeBiometricSettingsRepository.setIsFaceAuthEnrolledAndEnabled(false)
+ kosmos.fakeBiometricSettingsRepository.setIsFingerprintAuthEnrolledAndEnabled(true)
+ runCurrent()
+
+ assertThat(deviceEntryRestrictionReason)
+ .isEqualTo(DeviceEntryRestrictionReason.DeviceNotUnlockedSinceMainlineUpdate)
+
+ kosmos.fakeBiometricSettingsRepository.setIsFingerprintAuthEnrolledAndEnabled(false)
+ kosmos.fakeTrustRepository.setTrustUsuallyManaged(true)
+ runCurrent()
+
+ assertThat(deviceEntryRestrictionReason)
+ .isEqualTo(DeviceEntryRestrictionReason.DeviceNotUnlockedSinceMainlineUpdate)
+ }
+
+ private fun TestScope.verifyRestrictionReasonsForAuthFlags(
+ vararg authFlagToDeviceEntryRestriction: Pair<Int, DeviceEntryRestrictionReason?>
+ ) {
+ val deviceEntryRestrictionReason by collectLastValue(underTest.deviceEntryRestrictionReason)
+
+ authFlagToDeviceEntryRestriction.forEach { (flag, expectedReason) ->
+ kosmos.fakeBiometricSettingsRepository.setAuthenticationFlags(
+ AuthenticationFlags(userId = 1, flag = flag)
+ )
+ runCurrent()
+
+ if (expectedReason == null) {
+ assertThat(deviceEntryRestrictionReason).isNull()
+ } else {
+ assertThat(deviceEntryRestrictionReason).isEqualTo(expectedReason)
+ }
+ }
+ }
+
companion object {
private const val primaryUserId = 1
private val primaryUser = UserInfo(primaryUserId, "test user", UserInfo.FLAG_PRIMARY)
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/dreams/DreamOverlayAnimationsControllerTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/dreams/DreamOverlayAnimationsControllerTest.kt
index 73ef77540398..88ba0411b414 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/dreams/DreamOverlayAnimationsControllerTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/dreams/DreamOverlayAnimationsControllerTest.kt
@@ -84,7 +84,7 @@ class DreamOverlayAnimationsControllerTest : SysuiTestCase() {
verify(mockAnimator, atLeastOnce()).addListener(captor.capture())
captor.allValues.forEach { it.onAnimationEnd(mockAnimator) }
- verify(stateController).setExitAnimationsRunning(false)
+ verify(stateController, times(2)).setExitAnimationsRunning(false)
}
@Test
@@ -154,4 +154,10 @@ class DreamOverlayAnimationsControllerTest : SysuiTestCase() {
}
)
}
+
+ @Test
+ fun testCancelAnimations_clearsExitAnimationsRunning() {
+ controller.cancelAnimations()
+ verify(stateController).setExitAnimationsRunning(false)
+ }
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/dreams/DreamOverlayServiceTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/dreams/DreamOverlayServiceTest.kt
index 5a39de8392be..60c9bb03b68e 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/dreams/DreamOverlayServiceTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/dreams/DreamOverlayServiceTest.kt
@@ -34,10 +34,14 @@ import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.LifecycleRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.app.viewcapture.ViewCapture
+import com.android.app.viewcapture.ViewCaptureAwareWindowManager
+import com.android.app.viewcapture.ViewCaptureFactory
import com.android.compose.animation.scene.ObservableTransitionState
import com.android.internal.logging.UiEventLogger
import com.android.keyguard.KeyguardUpdateMonitor
import com.android.keyguard.KeyguardUpdateMonitorCallback
+import com.android.systemui.Flags.FLAG_COMMUNAL_HUB
import com.android.systemui.SysuiTestCase
import com.android.systemui.ambient.touch.TouchMonitor
import com.android.systemui.ambient.touch.dagger.AmbientTouchComponent
@@ -79,6 +83,7 @@ import org.mockito.Mock
import org.mockito.Mockito
import org.mockito.Mockito.clearInvocations
import org.mockito.Mockito.isNull
+import org.mockito.Mockito.spy
import org.mockito.Mockito.verify
import org.mockito.MockitoAnnotations
@@ -154,8 +159,12 @@ class DreamOverlayServiceTest : SysuiTestCase() {
@Mock lateinit var mDreamOverlayCallbackController: DreamOverlayCallbackController
+ @Mock lateinit var mLazyViewCapture: Lazy<ViewCapture>
+
+ private lateinit var mViewCaptureAwareWindowManager: ViewCaptureAwareWindowManager
private lateinit var bouncerRepository: FakeKeyguardBouncerRepository
private lateinit var communalRepository: FakeCommunalSceneRepository
+ private var viewCaptureSpy = spy(ViewCaptureFactory.getInstance(context))
@Captor var mViewCaptor: ArgumentCaptor<View>? = null
private lateinit var mService: DreamOverlayService
@@ -192,13 +201,20 @@ class DreamOverlayServiceTest : SysuiTestCase() {
whenever(mDreamOverlayContainerViewController.containerView)
.thenReturn(mDreamOverlayContainerView)
whenever(mScrimManager.getCurrentController()).thenReturn(mScrimController)
+ whenever(mLazyViewCapture.value).thenReturn(viewCaptureSpy)
mWindowParams = WindowManager.LayoutParams()
+ mViewCaptureAwareWindowManager =
+ ViewCaptureAwareWindowManager(
+ mWindowManager,
+ mLazyViewCapture,
+ isViewCaptureEnabled = false
+ )
mService =
DreamOverlayService(
mContext,
mLifecycleOwner,
mMainExecutor,
- mWindowManager,
+ mViewCaptureAwareWindowManager,
mComplicationComponentFactory,
mDreamComplicationComponentFactory,
mDreamOverlayComponentFactory,
@@ -623,7 +639,7 @@ class DreamOverlayServiceTest : SysuiTestCase() {
}
@Test
- @EnableFlags(Flags.FLAG_DREAM_WAKE_REDIRECT)
+ @EnableFlags(Flags.FLAG_DREAM_WAKE_REDIRECT, FLAG_COMMUNAL_HUB)
@kotlin.Throws(RemoteException::class)
fun testTransitionToGlanceableHub() =
testScope.runTest {
@@ -647,7 +663,7 @@ class DreamOverlayServiceTest : SysuiTestCase() {
}
@Test
- @EnableFlags(Flags.FLAG_DREAM_WAKE_REDIRECT)
+ @EnableFlags(Flags.FLAG_DREAM_WAKE_REDIRECT, FLAG_COMMUNAL_HUB)
@Throws(RemoteException::class)
fun testRedirectExit() =
testScope.runTest {
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/education/data/repository/ContextualEducationRepositoryTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/education/data/repository/ContextualEducationRepositoryTest.kt
new file mode 100644
index 000000000000..3a4b14b81e07
--- /dev/null
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/education/data/repository/ContextualEducationRepositoryTest.kt
@@ -0,0 +1,107 @@
+/*
+ * 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.systemui.education.data.repository
+
+import android.content.Context
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.SmallTest
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.SysuiTestableContext
+import com.android.systemui.coroutines.collectLastValue
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.testDispatcher
+import com.android.systemui.kosmos.testScope
+import com.android.systemui.shared.education.GestureType.BACK_GESTURE
+import com.google.common.truth.Truth.assertThat
+import java.io.File
+import java.time.Clock
+import java.time.Instant
+import javax.inject.Provider
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.test.TestScope
+import kotlinx.coroutines.test.runTest
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
+import org.junit.rules.TemporaryFolder
+import org.junit.runner.RunWith
+
+@SmallTest
+@RunWith(AndroidJUnit4::class)
+class ContextualEducationRepositoryTest : SysuiTestCase() {
+
+ private lateinit var underTest: ContextualEducationRepository
+ private val kosmos = Kosmos()
+ private val testScope = kosmos.testScope
+ private val dsScopeProvider: Provider<CoroutineScope> = Provider {
+ TestScope(kosmos.testDispatcher).backgroundScope
+ }
+ private val clock: Clock = FakeEduClock(Instant.ofEpochMilli(1000))
+ private val testUserId = 1111
+
+ // For deleting any test files created after the test
+ @get:Rule val tmpFolder: TemporaryFolder = TemporaryFolder.builder().assureDeletion().build()
+
+ @Before
+ fun setUp() {
+ // Create TestContext here because TemporaryFolder.create() is called in @Before. It is
+ // needed before calling TemporaryFolder.newFolder().
+ val testContext = TestContext(context, tmpFolder.newFolder())
+ val userRepository = UserContextualEducationRepository(testContext, dsScopeProvider)
+ underTest = ContextualEducationRepositoryImpl(clock, userRepository)
+ underTest.setUser(testUserId)
+ }
+
+ @Test
+ fun changeRetrievedValueForNewUser() =
+ testScope.runTest {
+ // Update data for old user.
+ underTest.incrementSignalCount(BACK_GESTURE)
+ val model by collectLastValue(underTest.readGestureEduModelFlow(BACK_GESTURE))
+ assertThat(model?.signalCount).isEqualTo(1)
+
+ // User is changed.
+ underTest.setUser(1112)
+ // Assert count is 0 after user is changed.
+ assertThat(model?.signalCount).isEqualTo(0)
+ }
+
+ @Test
+ fun incrementSignalCount() =
+ testScope.runTest {
+ underTest.incrementSignalCount(BACK_GESTURE)
+ val model by collectLastValue(underTest.readGestureEduModelFlow(BACK_GESTURE))
+ assertThat(model?.signalCount).isEqualTo(1)
+ }
+
+ @Test
+ fun dataAddedOnUpdateShortcutTriggerTime() =
+ testScope.runTest {
+ val model by collectLastValue(underTest.readGestureEduModelFlow(BACK_GESTURE))
+ assertThat(model?.lastShortcutTriggeredTime).isNull()
+ underTest.updateShortcutTriggerTime(BACK_GESTURE)
+ assertThat(model?.lastShortcutTriggeredTime).isEqualTo(clock.instant())
+ }
+
+ /** Test context which allows overriding getFilesDir path */
+ private class TestContext(context: Context, private val folder: File) :
+ SysuiTestableContext(context) {
+ override fun getFilesDir(): File {
+ return folder
+ }
+ }
+}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/education/domain/interactor/KeyboardTouchpadStatsInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/education/domain/interactor/KeyboardTouchpadStatsInteractorTest.kt
new file mode 100644
index 000000000000..ee51e37faba7
--- /dev/null
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/education/domain/interactor/KeyboardTouchpadStatsInteractorTest.kt
@@ -0,0 +1,63 @@
+/*
+ * 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.systemui.education.domain.interactor
+
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.SmallTest
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.coroutines.collectLastValue
+import com.android.systemui.education.data.repository.contextualEducationRepository
+import com.android.systemui.education.data.repository.fakeEduClock
+import com.android.systemui.kosmos.testScope
+import com.android.systemui.shared.education.GestureType.BACK_GESTURE
+import com.android.systemui.testKosmos
+import com.google.common.truth.Truth.assertThat
+import kotlinx.coroutines.test.runTest
+import org.junit.Test
+import org.junit.runner.RunWith
+
+@SmallTest
+@RunWith(AndroidJUnit4::class)
+class KeyboardTouchpadStatsInteractorTest : SysuiTestCase() {
+ private val kosmos = testKosmos()
+ private val testScope = kosmos.testScope
+ private val underTest = kosmos.keyboardTouchpadEduStatsInteractor
+
+ @Test
+ fun dataUpdatedOnIncrementSignalCount() =
+ testScope.runTest {
+ val model by
+ collectLastValue(
+ kosmos.contextualEducationRepository.readGestureEduModelFlow(BACK_GESTURE)
+ )
+ val originalValue = model!!.signalCount
+ underTest.incrementSignalCount(BACK_GESTURE)
+ assertThat(model?.signalCount).isEqualTo(originalValue + 1)
+ }
+
+ @Test
+ fun dataAddedOnUpdateShortcutTriggerTime() =
+ testScope.runTest {
+ val model by
+ collectLastValue(
+ kosmos.contextualEducationRepository.readGestureEduModelFlow(BACK_GESTURE)
+ )
+ assertThat(model?.lastShortcutTriggeredTime).isNull()
+ underTest.updateShortcutTriggerTime(BACK_GESTURE)
+ assertThat(model?.lastShortcutTriggeredTime).isEqualTo(kosmos.fakeEduClock.instant())
+ }
+}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/haptics/qs/QSLongPressEffectTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/haptics/qs/QSLongPressEffectTest.kt
index 74eee9b24cbc..18839e6acb96 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/haptics/qs/QSLongPressEffectTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/haptics/qs/QSLongPressEffectTest.kt
@@ -17,10 +17,13 @@
package com.android.systemui.haptics.qs
import android.os.VibrationEffect
+import android.service.quicksettings.Tile
import android.testing.TestableLooper.RunWithLooper
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
+import com.android.systemui.animation.ActivityTransitionAnimator
+import com.android.systemui.classifier.falsingManager
import com.android.systemui.haptics.vibratorHelper
import com.android.systemui.kosmos.testScope
import com.android.systemui.qs.qsTileFactory
@@ -50,6 +53,7 @@ class QSLongPressEffectTest : SysuiTestCase() {
private val vibratorHelper = kosmos.vibratorHelper
private val qsTile = kosmos.qsTileFactory.createTile("Test Tile")
@Mock private lateinit var callback: QSLongPressEffect.Callback
+ @Mock private lateinit var controller: ActivityTransitionAnimator.Controller
private val effectDuration = 400
private val lowTickDuration = 12
@@ -69,6 +73,7 @@ class QSLongPressEffectTest : SysuiTestCase() {
QSLongPressEffect(
vibratorHelper,
kosmos.keyguardStateController,
+ kosmos.falsingManager,
)
longPressEffect.callback = callback
longPressEffect.qsTile = qsTile
@@ -175,17 +180,17 @@ class QSLongPressEffectTest : SysuiTestCase() {
}
@Test
- fun onAnimationComplete_keyguardDismissible_effectCompletes() =
+ fun onAnimationComplete_keyguardDismissible_effectEndsInLongClicked() =
testWhileInState(QSLongPressEffect.State.RUNNING_FORWARD) {
// GIVEN that the animation completes
longPressEffect.handleAnimationComplete()
- // THEN the long-press effect completes
- assertEffectCompleted()
+ // THEN the long-press effect completes with a long-click state
+ assertEffectCompleted(QSLongPressEffect.State.LONG_CLICKED)
}
@Test
- fun onAnimationComplete_keyguardNotDismissible_effectEndsWithReset() =
+ fun onAnimationComplete_keyguardNotDismissible_effectEndsInIdleWithReset() =
testWhileInState(QSLongPressEffect.State.RUNNING_FORWARD) {
// GIVEN that the keyguard is not dismissible
whenever(kosmos.keyguardStateController.isUnlocked).thenReturn(false)
@@ -193,19 +198,20 @@ class QSLongPressEffectTest : SysuiTestCase() {
// GIVEN that the animation completes
longPressEffect.handleAnimationComplete()
- // THEN the long-press effect completes and the properties are called to reset
- assertEffectCompleted()
+ // THEN the long-press effect ends in the idle state and the properties are reset
+ assertEffectCompleted(QSLongPressEffect.State.IDLE)
verify(callback, times(1)).onResetProperties()
}
@Test
- fun onAnimationComplete_whenRunningBackwardsFromUp_endsWithFinishedReversing() =
+ fun onAnimationComplete_whenRunningBackwardsFromUp_endsWithFinishedReversingAndClick() =
testWhileInState(QSLongPressEffect.State.RUNNING_BACKWARDS_FROM_UP) {
// GIVEN that the animation completes
longPressEffect.handleAnimationComplete()
- // THEN the callback for finished reversing is used.
+ // THEN the callback for finished reversing is used and the effect ends with a click.
verify(callback, times(1)).onEffectFinishedReversing()
+ assertThat(longPressEffect.state).isEqualTo(QSLongPressEffect.State.CLICKED)
}
@Test
@@ -214,8 +220,9 @@ class QSLongPressEffectTest : SysuiTestCase() {
// GIVEN that the animation completes
longPressEffect.handleAnimationComplete()
- // THEN the effect ends in the idle state.
+ // THEN the effect ends in the idle state and the reversed callback is used.
assertThat(longPressEffect.state).isEqualTo(QSLongPressEffect.State.IDLE)
+ verify(callback, times(1)).onEffectFinishedReversing()
}
@Test
@@ -262,18 +269,105 @@ class QSLongPressEffectTest : SysuiTestCase() {
}
@Test
- fun onTileClick_whileWaiting_withoutQSTile_cannotClick() =
- testWhileInState(QSLongPressEffect.State.TIMEOUT_WAIT) {
- // GIVEN that no QSTile has been set
- longPressEffect.qsTile = null
-
+ fun onTileClick_whileIdle_withQSTile_clicks() =
+ testWhileInState(QSLongPressEffect.State.IDLE) {
// GIVEN that a click was detected
val couldClick = longPressEffect.onTileClick()
+ // THEN the click is successful
+ assertThat(couldClick).isTrue()
+ }
+
+ @Test
+ fun onTileClick_whenBouncerIsShowing_ignoresClick() =
+ testWhileInState(QSLongPressEffect.State.IDLE) {
+ // GIVEN that the bouncer is showing
+ whenever(kosmos.keyguardStateController.isPrimaryBouncerShowing).thenReturn(true)
+
+ // WHEN a click is detected by the tile view
+ val couldClick = longPressEffect.onTileClick()
+
// THEN the click is not successful
assertThat(couldClick).isFalse()
}
+ @Test
+ fun getStateForClick_withUnavailableTile_returnsIdle() {
+ // GIVEN an unavailable tile
+ qsTile.state?.state = Tile.STATE_UNAVAILABLE
+
+ // WHEN determining the state of a click action
+ val clickState = longPressEffect.getStateForClick()
+
+ // THEN the state is IDLE
+ assertThat(clickState).isEqualTo(QSLongPressEffect.State.IDLE)
+ }
+
+ @Test
+ fun getStateForClick_withFalseTapWhenLocked_returnsIdle() {
+ // GIVEN an active tile
+ qsTile.state?.state = Tile.STATE_ACTIVE
+
+ // GIVEN that the device is locked and a false tap is detected
+ whenever(kosmos.keyguardStateController.isUnlocked).thenReturn(false)
+ kosmos.falsingManager.setFalseTap(true)
+
+ // WHEN determining the state of a click action
+ val clickState = longPressEffect.getStateForClick()
+
+ // THEN the state is IDLE
+ assertThat(clickState).isEqualTo(QSLongPressEffect.State.IDLE)
+ }
+
+ @Test
+ fun getStateForClick_withValidTapAndTile_returnsClicked() {
+ // GIVEN an active tile
+ qsTile.state?.state = Tile.STATE_ACTIVE
+
+ // GIVEN that the device is locked and a false tap is not detected
+ whenever(kosmos.keyguardStateController.isUnlocked).thenReturn(false)
+ kosmos.falsingManager.setFalseTap(false)
+
+ // WHEN determining the state of a click action
+ val clickState = longPressEffect.getStateForClick()
+
+ // THEN the state is CLICKED
+ assertThat(clickState).isEqualTo(QSLongPressEffect.State.CLICKED)
+ }
+
+ @Test
+ fun getStateForClick_withNullTile_returnsIdle() {
+ // GIVEN that the tile is null
+ longPressEffect.qsTile = null
+
+ // GIVEN that the device is locked and a false tap is not detected
+ whenever(kosmos.keyguardStateController.isUnlocked).thenReturn(false)
+ kosmos.falsingManager.setFalseTap(false)
+
+ // WHEN determining the state of a click action
+ val clickState = longPressEffect.getStateForClick()
+
+ // THEN the state is IDLE
+ assertThat(clickState).isEqualTo(QSLongPressEffect.State.IDLE)
+ }
+
+ @Test
+ fun onLongClickTransitionCancelled_whileInLongClickState_reversesEffect() =
+ testWhileInState(QSLongPressEffect.State.LONG_CLICKED) {
+ // GIVEN a transition controller delegate
+ val delegate = longPressEffect.createTransitionControllerDelegate(controller)
+
+ // WHEN the activity launch animation is cancelled
+ val newOccludedState = false
+ delegate.onTransitionAnimationCancelled(newOccludedState)
+
+ // THEN the effect reverses and ends in RUNNING_BACKWARDS_FROM_CANCEL
+ assertThat(longPressEffect.state)
+ .isEqualTo(QSLongPressEffect.State.RUNNING_BACKWARDS_FROM_CANCEL)
+ verify(callback, times(1)).onReverseAnimator(false)
+ verify(controller).onTransitionAnimationCancelled(newOccludedState)
+ }
+
private fun testWithScope(initialize: Boolean = true, test: suspend TestScope.() -> Unit) =
with(kosmos) {
testScope.runTest {
@@ -339,14 +433,14 @@ class QSLongPressEffectTest : SysuiTestCase() {
/**
* Asserts that the effect completes by checking that:
* 1. The final snap haptics are played
- * 2. The internal state goes back to [QSLongPressEffect.State.IDLE]
+ * 2. The internal state goes back to specified end state.
*/
- private fun assertEffectCompleted() {
+ private fun assertEffectCompleted(endState: QSLongPressEffect.State) {
val snapEffect = LongPressHapticBuilder.createSnapEffect()
assertThat(snapEffect).isNotNull()
assertThat(vibratorHelper.hasVibratedWithEffects(snapEffect!!)).isTrue()
- assertThat(longPressEffect.state).isEqualTo(QSLongPressEffect.State.IDLE)
+ assertThat(longPressEffect.state).isEqualTo(endState)
}
/**
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/domain/interactor/FromDozingTransitionInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/domain/interactor/FromDozingTransitionInteractorTest.kt
index 612f2e73e4bb..b885800ab964 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/domain/interactor/FromDozingTransitionInteractorTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/domain/interactor/FromDozingTransitionInteractorTest.kt
@@ -34,12 +34,14 @@ package com.android.systemui.keyguard.domain.interactor
import android.os.PowerManager
import android.platform.test.annotations.EnableFlags
+import android.service.dream.dreamManager
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.compose.animation.scene.ObservableTransitionState
import com.android.systemui.Flags
import com.android.systemui.SysuiTestCase
import com.android.systemui.communal.data.repository.fakeCommunalSceneRepository
+import com.android.systemui.communal.domain.interactor.setCommunalAvailable
import com.android.systemui.communal.shared.model.CommunalScenes
import com.android.systemui.keyguard.data.repository.FakeKeyguardTransitionRepository
import com.android.systemui.keyguard.data.repository.fakeKeyguardRepository
@@ -64,8 +66,10 @@ import kotlinx.coroutines.test.runTest
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
+import org.mockito.Mockito.anyBoolean
import org.mockito.Mockito.reset
import org.mockito.Mockito.spy
+import org.mockito.kotlin.whenever
@OptIn(ExperimentalCoroutinesApi::class)
@SmallTest
@@ -119,6 +123,66 @@ class FromDozingTransitionInteractorTest : SysuiTestCase() {
}
@Test
+ @EnableFlags(Flags.FLAG_KEYGUARD_WM_STATE_REFACTOR, Flags.FLAG_COMMUNAL_HUB)
+ fun testTransitionToLockscreen_onPowerButtonPress_canDream_glanceableHubAvailable() =
+ testScope.runTest {
+ whenever(kosmos.dreamManager.canStartDreaming(anyBoolean())).thenReturn(true)
+ kosmos.setCommunalAvailable(true)
+ runCurrent()
+
+ powerInteractor.setAwakeForTest(reason = PowerManager.WAKE_REASON_POWER_BUTTON)
+ runCurrent()
+
+ // If dreaming is possible and communal is available, then we should transition to
+ // GLANCEABLE_HUB when waking up due to power button press.
+ assertThat(transitionRepository)
+ .startedTransition(
+ from = KeyguardState.DOZING,
+ to = KeyguardState.GLANCEABLE_HUB,
+ )
+ }
+
+ @Test
+ @EnableFlags(Flags.FLAG_KEYGUARD_WM_STATE_REFACTOR)
+ fun testTransitionToLockscreen_onPowerButtonPress_canNotDream_glanceableHubAvailable() =
+ testScope.runTest {
+ whenever(kosmos.dreamManager.canStartDreaming(anyBoolean())).thenReturn(false)
+ kosmos.setCommunalAvailable(true)
+ runCurrent()
+
+ powerInteractor.setAwakeForTest(reason = PowerManager.WAKE_REASON_POWER_BUTTON)
+ runCurrent()
+
+ // If dreaming is NOT possible but communal is available, then we should transition to
+ // LOCKSCREEN when waking up due to power button press.
+ assertThat(transitionRepository)
+ .startedTransition(
+ from = KeyguardState.DOZING,
+ to = KeyguardState.LOCKSCREEN,
+ )
+ }
+
+ @Test
+ @EnableFlags(Flags.FLAG_KEYGUARD_WM_STATE_REFACTOR)
+ fun testTransitionToLockscreen_onPowerButtonPress_canNDream_glanceableHubNotAvailable() =
+ testScope.runTest {
+ whenever(kosmos.dreamManager.canStartDreaming(anyBoolean())).thenReturn(true)
+ kosmos.setCommunalAvailable(false)
+ runCurrent()
+
+ powerInteractor.setAwakeForTest(reason = PowerManager.WAKE_REASON_POWER_BUTTON)
+ runCurrent()
+
+ // If dreaming is possible but communal is NOT available, then we should transition to
+ // LOCKSCREEN when waking up due to power button press.
+ assertThat(transitionRepository)
+ .startedTransition(
+ from = KeyguardState.DOZING,
+ to = KeyguardState.LOCKSCREEN,
+ )
+ }
+
+ @Test
@EnableFlags(Flags.FLAG_KEYGUARD_WM_STATE_REFACTOR)
fun testTransitionToGlanceableHub_onWakeup_ifIdleOnCommunal_noOccludingActivity() =
testScope.runTest {
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/domain/interactor/KeyguardClockInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/domain/interactor/KeyguardClockInteractorTest.kt
index 26b56a1be926..48621047016b 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/domain/interactor/KeyguardClockInteractorTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/domain/interactor/KeyguardClockInteractorTest.kt
@@ -37,7 +37,6 @@ import com.android.systemui.kosmos.testScope
import com.android.systemui.media.controls.data.repository.mediaFilterRepository
import com.android.systemui.media.controls.shared.model.MediaData
import com.android.systemui.shade.data.repository.shadeRepository
-import com.android.systemui.shade.shared.model.ShadeMode
import com.android.systemui.statusbar.notification.data.repository.activeNotificationListRepository
import com.android.systemui.statusbar.notification.data.repository.setActiveNotifs
import com.android.systemui.statusbar.notification.stack.data.repository.headsUpNotificationRepository
@@ -81,10 +80,10 @@ class KeyguardClockInteractorTest : SysuiTestCase() {
testScope.runTest {
val value by collectLastValue(underTest.clockShouldBeCentered)
kosmos.keyguardInteractor.setClockShouldBeCentered(true)
- assertThat(value).isEqualTo(true)
+ assertThat(value).isTrue()
kosmos.keyguardInteractor.setClockShouldBeCentered(false)
- assertThat(value).isEqualTo(false)
+ assertThat(value).isFalse()
}
@Test
@@ -103,7 +102,7 @@ class KeyguardClockInteractorTest : SysuiTestCase() {
fun clockSize_SceneContainerFlagOn_shadeModeSingle_hasNotifs_SMALL() =
testScope.runTest {
val value by collectLastValue(underTest.clockSize)
- kosmos.shadeRepository.setShadeMode(ShadeMode.Single)
+ kosmos.shadeRepository.setShadeLayoutWide(false)
kosmos.activeNotificationListRepository.setActiveNotifs(1)
assertThat(value).isEqualTo(ClockSize.SMALL)
}
@@ -113,7 +112,7 @@ class KeyguardClockInteractorTest : SysuiTestCase() {
fun clockSize_SceneContainerFlagOn_shadeModeSingle_hasMedia_SMALL() =
testScope.runTest {
val value by collectLastValue(underTest.clockSize)
- kosmos.shadeRepository.setShadeMode(ShadeMode.Single)
+ kosmos.shadeRepository.setShadeLayoutWide(false)
val userMedia = MediaData().copy(active = true)
kosmos.mediaFilterRepository.addSelectedUserMediaEntry(userMedia)
assertThat(value).isEqualTo(ClockSize.SMALL)
@@ -125,7 +124,7 @@ class KeyguardClockInteractorTest : SysuiTestCase() {
testScope.runTest {
val value by collectLastValue(underTest.clockSize)
val userMedia = MediaData().copy(active = true)
- kosmos.shadeRepository.setShadeMode(ShadeMode.Split)
+ kosmos.shadeRepository.setShadeLayoutWide(true)
kosmos.mediaFilterRepository.addSelectedUserMediaEntry(userMedia)
kosmos.keyguardRepository.setIsDozing(false)
assertThat(value).isEqualTo(ClockSize.SMALL)
@@ -136,7 +135,7 @@ class KeyguardClockInteractorTest : SysuiTestCase() {
fun clockSize_SceneContainerFlagOn_shadeModeSplit_noMedia_LARGE() =
testScope.runTest {
val value by collectLastValue(underTest.clockSize)
- kosmos.shadeRepository.setShadeMode(ShadeMode.Split)
+ kosmos.shadeRepository.setShadeLayoutWide(true)
kosmos.keyguardRepository.setIsDozing(false)
assertThat(value).isEqualTo(ClockSize.LARGE)
}
@@ -147,7 +146,7 @@ class KeyguardClockInteractorTest : SysuiTestCase() {
testScope.runTest {
val value by collectLastValue(underTest.clockSize)
val userMedia = MediaData().copy(active = true)
- kosmos.shadeRepository.setShadeMode(ShadeMode.Split)
+ kosmos.shadeRepository.setShadeLayoutWide(true)
kosmos.mediaFilterRepository.addSelectedUserMediaEntry(userMedia)
kosmos.keyguardRepository.setIsDozing(true)
assertThat(value).isEqualTo(ClockSize.LARGE)
@@ -158,8 +157,8 @@ class KeyguardClockInteractorTest : SysuiTestCase() {
fun clockShouldBeCentered_sceneContainerFlagOn_notSplitMode_true() =
testScope.runTest {
val value by collectLastValue(underTest.clockShouldBeCentered)
- kosmos.shadeRepository.setShadeMode(ShadeMode.Single)
- assertThat(value).isEqualTo(true)
+ kosmos.shadeRepository.setShadeLayoutWide(false)
+ assertThat(value).isTrue()
}
@Test
@@ -167,9 +166,9 @@ class KeyguardClockInteractorTest : SysuiTestCase() {
fun clockShouldBeCentered_sceneContainerFlagOn_splitMode_noActiveNotifications_true() =
testScope.runTest {
val value by collectLastValue(underTest.clockShouldBeCentered)
- kosmos.shadeRepository.setShadeMode(ShadeMode.Split)
+ kosmos.shadeRepository.setShadeLayoutWide(true)
kosmos.activeNotificationListRepository.setActiveNotifs(0)
- assertThat(value).isEqualTo(true)
+ assertThat(value).isTrue()
}
@Test
@@ -177,10 +176,10 @@ class KeyguardClockInteractorTest : SysuiTestCase() {
fun clockShouldBeCentered_sceneContainerFlagOn_splitMode_isActiveDreamLockscreenHosted_true() =
testScope.runTest {
val value by collectLastValue(underTest.clockShouldBeCentered)
- kosmos.shadeRepository.setShadeMode(ShadeMode.Split)
+ kosmos.shadeRepository.setShadeLayoutWide(true)
kosmos.activeNotificationListRepository.setActiveNotifs(1)
kosmos.keyguardRepository.setIsActiveDreamLockscreenHosted(true)
- assertThat(value).isEqualTo(true)
+ assertThat(value).isTrue()
}
@Test
@@ -188,11 +187,11 @@ class KeyguardClockInteractorTest : SysuiTestCase() {
fun clockShouldBeCentered_sceneContainerFlagOn_splitMode_hasPulsingNotifications_false() =
testScope.runTest {
val value by collectLastValue(underTest.clockShouldBeCentered)
- kosmos.shadeRepository.setShadeMode(ShadeMode.Split)
+ kosmos.shadeRepository.setShadeLayoutWide(true)
kosmos.activeNotificationListRepository.setActiveNotifs(1)
kosmos.headsUpNotificationRepository.isHeadsUpAnimatingAway.value = true
kosmos.keyguardRepository.setIsDozing(true)
- assertThat(value).isEqualTo(false)
+ assertThat(value).isFalse()
}
@Test
@@ -200,10 +199,10 @@ class KeyguardClockInteractorTest : SysuiTestCase() {
fun clockShouldBeCentered_sceneContainerFlagOn_splitMode_onAod_true() =
testScope.runTest {
val value by collectLastValue(underTest.clockShouldBeCentered)
- kosmos.shadeRepository.setShadeMode(ShadeMode.Split)
+ kosmos.shadeRepository.setShadeLayoutWide(true)
kosmos.activeNotificationListRepository.setActiveNotifs(1)
transitionTo(KeyguardState.LOCKSCREEN, KeyguardState.AOD)
- assertThat(value).isEqualTo(true)
+ assertThat(value).isTrue()
}
@Test
@@ -211,10 +210,10 @@ class KeyguardClockInteractorTest : SysuiTestCase() {
fun clockShouldBeCentered_sceneContainerFlagOn_splitMode_offAod_false() =
testScope.runTest {
val value by collectLastValue(underTest.clockShouldBeCentered)
- kosmos.shadeRepository.setShadeMode(ShadeMode.Split)
+ kosmos.shadeRepository.setShadeLayoutWide(true)
kosmos.activeNotificationListRepository.setActiveNotifs(1)
transitionTo(KeyguardState.AOD, KeyguardState.LOCKSCREEN)
- assertThat(value).isEqualTo(false)
+ assertThat(value).isFalse()
}
private suspend fun transitionTo(from: KeyguardState, to: KeyguardState) {
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTouchHandlingInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTouchHandlingInteractorTest.kt
index 96b4b4325408..2b2c121fb79a 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTouchHandlingInteractorTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTouchHandlingInteractorTest.kt
@@ -171,14 +171,15 @@ class KeyguardTouchHandlingInteractorTest : SysuiTestCase() {
}
@Test
- fun longPressed_openWppDirectlyEnabled_doesNotShowMenu_opensSettings() =
+ fun longPressed_isA11yAction_doesNotShowMenu_opensSettings() =
testScope.runTest {
- createUnderTest(isOpenWppDirectlyEnabled = true)
+ createUnderTest()
val isMenuVisible by collectLastValue(underTest.isMenuVisible)
val shouldOpenSettings by collectLastValue(underTest.shouldOpenSettings)
+ val isA11yAction = true
runCurrent()
- underTest.onLongPress()
+ underTest.onLongPress(isA11yAction)
assertThat(isMenuVisible).isFalse()
assertThat(shouldOpenSettings).isTrue()
@@ -284,7 +285,6 @@ class KeyguardTouchHandlingInteractorTest : SysuiTestCase() {
private suspend fun createUnderTest(
isLongPressFeatureEnabled: Boolean = true,
isRevampedWppFeatureEnabled: Boolean = true,
- isOpenWppDirectlyEnabled: Boolean = false,
) {
// This needs to be re-created for each test outside of kosmos since the flag values are
// read during initialization to set up flows. Maybe there is a better way to handle that.
@@ -298,7 +298,6 @@ class KeyguardTouchHandlingInteractorTest : SysuiTestCase() {
featureFlags =
kosmos.fakeFeatureFlagsClassic.apply {
set(Flags.LOCK_SCREEN_LONG_PRESS_ENABLED, isLongPressFeatureEnabled)
- set(Flags.LOCK_SCREEN_LONG_PRESS_DIRECT_TO_WPP, isOpenWppDirectlyEnabled)
},
broadcastDispatcher = fakeBroadcastDispatcher,
accessibilityManager = kosmos.accessibilityManagerWrapper,
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionScenariosTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionScenariosTest.kt
index 824132adc0d5..42cd5ec69466 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionScenariosTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionScenariosTest.kt
@@ -17,6 +17,7 @@
package com.android.systemui.keyguard.domain.interactor
import android.app.StatusBarManager
+import android.platform.test.annotations.DisableFlags
import android.platform.test.annotations.EnableFlags
import android.platform.test.flag.junit.FlagsParameterization
import androidx.test.filters.SmallTest
@@ -25,15 +26,21 @@ import com.android.keyguard.KeyguardSecurityModel
import com.android.keyguard.KeyguardSecurityModel.SecurityMode.PIN
import com.android.systemui.Flags
import com.android.systemui.Flags.FLAG_COMMUNAL_HUB
+import com.android.systemui.Flags.FLAG_COMMUNAL_SCENE_KTF_REFACTOR
import com.android.systemui.SysuiTestCase
import com.android.systemui.bouncer.data.repository.fakeKeyguardBouncerRepository
+import com.android.systemui.communal.domain.interactor.CommunalSceneTransitionInteractor
import com.android.systemui.communal.domain.interactor.communalInteractor
+import com.android.systemui.communal.domain.interactor.communalSceneInteractor
+import com.android.systemui.communal.domain.interactor.communalSceneTransitionInteractor
import com.android.systemui.communal.domain.interactor.setCommunalAvailable
import com.android.systemui.communal.shared.model.CommunalScenes
import com.android.systemui.flags.BrokenWithSceneContainer
import com.android.systemui.flags.DisableSceneContainer
import com.android.systemui.flags.FakeFeatureFlags
+import com.android.systemui.flags.Flags.COMMUNAL_SERVICE_ENABLED
import com.android.systemui.flags.andSceneContainer
+import com.android.systemui.flags.fakeFeatureFlagsClassic
import com.android.systemui.keyguard.data.repository.FakeKeyguardTransitionRepository
import com.android.systemui.keyguard.data.repository.fakeCommandQueue
import com.android.systemui.keyguard.data.repository.fakeKeyguardRepository
@@ -120,15 +127,22 @@ class KeyguardTransitionScenariosTest(flags: FlagsParameterization?) : SysuiTest
private val fromGlanceableHubTransitionInteractor by lazy {
kosmos.fromGlanceableHubTransitionInteractor
}
+ private val communalSceneTransitionInteractor by lazy {
+ kosmos.communalSceneTransitionInteractor
+ }
private val powerInteractor by lazy { kosmos.powerInteractor }
private val communalInteractor by lazy { kosmos.communalInteractor }
+ private val communalSceneInteractor by lazy { kosmos.communalSceneInteractor }
companion object {
@JvmStatic
@Parameters(name = "{0}")
fun getParams(): List<FlagsParameterization> {
- return FlagsParameterization.allCombinationsOf().andSceneContainer()
+ return FlagsParameterization.allCombinationsOf(
+ FLAG_COMMUNAL_SCENE_KTF_REFACTOR,
+ )
+ .andSceneContainer()
}
}
@@ -143,6 +157,7 @@ class KeyguardTransitionScenariosTest(flags: FlagsParameterization?) : SysuiTest
whenever(keyguardSecurityModel.getSecurityMode(anyInt())).thenReturn(PIN)
mSetFlagsRule.enableFlags(FLAG_COMMUNAL_HUB)
+ kosmos.fakeFeatureFlagsClassic.set(COMMUNAL_SERVICE_ENABLED, true)
if (!SceneContainerFlag.isEnabled) {
mSetFlagsRule.disableFlags(
Flags.FLAG_KEYGUARD_WM_STATE_REFACTOR,
@@ -160,6 +175,7 @@ class KeyguardTransitionScenariosTest(flags: FlagsParameterization?) : SysuiTest
fromOccludedTransitionInteractor.start()
fromAlternateBouncerTransitionInteractor.start()
fromGlanceableHubTransitionInteractor.start()
+ communalSceneTransitionInteractor.start()
}
@Test
@@ -633,6 +649,7 @@ class KeyguardTransitionScenariosTest(flags: FlagsParameterization?) : SysuiTest
@Test
@DisableSceneContainer
+ @DisableFlags(FLAG_COMMUNAL_SCENE_KTF_REFACTOR)
fun dozingToGlanceableHub() =
testScope.runTest {
// GIVEN a prior transition has run to DOZING
@@ -767,6 +784,7 @@ class KeyguardTransitionScenariosTest(flags: FlagsParameterization?) : SysuiTest
@Test
@BrokenWithSceneContainer(339465026)
+ @DisableFlags(FLAG_COMMUNAL_SCENE_KTF_REFACTOR)
fun goneToGlanceableHub() =
testScope.runTest {
// GIVEN a prior transition has run to GONE
@@ -796,6 +814,29 @@ class KeyguardTransitionScenariosTest(flags: FlagsParameterization?) : SysuiTest
}
@Test
+ @BrokenWithSceneContainer(339465026)
+ @EnableFlags(FLAG_COMMUNAL_SCENE_KTF_REFACTOR)
+ fun goneToGlanceableHub_communalKtfRefactor() =
+ testScope.runTest {
+ // GIVEN a prior transition has run to GONE
+ runTransitionAndSetWakefulness(KeyguardState.LOCKSCREEN, KeyguardState.GONE)
+
+ // WHEN the glanceable hub is shown
+ communalSceneInteractor.changeScene(CommunalScenes.Communal)
+ runCurrent()
+
+ assertThat(transitionRepository)
+ .startedTransition(
+ to = KeyguardState.GLANCEABLE_HUB,
+ from = KeyguardState.GONE,
+ ownerName = CommunalSceneTransitionInteractor::class.simpleName,
+ animatorAssertion = { it.isNull() }
+ )
+
+ coroutineContext.cancelChildren()
+ }
+
+ @Test
@DisableSceneContainer
fun alternateBouncerToPrimaryBouncer() =
testScope.runTest {
@@ -938,6 +979,11 @@ class KeyguardTransitionScenariosTest(flags: FlagsParameterization?) : SysuiTest
@Test
fun alternateBouncerToGlanceableHub() =
testScope.runTest {
+ // GIVEN the device is idle on the glanceable hub
+ communalSceneInteractor.changeScene(CommunalScenes.Communal)
+ runCurrent()
+ clearInvocations(transitionRepository)
+
// GIVEN a prior transition has run to ALTERNATE_BOUNCER
bouncerRepository.setAlternateVisible(true)
runTransitionAndSetWakefulness(
@@ -948,19 +994,11 @@ class KeyguardTransitionScenariosTest(flags: FlagsParameterization?) : SysuiTest
// GIVEN the primary bouncer isn't showing and device not sleeping
bouncerRepository.setPrimaryShow(false)
- // GIVEN the device is idle on the glanceable hub
- val idleTransitionState =
- MutableStateFlow<ObservableTransitionState>(
- ObservableTransitionState.Idle(CommunalScenes.Communal)
- )
- communalInteractor.setTransitionState(idleTransitionState)
- runCurrent()
-
// WHEN the alternateBouncer stops showing
bouncerRepository.setAlternateVisible(false)
advanceTimeBy(200L)
- // THEN a transition to LOCKSCREEN should occur
+ // THEN a transition to GLANCEABLE_HUB should occur
assertThat(transitionRepository)
.startedTransition(
ownerName = FromAlternateBouncerTransitionInteractor::class.simpleName,
@@ -1060,18 +1098,17 @@ class KeyguardTransitionScenariosTest(flags: FlagsParameterization?) : SysuiTest
@DisableSceneContainer
fun primaryBouncerToGlanceableHub() =
testScope.runTest {
- // GIVEN a prior transition has run to PRIMARY_BOUNCER
- bouncerRepository.setPrimaryShow(true)
- runTransitionAndSetWakefulness(KeyguardState.LOCKSCREEN, KeyguardState.PRIMARY_BOUNCER)
-
// GIVEN the device is idle on the glanceable hub
- val idleTransitionState =
- MutableStateFlow<ObservableTransitionState>(
- ObservableTransitionState.Idle(CommunalScenes.Communal)
- )
- communalInteractor.setTransitionState(idleTransitionState)
+ communalSceneInteractor.changeScene(CommunalScenes.Communal)
runCurrent()
+ // GIVEN a prior transition has run to PRIMARY_BOUNCER
+ bouncerRepository.setPrimaryShow(true)
+ runTransitionAndSetWakefulness(
+ KeyguardState.GLANCEABLE_HUB,
+ KeyguardState.PRIMARY_BOUNCER
+ )
+
// WHEN the primaryBouncer stops showing
bouncerRepository.setPrimaryShow(false)
runCurrent()
@@ -1092,27 +1129,26 @@ class KeyguardTransitionScenariosTest(flags: FlagsParameterization?) : SysuiTest
@DisableSceneContainer
fun primaryBouncerToGlanceableHubWhileDreaming() =
testScope.runTest {
+ // GIVEN the device is idle on the glanceable hub
+ communalSceneInteractor.changeScene(CommunalScenes.Communal)
+ runCurrent()
+
// GIVEN a prior transition has run to PRIMARY_BOUNCER
bouncerRepository.setPrimaryShow(true)
- runTransitionAndSetWakefulness(KeyguardState.LOCKSCREEN, KeyguardState.PRIMARY_BOUNCER)
+ runTransitionAndSetWakefulness(
+ KeyguardState.GLANCEABLE_HUB,
+ KeyguardState.PRIMARY_BOUNCER
+ )
// GIVEN that we are dreaming and occluded
keyguardRepository.setDreaming(true)
keyguardRepository.setKeyguardOccluded(true)
- // GIVEN the device is idle on the glanceable hub
- val idleTransitionState =
- MutableStateFlow<ObservableTransitionState>(
- ObservableTransitionState.Idle(CommunalScenes.Communal)
- )
- communalInteractor.setTransitionState(idleTransitionState)
- runCurrent()
-
// WHEN the primaryBouncer stops showing
bouncerRepository.setPrimaryShow(false)
runCurrent()
- // THEN a transition to LOCKSCREEN should occur
+ // THEN a transition to GLANCEABLE_HUB should occur
assertThat(transitionRepository)
.startedTransition(
ownerName = FromPrimaryBouncerTransitionInteractor::class.simpleName,
@@ -1216,6 +1252,7 @@ class KeyguardTransitionScenariosTest(flags: FlagsParameterization?) : SysuiTest
@Test
@BrokenWithSceneContainer(339465026)
+ @DisableFlags(FLAG_COMMUNAL_SCENE_KTF_REFACTOR)
fun occludedToGlanceableHub() =
testScope.runTest {
// GIVEN a device on lockscreen
@@ -1253,6 +1290,7 @@ class KeyguardTransitionScenariosTest(flags: FlagsParameterization?) : SysuiTest
@Test
@BrokenWithSceneContainer(339465026)
+ @DisableFlags(FLAG_COMMUNAL_SCENE_KTF_REFACTOR)
fun occludedToGlanceableHubWhenInitiallyOnHub() =
testScope.runTest {
// GIVEN a device on lockscreen and communal is available
@@ -1290,6 +1328,37 @@ class KeyguardTransitionScenariosTest(flags: FlagsParameterization?) : SysuiTest
}
@Test
+ @BrokenWithSceneContainer(339465026)
+ @EnableFlags(FLAG_COMMUNAL_SCENE_KTF_REFACTOR)
+ fun occludedToGlanceableHub_communalKtfRefactor() =
+ testScope.runTest {
+ // GIVEN a device on lockscreen and communal is available
+ keyguardRepository.setKeyguardShowing(true)
+ kosmos.setCommunalAvailable(true)
+ runCurrent()
+
+ // GIVEN a prior transition has run to OCCLUDED from GLANCEABLE_HUB
+ runTransitionAndSetWakefulness(KeyguardState.GLANCEABLE_HUB, KeyguardState.OCCLUDED)
+ keyguardRepository.setKeyguardOccluded(true)
+ runCurrent()
+
+ // WHEN occlusion ends
+ keyguardRepository.setKeyguardOccluded(false)
+ runCurrent()
+
+ // THEN a transition to GLANCEABLE_HUB should occur
+ assertThat(transitionRepository)
+ .startedTransition(
+ ownerName = CommunalSceneTransitionInteractor::class.simpleName,
+ from = KeyguardState.OCCLUDED,
+ to = KeyguardState.GLANCEABLE_HUB,
+ animatorAssertion = { it.isNull() },
+ )
+
+ coroutineContext.cancelChildren()
+ }
+
+ @Test
fun occludedToAlternateBouncer() =
testScope.runTest {
// GIVEN a prior transition has run to OCCLUDED
@@ -1314,6 +1383,7 @@ class KeyguardTransitionScenariosTest(flags: FlagsParameterization?) : SysuiTest
}
@Test
+ @DisableSceneContainer
fun occludedToPrimaryBouncer() =
testScope.runTest {
// GIVEN a prior transition has run to OCCLUDED
@@ -1507,6 +1577,7 @@ class KeyguardTransitionScenariosTest(flags: FlagsParameterization?) : SysuiTest
@Test
@DisableSceneContainer
+ @DisableFlags(FLAG_COMMUNAL_SCENE_KTF_REFACTOR)
fun dreamingToGlanceableHub() =
testScope.runTest {
// GIVEN a prior transition has run to DREAMING
@@ -1546,24 +1617,41 @@ class KeyguardTransitionScenariosTest(flags: FlagsParameterization?) : SysuiTest
}
@Test
- @BrokenWithSceneContainer(339465026)
- fun lockscreenToOccluded() =
+ @DisableSceneContainer
+ @EnableFlags(FLAG_COMMUNAL_SCENE_KTF_REFACTOR)
+ fun dreamingToGlanceableHub_communalKtfRefactor() =
testScope.runTest {
- // GIVEN a prior transition has run to LOCKSCREEN
- runTransitionAndSetWakefulness(KeyguardState.GONE, KeyguardState.LOCKSCREEN)
+ // GIVEN a prior transition has run to DREAMING
+ keyguardRepository.setDreaming(true)
+ runTransitionAndSetWakefulness(KeyguardState.LOCKSCREEN, KeyguardState.DREAMING)
runCurrent()
- // WHEN the keyguard is occluded
- keyguardRepository.setKeyguardOccluded(true)
+ // WHEN a transition to the glanceable hub starts
+ val currentScene = CommunalScenes.Blank
+ val targetScene = CommunalScenes.Communal
+
+ val progress = MutableStateFlow(0f)
+ val transitionState =
+ MutableStateFlow<ObservableTransitionState>(
+ ObservableTransitionState.Transition(
+ fromScene = currentScene,
+ toScene = targetScene,
+ currentScene = flowOf(targetScene),
+ progress = progress,
+ isInitiatedByUserInput = false,
+ isUserInputOngoing = flowOf(false),
+ )
+ )
+ communalSceneInteractor.setTransitionState(transitionState)
+ progress.value = .1f
runCurrent()
- // THEN a transition to OCCLUDED should occur
assertThat(transitionRepository)
.startedTransition(
- ownerName = "FromLockscreenTransitionInteractor",
- from = KeyguardState.LOCKSCREEN,
- to = KeyguardState.OCCLUDED,
- animatorAssertion = { it.isNotNull() },
+ ownerName = CommunalSceneTransitionInteractor::class.simpleName,
+ from = KeyguardState.DREAMING,
+ to = KeyguardState.GLANCEABLE_HUB,
+ animatorAssertion = { it.isNull() }, // transition should be manually animated
)
coroutineContext.cancelChildren()
@@ -1571,10 +1659,10 @@ class KeyguardTransitionScenariosTest(flags: FlagsParameterization?) : SysuiTest
@Test
@BrokenWithSceneContainer(339465026)
- fun aodToOccluded() =
+ fun lockscreenToOccluded() =
testScope.runTest {
- // GIVEN a prior transition has run to AOD
- runTransitionAndSetWakefulness(KeyguardState.LOCKSCREEN, KeyguardState.AOD)
+ // GIVEN a prior transition has run to LOCKSCREEN
+ runTransitionAndSetWakefulness(KeyguardState.GONE, KeyguardState.LOCKSCREEN)
runCurrent()
// WHEN the keyguard is occluded
@@ -1584,8 +1672,8 @@ class KeyguardTransitionScenariosTest(flags: FlagsParameterization?) : SysuiTest
// THEN a transition to OCCLUDED should occur
assertThat(transitionRepository)
.startedTransition(
- ownerName = "FromAodTransitionInteractor(isOccluded = true)",
- from = KeyguardState.AOD,
+ ownerName = "FromLockscreenTransitionInteractor",
+ from = KeyguardState.LOCKSCREEN,
to = KeyguardState.OCCLUDED,
animatorAssertion = { it.isNotNull() },
)
@@ -1699,6 +1787,7 @@ class KeyguardTransitionScenariosTest(flags: FlagsParameterization?) : SysuiTest
@Test
@DisableSceneContainer
+ @DisableFlags(FLAG_COMMUNAL_SCENE_KTF_REFACTOR)
fun lockscreenToGlanceableHub() =
testScope.runTest {
// GIVEN a prior transition has run to LOCKSCREEN
@@ -1757,6 +1846,48 @@ class KeyguardTransitionScenariosTest(flags: FlagsParameterization?) : SysuiTest
@Test
@DisableSceneContainer
+ @EnableFlags(FLAG_COMMUNAL_SCENE_KTF_REFACTOR)
+ fun lockscreenToGlanceableHub_communalKtfRefactor() =
+ testScope.runTest {
+ // GIVEN a prior transition has run to LOCKSCREEN
+ runTransitionAndSetWakefulness(KeyguardState.AOD, KeyguardState.LOCKSCREEN)
+ runCurrent()
+
+ // WHEN a glanceable hub transition starts
+ val currentScene = CommunalScenes.Blank
+ val targetScene = CommunalScenes.Communal
+
+ val progress = MutableStateFlow(0f)
+ val transitionState =
+ MutableStateFlow<ObservableTransitionState>(
+ ObservableTransitionState.Transition(
+ fromScene = currentScene,
+ toScene = targetScene,
+ currentScene = flowOf(targetScene),
+ progress = progress,
+ isInitiatedByUserInput = false,
+ isUserInputOngoing = flowOf(false),
+ )
+ )
+ communalSceneInteractor.setTransitionState(transitionState)
+ progress.value = .1f
+ runCurrent()
+
+ // THEN a transition from LOCKSCREEN => GLANCEABLE_HUB should occur
+ assertThat(transitionRepository)
+ .startedTransition(
+ ownerName = CommunalSceneTransitionInteractor::class.simpleName,
+ from = KeyguardState.LOCKSCREEN,
+ to = KeyguardState.GLANCEABLE_HUB,
+ animatorAssertion = { it.isNull() }, // transition should be manually animated
+ )
+
+ coroutineContext.cancelChildren()
+ }
+
+ @Test
+ @DisableSceneContainer
+ @DisableFlags(FLAG_COMMUNAL_SCENE_KTF_REFACTOR)
fun glanceableHubToLockscreen() =
testScope.runTest {
// GIVEN a prior transition has run to GLANCEABLE_HUB
@@ -1812,6 +1943,48 @@ class KeyguardTransitionScenariosTest(flags: FlagsParameterization?) : SysuiTest
@Test
@DisableSceneContainer
+ @EnableFlags(FLAG_COMMUNAL_SCENE_KTF_REFACTOR)
+ fun glanceableHubToLockscreen_communalKtfRefactor() =
+ testScope.runTest {
+ // GIVEN a prior transition has run to GLANCEABLE_HUB
+ communalSceneInteractor.changeScene(CommunalScenes.Communal)
+ runCurrent()
+ clearInvocations(transitionRepository)
+
+ // WHEN a transition away from glanceable hub starts
+ val currentScene = CommunalScenes.Communal
+ val targetScene = CommunalScenes.Blank
+
+ val progress = MutableStateFlow(0f)
+ val transitionState =
+ MutableStateFlow<ObservableTransitionState>(
+ ObservableTransitionState.Transition(
+ fromScene = currentScene,
+ toScene = targetScene,
+ currentScene = flowOf(targetScene),
+ progress = progress,
+ isInitiatedByUserInput = false,
+ isUserInputOngoing = flowOf(false),
+ )
+ )
+ communalSceneInteractor.setTransitionState(transitionState)
+ progress.value = .1f
+ runCurrent()
+
+ assertThat(transitionRepository)
+ .startedTransition(
+ ownerName = CommunalSceneTransitionInteractor::class.simpleName,
+ from = KeyguardState.GLANCEABLE_HUB,
+ to = KeyguardState.LOCKSCREEN,
+ animatorAssertion = { it.isNull() }, // transition should be manually animated
+ )
+
+ coroutineContext.cancelChildren()
+ }
+
+ @Test
+ @DisableSceneContainer
+ @DisableFlags(FLAG_COMMUNAL_SCENE_KTF_REFACTOR)
fun glanceableHubToDozing() =
testScope.runTest {
// GIVEN a prior transition has run to GLANCEABLE_HUB
@@ -1834,6 +2007,31 @@ class KeyguardTransitionScenariosTest(flags: FlagsParameterization?) : SysuiTest
@Test
@DisableSceneContainer
+ @EnableFlags(FLAG_COMMUNAL_SCENE_KTF_REFACTOR)
+ fun glanceableHubToDozing_communalKtfRefactor() =
+ testScope.runTest {
+ // GIVEN a prior transition has run to GLANCEABLE_HUB
+ communalSceneInteractor.changeScene(CommunalScenes.Communal)
+ runCurrent()
+ clearInvocations(transitionRepository)
+
+ // WHEN the device begins to sleep
+ powerInteractor.setAsleepForTest()
+ runCurrent()
+
+ assertThat(transitionRepository)
+ .startedTransition(
+ ownerName = CommunalSceneTransitionInteractor::class.simpleName,
+ from = KeyguardState.GLANCEABLE_HUB,
+ to = KeyguardState.DOZING,
+ animatorAssertion = { it.isNull() },
+ )
+
+ coroutineContext.cancelChildren()
+ }
+
+ @Test
+ @DisableSceneContainer
fun glanceableHubToPrimaryBouncer() =
testScope.runTest {
// GIVEN a prior transition has run to ALTERNATE_BOUNCER
@@ -1878,6 +2076,7 @@ class KeyguardTransitionScenariosTest(flags: FlagsParameterization?) : SysuiTest
@Test
@BrokenWithSceneContainer(339465026)
+ @DisableFlags(FLAG_COMMUNAL_SCENE_KTF_REFACTOR)
fun glanceableHubToOccluded() =
testScope.runTest {
// GIVEN a prior transition has run to GLANCEABLE_HUB
@@ -1908,7 +2107,33 @@ class KeyguardTransitionScenariosTest(flags: FlagsParameterization?) : SysuiTest
}
@Test
+ @BrokenWithSceneContainer(339465026)
+ @EnableFlags(FLAG_COMMUNAL_SCENE_KTF_REFACTOR)
+ fun glanceableHubToOccluded_communalKtfRefactor() =
+ testScope.runTest {
+ // GIVEN a prior transition has run to GLANCEABLE_HUB
+ communalSceneInteractor.changeScene(CommunalScenes.Communal)
+ runCurrent()
+ clearInvocations(transitionRepository)
+
+ // WHEN the keyguard is occluded
+ keyguardRepository.setKeyguardOccluded(true)
+ runCurrent()
+
+ assertThat(transitionRepository)
+ .startedTransition(
+ ownerName = CommunalSceneTransitionInteractor::class.simpleName,
+ from = KeyguardState.GLANCEABLE_HUB,
+ to = KeyguardState.OCCLUDED,
+ animatorAssertion = { it.isNull() },
+ )
+
+ coroutineContext.cancelChildren()
+ }
+
+ @Test
@DisableSceneContainer
+ @DisableFlags(FLAG_COMMUNAL_SCENE_KTF_REFACTOR)
fun glanceableHubToGone() =
testScope.runTest {
// GIVEN a prior transition has run to GLANCEABLE_HUB
@@ -1931,6 +2156,32 @@ class KeyguardTransitionScenariosTest(flags: FlagsParameterization?) : SysuiTest
@Test
@DisableSceneContainer
+ @EnableFlags(FLAG_COMMUNAL_SCENE_KTF_REFACTOR)
+ fun glanceableHubToGone_communalKtfRefactor() =
+ testScope.runTest {
+ // GIVEN a prior transition has run to GLANCEABLE_HUB
+ communalSceneInteractor.changeScene(CommunalScenes.Communal)
+ runCurrent()
+ clearInvocations(transitionRepository)
+
+ // WHEN keyguard goes away
+ keyguardRepository.setKeyguardGoingAway(true)
+ runCurrent()
+
+ assertThat(transitionRepository)
+ .startedTransition(
+ ownerName = CommunalSceneTransitionInteractor::class.simpleName,
+ from = KeyguardState.GLANCEABLE_HUB,
+ to = KeyguardState.GONE,
+ animatorAssertion = { it.isNull() },
+ )
+
+ coroutineContext.cancelChildren()
+ }
+
+ @Test
+ @DisableSceneContainer
+ @DisableFlags(FLAG_COMMUNAL_SCENE_KTF_REFACTOR)
fun glanceableHubToDreaming() =
testScope.runTest {
// GIVEN that we are dreaming and not dozing
@@ -1959,7 +2210,7 @@ class KeyguardTransitionScenariosTest(flags: FlagsParameterization?) : SysuiTest
isUserInputOngoing = flowOf(false),
)
)
- communalInteractor.setTransitionState(transitionState)
+ communalSceneInteractor.setTransitionState(transitionState)
runCurrent()
assertThat(transitionRepository)
@@ -1973,6 +2224,52 @@ class KeyguardTransitionScenariosTest(flags: FlagsParameterization?) : SysuiTest
coroutineContext.cancelChildren()
}
+ @Test
+ @DisableSceneContainer
+ @EnableFlags(FLAG_COMMUNAL_SCENE_KTF_REFACTOR)
+ fun glanceableHubToDreaming_communalKtfRefactor() =
+ testScope.runTest {
+ // GIVEN that we are dreaming and not dozing
+ keyguardRepository.setDreaming(true)
+ keyguardRepository.setDozeTransitionModel(
+ DozeTransitionModel(from = DozeStateModel.DOZE, to = DozeStateModel.FINISH)
+ )
+ runCurrent()
+
+ // GIVEN a prior transition has run to GLANCEABLE_HUB
+ communalSceneInteractor.changeScene(CommunalScenes.Communal)
+ runCurrent()
+ clearInvocations(transitionRepository)
+
+ // WHEN a transition away from glanceable hub starts
+ val currentScene = CommunalScenes.Communal
+ val targetScene = CommunalScenes.Blank
+
+ val transitionState =
+ MutableStateFlow<ObservableTransitionState>(
+ ObservableTransitionState.Transition(
+ fromScene = currentScene,
+ toScene = targetScene,
+ currentScene = flowOf(targetScene),
+ progress = flowOf(0f, 0.1f),
+ isInitiatedByUserInput = false,
+ isUserInputOngoing = flowOf(false),
+ )
+ )
+ communalSceneInteractor.setTransitionState(transitionState)
+ runCurrent()
+
+ assertThat(transitionRepository)
+ .startedTransition(
+ ownerName = CommunalSceneTransitionInteractor::class.simpleName,
+ from = KeyguardState.GLANCEABLE_HUB,
+ to = KeyguardState.DREAMING,
+ animatorAssertion = { it.isNull() }, // transition should be manually animated
+ )
+
+ coroutineContext.cancelChildren()
+ }
+
private suspend fun TestScope.runTransitionAndSetWakefulness(
from: KeyguardState,
to: KeyguardState
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/AodAlphaViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/AodAlphaViewModelTest.kt
index be0d899fd946..9e696011e285 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/AodAlphaViewModelTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/AodAlphaViewModelTest.kt
@@ -18,8 +18,11 @@
package com.android.systemui.keyguard.ui.viewmodel
+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.Flags as AConfigFlags
import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.collectLastValue
@@ -74,9 +77,9 @@ class AodAlphaViewModelTest : SysuiTestCase() {
@Test
@DisableSceneContainer
+ @DisableFlags(Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
fun alpha_WhenNotGone_clockMigrationFlagIsOff_emitsKeyguardAlpha() =
testScope.runTest {
- mSetFlagsRule.disableFlags(AConfigFlags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
val alpha by collectLastValue(underTest.alpha)
keyguardTransitionRepository.sendTransitionSteps(
@@ -186,9 +189,9 @@ class AodAlphaViewModelTest : SysuiTestCase() {
@Test
@DisableSceneContainer
+ @EnableFlags(Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
fun alpha_whenGone_equalsZero() =
testScope.runTest {
- mSetFlagsRule.enableFlags(AConfigFlags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
val alpha by collectLastValue(underTest.alpha)
keyguardTransitionRepository.sendTransitionStep(
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/AodBurnInViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/AodBurnInViewModelTest.kt
index 63d06a409522..41c5b7332a4f 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/AodBurnInViewModelTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/AodBurnInViewModelTest.kt
@@ -18,6 +18,8 @@
package com.android.systemui.keyguard.ui.viewmodel
+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 as AConfigFlags
@@ -69,10 +71,11 @@ class AodBurnInViewModelTest : SysuiTestCase() {
private val burnInFlow = MutableStateFlow(BurnInModel())
@Before
+ @DisableFlags(
+ AConfigFlags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT,
+ AConfigFlags.FLAG_COMPOSE_LOCKSCREEN
+ )
fun setUp() {
- mSetFlagsRule.disableFlags(AConfigFlags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
- mSetFlagsRule.disableFlags(AConfigFlags.FLAG_COMPOSE_LOCKSCREEN)
-
MockitoAnnotations.initMocks(this)
whenever(burnInInteractor.burnIn(anyInt(), anyInt())).thenReturn(burnInFlow)
kosmos.burnInInteractor = burnInInteractor
@@ -174,10 +177,9 @@ class AodBurnInViewModelTest : SysuiTestCase() {
}
@Test
+ @DisableFlags(AConfigFlags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
fun translationAndScale_whenFullyDozing_MigrationFlagOff_staysOutOfTopInset() =
testScope.runTest {
- mSetFlagsRule.disableFlags(AConfigFlags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
-
burnInParameters =
burnInParameters.copy(
minViewY = 100,
@@ -226,10 +228,9 @@ class AodBurnInViewModelTest : SysuiTestCase() {
}
@Test
+ @EnableFlags(AConfigFlags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
fun translationAndScale_whenFullyDozing_MigrationFlagOn_staysOutOfTopInset() =
testScope.runTest {
- mSetFlagsRule.enableFlags(AConfigFlags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
-
burnInParameters =
burnInParameters.copy(
minViewY = 100,
@@ -310,104 +311,99 @@ class AodBurnInViewModelTest : SysuiTestCase() {
}
@Test
+ @DisableFlags(AConfigFlags.FLAG_COMPOSE_LOCKSCREEN)
+ @EnableFlags(AConfigFlags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
fun translationAndScale_composeFlagOff_weatherLargeClock() =
testBurnInViewModelForClocks(
isSmallClock = false,
isWeatherClock = true,
expectedScaleOnly = false,
- enableMigrateClocksToBlueprintFlag = true,
- enableComposeLockscreenFlag = false
)
@Test
+ @DisableFlags(AConfigFlags.FLAG_COMPOSE_LOCKSCREEN)
+ @EnableFlags(AConfigFlags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
fun translationAndScale_composeFlagOff_weatherSmallClock() =
testBurnInViewModelForClocks(
isSmallClock = true,
isWeatherClock = true,
expectedScaleOnly = false,
- enableMigrateClocksToBlueprintFlag = true,
- enableComposeLockscreenFlag = false
)
@Test
+ @DisableFlags(AConfigFlags.FLAG_COMPOSE_LOCKSCREEN)
+ @EnableFlags(AConfigFlags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
fun translationAndScale_composeFlagOff_nonWeatherLargeClock() =
testBurnInViewModelForClocks(
isSmallClock = false,
isWeatherClock = false,
expectedScaleOnly = true,
- enableMigrateClocksToBlueprintFlag = true,
- enableComposeLockscreenFlag = false
)
@Test
+ @DisableFlags(AConfigFlags.FLAG_COMPOSE_LOCKSCREEN)
+ @EnableFlags(AConfigFlags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
fun translationAndScale_composeFlagOff_nonWeatherSmallClock() =
testBurnInViewModelForClocks(
isSmallClock = true,
isWeatherClock = false,
expectedScaleOnly = false,
- enableMigrateClocksToBlueprintFlag = true,
- enableComposeLockscreenFlag = false
)
@Test
+ @EnableFlags(
+ AConfigFlags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT,
+ AConfigFlags.FLAG_COMPOSE_LOCKSCREEN
+ )
fun translationAndScale_composeFlagOn_weatherLargeClock() =
testBurnInViewModelForClocks(
isSmallClock = false,
isWeatherClock = true,
expectedScaleOnly = false,
- enableMigrateClocksToBlueprintFlag = true,
- enableComposeLockscreenFlag = true
)
@Test
+ @EnableFlags(
+ AConfigFlags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT,
+ AConfigFlags.FLAG_COMPOSE_LOCKSCREEN
+ )
fun translationAndScale_composeFlagOn_weatherSmallClock() =
testBurnInViewModelForClocks(
isSmallClock = true,
isWeatherClock = true,
expectedScaleOnly = false,
- enableMigrateClocksToBlueprintFlag = true,
- enableComposeLockscreenFlag = true
)
@Test
+ @EnableFlags(
+ AConfigFlags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT,
+ AConfigFlags.FLAG_COMPOSE_LOCKSCREEN
+ )
fun translationAndScale_composeFlagOn_nonWeatherLargeClock() =
testBurnInViewModelForClocks(
isSmallClock = false,
isWeatherClock = false,
expectedScaleOnly = true,
- enableMigrateClocksToBlueprintFlag = true,
- enableComposeLockscreenFlag = true
)
@Test
+ @EnableFlags(
+ AConfigFlags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT,
+ AConfigFlags.FLAG_COMPOSE_LOCKSCREEN
+ )
fun translationAndScale_composeFlagOn_nonWeatherSmallClock() =
testBurnInViewModelForClocks(
isSmallClock = true,
isWeatherClock = false,
expectedScaleOnly = false,
- enableMigrateClocksToBlueprintFlag = true,
- enableComposeLockscreenFlag = true
)
private fun testBurnInViewModelForClocks(
isSmallClock: Boolean,
isWeatherClock: Boolean,
expectedScaleOnly: Boolean,
- enableMigrateClocksToBlueprintFlag: Boolean,
- enableComposeLockscreenFlag: Boolean
) =
testScope.runTest {
- if (enableMigrateClocksToBlueprintFlag) {
- mSetFlagsRule.enableFlags(AConfigFlags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
- } else {
- mSetFlagsRule.disableFlags(AConfigFlags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
- }
-
- if (enableComposeLockscreenFlag) {
- mSetFlagsRule.enableFlags(AConfigFlags.FLAG_COMPOSE_LOCKSCREEN)
- } else {
- mSetFlagsRule.disableFlags(AConfigFlags.FLAG_COMPOSE_LOCKSCREEN)
- }
if (isSmallClock) {
keyguardClockRepository.setClockSize(ClockSize.SMALL)
// we need the following step to update stateFlow value
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenContentViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenContentViewModelTest.kt
index de4b999b3899..3075c54fb069 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenContentViewModelTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenContentViewModelTest.kt
@@ -14,8 +14,11 @@
* limitations under the License.
*/
+@file:OptIn(ExperimentalCoroutinesApi::class)
+
package com.android.systemui.keyguard.ui.viewmodel
+import android.platform.test.annotations.EnableFlags
import android.platform.test.flag.junit.FlagsParameterization
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
@@ -27,17 +30,22 @@ import com.android.systemui.flags.Flags
import com.android.systemui.flags.andSceneContainer
import com.android.systemui.flags.fakeFeatureFlagsClassic
import com.android.systemui.keyguard.data.repository.fakeKeyguardClockRepository
+import com.android.systemui.keyguard.data.repository.keyguardOcclusionRepository
import com.android.systemui.keyguard.shared.model.ClockSize
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.kosmos.testScope
import com.android.systemui.res.R
+import com.android.systemui.scene.domain.interactor.sceneInteractor
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.shade.data.repository.shadeRepository
-import com.android.systemui.shade.shared.model.ShadeMode
+import com.android.systemui.shade.shared.flag.DualShade
import com.android.systemui.testKosmos
import com.android.systemui.unfold.fakeUnfoldTransitionProgressProvider
import com.android.systemui.util.mockito.whenever
import com.google.common.truth.Truth.assertThat
import java.util.Locale
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.test.runCurrent
import kotlinx.coroutines.test.runTest
import org.junit.Before
import org.junit.Test
@@ -69,7 +77,7 @@ class LockscreenContentViewModelTest(flags: FlagsParameterization) : SysuiTestCa
fun setup() {
with(kosmos) {
fakeFeatureFlagsClassic.set(Flags.LOCK_SCREEN_LONG_PRESS_ENABLED, true)
- shadeRepository.setShadeMode(ShadeMode.Single)
+ shadeRepository.setShadeLayoutWide(false)
underTest = lockscreenContentViewModel
}
}
@@ -118,8 +126,51 @@ class LockscreenContentViewModelTest(flags: FlagsParameterization) : SysuiTestCa
fun areNotificationsVisible_splitShadeTrue_true() =
with(kosmos) {
testScope.runTest {
- val areNotificationsVisible by collectLastValue(underTest.areNotificationsVisible)
- shadeRepository.setShadeMode(ShadeMode.Split)
+ val areNotificationsVisible by
+ collectLastValue(underTest.areNotificationsVisible(Scenes.Lockscreen))
+ shadeRepository.setShadeLayoutWide(true)
+ fakeKeyguardClockRepository.setClockSize(ClockSize.LARGE)
+
+ assertThat(areNotificationsVisible).isTrue()
+ }
+ }
+
+ @Test
+ @EnableFlags(DualShade.FLAG_NAME)
+ fun areNotificationsVisible_dualShadeWideOnLockscreen_true() =
+ with(kosmos) {
+ testScope.runTest {
+ val areNotificationsVisible by
+ collectLastValue(underTest.areNotificationsVisible(Scenes.Lockscreen))
+ shadeRepository.setShadeLayoutWide(true)
+ fakeKeyguardClockRepository.setClockSize(ClockSize.LARGE)
+
+ assertThat(areNotificationsVisible).isTrue()
+ }
+ }
+
+ @Test
+ @EnableFlags(DualShade.FLAG_NAME)
+ fun areNotificationsVisible_dualShadeWideOnNotificationsShade_false() =
+ with(kosmos) {
+ testScope.runTest {
+ val areNotificationsVisible by
+ collectLastValue(underTest.areNotificationsVisible(Scenes.NotificationsShade))
+ shadeRepository.setShadeLayoutWide(true)
+ fakeKeyguardClockRepository.setClockSize(ClockSize.LARGE)
+
+ assertThat(areNotificationsVisible).isFalse()
+ }
+ }
+
+ @Test
+ @EnableFlags(DualShade.FLAG_NAME)
+ fun areNotificationsVisible_dualShadeWideOnQuickSettingsShade_true() =
+ with(kosmos) {
+ testScope.runTest {
+ val areNotificationsVisible by
+ collectLastValue(underTest.areNotificationsVisible(Scenes.QuickSettingsShade))
+ shadeRepository.setShadeLayoutWide(true)
fakeKeyguardClockRepository.setClockSize(ClockSize.LARGE)
assertThat(areNotificationsVisible).isTrue()
@@ -131,7 +182,8 @@ class LockscreenContentViewModelTest(flags: FlagsParameterization) : SysuiTestCa
fun areNotificationsVisible_withSmallClock_true() =
with(kosmos) {
testScope.runTest {
- val areNotificationsVisible by collectLastValue(underTest.areNotificationsVisible)
+ val areNotificationsVisible by
+ collectLastValue(underTest.areNotificationsVisible(Scenes.Lockscreen))
fakeKeyguardClockRepository.setClockSize(ClockSize.SMALL)
assertThat(areNotificationsVisible).isTrue()
}
@@ -142,31 +194,32 @@ class LockscreenContentViewModelTest(flags: FlagsParameterization) : SysuiTestCa
fun areNotificationsVisible_withLargeClock_false() =
with(kosmos) {
testScope.runTest {
- val areNotificationsVisible by collectLastValue(underTest.areNotificationsVisible)
+ val areNotificationsVisible by
+ collectLastValue(underTest.areNotificationsVisible(Scenes.Lockscreen))
fakeKeyguardClockRepository.setClockSize(ClockSize.LARGE)
assertThat(areNotificationsVisible).isFalse()
}
}
@Test
- fun shouldUseSplitNotificationShade_withConfigTrue_true() =
+ fun isShadeLayoutWide_withConfigTrue_true() =
with(kosmos) {
testScope.runTest {
- val shouldUseSplitNotificationShade by
- collectLastValue(underTest.shouldUseSplitNotificationShade)
- shadeRepository.setShadeMode(ShadeMode.Split)
- assertThat(shouldUseSplitNotificationShade).isTrue()
+ val isShadeLayoutWide by collectLastValue(underTest.isShadeLayoutWide)
+ shadeRepository.setShadeLayoutWide(true)
+
+ assertThat(isShadeLayoutWide).isTrue()
}
}
@Test
- fun shouldUseSplitNotificationShade_withConfigFalse_false() =
+ fun isShadeLayoutWide_withConfigFalse_false() =
with(kosmos) {
testScope.runTest {
- val shouldUseSplitNotificationShade by
- collectLastValue(underTest.shouldUseSplitNotificationShade)
- shadeRepository.setShadeMode(ShadeMode.Single)
- assertThat(shouldUseSplitNotificationShade).isFalse()
+ val isShadeLayoutWide by collectLastValue(underTest.isShadeLayoutWide)
+ shadeRepository.setShadeLayoutWide(false)
+
+ assertThat(isShadeLayoutWide).isFalse()
}
}
@@ -201,6 +254,44 @@ class LockscreenContentViewModelTest(flags: FlagsParameterization) : SysuiTestCa
}
}
+ @Test
+ fun isContentVisible_whenNotOccluded_visible() =
+ with(kosmos) {
+ testScope.runTest {
+ val isContentVisible by collectLastValue(underTest.isContentVisible)
+
+ keyguardOcclusionRepository.setShowWhenLockedActivityInfo(false, null)
+ runCurrent()
+ assertThat(isContentVisible).isTrue()
+ }
+ }
+
+ @Test
+ fun isContentVisible_whenOccluded_notVisible() =
+ with(kosmos) {
+ testScope.runTest {
+ val isContentVisible by collectLastValue(underTest.isContentVisible)
+
+ keyguardOcclusionRepository.setShowWhenLockedActivityInfo(true, null)
+ runCurrent()
+ assertThat(isContentVisible).isFalse()
+ }
+ }
+
+ @Test
+ fun isContentVisible_whenOccluded_notVisible_evenIfShadeShown() =
+ with(kosmos) {
+ testScope.runTest {
+ val isContentVisible by collectLastValue(underTest.isContentVisible)
+ keyguardOcclusionRepository.setShowWhenLockedActivityInfo(true, null)
+ runCurrent()
+
+ sceneInteractor.snapToScene(Scenes.Shade, "")
+ runCurrent()
+ assertThat(isContentVisible).isFalse()
+ }
+ }
+
private fun prepareConfiguration(): Int {
val configuration = context.resources.configuration
configuration.setLayoutDirection(Locale.US)
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenSceneViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenSceneViewModelTest.kt
index 4eb146dbbaba..3db9ef1eca71 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenSceneViewModelTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenSceneViewModelTest.kt
@@ -44,7 +44,6 @@ import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.scene.shared.model.TransitionKeys
import com.android.systemui.shade.data.repository.shadeRepository
import com.android.systemui.shade.domain.interactor.shadeInteractor
-import com.android.systemui.shade.shared.model.ShadeMode
import com.android.systemui.statusbar.notification.stack.ui.viewmodel.notificationsPlaceholderViewModel
import com.android.systemui.testKosmos
import com.android.systemui.util.mockito.mock
@@ -182,13 +181,7 @@ class LockscreenSceneViewModelTest : SysuiTestCase() {
}
)
sceneInteractor.changeScene(Scenes.Lockscreen, "reason")
- kosmos.shadeRepository.setShadeMode(
- if (isSingleShade) {
- ShadeMode.Single
- } else {
- ShadeMode.Split
- }
- )
+ kosmos.shadeRepository.setShadeLayoutWide(!isSingleShade)
kosmos.setCommunalAvailable(isCommunalAvailable)
kosmos.fakePowerRepository.updateWakefulness(
rawState =
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/PrimaryBouncerToGoneTransitionViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/PrimaryBouncerToGoneTransitionViewModelTest.kt
index 278c90a5f068..fd2e33504ec9 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/PrimaryBouncerToGoneTransitionViewModelTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/PrimaryBouncerToGoneTransitionViewModelTest.kt
@@ -159,8 +159,9 @@ class PrimaryBouncerToGoneTransitionViewModelTest : SysuiTestCase() {
)
assertThat(values[0]).isEqualTo(1f)
- // Should fade to zero between here
assertThat(values[1]).isEqualTo(0f)
+ // Should always finish with 1f to show HUNs
+ assertThat(values[2]).isEqualTo(1f)
}
@Test
@@ -177,7 +178,7 @@ class PrimaryBouncerToGoneTransitionViewModelTest : SysuiTestCase() {
testScope,
)
- assertThat(values.size).isEqualTo(2)
+ assertThat(values.size).isEqualTo(3)
// Shade stays open, and alpha should remain visible
values.forEach { assertThat(it).isEqualTo(1f) }
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/ui/viewmodel/MediaCarouselViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/ui/viewmodel/MediaCarouselViewModelTest.kt
index 0551bfb89865..067b00c1658b 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/ui/viewmodel/MediaCarouselViewModelTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/ui/viewmodel/MediaCarouselViewModelTest.kt
@@ -33,13 +33,14 @@ import com.android.systemui.media.controls.domain.pipeline.MediaDataFilterImpl
import com.android.systemui.media.controls.domain.pipeline.interactor.mediaCarouselInteractor
import com.android.systemui.media.controls.domain.pipeline.interactor.mediaRecommendationsInteractor
import com.android.systemui.media.controls.domain.pipeline.mediaDataFilter
+import com.android.systemui.media.controls.shared.mediaLogger
+import com.android.systemui.media.controls.shared.mockMediaLogger
import com.android.systemui.media.controls.shared.model.MediaData
import com.android.systemui.media.controls.shared.model.SmartspaceMediaData
import com.android.systemui.statusbar.notification.collection.provider.visualStabilityProvider
import com.android.systemui.statusbar.notificationLockscreenUserManager
import com.android.systemui.testKosmos
import com.android.systemui.util.mockito.any
-import com.android.systemui.util.mockito.eq
import com.android.systemui.util.mockito.whenever
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.test.runTest
@@ -48,12 +49,16 @@ import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.ArgumentMatchers
import org.mockito.Mockito
+import org.mockito.kotlin.eq
+import org.mockito.kotlin.never
+import org.mockito.kotlin.reset
+import org.mockito.kotlin.verify
@SmallTest
@RunWith(AndroidJUnit4::class)
class MediaCarouselViewModelTest : SysuiTestCase() {
- private val kosmos = testKosmos()
+ private val kosmos = testKosmos().apply { mediaLogger = mockMediaLogger }
private val testScope = kosmos.testScope
private val mediaDataFilter: MediaDataFilterImpl = kosmos.mediaDataFilter
@@ -166,6 +171,64 @@ class MediaCarouselViewModelTest : SysuiTestCase() {
assertThat(mediaControl.isMediaFromRec).isTrue()
}
+ @Test
+ fun addMediaControlThenRemove_mediaEventsAreLogged() =
+ testScope.runTest {
+ val sortedMedia by collectLastValue(underTest.mediaItems)
+ val instanceId = InstanceId.fakeInstanceId(123)
+
+ loadMediaControl(KEY, instanceId)
+
+ val mediaControl = sortedMedia?.get(0) as MediaCommonViewModel.MediaControl
+ assertThat(mediaControl.instanceId).isEqualTo(instanceId)
+
+ // when media control is added to carousel
+ mediaControl.onAdded(mediaControl)
+
+ verify(kosmos.mediaLogger).logMediaCardAdded(eq(instanceId))
+
+ reset(kosmos.mediaLogger)
+
+ // when media control is updated.
+ mediaControl.onUpdated(mediaControl)
+
+ verify(kosmos.mediaLogger, never()).logMediaCardAdded(eq(instanceId))
+
+ mediaDataFilter.onMediaDataRemoved(KEY, true)
+ assertThat(sortedMedia).isEmpty()
+
+ // when media control is removed from carousel
+ mediaControl.onRemoved(true)
+
+ verify(kosmos.mediaLogger).logMediaCardRemoved(eq(instanceId))
+ }
+
+ @Test
+ fun addMediaRecommendationThenRemove_mediaEventsAreLogged() =
+ testScope.runTest {
+ val sortedMedia by collectLastValue(underTest.mediaItems)
+ kosmos.fakeFeatureFlagsClassic.set(Flags.MEDIA_RETAIN_RECOMMENDATIONS, false)
+
+ loadMediaRecommendations()
+
+ val mediaRecommendations =
+ sortedMedia?.get(0) as MediaCommonViewModel.MediaRecommendations
+ assertThat(mediaRecommendations.key).isEqualTo(KEY_MEDIA_SMARTSPACE)
+
+ // when media recommendation is added to carousel
+ mediaRecommendations.onAdded(mediaRecommendations)
+
+ verify(kosmos.mediaLogger).logMediaRecommendationCardAdded(eq(KEY_MEDIA_SMARTSPACE))
+
+ mediaDataFilter.onSmartspaceMediaDataRemoved(KEY, true)
+ assertThat(sortedMedia).isEmpty()
+
+ // when media recommendation is removed from carousel
+ mediaRecommendations.onRemoved(true)
+
+ verify(kosmos.mediaLogger).logMediaRecommendationCardRemoved(eq(KEY_MEDIA_SMARTSPACE))
+ }
+
private fun loadMediaControl(key: String, instanceId: InstanceId, isPlaying: Boolean = true) {
whenever(notificationLockscreenUserManager.isCurrentProfile(USER_ID)).thenReturn(true)
whenever(notificationLockscreenUserManager.isProfileAvailable(USER_ID)).thenReturn(true)
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/SettingObserverTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/SettingObserverTest.kt
new file mode 100644
index 000000000000..188f2aca5147
--- /dev/null
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/SettingObserverTest.kt
@@ -0,0 +1,117 @@
+/*
+ * 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.qs
+
+import android.net.Uri
+import android.os.Handler
+import android.os.Looper
+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.util.settings.SettingsProxy
+import com.google.common.truth.Truth.assertThat
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.ArgumentCaptor
+import org.mockito.Captor
+import org.mockito.Mock
+import org.mockito.MockitoAnnotations
+import org.mockito.kotlin.any
+import org.mockito.kotlin.capture
+import org.mockito.kotlin.eq
+import org.mockito.kotlin.reset
+import org.mockito.kotlin.verify
+import org.mockito.kotlin.whenever
+
+@SmallTest
+@RunWith(AndroidJUnit4::class)
+class SettingObserverTest : SysuiTestCase() {
+
+ private val DEFAULT_VALUE = 7
+
+ @Mock lateinit var settingsProxy: SettingsProxy
+ @Captor private lateinit var argumentCaptor: ArgumentCaptor<Runnable>
+
+ private lateinit var testSettingObserver: SettingObserver
+
+ @Before
+ fun setUp() {
+ MockitoAnnotations.initMocks(this)
+ whenever(settingsProxy.getInt(any(), any())).thenReturn(5)
+ whenever(settingsProxy.getUriFor(any())).thenReturn(Uri.parse("content://test_uri"))
+ testSettingObserver =
+ object :
+ SettingObserver(
+ settingsProxy,
+ Handler(Looper.getMainLooper()),
+ "test_setting",
+ DEFAULT_VALUE
+ ) {
+ override fun handleValueChanged(value: Int, observedChange: Boolean) {}
+ }
+ }
+
+ @Test
+ @EnableFlags(Flags.FLAG_QS_REGISTER_SETTING_OBSERVER_ON_BG_THREAD)
+ fun setListening_true_settingsProxyRegistered() {
+ testSettingObserver.isListening = true
+ verify(settingsProxy)
+ .registerContentObserverAsync(
+ any<Uri>(),
+ eq(false),
+ eq(testSettingObserver),
+ capture(argumentCaptor)
+ )
+ assertThat(testSettingObserver.value).isEqualTo(5)
+
+ // Verify if the callback applies updated value after the fact
+ whenever(settingsProxy.getInt(any(), any())).thenReturn(12341234)
+ argumentCaptor.value.run()
+ assertThat(testSettingObserver.value).isEqualTo(12341234)
+ }
+
+ @Test
+ @EnableFlags(Flags.FLAG_QS_REGISTER_SETTING_OBSERVER_ON_BG_THREAD)
+ fun setListening_false_settingsProxyRegistered() {
+ testSettingObserver.isListening = true
+ reset(settingsProxy)
+ testSettingObserver.isListening = false
+
+ verify(settingsProxy).unregisterContentObserverAsync(eq(testSettingObserver))
+ }
+
+ @Test
+ @DisableFlags(Flags.FLAG_QS_REGISTER_SETTING_OBSERVER_ON_BG_THREAD)
+ fun setListening_bgFlagDisabled_true_settingsProxyRegistered() {
+ testSettingObserver.isListening = true
+ verify(settingsProxy)
+ .registerContentObserverSync(any<Uri>(), eq(false), eq(testSettingObserver))
+ }
+
+ @Test
+ @DisableFlags(Flags.FLAG_QS_REGISTER_SETTING_OBSERVER_ON_BG_THREAD)
+ fun setListening_bgFlagDisabled_false_settingsProxyRegistered() {
+ testSettingObserver.isListening = true
+ reset(settingsProxy)
+ testSettingObserver.isListening = false
+
+ verify(settingsProxy).unregisterContentObserverSync(eq(testSettingObserver))
+ }
+}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/data/repository/QSPreferencesRepositoryTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/data/repository/QSPreferencesRepositoryTest.kt
index 8ac5b6c09e73..dda9cd5529a5 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/data/repository/QSPreferencesRepositoryTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/data/repository/QSPreferencesRepositoryTest.kt
@@ -24,6 +24,7 @@ import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.kosmos.testScope
+import com.android.systemui.qs.pipeline.shared.TileSpec
import com.android.systemui.settings.userFileManager
import com.android.systemui.testKosmos
import com.android.systemui.user.data.repository.fakeUserRepository
@@ -40,6 +41,70 @@ class QSPreferencesRepositoryTest : SysuiTestCase() {
private val underTest = with(kosmos) { qsPreferencesRepository }
@Test
+ fun largeTilesSpecs_updatesFromSharedPreferences() =
+ with(kosmos) {
+ testScope.runTest {
+ val latest by collectLastValue(underTest.largeTilesSpecs)
+ assertThat(latest).isEqualTo(defaultLargeTilesRepository.defaultLargeTiles)
+
+ val newSet = setOf("tileA", "tileB")
+ setLargeTilesSpecsInSharedPreferences(newSet)
+ assertThat(latest).isEqualTo(newSet.toTileSpecs())
+ }
+ }
+
+ @Test
+ fun largeTilesSpecs_updatesFromUserChange() =
+ with(kosmos) {
+ testScope.runTest {
+ fakeUserRepository.setUserInfos(USERS)
+ val latest by collectLastValue(underTest.largeTilesSpecs)
+
+ fakeUserRepository.setSelectedUserInfo(PRIMARY_USER)
+ val newSet = setOf("tileA", "tileB")
+ setLargeTilesSpecsInSharedPreferences(newSet)
+
+ fakeUserRepository.setSelectedUserInfo(ANOTHER_USER)
+ setLargeTilesSpecsInSharedPreferences(emptySet())
+
+ fakeUserRepository.setSelectedUserInfo(PRIMARY_USER)
+ assertThat(latest).isEqualTo(newSet.toTileSpecs())
+ }
+ }
+
+ @Test
+ fun setLargeTilesSpecs_inSharedPreferences() {
+ val setA = setOf("tileA", "tileB")
+ underTest.setLargeTilesSpecs(setA.toTileSpecs())
+ assertThat(getLargeTilesSpecsFromSharedPreferences()).isEqualTo(setA)
+
+ val setB = setOf("tileA", "tileB")
+ underTest.setLargeTilesSpecs(setB.toTileSpecs())
+ assertThat(getLargeTilesSpecsFromSharedPreferences()).isEqualTo(setB)
+ }
+
+ @Test
+ fun setLargeTilesSpecs_forDifferentUser() =
+ with(kosmos) {
+ testScope.runTest {
+ fakeUserRepository.setUserInfos(USERS)
+
+ fakeUserRepository.setSelectedUserInfo(PRIMARY_USER)
+ val setA = setOf("tileA", "tileB")
+ underTest.setLargeTilesSpecs(setA.toTileSpecs())
+ assertThat(getLargeTilesSpecsFromSharedPreferences()).isEqualTo(setA)
+
+ fakeUserRepository.setSelectedUserInfo(ANOTHER_USER)
+ val setB = setOf("tileA", "tileB")
+ underTest.setLargeTilesSpecs(setB.toTileSpecs())
+ assertThat(getLargeTilesSpecsFromSharedPreferences()).isEqualTo(setB)
+
+ fakeUserRepository.setSelectedUserInfo(PRIMARY_USER)
+ assertThat(getLargeTilesSpecsFromSharedPreferences()).isEqualTo(setA)
+ }
+ }
+
+ @Test
fun showLabels_updatesFromSharedPreferences() =
with(kosmos) {
testScope.runTest {
@@ -109,6 +174,14 @@ class QSPreferencesRepositoryTest : SysuiTestCase() {
)
}
+ private fun setLargeTilesSpecsInSharedPreferences(specs: Set<String>) {
+ getSharedPreferences().edit().putStringSet(LARGE_TILES_SPECS_KEY, specs).apply()
+ }
+
+ private fun getLargeTilesSpecsFromSharedPreferences(): Set<String> {
+ return getSharedPreferences().getStringSet(LARGE_TILES_SPECS_KEY, emptySet())!!
+ }
+
private fun setShowLabelsInSharedPreferences(value: Boolean) {
getSharedPreferences().edit().putBoolean(ICON_LABELS_KEY, value).apply()
}
@@ -117,8 +190,13 @@ class QSPreferencesRepositoryTest : SysuiTestCase() {
return getSharedPreferences().getBoolean(ICON_LABELS_KEY, defaultValue)
}
+ private fun Set<String>.toTileSpecs(): Set<TileSpec> {
+ return map { TileSpec.create(it) }.toSet()
+ }
+
companion object {
private const val ICON_LABELS_KEY = "show_icon_labels"
+ private const val LARGE_TILES_SPECS_KEY = "large_tiles_specs"
private const val PRIMARY_USER_ID = 0
private val PRIMARY_USER = UserInfo(PRIMARY_USER_ID, "user 0", UserInfo.FLAG_MAIN)
private const val ANOTHER_USER_ID = 1
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/domain/interactor/GridConsistencyInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/domain/interactor/GridConsistencyInteractorTest.kt
index b206f56f95a6..56b3679b6835 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/domain/interactor/GridConsistencyInteractorTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/domain/interactor/GridConsistencyInteractorTest.kt
@@ -20,9 +20,9 @@ import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.kosmos.testScope
-import com.android.systemui.qs.panels.data.repository.IconTilesRepository
+import com.android.systemui.qs.panels.data.repository.DefaultLargeTilesRepository
+import com.android.systemui.qs.panels.data.repository.defaultLargeTilesRepository
import com.android.systemui.qs.panels.data.repository.gridLayoutTypeRepository
-import com.android.systemui.qs.panels.data.repository.iconTilesRepository
import com.android.systemui.qs.panels.shared.model.InfiniteGridLayoutType
import com.android.systemui.qs.panels.shared.model.PartitionedGridLayoutType
import com.android.systemui.qs.pipeline.data.repository.tileSpecRepository
@@ -42,22 +42,17 @@ import org.junit.runner.RunWith
@RunWith(AndroidJUnit4::class)
class GridConsistencyInteractorTest : SysuiTestCase() {
- private val iconOnlyTiles =
- setOf(
- TileSpec.create("smallA"),
- TileSpec.create("smallB"),
- TileSpec.create("smallC"),
- TileSpec.create("smallD"),
- TileSpec.create("smallE"),
- )
-
private val kosmos =
testKosmos().apply {
- iconTilesRepository =
- object : IconTilesRepository {
- override fun isIconTile(spec: TileSpec): Boolean {
- return iconOnlyTiles.contains(spec)
- }
+ defaultLargeTilesRepository =
+ object : DefaultLargeTilesRepository {
+ override val defaultLargeTiles =
+ setOf(
+ TileSpec.create("largeA"),
+ TileSpec.create("largeB"),
+ TileSpec.create("largeC"),
+ TileSpec.create("largeD"),
+ )
}
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/domain/interactor/IconTilesInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/domain/interactor/IconTilesInteractorTest.kt
new file mode 100644
index 000000000000..c3a5df06e2a4
--- /dev/null
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/domain/interactor/IconTilesInteractorTest.kt
@@ -0,0 +1,86 @@
+/*
+ * 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.qs.panels.domain.interactor
+
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.SmallTest
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.coroutines.collectLastValue
+import com.android.systemui.kosmos.testScope
+import com.android.systemui.qs.panels.data.repository.DefaultLargeTilesRepository
+import com.android.systemui.qs.panels.data.repository.defaultLargeTilesRepository
+import com.android.systemui.qs.panels.data.repository.qsPreferencesRepository
+import com.android.systemui.qs.pipeline.shared.TileSpec
+import com.android.systemui.testKosmos
+import com.google.common.truth.Truth.assertThat
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.test.runCurrent
+import kotlinx.coroutines.test.runTest
+import org.junit.Test
+import org.junit.runner.RunWith
+
+@SmallTest
+@RunWith(AndroidJUnit4::class)
+class IconTilesInteractorTest : SysuiTestCase() {
+ private val kosmos =
+ testKosmos().apply {
+ defaultLargeTilesRepository =
+ object : DefaultLargeTilesRepository {
+ override val defaultLargeTiles: Set<TileSpec> = setOf(TileSpec.create("large"))
+ }
+ }
+ private val underTest = with(kosmos) { iconTilesInteractor }
+
+ @Test
+ fun isIconTile_returnsCorrectValue() {
+ assertThat(underTest.isIconTile(TileSpec.create("large"))).isFalse()
+ assertThat(underTest.isIconTile(TileSpec.create("small"))).isTrue()
+ }
+
+ @OptIn(ExperimentalCoroutinesApi::class)
+ @Test
+ fun isIconTile_updatesFromSharedPreferences() =
+ with(kosmos) {
+ testScope.runTest {
+ // Assert that new tile defaults to icon
+ assertThat(underTest.isIconTile(TileSpec.create("newTile"))).isTrue()
+
+ qsPreferencesRepository.setLargeTilesSpecs(setOf(TileSpec.create("newTile")))
+ runCurrent()
+
+ // Assert that the new tile was added to the large tiles set
+ assertThat(underTest.isIconTile(TileSpec.create("newTile"))).isFalse()
+ }
+ }
+
+ @Test
+ fun resize_updatesSharedPreferences() =
+ with(kosmos) {
+ testScope.runTest {
+ val latest by collectLastValue(qsPreferencesRepository.largeTilesSpecs)
+ val spec = TileSpec.create("large")
+
+ // Assert that the tile is added to the large tiles after resizing
+ underTest.resize(spec, toIcon = false)
+ assertThat(latest).contains(spec)
+
+ // Assert that the tile is removed from the large tiles after resizing
+ underTest.resize(spec, toIcon = true)
+ assertThat(latest).doesNotContain(spec)
+ }
+ }
+}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/domain/interactor/InfiniteGridConsistencyInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/domain/interactor/InfiniteGridConsistencyInteractorTest.kt
index 1e2e82ffeca5..ea51398e6256 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/domain/interactor/InfiniteGridConsistencyInteractorTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/domain/interactor/InfiniteGridConsistencyInteractorTest.kt
@@ -20,8 +20,8 @@ import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.kosmos.testScope
-import com.android.systemui.qs.panels.data.repository.IconTilesRepository
-import com.android.systemui.qs.panels.data.repository.iconTilesRepository
+import com.android.systemui.qs.panels.data.repository.DefaultLargeTilesRepository
+import com.android.systemui.qs.panels.data.repository.defaultLargeTilesRepository
import com.android.systemui.qs.pipeline.shared.TileSpec
import com.android.systemui.testKosmos
import com.google.common.truth.Truth.assertThat
@@ -33,21 +33,17 @@ import org.junit.runner.RunWith
@RunWith(AndroidJUnit4::class)
class InfiniteGridConsistencyInteractorTest : SysuiTestCase() {
- private val iconOnlyTiles =
- setOf(
- TileSpec.create("smallA"),
- TileSpec.create("smallB"),
- TileSpec.create("smallC"),
- TileSpec.create("smallD"),
- TileSpec.create("smallE"),
- )
private val kosmos =
testKosmos().apply {
- iconTilesRepository =
- object : IconTilesRepository {
- override fun isIconTile(spec: TileSpec): Boolean {
- return iconOnlyTiles.contains(spec)
- }
+ defaultLargeTilesRepository =
+ object : DefaultLargeTilesRepository {
+ override val defaultLargeTiles: Set<TileSpec> =
+ setOf(
+ TileSpec.create("largeA"),
+ TileSpec.create("largeB"),
+ TileSpec.create("largeC"),
+ TileSpec.create("largeD"),
+ )
}
}
private val underTest = with(kosmos) { infiniteGridConsistencyInteractor }
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/ui/compose/DragAndDropStateTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/ui/compose/DragAndDropStateTest.kt
index 1c3021ef5839..73a00395606e 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/ui/compose/DragAndDropStateTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/ui/compose/DragAndDropStateTest.kt
@@ -82,6 +82,20 @@ class DragAndDropStateTest : SysuiTestCase() {
TestEditTiles.forEach { assertThat(underTest.isMoving(it.tileSpec)).isFalse() }
}
+ @Test
+ fun onMoveOutOfBounds_removeMovingTileFromCurrentList() {
+ val movingTileSpec = TestEditTiles[0].tileSpec
+
+ // Start the drag movement
+ underTest.onStarted(movingTileSpec)
+
+ // Move the tile outside of the list
+ underTest.movedOutOfBounds()
+
+ // Asserts the moving tile is not current
+ assertThat(listState.tiles.first { it.tileSpec == movingTileSpec }.isCurrent).isFalse()
+ }
+
companion object {
private fun createEditTile(tileSpec: String): EditTileViewModel {
return EditTileViewModel(
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/ui/compose/InfiniteGridLayoutTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/ui/compose/InfiniteGridLayoutTest.kt
index 914a09597d65..53384afb66be 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/ui/compose/InfiniteGridLayoutTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/ui/compose/InfiniteGridLayoutTest.kt
@@ -20,8 +20,8 @@ import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.kosmos.testScope
-import com.android.systemui.qs.panels.data.repository.IconTilesRepository
-import com.android.systemui.qs.panels.data.repository.iconTilesRepository
+import com.android.systemui.qs.panels.data.repository.DefaultLargeTilesRepository
+import com.android.systemui.qs.panels.data.repository.defaultLargeTilesRepository
import com.android.systemui.qs.panels.ui.viewmodel.MockTileViewModel
import com.android.systemui.qs.panels.ui.viewmodel.fixedColumnsSizeViewModel
import com.android.systemui.qs.panels.ui.viewmodel.iconTilesViewModel
@@ -37,11 +37,9 @@ import org.junit.runner.RunWith
class InfiniteGridLayoutTest : SysuiTestCase() {
private val kosmos =
testKosmos().apply {
- iconTilesRepository =
- object : IconTilesRepository {
- override fun isIconTile(spec: TileSpec): Boolean {
- return spec.spec.startsWith("small")
- }
+ defaultLargeTilesRepository =
+ object : DefaultLargeTilesRepository {
+ override val defaultLargeTiles: Set<TileSpec> = setOf(TileSpec.create("large"))
}
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/ui/compose/PartitionedGridLayoutTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/ui/compose/PartitionedGridLayoutTest.kt
index 3354b4d4116b..55b7454fa2c1 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/ui/compose/PartitionedGridLayoutTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/ui/compose/PartitionedGridLayoutTest.kt
@@ -20,8 +20,8 @@ import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.kosmos.testScope
-import com.android.systemui.qs.panels.data.repository.IconTilesRepository
-import com.android.systemui.qs.panels.data.repository.iconTilesRepository
+import com.android.systemui.qs.panels.data.repository.DefaultLargeTilesRepository
+import com.android.systemui.qs.panels.data.repository.defaultLargeTilesRepository
import com.android.systemui.qs.panels.ui.viewmodel.MockTileViewModel
import com.android.systemui.qs.panels.ui.viewmodel.iconTilesViewModel
import com.android.systemui.qs.panels.ui.viewmodel.partitionedGridViewModel
@@ -37,11 +37,9 @@ import org.junit.runner.RunWith
class PartitionedGridLayoutTest : SysuiTestCase() {
private val kosmos =
testKosmos().apply {
- iconTilesRepository =
- object : IconTilesRepository {
- override fun isIconTile(spec: TileSpec): Boolean {
- return spec.spec.startsWith("small")
- }
+ defaultLargeTilesRepository =
+ object : DefaultLargeTilesRepository {
+ override val defaultLargeTiles: Set<TileSpec> = setOf(TileSpec.create("large"))
}
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/ui/viewmodel/QuickQuickSettingsViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/ui/viewmodel/QuickQuickSettingsViewModelTest.kt
index d36a81bcfd23..56156a8e6e61 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/ui/viewmodel/QuickQuickSettingsViewModelTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/panels/ui/viewmodel/QuickQuickSettingsViewModelTest.kt
@@ -24,8 +24,8 @@ import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.kosmos.testCase
import com.android.systemui.kosmos.testScope
-import com.android.systemui.qs.panels.data.repository.IconTilesRepository
-import com.android.systemui.qs.panels.data.repository.iconTilesRepository
+import com.android.systemui.qs.panels.data.repository.DefaultLargeTilesRepository
+import com.android.systemui.qs.panels.data.repository.defaultLargeTilesRepository
import com.android.systemui.qs.pipeline.domain.interactor.currentTilesInteractor
import com.android.systemui.qs.pipeline.shared.TileSpec
import com.android.systemui.res.R
@@ -40,18 +40,6 @@ import org.junit.runner.RunWith
@RunWith(AndroidJUnit4::class)
class QuickQuickSettingsViewModelTest : SysuiTestCase() {
- private val kosmos =
- testKosmos().apply {
- iconTilesRepository =
- object : IconTilesRepository {
- override fun isIconTile(spec: TileSpec): Boolean {
- return spec.spec.startsWith(PREFIX_SMALL)
- }
- }
- }
-
- private val underTest = kosmos.quickQuickSettingsViewModel
-
private val tiles =
listOf(
"$PREFIX_SMALL:1",
@@ -66,6 +54,17 @@ class QuickQuickSettingsViewModelTest : SysuiTestCase() {
)
.map(TileSpec::create)
+ private val kosmos =
+ testKosmos().apply {
+ defaultLargeTilesRepository =
+ object : DefaultLargeTilesRepository {
+ override val defaultLargeTiles: Set<TileSpec> =
+ tiles.filter { it.spec.startsWith(PREFIX_LARGE) }.toSet()
+ }
+ }
+
+ private val underTest = kosmos.quickQuickSettingsViewModel
+
@Before
fun setUp() {
kosmos.setTiles(tiles)
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/airplate/domain/interactor/AirplaneModeTileDataInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/airplane/domain/interactor/AirplaneModeTileDataInteractorTest.kt
index 89b9b7f30297..67e2fba30822 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/airplate/domain/interactor/AirplaneModeTileDataInteractorTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/airplane/domain/interactor/AirplaneModeTileDataInteractorTest.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.systemui.qs.tiles.impl.airplate.domain.interactor
+package com.android.systemui.qs.tiles.impl.airplane.domain.interactor
import android.os.UserHandle
import android.platform.test.annotations.EnabledOnRavenwood
@@ -23,7 +23,6 @@ import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.collectValues
import com.android.systemui.qs.tiles.base.interactor.DataUpdateTrigger
-import com.android.systemui.qs.tiles.impl.airplane.domain.interactor.AirplaneModeTileDataInteractor
import com.android.systemui.qs.tiles.impl.airplane.domain.model.AirplaneModeTileModel
import com.android.systemui.statusbar.pipeline.airplane.data.repository.FakeAirplaneModeRepository
import com.google.common.truth.Truth.assertThat
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/airplate/domain/interactor/AirplaneModeTileUserActionInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/airplane/domain/interactor/AirplaneModeTileUserActionInteractorTest.kt
index 8982d810ad8a..79fcc92a967c 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/airplate/domain/interactor/AirplaneModeTileUserActionInteractorTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/airplane/domain/interactor/AirplaneModeTileUserActionInteractorTest.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.systemui.qs.tiles.impl.airplate.domain.interactor
+package com.android.systemui.qs.tiles.impl.airplane.domain.interactor
import android.platform.test.annotations.EnabledOnRavenwood
import android.provider.Settings
@@ -26,7 +26,6 @@ import com.android.systemui.qs.tiles.base.actions.FakeQSTileIntentUserInputHandl
import com.android.systemui.qs.tiles.base.actions.QSTileIntentUserInputHandlerSubject.Companion.assertThat
import com.android.systemui.qs.tiles.base.interactor.QSTileInputTestKtx.click
import com.android.systemui.qs.tiles.base.interactor.QSTileInputTestKtx.longClick
-import com.android.systemui.qs.tiles.impl.airplane.domain.interactor.AirplaneModeTileUserActionInteractor
import com.android.systemui.qs.tiles.impl.airplane.domain.model.AirplaneModeTileModel
import com.android.systemui.statusbar.pipeline.airplane.data.repository.FakeAirplaneModeRepository
import com.android.systemui.statusbar.pipeline.airplane.domain.interactor.AirplaneModeInteractor
@@ -54,7 +53,7 @@ class AirplaneModeTileUserActionInteractorTest : SysuiTestCase() {
connectivityRepository,
mobileConnectionsRepository,
),
- inputHandler
+ inputHandler,
)
@Test
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/modes/domain/interactor/ModesTileDataInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/modes/domain/interactor/ModesTileDataInteractorTest.kt
new file mode 100644
index 000000000000..09dca25d693e
--- /dev/null
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/modes/domain/interactor/ModesTileDataInteractorTest.kt
@@ -0,0 +1,93 @@
+/*
+ * 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.qs.tiles.impl.modes.domain.interactor
+
+import android.app.Flags
+import android.os.UserHandle
+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.settingslib.notification.data.repository.FakeZenModeRepository
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.coroutines.collectValues
+import com.android.systemui.qs.tiles.base.interactor.DataUpdateTrigger
+import com.android.systemui.qs.tiles.impl.modes.domain.model.ModesTileModel
+import com.google.common.truth.Truth.assertThat
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.flow.flowOf
+import kotlinx.coroutines.flow.toCollection
+import kotlinx.coroutines.test.runCurrent
+import kotlinx.coroutines.test.runTest
+import org.junit.Test
+import org.junit.runner.RunWith
+
+@OptIn(ExperimentalCoroutinesApi::class)
+@SmallTest
+@RunWith(AndroidJUnit4::class)
+class ModesTileDataInteractorTest : SysuiTestCase() {
+ private val zenModeRepository = FakeZenModeRepository()
+
+ private val underTest = ModesTileDataInteractor(zenModeRepository)
+
+ @EnableFlags(Flags.FLAG_MODES_UI)
+ @Test
+ fun availableWhenFlagIsOn() = runTest {
+ val availability = underTest.availability(TEST_USER).toCollection(mutableListOf())
+
+ assertThat(availability).containsExactly(true)
+ }
+
+ @DisableFlags(Flags.FLAG_MODES_UI)
+ @Test
+ fun unavailableWhenFlagIsOff() = runTest {
+ val availability = underTest.availability(TEST_USER).toCollection(mutableListOf())
+
+ assertThat(availability).containsExactly(false)
+ }
+
+ @EnableFlags(Flags.FLAG_MODES_UI)
+ @Test
+ fun isActivatedWhenModesChange() = runTest {
+ val dataList: List<ModesTileModel> by
+ collectValues(underTest.tileData(TEST_USER, flowOf(DataUpdateTrigger.InitialRequest)))
+ runCurrent()
+ assertThat(dataList.map { it.isActivated }).containsExactly(false).inOrder()
+
+ // Add active mode
+ zenModeRepository.addMode(id = "One", active = true)
+ runCurrent()
+ assertThat(dataList.map { it.isActivated }).containsExactly(false, true).inOrder()
+
+ // Add another mode: state hasn't changed, so this shouldn't cause another emission
+ zenModeRepository.addMode(id = "Two", active = true)
+ runCurrent()
+ assertThat(dataList.map { it.isActivated }).containsExactly(false, true).inOrder()
+
+ // Remove a mode and disable the other
+ zenModeRepository.removeMode("One")
+ runCurrent()
+ zenModeRepository.deactivateMode("Two")
+ runCurrent()
+ assertThat(dataList.map { it.isActivated }).containsExactly(false, true, false).inOrder()
+ }
+
+ private companion object {
+
+ val TEST_USER = UserHandle.of(1)!!
+ }
+}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/modes/domain/interactor/ModesTileUserActionInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/modes/domain/interactor/ModesTileUserActionInteractorTest.kt
new file mode 100644
index 000000000000..d5c910248942
--- /dev/null
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/modes/domain/interactor/ModesTileUserActionInteractorTest.kt
@@ -0,0 +1,84 @@
+/*
+ * 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.qs.tiles.impl.modes.domain.interactor
+
+import android.platform.test.annotations.EnableFlags
+import android.provider.Settings
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.SmallTest
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.animation.DialogTransitionAnimator
+import com.android.systemui.qs.tiles.base.actions.FakeQSTileIntentUserInputHandler
+import com.android.systemui.qs.tiles.base.actions.QSTileIntentUserInputHandlerSubject
+import com.android.systemui.qs.tiles.base.interactor.QSTileInputTestKtx
+import com.android.systemui.qs.tiles.impl.modes.domain.model.ModesTileModel
+import com.android.systemui.statusbar.phone.SystemUIDialog
+import com.android.systemui.statusbar.policy.ui.dialog.ModesDialogDelegate
+import com.google.common.truth.Truth
+import kotlin.coroutines.EmptyCoroutineContext
+import kotlinx.coroutines.test.runTest
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.Mock
+import org.mockito.MockitoAnnotations
+import org.mockito.kotlin.verify
+import org.mockito.kotlin.whenever
+
+@SmallTest
+@RunWith(AndroidJUnit4::class)
+@EnableFlags(android.app.Flags.FLAG_MODES_UI)
+class ModesTileUserActionInteractorTest : SysuiTestCase() {
+ private val inputHandler = FakeQSTileIntentUserInputHandler()
+
+ @Mock private lateinit var dialogTransitionAnimator: DialogTransitionAnimator
+ @Mock private lateinit var dialogDelegate: ModesDialogDelegate
+ @Mock private lateinit var mockDialog: SystemUIDialog
+
+ private lateinit var underTest: ModesTileUserActionInteractor
+
+ @Before
+ fun setup() {
+ MockitoAnnotations.initMocks(this)
+
+ whenever(dialogDelegate.createDialog()).thenReturn(mockDialog)
+
+ underTest =
+ ModesTileUserActionInteractor(
+ EmptyCoroutineContext,
+ inputHandler,
+ dialogTransitionAnimator,
+ dialogDelegate,
+ )
+ }
+
+ @Test
+ fun handleClick() = runTest {
+ underTest.handleInput(QSTileInputTestKtx.click(ModesTileModel(false)))
+
+ verify(mockDialog).show()
+ }
+
+ @Test
+ fun handleLongClick() = runTest {
+ underTest.handleInput(QSTileInputTestKtx.longClick(ModesTileModel(false)))
+
+ QSTileIntentUserInputHandlerSubject.assertThat(inputHandler).handledOneIntentInput {
+ Truth.assertThat(it.intent.action).isEqualTo(Settings.ACTION_ZEN_MODE_SETTINGS)
+ }
+ }
+}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/modes/ui/ModesTileMapperTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/modes/ui/ModesTileMapperTest.kt
new file mode 100644
index 000000000000..3baf2f40f175
--- /dev/null
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/modes/ui/ModesTileMapperTest.kt
@@ -0,0 +1,74 @@
+/*
+ * 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.qs.tiles.impl.modes.ui
+
+import android.graphics.drawable.TestStubDrawable
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.SmallTest
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.qs.tiles.impl.modes.domain.model.ModesTileModel
+import com.android.systemui.qs.tiles.viewmodel.QSTileConfigTestBuilder
+import com.android.systemui.qs.tiles.viewmodel.QSTileState
+import com.android.systemui.qs.tiles.viewmodel.QSTileUIConfig
+import com.android.systemui.res.R
+import com.google.common.truth.Truth.assertThat
+import org.junit.Test
+import org.junit.runner.RunWith
+
+@SmallTest
+@RunWith(AndroidJUnit4::class)
+class ModesTileMapperTest : SysuiTestCase() {
+ val config =
+ QSTileConfigTestBuilder.build {
+ uiConfig =
+ QSTileUIConfig.Resource(
+ iconRes = R.drawable.qs_dnd_icon_off,
+ labelRes = R.string.quick_settings_modes_label,
+ )
+ }
+
+ val underTest =
+ ModesTileMapper(
+ context.orCreateTestableResources
+ .apply {
+ addOverride(R.drawable.qs_dnd_icon_on, TestStubDrawable())
+ addOverride(R.drawable.qs_dnd_icon_off, TestStubDrawable())
+ }
+ .resources,
+ context.theme,
+ )
+
+ @Test
+ fun inactiveState() {
+ val model = ModesTileModel(isActivated = false)
+
+ val state = underTest.map(config, model)
+
+ assertThat(state.activationState).isEqualTo(QSTileState.ActivationState.INACTIVE)
+ assertThat(state.iconRes).isEqualTo(R.drawable.qs_dnd_icon_off)
+ }
+
+ @Test
+ fun activeState() {
+ val model = ModesTileModel(isActivated = true)
+
+ val state = underTest.map(config, model)
+
+ assertThat(state.activationState).isEqualTo(QSTileState.ActivationState.ACTIVE)
+ assertThat(state.iconRes).isEqualTo(R.drawable.qs_dnd_icon_on)
+ }
+}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/reducebrightness/domain/interactor/ReduceBrightColorsTileDataInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/reducebrightness/domain/interactor/ReduceBrightColorsTileDataInteractorTest.kt
index 2e5fde8e4bd6..a5f98a739b49 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/reducebrightness/domain/interactor/ReduceBrightColorsTileDataInteractorTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/reducebrightness/domain/interactor/ReduceBrightColorsTileDataInteractorTest.kt
@@ -30,7 +30,6 @@ import com.android.systemui.qs.tiles.impl.reducebrightness.domain.model.ReduceBr
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.flowOf
-import kotlinx.coroutines.flow.toCollection
import kotlinx.coroutines.test.runCurrent
import kotlinx.coroutines.test.runTest
import org.junit.Test
@@ -56,8 +55,7 @@ class ReduceBrightColorsTileDataInteractorTest : SysuiTestCase() {
@Test
fun alwaysAvailable() =
testScope.runTest {
- val availability = underTest.availability(TEST_USER).toCollection(mutableListOf())
-
+ val availability by collectValues(underTest.availability(TEST_USER))
assertThat(availability).hasSize(1)
assertThat(availability.last()).isEqualTo(isAvailable)
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/reducebrightness/domain/interactor/ReduceBrightColorsTileUserActionInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/reducebrightness/domain/interactor/ReduceBrightColorsTileUserActionInteractorTest.kt
index 6ea5e63fdff6..313331286b45 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/reducebrightness/domain/interactor/ReduceBrightColorsTileUserActionInteractorTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/impl/reducebrightness/domain/interactor/ReduceBrightColorsTileUserActionInteractorTest.kt
@@ -17,9 +17,13 @@
package com.android.systemui.qs.tiles.impl.reducebrightness.domain.interactor
import android.platform.test.annotations.EnabledOnRavenwood
+import android.platform.test.annotations.RequiresFlagsDisabled
+import android.platform.test.annotations.RequiresFlagsEnabled
import android.provider.Settings
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.internal.R
+import com.android.server.display.feature.flags.Flags
import com.android.systemui.SysuiTestCase
import com.android.systemui.accessibility.reduceBrightColorsController
import com.android.systemui.kosmos.Kosmos
@@ -43,11 +47,22 @@ class ReduceBrightColorsTileUserActionInteractorTest : SysuiTestCase() {
private val underTest =
ReduceBrightColorsTileUserActionInteractor(
+ context.resources,
+ inputHandler,
+ controller,
+ )
+
+ private val underTestEvenDimmerEnabled =
+ ReduceBrightColorsTileUserActionInteractor(
+ context.orCreateTestableResources
+ .apply { addOverride(R.bool.config_evenDimmerEnabled, true) }
+ .resources,
inputHandler,
controller,
)
@Test
+ @RequiresFlagsDisabled(Flags.FLAG_EVEN_DIMMER)
fun handleClickWhenEnabled() = runTest {
val wasEnabled = true
controller.isReduceBrightColorsActivated = wasEnabled
@@ -58,6 +73,7 @@ class ReduceBrightColorsTileUserActionInteractorTest : SysuiTestCase() {
}
@Test
+ @RequiresFlagsDisabled(Flags.FLAG_EVEN_DIMMER)
fun handleClickWhenDisabled() = runTest {
val wasEnabled = false
controller.isReduceBrightColorsActivated = wasEnabled
@@ -68,6 +84,7 @@ class ReduceBrightColorsTileUserActionInteractorTest : SysuiTestCase() {
}
@Test
+ @RequiresFlagsDisabled(Flags.FLAG_EVEN_DIMMER)
fun handleLongClickWhenDisabled() = runTest {
val enabled = false
@@ -79,6 +96,7 @@ class ReduceBrightColorsTileUserActionInteractorTest : SysuiTestCase() {
}
@Test
+ @RequiresFlagsDisabled(Flags.FLAG_EVEN_DIMMER)
fun handleLongClickWhenEnabled() = runTest {
val enabled = true
@@ -88,4 +106,58 @@ class ReduceBrightColorsTileUserActionInteractorTest : SysuiTestCase() {
assertThat(it.intent.action).isEqualTo(Settings.ACTION_REDUCE_BRIGHT_COLORS_SETTINGS)
}
}
+
+ @Test
+ @RequiresFlagsEnabled(Flags.FLAG_EVEN_DIMMER)
+ fun handleClickWhenEnabledEvenDimmer() = runTest {
+ val wasEnabled = true
+ controller.isReduceBrightColorsActivated = wasEnabled
+
+ underTestEvenDimmerEnabled.handleInput(
+ QSTileInputTestKtx.click(ReduceBrightColorsTileModel(wasEnabled))
+ )
+
+ assertThat(controller.isReduceBrightColorsActivated).isEqualTo(wasEnabled)
+ }
+
+ @Test
+ @RequiresFlagsEnabled(Flags.FLAG_EVEN_DIMMER)
+ fun handleClickWhenDisabledEvenDimmer() = runTest {
+ val wasEnabled = false
+ controller.isReduceBrightColorsActivated = wasEnabled
+
+ underTestEvenDimmerEnabled.handleInput(
+ QSTileInputTestKtx.click(ReduceBrightColorsTileModel(wasEnabled))
+ )
+
+ assertThat(controller.isReduceBrightColorsActivated).isEqualTo(wasEnabled)
+ }
+
+ @Test
+ @RequiresFlagsEnabled(Flags.FLAG_EVEN_DIMMER)
+ fun handleLongClickWhenDisabledEvenDimmer() = runTest {
+ val enabled = false
+
+ underTestEvenDimmerEnabled.handleInput(
+ QSTileInputTestKtx.longClick(ReduceBrightColorsTileModel(enabled))
+ )
+
+ QSTileIntentUserInputHandlerSubject.assertThat(inputHandler).handledOneIntentInput {
+ assertThat(it.intent.action).isEqualTo(Settings.ACTION_DISPLAY_SETTINGS)
+ }
+ }
+
+ @Test
+ @RequiresFlagsEnabled(Flags.FLAG_EVEN_DIMMER)
+ fun handleLongClickWhenEnabledEvenDimmer() = runTest {
+ val enabled = true
+
+ underTestEvenDimmerEnabled.handleInput(
+ QSTileInputTestKtx.longClick(ReduceBrightColorsTileModel(enabled))
+ )
+
+ QSTileIntentUserInputHandlerSubject.assertThat(inputHandler).handledOneIntentInput {
+ assertThat(it.intent.action).isEqualTo(Settings.ACTION_DISPLAY_SETTINGS)
+ }
+ }
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/ui/adapter/QSSceneAdapterImplTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/ui/adapter/QSSceneAdapterImplTest.kt
index b35b7bca4809..09580c5f17be 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/ui/adapter/QSSceneAdapterImplTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/ui/adapter/QSSceneAdapterImplTest.kt
@@ -38,7 +38,6 @@ import com.android.systemui.qs.dagger.QSSceneComponent
import com.android.systemui.settings.brightness.MirrorController
import com.android.systemui.shade.data.repository.fakeShadeRepository
import com.android.systemui.shade.domain.interactor.shadeInteractor
-import com.android.systemui.shade.shared.model.ShadeMode
import com.android.systemui.util.mockito.any
import com.android.systemui.util.mockito.argumentCaptor
import com.android.systemui.util.mockito.capture
@@ -558,7 +557,7 @@ class QSSceneAdapterImplTest : SysuiTestCase() {
fun dispatchSplitShade() =
testScope.runTest {
val shadeRepository = kosmos.fakeShadeRepository
- shadeRepository.setShadeMode(ShadeMode.Single)
+ shadeRepository.setShadeLayoutWide(false)
val qsImpl by collectLastValue(underTest.qsImpl)
underTest.inflate(context)
@@ -566,7 +565,7 @@ class QSSceneAdapterImplTest : SysuiTestCase() {
verify(qsImpl!!).setInSplitShade(false)
- shadeRepository.setShadeMode(ShadeMode.Split)
+ shadeRepository.setShadeLayoutWide(true)
runCurrent()
verify(qsImpl!!).setInSplitShade(true)
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/domain/interactor/SceneInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/domain/interactor/SceneInteractorTest.kt
index 3acb328e81af..e3a69a964b45 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/domain/interactor/SceneInteractorTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/domain/interactor/SceneInteractorTest.kt
@@ -49,6 +49,7 @@ import kotlinx.coroutines.flow.flowOf
import kotlinx.coroutines.flow.toList
import kotlinx.coroutines.test.runCurrent
import kotlinx.coroutines.test.runTest
+import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
@@ -63,7 +64,8 @@ class SceneInteractorTest : SysuiTestCase() {
private val underTest = kosmos.sceneInteractor
- init {
+ @Before
+ fun setUp() {
// Init lazy Fixtures. Accessing them once makes sure that the singletons are initialized
// and therefore starts to collect StateFlows eagerly (when there are any).
kosmos.deviceUnlockedInteractor
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/domain/startable/SceneContainerStartableTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/domain/startable/SceneContainerStartableTest.kt
index fd1b21332973..540a85aeb695 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/domain/startable/SceneContainerStartableTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/domain/startable/SceneContainerStartableTest.kt
@@ -175,12 +175,14 @@ class SceneContainerStartableTest : SysuiTestCase() {
transitionStateFlow.value = ObservableTransitionState.Idle(Scenes.Gone)
assertThat(isVisible).isFalse()
- kosmos.headsUpNotificationRepository.activeHeadsUpRows.value =
+ kosmos.headsUpNotificationRepository.setNotifications(
buildNotificationRows(isPinned = true)
+ )
assertThat(isVisible).isTrue()
- kosmos.headsUpNotificationRepository.activeHeadsUpRows.value =
+ kosmos.headsUpNotificationRepository.setNotifications(
buildNotificationRows(isPinned = false)
+ )
assertThat(isVisible).isFalse()
}
@@ -1559,6 +1561,63 @@ class SceneContainerStartableTest : SysuiTestCase() {
verify(dismissCallback).onDismissCancelled()
}
+ @Test
+ fun refreshLockscreenEnabled() =
+ testScope.runTest {
+ val transitionState =
+ prepareState(
+ isDeviceUnlocked = true,
+ initialSceneKey = Scenes.Gone,
+ )
+ underTest.start()
+ val isLockscreenEnabled by
+ collectLastValue(kosmos.deviceEntryInteractor.isLockscreenEnabled)
+ assertThat(isLockscreenEnabled).isTrue()
+
+ kosmos.fakeDeviceEntryRepository.setPendingLockscreenEnabled(false)
+ runCurrent()
+ // Pending value didn't propagate yet.
+ assertThat(isLockscreenEnabled).isTrue()
+
+ // Starting a transition to Lockscreen should refresh the value, causing the pending
+ // value
+ // to propagate to the real flow:
+ transitionState.value =
+ ObservableTransitionState.Transition(
+ fromScene = Scenes.Gone,
+ toScene = Scenes.Lockscreen,
+ currentScene = flowOf(Scenes.Gone),
+ progress = flowOf(0.1f),
+ isInitiatedByUserInput = false,
+ isUserInputOngoing = flowOf(false),
+ )
+ runCurrent()
+ assertThat(isLockscreenEnabled).isFalse()
+
+ kosmos.fakeDeviceEntryRepository.setPendingLockscreenEnabled(true)
+ runCurrent()
+ // Pending value didn't propagate yet.
+ assertThat(isLockscreenEnabled).isFalse()
+ transitionState.value = ObservableTransitionState.Idle(Scenes.Gone)
+ runCurrent()
+ assertThat(isLockscreenEnabled).isFalse()
+
+ // Starting another transition to Lockscreen should refresh the value, causing the
+ // pending
+ // value to propagate to the real flow:
+ transitionState.value =
+ ObservableTransitionState.Transition(
+ fromScene = Scenes.Gone,
+ toScene = Scenes.Lockscreen,
+ currentScene = flowOf(Scenes.Gone),
+ progress = flowOf(0.1f),
+ isInitiatedByUserInput = false,
+ isUserInputOngoing = flowOf(false),
+ )
+ runCurrent()
+ assertThat(isLockscreenEnabled).isTrue()
+ }
+
private fun TestScope.emulateSceneTransition(
transitionStateFlow: MutableStateFlow<ObservableTransitionState>,
toScene: SceneKey,
@@ -1642,8 +1701,8 @@ class SceneContainerStartableTest : SysuiTestCase() {
return transitionStateFlow
}
- private fun buildNotificationRows(isPinned: Boolean = false): Set<HeadsUpRowRepository> =
- setOf(
+ private fun buildNotificationRows(isPinned: Boolean = false): List<HeadsUpRowRepository> =
+ listOf(
fakeHeadsUpRowRepository(key = "0", isPinned = isPinned),
fakeHeadsUpRowRepository(key = "1", isPinned = isPinned),
fakeHeadsUpRowRepository(key = "2", isPinned = isPinned),
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/ui/viewmodel/GoneSceneViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/ui/viewmodel/GoneSceneViewModelTest.kt
index 545a0c70719f..0ab6a8250dcf 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/ui/viewmodel/GoneSceneViewModelTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/ui/viewmodel/GoneSceneViewModelTest.kt
@@ -28,7 +28,6 @@ import com.android.systemui.kosmos.testScope
import com.android.systemui.scene.shared.model.TransitionKeys.ToSplitShade
import com.android.systemui.shade.data.repository.shadeRepository
import com.android.systemui.shade.domain.interactor.shadeInteractor
-import com.android.systemui.shade.shared.model.ShadeMode
import com.android.systemui.testKosmos
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.ExperimentalCoroutinesApi
@@ -63,7 +62,7 @@ class GoneSceneViewModelTest : SysuiTestCase() {
fun downTransitionKey_splitShadeEnabled_isGoneToSplitShade() =
testScope.runTest {
val destinationScenes by collectLastValue(underTest.destinationScenes)
- shadeRepository.setShadeMode(ShadeMode.Split)
+ shadeRepository.setShadeLayoutWide(true)
runCurrent()
assertThat(destinationScenes?.get(Swipe(SwipeDirection.Down))?.transitionKey)
@@ -74,7 +73,7 @@ class GoneSceneViewModelTest : SysuiTestCase() {
fun downTransitionKey_splitShadeDisabled_isNull() =
testScope.runTest {
val destinationScenes by collectLastValue(underTest.destinationScenes)
- shadeRepository.setShadeMode(ShadeMode.Single)
+ shadeRepository.setShadeLayoutWide(false)
runCurrent()
assertThat(destinationScenes?.get(Swipe(SwipeDirection.Down))?.transitionKey).isNull()
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/domain/interactor/ShadeInteractorImplTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/domain/interactor/ShadeInteractorImplTest.kt
index 78c4def5689b..3283ea154b3f 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/domain/interactor/ShadeInteractorImplTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/domain/interactor/ShadeInteractorImplTest.kt
@@ -19,6 +19,8 @@ package com.android.systemui.shade.domain.interactor
import android.app.StatusBarManager.DISABLE2_NONE
import android.app.StatusBarManager.DISABLE2_NOTIFICATION_SHADE
import android.app.StatusBarManager.DISABLE2_QUICK_SETTINGS
+import android.platform.test.annotations.DisableFlags
+import android.platform.test.annotations.EnableFlags
import android.platform.test.flag.junit.FlagsParameterization
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
@@ -37,7 +39,10 @@ import com.android.systemui.kosmos.testScope
import com.android.systemui.power.data.repository.fakePowerRepository
import com.android.systemui.power.shared.model.WakeSleepReason
import com.android.systemui.power.shared.model.WakefulnessState
+import com.android.systemui.shade.data.repository.shadeRepository
import com.android.systemui.shade.shadeTestUtil
+import com.android.systemui.shade.shared.flag.DualShade
+import com.android.systemui.shade.shared.model.ShadeMode
import com.android.systemui.statusbar.disableflags.data.model.DisableFlagsModel
import com.android.systemui.statusbar.disableflags.data.repository.fakeDisableFlagsRepository
import com.android.systemui.statusbar.phone.dozeParameters
@@ -452,4 +457,44 @@ class ShadeInteractorImplTest(flags: FlagsParameterization) : SysuiTestCase() {
val isShadeTouchable by collectLastValue(underTest.isShadeTouchable)
assertThat(isShadeTouchable).isTrue()
}
+
+ @Test
+ @DisableFlags(DualShade.FLAG_NAME)
+ fun legacyShadeMode_narrowScreen_singleShade() =
+ testScope.runTest {
+ val shadeMode by collectLastValue(underTest.shadeMode)
+ kosmos.shadeRepository.setShadeLayoutWide(false)
+
+ assertThat(shadeMode).isEqualTo(ShadeMode.Single)
+ }
+
+ @Test
+ @DisableFlags(DualShade.FLAG_NAME)
+ fun legacyShadeMode_wideScreen_splitShade() =
+ testScope.runTest {
+ val shadeMode by collectLastValue(underTest.shadeMode)
+ kosmos.shadeRepository.setShadeLayoutWide(true)
+
+ assertThat(shadeMode).isEqualTo(ShadeMode.Split)
+ }
+
+ @Test
+ @EnableFlags(DualShade.FLAG_NAME)
+ fun shadeMode_wideScreen_isDual() =
+ testScope.runTest {
+ val shadeMode by collectLastValue(underTest.shadeMode)
+ kosmos.shadeRepository.setShadeLayoutWide(true)
+
+ assertThat(shadeMode).isEqualTo(ShadeMode.Dual)
+ }
+
+ @Test
+ @EnableFlags(DualShade.FLAG_NAME)
+ fun shadeMode_narrowScreen_isDual() =
+ testScope.runTest {
+ val shadeMode by collectLastValue(underTest.shadeMode)
+ kosmos.shadeRepository.setShadeLayoutWide(false)
+
+ assertThat(shadeMode).isEqualTo(ShadeMode.Dual)
+ }
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/domain/interactor/ShadeInteractorSceneContainerImplTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/domain/interactor/ShadeInteractorSceneContainerImplTest.kt
index b1bffdbb1bed..8a4319805802 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/domain/interactor/ShadeInteractorSceneContainerImplTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/domain/interactor/ShadeInteractorSceneContainerImplTest.kt
@@ -29,7 +29,6 @@ import com.android.systemui.res.R
import com.android.systemui.scene.domain.interactor.sceneInteractor
import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.shade.data.repository.shadeRepository
-import com.android.systemui.shade.shared.model.ShadeMode
import com.android.systemui.testKosmos
import com.google.common.truth.Truth
import com.google.common.truth.Truth.assertThat
@@ -568,21 +567,6 @@ class ShadeInteractorSceneContainerImplTest : SysuiTestCase() {
sceneInteractor.setTransitionState(transitionState)
// THEN interacting is false
- Truth.assertThat(interacting).isFalse()
- }
-
- @Test
- fun shadeMode() =
- testScope.runTest {
- val shadeMode by collectLastValue(underTest.shadeMode)
-
- shadeRepository.setShadeMode(ShadeMode.Split)
- assertThat(shadeMode).isEqualTo(ShadeMode.Split)
-
- shadeRepository.setShadeMode(ShadeMode.Single)
- assertThat(shadeMode).isEqualTo(ShadeMode.Single)
-
- shadeRepository.setShadeMode(ShadeMode.Split)
- assertThat(shadeMode).isEqualTo(ShadeMode.Split)
+ assertThat(interacting).isFalse()
}
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/ui/viewmodel/ShadeSceneViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/ui/viewmodel/ShadeSceneViewModelTest.kt
index 673d5ef5d962..da22c6d7419d 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/ui/viewmodel/ShadeSceneViewModelTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/ui/viewmodel/ShadeSceneViewModelTest.kt
@@ -16,6 +16,7 @@
package com.android.systemui.shade.ui.viewmodel
+import android.platform.test.annotations.DisableFlags
import android.testing.TestableLooper
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
@@ -38,7 +39,6 @@ import com.android.systemui.kosmos.testScope
import com.android.systemui.media.controls.data.repository.mediaFilterRepository
import com.android.systemui.media.controls.shared.model.MediaData
import com.android.systemui.qs.ui.adapter.fakeQSSceneAdapter
-import com.android.systemui.qs.ui.adapter.qsSceneAdapter
import com.android.systemui.res.R
import com.android.systemui.scene.domain.interactor.sceneInteractor
import com.android.systemui.scene.domain.resolver.homeSceneFamilyResolver
@@ -47,6 +47,7 @@ import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.scene.shared.model.TransitionKeys.ToSplitShade
import com.android.systemui.shade.data.repository.shadeRepository
import com.android.systemui.shade.domain.startable.shadeStartable
+import com.android.systemui.shade.shared.flag.DualShade
import com.android.systemui.shade.shared.model.ShadeMode
import com.android.systemui.testKosmos
import com.android.systemui.unfold.fakeUnfoldTransitionProgressProvider
@@ -66,6 +67,7 @@ import org.junit.runner.RunWith
@RunWith(AndroidJUnit4::class)
@TestableLooper.RunWithLooper
@EnableSceneContainer
+@DisableFlags(DualShade.FLAG_NAME)
class ShadeSceneViewModelTest : SysuiTestCase() {
private val kosmos = testKosmos()
@@ -157,7 +159,7 @@ class ShadeSceneViewModelTest : SysuiTestCase() {
fun upTransitionKey_splitShadeEnabled_isGoneToSplitShade() =
testScope.runTest {
val destinationScenes by collectLastValue(underTest.destinationScenes)
- shadeRepository.setShadeMode(ShadeMode.Split)
+ shadeRepository.setShadeLayoutWide(true)
runCurrent()
assertThat(destinationScenes?.get(Swipe(SwipeDirection.Up))?.transitionKey)
@@ -168,7 +170,7 @@ class ShadeSceneViewModelTest : SysuiTestCase() {
fun upTransitionKey_splitShadeDisable_isNull() =
testScope.runTest {
val destinationScenes by collectLastValue(underTest.destinationScenes)
- shadeRepository.setShadeMode(ShadeMode.Single)
+ shadeRepository.setShadeLayoutWide(false)
runCurrent()
assertThat(destinationScenes?.get(Swipe(SwipeDirection.Up))?.transitionKey).isNull()
@@ -268,13 +270,13 @@ class ShadeSceneViewModelTest : SysuiTestCase() {
testScope.runTest {
val shadeMode by collectLastValue(underTest.shadeMode)
- shadeRepository.setShadeMode(ShadeMode.Split)
+ shadeRepository.setShadeLayoutWide(true)
assertThat(shadeMode).isEqualTo(ShadeMode.Split)
- shadeRepository.setShadeMode(ShadeMode.Single)
+ shadeRepository.setShadeLayoutWide(false)
assertThat(shadeMode).isEqualTo(ShadeMode.Single)
- shadeRepository.setShadeMode(ShadeMode.Split)
+ shadeRepository.setShadeLayoutWide(true)
assertThat(shadeMode).isEqualTo(ShadeMode.Split)
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/collection/coordinator/LockScreenMinimalismCoordinatorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/collection/coordinator/LockScreenMinimalismCoordinatorTest.kt
new file mode 100644
index 000000000000..8810ade1d851
--- /dev/null
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/collection/coordinator/LockScreenMinimalismCoordinatorTest.kt
@@ -0,0 +1,510 @@
+/*
+ * 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.
+ */
+@file:OptIn(ExperimentalCoroutinesApi::class)
+
+package com.android.systemui.statusbar.notification.collection.coordinator
+
+import android.app.Notification
+import android.app.NotificationManager.IMPORTANCE_DEFAULT
+import android.app.NotificationManager.IMPORTANCE_LOW
+import android.os.UserHandle
+import android.platform.test.annotations.EnableFlags
+import android.provider.Settings
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.SmallTest
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.keyguard.shared.model.StatusBarState
+import com.android.systemui.kosmos.testDispatcher
+import com.android.systemui.kosmos.testScope
+import com.android.systemui.plugins.statusbar.statusBarStateController
+import com.android.systemui.shade.shadeTestUtil
+import com.android.systemui.statusbar.SysuiStatusBarStateController
+import com.android.systemui.statusbar.notification.collection.GroupEntryBuilder
+import com.android.systemui.statusbar.notification.collection.NotifPipeline
+import com.android.systemui.statusbar.notification.collection.NotificationEntry
+import com.android.systemui.statusbar.notification.collection.NotificationEntryBuilder
+import com.android.systemui.statusbar.notification.collection.listbuilder.OnBeforeTransformGroupsListener
+import com.android.systemui.statusbar.notification.collection.listbuilder.pluggable.NotifPromoter
+import com.android.systemui.statusbar.notification.collection.listbuilder.pluggable.NotifSectioner
+import com.android.systemui.statusbar.notification.collection.modifyEntry
+import com.android.systemui.statusbar.notification.collection.notifcollection.NotifCollectionListener
+import com.android.systemui.statusbar.notification.data.repository.FakeHeadsUpRowRepository
+import com.android.systemui.statusbar.notification.data.repository.activeNotificationListRepository
+import com.android.systemui.statusbar.notification.shared.NotificationMinimalismPrototype
+import com.android.systemui.statusbar.notification.stack.data.repository.headsUpNotificationRepository
+import com.android.systemui.testKosmos
+import com.android.systemui.util.settings.FakeSettings
+import com.android.systemui.util.settings.fakeSettings
+import com.google.common.truth.StringSubject
+import com.google.common.truth.Truth.assertThat
+import kotlin.time.Duration.Companion.seconds
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.test.TestCoroutineScheduler
+import kotlinx.coroutines.test.TestScope
+import kotlinx.coroutines.test.UnconfinedTestDispatcher
+import kotlinx.coroutines.test.runTest
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.kotlin.argumentCaptor
+import org.mockito.kotlin.doAnswer
+import org.mockito.kotlin.mock
+import org.mockito.kotlin.verify
+import org.mockito.kotlin.whenever
+
+@SmallTest
+@RunWith(AndroidJUnit4::class)
+@EnableFlags(NotificationMinimalismPrototype.FLAG_NAME)
+class LockScreenMinimalismCoordinatorTest : SysuiTestCase() {
+
+ private val kosmos =
+ testKosmos().apply {
+ testDispatcher = UnconfinedTestDispatcher()
+ statusBarStateController =
+ mock<SysuiStatusBarStateController>().also { mock ->
+ doAnswer { statusBarState.ordinal }.whenever(mock).state
+ }
+ fakeSettings.putInt(Settings.Secure.LOCK_SCREEN_SHOW_ONLY_UNSEEN_NOTIFICATIONS, 1)
+ }
+ private val notifPipeline: NotifPipeline = mock()
+ private var statusBarState: StatusBarState = StatusBarState.KEYGUARD
+
+ @Test
+ fun topUnseenSectioner() {
+ val solo = NotificationEntryBuilder().setTag("solo").build()
+ val child1 = NotificationEntryBuilder().setTag("child1").build()
+ val child2 = NotificationEntryBuilder().setTag("child2").build()
+ val parent = NotificationEntryBuilder().setTag("parent").build()
+ val group = GroupEntryBuilder().addChild(child1).addChild(child2).setSummary(parent).build()
+
+ runCoordinatorTest {
+ kosmos.activeNotificationListRepository.topUnseenNotificationKey.value = solo.key
+ assertThat(topUnseenSectioner.isInSection(solo)).isTrue()
+ assertThat(topUnseenSectioner.isInSection(child1)).isFalse()
+ assertThat(topUnseenSectioner.isInSection(child2)).isFalse()
+ assertThat(topUnseenSectioner.isInSection(parent)).isFalse()
+ assertThat(topUnseenSectioner.isInSection(group)).isFalse()
+
+ kosmos.activeNotificationListRepository.topUnseenNotificationKey.value = child1.key
+ assertThat(topUnseenSectioner.isInSection(solo)).isFalse()
+ assertThat(topUnseenSectioner.isInSection(child1)).isTrue()
+ assertThat(topUnseenSectioner.isInSection(child2)).isFalse()
+ assertThat(topUnseenSectioner.isInSection(parent)).isFalse()
+ assertThat(topUnseenSectioner.isInSection(group)).isTrue()
+
+ kosmos.activeNotificationListRepository.topUnseenNotificationKey.value = parent.key
+ assertThat(topUnseenSectioner.isInSection(solo)).isFalse()
+ assertThat(topUnseenSectioner.isInSection(child1)).isFalse()
+ assertThat(topUnseenSectioner.isInSection(child2)).isFalse()
+ assertThat(topUnseenSectioner.isInSection(parent)).isTrue()
+ assertThat(topUnseenSectioner.isInSection(group)).isTrue()
+
+ kosmos.activeNotificationListRepository.topOngoingNotificationKey.value = solo.key
+ kosmos.activeNotificationListRepository.topUnseenNotificationKey.value = null
+ assertThat(topUnseenSectioner.isInSection(solo)).isFalse()
+ assertThat(topUnseenSectioner.isInSection(child1)).isFalse()
+ assertThat(topUnseenSectioner.isInSection(child2)).isFalse()
+ assertThat(topUnseenSectioner.isInSection(parent)).isFalse()
+ assertThat(topUnseenSectioner.isInSection(group)).isFalse()
+ }
+ }
+
+ @Test
+ fun topOngoingSectioner() {
+ val solo = NotificationEntryBuilder().setTag("solo").build()
+ val child1 = NotificationEntryBuilder().setTag("child1").build()
+ val child2 = NotificationEntryBuilder().setTag("child2").build()
+ val parent = NotificationEntryBuilder().setTag("parent").build()
+ val group = GroupEntryBuilder().addChild(child1).addChild(child2).setSummary(parent).build()
+
+ runCoordinatorTest {
+ kosmos.activeNotificationListRepository.topOngoingNotificationKey.value = solo.key
+ assertThat(topOngoingSectioner.isInSection(solo)).isTrue()
+ assertThat(topOngoingSectioner.isInSection(child1)).isFalse()
+ assertThat(topOngoingSectioner.isInSection(child2)).isFalse()
+ assertThat(topOngoingSectioner.isInSection(parent)).isFalse()
+ assertThat(topOngoingSectioner.isInSection(group)).isFalse()
+
+ kosmos.activeNotificationListRepository.topOngoingNotificationKey.value = child1.key
+ assertThat(topOngoingSectioner.isInSection(solo)).isFalse()
+ assertThat(topOngoingSectioner.isInSection(child1)).isTrue()
+ assertThat(topOngoingSectioner.isInSection(child2)).isFalse()
+ assertThat(topOngoingSectioner.isInSection(parent)).isFalse()
+ assertThat(topOngoingSectioner.isInSection(group)).isTrue()
+
+ kosmos.activeNotificationListRepository.topOngoingNotificationKey.value = parent.key
+ assertThat(topOngoingSectioner.isInSection(solo)).isFalse()
+ assertThat(topOngoingSectioner.isInSection(child1)).isFalse()
+ assertThat(topOngoingSectioner.isInSection(child2)).isFalse()
+ assertThat(topOngoingSectioner.isInSection(parent)).isTrue()
+ assertThat(topOngoingSectioner.isInSection(group)).isTrue()
+
+ kosmos.activeNotificationListRepository.topOngoingNotificationKey.value = null
+ kosmos.activeNotificationListRepository.topUnseenNotificationKey.value = solo.key
+ assertThat(topOngoingSectioner.isInSection(solo)).isFalse()
+ assertThat(topOngoingSectioner.isInSection(child1)).isFalse()
+ assertThat(topOngoingSectioner.isInSection(child2)).isFalse()
+ assertThat(topOngoingSectioner.isInSection(parent)).isFalse()
+ assertThat(topOngoingSectioner.isInSection(group)).isFalse()
+ }
+ }
+
+ @Test
+ fun testPromoter() {
+ val child1 = NotificationEntryBuilder().setTag("child1").build()
+ val child2 = NotificationEntryBuilder().setTag("child2").build()
+ val child3 = NotificationEntryBuilder().setTag("child3").build()
+ val parent = NotificationEntryBuilder().setTag("parent").build()
+ GroupEntryBuilder()
+ .addChild(child1)
+ .addChild(child2)
+ .addChild(child3)
+ .setSummary(parent)
+ .build()
+
+ runCoordinatorTest {
+ kosmos.activeNotificationListRepository.topOngoingNotificationKey.value = null
+ kosmos.activeNotificationListRepository.topUnseenNotificationKey.value = null
+ assertThat(promoter.shouldPromoteToTopLevel(child1)).isFalse()
+ assertThat(promoter.shouldPromoteToTopLevel(child2)).isFalse()
+ assertThat(promoter.shouldPromoteToTopLevel(child3)).isFalse()
+ assertThat(promoter.shouldPromoteToTopLevel(parent)).isFalse()
+
+ kosmos.activeNotificationListRepository.topOngoingNotificationKey.value = child1.key
+ kosmos.activeNotificationListRepository.topUnseenNotificationKey.value = null
+ assertThat(promoter.shouldPromoteToTopLevel(child1)).isTrue()
+ assertThat(promoter.shouldPromoteToTopLevel(child2)).isFalse()
+ assertThat(promoter.shouldPromoteToTopLevel(child3)).isFalse()
+ assertThat(promoter.shouldPromoteToTopLevel(parent)).isFalse()
+
+ kosmos.activeNotificationListRepository.topOngoingNotificationKey.value = null
+ kosmos.activeNotificationListRepository.topUnseenNotificationKey.value = child2.key
+ assertThat(promoter.shouldPromoteToTopLevel(child1)).isFalse()
+ assertThat(promoter.shouldPromoteToTopLevel(child2))
+ .isEqualTo(NotificationMinimalismPrototype.ungroupTopUnseen)
+ assertThat(promoter.shouldPromoteToTopLevel(child3)).isFalse()
+ assertThat(promoter.shouldPromoteToTopLevel(parent)).isFalse()
+
+ kosmos.activeNotificationListRepository.topOngoingNotificationKey.value = child1.key
+ kosmos.activeNotificationListRepository.topUnseenNotificationKey.value = child2.key
+ assertThat(promoter.shouldPromoteToTopLevel(child1)).isTrue()
+ assertThat(promoter.shouldPromoteToTopLevel(child2))
+ .isEqualTo(NotificationMinimalismPrototype.ungroupTopUnseen)
+ assertThat(promoter.shouldPromoteToTopLevel(child3)).isFalse()
+ assertThat(promoter.shouldPromoteToTopLevel(parent)).isFalse()
+ }
+ }
+
+ @Test
+ fun topOngoingIdentifier() {
+ val solo1 = defaultEntryBuilder().setTag("solo1").setRank(1).build()
+ val solo2 = defaultEntryBuilder().setTag("solo2").setRank(2).build()
+ val parent = defaultEntryBuilder().setTag("parent").setRank(3).build()
+ val child1 = defaultEntryBuilder().setTag("child1").setRank(4).build()
+ val child2 = defaultEntryBuilder().setTag("child2").setRank(5).build()
+ val group = GroupEntryBuilder().setSummary(parent).addChild(child1).addChild(child2).build()
+ val listEntryList = listOf(group, solo1, solo2)
+
+ runCoordinatorTest {
+ // TEST: base case - no entries in the list
+ onBeforeTransformGroupsListener.onBeforeTransformGroups(emptyList())
+ assertThatTopOngoingKey().isEqualTo(null)
+ assertThatTopUnseenKey().isEqualTo(null)
+
+ // TEST: none of these are unseen or ongoing yet, so don't pick them
+ onBeforeTransformGroupsListener.onBeforeTransformGroups(listEntryList)
+ assertThatTopOngoingKey().isEqualTo(null)
+ assertThatTopUnseenKey().isEqualTo(null)
+
+ // TEST: when solo2 is the only one colorized, it gets picked up
+ solo2.setColorizedFgs(true)
+ onBeforeTransformGroupsListener.onBeforeTransformGroups(listEntryList)
+ assertThatTopOngoingKey().isEqualTo(solo2.key)
+ assertThatTopUnseenKey().isEqualTo(null)
+
+ // TEST: once solo1 is colorized, it takes priority for being ranked higher
+ solo1.setColorizedFgs(true)
+ onBeforeTransformGroupsListener.onBeforeTransformGroups(listEntryList)
+ assertThatTopOngoingKey().isEqualTo(solo1.key)
+ assertThatTopUnseenKey().isEqualTo(null)
+
+ // TEST: changing just the rank of solo1 causes it to pick up solo2 instead
+ solo1.modifyEntry { setRank(20) }
+ onBeforeTransformGroupsListener.onBeforeTransformGroups(listEntryList)
+ assertThatTopOngoingKey().isEqualTo(solo2.key)
+ assertThatTopUnseenKey().isEqualTo(null)
+
+ // TEST: switching to SHADE disables the whole thing
+ statusBarState = StatusBarState.SHADE
+ onBeforeTransformGroupsListener.onBeforeTransformGroups(listEntryList)
+ assertThatTopOngoingKey().isEqualTo(null)
+ assertThatTopUnseenKey().isEqualTo(null)
+
+ // TEST: switching back to KEYGUARD picks up the same entry again
+ statusBarState = StatusBarState.KEYGUARD
+ onBeforeTransformGroupsListener.onBeforeTransformGroups(listEntryList)
+ assertThatTopOngoingKey().isEqualTo(solo2.key)
+ assertThatTopUnseenKey().isEqualTo(null)
+
+ // TEST: updating to not colorized revokes the top-ongoing status
+ solo2.setColorizedFgs(false)
+ onBeforeTransformGroupsListener.onBeforeTransformGroups(listEntryList)
+ assertThatTopOngoingKey().isEqualTo(solo1.key)
+ assertThatTopUnseenKey().isEqualTo(null)
+
+ // TEST: updating the importance to LOW revokes top-ongoing status
+ solo1.modifyEntry { setImportance(IMPORTANCE_LOW) }
+ onBeforeTransformGroupsListener.onBeforeTransformGroups(listEntryList)
+ assertThatTopOngoingKey().isEqualTo(null)
+ assertThatTopUnseenKey().isEqualTo(null)
+ }
+ }
+
+ @Test
+ fun topUnseenIdentifier() {
+ val solo1 = defaultEntryBuilder().setTag("solo1").setRank(1).build()
+ val solo2 = defaultEntryBuilder().setTag("solo2").setRank(2).build()
+ val parent = defaultEntryBuilder().setTag("parent").setRank(4).build()
+ val child1 = defaultEntryBuilder().setTag("child1").setRank(5).build()
+ val child2 = defaultEntryBuilder().setTag("child2").setRank(6).build()
+ val group = GroupEntryBuilder().setSummary(parent).addChild(child1).addChild(child2).build()
+ val listEntryList = listOf(group, solo1, solo2)
+ val notificationEntryList = listOf(solo1, solo2, parent, child1, child2)
+
+ runCoordinatorTest {
+ // All entries are added (and now unseen)
+ notificationEntryList.forEach { collectionListener.onEntryAdded(it) }
+
+ // TEST: Filtered out entries are ignored
+ onBeforeTransformGroupsListener.onBeforeTransformGroups(emptyList())
+ assertThatTopOngoingKey().isEqualTo(null)
+ assertThatTopUnseenKey().isEqualTo(null)
+
+ // TEST: top-ranked unseen child is selected (not the summary)
+ onBeforeTransformGroupsListener.onBeforeTransformGroups(listOf(group))
+ assertThatTopOngoingKey().isEqualTo(null)
+ assertThatTopUnseenKey().isEqualTo(child1.key)
+
+ // TEST: top-ranked entry is picked
+ onBeforeTransformGroupsListener.onBeforeTransformGroups(listEntryList)
+ assertThatTopOngoingKey().isEqualTo(null)
+ assertThatTopUnseenKey().isEqualTo(solo1.key)
+
+ // TEST: if top-ranked unseen is colorized, fall back to #2 ranked unseen
+ solo1.setColorizedFgs(true)
+ onBeforeTransformGroupsListener.onBeforeTransformGroups(listEntryList)
+ assertThatTopOngoingKey().isEqualTo(solo1.key)
+ assertThatTopUnseenKey().isEqualTo(solo2.key)
+
+ // TEST: no more colorized entries
+ solo1.setColorizedFgs(false)
+ onBeforeTransformGroupsListener.onBeforeTransformGroups(listEntryList)
+ assertThatTopOngoingKey().isEqualTo(null)
+ assertThatTopUnseenKey().isEqualTo(solo1.key)
+
+ // TEST: if the rank of solo1 is reduced, solo2 will be preferred
+ solo1.modifyEntry { setRank(3) }
+ onBeforeTransformGroupsListener.onBeforeTransformGroups(listEntryList)
+ assertThatTopOngoingKey().isEqualTo(null)
+ assertThatTopUnseenKey().isEqualTo(solo2.key)
+
+ // TEST: switching to SHADE state will disable the entire selector
+ statusBarState = StatusBarState.SHADE
+ onBeforeTransformGroupsListener.onBeforeTransformGroups(listEntryList)
+ assertThatTopOngoingKey().isEqualTo(null)
+ assertThatTopUnseenKey().isEqualTo(null)
+
+ // TEST: switching back to KEYGUARD re-enables the selector
+ statusBarState = StatusBarState.KEYGUARD
+ onBeforeTransformGroupsListener.onBeforeTransformGroups(listEntryList)
+ assertThatTopOngoingKey().isEqualTo(null)
+ assertThatTopUnseenKey().isEqualTo(solo2.key)
+
+ // TEST: QS Expansion does not mark entries as seen
+ setShadeAndQsExpansionThenWait(0f, 1f)
+ onBeforeTransformGroupsListener.onBeforeTransformGroups(listEntryList)
+ assertThatTopOngoingKey().isEqualTo(null)
+ assertThatTopUnseenKey().isEqualTo(solo2.key)
+
+ // TEST: Shade expansion does mark entries as seen
+ setShadeAndQsExpansionThenWait(1f, 0f)
+ onBeforeTransformGroupsListener.onBeforeTransformGroups(listEntryList)
+ assertThatTopOngoingKey().isEqualTo(null)
+ assertThatTopUnseenKey().isEqualTo(null)
+
+ // TEST: Entries updated while shade is expanded are NOT marked unseen
+ collectionListener.onEntryUpdated(solo1)
+ collectionListener.onEntryUpdated(solo2)
+ onBeforeTransformGroupsListener.onBeforeTransformGroups(listEntryList)
+ assertThatTopOngoingKey().isEqualTo(null)
+ assertThatTopUnseenKey().isEqualTo(null)
+
+ // TEST: Entries updated after shade is collapsed ARE marked unseen
+ setShadeAndQsExpansionThenWait(0f, 0f)
+ collectionListener.onEntryUpdated(solo1)
+ collectionListener.onEntryUpdated(solo2)
+ onBeforeTransformGroupsListener.onBeforeTransformGroups(listEntryList)
+ assertThatTopOngoingKey().isEqualTo(null)
+ assertThatTopUnseenKey().isEqualTo(solo2.key)
+
+ // TEST: low importance disqualifies the entry for top unseen
+ solo2.modifyEntry { setImportance(IMPORTANCE_LOW) }
+ onBeforeTransformGroupsListener.onBeforeTransformGroups(listEntryList)
+ assertThatTopOngoingKey().isEqualTo(null)
+ assertThatTopUnseenKey().isEqualTo(solo1.key)
+ }
+ }
+
+ @Test
+ fun topUnseenIdentifier_headsUpMarksSeen() {
+ val solo1 = defaultEntryBuilder().setTag("solo1").setRank(1).build()
+ val solo2 = defaultEntryBuilder().setTag("solo2").setRank(2).build()
+ val listEntryList = listOf(solo1, solo2)
+ val notificationEntryList = listOf(solo1, solo2)
+
+ val hunRepo1 = solo1.fakeHeadsUpRowRepository()
+ val hunRepo2 = solo2.fakeHeadsUpRowRepository()
+
+ runCoordinatorTest {
+ // All entries are added (and now unseen)
+ notificationEntryList.forEach { collectionListener.onEntryAdded(it) }
+
+ // TEST: top-ranked entry is picked
+ onBeforeTransformGroupsListener.onBeforeTransformGroups(listEntryList)
+ assertThatTopUnseenKey().isEqualTo(solo1.key)
+
+ // TEST: heads up state and waiting isn't enough to be seen
+ kosmos.headsUpNotificationRepository.orderedHeadsUpRows.value =
+ listOf(hunRepo1, hunRepo2)
+ testScheduler.advanceTimeBy(1.seconds)
+ onBeforeTransformGroupsListener.onBeforeTransformGroups(listEntryList)
+ assertThatTopUnseenKey().isEqualTo(solo1.key)
+
+ // TEST: even being pinned doesn't take effect immediately
+ hunRepo1.isPinned.value = true
+ testScheduler.advanceTimeBy(0.5.seconds)
+ onBeforeTransformGroupsListener.onBeforeTransformGroups(listEntryList)
+ assertThatTopUnseenKey().isEqualTo(solo1.key)
+
+ // TEST: after being pinned a full second, solo1 is seen
+ testScheduler.advanceTimeBy(0.5.seconds)
+ onBeforeTransformGroupsListener.onBeforeTransformGroups(listEntryList)
+ assertThatTopUnseenKey().isEqualTo(solo2.key)
+
+ // TEST: repeat; being heads up and pinned for 1 second triggers seen
+ kosmos.headsUpNotificationRepository.orderedHeadsUpRows.value = listOf(hunRepo2)
+ hunRepo1.isPinned.value = false
+ hunRepo2.isPinned.value = true
+ testScheduler.advanceTimeBy(1.seconds)
+ onBeforeTransformGroupsListener.onBeforeTransformGroups(listEntryList)
+ assertThatTopUnseenKey().isEqualTo(null)
+ }
+ }
+
+ private fun NotificationEntry.fakeHeadsUpRowRepository() =
+ FakeHeadsUpRowRepository(key = key, elementKey = Any())
+
+ private fun KeyguardCoordinatorTestScope.setShadeAndQsExpansionThenWait(
+ shadeExpansion: Float,
+ qsExpansion: Float
+ ) {
+ kosmos.shadeTestUtil.setShadeAndQsExpansion(shadeExpansion, qsExpansion)
+ // The coordinator waits a fraction of a second for the shade expansion to stick.
+ testScheduler.advanceTimeBy(1.seconds)
+ }
+
+ private fun defaultEntryBuilder() = NotificationEntryBuilder().setImportance(IMPORTANCE_DEFAULT)
+
+ private fun runCoordinatorTest(testBlock: suspend KeyguardCoordinatorTestScope.() -> Unit) {
+ kosmos.lockScreenMinimalismCoordinator.attach(notifPipeline)
+ kosmos.testScope.runTest(dispatchTimeoutMs = 1.seconds.inWholeMilliseconds) {
+ KeyguardCoordinatorTestScope(
+ kosmos.lockScreenMinimalismCoordinator,
+ kosmos.testScope,
+ kosmos.fakeSettings,
+ )
+ .testBlock()
+ }
+ }
+
+ private inner class KeyguardCoordinatorTestScope(
+ private val coordinator: LockScreenMinimalismCoordinator,
+ private val scope: TestScope,
+ private val fakeSettings: FakeSettings,
+ ) : CoroutineScope by scope {
+ fun assertThatTopOngoingKey(): StringSubject {
+ return assertThat(
+ kosmos.activeNotificationListRepository.topOngoingNotificationKey.value
+ )
+ }
+
+ fun assertThatTopUnseenKey(): StringSubject {
+ return assertThat(
+ kosmos.activeNotificationListRepository.topUnseenNotificationKey.value
+ )
+ }
+
+ val testScheduler: TestCoroutineScheduler
+ get() = scope.testScheduler
+
+ val promoter: NotifPromoter
+ get() = coordinator.unseenNotifPromoter
+
+ val topUnseenSectioner: NotifSectioner
+ get() = coordinator.topUnseenSectioner
+
+ val topOngoingSectioner: NotifSectioner
+ get() = coordinator.topOngoingSectioner
+
+ val onBeforeTransformGroupsListener: OnBeforeTransformGroupsListener =
+ argumentCaptor { verify(notifPipeline).addOnBeforeTransformGroupsListener(capture()) }
+ .lastValue
+
+ val collectionListener: NotifCollectionListener =
+ argumentCaptor { verify(notifPipeline).addCollectionListener(capture()) }.lastValue
+
+ var showOnlyUnseenNotifsOnKeyguardSetting: Boolean
+ get() =
+ fakeSettings.getIntForUser(
+ Settings.Secure.LOCK_SCREEN_SHOW_ONLY_UNSEEN_NOTIFICATIONS,
+ UserHandle.USER_CURRENT,
+ ) == 1
+ set(value) {
+ fakeSettings.putIntForUser(
+ Settings.Secure.LOCK_SCREEN_SHOW_ONLY_UNSEEN_NOTIFICATIONS,
+ if (value) 1 else 2,
+ UserHandle.USER_CURRENT,
+ )
+ }
+ }
+
+ companion object {
+
+ private fun NotificationEntry.setColorizedFgs(colorized: Boolean) {
+ sbn.notification.setColorizedFgs(colorized)
+ }
+
+ private fun Notification.setColorizedFgs(colorized: Boolean) {
+ extras.putBoolean(Notification.EXTRA_COLORIZED, colorized)
+ flags =
+ if (colorized) {
+ flags or Notification.FLAG_FOREGROUND_SERVICE
+ } else {
+ flags and Notification.FLAG_FOREGROUND_SERVICE.inv()
+ }
+ }
+ }
+}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/collection/coordinator/OriginalUnseenKeyguardCoordinatorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/collection/coordinator/OriginalUnseenKeyguardCoordinatorTest.kt
new file mode 100644
index 000000000000..6ddc07432a16
--- /dev/null
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/collection/coordinator/OriginalUnseenKeyguardCoordinatorTest.kt
@@ -0,0 +1,683 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+@file:OptIn(ExperimentalCoroutinesApi::class)
+
+package com.android.systemui.statusbar.notification.collection.coordinator
+
+import android.app.Notification
+import android.os.UserHandle
+import android.platform.test.flag.junit.FlagsParameterization
+import android.provider.Settings
+import androidx.test.filters.SmallTest
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.dump.DumpManager
+import com.android.systemui.flags.andSceneContainer
+import com.android.systemui.keyguard.data.repository.FakeKeyguardRepository
+import com.android.systemui.keyguard.data.repository.fakeKeyguardTransitionRepository
+import com.android.systemui.keyguard.domain.interactor.keyguardTransitionInteractor
+import com.android.systemui.keyguard.shared.model.KeyguardState
+import com.android.systemui.keyguard.shared.model.TransitionStep
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.log.logcatLogBuffer
+import com.android.systemui.plugins.statusbar.StatusBarStateController
+import com.android.systemui.scene.data.repository.Idle
+import com.android.systemui.scene.data.repository.setTransition
+import com.android.systemui.scene.shared.model.Scenes
+import com.android.systemui.statusbar.notification.collection.GroupEntryBuilder
+import com.android.systemui.statusbar.notification.collection.NotifPipeline
+import com.android.systemui.statusbar.notification.collection.NotificationEntryBuilder
+import com.android.systemui.statusbar.notification.collection.listbuilder.pluggable.NotifFilter
+import com.android.systemui.statusbar.notification.collection.listbuilder.pluggable.Pluggable
+import com.android.systemui.statusbar.notification.collection.notifcollection.NotifCollectionListener
+import com.android.systemui.statusbar.notification.data.repository.ActiveNotificationListRepository
+import com.android.systemui.statusbar.notification.domain.interactor.SeenNotificationsInteractor
+import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow
+import com.android.systemui.statusbar.policy.HeadsUpManager
+import com.android.systemui.statusbar.policy.OnHeadsUpChangedListener
+import com.android.systemui.util.settings.FakeSettings
+import com.google.common.truth.Truth.assertThat
+import kotlin.time.Duration.Companion.seconds
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.test.TestCoroutineScheduler
+import kotlinx.coroutines.test.TestScope
+import kotlinx.coroutines.test.UnconfinedTestDispatcher
+import kotlinx.coroutines.test.runTest
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.ArgumentMatchers.same
+import org.mockito.kotlin.any
+import org.mockito.kotlin.argumentCaptor
+import org.mockito.kotlin.mock
+import org.mockito.kotlin.never
+import org.mockito.kotlin.verify
+import org.mockito.kotlin.whenever
+import platform.test.runner.parameterized.ParameterizedAndroidJunit4
+import platform.test.runner.parameterized.Parameters
+
+@SmallTest
+@RunWith(ParameterizedAndroidJunit4::class)
+class OriginalUnseenKeyguardCoordinatorTest(flags: FlagsParameterization) : SysuiTestCase() {
+
+ private val kosmos = Kosmos()
+
+ private val headsUpManager: HeadsUpManager = mock()
+ private val keyguardRepository = FakeKeyguardRepository()
+ private val keyguardTransitionRepository = kosmos.fakeKeyguardTransitionRepository
+ private val notifPipeline: NotifPipeline = mock()
+ private val statusBarStateController: StatusBarStateController = mock()
+
+ init {
+ mSetFlagsRule.setFlagsParameterization(flags)
+ }
+
+ @Test
+ fun unseenFilterSuppressesSeenNotifWhileKeyguardShowing() {
+ // GIVEN: Keyguard is not showing, shade is expanded, and a notification is present
+ keyguardRepository.setKeyguardShowing(false)
+ whenever(statusBarStateController.isExpanded).thenReturn(true)
+ runKeyguardCoordinatorTest {
+ val fakeEntry = NotificationEntryBuilder().build()
+ collectionListener.onEntryAdded(fakeEntry)
+
+ // WHEN: The keyguard is now showing
+ keyguardRepository.setKeyguardShowing(true)
+ testScheduler.runCurrent()
+
+ // THEN: The notification is recognized as "seen" and is filtered out.
+ assertThat(unseenFilter.shouldFilterOut(fakeEntry, 0L)).isTrue()
+
+ // WHEN: The keyguard goes away
+ keyguardRepository.setKeyguardShowing(false)
+ testScheduler.runCurrent()
+
+ // THEN: The notification is shown regardless
+ assertThat(unseenFilter.shouldFilterOut(fakeEntry, 0L)).isFalse()
+ }
+ }
+
+ @Test
+ fun unseenFilterStopsMarkingSeenNotifWhenTransitionToAod() {
+ // GIVEN: Keyguard is not showing, shade is not expanded, and a notification is present
+ keyguardRepository.setKeyguardShowing(false)
+ whenever(statusBarStateController.isExpanded).thenReturn(false)
+ runKeyguardCoordinatorTest {
+ val fakeEntry = NotificationEntryBuilder().build()
+ collectionListener.onEntryAdded(fakeEntry)
+
+ // WHEN: The device transitions to AOD
+ keyguardTransitionRepository.sendTransitionSteps(
+ from = KeyguardState.GONE,
+ to = KeyguardState.AOD,
+ this.testScheduler,
+ )
+ testScheduler.runCurrent()
+
+ // THEN: We are no longer listening for shade expansions
+ verify(statusBarStateController, never()).addCallback(any())
+ }
+ }
+
+ @Test
+ fun unseenFilter_headsUpMarkedAsSeen() {
+ // GIVEN: Keyguard is not showing, shade is not expanded
+ keyguardRepository.setKeyguardShowing(false)
+ whenever(statusBarStateController.isExpanded).thenReturn(false)
+ runKeyguardCoordinatorTest {
+ kosmos.setTransition(
+ sceneTransition = Idle(Scenes.Gone),
+ stateTransition = TransitionStep(KeyguardState.LOCKSCREEN, KeyguardState.GONE)
+ )
+
+ // WHEN: A notification is posted
+ val fakeEntry = NotificationEntryBuilder().build()
+ collectionListener.onEntryAdded(fakeEntry)
+
+ // WHEN: That notification is heads up
+ onHeadsUpChangedListener.onHeadsUpStateChanged(fakeEntry, /* isHeadsUp= */ true)
+ testScheduler.runCurrent()
+
+ // WHEN: The keyguard is now showing
+ keyguardRepository.setKeyguardShowing(true)
+ kosmos.setTransition(
+ sceneTransition = Idle(Scenes.Lockscreen),
+ stateTransition = TransitionStep(KeyguardState.GONE, KeyguardState.AOD)
+ )
+
+ // THEN: The notification is recognized as "seen" and is filtered out.
+ assertThat(unseenFilter.shouldFilterOut(fakeEntry, 0L)).isTrue()
+
+ // WHEN: The keyguard goes away
+ keyguardRepository.setKeyguardShowing(false)
+ kosmos.setTransition(
+ sceneTransition = Idle(Scenes.Gone),
+ stateTransition = TransitionStep(KeyguardState.AOD, KeyguardState.GONE)
+ )
+
+ // THEN: The notification is shown regardless
+ assertThat(unseenFilter.shouldFilterOut(fakeEntry, 0L)).isFalse()
+ }
+ }
+
+ @Test
+ fun unseenFilterDoesNotSuppressSeenOngoingNotifWhileKeyguardShowing() {
+ // GIVEN: Keyguard is not showing, shade is expanded, and an ongoing notification is present
+ keyguardRepository.setKeyguardShowing(false)
+ whenever(statusBarStateController.isExpanded).thenReturn(true)
+ runKeyguardCoordinatorTest {
+ val fakeEntry =
+ NotificationEntryBuilder()
+ .setNotification(Notification.Builder(mContext, "id").setOngoing(true).build())
+ .build()
+ collectionListener.onEntryAdded(fakeEntry)
+
+ // WHEN: The keyguard is now showing
+ keyguardRepository.setKeyguardShowing(true)
+ testScheduler.runCurrent()
+
+ // THEN: The notification is recognized as "ongoing" and is not filtered out.
+ assertThat(unseenFilter.shouldFilterOut(fakeEntry, 0L)).isFalse()
+ }
+ }
+
+ @Test
+ fun unseenFilterDoesNotSuppressSeenMediaNotifWhileKeyguardShowing() {
+ // GIVEN: Keyguard is not showing, shade is expanded, and a media notification is present
+ keyguardRepository.setKeyguardShowing(false)
+ whenever(statusBarStateController.isExpanded).thenReturn(true)
+ runKeyguardCoordinatorTest {
+ val fakeEntry =
+ NotificationEntryBuilder().build().apply {
+ row =
+ mock<ExpandableNotificationRow>().apply {
+ whenever(isMediaRow).thenReturn(true)
+ }
+ }
+ collectionListener.onEntryAdded(fakeEntry)
+
+ // WHEN: The keyguard is now showing
+ keyguardRepository.setKeyguardShowing(true)
+ testScheduler.runCurrent()
+
+ // THEN: The notification is recognized as "media" and is not filtered out.
+ assertThat(unseenFilter.shouldFilterOut(fakeEntry, 0L)).isFalse()
+ }
+ }
+
+ @Test
+ fun unseenFilterUpdatesSeenProviderWhenSuppressing() {
+ // GIVEN: Keyguard is not showing, shade is expanded, and a notification is present
+ keyguardRepository.setKeyguardShowing(false)
+ whenever(statusBarStateController.isExpanded).thenReturn(true)
+ runKeyguardCoordinatorTest {
+ val fakeEntry = NotificationEntryBuilder().build()
+ collectionListener.onEntryAdded(fakeEntry)
+
+ // WHEN: The keyguard is now showing
+ keyguardRepository.setKeyguardShowing(true)
+ testScheduler.runCurrent()
+
+ // THEN: The notification is recognized as "seen" and is filtered out.
+ assertThat(unseenFilter.shouldFilterOut(fakeEntry, 0L)).isTrue()
+
+ // WHEN: The filter is cleaned up
+ unseenFilter.onCleanup()
+
+ // THEN: The SeenNotificationProvider has been updated to reflect the suppression
+ assertThat(seenNotificationsInteractor.hasFilteredOutSeenNotifications.value).isTrue()
+ }
+ }
+
+ @Test
+ fun unseenFilterInvalidatesWhenSettingChanges() {
+ // GIVEN: Keyguard is not showing, and shade is expanded
+ keyguardRepository.setKeyguardShowing(false)
+ whenever(statusBarStateController.isExpanded).thenReturn(true)
+ runKeyguardCoordinatorTest {
+ // GIVEN: A notification is present
+ val fakeEntry = NotificationEntryBuilder().build()
+ collectionListener.onEntryAdded(fakeEntry)
+
+ // GIVEN: The setting for filtering unseen notifications is disabled
+ showOnlyUnseenNotifsOnKeyguardSetting = false
+
+ // GIVEN: The pipeline has registered the unseen filter for invalidation
+ val invalidationListener: Pluggable.PluggableListener<NotifFilter> = mock()
+ unseenFilter.setInvalidationListener(invalidationListener)
+
+ // WHEN: The keyguard is now showing
+ keyguardRepository.setKeyguardShowing(true)
+ testScheduler.runCurrent()
+
+ // THEN: The notification is not filtered out
+ assertThat(unseenFilter.shouldFilterOut(fakeEntry, 0L)).isFalse()
+
+ // WHEN: The secure setting is changed
+ showOnlyUnseenNotifsOnKeyguardSetting = true
+
+ // THEN: The pipeline is invalidated
+ verify(invalidationListener).onPluggableInvalidated(same(unseenFilter), any())
+
+ // THEN: The notification is recognized as "seen" and is filtered out.
+ assertThat(unseenFilter.shouldFilterOut(fakeEntry, 0L)).isTrue()
+ }
+ }
+
+ @Test
+ fun unseenFilterAllowsNewNotif() {
+ // GIVEN: Keyguard is showing, no notifications present
+ keyguardRepository.setKeyguardShowing(true)
+ runKeyguardCoordinatorTest {
+ // WHEN: A new notification is posted
+ val fakeEntry = NotificationEntryBuilder().build()
+ collectionListener.onEntryAdded(fakeEntry)
+
+ // THEN: The notification is recognized as "unseen" and is not filtered out.
+ assertThat(unseenFilter.shouldFilterOut(fakeEntry, 0L)).isFalse()
+ }
+ }
+
+ @Test
+ fun unseenFilterSeenGroupSummaryWithUnseenChild() {
+ // GIVEN: Keyguard is not showing, shade is expanded, and a notification is present
+ keyguardRepository.setKeyguardShowing(false)
+ whenever(statusBarStateController.isExpanded).thenReturn(true)
+ runKeyguardCoordinatorTest {
+ // WHEN: A new notification is posted
+ val fakeSummary = NotificationEntryBuilder().build()
+ val fakeChild =
+ NotificationEntryBuilder()
+ .setGroup(context, "group")
+ .setGroupSummary(context, false)
+ .build()
+ GroupEntryBuilder().setSummary(fakeSummary).addChild(fakeChild).build()
+
+ collectionListener.onEntryAdded(fakeSummary)
+ collectionListener.onEntryAdded(fakeChild)
+
+ // WHEN: Keyguard is now showing, both notifications are marked as seen
+ keyguardRepository.setKeyguardShowing(true)
+ testScheduler.runCurrent()
+
+ // WHEN: The child notification is now unseen
+ collectionListener.onEntryUpdated(fakeChild)
+
+ // THEN: The summary is not filtered out, because the child is unseen
+ assertThat(unseenFilter.shouldFilterOut(fakeSummary, 0L)).isFalse()
+ }
+ }
+
+ @Test
+ fun unseenNotificationIsMarkedAsSeenWhenKeyguardGoesAway() {
+ // GIVEN: Keyguard is showing, not dozing, unseen notification is present
+ keyguardRepository.setKeyguardShowing(true)
+ keyguardRepository.setIsDozing(false)
+ runKeyguardCoordinatorTest {
+ val fakeEntry = NotificationEntryBuilder().build()
+ collectionListener.onEntryAdded(fakeEntry)
+ keyguardTransitionRepository.sendTransitionSteps(
+ from = KeyguardState.AOD,
+ to = KeyguardState.LOCKSCREEN,
+ this.testScheduler,
+ )
+ testScheduler.runCurrent()
+
+ // WHEN: five seconds have passed
+ testScheduler.advanceTimeBy(5.seconds)
+ testScheduler.runCurrent()
+
+ // WHEN: Keyguard is no longer showing
+ keyguardRepository.setKeyguardShowing(false)
+ kosmos.setTransition(
+ sceneTransition = Idle(Scenes.Gone),
+ stateTransition = TransitionStep(KeyguardState.LOCKSCREEN, KeyguardState.GONE)
+ )
+
+ // WHEN: Keyguard is shown again
+ keyguardRepository.setKeyguardShowing(true)
+ kosmos.setTransition(
+ sceneTransition = Idle(Scenes.Lockscreen),
+ stateTransition = TransitionStep(KeyguardState.GONE, KeyguardState.AOD)
+ )
+
+ // THEN: The notification is now recognized as "seen" and is filtered out.
+ assertThat(unseenFilter.shouldFilterOut(fakeEntry, 0L)).isTrue()
+ }
+ }
+
+ @Test
+ fun unseenNotificationIsNotMarkedAsSeenIfShadeNotExpanded() {
+ // GIVEN: Keyguard is showing, unseen notification is present
+ keyguardRepository.setKeyguardShowing(true)
+ runKeyguardCoordinatorTest {
+ keyguardTransitionRepository.sendTransitionSteps(
+ from = KeyguardState.GONE,
+ to = KeyguardState.LOCKSCREEN,
+ this.testScheduler,
+ )
+ val fakeEntry = NotificationEntryBuilder().build()
+ collectionListener.onEntryAdded(fakeEntry)
+
+ // WHEN: Keyguard is no longer showing
+ keyguardRepository.setKeyguardShowing(false)
+ keyguardTransitionRepository.sendTransitionSteps(
+ from = KeyguardState.LOCKSCREEN,
+ to = KeyguardState.GONE,
+ this.testScheduler,
+ )
+
+ // WHEN: Keyguard is shown again
+ keyguardRepository.setKeyguardShowing(true)
+ testScheduler.runCurrent()
+
+ // THEN: The notification is not recognized as "seen" and is not filtered out.
+ assertThat(unseenFilter.shouldFilterOut(fakeEntry, 0L)).isFalse()
+ }
+ }
+
+ @Test
+ fun unseenNotificationIsNotMarkedAsSeenIfNotOnKeyguardLongEnough() {
+ // GIVEN: Keyguard is showing, not dozing, unseen notification is present
+ keyguardRepository.setKeyguardShowing(true)
+ keyguardRepository.setIsDozing(false)
+ runKeyguardCoordinatorTest {
+ kosmos.setTransition(
+ sceneTransition = Idle(Scenes.Lockscreen),
+ stateTransition = TransitionStep(KeyguardState.GONE, KeyguardState.LOCKSCREEN)
+ )
+ val firstEntry = NotificationEntryBuilder().setId(1).build()
+ collectionListener.onEntryAdded(firstEntry)
+ testScheduler.runCurrent()
+
+ // WHEN: one second has passed
+ testScheduler.advanceTimeBy(1.seconds)
+ testScheduler.runCurrent()
+
+ // WHEN: another unseen notification is posted
+ val secondEntry = NotificationEntryBuilder().setId(2).build()
+ collectionListener.onEntryAdded(secondEntry)
+ testScheduler.runCurrent()
+
+ // WHEN: four more seconds have passed
+ testScheduler.advanceTimeBy(4.seconds)
+ testScheduler.runCurrent()
+
+ // WHEN: the keyguard is no longer showing
+ keyguardRepository.setKeyguardShowing(false)
+ kosmos.setTransition(
+ sceneTransition = Idle(Scenes.Gone),
+ stateTransition = TransitionStep(KeyguardState.LOCKSCREEN, KeyguardState.GONE)
+ )
+
+ // WHEN: Keyguard is shown again
+ keyguardRepository.setKeyguardShowing(true)
+ kosmos.setTransition(
+ sceneTransition = Idle(Scenes.Lockscreen),
+ stateTransition = TransitionStep(KeyguardState.GONE, KeyguardState.LOCKSCREEN)
+ )
+
+ // THEN: The first notification is considered seen and is filtered out.
+ assertThat(unseenFilter.shouldFilterOut(firstEntry, 0L)).isTrue()
+
+ // THEN: The second notification is still considered unseen and is not filtered out
+ assertThat(unseenFilter.shouldFilterOut(secondEntry, 0L)).isFalse()
+ }
+ }
+
+ @Test
+ fun unseenNotificationOnKeyguardNotMarkedAsSeenIfRemovedAfterThreshold() {
+ // GIVEN: Keyguard is showing, not dozing
+ keyguardRepository.setKeyguardShowing(true)
+ keyguardRepository.setIsDozing(false)
+ runKeyguardCoordinatorTest {
+ keyguardTransitionRepository.sendTransitionSteps(
+ from = KeyguardState.GONE,
+ to = KeyguardState.LOCKSCREEN,
+ this.testScheduler,
+ )
+ testScheduler.runCurrent()
+
+ // WHEN: a new notification is posted
+ val entry = NotificationEntryBuilder().setId(1).build()
+ collectionListener.onEntryAdded(entry)
+ testScheduler.runCurrent()
+
+ // WHEN: five more seconds have passed
+ testScheduler.advanceTimeBy(5.seconds)
+ testScheduler.runCurrent()
+
+ // WHEN: the notification is removed
+ collectionListener.onEntryRemoved(entry, 0)
+ testScheduler.runCurrent()
+
+ // WHEN: the notification is re-posted
+ collectionListener.onEntryAdded(entry)
+ testScheduler.runCurrent()
+
+ // WHEN: one more second has passed
+ testScheduler.advanceTimeBy(1.seconds)
+ testScheduler.runCurrent()
+
+ // WHEN: the keyguard is no longer showing
+ keyguardRepository.setKeyguardShowing(false)
+ keyguardTransitionRepository.sendTransitionSteps(
+ from = KeyguardState.LOCKSCREEN,
+ to = KeyguardState.GONE,
+ this.testScheduler,
+ )
+ testScheduler.runCurrent()
+
+ // WHEN: Keyguard is shown again
+ keyguardRepository.setKeyguardShowing(true)
+ keyguardTransitionRepository.sendTransitionSteps(
+ from = KeyguardState.GONE,
+ to = KeyguardState.LOCKSCREEN,
+ this.testScheduler,
+ )
+ testScheduler.runCurrent()
+
+ // THEN: The notification is considered unseen and is not filtered out.
+ assertThat(unseenFilter.shouldFilterOut(entry, 0L)).isFalse()
+ }
+ }
+
+ @Test
+ fun unseenNotificationOnKeyguardNotMarkedAsSeenIfRemovedBeforeThreshold() {
+ // GIVEN: Keyguard is showing, not dozing
+ keyguardRepository.setKeyguardShowing(true)
+ keyguardRepository.setIsDozing(false)
+ runKeyguardCoordinatorTest {
+ keyguardTransitionRepository.sendTransitionSteps(
+ from = KeyguardState.GONE,
+ to = KeyguardState.LOCKSCREEN,
+ this.testScheduler,
+ )
+ testScheduler.runCurrent()
+
+ // WHEN: a new notification is posted
+ val entry = NotificationEntryBuilder().setId(1).build()
+ collectionListener.onEntryAdded(entry)
+ testScheduler.runCurrent()
+
+ // WHEN: one second has passed
+ testScheduler.advanceTimeBy(1.seconds)
+ testScheduler.runCurrent()
+
+ // WHEN: the notification is removed
+ collectionListener.onEntryRemoved(entry, 0)
+ testScheduler.runCurrent()
+
+ // WHEN: the notification is re-posted
+ collectionListener.onEntryAdded(entry)
+ testScheduler.runCurrent()
+
+ // WHEN: one more second has passed
+ testScheduler.advanceTimeBy(1.seconds)
+ testScheduler.runCurrent()
+
+ // WHEN: the keyguard is no longer showing
+ keyguardRepository.setKeyguardShowing(false)
+ keyguardTransitionRepository.sendTransitionSteps(
+ from = KeyguardState.LOCKSCREEN,
+ to = KeyguardState.GONE,
+ this.testScheduler,
+ )
+ testScheduler.runCurrent()
+
+ // WHEN: Keyguard is shown again
+ keyguardRepository.setKeyguardShowing(true)
+ keyguardTransitionRepository.sendTransitionSteps(
+ from = KeyguardState.GONE,
+ to = KeyguardState.LOCKSCREEN,
+ this.testScheduler,
+ )
+ testScheduler.runCurrent()
+
+ // THEN: The notification is considered unseen and is not filtered out.
+ assertThat(unseenFilter.shouldFilterOut(entry, 0L)).isFalse()
+ }
+ }
+
+ @Test
+ fun unseenNotificationOnKeyguardNotMarkedAsSeenIfUpdatedBeforeThreshold() {
+ // GIVEN: Keyguard is showing, not dozing
+ keyguardRepository.setKeyguardShowing(true)
+ keyguardRepository.setIsDozing(false)
+ runKeyguardCoordinatorTest {
+ keyguardTransitionRepository.sendTransitionSteps(
+ from = KeyguardState.GONE,
+ to = KeyguardState.LOCKSCREEN,
+ this.testScheduler,
+ )
+ testScheduler.runCurrent()
+
+ // WHEN: a new notification is posted
+ val entry = NotificationEntryBuilder().setId(1).build()
+ collectionListener.onEntryAdded(entry)
+ testScheduler.runCurrent()
+
+ // WHEN: one second has passed
+ testScheduler.advanceTimeBy(1.seconds)
+ testScheduler.runCurrent()
+
+ // WHEN: the notification is updated
+ collectionListener.onEntryUpdated(entry)
+ testScheduler.runCurrent()
+
+ // WHEN: four more seconds have passed
+ testScheduler.advanceTimeBy(4.seconds)
+ testScheduler.runCurrent()
+
+ // WHEN: the keyguard is no longer showing
+ keyguardRepository.setKeyguardShowing(false)
+ keyguardTransitionRepository.sendTransitionSteps(
+ from = KeyguardState.LOCKSCREEN,
+ to = KeyguardState.GONE,
+ this.testScheduler,
+ )
+ testScheduler.runCurrent()
+
+ // WHEN: Keyguard is shown again
+ keyguardRepository.setKeyguardShowing(true)
+ keyguardTransitionRepository.sendTransitionSteps(
+ from = KeyguardState.GONE,
+ to = KeyguardState.LOCKSCREEN,
+ this.testScheduler,
+ )
+ testScheduler.runCurrent()
+
+ // THEN: The notification is considered unseen and is not filtered out.
+ assertThat(unseenFilter.shouldFilterOut(entry, 0L)).isFalse()
+ }
+ }
+
+ private fun runKeyguardCoordinatorTest(
+ testBlock: suspend KeyguardCoordinatorTestScope.() -> Unit
+ ) {
+ val testDispatcher = UnconfinedTestDispatcher()
+ val testScope = TestScope(testDispatcher)
+ val fakeSettings =
+ FakeSettings().apply {
+ putInt(Settings.Secure.LOCK_SCREEN_SHOW_ONLY_UNSEEN_NOTIFICATIONS, 1)
+ }
+ val seenNotificationsInteractor =
+ SeenNotificationsInteractor(ActiveNotificationListRepository())
+ val keyguardCoordinator =
+ OriginalUnseenKeyguardCoordinator(
+ testDispatcher,
+ mock<DumpManager>(),
+ headsUpManager,
+ keyguardRepository,
+ kosmos.keyguardTransitionInteractor,
+ KeyguardCoordinatorLogger(logcatLogBuffer()),
+ testScope.backgroundScope,
+ fakeSettings,
+ seenNotificationsInteractor,
+ statusBarStateController,
+ )
+ keyguardCoordinator.attach(notifPipeline)
+ testScope.runTest {
+ KeyguardCoordinatorTestScope(
+ keyguardCoordinator,
+ testScope,
+ seenNotificationsInteractor,
+ fakeSettings,
+ )
+ .testBlock()
+ }
+ }
+
+ private inner class KeyguardCoordinatorTestScope(
+ private val keyguardCoordinator: OriginalUnseenKeyguardCoordinator,
+ private val scope: TestScope,
+ val seenNotificationsInteractor: SeenNotificationsInteractor,
+ private val fakeSettings: FakeSettings,
+ ) : CoroutineScope by scope {
+ val testScheduler: TestCoroutineScheduler
+ get() = scope.testScheduler
+
+ val unseenFilter: NotifFilter
+ get() = keyguardCoordinator.unseenNotifFilter
+
+ val collectionListener: NotifCollectionListener =
+ argumentCaptor { verify(notifPipeline).addCollectionListener(capture()) }.lastValue
+
+ val onHeadsUpChangedListener: OnHeadsUpChangedListener
+ get() = argumentCaptor { verify(headsUpManager).addListener(capture()) }.lastValue
+
+ var showOnlyUnseenNotifsOnKeyguardSetting: Boolean
+ get() =
+ fakeSettings.getIntForUser(
+ Settings.Secure.LOCK_SCREEN_SHOW_ONLY_UNSEEN_NOTIFICATIONS,
+ UserHandle.USER_CURRENT,
+ ) == 1
+ set(value) {
+ fakeSettings.putIntForUser(
+ Settings.Secure.LOCK_SCREEN_SHOW_ONLY_UNSEEN_NOTIFICATIONS,
+ if (value) 1 else 2,
+ UserHandle.USER_CURRENT,
+ )
+ }
+ }
+
+ companion object {
+ @JvmStatic
+ @Parameters(name = "{0}")
+ fun getParams(): List<FlagsParameterization> {
+ return FlagsParameterization.allCombinationsOf().andSceneContainer()
+ }
+ }
+}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/collection/coordinator/VisualStabilityCoordinatorTest.java b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/collection/coordinator/VisualStabilityCoordinatorTest.java
index ce134e64bf57..75ecb2c5307c 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/collection/coordinator/VisualStabilityCoordinatorTest.java
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/collection/coordinator/VisualStabilityCoordinatorTest.java
@@ -41,8 +41,12 @@ import com.android.systemui.SysuiTestCase;
import com.android.systemui.communal.shared.model.CommunalScenes;
import com.android.systemui.dump.DumpManager;
import com.android.systemui.keyguard.WakefulnessLifecycle;
+import com.android.systemui.keyguard.shared.model.KeyguardState;
+import com.android.systemui.keyguard.shared.model.TransitionState;
+import com.android.systemui.keyguard.shared.model.TransitionStep;
import com.android.systemui.kosmos.KosmosJavaAdapter;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
+import com.android.systemui.scene.shared.flag.SceneContainerFlag;
import com.android.systemui.shade.data.repository.FakeShadeRepository;
import com.android.systemui.shade.data.repository.ShadeAnimationRepository;
import com.android.systemui.shade.data.repository.ShadeRepository;
@@ -91,6 +95,7 @@ public class VisualStabilityCoordinatorTest extends SysuiTestCase {
@Mock private HeadsUpManager mHeadsUpManager;
@Mock private VisibilityLocationProvider mVisibilityLocationProvider;
@Mock private VisualStabilityProvider mVisualStabilityProvider;
+ @Mock private VisualStabilityCoordinatorLogger mLogger;
@Captor private ArgumentCaptor<WakefulnessLifecycle.Observer> mWakefulnessObserverCaptor;
@Captor private ArgumentCaptor<StatusBarStateController.StateListener> mSBStateListenerCaptor;
@@ -128,7 +133,9 @@ public class VisualStabilityCoordinatorTest extends SysuiTestCase {
mVisibilityLocationProvider,
mVisualStabilityProvider,
mWakefulnessLifecycle,
- mKosmos.getCommunalInteractor());
+ mKosmos.getCommunalInteractor(),
+ mKosmos.getKeyguardTransitionInteractor(),
+ mLogger);
mCoordinator.attach(mNotifPipeline);
mTestScope.getTestScheduler().runCurrent();
@@ -241,6 +248,38 @@ public class VisualStabilityCoordinatorTest extends SysuiTestCase {
}
@Test
+ public void testLockscreenPartlyShowing_groupAndSectionChangesNotAllowed() {
+ // GIVEN the panel true expanded and device isn't pulsing
+ setFullyDozed(false);
+ setSleepy(false);
+ setLockscreenShowing(0.5f);
+ setPulsing(false);
+
+ // THEN group changes are NOT allowed
+ assertFalse(mNotifStabilityManager.isGroupChangeAllowed(mEntry));
+ assertFalse(mNotifStabilityManager.isGroupPruneAllowed(mGroupEntry));
+
+ // THEN section changes are NOT allowed
+ assertFalse(mNotifStabilityManager.isSectionChangeAllowed(mEntry));
+ }
+
+ @Test
+ public void testLockscreenFullyShowing_groupAndSectionChangesNotAllowed() {
+ // GIVEN the panel true expanded and device isn't pulsing
+ setFullyDozed(false);
+ setSleepy(false);
+ setLockscreenShowing(1.0f);
+ setPulsing(false);
+
+ // THEN group changes are NOT allowed
+ assertFalse(mNotifStabilityManager.isGroupChangeAllowed(mEntry));
+ assertFalse(mNotifStabilityManager.isGroupPruneAllowed(mGroupEntry));
+
+ // THEN section changes are NOT allowed
+ assertFalse(mNotifStabilityManager.isSectionChangeAllowed(mEntry));
+ }
+
+ @Test
public void testPulsing_screenOff_groupAndSectionChangesNotAllowed() {
// GIVEN the device is pulsing and screen is off
setFullyDozed(true);
@@ -614,7 +653,37 @@ public class VisualStabilityCoordinatorTest extends SysuiTestCase {
}
private void setPanelExpanded(boolean expanded) {
- mStatusBarStateListener.onExpandedChanged(expanded);
+ setPanelExpandedAndLockscreenShowing(expanded, /* lockscreenShowing = */ 0.0f);
}
+ private void setLockscreenShowing(float lockscreenShowing) {
+ setPanelExpandedAndLockscreenShowing(/* panelExpanded = */ false, lockscreenShowing);
+ }
+
+ private void setPanelExpandedAndLockscreenShowing(boolean panelExpanded,
+ float lockscreenShowing) {
+ if (SceneContainerFlag.isEnabled()) {
+ mStatusBarStateListener.onExpandedChanged(panelExpanded);
+ mKosmos.getKeyguardTransitionRepository().sendTransitionStepJava(
+ mTestScope,
+ makeLockscreenTransitionStep(lockscreenShowing),
+ /* validateStep = */ false);
+ } else {
+ mStatusBarStateListener.onExpandedChanged(panelExpanded || lockscreenShowing > 0.0f);
+ }
+ }
+
+ private TransitionStep makeLockscreenTransitionStep(float value) {
+ if (value <= 0.0f) {
+ return new TransitionStep(KeyguardState.GONE);
+ } else if (value >= 1.0f) {
+ return new TransitionStep(KeyguardState.LOCKSCREEN);
+ } else {
+ return new TransitionStep(
+ KeyguardState.GONE,
+ KeyguardState.LOCKSCREEN,
+ value,
+ TransitionState.RUNNING);
+ }
+ }
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/domain/interactor/HeadsUpNotificationInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/domain/interactor/HeadsUpNotificationInteractorTest.kt
index 8b4265f552fe..14134ccc34d0 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/domain/interactor/HeadsUpNotificationInteractorTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/domain/interactor/HeadsUpNotificationInteractorTest.kt
@@ -33,7 +33,6 @@ import com.android.systemui.statusbar.notification.data.repository.FakeHeadsUpRo
import com.android.systemui.statusbar.notification.data.repository.notificationsKeyguardViewStateRepository
import com.android.systemui.statusbar.notification.shared.NotificationsHeadsUpRefactor
import com.android.systemui.statusbar.notification.stack.data.repository.headsUpNotificationRepository
-import com.android.systemui.statusbar.notification.stack.data.repository.setNotifications
import com.android.systemui.statusbar.notification.stack.domain.interactor.headsUpNotificationInteractor
import com.android.systemui.testKosmos
import com.google.common.truth.Truth.assertThat
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/row/ui/viewmodel/TimerViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/row/ui/viewmodel/TimerViewModelTest.kt
index 5e87f4663d76..61873ad294e3 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/row/ui/viewmodel/TimerViewModelTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/row/ui/viewmodel/TimerViewModelTest.kt
@@ -18,6 +18,7 @@
package com.android.systemui.statusbar.notification.row.ui.viewmodel
+import android.app.Notification
import android.app.PendingIntent
import android.platform.test.annotations.EnableFlags
import androidx.test.ext.junit.runners.AndroidJUnit4
@@ -90,7 +91,8 @@ class TimerViewModelTest : SysuiTestCase() {
name: String = "example",
timeRemaining: Duration = Duration.ofMinutes(3),
resumeIntent: PendingIntent? = null,
- resetIntent: PendingIntent? = null
+ addMinuteAction: Notification.Action? = null,
+ resetAction: Notification.Action? = null
) =
TimerContentModel(
icon = icon,
@@ -99,7 +101,8 @@ class TimerViewModelTest : SysuiTestCase() {
Paused(
timeRemaining = timeRemaining,
resumeIntent = resumeIntent,
- resetIntent = resetIntent,
+ addMinuteAction = addMinuteAction,
+ resetAction = resetAction,
)
)
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/stack/domain/interactor/NotificationStackAppearanceInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/stack/domain/interactor/NotificationStackAppearanceInteractorTest.kt
index 50b77dcf9468..1356e93db549 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/stack/domain/interactor/NotificationStackAppearanceInteractorTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/stack/domain/interactor/NotificationStackAppearanceInteractorTest.kt
@@ -22,7 +22,6 @@ import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.kosmos.testScope
import com.android.systemui.shade.data.repository.shadeRepository
-import com.android.systemui.shade.shared.model.ShadeMode
import com.android.systemui.statusbar.notification.stack.shared.model.ShadeScrimBounds
import com.android.systemui.statusbar.notification.stack.shared.model.ShadeScrimRounding
import com.android.systemui.testKosmos
@@ -66,11 +65,11 @@ class NotificationStackAppearanceInteractorTest : SysuiTestCase() {
testScope.runTest {
val stackRounding by collectLastValue(underTest.shadeScrimRounding)
- kosmos.shadeRepository.setShadeMode(ShadeMode.Single)
+ kosmos.shadeRepository.setShadeLayoutWide(false)
assertThat(stackRounding)
.isEqualTo(ShadeScrimRounding(isTopRounded = true, isBottomRounded = false))
- kosmos.shadeRepository.setShadeMode(ShadeMode.Split)
+ kosmos.shadeRepository.setShadeLayoutWide(true)
assertThat(stackRounding)
.isEqualTo(ShadeScrimRounding(isTopRounded = true, isBottomRounded = true))
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationListViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationListViewModelTest.kt
index ba7ddce10958..f96cf1011fb8 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationListViewModelTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationListViewModelTest.kt
@@ -43,7 +43,6 @@ import com.android.systemui.statusbar.notification.data.repository.setActiveNoti
import com.android.systemui.statusbar.notification.footer.shared.FooterViewRefactor
import com.android.systemui.statusbar.notification.shared.NotificationsHeadsUpRefactor
import com.android.systemui.statusbar.notification.stack.data.repository.headsUpNotificationRepository
-import com.android.systemui.statusbar.notification.stack.data.repository.setNotifications
import com.android.systemui.statusbar.policy.data.repository.fakeUserSetupRepository
import com.android.systemui.statusbar.policy.data.repository.zenModeRepository
import com.android.systemui.statusbar.policy.fakeConfigurationController
@@ -633,7 +632,7 @@ class NotificationListViewModelTest(flags: FlagsParameterization) : SysuiTestCas
@Test
@EnableFlags(NotificationsHeadsUpRefactor.FLAG_NAME)
- fun headsUpAnimationsEnabled_keyguardShowing_false() =
+ fun headsUpAnimationsEnabled_keyguardShowing_true() =
testScope.runTest {
val animationsEnabled by collectLastValue(underTest.headsUpAnimationsEnabled)
@@ -641,6 +640,6 @@ class NotificationListViewModelTest(flags: FlagsParameterization) : SysuiTestCas
fakeKeyguardRepository.setStatusBarState(StatusBarState.KEYGUARD)
runCurrent()
- assertThat(animationsEnabled).isFalse()
+ assertThat(animationsEnabled).isTrue()
}
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModelTest.kt
index f14c96ded873..6f099310f9f7 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModelTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModelTest.kt
@@ -64,7 +64,6 @@ import com.android.systemui.statusbar.notification.NotificationUtils.interpolate
import com.android.systemui.statusbar.notification.stack.domain.interactor.sharedNotificationContainerInteractor
import com.android.systemui.testKosmos
import com.android.systemui.util.mockito.any
-import com.android.systemui.util.mockito.whenever
import com.google.common.collect.Range
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.ExperimentalCoroutinesApi
@@ -77,6 +76,7 @@ import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.Mockito.mock
+import org.mockito.kotlin.whenever
import platform.test.runner.parameterized.ParameterizedAndroidJunit4
import platform.test.runner.parameterized.Parameters
@@ -213,9 +213,11 @@ class SharedNotificationContainerViewModelTest(flags: FlagsParameterization) : S
}
@Test
- fun validatePaddingTop() =
+ fun validatePaddingTopInNonSplitShade_usesLargeScreenHeader() =
testScope.runTest {
+ whenever(largeScreenHeaderHelper.getLargeScreenHeaderHeight()).thenReturn(10)
overrideResource(R.bool.config_use_split_notification_shade, false)
+ overrideResource(R.bool.config_use_large_screen_shade_header, true)
overrideResource(R.dimen.large_screen_shade_header_height, 10)
overrideResource(R.dimen.keyguard_split_shade_top_margin, 50)
@@ -223,6 +225,21 @@ class SharedNotificationContainerViewModelTest(flags: FlagsParameterization) : S
configurationRepository.onAnyConfigurationChange()
+ assertThat(paddingTop).isEqualTo(10)
+ }
+
+ @Test
+ fun validatePaddingTopInNonSplitShade_doesNotUseLargeScreenHeader() =
+ testScope.runTest {
+ whenever(largeScreenHeaderHelper.getLargeScreenHeaderHeight()).thenReturn(10)
+ overrideResource(R.bool.config_use_split_notification_shade, false)
+ overrideResource(R.bool.config_use_large_screen_shade_header, false)
+ overrideResource(R.dimen.large_screen_shade_header_height, 10)
+ overrideResource(R.dimen.keyguard_split_shade_top_margin, 50)
+
+ val paddingTop by collectLastValue(underTest.paddingTopDimen)
+
+ configurationRepository.onAnyConfigurationChange()
assertThat(paddingTop).isEqualTo(0)
}
@@ -1079,7 +1096,8 @@ class SharedNotificationContainerViewModelTest(flags: FlagsParameterization) : S
)
)
runCurrent()
- assertThat(alpha).isEqualTo(0f)
+ // Resets to 1f after communal scene is hidden
+ assertThat(alpha).isEqualTo(1f)
}
@Test
@@ -1134,7 +1152,7 @@ class SharedNotificationContainerViewModelTest(flags: FlagsParameterization) : S
)
)
runCurrent()
- assertThat(alpha).isEqualTo(0f)
+ assertThat(alpha).isEqualTo(1f)
}
@Test
@@ -1191,7 +1209,8 @@ class SharedNotificationContainerViewModelTest(flags: FlagsParameterization) : S
)
)
runCurrent()
- assertThat(alpha).isEqualTo(0f)
+ // Resets to 1f after communal scene is hidden
+ assertThat(alpha).isEqualTo(1f)
}
@Test
@@ -1246,7 +1265,7 @@ class SharedNotificationContainerViewModelTest(flags: FlagsParameterization) : S
)
)
runCurrent()
- assertThat(alpha).isEqualTo(0f)
+ assertThat(alpha).isEqualTo(1f)
}
private suspend fun TestScope.showLockscreen() {
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/phone/ActivityStarterImplTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/phone/ActivityStarterImplTest.kt
index b643968c6322..c3c5a48dc197 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/phone/ActivityStarterImplTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/phone/ActivityStarterImplTest.kt
@@ -50,6 +50,7 @@ class ActivityStarterImplTest : SysuiTestCase() {
statusBarStateController = statusBarStateController,
mainExecutor = mainExecutor,
legacyActivityStarter = { legacyActivityStarterInternal },
+ activityStarterInternal = { activityStarterInternal },
)
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/phone/LegacyActivityStarterInternalImplTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/phone/LegacyActivityStarterInternalImplTest.kt
index ccd78ee82169..179799503ac0 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/phone/LegacyActivityStarterInternalImplTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/phone/LegacyActivityStarterInternalImplTest.kt
@@ -38,8 +38,11 @@ import com.android.systemui.animation.ActivityTransitionAnimator
import com.android.systemui.animation.LaunchableView
import com.android.systemui.assist.AssistManager
import com.android.systemui.communal.domain.interactor.CommunalSceneInteractor
+import com.android.systemui.communal.domain.interactor.CommunalSettingsInteractor
+import com.android.systemui.communal.domain.interactor.communalSettingsInteractor
import com.android.systemui.keyguard.KeyguardViewMediator
import com.android.systemui.keyguard.WakefulnessLifecycle
+import com.android.systemui.plugins.ActivityStarter.OnDismissAction
import com.android.systemui.settings.UserTracker
import com.android.systemui.shade.ShadeController
import com.android.systemui.shade.data.repository.FakeShadeRepository
@@ -100,6 +103,7 @@ class LegacyActivityStarterInternalImplTest : SysuiTestCase() {
@Mock private lateinit var userTracker: UserTracker
@Mock private lateinit var activityIntentHelper: ActivityIntentHelper
@Mock private lateinit var communalSceneInteractor: CommunalSceneInteractor
+ @Mock private lateinit var communalSettingsInteractor: CommunalSettingsInteractor
private lateinit var underTest: LegacyActivityStarterInternalImpl
private val mainExecutor = FakeExecutor(FakeSystemClock())
private val shadeAnimationInteractor =
@@ -134,9 +138,54 @@ class LegacyActivityStarterInternalImplTest : SysuiTestCase() {
activityIntentHelper = activityIntentHelper,
mainExecutor = mainExecutor,
communalSceneInteractor = communalSceneInteractor,
+ communalSettingsInteractor = communalSettingsInteractor,
)
`when`(userTracker.userHandle).thenReturn(UserHandle.OWNER)
+ `when`(communalSceneInteractor.isCommunalVisible).thenReturn(MutableStateFlow(false))
`when`(communalSceneInteractor.isIdleOnCommunal).thenReturn(MutableStateFlow(false))
+ `when`(communalSceneInteractor.isLaunchingWidget).thenReturn(MutableStateFlow(false))
+ }
+
+ @Test
+ fun startActivityDismissingKeyguard_dismissShadeWhenOccluded_runAfterKeyguardGone() {
+ val intent = mock(Intent::class.java)
+ `when`(keyguardStateController.isShowing).thenReturn(true)
+ `when`(keyguardStateController.isOccluded).thenReturn(true)
+ `when`(communalSceneInteractor.isCommunalVisible).thenReturn(MutableStateFlow(true))
+ `when`(communalSettingsInteractor.isCommunalFlagEnabled()).thenReturn(false)
+
+ underTest.startActivityDismissingKeyguard(intent, dismissShade = true)
+ mainExecutor.runAllReady()
+
+ val actionCaptor = argumentCaptor<OnDismissAction>()
+ verify(statusBarKeyguardViewManager)
+ .dismissWithAction(actionCaptor.capture(), any(), anyBoolean(), eq(null))
+ actionCaptor.firstValue.onDismiss()
+ mainExecutor.runAllReady()
+
+ verify(statusBarKeyguardViewManager).addAfterKeyguardGoneRunnable(any())
+ }
+
+ @Test
+ fun startActivityDismissingKeyguard_dismissShadeWhenOccluded_runImmediately() {
+ val intent = mock(Intent::class.java)
+ `when`(keyguardStateController.isShowing).thenReturn(true)
+ `when`(keyguardStateController.isOccluded).thenReturn(true)
+ `when`(communalSceneInteractor.isCommunalVisible).thenReturn(MutableStateFlow(true))
+ `when`(communalSettingsInteractor.isCommunalFlagEnabled()).thenReturn(true)
+
+ underTest.startActivityDismissingKeyguard(intent, dismissShade = true)
+ mainExecutor.runAllReady()
+
+ val actionCaptor = argumentCaptor<OnDismissAction>()
+ verify(statusBarKeyguardViewManager)
+ .dismissWithAction(actionCaptor.capture(), any(), anyBoolean(), eq(null))
+ actionCaptor.firstValue.onDismiss()
+ mainExecutor.runAllReady()
+
+ verify(statusBarKeyguardViewManager, never()).addAfterKeyguardGoneRunnable(any())
+ verify(activityTransitionAnimator)
+ .startIntentWithAnimation(eq(null), eq(false), eq(null), eq(false), any())
}
@Test
@@ -224,7 +273,6 @@ class LegacyActivityStarterInternalImplTest : SysuiTestCase() {
// extra activity options to set on pending intent
val activityOptions = mock(ActivityOptions::class.java)
activityOptions.splashScreenStyle = SPLASH_SCREEN_STYLE_SOLID_COLOR
- activityOptions.isPendingIntentBackgroundActivityLaunchAllowedByPermission = false
val bundleCaptor = argumentCaptor<Bundle>()
startPendingIntentMaybeDismissingKeyguard(
@@ -248,7 +296,8 @@ class LegacyActivityStarterInternalImplTest : SysuiTestCase() {
bundleCaptor.capture()
)
val options = ActivityOptions.fromBundle(bundleCaptor.firstValue)
- assertThat(options.isPendingIntentBackgroundActivityLaunchAllowedByPermission).isFalse()
+ assertThat(options.getPendingIntentBackgroundActivityStartMode())
+ .isEqualTo(ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS)
assertThat(options.splashScreenStyle).isEqualTo(SPLASH_SCREEN_STYLE_SOLID_COLOR)
}
@@ -336,6 +385,101 @@ class LegacyActivityStarterInternalImplTest : SysuiTestCase() {
}
@Test
+ fun startPendingIntentDismissingKeyguard_transitionAnimator_animateCommunal() {
+ val parent = FrameLayout(context)
+ val view =
+ object : View(context), LaunchableView {
+ override fun setShouldBlockVisibilityChanges(block: Boolean) {}
+ }
+ parent.addView(view)
+ val controller = ActivityTransitionAnimator.Controller.fromView(view)
+ val pendingIntent = mock(PendingIntent::class.java)
+ `when`(pendingIntent.isActivity).thenReturn(true)
+ `when`(keyguardStateController.isShowing).thenReturn(true)
+ `when`(keyguardStateController.isOccluded).thenReturn(true)
+ `when`(communalSettingsInteractor.isCommunalFlagEnabled()).thenReturn(true)
+ `when`(communalSceneInteractor.isCommunalVisible).thenReturn(MutableStateFlow(true))
+ `when`(communalSceneInteractor.isLaunchingWidget).thenReturn(MutableStateFlow(true))
+ `when`(activityIntentHelper.wouldPendingLaunchResolverActivity(eq(pendingIntent), anyInt()))
+ .thenReturn(false)
+ `when`(activityIntentHelper.wouldPendingShowOverLockscreen(eq(pendingIntent), anyInt()))
+ .thenReturn(false)
+
+ underTest.startPendingIntentDismissingKeyguard(
+ intent = pendingIntent,
+ dismissShade = false,
+ animationController = controller,
+ showOverLockscreen = true,
+ skipLockscreenChecks = false
+ )
+ mainExecutor.runAllReady()
+
+ val actionCaptor = argumentCaptor<OnDismissAction>()
+ verify(statusBarKeyguardViewManager)
+ .dismissWithAction(actionCaptor.capture(), eq(null), anyBoolean(), eq(null))
+ actionCaptor.firstValue.onDismiss()
+ mainExecutor.runAllReady()
+
+ verify(activityTransitionAnimator)
+ .startPendingIntentWithAnimation(
+ nullable(ActivityTransitionAnimator.Controller::class.java),
+ eq(true),
+ nullable(String::class.java),
+ eq(false),
+ any(),
+ )
+ }
+
+ @Test
+ fun startPendingIntentDismissingKeyguard_transitionAnimator_doNotAnimateCommunal() {
+ val parent = FrameLayout(context)
+ val view =
+ object : View(context), LaunchableView {
+ override fun setShouldBlockVisibilityChanges(block: Boolean) {}
+ }
+ parent.addView(view)
+ val controller = ActivityTransitionAnimator.Controller.fromView(view)
+ val pendingIntent = mock(PendingIntent::class.java)
+ `when`(pendingIntent.isActivity).thenReturn(true)
+ `when`(keyguardStateController.isShowing).thenReturn(true)
+ `when`(keyguardStateController.isOccluded).thenReturn(true)
+ `when`(communalSceneInteractor.isCommunalVisible).thenReturn(MutableStateFlow(true))
+ `when`(communalSceneInteractor.isLaunchingWidget).thenReturn(MutableStateFlow(true))
+ `when`(activityIntentHelper.wouldPendingLaunchResolverActivity(eq(pendingIntent), anyInt()))
+ .thenReturn(false)
+ `when`(activityIntentHelper.wouldPendingShowOverLockscreen(eq(pendingIntent), anyInt()))
+ .thenReturn(false)
+
+ underTest.startPendingIntentDismissingKeyguard(
+ intent = pendingIntent,
+ dismissShade = false,
+ animationController = controller,
+ showOverLockscreen = true,
+ skipLockscreenChecks = false
+ )
+ mainExecutor.runAllReady()
+
+ val actionCaptor = argumentCaptor<OnDismissAction>()
+ verify(statusBarKeyguardViewManager)
+ .dismissWithAction(actionCaptor.capture(), eq(null), anyBoolean(), eq(null))
+ actionCaptor.firstValue.onDismiss()
+ mainExecutor.runAllReady()
+
+ val runnableCaptor = argumentCaptor<Runnable>()
+ verify(statusBarKeyguardViewManager).addAfterKeyguardGoneRunnable(runnableCaptor.capture())
+ runnableCaptor.firstValue.run()
+
+ verify(activityTransitionAnimator)
+ .startPendingIntentWithAnimation(
+ nullable(ActivityTransitionAnimator.Controller::class.java),
+ eq(false),
+ nullable(String::class.java),
+ eq(false),
+ any(),
+ )
+ }
+
+ @Test
fun startActivity_noUserHandleProvided_getUserHandle() {
val intent = mock(Intent::class.java)
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/policy/AvalancheControllerTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/policy/AvalancheControllerTest.kt
index 495ab61600f9..8f9da3b2e1e3 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/policy/AvalancheControllerTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/policy/AvalancheControllerTest.kt
@@ -180,6 +180,23 @@ class AvalancheControllerTest : SysuiTestCase() {
}
@Test
+ fun testDelete_untracked_runnableRuns() {
+ val headsUpEntry = createHeadsUpEntry(id = 0)
+
+ // None showing
+ mAvalancheController.headsUpEntryShowing = null
+
+ // Nothing is next
+ mAvalancheController.clearNext()
+
+ // Delete
+ mAvalancheController.delete(headsUpEntry, runnableMock!!, "testLabel")
+
+ // Runnable was run
+ Mockito.verify(runnableMock, Mockito.times(1)).run()
+ }
+
+ @Test
fun testDelete_isNext_removedFromNext_runnableNotRun() {
// Entry is next
val headsUpEntry = createHeadsUpEntry(id = 0)
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/policy/HeadsUpManagerPhoneTest.java b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/policy/HeadsUpManagerPhoneTest.java
deleted file mode 100644
index 3d3438eab109..000000000000
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/policy/HeadsUpManagerPhoneTest.java
+++ /dev/null
@@ -1,243 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.systemui.statusbar.policy;
-
-import static com.android.systemui.log.LogBufferHelperKt.logcatLogBuffer;
-import static com.android.systemui.util.concurrency.MockExecutorHandlerKt.mockExecutorHandler;
-
-import static junit.framework.Assert.assertFalse;
-import static junit.framework.Assert.assertTrue;
-
-import static org.mockito.ArgumentMatchers.anyInt;
-import static org.mockito.Mockito.when;
-
-import android.content.Context;
-import android.os.Handler;
-import android.platform.test.flag.junit.FlagsParameterization;
-import android.testing.TestableLooper;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.internal.logging.UiEventLogger;
-import com.android.systemui.dump.DumpManager;
-import com.android.systemui.plugins.statusbar.StatusBarStateController;
-import com.android.systemui.res.R;
-import com.android.systemui.shade.domain.interactor.ShadeInteractor;
-import com.android.systemui.statusbar.NotificationShadeWindowController;
-import com.android.systemui.statusbar.notification.collection.NotificationEntry;
-import com.android.systemui.statusbar.notification.collection.provider.VisualStabilityProvider;
-import com.android.systemui.statusbar.notification.collection.render.GroupMembershipManager;
-import com.android.systemui.statusbar.notification.shared.NotificationThrottleHun;
-import com.android.systemui.statusbar.phone.ConfigurationControllerImpl;
-import com.android.systemui.statusbar.phone.HeadsUpManagerPhone;
-import com.android.systemui.statusbar.phone.KeyguardBypassController;
-import com.android.systemui.util.concurrency.DelayableExecutor;
-import com.android.systemui.util.kotlin.JavaAdapter;
-import com.android.systemui.util.settings.GlobalSettings;
-import com.android.systemui.util.time.SystemClock;
-
-import kotlinx.coroutines.flow.StateFlowKt;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.junit.MockitoJUnit;
-import org.mockito.junit.MockitoRule;
-
-import platform.test.runner.parameterized.ParameterizedAndroidJunit4;
-import platform.test.runner.parameterized.Parameters;
-
-import java.util.List;
-
-@SmallTest
-@RunWith(ParameterizedAndroidJunit4.class)
-@TestableLooper.RunWithLooper
-public class HeadsUpManagerPhoneTest extends BaseHeadsUpManagerTest {
- @Rule public MockitoRule rule = MockitoJUnit.rule();
-
- private final HeadsUpManagerLogger mHeadsUpManagerLogger = new HeadsUpManagerLogger(
- logcatLogBuffer());
- @Mock private GroupMembershipManager mGroupManager;
- @Mock private VisualStabilityProvider mVSProvider;
- @Mock private StatusBarStateController mStatusBarStateController;
- @Mock private KeyguardBypassController mBypassController;
- @Mock private ConfigurationControllerImpl mConfigurationController;
- @Mock private AccessibilityManagerWrapper mAccessibilityManagerWrapper;
- @Mock private UiEventLogger mUiEventLogger;
- @Mock private JavaAdapter mJavaAdapter;
- @Mock private ShadeInteractor mShadeInteractor;
- @Mock private DumpManager dumpManager;
- private AvalancheController mAvalancheController;
-
- @Mock private Handler mBgHandler;
-
- private static final class TestableHeadsUpManagerPhone extends HeadsUpManagerPhone {
- TestableHeadsUpManagerPhone(
- Context context,
- HeadsUpManagerLogger headsUpManagerLogger,
- GroupMembershipManager groupManager,
- VisualStabilityProvider visualStabilityProvider,
- StatusBarStateController statusBarStateController,
- KeyguardBypassController keyguardBypassController,
- ConfigurationController configurationController,
- GlobalSettings globalSettings,
- SystemClock systemClock,
- DelayableExecutor executor,
- AccessibilityManagerWrapper accessibilityManagerWrapper,
- UiEventLogger uiEventLogger,
- JavaAdapter javaAdapter,
- ShadeInteractor shadeInteractor,
- AvalancheController avalancheController
- ) {
- super(
- context,
- headsUpManagerLogger,
- statusBarStateController,
- keyguardBypassController,
- groupManager,
- visualStabilityProvider,
- configurationController,
- mockExecutorHandler(executor),
- globalSettings,
- systemClock,
- executor,
- accessibilityManagerWrapper,
- uiEventLogger,
- javaAdapter,
- shadeInteractor,
- avalancheController
- );
- mMinimumDisplayTime = TEST_MINIMUM_DISPLAY_TIME;
- mAutoDismissTime = TEST_AUTO_DISMISS_TIME;
- }
- }
-
- private HeadsUpManagerPhone createHeadsUpManagerPhone() {
- return new TestableHeadsUpManagerPhone(
- mContext,
- mHeadsUpManagerLogger,
- mGroupManager,
- mVSProvider,
- mStatusBarStateController,
- mBypassController,
- mConfigurationController,
- mGlobalSettings,
- mSystemClock,
- mExecutor,
- mAccessibilityManagerWrapper,
- mUiEventLogger,
- mJavaAdapter,
- mShadeInteractor,
- mAvalancheController
- );
- }
-
- @Parameters(name = "{0}")
- public static List<FlagsParameterization> getFlags() {
- return FlagsParameterization.allCombinationsOf(NotificationThrottleHun.FLAG_NAME);
- }
-
- public HeadsUpManagerPhoneTest(FlagsParameterization flags) {
- super(flags);
- }
-
- @Before
- public void setUp() {
- when(mShadeInteractor.isAnyExpanded()).thenReturn(StateFlowKt.MutableStateFlow(false));
- final AccessibilityManagerWrapper accessibilityMgr =
- mDependency.injectMockDependency(AccessibilityManagerWrapper.class);
- when(accessibilityMgr.getRecommendedTimeoutMillis(anyInt(), anyInt()))
- .thenReturn(TEST_AUTO_DISMISS_TIME);
- when(mVSProvider.isReorderingAllowed()).thenReturn(true);
- mDependency.injectMockDependency(NotificationShadeWindowController.class);
- mContext.getOrCreateTestableResources().addOverride(
- R.integer.ambient_notification_extension_time, 500);
-
- mAvalancheController = new AvalancheController(dumpManager, mUiEventLogger, mBgHandler);
- }
-
- @Test
- public void testSnooze() {
- final HeadsUpManager hmp = createHeadsUpManagerPhone();
- final NotificationEntry entry = HeadsUpManagerTestUtil.createEntry(/* id = */ 0, mContext);
-
- hmp.showNotification(entry);
- hmp.snooze();
-
- assertTrue(hmp.isSnoozed(entry.getSbn().getPackageName()));
- }
-
- @Test
- public void testSwipedOutNotification() {
- final HeadsUpManager hmp = createHeadsUpManagerPhone();
- final NotificationEntry entry = HeadsUpManagerTestUtil.createEntry(/* id = */ 0, mContext);
-
- hmp.showNotification(entry);
- hmp.addSwipedOutNotification(entry.getKey());
-
- // Remove should succeed because the notification is swiped out
- final boolean removedImmediately = hmp.removeNotification(entry.getKey(),
- /* releaseImmediately = */ false);
-
- assertTrue(removedImmediately);
- assertFalse(hmp.isHeadsUpEntry(entry.getKey()));
- }
-
- @Test
- public void testCanRemoveImmediately_swipedOut() {
- final HeadsUpManager hmp = createHeadsUpManagerPhone();
- final NotificationEntry entry = HeadsUpManagerTestUtil.createEntry(/* id = */ 0, mContext);
-
- hmp.showNotification(entry);
- hmp.addSwipedOutNotification(entry.getKey());
-
- // Notification is swiped so it can be immediately removed.
- assertTrue(hmp.canRemoveImmediately(entry.getKey()));
- }
-
- @Ignore("b/141538055")
- @Test
- public void testCanRemoveImmediately_notTopEntry() {
- final HeadsUpManager hmp = createHeadsUpManagerPhone();
- final NotificationEntry earlierEntry =
- HeadsUpManagerTestUtil.createEntry(/* id = */ 0, mContext);
- final NotificationEntry laterEntry =
- HeadsUpManagerTestUtil.createEntry(/* id = */ 1, mContext);
- laterEntry.setRow(mRow);
-
- hmp.showNotification(earlierEntry);
- hmp.showNotification(laterEntry);
-
- // Notification is "behind" a higher priority notification so we can remove it immediately.
- assertTrue(hmp.canRemoveImmediately(earlierEntry.getKey()));
- }
-
- @Test
- public void testExtendHeadsUp() {
- final HeadsUpManagerPhone hmp = createHeadsUpManagerPhone();
- final NotificationEntry entry = HeadsUpManagerTestUtil.createEntry(/* id = */ 0, mContext);
-
- hmp.showNotification(entry);
- hmp.extendHeadsUp();
- mSystemClock.advanceTime(TEST_AUTO_DISMISS_TIME + hmp.mExtensionTime / 2);
-
- assertTrue(hmp.isHeadsUpEntry(entry.getKey()));
- }
-}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/policy/HeadsUpManagerPhoneTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/policy/HeadsUpManagerPhoneTest.kt
new file mode 100644
index 000000000000..b91bde4fb417
--- /dev/null
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/policy/HeadsUpManagerPhoneTest.kt
@@ -0,0 +1,472 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.systemui.statusbar.policy
+
+import android.content.Context
+import android.os.Handler
+import android.platform.test.annotations.EnableFlags
+import android.platform.test.flag.junit.FlagsParameterization
+import android.testing.TestableLooper.RunWithLooper
+import androidx.test.filters.SmallTest
+import com.android.internal.logging.UiEventLogger
+import com.android.systemui.dump.DumpManager
+import com.android.systemui.kosmos.testScope
+import com.android.systemui.log.logcatLogBuffer
+import com.android.systemui.plugins.statusbar.StatusBarStateController
+import com.android.systemui.res.R
+import com.android.systemui.shade.domain.interactor.ShadeInteractor
+import com.android.systemui.statusbar.FakeStatusBarStateController
+import com.android.systemui.statusbar.NotificationShadeWindowController
+import com.android.systemui.statusbar.StatusBarState
+import com.android.systemui.statusbar.notification.collection.NotificationEntry
+import com.android.systemui.statusbar.notification.collection.provider.VisualStabilityProvider
+import com.android.systemui.statusbar.notification.collection.render.GroupMembershipManager
+import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow
+import com.android.systemui.statusbar.notification.shared.NotificationThrottleHun
+import com.android.systemui.statusbar.notification.shared.NotificationsHeadsUpRefactor
+import com.android.systemui.statusbar.phone.ConfigurationControllerImpl
+import com.android.systemui.statusbar.phone.HeadsUpManagerPhone
+import com.android.systemui.statusbar.phone.KeyguardBypassController
+import com.android.systemui.testKosmos
+import com.android.systemui.util.concurrency.DelayableExecutor
+import com.android.systemui.util.concurrency.mockExecutorHandler
+import com.android.systemui.util.kotlin.JavaAdapter
+import com.android.systemui.util.mockito.mock
+import com.android.systemui.util.settings.GlobalSettings
+import com.android.systemui.util.time.SystemClock
+import junit.framework.Assert
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.flow.MutableStateFlow
+import kotlinx.coroutines.test.runCurrent
+import kotlinx.coroutines.test.runTest
+import org.junit.Before
+import org.junit.Ignore
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.ArgumentMatchers
+import org.mockito.Mock
+import org.mockito.kotlin.whenever
+import platform.test.runner.parameterized.ParameterizedAndroidJunit4
+import platform.test.runner.parameterized.Parameters
+
+@OptIn(ExperimentalCoroutinesApi::class)
+@SmallTest
+@RunWith(ParameterizedAndroidJunit4::class)
+@RunWithLooper
+class HeadsUpManagerPhoneTest(flags: FlagsParameterization) : BaseHeadsUpManagerTest(flags) {
+
+ private val mHeadsUpManagerLogger = HeadsUpManagerLogger(logcatLogBuffer())
+
+ private val kosmos = testKosmos()
+ private val testScope = kosmos.testScope
+
+ @Mock private lateinit var mGroupManager: GroupMembershipManager
+
+ @Mock private lateinit var mVSProvider: VisualStabilityProvider
+
+ @Mock private lateinit var mStatusBarStateController: StatusBarStateController
+
+ @Mock private lateinit var mBypassController: KeyguardBypassController
+
+ @Mock private lateinit var mConfigurationController: ConfigurationControllerImpl
+
+ @Mock private lateinit var mAccessibilityManagerWrapper: AccessibilityManagerWrapper
+
+ @Mock private lateinit var mUiEventLogger: UiEventLogger
+
+ private val mJavaAdapter: JavaAdapter = JavaAdapter(testScope.backgroundScope)
+
+ @Mock private lateinit var mShadeInteractor: ShadeInteractor
+
+ @Mock private lateinit var dumpManager: DumpManager
+ private lateinit var mAvalancheController: AvalancheController
+
+ @Mock private lateinit var mBgHandler: Handler
+
+ private class TestableHeadsUpManagerPhone(
+ context: Context,
+ headsUpManagerLogger: HeadsUpManagerLogger,
+ groupManager: GroupMembershipManager,
+ visualStabilityProvider: VisualStabilityProvider,
+ statusBarStateController: StatusBarStateController,
+ keyguardBypassController: KeyguardBypassController,
+ configurationController: ConfigurationController,
+ globalSettings: GlobalSettings,
+ systemClock: SystemClock,
+ executor: DelayableExecutor,
+ accessibilityManagerWrapper: AccessibilityManagerWrapper,
+ uiEventLogger: UiEventLogger,
+ javaAdapter: JavaAdapter,
+ shadeInteractor: ShadeInteractor,
+ avalancheController: AvalancheController
+ ) :
+ HeadsUpManagerPhone(
+ context,
+ headsUpManagerLogger,
+ statusBarStateController,
+ keyguardBypassController,
+ groupManager,
+ visualStabilityProvider,
+ configurationController,
+ mockExecutorHandler(executor),
+ globalSettings,
+ systemClock,
+ executor,
+ accessibilityManagerWrapper,
+ uiEventLogger,
+ javaAdapter,
+ shadeInteractor,
+ avalancheController
+ ) {
+ init {
+ mMinimumDisplayTime = TEST_MINIMUM_DISPLAY_TIME
+ mAutoDismissTime = TEST_AUTO_DISMISS_TIME
+ }
+
+ /** Wrapper for [BaseHeadsUpManager.shouldHeadsUpBecomePinned] for testing */
+ fun shouldHeadsUpBecomePinnedWrapper(entry: NotificationEntry): Boolean {
+ return shouldHeadsUpBecomePinned(entry)
+ }
+ }
+
+ private fun createHeadsUpManagerPhone(): HeadsUpManagerPhone {
+ return TestableHeadsUpManagerPhone(
+ mContext,
+ mHeadsUpManagerLogger,
+ mGroupManager,
+ mVSProvider,
+ mStatusBarStateController,
+ mBypassController,
+ mConfigurationController,
+ mGlobalSettings,
+ mSystemClock,
+ mExecutor,
+ mAccessibilityManagerWrapper,
+ mUiEventLogger,
+ mJavaAdapter,
+ mShadeInteractor,
+ mAvalancheController
+ )
+ }
+
+ @Before
+ fun setUp() {
+ whenever(mShadeInteractor.isAnyExpanded).thenReturn(MutableStateFlow(false))
+ whenever(mVSProvider.isReorderingAllowed).thenReturn(true)
+ val accessibilityMgr =
+ mDependency.injectMockDependency(AccessibilityManagerWrapper::class.java)
+ whenever(
+ accessibilityMgr.getRecommendedTimeoutMillis(
+ ArgumentMatchers.anyInt(),
+ ArgumentMatchers.anyInt()
+ )
+ )
+ .thenReturn(TEST_AUTO_DISMISS_TIME)
+ mDependency.injectMockDependency(NotificationShadeWindowController::class.java)
+ mContext
+ .getOrCreateTestableResources()
+ .addOverride(R.integer.ambient_notification_extension_time, 500)
+ mAvalancheController = AvalancheController(dumpManager, mUiEventLogger, mBgHandler)
+ }
+
+ @Test
+ fun testSnooze() {
+ val hmp: HeadsUpManager = createHeadsUpManagerPhone()
+ val entry = HeadsUpManagerTestUtil.createEntry(/* id= */ 0, mContext)
+ hmp.showNotification(entry)
+ hmp.snooze()
+ Assert.assertTrue(hmp.isSnoozed(entry.sbn.packageName))
+ }
+
+ @Test
+ fun testSwipedOutNotification() {
+ val hmp: HeadsUpManager = createHeadsUpManagerPhone()
+ val entry = HeadsUpManagerTestUtil.createEntry(/* id= */ 0, mContext)
+ hmp.showNotification(entry)
+ hmp.addSwipedOutNotification(entry.key)
+
+ // Remove should succeed because the notification is swiped out
+ val removedImmediately = hmp.removeNotification(entry.key, /* releaseImmediately= */ false)
+ Assert.assertTrue(removedImmediately)
+ Assert.assertFalse(hmp.isHeadsUpEntry(entry.key))
+ }
+
+ @Test
+ fun testCanRemoveImmediately_swipedOut() {
+ val hmp: HeadsUpManager = createHeadsUpManagerPhone()
+ val entry = HeadsUpManagerTestUtil.createEntry(/* id= */ 0, mContext)
+ hmp.showNotification(entry)
+ hmp.addSwipedOutNotification(entry.key)
+
+ // Notification is swiped so it can be immediately removed.
+ Assert.assertTrue(hmp.canRemoveImmediately(entry.key))
+ }
+
+ @Ignore("b/141538055")
+ @Test
+ fun testCanRemoveImmediately_notTopEntry() {
+ val hmp: HeadsUpManager = createHeadsUpManagerPhone()
+ val earlierEntry = HeadsUpManagerTestUtil.createEntry(/* id= */ 0, mContext)
+ val laterEntry = HeadsUpManagerTestUtil.createEntry(/* id= */ 1, mContext)
+ laterEntry.row = mRow
+ hmp.showNotification(earlierEntry)
+ hmp.showNotification(laterEntry)
+
+ // Notification is "behind" a higher priority notification so we can remove it immediately.
+ Assert.assertTrue(hmp.canRemoveImmediately(earlierEntry.key))
+ }
+
+ @Test
+ fun testExtendHeadsUp() {
+ val hmp = createHeadsUpManagerPhone()
+ val entry = HeadsUpManagerTestUtil.createEntry(/* id= */ 0, mContext)
+ hmp.showNotification(entry)
+ hmp.extendHeadsUp()
+ mSystemClock.advanceTime((TEST_AUTO_DISMISS_TIME + hmp.mExtensionTime / 2).toLong())
+ Assert.assertTrue(hmp.isHeadsUpEntry(entry.key))
+ }
+
+ @Test
+ @EnableFlags(NotificationThrottleHun.FLAG_NAME)
+ fun testShowNotification_reorderNotAllowed_notPulsing_seenInShadeTrue() {
+ whenever(mVSProvider.isReorderingAllowed).thenReturn(false)
+ val hmp = createHeadsUpManagerPhone()
+
+ val notifEntry = HeadsUpManagerTestUtil.createEntry(/* id= */ 0, mContext)
+ val row = mock<ExpandableNotificationRow>()
+ whenever(row.showingPulsing()).thenReturn(false)
+ notifEntry.row = row
+
+ hmp.showNotification(notifEntry)
+ Assert.assertTrue(notifEntry.isSeenInShade)
+ }
+
+ @Test
+ @EnableFlags(NotificationThrottleHun.FLAG_NAME)
+ fun testShowNotification_reorderAllowed_notPulsing_seenInShadeFalse() {
+ whenever(mVSProvider.isReorderingAllowed).thenReturn(true)
+ val hmp = createHeadsUpManagerPhone()
+
+ val notifEntry = HeadsUpManagerTestUtil.createEntry(/* id= */ 0, mContext)
+ val row = mock<ExpandableNotificationRow>()
+ whenever(row.showingPulsing()).thenReturn(false)
+ notifEntry.row = row
+
+ hmp.showNotification(notifEntry)
+ Assert.assertFalse(notifEntry.isSeenInShade)
+ }
+
+ @Test
+ fun shouldHeadsUpBecomePinned_shadeNotExpanded_true() =
+ testScope.runTest {
+ // GIVEN
+ val statusBarStateController = FakeStatusBarStateController()
+ whenever(mShadeInteractor.isAnyFullyExpanded).thenReturn(MutableStateFlow(false))
+ val hmp =
+ TestableHeadsUpManagerPhone(
+ mContext,
+ mHeadsUpManagerLogger,
+ mGroupManager,
+ mVSProvider,
+ statusBarStateController,
+ mBypassController,
+ mConfigurationController,
+ mGlobalSettings,
+ mSystemClock,
+ mExecutor,
+ mAccessibilityManagerWrapper,
+ mUiEventLogger,
+ mJavaAdapter,
+ mShadeInteractor,
+ mAvalancheController
+ )
+ val entry = HeadsUpManagerTestUtil.createEntry(/* id= */ 0, mContext)
+ statusBarStateController.setState(StatusBarState.SHADE)
+ runCurrent()
+
+ // THEN
+ Assert.assertTrue(hmp.shouldHeadsUpBecomePinnedWrapper(entry))
+ }
+
+ @Test
+ fun shouldHeadsUpBecomePinned_shadeLocked_false() =
+ testScope.runTest {
+ // GIVEN
+ val statusBarStateController = FakeStatusBarStateController()
+ val hmp =
+ TestableHeadsUpManagerPhone(
+ mContext,
+ mHeadsUpManagerLogger,
+ mGroupManager,
+ mVSProvider,
+ statusBarStateController,
+ mBypassController,
+ mConfigurationController,
+ mGlobalSettings,
+ mSystemClock,
+ mExecutor,
+ mAccessibilityManagerWrapper,
+ mUiEventLogger,
+ mJavaAdapter,
+ mShadeInteractor,
+ mAvalancheController
+ )
+ val entry = HeadsUpManagerTestUtil.createEntry(/* id= */ 0, mContext)
+ statusBarStateController.setState(StatusBarState.SHADE_LOCKED)
+ runCurrent()
+
+ // THEN
+ Assert.assertFalse(hmp.shouldHeadsUpBecomePinnedWrapper(entry))
+ }
+
+ @Test
+ fun shouldHeadsUpBecomePinned_shadeUnknown_false() =
+ testScope.runTest {
+ // GIVEN
+ val statusBarStateController = FakeStatusBarStateController()
+ val hmp =
+ TestableHeadsUpManagerPhone(
+ mContext,
+ mHeadsUpManagerLogger,
+ mGroupManager,
+ mVSProvider,
+ statusBarStateController,
+ mBypassController,
+ mConfigurationController,
+ mGlobalSettings,
+ mSystemClock,
+ mExecutor,
+ mAccessibilityManagerWrapper,
+ mUiEventLogger,
+ mJavaAdapter,
+ mShadeInteractor,
+ mAvalancheController
+ )
+ val entry = HeadsUpManagerTestUtil.createEntry(/* id= */ 0, mContext)
+ statusBarStateController.setState(1207)
+ runCurrent()
+
+ // THEN
+ Assert.assertFalse(hmp.shouldHeadsUpBecomePinnedWrapper(entry))
+ }
+
+ @Test
+ fun shouldHeadsUpBecomePinned_keyguardWithBypassOn_true() =
+ testScope.runTest {
+ // GIVEN
+ val statusBarStateController = FakeStatusBarStateController()
+ whenever(mBypassController.bypassEnabled).thenReturn(true)
+ val hmp =
+ TestableHeadsUpManagerPhone(
+ mContext,
+ mHeadsUpManagerLogger,
+ mGroupManager,
+ mVSProvider,
+ statusBarStateController,
+ mBypassController,
+ mConfigurationController,
+ mGlobalSettings,
+ mSystemClock,
+ mExecutor,
+ mAccessibilityManagerWrapper,
+ mUiEventLogger,
+ mJavaAdapter,
+ mShadeInteractor,
+ mAvalancheController
+ )
+ val entry = HeadsUpManagerTestUtil.createEntry(/* id= */ 0, mContext)
+ statusBarStateController.setState(StatusBarState.KEYGUARD)
+ runCurrent()
+
+ // THEN
+ Assert.assertTrue(hmp.shouldHeadsUpBecomePinnedWrapper(entry))
+ }
+
+ @Test
+ fun shouldHeadsUpBecomePinned_keyguardWithBypassOff_false() =
+ testScope.runTest {
+ // GIVEN
+ val statusBarStateController = FakeStatusBarStateController()
+ whenever(mBypassController.bypassEnabled).thenReturn(false)
+ val hmp =
+ TestableHeadsUpManagerPhone(
+ mContext,
+ mHeadsUpManagerLogger,
+ mGroupManager,
+ mVSProvider,
+ statusBarStateController,
+ mBypassController,
+ mConfigurationController,
+ mGlobalSettings,
+ mSystemClock,
+ mExecutor,
+ mAccessibilityManagerWrapper,
+ mUiEventLogger,
+ mJavaAdapter,
+ mShadeInteractor,
+ mAvalancheController
+ )
+ val entry = HeadsUpManagerTestUtil.createEntry(/* id= */ 0, mContext)
+ statusBarStateController.setState(StatusBarState.KEYGUARD)
+ runCurrent()
+
+ // THEN
+ Assert.assertFalse(hmp.shouldHeadsUpBecomePinnedWrapper(entry))
+ }
+
+ @Test
+ fun shouldHeadsUpBecomePinned_shadeExpanded_false() =
+ testScope.runTest {
+ // GIVEN
+ val statusBarStateController = FakeStatusBarStateController()
+ whenever(mShadeInteractor.isAnyExpanded).thenReturn(MutableStateFlow(true))
+ val hmp =
+ TestableHeadsUpManagerPhone(
+ mContext,
+ mHeadsUpManagerLogger,
+ mGroupManager,
+ mVSProvider,
+ statusBarStateController,
+ mBypassController,
+ mConfigurationController,
+ mGlobalSettings,
+ mSystemClock,
+ mExecutor,
+ mAccessibilityManagerWrapper,
+ mUiEventLogger,
+ mJavaAdapter,
+ mShadeInteractor,
+ mAvalancheController
+ )
+ val entry = HeadsUpManagerTestUtil.createEntry(/* id= */ 0, mContext)
+ statusBarStateController.setState(StatusBarState.SHADE)
+ runCurrent()
+
+ // THEN
+ Assert.assertFalse(hmp.shouldHeadsUpBecomePinnedWrapper(entry))
+ }
+
+ companion object {
+ @get:Parameters(name = "{0}")
+ val flags: List<FlagsParameterization>
+ get() = buildList {
+ addAll(FlagsParameterization.allCombinationsOf(NotificationThrottleHun.FLAG_NAME))
+ addAll(
+ FlagsParameterization.allCombinationsOf(NotificationsHeadsUpRefactor.FLAG_NAME)
+ )
+ }
+ }
+}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/policy/ui/dialog/viewmodel/ModesDialogViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/policy/ui/dialog/viewmodel/ModesDialogViewModelTest.kt
new file mode 100644
index 000000000000..fdfc7f13abf7
--- /dev/null
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/policy/ui/dialog/viewmodel/ModesDialogViewModelTest.kt
@@ -0,0 +1,164 @@
+/*
+ * 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.
+ */
+
+@file:OptIn(ExperimentalCoroutinesApi::class)
+
+package com.android.systemui.statusbar.policy.ui.dialog.viewmodel
+
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.SmallTest
+import com.android.settingslib.notification.modes.TestModeBuilder
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.coroutines.collectLastValue
+import com.android.systemui.kosmos.testDispatcher
+import com.android.systemui.kosmos.testScope
+import com.android.systemui.statusbar.policy.data.repository.fakeZenModeRepository
+import com.android.systemui.statusbar.policy.domain.interactor.zenModeInteractor
+import com.android.systemui.testKosmos
+import com.google.common.truth.Truth.assertThat
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.test.runCurrent
+import kotlinx.coroutines.test.runTest
+import org.junit.Test
+import org.junit.runner.RunWith
+
+@SmallTest
+@RunWith(AndroidJUnit4::class)
+class ModesDialogViewModelTest : SysuiTestCase() {
+ private val kosmos = testKosmos()
+ private val testScope = kosmos.testScope
+ val repository = kosmos.fakeZenModeRepository
+ val interactor = kosmos.zenModeInteractor
+
+ val underTest = ModesDialogViewModel(context, interactor, kosmos.testDispatcher)
+
+ @Test
+ fun tiles_filtersOutDisabledModes() =
+ testScope.runTest {
+ val tiles by collectLastValue(underTest.tiles)
+
+ repository.addModes(
+ listOf(
+ TestModeBuilder().setName("Disabled").setEnabled(false).build(),
+ TestModeBuilder.MANUAL_DND,
+ TestModeBuilder()
+ .setName("Enabled")
+ .setEnabled(true)
+ .setManualInvocationAllowed(true)
+ .build(),
+ TestModeBuilder()
+ .setName("Disabled with manual")
+ .setEnabled(false)
+ .setManualInvocationAllowed(true)
+ .build(),
+ ))
+ runCurrent()
+
+ assertThat(tiles?.size).isEqualTo(2)
+ with(tiles?.elementAt(0)!!) {
+ assertThat(this.text).isEqualTo("Manual DND")
+ assertThat(this.subtext).isEqualTo("On")
+ assertThat(this.enabled).isEqualTo(true)
+ }
+ with(tiles?.elementAt(1)!!) {
+ assertThat(this.text).isEqualTo("Enabled")
+ assertThat(this.subtext).isEqualTo("Off")
+ assertThat(this.enabled).isEqualTo(false)
+ }
+ }
+
+ @Test
+ fun tiles_filtersOutInactiveModesWithoutManualInvocation() =
+ testScope.runTest {
+ val tiles by collectLastValue(underTest.tiles)
+
+ repository.addModes(
+ listOf(
+ TestModeBuilder()
+ .setName("Active without manual")
+ .setActive(true)
+ .setManualInvocationAllowed(false)
+ .build(),
+ TestModeBuilder()
+ .setName("Active with manual")
+ .setTriggerDescription("trigger description")
+ .setActive(true)
+ .setManualInvocationAllowed(true)
+ .build(),
+ TestModeBuilder()
+ .setName("Inactive with manual")
+ .setActive(false)
+ .setManualInvocationAllowed(true)
+ .build(),
+ TestModeBuilder()
+ .setName("Inactive without manual")
+ .setActive(false)
+ .setManualInvocationAllowed(false)
+ .build(),
+ ))
+ runCurrent()
+
+ assertThat(tiles?.size).isEqualTo(3)
+ with(tiles?.elementAt(0)!!) {
+ assertThat(this.text).isEqualTo("Active without manual")
+ assertThat(this.subtext).isEqualTo("On")
+ assertThat(this.enabled).isEqualTo(true)
+ }
+ with(tiles?.elementAt(1)!!) {
+ assertThat(this.text).isEqualTo("Active with manual")
+ assertThat(this.subtext).isEqualTo("trigger description")
+ assertThat(this.enabled).isEqualTo(true)
+ }
+ with(tiles?.elementAt(2)!!) {
+ assertThat(this.text).isEqualTo("Inactive with manual")
+ assertThat(this.subtext).isEqualTo("Off")
+ assertThat(this.enabled).isEqualTo(false)
+ }
+ }
+
+ @Test
+ fun onClick_togglesTileState() =
+ testScope.runTest {
+ val tiles by collectLastValue(underTest.tiles)
+
+ val modeId = "id"
+ repository.addModes(
+ listOf(
+ TestModeBuilder()
+ .setId(modeId)
+ .setName("Test")
+ .setManualInvocationAllowed(true)
+ .build()
+ )
+ )
+ runCurrent()
+
+ assertThat(tiles?.size).isEqualTo(1)
+ assertThat(tiles?.elementAt(0)?.enabled).isFalse()
+
+ // Trigger onClick
+ tiles?.first()?.onClick?.let { it() }
+ runCurrent()
+
+ assertThat(tiles?.first()?.enabled).isTrue()
+
+ // Trigger onClick
+ tiles?.first()?.onClick?.let { it() }
+ runCurrent()
+
+ assertThat(tiles?.first()?.enabled).isFalse()
+ }
+}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/util/service/PersistentConnectionManagerTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/util/service/PersistentConnectionManagerTest.kt
new file mode 100644
index 000000000000..1b704b4c4902
--- /dev/null
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/util/service/PersistentConnectionManagerTest.kt
@@ -0,0 +1,236 @@
+/*
+ * 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.util.service
+
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.SmallTest
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.concurrency.fakeExecutor
+import com.android.systemui.dump.dumpManager
+import com.android.systemui.testKosmos
+import com.android.systemui.util.service.ObservableServiceConnection.DISCONNECT_REASON_DISCONNECTED
+import com.android.systemui.util.time.fakeSystemClock
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.kotlin.argumentCaptor
+import org.mockito.kotlin.clearInvocations
+import org.mockito.kotlin.mock
+import org.mockito.kotlin.never
+import org.mockito.kotlin.times
+import org.mockito.kotlin.verify
+
+@SmallTest
+@RunWith(AndroidJUnit4::class)
+class PersistentConnectionManagerTest : SysuiTestCase() {
+ private val kosmos = testKosmos()
+
+ private val fakeClock = kosmos.fakeSystemClock
+ private val fakeExecutor = kosmos.fakeExecutor
+
+ private class Proxy {
+ // Fake proxy class
+ }
+
+ private val connection: ObservableServiceConnection<Proxy> = mock()
+ private val observer: Observer = mock()
+
+ private val underTest: PersistentConnectionManager<Proxy> by lazy {
+ PersistentConnectionManager(
+ /* clock = */ fakeClock,
+ /* bgExecutor = */ fakeExecutor,
+ /* dumpManager = */ kosmos.dumpManager,
+ /* dumpsysName = */ DUMPSYS_NAME,
+ /* serviceConnection = */ connection,
+ /* maxReconnectAttempts = */ MAX_RETRIES,
+ /* baseReconnectDelayMs = */ RETRY_DELAY_MS,
+ /* minConnectionDurationMs = */ CONNECTION_MIN_DURATION_MS,
+ /* observer = */ observer
+ )
+ }
+
+ /** Validates initial connection. */
+ @Test
+ fun testConnect() {
+ underTest.start()
+ captureCallbackAndVerifyBind(connection).onConnected(connection, mock<Proxy>())
+ }
+
+ /** Ensures reconnection on disconnect. */
+ @Test
+ fun testExponentialRetryOnDisconnect() {
+ underTest.start()
+
+ // IF service is connected...
+ val captor = argumentCaptor<ObservableServiceConnection.Callback<Proxy>>()
+ verify(connection, times(1)).bind()
+ verify(connection).addCallback(captor.capture())
+ val callback = captor.lastValue
+ callback.onConnected(connection, mock<Proxy>())
+
+ // ...AND service becomes disconnected within CONNECTION_MIN_DURATION_MS
+ callback.onDisconnected(connection, DISCONNECT_REASON_DISCONNECTED)
+
+ // THEN verify we retry to bind after the retry delay. (RETRY #1)
+ verify(connection, times(1)).bind()
+ fakeClock.advanceTime(RETRY_DELAY_MS.toLong())
+ verify(connection, times(2)).bind()
+
+ // IF service becomes disconnected for a second time after first retry...
+ callback.onConnected(connection, mock<Proxy>())
+ callback.onDisconnected(connection, DISCONNECT_REASON_DISCONNECTED)
+
+ // THEN verify we retry after a longer delay of 2 * RETRY_DELAY_MS (RETRY #2)
+ fakeClock.advanceTime(RETRY_DELAY_MS.toLong())
+ verify(connection, times(2)).bind()
+ fakeClock.advanceTime(RETRY_DELAY_MS.toLong())
+ verify(connection, times(3)).bind()
+
+ // IF service becomes disconnected for a third time after the second retry...
+ callback.onConnected(connection, mock<Proxy>())
+ callback.onDisconnected(connection, DISCONNECT_REASON_DISCONNECTED)
+
+ // THEN verify we retry after a longer delay of 4 * RETRY_DELAY_MS (RETRY #3)
+ fakeClock.advanceTime(3 * RETRY_DELAY_MS.toLong())
+ verify(connection, times(3)).bind()
+ fakeClock.advanceTime(RETRY_DELAY_MS.toLong())
+ verify(connection, times(4)).bind()
+ }
+
+ @Test
+ fun testDoesNotRetryAfterMaxRetries() {
+ underTest.start()
+
+ val captor = argumentCaptor<ObservableServiceConnection.Callback<Proxy>>()
+ verify(connection).addCallback(captor.capture())
+ val callback = captor.lastValue
+
+ // IF we retry MAX_TRIES times...
+ for (attemptCount in 0 until MAX_RETRIES + 1) {
+ verify(connection, times(attemptCount + 1)).bind()
+ callback.onConnected(connection, mock<Proxy>())
+ callback.onDisconnected(connection, DISCONNECT_REASON_DISCONNECTED)
+ fakeClock.advanceTime(Math.scalb(RETRY_DELAY_MS.toDouble(), attemptCount).toLong())
+ }
+
+ // THEN we should not retry again after the last attempt.
+ fakeExecutor.advanceClockToLast()
+ verify(connection, times(MAX_RETRIES + 1)).bind()
+ }
+
+ @Test
+ fun testEnsureNoRetryIfServiceNeverConnectsAfterRetry() {
+ underTest.start()
+
+ with(captureCallbackAndVerifyBind(connection)) {
+ // IF service initially connects and then disconnects...
+ onConnected(connection, mock<Proxy>())
+ onDisconnected(connection, DISCONNECT_REASON_DISCONNECTED)
+ fakeExecutor.advanceClockToLast()
+ fakeExecutor.runAllReady()
+
+ // ...AND we retry once.
+ verify(connection, times(1)).bind()
+
+ // ...AND service disconnects after initial retry without ever connecting again.
+ onDisconnected(connection, DISCONNECT_REASON_DISCONNECTED)
+ fakeExecutor.advanceClockToLast()
+ fakeExecutor.runAllReady()
+
+ // THEN verify another retry is not triggered.
+ verify(connection, times(1)).bind()
+ }
+ }
+
+ @Test
+ fun testEnsureNoRetryIfServiceNeverInitiallyConnects() {
+ underTest.start()
+
+ with(captureCallbackAndVerifyBind(connection)) {
+ // IF service never connects and we just receive the disconnect signal...
+ onDisconnected(connection, DISCONNECT_REASON_DISCONNECTED)
+ fakeExecutor.advanceClockToLast()
+ fakeExecutor.runAllReady()
+
+ // THEN do not retry
+ verify(connection, never()).bind()
+ }
+ }
+
+ /** Ensures manual unbind does not reconnect. */
+ @Test
+ fun testStopDoesNotReconnect() {
+ underTest.start()
+
+ val connectionCallbackCaptor = argumentCaptor<ObservableServiceConnection.Callback<Proxy>>()
+ verify(connection).addCallback(connectionCallbackCaptor.capture())
+ verify(connection).bind()
+ clearInvocations(connection)
+
+ underTest.stop()
+ fakeExecutor.advanceClockToNext()
+ fakeExecutor.runAllReady()
+ verify(connection, never()).bind()
+ }
+
+ /** Ensures rebind on package change. */
+ @Test
+ fun testAttemptOnPackageChange() {
+ underTest.start()
+
+ verify(connection).bind()
+
+ val callbackCaptor = argumentCaptor<Observer.Callback>()
+ captureCallbackAndVerifyBind(connection).onConnected(connection, mock<Proxy>())
+
+ verify(observer).addCallback(callbackCaptor.capture())
+ callbackCaptor.lastValue.onSourceChanged()
+ verify(connection).bind()
+ }
+
+ @Test
+ fun testAddConnectionCallback() {
+ val connectionCallback: ObservableServiceConnection.Callback<Proxy> = mock()
+ underTest.addConnectionCallback(connectionCallback)
+ verify(connection).addCallback(connectionCallback)
+ }
+
+ @Test
+ fun testRemoveConnectionCallback() {
+ val connectionCallback: ObservableServiceConnection.Callback<Proxy> = mock()
+ underTest.removeConnectionCallback(connectionCallback)
+ verify(connection).removeCallback(connectionCallback)
+ }
+
+ /** Helper method to capture the [ObservableServiceConnection.Callback] */
+ private fun captureCallbackAndVerifyBind(
+ mConnection: ObservableServiceConnection<Proxy>,
+ ): ObservableServiceConnection.Callback<Proxy> {
+
+ val connectionCallbackCaptor = argumentCaptor<ObservableServiceConnection.Callback<Proxy>>()
+ verify(mConnection).addCallback(connectionCallbackCaptor.capture())
+ verify(mConnection).bind()
+ clearInvocations(mConnection)
+
+ return connectionCallbackCaptor.lastValue
+ }
+
+ companion object {
+ private const val MAX_RETRIES = 3
+ private const val RETRY_DELAY_MS = 1000
+ private const val CONNECTION_MIN_DURATION_MS = 5000
+ private const val DUMPSYS_NAME = "dumpsys_name"
+ }
+}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/volume/domain/interactor/AudioSharingInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/volume/domain/interactor/AudioSharingInteractorTest.kt
new file mode 100644
index 000000000000..142631e6aa07
--- /dev/null
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/volume/domain/interactor/AudioSharingInteractorTest.kt
@@ -0,0 +1,100 @@
+/*
+ * 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 androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.SmallTest
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.coroutines.collectLastValue
+import com.android.systemui.kosmos.testScope
+import com.android.systemui.testKosmos
+import com.android.systemui.volume.data.repository.audioSharingRepository
+import com.google.common.truth.Truth
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.test.runCurrent
+import kotlinx.coroutines.test.runTest
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+
+@OptIn(ExperimentalCoroutinesApi::class)
+@RunWith(AndroidJUnit4::class)
+@SmallTest
+class AudioSharingInteractorTest : SysuiTestCase() {
+ private val kosmos = testKosmos()
+ lateinit var underTest: AudioSharingInteractor
+
+ @Before
+ fun setUp() {
+ with(kosmos) { underTest = audioSharingInteractor }
+ }
+
+ @Test
+ fun volumeChanges_returnVolume() {
+ with(kosmos) {
+ testScope.runTest {
+ with(audioSharingRepository) {
+ setSecondaryGroupId(TEST_GROUP_ID)
+ setVolumeMap(mapOf(TEST_GROUP_ID to TEST_VOLUME))
+ }
+ val volume by collectLastValue(underTest.volume)
+ runCurrent()
+
+ Truth.assertThat(volume).isEqualTo(TEST_VOLUME)
+ }
+ }
+ }
+
+ @Test
+ fun volumeChanges_returnNull() {
+ with(kosmos) {
+ testScope.runTest {
+ with(audioSharingRepository) {
+ setSecondaryGroupId(TEST_GROUP_ID_INVALID)
+ setVolumeMap(mapOf(TEST_GROUP_ID to TEST_VOLUME))
+ }
+ val volume by collectLastValue(underTest.volume)
+ runCurrent()
+
+ Truth.assertThat(volume).isNull()
+ }
+ }
+ }
+
+ @Test
+ fun volumeChanges_returnDefaultVolume() {
+ with(kosmos) {
+ testScope.runTest {
+ with(audioSharingRepository) {
+ setSecondaryGroupId(TEST_GROUP_ID)
+ setVolumeMap(emptyMap())
+ }
+ val volume by collectLastValue(underTest.volume)
+ runCurrent()
+
+ Truth.assertThat(volume).isEqualTo(TEST_VOLUME_DEFAULT)
+ }
+ }
+ }
+
+ private companion object {
+ const val TEST_GROUP_ID = 1
+ const val TEST_GROUP_ID_INVALID = -1
+ const val TEST_VOLUME = 10
+ const val TEST_VOLUME_DEFAULT = 20
+ }
+}
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/VolumeDialog.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/VolumeDialog.java
index 9e5db73cf885..cd864026207b 100644
--- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/VolumeDialog.java
+++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/VolumeDialog.java
@@ -26,6 +26,7 @@ import com.android.systemui.plugins.annotations.ProvidesInterface;
@DependsOn(target = Callback.class)
public interface VolumeDialog extends Plugin {
String ACTION = "com.android.systemui.action.PLUGIN_VOLUME";
+ String ACTION_VOLUME_UNDO = "com.android.systemui.volume.ACTION_VOLUME_UNDO";
int VERSION = 1;
void init(int windowType, Callback callback);
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/clocks/ClockProviderPlugin.kt b/packages/SystemUI/plugin/src/com/android/systemui/plugins/clocks/ClockProviderPlugin.kt
index c7998f089a6d..4812ff03ef36 100644
--- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/clocks/ClockProviderPlugin.kt
+++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/clocks/ClockProviderPlugin.kt
@@ -50,8 +50,8 @@ interface ClockProvider {
/** Initializes and returns the target clock design */
fun createClock(settings: ClockSettings): ClockController
- /** A static thumbnail for rendering in some examples */
- fun getClockThumbnail(id: ClockId): Drawable?
+ /** Settings configuration parameters for the clock */
+ fun getClockPickerConfig(id: ClockId): ClockPickerConfig
}
/** Interface for controlling an active clock */
@@ -133,6 +133,7 @@ class DefaultClockFaceLayout(val view: View) : ClockFaceLayout {
// both small and large clock should have a container (RelativeLayout in
// SimpleClockFaceController)
override val views = listOf(view)
+
override fun applyConstraints(constraints: ConstraintSet): ConstraintSet {
if (views.size != 1) {
throw IllegalArgumentException(
@@ -267,6 +268,25 @@ data class ClockMetadata(
val clockId: ClockId,
)
+data class ClockPickerConfig(
+ val id: String,
+
+ /** Localized name of the clock */
+ val name: String,
+
+ /** Localized accessibility description for the clock */
+ val description: String,
+
+ /* Static & lightweight thumbnail version of the clock */
+ val thumbnail: Drawable,
+
+ /** True if the clock will react to tone changes in the seed color */
+ val isReactiveToTone: Boolean = true,
+
+ /** True if the clock is capable of chagning style in reaction to touches */
+ val isReactiveToTouch: Boolean = false,
+)
+
/** Render configuration for the full clock. Modifies the way systemUI behaves with this clock. */
data class ClockConfig(
val id: String,
@@ -280,7 +300,7 @@ data class ClockConfig(
/** Transition to AOD should move smartspace like large clock instead of small clock */
val useAlternateSmartspaceAODTransition: Boolean = false,
- /** True if the clock will react to tone changes in the seed color. */
+ @Deprecated("TODO(b/352049256): Remove")
val isReactiveToTone: Boolean = true,
/** True if the clock is large frame clock, which will use weather in compose. */
diff --git a/packages/SystemUI/res-product/values-fr-rCA/strings.xml b/packages/SystemUI/res-product/values-fr-rCA/strings.xml
index 1b6c6099b89d..15d3606977cb 100644
--- a/packages/SystemUI/res-product/values-fr-rCA/strings.xml
+++ b/packages/SystemUI/res-product/values-fr-rCA/strings.xml
@@ -46,9 +46,9 @@
<string name="thermal_shutdown_message" product="default" msgid="6685194547904051408">"Votre téléphone fonctionne normalement maintenant.\nTouchez pour en savoir plus"</string>
<string name="thermal_shutdown_message" product="device" msgid="3039675532521590478">"Votre appareil fonctionne normalement maintenant.\nTouchez pour en savoir plus"</string>
<string name="thermal_shutdown_message" product="tablet" msgid="5285898074484811386">"Votre tablette fonctionne normalement maintenant.\nTouchez pour en savoir plus."</string>
- <string name="thermal_shutdown_dialog_message" product="default" msgid="6145923570358574186">"Votre téléphone surchauffait et s\'est éteint afin de se refroidir. Il fonctionne normalement maintenant.\n\nIl peut surchauffer si vous :\n • utilisez. des applications qui utilisent beaucoup de ressources (jeux, vidéo, navigation, etc.)\n • téléchargez ou téléversez des fichiers lourds \n • si vous l\'utilisez lors de températures élevées."</string>
- <string name="thermal_shutdown_dialog_message" product="device" msgid="3647879000909527365">"Votre téléphone surchauffait et s\'est éteint afin de se refroidir. Il fonctionne normalement maintenant.\n\nIl peut surchauffer si vous :\n • utilisez. des applications qui utilisent beaucoup de ressources (jeux, vidéo, navigation, etc.)\n • téléchargez ou téléversez des fichiers lourds \n • ou si vous l\'utilisez lors de températures élevées."</string>
- <string name="thermal_shutdown_dialog_message" product="tablet" msgid="8274487811928782165">"Votre tablette surchauffait et s\'est éteinte afin de se refroidir. Elle fonctionne normalement maintenant.\n\nElle peut surchauffer si vous :\n • utilisez. des applications qui utilisent beaucoup de ressources (jeux, vidéo, navigation, etc.)\n • téléchargez ou téléversez des fichiers lourds \n • si vous l\'utilisez lors de températures élevées."</string>
+ <string name="thermal_shutdown_dialog_message" product="default" msgid="6145923570358574186">"Votre téléphone surchauffait et s\'est éteint afin de se refroidir. Il fonctionne normalement maintenant.\n\nIl peut surchauffer si vous :\n • utilisez. des applis qui utilisent beaucoup de ressources (jeux, vidéo, navigation, etc.)\n • téléchargez ou téléversez des fichiers lourds \n • si vous l\'utilisez lors de températures élevées."</string>
+ <string name="thermal_shutdown_dialog_message" product="device" msgid="3647879000909527365">"Votre téléphone surchauffait et s\'est éteint afin de se refroidir. Il fonctionne normalement maintenant.\n\nIl peut surchauffer si vous :\n • utilisez. des applis qui utilisent beaucoup de ressources (jeux, vidéo, navigation, etc.)\n • téléchargez ou téléversez des fichiers lourds \n • ou si vous l\'utilisez lors de températures élevées."</string>
+ <string name="thermal_shutdown_dialog_message" product="tablet" msgid="8274487811928782165">"Votre tablette surchauffait et s\'est éteinte afin de se refroidir. Elle fonctionne normalement maintenant.\n\nElle peut surchauffer si vous :\n • utilisez. des applis qui utilisent beaucoup de ressources (jeux, vidéo, navigation, etc.)\n • téléchargez ou téléversez des fichiers lourds \n • si vous l\'utilisez lors de températures élevées."</string>
<string name="high_temp_title" product="default" msgid="5365000411304924115">"Le téléphone surchauffe"</string>
<string name="high_temp_title" product="device" msgid="6622009907401563664">"L\'appareil surchauffe"</string>
<string name="high_temp_title" product="tablet" msgid="9039733706606446616">"La tablette surchauffe"</string>
diff --git a/packages/SystemUI/res-product/values-or/strings.xml b/packages/SystemUI/res-product/values-or/strings.xml
index a89dd7b78da1..4a6696869bd6 100644
--- a/packages/SystemUI/res-product/values-or/strings.xml
+++ b/packages/SystemUI/res-product/values-or/strings.xml
@@ -33,7 +33,7 @@
<string name="kg_failed_attempts_almost_at_erase_user" product="tablet" msgid="7325071812832605911">"ଆପଣ ଟାବଲେଟକୁ ଅନଲକ କରିବାକୁ <xliff:g id="NUMBER_0">%1$d</xliff:g>ଥର ଭୁଲ ପ୍ରୟାସ କରିଛନ୍ତି। ଆଉ <xliff:g id="NUMBER_1">%2$d</xliff:g> ଭୁଲ ପ୍ରୟାସ ପରେ, ଏହି ୟୁଜର ପ୍ରୋଫାଇଲ୍କୁ କାଢ଼ି ଦିଆଯିବ, ଯାହା ଫଳରେ ସମସ୍ତ ୟୁଜର ଡାଟା ଡିଲିଟ ହୋଇଯିବ।"</string>
<string name="kg_failed_attempts_almost_at_erase_user" product="default" msgid="8110939900089863103">"ଆପଣ ଫୋନକୁ ଅନଲକ କରିବାକୁ <xliff:g id="NUMBER_0">%1$d</xliff:g>ଥର ଭୁଲ ପ୍ରୟାସ କରିଛନ୍ତି। ଆଉ <xliff:g id="NUMBER_1">%2$d</xliff:g> ଭୁଲ ପ୍ରୟାସ ପରେ, ଏହି ୟୁଜର ପ୍ରୋଫାଇଲକୁ କାଢ଼ି ଦିଆଯିବ, ଯାହା ଫଳରେ ସମସ୍ତ ୟୁଜର ଡାଟା ଡିଲିଟ ହୋଇଯିବ।"</string>
<string name="kg_failed_attempts_now_erasing_user" product="tablet" msgid="8509811676952707883">"ଆପଣ ଟାବଲେଟକୁ ଅନଲକ କରିବାକୁ <xliff:g id="NUMBER">%d</xliff:g>ଥର ଭୁଲ ପ୍ରୟାସ କରିଛନ୍ତି। ଏହି ୟୁଜରଙ୍କୁ ବାହାର କରିଦିଆଯିବ, ଯାହାଦ୍ୱାରା ସମସ୍ତ ଉପଯୋଗକର୍ତ୍ତା ଡାଟା ଡିଲିଟ ହୋଇଯିବ।"</string>
- <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="3051962486994265014">"ଆପଣ ଫୋନ୍‌କୁ ଅନ୍‌ଲକ୍ କରିବାକୁ <xliff:g id="NUMBER">%d</xliff:g>ଥର ଭୁଲ୍ ପ୍ରୟାସ କରିଛନ୍ତି। ଏହି ଉପଯୋଗକର୍ତ୍ତାଙ୍କୁ ବାହାର କରିଦିଆଯିବ, ଯାହାଦ୍ୱାରା ସମସ୍ତ ଉପଯୋଗକର୍ତ୍ତା ଡାଟା ଡିଲିଟ୍ ହେବ।"</string>
+ <string name="kg_failed_attempts_now_erasing_user" product="default" msgid="3051962486994265014">"ଆପଣ ଫୋନକୁ ଅନଲକ କରିବାକୁ <xliff:g id="NUMBER">%d</xliff:g>ଥର ଭୁଲ ପ୍ରୟାସ କରିଛନ୍ତି। ଏହି ୟୁଜରଙ୍କୁ ବାହାର କରିଦିଆଯିବ, ଯାହା ଦ୍ୱାରା ସମସ୍ତ ୟୁଜର ଡାଟା ଡିଲିଟ ହେବ।"</string>
<string name="kg_failed_attempts_almost_at_erase_profile" product="tablet" msgid="1049523640263353830">"ଆପଣ ଟାବ୍‌ଲେଟ୍‌କୁ ଅନ୍‌ଲକ୍ କରିବାକୁ <xliff:g id="NUMBER_0">%1$d</xliff:g>ଥର ଭୁଲ ପ୍ରୟାସ କରିଛନ୍ତି। ଆଉ <xliff:g id="NUMBER_1">%2$d</xliff:g>ଟି ଭୁଲ୍ ପ୍ରୟାସ ପରେ, ୱାର୍କ ପ୍ରୋଫାଇଲ୍‌କୁ ବାହାର କରିଦିଆଯିବ, ଯାହା ଫଳରେ ସମସ୍ତ ପ୍ରୋଫାଇଲ୍ ଡାଟା ଡିଲିଟ୍ ହେବ।"</string>
<string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="3280816298678433681">"ଆପଣ ଫୋନ୍‌କୁ ଅନ୍‌ଲକ୍ କରିବାକୁ <xliff:g id="NUMBER_0">%1$d</xliff:g>ଥର ଭୁଲ ପ୍ରୟାସ କରିଛନ୍ତି। ଆଉ <xliff:g id="NUMBER_1">%2$d</xliff:g>ଟି ଭୁଲ୍ ପ୍ରୟାସ ପରେ, ୱାର୍କ ପ୍ରୋଫାଇଲ୍‌କୁ ବାହାର କରିଦିଆଯିବ, ଯାହା ଫଳରେ ସମସ୍ତ ପ୍ରୋଫାଇଲ୍ ଡାଟା ଡିଲିଟ୍ ହେବ।"</string>
<string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="4417100487251371559">"ଆପଣ ଟାବ୍‌ଲେଟ୍‌କୁ ଅନ୍‌ଲକ୍ କରିବାକୁ<xliff:g id="NUMBER">%d</xliff:g>ଥର ଭୁଲ ପ୍ରୟାସ କରିଛନ୍ତି। କାର୍ଯ୍ୟ ପ୍ରୋଫାଇଲ୍ ବାହାର କରିଦିଆଯିବ, ଯାହା ଫଳରେ ସମସ୍ତ ପ୍ରୋଫାଇଲ୍ ଡାଟା ଡିଲିଟ୍ ହେବ।"</string>
diff --git a/packages/SystemUI/res/drawable/checkbox_circle_shape.xml b/packages/SystemUI/res/drawable/checkbox_circle_shape.xml
new file mode 100644
index 000000000000..2b987e2d1fb1
--- /dev/null
+++ b/packages/SystemUI/res/drawable/checkbox_circle_shape.xml
@@ -0,0 +1,32 @@
+<?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.
+ -->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item
+ android:bottom="12dp"
+ android:left="12dp"
+ android:right="12dp"
+ android:top="12dp">
+ <selector>
+ <item
+ android:drawable="@drawable/ic_check_circle_filled_24dp"
+ android:state_checked="true" />
+ <item
+ android:drawable="@drawable/ic_circle_outline_24dp"
+ android:state_checked="false" />
+ </selector>
+ </item>
+</layer-list>
diff --git a/packages/SystemUI/res/drawable/ic_check_circle_filled_24dp.xml b/packages/SystemUI/res/drawable/ic_check_circle_filled_24dp.xml
new file mode 100644
index 000000000000..16e2a3db2e95
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_check_circle_filled_24dp.xml
@@ -0,0 +1,27 @@
+<?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.
+ -->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:tint="?androidprv:attr/materialColorPrimary"
+ android:viewportHeight="24"
+ android:viewportWidth="24">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10c5.52,0 10,-4.48 10,-10S17.52,2 12,2zM10.59,16.6l-4.24,-4.24l1.41,-1.41l2.83,2.83l5.66,-5.66l1.41,1.41L10.59,16.6z" />
+</vector>
diff --git a/packages/SystemUI/res/drawable/ic_circle_outline_24dp.xml b/packages/SystemUI/res/drawable/ic_circle_outline_24dp.xml
new file mode 100644
index 000000000000..82fa4f08d0c8
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_circle_outline_24dp.xml
@@ -0,0 +1,27 @@
+<?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.
+ -->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:tint="?androidprv:attr/materialColorPrimary"
+ android:viewportHeight="24"
+ android:viewportWidth="24">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8 8,3.58 8,8 -3.58,8 -8,8z" />
+</vector>
diff --git a/packages/SystemUI/res/layout/app_clips_screenshot.xml b/packages/SystemUI/res/layout/app_clips_screenshot.xml
index b09d35d46ca0..d7b94ec015ac 100644
--- a/packages/SystemUI/res/layout/app_clips_screenshot.xml
+++ b/packages/SystemUI/res/layout/app_clips_screenshot.xml
@@ -58,8 +58,10 @@
android:layout_width="wrap_content"
android:layout_height="48dp"
android:layout_marginStart="16dp"
+ android:button="@drawable/checkbox_circle_shape"
android:checked="true"
android:text="@string/backlinks_include_link"
+ android:textColor="?androidprv:attr/materialColorOnBackground"
android:visibility="gone"
app:layout_constraintBottom_toTopOf="@id/preview"
app:layout_constraintStart_toEndOf="@id/cancel"
@@ -74,6 +76,7 @@
android:drawablePadding="4dp"
android:gravity="center"
android:paddingHorizontal="8dp"
+ android:textColor="?android:textColorSecondary"
android:visibility="gone"
app:layout_constraintBottom_toTopOf="@id/preview"
app:layout_constraintStart_toEndOf="@id/backlinks_include_data"
diff --git a/packages/SystemUI/res/layout/clipboard_overlay.xml b/packages/SystemUI/res/layout/clipboard_overlay.xml
index 250076950907..65005f840598 100644
--- a/packages/SystemUI/res/layout/clipboard_overlay.xml
+++ b/packages/SystemUI/res/layout/clipboard_overlay.xml
@@ -24,18 +24,29 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/clipboard_overlay_window_name">
- <ImageView
+ <!-- Min edge spacing guideline off of which the preview and actions can be anchored (without
+ this we'd need to express margins as the sum of two different dimens). -->
+ <androidx.constraintlayout.widget.Guideline
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:id="@+id/min_edge_guideline"
+ app:layout_constraintGuide_begin="@dimen/overlay_action_container_minimum_edge_spacing"
+ android:orientation="vertical"/>
+ <!-- Negative horizontal margin because this container background must render beyond the thing
+ it's constrained by (the actions themselves). -->
+ <FrameLayout
android:id="@+id/actions_container_background"
android:visibility="gone"
android:layout_height="0dp"
android:layout_width="0dp"
android:elevation="4dp"
- android:background="@drawable/action_chip_container_background"
- android:layout_marginStart="@dimen/overlay_action_container_margin_horizontal"
+ android:background="@drawable/shelf_action_chip_container_background"
+ android:layout_marginStart="@dimen/negative_overlay_action_container_minimum_edge_spacing"
+ android:layout_marginEnd="@dimen/negative_overlay_action_container_minimum_edge_spacing"
android:layout_marginBottom="@dimen/overlay_action_container_margin_bottom"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="@+id/actions_container"
- app:layout_constraintEnd_toEndOf="@+id/actions_container"
+ app:layout_constraintStart_toStartOf="@id/min_edge_guideline"
+ app:layout_constraintTop_toTopOf="@id/actions_container"
+ app:layout_constraintEnd_toEndOf="@id/actions_container"
app:layout_constraintBottom_toBottomOf="parent"/>
<HorizontalScrollView
android:id="@+id/actions_container"
@@ -56,10 +67,13 @@
android:id="@+id/actions"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:paddingStart="@dimen/shelf_action_chip_margin_start"
+ android:showDividers="middle"
+ android:divider="@drawable/shelf_action_chip_divider"
android:animateLayoutChanges="true">
- <include layout="@layout/overlay_action_chip"
+ <include layout="@layout/shelf_action_chip"
android:id="@+id/share_chip"/>
- <include layout="@layout/overlay_action_chip"
+ <include layout="@layout/shelf_action_chip"
android:id="@+id/remote_copy_chip"/>
</LinearLayout>
</HorizontalScrollView>
@@ -73,7 +87,7 @@
android:layout_marginBottom="@dimen/overlay_preview_container_margin"
android:elevation="7dp"
android:background="@drawable/overlay_border"
- app:layout_constraintStart_toStartOf="@id/actions_container_background"
+ app:layout_constraintStart_toStartOf="@id/min_edge_guideline"
app:layout_constraintTop_toTopOf="@id/clipboard_preview"
app:layout_constraintEnd_toEndOf="@id/clipboard_preview"
app:layout_constraintBottom_toBottomOf="@id/actions_container_background"/>
diff --git a/packages/SystemUI/res/layout/clipboard_overlay2.xml b/packages/SystemUI/res/layout/clipboard_overlay2.xml
deleted file mode 100644
index 65005f840598..000000000000
--- a/packages/SystemUI/res/layout/clipboard_overlay2.xml
+++ /dev/null
@@ -1,202 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2021 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-<com.android.systemui.clipboardoverlay.ClipboardOverlayView
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- android:id="@+id/clipboard_ui"
- android:theme="@style/FloatingOverlay"
- android:alpha="0"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:contentDescription="@string/clipboard_overlay_window_name">
- <!-- Min edge spacing guideline off of which the preview and actions can be anchored (without
- this we'd need to express margins as the sum of two different dimens). -->
- <androidx.constraintlayout.widget.Guideline
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:id="@+id/min_edge_guideline"
- app:layout_constraintGuide_begin="@dimen/overlay_action_container_minimum_edge_spacing"
- android:orientation="vertical"/>
- <!-- Negative horizontal margin because this container background must render beyond the thing
- it's constrained by (the actions themselves). -->
- <FrameLayout
- android:id="@+id/actions_container_background"
- android:visibility="gone"
- android:layout_height="0dp"
- android:layout_width="0dp"
- android:elevation="4dp"
- android:background="@drawable/shelf_action_chip_container_background"
- android:layout_marginStart="@dimen/negative_overlay_action_container_minimum_edge_spacing"
- android:layout_marginEnd="@dimen/negative_overlay_action_container_minimum_edge_spacing"
- android:layout_marginBottom="@dimen/overlay_action_container_margin_bottom"
- app:layout_constraintStart_toStartOf="@id/min_edge_guideline"
- app:layout_constraintTop_toTopOf="@id/actions_container"
- app:layout_constraintEnd_toEndOf="@id/actions_container"
- app:layout_constraintBottom_toBottomOf="parent"/>
- <HorizontalScrollView
- android:id="@+id/actions_container"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_marginEnd="@dimen/overlay_action_container_margin_horizontal"
- android:paddingEnd="@dimen/overlay_action_container_padding_end"
- android:paddingVertical="@dimen/overlay_action_container_padding_vertical"
- android:elevation="4dp"
- android:scrollbars="none"
- app:layout_constraintHorizontal_bias="0"
- app:layout_constraintWidth_percent="1.0"
- app:layout_constraintWidth_max="wrap"
- app:layout_constraintStart_toEndOf="@+id/preview_border"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintBottom_toBottomOf="@id/actions_container_background">
- <LinearLayout
- android:id="@+id/actions"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingStart="@dimen/shelf_action_chip_margin_start"
- android:showDividers="middle"
- android:divider="@drawable/shelf_action_chip_divider"
- android:animateLayoutChanges="true">
- <include layout="@layout/shelf_action_chip"
- android:id="@+id/share_chip"/>
- <include layout="@layout/shelf_action_chip"
- android:id="@+id/remote_copy_chip"/>
- </LinearLayout>
- </HorizontalScrollView>
- <View
- android:id="@+id/preview_border"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:layout_marginStart="@dimen/overlay_preview_container_margin"
- android:layout_marginTop="@dimen/overlay_border_width_neg"
- android:layout_marginEnd="@dimen/overlay_border_width_neg"
- android:layout_marginBottom="@dimen/overlay_preview_container_margin"
- android:elevation="7dp"
- android:background="@drawable/overlay_border"
- app:layout_constraintStart_toStartOf="@id/min_edge_guideline"
- app:layout_constraintTop_toTopOf="@id/clipboard_preview"
- app:layout_constraintEnd_toEndOf="@id/clipboard_preview"
- app:layout_constraintBottom_toBottomOf="@id/actions_container_background"/>
- <FrameLayout
- android:id="@+id/clipboard_preview"
- android:layout_width="@dimen/clipboard_preview_size"
- android:layout_height="wrap_content"
- android:layout_marginStart="@dimen/overlay_border_width"
- android:layout_marginBottom="@dimen/overlay_border_width"
- android:layout_gravity="center"
- android:elevation="7dp"
- android:background="@drawable/overlay_preview_background"
- android:clipChildren="true"
- android:clipToOutline="true"
- android:clipToPadding="true"
- app:layout_constraintStart_toStartOf="@id/preview_border"
- app:layout_constraintBottom_toBottomOf="@id/preview_border">
- <TextView android:id="@+id/text_preview"
- android:textFontWeight="500"
- android:padding="8dp"
- android:gravity="center|start"
- android:ellipsize="end"
- android:autoSizeTextType="uniform"
- android:autoSizeMinTextSize="@dimen/clipboard_overlay_min_font"
- android:autoSizeMaxTextSize="@dimen/clipboard_overlay_max_font"
- android:textColor="?attr/overlayButtonTextColor"
- android:textColorLink="?attr/overlayButtonTextColor"
- android:background="?androidprv:attr/colorAccentSecondary"
- android:layout_width="@dimen/clipboard_preview_size"
- android:layout_height="@dimen/clipboard_preview_size"/>
- <ImageView
- android:id="@+id/image_preview"
- android:scaleType="fitCenter"
- android:adjustViewBounds="true"
- android:contentDescription="@string/clipboard_image_preview"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"/>
- <TextView
- android:id="@+id/hidden_preview"
- android:visibility="gone"
- android:textFontWeight="500"
- android:padding="8dp"
- android:gravity="center"
- android:textSize="14sp"
- android:textColor="?attr/overlayButtonTextColor"
- android:background="?androidprv:attr/colorAccentSecondary"
- android:layout_width="@dimen/clipboard_preview_size"
- android:layout_height="@dimen/clipboard_preview_size"/>
- </FrameLayout>
- <LinearLayout
- android:id="@+id/minimized_preview"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:visibility="gone"
- android:elevation="7dp"
- android:padding="8dp"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- android:layout_marginStart="@dimen/overlay_action_container_margin_horizontal"
- android:layout_marginBottom="@dimen/overlay_action_container_margin_bottom"
- android:background="@drawable/clipboard_minimized_background">
- <ImageView
- android:src="@drawable/ic_content_paste"
- android:tint="?attr/overlayButtonTextColor"
- android:layout_width="24dp"
- android:layout_height="24dp"/>
- <ImageView
- android:src="@*android:drawable/ic_chevron_end"
- android:tint="?attr/overlayButtonTextColor"
- android:layout_width="24dp"
- android:layout_height="24dp"
- android:paddingEnd="-8dp"
- android:paddingStart="-4dp"/>
- </LinearLayout>
- <androidx.constraintlayout.widget.Barrier
- android:id="@+id/clipboard_content_top"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- app:barrierDirection="top"
- app:constraint_referenced_ids="clipboard_preview,minimized_preview"/>
- <androidx.constraintlayout.widget.Barrier
- android:id="@+id/clipboard_content_end"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- app:barrierDirection="end"
- app:constraint_referenced_ids="clipboard_preview,minimized_preview"/>
- <FrameLayout
- android:id="@+id/dismiss_button"
- android:layout_width="@dimen/overlay_dismiss_button_tappable_size"
- android:layout_height="@dimen/overlay_dismiss_button_tappable_size"
- android:elevation="10dp"
- android:visibility="gone"
- android:alpha="0"
- app:layout_constraintStart_toEndOf="@id/clipboard_content_end"
- app:layout_constraintEnd_toEndOf="@id/clipboard_content_end"
- app:layout_constraintTop_toTopOf="@id/clipboard_content_top"
- app:layout_constraintBottom_toTopOf="@id/clipboard_content_top"
- android:contentDescription="@string/clipboard_dismiss_description">
- <ImageView
- android:id="@+id/dismiss_image"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_margin="@dimen/overlay_dismiss_button_margin"
- android:background="@drawable/circular_background"
- android:backgroundTint="?androidprv:attr/materialColorPrimaryFixedDim"
- android:tint="?androidprv:attr/materialColorOnPrimaryFixed"
- android:padding="4dp"
- android:src="@drawable/ic_close"/>
- </FrameLayout>
-</com.android.systemui.clipboardoverlay.ClipboardOverlayView> \ No newline at end of file
diff --git a/packages/SystemUI/res/layout/keyboard_shortcuts_search_view.xml b/packages/SystemUI/res/layout/keyboard_shortcuts_search_view.xml
index 2cfd644e9d62..45a4af92339c 100644
--- a/packages/SystemUI/res/layout/keyboard_shortcuts_search_view.xml
+++ b/packages/SystemUI/res/layout/keyboard_shortcuts_search_view.xml
@@ -85,7 +85,7 @@
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="center_vertical"
+ android:layout_gravity="center_vertical|start"
android:orientation="horizontal">
<Button
android:id="@+id/shortcut_system"
diff --git a/packages/SystemUI/res/layout/overlay_action_chip.xml b/packages/SystemUI/res/layout/overlay_action_chip.xml
deleted file mode 100644
index e7c382f9833b..000000000000
--- a/packages/SystemUI/res/layout/overlay_action_chip.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2019 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-<com.android.systemui.screenshot.OverlayActionChip
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
- android:id="@+id/overlay_action_chip"
- android:theme="@style/FloatingOverlay"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginStart="@dimen/overlay_action_chip_margin_start"
- android:layout_gravity="center"
- android:gravity="center"
- android:alpha="0.0">
- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingVertical="@dimen/overlay_action_chip_padding_vertical"
- android:background="@drawable/action_chip_background"
- android:gravity="center">
- <ImageView
- android:id="@+id/overlay_action_chip_icon"
- android:tint="?androidprv:attr/materialColorOnSecondary"
- android:layout_width="@dimen/overlay_action_chip_icon_size"
- android:layout_height="@dimen/overlay_action_chip_icon_size"/>
- <TextView
- android:id="@+id/overlay_action_chip_text"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:fontFamily="@*android:string/config_headlineFontFamilyMedium"
- android:textSize="@dimen/overlay_action_chip_text_size"
- android:textColor="?androidprv:attr/materialColorOnSecondary"/>
- </LinearLayout>
-</com.android.systemui.screenshot.OverlayActionChip>
diff --git a/packages/SystemUI/res/layout/rich_ongoing_timer_notification.xml b/packages/SystemUI/res/layout/rich_ongoing_timer_notification.xml
index f2bfbe5c960d..3a679e3c16cb 100644
--- a/packages/SystemUI/res/layout/rich_ongoing_timer_notification.xml
+++ b/packages/SystemUI/res/layout/rich_ongoing_timer_notification.xml
@@ -33,7 +33,6 @@
android:id="@+id/icon"
android:layout_width="24dp"
android:layout_height="24dp"
- android:src="@drawable/ic_close"
app:tint="@android:color/white"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/label"
@@ -88,11 +87,10 @@
/>
<com.android.systemui.statusbar.notification.row.ui.view.TimerButtonView
+ style="@*android:style/NotificationEmphasizedAction"
android:id="@+id/mainButton"
android:layout_width="124dp"
android:layout_height="wrap_content"
- tools:text="Reset"
- tools:drawableStart="@android:drawable/ic_menu_add"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/altButton"
app:layout_constraintTop_toBottomOf="@id/bottomOfTop"
@@ -101,15 +99,23 @@
/>
<com.android.systemui.statusbar.notification.row.ui.view.TimerButtonView
+ style="@*android:style/NotificationEmphasizedAction"
android:id="@+id/altButton"
- tools:text="Reset"
- tools:drawableStart="@android:drawable/ic_menu_add"
- android:drawablePadding="2dp"
- android:drawableTint="@android:color/white"
android:layout_width="124dp"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/bottomOfTop"
app:layout_constraintStart_toEndOf="@id/mainButton"
+ app:layout_constraintEnd_toEndOf="@id/resetButton"
+ android:paddingEnd="4dp"
+ />
+
+ <com.android.systemui.statusbar.notification.row.ui.view.TimerButtonView
+ style="@*android:style/NotificationEmphasizedAction"
+ android:id="@+id/resetButton"
+ android:layout_width="124dp"
+ android:layout_height="wrap_content"
+ app:layout_constraintTop_toBottomOf="@id/bottomOfTop"
+ app:layout_constraintStart_toEndOf="@id/altButton"
app:layout_constraintEnd_toEndOf="parent"
android:paddingEnd="4dp"
/>
diff --git a/packages/SystemUI/res/layout/screen_share_dialog.xml b/packages/SystemUI/res/layout/screen_share_dialog.xml
index 2616e8ae25e8..aa083ad9fdea 100644
--- a/packages/SystemUI/res/layout/screen_share_dialog.xml
+++ b/packages/SystemUI/res/layout/screen_share_dialog.xml
@@ -46,7 +46,7 @@
android:layout_marginTop="@dimen/screenrecord_title_margin_top"
android:gravity="center"/>
<Spinner
- android:id="@+id/screen_share_mode_spinner"
+ android:id="@+id/screen_share_mode_options"
android:layout_width="match_parent"
android:layout_height="@dimen/screenrecord_spinner_height"
android:layout_marginTop="@dimen/screenrecord_spinner_margin"
diff --git a/packages/SystemUI/res/layout/screenshot.xml b/packages/SystemUI/res/layout/screenshot.xml
deleted file mode 100644
index c134c8e2d339..000000000000
--- a/packages/SystemUI/res/layout/screenshot.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2011 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-<com.android.systemui.screenshot.ScreenshotView
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/screenshot_frame"
- android:theme="@style/FloatingOverlay"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:importantForAccessibility="no">
- <ImageView
- android:id="@+id/screenshot_scrolling_scrim"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:visibility="gone"
- android:clickable="true"
- android:importantForAccessibility="no"/>
- <ImageView
- android:id="@+id/screenshot_flash"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:visibility="gone"
- android:elevation="7dp"
- android:src="@android:color/white"/>
- <include layout="@layout/screenshot_static"
- android:id="@+id/screenshot_static"/>
-</com.android.systemui.screenshot.ScreenshotView>
diff --git a/packages/SystemUI/res/layout/screenshot_static.xml b/packages/SystemUI/res/layout/screenshot_static.xml
deleted file mode 100644
index 3b728a9ebc02..000000000000
--- a/packages/SystemUI/res/layout/screenshot_static.xml
+++ /dev/null
@@ -1,162 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2020 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-<com.android.systemui.screenshot.DraggableConstraintLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
- <ImageView
- android:id="@+id/actions_container_background"
- android:visibility="gone"
- android:layout_height="0dp"
- android:layout_width="0dp"
- android:elevation="4dp"
- android:background="@drawable/action_chip_container_background"
- android:layout_marginStart="@dimen/overlay_action_container_margin_horizontal"
- android:layout_marginBottom="@dimen/overlay_action_container_margin_bottom"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="@+id/actions_container"
- app:layout_constraintEnd_toEndOf="@+id/actions_container"
- app:layout_constraintBottom_toTopOf="@id/guideline"/>
- <HorizontalScrollView
- android:id="@+id/actions_container"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_marginEnd="@dimen/overlay_action_container_margin_horizontal"
- android:paddingEnd="@dimen/overlay_action_container_padding_end"
- android:paddingVertical="@dimen/overlay_action_container_padding_vertical"
- android:elevation="4dp"
- android:scrollbars="none"
- app:layout_constraintHorizontal_bias="0"
- app:layout_constraintWidth_percent="1.0"
- app:layout_constraintWidth_max="wrap"
- app:layout_constraintStart_toEndOf="@+id/screenshot_preview_border"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintBottom_toBottomOf="@id/actions_container_background">
- <LinearLayout
- android:id="@+id/screenshot_actions"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content">
- <include layout="@layout/overlay_action_chip"
- android:id="@+id/screenshot_share_chip"/>
- <include layout="@layout/overlay_action_chip"
- android:id="@+id/screenshot_edit_chip"/>
- <include layout="@layout/overlay_action_chip"
- android:id="@+id/screenshot_scroll_chip"
- android:visibility="gone" />
- </LinearLayout>
- </HorizontalScrollView>
- <View
- android:id="@+id/screenshot_preview_border"
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:layout_marginStart="@dimen/overlay_preview_container_margin"
- android:layout_marginTop="@dimen/overlay_border_width_neg"
- android:layout_marginEnd="@dimen/overlay_border_width_neg"
- android:layout_marginBottom="@dimen/overlay_preview_container_margin"
- android:elevation="8dp"
- android:alpha="0"
- android:background="@drawable/overlay_border"
- app:layout_constraintStart_toStartOf="@id/actions_container_background"
- app:layout_constraintTop_toTopOf="@id/screenshot_preview"
- app:layout_constraintEnd_toEndOf="@id/screenshot_preview"
- app:layout_constraintBottom_toBottomOf="@id/actions_container_background"/>
- <ImageView
- android:id="@+id/screenshot_preview"
- android:visibility="invisible"
- android:layout_width="@dimen/overlay_x_scale"
- android:layout_height="wrap_content"
- android:layout_marginStart="@dimen/overlay_border_width"
- android:layout_marginBottom="@dimen/overlay_border_width"
- android:layout_gravity="center"
- android:elevation="8dp"
- android:contentDescription="@string/screenshot_edit_description"
- android:scaleType="fitEnd"
- android:background="@drawable/overlay_preview_background"
- android:adjustViewBounds="true"
- android:clickable="true"
- app:layout_constraintStart_toStartOf="@id/screenshot_preview_border"
- app:layout_constraintBottom_toBottomOf="@id/screenshot_preview_border"/>
- <ImageView
- android:id="@+id/screenshot_badge"
- android:layout_width="56dp"
- android:layout_height="56dp"
- android:visibility="gone"
- android:elevation="9dp"
- app:layout_constraintBottom_toBottomOf="@id/screenshot_preview_border"
- app:layout_constraintEnd_toEndOf="@id/screenshot_preview_border"/>
- <FrameLayout
- android:id="@+id/screenshot_dismiss_button"
- android:layout_width="@dimen/overlay_dismiss_button_tappable_size"
- android:layout_height="@dimen/overlay_dismiss_button_tappable_size"
- android:elevation="11dp"
- android:visibility="gone"
- app:layout_constraintStart_toEndOf="@id/screenshot_preview"
- app:layout_constraintEnd_toEndOf="@id/screenshot_preview"
- app:layout_constraintTop_toTopOf="@id/screenshot_preview"
- app:layout_constraintBottom_toTopOf="@id/screenshot_preview"
- android:contentDescription="@string/screenshot_dismiss_description">
- <ImageView
- android:id="@+id/screenshot_dismiss_image"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_margin="@dimen/overlay_dismiss_button_margin"
- android:background="@drawable/circular_background"
- android:backgroundTint="?androidprv:attr/materialColorPrimary"
- android:tint="?androidprv:attr/materialColorOnPrimary"
- android:padding="4dp"
- android:src="@drawable/ic_close"/>
- </FrameLayout>
- <ImageView
- android:id="@+id/screenshot_scrollable_preview"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:scaleType="matrix"
- android:visibility="gone"
- app:layout_constraintStart_toStartOf="@id/screenshot_preview"
- app:layout_constraintTop_toTopOf="@id/screenshot_preview"
- android:elevation="7dp"/>
-
- <androidx.constraintlayout.widget.Guideline
- android:id="@+id/guideline"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- app:layout_constraintGuide_end="0dp" />
-
- <FrameLayout
- android:id="@+id/screenshot_message_container"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_marginHorizontal="@dimen/overlay_action_container_margin_horizontal"
- android:layout_marginTop="4dp"
- android:layout_marginBottom="@dimen/overlay_action_container_margin_bottom"
- android:paddingHorizontal="@dimen/overlay_action_container_padding_end"
- android:paddingVertical="@dimen/overlay_action_container_padding_vertical"
- android:elevation="4dp"
- android:background="@drawable/action_chip_container_background"
- android:visibility="gone"
- app:layout_constraintTop_toBottomOf="@id/guideline"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintWidth_max="450dp"
- app:layout_constraintHorizontal_bias="0">
- <include layout="@layout/screenshot_work_profile_first_run" />
- <include layout="@layout/screenshot_detection_notice" />
- </FrameLayout>
-</com.android.systemui.screenshot.DraggableConstraintLayout>
diff --git a/packages/SystemUI/res/layout/window_magnification_settings_view.xml b/packages/SystemUI/res/layout/window_magnification_settings_view.xml
index 12e226a47bb5..afd4fa7a5edd 100644
--- a/packages/SystemUI/res/layout/window_magnification_settings_view.xml
+++ b/packages/SystemUI/res/layout/window_magnification_settings_view.xml
@@ -33,9 +33,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
- android:singleLine="true"
- android:scrollHorizontally="true"
- android:ellipsize="marquee"
+ android:layout_marginEnd="@dimen/magnification_setting_view_item_horizontal_spacing"
android:text="@string/accessibility_magnifier_size"
android:textAppearance="@style/TextAppearance.MagnificationSetting.Title"
android:focusable="true"
@@ -120,9 +118,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
- android:singleLine="true"
- android:scrollHorizontally="true"
- android:ellipsize="marquee"
+ android:layout_marginEnd="@dimen/magnification_setting_view_item_horizontal_spacing"
android:text="@string/accessibility_allow_diagonal_scrolling"
android:textAppearance="@style/TextAppearance.MagnificationSetting.Title"
android:labelFor="@id/magnifier_horizontal_lock_switch"
diff --git a/packages/SystemUI/res/values-af/strings.xml b/packages/SystemUI/res/values-af/strings.xml
index f2945e24204d..adeafbc8eca2 100644
--- a/packages/SystemUI/res/values-af/strings.xml
+++ b/packages/SystemUI/res/values-af/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> het hierdie skermskoot bespeur."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> en ander oop apps het hierdie skermskoot bespeur."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Voeg by nota"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Sluit skakel in"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Skermopnemer"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Verwerk tans skermopname"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Deurlopende kennisgewing vir \'n skermopnamesessie"</string>
@@ -127,29 +126,41 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Tik om te bekyk"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Kon nie skermopname stoor nie"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Kon nie skermopname begin nie"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Jy sal ophou om &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; op te neem"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
- <!-- no translation found for share_to_app_chip_accessibility_label (4210256229976947065) -->
+ <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
<skip />
+ <string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Deel tans skerm"</string>
<!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Jy sal ophou om &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; te deel"</string>
<!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
<skip />
- <!-- no translation found for cast_to_other_device_chip_accessibility_label (1680650146639059938) -->
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Skerm word tans uitgesaai"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Hou op uitsaai?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
+ <skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
+ <skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
+ <skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Jy sal ophou om &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; uit te saai"</string>
<!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
<skip />
<!-- no translation found for close_dialog_button (4749497706540104133) -->
@@ -198,8 +209,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Ontsluit met gesig. Druk om voort te gaan."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Gesig is herken. Druk om voort te gaan."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Gesig is herken. Druk die ontsluitikoon om voort te gaan."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Ontsluit met gesig. Tik om voort te gaan."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Gestaaf"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Kanselleer stawing"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Meer opsies"</string>
@@ -299,6 +309,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Sluimerskerm"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Moenie Steur Nie"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Geen saamgebinde toestelle beskikbaar nie"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Tik om ’n toestel te koppel of ontkoppel"</string>
@@ -480,8 +492,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Voeg meer legstukke by"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Langdruk om legstukke te pasmaak"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Pasmaak legstukke"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Ontsluit om legstukke te pasmaak"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"App-ikoon vir gedeaktiveerde legstuk"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Appikoon vir ’n legstuk wat geïnstalleer word"</string>
<string name="edit_widget" msgid="9030848101135393954">"Wysig legstuk"</string>
@@ -500,6 +511,10 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"kies legstuk"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"verwyder legstuk"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"plaas gekose legstuk"</string>
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
+ <skip />
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
+ <skip />
<!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
<skip />
<!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
@@ -727,7 +742,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Verstek"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Outomaties"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Geen klank of vibrasie nie"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Geen klank of vibrasie nie en verskyn laer in gespreksafdeling"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Kan lui of vibreer op grond van toestelinstellings"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Kan lui of vibreer op grond van toestelinstellings. Gesprekke van <xliff:g id="APP_NAME">%1$s</xliff:g> af verskyn by verstek in ’n borrel."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Laat die stelsel bepaal of hierdie kennisgewing \'n klank moet maak of vibreer"</string>
@@ -784,6 +800,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page Down"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Delete"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1359,17 +1377,15 @@
<string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"Word gebruik deur <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string>
<string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"Onlangs gebruik deur <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string>
<string name="shortcut_helper_category_system" msgid="462110876978937359">"Stelsel"</string>
- <!-- no translation found for shortcut_helper_category_system_controls (3153344561395751020) -->
- <skip />
- <!-- no translation found for shortcut_helper_category_system_apps (6001757545472556810) -->
- <skip />
+ <string name="shortcut_helper_category_system_controls" msgid="3153344561395751020">"Stelselkontroles"</string>
+ <string name="shortcut_helper_category_system_apps" msgid="6001757545472556810">"Stelselapps"</string>
<string name="shortcut_helper_category_multitasking" msgid="7413381961404090136">"Verrigting van veelvuldige take"</string>
- <!-- no translation found for shortcutHelper_category_recent_apps (7918731953612377145) -->
- <skip />
- <!-- no translation found for shortcutHelper_category_split_screen (1159669813444812244) -->
- <skip />
+ <string name="shortcutHelper_category_recent_apps" msgid="7918731953612377145">"Onlangse apps"</string>
+ <string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Verdeelde skerm"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Invoer"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Appkortpaaie"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Toeganklikheid"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Kortpadsleutels"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Soekkortpaaie"</string>
@@ -1384,6 +1400,7 @@
<skip />
<!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
<skip />
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Uitstekende werk!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Gaan terug"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Swiep enige plek op die raakpaneel links of regs met drie vingers om terug te gaan."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Raakpaneel wat drie vingers wat regs en links beweeg wys"</string>
@@ -1392,4 +1409,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Vlak %1$d van %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Huiskontroles"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Kry vinnig toegang tot jou huiskontroles as ’n sluimerskerm"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-af/tiles_states_strings.xml b/packages/SystemUI/res/values-af/tiles_states_strings.xml
index 1b4781d24ebc..1af9fd9c3415 100644
--- a/packages/SystemUI/res/values-af/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-af/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Af"</item>
<item msgid="4875147066469902392">"Aan"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Onbeskikbaar"</item>
<item msgid="5044688398303285224">"Af"</item>
diff --git a/packages/SystemUI/res/values-am/strings.xml b/packages/SystemUI/res/values-am/strings.xml
index cd3dc5188a25..fb4c765886b7 100644
--- a/packages/SystemUI/res/values-am/strings.xml
+++ b/packages/SystemUI/res/values-am/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> ይህን ቅጽበታዊ ገፅ ዕይታ ለይቷል።"</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> እና ሌሎች ክፍት መተግበሪያዎች ይህን ቅጽበታዊ ገፅ ዕይታ ለይተዋል።"</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"ወደ ማስታወሻ አክል"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"አገናኝ አካትት"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"የማያ መቅረጫ"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"የማያ ገፅ ቀረጻን በማሰናዳት ላይ"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"ለአንድ የማያ ገፅ ቀረጻ ክፍለ-ጊዜ በመካሄድ ያለ ማሳወቂያ"</string>
@@ -127,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"ለመመልከት መታ ያድርጉ"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"የማያ ገጽ ቀረጻን ማስቀመጥ ላይ ስህተት"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"የማያ ገፅ ቀረጻን መጀመር ላይ ስህተት"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"እርስዎ &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; መቅረጽ ያቆማሉ"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"መቅረጽ አቁም"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"ማያ ገፅን በማጋራት ላይ"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"ማያ ገፅን ማጋራት ይቁም?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"እርስዎ &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; ማጋራት ያቆማሉ"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"ማጋራት አቁም"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"ማያ ገፅን cast በማድረግ ላይ"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"cast ማድረግ ይቁም?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"ማያ ገፅን Cast በማድረግ ላይ"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"እርስዎ &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; cast ማድረግ ያቆማሉ"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"cast ማድረግ አቁም"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"ዝጋ"</string>
<string name="issuerecord_title" msgid="286627115110121849">"ችግር መመዝገቢያ"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"የአሰራር ችግር አመዘጋገብ"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"ለችግር መሰብሰብ ክፍለ ጊዜ ቀጣይነት ያለው ማሳወቂያ"</string>
@@ -162,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"የችግር ምዝገባ ማስቀመጥ ላይ ስህተት"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"ችግር ምዝገባ ማስጀመር ላይ ስህተት"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"በሙሉ ገጽ ዕይታ በማየት ላይ"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"ለመውጣት ከማያ ገፅዎ አናት ወደታች ያንሸራትቱ"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"ገባኝ"</string>
<string name="accessibility_back" msgid="6530104400086152611">"ተመለስ"</string>
<string name="accessibility_home" msgid="5430449841237966217">"መነሻ"</string>
@@ -196,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"በመልክ ተከፍቷል። ለመቀጠል ይጫኑ።"</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"መልክ ተለይቶ ታውቋል። ለመቀጠል ይጫኑ።"</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"መልክ ተለይቶ ታውቋል። ለመቀጠል የመክፈቻ አዶውን ይጫኑ።"</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"በመልክ ተከፍቷል። ለመቀጠል መታ ያድርጉ።"</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"የተረጋገጠ"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"ማረጋገጥን ሰርዝ"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"ተጨማሪ አማራጮች"</string>
@@ -297,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"የማያ ገፅ ማቆያ"</string>
<string name="ethernet_label" msgid="2203544727007463351">"ኤተርኔት"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"አትረብሽ"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"ብሉቱዝ"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"ምንም የተጣመሩ መሣሪያዎች አይገኝም"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"መሣሪያን ለማገናኘት ወይም ግንኙነቱን ለማቋረጥ መታ ያድርጉ"</string>
@@ -308,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"ተቀምጧል"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"ግንኙነትን አቋርጥ"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"ያግብሩ"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"ነገ በራስ-ሰር ያብሩ"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"እንደ ፈጣን ማጋራት እና የእኔን መሣሪያ አግኝ ያሉ ባህሪዎች ብሉቱዝን ይጠቀማሉ"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"ብሉቱዝ ነገ ጠዋት ይበራል"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"ኦዲዮ አጋራ"</string>
@@ -478,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"ተጨማሪ ምግብሮችን ያክሉ"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"ምግብሮችን ለማበጀት በረጅሙ ይጫኑ"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"ምግብሮችን አብጅ"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"ምግብሮችን ለማበጀት ይክፈቱ"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"የመተግበሪያ አዶ ለተሰናከለ ምግብር"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"የምግብር የመተግበሪያ አዶ ሲጫን"</string>
<string name="edit_widget" msgid="9030848101135393954">"ምግብርን አርትዕ"</string>
@@ -498,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"ምግብር ይምረጡ"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"ምግብር አስወግድ"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"በቦታ የተመረጠ ምግብር"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"የማያ ገፅ ቁልፍ ምግብሮች"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"ምግብር በመጠቀም መተግበሪያ ለመክፈት እርስዎ መሆንዎን ማረጋገጥ አለብዎት። እንዲሁም የእርስዎ ጡባዊ በተቆለፈበት ጊዜ እንኳን ማንኛውም ሰው እነሱን ማየት እንደሚችል ከግምት ውስጥ ያስገቡ። አንዳንድ ምግብሮች ለማያ ገፅ ቁልፍዎ የታሰቡ ላይሆኑ ይችላሉ እና እዚህ ለማከል አስተማማኝ ላይሆኑ ይችላሉ።"</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"ገባኝ"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"ተጠቃሚ ቀይር"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"ወደታች ተጎታች ምናሌ"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"በዚህ ክፍለ-ጊዜ ውስጥ ያሉ ሁሉም መተግበሪያዎች እና ውሂብ ይሰረዛሉ።"</string>
@@ -725,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"ነባሪ"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"ራስ-ሰር"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"ምንም ድምፅ ወይም ንዝረት የለም"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"ምንም ድምፅ ወይም ንዝረት የለም እና በውይይት ክፍል ላይ አይታይም"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"በመሣሪያ ቅንብሮች መሰረት ሊጮህ ወይም ሊነዝር ይችላል"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"በስልክ ቅንብሮች መሰረት ሊጮህ ወይም ሊነዝር ይችላል። የ<xliff:g id="APP_NAME">%1$s</xliff:g> ውይይቶች በነባሪነት አረፋ ይሆናሉ።"</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"ይህ ማሳወቂያ ድምፅ ወይም ንዝረት መደረግ ካለበት ስርዓቱ እንዲወሰን ያድርጉት"</string>
@@ -782,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"ገፅ ወደ ላይ"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"ገፅ ወደ ታች"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"ሰርዝ"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"መነሻ"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"መጨረሻ"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"አስገባ"</string>
@@ -1364,20 +1374,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"የተከፈለ ማያ ገፅ"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"ግብዓት"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"የመተግበሪያ አቋራጮች"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"ተደራሽነት"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"የቁልፍ ሰሌዳ አቋራጮች"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"የፍለጋ አቋራጮች"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"መሰብሰቢያ አዶ"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"መዘርጊያ አዶ"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"ወይም"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"የተመለስ ምልክት"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"የቤት ምልክት"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"የተግባር ቁልፍ"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"ተከናውኗል"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"ጥሩ ሠርተዋል!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"ወደኋላ ተመለስ"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"ወደኋላ ለመመለስ በመዳሰሻ ሰሌዳው ላይ በየትኛውም ቦታ ሦስት ጣቶችን በመጠቀም ወደግራ ወይም ወደቀኝ ያንሸራትቱ።"</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"ሦስት ጣቶች ወደቀኝ እና ግራ ሲንቀሳቀሱ የሚያሳይ የመዳሰሻ ሰሌዳ"</string>
@@ -1386,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"ደረጃ %1$d ከ %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"የቤት ውስጥ ቁጥጥሮች"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"የቤት መቆጣጠሪያዎችዎን እንደ የገጸ ማያ አሳራፊ በፍጥነት ይድረሱባቸው"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-am/tiles_states_strings.xml b/packages/SystemUI/res/values-am/tiles_states_strings.xml
index a3c590c33a6f..8bad7ab52583 100644
--- a/packages/SystemUI/res/values-am/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-am/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"ጠፍቷል"</item>
<item msgid="4875147066469902392">"በርቷል"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"አይገኝም"</item>
<item msgid="5044688398303285224">"ጠፍቷል"</item>
diff --git a/packages/SystemUI/res/values-ar/strings.xml b/packages/SystemUI/res/values-ar/strings.xml
index f894a295d38c..b96793a38938 100644
--- a/packages/SystemUI/res/values-ar/strings.xml
+++ b/packages/SystemUI/res/values-ar/strings.xml
@@ -126,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"انقر لعرض التسجيل"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"حدث خطأ أثناء حفظ تسجيل محتوى الشاشة."</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"حدث خطأ في بدء تسجيل الشاشة"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"‏سيتم إيقاف تسجيل محتوى &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"إيقاف التسجيل"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"جارِ مشاركة محتوى الشاشة"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"هل تريد إيقاف مشاركة الشاشة؟"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"‏سيتم إيقاف مشاركة محتوى &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"جارٍ بثّ محتوى الشاشة"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"إيقاف المشاركة"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"جارٍ بث محتوى الشاشة"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"هل تريد إيقاف البث؟"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"‏سيتم إيقاف بث محتوى &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
+ <skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
+ <skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"إيقاف البث"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"إغلاق"</string>
<string name="issuerecord_title" msgid="286627115110121849">"مسجّلة المشاكل"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"يجري معالجة تسجيل المشكلة."</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"إشعار بنشاط مستمر في الخلفية لجلسة جمع البيانات حول المشكلة"</string>
@@ -161,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"حدث خطأ أثناء حفظ تسجيل المشكلة."</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"حدث خطأ أثناء بدء تسجيل المشكلة."</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"جارٍ العرض بملء الشاشة"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"للخروج، مرِّر سريعًا من أسفل الشاشة لأعلاها"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"حسنًا"</string>
<string name="accessibility_back" msgid="6530104400086152611">"رجوع"</string>
<string name="accessibility_home" msgid="5430449841237966217">"الرئيسية"</string>
@@ -295,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"شاشة الاستراحة"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"عدم الإزعاج"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"بلوتوث"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"لا يتوفر أي أجهزة مقترنة"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"انقر لربط جهاز أو إلغاء ربطه"</string>
@@ -306,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"محفوظ"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"إلغاء الربط"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"تفعيل"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"التفعيل تلقائيًا غدًا"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"‏يُستخدَم البلوتوث في ميزات مثل Quick Share و\"العثور على جهازي\""</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"سيتم تفعيل البلوتوث صباح الغد"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"مشاركة الصوت"</string>
@@ -476,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"إضافة المزيد من التطبيقات المصغّرة"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"اضغط مع الاستمرار لتخصيص التطبيقات المصغّرة."</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"تخصيص التطبيقات المصغَّرة"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"يجب فتح القفل لتخصيص التطبيقات المصغّرة"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"رمز التطبيق المصغّر غير المفعّل"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"رمز تطبيق مصغَّر جارٍ تثبيته"</string>
<string name="edit_widget" msgid="9030848101135393954">"تعديل التطبيق المصغَّر"</string>
@@ -496,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"اختيار التطبيق المصغّر"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"إزالة التطبيق المصغّر"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"إضافة التطبيق المصغّر المحدَّد"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"التطبيقات المصغّرة المصمَّمة لشاشة القفل"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"لفتح تطبيق باستخدام تطبيق مصغَّر، عليك إثبات هويتك. يُرجى ملاحظة أنّ أي شخص يمكنه الاطّلاع محتوى التطبيقات المصغَّرة، حتى وإن كان جهازك اللوحي مُقفلاً. بعض التطبيقات المصغّرة قد لا تكون مُصمَّمة لإضافتها إلى شاشة القفل، وقد يكون هذا الإجراء غير آمن."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"حسنًا"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"تبديل المستخدم"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"القائمة المنسدلة"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"سيتم حذف كل التطبيقات والبيانات في هذه الجلسة."</string>
@@ -723,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"تلقائية"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"تلقائي"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"بدون صوت أو اهتزاز"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"بدون صوت أو اهتزاز وتظهر في أسفل قسم المحادثات"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"يمكن إصدار رنين أو اهتزاز بناءً على إعدادات الجهاز"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"يمكن إصدار رنين أو اهتزاز بناءً على إعدادات الجهاز. تظهر المحادثات من \"<xliff:g id="APP_NAME">%1$s</xliff:g>\" كفقاعات تلقائيًا."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"السماح للنظام بتحديد ما إذا يجب اهتزاز الجهاز أو إصدار رنين عند تلقّي هذا الإشعار"</string>
@@ -780,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page Down"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Delete"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"الرئيسية"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -799,7 +811,7 @@
<string name="keyboard_shortcut_search_list_hint" msgid="5982623262974326746">"البحث في الاختصارات"</string>
<string name="keyboard_shortcut_search_list_no_result" msgid="6819302191660875501">"لم يُعثَر على اختصارات."</string>
<string name="keyboard_shortcut_search_category_system" msgid="1151182120757052669">"النظام"</string>
- <string name="keyboard_shortcut_search_category_input" msgid="5440558509904296233">"إدخال"</string>
+ <string name="keyboard_shortcut_search_category_input" msgid="5440558509904296233">"الإدخال"</string>
<string name="keyboard_shortcut_search_category_open_apps" msgid="1450959949739257562">"فتح التطبيقات"</string>
<string name="keyboard_shortcut_search_category_current_app" msgid="2011953559133734491">"التطبيق الحالي"</string>
<string name="keyboard_shortcut_a11y_show_search_results" msgid="2865241062981833705">"جارٍ عرض نتائج البحث"</string>
@@ -1362,20 +1374,18 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"تقسيم الشاشة"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"الإدخال"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"اختصارات التطبيقات"</string>
+ <string name="shortcut_helper_category_current_app_shortcuts" msgid="4017840565974573628">"التطبيق الحالي"</string>
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"تسهيل الاستخدام"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"اختصارات لوحة المفاتيح"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"اختصارات طلبات البحث"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"رمز التصغير"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"رمز التوسيع"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"أو"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"إيماءة الرجوع"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"إيماءة الانتقال إلى الشاشة الرئيسية"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"مفتاح الإجراء"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"تم"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"أحسنت."</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"رجوع"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"للرجوع، مرِّر سريعًا لليسار أو لليمين باستخدام ثلاثة أصابع في أي مكان على لوحة اللمس."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"لوحة لمس تعرض ثلاثة أصابع تتحرك يمينًا ويسارًا"</string>
@@ -1384,4 +1394,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"‏مستوى الإضاءة: %1$d من %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"إدارة المنزل آليًّا"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"يمكنك إدارة المنزل آليًّا بشكل سريع من شاشة الاستراحة"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-ar/tiles_states_strings.xml b/packages/SystemUI/res/values-ar/tiles_states_strings.xml
index a89650aa6e19..62a6816a5602 100644
--- a/packages/SystemUI/res/values-ar/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-ar/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"الميزة غير مفعّلة"</item>
<item msgid="4875147066469902392">"الميزة مفعّلة"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"الميزة غير متاحة"</item>
<item msgid="5044688398303285224">"الميزة غير مفعّلة"</item>
diff --git a/packages/SystemUI/res/values-as/strings.xml b/packages/SystemUI/res/values-as/strings.xml
index e8d788b6dc63..99c4326b6515 100644
--- a/packages/SystemUI/res/values-as/strings.xml
+++ b/packages/SystemUI/res/values-as/strings.xml
@@ -126,31 +126,27 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"চাবলৈ টিপক"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"ৰেকৰ্ড কৰা স্ক্ৰীন ছেভ কৰোঁতে আসোঁৱাহ হৈছে"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"স্ক্রীন ৰেকৰ্ড কৰা আৰম্ভ কৰোঁতে আসোঁৱাহ হৈছে"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
- <skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
- <skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"আপুনি &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; ৰেকৰ্ড কৰা বন্ধ কৰিব"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
- <skip />
+ <string name="screenrecord_stop_dialog_title" msgid="8716193661764511095">"ৰেকৰ্ডিং কৰা বন্ধ কৰিবনে?"</string>
+ <string name="screenrecord_stop_dialog_message" msgid="6262768207331626817">"বৰ্তমান আপুনি আপোনাৰ গোটেই স্ক্ৰীনখন ৰেকৰ্ড কৰি আছে"</string>
+ <string name="screenrecord_stop_dialog_message_specific_app" msgid="5995770227684523244">"বৰ্তমান আপুনি <xliff:g id="APP_NAME">%1$s</xliff:g> ৰেকৰ্ড কৰি আছে"</string>
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"ৰেকৰ্ডিং বন্ধ কৰক"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"স্ক্ৰীন শ্বেয়াৰ কৰি থকা হৈছে"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
- <skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
- <skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"আপুনি &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; শ্বেয়াৰ কৰা বন্ধ কৰিব"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
- <skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"স্ক্ৰীন কাষ্ট কৰি থকা হৈছে"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
- <skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
- <skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"আপুনি &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; কাষ্ট কৰা বন্ধ কৰিব"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
- <skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
- <skip />
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"স্ক্ৰীন শ্বেয়াৰ কৰা বন্ধ কৰিবনে?"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen_with_host_app" msgid="522823522115375414">"বৰ্তমান আপুনি আপোনাৰ গোটেই স্ক্ৰীনখন <xliff:g id="HOST_APP_NAME">%1$s</xliff:g>ৰ সৈতে শ্বেয়াৰ কৰি আছে"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen" msgid="5090115386271179270">"বৰ্তমান আপুনি আপোনাৰ গোটেই স্ক্ৰীনখন এটা এপৰ সৈতে শ্বেয়াৰ কৰি আছে"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_specific" msgid="5923772039347985172">"বৰ্তমান আপুনি <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> শ্বেয়াৰ কৰি আছে"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_generic" msgid="6681016774654578261">"বৰ্তমান আপুনি এটা এপ্ শ্বেয়াৰ কৰি আছে"</string>
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"শ্বেয়াৰ কৰা বন্ধ কৰক"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"স্ক্ৰীন কাষ্ট কৰি থকা হৈছে"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"কাষ্ট কৰা বন্ধ কৰিবনে?"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen_with_device" msgid="1474703115926205251">"বৰ্তমান আপুনি আপোনাৰ সম্পূৰ্ণ স্ক্ৰীনখন <xliff:g id="DEVICE_NAME">%1$s</xliff:g>ত কাষ্ট কৰি আছে"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen" msgid="8419219169553867625">"বৰ্তমান আপুনি আপোনাৰ সম্পূৰ্ণ স্ক্ৰীনখন আশে-পাশে থকা ডিভাইচ এটাত কাষ্ট কৰি আছে"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app_with_device" msgid="2715934698604085519">"বৰ্তমান আপুনি <xliff:g id="DEVICE_NAME">%2$s</xliff:g>ত <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> কাষ্ট কৰি আছে"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="8616103075630934513">"বৰ্তমান আপুনি আশে-পাশে থকা ডিভাইচ এটাত <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> কাষ্ট কৰি আছে"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic_with_device" msgid="9213582497852420203">"বৰ্তমান আপুনি <xliff:g id="DEVICE_NAME">%1$s</xliff:g>ত কাষ্ট কৰি আছে"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic" msgid="4100272100480415076">"বৰ্তমান আপুনি আশে-পাশে থকা ডিভাইচ এটাত কাষ্ট কৰি আছে"</string>
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"কাষ্ট বন্ধ কৰক"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"বন্ধ কৰক"</string>
<string name="issuerecord_title" msgid="286627115110121849">"সমস্যা ৰেকৰ্ডাৰ"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"সমস্যা ৰেকৰ্ড কৰি থকা হৈছে"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"সমস্যা সংগ্ৰহ কৰা এটা ছেশ্বনৰ বাবে চলিত জাননী"</string>
@@ -161,8 +157,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"সমস্যাৰ ৰেকৰ্ডিং ছেভ কৰাত আসোঁৱাহ"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"সমস্যাৰ ৰেকৰ্ডিং আৰম্ভ কৰোঁতে আসোঁৱাহ হৈছে"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"পূৰ্ণ স্ক্ৰীনত চাই আছে"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"বাহিৰ হ’বলৈ, আপোনাৰ স্ক্ৰীনখনৰ একেবাৰে ওপৰৰ পৰা তললৈ ছোৱাইপ কৰক"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"বুজি পালোঁ"</string>
<string name="accessibility_back" msgid="6530104400086152611">"উভতি যাওক"</string>
<string name="accessibility_home" msgid="5430449841237966217">"গৃহ পৃষ্ঠাৰ বুটাম"</string>
@@ -295,6 +290,7 @@
<string name="start_dreams" msgid="9131802557946276718">"স্ক্ৰীন ছেভাৰ"</string>
<string name="ethernet_label" msgid="2203544727007463351">"ইথাৰনেট"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"অসুবিধা নিদিব"</string>
+ <string name="quick_settings_modes_label" msgid="5407025818652750501">"অগ্ৰাধিকাৰপ্ৰাপ্ত ম’ড"</string>
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"ব্লুটুথ"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"কোনো যোৰা লগোৱা ডিভাইচ উপলব্ধ নহয়।"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"ডিভাইচ সংযোগ কৰিবলৈ অথবা সংযোগ বিচ্ছিন্ন কৰিবলৈ টিপক"</string>
@@ -306,8 +302,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"ছেভ কৰা হৈছে"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"সংযোগ বিচ্ছিন্ন কৰক"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"সক্ৰিয় কৰক"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"কাইলৈ স্বয়ংক্ৰিয়ভাৱে অন কৰক"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Quick Share আৰু Find My Deviceৰ দৰে সুবিধাসমূহে ব্লুটুথ ব্যৱহাৰ কৰে"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"কাইলৈ পুৱা ব্লুটুথ অন হ’ব"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"অডিঅ’ শ্বেয়াৰ কৰক"</string>
@@ -476,8 +471,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"অধিক ৱিজেট যোগ দিয়ক"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"ৱিজেট কাষ্টমাইজ কৰিবলৈ দীঘলীয়াকৈ টিপক"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"ৱিজেট কাষ্টমাইজ কৰক"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"ৱিজেট কাষ্টমাইজ কৰিবলৈ আনলক কৰক"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"অক্ষম কৰা ৱিজেটৰ বাবে এপৰ চিহ্ন"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"ইনষ্টল কৰি থকা এটা ৱিজেটৰ বাবে এপৰ চিহ্ন"</string>
<string name="edit_widget" msgid="9030848101135393954">"ৱিজেট সম্পাদনা কৰক"</string>
@@ -496,12 +490,11 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"ৱিজেট বাছনি কৰক"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"ৱিজেট আঁতৰাওক"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"বাছনি কৰা ৱিজেটটো ৰাখক"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
- <skip />
+ <string name="communal_widget_picker_title" msgid="1953369090475731663">"লক স্ক্ৰীনৰ ৱিজেট"</string>
+ <string name="communal_widget_picker_description" msgid="490515450110487871">"আপোনাৰ টেবলেটটো লক কৰি ৰাখিলেও যিকোনো লোকে আপোনাৰ লক স্ক্ৰীনত ৱিজেট চাব পাৰে।"</string>
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"লক স্ক্ৰীন ৱিজেট"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"এটা ৱিজেট ব্যৱহাৰ কৰি কোনো এপ্ খুলিবলৈ, এয়া আপুনিয়েই বুলি সত্যাপন পৰীক্ষা কৰিব লাগিব। লগতে, মনত ৰাখিব যে যিকোনো লোকেই সেইবোৰ চাব পাৰে, আনকি আপোনাৰ টেবলেটটো লক হৈ থাকিলেও। কিছুমান ৱিজেট হয়তো আপোনাৰ লক স্ক্ৰীনৰ বাবে কৰা হোৱা নাই আৰু ইয়াত যোগ কৰাটো অসুৰক্ষিত হ’ব পাৰে।"</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"বুজি পালোঁ"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"ব্যৱহাৰকাৰী সলনি কৰক"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"পুল-ডাউনৰ মেনু"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"এই ছেশ্বনৰ আটাইবোৰ এপ্ আৰু ডেটা মচা হ\'ব।"</string>
@@ -723,7 +716,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"ডিফ’ল্ট"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"স্বয়ংক্ৰিয়"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"কোনো ধ্বনি অথবা কম্পন নাই"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"কোনো ধ্বনি অথবা কম্পন নাই আৰু বাৰ্তালাপ শাখাটোৰ তলৰ অংশত দেখা পোৱা যায়"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"ডিভাইচৰ ছেটিঙৰ ওপৰত নিৰ্ভৰ কৰি ৰিং কৰিব অথবা কম্পন হ’ব পাৰে"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"ডিভাইচৰ ছেটিঙৰ ওপৰত নিৰ্ভৰ কৰি ৰিং কৰিব অথবা কম্পন হ’ব পাৰে। <xliff:g id="APP_NAME">%1$s</xliff:g>ৰ বাৰ্তালাপ ডিফ’ল্টভাৱে বাবল হিচাপে প্ৰদৰ্শিত হয়।"</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"এই জাননীটোৱে ধ্বনি নে কম্পন সৃষ্টি কৰিব সেয়া ছিষ্টেমটোক নিৰ্ধাৰণ কৰিবলৈ দিয়ক"</string>
@@ -780,6 +774,7 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"পেজ আপ"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"পেজ ডাউন"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"মচক"</string>
+ <string name="keyboard_key_esc" msgid="6230365950511411322">"এস্কে’প"</string>
<string name="keyboard_key_move_home" msgid="3496502501803911971">"হ\'ম"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"সমাপ্ত"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"ভৰাওক"</string>
@@ -1362,20 +1357,18 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"বিভাজিত স্ক্ৰীন"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"ইনপুট"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"এপ্ শ্বৰ্টকাটসমূহ"</string>
+ <string name="shortcut_helper_category_current_app_shortcuts" msgid="4017840565974573628">"বৰ্তমানৰ এপ্‌"</string>
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"সাধ্য সুবিধা"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"কীব’ৰ্ডৰ শ্বৰ্টকাট"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"সন্ধানৰ শ্বৰ্টকাট"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"সংকোচন কৰাৰ চিহ্ন"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"বিস্তাৰ কৰাৰ চিহ্ন"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"অথবা"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"উভতি যাওক নিৰ্দেশ"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"গৃহ স্ক্ৰীনলৈ যোৱাৰ নিৰ্দেশ"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"কাৰ্য কী"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"হ’ল"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"বঢ়িয়া!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"উভতি যাওক"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"উভতি যাবলৈ, টাচ্চপেডৰ যিকোনো স্থানত তিনিটা আঙুলি ব্যৱহাৰ কৰি বাওঁ বা সোঁফালে ছোৱাইপ কৰক।"</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"তিনিটা আঙুলি সোঁ আৰু বাওঁফালে লৰচৰ কৰা দেখুওৱা টাচ্চপেড"</string>
@@ -1384,4 +1377,5 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"%2$dৰ %1$d স্তৰ"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"ঘৰৰ সা-সৰঞ্জামৰ নিয়ন্ত্ৰণ"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"স্ক্ৰীনছেভাৰ হিচাপে ক্ষিপ্ৰতাৰে ঘৰৰ সা-সৰঞ্জামৰ নিয়ন্ত্ৰণ এক্সেছ কৰক"</string>
+ <string name="volume_undo_action" msgid="5815519725211877114">"আনডু কৰক"</string>
</resources>
diff --git a/packages/SystemUI/res/values-as/tiles_states_strings.xml b/packages/SystemUI/res/values-as/tiles_states_strings.xml
index e978fe279a6e..fdd1f103674d 100644
--- a/packages/SystemUI/res/values-as/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-as/tiles_states_strings.xml
@@ -56,6 +56,11 @@
<item msgid="5376619709702103243">"অফ আছে"</item>
<item msgid="4875147066469902392">"অন কৰা আছে"</item>
</string-array>
+ <string-array name="tile_states_modes">
+ <item msgid="7764936419245199023">"উপলব্ধ নহয়"</item>
+ <item msgid="2004750556637773692">"অফ আছে"</item>
+ <item msgid="8968530753931637871">"অন আছে"</item>
+ </string-array>
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"উপলব্ধ নহয়"</item>
<item msgid="5044688398303285224">"অফ আছে"</item>
diff --git a/packages/SystemUI/res/values-az/strings.xml b/packages/SystemUI/res/values-az/strings.xml
index 3476f11616ba..e2ca41b6f61d 100644
--- a/packages/SystemUI/res/values-az/strings.xml
+++ b/packages/SystemUI/res/values-az/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> bu skrinşotu aşkarladı."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> və digər açıq tətbiqlər bu skrinşotu aşkarladı."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Qeydə əlavə edin"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Keçid daxil edin"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Ekran yazıcısı"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Ekran çəkilişi emal edilir"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Ekranın video çəkimi ərzində silinməyən bildiriş"</string>
@@ -127,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Baxmaq üçün toxunun"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Ekran çəkimini yadda saxlayarkən xəta oldu"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Ekranın yazılması ilə bağlı xəta"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; tətbiqinin çəkilməsini dayandıracaqsınız"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Qeydəalmanı dayandırın"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Ekran paylaşılır"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Ekran paylaşımı dayandırılsın?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; tətbiqinin paylaşılmasını dayandıracaqsınız"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Paylaşımı dayandırın"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Ekran yayımlanır"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Yayım dayandırılsın?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Ekran yayımlanır"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; tətbiqinin yayımlanmasını dayandıracaqsınız"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Yayımı dayandırın"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Bağlayın"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Problem qeydə alan"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Problem qeydi emal edilir"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Problemin əldə edilməsi sessiyası üçün davam edən bildiriş"</string>
@@ -162,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Problem qeydini yadda saxlayarkən xəta"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Problemi qeydə almağa başlayarkən xəta"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Tam ekran rejimi"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Çıxmaq üçün ekranın yuxarısından aşağı çəkin"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"Anladım"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Geri"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Ana səhifə"</string>
@@ -196,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Üz ilə kiliddən çıxarılıb. Davam etmək üçün basın."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Üz tanınıb. Davam etmək üçün basın."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Üz tanınıb. \"Kiliddən çıxar\" ikonasına basıb davam edin."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Üz ilə kiliddən çıxarılıb. Davam etmək üçün toxunun."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Doğrulandı"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"İdentifikasiyanı ləğv edin"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Digər seçimlər"</string>
@@ -297,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Ekran qoruyucu"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Narahat etməyin"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Heç bir cütlənmiş cihaz əlçatan deyil"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Toxunaraq cihaza qoşulun, yaxud əlaqəni ayırın"</string>
@@ -308,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Yadda saxlandı"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"əlaqəni kəsin"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"aktivləşdirin"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Sabah avtomatik aktiv edin"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Cəld Paylaşım və Cihazın Tapılması kimi funksiyalar Bluetooth istifadə edir"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bluetooth sabah səhər aktiv ediləcək"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Audio paylaşın"</string>
@@ -478,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Vidcetlər əlavə edin"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Basıb saxlayaraq vidcetləri fərdiləşdirin"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Vidcetləri fərdiləşdirin"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Vidcetləri fərdiləşdirmək üçün kiliddən çıxarın"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Deaktiv edilmiş vidcet üçün tətbiq ikonası"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Quraşdırılan vidcet üçün tətbiq ikonası"</string>
<string name="edit_widget" msgid="9030848101135393954">"Vidceti redaktə edin"</string>
@@ -498,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"vidcet seçin"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"vidceti silin"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"seçilmiş vidceti yerləşdirin"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Kilid ekranı vidcetləri"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Vidcetdən istifadə edərək tətbiqi açmaq üçün kimliyi doğrulamalısınız. Planşet kilidli olsa da, hər kəs vidcetlərə baxa bilər. Bəzi vidcetlər kilid ekranı üçün nəzərdə tutulmayıb və bura əlavə etmək təhlükəli ola bilər."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"Anladım"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Switch user"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"aşağı çəkilən menyu"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Bu sessiyada bütün tətbiqlər və data silinəcək."</string>
@@ -725,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Defolt"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Avtomatik"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Səs və ya vibrasiya yoxdur"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Söhbət siyahısının aşağısında səssiz və vibrasiyasız görünür"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Cihaz ayarlarına əsasən zəng çala və ya vibrasiya edə bilər"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Cihaz ayarlarına əsasən zəng çala və ya vibrasiya edə bilər. <xliff:g id="APP_NAME">%1$s</xliff:g> tətbiqindən söhbətlərdə defolt olaraq qabarcıq çıxır."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Bu bildirişin səs çıxarması və ya vibrasiya etməsi sistem tərəfindən təyin edilsin"</string>
@@ -782,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Yuxarı Səhifə"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Aşağı Səhifə"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Silin"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"Son"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Daxil edin"</string>
@@ -1364,20 +1374,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Bölünmüş ekran"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Daxiletmə"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Tətbiq qısayolları"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Xüsusi imkanlar"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Klaviatura qısayolları"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Axtarış qısayolları"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"İkonanı yığcamlaşdırın"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"İkonanı genişləndirin"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"və ya"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Geri jesti"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Əsas ekran jesti"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Əməliyyat düyməsi"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Hazırdır"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Əla!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Geri qayıdın"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Geri qayıtmaq üçün taçpedin istənilən yerində üç barmaqla sola və ya sağa çəkin."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Üç barmağın sağa və sola hərəkət etdiyini göstərən taçped"</string>
@@ -1386,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Səviyyə %1$d/%2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Ev nizamlayıcıları"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Ekran qoruyucu kimi ev nizamlayıcılarına tez giriş"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-az/tiles_states_strings.xml b/packages/SystemUI/res/values-az/tiles_states_strings.xml
index c24f4029e415..da6d2177f8d5 100644
--- a/packages/SystemUI/res/values-az/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-az/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Deaktiv"</item>
<item msgid="4875147066469902392">"Aktiv"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Əlçatan deyil"</item>
<item msgid="5044688398303285224">"Deaktiv"</item>
diff --git a/packages/SystemUI/res/values-b+sr+Latn/strings.xml b/packages/SystemUI/res/values-b+sr+Latn/strings.xml
index e880a8b2d531..3a7cc669a273 100644
--- a/packages/SystemUI/res/values-b+sr+Latn/strings.xml
+++ b/packages/SystemUI/res/values-b+sr+Latn/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"Aplikacija <xliff:g id="APPNAME">%1$s</xliff:g> je otkrila ovaj snimak ekrana."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> i druge otvorene aplikacije su otkrile ovaj snimak ekrana."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Dodaj u belešku"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Uvrsti link"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Snimač ekrana"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Obrađujemo video snimka ekrana"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Obaveštenje o sesiji snimanja ekrana je aktivno"</string>
@@ -127,31 +126,27 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Dodirnite da biste pregledali"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Greška pri čuvanju snimka ekrana"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Greška pri pokretanju snimanja ekrana"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
- <skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
- <skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Zaustavićete snimanje za: &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
- <skip />
+ <string name="screenrecord_stop_dialog_title" msgid="8716193661764511095">"Želite da zaustavite snimanje?"</string>
+ <string name="screenrecord_stop_dialog_message" msgid="6262768207331626817">"Trenutno snimate ceo ekran"</string>
+ <string name="screenrecord_stop_dialog_message_specific_app" msgid="5995770227684523244">"Trenutno snimate: <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Zaustavi snimanje"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Ekran se deli"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
- <skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
- <skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Zaustavićete deljenje za: &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
- <skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Prebacuje se ekran"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
- <skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
- <skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Zaustavićete prebacivanje za: &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
- <skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
- <skip />
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Želite da zaustavite deljenje ekrana?"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen_with_host_app" msgid="522823522115375414">"Trenutno delite ceo ekran sa: <xliff:g id="HOST_APP_NAME">%1$s</xliff:g>"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen" msgid="5090115386271179270">"Trenutno delite ceo ekran sa aplikacijom"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_specific" msgid="5923772039347985172">"Trenutno delite: <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g>"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_generic" msgid="6681016774654578261">"Trenutno delite aplikaciju"</string>
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Zaustavi deljenje"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Prebacuje se ekran"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Želite da zaustavite prebacivanje?"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen_with_device" msgid="1474703115926205251">"Trenutno prebacujete ceo ekran na: <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen" msgid="8419219169553867625">"Trenutno prebacujete ceo ekran na uređaj u blizini"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app_with_device" msgid="2715934698604085519">"<xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> se trenutno prebacuje na: <xliff:g id="DEVICE_NAME">%2$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="8616103075630934513">"<xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> se trenutno prebacuje na uređaj u blizini"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic_with_device" msgid="9213582497852420203">"Trenutno prebacujete na: <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic" msgid="4100272100480415076">"Trenutno prebacujete na uređaj u blizini"</string>
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Zaustavi prebacivanje"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Zatvori"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Snimač problema"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Obrađuje se snimak problema"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"obaveštenje o aktivnosti u toku za sesiju prikupljanja podataka o problemu"</string>
@@ -162,8 +157,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Greška pri čuvanju snimka problema"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Greška pri pokretanju snimanja problema"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Prikazuje se ceo ekran"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Da biste zatvorili, prevucite nadole od vrha ekrana"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"Važi"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Nazad"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Početna"</string>
@@ -196,8 +190,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Otključano je licem. Pritisnite da biste nastavili."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Lice je prepoznato. Pritisnite da biste nastavili."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Lice prepoznato. Pritisnite ikonu otključavanja za nastavak."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Otključano je licem. Dodirnite da biste nastavili."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Identitet je potvrđen"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Otkažite potvrdu identiteta"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Još opcija"</string>
@@ -297,6 +290,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Čuvar ekrana"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Eternet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Ne uznemiravaj"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Nije dostupan nijedan upareni uređaj"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Dodirnite da biste povezali uređaj ili prekinuli vezu"</string>
@@ -308,8 +303,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Sačuvano"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"prekinite vezu"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"aktivirajte"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Automatski uključi sutra"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Funkcije kao što su Quick Share i Pronađi moj uređaj koriste Bluetooth"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bluetooth će se uključiti sutra ujutru"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Deli zvuk"</string>
@@ -478,8 +472,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Dodajte još vidžeta"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Dugi pritisak za prilagođavanje vidžeta"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Prilagodi vidžete"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Otključajte da biste prilagodili vidžete"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Ikona aplikacije za onemogućen vidžet"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Ikona aplikacije za vidžet koji se instalira"</string>
<string name="edit_widget" msgid="9030848101135393954">"Izmeni vidžet"</string>
@@ -498,12 +491,11 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"izaberite vidžet"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"uklonite vidžet"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"postavite izabrani vidžet"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
- <skip />
+ <string name="communal_widget_picker_title" msgid="1953369090475731663">"Vidžeti za zaključani ekran"</string>
+ <string name="communal_widget_picker_description" msgid="490515450110487871">"Svi mogu da vide vedžete na zaključanom ekranu, čak i kada je tablet zaključan."</string>
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Vidžeti za zaključani ekran"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Da biste otvorili aplikaciju koja koristi vidžet, treba da potvrdite da ste to vi. Imajte u vidu da svako može da ga vidi, čak i kada je tablet zaključan. Neki vidžeti možda nisu namenjeni za zaključani ekran i možda nije bezbedno da ih tamo dodate."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"Važi"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Zameni korisnika"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"padajući meni"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Sve aplikacije i podaci u ovoj sesiji će biti izbrisani."</string>
@@ -725,7 +717,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Podrazumevano"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Automatska"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Bez zvuka i vibriranja"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Bez zvuka i vibriranja i prikazuje se u nastavku odeljka za konverzacije"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Može da zvoni ili vibrira u zavisnosti od podešavanja uređaja"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Može da zvoni ili vibrira u zavisnosti od podešavanja uređaja. Konverzacije iz aplikacije <xliff:g id="APP_NAME">%1$s</xliff:g> podrazumevano se prikazuju u oblačićima."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Neka sistem utvrdi da li ovo obaveštenje treba da emituje zvuk ili da vibrira"</string>
@@ -782,6 +775,7 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Taster za stranicu nagore"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Taster za stranicu nadole"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Taster za brisanje"</string>
+ <string name="keyboard_key_esc" msgid="6230365950511411322">"Esc"</string>
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Taster Početna"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"Taster za kraj"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Taster za umetanje"</string>
@@ -1364,20 +1358,18 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Podeljeni ekran"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Unos"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Prečice za aplikacije"</string>
+ <string name="shortcut_helper_category_current_app_shortcuts" msgid="4017840565974573628">"Aktuelna aplikacija"</string>
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Pristupačnost"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Tasterske prečice"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Prečice pretrage"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Ikona za skupljanje"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Ikona za proširivanje"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"ili"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Pokret za vraćanje"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Pokret za početnu stranicu"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Taster radnji"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Gotovo"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Odlično!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Nazad"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Da biste se vratili, prevucite ulevo ili udesno sa tri prsta bilo gde na tačpedu."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Tačped sa prikazom tri prsta koji se pomeraju udesno i ulevo"</string>
@@ -1386,4 +1378,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"%1$d. nivo od %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Kontrole za dom"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Brz pristup kontrolama za dom kao čuvaru ekrana"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-b+sr+Latn/tiles_states_strings.xml b/packages/SystemUI/res/values-b+sr+Latn/tiles_states_strings.xml
index df0b78664cba..6833c27c4208 100644
--- a/packages/SystemUI/res/values-b+sr+Latn/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-b+sr+Latn/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Isključeno"</item>
<item msgid="4875147066469902392">"Uključeno"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Nedostupno"</item>
<item msgid="5044688398303285224">"Isključeno"</item>
diff --git a/packages/SystemUI/res/values-be/strings.xml b/packages/SystemUI/res/values-be/strings.xml
index 995424688283..72808664ea85 100644
--- a/packages/SystemUI/res/values-be/strings.xml
+++ b/packages/SystemUI/res/values-be/strings.xml
@@ -126,31 +126,27 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Націсніце для прагляду"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Памылка захавання запісу экрана"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Памылка пачатку запісу экрана"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
- <skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
- <skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Запіс з праграмы &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; будзе спынены"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
- <skip />
+ <string name="screenrecord_stop_dialog_title" msgid="8716193661764511095">"Спыніць запіс?"</string>
+ <string name="screenrecord_stop_dialog_message" msgid="6262768207331626817">"Зараз вы запісваеце змесціва ўсяго экрана"</string>
+ <string name="screenrecord_stop_dialog_message_specific_app" msgid="5995770227684523244">"Зараз вы запісваеце змесціва праграмы \"<xliff:g id="APP_NAME">%1$s</xliff:g>\""</string>
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Спыніць запіс"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Экран абагульваецца"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
- <skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
- <skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Абагульванне з праграмы &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; будзе спынена"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
- <skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Экран трансліруецца"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
- <skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
- <skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Трансляцыя праграмы &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; будзе спынена"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
- <skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
- <skip />
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Спыніць абагульванне экрана?"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen_with_host_app" msgid="522823522115375414">"Зараз вы абагульваеце змесціва ўсяго экрана з праграмай \"<xliff:g id="HOST_APP_NAME">%1$s</xliff:g>\""</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen" msgid="5090115386271179270">"Зараз вы абагульваеце змесціва ўсяго экрана з праграмай"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_specific" msgid="5923772039347985172">"Зараз вы абагульваеце змесціва праграмы \"<xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g>\""</string>
+ <string name="share_to_app_stop_dialog_message_single_app_generic" msgid="6681016774654578261">"Зараз вы абагульваеце змесціва праграмы"</string>
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Спыніць абагульванне"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Экран трансліруецца"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Спыніць трансляцыю?"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen_with_device" msgid="1474703115926205251">"Зараз вы трансліруеце змесціва ўсяго экрана на прыладу \"<xliff:g id="DEVICE_NAME">%1$s</xliff:g>\""</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen" msgid="8419219169553867625">"Зараз вы трансліруеце змесціва ўсяго экрана на прыладу паблізу"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app_with_device" msgid="2715934698604085519">"Зараз вы трансліруеце змесціва праграмы \"<xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g>\" на прыладу \"<xliff:g id="DEVICE_NAME">%2$s</xliff:g>\""</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="8616103075630934513">"Зараз вы трансліруеце змесціва праграмы \"<xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g>\" на прыладу паблізу"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic_with_device" msgid="9213582497852420203">"Зараз вы трансліруеце змесціва на прыладу \"<xliff:g id="DEVICE_NAME">%1$s</xliff:g>\""</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic" msgid="4100272100480415076">"Зараз вы трансліруеце змесціва на прыладу паблізу"</string>
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Спыніць трансляцыю"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Закрыць"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Запіс праблемы"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Ідзе апрацоўка запісу праблемы"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Бягучае апавяшчэнне пра сеанс збору даных аб праблеме"</string>
@@ -161,8 +157,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Пры захаванні запісу праблемы адбылася памылка"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Пры спробе пачаць запіс праблемы адбылася памылка"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Прагляд у поўнаэкранным рэжыме"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Каб выйсці, правядзіце пальцам уніз ад верхняга краю экрана"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"Зразумела"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Назад"</string>
<string name="accessibility_home" msgid="5430449841237966217">"На Галоўную старонку"</string>
@@ -295,6 +290,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Экранная застаўка"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Не турбаваць"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Няма даступных спалучаных прылад"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Націсніце, каб падключыць або адключыць прыладу"</string>
@@ -306,8 +303,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Захавана"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"адключыць"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"актываваць"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Аўтаматычна ўключыць заўтра"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Bluetooth выкарыстоўваецца такімі функцыямі і сэрвісамі, як Хуткае абагульванне і Знайсці прыладу"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bluetooth уключыцца заўтра раніцай"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Абагуліць аўдыя"</string>
@@ -476,8 +472,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Дадаць іншыя віджэты"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Доўга націскайце, каб наладзіць віджэты"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Наладзіць віджэты"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Разблакіруйце, каб наладзіць віджэты"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Значок праграмы для адключанага віджэта"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Значок праграмы для віджэта ў працэсе ўсталявання"</string>
<string name="edit_widget" msgid="9030848101135393954">"Змяніць віджэт"</string>
@@ -496,12 +491,11 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"выбраць віджэт"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"выдаліць віджэт"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"размясціць выбраны віджэт"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
- <skip />
+ <string name="communal_widget_picker_title" msgid="1953369090475731663">"Віджэты на экране блакіроўкі"</string>
+ <string name="communal_widget_picker_description" msgid="490515450110487871">"Віджэты на экране блакіроўкі будуць бачныя, нават калі планшэт заблакіраваны."</string>
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Віджэты на экране блакіроўкі"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Каб адкрыць праграму з дапамогай віджэта, вам неабходна будзе пацвердзіць сваю асобу. Таксама памятайце, што такія віджэты могуць пабачыць іншыя людзі, нават калі экран планшэта заблакіраваны. Некаторыя віджэты могуць не падыходзіць для выкарыстання на экране блакіроўкі, і дадаваць іх сюды можа быць небяспечна."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"Зразумела"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Перайсці да іншага карыстальніка"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"высоўнае меню"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Усе праграмы і даныя гэтага сеанса будуць выдалены."</string>
@@ -723,7 +717,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Стандартна"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Аўтаматычна"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Без гуку ці вібрацыі"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Паказваецца без гуку ці вібрацыі ў раздзеле размоў"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"У залежнасці ад налад прылады магчымы званок або вібрацыя"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"У залежнасці ад налад прылады магчымы званок або вібрацыя. Размовы ў праграме \"<xliff:g id="APP_NAME">%1$s</xliff:g>\" стандартна паяўляюцца ў выглядзе ўсплывальных апавяшчэнняў."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Сістэма сама будзе вызначаць, ці трэба для гэтага апавяшчэння ўключаць гук або вібрацыю"</string>
@@ -780,6 +775,7 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page Down"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Delete"</string>
+ <string name="keyboard_key_esc" msgid="6230365950511411322">"Esc"</string>
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1362,20 +1358,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Падзелены экран"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Увод"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Ярлыкі праграм"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Спецыяльныя магчымасці"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Спалучэнні клавіш"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Пошук спалучэнняў клавіш"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Значок \"Згарнуць\""</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Значок \"Разгарнуць\""</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"або"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Жэст для вяртання на папярэдні экран"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Жэст для вяртання на галоўны экран"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Клавіша дзеяння"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Гатова"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Цудоўна!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Назад"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Каб вярнуцца на папярэдні экран, правядзіце трыма пальцамі ўлева або ўправа ў любым месцы сэнсарнай панэлі."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Паказваецца, як на сэнсарнай панэлі тры пальцы рухаюцца ўправа і ўлева"</string>
@@ -1384,4 +1379,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Узровень %1$d з %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Кіраванне домам"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Хуткі доступ да кіравання домам на застаўцы"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-be/tiles_states_strings.xml b/packages/SystemUI/res/values-be/tiles_states_strings.xml
index 33e704cae0b1..4cc09a756431 100644
--- a/packages/SystemUI/res/values-be/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-be/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Выключана"</item>
<item msgid="4875147066469902392">"Уключана"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Недаступна"</item>
<item msgid="5044688398303285224">"Выключана"</item>
diff --git a/packages/SystemUI/res/values-bg/strings.xml b/packages/SystemUI/res/values-bg/strings.xml
index bb5986d02de9..5ac0be0c6e0d 100644
--- a/packages/SystemUI/res/values-bg/strings.xml
+++ b/packages/SystemUI/res/values-bg/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> установи заснемането на тази екранна снимка."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> и други отворени приложения установиха заснемането на тази екранна снимка."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Добавяне към бележката"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Включване на връзката"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Запис на екрана"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Записът на екрана се обработва"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Текущо известие за сесия за записване на екрана"</string>
@@ -127,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Докоснете за преглед"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Грешка при запазването на записа на екрана"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"При стартирането на записа на екрана възникна грешка"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Ще спрете да записвате &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Спиране на записа"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Екранът се споделя"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Да се спре ли споделянето на екрана?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Ще спрете да споделяте &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Спиране на споделянето"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Екранът се предава"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Да се спре ли предаването?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Екранът се предава"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Ще спрете да предавате &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Спиране на предаването"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Затваряне"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Записване на проблем"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Записът се обработва"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Текущо известие за сесия за събиране на данни за проблем"</string>
@@ -162,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Грешка при запазването на записа на проблема"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Грешка при стартирането на записа на проблема"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Изглед на цял екран"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"За изход плъзнете надолу от горната част на екрана"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"Разбрах"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Назад"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Начало"</string>
@@ -196,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Отключено с лице. Натиснете, за да продължите."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Лицето бе разпознато. Натиснете, за да продължите."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Лицето бе разпознато. Продължете чрез иконата за отключване."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Отключено с лице. Докоснете, за да продължите."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Удостоверено"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Анулиране на удостоверяването"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Още опции"</string>
@@ -297,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Скрийнсейвър"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Не безпокойте"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Няма налични сдвоени устройства"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Докоснете, за да свържете устройство или да прекъснете връзката му"</string>
@@ -308,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Запазено"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"прекратяване на връзката"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"активиране"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Автоматично включване утре"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Функции като „Бързо споделяне“ и „Намиране на устройството ми“ използват Bluetooth"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bluetooth ще се включи утре сутрин"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Споделяне на звука"</string>
@@ -478,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Добавете още приспособления"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Натиснете продължително за персонализ. на приспос."</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Персонализиране на приспособленията"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Отключете, за да персонализирате приспособленията"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Икона на приложение за деактивирано приспособление"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Икона на приложение, чието приспособление се инсталира"</string>
<string name="edit_widget" msgid="9030848101135393954">"Редактиране на приспособлението"</string>
@@ -498,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"избиране на приспособление"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"премахване на приспособлението"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"поставяне на избраното приспособление"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Приспособления за заключения екран"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"За да отворите дадено приложение посредством приспособление, ще трябва да потвърдите, че това сте вие. Също така имайте предвид, че всеки ще вижда приспособленията дори когато таблетът ви е заключен. Възможно е някои от тях да не са предназначени за заключения екран и добавянето им на него може да е опасно."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"Разбрах"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Превключване между потребителите"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"падащо меню"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Всички приложения и данни в тази сесия ще бъдат изтрити."</string>
@@ -725,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Стандартно"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Автоматично"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Без звук или вибриране"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Без звук или вибриране и се показва по-долу в секцията с разговори"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Може да звъни или да вибрира въз основа на настройките на устройството"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Може да звъни или да вибрира въз основа на настройките на устройството. Разговорите от <xliff:g id="APP_NAME">%1$s</xliff:g> се показват като балончета по подразбиране."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Нека системата да определя дали дадено известие да се придружава от звук, или вибриране"</string>
@@ -782,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Страница нагоре"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Страница надолу"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Изтриване"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1364,20 +1374,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Разделен екран"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Въвеждане"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Преки пътища към приложения"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Достъпност"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Клавишни комбинации"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Търсете клавишни комбинации"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Икона за свиване"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Икона за разгъване"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"или"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Жест за връщане назад"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Жест за преминаване към началния екран"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Клавиш за действия"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Готово"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Отлично!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Назад"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"За да се върнете назад, прекарайте три пръста наляво или надясно по сензорния панел."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Сензорен панел, върху който три пръста се движат надясно и наляво"</string>
@@ -1386,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Ниво %1$d от %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Контроли за дома"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Достъп до контролите за дома ви като скрийнсейвър"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-bg/tiles_states_strings.xml b/packages/SystemUI/res/values-bg/tiles_states_strings.xml
index e2fd65360020..92db27957f48 100644
--- a/packages/SystemUI/res/values-bg/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-bg/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Изкл."</item>
<item msgid="4875147066469902392">"Вкл."</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Не е налице"</item>
<item msgid="5044688398303285224">"Изкл."</item>
diff --git a/packages/SystemUI/res/values-bn/strings.xml b/packages/SystemUI/res/values-bn/strings.xml
index 716fee2d0107..fa38ac3f2dca 100644
--- a/packages/SystemUI/res/values-bn/strings.xml
+++ b/packages/SystemUI/res/values-bn/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g>, এই স্ক্রিনশট শনাক্ত করেছে।"</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> এবং খোলা থাকা অন্য অ্যাপ এই স্ক্রিনশট শনাক্ত করেছে।"</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"নোটে যোগ করুন"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"লিঙ্ক যোগ করুন"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"স্ক্রিন রেকর্ডার"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"স্ক্রিন রেকর্ডিং প্রসেস হচ্ছে"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"স্ক্রিন রেকর্ডিং সেশন চলার বিজ্ঞপ্তি"</string>
@@ -127,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"দেখতে ট্যাপ করুন"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"স্ক্রিন রেকর্ডিং সেভ করার সময় কোনও সমস্যা হয়েছে"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"স্ক্রিন রেকর্ডিং শুরু করার সময় সমস্যা হয়েছে"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"এটির জন্য &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; অ্যাপের কন্টেন্ট রেকর্ড হওয়া বন্ধ হয়ে যাবে"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"রেকর্ড করা বন্ধ করুন"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"স্ক্রিন শেয়ার করা হচ্ছে"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"স্ক্রিন শেয়ার করা বন্ধ করবেন?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"এটির জন্য &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; অ্যাপের কন্টেন্ট শেয়ার করা বন্ধ হয়ে যাবে"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"শেয়ার করা বন্ধ করুন"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"স্ক্রিন কাস্ট করা হচ্ছে"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"কাস্ট করা বন্ধ করবেন?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"স্ক্রিন কাস্ট করা হচ্ছে"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"এটির জন্য &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; অ্যাপের কন্টেন্ট কাস্ট হওয়া বন্ধ হয়ে যাবে"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"কাস্টিং বন্ধ করুন"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"বন্ধ করুন"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Recorder-এ সমস্যা হয়েছে"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"সমস্যা সংক্রান্ত রেকর্ডিং প্রসেস করা হচ্ছে"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"সমস্যা সংগ্রহ সেশনের জন্য অনগোইং নোটিফিকেশন"</string>
@@ -162,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"সমস্যা সংক্রান্ত রেকর্ডিং সেভ করার সময় সমস্যা হয়েছে"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"সমস্যা সংক্রান্ত রেকর্ডিং শুরু করতে সমস্যা হয়েছে"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"ফুল-স্ক্রিনে দেখা হচ্ছে"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"বেরিয়ে আসতে, আপনার স্ক্রিনের একেবারে উপর থেকে নিচের দিকে সোয়াইপ করুন"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"বুঝেছি"</string>
<string name="accessibility_back" msgid="6530104400086152611">"ফিরুন"</string>
<string name="accessibility_home" msgid="5430449841237966217">"হোম"</string>
@@ -196,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"ফেসের সাহায্যে আনলক করা হয়েছে। চালিয়ে যেতে প্রেস করুন।"</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"ফেস শনাক্ত করা হয়েছে। চালিয়ে যেতে প্রেস করুন।"</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"ফেস শনাক্ত করা হয়েছে। চালিয়ে যেতে আনলক আইকন প্রেস করুন।"</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"ফেসের সাহায্যে আনলক করা হয়েছে। চালিয়ে যেতে ট্যাপ করুন।"</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"প্রমাণীকৃত"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"যাচাইকরণ বাতিল করুন"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"আরও বিকল্প"</string>
@@ -297,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"স্ক্রিন সেভার"</string>
<string name="ethernet_label" msgid="2203544727007463351">"ইথারনেট"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"বিরক্ত করবে না"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"ব্লুটুথ"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"চেনা কোনও ডিভাইস নেই"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"কোনও ডিভাইস কানেক্ট বা ডিসকানেক্ট করতে ট্যাপ করুন"</string>
@@ -308,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"সেভ করা আছে"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"ডিসকানেক্ট করুন"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"চালু করুন"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"আগামীকাল অটোমেটিক চালু হয়ে যাবে"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"দ্রুত শেয়ার ও Find My Device-এর মতো ফিচার ব্লুটুথ ব্যবহার করে"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"ব্লুটুথ আগামীকাল সকালে চালু হয়ে যাবে"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"অডিও শেয়ার করুন"</string>
@@ -478,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"আরও উইজেট যোগ করুন"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"উইজেট কাস্টমাইজ করতে বেশিক্ষণ প্রেস করুন"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"উইজেট কাস্টমাইজ করুন"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"উইজেট কাস্টমাইজ করতে আনলক করুন"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"বন্ধ করা উইজেটের জন্য অ্যাপের আইকন"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"ইনস্টল করা হচ্ছে এমন উইজেটের অ্যাপ আইকন"</string>
<string name="edit_widget" msgid="9030848101135393954">"উইজেট এডিট করুন"</string>
@@ -498,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"উইজেট বেছে নিন"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"উইজেট সরান"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"বেছে নেওয়া উইজেটটি রাখুন"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"লক স্ক্রিন উইজেট"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"উইজেট ব্যবহার করে কোনও অ্যাপ খুলতে, আপনাকে নিজের পরিচয় যাচাই করতে হবে। এছাড়াও, মনে রাখবেন, এমনকি আপনার ট্যাবলেট লক থাকাকালীন যেকেউ তা দেখতে পারবেন। কিছু উইজেট আপনার লক স্ক্রিনের উদ্দেশ্যে তৈরি করা হয়নি এবং এখানে যোগ করা নিরাপদ নাও হতে পারে।"</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"বুঝেছি"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"ব্যবহারকারী পাল্টে দিন"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"পুলডাউন মেনু"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"এই সেশনের সব অ্যাপ ও ডেটা মুছে ফেলা হবে।"</string>
@@ -725,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"ডিফল্ট"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"অটোমেটিক"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"আওয়াজ করবে না বা ভাইব্রেট হবে না"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"আওয়াজ করবে না বা ভাইব্রেট হবে না এবং কথোপকথন বিভাগের নিচের দিকে দেখা যাবে"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"ডিভাইসের সেটিংস অনুযায়ী রিং বা ভাইব্রেট হতে পারে"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"ডিভাইসের সেটিংস অনুযায়ী রিং বা ভাইব্রেট হতে পারে। <xliff:g id="APP_NAME">%1$s</xliff:g>-এর কথোপকথন সাধারণত বাবলের মতো দেখাবে।"</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"এই বিজ্ঞপ্তি এলে ডিভাইস আওয়াজ করবে না ভাইব্রেট করবে তা সিস্টেমকে সেট করতে দিন"</string>
@@ -782,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"পেজ আপ"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"পেজ ডাউন"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"মুছুন"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"হোম"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"শেষ"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"ঢোকান"</string>
@@ -1364,20 +1374,18 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"স্প্লিট স্ক্রিন"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"ইনপুট"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"অ্যাপ শর্টকাট"</string>
+ <string name="shortcut_helper_category_current_app_shortcuts" msgid="4017840565974573628">"বর্তমান অ্যাপ"</string>
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"অ্যাক্সেসিবিলিটি"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"কীবোর্ড শর্টকাট"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"সার্চ শর্টকাট"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"আইকন আড়াল করুন"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"আইকন বড় করুন"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"অথবা"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"ফিরে যাওয়ার জেসচার"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"হোমপেজে যাওয়ার জেসচার"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"অ্যাকশন কী"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"হয়ে গেছে"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"অসাধারণ!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"ফিরে যান"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"ফিরে যেতে, টাচপ্যাডের যেকোনও জায়গায় তিনটি আঙুল দিয়ে ডান বা বাঁদিকে সোয়াইপ করুন।"</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"টাচপ্যাডে, তিনটি আঙুল ডান ও বাঁদিকে সরানো দেখানো হচ্ছে"</string>
@@ -1386,4 +1394,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"%2$d-এর মধ্যে %1$d লেভেল"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"হোম কন্ট্রোল"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"স্ক্রিন সেভার হিসেবে ঝটপট \'হোম কন্ট্রোল\' অ্যাক্সেস করুন"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-bn/tiles_states_strings.xml b/packages/SystemUI/res/values-bn/tiles_states_strings.xml
index 6e4dfbfbf745..b6336ba0ecca 100644
--- a/packages/SystemUI/res/values-bn/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-bn/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"বন্ধ আছে"</item>
<item msgid="4875147066469902392">"চালু আছে"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"উপলভ্য নেই"</item>
<item msgid="5044688398303285224">"বন্ধ আছে"</item>
diff --git a/packages/SystemUI/res/values-bs/strings.xml b/packages/SystemUI/res/values-bs/strings.xml
index 5ab4faa4a970..5a8543510ab1 100644
--- a/packages/SystemUI/res/values-bs/strings.xml
+++ b/packages/SystemUI/res/values-bs/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"Aplikacija <xliff:g id="APPNAME">%1$s</xliff:g> je otkrila ovaj snimak ekrana."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"Aplikacija <xliff:g id="APPNAME">%1$s</xliff:g> i druge otvorene aplikacije su otkrile ovaj snimak ekrana."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Dodaj u bilješku"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Uključi link"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Snimač ekrana"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Obrađivanje snimka ekrana"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Obavještenje za sesiju snimanja ekrana je u toku"</string>
@@ -127,31 +126,27 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Dodirnite da vidite"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Greška prilikom pohranjivanja snimka ekrana"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Greška pri pokretanju snimanja ekrana"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
- <skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
- <skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Zaustavit ćete snimanje aplikacije &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
- <skip />
+ <string name="screenrecord_stop_dialog_title" msgid="8716193661764511095">"Želite li zaustaviti snimanje?"</string>
+ <string name="screenrecord_stop_dialog_message" msgid="6262768207331626817">"Trenutačno snimate cijeli zaslon"</string>
+ <string name="screenrecord_stop_dialog_message_specific_app" msgid="5995770227684523244">"Trenutačno snimate aplikaciju <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Zaustavi snimanje"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Dijeljenje ekrana"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
- <skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
- <skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Zaustavit ćete dijeljenje aplikacije &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
- <skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Emitiranje ekrana"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
- <skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
- <skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Zaustavit ćete emitiranje aplikacije &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
- <skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
- <skip />
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Zaustaviti dijeljenje ekrana?"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen_with_host_app" msgid="522823522115375414">"Trenutačno dijelite cijeli zaslon s aplikacijom <xliff:g id="HOST_APP_NAME">%1$s</xliff:g>"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen" msgid="5090115386271179270">"Trenutačno dijelite cijeli zaslon s aplikacijom"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_specific" msgid="5923772039347985172">"Trenutačno dijelite aplikaciju <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g>"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_generic" msgid="6681016774654578261">"Trenutačno dijelite aplikaciju"</string>
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Zaustavi dijeljenje"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Emitiranje ekrana"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Zaustaviti emitiranje?"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen_with_device" msgid="1474703115926205251">"Trenutačno emitirate cijeli zaslon na uređaj <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen" msgid="8419219169553867625">"Trenutačno emitirate cijeli zaslon na uređaj u blizini"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app_with_device" msgid="2715934698604085519">"Trenutačno emitirate aplikaciju <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> na uređaj <xliff:g id="DEVICE_NAME">%2$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="8616103075630934513">"Trenutačno emitirate aplikaciju <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> na uređaj u blizini"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic_with_device" msgid="9213582497852420203">"Trenutačno emitirate na uređaj <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic" msgid="4100272100480415076">"Trenutačno emitirate na uređaj u blizini"</string>
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Zaustavi emitiranje"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Zatvori"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Snimač problema"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Obrada snimka problema"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Obavještenje o aktivnosti u pozadini za sesiju prikupljanja podataka o problemu"</string>
@@ -162,8 +157,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Došlo je do greške prilikom pohranjivanja snimka problema"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Došlo je do greške prilikom pokretanja snimanja problema"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Prikazivanje preko cijelog ekrana"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Da izađete, prevucite s vrha ekrana nadolje"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"Razumijem"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Nazad"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Dugme za početnu stranicu"</string>
@@ -196,8 +190,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Otključano licem. Pritisnite da nastavite."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Lice prepoznato. Pritisnite da nastavite."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Lice prepoznato. Pritisnite ikonu za otklj. da nastavite."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Otključano je licem. Dodirnite da nastavite."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Autentificirano"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Otkažite autentifikaciju"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Više opcija"</string>
@@ -297,6 +290,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Čuvar ekrana"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Ne ometaj"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Nema dostupnih uparenih uređaja"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Dodirnite da povežete ili prekinete povezanost uređaja"</string>
@@ -308,8 +303,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Sačuvano"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"prekid veze"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"aktiviranje"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Automatski uključi sutra"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Funkcije kao što su Quick Share i Pronađi moj uređaj koriste Bluetooth"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bluetooth će se uključiti sutra ujutro"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Dijeli zvuk"</string>
@@ -478,8 +472,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Dodajte još vidžeta"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Pritisnite i zadržite da prilagodite vidžete"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Prilagodite vidžete"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Otključajte da prilagodite vidžete"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Ikona aplikacije za onemogućeni vidžet"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Ikona aplikacije za vidžet koji se instalira"</string>
<string name="edit_widget" msgid="9030848101135393954">"Uredite vidžet"</string>
@@ -498,12 +491,11 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"odabir vidžeta"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"uklanjanje vidžeta"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"postavljanje odabranog vidžeta"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
- <skip />
+ <string name="communal_widget_picker_title" msgid="1953369090475731663">"Widgeti zaključanog zaslona"</string>
+ <string name="communal_widget_picker_description" msgid="490515450110487871">"Svi vide widgete na vašem zaključanom zaslonu, čak i ako je tablet zaključan."</string>
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Vidžeti zaključanog ekrana"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Da otvorite aplikaciju pomoću vidžeta, morat ćete potvrditi identitet. Također imajte na umu da ih svako može pregledati, čak i ako je tablet zaključan. Neki vidžeti možda nisu namijenjeni za vaš zaključani ekran i njihovo dodavanje ovdje možda nije sigurno."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"Razumijem"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Zamijeni korisnika"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"padajući meni"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Sve aplikacije i podaci iz ove sesije će se izbrisati."</string>
@@ -725,7 +717,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Zadano"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Automatski"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Bez zvuka ili vibracije"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Bez zvuka ili vibracije i pojavljuje se pri dnu odjeljka razgovora"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Može zvoniti ili vibrirati na osnovu postavki uređaja"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Može zvoniti ili vibrirati na osnovu postavki uređaja. Razgovori iz aplikacije <xliff:g id="APP_NAME">%1$s</xliff:g> prikazuju se u oblačićima prema zadanim postavkama."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Neka sistem odluči treba li se ovo obavještenje oglasiti zvukom ili vibracijom"</string>
@@ -782,6 +775,7 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Tipka Page Up"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Tipka Page Down"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Tipka za brisanje"</string>
+ <string name="keyboard_key_esc" msgid="6230365950511411322">"Esc"</string>
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Tipka za početak"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"Kraj"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Tipka za umetanje"</string>
@@ -1364,20 +1358,18 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Podijeljeni ekran"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Unos"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Prečice aplikacije"</string>
+ <string name="shortcut_helper_category_current_app_shortcuts" msgid="4017840565974573628">"Trenutna aplikacija"</string>
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Pristupačnost"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Prečice tastature"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Prečica pretraživanja"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Ikona sužavanja"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Ikona proširivanja"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"ili"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Pokret za povratak"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Pokret za povratak na početni ekran"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Tipka radnji"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Gotovo"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Sjajno!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Nazad"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Da se vratite, prevucite ulijevo ili udesno s tri prsta bilo gdje na dodirnoj podlozi."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Dodirna podloga prikazuje tri prsta koji se pomjeraju desno-lijevo"</string>
@@ -1386,4 +1378,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"%1$d. nivo od %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Kontrole za dom"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Brzo pristupajte kontrolama za dom putem čuvara ekrana"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-bs/tiles_states_strings.xml b/packages/SystemUI/res/values-bs/tiles_states_strings.xml
index df0b78664cba..6833c27c4208 100644
--- a/packages/SystemUI/res/values-bs/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-bs/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Isključeno"</item>
<item msgid="4875147066469902392">"Uključeno"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Nedostupno"</item>
<item msgid="5044688398303285224">"Isključeno"</item>
diff --git a/packages/SystemUI/res/values-ca/strings.xml b/packages/SystemUI/res/values-ca/strings.xml
index 052b1e81fcb1..2b4e30984f61 100644
--- a/packages/SystemUI/res/values-ca/strings.xml
+++ b/packages/SystemUI/res/values-ca/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> ha detectat aquesta captura de pantalla."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> i altres aplicacions obertes han detectat aquesta captura de pantalla."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Afegeix a una nota"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Inclou l\'enllaç"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Gravació de pantalla"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Processant gravació de pantalla"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Notificació en curs d\'una sessió de gravació de la pantalla"</string>
@@ -127,31 +126,27 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Toca per veure-la"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"S\'ha produït un error en desar la gravació de la pantalla"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"S\'ha produït un error en iniciar la gravació de pantalla"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
- <skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
- <skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Deixaràs de gravar &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
- <skip />
+ <string name="screenrecord_stop_dialog_title" msgid="8716193661764511095">"Vols aturar la gravació?"</string>
+ <string name="screenrecord_stop_dialog_message" msgid="6262768207331626817">"Ara mateix estàs gravant tota la pantalla"</string>
+ <string name="screenrecord_stop_dialog_message_specific_app" msgid="5995770227684523244">"Ara mateix estàs gravant <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Atura la gravació"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"S\'està compartint la pantalla"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
- <skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
- <skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Deixaràs de compartir &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
- <skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"S\'està emetent la pantalla"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
- <skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
- <skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Deixaràs d\'emetre &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
- <skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
- <skip />
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Vols deixar de compartir la pantalla?"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen_with_host_app" msgid="522823522115375414">"Ara mateix estàs compartint tota la pantalla amb <xliff:g id="HOST_APP_NAME">%1$s</xliff:g>"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen" msgid="5090115386271179270">"Ara mateix estàs compartint tota la pantalla amb una aplicació"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_specific" msgid="5923772039347985172">"Ara mateix estàs compartint <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g>"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_generic" msgid="6681016774654578261">"Ara mateix estàs compartint una aplicació"</string>
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Deixa de compartir"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"S\'està emetent la pantalla"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Vols aturar l\'emissió?"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen_with_device" msgid="1474703115926205251">"Ara mateix estàs emetent tota la pantalla a <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen" msgid="8419219169553867625">"Ara mateix estàs emetent tota la pantalla en un dispositiu proper"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app_with_device" msgid="2715934698604085519">"Ara mateix estàs emetent <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> a <xliff:g id="DEVICE_NAME">%2$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="8616103075630934513">"Ara mateix estàs emetent <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> en un dispositiu proper"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic_with_device" msgid="9213582497852420203">"Ara mateix estàs emetent a <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic" msgid="4100272100480415076">"Ara mateix estàs emetent en un dispositiu proper"</string>
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Atura l\'emissió"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Tanca"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Gravadora de problemes"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Processant gravació del problema"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Notificació en curs d\'una sessió de recollida de dades del problema"</string>
@@ -162,8 +157,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"S\'ha produït un error en desar la gravació del problema"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"S\'ha produït un error en iniciar la gravació del problema"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Visualització en pantalla completa"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Per sortir, llisca cap avall des de la part superior de la pantalla"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"Entesos"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Enrere"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Inici"</string>
@@ -196,8 +190,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"S\'ha desbloquejat amb la cara. Prem per continuar."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"S\'ha reconegut la cara. Prem per continuar."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"S\'ha reconegut la cara. Prem la icona per continuar."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"S\'ha desbloquejat amb la cara. Toca per continuar."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Autenticat"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Cancel·la l\'autenticació"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Més opcions"</string>
@@ -297,6 +290,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Estalvi de pantalla"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"No molestis"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"No hi ha dispositius vinculats disponibles"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Toca per connectar o desconnectar un dispositiu"</string>
@@ -308,8 +303,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Desat"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"desconnecta"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"activa"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Activa automàticament demà"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Les funcions com Quick Share i Troba el meu dispositiu utilitzen el Bluetooth"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"El Bluetooth s\'activarà demà al matí"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Comparteix l\'àudio"</string>
@@ -478,8 +472,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Afegeix més widgets"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Mantén premut per personalitzar els widgets"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Personalitza els widgets"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Desbloqueja per personalitzar els widgets"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Icona de l\'aplicació per a widget desactivat"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Icona de l\'aplicació d\'un widget que s\'està instal·lant"</string>
<string name="edit_widget" msgid="9030848101135393954">"Edita el widget"</string>
@@ -498,12 +491,11 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"selecciona el widget"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"suprimeix el widget"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"col·loca el widget seleccionat"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
- <skip />
+ <string name="communal_widget_picker_title" msgid="1953369090475731663">"Widgets de la pantalla de bloqueig"</string>
+ <string name="communal_widget_picker_description" msgid="490515450110487871">"Tothom pot veure widgets a la pantalla de bloqueig, fins i tot amb la tauleta bloquejada."</string>
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Widgets de la pantalla de bloqueig"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Per obrir una aplicació utilitzant un widget, necessitaràs verificar la teva identitat. També has de tenir en compte que qualsevol persona pot veure els widgets, fins i tot quan la tauleta està bloquejada. És possible que alguns widgets no estiguin pensats per a la pantalla de bloqueig i que no sigui segur afegir-los-hi."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"Entesos"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Canvia d\'usuari"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"menú desplegable"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Totes les aplicacions i les dades d\'aquesta sessió se suprimiran."</string>
@@ -725,7 +717,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Predeterminat"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Automàtic"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Sense so ni vibració"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Sense so ni vibració i es mostra més avall a la secció de converses"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Pot sonar o vibrar en funció de la configuració del dispositiu"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Pot sonar o vibrar en funció de la configuració del dispositiu. Les converses de l\'aplicació <xliff:g id="APP_NAME">%1$s</xliff:g> es mostren com a bombolles de manera predeterminada."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Fes que el sistema determini si aquesta notificació ha d\'emetre un so o una vibració"</string>
@@ -782,6 +775,7 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Re Pàg"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Av Pàg"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Tecla de supressió"</string>
+ <string name="keyboard_key_esc" msgid="6230365950511411322">"Esc"</string>
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Inici"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"Final"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Tecla d\'inserció"</string>
@@ -1364,20 +1358,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Pantalla dividida"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Entrada"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Dreceres d\'aplicacions"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Accessibilitat"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Tecles de drecera"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Dreceres de cerca"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Replega la icona"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Desplega la icona"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"o"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Gest Enrere"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Gest Inici"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Tecla d\'acció"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Fet"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Ben fet!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Torna"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Per tornar enrere, llisca cap a l\'esquerra o cap a la dreta amb tres dits en qualsevol lloc del ratolí tàctil."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Ratolí tàctil que mostra tres dits que es mouen cap a la dreta i cap a l\'esquerra"</string>
@@ -1386,4 +1379,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Nivell %1$d de %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Controls de la llar"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Utilitza controls de la llar com a estalvi de pantalla"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-ca/tiles_states_strings.xml b/packages/SystemUI/res/values-ca/tiles_states_strings.xml
index 67eb853c9ee6..3b908fd88520 100644
--- a/packages/SystemUI/res/values-ca/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-ca/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Desactivat"</item>
<item msgid="4875147066469902392">"Activat"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"No disponible"</item>
<item msgid="5044688398303285224">"Desactivat"</item>
diff --git a/packages/SystemUI/res/values-cs/strings.xml b/packages/SystemUI/res/values-cs/strings.xml
index 55af3ccad05d..992b35b515c2 100644
--- a/packages/SystemUI/res/values-cs/strings.xml
+++ b/packages/SystemUI/res/values-cs/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"Aplikace <xliff:g id="APPNAME">%1$s</xliff:g> objevila tento snímek obrazovky."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> a ostatní otevřené aplikace objevily tento snímek obrazovky."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Přidat do poznámky"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Zahrnout odkaz"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Nahrávání obrazovky"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Záznam obrazovky se zpracovává"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Trvalé oznámení o relaci nahrávání"</string>
@@ -127,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Klepnutím nahrávku zobrazíte"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Při ukládání záznamu obrazovky došlo k chybě"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Při spouštění nahrávání obrazovky došlo k chybě"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Přestane se nahrávat aplikace &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Ukončit nahrávání"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Sdílení obrazovky"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Ukončit sdílení obrazovky?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Přestane se sdílet aplikace &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Ukončit sdílení"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Odesílání obsahu obrazovky"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Ukončit odesílání?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Odesílání obsahu obrazovky"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Přestane se odesílat aplikace &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Ukončit odesílání"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Zavřít"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Rekordér problémů"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Zpracování záznamu problému"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Upozornění na probíhající shromažďování dat o problému"</string>
@@ -162,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Při ukládání záznamu problému došlo k chybě"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Při zahájení záznamu problému došlo k chybě"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Zobrazování přes celou obrazovku"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Tento režim ukončíte přejetím prstem dolů z horní části obrazovky"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"Rozumím"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Zpět"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Domů"</string>
@@ -196,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Odemknuto obličejem. Pokračujte stisknutím."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Obličej rozpoznán. Pokračujte stisknutím."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Obličej rozpoznán. Klepněte na ikonu odemknutí."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Odemknuto obličejem. Pokračujte klepnutím."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Ověřeno"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Zrušit ověření"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Další možnosti"</string>
@@ -297,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Spořič obrazovky"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Nerušit"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Nejsou dostupná žádná spárovaná zařízení"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Klepnutím zařízení připojíte nebo odpojíte"</string>
@@ -308,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Uloženo"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"odpojit"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"aktivovat"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Zítra automaticky zapnout"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Bluetooth využívají funkce jako Quick Share a Najdi moje zařízení."</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bluetooth se zapne zítra ráno."</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Sdílet zvuk"</string>
@@ -404,7 +411,7 @@
<string name="accessibility_hearing_device_pair_new_device" msgid="8440082580186130090">"Kliknutím spárujete nové zařízení"</string>
<string name="hearing_devices_presets_error" msgid="350363093458408536">"Předvolbu nelze aktualizovat"</string>
<string name="hearing_devices_preset_label" msgid="7878267405046232358">"Předvolba"</string>
- <string name="live_caption_title" msgid="8916875614623730005">"Živý přepis"</string>
+ <string name="live_caption_title" msgid="8916875614623730005">"Okamžité titulky"</string>
<string name="sensor_privacy_start_use_mic_dialog_title" msgid="563796653825944944">"Odblokovat mikrofon zařízení?"</string>
<string name="sensor_privacy_start_use_camera_dialog_title" msgid="8807639852654305227">"Odblokovat fotoaparát zařízení?"</string>
<string name="sensor_privacy_start_use_mic_camera_dialog_title" msgid="4316471859905020023">"Odblokovat fotoaparát a mikrofon zařízení?"</string>
@@ -478,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Přidat další widgety"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Dlouhým stisknutím můžete přizpůsobit widgety"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Přizpůsobit widgety"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Widgety lze přizpůsobit po odemknutí"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Ikona aplikace s deaktivovaným widgetem"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Ikona aplikace při probíhající instalaci widgetu"</string>
<string name="edit_widget" msgid="9030848101135393954">"Upravit widget"</string>
@@ -498,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"vybrat widget"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"odstranit widget"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"umístit vybraný widget"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Widgety na obrazovce uzamčení"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"K otevření aplikace pomocí widgetu budete muset ověřit svou totožnost. Také mějte na paměti, že widgety uvidí kdokoli, i když tablet bude uzamčen. Některé widgety nemusí být pro obrazovku uzamčení určeny a nemusí být bezpečné je na ni přidat."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"Rozumím"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Přepnout uživatele"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"rozbalovací nabídka"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Veškeré aplikace a data v této relaci budou vymazána."</string>
@@ -615,7 +622,7 @@
<string name="volume_odi_captions_hint_disable" msgid="2518846326748183407">"deaktivovat"</string>
<string name="sound_settings" msgid="8874581353127418308">"Zvuk a vibrace"</string>
<string name="volume_panel_dialog_settings_button" msgid="2513228491513390310">"Nastavení"</string>
- <string name="volume_panel_captioning_title" msgid="5984936949147684357">"Živý přepis"</string>
+ <string name="volume_panel_captioning_title" msgid="5984936949147684357">"Okamžité titulky"</string>
<string name="csd_lowered_title" product="default" msgid="2464112924151691129">"Hlasitost byla snížena na bezpečnou úroveň"</string>
<string name="csd_system_lowered_text" product="default" msgid="1250251883692996888">"Hlasitost sluchátek byla vysoká déle, než je doporučeno"</string>
<string name="csd_500_system_lowered_text" product="default" msgid="7414943302186884124">"Hlasitost sluchátek překročila bezpečný limit pro tento týden"</string>
@@ -725,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Výchozí"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Automaticky"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Žádný zvuk ani vibrace"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Žádný zvuk ani vibrace a zobrazuje se níže v sekci konverzací"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Vyzvání nebo vibruje podle nastavení zařízení"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Vyzvání nebo vibruje podle nastavení zařízení. Konverzace z aplikace <xliff:g id="APP_NAME">%1$s</xliff:g> ve výchozím nastavení bublají."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Nechat systém rozhodnout, zda má toto oznámení vydat zvuk či zavibrovat"</string>
@@ -782,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page Down"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Delete"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1364,20 +1374,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Rozdělená obrazovka"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Vstup"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Zkratky aplikací"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Přístupnost"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Klávesové zkratky"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Vyhledat zkratky"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Ikona sbalení"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Ikona rozbalení"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"nebo"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Gesto zpět"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Gesto domů"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Akční klávesa"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Hotovo"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Výborně!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Zpět"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Pokud se chcete vrátit zpět, stačí kdekoli na touchpadu přejet třemi prsty doleva nebo doprava."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Touchpad se třemi prsty, které se pohybují doprava a doleva"</string>
@@ -1386,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Úroveň %1$d z %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Ovládání domácnosti"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Rychlý přístup k funkcím, jako je spořič obrazovky"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-cs/tiles_states_strings.xml b/packages/SystemUI/res/values-cs/tiles_states_strings.xml
index ae533a8623ec..c4d7388f572f 100644
--- a/packages/SystemUI/res/values-cs/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-cs/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Vypnuto"</item>
<item msgid="4875147066469902392">"Zapnuto"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Nedostupné"</item>
<item msgid="5044688398303285224">"Vypnuto"</item>
diff --git a/packages/SystemUI/res/values-da/strings.xml b/packages/SystemUI/res/values-da/strings.xml
index 387682787f4d..2750b429844e 100644
--- a/packages/SystemUI/res/values-da/strings.xml
+++ b/packages/SystemUI/res/values-da/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> har registreret dette screenshot."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> og andre åbne apps har registreret dette screenshot."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Føj til note"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Inkluder link"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Skærmoptagelse"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Behandler skærmoptagelse"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Konstant notifikation om skærmoptagelse"</string>
@@ -127,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Tryk for at se"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Skærmoptagelsen kunne ikke gemmes"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Skærmoptagelsen kunne ikke startes"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Du stopper optagelse af &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Stop optagelse"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Skærmen deles"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Stop skærmdelingen?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Du stopper deling af &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Stop deling"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Skærmen castes"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Vil du stoppe din cast?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Skærmen castes"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Du stopper casting af &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Stop cast"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Luk"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Problemoptagelse"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Behandler optagelse af problem"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Igangværende notifikation om en session med problemindsamling"</string>
@@ -162,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Kunne ikke gemme optagelse af problem"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Fejl under forsøg på at starte optagelse af problem"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Visning i fuld skærm"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Stryg nedad fra toppen af skærmen for at afslutte"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"OK"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Tilbage"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Hjem"</string>
@@ -196,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Låst op ved hjælp af ansigt. Tryk for at fortsætte."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Ansigt genkendt. Tryk for at fortsætte."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Ansigt genkendt. Tryk på oplåsningsikonet for at fortsætte."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Låst op ved hjælp af ansigt. Tryk for at fortsætte."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Godkendt"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Annuller godkendelsen"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Flere valgmuligheder"</string>
@@ -297,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Pauseskærm"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Forstyr ikke"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Der er ingen tilgængelige parrede enheder"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Tryk for at oprette eller afbryde forbindelse til en enhed"</string>
@@ -308,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Gemt"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"afbryd forbindelse"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"aktivér"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Aktivér automatisk i morgen"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Funktioner som f.eks. Quick Share og Find min enhed anvender Bluetooth"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bluetooth aktiveres i morgen tidlig"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Del lyd"</string>
@@ -478,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Tilføj flere widgets"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Hold fingeren nede for at tilpasse widgets"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Tilpas widgets"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Lås op for at tilpasse widgets"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Appikon for deaktiveret widget"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Appikonet for en widget er ved at blive installeret"</string>
<string name="edit_widget" msgid="9030848101135393954">"Rediger widget"</string>
@@ -498,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"vælg widget"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"fjern widget"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"placer valgt widget"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Widgets på låseskærmen"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Hvis du vil åbne en app ved hjælp af en widget, skal du verificere din identitet. Husk også, at alle kan se dem, også når din tablet er låst. Nogle widgets er muligvis ikke beregnet til låseskærmen, og det kan være usikkert at tilføje dem her."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"OK"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Skift bruger"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"rullemenu"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Alle apps og data i denne session slettes."</string>
@@ -725,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Standard"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Automatisk"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Ingen lyd eller vibration"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Ingen lyd eller vibration, og den vises længere nede i samtalesektionen"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Kan ringe eller vibrere baseret på enhedens indstillinger"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Kan ringe eller vibrere baseret på enhedens indstillinger. Samtaler fra <xliff:g id="APP_NAME">%1$s</xliff:g> vises som standard i bobler."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Få systemet til at afgøre, om denne notifikation skal vibrere eller afspille en lyd"</string>
@@ -782,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page Down"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Delete"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1364,20 +1374,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Opdelt skærm"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Input"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Appgenveje"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Hjælpefunktioner"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Tastaturgenveje"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Genveje til søgning"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Ikon for Skjul"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Ikon for Udvid"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"eller"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Bevægelse for at gå tilbage"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Bevægelse for at gå til startskærm"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Handlingstast"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Udfør"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Sådan!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Gå tilbage"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Du kan gå tilbage ved at stryge mod venstre eller højre med tre fingre et vilkårligt sted på touchpladen."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Touchplade viser tre fingre, der bevæger sig til højre og venstre"</string>
@@ -1386,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Niveau %1$d af %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Hjemmestyring"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Tilgå hurtigt hjemmestyring via din pauseskærm"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-da/tiles_states_strings.xml b/packages/SystemUI/res/values-da/tiles_states_strings.xml
index 2c3b0535cb33..3a9533a71251 100644
--- a/packages/SystemUI/res/values-da/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-da/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Fra"</item>
<item msgid="4875147066469902392">"Til"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Ikke tilgængelig"</item>
<item msgid="5044688398303285224">"Fra"</item>
diff --git a/packages/SystemUI/res/values-de/strings.xml b/packages/SystemUI/res/values-de/strings.xml
index b2e0ca8e078f..710ae57fbc70 100644
--- a/packages/SystemUI/res/values-de/strings.xml
+++ b/packages/SystemUI/res/values-de/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> hat diesen Screenshot erkannt."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> und andere geöffnete Apps haben diesen Screenshot erkannt."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Zu Notiz hinzufügen"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Link einschließen"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Bildschirmaufzeichnung"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Bildschirmaufzeichnung…"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Fortlaufende Benachrichtigung für eine Bildschirmaufzeichnung"</string>
@@ -127,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Zum Ansehen tippen"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Fehler beim Speichern der Bildschirmaufzeichnung"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Fehler beim Start der Bildschirmaufzeichnung"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; wird dann nicht mehr aufgezeichnet"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Aufnahme beenden"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Bildschirm wird geteilt"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Bildschirmfreigabe beenden?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; wird dann nicht mehr geteilt"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Freigabe beenden"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Bildschirm wird übertragen"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Übertragung abbrechen?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Bildschirm wird übertragen"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; wird dann nicht mehr übertragen"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Streaming beenden"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Schließen"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Problem aufzeichnen"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Aufzeichnung wird verarbeitet"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Benachrichtigung über laufende Aufzeichnung eines Problems"</string>
@@ -162,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Fehler beim Speichern der Aufzeichnung des Problems"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Fehler beim Starten der Aufzeichnung des Problems"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Vollbildmodus wird aktiviert"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Wenn du den Modus verlassen möchtest, wische vom oberen Displayrand nach unten"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"Ok"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Zurück"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Startbildschirm"</string>
@@ -196,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Gerät mit dem Gesicht entsperrt. Tippe, um fortzufahren."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Gesicht erkannt. Tippe, um fortzufahren."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Gesicht erkannt. Tippe zum Fortfahren auf das Symbol „Entsperren“."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Per Gesichtserkennung entsperrt. Tippe, um fortzufahren."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Authentifiziert"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Authentifizierung abbrechen"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Weitere Optionen"</string>
@@ -297,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Bildschirmschoner"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Bitte nicht stören"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Keine gekoppelten Geräte verfügbar"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Zum Verbinden oder Trennen eines Geräts tippen"</string>
@@ -308,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Gespeichert"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"Verknüpfung aufheben"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"aktivieren"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Morgen automatisch aktivieren"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Funktionen wie „Quick Share“ und „Mein Gerät finden“ verwenden Bluetooth"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bluetooth wird morgen früh aktiviert"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Audioinhalte freigeben"</string>
@@ -478,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Weitere Widgets hinzufügen"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Lange drücken, um Widgets anzupassen"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Widgets anpassen"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Entsperren, um Widgets zu personalisieren"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"App-Symbol für deaktiviertes Widget"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"App-Symbol für ein Widget, das gerade installiert wird"</string>
<string name="edit_widget" msgid="9030848101135393954">"Widget bearbeiten"</string>
@@ -498,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"Widget auswählen"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"Widget entfernen"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"ausgewähltes Widget in den Bearbeitungsmodus versetzen"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Sperrbildschirm-Widgets"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Wenn du eine App mit einem Widget öffnen möchtest, musst du deine Identität bestätigen. Beachte auch, dass jeder die Widgets sehen kann, auch wenn dein Tablet gesperrt ist. Einige Widgets sind möglicherweise nicht für den Sperrbildschirm vorgesehen, sodass es unsicher sein kann, sie hier hinzuzufügen."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"Ok"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Nutzer wechseln"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"Pull-down-Menü"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Alle Apps und Daten in dieser Sitzung werden gelöscht."</string>
@@ -622,11 +629,11 @@
<string name="csd_button_keep_listening" product="default" msgid="4093794049149286784">"Weiterhören"</string>
<string name="csd_button_lower_volume" product="default" msgid="5347210412376264579">"Leiser stellen"</string>
<string name="screen_pinning_title" msgid="9058007390337841305">"App ist auf dem Bildschirm fixiert"</string>
- <string name="screen_pinning_description" msgid="8699395373875667743">"Die App bleibt so lange auf dem Bildschirm fixiert, bis du die Fixierung aufhebst. Berühre und halte dazu \"Zurück\" und \"Übersicht\"."</string>
- <string name="screen_pinning_description_recents_invisible" msgid="4564466648700390037">"Die App bleibt so lange auf dem Bildschirm fixiert, bis du die Fixierung aufhebst. Berühre und halte dazu \"Zurück\" und \"Startbildschirm\"."</string>
+ <string name="screen_pinning_description" msgid="8699395373875667743">"Die App bleibt so lange auf dem Bildschirm fixiert, bis du die Fixierung aufhebst. Halte dazu \"Zurück\" und \"Übersicht\" gedrückt."</string>
+ <string name="screen_pinning_description_recents_invisible" msgid="4564466648700390037">"Die App bleibt so lange auf dem Bildschirm fixiert, bis du die Fixierung aufhebst. Halte dazu \"Zurück\" und \"Startbildschirm\" gedrückt."</string>
<string name="screen_pinning_description_gestural" msgid="7246323931831232068">"Die App bleibt so lange auf dem Bildschirm angepinnt, bis du die Fixierung aufhebst. Wische dazu nach oben und halte den Bildschirm gedrückt."</string>
- <string name="screen_pinning_description_accessible" msgid="7386449191953535332">"Die App bleibt so lange auf dem Bildschirm fixiert, bis du die Fixierung aufhebst. Berühre und halte dazu \"Übersicht\"."</string>
- <string name="screen_pinning_description_recents_invisible_accessible" msgid="2857071808674481986">"Die App bleibt so lange auf dem Bildschirm fixiert, bis du die Fixierung aufhebst. Berühre und halte dazu \"Startbildschirm\"."</string>
+ <string name="screen_pinning_description_accessible" msgid="7386449191953535332">"Die App bleibt so lange auf dem Bildschirm fixiert, bis du die Fixierung aufhebst. Halte dazu \"Übersicht\" gedrückt."</string>
+ <string name="screen_pinning_description_recents_invisible_accessible" msgid="2857071808674481986">"Die App bleibt so lange auf dem Bildschirm fixiert, bis du die Fixierung aufhebst. Halte dazu \"Startbildschirm\" gedrückt."</string>
<string name="screen_pinning_exposes_personal_data" msgid="8189852022981524789">"Möglicherweise kann auf personenbezogene Daten (Kontakte, E-Mails usw.) zugegriffen werden."</string>
<string name="screen_pinning_can_open_other_apps" msgid="7529756813231421455">"Die fixierte App kann ggf. andere Apps öffnen."</string>
<string name="screen_pinning_toast" msgid="8177286912533744328">"Zum Aufheben der Fixierung dieser App \"Zurück\" und \"Übersicht\" halten"</string>
@@ -725,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Standard"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Automatisch"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Kein Ton und keine Vibration"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Kein Ton und keine Vibration, erscheint weiter unten im Bereich „Unterhaltungen“"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Kann je nach Geräteeinstellungen klingeln oder vibrieren"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Kann je nach Geräteeinstellungen klingeln oder vibrieren. Unterhaltungen von <xliff:g id="APP_NAME">%1$s</xliff:g> werden standardmäßig als Bubble angezeigt."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Das System entscheiden lassen, ob bei dieser Benachrichtigung ein Ton oder eine Vibration ausgegeben wird"</string>
@@ -782,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Nach oben"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Nach unten"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Entf"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Pos1"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"Ende"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Einfg"</string>
@@ -832,7 +842,7 @@
<string name="keyboard_shortcut_group_input" msgid="6888282716546625610">"Eingabe"</string>
<string name="input_switch_input_language_next" msgid="3782155659868227855">"Zur nächsten Sprache wechseln"</string>
<string name="input_switch_input_language_previous" msgid="6043341362202336623">"Zur vorherigen Sprache wechseln"</string>
- <string name="input_access_emoji" msgid="8105642858900406351">"Auf Emoji zugreifen"</string>
+ <string name="input_access_emoji" msgid="8105642858900406351">"Auf Emojis zugreifen"</string>
<string name="input_access_voice_typing" msgid="7291201476395326141">"Auf Spracheingabe zugreifen"</string>
<string name="keyboard_shortcut_group_applications" msgid="7386239431100651266">"Apps"</string>
<string name="keyboard_shortcut_group_applications_assist" msgid="6772492350416591448">"Assistant"</string>
@@ -1301,7 +1311,7 @@
<string name="home_quick_affordance_unavailable_configure_the_app" msgid="604424593994493281">"• Mindestens ein Gerät oder Gerätesteuerfeld ist verfügbar"</string>
<string name="notes_app_quick_affordance_unavailable_explanation" msgid="4796955161600178530">"Wähle eine Standard-App für Notizen aus, die du für die Verknüpfung verwenden möchtest"</string>
<string name="keyguard_affordance_enablement_dialog_notes_app_action" msgid="6821710209675089470">"App wählen"</string>
- <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Verknüpfung berühren &amp; halten"</string>
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Verknüpfung gedrückt halten"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Abbrechen"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="1507591562761552899">"Jetzt umdrehen"</string>
<string name="rear_display_folded_bottom_sheet_title" msgid="3930008746560711990">"Smartphone auffalten"</string>
@@ -1364,20 +1374,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Splitscreen"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Eingabe"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"App-Verknüpfungen"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Bedienungshilfen"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Tastenkürzel"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Tastenkürzel suchen"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Symbol „Minimieren“"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Symbol „Maximieren“"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"oder"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Touch-Geste „Zurück“"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Touch-Geste „Startbildschirm“"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Aktionstaste"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Fertig"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Gut gemacht!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Zurück"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Wenn du zurückgehen möchtest, wische an einer beliebigen Stelle des Touchpads mit drei Fingern nach links oder rechts."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Touchpad mit drei Fingern, die sich nach links und rechts bewegen"</string>
@@ -1386,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Level %1$d von %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Smart-Home-Steuerung"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Smart-Home-Steuerung als Bildschirmschoner nutzen"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-de/tiles_states_strings.xml b/packages/SystemUI/res/values-de/tiles_states_strings.xml
index 0606cc79f2e9..8d9c7930fda8 100644
--- a/packages/SystemUI/res/values-de/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-de/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Aus"</item>
<item msgid="4875147066469902392">"An"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Nicht verfügbar"</item>
<item msgid="5044688398303285224">"Aus"</item>
diff --git a/packages/SystemUI/res/values-el/strings.xml b/packages/SystemUI/res/values-el/strings.xml
index 766956fa3417..b77a9f1494d2 100644
--- a/packages/SystemUI/res/values-el/strings.xml
+++ b/packages/SystemUI/res/values-el/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"Η εφαρμογή <xliff:g id="APPNAME">%1$s</xliff:g> εντόπισε αυτό το στιγμιότυπο οθόνης."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"Η εφαρμογή <xliff:g id="APPNAME">%1$s</xliff:g> και άλλες ανοικτές εφαρμογές εντόπισαν το στιγμιότυπο οθόνης."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Προσθήκη σε σημείωση"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Συμπερίληψη συνδέσμου"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Εγγραφή οθόνης"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Επεξεργασία εγγραφής οθόνης"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Ειδοποίηση σε εξέλιξη για μια περίοδο λειτουργίας εγγραφής οθόνης"</string>
@@ -127,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Πατήστε για προβολή"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Σφάλμα κατά την αποθήκευση της εγγραφής οθόνης"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Σφάλμα κατά την έναρξη της εγγραφής οθόνης"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Θα διακόψετε την εγγραφή της εφαρμογής &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Διακοπή εγγραφής"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Γίνεται κοινοποίηση οθόνης"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Διακοπή κοινής χρήσης οθόνης;"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Θα διακόψετε την κοινή χρήση της εφαρμογής &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Διακοπή κοινής χρήσης"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Μετάδοση οθόνης"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Τερματισμός μετάδοσης;"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Μετάδοση οθόνης"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Θα διακόψετε τη μετάδοση της εφαρμογής &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Διακοπή μετάδοσης"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Κλείσιμο"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Εργαλείο καταγραφής προβλημάτων"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Επεξερ. καταγραφής προβλήματος"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Ειδοποίηση σε εξέλιξη για μια περίοδο λειτουργίας συλλογής προβλημάτων"</string>
@@ -162,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Σφάλμα κατά την αποθήκευση της καταγραφής του προβλήματος"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Σφάλμα κατά την έναρξη της καταγραφής του προβλήματος"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Προβολή σε πλήρη οθόνη"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Για έξοδο, σύρετε προς τα κάτω από το επάνω μέρος της οθόνης"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"Το κατάλαβα"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Πίσω"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Αρχική οθόνη"</string>
@@ -196,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Ξεκλείδωμα με αναγνώριση προσώπου. Πατήστε για συνέχεια."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Το πρόσωπο αναγνωρίστηκε. Πατήστε για συνέχεια."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Το πρόσωπο αναγνωρ. Πατήστε το εικον. ξεκλειδ. για συνέχεια."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Ξεκλείδωμα με αναγνώριση προσώπου. Πατήστε για συνέχεια."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Ολοκληρώθηκε ο έλεγχος ταυτότητας"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Ακύρωση ελέγχου ταυτότητας"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Περισσότερες επιλογές"</string>
@@ -297,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Προφύλαξη οθόνης"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Μην ενοχλείτε"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Δεν υπάρχουν διαθέσιμες συσκευές σε σύζευξη"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Πατήστε για σύνδεση ή αποσύνδεση μιας συσκευής"</string>
@@ -308,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Αποθηκεύτηκε"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"αποσύνδεση"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"ενεργοποίηση"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Αυτόματη ενεργοποίηση αύριο"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Λειτουργίες όπως το Quick Share και η Εύρεση συσκευής χρησιμοποιούν το Bluetooth"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Το Bluetooth θα ενεργοποιηθεί αύριο το πρωί"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Κοινή χρήση ήχου"</string>
@@ -478,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Προσθήκη περισσότερων γραφικών στοιχείων"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Παρατεταμένο πάτημα για προσαρμογή γραφ. στοιχείων"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Προσαρμογή γραφικών στοιχείων"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Ξεκλειδώστε για προσαρμογή των γραφικών στοιχείων"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Εικονίδιο εφαρμογής για απενεργοποιημένο γραφικό στοιχείο"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Εικονίδιο εφαρμογής για ένα γραφικό στοιχείου που εγκαθίσταται"</string>
<string name="edit_widget" msgid="9030848101135393954">"Επεξεργασία γραφικού στοιχείου"</string>
@@ -498,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"επιλογή γραφικού στοιχείου"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"κατάργηση γραφικού στοιχείου"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"τοποθέτηση επιλεγμένου γραφικού στοιχείου"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Γραφικά στοιχεία οθόνης κλειδώματος"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Για να ανοίξετε μια εφαρμογή χρησιμοποιώντας ένα γραφικό στοιχείο, θα πρέπει να επαληθεύσετε την ταυτότητά σας. Επίσης, λάβετε υπόψη ότι η προβολή τους είναι δυνατή από οποιονδήποτε, ακόμα και όταν το tablet σας είναι κλειδωμένο. Ορισμένα γραφικά στοιχεία μπορεί να μην προορίζονται για την οθόνη κλειδώματος και η προσθήκη τους εδώ ενδέχεται να μην είναι ασφαλής."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"Το κατάλαβα"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Εναλλαγή χρήστη"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"αναπτυσσόμενο μενού"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Όλες οι εφαρμογές και τα δεδομένα αυτής της περιόδου σύνδεσης θα διαγραφούν."</string>
@@ -725,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Προεπιλογή"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Αυτόματο"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Χωρίς ήχο ή δόνηση"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Χωρίς ήχο ή δόνηση και εμφανίζεται χαμηλά στην ενότητα συζητήσεων"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Ενδέχεται να κουδουνίζει ή να δονείται βάσει των ρυθμίσεων συσκευής"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Ενδέχεται να κουδουνίζει ή να δονείται βάσει των ρυθμίσεων συσκευής. Οι συζητήσεις από την εφαρμογή <xliff:g id="APP_NAME">%1$s</xliff:g> εμφανίζονται σε συννεφάκι από προεπιλογή."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Επιτρέψτε στο σύστημα να αποφασίσει αν αυτή η ειδοποίηση θα αναπαράγει έναν ήχο ή θα ενεργοποιήσει τη δόνηση της συσκευής"</string>
@@ -782,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Προηγούμενη σελίδα"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Επόμενη σελίδα"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Delete"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"Λήξη"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1364,20 +1374,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Διαχωρισμός οθόνης"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Είσοδος"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Συντομεύσεις εφαρμογών"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Προσβασιμότητα"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Συντομεύσεις πληκτρολογίου"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Συντομεύσεις αναζήτησης"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Εικονίδιο σύμπτυξης"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Εικονίδιο ανάπτυξης"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"ή"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Κίνηση επιστροφής"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Κίνηση μετάβασης στην αρχική οθόνη"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Πλήκτρο ενέργειας"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Τέλος"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Μπράβο!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Επιστροφή"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Για επιστροφή, σύρετε προς τα αριστερά ή προς τα δεξιά χρησιμοποιώντας τρία δάχτυλα οπουδήποτε στην επιφάνεια αφής."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Επιφάνεια αφής στην οποία εμφανίζονται τρία δάχτυλα να κινούνται δεξιά και αριστερά"</string>
@@ -1386,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Επίπεδο %1$d από %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Οικιακοί έλεγχοι"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Γρήγ. πρόσβαση σε οικιακ. ελέγχους ως προφ. οθόνης"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-el/tiles_states_strings.xml b/packages/SystemUI/res/values-el/tiles_states_strings.xml
index d4545ffa6641..3f27fb49806c 100644
--- a/packages/SystemUI/res/values-el/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-el/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Ανενεργό"</item>
<item msgid="4875147066469902392">"Ενεργό"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Μη διαθέσιμο"</item>
<item msgid="5044688398303285224">"Ανενεργό"</item>
diff --git a/packages/SystemUI/res/values-en-rAU/strings.xml b/packages/SystemUI/res/values-en-rAU/strings.xml
index 133c66d521ee..1b1ae9765e72 100644
--- a/packages/SystemUI/res/values-en-rAU/strings.xml
+++ b/packages/SystemUI/res/values-en-rAU/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> detected this screenshot."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> and other open apps detected this screenshot."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Add to note"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Include link"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Screen recorder"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Processing screen recording"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Ongoing notification for a screen record session"</string>
@@ -127,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Tap to view"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Error saving screen recording"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Error starting screen recording"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"You will stop recording &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Stop recording"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Sharing screen"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Stop sharing screen?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"You will stop sharing &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Stop sharing"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Casting screen"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Stop casting?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Casting screen"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"You will stop casting &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Stop casting"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Close"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Issue Recorder"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Processing issue recording"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Ongoing notification for an issue collection session"</string>
@@ -162,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Error saving issue recording"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Error starting issue recording"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Viewing full screen"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"To exit, swipe down from the top of your screen"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"Got it"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Back"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Home"</string>
@@ -196,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Unlocked by face. Press to continue."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Face recognised. Press to continue."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Face recognised. Press the unlock icon to continue."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Unlocked by face. Tap to continue."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Authenticated"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Cancel authentication"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"More options"</string>
@@ -297,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Screen saver"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Do Not Disturb"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"No paired devices available"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Tap to connect or disconnect a device"</string>
@@ -308,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Saved"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"disconnect"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"activate"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Automatically turn on tomorrow"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Features like Quick Share and Find My Device use Bluetooth"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bluetooth will turn on tomorrow morning"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Share audio"</string>
@@ -478,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Add more widgets"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Long press to customise widgets"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Customise widgets"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Unlock to customise widgets"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"App icon for disabled widget"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"App icon for a widget being installed"</string>
<string name="edit_widget" msgid="9030848101135393954">"Edit widget"</string>
@@ -498,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"select widget"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"remove widget"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"place selected widget"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Lock screen widgets"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"To open an app using a widget, you\'ll need to verify that it\'s you. Also, bear in mind that anyone can view them, even when your tablet\'s locked. Some widgets may not have been intended for your lock screen and may be unsafe to add here."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"Got it"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Switch user"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"pulldown menu"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"All apps and data in this session will be deleted."</string>
@@ -725,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Default"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Automatic"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"No sound or vibration"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"No sound or vibration and appears lower in conversation section"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"May ring or vibrate based on device settings"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"May ring or vibrate based on device settings. Conversations from <xliff:g id="APP_NAME">%1$s</xliff:g> bubble by default."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Have the system determine if this notification should make sound or vibration"</string>
@@ -782,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page Down"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Delete"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1364,20 +1374,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Split screen"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Input"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"App shortcuts"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Accessibility"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Keyboard shortcuts"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Search shortcuts"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Collapse icon"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Expand icon"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"or"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Back gesture"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Home gesture"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Action key"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Done"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Great work!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Go back"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"To go back, swipe left or right using 3 fingers anywhere on the touchpad."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Touchpad showing 3 fingers moving right and left"</string>
@@ -1386,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Level %1$d of %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Home controls"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Quickly access your home controls as a screensaver"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-en-rAU/tiles_states_strings.xml b/packages/SystemUI/res/values-en-rAU/tiles_states_strings.xml
index 39dd7c84b13e..27c23aa63a07 100644
--- a/packages/SystemUI/res/values-en-rAU/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-en-rAU/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Off"</item>
<item msgid="4875147066469902392">"On"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Unavailable"</item>
<item msgid="5044688398303285224">"Off"</item>
diff --git a/packages/SystemUI/res/values-en-rCA/strings.xml b/packages/SystemUI/res/values-en-rCA/strings.xml
index 40af8ce7401f..0acb6744e869 100644
--- a/packages/SystemUI/res/values-en-rCA/strings.xml
+++ b/packages/SystemUI/res/values-en-rCA/strings.xml
@@ -126,19 +126,25 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Tap to view"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Error saving screen recording"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Error starting screen recording"</string>
- <string name="screenrecord_stop_dialog_title" msgid="2685522129492260887">"Stop recording screen?"</string>
- <string name="screenrecord_stop_dialog_message" msgid="1926783607059442889">"You will stop recording your screen"</string>
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"You will stop recording &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
+ <string name="screenrecord_stop_dialog_title" msgid="8716193661764511095">"Stop recording?"</string>
+ <string name="screenrecord_stop_dialog_message" msgid="6262768207331626817">"You\'re currently recording your entire screen"</string>
+ <string name="screenrecord_stop_dialog_message_specific_app" msgid="5995770227684523244">"You\'re currently recording <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
<string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Stop recording"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Sharing screen"</string>
<string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Stop sharing screen?"</string>
- <string name="share_to_app_stop_dialog_message" msgid="3181723638915877339">"You will stop sharing your screen"</string>
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"You will stop sharing &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen_with_host_app" msgid="522823522115375414">"You\'re currently sharing your entire screen with <xliff:g id="HOST_APP_NAME">%1$s</xliff:g>"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen" msgid="5090115386271179270">"You\'re currently sharing your entire screen with an app"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_specific" msgid="5923772039347985172">"You\'re currently sharing <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g>"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_generic" msgid="6681016774654578261">"You\'re currently sharing an app"</string>
<string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Stop sharing"</string>
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Casting screen"</string>
- <string name="cast_to_other_device_stop_dialog_title" msgid="1910372600290258193">"Stop casting screen?"</string>
- <string name="cast_to_other_device_stop_dialog_message" msgid="1502520537030715412">"You will stop casting your screen"</string>
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"You will stop casting &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Casting screen"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Stop casting?"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen_with_device" msgid="1474703115926205251">"You\'re currently casting your entire screen to <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen" msgid="8419219169553867625">"You\'re currently casting your entire screen to a nearby device"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app_with_device" msgid="2715934698604085519">"You\'re currently casting <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> to <xliff:g id="DEVICE_NAME">%2$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="8616103075630934513">"You\'re currently casting <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> to a nearby device"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic_with_device" msgid="9213582497852420203">"You\'re currently casting to <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic" msgid="4100272100480415076">"You\'re currently casting to a nearby device"</string>
<string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Stop casting"</string>
<string name="close_dialog_button" msgid="4749497706540104133">"Close"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Issue Recorder"</string>
@@ -284,6 +290,7 @@
<string name="start_dreams" msgid="9131802557946276718">"Screen saver"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Do Not Disturb"</string>
+ <string name="quick_settings_modes_label" msgid="5407025818652750501">"Priority modes"</string>
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"No paired devices available"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Tap to connect or disconnect a device"</string>
@@ -464,8 +471,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Add more widgets"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Long press to customize widgets"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Customize widgets"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Unlock to customize widgets"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"App icon for disabled widget"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"App icon for a widget being installed"</string>
<string name="edit_widget" msgid="9030848101135393954">"Edit widget"</string>
@@ -484,6 +490,8 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"select widget"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"remove widget"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"place selected widget"</string>
+ <string name="communal_widget_picker_title" msgid="1953369090475731663">"Lock screen widgets"</string>
+ <string name="communal_widget_picker_description" msgid="490515450110487871">"Anyone can view widgets on your lock screen, even if your tablet\'s locked."</string>
<string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Lock screen widgets"</string>
<string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"To open an app using a widget, you’ll need to verify it’s you. Also, keep in mind that anyone can view them, even when your tablet’s locked. Some widgets may not have been intended for your lock screen and may be unsafe to add here."</string>
<string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"Got it"</string>
@@ -708,7 +716,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Default"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Automatic"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"No sound or vibration"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"No sound or vibration and appears lower in conversation section"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"May ring or vibrate based on device settings"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"May ring or vibrate based on device settings. Conversations from <xliff:g id="APP_NAME">%1$s</xliff:g> bubble by default."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Have the system determine if this notification should make sound or vibration"</string>
@@ -765,6 +774,7 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page Down"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Delete"</string>
+ <string name="keyboard_key_esc" msgid="6230365950511411322">"Esc"</string>
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1347,6 +1357,7 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Split screen"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Input"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"App shortcuts"</string>
+ <string name="shortcut_helper_category_current_app_shortcuts" msgid="4017840565974573628">"Current App"</string>
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Accessibility"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Keyboard shortcuts"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Search shortcuts"</string>
@@ -1357,6 +1368,7 @@
<string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Home gesture"</string>
<string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Action key"</string>
<string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Done"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Great job!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Go back"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"To go back, swipe left or right using three fingers anywhere on the touchpad."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Touchpad showing three fingers moving right and left"</string>
@@ -1365,4 +1377,5 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Level %1$d of %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Home Controls"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Quickly access your home controls as a screensaver"</string>
+ <string name="volume_undo_action" msgid="5815519725211877114">"Undo"</string>
</resources>
diff --git a/packages/SystemUI/res/values-en-rCA/tiles_states_strings.xml b/packages/SystemUI/res/values-en-rCA/tiles_states_strings.xml
index 39dd7c84b13e..0658ce58e60f 100644
--- a/packages/SystemUI/res/values-en-rCA/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-en-rCA/tiles_states_strings.xml
@@ -56,6 +56,11 @@
<item msgid="5376619709702103243">"Off"</item>
<item msgid="4875147066469902392">"On"</item>
</string-array>
+ <string-array name="tile_states_modes">
+ <item msgid="7764936419245199023">"Unavailable"</item>
+ <item msgid="2004750556637773692">"Off"</item>
+ <item msgid="8968530753931637871">"On"</item>
+ </string-array>
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Unavailable"</item>
<item msgid="5044688398303285224">"Off"</item>
diff --git a/packages/SystemUI/res/values-en-rGB/strings.xml b/packages/SystemUI/res/values-en-rGB/strings.xml
index 133c66d521ee..1b1ae9765e72 100644
--- a/packages/SystemUI/res/values-en-rGB/strings.xml
+++ b/packages/SystemUI/res/values-en-rGB/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> detected this screenshot."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> and other open apps detected this screenshot."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Add to note"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Include link"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Screen recorder"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Processing screen recording"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Ongoing notification for a screen record session"</string>
@@ -127,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Tap to view"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Error saving screen recording"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Error starting screen recording"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"You will stop recording &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Stop recording"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Sharing screen"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Stop sharing screen?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"You will stop sharing &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Stop sharing"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Casting screen"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Stop casting?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Casting screen"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"You will stop casting &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Stop casting"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Close"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Issue Recorder"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Processing issue recording"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Ongoing notification for an issue collection session"</string>
@@ -162,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Error saving issue recording"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Error starting issue recording"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Viewing full screen"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"To exit, swipe down from the top of your screen"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"Got it"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Back"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Home"</string>
@@ -196,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Unlocked by face. Press to continue."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Face recognised. Press to continue."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Face recognised. Press the unlock icon to continue."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Unlocked by face. Tap to continue."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Authenticated"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Cancel authentication"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"More options"</string>
@@ -297,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Screen saver"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Do Not Disturb"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"No paired devices available"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Tap to connect or disconnect a device"</string>
@@ -308,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Saved"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"disconnect"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"activate"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Automatically turn on tomorrow"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Features like Quick Share and Find My Device use Bluetooth"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bluetooth will turn on tomorrow morning"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Share audio"</string>
@@ -478,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Add more widgets"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Long press to customise widgets"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Customise widgets"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Unlock to customise widgets"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"App icon for disabled widget"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"App icon for a widget being installed"</string>
<string name="edit_widget" msgid="9030848101135393954">"Edit widget"</string>
@@ -498,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"select widget"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"remove widget"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"place selected widget"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Lock screen widgets"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"To open an app using a widget, you\'ll need to verify that it\'s you. Also, bear in mind that anyone can view them, even when your tablet\'s locked. Some widgets may not have been intended for your lock screen and may be unsafe to add here."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"Got it"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Switch user"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"pulldown menu"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"All apps and data in this session will be deleted."</string>
@@ -725,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Default"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Automatic"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"No sound or vibration"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"No sound or vibration and appears lower in conversation section"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"May ring or vibrate based on device settings"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"May ring or vibrate based on device settings. Conversations from <xliff:g id="APP_NAME">%1$s</xliff:g> bubble by default."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Have the system determine if this notification should make sound or vibration"</string>
@@ -782,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page Down"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Delete"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1364,20 +1374,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Split screen"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Input"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"App shortcuts"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Accessibility"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Keyboard shortcuts"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Search shortcuts"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Collapse icon"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Expand icon"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"or"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Back gesture"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Home gesture"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Action key"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Done"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Great work!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Go back"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"To go back, swipe left or right using 3 fingers anywhere on the touchpad."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Touchpad showing 3 fingers moving right and left"</string>
@@ -1386,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Level %1$d of %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Home controls"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Quickly access your home controls as a screensaver"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-en-rGB/tiles_states_strings.xml b/packages/SystemUI/res/values-en-rGB/tiles_states_strings.xml
index 39dd7c84b13e..27c23aa63a07 100644
--- a/packages/SystemUI/res/values-en-rGB/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-en-rGB/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Off"</item>
<item msgid="4875147066469902392">"On"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Unavailable"</item>
<item msgid="5044688398303285224">"Off"</item>
diff --git a/packages/SystemUI/res/values-en-rIN/strings.xml b/packages/SystemUI/res/values-en-rIN/strings.xml
index 133c66d521ee..1b1ae9765e72 100644
--- a/packages/SystemUI/res/values-en-rIN/strings.xml
+++ b/packages/SystemUI/res/values-en-rIN/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> detected this screenshot."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> and other open apps detected this screenshot."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Add to note"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Include link"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Screen recorder"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Processing screen recording"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Ongoing notification for a screen record session"</string>
@@ -127,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Tap to view"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Error saving screen recording"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Error starting screen recording"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"You will stop recording &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Stop recording"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Sharing screen"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Stop sharing screen?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"You will stop sharing &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Stop sharing"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Casting screen"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Stop casting?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Casting screen"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"You will stop casting &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Stop casting"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Close"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Issue Recorder"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Processing issue recording"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Ongoing notification for an issue collection session"</string>
@@ -162,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Error saving issue recording"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Error starting issue recording"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Viewing full screen"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"To exit, swipe down from the top of your screen"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"Got it"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Back"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Home"</string>
@@ -196,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Unlocked by face. Press to continue."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Face recognised. Press to continue."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Face recognised. Press the unlock icon to continue."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Unlocked by face. Tap to continue."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Authenticated"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Cancel authentication"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"More options"</string>
@@ -297,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Screen saver"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Do Not Disturb"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"No paired devices available"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Tap to connect or disconnect a device"</string>
@@ -308,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Saved"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"disconnect"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"activate"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Automatically turn on tomorrow"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Features like Quick Share and Find My Device use Bluetooth"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bluetooth will turn on tomorrow morning"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Share audio"</string>
@@ -478,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Add more widgets"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Long press to customise widgets"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Customise widgets"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Unlock to customise widgets"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"App icon for disabled widget"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"App icon for a widget being installed"</string>
<string name="edit_widget" msgid="9030848101135393954">"Edit widget"</string>
@@ -498,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"select widget"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"remove widget"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"place selected widget"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Lock screen widgets"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"To open an app using a widget, you\'ll need to verify that it\'s you. Also, bear in mind that anyone can view them, even when your tablet\'s locked. Some widgets may not have been intended for your lock screen and may be unsafe to add here."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"Got it"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Switch user"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"pulldown menu"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"All apps and data in this session will be deleted."</string>
@@ -725,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Default"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Automatic"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"No sound or vibration"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"No sound or vibration and appears lower in conversation section"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"May ring or vibrate based on device settings"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"May ring or vibrate based on device settings. Conversations from <xliff:g id="APP_NAME">%1$s</xliff:g> bubble by default."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Have the system determine if this notification should make sound or vibration"</string>
@@ -782,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page Down"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Delete"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1364,20 +1374,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Split screen"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Input"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"App shortcuts"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Accessibility"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Keyboard shortcuts"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Search shortcuts"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Collapse icon"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Expand icon"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"or"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Back gesture"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Home gesture"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Action key"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Done"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Great work!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Go back"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"To go back, swipe left or right using 3 fingers anywhere on the touchpad."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Touchpad showing 3 fingers moving right and left"</string>
@@ -1386,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Level %1$d of %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Home controls"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Quickly access your home controls as a screensaver"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-en-rIN/tiles_states_strings.xml b/packages/SystemUI/res/values-en-rIN/tiles_states_strings.xml
index 39dd7c84b13e..27c23aa63a07 100644
--- a/packages/SystemUI/res/values-en-rIN/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-en-rIN/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Off"</item>
<item msgid="4875147066469902392">"On"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Unavailable"</item>
<item msgid="5044688398303285224">"Off"</item>
diff --git a/packages/SystemUI/res/values-en-rXC/strings.xml b/packages/SystemUI/res/values-en-rXC/strings.xml
index 52b567ae55aa..e4a6603df2bf 100644
--- a/packages/SystemUI/res/values-en-rXC/strings.xml
+++ b/packages/SystemUI/res/values-en-rXC/strings.xml
@@ -126,19 +126,25 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‏‎‎‏‏‏‎‎‎‎‏‎‎‎‎‎‎‏‎‏‎‎‎‏‎‏‏‏‏‎‎‏‎‎‎‎‎‏‎‏‎‏‎‏‏‏‎‎‎‏‏‏‏‏‏‎‎‎‏‏‎Tap to view‎‏‎‎‏‎"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‎‎‎‏‎‏‎‏‏‏‎‎‎‏‎‎‏‏‏‏‏‏‎‎‎‏‏‏‎‏‎‏‏‎‏‎‎‎‏‏‎‏‏‎‎‎‎‎‎‏‎‎‎‎‎‏‏‏‏‏‎Error saving screen recording‎‏‎‎‏‎"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‏‏‏‎‏‎‎‎‏‎‏‎‎‏‎‏‎‎‎‏‎‎‏‏‏‏‎‏‎‏‏‏‏‏‏‎‎‏‏‎‏‎‏‎‏‎‏‎‎‏‏‏‎‏‎‎‎‎‎‎‎Error starting screen recording‎‏‎‎‏‎"</string>
- <string name="screenrecord_stop_dialog_title" msgid="2685522129492260887">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‎‏‎‏‎‏‎‎‎‏‎‎‏‏‏‎‎‏‎‎‎‎‏‎‎‏‎‏‏‏‏‏‎‏‎‎‏‏‎‏‎‏‏‎‎‎‏‏‏‎‎‎‎‎‎‏‎‏‏‏‎Stop recording screen?‎‏‎‎‏‎"</string>
- <string name="screenrecord_stop_dialog_message" msgid="1926783607059442889">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‏‎‏‎‏‎‏‏‏‏‎‏‎‏‎‎‏‏‏‏‎‏‏‏‏‎‏‏‎‏‏‎‏‎‎‏‏‏‎‏‎‎‏‎‏‏‏‎‏‏‎‎‏‏‎‎‏‎‎‏‎You will stop recording your screen‎‏‎‎‏‎"</string>
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‏‎‎‏‎‏‎‏‏‎‎‎‏‎‎‏‏‏‏‎‏‏‎‏‎‏‎‎‎‎‏‎‏‎‎‎‏‎‏‏‎‏‏‏‎‎‎‎‏‎‎‎‏‎‎‎‎‏‏‎‎You will stop recording &lt;b&gt;‎‏‎‎‏‏‎<xliff:g id="APP_NAME">%1$s</xliff:g>‎‏‎‎‏‏‏‎&lt;/b&gt;‎‏‎‎‏‎"</string>
+ <string name="screenrecord_stop_dialog_title" msgid="8716193661764511095">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‏‎‎‎‏‏‏‏‎‏‏‎‎‎‏‎‎‎‏‏‏‏‏‏‎‏‎‎‎‏‏‏‏‎‏‎‏‏‏‏‏‏‎‎‎‎‏‎‎‏‎‏‎‏‏‏‎‏‏‏‎Stop recording?‎‏‎‎‏‎"</string>
+ <string name="screenrecord_stop_dialog_message" msgid="6262768207331626817">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‎‏‏‎‏‏‏‎‏‎‎‏‏‏‎‏‎‎‏‎‏‎‎‎‎‎‎‎‏‏‎‎‎‏‎‎‏‎‎‏‏‏‎‎‏‎‎‎‏‏‏‏‎‏‎‎‎‎‎‏‎You\'re currently recording your entire screen‎‏‎‎‏‎"</string>
+ <string name="screenrecord_stop_dialog_message_specific_app" msgid="5995770227684523244">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‎‎‏‏‎‎‏‏‎‏‎‏‎‏‎‎‎‎‎‏‎‏‎‎‎‎‎‏‎‏‎‎‏‏‏‏‏‏‏‏‏‏‏‏‏‎‏‏‏‏‎‎‏‏‏‎‏‏‎‎‎You\'re currently recording ‎‏‎‎‏‏‎<xliff:g id="APP_NAME">%1$s</xliff:g>‎‏‎‎‏‏‏‎‎‏‎‎‏‎"</string>
<string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‏‎‎‎‎‎‎‎‎‏‎‏‎‏‎‏‏‏‎‎‎‎‏‏‏‏‏‏‏‎‏‎‏‎‏‏‏‏‏‏‎‎‏‎‏‏‏‏‏‏‎‏‏‎‏‎‏‏‏‎‎Stop recording‎‏‎‎‏‎"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‏‏‎‏‎‎‏‏‎‏‏‎‏‏‏‎‏‎‏‎‏‏‎‏‏‏‎‏‏‏‏‏‏‏‎‎‏‎‎‏‎‎‏‏‎‏‎‏‏‏‎‎‏‎‏‏‏‏‎‎‏‎Sharing screen‎‏‎‎‏‎"</string>
<string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‎‏‏‎‏‎‏‏‎‏‏‎‎‏‎‏‏‎‏‏‎‏‎‎‏‏‏‎‏‏‎‏‎‏‏‎‏‎‏‏‏‏‎‏‎‏‏‏‎‎‎‏‏‎‎Stop sharing screen?‎‏‎‎‏‎"</string>
- <string name="share_to_app_stop_dialog_message" msgid="3181723638915877339">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‏‏‎‎‎‎‏‎‎‏‏‏‏‏‎‎‎‎‎‎‏‏‎‎‏‎‏‎‏‏‎‎‎‏‏‏‎‎‎‎‏‎‏‏‎‏‎‎‏‎‎‏‏‏‎‏‏‎‏‏‎You will stop sharing your screen‎‏‎‎‏‎"</string>
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‎‎‏‏‏‎‏‏‏‎‎‏‏‏‎‏‏‎‏‏‎‎‏‎‎‎‏‎‏‎‏‏‎‎‏‏‎‎‏‎‏‎‎‎‎‏‏‏‏‎‏‎‏‎‎‎‏‎‎‏‎You will stop sharing &lt;b&gt;‎‏‎‎‏‏‎<xliff:g id="APP_NAME">%1$s</xliff:g>‎‏‎‎‏‏‏‎&lt;/b&gt;‎‏‎‎‏‎"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen_with_host_app" msgid="522823522115375414">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‎‏‏‏‏‏‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‏‎‎‏‏‏‎‎‏‎‎‏‎‏‎‏‏‏‏‏‎‎‏‏‏‏‏‎‏‎‎‎‏‎‎‏‏‎‏‏‎‎You\'re currently sharing your entire screen with ‎‏‎‎‏‏‎<xliff:g id="HOST_APP_NAME">%1$s</xliff:g>‎‏‎‎‏‏‏‎‎‏‎‎‏‎"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen" msgid="5090115386271179270">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‎‏‏‎‏‎‏‎‎‎‏‏‏‎‏‏‏‎‎‎‏‏‏‏‏‎‎‏‏‎‏‎‏‎‎‎‎‏‏‏‎‎‎‏‏‎‏‎‎‎‏‎‎‎‎‎‎‏‏‎‎You\'re currently sharing your entire screen with an app‎‏‎‎‏‎"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_specific" msgid="5923772039347985172">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‎‎‏‎‎‎‏‏‎‏‎‏‎‏‏‏‎‏‏‏‎‏‎‎‏‎‎‎‏‏‎‎‎‏‏‏‏‎‏‏‏‎‏‎‎‏‎‏‏‎‏‏‎‎‎‏‎‏‎‎‎You\'re currently sharing ‎‏‎‎‏‏‎<xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g>‎‏‎‎‏‏‏‎‎‏‎‎‏‎"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_generic" msgid="6681016774654578261">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‏‏‎‎‏‎‏‏‎‏‏‏‏‎‏‏‏‏‎‏‎‏‎‏‏‎‏‏‏‏‏‎‎‏‏‏‏‎‏‏‎‏‏‎‎‏‎‎‏‏‏‎‎‏‎‏‎‏‎‏‎You\'re currently sharing an app‎‏‎‎‏‎"</string>
<string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‎‏‏‏‏‏‏‎‎‏‏‏‎‎‎‏‎‏‏‏‎‎‏‏‎‏‎‎‏‏‎‎‎‎‏‎‎‎‏‏‏‎‏‎‎‏‎‎‏‎‏‎‎‏‎‎‏‎‎‏‎Stop sharing‎‏‎‎‏‎"</string>
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‎‏‏‏‎‏‎‏‎‎‏‎‏‏‎‏‏‏‏‎‎‏‏‎‎‏‏‏‎‏‏‎‎‏‏‎‎‎‏‎‎‎‎‏‎‎‎‏‏‎‏‏‏‏‏‎‎‎‏‎‎Casting screen‎‏‎‎‏‎"</string>
- <string name="cast_to_other_device_stop_dialog_title" msgid="1910372600290258193">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‏‎‏‎‏‎‎‎‎‎‏‏‎‎‎‎‎‎‎‏‏‏‎‎‎‎‏‎‎‎‏‎‎‏‎‎‏‏‏‏‎‎‎‎‏‎‏‎‏‏‎‏‎‎‎‏‎‎‎‏‎Stop casting screen?‎‏‎‎‏‎"</string>
- <string name="cast_to_other_device_stop_dialog_message" msgid="1502520537030715412">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‎‏‎‎‏‏‎‏‏‎‏‎‎‎‎‎‎‏‏‎‎‏‏‏‎‏‏‏‏‎‏‏‏‏‎‏‎‏‏‏‎‎‎‏‏‏‏‎‏‎‎‎‎‎‎‏‎‏‎‎‎You will stop casting your screen‎‏‎‎‏‎"</string>
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‎‎‏‏‏‏‏‎‎‎‏‎‎‎‏‏‏‎‏‎‎‏‎‎‎‏‎‎‎‎‎‎‏‏‏‎‏‎‎‎‏‏‎‎‎‏‎‎‏‎‎‎‏‏‏‏‏‎‏‎‎You will stop casting &lt;b&gt;‎‏‎‎‏‏‎<xliff:g id="APP_NAME">%1$s</xliff:g>‎‏‎‎‏‏‏‎&lt;/b&gt;‎‏‎‎‏‎"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‎‎‎‏‎‎‎‎‏‏‏‎‏‏‎‏‎‏‎‎‎‎‎‏‏‎‏‏‎‏‏‎‎‎‎‏‎‏‏‎‏‏‎‏‎‎‎‏‎‏‏‏‎‏‎‏‏‏‎‏‎Casting screen‎‏‎‎‏‎"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‏‏‎‎‏‏‎‎‎‎‎‎‏‏‏‎‎‏‏‎‏‏‎‏‏‏‎‏‏‎‎‏‎‎‎‏‏‎‏‎‎‏‎‏‎‏‎‏‏‏‎‎‎‏‎‎‏‏‏‎‎Stop casting?‎‏‎‎‏‎"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen_with_device" msgid="1474703115926205251">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‎‏‎‎‎‏‏‏‎‏‏‏‎‎‏‏‎‎‏‎‏‎‏‎‏‎‏‏‏‎‏‎‏‏‎‏‏‏‏‏‎‎‎‏‎‏‏‏‎‎‏‏‎‏‎‎‎‎‏‏‎You\'re currently casting your entire screen to ‎‏‎‎‏‏‎<xliff:g id="DEVICE_NAME">%1$s</xliff:g>‎‏‎‎‏‏‏‎‎‏‎‎‏‎"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen" msgid="8419219169553867625">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‎‏‎‎‏‏‎‏‎‏‏‏‎‎‎‏‎‎‏‏‎‎‏‏‏‎‏‎‎‏‎‎‏‏‏‏‎‏‏‎‏‎‏‎‏‏‏‎‎‎‏‏‎‏‏‎‏‎‎‏‎You\'re currently casting your entire screen to a nearby device‎‏‎‎‏‎"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app_with_device" msgid="2715934698604085519">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‎‏‎‏‏‎‏‏‎‎‎‎‏‏‏‏‎‎‎‎‎‎‏‏‎‏‏‏‏‏‏‏‏‏‏‏‎‏‏‏‎‏‎‎‎‏‎‎‎‎‎‏‎‎‎‎‏‏‏‏‎You\'re currently casting ‎‏‎‎‏‏‎<xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g>‎‏‎‎‏‏‏‎ to ‎‏‎‎‏‏‎<xliff:g id="DEVICE_NAME">%2$s</xliff:g>‎‏‎‎‏‏‏‎‎‏‎‎‏‎"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="8616103075630934513">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‎‏‏‏‏‎‎‏‎‎‏‎‏‎‎‎‏‏‎‎‎‎‎‏‏‎‎‎‏‏‏‎‎‎‏‏‎‎‏‎‎‎‎‏‏‏‏‎‏‎‎‏‏‏‏‏‎‎‎‏‎You\'re currently casting ‎‏‎‎‏‏‎<xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g>‎‏‎‎‏‏‏‎ to a nearby device‎‏‎‎‏‎"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic_with_device" msgid="9213582497852420203">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‎‏‏‏‎‏‎‎‏‏‏‎‎‎‎‏‏‏‎‏‏‏‎‏‎‏‎‏‎‏‎‎‏‏‏‏‏‏‏‏‏‏‎‎‎‎‎‏‏‎‏‎‏‏‎You\'re currently casting to ‎‏‎‎‏‏‎<xliff:g id="DEVICE_NAME">%1$s</xliff:g>‎‏‎‎‏‏‏‎‎‏‎‎‏‎"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic" msgid="4100272100480415076">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‏‏‎‎‎‏‏‏‎‎‏‏‏‎‎‎‏‎‏‏‏‏‏‎‎‎‎‎‎‎‏‎‎‏‏‏‏‏‎‎‏‎‏‎‎‎‏‏‏‎‏‎‏‎‏‏‎‎‏‎‎‎You\'re currently casting to a nearby device‎‏‎‎‏‎"</string>
<string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‏‎‎‏‎‎‎‏‏‎‎‏‎‎‎‏‎‎‏‏‎‎‎‏‏‎‏‎‎‏‎‎‏‎‏‎‏‎‏‎‎‎‎‏‎‏‏‎‎‏‏‏‎‎‏‎‏‎‏‎‎Stop casting‎‏‎‎‏‎"</string>
<string name="close_dialog_button" msgid="4749497706540104133">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‎‎‎‏‏‏‏‎‏‎‎‏‏‎‎‏‏‎‏‏‎‎‎‎‎‎‎‎‎‎‎‎‏‎‏‏‏‏‎‏‏‎‏‎‏‏‏‏‏‎‎‏‏‏‎‎‎‏‎‏‎Close‎‏‎‎‏‎"</string>
<string name="issuerecord_title" msgid="286627115110121849">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‎‏‎‏‏‏‏‏‏‏‎‏‎‎‏‎‎‏‏‎‏‏‏‎‏‎‏‏‏‏‎‏‏‎‎‏‏‎‎‏‎‎‎‏‎‎‏‎‎‎‎‎‏‎‏‏‏‏‎‎‏‎Issue Recorder‎‏‎‎‏‎"</string>
@@ -284,6 +290,7 @@
<string name="start_dreams" msgid="9131802557946276718">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‏‏‏‎‏‎‏‏‏‎‏‎‏‎‏‎‏‏‏‎‎‎‎‎‏‎‏‏‎‏‎‎‏‎‎‏‎‏‏‎‎‏‎‎‎‎‏‎‏‎‏‏‎‏‏‎‏‏‏‎‎Screen saver‎‏‎‎‏‎"</string>
<string name="ethernet_label" msgid="2203544727007463351">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‏‏‏‎‏‎‎‏‎‏‎‎‏‎‎‏‎‎‎‎‎‏‎‎‎‎‎‏‎‎‎‏‏‎‏‏‏‏‏‏‎‏‏‏‎‎‎‎‎‏‏‏‏‎‏‏‎‏‏‏‎Ethernet‎‏‎‎‏‎"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‏‎‏‏‎‏‎‎‎‎‎‏‏‏‎‏‎‎‏‎‏‏‎‎‎‏‎‏‎‎‎‎‎‎‎‎‏‏‎‎‏‎‎‎‏‎‏‏‎‎‎‎‎‎‎‏‎‎‏‎‎Do Not Disturb‎‏‎‎‏‎"</string>
+ <string name="quick_settings_modes_label" msgid="5407025818652750501">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‏‎‏‏‎‎‎‎‏‎‎‏‏‎‎‏‏‏‎‏‎‏‎‏‎‏‎‏‏‎‎‏‏‏‎‎‎‎‏‎‏‎‎‏‏‎‏‏‎‎‏‎‏‎‏‎‎‏‎‏‎Priority modes‎‏‎‎‏‎"</string>
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‎‎‎‏‎‏‏‎‎‏‏‏‏‎‏‎‏‎‎‎‎‎‎‏‏‎‎‎‎‏‏‎‏‏‎‏‎‎‎‎‎‏‏‎‏‎‏‎‎‏‏‏‏‎‎‎‏‎‎‏‎Bluetooth‎‏‎‎‏‎"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‏‏‏‏‏‏‏‏‎‎‎‎‎‏‏‏‏‎‏‏‎‏‏‎‎‎‏‎‎‎‎‎‏‎‎‎‏‎‏‏‏‏‎‏‏‎‎‎‎‏‏‎‏‎‎‏‎‎‏‎‎No paired devices available‎‏‎‎‏‎"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‎‏‎‏‎‏‏‏‏‎‎‏‏‏‏‎‏‏‎‎‏‎‏‏‏‏‎‎‎‏‎‎‎‎‎‎‏‏‎‏‎‎‎‏‏‏‎‎‏‎‏‎‎‏‏‏‎‏‏‏‎‎Tap to connect or disconnect a device‎‏‎‎‏‎"</string>
@@ -464,8 +471,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‏‎‏‎‏‏‏‎‎‎‏‏‎‏‎‎‏‎‎‏‏‏‎‎‎‏‎‏‏‏‎‎‎‏‏‎‏‎‎‏‎‎‎‎‎‏‎‏‏‏‏‎‎‏‏‏‏‏‎‏‏‎Add more widgets‎‏‎‎‏‎"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‎‎‏‏‎‎‎‏‎‏‎‎‏‏‏‎‎‎‏‎‎‏‏‎‏‏‏‏‎‎‏‎‏‎‏‏‏‎‎‏‎‎‎‎‏‎‎‏‏‎‏‎‏‎‎‎‎‎‏‏‎Long press to customize widgets‎‏‎‎‏‎"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‏‏‎‏‎‎‎‏‎‏‏‎‎‎‏‏‏‏‏‎‏‎‎‎‎‏‏‎‏‏‎‎‎‎‏‎‎‎‏‏‏‎‎‏‎‏‏‎‏‏‏‏‏‏‏‎‎‎‏‎‏‎Customize widgets‎‏‎‎‏‎"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‎‏‎‏‏‎‎‎‏‏‎‏‏‏‏‎‎‎‎‏‎‎‎‏‎‎‏‏‎‎‎‏‏‎‎‎‎‎‏‏‏‏‎‏‏‎‎‎‏‏‏‏‏‏‏‏‎‎‎‏‎Unlock to customize widgets‎‏‎‎‏‎"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‎‎‎‏‎‎‏‎‎‎‎‏‎‏‏‎‏‏‎‎‎‏‏‏‏‎‏‏‏‎‏‎‎‏‎‏‎‎‎‏‎‏‎‏‏‎‏‏‎‎‎‏‎‎‎‏‏‏‏‏‎App icon for disabled widget‎‏‎‎‏‎"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‎‏‎‎‏‏‎‎‎‎‏‏‏‏‏‎‎‎‎‏‎‏‏‏‎‎‎‎‎‏‏‎‏‏‏‎‏‎‏‏‎‎‏‎‏‎‎‏‎‎‎‏‏‏‎‏‏‎‏‏‎App icon for a widget being installed‎‏‎‎‏‎"</string>
<string name="edit_widget" msgid="9030848101135393954">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‏‏‎‏‎‏‎‏‎‏‎‎‎‎‎‎‎‏‎‎‏‎‎‎‎‎‎‎‎‎‏‎‎‎‎‎‏‎‏‎‏‏‏‏‏‎‏‎‎‏‎‎‏‎‏‎‎‎‏‎‎Edit widget‎‏‎‎‏‎"</string>
@@ -484,6 +490,8 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‏‎‏‏‎‏‏‏‏‎‎‏‎‏‏‏‏‏‏‎‎‏‏‎‎‎‏‎‏‎‏‏‏‏‎‎‏‏‎‏‏‎‎‏‏‎‎‏‏‏‎‎‎‎‏‎‏‏‏‏‎select widget‎‏‎‎‏‎"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‏‏‏‎‏‏‎‏‎‎‏‎‎‎‎‏‎‎‏‎‏‎‎‎‏‎‎‎‎‏‎‎‏‎‏‏‏‎‏‏‎‎‏‎‎‏‏‎‎‏‏‏‎‎‏‏‎‏‏‎‎remove widget‎‏‎‎‏‎"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‏‎‏‎‏‎‎‏‎‎‎‎‏‎‎‏‏‎‎‎‎‏‏‏‎‎‏‎‎‏‏‎‎‎‎‎‎‏‏‏‎‎‎‎‏‏‏‏‎‎‎‏‎‎‎‏‎‎‏‎‎place selected widget‎‏‎‎‏‎"</string>
+ <string name="communal_widget_picker_title" msgid="1953369090475731663">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‏‎‏‏‎‎‎‏‏‎‏‏‏‏‎‎‎‎‏‎‏‏‎‏‎‏‏‎‏‎‏‎‎‎‎‏‎‎‎‎‏‎‎‎‏‎‏‎‏‎‏‎‏‏‎‎‏‏‏‏‎Lock screen widgets‎‏‎‎‏‎"</string>
+ <string name="communal_widget_picker_description" msgid="490515450110487871">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‎‏‏‏‏‎‏‏‎‎‏‏‏‎‏‎‏‎‏‎‎‏‎‎‏‏‎‎‏‏‏‏‏‏‏‎‎‎‏‎‏‎‏‏‎‏‎‎‏‎‏‏‎‏‎‎‏‏‏‏‏‏‎Anyone can view widgets on your lock screen, even if your tablet\'s locked.‎‏‎‎‏‎"</string>
<string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‎‏‏‏‏‏‏‏‏‏‎‎‏‎‎‎‎‎‎‏‎‏‏‏‎‏‏‎‎‏‎‏‏‏‏‎‏‏‎‎‎‏‎‎‏‎‏‏‎‏‎‎‎‏‏‎‎‎‏‎‎‎Lock screen widgets‎‏‎‎‏‎"</string>
<string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‎‎‏‏‏‏‎‎‎‎‎‏‎‏‏‏‎‎‏‏‎‎‎‏‎‎‎‏‎‏‎‎‎‎‎‎‏‎‎‎‏‏‏‎‎‏‏‏‏‏‏‏‏‏‏‎‏‏‎‏‎To open an app using a widget, you’ll need to verify it’s you. Also, keep in mind that anyone can view them, even when your tablet’s locked. Some widgets may not have been intended for your lock screen and may be unsafe to add here.‎‏‎‎‏‎"</string>
<string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‏‏‏‎‏‎‏‏‎‎‎‎‏‏‏‎‏‏‏‎‏‎‏‏‎‏‏‎‎‎‎‏‎‏‏‎‏‎‏‎‎‏‏‎‏‎‎‏‏‏‏‎‎‏‏‎‏‎‎‎‏‎Got it‎‏‎‎‏‎"</string>
@@ -708,7 +716,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‏‎‎‏‎‏‎‏‏‏‏‎‏‏‎‎‎‏‎‎‏‏‎‎‏‏‏‎‏‎‏‎‎‎‎‏‎‏‏‎‎‎‎‎‏‎‏‎‎‎‎‏‏‏‏‏‎‎‏‏‏‎Default‎‏‎‎‏‎"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‏‎‎‏‏‏‏‏‏‏‎‏‎‏‎‎‏‎‎‎‎‏‏‏‎‎‏‏‏‏‎‎‏‏‏‏‎‎‎‏‏‏‏‏‎‏‏‏‏‏‏‏‏‏‎‎‏‏‏‎‎‎Automatic‎‏‎‎‏‎"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‎‎‏‏‎‏‏‏‎‏‎‎‎‏‏‎‎‎‏‎‎‏‎‎‏‏‏‎‎‏‏‏‎‎‏‎‏‎‎‏‎‏‎‎‏‏‎‎‎‏‎‎‎‏‎‏‎‏‏‎‎No sound or vibration‎‏‎‎‏‎"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‏‎‎‎‎‎‎‏‎‎‎‏‏‏‏‏‎‎‏‎‎‎‎‎‎‎‏‎‏‏‏‏‏‎‎‎‎‏‏‎‎‎‏‏‎‏‎‏‎‏‏‏‎‏‏‎‏‎‎‏‎No sound or vibration and appears lower in conversation section‎‏‎‎‏‎"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‎‏‎‏‎‏‏‎‎‏‎‎‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‎‏‏‎‏‎‏‎‏‎‎‎‏‏‎‎‎‎‏‎‏‏‎‎‏‏‎‎‏‏‏‎‏‎May ring or vibrate based on device settings‎‏‎‎‏‎"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‏‎‎‎‎‎‏‎‏‎‏‎‎‎‏‎‎‎‎‏‏‏‏‏‎‏‎‏‎‎‎‎‏‎‎‎‏‎‎‎‎‏‎‏‎‏‎‏‎‏‎‎‎‎‎‎‏‎‎‎‎‎May ring or vibrate based on device settings. Conversations from ‎‏‎‎‏‏‎<xliff:g id="APP_NAME">%1$s</xliff:g>‎‏‎‎‏‏‏‎ bubble by default.‎‏‎‎‏‎"</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‎‎‎‎‏‎‏‎‏‏‎‎‎‏‎‏‎‎‎‎‎‎‎‏‎‏‎‎‏‎‎‎‎‎‏‎‏‎‏‎‏‎‏‎‎‏‎‎‏‏‏‏‏‎‎‎‏‎‏‏‎Have the system determine if this notification should make sound or vibration‎‏‎‎‏‎"</string>
@@ -765,6 +774,7 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‎‏‎‏‎‎‏‏‎‏‎‎‏‏‏‎‏‏‏‏‎‎‎‏‎‎‎‏‏‎‎‏‎‏‎‏‎‏‏‎‏‎‎‏‏‎‏‏‏‏‏‏‎‎‎‏‎‎‏‎‏‎Page Up‎‏‎‎‏‎"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‏‏‎‏‎‏‏‎‎‏‎‏‏‏‏‏‏‎‎‏‎‏‏‏‎‎‎‎‏‏‎‎‎‎‎‏‏‏‎‎‏‏‎‎‏‎‎‎‏‏‎‎‏‏‏‎‎‎‏‏‎Page Down‎‏‎‎‏‎"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‏‎‎‏‏‏‏‎‎‏‏‏‏‏‏‏‏‎‏‏‏‎‏‏‎‎‎‏‏‏‎‏‏‏‏‏‎‏‎‎‏‎‎‎‎‎‏‎‏‏‎‏‏‎‎‏‎‎‏‏‎Delete‎‏‎‎‏‎"</string>
+ <string name="keyboard_key_esc" msgid="6230365950511411322">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‎‏‏‎‎‏‏‏‎‏‏‎‏‎‏‏‎‏‎‎‏‏‎‏‎‎‏‎‎‏‏‏‎‏‎‎‏‏‏‎‏‎‏‏‏‏‏‏‎‎‎‎‎‏‏‏‏‎‏‎‎Esc‎‏‎‎‏‎"</string>
<string name="keyboard_key_move_home" msgid="3496502501803911971">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‏‎‎‎‎‏‎‎‎‎‏‏‎‎‎‎‏‎‎‏‎‏‎‎‎‎‎‎‎‎‎‎‎‏‎‎‎‎‏‎‎‏‎‎‏‎‏‏‎‏‎‏‏‎‎‏‎‎‎‏‏‎Home‎‏‎‎‏‎"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‎‎‏‏‎‏‏‎‎‎‎‎‎‏‏‎‎‏‎‏‎‎‏‎‎‏‎‏‎‎‎‎‎‏‎‎‎‏‏‎‎‎‎‏‎‏‎‏‏‎‎‎‏‏‏‎‎‏‏‎‎End‎‏‎‎‏‎"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‎‎‎‎‎‎‏‎‎‎‏‏‏‎‎‎‏‏‎‏‎‎‎‎‏‎‎‏‏‏‎‎‎‏‎‎‏‎‎‏‎‎‏‎‎‏‏‎‎‎‎‏‎‏‏‏‏‏‎‏‎Insert‎‏‎‎‏‎"</string>
@@ -1347,6 +1357,7 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‎‎‎‎‎‎‎‏‎‏‏‏‏‏‏‏‏‎‎‏‏‎‎‎‏‏‎‏‎‎‎‏‎‏‏‏‎‎‎‏‏‏‏‏‎‎‎‏‏‏‎‏‏‏‎‏‎‏‎‎‎Split screen‎‏‎‎‏‎"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‏‎‎‎‎‏‏‎‎‎‎‎‎‏‎‎‏‏‏‎‎‎‎‎‎‎‏‎‎‏‎‎‏‏‏‎‎‎‏‏‏‎‎‏‎‎‎‏‎‎‏‎‏‎‎‎‏‏‏‎‎Input‎‏‎‎‏‎"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‏‏‏‏‎‎‏‎‏‎‏‎‎‎‎‏‏‏‏‏‎‏‏‎‎‏‎‏‏‎‎‏‎‎‎‎‏‎‎‎‎‏‎‎‎‎‏‎‏‎‏‎‎‏‏‎‏‏‎‏‎App shortcuts‎‏‎‎‏‎"</string>
+ <string name="shortcut_helper_category_current_app_shortcuts" msgid="4017840565974573628">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‏‎‏‏‏‏‏‎‎‎‎‏‎‎‎‏‏‏‏‎‎‏‎‏‏‎‏‎‏‎‎‎‏‎‎‏‏‎‎‎‏‎‎‎‏‏‎‏‎‎‎‏‎‎‎‏‏‏‏‎‎‎Current App‎‏‎‎‏‎"</string>
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‎‏‏‏‏‎‏‎‎‎‎‏‎‏‏‎‏‎‏‎‎‎‎‏‎‏‎‏‎‏‏‎‎‎‏‏‎‎‏‏‏‎‏‎‎‏‎‏‏‏‏‏‏‎‎‏‏‎‎‎‎Accessibility‎‏‎‎‏‎"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‎‏‏‎‏‏‏‎‎‏‎‏‏‏‏‎‎‎‎‎‎‏‏‏‎‎‎‎‎‏‎‏‏‎‏‎‎‏‏‏‎‏‏‏‎‏‏‎‎‏‏‎‎‏‎‎‎‎‎‏‎Keyboard shortcuts‎‏‎‎‏‎"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‏‏‎‎‎‎‏‎‏‎‏‏‎‎‏‏‏‏‎‎‏‏‏‎‎‏‎‏‎‏‎‎‎‏‎‎‎‎‏‎‏‎‏‎‎‎‏‎‎‏‏‎‏‏‎‎‏‎‏‏‎Search shortcuts‎‏‎‎‏‎"</string>
@@ -1357,6 +1368,7 @@
<string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‏‎‏‎‎‎‎‎‏‎‎‎‏‎‏‎‏‎‏‏‎‎‎‏‎‎‏‏‎‏‏‎‎‏‎‏‎‏‎‎‎‏‏‏‎‏‏‎‏‏‏‏‏‏‏‎‏‎‎‎‎Home gesture‎‏‎‎‏‎"</string>
<string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‏‏‎‎‏‎‏‏‎‎‎‎‎‎‎‎‎‎‎‎‏‎‏‏‎‏‎‏‎‎‏‏‎‏‎‏‎‏‎‎‏‎‎‎‎‏‏‏‏‎‎‏‎‎‏‎‎‎‏‏‎Action key‎‏‎‎‏‎"</string>
<string name="touchpad_tutorial_done_button" msgid="176168488821755503">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‎‏‎‏‎‎‏‏‏‎‎‎‏‏‏‏‎‎‎‎‎‎‏‎‎‏‏‏‎‏‎‏‎‎‏‎‎‏‏‎‏‎‏‏‎‏‎‎‎‏‏‏‎‎‏‏‎‏‏‏‏‎Done‎‏‎‎‏‎"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‎‎‏‎‎‏‏‎‎‏‎‏‏‎‏‏‏‏‎‏‎‏‎‏‎‏‏‏‎‎‎‎‏‏‎‏‎‏‏‏‏‎‎‎‎‏‏‏‎‎‎‎‎‎‎‎‎‏‏‏‎Great job!‎‏‎‎‏‎"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‎‎‏‏‏‏‏‎‏‎‎‎‎‎‏‏‏‎‎‏‏‎‎‎‎‏‎‏‏‎‏‎‏‏‎‏‎‏‏‎‎‏‏‎‎‏‎‎‎‏‏‏‎‎‏‏‏‏‏‏‎Go back‎‏‎‎‏‎"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‏‏‎‏‎‏‎‎‏‏‎‎‏‎‎‎‏‎‏‏‎‎‎‏‏‏‏‏‏‏‎‏‏‏‎‏‎‎‎‏‏‎‏‏‏‏‏‏‎‎‏‏‏‎‏‏‎‏‎‎‎‎To go back, swipe left or right using three fingers anywhere on the touchpad.‎‏‎‎‏‎"</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‎‏‎‎‏‎‏‏‏‎‎‎‏‏‎‏‏‏‎‎‏‎‏‏‎‏‎‎‏‏‏‏‏‎‎‏‏‎‏‏‏‏‏‎‎‎‏‎‏‎‏‎‏‎‎‎‏‏‏‎‎Touchpad showing three fingers moving right and left‎‏‎‎‏‎"</string>
@@ -1365,4 +1377,5 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‎‏‎‏‏‏‎‏‎‎‎‎‎‎‎‏‏‏‏‏‏‏‎‎‏‏‏‎‏‎‏‏‎‎‎‏‎‏‎‎‎‏‎‏‏‎‏‎‎‏‎‏‎‏‎‎‎‎‏‎‎Level %1$d of %2$d‎‏‎‎‏‎"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‏‎‏‏‎‎‏‎‎‎‏‏‎‎‎‎‏‎‏‏‏‏‎‏‎‏‏‏‎‏‎‏‏‏‏‏‏‏‏‏‏‎‎‎‏‎‏‏‎‏‎‏‏‎‏‎‎‎‎‏‎Home Controls‎‏‎‎‏‎"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‎‎‎‎‎‏‏‏‎‎‏‏‎‏‎‏‎‏‏‎‏‎‏‎‏‏‏‏‎‏‏‎‎‏‏‏‎‏‏‏‎‏‎‎‎‎‎‎‎‏‎‏‏‏‎‎‏‏‎‏‎Quickly access your home controls as a screensaver‎‏‎‎‏‎"</string>
+ <string name="volume_undo_action" msgid="5815519725211877114">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‎‎‎‎‏‎‏‏‎‏‎‎‏‏‏‎‎‎‎‎‎‏‏‎‎‎‎‎‏‏‎‎‏‏‎‏‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‎‏‏‏‏‏‎‏‎‎Undo‎‏‎‎‏‎"</string>
</resources>
diff --git a/packages/SystemUI/res/values-en-rXC/tiles_states_strings.xml b/packages/SystemUI/res/values-en-rXC/tiles_states_strings.xml
index 35ab88b202de..a6a5fddbb8ef 100644
--- a/packages/SystemUI/res/values-en-rXC/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-en-rXC/tiles_states_strings.xml
@@ -56,6 +56,11 @@
<item msgid="5376619709702103243">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‏‎‏‎‏‎‎‏‏‏‎‏‏‎‎‏‎‏‏‏‎‎‏‎‎‎‏‏‏‎‏‏‎‎‎‏‎‎‏‎‏‎‎‎‎‏‏‎‎‎‎‎‏‏‎‎‏‎‏‏‎Off‎‏‎‎‏‎"</item>
<item msgid="4875147066469902392">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‎‎‏‏‏‎‏‎‏‎‎‎‎‎‎‎‎‎‎‎‎‏‏‎‏‏‎‏‎‏‏‎‎‏‎‎‏‎‏‏‏‎‎‏‏‏‏‎‏‎‎‎‎‎‏‏‏‎‎‎‎On‎‏‎‎‏‎"</item>
</string-array>
+ <string-array name="tile_states_modes">
+ <item msgid="7764936419245199023">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‏‎‏‏‏‏‎‎‎‎‏‎‏‎‎‏‏‎‎‎‏‎‎‎‏‎‎‎‎‏‏‎‏‏‎‎‏‎‎‏‏‎‏‎‏‎‎‎‏‏‏‎‏‎‏‎‏‏‏‏‎Unavailable‎‏‎‎‏‎"</item>
+ <item msgid="2004750556637773692">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‏‎‏‏‏‏‎‏‎‎‏‎‎‏‎‎‏‏‏‎‎‎‎‎‎‎‏‎‎‏‏‏‎‏‏‏‏‎‏‎‏‎‎‏‎‎‏‏‏‏‏‏‎‏‏‏‏‏‎‎‎Off‎‏‎‎‏‎"</item>
+ <item msgid="8968530753931637871">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‏‏‎‎‎‏‏‏‎‏‏‎‏‎‎‏‏‏‏‏‎‎‏‏‎‏‎‎‎‎‎‏‎‎‎‏‎‏‎‎‎‎‏‎‏‏‏‏‎‏‎‎‎‏‏‎‏‏‏‏‎On‎‏‎‎‏‎"</item>
+ </string-array>
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‏‎‎‎‎‎‎‎‏‎‏‏‏‎‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‏‎‏‎‎‎‎‎‎‎‏‏‏‎‎‎‏‏‏‎‏‎‏‎‎‎‎‎‎‏‎Unavailable‎‏‎‎‏‎"</item>
<item msgid="5044688398303285224">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‎‏‏‎‎‎‎‎‎‎‏‎‎‏‎‏‎‏‎‏‎‏‎‏‏‏‏‎‏‏‎‎‏‏‏‏‎‏‏‎‎‏‏‎‏‏‎‎‏‏‏‏‏‏‏‎‏‎‎‎‎Off‎‏‎‎‏‎"</item>
diff --git a/packages/SystemUI/res/values-es-rUS/strings.xml b/packages/SystemUI/res/values-es-rUS/strings.xml
index a5ccf57776ac..1b751b46ec90 100644
--- a/packages/SystemUI/res/values-es-rUS/strings.xml
+++ b/packages/SystemUI/res/values-es-rUS/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> detectó que tomaste una captura de pantalla."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> y otras apps en ejecución detectaron que tomaste una captura de pantalla."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Agregar a la nota"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Incluir vínculo"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Grabadora de pantalla"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Procesando grabación pantalla"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Notificación constante para una sesión de grabación de pantalla"</string>
@@ -127,33 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Presiona para ver"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Se produjo un error al guardar la grabación de pantalla"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Error al iniciar la grabación de pantalla"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
+ <skip />
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Dejarás de grabar contenido de &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Detener la grabación"</string>
+ <string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Compartiendo pantalla"</string>
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"¿Quieres dejar de compartir la pantalla?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
<skip />
- <!-- no translation found for share_to_app_chip_accessibility_label (4210256229976947065) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Dejarás de compartir contenido de &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Dejar de compartir"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Transmitiendo pantalla"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"¿Detener la transmisión?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <!-- no translation found for cast_to_other_device_chip_accessibility_label (1680650146639059938) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Dejarás de transmitir contenido de &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
<skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Detener transmisión"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Cerrar"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Grabadora de errores"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Procesando grabación del error"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Notificación continua por un error durante la sesión de recopilación de datos"</string>
@@ -164,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Se produjo un error al guardar la grabación del problema"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Se produjo un error al iniciar la grabación del problema"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Visualización en pantalla completa"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Para salir, desliza el dedo hacia abajo desde la parte superior de la pantalla"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"Entendido"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Atrás"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Página principal"</string>
@@ -198,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Desbloqueo con rostro. Presiona para continuar."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Rostro reconocido. Presiona para continuar."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Rostro reconocido. Presiona el desbloqueo para continuar."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Se desbloqueó con el rostro. Presiona para continuar."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Autenticado"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Cancelar autenticación"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Más opciones"</string>
@@ -299,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Protector pantalla"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"No interrumpir"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"No hay dispositivos sincronizados disponibles"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Presiona para conectar o desconectar un dispositivo"</string>
@@ -310,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Guardado"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"desconectar"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"activar"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Activar automáticamente mañana"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Las funciones como Quick Share y Encontrar mi dispositivo usan Bluetooth"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"El Bluetooth se activará mañana a la mañana"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Compartir audio"</string>
@@ -387,7 +392,7 @@
<string name="quick_settings_screen_record_label" msgid="8650355346742003694">"Grabación de pantalla"</string>
<string name="quick_settings_screen_record_start" msgid="1574725369331638985">"Iniciar"</string>
<string name="quick_settings_screen_record_stop" msgid="8087348522976412119">"Detener"</string>
- <string name="qs_record_issue_label" msgid="8166290137285529059">"Grabar error"</string>
+ <string name="qs_record_issue_label" msgid="8166290137285529059">"Registrar problema"</string>
<string name="qs_record_issue_start" msgid="2979831312582567056">"Iniciar"</string>
<string name="qs_record_issue_stop" msgid="3531747965741982657">"Detener"</string>
<string name="qs_record_issue_bug_report" msgid="8229031766918650079">"Informe de errores"</string>
@@ -480,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Agregar más widgets"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Mantén presionado para personalizar los widgets"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Personalizar widgets"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Desbloquea para personalizar los widgets"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Ícono de la app de widget inhabilitado"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Ícono de la app para un widget que se está instalando"</string>
<string name="edit_widget" msgid="9030848101135393954">"Modificar widget"</string>
@@ -500,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"Seleccionar widget"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"quitar widget"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"colocar widget seleccionado"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Widgets en la pantalla de bloqueo"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Para abrir una app usando un widget, debes verificar tu identidad. Además, ten en cuenta que cualquier persona podrá verlo, incluso cuando la tablet esté bloqueada. Es posible que algunos widgets no se hayan diseñados para la pantalla de bloqueo y podría ser peligroso agregarlos allí."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"Entendido"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Cambiar usuario"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"menú expandible"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Se eliminarán las aplicaciones y los datos de esta sesión."</string>
@@ -727,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Predeterminada"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Automática"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Sin sonido ni vibración"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"No suena ni vibra, y aparece en la parte inferior de la sección de conversaciones"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Puede sonar o vibrar según la configuración del dispositivo"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Puede sonar o vibrar según la configuración del dispositivo. Conversaciones de la burbuja de <xliff:g id="APP_NAME">%1$s</xliff:g> de forma predeterminada."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Dejar que el sistema determine si esta notificación debe emitir un sonido o una vibración"</string>
@@ -784,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Re Pág"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Av Pág"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Borrar"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Inicio"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"Fin"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insertar"</string>
@@ -1359,31 +1367,26 @@
<string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"En uso por <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string>
<string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"Uso reciente en <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string>
<string name="shortcut_helper_category_system" msgid="462110876978937359">"Sistema"</string>
- <!-- no translation found for shortcut_helper_category_system_controls (3153344561395751020) -->
- <skip />
- <!-- no translation found for shortcut_helper_category_system_apps (6001757545472556810) -->
- <skip />
+ <string name="shortcut_helper_category_system_controls" msgid="3153344561395751020">"Controles del sistema"</string>
+ <string name="shortcut_helper_category_system_apps" msgid="6001757545472556810">"Apps del sistema"</string>
<string name="shortcut_helper_category_multitasking" msgid="7413381961404090136">"Tareas múltiples"</string>
- <!-- no translation found for shortcutHelper_category_recent_apps (7918731953612377145) -->
- <skip />
- <!-- no translation found for shortcutHelper_category_split_screen (1159669813444812244) -->
- <skip />
+ <string name="shortcutHelper_category_recent_apps" msgid="7918731953612377145">"Apps recientes"</string>
+ <string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Pantalla dividida"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Entrada"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Accesos directos a aplicaciones"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Accesibilidad"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Combinaciones de teclas"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Buscar combinaciones de teclas"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Ícono de contraer"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Ícono de expandir"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"o"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Gesto atrás"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Gesto para ir a la pantalla principal"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Tecla de acción"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Listo"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"¡Bien hecho!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Atrás"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Para volver, desliza tres dedos hacia la derecha o izquierda en cualquier lugar del panel táctil."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Panel táctil en el que aparecen tres dedos que se mueven hacia la derecha y la izquierda"</string>
@@ -1392,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Nivel %1$d de %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Controles de la casa"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Usa rápidamente los controles de la casa como protector de pantalla"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-es-rUS/tiles_states_strings.xml b/packages/SystemUI/res/values-es-rUS/tiles_states_strings.xml
index 869efff07bdf..b82fafeb122c 100644
--- a/packages/SystemUI/res/values-es-rUS/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-es-rUS/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Desactivado"</item>
<item msgid="4875147066469902392">"Activado"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"No disponible"</item>
<item msgid="5044688398303285224">"Desactivada"</item>
diff --git a/packages/SystemUI/res/values-es/strings.xml b/packages/SystemUI/res/values-es/strings.xml
index 28601fde3705..56985bc4d478 100644
--- a/packages/SystemUI/res/values-es/strings.xml
+++ b/packages/SystemUI/res/values-es/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> ha detectado esta captura de pantalla."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> y otras aplicaciones abiertas han detectado esta captura de pantalla."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Añadir a nota"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Incluir enlace"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Grabación de pantalla"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Procesando grabación de pantalla"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Notificación continua de una sesión de grabación de la pantalla"</string>
@@ -127,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Toca para verla"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"No se ha podido guardar la grabación de pantalla"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"No se ha podido empezar a grabar la pantalla"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Dejarás de grabar &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Detener grabación"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Compartiendo pantalla"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"¿Dejar de compartir pantalla?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Dejarás de compartir &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Dejar de compartir"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Enviando pantalla"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"¿Dejar de enviar?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Enviando pantalla"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Dejarás de enviar &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Dejar de enviar contenido"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Cerrar"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Grabadora de problemas"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Procesando grabación de problema"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Notificación continua de una sesión de obtención de datos del problema"</string>
@@ -162,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"No se ha podido guardar la grabación del problema"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"No se ha podido iniciar la grabación del problema"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Visualización en pantalla completa"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Para salir, desliza hacia abajo desde la parte superior de la pantalla"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"Entendido"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Atrás"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Inicio"</string>
@@ -196,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Desbloqueado con la cara. Pulsa para continuar."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Cara reconocida. Pulsa para continuar."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Cara reconocida. Pulsa el icono de desbloquear para continuar."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Desbloqueado con la cara. Toca para continuar."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Se ha autenticado"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Cancelar autenticación"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Más opciones"</string>
@@ -297,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Salvapantallas"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"No molestar"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"No hay dispositivos vinculados disponibles"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Toca para conectar o desconectar un dispositivo"</string>
@@ -308,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Guardado"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"desconectar"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"activar"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Activar automáticamente mañana"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Las funciones como Quick Share y Encontrar mi dispositivo usan Bluetooth"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"El Bluetooth se activará mañana por la mañana"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Compartir audio"</string>
@@ -478,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Añade más widgets"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Mantén pulsado para personalizar los widgets"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Personalizar widgets"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Desbloquea para personalizar los widgets"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Icono de la aplicación de widget inhabilitado"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Instalando icono de aplicación para widget"</string>
<string name="edit_widget" msgid="9030848101135393954">"Editar widget"</string>
@@ -498,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"seleccionar widget"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"eliminar widget"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"colocar widget seleccionado"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Widgets para la pantalla de bloqueo"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Para abrir una aplicación usando un widget, deberás verificar que eres tú. Además, ten en cuenta que cualquier persona podrá verlos, incluso aunque tu tablet esté bloqueada. Es posible que algunos widgets no estén pensados para la pantalla de bloqueo y no sea seguro añadirlos aquí."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"Entendido"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Cambiar de usuario"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"menú desplegable"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Se eliminarán todas las aplicaciones y datos de esta sesión."</string>
@@ -557,7 +564,7 @@
<string name="media_projection_action_text" msgid="3634906766918186440">"Empezar ahora"</string>
<string name="empty_shade_text" msgid="8935967157319717412">"No hay notificaciones"</string>
<string name="no_unseen_notif_text" msgid="395512586119868682">"No hay notificaciones nuevas"</string>
- <string name="adaptive_notification_edu_hun_title" msgid="5720882373252389461">"Notif. adaptativas activadas"</string>
+ <string name="adaptive_notification_edu_hun_title" msgid="5720882373252389461">"Notificaciones adaptativas activadas"</string>
<string name="adaptive_notification_edu_hun_text" msgid="4260536236101821273">"Tu dispositivo baja el volumen y reduce las ventanas emergentes durante un máximo de 2 minutos cuando recibes muchas notificaciones en poco tiempo."</string>
<string name="go_to_adaptive_notification_settings" msgid="2423690125178298479">"Desactivar"</string>
<string name="unlock_to_see_notif_text" msgid="7439033907167561227">"Desbloquea para ver notificaciones anteriores"</string>
@@ -725,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Predeterminado"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Automática"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Sin sonido ni vibración"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Sin sonido ni vibración, y se muestra más abajo en la sección de conversaciones"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Puede sonar o vibrar según los ajustes del dispositivo"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Puede sonar o vibrar según los ajustes del dispositivo. Las conversaciones de <xliff:g id="APP_NAME">%1$s</xliff:g> aparecen como burbujas de forma predeterminada."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Haz que el sistema determine si con esta notificación el dispositivo debe sonar o vibrar"</string>
@@ -782,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Re Pág"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Av Pág"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Supr"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Inicio"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"Fin"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1364,20 +1374,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Pantalla dividida"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Entrada"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Accesos directos a aplicaciones"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Accesibilidad"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Combinaciones de teclas"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Atajos de búsqueda"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Icono de contraer"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Icono de desplegar"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"o"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Gesto para volver"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Gesto para ir al inicio"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Tecla de acción"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Hecho"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"¡Bien hecho!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Atrás"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Para volver, desliza tres dedos hacia la izquierda o la derecha en cualquier punto del panel táctil."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Panel táctil con tres dedos moviéndose hacia la derecha y la izquierda"</string>
@@ -1386,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Nivel %1$d de %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Controles de la casa"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Usa los controles de tu casa como salvapantallas"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-es/tiles_states_strings.xml b/packages/SystemUI/res/values-es/tiles_states_strings.xml
index 5dbb2c132f4c..02365e5061a8 100644
--- a/packages/SystemUI/res/values-es/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-es/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Desactivado"</item>
<item msgid="4875147066469902392">"Activado"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"No disponible"</item>
<item msgid="5044688398303285224">"Desactivado"</item>
diff --git a/packages/SystemUI/res/values-et/strings.xml b/packages/SystemUI/res/values-et/strings.xml
index 60a1fbf8659c..111480fc9e2c 100644
--- a/packages/SystemUI/res/values-et/strings.xml
+++ b/packages/SystemUI/res/values-et/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> tuvastas selle ekraanipildi."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> ja muud avatud rakendused tuvastasid selle ekraanipildi."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Lisa märkmesse"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Kaasa link"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Ekraanisalvesti"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Ekraanisalvestuse töötlemine"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Pooleli märguanne ekraanikuva salvestamise seansi puhul"</string>
@@ -127,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Puudutage kuvamiseks"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Viga ekraanisalvestise salvestamisel"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Viga ekraanikuva salvestamise alustamisel"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Lõpetate rakenduse &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; sisu salvestamise"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Peata salvestamine"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Ekraani jagamine"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Kas lõpetada ekraanikuva jagamine?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Lõpetate rakenduse &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; sisu jagamise"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Lõpeta jagamine"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Ekraanikuva ülekandmine"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Kas peatada ülekandmine?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Ekraanikuva ülekandmine"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Lõpetate rakenduse &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; sisu ülekandmise"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Peata ülekandmine"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Sule"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Probleemisalvesti"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Probleemisalvestise töötlemine"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Probleemikogumise seansi taustamärguanne"</string>
@@ -162,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Viga probleemisalvestise salvestamisel"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Viga probleemi salvestamise alustamisel"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Kuvamine täisekraanil"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Väljumiseks pühkige ekraanikuva ülaosast alla"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"Selge"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Tagasi"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Kodu"</string>
@@ -196,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Avati näoga. Vajutage jätkamiseks."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Nägu tuvastati. Vajutage jätkamiseks."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Nägu tuvastati. Jätkamiseks vajutage avamise ikooni."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Avati näoga. Puudutage jätkamiseks."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Autenditud"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Tühista autentimine"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Rohkem valikuid"</string>
@@ -297,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Ekraanisäästja"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Mitte segada"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Ühtegi seotud seadet pole saadaval"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Puudutage seadme ühendamiseks või ühenduse katkestamiseks"</string>
@@ -308,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Salvestatud"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"katkesta ühendus"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"aktiveeri"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Lülita homme automaatselt sisse"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Sellised funktsioonid nagu Kiirjagamine ja Leia mu seade kasutavad Bluetoothi."</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bluetooth lülitub sisse homme hommikul"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Jaga heli"</string>
@@ -478,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Lisage rohkem vidinaid"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Vajutage pikalt vidinate kohandamiseks"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Kohanda vidinaid"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Avage vidinate kohandamiseks"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Keelatud vidina rakenduseikoon"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Installitava vidina rakenduseikoon"</string>
<string name="edit_widget" msgid="9030848101135393954">"Muuda vidinat"</string>
@@ -498,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"vidina valimine"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"eemaldage vidin"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"asetage valitud vidin"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Lukustuskuva vidinad"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Rakenduse avamiseks vidina abil peate kinnitama, et see olete teie. Samuti pidage meeles, et kõik saavad vidinaid vaadata, isegi kui teie tahvelarvuti on lukus. Mõni vidin ei pruugi olla ette nähtud teie lukustuskuva jaoks ja seda pole turvaline siia lisada."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"Selge"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Kasutaja vahetamine"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"rippmenüü"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Seansi kõik rakendused ja andmed kustutatakse."</string>
@@ -725,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Vaikeseade"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Automaatne"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Ilma heli ja vibreerimiseta"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Ilma heli ja vibreerimiseta, kuvatakse vestluste jaotises allpool"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Võib seadme seadete põhjal heliseda või vibreerida"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Võib seadme seadete põhjal heliseda või vibreerida. Rakenduse <xliff:g id="APP_NAME">%1$s</xliff:g> vestlused kuvatakse vaikimisi mullis."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Laske süsteemil määrata, kas selle märguande puhul peaks esitama heli või vibreerima"</string>
@@ -782,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Lehe võrra üles"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Lehe võrra alla"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Kustuta"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Avakuva"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"Lõpp"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Sisesta"</string>
@@ -1364,20 +1374,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Jagatud ekraanikuva"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Sisend"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Rakenduse otseteed"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Juurdepääsetavus"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Klaviatuuri otseteed"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Otsingu otseteed"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Ahendamisikoon"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Laiendamisikoon"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"või"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Tagasiliikumisliigutus"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Avakuvale liikumise liigutus"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Toiminguklahv"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Valmis"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Väga hea!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Tagasi"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Tagasiliikumiseks pühkige puuteplaadil kolme sõrmega vasakule või paremale."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Puuteplaat kolme paremale ja vasakule liikuva sõrmega"</string>
@@ -1386,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Tase %1$d/%2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Kodu juhtelemendid"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Juurdepääs kodu juhtelementidele ekraanisäästjalt"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-et/tiles_states_strings.xml b/packages/SystemUI/res/values-et/tiles_states_strings.xml
index 704649e77b86..3794f9ae109f 100644
--- a/packages/SystemUI/res/values-et/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-et/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Väljas"</item>
<item msgid="4875147066469902392">"Sees"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Pole saadaval"</item>
<item msgid="5044688398303285224">"Väljas"</item>
diff --git a/packages/SystemUI/res/values-eu/strings.xml b/packages/SystemUI/res/values-eu/strings.xml
index 2ba8a6392c4e..f082ea11de98 100644
--- a/packages/SystemUI/res/values-eu/strings.xml
+++ b/packages/SystemUI/res/values-eu/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> aplikazioak pantaila-argazkia hauteman du."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> aplikazioak eta irekitako beste aplikazio batzuek pantaila-argazkia hauteman dute."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Gehitu oharrean"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Sartu esteka"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Pantaila-grabagailua"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Pantaila-grabaketa prozesatzen"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Pantailaren grabaketa-saioaren jakinarazpen jarraitua"</string>
@@ -127,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Sakatu ikusteko"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Errore bat gertatu da pantaila-grabaketa gordetzean"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Errore bat gertatu da pantaila grabatzen hastean"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; grabatzeari utziko diozu"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Utzi grabatzeari"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Pantaila partekatzen"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Pantaila partekatzeari utzi nahi diozu?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; partekatzeari utziko diozu"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Utzi partekatzeari"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Pantaila igortzen"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Igortzeari utzi nahi diozu?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Pantaila igortzen"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; igortzeari utziko diozu"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Utzi igortzeari"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Itxi"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Arazo-grabagailua"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Arazoaren grabaketa prozesatzen"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Arazo bat biltzeko saio baten aktibo dagoen jakinarazpena"</string>
@@ -162,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Errore bat gertatu da arazoa grabatzean"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Errore bat gertatu da arazoa grabatzen hastean"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Pantaila osoa ikusgai"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Irteteko, pasatu hatza pantailaren goialdetik beherantz"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"Ados"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Atzera"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Hasiera"</string>
@@ -196,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Aurpegiaren bidez desblokeatu da. Sakatu aurrera egiteko."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Ezagutu da aurpegia. Sakatu aurrera egiteko."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Ezagutu da aurpegia. Aurrera egiteko, sakatu desblokeatzeko ikonoa."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Aurpegiaren bidez desblokeatu da. Sakatu hau aurrera egiteko."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Autentifikatuta"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Utzi bertan behera autentifikazioa"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Aukera gehiago"</string>
@@ -297,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Pantaila-babeslea"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Ez molestatzeko modua"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetootha"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Ez dago parekatutako gailurik erabilgarri"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Sakatu hau gailu bat konektatu edo deskonektatzeko"</string>
@@ -308,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Gordeta"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"deskonektatu"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"aktibatu"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Aktibatu automatikoki bihar"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Quick Share, Bilatu nire gailua eta beste eginbide batzuek Bluetootha erabiltzen dute"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bihar goizean aktibatuko da Bluetootha"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Partekatu audioa"</string>
@@ -478,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Gehitu widget gehiago"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Widgetak pertsonalizatzeko, sakatu luze"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Pertsonalizatu widgetak"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Desblokeatu hau widgetak pertsonalizatzeko"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Desgaitutako widgetaren aplikazio-ikonoa"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Instalatzen ari den widget bati dagokion aplikazioaren ikonoa"</string>
<string name="edit_widget" msgid="9030848101135393954">"Editatu widgeta"</string>
@@ -498,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"hautatu widget bat"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"kendu widgeta"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"kokatu hautatutako widgeta"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Pantaila blokeatuko widgetak"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Aplikazio bat widget baten bidez irekitzeko, zeu zarela egiaztatu beharko duzu. Gainera, kontuan izan edonork ikusi ahalko dituela halako widgetak, tableta blokeatuta badago ere. Baliteke widget batzuk pantaila blokeaturako egokiak ez izatea, eta agian ez da segurua haiek bertan gehitzea."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"Ados"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Aldatu erabiltzailea"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"zabaldu menua"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Saioko aplikazio eta datu guztiak ezabatuko dira."</string>
@@ -725,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Lehenetsia"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Automatikoa"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Ez du tonurik jotzen edo dar-dar egiten"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Ez du tonurik jotzen edo dar-dar egiten, eta elkarrizketen atalaren behealdean agertzen da"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Baliteke tonua jotzea edo dardara egitea, gailuaren ezarpenen arabera"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Baliteke tonua jotzea edo dardara egitea, gailuaren ezarpenen arabera. Modu lehenetsian, <xliff:g id="APP_NAME">%1$s</xliff:g> aplikazioko elkarrizketak burbuila gisa agertzen dira."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Ezarri sistemak zehaztu dezala jakinarazpen honek soinua edo dardara egin behar duen ala ez"</string>
@@ -782,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Orrian gora"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Orrian behera"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Ezabatu"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Hasiera"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"Amaitu"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Txertatu"</string>
@@ -1215,7 +1225,7 @@
<string name="battery_state_unknown_notification_text" msgid="13720937839460899">"Informazio gehiago lortzeko, sakatu hau"</string>
<string name="qs_alarm_tile_no_alarm" msgid="4826472008616807923">"Alarmarik ez"</string>
<string name="accessibility_bouncer" msgid="5896923685673320070">"erabili pantailaren blokeoa"</string>
- <string name="accessibility_side_fingerprint_indicator_label" msgid="1673807833352363712">"Ukitu hatz-marken sentsorea. Pantailaren albo batean dagoen botoi laburra da."</string>
+ <string name="accessibility_side_fingerprint_indicator_label" msgid="1673807833352363712">"Ukitu hatz-marken sentsorea. Telefonoaren albo batean dagoen botoi laburra da."</string>
<string name="accessibility_fingerprint_label" msgid="5255731221854153660">"Hatz-marken sentsorea"</string>
<string name="accessibility_authenticate_hint" msgid="798914151813205721">"autentifikatu"</string>
<string name="accessibility_enter_hint" msgid="2617864063504824834">"sartu gailuan"</string>
@@ -1364,20 +1374,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Pantaila zatitzea"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Sarrera"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Aplikazioetarako lasterbideak"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Erabilerraztasuna"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Lasterbideak"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Bilatu lasterbideak"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Tolesteko ikonoa"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Zabaltzeko ikonoa"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"edo"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Atzera egiteko keinua"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Orri nagusira joateko keinua"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Ekintza-tekla"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Eginda"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Bikain!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Egin atzera"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Atzera egiteko, pasatu 3 hatz ezkerrera edo eskuinera ukipen-panelean."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"3 hatz ukipen-panel baten gainean eskuinera eta ezkerrera mugitzen erakusten duen irudia"</string>
@@ -1386,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"%1$d/%2$d maila"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Etxeko gailuen kontrola"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Kontrolatu etxeko gailuak pantaila-babesletik"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-eu/tiles_states_strings.xml b/packages/SystemUI/res/values-eu/tiles_states_strings.xml
index 13e14e0502c4..45d5121c4256 100644
--- a/packages/SystemUI/res/values-eu/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-eu/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Desaktibatuta"</item>
<item msgid="4875147066469902392">"Aktibatuta"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Ez dago erabilgarri"</item>
<item msgid="5044688398303285224">"Desaktibatuta"</item>
diff --git a/packages/SystemUI/res/values-fa/strings.xml b/packages/SystemUI/res/values-fa/strings.xml
index 7300d2cde90f..ceb62e48f3f5 100644
--- a/packages/SystemUI/res/values-fa/strings.xml
+++ b/packages/SystemUI/res/values-fa/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"‫«<xliff:g id="APPNAME">%1$s</xliff:g>» این نماگرفت را تشخیص داد."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> و سایر برنامه‌های باز این نماگرفت را تشخیص دادند."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"افزودن به یادداشت"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"اضافه کردن پیوند"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"ضبط‌کن صفحه‌نمایش"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"درحال پردازش ضبط صفحه‌نمایش"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"اعلان درحال انجام برای جلسه ضبط صفحه‌نمایش"</string>
@@ -127,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"برای مشاهده تک‌ضرب بزنید"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"خطا در ذخیره‌سازی ضبط صفحه‌نمایش"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"خطا هنگام شروع ضبط صفحه‌نمایش"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"‏ضبط &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; را متوقف خواهید کرد"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"توقف ضبط"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"درحال هم‌رسانی صفحه‌نمایش"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"صفحه هم‌رسانی متوقف شود؟"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"‏هم‌رسانی &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; را متوقف خواهید کرد"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"توقف هم‌رسانی"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"درحال پخش محتوای صفحه‌نمایش"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"پخش محتوا متوقف شود؟"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"درحال پخش محتوای صفحه‌نمایش"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"‏پخش محتوای &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; را متوقف خواهید کرد"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"توقف پخش محتوا"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"بستن"</string>
<string name="issuerecord_title" msgid="286627115110121849">"ضبط‌کننده مشکل"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"درحال پردازش کردن ضبط مشکل"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"اعلان جاری مربوط به جلسه جمع‌آوری مشکل"</string>
@@ -162,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"هنگام ذخیره کردن ضبط مشکل، خطایی پیش آمد"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"هنگام شروع ضبط مشکل، خطایی پیش آمد"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"درحال مشاهده در حالت تمام‌صفحه"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"برای خروج، از بالای صفحه تند به پایین بکشید"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"متوجه‌ام"</string>
<string name="accessibility_back" msgid="6530104400086152611">"برگشت"</string>
<string name="accessibility_home" msgid="5430449841237966217">"صفحهٔ اصلی"</string>
@@ -196,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"قفلْ با چهره باز شد. برای ادامه، فشار دهید."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"چهره شناسایی شد. برای ادامه، فشار دهید."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"چهره شناسایی شد. برای ادامه، نماد قفل‌گشایی را فشار دهید."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"قفل با چهره باز شد. برای ادامه ضربه بزنید."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"راستی‌آزمایی‌شده"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"لغو اصالت‌سنجی"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"گزینه‌های بیشتر"</string>
@@ -297,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"محافظ صفحه"</string>
<string name="ethernet_label" msgid="2203544727007463351">"اترنت"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"مزاحم نشوید"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"بلوتوث"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"هیچ دستگاه مرتبط شده‌ای موجود نیست"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"برای اتصال یا قطع اتصال دستگاه، تک‌ضرب بزنید"</string>
@@ -308,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"ذخیره‌شده"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"قطع اتصال"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"فعال کردن"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"فردا به‌طور خودکار روشن شود"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"ویژگی‌هایی مثل «هم‌رسانی سریع» و «پیدا کردن دستگاهم» از بلوتوث استفاده می‌کنند"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"بلوتوث فردا صبح روشن خواهد شد"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"هم‌رسانی صدا"</string>
@@ -478,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"افزودن ابزارک‌های بیشتر"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"برای سفارشی‌سازی ابزارک‌ها، فشار طولانی دهید"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"سفارشی‌سازی ابزارک‌ها"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"برای سفارشی‌سازی ابزاره‌ها، قفل دستگاه را باز کنید"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"نماد برنامه برای ابزارک غیرفعال"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"نماد برنامه مربوط به ابزارکی که درحال نصب است"</string>
<string name="edit_widget" msgid="9030848101135393954">"ویرایش ابزارک"</string>
@@ -498,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"انتخاب ابزارک"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"برداشتن ابزارک"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"جای‌گذاری ابزارک انتخاب‌شده"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"ابزارک‌های صفحه قفل"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"برای باز کردن برنامه بااستفاده از ابزارک، باید هویت خودتان را به‌تأیید برسانید. همچنین، به‌خاطر داشته باشید که همه می‌توانند آن‌ها را مشاهده کنند، حتی وقتی رایانه لوحی‌تان قفل است. برخی‌از ابزارک‌ها ممکن است برای صفحه قفل درنظر گرفته نشده باشند و ممکن است اضافه کردن آن‌ها در اینجا ناامن باشد."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"متوجه‌ام"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"تغییر کاربر"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"منوی پایین‌پر"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"همه برنامه‌ها و داده‌های این جلسه حذف خواهد شد."</string>
@@ -725,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"پیش‌فرض"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"خودکار"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"بدون صدا یا لرزش"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"بدون صدا و لرزش در پایین بخش مکالمه نشان داده می‌شود"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"بسته به تنظیمات دستگاه ممکن است زنگ بزند یا بلرزد"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"بسته به تنظیمات دستگاه ممکن است زنگ بزند یا بلرزد. مکالمه‌های <xliff:g id="APP_NAME">%1$s</xliff:g> به‌طور پیش‌فرض در حبابک نشان داده می‌شوند."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"سیستم را تنظیم کنید که تشخیص دهد اعلان صدا و لرزش داشته باشد یا نه"</string>
@@ -782,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"صفحه بعد"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"صفحه قبل"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"حذف"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"ابتدا"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1364,20 +1374,18 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"صفحهٔ دونیمه"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"ورودی"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"میان‌برهای برنامه"</string>
+ <string name="shortcut_helper_category_current_app_shortcuts" msgid="4017840565974573628">"برنامه فعلی"</string>
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"دسترس‌پذیری"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"میان‌برهای صفحه‌کلید"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"جستجوی میان‌برها"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"نماد جمع کردن"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"نماد ازهم بازکردن"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"یا"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"اشاره برگشت"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"اشاره صفحه اصلی"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"دکمه کنش"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"تمام"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"عالی است!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"برگشتن"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"برای برگشتن، در هر جایی از صفحه لمسی، با سه انگشت تند به‌چپ یا راست بکشید."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"صفحه لمسی که سه انگشت را درحال حرکت به‌سمت راست و چپ نشان می‌دهد"</string>
@@ -1386,4 +1394,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"‏سطح %1$d از %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"کنترل خانه هوشمند"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"به کنترل خانه هوشمند به‌عنوان محافظ صفحه‌نمایش دسترسی سریع دارید"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-fa/tiles_states_strings.xml b/packages/SystemUI/res/values-fa/tiles_states_strings.xml
index 756b442f5fc4..d6e0e8257196 100644
--- a/packages/SystemUI/res/values-fa/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-fa/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"خاموش"</item>
<item msgid="4875147066469902392">"روشن"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"دردسترس نیست"</item>
<item msgid="5044688398303285224">"خاموش"</item>
diff --git a/packages/SystemUI/res/values-fi/strings.xml b/packages/SystemUI/res/values-fi/strings.xml
index f01e6c0eabb1..5ba52d570787 100644
--- a/packages/SystemUI/res/values-fi/strings.xml
+++ b/packages/SystemUI/res/values-fi/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> havaitsi tämän kuvakaappauksen."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> ja jotkin muut sovellukset havaitsivat tämän kuvakaappauksen."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Lisää muistiinpanoon"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Lisää linkki"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Näytön tallentaja"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Näytön tallennusta käsitellään"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Pysyvä ilmoitus näytön tallentamisesta"</string>
@@ -127,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Katso napauttamalla"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Virhe näyttötallenteen tallentamisessa"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Virhe näytön tallennuksen aloituksessa"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; ei enää tallenna sisältöä"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Lopeta tallennus"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Näyttöä jaetaan"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Lopetetaanko näytön jakaminen?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; ei enää jaa sisältöä"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Lopeta jakaminen"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Näyttöä striimataan"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Lopetetaanko striimaus?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Näyttöä striimataan"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; ei enää striimaa sisältöä"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Lopeta striimaus"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Sulje"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Ongelman tallentaja"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Käsittely: Ongelman tallennus"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Ongelmankeräykseen liittyvä ilmoitus taustalla jatkuvasta toiminnasta"</string>
@@ -162,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Virhe ongelman tallenteen tallentamisessa"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Virhe ongelman tallentamisen aloituksessa"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Koko näytön tilassa"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Poistu pyyhkäisemällä alas näytön yläreunasta"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"Selvä"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Takaisin"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Aloitus"</string>
@@ -196,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Avattu kasvojen avulla. Jatka painamalla."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Kasvot tunnistettu. Jatka painamalla."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Kasvot tunnistettu. Jatka lukituksen avauskuvakkeella."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Avattu kasvojen avulla. Jatka napauttamalla."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Todennettu"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Peruuta todennus"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Lisää vaihtoehtoja"</string>
@@ -297,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Näytönsäästäjä"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Älä häiritse"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Laitepareja ei ole käytettävissä"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Muodosta yhteys laitteeseen tai katkaise yhteys napauttamalla"</string>
@@ -308,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Tallennettu"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"katkaise yhteys"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"aktivoi"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Laita automaattisesti päälle huomenna"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Quick Share, Paikanna laite ja tietyt muut ominaisuudet käyttävät Bluetoothia"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bluetooth menee päälle huomisaamuna"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Jaa audio"</string>
@@ -478,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Lisää widgetejä"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Yksilöi widgetit pitkällä painalluksella"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Muokkaa widgettejä"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Avaa widgetien yksilöintiä varten"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Käytöstä poistetun widgetin sovelluskuvake"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Sovelluskuvake widgetin asentamisesta"</string>
<string name="edit_widget" msgid="9030848101135393954">"Muokkaa widgetiä"</string>
@@ -498,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"valitse widget"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"poista widget"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"aseta valittu widget"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Lukitusnäytön widgetit"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Jos haluat avata sovelluksen käyttämällä widgetiä, sinun täytyy vahvistaa henkilöllisyytesi. Muista myös, että widgetit näkyvät kaikille, vaikka tabletti olisi lukittuna. Jotkin widgetit on ehkä tarkoitettu lukitusnäytölle, ja niiden lisääminen tänne ei välttämättä ole turvallista."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"Selvä"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Vaihda käyttäjää"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"alasvetovalikko"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Kaikki sovellukset ja tämän istunnon tiedot poistetaan."</string>
@@ -725,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Oletus"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Automaattinen"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Ei ääntä tai värinää"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Ei ääntä tai värinää ja näkyy alempana keskusteluosiossa"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Voi soida tai väristä laitteen asetuksista riippuen"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Voi soida tai väristä laitteen asetuksista riippuen. Keskusteluista (<xliff:g id="APP_NAME">%1$s</xliff:g>) luodaan oletuksena kuplia."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Järjestelmä valitsee, kuuluuko tästä ilmoituksesta ääntä tai väriseekö se"</string>
@@ -782,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page Down"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Delete"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1364,20 +1374,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Jaettu näyttö"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Syöte"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Sovellusten pikakuvakkeet"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Saavutettavuus"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Pikanäppäimet"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Pikahaut"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Tiivistyskuvake"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Laajennuskuvake"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"tai"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Takaisin-ele"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Etusivu-ele"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Toimintonäppäin"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Valmis"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Hienoa!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Takaisin"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Jos haluat siirtyä takaisin, pyyhkäise kosketuslevyllä vasemmalle tai oikealle kolmella sormella."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Kosketuslevy, jolla kolme sormea liikkuu oikealle ja vasemmalle"</string>
@@ -1386,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Taso %1$d/%2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Kodin ohjaus"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Avaa kodin ohjaus nopeasti näytönsäästäjän kautta"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-fi/tiles_states_strings.xml b/packages/SystemUI/res/values-fi/tiles_states_strings.xml
index 5ecc95956d1c..62900622551a 100644
--- a/packages/SystemUI/res/values-fi/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-fi/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Poissa päältä"</item>
<item msgid="4875147066469902392">"Päällä"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Ei saatavilla"</item>
<item msgid="5044688398303285224">"Poissa päältä"</item>
diff --git a/packages/SystemUI/res/values-fr-rCA-ldrtl/strings.xml b/packages/SystemUI/res/values-fr-rCA-ldrtl/strings.xml
index 899fec0b89c6..9421af3f03ec 100644
--- a/packages/SystemUI/res/values-fr-rCA-ldrtl/strings.xml
+++ b/packages/SystemUI/res/values-fr-rCA-ldrtl/strings.xml
@@ -19,5 +19,5 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="recents_quick_scrub_onboarding" msgid="2452671841151577157">"Balayez l\'écran vers la gauche pour changer rapidement d\'application"</string>
+ <string name="recents_quick_scrub_onboarding" msgid="2452671841151577157">"Balayez l\'écran vers la gauche pour changer rapidement d\'appli"</string>
</resources>
diff --git a/packages/SystemUI/res/values-fr-rCA/strings.xml b/packages/SystemUI/res/values-fr-rCA/strings.xml
index d2adbf6b3f77..a72cdc7e39a5 100644
--- a/packages/SystemUI/res/values-fr-rCA/strings.xml
+++ b/packages/SystemUI/res/values-fr-rCA/strings.xml
@@ -35,16 +35,16 @@
<string name="extreme_battery_saver_text" msgid="8455810156739865335">"Extrême"</string>
<string name="status_bar_settings_auto_rotation" msgid="8329080442278431708">"Rotation auto de l\'écran"</string>
<string name="usb_device_permission_prompt" msgid="4414719028369181772">"Autoriser <xliff:g id="APPLICATION">%1$s</xliff:g> à accéder à <xliff:g id="USB_DEVICE">%2$s</xliff:g>?"</string>
- <string name="usb_device_permission_prompt_warn" msgid="2309129784984063656">"Autorisé <xliff:g id="APPLICATION">%1$s</xliff:g> à accéder à <xliff:g id="USB_DEVICE">%2$s</xliff:g>?\nCette application n\'a pas été autorisée à effectuer des enregistrements, mais elle pourrait enregistrer du contenu audio par l\'intermédiaire de cet appareil USB."</string>
+ <string name="usb_device_permission_prompt_warn" msgid="2309129784984063656">"Autorisé <xliff:g id="APPLICATION">%1$s</xliff:g> à accéder à <xliff:g id="USB_DEVICE">%2$s</xliff:g>?\nCette appli n\'a pas été autorisée à effectuer des enregistrements, mais elle pourrait enregistrer du contenu audio par l\'intermédiaire de cet appareil USB."</string>
<string name="usb_audio_device_permission_prompt_title" msgid="4221351137250093451">"Autoriser <xliff:g id="APPLICATION">%1$s</xliff:g> à accéder à <xliff:g id="USB_DEVICE">%2$s</xliff:g>?"</string>
<string name="usb_audio_device_confirm_prompt_title" msgid="8828406516732985696">"Ouvrir <xliff:g id="APPLICATION">%1$s</xliff:g> pour utiliser <xliff:g id="USB_DEVICE">%2$s</xliff:g>?"</string>
- <string name="usb_audio_device_prompt_warn" msgid="2504972133361130335">"Cette application n\'a pas été autorisée à effectuer des enregistrements, mais elle pourrait capturer du contenu audio par l\'intermédiaire de cet appareil USB. L\'utilisation de <xliff:g id="APPLICATION">%1$s</xliff:g> avec cet appareil peut empêcher d\'entendre les appels, les notifications et les alarmes."</string>
+ <string name="usb_audio_device_prompt_warn" msgid="2504972133361130335">"Cette appli n\'a pas été autorisée à effectuer des enregistrements, mais elle pourrait capturer du contenu audio par l\'intermédiaire de cet appareil USB. L\'utilisation de <xliff:g id="APPLICATION">%1$s</xliff:g> avec cet appareil peut empêcher d\'entendre les appels, les notifications et les alarmes."</string>
<string name="usb_audio_device_prompt" msgid="7944987408206252949">"L\'utilisation de <xliff:g id="APPLICATION">%1$s</xliff:g> avec cet appareil peut empêcher d\'entendre les appels, les notifications et les alarmes."</string>
<string name="usb_accessory_permission_prompt" msgid="717963550388312123">"Autoriser <xliff:g id="APPLICATION">%1$s</xliff:g> à accéder à <xliff:g id="USB_ACCESSORY">%2$s</xliff:g>?"</string>
<string name="usb_device_confirm_prompt" msgid="4091711472439910809">"Ouvrir <xliff:g id="APPLICATION">%1$s</xliff:g> pour utiliser <xliff:g id="USB_DEVICE">%2$s</xliff:g>?"</string>
- <string name="usb_device_confirm_prompt_warn" msgid="990208659736311769">"Ouvrir <xliff:g id="APPLICATION">%1$s</xliff:g> pour gérer <xliff:g id="USB_DEVICE">%2$s</xliff:g>?\nCette application n\'a pas été autorisée à effectuer des enregistrements, mais elle pourrait enregistrer du contenu audio par l\'intermédiaire de cet appareil USB."</string>
+ <string name="usb_device_confirm_prompt_warn" msgid="990208659736311769">"Ouvrir <xliff:g id="APPLICATION">%1$s</xliff:g> pour gérer <xliff:g id="USB_DEVICE">%2$s</xliff:g>?\nCette appli n\'a pas été autorisée à effectuer des enregistrements, mais elle pourrait enregistrer du contenu audio par l\'intermédiaire de cet appareil USB."</string>
<string name="usb_accessory_confirm_prompt" msgid="5728408382798643421">"Ouvrir <xliff:g id="APPLICATION">%1$s</xliff:g> pour utiliser <xliff:g id="USB_ACCESSORY">%2$s</xliff:g>?"</string>
- <string name="usb_accessory_uri_prompt" msgid="6756649383432542382">"Aucune application installée compatible avec accessoire USB. En savoir plus sur <xliff:g id="URL">%1$s</xliff:g>"</string>
+ <string name="usb_accessory_uri_prompt" msgid="6756649383432542382">"Aucune appli installée compatible avec accessoire USB. En savoir plus sur <xliff:g id="URL">%1$s</xliff:g>"</string>
<string name="title_usb_accessory" msgid="1236358027511638648">"Accessoire USB"</string>
<string name="label_view" msgid="6815442985276363364">"Afficher"</string>
<string name="always_use_device" msgid="210535878779644679">"Toujours ouvrir <xliff:g id="APPLICATION">%1$s</xliff:g> lorsque <xliff:g id="USB_DEVICE">%2$s</xliff:g> est connecté"</string>
@@ -83,7 +83,7 @@
<string name="screenshot_failed_to_save_user_locked_text" msgid="6156607948256936920">"L\'appareil doit être déverrouillé avant qu\'une capture d\'écran puisse être enregistrée"</string>
<string name="screenshot_failed_to_save_unknown_text" msgid="1506621600548684129">"Essayez de faire une autre capture d\'écran"</string>
<string name="screenshot_failed_to_save_text" msgid="7232739948999195960">"Impossible d\'enregistrer la capture d\'écran"</string>
- <string name="screenshot_failed_to_capture_text" msgid="7818288545874407451">"L\'application ou votre organisation n\'autorise pas les saisies d\'écran"</string>
+ <string name="screenshot_failed_to_capture_text" msgid="7818288545874407451">"L\'appli ou votre organisation n\'autorise pas les saisies d\'écran"</string>
<string name="screenshot_blocked_by_admin" msgid="5486757604822795797">"La prise de captures d\'écran est bloquée par votre administrateur informatique"</string>
<string name="screenshot_edit_label" msgid="8754981973544133050">"Modifier"</string>
<string name="screenshot_edit_description" msgid="3333092254706788906">"Modifier la capture d\'écran"</string>
@@ -101,16 +101,15 @@
<string name="screenshot_private_profile_notification" msgid="1704440899154243171">"Enregistré dans <xliff:g id="APP">%1$s</xliff:g> dans le profil privé"</string>
<string name="screenshot_default_files_app_name" msgid="8721579578575161912">"Fichiers"</string>
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> a détecté cette capture d\'écran."</string>
- <string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> et d\'autres applications ouvertes ont détecté cette capture d\'écran."</string>
+ <string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> et d\'autres applis ouvertes ont détecté cette capture d\'écran."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Ajouter à une note"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Inclure le lien"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Enregistreur d\'écran"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Trait. de l\'enregist. d\'écran…"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Notification en cours pour une session d\'enregistrement d\'écran"</string>
<string name="screenrecord_permission_dialog_title" msgid="303380743267672953">"Commencer l\'enregistrement?"</string>
<string name="screenrecord_permission_dialog_warning_entire_screen" msgid="4152602778470789965">"Pendant l\'enregistrement, Android a accès à tout ce qui est visible sur votre écran ou lu sur votre appareil. Par conséquent, soyez prudent avec les mots de passe, les détails du paiement, les messages, les photos et les contenus audio et vidéo."</string>
- <string name="screenrecord_permission_dialog_warning_single_app" msgid="6818309727772146138">"Lorsque vous enregistrez une application, Android a accès à tout ce qui est visible ou lu sur cette application. Par conséquent, soyez prudent avec les mots de passe, les détails du paiement, les messages, les photos et les contenus audio et vidéo."</string>
+ <string name="screenrecord_permission_dialog_warning_single_app" msgid="6818309727772146138">"Lorsque vous enregistrez une appli, Android a accès à tout ce qui est visible ou lu sur cette appli. Par conséquent, soyez prudent avec les mots de passe, les détails du paiement, les messages, les photos et les contenus audio et vidéo."</string>
<string name="screenrecord_permission_dialog_continue" msgid="5811122652514424967">"Commencer l\'enregistrement"</string>
<string name="screenrecord_audio_label" msgid="6183558856175159629">"Enregistrer des fichiers audio"</string>
<string name="screenrecord_device_audio_label" msgid="9016927171280567791">"Audio de l\'appareil"</string>
@@ -127,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Touchez pour afficher"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Erreur d\'enregistrement de l\'écran"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Une erreur s\'est produite lors du démarrage de l\'enregistrement d\'écran"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Vous arrêterez d\'enregistrer &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Arrêter l\'enregistrement"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Partage d\'écran en cours…"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Arrêter le partage d\'écran?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Vous arrêterez de partager &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Arrêter le partage"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Diffusion de l\'écran en cours…"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Arrêter de diffuser?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Diffusion de l\'écran en cours…"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Vous arrêterez de diffuser &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Arrêter la diffusion"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Fermer"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Enregistreur de problèmes"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Trait. de l\'enreg. du problème"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Notification continue pour une session de collecte d\'un problème"</string>
@@ -162,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Erreur lors de l\'enregistrement du problème"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Erreur lors du démarrage de l\'enregistrement du problème"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Affichage plein écran"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Pour quitter ce mode, balayer l\'écran vers le bas à partir du haut"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"OK"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Précédent"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Domicile"</string>
@@ -181,7 +188,7 @@
<string name="accessibility_scanning_face" msgid="3093828357921541387">"Numérisation du visage"</string>
<string name="accessibility_send_smart_reply" msgid="8885032190442015141">"Envoyer"</string>
<string name="cancel" msgid="1089011503403416730">"Annuler"</string>
- <string name="biometric_dialog_logo" msgid="7681107853070774595">"Logo de l\'application"</string>
+ <string name="biometric_dialog_logo" msgid="7681107853070774595">"Logo de l\'appli"</string>
<string-array name="biometric_dialog_package_names_for_logo_with_overrides">
</string-array>
<string name="biometric_dialog_confirm" msgid="2005978443007344895">"Confirmer"</string>
@@ -196,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Déverr. par reconnaissance faciale. Appuyez pour continuer."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Visage reconnu. Appuyez pour continuer."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Visage reconnu. Appuyez sur Déverrouiller pour continuer."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Déverrouillé avec le visage. Touchez pour continuer."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Authentifié"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Annuler l\'authentification"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Plus d\'options"</string>
@@ -297,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Écran de veille"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Ne pas déranger"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Aucun des appareils associés n\'est disponible"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Touchez pour connecter ou déconnecter un appareil"</string>
@@ -308,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Enregistré"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"Déconnecter"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"Activer"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"L\'activer automatiquement demain"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Les fonctionnalités comme Partage rapide et Localiser mon appareil utilisent le Bluetooth"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Le Bluetooth s\'activera demain matin"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Partager l\'audio"</string>
@@ -364,7 +371,7 @@
<string name="quick_settings_cellular_detail_data_used" msgid="6798849610647988987">"Quantité de données utilisées :<xliff:g id="DATA_USED">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_limit" msgid="1791389609409211628">"Limite : <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
<string name="quick_settings_cellular_detail_data_warning" msgid="7957253810481086455">"Avertissement : <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
- <string name="quick_settings_work_mode_label" msgid="6440531507319809121">"Applications professionnelles"</string>
+ <string name="quick_settings_work_mode_label" msgid="6440531507319809121">"Applis professionnelles"</string>
<string name="quick_settings_work_mode_paused_state" msgid="6681788236383735976">"En pause"</string>
<string name="quick_settings_night_display_label" msgid="8180030659141778180">"Éclairage nocturne"</string>
<string name="quick_settings_night_secondary_label_on_at_sunset" msgid="3358706312129866626">"Activé la nuit"</string>
@@ -408,9 +415,9 @@
<string name="sensor_privacy_start_use_mic_dialog_title" msgid="563796653825944944">"Débloquer le microphone de l\'appareil?"</string>
<string name="sensor_privacy_start_use_camera_dialog_title" msgid="8807639852654305227">"Débloquer l\'appareil photo de l\'appareil?"</string>
<string name="sensor_privacy_start_use_mic_camera_dialog_title" msgid="4316471859905020023">"Débloquer l\'appareil photo et le microphone?"</string>
- <string name="sensor_privacy_start_use_mic_dialog_content" msgid="1624701280680913717">"Cette action débloque l\'accès pour toutes les applications et tous les services autorisés à utiliser le microphone."</string>
- <string name="sensor_privacy_start_use_camera_dialog_content" msgid="4704948062372435963">"Cette action débloque l\'accès pour toutes les applications et pour tous les services autorisés à utiliser l\'appareil photo."</string>
- <string name="sensor_privacy_start_use_mic_camera_dialog_content" msgid="3577642558418404919">"Cette action débloque l\'accès pour toutes les applications et tous les services autorisés à utiliser l\'appareil photo ou le microphone."</string>
+ <string name="sensor_privacy_start_use_mic_dialog_content" msgid="1624701280680913717">"Cette action débloque l\'accès pour toutes les applis et tous les services autorisés à utiliser le microphone."</string>
+ <string name="sensor_privacy_start_use_camera_dialog_content" msgid="4704948062372435963">"Cette action débloque l\'accès pour toutes les applis et pour tous les services autorisés à utiliser l\'appareil photo."</string>
+ <string name="sensor_privacy_start_use_mic_camera_dialog_content" msgid="3577642558418404919">"Cette action débloque l\'accès pour toutes les applis et tous les services autorisés à utiliser l\'appareil photo ou le microphone."</string>
<string name="sensor_privacy_start_use_mic_blocked_dialog_title" msgid="2640140287496469689">"Le microphone est bloqué"</string>
<string name="sensor_privacy_start_use_camera_blocked_dialog_title" msgid="7398084286822440384">"L\'appareil photo est bloqué"</string>
<string name="sensor_privacy_start_use_mic_camera_blocked_dialog_title" msgid="195236134743281973">"Le microphone et l\'appareil photo sont bloqués"</string>
@@ -422,13 +429,13 @@
<string name="sensor_privacy_mic_camera_unblocked_toast_content" msgid="7339355093282661115">"Microphone et appareil photo disponibles"</string>
<string name="sensor_privacy_mic_turned_on_dialog_title" msgid="6348853159838376513">"Microphone activé"</string>
<string name="sensor_privacy_mic_turned_off_dialog_title" msgid="5760464281790732849">"Microphone désactivé"</string>
- <string name="sensor_privacy_mic_unblocked_dialog_content" msgid="4889961886199270224">"Le microphone est activé pour toutes les applications et tous les services."</string>
- <string name="sensor_privacy_mic_blocked_no_exception_dialog_content" msgid="5864898470772965394">"L\'accès au microphone est désactivé pour toutes les applications et tous les services. Vous pouvez l\'activer dans Paramètres &gt; Confidentialité &gt; Microphone."</string>
- <string name="sensor_privacy_mic_blocked_with_exception_dialog_content" msgid="810289713700437896">"L\'accès au microphone est désactivé pour toutes les applications et tous les services. Vous pouvez modifier cette option dans Paramètres &gt; Confidentialité &gt; Microphone."</string>
+ <string name="sensor_privacy_mic_unblocked_dialog_content" msgid="4889961886199270224">"Le microphone est activé pour toutes les applis et tous les services."</string>
+ <string name="sensor_privacy_mic_blocked_no_exception_dialog_content" msgid="5864898470772965394">"L\'accès au microphone est désactivé pour toutes les applis et tous les services. Vous pouvez l\'activer dans Paramètres &gt; Confidentialité &gt; Microphone."</string>
+ <string name="sensor_privacy_mic_blocked_with_exception_dialog_content" msgid="810289713700437896">"L\'accès au microphone est désactivé pour toutes les applis et tous les services. Vous pouvez modifier cette option dans Paramètres &gt; Confidentialité &gt; Microphone."</string>
<string name="sensor_privacy_camera_turned_on_dialog_title" msgid="8039095295100075952">"Appareil photo activé"</string>
<string name="sensor_privacy_camera_turned_off_dialog_title" msgid="1936603903120742696">"Appareil photo désactivé"</string>
- <string name="sensor_privacy_camera_unblocked_dialog_content" msgid="7847190103011782278">"L\'appareil photo est activé pour toutes les applications et tous les services."</string>
- <string name="sensor_privacy_camera_blocked_dialog_content" msgid="3182428709314874616">"L\'accès à l\'appareil photo est désactivé pour toutes les applications et tous les services."</string>
+ <string name="sensor_privacy_camera_unblocked_dialog_content" msgid="7847190103011782278">"L\'appareil photo est activé pour toutes les applis et tous les services."</string>
+ <string name="sensor_privacy_camera_blocked_dialog_content" msgid="3182428709314874616">"L\'accès à l\'appareil photo est désactivé pour toutes les applis et tous les services."</string>
<string name="sensor_privacy_htt_blocked_dialog_content" msgid="3333321592997666441">"Pour utiliser le bouton du microphone, activez l\'accès au microphone dans les paramètres."</string>
<string name="sensor_privacy_dialog_open_settings" msgid="5635865896053011859">"Ouvrir les paramètres"</string>
<string name="media_seamless_other_device" msgid="4654849800789196737">"Autre appareil"</string>
@@ -478,16 +485,15 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Ajouter plus de widgets"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Maintenez le doigt pour personnaliser les widgets"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Personnaliser les widgets"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
- <string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Icône d\'application pour un widget désactivé"</string>
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Déverrouiller pour personnaliser des widgets"</string>
+ <string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Icône d\'appli pour un widget désactivé"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Icône d\'appli indiquant qu\'un widget est en cours d\'installation"</string>
<string name="edit_widget" msgid="9030848101135393954">"Modifier le widget"</string>
<string name="button_to_remove_widget" msgid="3948204829181214098">"Retirer"</string>
<string name="hub_mode_add_widget_button_text" msgid="4831464661209971729">"Ajouter un widget"</string>
<string name="hub_mode_editing_exit_button_text" msgid="3704686734192264771">"Terminé"</string>
<string name="label_for_button_in_empty_state_cta" msgid="7314975555382055823">"Ajouter des widgets"</string>
- <string name="title_for_empty_state_cta" msgid="6161654421223450530">"Accédez rapidement aux widgets de vos applications préférées sans déverrouiller votre tablette."</string>
+ <string name="title_for_empty_state_cta" msgid="6161654421223450530">"Accédez rapidement aux widgets de vos applis préférées sans déverrouiller votre tablette."</string>
<string name="dialog_title_to_allow_any_widget" msgid="1004820948962675644">"Autoriser n\'importe quel widget sur l\'écran de verrouillage?"</string>
<string name="button_text_to_open_settings" msgid="1987729256950941628">"Ouvrir les paramètres"</string>
<string name="work_mode_off_title" msgid="5794818421357835873">"Réactiver les applis pros?"</string>
@@ -498,53 +504,54 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"sélectionner le widget"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"retirer le widget"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"placer le widget sélectionné"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Widgets de l\'écran de verrouillage"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Pour ouvrir une appli à l\'aide d\'un widget, vous devrez confirmer votre identité. En outre, gardez à l\'esprit que tout le monde peut les voir, même lorsque votre tablette est verrouillée. Certains widgets n\'ont peut-être pas été conçus pour votre écran de verrouillage et il pourrait être dangereux de les ajouter ici."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"OK"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Changer d\'utilisateur"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"menu déroulant"</string>
- <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Toutes les applications et les données de cette session seront supprimées."</string>
+ <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Toutes les applis et les données de cette session seront supprimées."</string>
<string name="guest_wipe_session_title" msgid="7147965814683990944">"Bienvenue à nouveau dans la session Invité"</string>
<string name="guest_wipe_session_message" msgid="3393823610257065457">"Voulez-vous poursuivre la session?"</string>
<string name="guest_wipe_session_wipe" msgid="8056836584445473309">"Recommencer"</string>
<string name="guest_wipe_session_dontwipe" msgid="3211052048269304205">"Oui, continuer"</string>
<string name="guest_notification_app_name" msgid="2110425506754205509">"Mode Invité"</string>
<string name="guest_notification_session_active" msgid="5567273684713471450">"Vous êtes en mode Invité"</string>
- <string name="user_add_user_message_guest_remove" msgid="5589286604543355007">\n\n"Si vous ajoutez un nouvel utilisateur, vous quitterez le mode Invité, et toutes les applications et données de la session d\'invité en cours seront supprimées."</string>
+ <string name="user_add_user_message_guest_remove" msgid="5589286604543355007">\n\n"Si vous ajoutez un nouvel utilisateur, vous quitterez le mode Invité, et toutes les applis et données de la session d\'invité en cours seront supprimées."</string>
<string name="user_limit_reached_title" msgid="2429229448830346057">"Limite d\'utilisateurs atteinte"</string>
<string name="user_limit_reached_message" msgid="1070703858915935796">"{count,plural, =1{Vous ne pouvez créer qu\'un seul utilisateur.}one{Vous pouvez ajouter jusqu\'à # utilisateur.}many{Vous pouvez ajouter jusqu\'à # d\'utilisateurs.}other{Vous pouvez ajouter jusqu\'à # utilisateurs.}}"</string>
<string name="user_remove_user_title" msgid="9124124694835811874">"Supprimer l\'utilisateur?"</string>
- <string name="user_remove_user_message" msgid="6702834122128031833">"Toutes les applications et les données de cet utilisateur seront supprimées."</string>
+ <string name="user_remove_user_message" msgid="6702834122128031833">"Toutes les applis et les données de cet utilisateur seront supprimées."</string>
<string name="user_remove_user_remove" msgid="8387386066949061256">"Supprimer"</string>
<string name="media_projection_dialog_title" msgid="3316063622495360646">"Commencer à enregistrer ou à diffuser avec <xliff:g id="APP_SEEKING_PERMISSION">%s</xliff:g>?"</string>
<string name="media_projection_dialog_warning" msgid="1303664408388363598">"<xliff:g id="APP_SEEKING_PERMISSION">%s</xliff:g> aura accès à toute l\'information qui est visible sur votre écran ou lue sur votre appareil durant l\'enregistrement ou la diffusion. Cela comprend des renseignements comme les mots de passe, les détails du paiement, les photos, les messages et les contenus audio que vous faites jouer."</string>
<string name="media_projection_sys_service_dialog_title" msgid="3751133258891897878">"Commencer à enregistrer ou à diffuser?"</string>
<string name="media_projection_sys_service_dialog_warning" msgid="2443872865267330320">"Le service offrant cette fonction aura accès à toute l\'information qui est visible sur votre écran ou lu sur votre appareil pendant que vous enregistrez ou diffusez. Cela comprend des renseignements comme les mots de passe, les détails du paiement, les photos, les messages et le contenu audio que vous faites jouer."</string>
<string name="screen_share_permission_dialog_option_entire_screen" msgid="3131200488455089620">"Écran entier"</string>
- <string name="screen_share_permission_dialog_option_single_app" msgid="4350961814397220929">"Une seule application"</string>
- <string name="screen_share_permission_app_selector_title" msgid="1404878013670347899">"Partager ou enregistrer une application"</string>
+ <string name="screen_share_permission_dialog_option_single_app" msgid="4350961814397220929">"Une seule appli"</string>
+ <string name="screen_share_permission_app_selector_title" msgid="1404878013670347899">"Partager ou enregistrer une appli"</string>
<string name="media_projection_entry_app_permission_dialog_title" msgid="9155535851866407199">"Commencer à enregistrer ou à diffuser avec <xliff:g id="APP_SEEKING_PERMISSION">%s</xliff:g>?"</string>
<string name="media_projection_entry_app_permission_dialog_warning_entire_screen" msgid="8736391633234144237">"Lorsque vous partagez, enregistrez ou diffusez, <xliff:g id="APP_SEEKING_PERMISSION">%s</xliff:g> a accès à tout ce qui est visible sur votre écran ou lu sur votre appareil. Par conséquent, soyez prudent avec les mots de passe, les détails du paiement, les messages, les photos et les contenus audio et vidéo."</string>
- <string name="media_projection_entry_app_permission_dialog_warning_single_app" msgid="5211695779082563959">"Lorsque vous partagez, enregistrez ou diffusez une application, <xliff:g id="APP_SEEKING_PERMISSION">%s</xliff:g> a accès à tout ce qui est visible sur votre écran ou lu sur cette application. Par conséquent, soyez prudent avec les mots de passe, les détails du paiement, les messages, les photos et les contenus audio et vidéo."</string>
+ <string name="media_projection_entry_app_permission_dialog_warning_single_app" msgid="5211695779082563959">"Lorsque vous partagez, enregistrez ou diffusez une appli, <xliff:g id="APP_SEEKING_PERMISSION">%s</xliff:g> a accès à tout ce qui est visible sur votre écran ou lu sur cette appli. Par conséquent, soyez prudent avec les mots de passe, les détails du paiement, les messages, les photos et les contenus audio et vidéo."</string>
<string name="media_projection_entry_app_permission_dialog_continue" msgid="295463518195075840">"Commencer"</string>
<string name="media_projection_entry_app_permission_dialog_single_app_disabled" msgid="8999903044874669995">"<xliff:g id="APP_NAME">%1$s</xliff:g> a désactivé cette option"</string>
<string name="media_projection_entry_cast_permission_dialog_title" msgid="8860150223172993547">"Commencer la diffusion?"</string>
<string name="media_projection_entry_cast_permission_dialog_warning_entire_screen" msgid="1986212276016817231">"Lorsque vous diffusez, Android a accès à tout ce qui est visible sur votre écran ou lu sur votre appareil. Par conséquent, soyez prudent avec les mots de passe, les détails du paiement, les messages, les photos et les contenus audio et vidéo."</string>
- <string name="media_projection_entry_cast_permission_dialog_warning_single_app" msgid="9900961380294292">"Lorsque vous diffusez une application, Android a accès à tout ce qui est visible sur votre écran ou lu sur cette application. Par conséquent, soyez prudent avec les mots de passe, les détails du paiement, les messages, les photos et les contenus audio et vidéo."</string>
+ <string name="media_projection_entry_cast_permission_dialog_warning_single_app" msgid="9900961380294292">"Lorsque vous diffusez une appli, Android a accès à tout ce qui est visible sur votre écran ou lu sur cette appli. Par conséquent, soyez prudent avec les mots de passe, les détails du paiement, les messages, les photos et les contenus audio et vidéo."</string>
<string name="media_projection_entry_cast_permission_dialog_continue" msgid="7209890669948870042">"Commencer la diffusion"</string>
<string name="media_projection_entry_generic_permission_dialog_title" msgid="4519802931547483628">"Commencer à partager?"</string>
<string name="media_projection_entry_generic_permission_dialog_warning_entire_screen" msgid="5407906851409410209">"Lorsque vous partagez, enregistrez ou diffusez, Android a accès à tout ce qui est visible sur votre écran ou lu sur votre appareil. Par conséquent, soyez prudent avec les mots de passe, les détails du paiement, les messages, les photos et les contenus audio et vidéo."</string>
- <string name="media_projection_entry_generic_permission_dialog_warning_single_app" msgid="3454859977888159495">"Lorsque vous partagez, enregistrez ou diffusez une application, Android a accès à tout ce qui est visible sur votre écran ou lu sur cette application. Par conséquent, soyez prudent avec les mots de passe, les détails du paiement, les messages, les photos et les contenus audio et vidéo."</string>
+ <string name="media_projection_entry_generic_permission_dialog_warning_single_app" msgid="3454859977888159495">"Lorsque vous partagez, enregistrez ou diffusez une appli, Android a accès à tout ce qui est visible sur votre écran ou lu sur cette appli. Par conséquent, soyez prudent avec les mots de passe, les détails du paiement, les messages, les photos et les contenus audio et vidéo."</string>
<string name="media_projection_entry_generic_permission_dialog_continue" msgid="8640381403048097116">"Commencer"</string>
- <string name="media_projection_task_switcher_text" msgid="590885489897412359">"Le partage s\'interrompt lorsque vous changez d\'application"</string>
- <string name="media_projection_task_switcher_action_switch" msgid="8682258717291921123">"Partager plutôt cette application"</string>
+ <string name="media_projection_task_switcher_text" msgid="590885489897412359">"Le partage s\'interrompt lorsque vous changez d\'appli"</string>
+ <string name="media_projection_task_switcher_action_switch" msgid="8682258717291921123">"Partager plutôt cette appli"</string>
<string name="media_projection_task_switcher_action_back" msgid="5324164224147845282">"Revenir en arrière"</string>
- <string name="media_projection_task_switcher_notification_channel" msgid="7613206306777814253">"Commutateur d\'application"</string>
+ <string name="media_projection_task_switcher_notification_channel" msgid="7613206306777814253">"Commutateur d\'appli"</string>
<string name="screen_capturing_disabled_by_policy_dialog_title" msgid="2113331792064527203">"Bloquée par votre administrateur informatique"</string>
- <string name="screen_capturing_disabled_by_policy_dialog_description" msgid="6015975736747696431">"La fonctionnalité de capture d\'écran est désactivée par l\'application Device Policy"</string>
+ <string name="screen_capturing_disabled_by_policy_dialog_description" msgid="6015975736747696431">"La fonctionnalité de capture d\'écran est désactivée par l\'appli Device Policy"</string>
<string name="clear_all_notifications_text" msgid="348312370303046130">"Tout effacer"</string>
<string name="manage_notifications_text" msgid="6885645344647733116">"Gérer"</string>
<string name="manage_notifications_history_text" msgid="57055985396576230">"Historique"</string>
@@ -576,8 +583,8 @@
<string name="quick_settings_disclosure_managed_profile_network_activity" msgid="2636594621387832827">"Votre administrateur informatique a accès à l\'activité sur le réseau de votre profil professionnel"</string>
<string name="quick_settings_disclosure_monitoring" msgid="8548019955631378680">"Le réseau peut être surveillé"</string>
<string name="quick_settings_disclosure_vpns" msgid="3586175303518266301">"Cet appareil est connecté à Internet par l\'intermédiaire de RPV"</string>
- <string name="quick_settings_disclosure_managed_profile_named_vpn" msgid="153393105176944100">"Vos applications professionnelles sont connectées à Internet par l\'intermédiaire de <xliff:g id="VPN_APP">%1$s</xliff:g>"</string>
- <string name="quick_settings_disclosure_personal_profile_named_vpn" msgid="451254750289172191">"Vos applications personnelles sont connectées à Internet par l\'intermédiaire de <xliff:g id="VPN_APP">%1$s</xliff:g>"</string>
+ <string name="quick_settings_disclosure_managed_profile_named_vpn" msgid="153393105176944100">"Vos applis professionnelles sont connectées à Internet par l\'intermédiaire de <xliff:g id="VPN_APP">%1$s</xliff:g>"</string>
+ <string name="quick_settings_disclosure_personal_profile_named_vpn" msgid="451254750289172191">"Vos applis personnelles sont connectées à Internet par l\'intermédiaire de <xliff:g id="VPN_APP">%1$s</xliff:g>"</string>
<string name="quick_settings_disclosure_named_vpn" msgid="6191822916936028208">"Cet appareil est connecté à Internet par l\'intermédiaire de <xliff:g id="VPN_APP">%1$s</xliff:g>"</string>
<string name="monitoring_title_financed_device" msgid="3659962357973919387">"Cet appareil est fourni par <xliff:g id="ORGANIZATION_NAME">%s</xliff:g>"</string>
<string name="monitoring_title_device_owned" msgid="7029691083837606324">"Gestion d\'appareils"</string>
@@ -586,9 +593,9 @@
<string name="monitoring_subtitle_ca_certificate" msgid="8588092029755175800">"Certificats CA"</string>
<string name="monitoring_button_view_policies" msgid="3869724835853502410">"Afficher les politiques"</string>
<string name="monitoring_button_view_controls" msgid="8316440345340701117">"Afficher les commandes"</string>
- <string name="monitoring_description_named_management" msgid="505833016545056036">"Votre appareil appartient à <xliff:g id="ORGANIZATION_NAME">%1$s</xliff:g>.\n\nVotre administrateur informatique peut contrôler et gérer les paramètres, l\'accès aux données d\'entreprise, les applications, les données associées à l\'appareil et les renseignements sur sa position.\n\nPour obtenir plus d\'information, communiquez avec votre administrateur informatique."</string>
- <string name="monitoring_financed_description_named_management" msgid="6108439201399938668">"<xliff:g id="ORGANIZATION_NAME_0">%1$s</xliff:g> pourrait être en mesure d\'accéder aux données associées à cet appareil, de modifier ses paramètres et de gérer des applications.\n\nSi vous avez des questions, communiquez avec <xliff:g id="ORGANIZATION_NAME_1">%2$s</xliff:g>."</string>
- <string name="monitoring_description_management" msgid="4308879039175729014">"Cet appareil appartient à votre organisation.\n\nVotre administrateur informatique peut contrôler et gérer les paramètres, l\'accès aux données d\'entreprise, les applications, les données associées à votre appareil et les renseignements sur sa position.\n\nPour obtenir plus d\'information, communiquez avec votre administrateur informatique."</string>
+ <string name="monitoring_description_named_management" msgid="505833016545056036">"Votre appareil appartient à <xliff:g id="ORGANIZATION_NAME">%1$s</xliff:g>.\n\nVotre administrateur informatique peut contrôler et gérer les paramètres, l\'accès aux données d\'entreprise, les applis, les données associées à l\'appareil et les renseignements sur sa position.\n\nPour obtenir plus d\'information, communiquez avec votre administrateur informatique."</string>
+ <string name="monitoring_financed_description_named_management" msgid="6108439201399938668">"<xliff:g id="ORGANIZATION_NAME_0">%1$s</xliff:g> pourrait être en mesure d\'accéder aux données associées à cet appareil, de modifier ses paramètres et de gérer des applis.\n\nSi vous avez des questions, communiquez avec <xliff:g id="ORGANIZATION_NAME_1">%2$s</xliff:g>."</string>
+ <string name="monitoring_description_management" msgid="4308879039175729014">"Cet appareil appartient à votre organisation.\n\nVotre administrateur informatique peut contrôler et gérer les paramètres, l\'accès aux données d\'entreprise, les applis, les données associées à votre appareil et les renseignements sur sa position.\n\nPour obtenir plus d\'information, communiquez avec votre administrateur informatique."</string>
<string name="monitoring_description_management_ca_certificate" msgid="7785013130658110130">"Votre entreprise a installé une autorité de certification sur cet appareil. Votre trafic sur le réseau sécurisé peut être contrôlé ou modifié."</string>
<string name="monitoring_description_managed_profile_ca_certificate" msgid="7904323416598435647">"Votre entreprise a installé une autorité de certification dans votre profil professionnel. Votre trafic sur le réseau sécurisé peut être contrôlé ou modifié."</string>
<string name="monitoring_description_ca_certificate" msgid="448923057059097497">"Une autorité de certification est installée sur cet appareil. Votre trafic sur le réseau sécurisé peut être contrôlé ou modifié."</string>
@@ -597,11 +604,11 @@
<string name="monitoring_description_named_vpn" msgid="8220190039787149671">"Cet appareil est connecté à Internet par l\'intermédiaire de <xliff:g id="VPN_APP">%1$s</xliff:g>. Votre activité réseau, y compris les courriels et les données de navigation, est visible par le fournisseur de RPV."</string>
<string name="monitoring_description_managed_device_named_vpn" msgid="7693648349547785255">"Cet appareil est connecté à Internet par l\'intermédiaire de <xliff:g id="VPN_APP">%1$s</xliff:g>. Votre activité réseau, y compris les courriels et les données de navigation, est visible par votre administrateur informatique."</string>
<string name="monitoring_description_two_named_vpns" msgid="6726394451199620634">"Cet appareil est connecté à Internet par l\'intermédiaire de <xliff:g id="VPN_APP_0">%1$s</xliff:g> et de <xliff:g id="VPN_APP_1">%2$s</xliff:g>. Votre activité réseau, y compris les courriels et les données de navigation, est visible par votre administrateur informatique."</string>
- <string name="monitoring_description_managed_profile_named_vpn" msgid="7254359257263069766">"Vos applications professionnelles sont connectées à Internet par l\'intermédiaire de <xliff:g id="VPN_APP">%1$s</xliff:g>. Votre activité réseau dans les applications professionnelles, y compris les courriels et les données de navigation, est visible par votre administrateur informatique et par votre fournisseur de RPV."</string>
- <string name="monitoring_description_personal_profile_named_vpn" msgid="5083909710727365452">"Vos applications personnelles sont connectées à Internet par l\'intermédiaire de <xliff:g id="VPN_APP">%1$s</xliff:g>. Votre activité réseau, y compris les courriels et les données de navigation, est visible par votre fournisseur de RPV."</string>
+ <string name="monitoring_description_managed_profile_named_vpn" msgid="7254359257263069766">"Vos applis professionnelles sont connectées à Internet par l\'intermédiaire de <xliff:g id="VPN_APP">%1$s</xliff:g>. Votre activité réseau dans les applis professionnelles, y compris les courriels et les données de navigation, est visible par votre administrateur informatique et par votre fournisseur de RPV."</string>
+ <string name="monitoring_description_personal_profile_named_vpn" msgid="5083909710727365452">"Vos applis personnelles sont connectées à Internet par l\'intermédiaire de <xliff:g id="VPN_APP">%1$s</xliff:g>. Votre activité réseau, y compris les courriels et les données de navigation, est visible par votre fournisseur de RPV."</string>
<string name="monitoring_description_vpn_settings_separator" msgid="8292589617720435430">" "</string>
<string name="monitoring_description_vpn_settings" msgid="5264167033247632071">"Ouvrir les paramètres RPV"</string>
- <string name="monitoring_description_parental_controls" msgid="8184693528917051626">"Cet appareil est géré par ton parent. Ton parent peut voir et gérer de l\'information, comme les applications que tu utilises, ta position et ton temps d\'utilisation des écrans."</string>
+ <string name="monitoring_description_parental_controls" msgid="8184693528917051626">"Cet appareil est géré par ton parent. Ton parent peut voir et gérer de l\'information, comme les applis que tu utilises, ta position et ton temps d\'utilisation des écrans."</string>
<string name="legacy_vpn_name" msgid="4174223520162559145">"RPV"</string>
<string name="keyguard_indication_trust_unlocked" msgid="7395154975733744547">"Maintenu déverrouillé par TrustAgent"</string>
<string name="kg_prompt_after_adaptive_auth_lock" msgid="2587481497846342760">"L\'appareil a été verrouillé : trop de tentatives d\'authentification"</string>
@@ -621,21 +628,21 @@
<string name="csd_500_system_lowered_text" product="default" msgid="7414943302186884124">"Le niveau du volume des écouteurs a dépassé la limite de sécurité pour cette semaine"</string>
<string name="csd_button_keep_listening" product="default" msgid="4093794049149286784">"Poursuivre l\'écoute"</string>
<string name="csd_button_lower_volume" product="default" msgid="5347210412376264579">"Diminuer le volume"</string>
- <string name="screen_pinning_title" msgid="9058007390337841305">"L\'application est épinglée"</string>
+ <string name="screen_pinning_title" msgid="9058007390337841305">"L\'appli est épinglée"</string>
<string name="screen_pinning_description" msgid="8699395373875667743">"Cet écran est épinglé jusqu\'à ce que vous annuliez l\'opération. Pour annuler l\'épinglage, maintenez le doigt sur « Retour » et « Aperçu »."</string>
<string name="screen_pinning_description_recents_invisible" msgid="4564466648700390037">"Cet écran est épinglé jusqu\'à ce que vous annuliez l\'opération. Pour annuler l\'épinglage, maintenez le doigt sur les touches Retour et Accueil."</string>
<string name="screen_pinning_description_gestural" msgid="7246323931831232068">"Cet écran est épinglé jusqu\'à ce que vous annuliez l\'épinglage. Pour annuler l\'épinglage, balayez l\'écran vers le haut et gardez le doigt dessus."</string>
<string name="screen_pinning_description_accessible" msgid="7386449191953535332">"Cet écran est épinglé jusqu\'à ce que vous annuliez l\'opération. Pour annuler l\'épinglage, maintenez le doigt sur « Aperçu »."</string>
<string name="screen_pinning_description_recents_invisible_accessible" msgid="2857071808674481986">"Cet écran est épinglé jusqu\'à ce que vous annuliez l\'opération. Pour annuler l\'épinglage, maintenez le doigt sur la touche Accueil."</string>
<string name="screen_pinning_exposes_personal_data" msgid="8189852022981524789">"Certaines données personnelles pourraient être accessibles (comme les contacts et le contenu des courriels)."</string>
- <string name="screen_pinning_can_open_other_apps" msgid="7529756813231421455">"L\'application épinglée peut ouvrir d\'autres applications."</string>
- <string name="screen_pinning_toast" msgid="8177286912533744328">"Pour annuler l\'épinglage de cette application, maintenez un doigt sur les touches Retour et Aperçu"</string>
- <string name="screen_pinning_toast_recents_invisible" msgid="6850978077443052594">"Pour annuler l\'épinglage de cette application, maintenez un doigt sur les touches Retour et Accueil"</string>
- <string name="screen_pinning_toast_gesture_nav" msgid="170699893395336705">"Pour annuler l\'épinglage de cette application, balayez-la vers le haut et maintenez-la"</string>
+ <string name="screen_pinning_can_open_other_apps" msgid="7529756813231421455">"L\'appli épinglée peut ouvrir d\'autres applis."</string>
+ <string name="screen_pinning_toast" msgid="8177286912533744328">"Pour annuler l\'épinglage de cette appli, maintenez un doigt sur les touches Retour et Aperçu"</string>
+ <string name="screen_pinning_toast_recents_invisible" msgid="6850978077443052594">"Pour annuler l\'épinglage de cette appli, maintenez un doigt sur les touches Retour et Accueil"</string>
+ <string name="screen_pinning_toast_gesture_nav" msgid="170699893395336705">"Pour annuler l\'épinglage de cette appli, balayez-la vers le haut et maintenez-la"</string>
<string name="screen_pinning_positive" msgid="3285785989665266984">"OK"</string>
<string name="screen_pinning_negative" msgid="6882816864569211666">"Non, merci"</string>
- <string name="screen_pinning_start" msgid="7483998671383371313">"Application épinglée"</string>
- <string name="screen_pinning_exit" msgid="4553787518387346893">"L\'épinglage de l\'application a été annulé"</string>
+ <string name="screen_pinning_start" msgid="7483998671383371313">"Appli épinglée"</string>
+ <string name="screen_pinning_exit" msgid="4553787518387346893">"L\'épinglage de l\'appli a été annulé"</string>
<string name="stream_voice_call" msgid="7468348170702375660">"Appeler"</string>
<string name="stream_system" msgid="7663148785370565134">"Système"</string>
<string name="stream_ring" msgid="7550670036738697526">"Sonnerie"</string>
@@ -725,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Par défaut"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Automatique"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Aucun son ni vibration"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Aucun son ni vibration, et s\'affiche plus bas dans la section des conversations"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Peut sonner ou vibrer, selon les paramètres de l\'appareil"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Peut sonner ou vibrer, selon les paramètres de l\'appareil. Conversations des bulles de <xliff:g id="APP_NAME">%1$s</xliff:g> par défaut."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Faire en sorte que le système détermine si cette notification devrait émettre un son ou vibrer"</string>
@@ -782,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page précédente"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page suivante"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Supprimer"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Accueil"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"Fin"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insérer"</string>
@@ -807,34 +817,34 @@
<string name="keyboard_shortcut_a11y_show_search_results" msgid="2865241062981833705">"Affichage des résultats de recherche en cours…"</string>
<string name="keyboard_shortcut_a11y_filter_system" msgid="7744143131119370483">"Affichage des raccourcis du système en cours…"</string>
<string name="keyboard_shortcut_a11y_filter_input" msgid="4589316004510335529">"Affichage des raccourcis d\'entrée en cours…"</string>
- <string name="keyboard_shortcut_a11y_filter_open_apps" msgid="6175417687221004059">"Affichage des raccourcis qui ouvrent les applications en cours…"</string>
- <string name="keyboard_shortcut_a11y_filter_current_app" msgid="7944592357493737911">"Affichage des raccourcis de l\'application actuelle en cours…"</string>
+ <string name="keyboard_shortcut_a11y_filter_open_apps" msgid="6175417687221004059">"Affichage des raccourcis qui ouvrent les applis en cours…"</string>
+ <string name="keyboard_shortcut_a11y_filter_current_app" msgid="7944592357493737911">"Affichage des raccourcis de l\'appli actuelle en cours…"</string>
<string name="group_system_access_notification_shade" msgid="1619028907006553677">"Afficher les notifications"</string>
<string name="group_system_full_screenshot" msgid="5742204844232667785">"Prendre une capture d\'écran"</string>
<string name="group_system_access_system_app_shortcuts" msgid="8562482996626694026">"Afficher les raccourcis"</string>
<string name="group_system_go_back" msgid="2730322046244918816">"Retour"</string>
<string name="group_system_access_home_screen" msgid="4130366993484706483">"Aller à l’écran d’accueil"</string>
- <string name="group_system_overview_open_apps" msgid="5659958952937994104">"Afficher les applications récentes"</string>
- <string name="group_system_cycle_forward" msgid="5478663965957647805">"Parcourir les applications récentes"</string>
- <string name="group_system_cycle_back" msgid="8194102916946802902">"Parcourir les applications récentes en sens inverse"</string>
- <string name="group_system_access_all_apps_search" msgid="1553588630154197469">"Ouvrir la liste des applications"</string>
+ <string name="group_system_overview_open_apps" msgid="5659958952937994104">"Afficher les applis récentes"</string>
+ <string name="group_system_cycle_forward" msgid="5478663965957647805">"Parcourir les applis récentes"</string>
+ <string name="group_system_cycle_back" msgid="8194102916946802902">"Parcourir les applis récentes en sens inverse"</string>
+ <string name="group_system_access_all_apps_search" msgid="1553588630154197469">"Ouvrir la liste des applis"</string>
<string name="group_system_access_system_settings" msgid="8731721963449070017">"Ouvrir les paramètres"</string>
<string name="group_system_access_google_assistant" msgid="7210074957915968110">"Ouvrir l\'Assistant"</string>
<string name="group_system_lock_screen" msgid="7391191300363416543">"Écran de verrouillage"</string>
<string name="group_system_quick_memo" msgid="3764560265935722903">"Prendre une note"</string>
<string name="keyboard_shortcut_group_system_multitasking" msgid="6967816258924795558">"Multitâche"</string>
- <string name="system_multitasking_rhs" msgid="8714224917276297810">"Utiliser l\'Écran divisé avec l\'application actuelle à droite"</string>
- <string name="system_multitasking_lhs" msgid="8402954791206308783">"Utiliser l\'Écran divisé avec l\'application actuelle à gauche"</string>
+ <string name="system_multitasking_rhs" msgid="8714224917276297810">"Utiliser l\'Écran divisé avec l\'appli actuelle à droite"</string>
+ <string name="system_multitasking_lhs" msgid="8402954791206308783">"Utiliser l\'Écran divisé avec l\'appli actuelle à gauche"</string>
<string name="system_multitasking_full_screen" msgid="336048080383640562">"Passer de l\'écran divisé au plein écran"</string>
- <string name="system_multitasking_splitscreen_focus_rhs" msgid="3838578650313318508">"Passer à l\'application à droite ou en dessous avec l\'Écran divisé"</string>
- <string name="system_multitasking_splitscreen_focus_lhs" msgid="3164261844398662518">"Passer à l\'application à gauche ou au-dessus avec l\'Écran divisé"</string>
- <string name="system_multitasking_replace" msgid="7410071959803642125">"En mode d\'écran divisé : remplacer une application par une autre"</string>
+ <string name="system_multitasking_splitscreen_focus_rhs" msgid="3838578650313318508">"Passer à l\'appli à droite ou en dessous avec l\'Écran divisé"</string>
+ <string name="system_multitasking_splitscreen_focus_lhs" msgid="3164261844398662518">"Passer à l\'appli à gauche ou au-dessus avec l\'Écran divisé"</string>
+ <string name="system_multitasking_replace" msgid="7410071959803642125">"En mode d\'écran divisé : remplacer une appli par une autre"</string>
<string name="keyboard_shortcut_group_input" msgid="6888282716546625610">"Entrée"</string>
<string name="input_switch_input_language_next" msgid="3782155659868227855">"Passer à la langue suivante"</string>
<string name="input_switch_input_language_previous" msgid="6043341362202336623">"Passer à la langue précédente"</string>
<string name="input_access_emoji" msgid="8105642858900406351">"Accéder aux émojis"</string>
<string name="input_access_voice_typing" msgid="7291201476395326141">"Accéder à l\'entrée vocale"</string>
- <string name="keyboard_shortcut_group_applications" msgid="7386239431100651266">"Applications"</string>
+ <string name="keyboard_shortcut_group_applications" msgid="7386239431100651266">"Applis"</string>
<string name="keyboard_shortcut_group_applications_assist" msgid="6772492350416591448">"Assistant"</string>
<string name="keyboard_shortcut_group_applications_browser" msgid="2776211137869809251">"Navigateur"</string>
<string name="keyboard_shortcut_group_applications_contacts" msgid="2807268086386201060">"Contacts"</string>
@@ -934,27 +944,27 @@
<string name="lockscreen_unlock_left" msgid="1417801334370269374">"Le raccourci gauche déverrouille aussi :"</string>
<string name="lockscreen_unlock_right" msgid="4658008735541075346">"Le raccourci droit déverrouille aussi :"</string>
<string name="lockscreen_none" msgid="4710862479308909198">"Aucun"</string>
- <string name="tuner_launch_app" msgid="3906265365971743305">"Lancer l\'application <xliff:g id="APP">%1$s</xliff:g>"</string>
- <string name="tuner_other_apps" msgid="7767462881742291204">"Autres applications"</string>
+ <string name="tuner_launch_app" msgid="3906265365971743305">"Lancer l\'appli <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="tuner_other_apps" msgid="7767462881742291204">"Autres applis"</string>
<string name="tuner_circle" msgid="5270591778160525693">"Cercle"</string>
<string name="tuner_plus" msgid="4130366441154416484">"Plus"</string>
<string name="tuner_minus" msgid="5258518368944598545">"Moins"</string>
<string name="tuner_left" msgid="5758862558405684490">"Gauche"</string>
<string name="tuner_right" msgid="8247571132790812149">"Droite"</string>
<string name="tuner_menu" msgid="363690665924769420">"Menu"</string>
- <string name="tuner_app" msgid="6949280415826686972">"Application <xliff:g id="APP">%1$s</xliff:g>"</string>
+ <string name="tuner_app" msgid="6949280415826686972">"Appli <xliff:g id="APP">%1$s</xliff:g>"</string>
<string name="notification_channel_alerts" msgid="3385787053375150046">"Alertes"</string>
<string name="notification_channel_battery" msgid="9219995638046695106">"Pile"</string>
<string name="notification_channel_screenshot" msgid="7665814998932211997">"Saisies d\'écran"</string>
- <string name="notification_channel_instant" msgid="7556135423486752680">"Applications instantanées"</string>
+ <string name="notification_channel_instant" msgid="7556135423486752680">"Applis instantanées"</string>
<string name="notification_channel_setup" msgid="7660580986090760350">"Configuration"</string>
<string name="notification_channel_storage" msgid="2720725707628094977">"Stockage"</string>
<string name="notification_channel_hints" msgid="7703783206000346876">"Conseils"</string>
<string name="notification_channel_accessibility" msgid="8956203986976245820">"Accessibilité"</string>
- <string name="instant_apps" msgid="8337185853050247304">"Applications instantanées"</string>
+ <string name="instant_apps" msgid="8337185853050247304">"Applis instantanées"</string>
<string name="instant_apps_title" msgid="8942706782103036910">"<xliff:g id="APP">%1$s</xliff:g> en cours d\'exécution"</string>
- <string name="instant_apps_message" msgid="6112428971833011754">"Application ouverte sans avoir été installée."</string>
- <string name="instant_apps_message_with_help" msgid="1816952263531203932">"Application ouverte sans avoir été installée. Touchez ici pour en savoir plus."</string>
+ <string name="instant_apps_message" msgid="6112428971833011754">"Appli ouverte sans avoir été installée."</string>
+ <string name="instant_apps_message_with_help" msgid="1816952263531203932">"Appli ouverte sans avoir été installée. Touchez ici pour en savoir plus."</string>
<string name="app_info" msgid="5153758994129963243">"Détails de l\'appli"</string>
<string name="go_to_web" msgid="636673528981366511">"Ouvrir le navigateur"</string>
<string name="mobile_data" msgid="4564407557775397216">"Données cellulaires"</string>
@@ -965,9 +975,9 @@
<string name="dnd_is_off" msgid="3185706903793094463">"Le mode Ne pas déranger est désactivé"</string>
<string name="dnd_is_on" msgid="7009368176361546279">"Mode Ne pas déranger activé"</string>
<string name="qs_dnd_prompt_auto_rule" msgid="3535469468310002616">"Le mode Ne pas déranger a été activé par une règle automatique (<xliff:g id="ID_1">%s</xliff:g>)."</string>
- <string name="qs_dnd_prompt_app" msgid="4027984447935396820">"Le mode Ne pas déranger a été activé par une application (<xliff:g id="ID_1">%s</xliff:g>)."</string>
- <string name="qs_dnd_prompt_auto_rule_app" msgid="1841469944118486580">"Le mode Ne pas déranger a été activé par une règle automatique ou une application."</string>
- <string name="running_foreground_services_title" msgid="5137313173431186685">"Applications qui fonctionnent en arrière-plan"</string>
+ <string name="qs_dnd_prompt_app" msgid="4027984447935396820">"Le mode Ne pas déranger a été activé par une appli (<xliff:g id="ID_1">%s</xliff:g>)."</string>
+ <string name="qs_dnd_prompt_auto_rule_app" msgid="1841469944118486580">"Le mode Ne pas déranger a été activé par une règle automatique ou une appli."</string>
+ <string name="running_foreground_services_title" msgid="5137313173431186685">"Applis qui fonctionnent en arrière-plan"</string>
<string name="running_foreground_services_msg" msgid="3009459259222695385">"Touchez pour afficher des détails sur l\'utilisation de la pile et des données"</string>
<string name="mobile_data_disable_title" msgid="5366476131671617790">"Désactiver les données cellulaires?"</string>
<string name="mobile_data_disable_message" msgid="8604966027899770415">"Vous n\'aurez pas accès aux données ni à Internet avec <xliff:g id="CARRIER">%s</xliff:g>. Vous ne pourrez accéder à Internet que par Wi-Fi."</string>
@@ -976,18 +986,18 @@
<string name="auto_data_switch_disable_message" msgid="5885533647399535852">"Il n\'y aura pas de basculement automatique entre les données mobiles selon la disponibilité"</string>
<string name="auto_data_switch_dialog_negative_button" msgid="2370876875999891444">"Non merci"</string>
<string name="auto_data_switch_dialog_positive_button" msgid="8531782041263087564">"Oui, basculer"</string>
- <string name="touch_filtered_warning" msgid="8119511393338714836">"Une application obscurcit une demande d\'autorisation, alors Paramètres ne peut pas vérifier votre réponse."</string>
+ <string name="touch_filtered_warning" msgid="8119511393338714836">"Une appli obscurcit une demande d\'autorisation, alors Paramètres ne peut pas vérifier votre réponse."</string>
<string name="slice_permission_title" msgid="3262615140094151017">"Autoriser <xliff:g id="APP_0">%1$s</xliff:g> à afficher <xliff:g id="APP_2">%2$s</xliff:g> tranches?"</string>
<string name="slice_permission_text_1" msgid="6675965177075443714">"- Il peut lire de l\'information de <xliff:g id="APP">%1$s</xliff:g>"</string>
<string name="slice_permission_text_2" msgid="6758906940360746983">"- Il peut effectuer des actions dans <xliff:g id="APP">%1$s</xliff:g>"</string>
- <string name="slice_permission_checkbox" msgid="4242888137592298523">"Autoriser <xliff:g id="APP">%1$s</xliff:g> à afficher des tranches de n\'importe quelle application"</string>
+ <string name="slice_permission_checkbox" msgid="4242888137592298523">"Autoriser <xliff:g id="APP">%1$s</xliff:g> à afficher des tranches de n\'importe quelle appli"</string>
<string name="slice_permission_allow" msgid="6340449521277951123">"Autoriser"</string>
<string name="slice_permission_deny" msgid="6870256451658176895">"Refuser"</string>
<string name="auto_saver_title" msgid="6873691178754086596">"Toucher pour activer la fonction Économiseur de pile"</string>
<string name="auto_saver_text" msgid="3214960308353838764">"Activer si la pile est susceptible de s\'épuiser totalement"</string>
<string name="no_auto_saver_action" msgid="7467924389609773835">"Non merci"</string>
<string name="ongoing_privacy_dialog_a11y_title" msgid="2205794093673327974">"En cours d\'utilisation"</string>
- <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Des applications utilisent votre <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
+ <string name="ongoing_privacy_chip_content_multiple_apps" msgid="8341216022442383954">"Des applis utilisent votre <xliff:g id="TYPES_LIST">%s</xliff:g>."</string>
<string name="ongoing_privacy_dialog_separator" msgid="1866222499727706187">", "</string>
<string name="ongoing_privacy_dialog_last_separator" msgid="5615876114268009767">" et "</string>
<string name="ongoing_privacy_dialog_using_op" msgid="426635338010011796">"En cours d\'utilisation par : <xliff:g id="APPLICATION_NAME">%1$s</xliff:g>"</string>
@@ -1060,7 +1070,7 @@
<string name="accessibility_floating_button_action_double_tap_to_toggle" msgid="7976492639670692037">"basculer"</string>
<string name="accessibility_floating_button_action_edit" msgid="1688227814600463987">"Modifier"</string>
<string name="quick_controls_title" msgid="6839108006171302273">"Commandes des appareils"</string>
- <string name="controls_providers_title" msgid="6879775889857085056">"Sélectionnez l\'application pour laquelle ajouter des commandes"</string>
+ <string name="controls_providers_title" msgid="6879775889857085056">"Sélectionnez l\'appli pour laquelle ajouter des commandes"</string>
<string name="controls_number_of_favorites" msgid="4481806788981836355">"{count,plural, =1{# commande ajoutée.}one{# commande ajoutée.}many{# de commandes ajoutées.}other{# commandes ajoutées.}}"</string>
<string name="controls_removed" msgid="3731789252222856959">"Supprimé"</string>
<string name="controls_panel_authorization_title" msgid="267429338785864842">"Ajouter <xliff:g id="APPNAME">%s</xliff:g>?"</string>
@@ -1077,11 +1087,11 @@
<string name="controls_favorite_rearrange" msgid="5616952398043063519">"Faites glisser les commandes pour les réorganiser"</string>
<string name="controls_favorite_removed" msgid="5276978408529217272">"Toutes les commandes ont été retirées"</string>
<string name="controls_favorite_toast_no_changes" msgid="7094494210840877931">"Modifications non enregistrées"</string>
- <string name="controls_favorite_see_other_apps" msgid="7709087332255283460">"Afficher autres applications"</string>
+ <string name="controls_favorite_see_other_apps" msgid="7709087332255283460">"Afficher autres applis"</string>
<string name="controls_favorite_rearrange_button" msgid="2942788904364641185">"Réorganiser"</string>
<string name="controls_favorite_add_controls" msgid="1221420435546694004">"Ajouter des commandes"</string>
<string name="controls_favorite_back_to_editing" msgid="184125114090062713">"Retour à la modification"</string>
- <string name="controls_favorite_load_error" msgid="5126216176144877419">"Impossible de charger les commandes. Vérifiez l\'application <xliff:g id="APP">%s</xliff:g> pour vous assurer que les paramètres de l\'application n\'ont pas changé."</string>
+ <string name="controls_favorite_load_error" msgid="5126216176144877419">"Impossible de charger les commandes. Vérifiez l\'appli <xliff:g id="APP">%s</xliff:g> pour vous assurer que les paramètres de l\'appli n\'ont pas changé."</string>
<string name="controls_favorite_load_none" msgid="7687593026725357775">"Les commandes compatibles ne sont pas accessibles"</string>
<string name="controls_favorite_other_zone_header" msgid="9089613266575525252">"Autre"</string>
<string name="controls_dialog_title" msgid="2343565267424406202">"Ajouter aux commandes des appareils"</string>
@@ -1090,9 +1100,9 @@
<string name="controls_dialog_message" msgid="342066938390663844">"Suggestion de <xliff:g id="APP">%s</xliff:g>"</string>
<string name="controls_tile_locked" msgid="731547768182831938">"Appareil verrouillé"</string>
<string name="controls_settings_show_controls_dialog_title" msgid="3357852503553809554">"Afficher et contrôler les appareils à partir de l\'écran de verrouillage?"</string>
- <string name="controls_settings_show_controls_dialog_message" msgid="7666211700524587969">"Vous pouvez ajouter des commandes pour vos appareils externes à l\'écran de verrouillage.\n\nL\'application de votre appareil peut vous permettre de contrôler certains appareils sans déverrouiller votre téléphone ou votre tablette.\n\nVous pouvez apporter des modifications à tout moment dans les paramètres."</string>
+ <string name="controls_settings_show_controls_dialog_message" msgid="7666211700524587969">"Vous pouvez ajouter des commandes pour vos appareils externes à l\'écran de verrouillage.\n\nL\'appli de votre appareil peut vous permettre de contrôler certains appareils sans déverrouiller votre téléphone ou votre tablette.\n\nVous pouvez apporter des modifications à tout moment dans les paramètres."</string>
<string name="controls_settings_trivial_controls_dialog_title" msgid="7593188157655036677">"Contrôler les appareils à partir de l\'écran de verrouillage?"</string>
- <string name="controls_settings_trivial_controls_dialog_message" msgid="397178734990952575">"Vous pouvez contrôler certains appareils sans déverrouiller votre téléphone ou votre tablette. L\'application de votre appareil détermine quels appareils peuvent être contrôlés de cette manière."</string>
+ <string name="controls_settings_trivial_controls_dialog_message" msgid="397178734990952575">"Vous pouvez contrôler certains appareils sans déverrouiller votre téléphone ou votre tablette. L\'appli de votre appareil détermine quels appareils peuvent être contrôlés de cette manière."</string>
<string name="controls_settings_dialog_neutral_button" msgid="4514446354793124140">"Non merci"</string>
<string name="controls_settings_dialog_positive_button" msgid="436070672551674863">"Oui"</string>
<string name="controls_pin_use_alphanumeric" msgid="8478371861023048414">"Le NIP contient des lettres ou des symboles"</string>
@@ -1135,14 +1145,14 @@
<string name="controls_error_timeout" msgid="794197289772728958">"Délai expiré, vérifiez l\'appli"</string>
<string name="controls_error_removed" msgid="6675638069846014366">"Introuvable"</string>
<string name="controls_error_removed_title" msgid="1207794911208047818">"La commande n\'est pas accessible"</string>
- <string name="controls_error_removed_message" msgid="2885911717034750542">"Impossible d\'accéder à <xliff:g id="DEVICE">%1$s</xliff:g>. Vérifiez l\'application <xliff:g id="APPLICATION">%2$s</xliff:g> pour vous assurer que la commande est toujours offerte et que les paramètres de l\'application n\'ont pas changé."</string>
- <string name="controls_open_app" msgid="483650971094300141">"Ouvrir l\'application"</string>
+ <string name="controls_error_removed_message" msgid="2885911717034750542">"Impossible d\'accéder à <xliff:g id="DEVICE">%1$s</xliff:g>. Vérifiez l\'appli <xliff:g id="APPLICATION">%2$s</xliff:g> pour vous assurer que la commande est toujours offerte et que les paramètres de l\'appli n\'ont pas changé."</string>
+ <string name="controls_open_app" msgid="483650971094300141">"Ouvrir l\'appli"</string>
<string name="controls_error_generic" msgid="352500456918362905">"Impossible de charger l\'état"</string>
<string name="controls_error_failed" msgid="960228639198558525">"Erreur. Veuillez réessayer."</string>
<string name="controls_menu_add" msgid="4447246119229920050">"Ajouter des commandes"</string>
<string name="controls_menu_edit" msgid="890623986951347062">"Modifier des commandes"</string>
- <string name="controls_menu_add_another_app" msgid="8661172304650786705">"Ajouter une application"</string>
- <string name="controls_menu_remove" msgid="3006525275966023468">"Retirer l\'application"</string>
+ <string name="controls_menu_add_another_app" msgid="8661172304650786705">"Ajouter une appli"</string>
+ <string name="controls_menu_remove" msgid="3006525275966023468">"Retirer l\'appli"</string>
<string name="media_output_dialog_add_output" msgid="5642703238877329518">"Ajouter des sorties"</string>
<string name="media_output_dialog_group" msgid="5571251347877452212">"Groupe"</string>
<string name="media_output_dialog_single_device" msgid="3102758980643351058">"Un appareil sélectionné"</string>
@@ -1150,8 +1160,8 @@
<string name="media_output_dialog_disconnected" msgid="7090512852817111185">"(déconnecté)"</string>
<string name="media_output_dialog_connect_failed" msgid="3080972621975339387">"Changement impossible. Touchez pour réessayer."</string>
<string name="media_output_dialog_pairing_new" msgid="5098212763195577270">"Connecter un appareil"</string>
- <string name="media_output_dialog_launch_app_text" msgid="1527413319632586259">"Pour diffuser cette session, veuillez ouvrir l\'application."</string>
- <string name="media_output_dialog_unknown_launch_app_name" msgid="1084899329829371336">"Application inconnue"</string>
+ <string name="media_output_dialog_launch_app_text" msgid="1527413319632586259">"Pour diffuser cette session, veuillez ouvrir l\'appli."</string>
+ <string name="media_output_dialog_unknown_launch_app_name" msgid="1084899329829371336">"Appli inconnue"</string>
<string name="media_output_dialog_button_stop_casting" msgid="6581379537930199189">"Arrêter la diffusion"</string>
<string name="media_output_dialog_accessibility_title" msgid="4681741064190167888">"Appareils disponibles pour la sortie audio."</string>
<string name="media_output_dialog_accessibility_seekbar" msgid="5332843993805568978">"Volume"</string>
@@ -1239,13 +1249,13 @@
<string name="wifi_wont_autoconnect_for_now" msgid="5782282612749867762">"Connexion automatique au Wi-Fi impossible pour le moment"</string>
<string name="see_all_networks" msgid="3773666844913168122">"Tout afficher"</string>
<string name="to_switch_networks_disconnect_ethernet" msgid="6698111101156951955">"Pour changer de réseau, débranchez le câble Ethernet"</string>
- <string name="wifi_scan_notify_message" msgid="3753839537448621794">"Pour améliorer l\'expérience de l\'appareil, les applications et les services peuvent quand même rechercher des réseaux Wi-Fi en tout temps, même lorsque le Wi-Fi est désactivé. Vous pouvez modifier vos préférences dans les paramètres de recherche de réseaux Wi-Fi. "<annotation id="link">"Modifier"</annotation></string>
+ <string name="wifi_scan_notify_message" msgid="3753839537448621794">"Pour améliorer l\'expérience de l\'appareil, les applis et les services peuvent quand même rechercher des réseaux Wi-Fi en tout temps, même lorsque le Wi-Fi est désactivé. Vous pouvez modifier vos préférences dans les paramètres de recherche de réseaux Wi-Fi. "<annotation id="link">"Modifier"</annotation></string>
<string name="turn_off_airplane_mode" msgid="8425587763226548579">"Désactiver le mode Avion"</string>
- <string name="qs_tile_request_dialog_text" msgid="3501359944139877694">"L\'application <xliff:g id="APPNAME">%1$s</xliff:g> veut ajouter la tuile suivante au menu Paramètres rapides"</string>
+ <string name="qs_tile_request_dialog_text" msgid="3501359944139877694">"L\'appli <xliff:g id="APPNAME">%1$s</xliff:g> veut ajouter la tuile suivante au menu Paramètres rapides"</string>
<string name="qs_tile_request_dialog_add" msgid="4888460910694986304">"Ajouter la tuile"</string>
<string name="qs_tile_request_dialog_not_add" msgid="4168716573114067296">"Ne pas ajouter de tuile"</string>
<string name="qs_user_switch_dialog_title" msgid="3045189293587781366">"Choisir l\'utilisateur"</string>
- <string name="fgs_manager_footer_label" msgid="8276763570622288231">"{count,plural, =1{# application est active}one{# application est active}many{# d\'applications sont actives}other{# applications sont actives}}"</string>
+ <string name="fgs_manager_footer_label" msgid="8276763570622288231">"{count,plural, =1{# appli est active}one{# appli est active}many{# d\'applis sont actives}other{# applis sont actives}}"</string>
<string name="fgs_dot_content_description" msgid="2865071539464777240">"Nouvelle information"</string>
<string name="fgs_manager_dialog_title" msgid="5879184257257718677">"Applis actives"</string>
<string name="fgs_manager_dialog_message" msgid="2670045017200730076">"Ces applis sont actives et s\'exécutent même lorsque vous ne les utilisez pas. Cela améliore leur fonctionnalité, mais peut également affecter l\'autonomie de la pile."</string>
@@ -1291,16 +1301,16 @@
<string name="log_access_confirmation_title" msgid="4843557604739943395">"Autoriser <xliff:g id="LOG_ACCESS_APP_NAME">%s</xliff:g> à accéder à l\'ensemble des journaux de l\'appareil?"</string>
<string name="log_access_confirmation_allow" msgid="752147861593202968">"Autoriser un accès unique"</string>
<string name="log_access_confirmation_deny" msgid="2389461495803585795">"Ne pas autoriser"</string>
- <string name="log_access_confirmation_body" msgid="6883031912003112634">"Les journaux de l\'appareil enregistrent ce qui se passe sur celui-ci. Les applications peuvent utiliser ces journaux pour trouver et résoudre des problèmes.\n\nCertains journaux peuvent contenir des renseignements confidentiels. N\'autorisez donc que les applications auxquelles vous faites confiance puisque celles-ci pourront accéder à l\'ensemble des journaux de l\'appareil. \n\nMême si vous n\'autorisez pas cette application à accéder à l\'ensemble des journaux de l\'appareil, elle aura toujours accès à ses propres journaux. Le fabricant de votre appareil pourrait toujours être en mesure d\'accéder à certains journaux ou renseignements sur votre appareil."</string>
+ <string name="log_access_confirmation_body" msgid="6883031912003112634">"Les journaux de l\'appareil enregistrent ce qui se passe sur celui-ci. Les applis peuvent utiliser ces journaux pour trouver et résoudre des problèmes.\n\nCertains journaux peuvent contenir des renseignements confidentiels. N\'autorisez donc que les applis auxquelles vous faites confiance puisque celles-ci pourront accéder à l\'ensemble des journaux de l\'appareil. \n\nMême si vous n\'autorisez pas cette appli à accéder à l\'ensemble des journaux de l\'appareil, elle aura toujours accès à ses propres journaux. Le fabricant de votre appareil pourrait toujours être en mesure d\'accéder à certains journaux ou renseignements sur votre appareil."</string>
<string name="log_access_confirmation_learn_more" msgid="3134565480986328004">"En savoir plus"</string>
<string name="log_access_confirmation_learn_more_at" msgid="5635666259505215905">"En savoir plus : <xliff:g id="URL">%s</xliff:g>"</string>
<string name="keyguard_affordance_enablement_dialog_action_template" msgid="8164857863036314664">"Ouvrir <xliff:g id="APPNAME">%1$s</xliff:g>"</string>
- <string name="wallet_quick_affordance_unavailable_install_the_app" msgid="7298552910007208368">"Pour ajouter l\'application portefeuille sous forme de raccourci, assurez-vous que l\'application est installée"</string>
- <string name="wallet_quick_affordance_unavailable_configure_the_app" msgid="4387433357429873258">"Pour ajouter l\'application Portefeuille sous forme de raccourci, assurez-vous qu\'au moins une carte a été ajoutée"</string>
- <string name="home_quick_affordance_unavailable_install_the_app" msgid="6187820778998446168">"Pour ajouter l\'application Home sous forme de raccourci, assurez-vous que l\'application est installée"</string>
+ <string name="wallet_quick_affordance_unavailable_install_the_app" msgid="7298552910007208368">"Pour ajouter l\'appli portefeuille sous forme de raccourci, assurez-vous que l\'appli est installée"</string>
+ <string name="wallet_quick_affordance_unavailable_configure_the_app" msgid="4387433357429873258">"Pour ajouter l\'appli Portefeuille sous forme de raccourci, assurez-vous qu\'au moins une carte a été ajoutée"</string>
+ <string name="home_quick_affordance_unavailable_install_the_app" msgid="6187820778998446168">"Pour ajouter l\'appli Home sous forme de raccourci, assurez-vous que l\'appli est installée"</string>
<string name="home_quick_affordance_unavailable_configure_the_app" msgid="604424593994493281">"• Au moins un appareil ou un panneau d\'appareils est accessible"</string>
- <string name="notes_app_quick_affordance_unavailable_explanation" msgid="4796955161600178530">"Sélectionnez une application de prise de notes par défaut pour utiliser le raccourci de prise de notes"</string>
- <string name="keyguard_affordance_enablement_dialog_notes_app_action" msgid="6821710209675089470">"Sélectionner l\'application"</string>
+ <string name="notes_app_quick_affordance_unavailable_explanation" msgid="4796955161600178530">"Sélectionnez une appli de prise de notes par défaut pour utiliser le raccourci de prise de notes"</string>
+ <string name="keyguard_affordance_enablement_dialog_notes_app_action" msgid="6821710209675089470">"Sélectionner l\'appli"</string>
<string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Maintenir le doigt sur raccourci"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Annuler"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="1507591562761552899">"Changer d\'écran maintenant"</string>
@@ -1317,10 +1327,10 @@
<string name="stylus_battery_low_subtitle" msgid="3583843128908823273">"Connectez votre stylet à un chargeur"</string>
<string name="stylus_battery_low" msgid="7134370101603167096">"Pile du stylet faible"</string>
<string name="video_camera" msgid="7654002575156149298">"Caméra"</string>
- <string name="call_from_work_profile_title" msgid="5418253516453177114">"Impossible d\'appeler à partir d\'une application personnelle"</string>
- <string name="call_from_work_profile_text" msgid="2856337395968118274">"Votre organisation vous autorise à passer des appels uniquement à partir d\'applications professionnelles"</string>
+ <string name="call_from_work_profile_title" msgid="5418253516453177114">"Impossible d\'appeler à partir d\'une appli personnelle"</string>
+ <string name="call_from_work_profile_text" msgid="2856337395968118274">"Votre organisation vous autorise à passer des appels uniquement à partir d\'applis professionnelles"</string>
<string name="call_from_work_profile_action" msgid="2937701298133010724">"Passer au profil professionnel"</string>
- <string name="install_dialer_on_work_profile_action" msgid="2014659711597862506">"Installer une application de téléphone professionnelle"</string>
+ <string name="install_dialer_on_work_profile_action" msgid="2014659711597862506">"Installer une appli de téléphone professionnelle"</string>
<string name="call_from_work_profile_close" msgid="5830072964434474143">"Annuler"</string>
<string name="lock_screen_settings" msgid="6152703934761402399">"Personn. l\'écran de verrouillage"</string>
<string name="keyguard_unlock_to_customize_ls" msgid="2068542308086253819">"Déverrouiller pour personnaliser l\'écran de verrouillage"</string>
@@ -1330,8 +1340,8 @@
<string name="microphone_blocked_dream_overlay_content_description" msgid="5466897982130007033">"Microphone bloqué"</string>
<string name="priority_mode_dream_overlay_content_description" msgid="3361628029609329182">"Ne pas déranger"</string>
<string name="assistant_attention_content_description" msgid="4166330881435263596">"La présence d\'un utilisateur est détectée"</string>
- <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Définir l\'application de prise de notes par défaut dans les Paramètres"</string>
- <string name="install_app" msgid="5066668100199613936">"Installer l\'application"</string>
+ <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"Définir l\'appli de prise de notes par défaut dans les Paramètres"</string>
+ <string name="install_app" msgid="5066668100199613936">"Installer l\'appli"</string>
<string name="dismissible_keyguard_swipe" msgid="8377597870094949432">"Balayer vers le haut pour continuer"</string>
<string name="connected_display_dialog_start_mirroring" msgid="6237895789920854982">"Dupliquer l\'écran sur un moniteur externe?"</string>
<string name="connected_display_dialog_dual_display_stop_warning" msgid="4174707498892447947">"Votre écran intérieur sera dupliqué. Votre écran frontal sera désactivé."</string>
@@ -1339,12 +1349,12 @@
<string name="dismiss_dialog" msgid="2195508495854675882">"Fermer"</string>
<string name="connected_display_icon_desc" msgid="6373560639989971997">"Écran connecté"</string>
<string name="privacy_dialog_title" msgid="7839968133469098311">"Microphone et appareil photo"</string>
- <string name="privacy_dialog_summary" msgid="2458769652125995409">"Utilisation récente par les applications"</string>
+ <string name="privacy_dialog_summary" msgid="2458769652125995409">"Utilisation récente par les applis"</string>
<string name="privacy_dialog_more_button" msgid="7610604080293562345">"Afficher l\'accès récent"</string>
<string name="privacy_dialog_done_button" msgid="4504330708531434263">"OK"</string>
<string name="privacy_dialog_expand_action" msgid="9129262348628331377">"Développer et afficher les options"</string>
<string name="privacy_dialog_collapse_action" msgid="277419962019466347">"Réduire"</string>
- <string name="privacy_dialog_close_app_button" msgid="8006250171305878606">"Fermer cette application"</string>
+ <string name="privacy_dialog_close_app_button" msgid="8006250171305878606">"Fermer cette appli"</string>
<string name="privacy_dialog_close_app_message" msgid="1316408652526310985">"<xliff:g id="APP_NAME">%1$s</xliff:g> fermé"</string>
<string name="privacy_dialog_manage_service" msgid="8320590856621823604">"Gérer le service"</string>
<string name="privacy_dialog_manage_permissions" msgid="2543451567190470413">"Gérer l\'accès"</string>
@@ -1364,20 +1374,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Écran divisé"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Entrée"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Raccourcis des applis"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Accessibilité"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Raccourcis-clavier"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Recherchez des raccourcis"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Icône Réduire"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Icône Développer"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"ou"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Geste de retour"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Geste d\'accès à l\'écran d\'accueil"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Touche d\'action"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"OK"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Bon travail!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Retour"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Pour revenir en arrière, balayez vers la gauche ou la droite en utilisant trois doigts n\'importe où sur le pavé tactile."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Pavé tactile montrant trois doigts se déplaçant à droite et à gauche"</string>
@@ -1386,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Niveau %1$d de %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Domotique"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Accès rapide : domotique sous forme d\'Écran de veille"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-fr-rCA/tiles_states_strings.xml b/packages/SystemUI/res/values-fr-rCA/tiles_states_strings.xml
index 52b763b4028d..e0445fa8c9e9 100644
--- a/packages/SystemUI/res/values-fr-rCA/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-fr-rCA/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Désactivé"</item>
<item msgid="4875147066469902392">"Activé"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Non disponible"</item>
<item msgid="5044688398303285224">"Désactivée"</item>
diff --git a/packages/SystemUI/res/values-fr/strings.xml b/packages/SystemUI/res/values-fr/strings.xml
index 45e5c020327b..240f0131ad50 100644
--- a/packages/SystemUI/res/values-fr/strings.xml
+++ b/packages/SystemUI/res/values-fr/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> a détecté cette capture d\'écran."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> et d\'autres applis ouvertes ont détecté cette capture d\'écran."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Ajouter à la note"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Inclure le lien"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Enregistreur d\'écran"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Enregistrement de l\'écran…"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Notification en cours pour une session d\'enregistrement de l\'écran"</string>
@@ -127,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Appuyez pour afficher"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Erreur lors de l\'enregistrement de l\'écran"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Erreur lors du démarrage de l\'enregistrement de l\'écran"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Vous arrêterez d\'enregistrer &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Arrêter l\'enregistrement"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Partage de l\'écran…"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Arrêter le partage d\'écran ?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Vous arrêterez de partager &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Arrêter le partage"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Cast de l\'écran"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Arrêter de caster ?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Diffusion de l\'écran…"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Vous arrêterez de caster &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Arrêter de caster du contenu"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Fermer"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Enregistreur de problèmes"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Enregistrement du problème"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Notification d\'activité en cours concernant la session d\'enregistrement d\'un problème"</string>
@@ -162,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Erreur lors de l\'enregistrement du problème"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Erreur lors du démarrage de l\'enregistrement du problème"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Affichage en plein écran"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Pour quitter, balayez l\'écran de haut en bas"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"OK"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Retour"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Accueil"</string>
@@ -196,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Déverrouillé par visage. Appuyez pour continuer."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Visage reconnu. Appuyez pour continuer."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Visage reconnu. Appuyez sur l\'icône de déverrouillage pour continuer."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Déverrouillé par le visage. Appuyez pour continuer."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Authentifié"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Annuler l\'authentification"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Plus d\'options"</string>
@@ -297,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Économiseur d\'écran"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Ne pas déranger"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Aucun appareil associé disponible."</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Appuyez pour connecter ou déconnecter un appareil"</string>
@@ -308,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Enregistré"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"dissocier"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"activer"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Activer automatiquement demain"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Certaines fonctionnalités, telles que Quick Share et Localiser mon appareil, utilisent le Bluetooth"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Le Bluetooth sera activé demain matin"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Partager le contenu audio"</string>
@@ -478,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Ajouter des widgets"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Appuyez de manière prolongée pour personnaliser les widgets"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Personnaliser les widgets"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Déverrouiller pour personnaliser les widgets"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Icône d\'appli du widget désactivé"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Icône d\'application indiquant qu\'un widget est en cours d\'installation"</string>
<string name="edit_widget" msgid="9030848101135393954">"Modifier le widget"</string>
@@ -498,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"sélectionner un widget"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"supprimer le widget"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"positionner le widget sélectionné"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Widgets pour l\'écran de verrouillage"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Pour ouvrir une appli à l\'aide d\'un widget, vous devez confirmer qu\'il s\'agit bien de vous. N\'oubliez pas non plus que tout le monde peut voir vos widgets, même lorsque votre tablette est verrouillée. Certains d\'entre eux n\'ont pas été conçus pour l\'écran de verrouillage et les ajouter à cet endroit peut s\'avérer dangereux."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"OK"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Changer d\'utilisateur"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"menu déroulant"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Toutes les applications et les données de cette session seront supprimées."</string>
@@ -725,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Par défaut"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Automatique"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Ni son, ni vibreur"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Ni son, ni vibreur ; s\'affiche plus bas dans la section des conversations"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Peut sonner ou vibrer en fonction des paramètres de l\'appareil"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Peut sonner ou vibrer en fonction des paramètres de l\'appareil. Les conversations provenant de <xliff:g id="APP_NAME">%1$s</xliff:g> s\'affichent sous forme de bulles par défaut."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Laisser le système déterminer si cette notification doit être accompagnée d\'un son ou d\'une vibration"</string>
@@ -782,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page précédente"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page suivante"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Supprimer"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Accueil"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"Fin"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insérer"</string>
@@ -1364,20 +1374,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Écran partagé"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Entrée"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Raccourcis d\'application"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Accessibilité"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Raccourcis clavier"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Raccourcis de recherche"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Icône Réduire"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Icône Développer"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"ou"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Geste Retour"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Geste Accueil"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Touche d\'action"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"OK"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Bravo !"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Retour"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Pour retourner en arrière, balayez vers la gauche avec trois doigts n\'importe où sur le pavé tactile."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Pavé tactile sur lequel trois doigts glissent vers la droite, puis vers la gauche"</string>
@@ -1386,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Niveau %1$d sur %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Contrôle de la maison"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Domotique sous forme d\'économiseur d\'écran"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-fr/tiles_states_strings.xml b/packages/SystemUI/res/values-fr/tiles_states_strings.xml
index fcdd9f0e6e3a..adc9cb3789cf 100644
--- a/packages/SystemUI/res/values-fr/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-fr/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Désactivé"</item>
<item msgid="4875147066469902392">"Activé"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Indisponible"</item>
<item msgid="5044688398303285224">"Désactivé"</item>
diff --git a/packages/SystemUI/res/values-gl/strings.xml b/packages/SystemUI/res/values-gl/strings.xml
index 99e9b7823536..5388b09a0a58 100644
--- a/packages/SystemUI/res/values-gl/strings.xml
+++ b/packages/SystemUI/res/values-gl/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> detectou esta captura de pantalla."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> e outras aplicacións abertas detectaron esta captura de pantalla."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Engadir a unha nota"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Incluír ligazón"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Gravadora da pantalla"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Procesando gravación pantalla"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Notificación de actividade en curso sobre unha sesión de gravación de pantalla"</string>
@@ -127,27 +126,28 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Toca para ver o contido"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Produciuse un erro ao gardar a gravación da pantalla"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Produciuse un erro ao iniciar a gravación da pantalla"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
- <skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
- <skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Deixarás de gravar a aplicación &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
+ <string name="screenrecord_stop_dialog_title" msgid="8716193661764511095">"Queres deter a gravación?"</string>
+ <string name="screenrecord_stop_dialog_message" msgid="6262768207331626817">"Estás gravando toda a pantalla"</string>
+ <string name="screenrecord_stop_dialog_message_specific_app" msgid="5995770227684523244">"Estás gravando <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
<!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
<skip />
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Compartindo pantalla"</string>
<!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
- <skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Deixarás de compartir a aplicación &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen_with_host_app" msgid="522823522115375414">"Estás compartindo toda a pantalla con <xliff:g id="HOST_APP_NAME">%1$s</xliff:g>"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen" msgid="5090115386271179270">"Estás compartindo toda a pantalla cunha aplicación"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_specific" msgid="5923772039347985172">"Estás compartindo <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g>"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_generic" msgid="6681016774654578261">"Estás compartindo unha aplicación"</string>
<!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Emitindo pantalla"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
- <skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
- <skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Deixarás de emitir a aplicación &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Emitindo pantalla"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Queres deter a emisión?"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen_with_device" msgid="1474703115926205251">"Estás emitindo toda a pantalla en <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen" msgid="8419219169553867625">"Estás emitindo toda a pantalla nun dispositivo próximo"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app_with_device" msgid="2715934698604085519">"Estás emitindo <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> en <xliff:g id="DEVICE_NAME">%2$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="8616103075630934513">"Estás emitindo <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> nun dispositivo próximo"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic_with_device" msgid="9213582497852420203">"Estás emitindo contido en <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic" msgid="4100272100480415076">"Estás emitindo contido nun dispositivo próximo"</string>
<!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
<skip />
<!-- no translation found for close_dialog_button (4749497706540104133) -->
@@ -196,8 +196,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Usouse o desbloqueo facial. Preme para continuar."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Recoñeceuse a cara. Preme para continuar."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Recoñeceuse a cara. Preme a icona de desbloquear."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Usouse o desbloqueo facial. Toca para continuar."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Autenticado"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Cancelar a autenticación"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Máis opcións"</string>
@@ -297,6 +296,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Protector pantalla"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Non molestar"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Non hai dispositivos vinculados dispoñibles"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Toca para conectar ou desconectar un dispositivo"</string>
@@ -478,8 +479,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Engadir máis widgets"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Pulsación longa para personalizar os widgets"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Personalizar widgets"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Desbloquea o dispositivo para personalizar os widgets"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Icona da aplicación de widget desactivado"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Icona da aplicación para un widget que se está instalando"</string>
<string name="edit_widget" msgid="9030848101135393954">"Editar widget"</string>
@@ -498,6 +498,8 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"seleccionar widget"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"quitar o widget"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"colocar o widget seleccionado"</string>
+ <string name="communal_widget_picker_title" msgid="1953369090475731663">"Widgets da pantalla de bloqueo"</string>
+ <string name="communal_widget_picker_description" msgid="490515450110487871">"Calquera pode ver os widgets na pantalla de bloqueo, mesmo coa tableta bloqueada"</string>
<!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
<skip />
<!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
@@ -725,7 +727,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Configuración predeterminada"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Automática"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Sen son nin vibración"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Sen son nin vibración, e aparecen máis abaixo na sección de conversas"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Poderían facer que o dispositivo soe ou vibre en función da súa configuración"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Poderían facer que o dispositivo soe ou vibre en función da súa configuración. As conversas de <xliff:g id="APP_NAME">%1$s</xliff:g> móstranse en burbullas de forma predeterminada."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Fai que o sistema determine se a notificación debe emitir un son ou unha vibración"</string>
@@ -782,6 +785,7 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Re Páx"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Av Páx"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Supr"</string>
+ <string name="keyboard_key_esc" msgid="6230365950511411322">"Escape"</string>
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Inicio"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"Fin"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Inserir"</string>
@@ -1364,6 +1368,7 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Pantalla dividida"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Entrada"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Atallos de aplicacións"</string>
+ <string name="shortcut_helper_category_current_app_shortcuts" msgid="4017840565974573628">"Aplicación actual"</string>
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Accesibilidade"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Atallos de teclado"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Atallos de busca"</string>
@@ -1378,6 +1383,7 @@
<skip />
<!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
<skip />
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Moi ben!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Volver"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Para volver, pasa tres dedos cara á esquerda ou cara á dereita en calquera lugar do panel táctil."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Panel táctil que mostra tres dedos movéndose á dereita e á esquerda"</string>
@@ -1386,4 +1392,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Nivel %1$d de %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Controis domóticos"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Usa os controis domóticos como protector de pantalla"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-gl/tiles_states_strings.xml b/packages/SystemUI/res/values-gl/tiles_states_strings.xml
index 03b934eb9cb6..d2c8ea0906d3 100644
--- a/packages/SystemUI/res/values-gl/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-gl/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Non"</item>
<item msgid="4875147066469902392">"Si"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Non dispoñible"</item>
<item msgid="5044688398303285224">"Non"</item>
diff --git a/packages/SystemUI/res/values-gu/strings.xml b/packages/SystemUI/res/values-gu/strings.xml
index cedcaa1ca7bd..66495f3642d1 100644
--- a/packages/SystemUI/res/values-gu/strings.xml
+++ b/packages/SystemUI/res/values-gu/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> દ્વારા આ સ્ક્રીનશૉટ લેવાયાની ભાળ મેળવવામાં આવી."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> અને કામ કરતી અન્ય ઍપ દ્વારા આ સ્ક્રીનશૉટ લેવાયાની ભાળ મેળવવામાં આવી."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"નોંધમાં ઉમેરો"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"લિંક શામેલ કરો"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"સ્ક્રીન રેકોર્ડર"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"સ્ક્રીન રેકૉર્ડિંગ ચાલુ છે"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"સ્ક્રીન રેકોર્ડિંગ સત્ર માટે ચાલુ નોટિફિકેશન"</string>
@@ -127,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"જોવા માટે ટૅપ કરો"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"સ્ક્રીન રેકોર્ડિંગ સાચવવામાં ભૂલ આવી"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"સ્ક્રીનને રેકૉર્ડ કરવાનું શરૂ કરવામાં ભૂલ"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"તમે &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;ને રેકોર્ડ કરવાનું બંધ કરશો"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"રેકોર્ડિંગ રોકો"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"સ્ક્રીન શેર કરી રહ્યાં છીએ"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"સ્ક્રીન શેર કરવાનું રોકીએ?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"શેર કરવાનું રોકો"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"સ્ક્રીન કાસ્ટ કરી રહ્યાં છીએ"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"શું કાસ્ટ કરવાનું બંધ કરીએ?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"તમે &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;ને શેર કરવાનું બંધ કરશો"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"સ્ક્રીન કાસ્ટ કરી રહ્યાં છીએ"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"તમે &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;ને કાસ્ટ કરવાનું બંધ કરશો"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
<skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"કાસ્ટ કરવાનું રોકો"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"બંધ કરો"</string>
<string name="issuerecord_title" msgid="286627115110121849">"સમસ્યા રેકોર્ડર"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"સમસ્યા રેકોર્ડિંગ ચાલુ છે"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"કોઈ સમસ્યા સંગ્રહના સત્ર માટે ચાલુ નોટિફિકેશન"</string>
@@ -162,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"સમસ્યા રેકોર્ડિંગને સાચવવામાં ભૂલ આવી"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"સમસ્યા રેકોર્ડિંગને શરૂ કરવામાં ભૂલ આવી"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"પૂર્ણ સ્ક્રીન જોઈ રહ્યાં છે"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"બહાર નીકળવા માટે, તમારી સ્ક્રીનની સૌથી ઉપરથી નીચેની તરફ સ્વાઇપ કરો"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"સમજાઈ ગયું"</string>
<string name="accessibility_back" msgid="6530104400086152611">"પાછળ"</string>
<string name="accessibility_home" msgid="5430449841237966217">"હોમ"</string>
@@ -196,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"ચહેરા દ્વારા અનલૉક કર્યું. આગળ વધવા માટે દબાવો."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"ચહેરો ઓળખ્યો. આગળ વધવા માટે દબાવો."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"ચહેરો ઓળખ્યો. આગળ વધવા \'અનલૉક કરો\' આઇકન દબાવો."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"ચહેરા દ્વારા અનલૉક કર્યું. ચાલુ રાખવા માટે ટૅપ કરો."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"પ્રમાણિત"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"પ્રમાણીકરણ રદ કરો"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"વધુ વિકલ્પો"</string>
@@ -297,6 +303,7 @@
<string name="start_dreams" msgid="9131802557946276718">"સ્ક્રીન સેવર"</string>
<string name="ethernet_label" msgid="2203544727007463351">"ઇથરનેટ"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"ખલેલ પાડશો નહીં"</string>
+ <string name="quick_settings_modes_label" msgid="5407025818652750501">"પ્રાધાન્યતાના મોડ"</string>
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"બ્લૂટૂથ"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"કોઈ જોડી કરેલ ઉપકરણો ઉપલબ્ધ નથી"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"કોઈ ડિવાઇસ કનેક્ટ કરવા કે ડિસ્કનેક્ટ કરવા માટે ટૅપ કરો"</string>
@@ -308,8 +315,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"સાચવેલું"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"ડિસ્કનેક્ટ કરો"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"સક્રિય કરો"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"આવતીકાલે ઑટોમૅટિક રીતે ચાલુ કરો"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"ક્વિક શેર અને Find My Device જેવી સુવિધાઓ બ્લૂટૂથનો ઉપયોગ કરે છે"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"બ્લૂટૂથ આવતીકાલે સવારે ચાલુ થશે"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"ઑડિયો શેર કરો"</string>
@@ -478,8 +484,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"વધુ વિજેટ ઉમેરો"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"વિજેટ કસ્ટમાઇઝ કરવા માટે થોડીવાર દબાવી રાખો"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"વિજેટ કસ્ટમાઇઝ કરો"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"વિજેટ કસ્ટમાઇઝ કરવા માટે, અનલૉક કરો"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"બંધ કરેલા વિજેટ માટેની ઍપનું આઇકન"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"ઇન્સ્ટૉલ થઈ રહેલા વિજેટ માટે ઍપનું આઇકન"</string>
<string name="edit_widget" msgid="9030848101135393954">"વિજેટમાં ફેરફાર કરો"</string>
@@ -498,12 +503,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"વિજેટ પસંદ કરો"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"વિજેટ કાઢી નાખો"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"પસંદ કરેલું વિજેટ મૂકો"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"લૉક સ્ક્રીન વિજેટ"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"વિજેટનો ઉપયોગ કરીને ઍપ ખોલવા માટે, તમારે એ ચકાસણી કરવાની જરૂર રહેશે કે આ તમે જ છો. તે ઉપરાંત, ધ્યાનમાં રાખો કે તમારું ટૅબ્લેટ લૉક કરેલું હોય તો પણ કોઈપણ વ્યક્તિ તેમને જોઈ શકે છે. અમુક વિજેટ કદાચ તમારી લૉક સ્ક્રીન માટે બનાવવામાં આવ્યા ન હોઈ શકે છે અને તેમને અહીં ઉમેરવાનું અસલામત હોઈ શકે છે."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"સમજાઈ ગયું"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"વપરાશકર્તા સ્વિચ કરો"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"પુલડાઉન મેનૂ"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"આ સત્રમાંની તમામ ઍપ અને ડેટા કાઢી નાખવામાં આવશે."</string>
@@ -725,7 +731,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"ડિફૉલ્ટ"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"ઑટોમૅટિક રીતે"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"કોઈપણ સાઉન્ડ અથવા વાઇબ્રેશન નથી"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"કોઈપણ સાઉન્ડ અથવા વાઇબ્રેશન નથી અને વાતચીત વિભાગમાં તે વધુ નીચેની દિશાએ દેખાય છે"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"ડિવાઇસના સેટિંગના આધારે રિંગ અથવા વાઇબ્રેટ થઈ શકે છે"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"ડિવાઇસના સેટિંગના આધારે રિંગ અથવા વાઇબ્રેટ થઈ શકે છે. ડિફૉલ્ટ તરીકે <xliff:g id="APP_NAME">%1$s</xliff:g> બબલની વાતચીત."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"આ નોટિફિકેશન સાઉન્ડ અથવા વાઇબ્રેટ કરી શકશે કે નહીં તે સિસ્ટમને નક્કી કરવા દો"</string>
@@ -782,6 +789,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page Down"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Delete"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1364,20 +1373,18 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"સ્ક્રીનને વિભાજિત કરો"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"ઇનપુટ"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"ઍપ શૉર્ટકટ"</string>
+ <string name="shortcut_helper_category_current_app_shortcuts" msgid="4017840565974573628">"હાલની ઍપ"</string>
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"ઍક્સેસિબિલિટી"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"કીબોર્ડ શૉર્ટકટ"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"શૉર્ટકટ શોધો"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"\'નાનું કરો\'નું આઇકન"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"\'મોટું કરો\'નું આઇકન"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"અથવા"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"પાછળ જવાનો સંકેત"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"હોમ સ્ક્રીન પર જવાનો સંકેત"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"ઍક્શન કી"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"થઈ ગયું"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"ખૂબ સરસ કામ!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"પાછા જાઓ"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"પાછા જવા માટે, ત્રણ આંગળીઓનો ઉપયોગ કરીને ટચપૅડ પર કોઈપણ જગ્યાએ ડાબે કે જમણે સ્વાઇપ કરો."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"જમણી અને ડાબી તરફ ખસી રહેલી ત્રણ આંગળીઓ બતાવતું ટચપૅડ"</string>
@@ -1386,4 +1393,5 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"%2$dમાંથી %1$d લેવલ"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"ઘરેલું સાધનોના નિયંત્રણો"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"સ્ક્રીનસેવર તરીકે તમારા ઘરેલું સાધનોના નિયંત્રણો ઝડપથી ઍક્સેસ કરો"</string>
+ <string name="volume_undo_action" msgid="5815519725211877114">"છેલ્લો ફેરફાર રદ કરો"</string>
</resources>
diff --git a/packages/SystemUI/res/values-gu/tiles_states_strings.xml b/packages/SystemUI/res/values-gu/tiles_states_strings.xml
index 5c4a4784c13f..196a05bc4ed5 100644
--- a/packages/SystemUI/res/values-gu/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-gu/tiles_states_strings.xml
@@ -56,6 +56,11 @@
<item msgid="5376619709702103243">"બંધ છે"</item>
<item msgid="4875147066469902392">"ચાલુ છે"</item>
</string-array>
+ <string-array name="tile_states_modes">
+ <item msgid="7764936419245199023">"અનુપલબ્ધ"</item>
+ <item msgid="2004750556637773692">"બંધ"</item>
+ <item msgid="8968530753931637871">"ચાલુ"</item>
+ </string-array>
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"ઉપલબ્ધ નથી"</item>
<item msgid="5044688398303285224">"બંધ છે"</item>
diff --git a/packages/SystemUI/res/values-hi/strings.xml b/packages/SystemUI/res/values-hi/strings.xml
index 591ad1092dc4..1c956722609c 100644
--- a/packages/SystemUI/res/values-hi/strings.xml
+++ b/packages/SystemUI/res/values-hi/strings.xml
@@ -126,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"देखने के लिए टैप करें"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"स्क्रीन रिकॉर्डिंग सेव करते समय गड़बड़ी हुई"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"स्क्रीन को रिकॉर्ड करने में गड़बड़ी आ रही है"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"इससे &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; का कॉन्टेंट रिकॉर्ड होना बंद हो जाएगा"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"रिकॉर्ड करना बंद करें"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"स्क्रीन शेयर की जा रही है"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"क्या स्क्रीन शेयरिंग बंद करनी है?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"इससे &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; का कॉन्टेंट शेयर होना बंद हो जाएगा"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"स्क्रीन कास्ट की जा रही है"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"शेयर करना बंद करें"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"स्क्रीन कास्ट की जा रही है"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"क्या कास्टिंग बंद करनी है?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"इससे &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; का कॉन्टेंट कास्ट होना बंद हो जाएगा"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
+ <skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
+ <skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"कास्ट करना बंद करें"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"बंद करें"</string>
<string name="issuerecord_title" msgid="286627115110121849">"समस्या का डेटा सेव करने वाला टूल"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"समस्या का डेटा प्रोसेस हो रहा"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"समस्या का डेटा इकट्ठा करने के लिए बैकग्राउंड में जारी गतिविधि की सूचना"</string>
@@ -161,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"समस्या का डेटा सेव करते समय गड़बड़ी हुई"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"समस्या का डेटा सेव करने की प्रोसेस शुरू करते समय गड़बड़ी हुई"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"फ़ुल स्क्रीन मोड पर देखा जा रहा है"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"बंद करने के लिए, स्क्रीन के सबसे ऊपरी हिस्से से नीचे की ओर स्वाइप करें"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"ठीक है"</string>
<string name="accessibility_back" msgid="6530104400086152611">"वापस जाएं"</string>
<string name="accessibility_home" msgid="5430449841237966217">"होम"</string>
@@ -295,6 +303,7 @@
<string name="start_dreams" msgid="9131802557946276718">"स्क्रीन सेवर"</string>
<string name="ethernet_label" msgid="2203544727007463351">"ईथरनेट"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"परेशान न करें"</string>
+ <string name="quick_settings_modes_label" msgid="5407025818652750501">"अहम मोड"</string>
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"ब्लूटूथ"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"कोई भी युग्मित डिवाइस उपलब्ध नहीं"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"किसी डिवाइस को कनेक्ट या डिसकनेक्ट करने के लिए टैप करें"</string>
@@ -306,8 +315,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"सेव किया गया"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"डिसकनेक्ट करें"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"चालू करें"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"ब्लूटूथ कल अपने-आप चालू हो जाएगा"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"क्विक शेयर और Find My Device जैसी सुविधाएं, ब्लूटूथ का इस्तेमाल करती हैं"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"ब्लूटूथ कल सुबह चालू होगा"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"ऑडियो शेयर करें"</string>
@@ -476,8 +484,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"ज़्यादा विजेट जोड़ें"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"विजेट पसंद के मुताबिक बनाने के लिए उसे दबाकर रखें"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"विजेट अपनी पसंद के मुताबिक बनाएं"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"विजेट को पसंद के मुताबिक बनाने के लिए, डिवाइस अनलॉक करें"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"बंद किए गए विजेट के लिए ऐप्लिकेशन आइकॉन"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"इंस्टॉल हो रहे विजेट के लिए ऐप्लिकेशन आइकॉन"</string>
<string name="edit_widget" msgid="9030848101135393954">"विजेट में बदलाव करें"</string>
@@ -496,12 +503,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"विजेट चुनें"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"विजेट हटाएं"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"चुने गए विजेट के लिए जगह चुनें"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"लॉक स्क्रीन विजेट"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"किसी विजेट से कोई ऐप्लिकेशन खोलने के लिए, आपको अपनी पहचान की पुष्टि करनी होगी. ध्यान रखें कि टैबलेट के लॉक होने पर भी कोई व्यक्ति विजेट देख सकता है. ऐसा हो सकता है कि कुछ विजेट लॉक स्क्रीन पर दिखाने के लिए न बने हों. इन्हें लॉक स्क्रीन पर जोड़ना असुरक्षित हो सकता है."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"ठीक है"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"उपयोगकर्ता बदलें"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"पुलडाउन मेन्यू"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"इस सेशन के सभी ऐप्लिकेशन और डेटा को हटा दिया जाएगा."</string>
@@ -723,7 +731,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"डिफ़ॉल्ट"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"अपने-आप"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"आवाज़ या वाइब्रेशन न हो"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"इससे किसी तरह की आवाज़ या वाइब्रेशन नहीं होता और बातचीत, सेक्शन में सबसे नीचे दिखती है"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"डिवाइस की सेटिंग के आधार पर, सूचना आने पर घंटी बज सकती है या वाइब्रेशन हो सकता है"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"डिवाइस की सेटिंग के आधार पर, सूचना आने पर घंटी बज सकती है या वाइब्रेशन हो सकता है. <xliff:g id="APP_NAME">%1$s</xliff:g> पर होने वाली बातचीत, डिफ़ॉल्ट रूप से बबल के तौर पर दिखती है."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"सिस्टम को यह तय करने की अनुमति दें कि इस सूचना के मिलने पर आवाज़ हो या वाइब्रेशन हो"</string>
@@ -780,6 +789,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page Down"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Delete"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1362,20 +1373,18 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"स्प्लिट स्क्रीन"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"इनपुट"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"ऐप शॉर्टकट"</string>
+ <string name="shortcut_helper_category_current_app_shortcuts" msgid="4017840565974573628">"मौजूदा ऐप्लिकेशन"</string>
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"सुलभता"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"कीबोर्ड शॉर्टकट"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"सर्च शॉर्टकट"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"छोटा करने का आइकॉन"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"बड़ा करने का आइकॉन"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"या"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"पीछे जाने का जेस्चर"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"होम स्क्रीन पर जाने का जेस्चर"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"ऐक्शन बटन"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"हो गया"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"बहुत बढ़िया!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"वापस जाएं"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"वापस जाने के लिए, टचपैड पर कहीं भी तीन उंगलियों से बाईं या दाईं तरफ़ स्वाइप करें."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"टचपैड पर तीन उंगलियों को दाईं और बाईं तरफ़ ले जाया जा रहा है"</string>
@@ -1384,4 +1393,5 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"%2$d में से %1$d लेवल"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"होम कंट्रोल"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"स्क्रीनसेवर से तुरंत होम कंट्रोल ऐक्सेस करें"</string>
+ <string name="volume_undo_action" msgid="5815519725211877114">"पहले जैसा करें"</string>
</resources>
diff --git a/packages/SystemUI/res/values-hi/tiles_states_strings.xml b/packages/SystemUI/res/values-hi/tiles_states_strings.xml
index b89eeb3c0f0f..b988d727b85d 100644
--- a/packages/SystemUI/res/values-hi/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-hi/tiles_states_strings.xml
@@ -56,6 +56,11 @@
<item msgid="5376619709702103243">"बंद है"</item>
<item msgid="4875147066469902392">"चालू है"</item>
</string-array>
+ <string-array name="tile_states_modes">
+ <item msgid="7764936419245199023">"उपलब्ध नहीं है"</item>
+ <item msgid="2004750556637773692">"बंद है"</item>
+ <item msgid="8968530753931637871">"चालू है"</item>
+ </string-array>
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"उपलब्ध नहीं है"</item>
<item msgid="5044688398303285224">"बंद है"</item>
diff --git a/packages/SystemUI/res/values-hr/strings.xml b/packages/SystemUI/res/values-hr/strings.xml
index 372363dbda64..fce4ac09ad8c 100644
--- a/packages/SystemUI/res/values-hr/strings.xml
+++ b/packages/SystemUI/res/values-hr/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"Aplikacija <xliff:g id="APPNAME">%1$s</xliff:g> otkrila je ovu snimku zaslona."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> i druge otvorene aplikacije otkrile su ovu snimku zaslona."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Dodaj bilješci"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Uključi vezu"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Snimač zaslona"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Obrada snimanja zaslona"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Tekuća obavijest za sesiju snimanja zaslona"</string>
@@ -127,31 +126,27 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Dodirnite za prikaz"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Pogreška prilikom spremanja snimke zaslona"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Pogreška prilikom pokretanja snimanja zaslona"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
- <skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
- <skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Zaustavit ćete snimanje aplikacije &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
- <skip />
+ <string name="screenrecord_stop_dialog_title" msgid="8716193661764511095">"Želite li zaustaviti snimanje?"</string>
+ <string name="screenrecord_stop_dialog_message" msgid="6262768207331626817">"Trenutačno snimate cijeli zaslon"</string>
+ <string name="screenrecord_stop_dialog_message_specific_app" msgid="5995770227684523244">"Trenutačno snimate aplikaciju <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Zaustavi snimanje"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Dijeljenje zaslona"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
- <skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
- <skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Zaustavit ćete dijeljenje aplikacije &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
- <skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Emitiranje zaslona"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
- <skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
- <skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Zaustavit ćete emitiranje aplikacije &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
- <skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
- <skip />
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Želite li zaustaviti dijeljenje zaslona?"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen_with_host_app" msgid="522823522115375414">"Trenutačno dijelite cijeli zaslon s aplikacijom <xliff:g id="HOST_APP_NAME">%1$s</xliff:g>"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen" msgid="5090115386271179270">"Trenutačno dijelite cijeli zaslon s aplikacijom"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_specific" msgid="5923772039347985172">"Trenutačno dijelite aplikaciju <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g>"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_generic" msgid="6681016774654578261">"Trenutačno dijelite aplikaciju"</string>
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Zaustavi dijeljenje"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Emitiranje zaslona"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Želite li prestati emitirati?"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen_with_device" msgid="1474703115926205251">"Trenutačno emitirate cijeli zaslon na uređaj <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen" msgid="8419219169553867625">"Trenutačno emitirate cijeli zaslon na uređaj u blizini"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app_with_device" msgid="2715934698604085519">"Trenutačno emitirate aplikaciju <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> na uređaj <xliff:g id="DEVICE_NAME">%2$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="8616103075630934513">"Trenutačno emitirate aplikaciju <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> na uređaj u blizini"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic_with_device" msgid="9213582497852420203">"Trenutačno emitirate na uređaj <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic" msgid="4100272100480415076">"Trenutačno emitirate na uređaj u blizini"</string>
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Zaustavi emitiranje"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Zatvori"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Snimač poteškoća"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Obrada snimke poteškoće"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Obavijest o aktivnosti u pozadini za sesiju prikupljanja poteškoća"</string>
@@ -162,8 +157,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Pogreška pri spremanju snimke poteškoće"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Pogreška pri pokretanju snimke poteškoće"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Gledanje preko cijelog zaslona"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Za izlaz povucite prstom od vrha zaslona prema dolje"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"Shvaćam"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Natrag"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Početna"</string>
@@ -196,8 +190,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Otključano pomoću lica. Pritisnite da biste nastavili."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Lice je prepoznato. Pritisnite da biste nastavili."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Lice je prepoznato. Pritisnite ikonu otključavanja da biste nastavili."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Otključano licem. Dodirnite za nastavak."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Autentifikacija izvršena"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Otkaži autentifikaciju"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Više opcija"</string>
@@ -297,6 +290,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Čuvar zaslona"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Ne uznemiravaj"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Upareni uređaji nisu dostupni"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Dodirnite da biste povezali uređaj ili prekinuli vezu s njim"</string>
@@ -308,8 +303,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Spremljeno"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"prekini vezu"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"aktiviraj"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Automatski uključi sutra"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Značajke kao što su brzo dijeljenje i Pronađi moj uređaj koriste Bluetooth"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bluetooth će se uključiti sutra ujutro"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Dijeli zvuk"</string>
@@ -478,8 +472,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Dodavanje još widgeta"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Dugo pritisnite za prilagodbu widgeta"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Prilagodi widgete"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Otključajte da biste prilagodili widgete"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Ikona aplikacije za onemogućeni widget"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Ikona aplikacije za widget koji se instalira"</string>
<string name="edit_widget" msgid="9030848101135393954">"Uredi widget"</string>
@@ -498,12 +491,11 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"odaberi widget"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"ukloni widget"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"postavi odabrani widget"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
- <skip />
+ <string name="communal_widget_picker_title" msgid="1953369090475731663">"Widgeti zaključanog zaslona"</string>
+ <string name="communal_widget_picker_description" msgid="490515450110487871">"Svi vide widgete na vašem zaključanom zaslonu, čak i ako je tablet zaključan."</string>
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Widgeti na zaključanom zaslonu"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Da biste otvorili aplikaciju pomoću widgeta, trebate potvrditi da ste to vi. Također napominjemo da ih svatko može vidjeti, čak i ako je vaš tablet zaključan. Neki widgeti možda nisu namijenjeni za zaključani zaslon, pa ih možda nije sigurno dodati ovdje."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"Shvaćam"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Promjena korisnika"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"padajući izbornik"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Izbrisat će se sve aplikacije i podaci u ovoj sesiji."</string>
@@ -725,7 +717,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Zadano"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Automatski"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Bez zvuka ili vibracije"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Bez zvuka ili vibracije i prikazuje se pri dnu odjeljka razgovora"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Može zvoniti ili vibrirati ovisno o postavkama uređaja"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Možda će zvoniti ili vibrirati, ovisno o postavkama uređaja. Razgovori iz aplikacije <xliff:g id="APP_NAME">%1$s</xliff:g> prikazuju se u oblačiću prema zadanim postavkama."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Neka sustav odredi treba li obavijest najaviti zvukom ili vibracijom"</string>
@@ -782,6 +775,7 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Stranica prema gore"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Stranica prema dolje"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Izbriši"</string>
+ <string name="keyboard_key_esc" msgid="6230365950511411322">"Esc"</string>
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Početak"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"Kraj"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Umetni"</string>
@@ -1364,20 +1358,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Podijeljeni zaslon"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Unos"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Prečaci aplikacija"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Pristupačnost"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Tipkovni prečaci"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Prečaci za pretraživanje"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Ikona za sažimanje"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Ikona za proširivanje"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"ili"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Pokret za povratak"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Pokret za otvaranje početnog zaslona"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Tipka za radnju"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Gotovo"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Sjajno!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Natrag"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Za povratak trima prstima prijeđite ulijevo ili udesno bilo gdje na dodirnoj podlozi."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Dodirna podloga prikazuje tri prsta koji se kreću udesno i ulijevo"</string>
@@ -1386,4 +1379,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Razina %1$d od %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Upravljanje uređajima"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Brzo upravljajte uređajima putem čuvara zaslona"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-hr/tiles_states_strings.xml b/packages/SystemUI/res/values-hr/tiles_states_strings.xml
index df0b78664cba..6833c27c4208 100644
--- a/packages/SystemUI/res/values-hr/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-hr/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Isključeno"</item>
<item msgid="4875147066469902392">"Uključeno"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Nedostupno"</item>
<item msgid="5044688398303285224">"Isključeno"</item>
diff --git a/packages/SystemUI/res/values-hu/strings.xml b/packages/SystemUI/res/values-hu/strings.xml
index 7c6566fdfb9b..f59622c83c22 100644
--- a/packages/SystemUI/res/values-hu/strings.xml
+++ b/packages/SystemUI/res/values-hu/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"A(z) <xliff:g id="APPNAME">%1$s</xliff:g> észlelte ezt a képernyőképet."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"A(z) <xliff:g id="APPNAME">%1$s</xliff:g> és más nyitott alkalmazások észlelték ezt a képernyőképet."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Hozzáadás jegyzethez"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Linkkel együtt"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Képernyőrögzítő"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Képernyőrögzítés feldolgozása"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Folyamatban lévő értesítés képernyőrögzítési munkamenethez"</string>
@@ -127,33 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Koppintson a megtekintéshez"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Hiba történt a képernyőrögzítés mentése során"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Hiba a képernyőrögzítés indításakor"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
+ <skip />
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Le fogja állítani a(z) &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; rögzítését"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Felvétel leállítása"</string>
+ <string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Képernyő megosztása…"</string>
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Leállítja a képernyőmegosztást?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
<skip />
- <!-- no translation found for share_to_app_chip_accessibility_label (4210256229976947065) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Le fogja állítani a(z) &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; megosztását"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Megosztás leállítása"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Képernyőtartalom átküldése…"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Leállítja az átküldést?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <!-- no translation found for cast_to_other_device_chip_accessibility_label (1680650146639059938) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Le fogja állítani a(z) &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; átküldését"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
<skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Átküldés leállítása"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Bezárás"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Problémafelvevő"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Problémafelvétel feldolgozása…"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Folyamatban lévő értesítés egy problémagyűjtési munkamenethez"</string>
@@ -164,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Hiba történt a problémafelvétel mentésekor"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Hiba történt a problémafelvétel elindításakor"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Megtekintése teljes képernyőn"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"A kilépéshez csúsztasson gyorsan lefelé a képernyő tetejéről."</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"Értem"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Vissza"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Főoldal"</string>
@@ -198,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Zárolás arccal feloldva. Koppintson a folytatáshoz."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Arc felismerve. Koppintson a folytatáshoz."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Arc felismerve. A folytatáshoz koppintson a Feloldásra."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Zárolás arccal feloldva. Koppintson a folytatáshoz."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Hitelesítve"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Hitelesítés megszakítása"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"További lehetőségek"</string>
@@ -299,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Képernyővédő"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Ne zavarjanak"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Nem áll rendelkezésre párosított eszköz"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Koppintson egy eszköz csatlakoztatásához vagy leválasztásához"</string>
@@ -310,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Mentve"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"leválasztás"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"aktiválás"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Automatikus bekapcsolás holnap"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Egyes funkciók (például a Quick Share és a Készülékkereső) Bluetootht használnak"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"A Bluetooth holnap reggel bekapcsol"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Hang megosztása"</string>
@@ -480,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"További modulok hozzáadása"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Nyomja meg hosszan a modulok személyre szabásához"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Modulok személyre szabása"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"A feloldással személyre szabhatja a modulokat"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Letiltott modul alkalmazásikonja"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Folyamatban van egy modul alkalmazásikonjának telepítése"</string>
<string name="edit_widget" msgid="9030848101135393954">"Modul szerkesztése"</string>
@@ -500,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"modul kiválasztása"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"modul törlése"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"kijelölt modul áthelyezése"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"A lezárási képernyő moduljai"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Ha modul használatával szeretne megnyitni egy alkalmazást, igazolnia kell a személyazonosságát. Ne felejtse továbbá, hogy bárki megtekintheti a modulokat, még akkor is, amikor zárolva van a táblagép. Előfordulhat, hogy bizonyos modulokat nem a lezárási képernyőn való használatra terveztek, ezért nem biztonságos a hozzáadásuk."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"Értem"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Felhasználóváltás"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"lehúzható menü"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"A munkamenetben található összes alkalmazás és adat törlődni fog."</string>
@@ -727,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Alapértelmezett"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Automatikus"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Nincs hang és rezgés"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Nincs hang és rezgés, továbbá lejjebb jelenik meg a beszélgetések szakaszában"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Az eszközbeállítások alapján csöröghet és rezeghet"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Az eszközbeállítások alapján csöröghet és rezeghet. A(z) <xliff:g id="APP_NAME">%1$s</xliff:g> alkalmazásban lévő beszélgetések alapértelmezés szerint buborékban jelennek meg."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"A rendszer határozza meg, hogy ez az értesítés adjon-e ki hangot, illetve rezegjen-e"</string>
@@ -784,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page Down"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Delete"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Kezdőképernyő"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1359,31 +1367,26 @@
<string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"Használatban a következő által: <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string>
<string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"Legutóbb használta: <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string>
<string name="shortcut_helper_category_system" msgid="462110876978937359">"Rendszer"</string>
- <!-- no translation found for shortcut_helper_category_system_controls (3153344561395751020) -->
- <skip />
- <!-- no translation found for shortcut_helper_category_system_apps (6001757545472556810) -->
- <skip />
+ <string name="shortcut_helper_category_system_controls" msgid="3153344561395751020">"Rendszervezérlők"</string>
+ <string name="shortcut_helper_category_system_apps" msgid="6001757545472556810">"Rendszeralkalmazások"</string>
<string name="shortcut_helper_category_multitasking" msgid="7413381961404090136">"Multitasking"</string>
- <!-- no translation found for shortcutHelper_category_recent_apps (7918731953612377145) -->
- <skip />
- <!-- no translation found for shortcutHelper_category_split_screen (1159669813444812244) -->
- <skip />
+ <string name="shortcutHelper_category_recent_apps" msgid="7918731953612377145">"Legutóbbi alkalmazások"</string>
+ <string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Osztott képernyő"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Bevitel"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Alkalmazás-parancsikonok"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Kisegítő lehetőségek"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Billentyűparancsok"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Billentyűparancsok keresése"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Összecsukás ikon"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Kibontás ikon"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"vagy"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Vissza kézmozdulat"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Kezdőképernyő kézmozdulat"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Műveletbillentyű"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Kész"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Kiváló!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Vissza"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"A visszalépéshez csúsztasson három ujjal gyorsan balra vagy a jobbra az érintőpad tetszőleges területén."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Három, jobbra és balra mozgó ujjat ábrázoló érintőpad"</string>
@@ -1392,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Fényerő: %2$d/%1$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Otthon vezérlése"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Gyorsan vezérelheti otthonát képernyőkímélővel"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-hu/tiles_states_strings.xml b/packages/SystemUI/res/values-hu/tiles_states_strings.xml
index bbd6bc0ebbbb..6b54c5261fb4 100644
--- a/packages/SystemUI/res/values-hu/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-hu/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Ki"</item>
<item msgid="4875147066469902392">"Be"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Nem áll rendelkezésre"</item>
<item msgid="5044688398303285224">"Ki"</item>
diff --git a/packages/SystemUI/res/values-hy/strings.xml b/packages/SystemUI/res/values-hy/strings.xml
index b00328a3b260..2be9a3ce23c7 100644
--- a/packages/SystemUI/res/values-hy/strings.xml
+++ b/packages/SystemUI/res/values-hy/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> հավելվածը հայտնաբերել է այս սքրինշոթը։"</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g>-ն ու բացված այլ հավելվածներ հայտնաբերել են այս սքրինշոթը։"</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Ավելացնել նշմանը"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Ներառել հղումը"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Էկրանի տեսագրում"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Էկրանի տեսագրության մշակում"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Էկրանի տեսագրման աշխատաշրջանի ընթացիկ ծանուցում"</string>
@@ -127,31 +126,27 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Հպեք՝ դիտելու համար"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Չհաջողվեց պահել էկրանի տեսագրությունը"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Չհաջողվեց սկսել տեսագրումը"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
- <skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
- <skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Դուք կկանգնեցնեք &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; հավելվածից բովանդակության տեսագրումը"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
- <skip />
+ <string name="screenrecord_stop_dialog_title" msgid="8716193661764511095">"Կանգնեցնե՞լ ձայնագրումը"</string>
+ <string name="screenrecord_stop_dialog_message" msgid="6262768207331626817">"Դուք ներկայումս ձայնագրում եք ձեր ամբողջ էկրանը"</string>
+ <string name="screenrecord_stop_dialog_message_specific_app" msgid="5995770227684523244">"Դուք ներկայումս ձայնագրում եք <xliff:g id="APP_NAME">%1$s</xliff:g> հավելվածը"</string>
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Կանգնեցնել տեսագրումը"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Միացված է էկրանի ցուցադրումը"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
- <skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
- <skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Դուք կկանգնեցնեք &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; հավելվածից բովանդակության փոխանցումը"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
- <skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Էկրանի հեռարձակում"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
- <skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
- <skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Դուք կկանգնեցնեք &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; հավելվածից բովանդակության հեռարձակումը"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
- <skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
- <skip />
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Դադարեցնե՞լ էկրանի ցուցադրումը"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen_with_host_app" msgid="522823522115375414">"Դուք ներկայումս կիսվում եք ձեր էկրանով <xliff:g id="HOST_APP_NAME">%1$s</xliff:g> հավելվածի հետ"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen" msgid="5090115386271179270">"Դուք ներկայումս կիսվում եք ձեր էկրանով հավելվածի հետ"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_specific" msgid="5923772039347985172">"Դուք ներկայումս կիսվում եք <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> հավելվածով"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_generic" msgid="6681016774654578261">"Դուք ներկայումս կիսվում եք հավելվածով"</string>
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Դադարեցնել էկրանի ցուցադրումը"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Էկրանի հեռարձակում"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Կանգնեցնե՞լ հեռարձակումը"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen_with_device" msgid="1474703115926205251">"Դուք ներկայումս հեռարձակում եք ձեր ամբողջ էկրանը <xliff:g id="DEVICE_NAME">%1$s</xliff:g> սարքին"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen" msgid="8419219169553867625">"Դուք ներկայումս հեռարձակում եք ձեր ամբողջ էկրանը մոտակա սարքին"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app_with_device" msgid="2715934698604085519">"Դուք ներկայումս հեռարձակում եք <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> հավելվածը <xliff:g id="DEVICE_NAME">%2$s</xliff:g> սարքին"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="8616103075630934513">"Դուք ներկայումս հեռարձակում եք <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> հավելվածը մոտակա սարքին"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic_with_device" msgid="9213582497852420203">"Դուք ներկայումս հեռարձակում եք <xliff:g id="DEVICE_NAME">%1$s</xliff:g> սարքին"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic" msgid="4100272100480415076">"Դուք ներկայումս հեռարձակում եք մոտակա սարքին"</string>
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Դադարեցնել հեռարձակումը"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Փակել"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Խնդիրների տեսագրիչ"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Մշակում ենք տեսագրությունը"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Խնդրի տեսագրման մասին ընթացիկ ծանուցում"</string>
@@ -162,8 +157,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Չհաջողվեց պահել տեսագրությունը"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Չհաջողվեց սկսել տեսագրումը"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Լիաէկրան դիտակերպ"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Դուրս գալու համար էկրանի վերևից մատը սահեցրեք ներքև"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"Եղավ"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Հետ"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Տուն"</string>
@@ -196,8 +190,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Ապակողպվել է դեմքով։ Սեղմեք շարունակելու համար։"</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Դեմքը ճանաչվեց։ Սեղմեք շարունակելու համար։"</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Դեմքը ճանաչվեց։ Սեղմեք ապակողպման պատկերակը։"</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Ապակողպվել է դեմքով։ Հպեք շարունակելու համար:"</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Նույնականացված է"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Չեղարկել իսկորոշումը"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Լրացուցիչ ընտրանքներ"</string>
@@ -297,6 +290,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Էկրանապահ"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Չանհանգստացնել"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Զուգակցված սարքեր չկան"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Հպեք՝ սարք միացնելու կամ անջատելու համար"</string>
@@ -308,8 +303,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Պահված է"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"անջատել"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"ակտիվացնել"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Ավտոմատ միացնել վաղը"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Bluetooth-ն օգտագործում են, օրինակ, Quick Share և «Գտնել իմ սարքը» գործառույթները"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bluetooth-ը կմիանա վաղն առավոտյան"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Փոխանցել աուդիո"</string>
@@ -478,8 +472,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Ավելացնել վիջեթներ"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Երկար սեղմեք՝ վիջեթները հարմարեցնելու համար"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Հարմարեցնել վիջեթները"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Ապակողպեք՝ վիջեթներն անհատականացնելու համար"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Հավելվածի պատկերակ անջատված վիջեթի համար"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Տեղադրվող վիջեթի հավելվածի պատկերակ"</string>
<string name="edit_widget" msgid="9030848101135393954">"Փոփոխել վիջեթը"</string>
@@ -498,12 +491,11 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"ընտրել վիջեթ"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"հեռացնել վիջեթը"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"տեղադրել ընտրված վիջեթը"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
- <skip />
+ <string name="communal_widget_picker_title" msgid="1953369090475731663">"Կողպէկրանի վիջեթներ"</string>
+ <string name="communal_widget_picker_description" msgid="490515450110487871">"Բոլորը կարող են դիտել ձեր կողպէկրանի վիջեթները, նույնիսկ եթե պլանշետը կողպված է"</string>
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Կողպէկրանի վիջեթներ"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Վիջեթի միջոցով հավելված բացելու համար դուք պետք է հաստատեք ձեր ինքնությունը։ Նաև նկատի ունեցեք, որ ցանկացած ոք կարող է դիտել վիջեթները, նույնիսկ երբ ձեր պլանշետը կողպված է։ Որոշ վիջեթներ կարող են նախատեսված չլինել ձեր կողպէկրանի համար, և այստեղ դրանց ավելացնելը կարող է վտանգավոր լինել։"</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"Եղավ"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Անջատել օգտվողին"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"իջնող ընտրացանկ"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Այս աշխատաշրջանի բոլոր հավելվածներն ու տվյալները կջնջվեն:"</string>
@@ -725,7 +717,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Կանխադրված"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Ավտոմատ"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Առանց ձայնի կամ թրթռոցի"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Առանց ձայնի և թրթռոցի, հայտնվում է զրույցների ցանկի ներքևում"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Կարող է զնգալ կամ թրթռալ՝ կախված սարքի կարգավորումներից"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Կարող է զնգալ կամ թրթռալ՝ կախված սարքի կարգավորումներից։ <xliff:g id="APP_NAME">%1$s</xliff:g>-ի զրույցներն ըստ կանխադրման հայտնվում են ամպիկների տեսքով։"</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Թող համակարգն ավտոմատ որոշի՝ արդյոք այս ծանուցումը ձայնով, թե թրթռոցով է պետք մատուցել"</string>
@@ -782,6 +775,7 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page down"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Ջնջել"</string>
+ <string name="keyboard_key_esc" msgid="6230365950511411322">"Esc"</string>
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Գլխավոր էջ"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"Վերջ"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Տեղադրել"</string>
@@ -1364,20 +1358,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Տրոհված էկրան"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Ներածում"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Հավելվածի դյուրանցումներ"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Հատուկ գործառույթներ"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Ստեղնային դյուրանցումներ"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Դյուրանցումների որոնում"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Ծալել պատկերակը"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Ծավալել պատկերակը"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"կամ"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"«Հետ» ժեստ"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Հիմնական էկրան անցնելու ժեստ"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Գործողության ստեղն"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Պատրաստ է"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Կեցցե՛ք"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Հետ գնալ"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Հետ գնալու համար հպահարթակի վրա երեք մատով սահեցրեք ձախ կամ աջ։"</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Երեք մատները աջ ու ձախ են շարժվում հպահարթակի վրա"</string>
@@ -1386,4 +1379,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"%1$d՝ %2$d-ից"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Տան կառավարման տարրեր"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Տան կառավարման տարրերը դարձրեք էկրանապահ"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-hy/tiles_states_strings.xml b/packages/SystemUI/res/values-hy/tiles_states_strings.xml
index eb77ccf8c1fc..248840eddf5e 100644
--- a/packages/SystemUI/res/values-hy/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-hy/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Անջատված է"</item>
<item msgid="4875147066469902392">"Միացված է"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Հասանելի չէ"</item>
<item msgid="5044688398303285224">"Անջատված է"</item>
diff --git a/packages/SystemUI/res/values-in/strings.xml b/packages/SystemUI/res/values-in/strings.xml
index b2352363826c..8f5ecfaff37f 100644
--- a/packages/SystemUI/res/values-in/strings.xml
+++ b/packages/SystemUI/res/values-in/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> mendeteksi screenshot ini."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> dan aplikasi terbuka lainnya mendeteksi screenshot ini."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Tambahkan ke catatan"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Sertakan link"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Perekam Layar"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Memproses perekaman layar"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Notifikasi yang sedang berjalan untuk sesi rekaman layar"</string>
@@ -127,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Ketuk untuk melihat"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Terjadi error saat menyimpan rekaman layar"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Terjadi error saat memulai perekaman layar"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Anda akan berhenti merekam &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Berhenti merekam"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Membagikan layar"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Hentikan berbagi layar?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Anda akan berhenti membagikan &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Berhenti berbagi"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Mentransmisikan layar"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Hentikan transmisi?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Mentransmisikan layar"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Anda akan berhenti mentransmisikan &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Hentikan transmisi"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Tutup"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Perekam Masalah"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Memproses rekaman masalah"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Notifikasi berkelanjutan untuk sesi pengumpulan masalah"</string>
@@ -162,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Terjadi error saat menyimpan rekaman masalah"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Terjadi error saat memulai perekaman masalah"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Melihat layar penuh"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Untuk keluar, geser ke bawah dari bagian atas layar"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"Oke"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Kembali"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Utama"</string>
@@ -196,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Kunci dibuka dengan wajah. Tekan untuk melanjutkan."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Wajah dikenali. Tekan untuk melanjutkan."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Wajah dikenali. Tekan ikon buka kunci untuk melanjutkan."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Kunci dibuka dengan wajah. Ketuk untuk melanjutkan."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Diautentikasi"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Batalkan Autentikasi"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Opsi Lainnya"</string>
@@ -297,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Screensaver"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Jangan Ganggu"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Perangkat yang disandingkan tak tersedia"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Ketuk untuk memulai atau menghentikan koneksi perangkat"</string>
@@ -308,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Disimpan"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"putuskan koneksi"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"aktifkan"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Aktifkan otomatis besok"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Fitur seperti Quick Share dan Temukan Perangkat Saya menggunakan Bluetooth"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bluetooth akan dinyalakan besok pagi"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Bagikan audio"</string>
@@ -478,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Tambahkan widget lainnya"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Tekan lama untuk menyesuaikan widget"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Sesuaikan widget"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Buka kunci untuk menyesuaikan widget"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Ikon aplikasi untuk widget yang dinonaktifkan"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Ikon aplikasi untuk widget yang sedang diinstal"</string>
<string name="edit_widget" msgid="9030848101135393954">"Edit widget"</string>
@@ -498,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"pilih widget"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"hapus widget"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"letakkan widget yang dipilih"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Widget layar kunci"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Untuk membuka aplikasi menggunakan widget, Anda perlu memverifikasi diri Anda. Selain itu, harap ingat bahwa siapa saja dapat melihatnya, bahkan saat tablet Anda terkunci. Beberapa widget mungkin tidak dirancang untuk layar kunci Anda dan mungkin tidak aman untuk ditambahkan di sini."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"Oke"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Beralih pengguna"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"menu pulldown"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Semua aplikasi dan data dalam sesi ini akan dihapus."</string>
@@ -725,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Default"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Otomatis"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Tidak ada suara atau getaran"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Tidak ada suara atau getaran dan ditampilkan lebih rendah di bagian percakapan"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Dapat berdering atau bergetar berdasarkan setelan perangkat"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Dapat berdering atau bergetar berdasarkan setelan perangkat. Percakapan <xliff:g id="APP_NAME">%1$s</xliff:g> ditampilkan sebagai balon secara default."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Biarkan sistem menentukan apakah notifikasi ini akan berbunyi atau bergetar"</string>
@@ -782,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page Down"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Delete"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1364,20 +1374,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Layar terpisah"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Input"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Pintasan aplikasi"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Aksesibilitas"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Pintasan keyboard"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Pintasan penelusuran"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Ikon ciutkan"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Ikon luaskan"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"atau"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Gestur kembali"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Gestur layar utama"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Tombol tindakan"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Selesai"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Bagus!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Kembali"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Untuk kembali, geser ke kiri atau ke kanan menggunakan tiga jari ke mana saja di touchpad."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Touchpad menampilkan tiga jari yang bergerak ke kanan dan ke kiri"</string>
@@ -1386,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Tingkat %1$d dari %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Kontrol Rumah"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Akses cepat kontrol rumah Anda sebagai screensaver"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-in/tiles_states_strings.xml b/packages/SystemUI/res/values-in/tiles_states_strings.xml
index a415f644fb48..de505ca7eb60 100644
--- a/packages/SystemUI/res/values-in/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-in/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Nonaktif"</item>
<item msgid="4875147066469902392">"Aktif"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Tidak tersedia"</item>
<item msgid="5044688398303285224">"Mati"</item>
diff --git a/packages/SystemUI/res/values-is/strings.xml b/packages/SystemUI/res/values-is/strings.xml
index ff5f3b8e759a..c47475be33c0 100644
--- a/packages/SystemUI/res/values-is/strings.xml
+++ b/packages/SystemUI/res/values-is/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> greindi skjámyndina."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> og önnur opin forrit greindu skjámyndina."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Bæta við glósu"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Hafa tengil með"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Skjáupptaka"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Vinnur úr skjáupptöku"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Áframhaldandi tilkynning fyrir skjáupptökulotu"</string>
@@ -127,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Ýttu til að skoða"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Villa við að vista skjáupptöku"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Villa við að hefja upptöku skjás"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Þú munt hætta upptöku úr &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Stöðva upptöku"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Deilir skjá"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Hætta að deila skjá?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Þú munt hætta að deila úr &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Hætta að deila"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Varpar skjá"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Hætta að varpa?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Varpar skjá"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Þú munt hætta vörpun úr &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Hætta að varpa"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Loka"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Upptökutæki fyrir vandamál"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Vinnur úr upptöku af vandamáli"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Áframhaldandi tilkynning fyrir lotu vandamálasafns"</string>
@@ -162,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Villa kom upp við að vista upptöku af vandamáli"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Villa kom upp við að hefja upptöku af vandamáli"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Notar allan skjáinn"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Strjúktu niður frá efsta hluta skjásins til að hætta"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"Ég skil"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Til baka"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Heim"</string>
@@ -196,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Opnað með andliti. Ýttu til að halda áfram."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Andlitið var greint. Ýttu til að halda áfram."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Andlitið var greint. Ýttu á opnunartáknið til að halda áfr."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Opnað með andliti. Ýttu til að halda áfram."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Auðkennt"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Hætta við auðkenningu"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Fleiri valkostir"</string>
@@ -297,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Skjávari"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Ónáðið ekki"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Engin pöruð tæki til staðar"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Ýttu til að tengja eða aftengja tæki"</string>
@@ -308,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Vistað"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"aftengja"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"virkja"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Kveikja sjálfkrafa á morgun"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Eiginleikar eins og Flýtideiling og Finna tækið mitt nota Bluetooth"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Kveikt verður á Bluetooth í fyrramálið"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Deila hljóði"</string>
@@ -478,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Bæta við fleiri græjum"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Haltu inni til að sérsníða græjur"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Sérsníða græjur"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Opnaðu til að sérsníða græjur"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Forritstákn fyrir græju sem slökkt er á"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Forritatákn fyrir græju sem verið er að setja upp"</string>
<string name="edit_widget" msgid="9030848101135393954">"Breyta græju"</string>
@@ -498,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"velja græju"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"fjarlægja græju"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"koma valinni græju fyrir"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Græjur fyrir lásskjá"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Þú þarft að staðfesta að þetta sért þú til að geta opnað forrit með græju. Hafðu einnig í huga að hver sem er getur skoðað þær, jafnvel þótt spjaldtölvan sé læst. Sumar græjur eru hugsanlega ekki ætlaðar fyrir lásskjá og því gæti verið óöruggt að bæta þeim við hér."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"Ég skil"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Skipta um notanda"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"Fellivalmynd"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Öllum forritum og gögnum í þessari lotu verður eytt."</string>
@@ -557,7 +564,7 @@
<string name="media_projection_action_text" msgid="3634906766918186440">"Byrja núna"</string>
<string name="empty_shade_text" msgid="8935967157319717412">"Engar tilkynningar"</string>
<string name="no_unseen_notif_text" msgid="395512586119868682">"Engar nýjar tilkynningar"</string>
- <string name="adaptive_notification_edu_hun_title" msgid="5720882373252389461">"Kveikt er á breytilegum tilkynningum"</string>
+ <string name="adaptive_notification_edu_hun_title" msgid="5720882373252389461">"Kveikt á breytil. tilkynningum"</string>
<string name="adaptive_notification_edu_hun_text" msgid="4260536236101821273">"Tækið þitt lækkar nú hljóðstyrkinn og fækkar sprettigluggum á skjánum í allt að tvær mínútur þegar þú færð margar tilkynningar á stuttum tíma."</string>
<string name="go_to_adaptive_notification_settings" msgid="2423690125178298479">"Slökkva"</string>
<string name="unlock_to_see_notif_text" msgid="7439033907167561227">"Taktu úr lás til að sjá eldri tilkynningar"</string>
@@ -725,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Sjálfgefið"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Sjálfvirk"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Ekkert hljóð eða titringur"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Ekkert hljóð eða titringur og birtist neðar í samtalshluta"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Gæti hringt eða titrað en það fer eftir stillingum tækisins"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Gæti hringt eða titrað en það fer eftir stillingum tækisins. Samtöl frá <xliff:g id="APP_NAME">%1$s</xliff:g> birtast sjálfkrafa í blöðru."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Láta kerfið ákvarða hvort hljóð eða titringur fylgir þessari tilkynningu"</string>
@@ -782,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page Down"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Delete"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1364,20 +1374,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Skjáskipting"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Inntak"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Flýtileiðir forrita"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Aðgengi"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Flýtilyklar"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Leitarflýtileiðir"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Minnka tákn"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Stækka tákn"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"eða"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Bending til að fara til baka"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Bending til að fara á upphafsskjá"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Aðgerðalykill"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Lokið"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Vel gert!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Til baka"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Strjúktu til vinstri eða hægri með þrem fingrum hvar sem er á snertifletinum til að fara til baka."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Snertiflötur sem sýnir þrjá fingur færast til hægri og vinstri"</string>
@@ -1386,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Stig %1$d af %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Heimastýringar"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Fáðu skjótan aðgang að heimastýringum sem skjávara"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-is/tiles_states_strings.xml b/packages/SystemUI/res/values-is/tiles_states_strings.xml
index c9befd6574c4..ee3b3116433c 100644
--- a/packages/SystemUI/res/values-is/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-is/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Slökkt"</item>
<item msgid="4875147066469902392">"Kveikt"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Ekki í boði"</item>
<item msgid="5044688398303285224">"Slökkt"</item>
diff --git a/packages/SystemUI/res/values-it/strings.xml b/packages/SystemUI/res/values-it/strings.xml
index 90d55f70a23b..1cfc8d4dd7d6 100644
--- a/packages/SystemUI/res/values-it/strings.xml
+++ b/packages/SystemUI/res/values-it/strings.xml
@@ -126,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Tocca per visualizzare"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Errore durante il salvataggio della registrazione dello schermo"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Errore durante l\'avvio della registrazione dello schermo"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Interromperai la registrazione di &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Interrompi registrazione"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Condivisione dello schermo in corso"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Vuoi interrompere la condivisione dello schermo?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Interromperai la condivisione di &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Trasmissione dello schermo attiva"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Interrompi condivisione"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Trasmissione dello schermo in corso…"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Vuoi interrompere la trasmissione?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Interromperai la trasmissione di &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
+ <skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
+ <skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Interrompi trasmissione"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Chiudi"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Registratore dei problemi"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Elaborazione registrazione…"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Notifica continua per una sessione di raccolta di problemi"</string>
@@ -161,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Impossibile salvare la registrazione del problema"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Impossibile avviare la registrazione del problema"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Visualizzazione a schermo intero"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Per uscire, scorri verso il basso dalla parte superiore dello schermo"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"OK"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Indietro"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Home"</string>
@@ -295,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Salvaschermo"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Non disturbare"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Nessun dispositivo accoppiato disponibile"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Tocca per connettere o disconnettere un dispositivo"</string>
@@ -306,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Dispositivo salvato"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"disconnetti"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"attiva"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Attiva automaticamente domani"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Funzionalità come Quick Share e Trova il mio dispositivo usano il Bluetooth"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Il Bluetooth verrà attivato domani mattina"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Condividi audio"</string>
@@ -320,7 +329,7 @@
<string name="quick_settings_bluetooth_secondary_label_transient" msgid="3882884317600669650">"Attivazione…"</string>
<string name="quick_settings_rotation_unlocked_label" msgid="2359922767950346112">"Rotazione automatica"</string>
<string name="accessibility_quick_settings_rotation" msgid="4800050198392260738">"Rotazione automatica dello schermo"</string>
- <string name="quick_settings_location_label" msgid="2621868789013389163">"Geolocalizzazione"</string>
+ <string name="quick_settings_location_label" msgid="2621868789013389163">"Posizione"</string>
<string name="quick_settings_screensaver_label" msgid="1495003469366524120">"Salvaschermo"</string>
<string name="quick_settings_camera_label" msgid="5612076679385269339">"Accesso alla fotocamera"</string>
<string name="quick_settings_mic_label" msgid="8392773746295266375">"Accesso al microfono"</string>
@@ -476,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Aggiungi altri widget"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Premi a lungo per personalizzare i widget"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Personalizza widget"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Sblocca per personalizzare i widget"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Icona dell\'app per widget disattivati"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Icona dell\'app per un widget in fase di installazione"</string>
<string name="edit_widget" msgid="9030848101135393954">"Modifica widget"</string>
@@ -496,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"seleziona widget"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"rimuovi widget"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"posiziona il widget selezionato"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Widget della schermata di blocco"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Per aprire un\'app utilizzando un widget, dovrai verificare la tua identità. Inoltre tieni presente che chiunque può vederlo, anche quando il tablet è bloccato. Alcuni widget potrebbero non essere stati progettati per la schermata di blocco e potrebbe non essere sicuro aggiungerli qui."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"Ok"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Cambio utente"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"menu a discesa"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Tutte le app e i dati di questa sessione verranno eliminati."</string>
@@ -723,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Modalità predefinita"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Automatico"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Nessun suono o vibrazione"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Nessun suono o vibrazione e appare più in basso nella sezione delle conversazioni"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Potrebbero essere attivati lo squillo o la vibrazione in base alle impostazioni del dispositivo"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Potrebbero essere attivati lo squillo o la vibrazione in base alle impostazioni del dispositivo. Conversazioni dalla bolla <xliff:g id="APP_NAME">%1$s</xliff:g> per impostaz. predefinita."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Fai stabilire al sistema se questa notifica deve emettere suoni o vibrazioni"</string>
@@ -780,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Pagina su"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Pagina giù"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Elimina"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home page"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"Fine"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"INS"</string>
@@ -1362,20 +1374,18 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Schermo diviso"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Input"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Scorciatoie app"</string>
+ <string name="shortcut_helper_category_current_app_shortcuts" msgid="4017840565974573628">"App corrente"</string>
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Accessibilità"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Scorciatoie da tastiera"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Scorciatoie per la ricerca"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Icona Comprimi"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Icona Espandi"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"oppure"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Gesto Indietro"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Gesto Home"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Tasto azione"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Fine"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Ottimo lavoro"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Indietro"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Per tornare indietro, scorri verso sinistra o verso destra utilizzando tre dita in un punto qualsiasi del touchpad."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Touchpad che mostra tre dita che si muovono verso destra e sinistra"</string>
@@ -1384,4 +1394,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Livello %1$d di %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Controlli della casa"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Accedi rapidamente ai controlli della casa dal salvaschermo"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-it/tiles_states_strings.xml b/packages/SystemUI/res/values-it/tiles_states_strings.xml
index 2fd4f6d49aef..e7c626f648af 100644
--- a/packages/SystemUI/res/values-it/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-it/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Off"</item>
<item msgid="4875147066469902392">"On"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Non disponibile"</item>
<item msgid="5044688398303285224">"Off"</item>
diff --git a/packages/SystemUI/res/values-iw/strings.xml b/packages/SystemUI/res/values-iw/strings.xml
index c5940805961e..2ff5f83a4f94 100644
--- a/packages/SystemUI/res/values-iw/strings.xml
+++ b/packages/SystemUI/res/values-iw/strings.xml
@@ -126,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"יש להקיש כדי להציג"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"שגיאה בשמירה של הקלטת המסך"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"שגיאה בהפעלה של הקלטת המסך"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"‏ההקלטה של &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; תיפסק"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"הפסקת ההקלטה"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"שיתוף המסך מתבצע"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"להפסיק את שיתוף המסך?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"‏השיתוף של &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; יופסק"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"‏הפעלת Cast של המסך מתבצעת"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"הפסקת השיתוף"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"‏הפעלת Cast של המסך מתבצעת"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"‏להפסיק את הפעלת ה-Cast?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"‏הפעלת ה-Cast‏ של &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; תיפסק"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
+ <skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
+ <skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"‏הפסקת ה-Cast"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"סגירה"</string>
<string name="issuerecord_title" msgid="286627115110121849">"בעיה במכשיר ההקלטה"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"מתבצע עיבוד של בעיית ההקלטה"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"התראה מתמשכת לסשן איסוף הבעיה"</string>
@@ -161,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"שגיאה בשמירה של בעיית ההקלטה"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"שגיאה בהפעלה של בעיית ההקלטה"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"צפייה במסך מלא"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"כדי לצאת, מחליקים למטה מהחלק העליון של המסך"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"הבנתי"</string>
<string name="accessibility_back" msgid="6530104400086152611">"חזרה"</string>
<string name="accessibility_home" msgid="5430449841237966217">"בית"</string>
@@ -295,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"שומר מסך"</string>
<string name="ethernet_label" msgid="2203544727007463351">"אתרנט"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"נא לא להפריע"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"אין מכשירים מותאמים זמינים"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"אפשר להקיש כדי להתחבר למכשיר או להתנתק ממנו"</string>
@@ -306,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"נשמר"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"ניתוק"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"הפעלה"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"הפעלה אוטומטית מחר"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"‏תכונות כמו \'שיתוף מהיר\' ו\'איפה המכשיר שלי\' משתמשות ב-Bluetooth"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"‏חיבור ה-Bluetooth יופעל מחר בבוקר"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"שיתוף האודיו"</string>
@@ -476,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"הוספת ווידג\'טים"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"לוחצים לחיצה ארוכה כדי להתאים אישית את הווידג\'טים"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"התאמה אישית של ווידג\'טים"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"כדי להתאים אישית את הווידג\'טים, צריך לבטל את הנעילה"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"סמל האפליקציה לווידג\'ט שהושבת"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"סמל האפליקציה של ווידג\'ט בתהליך התקנה"</string>
<string name="edit_widget" msgid="9030848101135393954">"עריכת הווידג\'ט"</string>
@@ -496,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"צריך לבחור ווידג\'ט"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"הסרת הווידג\'ט"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"צריך למקם את הווידג\'ט שנבחר"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"ווידג\'טים במסך הנעילה"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"כדי לפתוח אפליקציה באמצעות ווידג\'ט, עליך לאמת את זהותך. בנוסף, כדאי לזכור שכל אחד יכול לראות את הווידג\'טים גם כשהטאבלט שלך נעול. יכול להיות שחלק מהווידג\'טים לא נועדו למסך הנעילה ושלא בטוח להוסיף אותם לכאן."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"הבנתי"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"החלפת משתמש"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"תפריט במשיכה למטה"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"כל האפליקציות והנתונים בסשן הזה יימחקו."</string>
@@ -723,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"ברירת מחדל"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"באופן אוטומטי"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"ללא צליל או רטט"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"ללא צליל או רטט ומופיעה למטה בקטע התראות השיחה"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"ייתכן שיופעל צלצול או רטט בהתאם להגדרות במכשיר"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"ייתכן שיופעל צלצול או רטט בהתאם להגדרות במכשיר. שיחות מהאפליקציה <xliff:g id="APP_NAME">%1$s</xliff:g> מופיעות בבועות כברירת מחדל."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"אפשר לתת למערכת לקבוע אם ההתראה הזאת צריכה להיות מלווה בצליל או ברטט"</string>
@@ -780,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"דפדוף למעלה"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"דפדוף למטה"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"מחיקה"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"דף הבית"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"סיום"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"הוספה"</string>
@@ -967,8 +979,8 @@
<string name="qs_dnd_prompt_auto_rule_app" msgid="1841469944118486580">"מצב \'נא לא להפריע\' הופעל על ידי אפליקציה או על ידי כלל אוטומטי."</string>
<string name="running_foreground_services_title" msgid="5137313173431186685">"אפליקציות שפועלות ברקע"</string>
<string name="running_foreground_services_msg" msgid="3009459259222695385">"אפשר להקיש לקבלת פרטים על צריכה של נתונים וסוללה"</string>
- <string name="mobile_data_disable_title" msgid="5366476131671617790">"לכבות את חבילת הגלישה?"</string>
- <string name="mobile_data_disable_message" msgid="8604966027899770415">"‏לא תהיה לך גישה לנתונים או לאינטרנט באמצעות <xliff:g id="CARRIER">%s</xliff:g>. אינטרנט יהיה זמין רק באמצעות Wi-Fi."</string>
+ <string name="mobile_data_disable_title" msgid="5366476131671617790">"לכבות את השימוש בחבילת הגלישה?"</string>
+ <string name="mobile_data_disable_message" msgid="8604966027899770415">"‏לא תהיה לך גישה לנתונים או לאינטרנט דרך <xliff:g id="CARRIER">%s</xliff:g>. אפשר יהיה לגשת לאינטרנט רק דרך Wi-Fi."</string>
<string name="mobile_data_disable_message_default_carrier" msgid="6496033312431658238">"הספק שלך"</string>
<string name="auto_data_switch_disable_title" msgid="5146527155665190652">"לחזור אל <xliff:g id="CARRIER">%s</xliff:g>?"</string>
<string name="auto_data_switch_disable_message" msgid="5885533647399535852">"לא תתבצע החלפה אוטומטית של חבילת הגלישה על סמך זמינות"</string>
@@ -1362,20 +1374,18 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"מסך מפוצל"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"קלט"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"קיצורי דרך של אפליקציות"</string>
+ <string name="shortcut_helper_category_current_app_shortcuts" msgid="4017840565974573628">"האפליקציה הנוכחית"</string>
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"נגישות"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"מקשי קיצור"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"קיצורי דרך לחיפוש"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"סמל הכיווץ"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"סמל ההרחבה"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"או"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"תנועת חזרה"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"תנועת חזרה למסך הבית"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"מקש הפעולה"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"סיום"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"מעולה!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"חזרה"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"כדי לחזור אחורה, מחליקים שמאלה או ימינה עם שלוש אצבעות בכל מקום על לוח המגע."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"לוח מגע שמראה שלוש אצבעות זזות ימינה ושמאלה"</string>
@@ -1384,4 +1394,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"‏רמה %1$d מתוך %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"שליטה במכשירים"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"גישה מהירה לממשק השליטה במכשירים כשומר מסך"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-iw/tiles_states_strings.xml b/packages/SystemUI/res/values-iw/tiles_states_strings.xml
index b5cb476484b2..a81cda4739bc 100644
--- a/packages/SystemUI/res/values-iw/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-iw/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"כבוי"</item>
<item msgid="4875147066469902392">"פועל"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"לא זמין"</item>
<item msgid="5044688398303285224">"כבוי"</item>
diff --git a/packages/SystemUI/res/values-ja/strings.xml b/packages/SystemUI/res/values-ja/strings.xml
index da357011f1f1..4290be9f3667 100644
--- a/packages/SystemUI/res/values-ja/strings.xml
+++ b/packages/SystemUI/res/values-ja/strings.xml
@@ -126,31 +126,27 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"タップすると表示されます"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"画面の録画の保存中にエラーが発生しました"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"画面の録画中にエラーが発生しました"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
- <skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
- <skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; の記録を停止します"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
- <skip />
+ <string name="screenrecord_stop_dialog_title" msgid="8716193661764511095">"録画を停止しますか?"</string>
+ <string name="screenrecord_stop_dialog_message" msgid="6262768207331626817">"現在、画面全体を録画しています"</string>
+ <string name="screenrecord_stop_dialog_message_specific_app" msgid="5995770227684523244">"現在、<xliff:g id="APP_NAME">%1$s</xliff:g>を録画しています"</string>
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"録画を停止"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"画面を共有しています"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
- <skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
- <skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; の共有を停止します"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
- <skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"画面をキャストしています"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
- <skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
- <skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; のキャストを停止します"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
- <skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
- <skip />
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"画面の共有を停止しますか?"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen_with_host_app" msgid="522823522115375414">"現在、画面全体を<xliff:g id="HOST_APP_NAME">%1$s</xliff:g>と共有しています"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen" msgid="5090115386271179270">"現在、画面全体をアプリと共有しています"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_specific" msgid="5923772039347985172">"現在、<xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g>を共有しています"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_generic" msgid="6681016774654578261">"現在、アプリを共有しています"</string>
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"共有を停止"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"画面をキャストしています"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"キャストを停止しますか?"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen_with_device" msgid="1474703115926205251">"現在、<xliff:g id="DEVICE_NAME">%1$s</xliff:g>に画面全体をキャストしています"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen" msgid="8419219169553867625">"現在、付近のデバイスに画面全体をキャストしています"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app_with_device" msgid="2715934698604085519">"現在、<xliff:g id="DEVICE_NAME">%2$s</xliff:g>に<xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g>をキャストしています"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="8616103075630934513">"現在、付近のデバイスに<xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g>をキャストしています"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic_with_device" msgid="9213582497852420203">"現在、<xliff:g id="DEVICE_NAME">%1$s</xliff:g>にキャストしています"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic" msgid="4100272100480415076">"現在、付近のデバイスにキャストしています"</string>
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"キャストを停止"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"閉じる"</string>
<string name="issuerecord_title" msgid="286627115110121849">"問題記録ツール"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"問題の記録を処理しています"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"問題の収集セッションに関する進行中の通知"</string>
@@ -161,8 +157,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"問題の記録の保存中にエラーが発生しました"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"問題の記録の開始中にエラーが発生しました"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"全画面表示"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"終了するには画面の上部から下にスワイプします"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"OK"</string>
<string name="accessibility_back" msgid="6530104400086152611">"戻る"</string>
<string name="accessibility_home" msgid="5430449841237966217">"ホーム"</string>
@@ -295,6 +290,8 @@
<string name="start_dreams" msgid="9131802557946276718">"スクリーン セーバー"</string>
<string name="ethernet_label" msgid="2203544727007463351">"イーサネット"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"サイレント モード"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"ペア設定されたデバイスがありません"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"タップしてデバイスを接続または接続解除します"</string>
@@ -306,8 +303,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"保存済み"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"接続を解除"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"有効化"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"明日自動的に ON にする"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Quick Share や「デバイスを探す」などの機能は Bluetooth を使用します"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"明日の朝に Bluetooth が ON になります"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"音声を共有"</string>
@@ -476,8 +472,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"ウィジェットの追加"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"長押ししてウィジェットをカスタマイズ"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"ウィジェットのカスタマイズ"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"ウィジェットをカスタマイズするにはロックを解除してください"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"無効なウィジェットのアプリアイコン"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"インストール中のウィジェットのアプリアイコン"</string>
<string name="edit_widget" msgid="9030848101135393954">"ウィジェットを編集"</string>
@@ -496,12 +491,11 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"ウィジェットを選択"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"ウィジェットを削除"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"選択したウィジェットを配置"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
- <skip />
+ <string name="communal_widget_picker_title" msgid="1953369090475731663">"ロック画面ウィジェット"</string>
+ <string name="communal_widget_picker_description" msgid="490515450110487871">"タブレットがロックされていても、ロック画面のウィジェットは誰でも確認できます。"</string>
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"ロック画面ウィジェット"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"ウィジェットを使用してアプリを起動するには、本人確認が必要です。タブレットがロックされた状態でも他のユーザーにウィジェットが表示されますので、注意してください。一部のウィジェットについてはロック画面での使用を想定していないため、ロック画面への追加は危険な場合があります。"</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"OK"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"ユーザーを切り替える"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"プルダウン メニュー"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"このセッションでのアプリとデータはすべて削除されます。"</string>
@@ -723,7 +717,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"デフォルト"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"自動"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"着信音もバイブレーションも OFF になります"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"着信音もバイブレーションも無効になり会話セクションの下に表示されます"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"デバイスの設定を基に着信音またはバイブレーションが有効になります"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"デバイスの設定を基に着信音またはバイブレーションが有効になります。デフォルトでは <xliff:g id="APP_NAME">%1$s</xliff:g> からの会話がふきだしで表示されます。"</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"この通知を音またはバイブレーションで知らせるかどうかの自動判断"</string>
@@ -780,6 +775,7 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"PageUp"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"PageDown"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Delete"</string>
+ <string name="keyboard_key_esc" msgid="6230365950511411322">"Esc"</string>
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1362,20 +1358,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"分割画面"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"入力"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"アプリのショートカット"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"ユーザー補助"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"キーボード ショートカット"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"検索ショートカット"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"閉じるアイコン"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"開くアイコン"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"または"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"「戻る」ジェスチャー"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"「ホーム」ジェスチャー"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"アクションキー"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"完了"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"よくできました。"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"戻る"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"戻るには、3 本の指でタッチパッドを左右にスワイプします。"</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"タッチパッドで 3 本の指を左右に動かしている様子"</string>
@@ -1384,4 +1379,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"レベル %1$d/%2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"ホーム コントロール"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"ホーム コントロールにスクリーンセーバーからすばやくアクセス"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-ja/tiles_states_strings.xml b/packages/SystemUI/res/values-ja/tiles_states_strings.xml
index 790445c93c14..610385efabf7 100644
--- a/packages/SystemUI/res/values-ja/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-ja/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"OFF"</item>
<item msgid="4875147066469902392">"ON"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"使用不可"</item>
<item msgid="5044688398303285224">"OFF"</item>
diff --git a/packages/SystemUI/res/values-ka/strings.xml b/packages/SystemUI/res/values-ka/strings.xml
index 977fed796d43..b1b01b02c714 100644
--- a/packages/SystemUI/res/values-ka/strings.xml
+++ b/packages/SystemUI/res/values-ka/strings.xml
@@ -126,31 +126,27 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"შეეხეთ სანახავად"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"ეკრანის ჩანაწერის შენახვისას შეცდომა მოხდა"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"ეკრანის ჩაწერის დაწყებისას წარმოიქმნა შეცდომა"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
- <skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
- <skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"თქვენ შეწყვეტთ &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>-ის&lt;/b&gt; ჩაწერას"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
- <skip />
+ <string name="screenrecord_stop_dialog_title" msgid="8716193661764511095">"გსურთ ჩაწერის შეწყვეტა?"</string>
+ <string name="screenrecord_stop_dialog_message" msgid="6262768207331626817">"თქვენ ამჟამად იწერთ თქვენს მთლიან ეკრანს"</string>
+ <string name="screenrecord_stop_dialog_message_specific_app" msgid="5995770227684523244">"თქვენ ამჟამად იწერთ <xliff:g id="APP_NAME">%1$s</xliff:g>-ს"</string>
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"ჩაწერის შეწყვეტა"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"მიმდინარეობს ეკრანის გაზიარება"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
- <skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
- <skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"თქვენ შეწყვეტთ &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>-ის&lt;/b&gt; გაზიარებას"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
- <skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"მიმდინარეობს ეკრანის ტრანსლირება"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
- <skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
- <skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"თქვენ შეწყვეტთ &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>-ის&lt;/b&gt; ტრანსლირებას"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
- <skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
- <skip />
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"გსურთ ეკრანის გაზიარების შეწყვეტა?"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen_with_host_app" msgid="522823522115375414">"თქვენ ამჟამად უზიარებთ თქვენს მთლიან ეკრანს<xliff:g id="HOST_APP_NAME">%1$s</xliff:g>-ს"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen" msgid="5090115386271179270">"თქვენ ამჟამად უზიარებთ თქვენს მთლიან ეკრანს აპს"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_specific" msgid="5923772039347985172">"თქვენ ამჟამად აზიარებთ <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g>-ს"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_generic" msgid="6681016774654578261">"თქვენ ამჟამად აზიარებთ აპს"</string>
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"გაზიარების შეწყვეტა"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"მიმდინარეობს ეკრანის ტრანსლირება"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"გსურთ ტრანსლირების შეწყვეტა?"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen_with_device" msgid="1474703115926205251">"თქვენ ამჟამად ახდენთ თქვენი მთლიანი ეკრანის ტრანსლირებას <xliff:g id="DEVICE_NAME">%1$s</xliff:g>-ზე"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen" msgid="8419219169553867625">"თქვენ ამჟამად ახდენთ თქვენი მთლიანი ეკრანის ტრანსლირებას ახლომახლო მოწყობილობაზე"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app_with_device" msgid="2715934698604085519">"თქვენ ამჟამად ახდენთ <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g>-ის ტრანსლირებას <xliff:g id="DEVICE_NAME">%2$s</xliff:g>-ზე"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="8616103075630934513">"თქვენ ამჟამად ახდენთ <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g>-ის ტრანსლირებას ახლომახლო მოწყობილობაზე."</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic_with_device" msgid="9213582497852420203">"თქვენ ამჟამად ახდენთ ტრანსლირებას <xliff:g id="DEVICE_NAME">%1$s</xliff:g>-ზე"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic" msgid="4100272100480415076">"თქვენ ამჟამად ახდენთ ტრანსლირებას ახლომახლო მოწყობილობაზე"</string>
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"ტრანსლირების შეწყვეტა"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"დახურვა"</string>
<string name="issuerecord_title" msgid="286627115110121849">"ჩანაწერის რეკორდერი"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"პრობლემის ჩანაწერის დამუშავება"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"მიმდინარე შეტყობინება პრობლემების შეგროვების სესიისთვის"</string>
@@ -161,8 +157,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"პრობლემის ჩანაწერის შენახვისას წარმოიქმნა შეცდომა"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"პრობლემის ჩაწერის დაწყებისას წარმოიქმნა შეცდომა"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"მიმდინარეობს სრულ ეკრანზე ნახვა"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"თქვენი ეკრანის ზემოდან გადაფურცლეთ ქვემოთ, რათა გამოხვიდეთ"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"გასაგებია"</string>
<string name="accessibility_back" msgid="6530104400086152611">"უკან"</string>
<string name="accessibility_home" msgid="5430449841237966217">"საწყისი"</string>
@@ -295,6 +290,7 @@
<string name="start_dreams" msgid="9131802557946276718">"ეკრანმზოგი"</string>
<string name="ethernet_label" msgid="2203544727007463351">"ეთერნეტი"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"არ შემაწუხოთ"</string>
+ <string name="quick_settings_modes_label" msgid="5407025818652750501">"პრიორიტეტული რეჟიმები"</string>
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"დაწყვილებული მოწყობილობები მიუწვდომელია"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"შეეხეთ მოწყობილობის დასაკავშირებლად ან გასათიშად"</string>
@@ -306,8 +302,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"შენახული"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"კავშირის გაწყვეტა"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"გააქტიურება"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"ხვალ ავტომატურად ჩართვა"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"ისეთი ფუნქციები, როგორიცაა სწრაფი გაზიარება და ჩემი მოწყობილობის პოვნა, იყენებს Bluetooth-ს"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bluetooth ჩაირთვება ხვალ დილით"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"აუდიოს გაზიარება"</string>
@@ -476,8 +471,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"ვიჯეტების დამატება"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"ხანგრძლივად დააჭირეთ ვიჯეტების მოსარგებად"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"ვიჯეტების მორგება"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"ვიჯეტების მოსარგებად განბლოკეთ"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"აპის ხატულა გათიშული ვიჯეტისთვის"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"ინსტალაციის პროცესში მყოფი ვიჯეტის აპის ხატულა"</string>
<string name="edit_widget" msgid="9030848101135393954">"ვიჯეტის რედაქტირება"</string>
@@ -496,12 +490,11 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"ვიჯეტის არჩევა"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"ვიჯეტის ამოშლა"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"არჩეული ვიჯეტის განთავსება"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
- <skip />
+ <string name="communal_widget_picker_title" msgid="1953369090475731663">"ჩაკეტილი ეკრანის ვიჯეტები"</string>
+ <string name="communal_widget_picker_description" msgid="490515450110487871">"ნებისმიერს შეუძლია თქვენს ჩაკეტილ ეკრანზე ვიჯეტების ნახვა, თუნდაც ტაბლეტი ჩაკეტილი იყოს."</string>
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"დაბლოკილი ეკრანის ვიჯეტები"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"უნდა დაადასტუროთ თქვენი ვინაობა, რათა გახსნათ აპი ვიჯეტის გამოყენებით. გაითვალისწინეთ, რომ ნებისმიერს შეუძლია მათი ნახვა, მაშინაც კი, როცა ტაბლეტი დაბლოკილია. ზოგი ვიჯეტი შეიძლება არ იყოს გათვლილი თქვენი დაბლოკილი ეკრანისთვის და მათი აქ დამატება შეიძლება სახიფათო იყოს."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"გასაგებია"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"მომხმარებლის გადართვა"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"ჩამოშლადი მენიუ"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"ამ სესიის ყველა აპი და მონაცემი წაიშლება."</string>
@@ -723,7 +716,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"ნაგულისხმევი"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"ავტომატური"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"ხმისა და ვიბრაციის გარეშე"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"ხმისა და ვიბრაციის გარეშე, ჩნდება მიმოწერების სექციის ქვედა ნაწილში"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"დარეკვა ან ვიბრაცია მოწყობილობის პარამეტრების მიხედვით"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"დარეკვა ან ვიბრაცია მოწყობილობის პარამეტრების მიხედვით. მიმოწერები <xliff:g id="APP_NAME">%1$s</xliff:g>-ის ბუშტიდან, ნაგულისხმევად."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"სისტემისთვის ისეთი უფლების მინიჭება, რომ მან განსაზღვროს, ამ შეტყობინებამ ხმოვანი სიგნალი უნდა აამოქმედოს თუ ვიბრაცია"</string>
@@ -780,6 +774,7 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page Down"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Delete"</string>
+ <string name="keyboard_key_esc" msgid="6230365950511411322">"Esc"</string>
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1362,20 +1357,18 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"ეკრანის გაყოფა"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"შეყვანა"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"აპის მალსახმობები"</string>
+ <string name="shortcut_helper_category_current_app_shortcuts" msgid="4017840565974573628">"მიმდინარე აპი"</string>
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"მისაწვდომობა"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"კლავიატურის მალსახმობები"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"ძიების მალსახმობები"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"ხატულის ჩაკეცვა"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"ხატულის გაფართოება"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"ან"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"უკან დაბრუნების ჟესტი"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"მთავარ ეკრანზე გადასვლის ჟესტი"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"მოქმედების კლავიში"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"მზადაა"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"შესანიშნავია!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"უკან დაბრუნება"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"უკან დასაბრუნებლად, სენსორულ პანელზე ნებისმიერ ადგილას სამი თითის გამოყენებით გადაფურცლეთ მარცხნივ ან მარჯვნივ."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"სენსორული პანელი, რომელიც აჩვენებს მარჯვენა და მარცხენა მიმართულებით მოძრავ სამ თითს"</string>
@@ -1384,4 +1377,5 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"დონე: %1$d %2$d-დან"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"სახლის კონტროლი"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"სწრაფი წვდომა სახლის კონტროლზე ეკრანმზოგის სახით"</string>
+ <string name="volume_undo_action" msgid="5815519725211877114">"მოქმედების გაუქმება"</string>
</resources>
diff --git a/packages/SystemUI/res/values-ka/tiles_states_strings.xml b/packages/SystemUI/res/values-ka/tiles_states_strings.xml
index 21f8102036c9..2b11a15aee7e 100644
--- a/packages/SystemUI/res/values-ka/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-ka/tiles_states_strings.xml
@@ -56,6 +56,11 @@
<item msgid="5376619709702103243">"გამორთულია"</item>
<item msgid="4875147066469902392">"ჩართულია"</item>
</string-array>
+ <string-array name="tile_states_modes">
+ <item msgid="7764936419245199023">"მიუწვდომელია"</item>
+ <item msgid="2004750556637773692">"გამორთული"</item>
+ <item msgid="8968530753931637871">"ჩართული"</item>
+ </string-array>
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"მიუწვდომელია"</item>
<item msgid="5044688398303285224">"გამორთულია"</item>
diff --git a/packages/SystemUI/res/values-kk/strings.xml b/packages/SystemUI/res/values-kk/strings.xml
index 3df7fc16fb12..c07b6a0a246e 100644
--- a/packages/SystemUI/res/values-kk/strings.xml
+++ b/packages/SystemUI/res/values-kk/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> қолданбасы осы скриншотты анықтады."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> және басқа да ашық қолданбалар осы скриншотты анықтады."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Ескертпеге қосу"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Сілтеме қосу"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Экран жазғыш"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Экран жазғыш бейнесін өңдеу"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Экранды бейнеге жазудың ағымдағы хабарландыруы"</string>
@@ -127,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Көру үшін түртіңіз."</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Экран жазбасын сақтау кезінде қате шықты."</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Экрандағы бейнені жазу кезінде қате шықты."</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; қолданбасының контентін жазуды тоқтатасыз."</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Жазуды тоқтату"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Экранды бөлісіп жатыр."</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Экранды бөлісуді тоқтатасыз ба?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; қолданбасының контентін бөлісуді тоқтатасыз."</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Бөлісуді тоқтату"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Экранды трансляциялап жатырсыз."</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Трансляциялау тоқтасын ба?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Экранды трансляциялап жатыр."</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; қолданбасының контентін трансляциялауды тоқтатасыз."</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Трансляцияны тоқтату"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Жабу"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Мәселені жазу құралы"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Мәселе жазбасы өңделіп жатыр"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Мәселе туралы дерек жинау сеансына арналған ағымдағы хабарландыру"</string>
@@ -162,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Мәселе жазбасын сақтау кезінде қате шықты."</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Мәселені жазуды бастау кезінде қате шықты."</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Толық экранда көру"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Шығу үшін экранның жоғарғы жағынан төмен қарай сырғытыңыз."</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"Түсінікті"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Артқа"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Үй"</string>
@@ -196,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Бетпен ашылды. Жалғастыру үшін басыңыз."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Бет танылды. Жалғастыру үшін басыңыз."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Бет танылды. Жалғастыру үшін құлыпты ашу белгішесін басыңыз."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Бетпен ашылды. Жалғастыру үшін түртіңіз."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Аутентификацияланған"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Аутентификациядан бас тарту"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Қосымша опциялар"</string>
@@ -297,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Скринсейвер"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Этернет"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Мазаламау"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Жұптасқан құрылғылар жоқ"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Құрылғыны жалғау не ажырату үшін түртіңіз."</string>
@@ -308,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Сақталды"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"ажырату"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"іске қосу"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Ертең автоматты түрде қосу"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Quick Share және Find My Device сияқты функциялар Bluetooth-ты пайдаланады."</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bluetooth ертең таңертең қосылады."</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Аудионы бөлісу"</string>
@@ -478,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Басқа виджеттер қосыңыз."</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Виджеттерді бейімдеу үшін ұзақ басып тұрыңыз."</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Виджеттерді реттеу"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Виджеттерді бейімдеу үшін құлыпты ашыңыз."</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Өшірілген виджеттің қолданба белгішесі"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Виджетке арналған қолдана белгішесі орнатылып жатыр."</string>
<string name="edit_widget" msgid="9030848101135393954">"Виджетті өзгерту"</string>
@@ -498,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"виджет таңдау"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"виджетті өшіру"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"таңдалған виджетті орналастыру"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Құлып экранының виджеттері"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Қолданбаны виджет көмегімен ашу үшін жеке басыңызды растауыңыз керек. Сондай-ақ басқалар оларды планшетіңіз құлыптаулы кезде де көре алатынын ескеріңіз. Кейбір виджеттер құлып экранына арналмаған болады, сондықтан оларды мұнда қосу қауіпсіз болмауы мүмкін."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"Түсінікті"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Пайдаланушыны ауыстыру"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"ашылмалы мәзір"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Осы сеанстағы барлық қолданба мен дерек жойылады."</string>
@@ -725,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Әдепкі"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Автоматты"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Дыбыс не діріл болмайды."</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Дыбыс не діріл болмайды, әңгімелер бөлімінің төмен жағында тұрады."</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Құрылғы параметрлеріне байланысты шырылдауы не дірілдеуі мүмкін"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Құрылғы параметрлеріне байланысты шырылдауы не дірілдеуі мүмкін. <xliff:g id="APP_NAME">%1$s</xliff:g> чаттары әдепкісінше қалқымалы етіп көрсетіледі."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Хабарландыру дыбысының немесе дірілдің қосылуын жүйе анықтайтын болады"</string>
@@ -782,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page Down"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Delete"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1364,20 +1374,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Экранды бөлу"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Кіріс"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Қолданба таңбашалары"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Арнайы мүмкіндіктер"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Перне тіркесімдері"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Іздеу жылдам пәрмендері"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Жию белгішесі"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Жаю белгішесі"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"немесе"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Артқа қайтару қимылы"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Негізгі бетке қайтару қимылы"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Әрекет пернесі"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Дайын"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Жарайсыз!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Артқа"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Артқа қайту үшін сенсорлық тақтаның кез келген жерінен үш саусақпен солға немесе оңға сырғытыңыз."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Оңға және солға жылжитын үш саусақты көрсетіп тұрған сенсорлық тақта."</string>
@@ -1386,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Деңгей: %1$d/%2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Үй басқару элементтері"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Үй басқару элементтерін скринсейверден қолданыңыз."</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-kk/tiles_states_strings.xml b/packages/SystemUI/res/values-kk/tiles_states_strings.xml
index cf3aa69992f1..6410460e3ed7 100644
--- a/packages/SystemUI/res/values-kk/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-kk/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Өшірулі"</item>
<item msgid="4875147066469902392">"Қосулы"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Қолжетімсіз"</item>
<item msgid="5044688398303285224">"Өшірулі"</item>
diff --git a/packages/SystemUI/res/values-km/strings.xml b/packages/SystemUI/res/values-km/strings.xml
index 303410d70927..bd31568b2689 100644
--- a/packages/SystemUI/res/values-km/strings.xml
+++ b/packages/SystemUI/res/values-km/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> បានរកឃើញ​រូបថតអេក្រង់នេះ។"</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> និងកម្មវិធីដែលបើក​ផ្សេងទៀតបានរកឃើញ​រូបថតអេក្រង់នេះ។"</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"បញ្ចូលទៅក្នុងកំណត់ចំណាំ"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"រួមបញ្ចូល​តំណ"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"មុខងារថត​វីដេអូអេក្រង់"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"កំពុង​ដំណើរការ​ការថតអេក្រង់"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"ការជូនដំណឹង​ដែល​កំពុង​ដំណើរការ​សម្រាប់​រយៈពេលប្រើ​ការថត​សកម្មភាព​អេក្រង់"</string>
@@ -127,31 +126,27 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"ចុចដើម្បីមើល"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"មានបញ្ហាក្នុងការរក្សាទុក​ការថតវីដេអូអេក្រង់"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"មានបញ្ហា​ក្នុងការ​ចាប់ផ្ដើម​ថត​អេក្រង់"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
- <skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
- <skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"អ្នកនឹងឈប់ថត &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
- <skip />
+ <string name="screenrecord_stop_dialog_title" msgid="8716193661764511095">"បញ្ឈប់ការថតឬ?"</string>
+ <string name="screenrecord_stop_dialog_message" msgid="6262768207331626817">"បច្ចុប្បន្ន អ្នកកំពុងថតអេក្រង់ទាំងមូលរបស់អ្នក"</string>
+ <string name="screenrecord_stop_dialog_message_specific_app" msgid="5995770227684523244">"បច្ចុប្បន្ន អ្នកកំពុងថត <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"ឈប់ថត"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"កំពុងបង្ហាញអេក្រង់"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
- <skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
- <skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"អ្នកនឹងឈប់ចែករំលែក &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
- <skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"កំពុង​បញ្ជូន​អេក្រង់"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
- <skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
- <skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"អ្នកនឹងឈប់បញ្ជូន &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
- <skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
- <skip />
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"ឈប់បង្ហាញអេក្រង់ឬ?"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen_with_host_app" msgid="522823522115375414">"បច្ចុប្បន្ន អ្នកកំពុងបង្ហាញអេក្រង់ទាំងមូលរបស់អ្នកតាមរយៈ <xliff:g id="HOST_APP_NAME">%1$s</xliff:g>"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen" msgid="5090115386271179270">"បច្ចុប្បន្ន អ្នកកំពុងបង្ហាញអេក្រង់ទាំងមូលរបស់អ្នកតាមរយៈកម្មវិធីមួយ"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_specific" msgid="5923772039347985172">"បច្ចុប្បន្ន អ្នកកំពុងបង្ហាញ<xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g>"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_generic" msgid="6681016774654578261">"បច្ចុប្បន្ន អ្នកកំពុងបង្ហាញកម្មវិធីមួយ"</string>
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"ឈប់​ចែក​រំលែក"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"កំពុង​បញ្ជូន​អេក្រង់"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"ឈប់បញ្ជូនឬ?"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen_with_device" msgid="1474703115926205251">"បច្ចុប្បន្ន អ្នកកំពុងបញ្ជូនអេក្រង់ទាំងមូលរបស់អ្នកទៅ <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen" msgid="8419219169553867625">"បច្ចុប្បន្ន អ្នកកំពុងបញ្ជូនអេក្រង់ទាំងមូលរបស់អ្នកទៅឧបករណ៍នៅជិត"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app_with_device" msgid="2715934698604085519">"បច្ចុប្បន្ន អ្នកកំពុងបញ្ជូន <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> ទៅ <xliff:g id="DEVICE_NAME">%2$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="8616103075630934513">"បច្ចុប្បន្ន អ្នកកំពុងបញ្ជូន <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> ទៅឧបករណ៍នៅជិត"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic_with_device" msgid="9213582497852420203">"បច្ចុប្បន្ន អ្នកកំពុងបញ្ជូនទៅ <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic" msgid="4100272100480415076">"បច្ចុប្បន្ន អ្នកកំពុងបញ្ជូនទៅឧបករណ៍នៅជិត"</string>
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"បញ្ឈប់ការបញ្ជូន"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"បិទ"</string>
<string name="issuerecord_title" msgid="286627115110121849">"កម្មវិធីកត់ត្រាបញ្ហា"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"កំពុងដំណើរការការកត់ត្រាបញ្ហា"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"ការជូនដំណឹងដែលកំពុងបន្តសម្រាប់វគ្គប្រមូលបញ្ហា"</string>
@@ -162,8 +157,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"មានបញ្ហាក្នុងការរក្សាទុកកំណត់ត្រាបញ្ហា"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"មានបញ្ហាក្នុងការចាប់ផ្ដើមកត់ត្រាបញ្ហា"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"កំពុងមើលពេញអេក្រង់"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"ដើម្បីចេញ សូមអូសពីផ្នែកខាងលើនៃអេក្រង់របស់អ្នកចុះក្រោម"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"យល់ហើយ"</string>
<string name="accessibility_back" msgid="6530104400086152611">"ថយក្រោយ"</string>
<string name="accessibility_home" msgid="5430449841237966217">"គេហ​ទំព័រ"</string>
@@ -196,8 +190,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"បានដោះសោដោយប្រើមុខ។ សូមចុច ដើម្បីបន្ត។"</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"បានស្គាល់មុខ។ សូមចុច ដើម្បីបន្ត។"</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"បានស្គាល់មុខ។ សូមចុចរូបដោះសោ ដើម្បីបន្ត។"</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"បានដោះសោដោយប្រើមុខ។ ចុច​ ដើម្បី​បន្ត។"</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"បាន​ផ្ទៀងផ្ទាត់"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"បោះបង់ការផ្ទៀងផ្ទាត់"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"ជម្រើស​ច្រើន​ទៀត"</string>
@@ -297,6 +290,8 @@
<string name="start_dreams" msgid="9131802557946276718">"ធាតុរក្សាអេក្រង់"</string>
<string name="ethernet_label" msgid="2203544727007463351">"អ៊ីសឺរណិត"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"កុំ​រំខាន"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"ប៊្លូធូស"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"មិន​មាន​ឧបករណ៍​ផ្គូផ្គង​ដែល​អាច​ប្រើ​បាន"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"ចុចដើម្បីភ្ជាប់ ឬផ្ដាច់ឧបករណ៍"</string>
@@ -308,8 +303,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"បាន​រក្សាទុក"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"ផ្ដាច់"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"បើកដំណើរការ"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"បើកនៅថ្ងៃស្អែកដោយស្វ័យប្រវត្តិ"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"មុខងារដូចជា Quick Share និង \"រកឧបករណ៍របស់ខ្ញុំ\" ប្រើប៊្លូធូស"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"ប៊្លូធូសនឹងបើកនៅព្រឹកស្អែក"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"ស្ដាប់សំឡេងរួមគ្នា"</string>
@@ -478,8 +472,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"បញ្ចូលធាតុ​ក្រាហ្វិកច្រើនទៀត"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"ចុច​ឱ្យ​យូរ ដើម្បីប្ដូរធាតុ​ក្រាហ្វិកតាមបំណង"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"ប្ដូរ​ធាតុ​ក្រាហ្វិកតាម​បំណង"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"ដោះសោ​ដើម្បីប្ដូរធាតុ​ក្រាហ្វិកតាមបំណង"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"រូបកម្មវិធីសម្រាប់ធាតុ​ក្រាហ្វិកដែលបានបិទ"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"រូបតំណាងកម្មវិធីសម្រាប់ធាតុ​ក្រាហ្វិកកំពុងត្រូវបានដំឡើង"</string>
<string name="edit_widget" msgid="9030848101135393954">"កែធាតុ​ក្រាហ្វិក"</string>
@@ -498,12 +491,11 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"ជ្រើសរើសធាតុ​ក្រាហ្វិក"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"ដកធាតុ​ក្រាហ្វិកចេញ"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"ដាក់ធាតុ​ក្រាហ្វិកដែលបានជ្រើសរើស"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
- <skip />
+ <string name="communal_widget_picker_title" msgid="1953369090475731663">"ធាតុ​ក្រាហ្វិកអេក្រង់ចាក់សោ"</string>
+ <string name="communal_widget_picker_description" msgid="490515450110487871">"អ្នកគ្រប់គ្នាអាចមើលធាតុក្រាហ្វិកលើអេក្រង់ចាក់សោរបស់អ្នក ទោះបីជាថេប្លេតរបស់អ្នកត្រូវបានចាក់សោក៏ដោយ។"</string>
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"ធាតុ​ក្រាហ្វិកលើអេក្រង់ចាក់សោ"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"ដើម្បីបើកកម្មវិធីដោយប្រើធាតុ​ក្រាហ្វិក អ្នកនឹងត្រូវផ្ទៀងផ្ទាត់ថាជាអ្នក។ ទន្ទឹមនឹងនេះ សូមចងចាំថា នរណាក៏អាចមើលធាតុក្រាហ្វិកបាន សូម្បីពេលថេប្លេតរបស់អ្នកជាប់សោក៏ដោយ។ ធាតុ​ក្រាហ្វិកមួយចំនួនប្រហែលមិនត្រូវបានរចនាឡើងសម្រាប់អេក្រង់ចាក់សោរបស់អ្នកទេ និងមិនមានសុវត្ថិភាពឡើយ បើបញ្ចូលទៅទីនេះ។"</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"យល់ហើយ"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"ប្ដូរ​អ្នក​ប្រើ"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"ម៉ឺនុយ​ទាញចុះ"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"កម្មវិធី និងទិន្នន័យ​ទាំងអស់​ក្នុង​វគ្គ​នេះ​នឹង​ត្រូវ​លុប។"</string>
@@ -725,7 +717,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"លំនាំដើម"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"ស្វ័យប្រវត្តិ"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"គ្មាន​សំឡេង ឬការញ័រទេ"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"គ្មានសំឡេង​ឬការញ័រ និងបង្ហាញ​ទាបជាង​នៅក្នុង​ផ្នែកសន្ទនា"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"អាចរោទ៍ ឬញ័រ ដោយផ្អែកលើ​ការកំណត់ឧបករណ៍"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"អាចរោទ៍ ឬញ័រ ដោយផ្អែកលើ​ការកំណត់ឧបករណ៍។ ការសន្ទនា​ពីផ្ទាំងអណ្ដែត <xliff:g id="APP_NAME">%1$s</xliff:g> តាម​លំនាំដើម​។"</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"ឱ្យប្រព័ន្ធកំណត់ថាតើ​ការជូនដំណឹងនេះ​គួរតែបន្លឺសំឡេង ឬញ័រ"</string>
@@ -782,6 +775,7 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page Down"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Delete"</string>
+ <string name="keyboard_key_esc" msgid="6230365950511411322">"Esc"</string>
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1364,20 +1358,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"មុខងារ​បំបែកអេក្រង់"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"ធាតុចូល"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"ផ្លូវកាត់​កម្មវិធី"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"ភាពងាយស្រួល"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"ផ្លូវកាត់​ក្ដារ​ចុច"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"ផ្លូវ​កាត់ការស្វែងរក"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"រូបតំណាង \"បង្រួម\""</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"រូបតំណាង \"ពង្រីក\""</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"ឬ"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"ចលនាថយក្រោយ"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"ចលនាទៅទំព័រដើម"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"គ្រាប់ចុចសកម្មភាព"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"រួចរាល់"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"ធ្វើបានល្អ!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"ថយ​ក្រោយ"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"ដើម្បីថយក្រោយ សូមអូសទៅឆ្វេង ឬស្ដាំដោយប្រើម្រាមដៃបីនៅកន្លែងណាមួយនៅលើផ្ទាំងប៉ះ។"</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"ផ្ទាំងប៉ះដែលបង្ហាញម្រាមដៃបីដែលផ្លាស់ទីទៅស្ដាំ និងឆ្វេង"</string>
@@ -1386,4 +1379,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"កម្រិតទី %1$d នៃ %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"ការគ្រប់គ្រង​ផ្ទះ"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"ចូលប្រើការគ្រប់គ្រងផ្ទះអ្នកបានលឿនជាធាតុរក្សាអេក្រង់"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-km/tiles_states_strings.xml b/packages/SystemUI/res/values-km/tiles_states_strings.xml
index 54790f6a028e..25f74858f9fb 100644
--- a/packages/SystemUI/res/values-km/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-km/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"បិទ"</item>
<item msgid="4875147066469902392">"បើក"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"មិនមានទេ"</item>
<item msgid="5044688398303285224">"បិទ"</item>
diff --git a/packages/SystemUI/res/values-kn/strings.xml b/packages/SystemUI/res/values-kn/strings.xml
index 4af252d9e3cb..4bf89e174dfe 100644
--- a/packages/SystemUI/res/values-kn/strings.xml
+++ b/packages/SystemUI/res/values-kn/strings.xml
@@ -126,31 +126,27 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"ವೀಕ್ಷಿಸಲು ಟ್ಯಾಪ್ ಮಾಡಿ"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"ಸ್ಕ್ರೀನ್ ರೆಕಾರ್ಡಿಂಗ್ ಸೇವ್‌ ಮಾಡುವಾಗ ದೋಷ ಎದುರಾಗಿದೆ"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"ಸ್ಕ್ರೀನ್ ರೆಕಾರ್ಡಿಂಗ್ ಪ್ರಾರಂಭಿಸುವಾಗ ದೋಷ ಕಂಡುಬಂದಿದೆ"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
- <skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
- <skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"ಇದರಿಂದ &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; ನ ಕಂಟೆಂಟ್ ಅನ್ನು ರೆಕಾರ್ಡ್ ಮಾಡುವುದು ನಿಂತುಹೋಗುತ್ತದೆ"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
- <skip />
+ <string name="screenrecord_stop_dialog_title" msgid="8716193661764511095">"ರೆಕಾರ್ಡ್ ಮಾಡುವುದನ್ನು ನಿಲ್ಲಿಸಬೇಕೇ?"</string>
+ <string name="screenrecord_stop_dialog_message" msgid="6262768207331626817">"ನೀವು ಪ್ರಸ್ತುತ ನಿಮ್ಮ ಸಂಪೂರ್ಣ ಸ್ಕ್ರೀನ್ ಅನ್ನು ರೆಕಾರ್ಡ್ ಮಾಡುತ್ತಿದ್ದೀರಿ"</string>
+ <string name="screenrecord_stop_dialog_message_specific_app" msgid="5995770227684523244">"ನೀವು ಪ್ರಸ್ತುತ <xliff:g id="APP_NAME">%1$s</xliff:g> ಅನ್ನು ರೆಕಾರ್ಡ್ ಮಾಡುತ್ತಿದ್ದೀರಿ"</string>
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"ರೆಕಾರ್ಡಿಂಗ್ ನಿಲ್ಲಿಸಿ"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"ಪರದೆಯನ್ನು ಹಂಚಿಕೊಳ್ಳಲಾಗುತ್ತಿದೆ"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
- <skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
- <skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"ಇದರಿಂದ &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; ನ ಕಂಟೆಂಟ್ ಅನ್ನು ಹಂಚಿಕೊಳ್ಳುವುದು ನಿಂತುಹೋಗುತ್ತದೆ"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
- <skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"ಪರದೆಯನ್ನು ಬಿತ್ತರಿಸಲಾಗುತ್ತಿದೆ"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
- <skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
- <skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"ಇದರಿಂದ &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; ನ ಕಂಟೆಂಟ್ ಅನ್ನು ಬಿತ್ತರಿಸುವುದು ನಿಂತುಹೋಗುತ್ತದೆ"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
- <skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
- <skip />
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"ಸ್ಕ್ರೀನ್ ಹಂಚಿಕೊಳ್ಳುವಿಕೆಯನ್ನು ನಿಲ್ಲಿಸಬೇಕೆ?"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen_with_host_app" msgid="522823522115375414">"ನೀವು ಪ್ರಸ್ತುತ ನಿಮ್ಮ ಸಂಪೂರ್ಣ ಸ್ಕ್ರೀನ್ ಅನ್ನು <xliff:g id="HOST_APP_NAME">%1$s</xliff:g> ನೊಂದಿಗೆ ಹಂಚಿಕೊಳ್ಳುತ್ತಿದ್ದೀರಿ"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen" msgid="5090115386271179270">"ನೀವು ಪ್ರಸ್ತುತ ನಿಮ್ಮ ಸಂಪೂರ್ಣ ಸ್ಕ್ರೀನ್ ಅನ್ನು ಆ್ಯಪ್‌ನೊಂದಿಗೆ ಹಂಚಿಕೊಳ್ಳುತ್ತಿದ್ದೀರಿ"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_specific" msgid="5923772039347985172">"ನೀವು ಪ್ರಸ್ತುತ <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> ಅನ್ನು ಹಂಚಿಕೊಳ್ಳುತ್ತಿದ್ದೀರಿ"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_generic" msgid="6681016774654578261">"ನೀವು ಪ್ರಸ್ತುತ ಆ್ಯಪ್ ಅನ್ನು ಹಂಚಿಕೊಳ್ಳುತ್ತಿದ್ದೀರಿ"</string>
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"ಹಂಚಿಕೊಳ್ಳುವಿಕೆಯನ್ನು ನಿಲ್ಲಿಸಿ"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"ಸ್ಕ್ರೀನ್ ಅನ್ನು ಬಿತ್ತರಿಸಲಾಗುತ್ತಿದೆ"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"ಬಿತ್ತರಿಸುವುದನ್ನು ನಿಲ್ಲಿಸಬೇಕೆ?"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen_with_device" msgid="1474703115926205251">"ನೀವು ಪ್ರಸ್ತುತ ನಿಮ್ಮ ಸಂಪೂರ್ಣ ಸ್ಕ್ರೀನ್ ಅನ್ನು <xliff:g id="DEVICE_NAME">%1$s</xliff:g> ಗೆ ಬಿತ್ತರಿಸುತ್ತಿದ್ದೀರಿ"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen" msgid="8419219169553867625">"ನೀವು ಪ್ರಸ್ತುತ ನಿಮ್ಮ ಸಂಪೂರ್ಣ ಸ್ಕ್ರೀನ್ ಅನ್ನು ಸಮೀಪದಲ್ಲಿರುವ ಸಾಧನಕ್ಕೆ ಬಿತ್ತರಿಸುತ್ತಿದ್ದೀರಿ"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app_with_device" msgid="2715934698604085519">"ನೀವು ಪ್ರಸ್ತುತ <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> ಅನ್ನು <xliff:g id="DEVICE_NAME">%2$s</xliff:g> ಗೆ ಬಿತ್ತರಿಸುತ್ತಿದ್ದೀರಿ"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="8616103075630934513">"ನೀವು ಪ್ರಸ್ತುತ <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> ಅನ್ನು ಸಮೀಪದ ಸಾಧನಕ್ಕೆ ಬಿತ್ತರಿಸುತ್ತಿದ್ದೀರಿ"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic_with_device" msgid="9213582497852420203">"ನೀವು ಪ್ರಸ್ತುತ <xliff:g id="DEVICE_NAME">%1$s</xliff:g> ಗೆ ಬಿತ್ತರಿಸುತ್ತಿದ್ದೀರಿ"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic" msgid="4100272100480415076">"ನೀವು ಪ್ರಸ್ತುತ ಸಮೀಪದ ಸಾಧನಕ್ಕೆ ಬಿತ್ತರಿಸುತ್ತಿದ್ದೀರಿ"</string>
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"ಬಿತ್ತರಿಸುವುದನ್ನು ನಿಲ್ಲಿಸಿ"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"ಮುಚ್ಚಿರಿ"</string>
<string name="issuerecord_title" msgid="286627115110121849">"ಸಮಸ್ಯೆ ರೆಕಾರ್ಡರ್"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"ಸಮಸ್ಯೆ ರೆಕಾರ್ಡಿಂಗ್ ಪ್ರಕ್ರಿಯೆ…"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"ಸಮಸ್ಯೆ ಸಂಗ್ರಹಣೆಯ ಸೆಶನ್‌ಗಾಗಿ ಜರುಗುತ್ತಿರುವ ನೋಟಿಫಿಕೇಶನ್"</string>
@@ -161,8 +157,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"ಸಮಸ್ಯೆಯ ರೆಕಾರ್ಡಿಂಗ್ ಅನ್ನು ಸೇವ್‌ ಮಾಡುವಾಗ ದೋಷ ಎದುರಾಗಿದೆ"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"ಸಮಸ್ಯೆಯ ರೆಕಾರ್ಡಿಂಗ್ ಅನ್ನು ಪ್ರಾರಂಭಿಸುವಲ್ಲಿ ದೋಷ ಎದುರಾಗಿದೆ"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"ಪೂರ್ಣ ಸ್ಕ್ರೀನ್‌ನಲ್ಲಿ ವೀಕ್ಷಿಸಲಾಗುತ್ತಿದೆ"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"ನಿರ್ಗಮಿಸಲು, ನಿಮ್ಮ ಸ್ಕ್ರೀನ್‌ನ ಮೇಲಿನಿಂದ ಕೆಳಕ್ಕೆ ಸ್ವೈಪ್ ಮಾಡಿ"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"ಅರ್ಥವಾಯಿತು"</string>
<string name="accessibility_back" msgid="6530104400086152611">"ಹಿಂದೆ"</string>
<string name="accessibility_home" msgid="5430449841237966217">"ಮುಖಪುಟ"</string>
@@ -295,6 +290,7 @@
<string name="start_dreams" msgid="9131802557946276718">"ಸ್ಕ್ರೀನ್ ಸೇವರ್"</string>
<string name="ethernet_label" msgid="2203544727007463351">"ಇಥರ್ನೆಟ್"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"ಅಡಚಣೆ ಮಾಡಬೇಡಿ"</string>
+ <string name="quick_settings_modes_label" msgid="5407025818652750501">"ಆದ್ಯತೆಯ ಮೋಡ್‌ಗಳು"</string>
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"ಬ್ಲೂಟೂತ್‌"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"ಯಾವುದೇ ಜೋಡಿಸಲಾದ ಸಾಧನಗಳು ಲಭ್ಯವಿಲ್ಲ"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"ಸಾಧನವನ್ನು ಕನೆಕ್ಟ್ ಅಥವಾ ಡಿಸ್‌ಕನೆಕ್ಟ್ ಮಾಡಲು ಟ್ಯಾಪ್ ಮಾಡಿ"</string>
@@ -306,8 +302,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"ಸೇವ್ ಮಾಡಲಾಗಿದೆ"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"ಡಿಸ್‌ಕನೆಕ್ಟ್ ಮಾಡಿ"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"ಸಕ್ರಿಯಗೊಳಿಸಿ"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"ನಾಳೆ ಸ್ವಯಂಚಾಲಿತವಾಗಿ ಆನ್ ಮಾಡಿ"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"ಕ್ವಿಕ್ ಶೇರ್ ಮತ್ತು Find My Device ನಂತಹ ಫೀಚರ್‌ಗಳು ಬ್ಲೂಟೂತ್ ಅನ್ನು ಬಳಸುತ್ತವೆ"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"ಬ್ಲೂಟೂತ್ ನಾಳೆ ಬೆಳಗ್ಗೆ ಆನ್ ಆಗುತ್ತದೆ"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"ಆಡಿಯೋ ಹಂಚಿಕೊಳ್ಳಿ"</string>
@@ -476,8 +471,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"ಹೆಚ್ಚಿನ ವಿಜೆಟ್‌ಗಳನ್ನು ಸೇರಿಸಿ"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"ವಿಜೆಟ್‌ಗಳನ್ನು ಕಸ್ಟಮೈಸ್ ಮಾಡಲು ದೀರ್ಘಕಾಲ ಒತ್ತಿರಿ"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"ವಿಜೆಟ್‌ಗಳನ್ನು ಕಸ್ಟಮೈಸ್ ಮಾಡಿ"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"ವಿಜೆಟ್‌ಗಳನ್ನು ಕಸ್ಟಮೈಸ್ ಮಾಡಲು ಅನ್‌ಲಾಕ್ ಮಾಡಿ"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಲಾದ ವಿಜೆಟ್‌ಗಾಗಿ ಆ್ಯಪ್ ಐಕಾನ್"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"ಇನ್‌ಸ್ಟಾಲ್ ಮಾಡಲಾದ ವಿಜೆಟ್‌ಗಾಗಿ ಆ್ಯಪ್ ಐಕಾನ್"</string>
<string name="edit_widget" msgid="9030848101135393954">"ವಿಜೆಟ್ ಅನ್ನು ಎಡಿಟ್ ಮಾಡಿ"</string>
@@ -496,12 +490,11 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"ವಿಜೆಟ್ ಅನ್ನು ಆಯ್ಕೆ ಮಾಡಿ"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"ವಿಜೆಟ್ ಅನ್ನು ತೆಗೆದುಹಾಕಿ"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"ಆಯ್ಕೆಮಾಡಿದ ವಿಜೆಟ್ ಅನ್ನು ಇರಿಸಿ"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
- <skip />
+ <string name="communal_widget_picker_title" msgid="1953369090475731663">"ಲಾಕ್ ಸ್ಕ್ರೀನ್ ವಿಜೆಟ್‌ಗಳು"</string>
+ <string name="communal_widget_picker_description" msgid="490515450110487871">"ನಿಮ್ಮ ಟ್ಯಾಬ್ಲೆಟ್ ಲಾಕ್ ಆಗಿದ್ದರೂ ಸಹ ಯಾರಾದರೂ ನಿಮ್ಮ ಲಾಕ್ ಸ್ಕ್ರೀನ್‌ನಲ್ಲಿ ವಿಜೆಟ್‌ಗಳನ್ನು ವೀಕ್ಷಿಸಬಹುದು."</string>
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"ಲಾಕ್ ಸ್ಕ್ರೀನ್ ವಿಜೆಟ್‌ಗಳು"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"ವಿಜೆಟ್ ಅನ್ನು ಬಳಸಿಕೊಂಡು ಆ್ಯಪ್ ತೆರೆಯಲು, ಇದು ನೀವೇ ಎಂದು ನೀವು ದೃಢೀಕರಿಸಬೇಕಾಗುತ್ತದೆ. ಅಲ್ಲದೆ, ನಿಮ್ಮ ಟ್ಯಾಬ್ಲೆಟ್ ಲಾಕ್ ಆಗಿದ್ದರೂ ಸಹ ಯಾರಾದರೂ ಅವುಗಳನ್ನು ವೀಕ್ಷಿಸಬಹುದು ಎಂಬುದನ್ನು ನೆನಪಿನಲ್ಲಿಡಿ. ಕೆಲವು ವಿಜೆಟ್‌ಗಳು ನಿಮ್ಮ ಲಾಕ್ ಸ್ಕ್ರೀನ್‌ಗಾಗಿ ಉದ್ದೇಶಿಸದೇ ಇರಬಹುದು ಮತ್ತು ಇಲ್ಲಿ ಸೇರಿಸುವುದು ಸುರಕ್ಷಿತವಲ್ಲದಿರಬಹುದು."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"ಅರ್ಥವಾಯಿತು"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"ಬಳಕೆದಾರರನ್ನು ಬದಲಿಸಿ"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"ಪುಲ್‌ಡೌನ್ ಮೆನು"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"ಈ ಸೆಶನ್‌ನಲ್ಲಿನ ಎಲ್ಲಾ ಆ್ಯಪ್‌ಗಳು ಮತ್ತು ಡೇಟಾವನ್ನು ಅಳಿಸಲಾಗುತ್ತದೆ."</string>
@@ -723,7 +716,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"ಡೀಫಾಲ್ಟ್"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"ಸ್ವಯಂಚಾಲಿತ"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"ಯಾವುದೇ ಧ್ವನಿ ಅಥವಾ ವೈಬ್ರೇಷನ್‌ ಆಗುವುದಿಲ್ಲ"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"ಯಾವುದೇ ಧ್ವನಿ ಅಥವಾ ವೈಬ್ರೇಷನ್‌ ಆಗುವುದಿಲ್ಲ, ಸಂಭಾಷಣೆ ವಿಭಾಗದ ಕೆಳಭಾಗದಲ್ಲಿ ಗೋಚರಿಸುತ್ತದೆ"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"ಸೆಟ್ಟಿಂಗ್‌ಗಳನ್ನು ಆಧರಿಸಿ ಸಾಧನ ರಿಂಗ್ ಅಥವಾ ವೈಬ್ರೇಟ್ ಆಗುತ್ತದೆ"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"ಸೆಟ್ಟಿಂಗ್‌ಗಳನ್ನು ಆಧರಿಸಿ ಫೋನ್ ರಿಂಗ್ ಅಥವಾ ವೈಬ್ರೇಟ್ ಆಗುತ್ತದೆ. ಡಿಫಾಲ್ಟ್ ಆಗಿ, <xliff:g id="APP_NAME">%1$s</xliff:g> ಬಬಲ್ ಸಂಭಾಷಣೆಗಳು."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"ಈ ಅಧಿಸೂಚನೆಯು ಶಬ್ದ ಮಾಡಬೇಕೇ ಅಥವಾ ವೈಬ್ರೇಟ್ ಮಾಡಬೇಕೇ ಎಂಬುದನ್ನು ನಿರ್ಧರಿಸುವ ಅವಕಾಶವನ್ನು ಸಿಸ್ಟಂಗೆ ನೀಡಿ"</string>
@@ -780,6 +774,7 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page Down"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Delete"</string>
+ <string name="keyboard_key_esc" msgid="6230365950511411322">"Esc"</string>
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1362,20 +1357,18 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"ಸ್ಪ್ಲಿಟ್ ಸ್ಕ್ರೀನ್"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"ಇನ್‌ಪುಟ್"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"ಆ್ಯಪ್ ಶಾರ್ಟ್‌ಕಟ್‌ಗಳು"</string>
+ <string name="shortcut_helper_category_current_app_shortcuts" msgid="4017840565974573628">"ಪ್ರಸ್ತುತ ಆ್ಯಪ್"</string>
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"ಆ್ಯಕ್ಸೆಸಿಬಿಲಿಟಿ"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"ಕೀಬೋರ್ಡ್ ಶಾರ್ಟ್‌ಕಟ್‌ಗಳು"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"ಹುಡುಕಾಟದ ಶಾರ್ಟ್‌ಕಟ್‌ಗಳು"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"ಕುಗ್ಗಿಸುವ ಐಕಾನ್"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"ವಿಸ್ತೃತಗೊಳಿಸುವ ಐಕಾನ್"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"ಅಥವಾ"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"ಹಿಂಬದಿ ಗೆಸ್ಚರ್"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"ಹೋಮ್ ಗೆಸ್ಚರ್"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"ಆ್ಯಕ್ಷನ್‌ ಕೀ"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"ಮುಗಿದಿದೆ"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"ಭೇಷ್!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"ಹಿಂತಿರುಗಿ"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"ಹಿಂತಿರುಗಲು, ಟಚ್‌ಪ್ಯಾಡ್‌ನಲ್ಲಿ ಎಲ್ಲಿಯಾದರೂ ಮೂರು ಬೆರಳುಗಳನ್ನು ಬಳಸಿ ಎಡ ಅಥವಾ ಬಲಕ್ಕೆ ಸ್ವೈಪ್ ಮಾಡಿ."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"ಮೂರು ಬೆರಳುಗಳು ಬಲಕ್ಕೆ ಮತ್ತು ಎಡಕ್ಕೆ ಚಲಿಸುತ್ತಿರುವುದನ್ನು ತೋರಿಸುತ್ತಿರುವ ಟಚ್‌ಪ್ಯಾಡ್"</string>
@@ -1384,4 +1377,5 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"%2$d ರಲ್ಲಿ %1$d ಮಟ್ಟ"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"ಮನೆ ನಿಯಂತ್ರಣಗಳು"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"ಮನೆ ನಿಯಂತ್ರಣವನ್ನು ಸ್ಕ್ರೀನ್‌ಸೇವರ್‌ನಂತೆ ಬೇಗ ಆ್ಯಕ್ಸೆಸ್ ಮಾಡಿ"</string>
+ <string name="volume_undo_action" msgid="5815519725211877114">"ರದ್ದುಗೊಳಿಸಿ"</string>
</resources>
diff --git a/packages/SystemUI/res/values-kn/tiles_states_strings.xml b/packages/SystemUI/res/values-kn/tiles_states_strings.xml
index afc7c1a10e0e..b2a75231d589 100644
--- a/packages/SystemUI/res/values-kn/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-kn/tiles_states_strings.xml
@@ -56,6 +56,11 @@
<item msgid="5376619709702103243">"ಆಫ್"</item>
<item msgid="4875147066469902392">"ಆನ್"</item>
</string-array>
+ <string-array name="tile_states_modes">
+ <item msgid="7764936419245199023">"ಲಭ್ಯವಿಲ್ಲ"</item>
+ <item msgid="2004750556637773692">"ಆಫ್ ಆಗಿದೆ"</item>
+ <item msgid="8968530753931637871">"ಆನ್ ಆಗಿದೆ"</item>
+ </string-array>
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"ಲಭ್ಯವಿಲ್ಲ"</item>
<item msgid="5044688398303285224">"ಆಫ್"</item>
@@ -188,7 +193,7 @@
</string-array>
<string-array name="tile_states_hearing_devices">
<item msgid="1235334096484287173">"ಲಭ್ಯವಿಲ್ಲ"</item>
- <item msgid="3079622119444911877">"ಆಫ್ ಆಗಿದೆ"</item>
+ <item msgid="3079622119444911877">"ಆಫ್"</item>
<item msgid="3028994095749238254">"ಆನ್"</item>
</string-array>
</resources>
diff --git a/packages/SystemUI/res/values-ko/strings.xml b/packages/SystemUI/res/values-ko/strings.xml
index dc1ebf1b2da9..764748632b0e 100644
--- a/packages/SystemUI/res/values-ko/strings.xml
+++ b/packages/SystemUI/res/values-ko/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g>에서 이 스크린샷을 감지했습니다."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> 및 기타 공개 앱에서 이 스크린샷을 감지했습니다."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"메모에 추가"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"링크 포함"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"화면 녹화"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"화면 녹화 처리 중"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"화면 녹화 세션에 관한 지속적인 알림"</string>
@@ -127,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"탭하여 보기"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"화면 녹화 저장 중에 오류가 발생했습니다."</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"화면 녹화 시작 중 오류 발생"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; 녹화가 중단됩니다."</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"녹화 중지"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"화면 공유 중"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"화면 공유를 중지하시겠습니까?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; 공유가 중단됩니다."</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"공유 중지"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"화면 전송 중"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"전송을 중지할까요?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"화면 전송 중"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; 전송이 중단됩니다."</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"전송 중지"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"닫기"</string>
<string name="issuerecord_title" msgid="286627115110121849">"문제 녹화 도구"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"문제 녹화 처리 중"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"문제 수집 섹션에 대한 진행 중 알림"</string>
@@ -162,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"문제 녹화 저장 중에 오류가 발생했습니다."</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"문제 녹화 시작 중에 오류가 발생했습니다."</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"전체 화면 모드"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"종료하려면 화면 상단에서 아래로 스와이프합니다."</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"확인"</string>
<string name="accessibility_back" msgid="6530104400086152611">"뒤로"</string>
<string name="accessibility_home" msgid="5430449841237966217">"홈"</string>
@@ -196,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"얼굴 인식으로 잠금 해제되었습니다. 계속하려면 누르세요."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"얼굴이 인식되었습니다. 계속하려면 누르세요."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"얼굴이 인식되었습니다. 계속하려면 아이콘을 누르세요."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"얼굴 인식으로 잠금 해제되었습니다. 계속하려면 탭하세요."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"인증됨"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"인증 취소"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"옵션 더보기"</string>
@@ -297,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"화면 보호기"</string>
<string name="ethernet_label" msgid="2203544727007463351">"이더넷"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"방해 금지 모드"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"블루투스"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"페어링된 기기가 없습니다"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"기기를 연결 또는 연결 해제하려면 탭하세요"</string>
@@ -308,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"저장됨"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"연결 해제"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"실행"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"내일 자동으로 사용 설정"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Quick Share, 내 기기 찾기 등의 기능에서 블루투스를 사용합니다."</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"블루투스가 내일 아침에 켜집니다."</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"오디오 공유"</string>
@@ -478,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"더 많은 위젯 추가"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"위젯을 맞춤설정하려면 길게 누르기"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"위젯 맞춤설정"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"위젯을 맞춤설정하려면 잠금 해제하세요."</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"사용 중지된 위젯의 앱 아이콘"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"설치 중인 위젯의 앱 아이콘"</string>
<string name="edit_widget" msgid="9030848101135393954">"위젯 수정"</string>
@@ -498,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"위젯 선택"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"위젯 삭제"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"선택한 위젯 배치"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"잠금 화면 위젯"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"위젯을 사용하여 앱을 열려면 본인 인증을 해야 합니다. 또한 태블릿이 잠겨 있더라도 누구나 볼 수 있다는 점을 유의해야 합니다. 일부 위젯은 잠금 화면에 적합하지 않고 여기에 추가하기에 안전하지 않을 수 있습니다."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"확인"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"사용자 전환"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"풀다운 메뉴"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"이 세션에 있는 모든 앱과 데이터가 삭제됩니다."</string>
@@ -725,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"기본값"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"자동"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"소리 또는 진동 없음"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"소리나 진동이 울리지 않으며 대화 섹션 하단에 표시됨"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"기기 설정에 따라 벨소리나 진동이 울릴 수 있음"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"기기 설정에 따라 벨소리나 진동이 울릴 수 있습니다. 기본적으로 <xliff:g id="APP_NAME">%1$s</xliff:g>의 대화는 대화창으로 표시됩니다."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"시스템에서 알림 시 소리 또는 진동을 사용할지 결정하도록 허용합니다."</string>
@@ -782,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page Down"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Delete"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1364,26 +1374,27 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"화면 분할"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"입력"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"앱 바로가기"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"접근성"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"단축키"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"검색 바로가기"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"접기 아이콘"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"확장 아이콘"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"또는"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"뒤로 동작"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"홈 동작"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"작업 키"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"완료"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"아주 좋습니다."</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"뒤로"</string>
- <string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"돌아가려면 터치패드의 아무 곳이나 세 손가락으로 왼쪽 또는 오른쪽으로 스와이프합니다."</string>
+ <string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"돌아가려면 세 손가락을 사용해 터치패드의 아무 곳이나 왼쪽 또는 오른쪽으로 스와이프합니다."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"터치패드에서 세 손가락을 좌우로 움직이는 모습"</string>
- <string name="touchpad_back_gesture_screen_animation_content_description" msgid="4036267494237748710">"뒤로 동작 애니메이션이 표시된 기기 화면"</string>
+ <string name="touchpad_back_gesture_screen_animation_content_description" msgid="4036267494237748710">"뒤로 동작 애니메이션을 보여 주는 기기 화면"</string>
<string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"키보드 백라이트"</string>
<string name="keyboard_backlight_value" msgid="7336398765584393538">"%2$d단계 중 %1$d단계"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"홈 컨트롤"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"화면 보호기로 홈 컨트롤에 빠르게 액세스하기"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-ko/tiles_states_strings.xml b/packages/SystemUI/res/values-ko/tiles_states_strings.xml
index bc4740dbc23a..9116085bb0b9 100644
--- a/packages/SystemUI/res/values-ko/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-ko/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"꺼짐"</item>
<item msgid="4875147066469902392">"켜짐"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"이용 불가"</item>
<item msgid="5044688398303285224">"꺼짐"</item>
diff --git a/packages/SystemUI/res/values-ky/strings.xml b/packages/SystemUI/res/values-ky/strings.xml
index 9a4920152b60..d1aa663d83cc 100644
--- a/packages/SystemUI/res/values-ky/strings.xml
+++ b/packages/SystemUI/res/values-ky/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> ушул скриншотту аныктады."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> жана ачылып турган башка колдонмолор ушул скриншотту аныктады."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Кыска жазууга кошуу"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Шилтеме кошуу"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Экрандан видео жаздырып алуу"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Экрандан жаздырылып алынган видео иштетилүүдө"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Экранды жаздыруу сеансы боюнча учурдагы билдирме"</string>
@@ -127,31 +126,27 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Көрүү үчүн таптаңыз"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Экран тартылган жок"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Экранды жаздырууну баштоодо ката кетти"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
- <skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
- <skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; колдонмосун жаздырууну токтотосуз"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
- <skip />
+ <string name="screenrecord_stop_dialog_title" msgid="8716193661764511095">"Жаздырууну токтотосузбу?"</string>
+ <string name="screenrecord_stop_dialog_message" msgid="6262768207331626817">"Учурда бүтүндөй экраныңызды жаздырып жатасыз"</string>
+ <string name="screenrecord_stop_dialog_message_specific_app" msgid="5995770227684523244">"Учурда <xliff:g id="APP_NAME">%1$s</xliff:g> колдонмосун жаздырып жатасыз"</string>
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Жаздырууну токтотуу"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Экран бөлүшүлүүдө"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
- <skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
- <skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; колдонмосун бөлүшүүнү токтотосуз"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
- <skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Тышкы экранга чыгарылууда"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
- <skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
- <skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; колдонмосун тышкы экранга чыгарууну токтотосуз"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
- <skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
- <skip />
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Экранды бөлүшүү токтотулсунбу?"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen_with_host_app" msgid="522823522115375414">"Учурда бүтүндөй экраныңызды <xliff:g id="HOST_APP_NAME">%1$s</xliff:g> менен бөлүшүп жатасыз"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen" msgid="5090115386271179270">"Учурда бүтүндөй экраныңызды колдонмо менен бөлүшүп жатасыз"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_specific" msgid="5923772039347985172">"Учурда <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> колдонмосун бөлүшүп жатасыз"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_generic" msgid="6681016774654578261">"Учурда колдонмону бөлүшүп жатасыз"</string>
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Бөлүшүүнү токтотуу"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Тышкы экранга чыгарылууда"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Тышкы экранга чыгаруу токтотулсунбу?"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen_with_device" msgid="1474703115926205251">"Учурда бүтүндөй экраныңызды <xliff:g id="DEVICE_NAME">%1$s</xliff:g> түзмөгүнө чыгарып жатасыз"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen" msgid="8419219169553867625">"Учурда бүтүндөй экраныңызды жакын жердеги түзмөккө чыгарып жатасыз"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app_with_device" msgid="2715934698604085519">"Учурда <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> контентин <xliff:g id="DEVICE_NAME">%2$s</xliff:g> түзмөгүнө чыгарып жатасыз"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="8616103075630934513">"<xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> контентин жакын жердеги түзмөккө чыгарып жатасыз"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic_with_device" msgid="9213582497852420203">"Учурда <xliff:g id="DEVICE_NAME">%1$s</xliff:g> түзмөгүнө чыгарып жатасыз"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic" msgid="4100272100480415076">"Учурда жакын жердеги түзмөккө чыгарып жатасыз"</string>
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Тышкы экранга чыгарууну токтотуу"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Жабуу"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Маселе жаздыргыч"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Маселе жаздырылууда"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Маселе тууралуу маалымат чогултулуп жатканы жөнүндө учурдагы билдирме"</string>
@@ -162,8 +157,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Жаздырылган маселе сакталган жок"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Башталбай койду"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Толук экран режимин көрүү"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Чыгуу үчүн экранды өйдө жагынан ылдый сүрүп коюңуз"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"Түшүндүм"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Артка"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Үйгө"</string>
@@ -196,8 +190,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Кулпуну жүзүңүз менен ачтыңыз. Улантуу үчүн басыңыз."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Жүз таанылды. Улантуу үчүн басыңыз."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Жүз таанылды. Улантуу үчүн кулпусун ачуу сүрөтчөсүн басыңыз."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Кулпусун жүзүңүз менен ачтыңыз. Улантуу үчүн таптап коюңуз."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Аныктыгы текшерилди"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Аныктыгын текшерүүнү жокко чыгаруу"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Дагы параметрлер"</string>
@@ -297,6 +290,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Көшөгө"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Тынчымды алба"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Жупташкан түзмөктөр жок"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Түзмөктү туташтыруу же ажыратуу үчүн таптаңыз"</string>
@@ -308,8 +303,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Сакталды"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"ажыратуу"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"иштетүү"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Эртең автоматтык түрдө күйгүзүлсүн"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Bluetooth Тез бөлүшүү жана Түзмөгүм кайда? сыяктуу функцияларда колдонулат"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bluetooth эртең таңда күйөт"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Чогуу угуу"</string>
@@ -478,8 +472,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Көбүрөөк виджеттерди кошуу"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Виджеттерди ыңгайлаштыруу үчүн кое бербей басып туруңуз"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Виджеттерди ыңгайлаштыруу"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Виджеттерди ыңгайлаштыруу үчүн кулпуну ачыңыз"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Өчүрүлгөн виджет үчүн колдонмонун сүрөтчөсү"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Виджет үчүн колдонмонун сүрөтчөсү орнотулууда"</string>
<string name="edit_widget" msgid="9030848101135393954">"Виджетти түзөтүү"</string>
@@ -498,12 +491,11 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"виджет тандоо"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"виджетти алып салуу"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"тандалган виджетти жайгаштыруу"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
- <skip />
+ <string name="communal_widget_picker_title" msgid="1953369090475731663">"Кулпуланган экрандагы виджеттер"</string>
+ <string name="communal_widget_picker_description" msgid="490515450110487871">"Планшетиңиз кулпуланган болсо да, кулпуланган экраныңыздан виджеттерди бардыгы көрө алат."</string>
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Кулпуланган экрандагы виджеттер"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Колдонмону виджет аркылуу ачуу үчүн бул сиз экениңизди ырасташыңыз керек. Аларды планшетиңиз кулпуланып турса да, баары көрө аларын эске алыңыз. Айрым виджеттер кулпуланган экранда колдонууга арналган эмес жана аларды бул жерге кошуу кооптуу болушу мүмкүн."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"Түшүндүм"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Колдонуучуну которуу"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"ылдый түшүүчү меню"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Бул сеанстагы бардык колдонмолор жана аларга байланыштуу нерселер өчүрүлөт."</string>
@@ -725,7 +717,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Демейки"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Автоматтык"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Үнү чыкпайт жана дирилдебейт"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Үнү чыкпайт же дирилдебейт жана сүйлөшүүлөр тизмесинин ылдый жагында көрүнөт"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Түзмөктүн параметрлерине жараша шыңгырап же дирилдеши мүмкүн"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Түзмөктүн параметрлерине жараша шыңгырап же дирилдеши мүмкүн. <xliff:g id="APP_NAME">%1$s</xliff:g> колдонмосундагы сүйлөшүүлөр демейки шартта калкып чыкма билдирмелер болуп көрүнөт."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Билдирменин үнүн чыгартууну же басууну системага тапшырыңыз"</string>
@@ -782,6 +775,7 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page Down"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Өчүрүү"</string>
+ <string name="keyboard_key_esc" msgid="6230365950511411322">"Esc"</string>
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Башкы бет"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"Бүтүрүү"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1364,20 +1358,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Экранды бөлүү"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Киргизүү"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Колдонмодогу кыска жолдор"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Атайын мүмкүнчүлүктөр"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Ыкчам баскычтар"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Ыкчам баскычтарды издөө"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Жыйыштыруу сүрөтчөсү"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Жайып көрсөтүү сүрөтчөсү"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"же"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Артка кайтуу жаңсоосу"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Башкы бетке өтүү жаңсоосу"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Аракет баскычы"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Бүттү"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Азаматсыз!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Артка кайтуу"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Кайтуу үчүн сенсордук тактанын каалаган жерин үч манжаңыз менен солго же оңго сүрүңүз."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Үч манжанын оңго жана солго жылып жатканы көрсөтүлгөн сенсордук такта"</string>
@@ -1386,4 +1379,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"%2$d ичинен %1$d-деңгээл"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Үйдөгү түзмөктөрдү тескөө"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Үйдөгү түзмөктөрдү көшөгөдөн ыкчам тескеңиз"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-ky/tiles_states_strings.xml b/packages/SystemUI/res/values-ky/tiles_states_strings.xml
index 694967e3d8d6..d92f787b286b 100644
--- a/packages/SystemUI/res/values-ky/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-ky/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Өчүк"</item>
<item msgid="4875147066469902392">"Күйүк"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Жеткиликсиз"</item>
<item msgid="5044688398303285224">"Өчүк"</item>
diff --git a/packages/SystemUI/res/values-lo/strings.xml b/packages/SystemUI/res/values-lo/strings.xml
index 22dcbe266ae3..5abef943ff51 100644
--- a/packages/SystemUI/res/values-lo/strings.xml
+++ b/packages/SystemUI/res/values-lo/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> ກວດພົບຮູບໜ້າຈໍນີ້."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> ແລະ ແອັບອື່ນໆທີ່ເປີດຢູ່ກວດພົບຮູບໜ້າຈໍນີ້."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"ເພີ່ມໃສ່ບັນທຶກ"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"ຮວມລິ້ງ"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"ໂປຣແກຣມບັນທຶກໜ້າຈໍ"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"ກຳລັງປະມວນຜົນການບັນທຶກໜ້າຈໍ"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"ການແຈ້ງເຕືອນສຳລັບເຊດຊັນການບັນທຶກໜ້າຈໍໃດໜຶ່ງ"</string>
@@ -127,31 +126,27 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"ແຕະເພື່ອເບິ່ງ"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"ເກີດຂໍ້ຜິດພາດໃນການບັນທຶກໜ້າຈໍ"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"ເກີດຄວາມຜິດພາດໃນການບັນທຶກໜ້າຈໍ"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
- <skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
- <skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"ທ່ານຈະຢຸດການບັນທຶກ &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
- <skip />
+ <string name="screenrecord_stop_dialog_title" msgid="8716193661764511095">"ຢຸດການບັນທຶກບໍ?"</string>
+ <string name="screenrecord_stop_dialog_message" msgid="6262768207331626817">"ທ່ານກຳລັງບັນທຶກທັງໝົດໜ້າຈໍຂອງທ່ານ"</string>
+ <string name="screenrecord_stop_dialog_message_specific_app" msgid="5995770227684523244">"ທ່ານກຳລັງບັນທຶກ <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"ຢຸດການບັນທຶກ"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"ກຳລັງແບ່ງປັນໜ້າຈໍ"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
- <skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
- <skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"ທ່ານຈະຢຸດການແບ່ງປັນ &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
- <skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"ກຳລັງສົ່ງສັນຍານໜ້າຈໍ"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
- <skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
- <skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"ທ່ານຈະຢຸດການສົ່ງສັນຍານ &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
- <skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
- <skip />
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"ຢຸດການແບ່ງປັນໜ້າຈໍບໍ?"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen_with_host_app" msgid="522823522115375414">"ທ່ານກຳລັງແບ່ງປັນທັງໝົດໜ້າຈໍຂອງທ່ານກັບ <xliff:g id="HOST_APP_NAME">%1$s</xliff:g>"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen" msgid="5090115386271179270">"ທ່ານກຳລັງແບ່ງປັນທັງໝົດໜ້າຈໍຂອງທ່ານກັບແອັບ"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_specific" msgid="5923772039347985172">"ທ່ານກຳລັງແບ່ງປັນ <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g>"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_generic" msgid="6681016774654578261">"ທ່ານກຳລັງແບ່ງປັນແອັບ"</string>
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"ຢຸດການແບ່ງປັນ"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"ກຳລັງສົ່ງສັນຍານໜ້າຈໍ"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"ຢຸດການສົ່ງສັນຍານບໍ?"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen_with_device" msgid="1474703115926205251">"ທ່ານກຳລັງສົ່ງສັນຍານທັງໝົດໜ້າຈໍຂອງທ່ານໄປຫາ <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen" msgid="8419219169553867625">"ທ່ານກຳລັງສົ່ງສັນຍານທັງໝົດໜ້າຈໍຂອງທ່ານໄປຫາອຸປະກອນທີ່ຢູ່ໃກ້ຄຽງ"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app_with_device" msgid="2715934698604085519">"ທ່ານກຳລັງສົ່ງສັນຍານ <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> ໄປຫາ <xliff:g id="DEVICE_NAME">%2$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="8616103075630934513">"ທ່ານກຳລັງສົ່ງສັນຍານ <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> ໄປຫາອຸປະກອນທີ່ຢູ່ໃກ້ຄຽງ"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic_with_device" msgid="9213582497852420203">"ທ່ານກຳລັງສົ່ງສັນຍານໄປຫາ <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic" msgid="4100272100480415076">"ທ່ານກຳລັງສົ່ງສັນຍານໄປຫາອຸປະກອນທີ່ຢູ່ໃກ້ຄຽງ"</string>
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"ຢຸດການສົ່ງສັນຍານ"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"ປິດ"</string>
<string name="issuerecord_title" msgid="286627115110121849">"ຕົວບັນທຶກບັນຫາ"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"ກຳລັງປະມວນຜົນການບັນທຶກບັນຫາ"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"ການແຈ້ງເຕືອນທີ່ດຳເນີນຢູ່ສຳລັບເຊດຊັນການຮວບຮວມບັນຫາ"</string>
@@ -162,8 +157,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"ເກີດຂໍ້ຜິດພາດໃນການບັນທຶກບັນຫາ"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"ເກີດຂໍ້ຜິດພາດໃນການເລີ່ມຕົ້ນການບັນທຶກບັນຫາ"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"ກຳລັງ​ເບິ່ງ​ເຕັມ​​ຈໍ"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"ເພື່ອອອກ, ໃຫ້ປັດລົງຈາກເທິງສຸດຂອງໜ້າຈໍຂອງທ່ານ"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"ເຂົ້າໃຈແລ້ວ"</string>
<string name="accessibility_back" msgid="6530104400086152611">"ກັບຄືນ"</string>
<string name="accessibility_home" msgid="5430449841237966217">"ໜ້າທຳອິດ"</string>
@@ -196,8 +190,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"ປົດລັອກດ້ວຍໜ້າແລ້ວ. ກົດເພື່ອສືບຕໍ່."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"ຈຳແນກໜ້າໄດ້ແລ້ວ. ກົດເພື່ອສືບຕໍ່."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"ຈຳແນກໜ້າໄດ້ແລ້ວ. ກົດໄອຄອນປົດລັອກເພື່ອສືບຕໍ່."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"ປົດລັອກດ້ວຍໃບໜ້າແລ້ວ. ແຕະເພື່ອສືບຕໍ່."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"ຮັບຮອງຄວາມຖືກຕ້ອງແລ້ວ"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"ຍົກເລີກການພິສູດຢືນຢັນ"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"ຕົວເລືອກເພີ່ມເຕີມ"</string>
@@ -297,6 +290,8 @@
<string name="start_dreams" msgid="9131802557946276718">"ພາບພັກໜ້າຈໍ"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"ຫ້າມລົບກວນ"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"ບໍ່​ມີ​ອຸ​ປະ​ກອນ​ທີ່​ສາ​ມາດ​ຈັບ​ຄູ່​ໄດ້"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"ແຕະເພື່ອເຊື່ອມຕໍ່ ຫຼື ຕັດການເຊື່ອມຕໍ່ອຸປະກອນ"</string>
@@ -308,8 +303,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"ບັນທຶກແລ້ວ"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"ຕັດການເຊື່ອມຕໍ່"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"ເປີດນຳໃຊ້"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"ເປີດໂດຍອັດຕະໂນມັດໃນມື້ອື່ນ"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"ຄຸນສົມບັດຕ່າງໆໃຊ້ Bluetooth ເຊັ່ນ: ການແຊຣ໌ດ່ວນ ແລະ ຊອກຫາອຸປະກອນຂອງຂ້ອຍ"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bluetooth ຈະເປີດມື້ອື່ນເຊົ້າ"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"ແບ່ງປັນສຽງ"</string>
@@ -478,8 +472,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"ເພີ່ມວິດເຈັດເພີ່ມເຕີມ"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"ກົດຄ້າງໄວ້ເພື່ອປັບແຕ່ງວິດເຈັດ"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"ປັບແຕ່ງວິດເຈັດ"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"ປົດລັອກເພື່ອປັບແຕ່ງວິດເຈັດ"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"ໄອຄອນແອັບສຳລັບວິດເຈັດທີ່ຖືກປິດການນຳໃຊ້"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"ກຳລັງຕິດຕັ້ງໄອຄອນແອັບສຳລັບວິດເຈັດ"</string>
<string name="edit_widget" msgid="9030848101135393954">"ແກ້ໄຂວິດເຈັດ"</string>
@@ -498,12 +491,11 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"ເລືອກວິດເຈັດ"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"ລຶບວິດເຈັດອອກ"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"ວາງວິດເຈັດທີ່ເລືອກ"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
- <skip />
+ <string name="communal_widget_picker_title" msgid="1953369090475731663">"ວິດເຈັດໃນໜ້າຈໍລັອກ"</string>
+ <string name="communal_widget_picker_description" msgid="490515450110487871">"ທຸກຄົນສາມາດເບິ່ງວິດເຈັດຢູ່ໜ້າຈໍລັອກຂອງທ່ານໄດ້, ເຖິງແມ່ນວ່າແທັບເລັດຂອງທ່ານຈະລັອກຢູ່ກໍຕາມ."</string>
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"ວິດເຈັດໃນໜ້າຈໍລັອກ"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"ເພື່ອເປີດແອັບໂດຍໃຊ້ວິດເຈັດ, ທ່ານຈະຕ້ອງຢັ້ງຢືນວ່າແມ່ນທ່ານ. ນອກຈາກນັ້ນ, ກະລຸນາຮັບຊາບວ່າທຸກຄົນສາມາດເບິ່ງຂໍ້ມູນດັ່ງກ່າວໄດ້, ເຖິງແມ່ນວ່າແທັບເລັດຂອງທ່ານຈະລັອກຢູ່ກໍຕາມ. ວິດເຈັດບາງຢ່າງອາດບໍ່ໄດ້ມີໄວ້ສຳລັບໜ້າຈໍລັອກຂອງທ່ານ ແລະ ອາດບໍ່ປອດໄພທີ່ຈະເພີ່ມໃສ່ບ່ອນນີ້."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"ເຂົ້າໃຈແລ້ວ"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"ສະຫຼັບຜູ້ໃຊ້"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"ເມນູແບບດຶງລົງ"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"ແອັບຯ​ແລະ​ຂໍ້​ມູນ​ທັງ​ໝົດ​ໃນ​ເຊດ​ຊັນ​ນີ້​ຈະ​ຖືກ​ລຶບ​ອອກ."</string>
@@ -725,7 +717,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"ຄ່າເລີ່ມຕົ້ນ"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"ອັດຕະໂນມັດ"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"ບໍ່ມີສຽງ ຫຼື ການສັ່ນເຕືອນ"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"ບໍ່ມີສຽງ ຫຼື ການສັ່ນເຕືອນ ແລະ ປາກົດຢູ່ທາງລຸ່ມຂອງພາກສ່ວນການສົນທະນາ"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"ອາດສົ່ງສຽງ ຫຼື ສັ່ນເຕືອນໂດຍອ້າງອີງຈາກການຕັ້ງຄ່າອຸປະກອນ"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"ອາດສົ່ງສຽງ ຫຼື ສັ່ນເຕືອນໂດຍອ້າງອີງຈາກການຕັ້ງຄ່າອຸປະກອນ. ການສົນທະນາຈາກ <xliff:g id="APP_NAME">%1$s</xliff:g> ຈະເປັນ bubble ຕາມຄ່າເລີ່ມຕົ້ນ."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"ໃຫ້ລະບົບກຳນົດວ່າການແຈ້ງເຕືອນນິ້ຄວນມີສຽງ ຫຼື ສັ່ນເຕືອນຫຼືບໍ່"</string>
@@ -782,6 +775,7 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page Down"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Delete"</string>
+ <string name="keyboard_key_esc" msgid="6230365950511411322">"Esc"</string>
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1364,20 +1358,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"ແບ່ງໜ້າຈໍ"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"ອິນພຸດ"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"ທາງລັດແອັບ"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"ການຊ່ວຍເຂົ້າເຖິງ"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"ຄີລັດ"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"ທາງລັດການຊອກຫາ"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"ໄອຄອນຫຍໍ້ລົງ"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"ໄອຄອນຂະຫຍາຍ"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"ຫຼື"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"ທ່າທາງສຳລັບກັບຄືນ"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"ທ່າທາງສຳລັບໜ້າຫຼັກ"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"ປຸ່ມຄຳສັ່ງ"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"ແລ້ວໆ"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"ດີຫຼາຍ!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"ກັບຄືນ"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"ເພື່ອກັບຄືນ, ໃຫ້ໃຊ້ 3 ນິ້ວປັດຊ້າຍ ຫຼື ຂວາບ່ອນໃດກໍໄດ້ເທິງແຜ່ນສໍາຜັດ."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"ແຜ່ນສໍາຜັດສະແດງພາບ 3 ນິ້ວເລື່ອນໄປທາງຂວາ ແລະ ຊ້າຍ"</string>
@@ -1386,4 +1379,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"ລະດັບທີ %1$d ຈາກ %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"ການຄວບຄຸມເຮືອນ"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"ເຂົ້າເຖິງການຄວບຄຸມເຮືອນຂອງທ່ານໄດ້ຢ່າງວ່ອງໄວຢູ່ພາບພັກໜ້າຈໍ"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-lo/tiles_states_strings.xml b/packages/SystemUI/res/values-lo/tiles_states_strings.xml
index 9386e00af195..f33514af191f 100644
--- a/packages/SystemUI/res/values-lo/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-lo/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"ປິດ"</item>
<item msgid="4875147066469902392">"ເປີດ"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"ບໍ່ສາມາດໃຊ້ໄດ້"</item>
<item msgid="5044688398303285224">"ປິດ"</item>
diff --git a/packages/SystemUI/res/values-lt/strings.xml b/packages/SystemUI/res/values-lt/strings.xml
index eef54d1ace10..a395f2d2e4b9 100644
--- a/packages/SystemUI/res/values-lt/strings.xml
+++ b/packages/SystemUI/res/values-lt/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"„<xliff:g id="APPNAME">%1$s</xliff:g>“ aptiko šią ekrano kopiją."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"„<xliff:g id="APPNAME">%1$s</xliff:g>“ ir kitos atidarytos programos aptiko šią ekrano kopiją."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Pridėti prie užrašo"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Įtraukti nuorodą"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Ekrano vaizdo įrašytuvas"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Apdorojam. ekrano vaizdo įraš."</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Šiuo metu rodomas ekrano įrašymo sesijos pranešimas"</string>
@@ -127,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Palieskite, kad peržiūrėtumėte"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Išsaugant ekrano įrašą įvyko klaida"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Pradedant ekrano vaizdo įrašymą iškilo problema"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Programos (&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;) turinio įrašymas bus sustabdytas."</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Sustabdyti įrašymą"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Bendrinamas ekranas"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Nebebendrinti ekrano?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Programos (&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;) turinio bendrinimas bus sustabdytas."</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Nebebendrinti"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Perduodamas ekranas"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Sustabdyti perdavimą?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Perduodamas ekranas"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Programos (&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;) turinio perdavimas bus sustabdytas."</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Sustabdyti perdavimą"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Uždaryti"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Problemų įrašytuvas"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Apdorojamas problemos įrašas"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Šiuo metu rodomas problemos duomenų rinkimo seanso pranešimas"</string>
@@ -162,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Išsaugant problemos įrašą įvyko klaida"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Pradedant problemos įrašą įvyko klaida"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Peržiūrima viso ekrano režimu"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Jei norite išeiti, perbraukite žemyn nuo ekrano viršaus"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"Supratau"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Atgal"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Pagrindinis"</string>
@@ -196,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Atrakinta pagal veidą. Paspauskite, jei norite tęsti."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Veidas atpažintas. Paspauskite, jei norite tęsti."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Veidas atpažintas. Tęskite paspaudę atrakinimo piktogramą."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Atrakinta pagal veidą. Palieskite ir tęskite."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Autentifikuota"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Atšaukti autentifikavimą"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Daugiau parinkčių"</string>
@@ -297,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Ekrano užsklanda"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Eternetas"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Netrukdymo režimas"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Nėra pasiekiamų susietų įrenginių"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Palieskite, kad prijungtumėte ar atjungtumėte įrenginį"</string>
@@ -308,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Išsaugota"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"atjungti"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"suaktyvinti"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Automatiškai įjungti rytoj"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Tokioms funkcijoms kaip „Spartusis bendrinimas“ ir „Rasti įrenginį“ naudojamas „Bluetooth“ ryšys"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"„Bluetooth“ ryšys bus įjungtas rytoj ryte"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Bendrinti garsą"</string>
@@ -478,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Pridėkite daugiau valdiklių"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Ilgai paspauskite, kad tinkintumėte valdiklius"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Tinkinti valdiklius"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Atrakinkite, kad galėtumėte tinkinti valdiklius"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Išjungto valdiklio programos piktograma"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Įdiegiamo valdiklio programos piktograma"</string>
<string name="edit_widget" msgid="9030848101135393954">"Redaguoti valdiklį"</string>
@@ -498,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"pasirinkite valdiklį"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"pašalinti valdiklį"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"padėti pasirinktą valdiklį"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Užrakinimo ekrano valdikliai"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Kad galėtumėte atidaryti programą naudodami valdiklį, turėsite patvirtinti savo tapatybę. Be to, atminkite, kad bet kas gali peržiūrėti valdiklius net tada, kai planšetinis kompiuteris užrakintas. Kai kurie valdikliai gali būti neskirti jūsų užrakinimo ekranui ir gali būti nesaugu juos čia pridėti."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"Supratau"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Perjungti naudotoją"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"išplečiamasis meniu"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Bus ištrintos visos šios sesijos programos ir duomenys."</string>
@@ -725,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Numatytasis"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Automatinis"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Neskamba ir nevibruoja"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Neskamba, nevibruoja ir rodoma apatinėje pokalbių skilties dalyje"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Gali skambėti arba vibruoti, atsižvelgiant į įrenginio nustatymus"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Gali skambėti arba vibruoti, atsižvelgiant į įrenginio nustatymus. Pokalbiai iš „<xliff:g id="APP_NAME">%1$s</xliff:g>“ debesėlio pagal numatytuosius nustatymus."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Nustatykite, kad sistema aptiktų, ar šis pranešimas turi skambėti, ar vibruoti"</string>
@@ -782,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Ankstesnis puslapis"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Tolesnis puslapis"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Ištrinti"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Pagrindinis"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"Baigti"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Įterpti"</string>
@@ -1364,20 +1374,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Išskaidyto ekrano režimas"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Įvestis"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Programos šaukiniai"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Pritaikomumas"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Spartieji klavišai"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Paieškos šaukiniai"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Sutraukimo piktograma"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Išskleidimo piktograma"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"arba"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Grįžimo atgal gestas"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Pagrindinio ekrano gestas"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Veiksmų klavišas"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Atlikta"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Puiku!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Grįžti"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Jei norite grįžti, trimis pirštais perbraukite kairėn arba dešinėn bet kurioje jutiklinės dalies vietoje."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Jutiklinė dalis, kurioje rodomi trys dešinėn ir kairėn judantys pirštai"</string>
@@ -1386,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"%1$d lygis iš %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Namų sistemos valdymas"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Pasiekite namų sistemos valdymą ekrano užsklandoje"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-lt/tiles_states_strings.xml b/packages/SystemUI/res/values-lt/tiles_states_strings.xml
index c975e7e3cc80..30584f7ef681 100644
--- a/packages/SystemUI/res/values-lt/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-lt/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Išjungta"</item>
<item msgid="4875147066469902392">"Įjungta"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Nepasiekiama"</item>
<item msgid="5044688398303285224">"Išjungta"</item>
diff --git a/packages/SystemUI/res/values-lv/strings.xml b/packages/SystemUI/res/values-lv/strings.xml
index 5accf6a4915c..3f54b4e5d6d9 100644
--- a/packages/SystemUI/res/values-lv/strings.xml
+++ b/packages/SystemUI/res/values-lv/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> konstatēja, ka tika veikts ekrānuzņēmums."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> un citas atvērtas lietotnes konstatēja, ka tika veikts ekrānuzņēmums."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Pievienot piezīmei"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Iekļaut saiti"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Ekrāna ierakstītājs"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Ekrāna ieraksta apstrāde"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Aktīvs paziņojums par ekrāna ierakstīšanas sesiju"</string>
@@ -127,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Pieskarieties, lai skatītu"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Saglabājot ekrāna ierakstu, radās kļūda."</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Sākot ierakstīt ekrāna saturu, radās kļūda."</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Tiks pārtraukta lietotnes &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; satura ierakstīšana"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Apturēt ierakstīšanu"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Notiek ekrāna kopīgošana"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Vai apturēt ekrāna kopīgošanu?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Tiks pārtraukta lietotnes &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; satura kopīgošana"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Apturēt kopīgošanu"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Notiek ekrāna apraide"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Vai pārtraukt apraidi?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Notiek ekrāna apraide"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Tiks pārtraukta lietotnes &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; satura apraide"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Apturēt apraidi"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Aizvērt"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Problēmu ierakstītājs"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Apstrādā problēmas ierakstu"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Aktīvs paziņojums par problēmu vākšanas sesiju"</string>
@@ -162,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Saglabājot problēmas ierakstu, radās kļūda."</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Sākot problēmas ierakstīšanu, radās kļūda."</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Skatīšanās pilnekrāna režīmā"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Lai izietu, velciet lejup no ekrāna augšdaļas."</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"Labi"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Atpakaļ"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Sākums"</string>
@@ -196,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Ierīce atbloķēta ar seju. Nospiediet, lai turpinātu."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Seja atpazīta. Nospiediet, lai turpinātu."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Seja atpazīta. Lai turpinātu, nospiediet atbloķēšanas ikonu."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Ierīce atbloķēta pēc sejas. Pieskarieties, lai turpinātu."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Autentifikācija veikta"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Atcelt autentificēšanu"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Citas opcijas"</string>
@@ -297,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Ekrānsaudzētājs"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Tīkls Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Režīms “Netraucēt”"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Nav pieejama neviena pārī savienota ierīce."</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Lai pievienotu vai atvienotu kādu ierīci, pieskarieties."</string>
@@ -308,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Saglabāta"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"atvienot"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"aktivizēt"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Automātiski ieslēgt rīt"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Tādas funkcijas kā “Ātrā kopīgošana” un “Atrast ierīci” izmanto Bluetooth savienojumu"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bluetooth savienojums tiks ieslēgts rīt no rīta"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Kopīgot audio"</string>
@@ -478,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Pievienot citus logrīkus"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Nospiediet un turiet, lai pielāgotu logrīkus."</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Pielāgot logrīkus"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Atbloķējiet, lai pielāgotu logrīkus"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Lietotnes ikona atspējotam logrīkam"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Tiek instalēta lietotnes ikona logrīkam."</string>
<string name="edit_widget" msgid="9030848101135393954">"Rediģēt logrīku"</string>
@@ -498,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"atlasīt logrīku"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"noņemt logrīku"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"novietot atlasīto logrīku"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Bloķēšanas ekrāna logrīki"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Lai atvērtu lietotni, izmantojot logrīku, jums būs jāapstiprina sava identitāte. Turklāt ņemiet vērā, ka ikviens var skatīt logrīkus, pat ja planšetdators ir bloķēts. Iespējams, daži logrīki nav paredzēti izmantošanai bloķēšanas ekrānā, un var nebūt droši tos šeit pievienot."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"Labi"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Mainīt lietotāju"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"novelkamā izvēlne"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Tiks dzēstas visas šīs sesijas lietotnes un dati."</string>
@@ -725,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Noklusējums"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Automātiski"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Nav skaņas signāla vai vibrācijas"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Nav skaņas signāla vai vibrācijas, kā arī atrodas tālāk sarunu sadaļā"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Atkarībā no iestatījumiem var zvanīt vai vibrēt"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Atkarībā no ierīces iestatījumiem var zvanīt vai vibrēt. Sarunas no lietotnes <xliff:g id="APP_NAME">%1$s</xliff:g> pēc noklusējuma tiek parādītas burbulī."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Iestatiet, lai sistēma noteiktu, vai šim paziņojumam būs skaņa vai vibrācija"</string>
@@ -782,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Lapa uz augšu"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Lapa uz leju"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Dzēšanas taustiņš"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Sākumvietas taustiņš"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"Beigvietas taustiņš"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Ievietošanas taustiņš"</string>
@@ -802,7 +812,7 @@
<string name="keyboard_shortcut_search_list_no_result" msgid="6819302191660875501">"Nav atrasti"</string>
<string name="keyboard_shortcut_search_category_system" msgid="1151182120757052669">"Sistēma"</string>
<string name="keyboard_shortcut_search_category_input" msgid="5440558509904296233">"Ievade"</string>
- <string name="keyboard_shortcut_search_category_open_apps" msgid="1450959949739257562">"Atvērtās"</string>
+ <string name="keyboard_shortcut_search_category_open_apps" msgid="1450959949739257562">"Atvērtās lietotnes"</string>
<string name="keyboard_shortcut_search_category_current_app" msgid="2011953559133734491">"Pašreizējā"</string>
<string name="keyboard_shortcut_a11y_show_search_results" msgid="2865241062981833705">"Tiek rādīti meklēšanas rezultāti"</string>
<string name="keyboard_shortcut_a11y_filter_system" msgid="7744143131119370483">"Tiek rādīti sistēmas īsinājumtaustiņi"</string>
@@ -1364,20 +1374,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Ekrāna sadalīšana"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Ievade"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Lietotņu saīsnes"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Pieejamība"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Īsinājumtaustiņi"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Meklēšanas saīsnes"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Sakļaušanas ikona"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Izvēršanas ikona"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"vai"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Žests pāriešanai atpakaļ"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Žests pāriešanai uz sākumu"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Darbību taustiņš"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Gatavs"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Lieliski!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Atpakaļ"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Lai pārietu atpakaļ, ar trim pirkstiem velciet pa kreisi vai pa labi jebkurā vietā uz skārienpaliktņa"</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Attēls ar skārienpaliktni, uz kura trīs pirksti kustas pa labi un pa kreisi"</string>
@@ -1386,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Līmenis numur %1$d, kopā ir %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Mājas kontrolierīces"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Ātra piekļuve mājas kontrolierīcēm ekrānsaudzētājā"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-lv/tiles_states_strings.xml b/packages/SystemUI/res/values-lv/tiles_states_strings.xml
index c65a1d429492..8d23ef11d18c 100644
--- a/packages/SystemUI/res/values-lv/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-lv/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Izslēgts"</item>
<item msgid="4875147066469902392">"Ieslēgts"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Nav pieejams"</item>
<item msgid="5044688398303285224">"Izslēgts"</item>
diff --git a/packages/SystemUI/res/values-mk/strings.xml b/packages/SystemUI/res/values-mk/strings.xml
index d121b9dd6acc..6eaf8b9883bc 100644
--- a/packages/SystemUI/res/values-mk/strings.xml
+++ b/packages/SystemUI/res/values-mk/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> ја откри оваа слика од екранот."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> и други отворени апликации ја открија оваа слика од екранот."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Додај во белешка"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Опфати линк"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Снимач на екран"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Се обработува снимка од екран"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Тековно известување за сесија за снимање на екранот"</string>
@@ -127,33 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Допрете за прегледување"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Грешка при зачувувањето на снимката од екранот"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Грешка при почетокот на снимањето на екранот"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
+ <skip />
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Ќе го сопрете снимањето на &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Сопри го снимањето"</string>
+ <string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Се споделува екранот"</string>
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Да се сопре споделувањето на екранот?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
<skip />
- <!-- no translation found for share_to_app_chip_accessibility_label (4210256229976947065) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Ќе го сопрете споделувањето на &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Сопри го споделувањето"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Се емитува екранот"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Да се сопре емитувањето?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <!-- no translation found for cast_to_other_device_chip_accessibility_label (1680650146639059938) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Ќе го сопрете емитувањето на &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
<skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Сопри го емитувањето"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Затвори"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Проблем со „Диктафон“"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Се обработува проб. со снимање"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Тековно известување за сесија за проблем со прибирање"</string>
@@ -164,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Грешка при зачувување на проблемот со снимање"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Грешка при започнување на проблемот со снимање"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Се прикажува на цел екран"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"За да излезете, повлечете надолу од горниот дел на екранот"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"Сфатив"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Назад"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Почетна страница"</string>
@@ -198,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Отклучено со лик. Притиснете за да продолжите."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Лицето е препознаено. Притиснете за да продолжите."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Лицето е препознаено. Притиснете ја иконата за отклучување за да продолжите."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Отклучено со лик. Допрете за да продолжите."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Проверена"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Откажување автентикација"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Повеќе опции"</string>
@@ -299,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Штедач на екран"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Етернет"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Не вознемирувај"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Нема достапни спарени уреди"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Допрете за да воспоставите или да прекинете врска со уред"</string>
@@ -310,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Зачувано"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"прекини врска"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"активирај"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Автоматски вклучи го утре"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Функциите како „Брзо споделување“ и „Најди го мојот уред“ користат Bluetooth"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bluetooth ќе се вклучи утре наутро"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Споделувај аудио"</string>
@@ -480,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Додајте повеќе виџети"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Притиснете долго за да ги приспособите виџетите"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Приспособете ги виџетите"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Отклучете за да ги приспособите виџетите"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Икона за апликација за оневозможен виџет"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Икона за апликација за виџет што се инсталира"</string>
<string name="edit_widget" msgid="9030848101135393954">"Изменување виџети"</string>
@@ -500,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"изберете виџет"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"отстранете го виџетот"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"поставете го избраниот виџет"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Виџети на заклучен екран"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"За да отворите апликација со помош на виџет, ќе треба да потврдите дека сте вие. Покрај тоа, имајте предвид дека секој може да ги гледа виџетите, дури и кога вашиот таблет е заклучен. Некои виџети можеби не се наменети за вашиот заклучен екран, па можеби не е безбедно да се додадат овде."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"Сфатив"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Промени го корисникот"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"паѓачко мени"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Сите апликации и податоци во сесијава ќе се избришат."</string>
@@ -727,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Стандардно"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Автоматски"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Без звук или вибрации"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Без звук или вибрации и се појавува подолу во делот со разговори"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Може да ѕвони или да вибрира во зависност од поставките за уредот"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Може да ѕвони или да вибрира во зависност од поставките за уредот. Стандардно, разговорите од <xliff:g id="APP_NAME">%1$s</xliff:g> се во балончиња."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Дозволете системот да определи дали известувањево треба да испушти звук или да вибрира"</string>
@@ -784,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Страница нагоре"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Страница надолу"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Избриши"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home-копче"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"Крај"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Вметни"</string>
@@ -1359,31 +1367,26 @@
<string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"Се користи од <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string>
<string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"Неодамна користено од <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string>
<string name="shortcut_helper_category_system" msgid="462110876978937359">"Систем"</string>
- <!-- no translation found for shortcut_helper_category_system_controls (3153344561395751020) -->
- <skip />
- <!-- no translation found for shortcut_helper_category_system_apps (6001757545472556810) -->
- <skip />
+ <string name="shortcut_helper_category_system_controls" msgid="3153344561395751020">"Системски контроли"</string>
+ <string name="shortcut_helper_category_system_apps" msgid="6001757545472556810">"Системски апликации"</string>
<string name="shortcut_helper_category_multitasking" msgid="7413381961404090136">"Мултитаскинг"</string>
- <!-- no translation found for shortcutHelper_category_recent_apps (7918731953612377145) -->
- <skip />
- <!-- no translation found for shortcutHelper_category_split_screen (1159669813444812244) -->
- <skip />
+ <string name="shortcutHelper_category_recent_apps" msgid="7918731953612377145">"Неодамнешни апликации"</string>
+ <string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Поделен екран"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Внесување"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Кратенки за апликации"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Пристапност"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Кратенки од тастатура"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Кратенки за пребарување"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Икона за собирање"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Икона за проширување"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"или"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Движење за назад"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Движење за почетен екран"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Копче за дејство"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Готово"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Одлично сторено!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Назад"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"За да се вратите назад, повлечете налево или надесно со три прста каде било на допирната подлога."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Допирната подлога покажува три прста што се движат десно и лево"</string>
@@ -1392,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Ниво %1$d од %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Контроли за домот"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Контролите за домот како штедач на екран"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-mk/tiles_states_strings.xml b/packages/SystemUI/res/values-mk/tiles_states_strings.xml
index a8d96950b6f8..08cdc090a4bf 100644
--- a/packages/SystemUI/res/values-mk/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-mk/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Исклучено"</item>
<item msgid="4875147066469902392">"Вклучено"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Недостапно"</item>
<item msgid="5044688398303285224">"Исклучено"</item>
diff --git a/packages/SystemUI/res/values-ml/strings.xml b/packages/SystemUI/res/values-ml/strings.xml
index 0bc502870555..5877d2b3d919 100644
--- a/packages/SystemUI/res/values-ml/strings.xml
+++ b/packages/SystemUI/res/values-ml/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> ഈ സ്ക്രീൻഷോട്ട് തിരിച്ചറിഞ്ഞു."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> എന്ന ആപ്പും തുറന്നിരിക്കുന്ന മറ്റ് ആപ്പും ഈ സ്ക്രീൻഷോട്ട് തിരിച്ചറിഞ്ഞു."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"കുറിപ്പിലേക്ക് ചേർക്കുക"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"ലിങ്ക് ഉൾപ്പെടുത്തുക"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"സ്ക്രീൻ റെക്കോർഡർ"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"സ്ക്രീൻ റെക്കോർഡിംഗ് പ്രോസസുചെയ്യുന്നു"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"ഒരു സ്ക്രീൻ റെക്കോർഡിംഗ് സെഷനായി നിലവിലുള്ള അറിയിപ്പ്"</string>
@@ -127,31 +126,27 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"കാണാൻ ടാപ്പ് ചെയ്യുക"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"സ്ക്രീൻ റെക്കോർഡിംഗ് സംരക്ഷിക്കുന്നതിൽ പിശക്"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"സ്ക്രീൻ റെക്കോർഡിംഗ് ആരംഭിക്കുന്നതിൽ പിശക്"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
- <skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
- <skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; റെക്കോർഡ് ചെയ്യുന്നത് നിങ്ങൾ അവസാനിപ്പിക്കും"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
- <skip />
+ <string name="screenrecord_stop_dialog_title" msgid="8716193661764511095">"റെക്കോർഡിംഗ് നിർത്തണോ?"</string>
+ <string name="screenrecord_stop_dialog_message" msgid="6262768207331626817">"നിങ്ങൾ ഇപ്പോൾ മുഴുവൻ സ്ക്രീനും റെക്കോർഡ് ചെയ്യുകയാണ്"</string>
+ <string name="screenrecord_stop_dialog_message_specific_app" msgid="5995770227684523244">"നിങ്ങൾ ഇപ്പോൾ <xliff:g id="APP_NAME">%1$s</xliff:g> റെക്കോർഡ് ചെയ്യുകയാണ്"</string>
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"റെക്കോർഡിംഗ് നിർത്തുക"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"സ്‌ക്രീൻ പങ്കിടുന്നു"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
- <skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
- <skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; പങ്കിടുന്നത് നിങ്ങൾ അവസാനിപ്പിക്കും"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
- <skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"സ്‌ക്രീൻ കാസ്‌റ്റ് ചെയ്യുന്നു"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
- <skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
- <skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; കാസ്റ്റ് ചെയ്യുന്നത് നിങ്ങൾ അവസാനിപ്പിക്കും"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
- <skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
- <skip />
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"സ്‌ക്രീൻ പങ്കിടുന്നത് നിർത്തണോ?"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen_with_host_app" msgid="522823522115375414">"നിങ്ങൾ ഇപ്പോൾ മുഴുവൻ സ്ക്രീനും <xliff:g id="HOST_APP_NAME">%1$s</xliff:g> എന്നതുമായി പങ്കിടുകയാണ്"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen" msgid="5090115386271179270">"നിങ്ങൾ ഇപ്പോൾ മുഴുവൻ സ്ക്രീനും ഒരു ആപ്പുമായി പങ്കിടുകയാണ്"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_specific" msgid="5923772039347985172">"നിങ്ങൾ ഇപ്പോൾ <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> പങ്കിടുകയാണ്"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_generic" msgid="6681016774654578261">"നിങ്ങൾ നിലവിൽ ഒരു ആപ്പ് പങ്കിടുകയാണ്"</string>
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"പങ്കിടൽ നിർത്തുക"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"സ്‌ക്രീൻ കാസ്‌റ്റ് ചെയ്യുന്നു"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"കാസ്റ്റ് ചെയ്യുന്നത് അവസാനിപ്പിക്കണോ?"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen_with_device" msgid="1474703115926205251">"<xliff:g id="DEVICE_NAME">%1$s</xliff:g> എന്നതിലേക്ക് നിങ്ങളുടെ മുഴുവൻ സ്ക്രീനും ഇപ്പോൾ കാസ്റ്റ് ചെയ്യുകയാണ്"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen" msgid="8419219169553867625">"സമീപമുള്ള ഉപകരണത്തിലേക്ക് നിങ്ങളുടെ മുഴുവൻ സ്ക്രീനും ഇപ്പോൾ കാസ്റ്റ് ചെയ്യുകയാണ്"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app_with_device" msgid="2715934698604085519">"<xliff:g id="DEVICE_NAME">%2$s</xliff:g> എന്നതിലേക്ക് നിങ്ങൾ ഇപ്പോൾ <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> കാസ്റ്റ് ചെയ്യുകയാണ്"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="8616103075630934513">"സമീപമുള്ള ഉപകരണത്തിലേക്ക് നിങ്ങൾ ഇപ്പോൾ <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> കാസ്റ്റ് ചെയ്യുകയാണ്"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic_with_device" msgid="9213582497852420203">"<xliff:g id="DEVICE_NAME">%1$s</xliff:g> എന്നതിലേക്ക് നിങ്ങൾ ഇപ്പോൾ കാസ്റ്റ് ചെയ്യുകയാണ്"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic" msgid="4100272100480415076">"സമീപമുള്ള ഉപകരണത്തിലേക്ക് നിങ്ങൾ ഇപ്പോൾ കാസ്റ്റ് ചെയ്യുകയാണ്"</string>
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"കാസ്റ്റ് ചെയ്യുന്നത് നിർത്തുക"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"അടയ്ക്കുക"</string>
<string name="issuerecord_title" msgid="286627115110121849">"പ്രശ്‌ന റെക്കോർഡർ"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"പ്രശ്‌ന റെക്കോർഡിംഗ് പ്രോസസ് ചെയ്യുന്നു"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"ഒരു പ്രശ്‌ന ശേഖരണ സെഷന്റെ ഓൺ‌ഗോയിംഗ് അറിയിപ്പ്"</string>
@@ -162,8 +157,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"പ്രശ്‌ന റെക്കോർഡിംഗ് സംരക്ഷിക്കുന്നതിൽ പിശക്"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"പ്രശ്‌ന റെക്കോർഡിംഗ് ആരംഭിക്കുന്നതിൽ പിശക്"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"പൂർണ്ണ സ്‌ക്രീനിൽ കാണുന്നു"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"പുറത്ത് കടക്കാൻ, സ്‌ക്രീനിന്റെ മുകളിൽ നിന്ന് താഴോട്ട് സ്വൈപ്പ് ചെയ്യുക"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"മനസ്സിലായി"</string>
<string name="accessibility_back" msgid="6530104400086152611">"മടങ്ങുക"</string>
<string name="accessibility_home" msgid="5430449841237966217">"ഹോം"</string>
@@ -196,8 +190,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"മുഖം ഉപയോഗിച്ച് അൺലോക്ക് ചെയ്‌തു. തുടരാൻ അമർത്തുക."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"മുഖം തിരിച്ചറിഞ്ഞു. തുടരാൻ അമർത്തുക."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"മുഖം തിരിച്ചറിഞ്ഞു. തുടരാൻ അൺലോക്ക് ഐക്കൺ അമർത്തുക."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"മുഖം വഴി അൺലോക്കുചെയ്തു. തുടരാൻ ടാപ്പ് ചെയ്യുക."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"പരിശോധിച്ചുറപ്പിച്ചു"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"പരിശോധിച്ചുറപ്പിക്കൽ റദ്ദാക്കുക"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"കൂടുതൽ ഓപ്‌ഷനുകൾ"</string>
@@ -297,6 +290,8 @@
<string name="start_dreams" msgid="9131802557946276718">"സ്ക്രീൻ സേവർ"</string>
<string name="ethernet_label" msgid="2203544727007463351">"ഇതർനെറ്റ്"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"ശല്യപ്പെടുത്തരുത്"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"ജോടിയാക്കിയ ഉപകരണങ്ങളൊന്നും ലഭ്യമല്ല"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"ഒരു ഉപകരണം കണക്റ്റ് ചെയ്യാനോ വിച്ഛേദിക്കാനോ ടാപ്പ് ചെയ്യുക"</string>
@@ -308,8 +303,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"സംരക്ഷിച്ചു"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"വിച്ഛേദിക്കുക"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"സജീവമാക്കുക"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"നാളെ സ്വയമേവ ഓണാക്കുക"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"ക്വിക്ക് ഷെയർ, Find My Device പോലുള്ള ഫീച്ചറുകൾ Bluetooth ഉപയോഗിക്കുന്നു"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bluetooth നാളെ രാവിലെ ഓണാകും"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"ഓഡിയോ പങ്കിടുക"</string>
@@ -478,8 +472,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"കൂടുതൽ വിജറ്റുകൾ ചേർക്കുക"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"വിജറ്റുകൾ ഇഷ്ടാനുസൃതമാക്കാൻ ദീർഘനേരം അമർത്തുക"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"വിജറ്റുകൾ ഇഷ്ടാനുസൃതമാക്കുക"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"വിജറ്റുകൾ ഇഷ്ടാനുസൃതമാക്കാൻ അൺലോക്ക് ചെയ്യുക"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"പ്രവർത്തനരഹിതമാക്കിയ വിജറ്റിനുള്ള ആപ്പ് ഐക്കൺ"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"വിജറ്റിനുള്ള ആപ്പ് ഐക്കൺ ഇൻസ്റ്റാൾ ചെയ്തു"</string>
<string name="edit_widget" msgid="9030848101135393954">"വിജറ്റ് എഡിറ്റ് ചെയ്യുക"</string>
@@ -498,12 +491,11 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"വിജറ്റ് തിരഞ്ഞെടുക്കുക"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"വിജറ്റ് നീക്കം ചെയ്യുക"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"തിരഞ്ഞെടുത്ത വിജറ്റ് നൽകുക"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
- <skip />
+ <string name="communal_widget_picker_title" msgid="1953369090475731663">"ലോക്ക് സ്‌ക്രീൻ വിജറ്റുകൾ"</string>
+ <string name="communal_widget_picker_description" msgid="490515450110487871">"ടാബ്‌ലെറ്റ് ലോക്കാണെങ്കിൽ പോലും ലോക്ക് സ്ക്രീനിൽ ആർക്കും വിജറ്റുകൾ കാണാം."</string>
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"ലോക്ക് സ്‌ക്രീൻ വിജറ്റുകൾ"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"വിജറ്റ് ഉപയോഗിച്ച് ഒരു ആപ്പ് തുറക്കാൻ, ഇത് നിങ്ങൾ തന്നെയാണെന്ന് പരിശോധിച്ചുറപ്പിക്കേണ്ടതുണ്ട്. നിങ്ങളുടെ ടാബ്‌ലെറ്റ് ലോക്കായിരിക്കുമ്പോഴും എല്ലാവർക്കും അത് കാണാനാകുമെന്നതും ഓർക്കുക. ചില വിജറ്റുകൾ നിങ്ങളുടെ ലോക്ക് സ്‌ക്രീനിന് ഉള്ളതായിരിക്കില്ല, അവ ഇവിടെ ചേർക്കുന്നത് സുരക്ഷിതവുമായിരിക്കില്ല."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"മനസ്സിലായി"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"ഉപയോക്താവ് മാറുക"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"പുൾഡൗൺ മെനു"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"ഈ സെഷനിലെ എല്ലാ ആപ്പുകളും ഡാറ്റയും ഇല്ലാതാക്കും."</string>
@@ -725,7 +717,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"ഡിഫോൾട്ട്"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"സ്വയമേവ"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"ശബ്ദമോ വൈബ്രേഷനോ ഇല്ല"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"ശബ്‌ദമോ വൈബ്രേഷനോ ഇല്ല, സംഭാഷണ വിഭാഗത്തിന് താഴെയായി ദൃശ്യമാകും"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"ഉപകരണ ക്രമീകരണം അടിസ്ഥാനമാക്കി റിംഗ് ചെയ്യും അല്ലെങ്കിൽ വൈബ്രേറ്റ് ചെയ്യും"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"ഉപകരണ ക്രമീകരണം അടിസ്ഥാനമാക്കി റിംഗ് ചെയ്യും അല്ലെങ്കിൽ വൈബ്രേറ്റ് ചെയ്യും. <xliff:g id="APP_NAME">%1$s</xliff:g> എന്ന ആപ്പിൽ നിന്നുള്ള സംഭാഷണങ്ങൾ ഡിഫോൾട്ടായി ബബിൾ ചെയ്യുന്നു."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"ഈ അറിയിപ്പ് വരുമ്പോൾ ശബ്‌ദിക്കുകയാണോ വൈബ്രേറ്റ് ചെയ്യുകയാണോ വേണ്ടതെന്ന് നിർണ്ണയിക്കാൻ സിസ്‌റ്റത്തെ അനുവദിക്കുക"</string>
@@ -782,6 +775,7 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"പേജ് അപ്പ്"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"പേജ് ഡൗൺ"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"ഡിലീറ്റ്"</string>
+ <string name="keyboard_key_esc" msgid="6230365950511411322">"Esc"</string>
<string name="keyboard_key_move_home" msgid="3496502501803911971">"ഹോം"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"എൻഡ്"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"ഇൻസേർട്ട്"</string>
@@ -1364,20 +1358,18 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"സ്‌ക്രീൻ വിഭജന മോഡ്"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"ഇൻപുട്ട്"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"ആപ്പ് കുറുക്കുവഴികൾ"</string>
+ <string name="shortcut_helper_category_current_app_shortcuts" msgid="4017840565974573628">"നിലവിലെ ആപ്പ്"</string>
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"ഉപയോഗസഹായി"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"കീബോഡ് കുറുക്കുവഴികൾ"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"തിരയൽ കുറുക്കുവഴികൾ"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"ചുരുക്കൽ ഐക്കൺ"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"വികസിപ്പിക്കൽ ഐക്കൺ"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"അല്ലെങ്കിൽ"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"\'മടങ്ങുക\' ജെസ്ച്ചർ"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"ഹോം ജെസ്‌ച്ചർ"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"ആക്ഷൻ കീ"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"പൂർത്തിയായി"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"കൊള്ളാം!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"മടങ്ങുക"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"തിരികെ പോകാൻ, ടച്ച്പാഡിൽ എവിടെയെങ്കിലും മൂന്ന് വിരലുകൾ ഉപയോഗിച്ച് ഇടത്തേക്കോ വലത്തേക്കോ സ്വൈപ്പ് ചെയ്യുക."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"വലത്തേക്കും ഇടത്തേക്കും ചലിക്കുന്ന മൂന്ന് വിരലുകൾ കാണിക്കുന്ന ടച്ച്പാഡ്"</string>
@@ -1386,4 +1378,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"%2$d-ൽ %1$d-ാമത്തെ ലെവൽ"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"ഹോം കൺട്രോളുകൾ"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"സ്‌ക്രീൻസേവറായി ഹോം കൺട്രോളുകൾ പെട്ടെന്ന് ആക്‌സസ് ചെയ്യൂ"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-ml/tiles_states_strings.xml b/packages/SystemUI/res/values-ml/tiles_states_strings.xml
index 609fdde3f5de..5999e3cfcb8f 100644
--- a/packages/SystemUI/res/values-ml/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-ml/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"ഓഫാണ്"</item>
<item msgid="4875147066469902392">"ഓണാണ്"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"ലഭ്യമല്ല"</item>
<item msgid="5044688398303285224">"ഓഫാണ്"</item>
diff --git a/packages/SystemUI/res/values-mn/strings.xml b/packages/SystemUI/res/values-mn/strings.xml
index be9bceef44a4..2e0115f5c4e6 100644
--- a/packages/SystemUI/res/values-mn/strings.xml
+++ b/packages/SystemUI/res/values-mn/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> энэ дэлгэцийн агшныг илрүүлсэн."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> болон бусад нээлттэй апп энэ дэлгэцийн агшныг илрүүлсэн."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Тэмдэглэлд нэмэх"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Холбоосыг оруулах"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Дэлгэцийн үйлдэл бичигч"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Дэлгэц бичлэг боловсруулж байна"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Дэлгэц бичих горимын үргэлжилж буй мэдэгдэл"</string>
@@ -127,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Харахын тулд товшино уу"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Дэлгэцийн бичлэгийг хадгалахад алдаа гарлаа"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Дэлгэцийн бичлэгийг эхлүүлэхэд алдаа гарлаа"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Та &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;-г бичихээ болино"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Бичихийг зогсоох"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Дэлгэцийг хуваалцаж байна"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Дэлгэцийг хуваалцахыг зогсоох уу?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Та &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;-г хуваалцахаа болино"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Хуваалцахыг зогсоох"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Дэлгэцийг дамжуулж байна"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Дамжуулахaa болих уу?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Дэлгэцийг дамжуулж байна"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Та &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;-г дамжуулахаа болино"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Дамжуулахыг зогсоох"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Хаах"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Асуудал бичигч"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Асуудлын бичлэгийг боловсруулж байна"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Асуудал цуглуулах харилцан үйлдлийн үргэлжилж буй мэдэгдэл"</string>
@@ -162,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Асуудлын бичлэгийг хадгалахад алдаа гарлаа"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Асуудлын бичлэгийг эхлүүлэхэд алдаа гарлаа"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Бүтэн дэлгэцээр үзэж байна"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Гарахын тулд дэлгэцийнхээ дээд талаас доош шударна уу"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"Ойлголоо"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Буцах"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Гэрийн"</string>
@@ -196,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Царайгаар түгжээг тайлсан. Үргэлжлүүлэхийн тулд дарна уу."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Царайг таньсан. Үргэлжлүүлэхийн тулд дарна уу."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Царайг таньсан. Үргэлжлүүлэх бол түгжээг тайлах дүрсийг дар."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Царайгаар түгжээг тайлсан. Үргэлжлүүлэхийн тулд товшино уу."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Баталгаажуулагдсан"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Баталгаажуулалтыг цуцлах"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Бусад сонголт"</string>
@@ -297,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Дэлгэц амраагч"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Этернет"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Бүү саад бол"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Хослуулсан төхөөрөмж байхгүй"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Төхөөрөмжийг холбох эсвэл салгахын тулд товшино уу"</string>
@@ -308,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Хадгалсан"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"салгах"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"идэвхжүүлэх"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Маргааш автоматаар асаах"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Түргэн хуваалцах, Миний төхөөрөмжийг олох зэрэг онцлогууд Bluetooth-г ашигладаг"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bluetooth-г маргааш өглөө асаана"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Аудио хуваалцах"</string>
@@ -478,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Илүү олон виджет нэмэх"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Виджетүүдийг өөрчлөхийн тулд удаан дарна уу"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Виджетүүдийг өөрчлөх"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Виджетийг өөрчлөхийн тулд түгжээг тайлна уу"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Идэвхгүй болгосон виджетийн аппын дүрс тэмдэг"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Виджет суулгах явцын аппын дүрс тэмдэг"</string>
<string name="edit_widget" msgid="9030848101135393954">"Виджетийг засах"</string>
@@ -498,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"виджет сонгох"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"виджетийг хасах"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"сонгосон виджетийг байрлуулах"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Түгжээтэй дэлгэцийн виджет"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Виджет ашиглан аппыг нээхийн тулд та өөрийгөө мөн болохыг баталгаажуулах шаардлагатай болно. Мөн таны таблет түгжээтэй байсан ч тэдгээрийг дурын хүн үзэж болохыг санаарай. Зарим виджет таны түгжээтэй дэлгэцэд зориулагдаагүй байж магадгүй ба энд нэмэхэд аюултай байж болзошгүй."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"Ойлголоо"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Хэрэглэгчийг сэлгэх"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"эвхмэл цэс"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Энэ харилцан үйлдлийн бүх апп болон дата устах болно."</string>
@@ -725,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Өгөгдмөл"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Автомат"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Дуу эсвэл чичиргээ байхгүй"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Дуу эсвэл чичиргээ байхгүй бөгөөд харилцан ярианы хэсгийн доод талд харагдана"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Төхөөрөмжийн тохиргоонд тулгуурлан хонх дуугаргах эсвэл чичиргэж болзошгүй"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Төхөөрөмжийн тохиргоонд тулгуурлан хонх дуугаргах эсвэл чичиргэж болзошгүй. <xliff:g id="APP_NAME">%1$s</xliff:g>-н харилцан яриаг өгөгдмөлөөр бөмбөлөг болгоно."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Энэ мэдэгдэл дуу гаргах эсвэл чичрэх эсэхийг системээр тодорхойлуулаарай"</string>
@@ -782,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Хуудас дээш"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Хуудас доош"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Устгах"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Нүүр хуудас"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"Төгсгөл"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Оруулах"</string>
@@ -1215,7 +1225,7 @@
<string name="battery_state_unknown_notification_text" msgid="13720937839460899">"Нэмэлт мэдээлэл авахын тулд товшино уу"</string>
<string name="qs_alarm_tile_no_alarm" msgid="4826472008616807923">"Сэрүүлэг тавиагүй"</string>
<string name="accessibility_bouncer" msgid="5896923685673320070">"дэлгэцийн түгжээ оруулах"</string>
- <string name="accessibility_side_fingerprint_indicator_label" msgid="1673807833352363712">"Хурууны хээ мэдрэгчид хүрнэ үү. Энэ нь утасны хажуу талын арай богино товчлуур юм"</string>
+ <string name="accessibility_side_fingerprint_indicator_label" msgid="1673807833352363712">"Хурууны хээ мэдрэгчид хүрнэ үү. Энэ нь утасны хажуу талын арай богино товч юм"</string>
<string name="accessibility_fingerprint_label" msgid="5255731221854153660">"Хурууны хээ мэдрэгч"</string>
<string name="accessibility_authenticate_hint" msgid="798914151813205721">"баталгаажуулах"</string>
<string name="accessibility_enter_hint" msgid="2617864063504824834">"төхөөрөмж оруулах"</string>
@@ -1364,20 +1374,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Дэлгэцийг хуваах"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Оролт"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Аппын товчлол"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Хандалт"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Товчлуурын шууд холбоос"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Товчлолууд хайх"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Хураах дүрс тэмдэг"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Дэлгэх дүрс тэмдэг"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"эсвэл"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Буцах зангаа"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Үндсэн нүүрний зангаа"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Тусгай товчлуур"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Болсон"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Үнэхээр сайн ажиллалаа!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Буцах"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Буцаж очихын тулд мэдрэгч самбар дээр гурван хуруугаараа хүссэн газраа зүүн эсвэл баруун тийш шударна уу."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Гурван хуруу баруун болон зүүн тийш хөдөлж буйг харуулсан мэдрэгч самбар"</string>
@@ -1386,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"%2$d-с %1$d-р түвшин"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Гэрийн удирдлага"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Гэрийн удирдлагадаа дэлгэц амраагчаар шуурхай ханд"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-mn/tiles_states_strings.xml b/packages/SystemUI/res/values-mn/tiles_states_strings.xml
index a3f54541880d..b39457484a47 100644
--- a/packages/SystemUI/res/values-mn/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-mn/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Унтраалттай"</item>
<item msgid="4875147066469902392">"Асаалттай"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Боломжгүй"</item>
<item msgid="5044688398303285224">"Унтраалттай"</item>
diff --git a/packages/SystemUI/res/values-mr/strings.xml b/packages/SystemUI/res/values-mr/strings.xml
index 302a685cb143..ed870c7b435d 100644
--- a/packages/SystemUI/res/values-mr/strings.xml
+++ b/packages/SystemUI/res/values-mr/strings.xml
@@ -126,31 +126,27 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"पाहण्यासाठी टॅप करा"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"स्क्रीन रेकॉर्डिंग सेव्ह करताना एरर आली"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"स्क्रीन रेकॉर्डिंग सुरू करताना एरर आली"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
- <skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
- <skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"तुम्ही &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; रेकॉर्ड करणे बंद कराल"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
- <skip />
+ <string name="screenrecord_stop_dialog_title" msgid="8716193661764511095">"रेकॉर्डिंग थांबवायचे आहे का?"</string>
+ <string name="screenrecord_stop_dialog_message" msgid="6262768207331626817">"तुम्ही सध्या तुमची संपूर्ण स्क्रीन रेकॉर्ड करत आहात"</string>
+ <string name="screenrecord_stop_dialog_message_specific_app" msgid="5995770227684523244">"तुम्ही सध्या <xliff:g id="APP_NAME">%1$s</xliff:g> रेकॉर्ड करत आहात"</string>
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"रेकॉर्ड करणे थांबवा"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"स्क्रीन शेअर करत आहे"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
- <skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
- <skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"तुम्ही &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; शेअर करणे बंद कराल"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
- <skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"स्‍क्रीन कास्‍ट करत आहे"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
- <skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
- <skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"तुम्ही &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; कास्ट करणे बंद कराल"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
- <skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
- <skip />
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"स्क्रीन शेअर करणे थांबवायचे आहे का?"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen_with_host_app" msgid="522823522115375414">"तुम्ही सध्या तुमची संपूर्ण स्क्रीन <xliff:g id="HOST_APP_NAME">%1$s</xliff:g> सह शेअर करत आहात"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen" msgid="5090115386271179270">"तुम्ही सध्या तुमची संपूर्ण स्क्रीन एका ॲपसह शेअर करत आहात"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_specific" msgid="5923772039347985172">"तुम्ही सध्या <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> शेअर करत आहात"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_generic" msgid="6681016774654578261">"तुम्ही सध्या एक ॲप शेअर करत आहात"</string>
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"शेअर करणे थांबवा"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"स्‍क्रीन कास्‍ट करत आहे"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"कास्ट करणे थांबवायचे आहे का?"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen_with_device" msgid="1474703115926205251">"तुम्ही सध्या तुमच्या संपूर्ण स्क्रीनला <xliff:g id="DEVICE_NAME">%1$s</xliff:g> वर कास्ट करत आहात"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen" msgid="8419219169553867625">"तुम्ही सध्या तुमच्या संपूर्ण स्क्रीनला जवळपासच्या डिव्हाइसवर कास्ट करत आहात"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app_with_device" msgid="2715934698604085519">"तुम्ही सध्या <xliff:g id="DEVICE_NAME">%2$s</xliff:g> वर <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> ला कास्ट करत आहात"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="8616103075630934513">"तुम्ही सध्या <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> ला जवळपासच्या डिव्हाइसवर कास्ट करत आहात"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic_with_device" msgid="9213582497852420203">"तुम्ही सध्या <xliff:g id="DEVICE_NAME">%1$s</xliff:g> वर कास्ट करत आहात"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic" msgid="4100272100480415076">"तुम्ही सध्या जवळपासच्या डिव्हाइसवर कास्ट करत आहात"</string>
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"कास्ट करणे थांबवा"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"बंद करा"</string>
<string name="issuerecord_title" msgid="286627115110121849">"समस्या रेकॉर्डर"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"प्रक्रियेच्या समस्येचे रेकॉर्डिंग"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"समस्या गोळा करण्याच्या सेशनसाठीची सद्य सूचना"</string>
@@ -161,8 +157,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"समस्येचे रेकॉर्डिंग सेव्ह करताना एरर आली"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"समस्येचे रेकॉर्डिंग सुरू करताना एरर आली"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"पूर्ण स्क्रीन पाहत आहात"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"बाहेर पडण्यासाठी, तुमच्या स्क्रीनच्या सर्वात वरून खाली स्वाइप करा"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"समजले"</string>
<string name="accessibility_back" msgid="6530104400086152611">"मागे"</string>
<string name="accessibility_home" msgid="5430449841237966217">"होम"</string>
@@ -295,6 +290,7 @@
<string name="start_dreams" msgid="9131802557946276718">"स्क्रीन सेव्हर"</string>
<string name="ethernet_label" msgid="2203544727007463351">"इथरनेट"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"व्यत्यय आणू नका"</string>
+ <string name="quick_settings_modes_label" msgid="5407025818652750501">"प्राधान्य मोड"</string>
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"ब्लूटूथ"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"कोणतेही जोडलेले डिव्हाइसेस उपलब्ध नाहीत"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"डिव्हाइस कनेक्ट किंवा डिस्कनेक्ट करण्यासाठी टॅप करा"</string>
@@ -306,8 +302,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"सेव्ह केले"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"डिस्कनेक्ट करा"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"ॲक्टिव्हेट करा"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"उद्या आपोआप सुरू करा"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"क्विक शेअर आणि Find My Device यांसारखी वैशिष्‍ट्ये ब्लूटूथ वापरतात"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"ब्लूटूथ उद्या सकाळी सुरू होईल"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"ऑडिओ शेअर करा"</string>
@@ -476,8 +471,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"आणखी विजेट जोडा"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"विजेट कस्टमाइझ करण्यासाठी प्रेस करून ठेवा"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"विजेट कस्टमाइझ करा"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"विजेट कस्टमाइझ करण्यासाठी अनलॉक करा"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"बंद केलेल्या विजेटच्या अ‍ॅपचे आयकन"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"इंस्टॉल होत असलेल्या विजेटसाठी अ‍ॅपचा आयकन"</string>
<string name="edit_widget" msgid="9030848101135393954">"विजेट संपादित करा"</string>
@@ -496,12 +490,11 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"विजेट निवडा"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"विजेट काढून टाका"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"निवडलेले विजेट ठेवा"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
- <skip />
+ <string name="communal_widget_picker_title" msgid="1953369090475731663">"लॉक स्‍क्रीन विजेट"</string>
+ <string name="communal_widget_picker_description" msgid="490515450110487871">"तुमचा टॅबलेट लॉक केला, तरी कोणीही तुमच्या लॉक स्क्रीनवरील विजेट पाहू शकतो."</string>
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"लॉक स्‍क्रीन विजेट"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"विजेट वापरून अ‍ॅप उघडण्यासाठी, तुम्हाला हे तुम्हीच असल्याची पडताळणी करावी लागेल. तसेच, लक्षात ठेवा, तुमचा टॅबलेट लॉक असतानादेखील कोणीही ती पाहू शकते. काही विजेट कदाचित तुमच्या लॉक स्‍क्रीनसाठी नाहीत आणि ती इथे जोडणे असुरक्षित असू शकते."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"समजले"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"वापरकर्ता स्विच करा"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"पुलडाउन मेनू"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"या सत्रातील सर्व अ‍ॅप्स आणि डेटा हटवला जाईल."</string>
@@ -723,7 +716,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"डीफॉल्ट"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"ऑटोमॅटिक"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"आवाज किंवा व्हायब्रेशन नाही"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"आवाज किंवा व्हायब्रेशन नाही आणि संभाषण विभागात सर्वात तळाशी दिसते"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"डिव्‍हाइस सेटिंग्जनुसार रिंग किंवा व्हायब्रेट होऊ शकतो"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"डिव्‍हाइस सेटिंग्जनुसार रिंग किंवा व्हायब्रेट होऊ शकतो. <xliff:g id="APP_NAME">%1$s</xliff:g> मधील संभाषणे बाय डीफॉल्ट बबल होतात."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"ही सूचना मिळाल्‍यावर आवाज व्‍हावा की व्हायब्रेशन व्‍हावे ते सिस्‍टममध्ये नमूद करा"</string>
@@ -780,6 +774,7 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page Down"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"हटवा"</string>
+ <string name="keyboard_key_esc" msgid="6230365950511411322">"एस्केप"</string>
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"घाला"</string>
@@ -1362,20 +1357,18 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"स्प्लिट स्क्रीन"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"इनपुट"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"अ‍ॅप शॉर्टकट"</string>
+ <string name="shortcut_helper_category_current_app_shortcuts" msgid="4017840565974573628">"सध्याचे अ‍ॅप"</string>
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"अ‍ॅक्सेसिबिलिटी"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"कीबोर्ड शॉर्टकट"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"शोधण्यासाठी शॉर्टकट"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"कोलॅप्स करा आयकन"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"विस्तार करा आयकन"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"किंवा"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"मागे जा जेश्चर"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"होम जेश्चर"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"अ‍ॅक्शन की"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"पूर्ण झाले"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"उत्तम कामगिरी!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"मागे जा"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"मागे जाण्यासाठी, टचपॅडवर कुठेही तीन बोटांनी डावीकडे किंवा उजवीकडे स्‍वाइप करा."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"तीन बोट उजवीकडे आणि डावीकडे हलताना दाखवणारे टचपॅड"</string>
@@ -1384,4 +1377,5 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"%2$d पैकी %1$d पातळी"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"होम कंट्रोल"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"स्क्रीनसेव्हर म्हणून होम कंट्रोल झटपट ॲक्सेस करा"</string>
+ <string name="volume_undo_action" msgid="5815519725211877114">"पहिल्यासारखे करा"</string>
</resources>
diff --git a/packages/SystemUI/res/values-mr/tiles_states_strings.xml b/packages/SystemUI/res/values-mr/tiles_states_strings.xml
index 54c320c953d5..fdb1f40b4803 100644
--- a/packages/SystemUI/res/values-mr/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-mr/tiles_states_strings.xml
@@ -56,6 +56,11 @@
<item msgid="5376619709702103243">"बंद आहे"</item>
<item msgid="4875147066469902392">"सुरू आहे"</item>
</string-array>
+ <string-array name="tile_states_modes">
+ <item msgid="7764936419245199023">"उपलब्ध नाही"</item>
+ <item msgid="2004750556637773692">"बंद आहे"</item>
+ <item msgid="8968530753931637871">"सुरू आहे"</item>
+ </string-array>
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"उपलब्ध नाही"</item>
<item msgid="5044688398303285224">"बंद आहे"</item>
diff --git a/packages/SystemUI/res/values-ms/strings.xml b/packages/SystemUI/res/values-ms/strings.xml
index 11407f6cf684..43e97168d687 100644
--- a/packages/SystemUI/res/values-ms/strings.xml
+++ b/packages/SystemUI/res/values-ms/strings.xml
@@ -126,31 +126,27 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Ketik untuk lihat"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Ralat semasa menyimpan rakaman skrin"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Ralat semasa memulakan rakaman skrin"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
- <skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
- <skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Anda akan berhenti merakam &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
- <skip />
+ <string name="screenrecord_stop_dialog_title" msgid="8716193661764511095">"Hentikan rakaman?"</string>
+ <string name="screenrecord_stop_dialog_message" msgid="6262768207331626817">"Anda sedang merakam seluruh skrin anda"</string>
+ <string name="screenrecord_stop_dialog_message_specific_app" msgid="5995770227684523244">"Anda sedang merakam <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Hentikan rakaman"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Berkongsi skrin"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
- <skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
- <skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Anda akan berhenti berkongsi &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
- <skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Menghantar skrin"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
- <skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
- <skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Anda akan berhenti menghantar &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
- <skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
- <skip />
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Hentikan perkongsian skrin?"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen_with_host_app" msgid="522823522115375414">"Anda sedang berkongsi seluruh skrin anda dengan <xliff:g id="HOST_APP_NAME">%1$s</xliff:g>"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen" msgid="5090115386271179270">"Anda sedang berkongsi seluruh skrin anda dengan apl"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_specific" msgid="5923772039347985172">"Anda sedang berkongsi <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g>"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_generic" msgid="6681016774654578261">"Anda sedang berkongsi apl"</string>
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Hentikan perkongsian"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Menghantar skrin"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Berhenti menghantar?"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen_with_device" msgid="1474703115926205251">"Anda sedang menghantar seluruh skrin anda kepada <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen" msgid="8419219169553867625">"Anda sedang menghantar seluruh skrin anda kepada peranti berdekatan"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app_with_device" msgid="2715934698604085519">"Anda sedang menghantar <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> kepada <xliff:g id="DEVICE_NAME">%2$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="8616103075630934513">"Anda sedang menghantar <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> kepada peranti berdekatan"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic_with_device" msgid="9213582497852420203">"Anda sedang membuat penghantaran kepada <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic" msgid="4100272100480415076">"Anda sedang membuat penghantaran kepada peranti berdekatan"</string>
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Hentikan penghantaran"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Tutup"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Perakam Masalah"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Memproses rakaman masalah"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Pemberitahuan sedang berlangsung untuk sesi pengumpulan masalah"</string>
@@ -161,8 +157,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Ralat menyimpan rakaman masalah"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Ralat memulakan rakaman masalah"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Melihat skrin penuh"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Untuk keluar, leret ke bawah daripada bahagian atas skrin anda"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"OK"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Kembali"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Rumah"</string>
@@ -295,6 +290,7 @@
<string name="start_dreams" msgid="9131802557946276718">"Penyelamat skrin"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Jangan Ganggu"</string>
+ <string name="quick_settings_modes_label" msgid="5407025818652750501">"Mod keutamaan"</string>
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Tiada peranti berpasangan tersedia"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Ketik untuk menyambungkan atau memutuskan sambungan peranti"</string>
@@ -306,8 +302,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Disimpan"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"putuskan sambungan"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"aktifkan"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Hidupkan secara automatik pada hari esok"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Ciri seperti Quick Share dan Find My Device menggunakan Bluetooth"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bluetooth akan dihidupkan esok pagi"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Kongsi audio"</string>
@@ -476,8 +471,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Tambahkan lagi widget"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Tekan lama untuk menyesuaikan widget"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Sesuaikan widget"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Buka kunci untuk menyesuaikan widget"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Ikon apl untuk melumpuhkan widget"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Ikon apl untuk widget yang sedang dipasang"</string>
<string name="edit_widget" msgid="9030848101135393954">"Edit widget"</string>
@@ -496,12 +490,11 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"pilih widget"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"alih keluar widget"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"letakkan widget dipilih"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
- <skip />
+ <string name="communal_widget_picker_title" msgid="1953369090475731663">"Widget skrin kunci"</string>
+ <string name="communal_widget_picker_description" msgid="490515450110487871">"Sesiapa sahaja boleh melihat widget pada skrin kunci, walaupun tablet dikunci."</string>
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Widget skrin kunci"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Untuk membuka apl menggunakan widget, anda perlu mengesahkan identiti anda. Selain itu, perlu diingat bahawa sesiapa sahaja boleh melihat widget tersebut, walaupun semasa tablet anda dikunci. Sesetengah widget mungkin tidak sesuai untuk skrin kunci anda dan mungkin tidak selamat untuk ditambahkan di sini."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"OK"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Tukar pengguna"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"menu tarik turun"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Semua apl dan data dalam sesi ini akan dipadam."</string>
@@ -723,7 +716,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Lalai"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Automatik"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Tiada bunyi atau getaran"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Tiada bunyi atau getaran dan muncul di sebelah bawah dalam bahagian perbualan"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Mungkin berbunyi atau bergetar berdasarkan tetapan peranti"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Mungkin berbunyi atau bergetar berdasarkan tetapan peranti. Perbualan daripada gelembung <xliff:g id="APP_NAME">%1$s</xliff:g> secara lalai."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Minta sistem menentukan jika pemberitahuan ini patut menghasilkan bunyi atau getaran"</string>
@@ -780,6 +774,7 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page Down"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Delete"</string>
+ <string name="keyboard_key_esc" msgid="6230365950511411322">"Esc"</string>
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1362,20 +1357,18 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Skrin pisah"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Input"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Pintasan apl"</string>
+ <string name="shortcut_helper_category_current_app_shortcuts" msgid="4017840565974573628">"Apl Semasa"</string>
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Kebolehaksesan"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Pintasan papan kekunci"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Pintasan carian"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Kuncupkan ikon"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Kembangkan ikon"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"atau"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Gerak isyarat kembali"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Gerak isyarat pergi ke laman utama"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Kekunci tindakan"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Selesai"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Syabas!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Kembali"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Untuk kembali, leret ke kiri atau kanan menggunakan tiga jari di mana-mana sahaja pada pad sentuh."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Pad sentuh menunjukkan tiga jari bergerak ke kanan dan kiri"</string>
@@ -1384,4 +1377,5 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Tahap %1$d daripada %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Kawalan Rumah"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Jadikan kawalan rumah anda sebagai penyelamat skrin"</string>
+ <string name="volume_undo_action" msgid="5815519725211877114">"Buat asal"</string>
</resources>
diff --git a/packages/SystemUI/res/values-ms/tiles_states_strings.xml b/packages/SystemUI/res/values-ms/tiles_states_strings.xml
index 174e416e3508..db63e2c03e9e 100644
--- a/packages/SystemUI/res/values-ms/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-ms/tiles_states_strings.xml
@@ -56,6 +56,11 @@
<item msgid="5376619709702103243">"Mati"</item>
<item msgid="4875147066469902392">"Hidup"</item>
</string-array>
+ <string-array name="tile_states_modes">
+ <item msgid="7764936419245199023">"Tidak tersedia"</item>
+ <item msgid="2004750556637773692">"Mati"</item>
+ <item msgid="8968530753931637871">"Hidup"</item>
+ </string-array>
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Tidak tersedia"</item>
<item msgid="5044688398303285224">"Mati"</item>
diff --git a/packages/SystemUI/res/values-my/strings.xml b/packages/SystemUI/res/values-my/strings.xml
index 8f35ff676d35..c1f186abb3a7 100644
--- a/packages/SystemUI/res/values-my/strings.xml
+++ b/packages/SystemUI/res/values-my/strings.xml
@@ -126,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"ကြည့်ရှုရန် တို့ပါ"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"ဖန်သားပြင်ရိုက်ကူးမှုကို သိမ်းရာတွင် အမှားရှိသည်"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"ဖန်သားပြင် ရိုက်ကူးမှု စတင်ရာတွင် အမှားအယွင်းရှိနေသည်"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; ၏ အကြောင်းအရာ ရိုက်ကူးခြင်းကို ရပ်ပါမည်"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"ရိုက်ကူးမှု ရပ်ရန်"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"ဖန်သားပြင်ကို မျှဝေနေသည်"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"ဖန်သားပြင်မျှဝေခြင်း ရပ်မလား။"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; ၏ အကြောင်းအရာ မျှဝေခြင်းကို ရပ်ပါမည်"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"ဖန်သားပြင်ကို ကာစ်လုပ်နေသည်"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"မျှဝေခြင်း ရပ်ရန်"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"ဖန်သားပြင်ကို ကာစ်လုပ်နေသည်"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"ကာစ်လုပ်ခြင်းကို ရပ်လိုသလား။"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; ၏ အကြောင်းအရာ ကာစ်လုပ်ခြင်းကို ရပ်ပါမည်"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
+ <skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
+ <skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"ကာစ် ရပ်ရန်"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"ပိတ်ရန်"</string>
<string name="issuerecord_title" msgid="286627115110121849">"ပြဿနာရိုက်ကူးစနစ်"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"ပြဿနာရိုက်ကူးမှု လုပ်နေသည်"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"ပြဿနာစုစည်းခြင်း စက်ရှင်အတွက် လုပ်ဆောင်နေဆဲ အကြောင်းကြားချက်"</string>
@@ -161,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"ပြဿနာရိုက်ကူးမှုကို သိမ်း၍မရပါ"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"ပြဿနာရိုက်ကူးမှုကို စတင်၍မရပါ"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"ဖန်သားပြင်အပြည့် ကြည့်နေသည်"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"ထွက်ရန် သင့်ဖန်သားပြင်ထိပ်မှ အောက်သို့ ပွတ်ဆွဲပါ"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"နားလည်ပြီ"</string>
<string name="accessibility_back" msgid="6530104400086152611">"နောက်သို့"</string>
<string name="accessibility_home" msgid="5430449841237966217">"ပင်မစာမျက်နှာ"</string>
@@ -295,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"စခရင်နားချိန်ပုံ"</string>
<string name="ethernet_label" msgid="2203544727007463351">"အီသာနက်"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"မနှောင့်ယှက်ရ"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"ဘလူးတုသ်"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"ချိတ်တွဲထားသည့် ကိရိယာများ မရှိ"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"စက်ကို ချိတ်ဆက်ရန် (သို့) ချိတ်ဆက်မှုဖြုတ်ရန် တို့ပါ"</string>
@@ -306,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"သိမ်းထားသည်"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"ချိတ်ဆက်မှုဖြုတ်ရန်"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"စသုံးရန်"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"မနက်ဖြန် အလိုအလျောက်ဖွင့်ရန်"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"‘အမြန် မျှဝေပါ’ နှင့် Find My Device ကဲ့သို့ တူးလ်များသည် ဘလူးတုသ်သုံးသည်"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"မနက်ဖြန်နံနက်တွင် ဘလူးတုသ် ပွင့်ပါမည်"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"အသံမျှဝေရန်"</string>
@@ -476,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"နောက်ထပ်ဝိဂျက်များ ထည့်ရန်"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"ဝိဂျက်များ စိတ်ကြိုက်လုပ်ရန် ကြာကြာနှိပ်ထားပါ"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"ဝိဂျက်များကို စိတ်ကြိုက်လုပ်ရန်"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"ဝိဂျက်များ စိတ်ကြိုက်လုပ်ရန် ဖွင့်နိုင်သည်"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"ပိတ်ထားသော ဝိဂျက်အတွက် အက်ပ်သင်္ကေတ"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"ထည့်သွင်းနေသော ဝိဂျက်အတွက် အက်ပ်သင်္ကေတ"</string>
<string name="edit_widget" msgid="9030848101135393954">"ဝိဂျက်ပြင်ရန်"</string>
@@ -496,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"ဝိဂျက် ရွေးရန်"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"ဝိဂျက် ဖယ်ရှားရန်"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"ရွေးချယ်ထားသော ဝိဂျက်ကို တင်ရန်"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"လော့ခ်မျက်နှာပြင် ဝိဂျက်များ"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"ဝိဂျက်သုံး၍ အက်ပ်ဖွင့်ရန်အတွက် သင်ဖြစ်ကြောင်း အတည်ပြုရန်လိုသည်။ ထို့ပြင် သင့်တက်ဘလက် လော့ခ်ချထားချိန်၌ပင် မည်သူမဆို ၎င်းတို့ကို ကြည့်နိုင်ကြောင်း သတိပြုပါ။ ဝိဂျက်အချို့ကို လော့ခ်မျက်နှာပြင်အတွက် ရည်ရွယ်ထားခြင်း မရှိသဖြင့် ဤနေရာတွင် ထည့်ပါက မလုံခြုံနိုင်ပါ။"</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"နားလည်ပြီ"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"အသုံးပြုသူကို ပြောင်းလဲရန်"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"ဆွဲချမီနူး"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"ဒီချိတ်ဆက်မှု ထဲက အက်ပ်များ အားလုံး နှင့် ဒေတာကို ဖျက်ပစ်မည်။"</string>
@@ -723,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"မူလ"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"အလိုအလျောက်"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"အသံ သို့မဟုတ် တုန်ခါမှုမရှိပါ"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"အသံ သို့မဟုတ် တုန်ခါမှုမရှိပါ၊ စကားဝိုင်းကဏ္ဍ၏ အောက်ပိုင်းတွင် မြင်ရသည်"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"စက်ပစ္စည်း ဆက်တင်များပေါ် အခြေခံပြီး အသံမြည်နိုင်သည် (သို့) တုန်ခါနိုင်သည်"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"စက်ပစ္စည်းဆက်တင်များပေါ် အခြေခံပြီး အသံမြည်နိုင်သည် (သို့) တုန်ခါနိုင်သည်။ မူရင်းသတ်မှတ်ချက်အဖြစ် <xliff:g id="APP_NAME">%1$s</xliff:g> မှ စကားဝိုင်းများကို ပူဖောင်းကွက်ဖြင့် ပြသည်။"</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"ဤအကြောင်းကြားချက်က အသံ သို့မဟုတ် တုန်ခါမှု ပေးရန် သင့်/မသင့်ကို စနစ်က ဆုံးဖြတ်ပါစေ"</string>
@@ -780,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"အပေါ်စာမျက်နှာသို့သွားပါ"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"အောက်စာမျက်နှာသို့သွားပါ"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"ဖျက်ရန်"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"ပင်မ"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"ပြီးပါပြီ"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"ထည့်ပါ"</string>
@@ -1362,20 +1374,18 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"မျက်နှာပြင် ခွဲ၍ပြသခြင်း"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"ထည့်သွင်းမှု"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"အက်ပ်ဖြတ်လမ်းလင့်ခ်များ"</string>
+ <string name="shortcut_helper_category_current_app_shortcuts" msgid="4017840565974573628">"လက်ရှိအက်ပ်"</string>
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"အများသုံးနိုင်မှု"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"လက်ကွက်ဖြတ်လမ်းများ"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"ရှာဖွေစာလုံး ဖြတ်လမ်း"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"လျှော့ပြရန် သင်္ကေတ"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"ပိုပြရန် သင်္ကေတ"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"သို့မဟုတ်"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"နောက်သို့ လက်ဟန်"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"ပင်မစာမျက်နှာ လက်ဟန်"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"လုပ်ဆောင်ချက်ကီး"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"ပြီးပြီ"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"တော်ပါပေသည်။"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"ပြန်သွားရန်"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"ပြန်သွားရန်အတွက် တာ့ချ်ပက်တွင် မည်သည့်နေရာ၌မဆို လက်သုံးချောင်းသုံး၍ ဘယ် (သို့) ညာသို့ ပွတ်ဆွဲပါ။"</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"တာ့ချ်ပက်တွင် ဘယ်ညာရွှေ့နေသော လက်သုံးချောင်းကို ပြထားသည်"</string>
@@ -1384,4 +1394,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"အဆင့် %2$d အနက် %1$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"အိမ်ထိန်းချုပ်မှုများ"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"အိမ်ထိန်းချုပ်မှုများကို စခရင်နားချိန်ပုံအဖြစ် အမြန်ဝင်ကြည့်ရန်"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-my/tiles_states_strings.xml b/packages/SystemUI/res/values-my/tiles_states_strings.xml
index f665a00a5214..3628c06df4f3 100644
--- a/packages/SystemUI/res/values-my/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-my/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"ပိတ်"</item>
<item msgid="4875147066469902392">"ဖွင့်"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"မရနိုင်ပါ"</item>
<item msgid="5044688398303285224">"ပိတ်"</item>
diff --git a/packages/SystemUI/res/values-nb/strings.xml b/packages/SystemUI/res/values-nb/strings.xml
index cc57e8abbd7e..199b3594c65a 100644
--- a/packages/SystemUI/res/values-nb/strings.xml
+++ b/packages/SystemUI/res/values-nb/strings.xml
@@ -71,7 +71,7 @@
<string name="usb_port_enabled" msgid="531823867664717018">"Registrering av ladere og tilbehør er slått på for USB-porten"</string>
<string name="usb_disable_contaminant_detection" msgid="3827082183595978641">"Slå på USB"</string>
<string name="learn_more" msgid="4690632085667273811">"Finn ut mer"</string>
- <string name="global_action_screenshot" msgid="2760267567509131654">"Skjermdump"</string>
+ <string name="global_action_screenshot" msgid="2760267567509131654">"Skjermbilde"</string>
<string name="global_action_smart_lock_disabled" msgid="6286551337177954859">"Hold ulåst er slått av"</string>
<string name="remote_input_image_insertion_text" msgid="4850791636452521123">"har sendt et bilde"</string>
<string name="screenshot_saving_title" msgid="2298349784913287333">"Lagrer skjermbildet …"</string>
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> har registrert dette skjermbildet."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> og andre åpne apper har registrert dette skjermbildet."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Legg til i notat"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Inkluder linken"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Skjermopptak"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Behandler skjermopptaket"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Vedvarende varsel for et skjermopptak"</string>
@@ -127,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Trykk for å se"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Feil ved lagring av skjermopptaket"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Feil ved start av skjermopptaket"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Du slutter å ta opp &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Stopp opptaket"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Deler skjermen"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Vil du slutte å dele skjermen?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Du slutter å dele &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Slutt å dele"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Caster skjermen"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Vil du stoppe castingen?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Caster skjermen"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Du slutter å caste &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Stopp castingen"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Lukk"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Funksjon for opptak av problemer"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Opptak, databehandlingsproblem"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Pågående varsel for en innsamlingsøkt for et problem"</string>
@@ -162,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Feil ved lagring av problemopptaket"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Feil ved start av problemopptaket"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Visning i fullskjerm"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"For å gå ut, sveip ned fra toppen av skjermen"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"Greit"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Tilbake"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Startside"</string>
@@ -196,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Låst opp med ansiktet. Trykk for å fortsette."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Ansiktet er gjenkjent. Trykk for å fortsette."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Ansiktet er gjenkjent. Trykk på lås opp-ikon for å fortsette"</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Låst opp med ansiktet. Trykk for å fortsette."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Autentisert"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Avbryt autentisering"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Flere alternativer"</string>
@@ -297,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Skjermsparer"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Ikke forstyrr"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Ingen sammenkoblede enheter er tilgjengelige"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Trykk for å koble en enhet til eller fra"</string>
@@ -308,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Lagret"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"koble fra"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"aktiver"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Slå på automatisk i morgen"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Funksjoner som Quick Share og Finn enheten min bruker Bluetooth"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bluetooth slås på i morgen tidlig"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Del lyd"</string>
@@ -478,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Legg til flere moduler"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Trykk lenge for å tilpasse modulene"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Tilpass moduler"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Lås opp for å tilpasse moduler"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Appikon for deaktivert modul"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Appikon for en modul som installeres"</string>
<string name="edit_widget" msgid="9030848101135393954">"Endre modul"</string>
@@ -498,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"velg modul"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"fjern modul"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"plasser den valgte modulen"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Låseskjermmoduler"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"For å åpne en app ved hjelp av en modul må du bekrefte at det er deg. Husk også at hvem som helst kan se dem, selv om nettbrettet er låst. Noen moduler er kanskje ikke laget for å være på låseskjermen og kan være utrygge å legge til der."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"Greit"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Bytt bruker"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"rullegardinmeny"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Alle apper og data i denne økten blir slettet."</string>
@@ -725,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Standard"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Automatisk"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Ingen lyd eller vibrering"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Ingen lyd eller vibrering, og vises lavere i samtaledelen"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Kan ringe eller vibrere basert på enhetsinnstillingene"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Kan ringe eller vibrere basert på enhetsinnstillingene. Samtaler fra <xliff:g id="APP_NAME">%1$s</xliff:g> vises som standard som bobler."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"La systemet velge om dette varselet skal lage lyd eller vibrere"</string>
@@ -782,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page Down"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Delete"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Startskjerm"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1364,20 +1374,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Delt skjerm"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Inndata"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"App-snarveier"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Tilgjengelighet"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Hurtigtaster"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Snarveier til søk"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Skjul-ikon"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Vis-ikon"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"eller"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Tilbakebevegelse"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Startskjermbevegelse"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Handlingstast"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Ferdig"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Bra jobbet!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Gå tilbake"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"For å gå tilbake, sveip til venstre eller høyre med tre fingre hvor som helst på styreflaten."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"En styreflate med tre fingre som beveger seg til høyre og venstre"</string>
@@ -1386,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Nivå %1$d av %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Hjemkontroller"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Gå raskt til hjemkontrollene som skjermsparer"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-nb/tiles_states_strings.xml b/packages/SystemUI/res/values-nb/tiles_states_strings.xml
index a9efd1d95a7d..2a57ecf9314d 100644
--- a/packages/SystemUI/res/values-nb/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-nb/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Av"</item>
<item msgid="4875147066469902392">"På"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Utilgjengelig"</item>
<item msgid="5044688398303285224">"Av"</item>
diff --git a/packages/SystemUI/res/values-ne/strings.xml b/packages/SystemUI/res/values-ne/strings.xml
index 6b353618a5ab..672609ade4e9 100644
--- a/packages/SystemUI/res/values-ne/strings.xml
+++ b/packages/SystemUI/res/values-ne/strings.xml
@@ -126,31 +126,27 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"हेर्नका लागि ट्याप गर्नुहोस्"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"स्क्रिन रेकर्डिङ सेभ गर्ने क्रममा त्रुटि भयो"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"स्क्रिन रेकर्ड गर्न थाल्ने क्रममा त्रुटि भयो"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
- <skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
- <skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; का सामग्री रेकर्ड हुन छाड्ने छन्"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
- <skip />
+ <string name="screenrecord_stop_dialog_title" msgid="8716193661764511095">"रेकर्ड गर्न छाड्ने हो?"</string>
+ <string name="screenrecord_stop_dialog_message" msgid="6262768207331626817">"तपाईं अहिले आफ्नो डिभाइसको पूरै स्क्रिन रेकर्ड गरिरहनुभएको छ"</string>
+ <string name="screenrecord_stop_dialog_message_specific_app" msgid="5995770227684523244">"तपाईं अहिले <xliff:g id="APP_NAME">%1$s</xliff:g> रेकर्ड गरिरहनुभएको छ"</string>
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"रेकर्ड गर्न छाड्नुहोस्"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"स्क्रिन सेयर गरिँदै छ"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
- <skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
- <skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; का सामग्री सेयर हुन छाड्ने छन्"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
- <skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"स्क्रिन कास्ट गरिँदै छ"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
- <skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
- <skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; का सामग्री कास्ट हुन छाड्ने छन्"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
- <skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
- <skip />
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"स्क्रिन सेयर गर्न छाड्ने हो?"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen_with_host_app" msgid="522823522115375414">"तपाईं अहिले <xliff:g id="HOST_APP_NAME">%1$s</xliff:g> सँग आफ्नो डिभाइसको पूरै स्क्रिन सेयर गरिरहनुभएको छ"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen" msgid="5090115386271179270">"तपाईं अहिले कुनै एपसँग आफ्नो डिभाइसको पूरै स्क्रिन सेयर गरिरहनुभएको छ"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_specific" msgid="5923772039347985172">"तपाईं अहिले <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> सेयर गरिरहनुभएको छ"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_generic" msgid="6681016774654578261">"तपाईं अहिले कुनै एप सेयर गरिरहनुभएको छ"</string>
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"सेयर गर्न छाड्नुहोस्"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"स्क्रिन कास्ट गरिँदै छ"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"कास्ट गर्न छाड्ने हो?"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen_with_device" msgid="1474703115926205251">"तपाईं अहिले आफ्नो डिभाइसको पूरै स्क्रिन <xliff:g id="DEVICE_NAME">%1$s</xliff:g> मा कास्ट गरिरहनुभएको छ"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen" msgid="8419219169553867625">"तपाईं अहिले आफ्नो डिभाइसको पूरै स्क्रिन नजिकैको डिभाइसमा कास्ट गरिरहनुभएको छ"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app_with_device" msgid="2715934698604085519">"तपाईं अहिले <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> बाट <xliff:g id="DEVICE_NAME">%2$s</xliff:g> मा कास्ट गरिरहनुभएको छ"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="8616103075630934513">"तपाईं अहिले <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> बाट नजिकैको डिभाइसमा कास्ट गरिरहनुभएको छ"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic_with_device" msgid="9213582497852420203">"तपाईं अहिले <xliff:g id="DEVICE_NAME">%1$s</xliff:g> मा कास्ट गरिरहनुभएको छ"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic" msgid="4100272100480415076">"तपाईं अहिले नजिकैको डिभाइसमा कास्ट गरिरहनुभएको छ"</string>
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"कास्ट गर्न छाड्नुहोस्"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"बन्द गर्नुहोस्"</string>
<string name="issuerecord_title" msgid="286627115110121849">"समस्यासम्बन्धी जानकारी रेकर्ड गर्ने रेकर्डर"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"समस्याको रेकर्डिङ प्रोसेस गरिँदै छ"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"समस्यासम्बन्धी जानकारी सङ्कलन गर्ने जारी सत्रसम्बन्धी सूचना"</string>
@@ -161,8 +157,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"समस्याको रेकर्डिङ सेभ गर्ने क्रममा त्रुटि भयो"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"समस्यासम्बन्धी जानकारी रेकर्ड गर्न थाल्ने क्रममा त्रुटि भयो"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"फुल स्क्रिन हेरिँदै छ"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"यहाँबाट बाहिरिन स्क्रिनको सिरानबाट तलतिर स्वाइप गर्नुहोस्"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"बुझेँ"</string>
<string name="accessibility_back" msgid="6530104400086152611">"पछाडि"</string>
<string name="accessibility_home" msgid="5430449841237966217">"गृह"</string>
@@ -295,6 +290,8 @@
<string name="start_dreams" msgid="9131802557946276718">"स्क्रिन सेभर"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"बाधा नपुऱ्याउनुहोस्"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"ब्लुटुथ"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"जोडी उपकरणहरू उपलब्ध छैन"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"कुनै डिभाइस कनेक्ट गर्न वा डिस्कनेक्ट गर्न ट्याप गर्नुहोस्"</string>
@@ -306,8 +303,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"सेभ गरिएको छ"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"डिस्कनेक्ट गर्नुहोस्"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"एक्टिभेट गर्नुहोस्"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"भोलि स्वतः अन गर्नुहोस्"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"क्विक सेयर र Find My Device जस्ता सुविधाहरू प्रयोग गर्न ब्लुटुथ चाहिन्छ"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"ब्लुटुथ भोलि बिहान अन हुने छ"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"अडियो सेयर गर्नुहोस्"</string>
@@ -476,8 +472,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"थप विजेटहरू हाल्नुहोस्"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"विजेटहरू कस्टमाइज गर्न केही बेरसम्म थिच्नुहोस्"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"विजेटहरू कस्टमाइज गर्नुहोस्"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"विजेटहरू कस्टमाइज गर्न अन लक गर्नुहोस्"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"अफ गरिएको विजेटको एप जनाउने आइकन"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"इन्स्टल भइरहेको विजेटको एप आइकन"</string>
<string name="edit_widget" msgid="9030848101135393954">"विजेट सम्पादन गर्नुहोस्"</string>
@@ -496,12 +491,11 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"विजेट चयन गर्नुहोस्"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"विजेट हटाउनुहोस्"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"चयन गरिएका विजेटका लागि ठाउँ चयन गर्नुहोस्"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
- <skip />
+ <string name="communal_widget_picker_title" msgid="1953369090475731663">"लक स्क्रिन विजेटहरू"</string>
+ <string name="communal_widget_picker_description" msgid="490515450110487871">"तपाईंको ट्याब्लेट लक भएका बेला पनि सबैले लक स्क्रिनमा भएका विजेट हेर्न सक्छन्।"</string>
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"लक स्क्रिन विजेटहरू"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"विजेट प्रयोग गरी एप खोल्न तपाईंले आफ्नो पहिचान पुष्टि गर्नु पर्ने हुन्छ। साथै, तपाईंको ट्याब्लेट लक भएका बेला पनि सबै जनाले तिनलाई देख्न सक्छन् भन्ने कुरा ख्याल गर्नुहोस्। केही विजेटहरू लक स्क्रिनमा प्रयोग गर्ने उद्देश्यले नबनाइएका हुन सक्छन् र तिनलाई यहाँ हाल्नु सुरक्षित नहुन सक्छ।"</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"बुझेँ"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"प्रयोगकर्ता फेर्नुहोस्"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"पुलडाउन मेनु"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"यो सत्रमा भएका सबै एपहरू र डेटा मेटाइने छ।"</string>
@@ -723,7 +717,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"डिफल्ट"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"स्वचालित"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"बज्दैन पनि, भाइब्रेट पनि हुँदैन"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"बज्दैन पनि, भाइब्रेट पनि हुँदैन र वार्तालाप खण्डको तलतिर देखा पर्छ"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"डिभाइसको सेटिङका आधारमा घन्टी बज्न वा भाइब्रेट हुन सक्छ"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"डिभाइसको सेटिङका आधारमा घन्टी बज्न वा कम्पन हुन सक्छ। <xliff:g id="APP_NAME">%1$s</xliff:g> मार्फत गरिएका वार्तालापहरू स्वतः बबलमा देखिन्छन्।"</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"सिस्टमलाई यो सूचना आउँदा ध्वनि बज्नु पर्छ वा कम्पन हुनु पर्छ भन्ने कुराको निधो गर्न दिनुहोस्"</string>
@@ -780,6 +775,7 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page Down"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Delete"</string>
+ <string name="keyboard_key_esc" msgid="6230365950511411322">"Esc"</string>
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1362,20 +1358,18 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"स्प्लिट स्क्रिन"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"इनपुट"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"एपका सर्टकटहरू"</string>
+ <string name="shortcut_helper_category_current_app_shortcuts" msgid="4017840565974573628">"हालको एप"</string>
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"सर्वसुलभता"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"किबोर्डका सर्टकटहरू"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"खोजका सर्टकटहरू"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"\"कोल्याप्स गर्नुहोस्\" आइकन"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"\"एक्स्पान्ड गर्नुहोस्\" आइकन"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"वा"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"ब्याक जेस्चर"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"होम जेस्चर"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"एक्सन की"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"सम्पन्न भयो"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"अद्भुत!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"पछाडि जानुहोस्"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"पछाडि जान तिन वटा औँलाले टचप्याडमा कतै छोएर बायाँ वा दायाँतिर स्वाइप गर्नुहोस्।"</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"तिन वटा औँला दायाँ र बायाँ सारेको देखाइएको टचप्याड"</string>
@@ -1384,4 +1378,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"%2$d मध्ये %1$d औँ स्तर"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"होम कन्ट्रोलहरू"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"होम कन्ट्रोललाई तुरुन्तै स्क्रिनसेभरका रूपमा एक्सेस गर्नुहोस्"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-ne/tiles_states_strings.xml b/packages/SystemUI/res/values-ne/tiles_states_strings.xml
index c1b2f3420a40..7edd8bfb23a3 100644
--- a/packages/SystemUI/res/values-ne/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-ne/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"अफ छ"</item>
<item msgid="4875147066469902392">"अन छ"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"उपलब्ध छैन"</item>
<item msgid="5044688398303285224">"अफ छ"</item>
diff --git a/packages/SystemUI/res/values-nl/strings.xml b/packages/SystemUI/res/values-nl/strings.xml
index 1bbb0e3702cd..7f86f23999c4 100644
--- a/packages/SystemUI/res/values-nl/strings.xml
+++ b/packages/SystemUI/res/values-nl/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> heeft dit screenshot waargenomen."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> en andere geopende apps hebben dit screenshot waargenomen."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Toevoegen aan notitie"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Link opnemen"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Schermopname"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Schermopname verwerken"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Doorlopende melding voor een schermopname-sessie"</string>
@@ -127,31 +126,27 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Tik om te bekijken"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Fout bij opslaan van schermopname"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Fout bij starten van schermopname"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
- <skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
- <skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Je stopt met het opnemen van &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
- <skip />
+ <string name="screenrecord_stop_dialog_title" msgid="8716193661764511095">"Opname stoppen?"</string>
+ <string name="screenrecord_stop_dialog_message" msgid="6262768207331626817">"Je neemt op dit moment je hele scherm op"</string>
+ <string name="screenrecord_stop_dialog_message_specific_app" msgid="5995770227684523244">"Je neemt op dit moment <xliff:g id="APP_NAME">%1$s</xliff:g> op"</string>
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Opname stoppen"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Scherm delen"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
- <skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
- <skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Je stopt met het delen van &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
- <skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Scherm casten"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
- <skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
- <skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Je stopt met het casten van &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
- <skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
- <skip />
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Scherm delen stoppen?"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen_with_host_app" msgid="522823522115375414">"Je deelt op dit moment je hele scherm met <xliff:g id="HOST_APP_NAME">%1$s</xliff:g>"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen" msgid="5090115386271179270">"Je deelt op dit moment je hele scherm met een app"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_specific" msgid="5923772039347985172">"Je deelt op dit moment <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g>"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_generic" msgid="6681016774654578261">"Je deelt op dit moment een app"</string>
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Delen stoppen"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Scherm casten"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Stoppen met casten?"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen_with_device" msgid="1474703115926205251">"Je cast op dit moment je hele scherm naar <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen" msgid="8419219169553867625">"Je cast op dit moment je hele scherm naar een apparaat in de buurt"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app_with_device" msgid="2715934698604085519">"Je cast op dit moment <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> naar <xliff:g id="DEVICE_NAME">%2$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="8616103075630934513">"Je cast op dit moment <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> naar een apparaat in de buurt"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic_with_device" msgid="9213582497852420203">"Je cast op dit moment naar <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic" msgid="4100272100480415076">"Je cast op dit moment naar een apparaat in de buurt"</string>
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Casten stoppen"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Sluiten"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Problemen opnemen"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Probleemopname verwerken"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Melding over actieve activiteit voor een sessie voor probleemverzameling"</string>
@@ -162,8 +157,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Fout bij opslaan van probleemopname"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Fout bij starten van probleemopname"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Volledig scherm wordt getoond"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Swipe omlaag vanaf de bovenkant van het scherm om af te sluiten"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"OK"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Terug"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Startscherm"</string>
@@ -196,8 +190,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Ontgrendeld via gezicht. Druk om door te gaan."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Gezicht herkend. Druk om door te gaan."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Gezicht herkend. Druk op het ontgrendelicoon."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Ontgrendeld via gezicht. Tik om door te gaan."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Geverifieerd"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Verificatie annuleren"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Meer opties"</string>
@@ -297,6 +290,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Screensaver"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Niet storen"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Geen gekoppelde apparaten beschikbaar"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Tik om een apparaat te verbinden of de verbinding te verbreken"</string>
@@ -308,8 +303,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Opgeslagen"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"loskoppelen"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"activeren"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Morgen automatisch aanzetten"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Functies zoals Quick Share en Vind mijn apparaat gebruiken bluetooth"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bluetooth wordt morgenochtend aangezet"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Audio delen"</string>
@@ -478,8 +472,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Meer widgets toevoegen"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Houd lang ingedrukt om widgets aan te passen"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Widgets aanpassen"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Ontgrendel om widgets aan te passen"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"App-icoon voor uitgezette widget"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"App-icoon voor een widget die wordt geïnstalleerd"</string>
<string name="edit_widget" msgid="9030848101135393954">"Widget bewerken"</string>
@@ -498,12 +491,11 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"widget selecteren"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"widget verwijderen"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"geselecteerde widget plaatsen"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
- <skip />
+ <string name="communal_widget_picker_title" msgid="1953369090475731663">"Widgets op het vergrendelscherm"</string>
+ <string name="communal_widget_picker_description" msgid="490515450110487871">"Iedereen kan widgets op je vergrendelscherm bekijken, ook als je tablet is vergrendeld."</string>
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Widgets op het vergrendelscherm"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Als je een app wilt openen met een widget, moet je laten verifiëren dat jij het bent. Houd er ook rekening mee dat iedereen ze kan bekijken, ook als je tablet vergrendeld is. Bepaalde widgets zijn misschien niet bedoeld voor je vergrendelscherm en kunnen hier niet veilig worden toegevoegd."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"OK"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Gebruiker wijzigen"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"pull-downmenu"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Alle apps en gegevens in deze sessie worden verwijderd."</string>
@@ -725,7 +717,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Standaard"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Automatisch"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Geen geluid of trilling"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Geen geluid of trilling en wordt lager in het gedeelte met gesprekken getoond"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Kan overgaan of trillen op basis van de apparaatinstellingen"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Kan overgaan of trillen op basis van de apparaatinstellingen. Gesprekken uit <xliff:g id="APP_NAME">%1$s</xliff:g> worden standaard als bubbels weergegeven."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Het systeem laten bepalen of deze melding geluid moet maken of moet trillen"</string>
@@ -782,6 +775,7 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page Down"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Delete"</string>
+ <string name="keyboard_key_esc" msgid="6230365950511411322">"Esc"</string>
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1215,7 +1209,7 @@
<string name="battery_state_unknown_notification_text" msgid="13720937839460899">"Tik hier voor meer informatie"</string>
<string name="qs_alarm_tile_no_alarm" msgid="4826472008616807923">"Geen wekker gezet"</string>
<string name="accessibility_bouncer" msgid="5896923685673320070">"schermvergrendeling invoeren"</string>
- <string name="accessibility_side_fingerprint_indicator_label" msgid="1673807833352363712">"Raak de vingerafdruksensor aan. Dit is de kortere knop aan de zijkant van de telefoon."</string>
+ <string name="accessibility_side_fingerprint_indicator_label" msgid="1673807833352363712">"Plaats je vinger op de vingerafdruksensor. Dat is de kortere knop aan de zijkant van de telefoon."</string>
<string name="accessibility_fingerprint_label" msgid="5255731221854153660">"Vingerafdruksensor"</string>
<string name="accessibility_authenticate_hint" msgid="798914151813205721">"verifiëren"</string>
<string name="accessibility_enter_hint" msgid="2617864063504824834">"apparaat opgeven"</string>
@@ -1364,20 +1358,18 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Gesplitst scherm"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Invoer"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"App-snelkoppelingen"</string>
+ <string name="shortcut_helper_category_current_app_shortcuts" msgid="4017840565974573628">"Huidige app"</string>
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Toegankelijkheid"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Sneltoetsen"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Snelkoppelingen voor zoekopdrachten"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Icoon voor samenvouwen"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Icoon voor uitvouwen"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"of"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Gebaar voor terug"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Gebaar voor startscherm"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Actietoets"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Klaar"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Goed werk!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Terug"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Als je wilt teruggaan, swipe je met 3 vingers naar links of rechts op de touchpad."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Touchpad met 3 vingers die naar rechts en links bewegen"</string>
@@ -1386,4 +1378,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Niveau %1$d van %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Bediening voor in huis"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Gebruik bediening voor in huis als screensaver"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-nl/tiles_states_strings.xml b/packages/SystemUI/res/values-nl/tiles_states_strings.xml
index c5d93610fb87..45664b827d79 100644
--- a/packages/SystemUI/res/values-nl/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-nl/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Uit"</item>
<item msgid="4875147066469902392">"Aan"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Niet beschikbaar"</item>
<item msgid="5044688398303285224">"Uit"</item>
diff --git a/packages/SystemUI/res/values-or/strings.xml b/packages/SystemUI/res/values-or/strings.xml
index aaf94c9cdd58..88aea1599cf7 100644
--- a/packages/SystemUI/res/values-or/strings.xml
+++ b/packages/SystemUI/res/values-or/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> ଏହି ସ୍କ୍ରିନସଟକୁ ଚିହ୍ନଟ କରିଛି।"</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> ଏବଂ ଅନ୍ୟ ଓପନ ଆପ୍ସ ଏହି ସ୍କ୍ରିନସଟକୁ ଚିହ୍ନଟ କରିଛି।"</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"ନୋଟରେ ଯୋଗ କରନ୍ତୁ"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"ଲିଙ୍କକୁ ଅନ୍ତର୍ଭୁକ୍ତ କରନ୍ତୁ"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"ସ୍କ୍ରିନ ରେକର୍ଡର"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"ସ୍କ୍ରିନ ରେକର୍ଡିଂର ପ୍ରକ୍ରିୟାକରଣ"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"ଏକ ସ୍କ୍ରି‍ନ୍‍ ରେକର୍ଡ୍‍ ସେସନ୍‍ ପାଇଁ ଚାଲୁଥିବା ବିଜ୍ଞପ୍ତି"</string>
@@ -127,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"ଦେଖିବାକୁ ଟାପ୍ କରନ୍ତୁ"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"ସ୍କ୍ରିନ ରେକର୍ଡିଂ ସେଭ କରିବାରେ ତ୍ରୁଟି"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"ସ୍କ୍ରିନ୍ ରେକର୍ଡିଂ ଆରମ୍ଭ କରିବାରେ ତ୍ରୁଟି"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"ଆପଣ &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;କୁ ରେକର୍ଡ କରିବା ବନ୍ଦ କରିବେ"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"ରେକର୍ଡିଂ ବନ୍ଦ କରନ୍ତୁ"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"ସ୍କ୍ରିନ ସେୟାର କରାଯାଉଛି"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"ସ୍କ୍ରିନ ସେୟାର କରିବା ବନ୍ଦ କରିବେ?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"ଆପଣ &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;କୁ ସେୟାର କରିବା ବନ୍ଦ କରିବେ"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"ସେୟାର କରିବା ବନ୍ଦ କରନ୍ତୁ"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"ସ୍କ୍ରିନ କାଷ୍ଟ କରାଯାଉଛି"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"କାଷ୍ଟ କରିବା ବନ୍ଦ କରିବେ?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"ସ୍କ୍ରିନ କାଷ୍ଟ କରାଯାଉଛି"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"ଆପଣ &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;କୁ କାଷ୍ଟ କରିବା ବନ୍ଦ କରିବେ"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"କାଷ୍ଟ କରିବା ବନ୍ଦ କରନ୍ତୁ"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"ବନ୍ଦ କରନ୍ତୁ"</string>
<string name="issuerecord_title" msgid="286627115110121849">"ସମସ୍ୟା ରେକର୍ଡର"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"ସମସ୍ୟାର ରେକର୍ଡିଂର ପ୍ରକ୍ରିୟାକରଣ"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"ଏକ ସମସ୍ୟା ସଂଗ୍ରହ ସେସନ ପାଇଁ ଚାଲୁଥିବା ବିଜ୍ଞପ୍ତି"</string>
@@ -162,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"ସମସ୍ୟାର ରେକର୍ଡିଂ କରିବାରେ ତ୍ରୁଟି"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"ସମସ୍ୟାର ରେକର୍ଡିଂ ଆରମ୍ଭ କରିବାରେ ତ୍ରୁଟି"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"ପୂର୍ଣ୍ଣ ସ୍କ୍ରିନରେ ଦେଖିବା"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"ବାହାରି ଯିବା ପାଇଁ ଆପଣଙ୍କ ସ୍କ୍ରିନର ଶୀର୍ଷରୁ ତଳକୁ ସ୍ୱାଇପ କରନ୍ତୁ"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"ବୁଝିଗଲି"</string>
<string name="accessibility_back" msgid="6530104400086152611">"ଫେରନ୍ତୁ"</string>
<string name="accessibility_home" msgid="5430449841237966217">"ହୋମ"</string>
@@ -196,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"ଫେସ ମାଧ୍ୟମରେ ଅନଲକ କରାଯାଇଛି। ଜାରି ରଖିବାକୁ ଦବାନ୍ତୁ।"</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"ଫେସ ଚିହ୍ନଟ କରାଯାଇଛି। ଜାରି ରଖିବାକୁ ଦବାନ୍ତୁ।"</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"ଫେସ ଚିହ୍ନଟ କରାଯାଇଛି। ଜାରି ରଖିବାକୁ ଅନଲକ ଆଇକନ ଦବାନ୍ତୁ।"</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"ଫେସ ମାଧ୍ୟମରେ ଅନଲକ କରାଯାଇଛି। ଜାରି ରଖିବାକୁ ଟାପ କରନ୍ତୁ।"</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"ପ୍ରାମାଣିକତା ହୋଇଛି"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"ପ୍ରମାଣୀକରଣକୁ ବାତିଲ କରନ୍ତୁ"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"ଅଧିକ ବିକଳ୍ପ"</string>
@@ -297,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"ସ୍କ୍ରିନ୍‌ ସେଭର୍‌"</string>
<string name="ethernet_label" msgid="2203544727007463351">"ଇଥରନେଟ୍‌"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"ବିରକ୍ତ କରନ୍ତୁ ନାହିଁ"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"ବ୍ଲୁଟୁଥ"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"ପେୟାର୍‍ ହୋଇଥିବା କୌଣସି ଡିଭାଇସ୍ ଉପଲବ୍ଧ ନାହିଁ"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"ଏକ ଡିଭାଇସ କନେକ୍ଟ କିମ୍ବା ଡିସକନେକ୍ଟ କରିବାକୁ ଟାପ କରନ୍ତୁ"</string>
@@ -308,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"ସେଭ କରାଯାଇଛି"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"ଡିସକନେକ୍ଟ କରନ୍ତୁ"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"ଚାଲୁ କରନ୍ତୁ"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"ଆସନ୍ତାକାଲି ସ୍ୱତଃ ଚାଲୁ ହେବ"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Quick Share ଏବଂ Find My Device ପରି ଫିଚରଗୁଡ଼ିକ ବ୍ଲୁଟୁଥ ବ୍ୟବହାର କରେ"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"ବ୍ଲୁଟୁଥ ଆସନ୍ତା କାଲି ସକାଳେ ଚାଲୁ ହେବ"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"ଅଡିଓ ସେୟାର କରନ୍ତୁ"</string>
@@ -478,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"ଅଧିକ ୱିଜେଟ ଯୋଗ କରନ୍ତୁ"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"ୱିଜେଟଗୁଡ଼ିକୁ କଷ୍ଟମାଇଜ କରିବା ପାଇଁ ଅଧିକ ସମୟ ଦବାନ୍ତୁ"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"ୱିଜେଟଗୁଡ଼ିକୁ କଷ୍ଟମାଇଜ କରନ୍ତୁ"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"ୱିଜେଟ କଷ୍ଟମାଇଜ କରିବାକୁ ଅନଲକ କରନ୍ତୁ"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"ଅକ୍ଷମ କରାଯାଇଥିବା ୱିଜେଟ ପାଇଁ ଆପ ଆଇକନ"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"ଏକ ୱିଜେଟ ପାଇଁ ଆପ ଆଇକନକୁ ଇନଷ୍ଟଲ କରାଯାଉଛି"</string>
<string name="edit_widget" msgid="9030848101135393954">"ୱିଜେଟକୁ ଏଡିଟ କରନ୍ତୁ"</string>
@@ -498,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"ୱିଜେଟ ଚୟନ କରନ୍ତୁ"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"ୱିଜେଟକୁ କାଢ଼ି ଦିଅନ୍ତୁ"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"ଚୟନିତ ୱିଜେଟ ରଖନ୍ତୁ"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"ଲକ ସ୍କ୍ରିନ ୱିଜେଟଗୁଡ଼ିକ"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"ଏକ ୱିଜେଟ ବ୍ୟବହାର କରି ଗୋଟିଏ ଆପ ଖୋଲିବା ପାଇଁ ଏହା ଆପଣ ଅଟନ୍ତି ବୋଲି ଆପଣଙ୍କୁ ଯାଞ୍ଚ କରିବାକୁ ହେବ। ଆହୁରି ମଧ୍ୟ, ଆପଣଙ୍କ ଟାବଲେଟ ଲକ ଥିଲେ ମଧ୍ୟ ଯେ କୌଣସି ବ୍ୟକ୍ତି ଏହାକୁ ଭ୍ୟୁ କରିପାରିବେ ବୋଲି ମନେ ରଖନ୍ତୁ। କିଛି ୱିଜେଟ ଆପଣଙ୍କ ଲକ ସ୍କ୍ରିନ ପାଇଁ ଉଦ୍ଦିଷ୍ଟ ହୋଇନଥାଇପାରେ ଏବଂ ଏଠାରେ ଯୋଗ କରିବା ଅସୁରକ୍ଷିତ ହୋଇପାରେ।"</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"ବୁଝିଗଲି"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"ୟୁଜର୍‍ ବଦଳାନ୍ତୁ"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"ପୁଲଡାଉନ ମେନୁ"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"ଏହି ସେସନର ସମସ୍ତ ଆପ୍‌ ଓ ଡାଟା ଡିଲିଟ୍‌ ହୋଇଯିବ।"</string>
@@ -514,7 +521,7 @@
<string name="guest_notification_app_name" msgid="2110425506754205509">"ଅତିଥି ମୋଡ"</string>
<string name="guest_notification_session_active" msgid="5567273684713471450">"ଆପଣ ଅତିଥି ମୋଡରେ ଅଛନ୍ତି"</string>
<string name="user_add_user_message_guest_remove" msgid="5589286604543355007">\n\n"ଜଣେ ନୂଆ ଉପଯୋଗକର୍ତ୍ତାଙ୍କୁ ଯୋଗ କରିବା ଦ୍ୱାରା ଅତିଥି ମୋଡରୁ ବାହାରି ଯିବ ଏବଂ ବର୍ତ୍ତମାନର ଅତିଥି ସେସନରୁ ସମସ୍ତ ଆପ ଓ ଡାଟା ଡିଲିଟ ହୋଇଯିବ।"</string>
- <string name="user_limit_reached_title" msgid="2429229448830346057">"ଉପଯୋଗକର୍ତ୍ତା ସୀମାରେ ପହଞ୍ଚିଛି"</string>
+ <string name="user_limit_reached_title" msgid="2429229448830346057">"ୟୁଜର ସୀମାରେ ପହଞ୍ଚିଛି"</string>
<string name="user_limit_reached_message" msgid="1070703858915935796">"{count,plural, =1{କେବଳ ଜଣେ ୟୁଜର ତିଆରି କରାଯାଇପାରିବ।}other{କେବଳ # ଜଣ ୟୁଜର ତିଆରି କରାଯାଇପାରିବ।}}"</string>
<string name="user_remove_user_title" msgid="9124124694835811874">"ୟୁଜରଙ୍କୁ ବାହାର କରିବେ?"</string>
<string name="user_remove_user_message" msgid="6702834122128031833">"ଏହି ୟୁଜରଙ୍କ ସମସ୍ତ ଆପ୍‍ ଓ ଡାଟା ଡିଲିଟ୍‍ ହେବ।"</string>
@@ -725,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"ଡିଫଲ୍ଟ"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"ସ୍ୱଚାଳିତ"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"କୌଣସି ସାଉଣ୍ଡ କିମ୍ବା ଭାଇବ୍ରେସନ୍ ନାହିଁ"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"କୌଣସି ସାଉଣ୍ଡ କିମ୍ବା ଭାଇବ୍ରେସନ୍ ନାହିଁ ଏବଂ ବାର୍ତ୍ତାଳାପ ବିଭାଗର ନିମ୍ନରେ ଦେଖାଯାଏ"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"ଡିଭାଇସ ସେଟିଂସ ଆଧାରରେ ରିଂ କିମ୍ବା ଭାଇବ୍ରେଟ ହୋଇପାରେ"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"ଡିଭାଇସ ସେଟିଂସ ଆଧାରରେ ରିଂ କିମ୍ବା ଭାଇବ୍ରେଟ ହୋଇପାରେ। ଡିଫଲ୍ଟ ଭାବରେ <xliff:g id="APP_NAME">%1$s</xliff:g>ରୁ ବାର୍ତ୍ତାଳାପଗୁଡ଼ିକ ବବଲ ଭାବେ ଦେଖାଯାଏ।"</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"ଏହି ବିଜ୍ଞପ୍ତି ପ୍ରାପ୍ତ ହେବା ସମୟରେ ସାଉଣ୍ଡ ହେବା ଉଚିତ ନା ଭାଇବ୍ରେସନ୍ ତାହା ସିଷ୍ଟମକୁ ସ୍ଥିର କରିବାକୁ ଦିଅନ୍ତୁ"</string>
@@ -782,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"ଉପର ପୃଷ୍ଠା"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"ତଳ ପୃଷ୍ଠା"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"ଡିଲିଟ କରନ୍ତୁ"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"ହୋମ"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"ସମାପ୍ତ"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"ଇନ୍‌ସର୍ଟ"</string>
@@ -1364,20 +1374,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"ସ୍ପ୍ଲିଟ ସ୍କ୍ରିନ"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"ଇନପୁଟ"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"ଆପ ସର୍ଟକଟ"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"ଆକ୍ସେସିବିଲିଟୀ"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"କୀବୋର୍ଡ ସର୍ଟକଟ"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"ସର୍ଚ୍ଚ ସର୍ଟକଟ"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"ଆଇକନକୁ ସଙ୍କୁଚିତ କରନ୍ତୁ"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"ଆଇକନକୁ ବିସ୍ତାର କରନ୍ତୁ"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"କିମ୍ବା"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"ବେକ ଜେଶ୍ଚର"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"ହୋମ ଜେଶ୍ଚର"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"ଆକ୍ସନ କୀ"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"ହୋଇଗଲା"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"ବଢ଼ିଆ କାମ!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"ପଛକୁ ଫେରନ୍ତୁ"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"ପଛକୁ ଫେରିବା ପାଇଁ ଯେ କୌଣସି ସ୍ଥାନରେ ତିନି ଆଙ୍ଗୁଠି ବ୍ୟବହାର କରି ବାମ କିମ୍ବା ଡାହାଣକୁ ସ୍ୱାଇପ କରନ୍ତୁ।"</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"ଡାହାଣ ଏବଂ ବାମକୁ ତିନି ଆଙ୍ଗୁଠି ମୁଭ କରୁଥିବା ଟଚପେଡ ଦେଖାଉଛି"</string>
@@ -1386,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"%2$dରୁ %1$d ନମ୍ବର ଲେଭେଲ"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"ହୋମ କଣ୍ଟ୍ରୋଲ୍ସ"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"ସ୍କ୍ରିନସେଭର ଭାବେ ହୋମ କଣ୍ଟ୍ରୋଲ୍ସକୁ ଶୀଘ୍ର ଆକ୍ସେସ କରନ୍ତୁ"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-or/tiles_states_strings.xml b/packages/SystemUI/res/values-or/tiles_states_strings.xml
index fe187c2ff082..1bc369b2a777 100644
--- a/packages/SystemUI/res/values-or/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-or/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"ବନ୍ଦ ଅଛି"</item>
<item msgid="4875147066469902392">"ଚାଲୁ ଅଛି"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"ଉପଲବ୍ଧ ନାହିଁ"</item>
<item msgid="5044688398303285224">"ବନ୍ଦ ଅଛି"</item>
diff --git a/packages/SystemUI/res/values-pa/strings.xml b/packages/SystemUI/res/values-pa/strings.xml
index 2e6c0da162be..3f06376afdd2 100644
--- a/packages/SystemUI/res/values-pa/strings.xml
+++ b/packages/SystemUI/res/values-pa/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> ਨੂੰ ਇਸ ਸਕ੍ਰੀਨਸ਼ਾਟ ਦਾ ਪਤਾ ਲੱਗਿਆ ਹੈ।"</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> ਅਤੇ ਹੋਰ ਖੁੱਲ੍ਹੀਆਂ ਐਪਾਂ ਨੂੰ ਇਸ ਸਕ੍ਰੀਨਸ਼ਾਟ ਦਾ ਪਤਾ ਲੱਗਿਆ ਹੈ।"</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"ਨੋਟ ਵਿੱਚ ਸ਼ਾਮਲ ਕਰੋ"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"ਲਿੰਕ ਸ਼ਾਮਲ ਕਰੋ"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"ਸਕ੍ਰੀਨ ਰਿਕਾਰਡਰ"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"ਸਕ੍ਰੀਨ ਰਿਕਾਰਡਿੰਗ ਜਾਰੀ ਹੈ"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"ਕਿਸੇ ਸਕ੍ਰੀਨ ਰਿਕਾਰਡ ਸੈਸ਼ਨ ਲਈ ਚੱਲ ਰਹੀ ਸੂਚਨਾ"</string>
@@ -127,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"ਦੇਖਣ ਲਈ ਟੈਪ ਕਰੋ"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"ਸਕ੍ਰੀਨ ਰਿਕਾਰਡਿੰਗ ਨੂੰ ਰੱਖਿਅਤ ਕਰਨ ਵੇਲੇ ਗੜਬੜ ਹੋ ਗਈ"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"ਸਕ੍ਰੀਨ ਰਿਕਾਰਡਿੰਗ ਨੂੰ ਸ਼ੁਰੂ ਕਰਨ ਵੇਲੇ ਗੜਬੜ ਹੋਈ"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"ਤੁਸੀਂ &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; ਨੂੰ ਰਿਕਾਰਡ ਕਰਨਾ ਬੰਦ ਕਰ ਦੇਵੋਗੇ"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"ਰਿਕਾਰਡਿੰਗ ਬੰਦ ਕਰੋ"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"ਸਕ੍ਰੀਨ ਸਾਂਝੀ ਕੀਤੀ ਜਾ ਰਹੀ ਹੈ"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"ਕੀ ਸਕ੍ਰੀਨ ਨੂੰ ਸਾਂਝਾ ਕਰਨਾ ਬੰਦ ਕਰਨਾ ਹੈ?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"ਤੁਸੀਂ &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; ਨੂੰ ਸਾਂਝਾ ਕਰਨਾ ਬੰਦ ਕਰ ਦੇਵੋਗੇ"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"ਸਾਂਝਾਕਰਨ ਬੰਦ ਕਰੋ"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"ਸਕ੍ਰੀਨ \'ਤੇ ਕਾਸਟ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"ਕੀ ਕਾਸਟ ਕਰਨਾ ਬੰਦ ਕਰਨਾ ਹੈ?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"ਸਕ੍ਰੀਨ \'ਤੇ ਕਾਸਟ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"ਤੁਸੀਂ &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; ਨੂੰ ਕਾਸਟ ਕਰਨਾ ਬੰਦ ਕਰ ਦੇਵੋਗੇ"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"ਕਾਸਟ ਕਰਨਾ ਬੰਦ ਕਰੋ"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"ਬੰਦ ਕਰੋ"</string>
<string name="issuerecord_title" msgid="286627115110121849">"ਸਮੱਸਿਆ ਰਿਕਾਰਡਰ"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"ਸਮੱਸਿਆ ਰਿਕਾਰਡਿੰਗ ਪ੍ਰਕਿਰਿਆ-ਅਧੀਨ ਹੈ"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"ਸਮੱਸਿਆ ਬਾਰੇ ਜਾਣਕਾਰੀ ਇਕੱਤਰ ਕਰਨ ਵਾਲੇ ਸੈਸ਼ਨ ਸੰਬੰਧੀ ਨਿਰੰਤਰ ਸੂਚਨਾ"</string>
@@ -162,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"ਸਮੱਸਿਆ ਰਿਕਾਰਡਿੰਗ ਰੱਖਿਅਤ ਕਰਨ ਵੇਲੇ ਗੜਬੜ ਹੋ ਗਈ"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"ਸਮੱਸਿਆ ਰਿਕਾਰਡਿੰਗ ਨੂੰ ਸ਼ੁਰੂ ਕਰਨ ਵੇਲੇ ਗੜਬੜ ਹੋ ਗਈ"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"ਪੂਰੀ ਸਕ੍ਰੀਨ \'ਤੇ ਦੇਖਿਆ ਜਾ ਰਿਹਾ ਹੈ"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"ਬਾਹਰ ਜਾਣ ਲਈ, ਆਪਣੀ ਸਕ੍ਰੀਨ ਦੇ ਸਿਖਰ ਤੋਂ ਹੇਠਾਂ ਵੱਲ ਸਵਾਈਪ ਕਰੋ"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"ਸਮਝ ਲਿਆ"</string>
<string name="accessibility_back" msgid="6530104400086152611">"ਪਿੱਛੇ"</string>
<string name="accessibility_home" msgid="5430449841237966217">"ਘਰ"</string>
@@ -196,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"ਚਿਹਰੇ ਰਾਹੀਂ ਅਣਲਾਕ ਕੀਤਾ ਗਿਆ। ਜਾਰੀ ਰੱਖਣ ਲਈ ਦਬਾਓ।"</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"ਚਿਹਰੇ ਦੀ ਪਛਾਣ ਹੋਈ। ਜਾਰੀ ਰੱਖਣ ਲਈ ਦਬਾਓ।"</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"ਚਿਹਰੇ ਦੀ ਪਛਾਣ ਹੋਈ। ਜਾਰੀ ਰੱਖਣ ਲਈ \'ਅਣਲਾਕ ਕਰੋ\' ਪ੍ਰਤੀਕ ਨੂੰ ਦਬਾਓ।"</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"ਚਿਹਰੇ ਰਾਹੀਂ ਅਣਲਾਕ ਕੀਤਾ ਗਿਆ। ਜਾਰੀ ਰੱਖਣ ਲਈ ਟੈਪ ਕਰੋ।"</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"ਪ੍ਰਮਾਣਿਤ ਹੋਇਆ"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"ਪ੍ਰਮਾਣੀਕਰਨ ਰੱਦ ਕਰੋ"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"ਹੋਰ ਵਿਕਲਪ"</string>
@@ -297,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"ਸਕ੍ਰੀਨ ਸੇਵਰ"</string>
<string name="ethernet_label" msgid="2203544727007463351">"ਈਥਰਨੈਟ"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"ਪਰੇਸ਼ਾਨ ਨਾ ਕਰੋ"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"ਬਲੂਟੁੱਥ"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"ਕੋਈ ਜੋੜਾਬੱਧ ਕੀਤੀਆਂ ਡੀਵਾਈਸਾਂ ਉਪਲਬਧ ਨਹੀਂ"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"ਡੀਵਾਈਸ ਨੂੰ ਕਨੈਕਟ ਜਾਂ ਡਿਸਕਨੈਕਟ ਕਰਨ ਲਈ ਟੈਪ ਕਰੋ"</string>
@@ -308,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"ਰੱਖਿਅਤ ਕੀਤਾ ਗਿਆ"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"ਡਿਸਕਨੈਕਟ ਕਰੋ"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"ਕਿਰਿਆਸ਼ੀਲ ਕਰੋ"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"ਕੱਲ੍ਹ ਨੂੰ ਸਵੈਚਲਿਤ ਤੌਰ \'ਤੇ ਚਾਲੂ ਹੋ ਜਾਵੇਗਾ"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"ਕਵਿੱਕ ਸ਼ੇਅਰ ਅਤੇ Find My Device ਵਰਗੀਆਂ ਵਿਸ਼ੇਸ਼ਤਾਵਾਂ ਬਲੂਟੁੱਥ ਵਰਤਦੀਆਂ ਹਨ"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"ਬਲੂਟੁੱਥ ਕੱਲ੍ਹ ਸਵੇਰੇ ਚਾਲੂ ਹੋ ਜਾਵੇਗਾ"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"ਆਡੀਓ ਨੂੰ ਸਾਂਝਾ ਕਰੋ"</string>
@@ -478,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"ਹੋਰ ਵਿਜੇਟ ਸ਼ਾਮਲ ਕਰੋ"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"ਵਿਜੇਟਾਂ ਨੂੰ ਵਿਉਂਤਬੱਧ ਕਰਨ ਲਈ ਦਬਾਈ ਰੱਖੋ"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"ਵਿਜੇਟ ਵਿਉਂਤਬੱਧ ਕਰੋ"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"ਵਿਜੇਟਾਂ ਨੂੰ ਵਿਉਂਤਬੱਧ ਕਰਨ ਲਈ ਅਣਲਾਕ ਕਰੋ"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"ਬੰਦ ਵਿਜੇਟ ਲਈ ਐਪ ਪ੍ਰਤੀਕ"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"ਸਥਾਪਤ ਕੀਤੇ ਜਾ ਰਹੇ ਵਿਜੇਟ ਲਈ ਐਪ ਪ੍ਰਤੀਕ"</string>
<string name="edit_widget" msgid="9030848101135393954">"ਵਿਜੇਟ ਦਾ ਸੰਪਾਦਨ ਕਰੋ"</string>
@@ -498,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"ਵਿਜੇਟ ਚੁਣੋ"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"ਵਿਜੇਟ ਹਟਾਓ"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"ਚੁਣੇ ਗਏ ਵਿਜੇਟ ਲਈ ਥਾਂ ਚੁਣੋ"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"ਲਾਕ ਸਕ੍ਰੀਨ ਵਿਜੇਟ"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"ਵਿਜੇਟ ਦੀ ਵਰਤੋਂ ਕਰ ਕੇ ਐਪ ਖੋਲ੍ਹਣ ਲਈ, ਤੁਹਾਨੂੰ ਇਹ ਪੁਸ਼ਟੀ ਕਰਨ ਦੀ ਲੋੜ ਪਵੇਗੀ ਕਿ ਇਹ ਤੁਸੀਂ ਹੀ ਹੋ। ਨਾਲ ਹੀ, ਇਹ ਵੀ ਧਿਆਨ ਵਿੱਚ ਰੱਖੋ ਕਿ ਕੋਈ ਵੀ ਉਨ੍ਹਾਂ ਨੂੰ ਦੇਖ ਸਕਦਾ ਹੈ, ਭਾਵੇਂ ਤੁਹਾਡੀ ਟੈਬਲੈੱਟ ਲਾਕ ਹੋਵੇ। ਹੋ ਸਕਦਾ ਹੈ ਕਿ ਕੁਝ ਵਿਜੇਟ ਤੁਹਾਡੀ ਲਾਕ ਸਕ੍ਰੀਨ ਲਈ ਨਾ ਬਣੇ ਹੋਣ ਅਤੇ ਉਨ੍ਹਾਂ ਨੂੰ ਇੱਥੇ ਸ਼ਾਮਲ ਕਰਨਾ ਅਸੁਰੱਖਿਅਤ ਹੋਵੇ।"</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"ਸਮਝ ਲਿਆ"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"ਵਰਤੋਂਕਾਰ ਸਵਿੱਚ ਕਰੋ"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"ਪੁੱਲਡਾਊਨ ਮੀਨੂ"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"ਇਸ ਸੈਸ਼ਨ ਵਿਚਲੀਆਂ ਸਾਰੀਆਂ ਐਪਾਂ ਅਤੇ ਡਾਟੇ ਨੂੰ ਮਿਟਾ ਦਿੱਤਾ ਜਾਵੇਗਾ।"</string>
@@ -725,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"ਪੂਰਵ-ਨਿਰਧਾਰਿਤ"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"ਸਵੈਚਲਿਤ"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"ਕੋਈ ਧੁਨੀ ਜਾਂ ਥਰਥਰਾਹਟ ਨਹੀਂ"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"ਕੋਈ ਧੁਨੀ ਜਾਂ ਥਰਥਰਾਹਟ ਨਹੀਂ ਅਤੇ ਸੂਚਨਾਵਾਂ ਗੱਲਬਾਤ ਸੈਕਸ਼ਨ ਵਿੱਚ ਹੇਠਲੇ ਪਾਸੇ ਦਿਸਦੀਆਂ ਹਨ"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"ਡੀਵਾਈਸ ਸੈਟਿੰਗਾਂ ਦੇ ਆਧਾਰ \'ਤੇ ਘੰਟੀ ਵੱਜ ਸਕਦੀ ਹੈ ਜਾਂ ਥਰਥਰਾਹਟ ਹੋ ਸਕਦੀ ਹੈ"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"ਡੀਵਾਈਸ ਸੈਟਿੰਗਾਂ ਦੇ ਆਧਾਰ \'ਤੇ ਘੰਟੀ ਵੱਜ ਸਕਦੀ ਹੈ ਜਾਂ ਥਰਥਰਾਹਟ ਹੋ ਸਕਦੀ ਹੈ। ਪੂਰਵ-ਨਿਰਧਾਰਿਤ ਤੌਰ \'ਤੇ <xliff:g id="APP_NAME">%1$s</xliff:g> ਬਬਲ ਤੋਂ ਗੱਲਾਂਬਾਤਾਂ।"</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"ਸਿਸਟਮ ਨੂੰ ਨਿਰਧਾਰਤ ਕਰਨ ਦਿਓ ਕਿ ਇਸ ਸੂਚਨਾ ਲਈ ਕੋਈ ਧੁਨੀ ਵਜਾਉਣੀ ਚਾਹੀਦੀ ਹੈ ਜਾਂ ਥਰਥਰਾਹਟ ਕਰਨੀ ਚਾਹੀਦੀ ਹੈ"</string>
@@ -782,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page Down"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"ਮਿਟਾਓ"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1364,20 +1374,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"ਸਪਲਿਟ ਸਕ੍ਰੀਨ"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"ਇਨਪੁੱਟ"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"ਐਪ ਸ਼ਾਰਟਕੱਟ"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"ਪਹੁੰਚਯੋਗਤਾ"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"ਕੀ-ਬੋਰਡ ਸ਼ਾਰਟਕੱਟ"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"ਖੋਜ ਸੰਬੰਧੀ ਸ਼ਾਰਟਕੱਟ"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"ਪ੍ਰਤੀਕ ਨੂੰ ਸਮੇਟੋ"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"ਪ੍ਰਤੀਕ ਦਾ ਵਿਸਤਾਰ ਕਰੋ"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"ਜਾਂ"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"ਪਿੱਛੇ ਜਾਣ ਦਾ ਇਸ਼ਾਰਾ"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"ਹੋਮ \'ਤੇ ਜਾਣ ਦਾ ਇਸ਼ਾਰਾ"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"ਕਾਰਵਾਈ ਕੁੰਜੀ"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"ਹੋ ਗਿਆ"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"ਬਹੁਤ ਵਧੀਆ!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"ਵਾਪਸ ਜਾਓ"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"ਵਾਪਸ ਜਾਣ ਲਈ, ਟੱਚਪੈਡ \'ਤੇ ਕਿਤੇ ਵੀ ਤਿੰਨ ਉਂਗਲਾਂ ਦੀ ਵਰਤੋਂ ਕਰ ਕੇ ਖੱਬੇ ਜਾਂ ਸੱਜੇ ਪਾਸੇ ਵੱਲ ਸਵਾਈਪ ਕਰੋ।"</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"ਟੱਚਪੈਡ \'ਤੇ ਤਿੰਨ ਉਂਗਲਾਂ ਨੂੰ ਸੱਜੇ ਅਤੇ ਖੱਬੇ ਪਾਸੇ ਵੱਲ ਲਿਜਾਂਦੇ ਹੋਏ ਦਿਖਾਇਆ ਜਾ ਰਿਹਾ ਹੈ"</string>
@@ -1386,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"%2$d ਵਿੱਚੋਂ %1$d ਪੱਧਰ"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"ਹੋਮ ਕੰਟਰੋਲ"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"ਸਕ੍ਰੀਨ-ਸੇਵਰ ਵਜੋਂ ਆਪਣੇ ਹੋਮ ਕੰਟਰੋਲਾਂ ਤੱਕ ਤੁਰੰਤ ਪਹੁੰਚ ਕਰੋ"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-pa/tiles_states_strings.xml b/packages/SystemUI/res/values-pa/tiles_states_strings.xml
index 62dc05ad67bb..cc4c5c4eb228 100644
--- a/packages/SystemUI/res/values-pa/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-pa/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"ਬੰਦ ਹੈ"</item>
<item msgid="4875147066469902392">"ਚਾਲੂ ਹੈ"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"ਅਣਉਪਲਬਧ ਹੈ"</item>
<item msgid="5044688398303285224">"ਬੰਦ ਹੈ"</item>
diff --git a/packages/SystemUI/res/values-pl/strings.xml b/packages/SystemUI/res/values-pl/strings.xml
index 464c7c8ad10d..dedfc93c1606 100644
--- a/packages/SystemUI/res/values-pl/strings.xml
+++ b/packages/SystemUI/res/values-pl/strings.xml
@@ -126,31 +126,27 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Kliknij, aby wyświetlić"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Podczas zapisywania nagrania ekranu wystąpił błąd"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Błąd podczas rozpoczynania rejestracji zawartości ekranu"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
- <skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
- <skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Przestaniesz nagrywać treści z aplikacji &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
- <skip />
+ <string name="screenrecord_stop_dialog_title" msgid="8716193661764511095">"Zatrzymać nagrywanie?"</string>
+ <string name="screenrecord_stop_dialog_message" msgid="6262768207331626817">"Obecnie nagrywasz cały widok ekranu"</string>
+ <string name="screenrecord_stop_dialog_message_specific_app" msgid="5995770227684523244">"Obecnie nagrywasz widok aplikacji <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Zatrzymaj nagrywanie"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Udostępniam ekran"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
- <skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
- <skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Przestaniesz udostępniać treści z aplikacji &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
- <skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Przesyłam ekran"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
- <skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
- <skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Przestaniesz przesyłać treści z aplikacji &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
- <skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
- <skip />
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Zatrzymać udostępnianie ekranu?"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen_with_host_app" msgid="522823522115375414">"Obecnie udostępniasz aplikacji <xliff:g id="HOST_APP_NAME">%1$s</xliff:g> cały widok ekranu"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen" msgid="5090115386271179270">"Obecnie udostępniasz aplikacji cały widok ekranu"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_specific" msgid="5923772039347985172">"Obecnie udostępniasz aplikację <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g>"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_generic" msgid="6681016774654578261">"Obecnie udostępniasz aplikację"</string>
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Zatrzymaj udostępnianie"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Przesyłam zawartość ekranu"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Zatrzymać przesyłanie?"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen_with_device" msgid="1474703115926205251">"Obecnie przesyłasz cały widok ekranu na urządzenie <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen" msgid="8419219169553867625">"Obecnie przesyłasz cały widok ekranu na urządzenie w pobliżu"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app_with_device" msgid="2715934698604085519">"Obecnie przesyłasz widok aplikacji <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> na urządzenie <xliff:g id="DEVICE_NAME">%2$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="8616103075630934513">"Obecnie przesyłasz widok aplikacji <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> na urządzenie w pobliżu"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic_with_device" msgid="9213582497852420203">"Obecnie przesyłasz widok ekranu na urządzenie <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic" msgid="4100272100480415076">"Obecnie przesyłasz widok ekranu na urządzenie w pobliżu"</string>
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Zatrzymaj przesyłanie"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Zamknij"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Rejestrator problemów"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Przetwarzam nagranie problemu"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Powiadomienie o trwającej aktywności sesji nagrywania ekranu"</string>
@@ -161,8 +157,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Błąd podczas zapisywania nagrania problemu"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Błąd podczas rozpoczynania nagrania problemu"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Włączony pełny ekran"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Aby zamknąć, przesuń palcem w dół z góry ekranu"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"OK"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Wróć"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Ekran główny"</string>
@@ -195,7 +190,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Odblokowano rozpoznawaniem twarzy. Kliknij, aby kontynuować."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Twarz rozpoznana. Kliknij, aby kontynuować."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Twarz rozpoznana. Aby kontynuować, kliknij ikonę odblokowywania."</string>
- <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Odblokowano skanem twarzy. Kliknij, aby kontynuować."</string>
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Odblokowano skanem twarzy. Kliknij, aby przejść dalej."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Uwierzytelniono"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Anuluj uwierzytelnianie"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Więcej opcji"</string>
@@ -295,6 +290,7 @@
<string name="start_dreams" msgid="9131802557946276718">"Wygaszacz ekranu"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Nie przeszkadzać"</string>
+ <string name="quick_settings_modes_label" msgid="5407025818652750501">"Tryby priorytetowe"</string>
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Brak dostępnych sparowanych urządzeń"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Kliknij, aby podłączyć lub odłączyć urządzenie"</string>
@@ -306,8 +302,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Zapisane"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"rozłącz"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"aktywuj"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Automatycznie włącz jutro"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Bluetootha używają funkcje takie jak szybkie udostępnianie czy Znajdź moje urządzenie"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bluetooth włączy się jutro rano"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Udostępnij dźwięk"</string>
@@ -476,8 +471,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Dodaj więcej widżetów"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Przytrzymaj, aby dostosować widżety"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Dostosuj widżety"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Odblokuj, aby dostosować widżety"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Ikona aplikacji z wyłączonym widżetem"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Ikona aplikacji instalowanego widżetu"</string>
<string name="edit_widget" msgid="9030848101135393954">"Edytuj widżet"</string>
@@ -496,12 +490,11 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"wybierz widżet"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"usuń widżet"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"umieść wybrany widżet"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
- <skip />
+ <string name="communal_widget_picker_title" msgid="1953369090475731663">"Widżety na ekranie blokady"</string>
+ <string name="communal_widget_picker_description" msgid="490515450110487871">"Każdy zobaczy widżety na ekranie blokady, nawet gdy tablet jest zablokowany."</string>
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Widżety na ekranie blokady"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Aby otworzyć aplikację za pomocą widżetu, musisz potwierdzić swoją tożsamość. Pamiętaj też, że każdy będzie mógł wyświetlić widżety nawet wtedy, gdy tablet będzie zablokowany. Niektóre widżety mogą nie być przeznaczone do umieszczenia na ekranie blokady i ich dodanie w tym miejscu może być niebezpieczne."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"OK"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Przełącz użytkownika"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"menu"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Wszystkie aplikacje i dane w tej sesji zostaną usunięte."</string>
@@ -723,7 +716,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Domyślne"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Automatycznie"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Bez dźwięku i wibracji"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Brak dźwięku i wibracji, wyświetlają się niżej w sekcji rozmów"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Mogą włączać dzwonek lub wibracje w zależności od ustawień urządzenia"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Mogą włączać dzwonek lub wibracje w zależności od ustawień urządzenia. Rozmowy z aplikacji <xliff:g id="APP_NAME">%1$s</xliff:g> są domyślnie wyświetlane jako dymki."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Pozwól systemowi decydować, czy o powiadomieniu powinien informować dźwięk czy wibracja"</string>
@@ -780,6 +774,7 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page Down"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Delete"</string>
+ <string name="keyboard_key_esc" msgid="6230365950511411322">"Esc"</string>
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1362,20 +1357,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Podzielony ekran"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Wprowadzanie"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Skróty do aplikacji"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Ułatwienia dostępu"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Skróty klawiszowe"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Skróty do wyszukiwania"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Ikona zwijania"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Ikona rozwijania"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"lub"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Gest przejścia wstecz"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Gest przejścia na ekran główny"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Klawisz działania"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Gotowe"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Świetnie!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Wróć"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Aby wrócić, przesuń 3 palcami w lewo lub w prawo w dowolnym miejscu touchpada."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"3 palce na touchpadzie poruszające się w prawo i w lewo"</string>
@@ -1384,4 +1378,5 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Poziom %1$d z %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Sterowanie domem"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Szybki dostęp do sterowania domem na wygaszaczu ekranu"</string>
+ <string name="volume_undo_action" msgid="5815519725211877114">"Cofnij"</string>
</resources>
diff --git a/packages/SystemUI/res/values-pl/tiles_states_strings.xml b/packages/SystemUI/res/values-pl/tiles_states_strings.xml
index 5aa719f2ea75..2190cf81a3fa 100644
--- a/packages/SystemUI/res/values-pl/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-pl/tiles_states_strings.xml
@@ -56,6 +56,11 @@
<item msgid="5376619709702103243">"Wyłączone"</item>
<item msgid="4875147066469902392">"Włączone"</item>
</string-array>
+ <string-array name="tile_states_modes">
+ <item msgid="7764936419245199023">"Niedostępne"</item>
+ <item msgid="2004750556637773692">"Wyłączono"</item>
+ <item msgid="8968530753931637871">"Włączono"</item>
+ </string-array>
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Niedostępny"</item>
<item msgid="5044688398303285224">"Wyłączona"</item>
diff --git a/packages/SystemUI/res/values-pt-rBR/strings.xml b/packages/SystemUI/res/values-pt-rBR/strings.xml
index e1f1050ea08d..1ab30c3bfaee 100644
--- a/packages/SystemUI/res/values-pt-rBR/strings.xml
+++ b/packages/SystemUI/res/values-pt-rBR/strings.xml
@@ -126,31 +126,27 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Toque para ver"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Erro ao salvar a gravação da tela"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Erro ao iniciar a gravação de tela"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
- <skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
- <skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Você vai parar de gravar o app &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
- <skip />
+ <string name="screenrecord_stop_dialog_title" msgid="8716193661764511095">"Parar gravação?"</string>
+ <string name="screenrecord_stop_dialog_message" msgid="6262768207331626817">"Você está gravando a tela inteira"</string>
+ <string name="screenrecord_stop_dialog_message_specific_app" msgid="5995770227684523244">"Você está gravando o app <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Parar gravação"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Compartilhando a tela"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
- <skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
- <skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Você vai parar de compartilhar o app &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
- <skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Transmitindo a tela"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
- <skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
- <skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Você vai parar de transmitir o app &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
- <skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
- <skip />
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Parar o compartilhamento de tela?"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen_with_host_app" msgid="522823522115375414">"Você está compartilhando a tela inteira com o app <xliff:g id="HOST_APP_NAME">%1$s</xliff:g>"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen" msgid="5090115386271179270">"Você está compartilhando a tela inteira com um app"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_specific" msgid="5923772039347985172">"Você está compartilhando o app <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g>"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_generic" msgid="6681016774654578261">"Você está compartilhando um app"</string>
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Interromper compartilhamento"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Transmitindo a tela"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Parar transmissão?"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen_with_device" msgid="1474703115926205251">"Você está transmitindo a tela inteira para o <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen" msgid="8419219169553867625">"Você está transmitindo a tela inteira para um dispositivo por perto"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app_with_device" msgid="2715934698604085519">"Você está transmitindo o app <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> para o <xliff:g id="DEVICE_NAME">%2$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="8616103075630934513">"Você está transmitindo o app <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> para um dispositivo por perto"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic_with_device" msgid="9213582497852420203">"Você está transmitindo para o <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic" msgid="4100272100480415076">"Você está transmitindo para um dispositivo por perto"</string>
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Interromper transmissão"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Fechar"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Gravador de problemas"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Processando a gravação do problema"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Notificação em andamento para uma sessão de coleta de problemas"</string>
@@ -161,8 +157,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Erro ao salvar a gravação do problema"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Erro ao iniciar a gravação do problema"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Visualização em tela cheia"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Para sair, deslize de cima para baixo na tela"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"Entendi"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Voltar"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Página inicial"</string>
@@ -295,6 +290,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Protetor de tela"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Não perturbe"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Não há dispositivos pareados disponíveis"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Toque para conectar ou desconectar um dispositivo"</string>
@@ -306,8 +303,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Salvo"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"desconectar"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"ativar"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Ativar automaticamente amanhã"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Recursos como o Quick Share e o Encontre Meu Dispositivo usam Bluetooth"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"O Bluetooth será ativado amanhã de manhã"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Compartilhar áudio"</string>
@@ -476,8 +472,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Adicione mais widgets"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Mantenha pressionado para personalizar widgets"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Personalizar widgets"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Desbloqueie para personalizar widgets"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Ícone do app para widget desativado"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Ícone do app para um widget que está sendo instalado"</string>
<string name="edit_widget" msgid="9030848101135393954">"Editar widget"</string>
@@ -496,12 +491,11 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"selecionar widget"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"remover widget"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"posicionar widget selecionado"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
- <skip />
+ <string name="communal_widget_picker_title" msgid="1953369090475731663">"Widgets da tela de bloqueio"</string>
+ <string name="communal_widget_picker_description" msgid="490515450110487871">"Todos podem ver os widgets na tela de bloqueio, mesmo com o tablet bloqueado."</string>
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Widgets da tela de bloqueio"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Para abrir um app usando um widget, você precisará confirmar sua identidade. Além disso, não se esqueça que qualquer pessoa pode ver os widgets, mesmo quando o tablet está bloqueado. Alguns widgets podem não ter sido criados para ficar na tela de bloqueio e fazer isso talvez não seja seguro."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"Entendi"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Trocar usuário"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"menu suspenso"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Todos os apps e dados nesta sessão serão excluídos."</string>
@@ -723,7 +717,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Padrão"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Automática"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Som e vibração desativados"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"O som e a vibração estão desativados, e o balão aparece na parte inferior da seção de conversa"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Pode vibrar ou tocar com base nas configurações do dispositivo"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Pode vibrar ou tocar com base nas configurações do dispositivo. As conversas do app <xliff:g id="APP_NAME">%1$s</xliff:g> aparecem em balões por padrão."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Faça com que o sistema determine se a notificação resultará em som ou vibração"</string>
@@ -780,6 +775,7 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page Down"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Delete"</string>
+ <string name="keyboard_key_esc" msgid="6230365950511411322">"Esc"</string>
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1362,20 +1358,18 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Tela dividida"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Entrada"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Atalhos de apps"</string>
+ <string name="shortcut_helper_category_current_app_shortcuts" msgid="4017840565974573628">"App atual"</string>
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Acessibilidade"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Atalhos do teclado"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Atalhos de pesquisa"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Ícone \"Fechar\""</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Ícone \"Abrir\""</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"ou"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Gesto de volta"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Gesto de início"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Tecla de ação"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Concluído"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Muito bem!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Voltar"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Para voltar, deslize para a esquerda ou direita usando 3 dedos em qualquer lugar do touchpad."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Touchpad mostrando 3 dedos deslizando para a direita e esquerda"</string>
@@ -1384,4 +1378,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Nível %1$d de %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Automação residencial"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Controles de automação residencial no protetor de tela"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-pt-rBR/tiles_states_strings.xml b/packages/SystemUI/res/values-pt-rBR/tiles_states_strings.xml
index 3526c77d1e24..b8811426835e 100644
--- a/packages/SystemUI/res/values-pt-rBR/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-pt-rBR/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Desativado"</item>
<item msgid="4875147066469902392">"Ativado"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Indisponível"</item>
<item msgid="5044688398303285224">"Desativada"</item>
diff --git a/packages/SystemUI/res/values-pt-rPT/strings.xml b/packages/SystemUI/res/values-pt-rPT/strings.xml
index c8bba38ffdae..963b47c9bc05 100644
--- a/packages/SystemUI/res/values-pt-rPT/strings.xml
+++ b/packages/SystemUI/res/values-pt-rPT/strings.xml
@@ -126,31 +126,27 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Toque para ver"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Erro ao guardar a gravação de ecrã"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Ocorreu um erro ao iniciar a gravação do ecrã."</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
- <skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
- <skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Vai parar de gravar &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
- <skip />
+ <string name="screenrecord_stop_dialog_title" msgid="8716193661764511095">"Parar a gravação?"</string>
+ <string name="screenrecord_stop_dialog_message" msgid="6262768207331626817">"Neste momento, está a gravar todo o seu ecrã"</string>
+ <string name="screenrecord_stop_dialog_message_specific_app" msgid="5995770227684523244">"Neste momento, está a gravar a app <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Parar gravação"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"A partilhar o ecrã"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
- <skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
- <skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Vai parar de partilhar &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
- <skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"A transmitir o ecrã"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
- <skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
- <skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Vai parar de transmitir &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
- <skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
- <skip />
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Parar a partilha do ecrã?"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen_with_host_app" msgid="522823522115375414">"Neste momento, está a partilhar todo o seu ecrã com a app <xliff:g id="HOST_APP_NAME">%1$s</xliff:g>"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen" msgid="5090115386271179270">"Neste momento, está a partilhar todo o seu ecrã com uma app"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_specific" msgid="5923772039347985172">"Neste momento, está a partilhar a app <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g>"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_generic" msgid="6681016774654578261">"Neste momento, está a partilhar uma app"</string>
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Parar partilha"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"A transmitir o ecrã"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Parar a transmissão?"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen_with_device" msgid="1474703115926205251">"Neste momento, está a transmitir todo o seu ecrã para o dispositivo <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen" msgid="8419219169553867625">"Neste momento, está a transmitir todo o seu ecrã para um dispositivo próximo"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app_with_device" msgid="2715934698604085519">"Neste momento, está a transmitir a app <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> para o dispositivo <xliff:g id="DEVICE_NAME">%2$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="8616103075630934513">"Neste momento, está a transmitir a app <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> para um dispositivo próximo"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic_with_device" msgid="9213582497852420203">"Neste momento, está a transmitir para o dispositivo <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic" msgid="4100272100480415076">"Neste momento, está a transmitir para um dispositivo próximo"</string>
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Parar transmissão"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Fechar"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Registador de problemas"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"A proc. registo de problemas"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Notificação em curso de uma sessão de recolha de problemas"</string>
@@ -161,8 +157,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Erro ao guardar o registo de problemas"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Erro ao iniciar o registo de problemas"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Visualização de ecrã inteiro"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Para sair, deslize rapidamente para baixo a partir da parte superior do ecrã"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"OK"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Anterior"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Página inicial"</string>
@@ -295,6 +290,7 @@
<string name="start_dreams" msgid="9131802557946276718">"Proteção ecrã"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Não incomodar"</string>
+ <string name="quick_settings_modes_label" msgid="5407025818652750501">"Modos de prioridade"</string>
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Sem dispositivos sincronizados disponíveis"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Toque para associar ou desassociar um dispositivo"</string>
@@ -306,8 +302,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Guardado"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"desassociar"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"ativar"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Ativar automaticamente amanhã"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Funcionalidades como a Partilha rápida e o serviço Localizar o meu dispositivo usam o Bluetooth"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"O Bluetooth vai ser ativado amanhã de manhã"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Partilhar áudio"</string>
@@ -476,8 +471,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Adicionar mais widgets"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Mantenha pressionado para personalizar os widgets"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Personalizar widgets"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Desbloqueie para personalizar widgets"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Ícone da app do widget desativado"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Ícone da app para um widget que está a ser instalado"</string>
<string name="edit_widget" msgid="9030848101135393954">"Editar widget"</string>
@@ -496,12 +490,11 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"selecionar widget"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"remover widget"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"posicionar widget selecionado"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
- <skip />
+ <string name="communal_widget_picker_title" msgid="1953369090475731663">"Widgets do ecrã de bloqueio"</string>
+ <string name="communal_widget_picker_description" msgid="490515450110487871">"Todos podem pode ver widgets no ecrã de bloqueio, mesmo com o tablet bloqueado."</string>
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Widgets do ecrã de bloqueio"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Para abrir uma app através de um widget, vai ter de validar a sua identidade. Além disso, tenha em atenção que qualquer pessoa pode ver os widgets, mesmo quando o tablet estiver bloqueado. Alguns widgets podem não se destinar ao ecrã de bloqueio e pode ser inseguro adicioná-los aqui."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"OK"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Mudar utilizador"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"menu pendente"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Todas as apps e dados desta sessão serão eliminados."</string>
@@ -723,7 +716,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Predefinição"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Automática"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Sem som ou vibração"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Sem som ou vibração e aparece na parte inferior na secção de conversas"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Pode tocar ou vibrar com base nas definições do dispositivo"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Pode tocar ou vibrar com base nas definições do dispositivo. As conversas da app <xliff:g id="APP_NAME">%1$s</xliff:g> aparecem como um balão por predefinição."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Faça com que o sistema determine se esta notificação deve emitir um som ou uma vibração"</string>
@@ -780,6 +774,7 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Página para cima"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Página para baixo"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Eliminar"</string>
+ <string name="keyboard_key_esc" msgid="6230365950511411322">"Esc"</string>
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Início"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"Fim"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Inserir"</string>
@@ -1362,20 +1357,18 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Ecrã dividido"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Entrada"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Atalhos de apps"</string>
+ <string name="shortcut_helper_category_current_app_shortcuts" msgid="4017840565974573628">"App atual"</string>
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Acessibilidade"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Atalhos de teclado"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Atalhos de pesquisa"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Ícone de reduzir"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Ícone de expandir"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"ou"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Gesto para retroceder"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Gesto para aceder ao ecrã principal"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Tecla de ação"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Concluir"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Muito bem!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Voltar"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Para retroceder, deslize rapidamente para a esquerda ou direita com três dedos em qualquer parte do touchpad."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Touchpad a mostrar três dedos a moverem-se para a direita e esquerda"</string>
@@ -1384,4 +1377,5 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Nível %1$d de %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Controlos domésticos"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Use controlos domésticos como proteção de ecrã"</string>
+ <string name="volume_undo_action" msgid="5815519725211877114">"Anular"</string>
</resources>
diff --git a/packages/SystemUI/res/values-pt-rPT/tiles_states_strings.xml b/packages/SystemUI/res/values-pt-rPT/tiles_states_strings.xml
index 34a5ed7b2ca9..d7a245a1fbba 100644
--- a/packages/SystemUI/res/values-pt-rPT/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-pt-rPT/tiles_states_strings.xml
@@ -56,6 +56,11 @@
<item msgid="5376619709702103243">"Desligado"</item>
<item msgid="4875147066469902392">"Ligado"</item>
</string-array>
+ <string-array name="tile_states_modes">
+ <item msgid="7764936419245199023">"Indisponível"</item>
+ <item msgid="2004750556637773692">"Desativado"</item>
+ <item msgid="8968530753931637871">"Ativado"</item>
+ </string-array>
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Indisponível"</item>
<item msgid="5044688398303285224">"Desligada"</item>
diff --git a/packages/SystemUI/res/values-pt/strings.xml b/packages/SystemUI/res/values-pt/strings.xml
index e1f1050ea08d..1ab30c3bfaee 100644
--- a/packages/SystemUI/res/values-pt/strings.xml
+++ b/packages/SystemUI/res/values-pt/strings.xml
@@ -126,31 +126,27 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Toque para ver"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Erro ao salvar a gravação da tela"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Erro ao iniciar a gravação de tela"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
- <skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
- <skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Você vai parar de gravar o app &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
- <skip />
+ <string name="screenrecord_stop_dialog_title" msgid="8716193661764511095">"Parar gravação?"</string>
+ <string name="screenrecord_stop_dialog_message" msgid="6262768207331626817">"Você está gravando a tela inteira"</string>
+ <string name="screenrecord_stop_dialog_message_specific_app" msgid="5995770227684523244">"Você está gravando o app <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Parar gravação"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Compartilhando a tela"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
- <skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
- <skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Você vai parar de compartilhar o app &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
- <skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Transmitindo a tela"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
- <skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
- <skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Você vai parar de transmitir o app &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
- <skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
- <skip />
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Parar o compartilhamento de tela?"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen_with_host_app" msgid="522823522115375414">"Você está compartilhando a tela inteira com o app <xliff:g id="HOST_APP_NAME">%1$s</xliff:g>"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen" msgid="5090115386271179270">"Você está compartilhando a tela inteira com um app"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_specific" msgid="5923772039347985172">"Você está compartilhando o app <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g>"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_generic" msgid="6681016774654578261">"Você está compartilhando um app"</string>
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Interromper compartilhamento"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Transmitindo a tela"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Parar transmissão?"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen_with_device" msgid="1474703115926205251">"Você está transmitindo a tela inteira para o <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen" msgid="8419219169553867625">"Você está transmitindo a tela inteira para um dispositivo por perto"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app_with_device" msgid="2715934698604085519">"Você está transmitindo o app <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> para o <xliff:g id="DEVICE_NAME">%2$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="8616103075630934513">"Você está transmitindo o app <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> para um dispositivo por perto"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic_with_device" msgid="9213582497852420203">"Você está transmitindo para o <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic" msgid="4100272100480415076">"Você está transmitindo para um dispositivo por perto"</string>
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Interromper transmissão"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Fechar"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Gravador de problemas"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Processando a gravação do problema"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Notificação em andamento para uma sessão de coleta de problemas"</string>
@@ -161,8 +157,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Erro ao salvar a gravação do problema"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Erro ao iniciar a gravação do problema"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Visualização em tela cheia"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Para sair, deslize de cima para baixo na tela"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"Entendi"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Voltar"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Página inicial"</string>
@@ -295,6 +290,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Protetor de tela"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Não perturbe"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Não há dispositivos pareados disponíveis"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Toque para conectar ou desconectar um dispositivo"</string>
@@ -306,8 +303,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Salvo"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"desconectar"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"ativar"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Ativar automaticamente amanhã"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Recursos como o Quick Share e o Encontre Meu Dispositivo usam Bluetooth"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"O Bluetooth será ativado amanhã de manhã"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Compartilhar áudio"</string>
@@ -476,8 +472,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Adicione mais widgets"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Mantenha pressionado para personalizar widgets"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Personalizar widgets"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Desbloqueie para personalizar widgets"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Ícone do app para widget desativado"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Ícone do app para um widget que está sendo instalado"</string>
<string name="edit_widget" msgid="9030848101135393954">"Editar widget"</string>
@@ -496,12 +491,11 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"selecionar widget"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"remover widget"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"posicionar widget selecionado"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
- <skip />
+ <string name="communal_widget_picker_title" msgid="1953369090475731663">"Widgets da tela de bloqueio"</string>
+ <string name="communal_widget_picker_description" msgid="490515450110487871">"Todos podem ver os widgets na tela de bloqueio, mesmo com o tablet bloqueado."</string>
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Widgets da tela de bloqueio"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Para abrir um app usando um widget, você precisará confirmar sua identidade. Além disso, não se esqueça que qualquer pessoa pode ver os widgets, mesmo quando o tablet está bloqueado. Alguns widgets podem não ter sido criados para ficar na tela de bloqueio e fazer isso talvez não seja seguro."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"Entendi"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Trocar usuário"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"menu suspenso"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Todos os apps e dados nesta sessão serão excluídos."</string>
@@ -723,7 +717,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Padrão"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Automática"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Som e vibração desativados"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"O som e a vibração estão desativados, e o balão aparece na parte inferior da seção de conversa"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Pode vibrar ou tocar com base nas configurações do dispositivo"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Pode vibrar ou tocar com base nas configurações do dispositivo. As conversas do app <xliff:g id="APP_NAME">%1$s</xliff:g> aparecem em balões por padrão."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Faça com que o sistema determine se a notificação resultará em som ou vibração"</string>
@@ -780,6 +775,7 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page Down"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Delete"</string>
+ <string name="keyboard_key_esc" msgid="6230365950511411322">"Esc"</string>
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1362,20 +1358,18 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Tela dividida"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Entrada"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Atalhos de apps"</string>
+ <string name="shortcut_helper_category_current_app_shortcuts" msgid="4017840565974573628">"App atual"</string>
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Acessibilidade"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Atalhos do teclado"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Atalhos de pesquisa"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Ícone \"Fechar\""</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Ícone \"Abrir\""</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"ou"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Gesto de volta"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Gesto de início"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Tecla de ação"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Concluído"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Muito bem!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Voltar"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Para voltar, deslize para a esquerda ou direita usando 3 dedos em qualquer lugar do touchpad."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Touchpad mostrando 3 dedos deslizando para a direita e esquerda"</string>
@@ -1384,4 +1378,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Nível %1$d de %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Automação residencial"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Controles de automação residencial no protetor de tela"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-pt/tiles_states_strings.xml b/packages/SystemUI/res/values-pt/tiles_states_strings.xml
index 3526c77d1e24..b8811426835e 100644
--- a/packages/SystemUI/res/values-pt/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-pt/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Desativado"</item>
<item msgid="4875147066469902392">"Ativado"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Indisponível"</item>
<item msgid="5044688398303285224">"Desativada"</item>
diff --git a/packages/SystemUI/res/values-ro/strings.xml b/packages/SystemUI/res/values-ro/strings.xml
index ff4836e5452b..285a3ca92048 100644
--- a/packages/SystemUI/res/values-ro/strings.xml
+++ b/packages/SystemUI/res/values-ro/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> a detectat această captură de ecran."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> și alte aplicații deschise au detectat această captură de ecran."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Adaugă în notă"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Include linkul"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Recorder pentru ecran"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Se procesează înregistrarea"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Notificare în curs pentru o sesiune de înregistrare a ecranului"</string>
@@ -127,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Atinge pentru a afișa"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Eroare la salvarea înregistrării ecranului"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Eroare la începerea înregistrării ecranului"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Nu vei mai înregistra &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Oprește înregistrarea"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Se permite accesul la ecran"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Oprești accesul la ecran?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Nu vei mai permite accesul la &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Nu mai permite accesul"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Se proiectează ecranul"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Oprești proiectarea?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Se proiectează ecranul"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Nu vei mai proiecta &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Oprește proiectarea"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Închide"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Instrument de înregistrare a problemelor"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Se procesează înregistrarea problemei"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Notificare în curs pentru o sesiune de înregistrare a problemei"</string>
@@ -162,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Eroare la salvarea înregistrării problemei"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Eroare la începerea înregistrării problemei"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Vizualizare pe ecran complet"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Pentru a ieși, glisează în jos din partea de sus a ecranului"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"OK"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Înapoi"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Ecranul de pornire"</string>
@@ -196,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"S-a deblocat cu ajutorul feței. Apasă pentru a continua."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Chipul a fost recunoscut. Apasă pentru a continua."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Chip recunoscut. Apasă pictograma Deblocare ca să continui."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"S-a deblocat folosind fața. Atinge pentru a continua."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Autentificat"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Anulează autentificarea"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Mai multe opțiuni"</string>
@@ -297,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Screensaver"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Nu deranja"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Niciun dispozitiv conectat disponibil"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Atinge pentru a conecta sau deconecta un dispozitiv"</string>
@@ -308,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Salvat"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"deconectează"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"activează"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Activează automat mâine"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Funcții precum Quick Share și Găsește-mi dispozitivul folosesc Bluetooth"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bluetooth se va activa mâine dimineață"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Trimite audio"</string>
@@ -478,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Adaugă mai multe widgeturi"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Apasă lung pentru a personaliza widgeturi"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Personalizează widgeturile"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Deblochează ca să personalizezi widgeturi"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Pictograma aplicației pentru widgetul dezactivat"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Pictograma aplicației pentru un widget care se instalează"</string>
<string name="edit_widget" msgid="9030848101135393954">"Editează widgetul"</string>
@@ -498,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"selectează un widget"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"elimină widgetul"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"plasează widgetul selectat"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Widgeturi pe ecranul de blocare"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Pentru a deschide o aplicație folosind un widget, va trebui să-ți confirmi identitatea. În plus, reține că oricine poate să vadă widgeturile, chiar dacă tableta este blocată. Este posibil ca unele widgeturi să nu fi fost create pentru ecranul de blocare și poate fi nesigur să le adaugi aici."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"OK"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Schimbă utilizatorul"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"meniu vertical"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Toate aplicațiile și datele din această sesiune vor fi șterse."</string>
@@ -725,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Prestabilite"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Automat"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Fără sunet sau vibrații"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Fără sunet sau vibrații și apare în partea de jos a secțiunii de conversație"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Poate să sune sau să vibreze, în funcție de setările dispozitivului"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Poate să sune sau să vibreze, în funcție de setările dispozitivului. Conversațiile din balonul <xliff:g id="APP_NAME">%1$s</xliff:g> în mod prestabilit."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Solicită-i sistemului să stabilească dacă această notificare e sonoră sau cu vibrații."</string>
@@ -782,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"O pagină mai sus"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"O pagină mai jos"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Șterge"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"La început"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"La final"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Inserează"</string>
@@ -1364,20 +1374,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Ecran împărțit"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Intrare"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Comenzi rapide pentru aplicații"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Accesibilitate"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Comenzi rapide de la tastatură"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Comenzi directe de căutare"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Pictograma de restrângere"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Pictograma de extindere"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"sau"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Gestul Înapoi"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Gestul Ecran de pornire"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Tastă de acțiuni"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Gata"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Excelent!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Înapoi"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Pentru a reveni, glisează spre stânga sau spre dreapta cu trei degete oriunde pe touchpad."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Touchpad cu trei degete care se mișcă spre dreapta și spre stânga"</string>
@@ -1386,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Nivelul %1$d din %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Comenzi pentru locuință"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Accesează comenzile pentru locuință ca screensaver"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-ro/tiles_states_strings.xml b/packages/SystemUI/res/values-ro/tiles_states_strings.xml
index a68f1408dd83..25a2959b561b 100644
--- a/packages/SystemUI/res/values-ro/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-ro/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Dezactivată"</item>
<item msgid="4875147066469902392">"Activată"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Indisponibilă"</item>
<item msgid="5044688398303285224">"Dezactivată"</item>
diff --git a/packages/SystemUI/res/values-ru/strings.xml b/packages/SystemUI/res/values-ru/strings.xml
index 3860d6fc5c8e..507b8d185072 100644
--- a/packages/SystemUI/res/values-ru/strings.xml
+++ b/packages/SystemUI/res/values-ru/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"Приложение \"<xliff:g id="APPNAME">%1$s</xliff:g>\" обнаружило создание скриншота."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"Приложение \"<xliff:g id="APPNAME">%1$s</xliff:g>\" и другие запущенные продукты обнаружили создание скриншота."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Добавить в заметку"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Добавить ссылку"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Запись видео с экрана"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Обработка записи с экрана…"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Текущее уведомление для записи видео с экрана"</string>
@@ -127,31 +126,27 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Нажмите, чтобы посмотреть."</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Не удалось сохранить запись видео с экрана."</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Не удалось начать запись видео с экрана."</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
- <skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
- <skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Запись в приложении &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; будет прекращена."</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
- <skip />
+ <string name="screenrecord_stop_dialog_title" msgid="8716193661764511095">"Остановить запись?"</string>
+ <string name="screenrecord_stop_dialog_message" msgid="6262768207331626817">"Вы записываете свой экран."</string>
+ <string name="screenrecord_stop_dialog_message_specific_app" msgid="5995770227684523244">"Вы записываете экран приложения \"<xliff:g id="APP_NAME">%1$s</xliff:g>\"."</string>
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Остановить запись"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Демонстрация экрана"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
- <skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
- <skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Демонстрация экрана приложения &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; будет прекращена."</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
- <skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Трансляция экрана"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
- <skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
- <skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Трансляция из приложения &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; будет прекращена."</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
- <skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
- <skip />
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Закрыть совместный доступ к экрану?"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen_with_host_app" msgid="522823522115375414">"Вы демонстрируете свой экран в приложении \"<xliff:g id="HOST_APP_NAME">%1$s</xliff:g>\"."</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen" msgid="5090115386271179270">"Вы демонстрируете свой экран в приложении."</string>
+ <string name="share_to_app_stop_dialog_message_single_app_specific" msgid="5923772039347985172">"Вы демонстрируете экран приложения \"<xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g>\"."</string>
+ <string name="share_to_app_stop_dialog_message_single_app_generic" msgid="6681016774654578261">"Вы демонстрируете экран приложения."</string>
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Закрыть доступ"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Трансляция экрана"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Прекратить трансляцию?"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen_with_device" msgid="1474703115926205251">"Вы транслируете свой экран на устройство \"<xliff:g id="DEVICE_NAME">%1$s</xliff:g>\"."</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen" msgid="8419219169553867625">"Вы транслируете свой экран на устройство поблизости."</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app_with_device" msgid="2715934698604085519">"Вы транслируете приложение \"<xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g>\" на устройство \"<xliff:g id="DEVICE_NAME">%2$s</xliff:g>\"."</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="8616103075630934513">"Вы транслируете приложение \"<xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g>\" на устройство поблизости."</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic_with_device" msgid="9213582497852420203">"Вы транслируете на устройство \"<xliff:g id="DEVICE_NAME">%1$s</xliff:g>\"."</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic" msgid="4100272100480415076">"Вы транслируете на устройство поблизости."</string>
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Остановить трансляцию"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Закрыть"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Запись проблем на видео"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Обрабатываем запись"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Текущее уведомление о записи проблемы на видео"</string>
@@ -162,8 +157,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Не удалось сохранить запись."</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Не удалось начать запись."</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Полноэкранный режим"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Чтобы выйти, проведите вниз от верхнего края экрана"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"ОК"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Назад"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Главный экран"</string>
@@ -196,8 +190,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Разблокировано сканированием лица. Нажмите, чтобы продолжить."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Лицо распознано. Нажмите, чтобы продолжить."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Лицо распознано. Нажмите на значок разблокировки."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Сканирование лица выполнено. Нажмите, чтобы продолжить."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Аутентификация выполнена"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Отмена распознавания лица"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Ещё"</string>
@@ -297,6 +290,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Заставка"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Не беспокоить"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Нет доступных сопряженных устройств"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Нажмите, чтобы подключить или отключить устройство."</string>
@@ -308,8 +303,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Сохранено"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"отключить"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"активировать"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Включить автоматически завтра"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Bluetooth используется в таких функциях и сервисах, как \"Быстрая отправка\" и \"Найти устройство\""</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bluetooth включится завтра утром"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Отправить аудио"</string>
@@ -478,8 +472,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Добавить виджеты"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Нажмите и удерживайте, чтобы настроить виджеты."</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Настроить виджеты"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Чтобы настроить виджеты, разблокируйте устройство."</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Значок приложения для отключенного виджета"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Значок приложения для устанавливаемого виджета"</string>
<string name="edit_widget" msgid="9030848101135393954">"Изменить виджет"</string>
@@ -498,12 +491,11 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"выбрать виджет"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"удалить виджет"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"разместить выбранный виджет"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
- <skip />
+ <string name="communal_widget_picker_title" msgid="1953369090475731663">"Виджеты на заблокированном экране"</string>
+ <string name="communal_widget_picker_description" msgid="490515450110487871">"Они видны всем, даже если планшет заблокирован."</string>
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Виджеты на заблокированном экране"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Чтобы открыть приложение, используя виджет, вам нужно будет подтвердить свою личность. Обратите внимание, что виджеты видны всем, даже если планшет заблокирован. Некоторые виджеты не предназначены для использования на заблокированном экране. Добавлять их туда может быть небезопасно."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"ОК"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Сменить пользователя."</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"раскрывающееся меню"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Все приложения и данные этого профиля будут удалены."</string>
@@ -725,7 +717,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"По умолчанию"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Автоматически"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Без звука и вибрации"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Без звука или вибрации, появляется в нижней части списка разговоров"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Звонок или вибрация в зависимости от настроек устройства"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Звонок или вибрация в зависимости от настроек устройства. Разговоры из приложения \"<xliff:g id="APP_NAME">%1$s</xliff:g>\" по умолчанию появляются в виде всплывающего чата."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Система будет сама определять, включать ли звуковой сигнал или вибрацию для уведомления"</string>
@@ -782,6 +775,7 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page Down"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Delete"</string>
+ <string name="keyboard_key_esc" msgid="6230365950511411322">"Esc"</string>
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1364,20 +1358,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Разделение экрана"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Ввод"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Ярлыки приложений"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Специальные возможности"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Быстрые клавиши"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Найти быстрые клавиши"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Значок \"Свернуть\""</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Значок \"Развернуть\""</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"или"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Жест \"назад\""</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Жест \"на главный экран\""</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Клавиша действия"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Готово"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Отлично!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Назад"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Чтобы вернуться, проведите тремя пальцами влево или вправо по сенсорной панели."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Три пальца двигаются вправо и влево по сенсорной панели"</string>
@@ -1386,4 +1379,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Уровень %1$d из %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Управление домом"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Быстрый доступ к управлению домом через заставку"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-ru/tiles_states_strings.xml b/packages/SystemUI/res/values-ru/tiles_states_strings.xml
index 592937c7b9f6..2a0314e0e8f0 100644
--- a/packages/SystemUI/res/values-ru/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-ru/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Откл."</item>
<item msgid="4875147066469902392">"Вкл."</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Функция недоступна"</item>
<item msgid="5044688398303285224">"Откл."</item>
diff --git a/packages/SystemUI/res/values-si/strings.xml b/packages/SystemUI/res/values-si/strings.xml
index 30a3b56349cb..ebcfa9d57ab7 100644
--- a/packages/SystemUI/res/values-si/strings.xml
+++ b/packages/SystemUI/res/values-si/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> මෙම තිර රුව අනාවරණය කර ගෙන ඇත."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> සහ අනෙකුත් විවෘත යෙදුම් මෙම තිර රුව අනාවරණය කර ගෙන ඇත."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"සටහනට එක් කරන්න"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"සබැඳිය ඇතුළත් කරන්න"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"තිර රෙකෝඩරය"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"තිර පටිගත කිරීම සකසමින්"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"තිර පටිගත කිරීමේ සැසියක් සඳහා කෙරෙන දැනුම් දීම"</string>
@@ -127,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"බැලීමට තට්ටු කරන්න"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"තිර පටිගත කිරීම සුරැකීමේ දෝෂයකි"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"තිර පටිගත කිරීම ආරම්භ කිරීමේ දෝෂයකි"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"ඔබ &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; පටිගත කිරීම නතර කරනු ඇත"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"පටිගත කිරීම නවත්වන්න"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"තිරය ​​බෙදා ගැනීම"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"තිරය ​​බෙදා ගැනීම නවත්වන්න ද?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"ඔබ &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; බෙදා ගැනීම නතර කරනු ඇත"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"බෙදා ගැනීම නවත්වන්න"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"විකාශ තිරය"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"විකාශය නවතන්න ද?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"විකාශ තිරය"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"ඔබ &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; විකාශය නතර කරනු ඇත"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"විකාශය නවතන්න"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"වසන්න"</string>
<string name="issuerecord_title" msgid="286627115110121849">"ගැටලු රෙකෝඩරය"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"ගැටලු වාර්තාව සැකසුම් කිරීම"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"ගැටලු එකතු කිරීමේ සැසියක් සඳහා දැනට පවතින දැනුම්දීම"</string>
@@ -162,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"ගැටලුව සටහන් කිරීම සුරැකීමේ දෝෂය"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"ගැටලුව වාර්තා කිරීම ආරම්භ කිරීමේ දෝෂය"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"මුළු තිරය බලමින්"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"පිටවීමට, ඔබේ තිරයෙහි ඉහළ සිට පහළට ස්වයිප් කරන්න"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"තේරුණා"</string>
<string name="accessibility_back" msgid="6530104400086152611">"ආපසු"</string>
<string name="accessibility_home" msgid="5430449841237966217">"මුල් පිටුව"</string>
@@ -196,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"මුහුණ මගින් අගුලු හරින ලදි. ඉදිරියට යාමට ඔබන්න."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"මුහුණ හඳුනා ගන්නා ලදි. ඉදිරියට යාමට ඔබන්න."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"මුහුණ හඳුනා ගන්නා ලදි. ඉදිරියට යාමට අගුලු හැරීමේ නිරූපකය ඔබන්න."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"මුහුණ මගින් අගුළු හරින ලදි. ඉදිරියට යාමට තට්ටු කරන්න."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"සත්‍යාපනය විය"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"සත්‍යාපනය අවලංගු කරන්න"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"තවත් විකල්ප"</string>
@@ -297,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"තිර සුරැකුම"</string>
<string name="ethernet_label" msgid="2203544727007463351">"ඊතර නෙට්"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"බාධා නොකරන්න"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"බ්ලූටූත්"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"යුගල කළ උපාංග නොතිබේ"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"උපාංගයක් සම්බන්ධ කිරීමට හෝ විසන්ධි කිරීමට තට්ටු කරන්න"</string>
@@ -308,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"සුරැකිණි"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"විසන්ධි කරන්න"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"සක්‍රිය කරන්න"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"හෙට ස්වයංක්‍රීයව ක්‍රියාත්මක කරන්න"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"ඉක්මන් බෙදා ගැනීම සහ මගේ උපාංගය සෙවීම වැනි විශේෂාංග බ්ලූටූත් භාවිත කරයි"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"බ්ලූටූත් හෙට උදේ සක්‍රීය වෙයි"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"ශ්‍රව්‍ය බෙදා ගන්න"</string>
@@ -478,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"තවත් විජට් එක් කරන්න"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"විජට් අභිරුචිකරණය කිරීමට දිගු ඔබන්න"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"විජට්ටු අභිරුචි කරන්න"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"විජට් අභිරුචිකරණය කිරීමට අගුළු හරින්න"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"අබල කළ විජට් සඳහා යෙදුම් නිරූපකය"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"විජට්ටුවක් සඳහා ස්ථාපන කරනු ලබන යෙදුම් නිරූපකය"</string>
<string name="edit_widget" msgid="9030848101135393954">"විජට්ටු සංස්කරණ කරන්න"</string>
@@ -498,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"විජට්ටුව තෝරන්න"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"විජට්ටුව ඉවත් කරන්න"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"තෝරන ලද විජට්ටුව තබන්න"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"අගුළු තිර විජට්"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"විජට් එකක් භාවිතයෙන් යෙදුමක් විවෘත කිරීමට, ඔබට ඒ ඔබ බව සත්‍යාපනය කිරීමට අවශ්‍ය වනු ඇත. එසේම, ඔබේ ටැබ්ලටය අගුළු දමා ඇති විට පවා ඕනෑම කෙනෙකුට ඒවා බැලිය හැකි බව මතක තබා ගන්න. සමහර විජට් ඔබේ අගුළු තිරය සඳහා අදහස් කර නොතිබිය හැකි අතර මෙහි එක් කිරීමට අනාරක්ෂිත විය හැක."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"තේරුණා"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"පරිශීලක මාරුව"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"නිපතන මෙනුව"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"මෙම සැසියේ සියළුම යෙදුම් සහ දත්ත මකාවී."</string>
@@ -725,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"පෙරනිමි"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"ස්වයංක්‍රිය"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"හඬක් හෝ කම්පනයක් නැත"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"හඬක් හෝ කම්පනයක් නැති අතර සංවාද කොටසේ පහළම දිස් වේ"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"උපාංග සැකසීම් මත පදනම්ව නාද වීමට හෝ කම්පනය විය හැක"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"උපාංග සැකසීම් මත පදනම්ව නාද වීමට හෝ කම්පනය විය හැක. <xliff:g id="APP_NAME">%1$s</xliff:g> වෙතින් සංවාද පෙරනිමියෙන් බුබුළු දමයි."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"මෙම දැනුම් දීම ශබ්දයක් හෝ කම්පනයක් ඇති කළ යුතු ද යන්න පද්ධතිය මගින් තීරණය කර තිබේද"</string>
@@ -782,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up යතුර"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page Down යතුර"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Delete යතුර"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home යතුර"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End යතුර"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert යතුර"</string>
@@ -1364,20 +1374,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"බෙදුම් තිරය"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"ආදානය"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"යෙදුම් කෙටිමං"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"ප්‍රවේශ්‍යතාව"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"යතුරු පුවරු කෙටි මං"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"කෙටි මං සොයන්න"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"හැකුළුම් නිරූපකය"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"දිගහැරීම් නිරූපකය"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"හෝ"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"ආපසු අභිනය"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"නිවෙස් අභිනය"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"ක්‍රියා යතුර"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"නිමයි"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"අනර්ඝ වැඩක්!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"ආපස්සට යන්න"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"ආපසු යාමට, ස්පර්ශ පුවරුවේ ඕනෑම තැනක ඇඟිලි තුනක් භාවිතයෙන් වමට හෝ දකුණට ස්වයිප් කරන්න."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"ඇඟිලි තුනක් දකුණට සහ වමට චලනය වන බව පෙන්වන ස්පර්ශක පුවරුව"</string>
@@ -1386,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"%2$dන් %1$d වැනි මට්ටම"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"නිවෙස් පාලන"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"තිර සුරැකුමක් ලෙස ඔබේ නිවසේ පාලන වෙත ඉක්මනින් ප්‍රවේශ වන්න"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-si/tiles_states_strings.xml b/packages/SystemUI/res/values-si/tiles_states_strings.xml
index 681f3d52bc09..8d1f2619a1d4 100644
--- a/packages/SystemUI/res/values-si/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-si/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"අක්‍රියයි"</item>
<item msgid="4875147066469902392">"සක්‍රියයි"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"නොමැත"</item>
<item msgid="5044688398303285224">"අක්‍රියයි"</item>
diff --git a/packages/SystemUI/res/values-sk/strings.xml b/packages/SystemUI/res/values-sk/strings.xml
index cf35af0cfbf8..2f9931661f16 100644
--- a/packages/SystemUI/res/values-sk/strings.xml
+++ b/packages/SystemUI/res/values-sk/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"Aplikácia <xliff:g id="APPNAME">%1$s</xliff:g> zaznamenala túto snímku obrazovky."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> a ďalšie otvorené aplikácie zaznamenali túto snímku obrazovky."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Pridať do poznámky"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Zahrnúť odkaz"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Rekordér obrazovky"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Spracúva sa záznam obrazovky"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Zobrazuje sa upozornenie týkajúce sa relácie záznamu obrazovky"</string>
@@ -127,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Zobrazte klepnutím"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Pri ukladaní nahrávky obrazovky sa vyskytla chyba"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Pri spustení nahrávania obrazovky sa vyskytla chyba"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Prestante zaznamenávať obsah aplikácie &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Zastaviť nahrávanie"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Zdieľa sa obrazovka"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Chcete prestať zdieľať obrazovku?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Prestanete zdieľať obsah aplikácie &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Prestať zdieľať"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Prenáša sa obrazovka"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Chcete zastaviť prenos?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Prenáša sa obrazovka"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Prestanete prenášať obsah aplikácie &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Zastaviť prenos"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Zavrieť"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Nástroj na zaznamenávanie problémov"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Záznam problému sa spracúva"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Upozornenie na prebiehajúcu aktivitu týkajúcu sa relácie zhromažďovania problémov"</string>
@@ -162,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Pri ukladaní záznamu problému sa vyskytla chyba"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Pri spúšťaní záznamu problému sa vyskytla chyba"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Zobrazenie na celú obrazovku"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Ukončíte potiahnutím zhora obrazovky nadol"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"Dobre"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Späť"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Plocha"</string>
@@ -196,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Odomknuté tvárou. Pokračujte stlačením."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Tvár bola rozpoznaná. Pokračujte stlačením."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Tvár bola rozpoznaná. Pokračujte stlačením ikony odomknutia"</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Odomknuté tvárou. Pokračujte klepnutím."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Overené"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Zrušiť overenie"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Ďalšie možnosti"</string>
@@ -297,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Šetrič obrazovky"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Režim bez vyrušení"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Nie sú k dispozícii žiadne spárované zariadenia"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Klepnutím pripojíte alebo odpojíte zariadenie"</string>
@@ -308,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Uložené"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"odpojiť"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"aktivovať"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Automaticky zapnúť zajtra"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Funkcie ako Quick Share a Nájdi moje zariadenie používajú Bluetooth"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bluetooth sa zapne zajtra ráno"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Zdieľať zvuk"</string>
@@ -478,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Pridať ďalšie miniaplikácie"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Miniaplikácie prispôsobíte dlhým stlačením"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Prispôsobiť miniaplikácie"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Odomknite a prispôsobte si miniaplikácie"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Ikona deaktivovanej miniaplikácie"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Ikona inštalovanej miniaplikácie"</string>
<string name="edit_widget" msgid="9030848101135393954">"Upraviť miniaplikáciu"</string>
@@ -498,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"vybrať miniaplikáciu"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"odstrániť miniaplikáciu"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"prepnúť vybranú miniaplikáciu"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Miniaplikácie na uzamknutej obrazovke"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Ak chcete otvoriť aplikáciu pomocou miniaplikácie, budete musieť overiť svoju totožnosť. Pamätajte, že si miniaplikáciu môže pozrieť ktokoľvek, aj keď máte tablet uzamknutý. Niektoré miniaplikácie možno nie sú určené pre uzamknutú obrazovku a ich pridanie tu môže byť nebezpečné."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"Dobre"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Prepnutie používateľa"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"rozbaľovacia ponuka"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Všetky aplikácie a údaje v tejto relácii budú odstránené."</string>
@@ -725,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Predvolené"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Automaticky"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Žiadny zvuk ani vibrácie"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Žiadny zvuk ani vibrácie a zobrazuje sa nižšie v sekcii konverzácií"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Môže zvoniť či vibrovať podľa nastavení v zariadení"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Môže zvoniť alebo vibrovať podľa nastavení v zariadení. Predvolene sa zobrazia konverzácie z bubliny aplikácie <xliff:g id="APP_NAME">%1$s</xliff:g>."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Nechajte systém určiť, či má toto upozornenie vydávať zvuk alebo vibrovať"</string>
@@ -782,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Posunúť o stranu vyššie"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Posunúť o stranu nižšie"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Odstrániť"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Domov"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"Ukončiť"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Vložiť"</string>
@@ -1364,20 +1374,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Rozdelená obrazovka"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Vstup"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Odkazy do aplikácií"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Dostupnosť"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Klávesové skratky"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Vyhľadávacie odkazy"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Ikona zbalenia"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Ikona rozbalenia"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"alebo"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Gesto prechodu späť"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Gesto prechodu domov"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Akčný kláves"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Hotovo"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Skvelé!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Prejsť späť"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Ak chcete prejsť späť, potiahnite doľava alebo doprava troma prstami kdekoľvek na touchpade."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Tri prsty na touchpade pohybujúce sa doprava a doľava"</string>
@@ -1386,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"%1$d. úroveň z %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Ovládanie domácnosti"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Rýchly prístup k ovládaniu domácnosti z šetriča obrazovky"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-sk/tiles_states_strings.xml b/packages/SystemUI/res/values-sk/tiles_states_strings.xml
index 6b5af805f15b..340af48ba576 100644
--- a/packages/SystemUI/res/values-sk/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-sk/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Vypnuté"</item>
<item msgid="4875147066469902392">"Zapnuté"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Nie je k dispozícii"</item>
<item msgid="5044688398303285224">"Vypnuté"</item>
diff --git a/packages/SystemUI/res/values-sl/strings.xml b/packages/SystemUI/res/values-sl/strings.xml
index c493c5e036c9..ac78905d500e 100644
--- a/packages/SystemUI/res/values-sl/strings.xml
+++ b/packages/SystemUI/res/values-sl/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"Aplikacija <xliff:g id="APPNAME">%1$s</xliff:g> je zaznala ta posnetek zaslona."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> in druge odprte aplikacije so zaznale ta posnetek zaslona."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Dodaj v zapisek"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Vključi povezavo"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Snemalnik zaslona"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Obdelava videoposnetka zaslona"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Nenehno obveščanje o seji snemanja zaslona"</string>
@@ -127,31 +126,27 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Dotaknite se za ogled."</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Napaka pri shranjevanju posnetka zaslona"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Napaka pri začenjanju snemanja zaslona"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
- <skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
- <skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Ustavili boste snemanje aplikacije &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
- <skip />
+ <string name="screenrecord_stop_dialog_title" msgid="8716193661764511095">"Želite ustaviti snemanje?"</string>
+ <string name="screenrecord_stop_dialog_message" msgid="6262768207331626817">"Trenutno snemate celotni zaslon"</string>
+ <string name="screenrecord_stop_dialog_message_specific_app" msgid="5995770227684523244">"Trenutno snemate aplikacijo <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Ustavi snemanje"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Deljenje zaslona"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
- <skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
- <skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Ustavili boste deljenje aplikacije &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
- <skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Predvajanje vsebine zaslona"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
- <skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
- <skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Ustavili boste predvajanje aplikacije &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
- <skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
- <skip />
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Želite ustaviti deljenje zaslona?"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen_with_host_app" msgid="522823522115375414">"Trenutno delite celotni zaslon z aplikacijo <xliff:g id="HOST_APP_NAME">%1$s</xliff:g>"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen" msgid="5090115386271179270">"Trenutno delite celotni zaslon z eno od aplikacij"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_specific" msgid="5923772039347985172">"Trenutno delite aplikacijo <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g>"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_generic" msgid="6681016774654578261">"Trenutno delite eno od aplikacij"</string>
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Ustavi deljenje"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Predvajanje vsebine zaslona"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Želite ustaviti predvajanje?"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen_with_device" msgid="1474703115926205251">"Trenutno predvajate celotni zaslon v napravi <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen" msgid="8419219169553867625">"Trenutno predvajate celotni zaslon v napravi v bližini"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app_with_device" msgid="2715934698604085519">"Trenutno predvajate aplikacijo <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> v napravi <xliff:g id="DEVICE_NAME">%2$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="8616103075630934513">"Trenutno predvajate aplikacijo <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> v napravi v bližini"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic_with_device" msgid="9213582497852420203">"Trenutno predvajate v napravi <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic" msgid="4100272100480415076">"Trenutno predvajate v napravi v bližini"</string>
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Ustavi predvajanje"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Zapri"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Snemalnik težav"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Obdelovanje posnetka težave"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Obvestilo o aktivni dejavnosti za sejo zbiranja težav"</string>
@@ -162,8 +157,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Napaka pri shranjevanju posnetka težave"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Napaka pri zagonu snemanja težave"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Vklopljen je celozaslonski način."</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Če želite zapreti, povlecite navzdol z vrha zaslona"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"Razumem"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Nazaj"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Začetni zaslon"</string>
@@ -196,8 +190,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Odklenjeno z obrazom. Pritisnite za nadaljevanje."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Obraz je prepoznan. Pritisnite za nadaljevanje."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Obraz je prepoznan. Za nadaljevanje pritisnite ikono za odklepanje."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Odklenjeno z obrazom. Dotaknite se, če želite nadaljevati."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Preverjena pristnost"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Prekliči preverjanje pristnosti"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Več možnosti"</string>
@@ -297,6 +290,7 @@
<string name="start_dreams" msgid="9131802557946276718">"Ohranjeval. zaslona"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Ne moti"</string>
+ <string name="quick_settings_modes_label" msgid="5407025818652750501">"Prednostni načini"</string>
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Na voljo ni nobene seznanjene naprave"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Dotaknite se za vzpostavitev ali prekinitev povezave z napravo"</string>
@@ -308,8 +302,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Shranjeno"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"prekinitev povezave"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"aktiviranje"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Samodejno vklopi jutri"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Funkcije, kot sta Hitro deljenje in Poišči mojo napravo, uporabljajo Bluetooth"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bluetooth se bo vklopil jutri zjutraj"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Deli zvok"</string>
@@ -478,8 +471,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Dodajte več pripomočkov"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Pridržite za prilagajanje pripomočkov"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Prilagajanje pripomočkov"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Odklenite, če želite prilagoditi pripomočke"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Ikona aplikacije za onemogočen pripomoček"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Ikona aplikacije za nameščanje pripomočka"</string>
<string name="edit_widget" msgid="9030848101135393954">"Urejanje pripomočka"</string>
@@ -498,12 +490,11 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"izberite pripomoček"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"odstranitev pripomočka"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"postavitev izbranega pripomočka"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
- <skip />
+ <string name="communal_widget_picker_title" msgid="1953369090475731663">"Pripomočki na zaklenjenem zaslonu"</string>
+ <string name="communal_widget_picker_description" msgid="490515450110487871">"Pripomočki na zaklenjenem zaslonu so vidni vsem, tudi če je tablica zaklenjena."</string>
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Pripomočki na zaklenjenem zaslonu"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Če želite aplikacijo odpreti s pripomočkom, morate potrditi, da ste to vi. Upoštevajte tudi, da si jih lahko ogledajo vsi, tudi ko je tablični računalnik zaklenjen. Nekateri pripomočki morda niso predvideni za uporabo na zaklenjenem zaslonu, zato jih tukaj morda ni varno dodati."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"Razumem"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Preklop med uporabniki"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"spustni meni"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Vse aplikacije in podatki v tej seji bodo izbrisani."</string>
@@ -725,7 +716,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Privzeto"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Samodejno"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Brez zvočnega opozarjanja ali vibriranja."</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Brez zvočnega opozarjanja ali vibriranja, prikaz nižje v razdelku Pogovor."</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Zvonjenje ali vibriranje je omogočeno na podlagi nastavitev naprave."</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Zvonjenje ali vibriranje je omogočeno na podlagi nastavitev naprave. Pogovori v aplikaciji <xliff:g id="APP_NAME">%1$s</xliff:g> so privzeto prikazani v oblačkih."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Naj sistem določi, ali ob prejemu tega obvestila naprava predvaja zvok ali zavibrira"</string>
@@ -782,6 +774,7 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Stran gor"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Stran dol"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Izbriši"</string>
+ <string name="keyboard_key_esc" msgid="6230365950511411322">"Esc"</string>
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Začetek"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"Konec"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Vstavi"</string>
@@ -1364,20 +1357,18 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Razdeljen zaslon"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Vnos"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Bližnjice do aplikacij"</string>
+ <string name="shortcut_helper_category_current_app_shortcuts" msgid="4017840565974573628">"Trenutna aplikacija"</string>
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Dostopnost"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Bližnjične tipke"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Bližnjice za iskanje"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Ikona za strnitev"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Ikona za razširitev"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"ali"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Poteza za pomik nazaj"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Poteza za začetni zaslon"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Gumb za dejanje"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Končano"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Odlično!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Nazaj"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Za pomik nazaj povlecite levo ali desno s tremi prsti kjer koli na sledilni ploščici."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Sledilna ploščica s tremi prsti, ki se premikajo desno in levo"</string>
@@ -1386,4 +1377,5 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Stopnja %1$d od %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Kontrolniki za dom"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Hiter dostop do kontrolnikov za dom na ohranjevalniku zaslona"</string>
+ <string name="volume_undo_action" msgid="5815519725211877114">"Razveljavi"</string>
</resources>
diff --git a/packages/SystemUI/res/values-sl/tiles_states_strings.xml b/packages/SystemUI/res/values-sl/tiles_states_strings.xml
index 5f60ffdaebf7..e57b87b794b3 100644
--- a/packages/SystemUI/res/values-sl/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-sl/tiles_states_strings.xml
@@ -56,6 +56,11 @@
<item msgid="5376619709702103243">"Izklopljeno"</item>
<item msgid="4875147066469902392">"Vklopljeno"</item>
</string-array>
+ <string-array name="tile_states_modes">
+ <item msgid="7764936419245199023">"Ni na voljo"</item>
+ <item msgid="2004750556637773692">"Izklopljeno"</item>
+ <item msgid="8968530753931637871">"Vklopljeno"</item>
+ </string-array>
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Ni na voljo"</item>
<item msgid="5044688398303285224">"Izklopljeno"</item>
diff --git a/packages/SystemUI/res/values-sq/strings.xml b/packages/SystemUI/res/values-sq/strings.xml
index e189e9c82132..926a73f4baab 100644
--- a/packages/SystemUI/res/values-sq/strings.xml
+++ b/packages/SystemUI/res/values-sq/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> zbuloi këtë pamje ekrani."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> dhe aplikacionet e tjera të hapura zbuluan këtë pamje ekrani."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Shto te shënimi"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Përfshi lidhjen"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Regjistruesi i ekranit"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Regjistrimi i ekranit po përpunohet"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Njoftim i vazhdueshëm për një seancë regjistrimi të ekranit"</string>
@@ -127,33 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Trokit për të parë"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Gabim gjatë ruajtjes së regjistrimit të ekranit"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Gabim gjatë nisjes së regjistrimit të ekranit"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
+ <skip />
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Do të ndalosh regjistrimin me &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Ndalo regjistrimin"</string>
+ <string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Ekrani po ndahet"</string>
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Të ndalohet ndarja e ekranit?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
<skip />
- <!-- no translation found for share_to_app_chip_accessibility_label (4210256229976947065) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Do të ndalosh ndarjen e &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Ndalo ndarjen"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Po transmeton ekranin"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Të ndalohet transmetimi?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <!-- no translation found for cast_to_other_device_chip_accessibility_label (1680650146639059938) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Do të ndalosh transmetimin e &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
<skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Ndalo transmetimin"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Mbyll"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Regjistruesi i problemeve"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Regjistrimi i problemeve me përpunimin"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Njoftim në vazhdim për një seancë për mbledhjen e problemeve"</string>
@@ -164,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Gabim gjatë ruajtjes së regjistrimit të problemit"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Gabim gjatë nisjes së regjistrimit të problemit"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Po shikon ekranin e plotë"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Për të dalë, rrëshqit shpejt poshtë nga kreu i ekranit"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"E kuptova"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Prapa"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Faqja bazë"</string>
@@ -198,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"U shkyç me fytyrë. Shtyp për të vazhduar."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Fytyra u njoh. Shtyp për të vazhduar."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Fytyra u njoh. Shtyp ikonën e shkyçjes për të vazhduar."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"U shkyç me fytyrë. Trokit për të vazhduar."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"U vërtetua"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Anulo vërtetimin"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Opsione të tjera"</string>
@@ -299,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Mbrojtësi i ekranit"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Eternet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Mos shqetëso"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth-i"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Nuk ofrohet për përdorim asnjë pajisje e çiftuar"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Trokit për të lidhur ose shkëputur një pajisje"</string>
@@ -310,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Ruajtur"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"shkëput"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"aktivizo"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Aktivizo automatikisht nesër"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Veçoritë e tilla si \"Ndarja e shpejtë\" dhe \"Gjej pajisjen time\" përdorin Bluetooth-in"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bluetooth-i do të aktivizohet nesër në mëngjes"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Ndaj audion"</string>
@@ -480,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Shto miniaplikacione të tjera"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Shtyp gjatë për të personalizuar miniaplikacionet"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Personalizo miniaplikacionet"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Shkyç për të personalizuar miniaplikacionet"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Ikona e aplikacionit për miniaplikacionin e çaktivizuar"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Ikona e aplikacionit për një miniaplikacion që po instalohet"</string>
<string name="edit_widget" msgid="9030848101135393954">"Modifiko miniaplikacionin"</string>
@@ -500,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"zgjidh miniaplikacionin"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"hiq miniaplikacionin"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"vendos miniaplikacionin e zgjedhur"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Kyç miniaplikacionet e ekranit"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Për të hapur një aplikacion duke përdorur një miniaplikacion, do të duhet të verifikosh që je ti. Ki parasysh gjithashtu që çdo person mund t\'i shikojë, edhe kur tableti yt është i kyçur. Disa miniaplikacione mund të mos jenë planifikuar për ekranin tënd të kyçjes dhe mund të mos jetë e sigurt t\'i shtosh këtu."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"E kuptova"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Ndërro përdorues"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"menyja me tërheqje poshtë"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Të gjitha aplikacionet dhe të dhënat në këtë sesion do të fshihen."</string>
@@ -727,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"E parazgjedhur"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Automatike"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Asnjë tingull ose dridhje"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Asnjë tingull ose dridhje dhe shfaqet më poshtë në seksionin e bisedave"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Mund të bjerë zilja ose të dridhet në bazë të cilësimeve të pajisjes"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Mund të bjerë zilja ose të dridhet në bazë të cilësimeve të pajisjes. Bisedat nga flluska e <xliff:g id="APP_NAME">%1$s</xliff:g> si parazgjedhje."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Kërkoji sistemit të përcaktojë nëse ky njoftim duhet të lëshojë tingull apo dridhje"</string>
@@ -784,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Faqja lart"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Faqja poshtë"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Fshi"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Kreu"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"Fundi"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Fut"</string>
@@ -1359,31 +1367,26 @@
<string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"Në përdorim nga <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string>
<string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"Përdorur së fundi nga <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string>
<string name="shortcut_helper_category_system" msgid="462110876978937359">"Sistemi"</string>
- <!-- no translation found for shortcut_helper_category_system_controls (3153344561395751020) -->
- <skip />
- <!-- no translation found for shortcut_helper_category_system_apps (6001757545472556810) -->
- <skip />
+ <string name="shortcut_helper_category_system_controls" msgid="3153344561395751020">"Kontrollet e sistemit"</string>
+ <string name="shortcut_helper_category_system_apps" msgid="6001757545472556810">"Aplikacionet e sistemit"</string>
<string name="shortcut_helper_category_multitasking" msgid="7413381961404090136">"Kryerja e shumë detyrave"</string>
- <!-- no translation found for shortcutHelper_category_recent_apps (7918731953612377145) -->
- <skip />
- <!-- no translation found for shortcutHelper_category_split_screen (1159669813444812244) -->
- <skip />
+ <string name="shortcutHelper_category_recent_apps" msgid="7918731953612377145">"Aplikacionet e fundit"</string>
+ <string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Ekrani i ndarë"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Hyrja"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Shkurtoret e aplikacionit"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Qasshmëria"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Shkurtoret e tastierës"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Kërko për shkurtoret"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Ikona e palosjes"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Ikona e zgjerimit"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"ose"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Gjesti i kthimit prapa"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Gjesti për të shkuar tek ekrani bazë"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Tasti i veprimit"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"U krye"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Punë e shkëlqyer!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Kthehu prapa"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Për t\'u kthyer prapa, rrëshqit shpejt majtas ose djathtas duke përdorur tre gishta kudo në bllokun me prekje."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Blloku me prekje që tregon tre gishta që lëvizin djathtas dhe majtas"</string>
@@ -1392,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Niveli: %1$d nga %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Kontrollet e shtëpisë"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Qasu te kontrollet e shtëpisë si mbrojtës ekrani"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-sq/tiles_states_strings.xml b/packages/SystemUI/res/values-sq/tiles_states_strings.xml
index 9b5032eecbd8..4f42c308baa8 100644
--- a/packages/SystemUI/res/values-sq/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-sq/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Joaktiv"</item>
<item msgid="4875147066469902392">"Aktiv"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Nuk ofrohet"</item>
<item msgid="5044688398303285224">"Joaktiv"</item>
diff --git a/packages/SystemUI/res/values-sr/strings.xml b/packages/SystemUI/res/values-sr/strings.xml
index aac4c0b32fce..e5b9445926e9 100644
--- a/packages/SystemUI/res/values-sr/strings.xml
+++ b/packages/SystemUI/res/values-sr/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"Апликација <xliff:g id="APPNAME">%1$s</xliff:g> је открила овај снимак екрана."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> и друге отворене апликације су откриле овај снимак екрана."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Додај у белешку"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Уврсти линк"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Снимач екрана"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Обрађујемо видео снимка екрана"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Обавештење о сесији снимања екрана је активно"</string>
@@ -127,31 +126,27 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Додирните да бисте прегледали"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Грешка при чувању снимка екрана"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Грешка при покретању снимања екрана"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
- <skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
- <skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Зауставићете снимање за: &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
- <skip />
+ <string name="screenrecord_stop_dialog_title" msgid="8716193661764511095">"Желите да зауставите снимање?"</string>
+ <string name="screenrecord_stop_dialog_message" msgid="6262768207331626817">"Тренутно снимате цео екран"</string>
+ <string name="screenrecord_stop_dialog_message_specific_app" msgid="5995770227684523244">"Тренутно снимате: <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Заустави снимање"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Екран се дели"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
- <skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
- <skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Зауставићете дељење за: &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
- <skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Пребацује се екран"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
- <skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
- <skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Зауставићете пребацивање за: &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
- <skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
- <skip />
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Желите да зауставите дељење екрана?"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen_with_host_app" msgid="522823522115375414">"Тренутно делите цео екран са: <xliff:g id="HOST_APP_NAME">%1$s</xliff:g>"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen" msgid="5090115386271179270">"Тренутно делите цео екран са апликацијом"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_specific" msgid="5923772039347985172">"Тренутно делите: <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g>"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_generic" msgid="6681016774654578261">"Тренутно делите апликацију"</string>
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Заустави дељење"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Пребацује се екран"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Желите да зауставите пребацивање?"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen_with_device" msgid="1474703115926205251">"Тренутно пребацујете цео екран на: <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen" msgid="8419219169553867625">"Тренутно пребацујете цео екран на уређај у близини"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app_with_device" msgid="2715934698604085519">"<xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> се тренутно пребацује на: <xliff:g id="DEVICE_NAME">%2$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="8616103075630934513">"<xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> се тренутно пребацује на уређај у близини"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic_with_device" msgid="9213582497852420203">"Тренутно пребацујете на: <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic" msgid="4100272100480415076">"Тренутно пребацујете на уређај у близини"</string>
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Заустави пребацивање"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Затвори"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Снимач проблема"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Обрађује се снимак проблема"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"обавештење о активности у току за сесију прикупљања података о проблему"</string>
@@ -162,8 +157,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Грешка при чувању снимка проблема"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Грешка при покретању снимања проблема"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Приказује се цео екран"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Да бисте затворили, превуците надоле од врха екрана"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"Важи"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Назад"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Почетна"</string>
@@ -196,8 +190,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Откључано је лицем. Притисните да бисте наставили."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Лице је препознато. Притисните да бисте наставили."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Лице препознато. Притисните икону откључавања за наставак."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Откључано је лицем. Додирните да бисте наставили."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Идентитет је потврђен"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Откажите потврду идентитета"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Још опција"</string>
@@ -297,6 +290,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Чувар екрана"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Етернет"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Не узнемиравај"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Није доступан ниједан упарени уређај"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Додирните да бисте повезали уређај или прекинули везу"</string>
@@ -308,8 +303,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Сачувано"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"прекините везу"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"активирајте"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Аутоматски укључи сутра"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Функције као што су Quick Share и Пронађи мој уређај користе Bluetooth"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bluetooth ће се укључити сутра ујутру"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Дели звук"</string>
@@ -478,8 +472,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Додајте још виџета"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Дуги притисак за прилагођавање виџета"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Прилагоди виџете"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Откључајте да бисте прилагодили виџете"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Икона апликације за онемогућен виџет"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Икона апликације за виџет који се инсталира"</string>
<string name="edit_widget" msgid="9030848101135393954">"Измени виџет"</string>
@@ -498,12 +491,11 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"изаберите виџет"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"уклоните виџет"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"поставите изабрани виџет"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
- <skip />
+ <string name="communal_widget_picker_title" msgid="1953369090475731663">"Виџети за закључани екран"</string>
+ <string name="communal_widget_picker_description" msgid="490515450110487871">"Сви могу да виде веџете на закључаном екрану, чак и када је таблет закључан."</string>
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Виџети за закључани екран"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Да бисте отворили апликацију која користи виџет, треба да потврдите да сте то ви. Имајте у виду да свако може да га види, чак и када је таблет закључан. Неки виџети можда нису намењени за закључани екран и можда није безбедно да их тамо додате."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"Важи"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Замени корисника"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"падајући мени"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Све апликације и подаци у овој сесији ће бити избрисани."</string>
@@ -725,7 +717,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Подразумевано"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Аутоматска"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Без звука и вибрирања"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Без звука и вибрирања и приказује се у наставку одељка за конверзације"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Може да звони или вибрира у зависности од подешавања уређаја"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Може да звони или вибрира у зависности од подешавања уређаја. Конверзације из апликације <xliff:g id="APP_NAME">%1$s</xliff:g> подразумевано се приказују у облачићима."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Нека систем утврди да ли ово обавештење треба да емитује звук или да вибрира"</string>
@@ -782,6 +775,7 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Тастер за страницу нагоре"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Тастер за страницу надоле"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Тастер за брисање"</string>
+ <string name="keyboard_key_esc" msgid="6230365950511411322">"Esc"</string>
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Тастер Почетна"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"Тастер за крај"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Тастер за уметање"</string>
@@ -1364,20 +1358,18 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Подељени екран"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Унос"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Пречице за апликације"</string>
+ <string name="shortcut_helper_category_current_app_shortcuts" msgid="4017840565974573628">"Актуелна апликација"</string>
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Приступачност"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Тастерске пречице"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Пречице претраге"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Икона за скупљање"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Икона за проширивање"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"или"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Покрет за враћање"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Покрет за почетну страницу"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Тастер радњи"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Готово"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Одлично!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Назад"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Да бисте се вратили, превуците улево или удесно са три прста било где на тачпеду."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Тачпед са приказом три прста који се померају удесно и улево"</string>
@@ -1386,4 +1378,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"%1$d. ниво од %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Контроле за дом"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Брз приступ контролама за дом као чувару екрана"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-sr/tiles_states_strings.xml b/packages/SystemUI/res/values-sr/tiles_states_strings.xml
index 2acf1d264213..904fb23b1e77 100644
--- a/packages/SystemUI/res/values-sr/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-sr/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Искључено"</item>
<item msgid="4875147066469902392">"Укључено"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Недоступно"</item>
<item msgid="5044688398303285224">"Искључено"</item>
diff --git a/packages/SystemUI/res/values-sv/strings.xml b/packages/SystemUI/res/values-sv/strings.xml
index 39d81b9f8e5d..68063d662786 100644
--- a/packages/SystemUI/res/values-sv/strings.xml
+++ b/packages/SystemUI/res/values-sv/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> identifierade skärmbilden."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> och andra öppna appar identifierade skärmbilden."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Lägg till i anteckning"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Inkludera länk"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Skärminspelare"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Behandlar skärminspelning"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Avisering om att skärminspelning pågår"</string>
@@ -127,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Tryck för att visa"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Det gick inte att spara skärminspelningen"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Det gick inte att starta skärminspelningen"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Du slutar att spela in &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Sluta spela in"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Skärmen delas"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Vill du sluta dela skärmen?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Du slutar att dela &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Sluta dela"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Skärmen castas"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Vill du sluta att casta?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Skärmen castas"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Du slutar att casta &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Sluta casta"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Stäng"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Probleminspelare"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Behandlar probleminspelning"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Avisering om pågående probleminsamlingssession"</string>
@@ -162,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Det gick inte att spara probleminspelning"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Det gick inte att starta probleminspelning"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Visar på fullskärm"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Svep nedåt från skärmens överkant för att avsluta"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"OK"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Tillbaka"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Startsida"</string>
@@ -196,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Upplåst med ansiktslås. Tryck för att fortsätta."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Ansiktet har identifierats. Tryck för att fortsätta."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Ansiktet har identifierats. Tryck på ikonen lås upp."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Upplåst med ansiktslås. Tryck för att fortsätta."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Autentiserad"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Avbryt autentiseringen"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Fler alternativ"</string>
@@ -297,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Skärmsläckare"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Stör ej"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Det finns inga kopplade enheter tillgängliga"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Tryck för att ansluta eller koppla från en enhet"</string>
@@ -308,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Sparad"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"koppla från"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"aktivera"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Aktivera automatiskt i morgon"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Funktioner som Snabbdelning och Hitta min enhet använder Bluetooth"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bluetooth aktiveras i morgon bitti"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Dela ljud"</string>
@@ -478,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Lägg till fler widgetar"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Tryck länge för att anpassa widgetar"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Anpassa widgetar"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Lås upp för att anpassa widgetar"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Appikon för inaktiverad widget"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Appikon för en widget som installeras"</string>
<string name="edit_widget" msgid="9030848101135393954">"Redigera widget"</string>
@@ -498,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"välj widget"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"ta bort widget"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"placera vald widget"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Widgetar för låsskärm"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Du måste verifiera din identitet innan du öppnar en app med en widget. Tänk också på att alla kan se dem, även när surfplattan är låst. Vissa widgetar kanske inte är avsedda för låsskärmen och det kan vara osäkert att lägga till dem här."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"OK"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Byt användare"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"rullgardinsmeny"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Alla appar och data i denna session kommer att raderas."</string>
@@ -725,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Standard"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Automatiskt"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Inga ljud eller vibrationer"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Inga ljud eller vibrationer och visas längre ned bland konversationerna"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Kan ringa eller vibrera beroende på inställningarna på enheten"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Kan ringa eller vibrera beroende på inställningarna på enheten. Konversationer från <xliff:g id="APP_NAME">%1$s</xliff:g> visas i bubblor som standard."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Låt systemet avgöra om den här aviseringen ska låta eller vibrera"</string>
@@ -782,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Sida upp"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Sida ned"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Radera"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Start"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"Slut"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Infoga"</string>
@@ -1364,20 +1374,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Delad skärm"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Ingång"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Genvägar till appar"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Tillgänglighet"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Kortkommandon"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Sökgenvägar"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Ikonen Komprimera"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Ikonen Utöka"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"eller"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Tillbaka-rörelse"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Rörelse för att öppna startskärmen"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Åtgärdstangent"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Klar"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Bra jobbat!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Tillbaka"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Gå tillbaka genom att svepa åt vänster eller höger med tre fingrar var som helst på styrplattan."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Tre fingrar rör sig åt höger och vänster på en styrplatta"</string>
@@ -1386,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Nivå %1$d av %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Hemstyrning"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Kom snabbt åt hemstyrningen via skärmsläckaren"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-sv/tiles_states_strings.xml b/packages/SystemUI/res/values-sv/tiles_states_strings.xml
index cf49f8db2606..bd62fc146d33 100644
--- a/packages/SystemUI/res/values-sv/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-sv/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Av"</item>
<item msgid="4875147066469902392">"På"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Inte tillgängligt"</item>
<item msgid="5044688398303285224">"Av"</item>
diff --git a/packages/SystemUI/res/values-sw/strings.xml b/packages/SystemUI/res/values-sw/strings.xml
index 253acf062b3f..986e00e5e539 100644
--- a/packages/SystemUI/res/values-sw/strings.xml
+++ b/packages/SystemUI/res/values-sw/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> imetambua picha hii ya skrini."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> na zingine zinazotumika zimetambua picha hii ya skrini."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Ongeza kwenye dokezo"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Jumuisha kiungo"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Kinasa Skrini"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Inachakata rekodi ya skrini"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Arifa inayoendelea ya kipindi cha kurekodi skrini"</string>
@@ -127,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Gusa ili uangalie"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Hitilafu imetokea wakati wa kuhifadhi rekodi ya skrini"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Hitilafu imetokea wakati wa kuanza kurekodi skrini"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Utaacha kurekodi maudhui ya &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Acha kurekodi"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Inaruhusu ufikiaji kwenye skrini"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Ungependa kuacha kuonyesha skrini?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Utakomesha ufikiaji wa maudhui ya &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Acha kuonyesha skrini"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Inatuma skrini"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Ungependa kuacha kutuma?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Inatuma skrini"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Utaacha kutuma maudhui ya &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Acha kutuma maudhui"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Funga"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Kifaa cha Kurekodi Hitilafu"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Mchakato wa kurekodi hitilafu unaendelea"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Arifa inayoendelea kuhusu kipindi cha ukusanyaji wa data ya hitilafu"</string>
@@ -162,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Hitilafu imetokea wakati wa kuhifadhi rekodi ya hitilafu"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Hitilafu imetokea wakati wa kuanza kurekodi hitilafu"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Unatazama kwenye skrini nzima"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Telezesha kidole chini kutoka sehemu ya juu ya skrini yako ili ufunge"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"Nimeelewa"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Nyuma"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Nyumbani"</string>
@@ -196,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Imefunguliwa kwa kutumia uso wako. Bonyeza ili uendelee."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Uso umetambuliwa. Bonyeza ili uendelee."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Uso umetambuliwa. Bonyeza aikoni ya kufungua ili uendelee."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Imefunguliwa kwa kutumia uso wako. Gusa ili uendelee."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Umethibitishwa"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Ghairi Uthibitishaji"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Chaguo Zaidi"</string>
@@ -297,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Taswira ya skrini"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Usinisumbue"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Hakuna vifaa vilivyooanishwa vinavyopatikana"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Gusa ili uunganishe au utenganishe kifaa"</string>
@@ -308,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Imehifadhiwa"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"ondoa"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"anza kutumia"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Washa kesho kiotomatiki"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Vipengele kama vile Kutuma Haraka na Tafuta Kifaa Changu hutumia Bluetooth"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bluetooth itawaka kesho asubuhi"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Sikiliza pamoja na wengine"</string>
@@ -478,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Weka wijeti zingine"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Bonyeza kwa muda mrefu uweke mapendeleo ya wijeti"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Badilisha wijeti upendavyo"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Fungua ili ubadilishe wijeti upendavyo"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Aikoni ya programu ya wijeti iliyozimwa"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Aikoni ya programu ya wijeti inayowekwa"</string>
<string name="edit_widget" msgid="9030848101135393954">"Badilisha wijeti"</string>
@@ -498,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"chagua wijeti"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"ondoa wijeti"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"weka wijeti uliyochagua"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Wijeti zinazoonekana kwenye skrini iliyofungwa"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Utahitaji kuthibitisha kuwa ni wewe ili ufungue programu ukitumia wijeti. Pia, kumbuka kuwa mtu yeyote anaweza kuziona, hata kishikwambi chako kikiwa kimefungwa. Huenda baadhi ya wijeti hazikukusudiwa kutumika kwenye skrini yako iliyofungwa na huenda si salama kuziweka hapa."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"Nimeelewa"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Badili mtumiaji"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"menyu ya kuvuta chini"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Data na programu zote katika kipindi hiki zitafutwa."</string>
@@ -725,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Chaguomsingi"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Otomatiki"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Hakuna sauti wala mtetemo"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Hakuna sauti wala mtetemo na huonekana upande wa chini katika sehemu ya mazungumzo"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Huenda ikalia au kutetema kulingana na mipangilio ya kifaa"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Huenda ikalia au kutetema kulingana na mipangilio ya kifaa. Mazungumzo kutoka kiputo cha <xliff:g id="APP_NAME">%1$s</xliff:g> kwa chaguomsingi."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Ruhusu mfumo ubainishe iwapo arifa hii inapaswa kutoa sauti au mtetemo"</string>
@@ -782,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page Down"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Futa"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Mwanzo"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"Mwisho"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Ingiza"</string>
@@ -1364,20 +1374,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Gawa skrini"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Kifaa cha kuingiza data"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Njia za mikato za programu"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Ufikivu"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Mikato ya kibodi"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Njia mkato za kutafutia"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Kunja aikoni"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Panua aikoni"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"au"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Ishara ya kurudi nyuma"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Mguso wa kurudi kwenye skrini ya kwanza"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Kitufe cha vitendo"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Nimemaliza"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Kazi nzuri!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Rudi nyuma"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Ili kurudi nyuma, telezesha vidole vitatu kushoto au kulia mahali popote kwenye padi ya kugusa."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Padi ya kugusa inayoonyesha vidole vitatu vikisonga kulia na kushoto"</string>
@@ -1386,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Kiwango cha %1$d kati ya %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Dhibiti Vifaa Nyumbani"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Fikia haraka vidhibiti vya vifaa nyumbani vikiwa taswira ya skrini"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-sw/tiles_states_strings.xml b/packages/SystemUI/res/values-sw/tiles_states_strings.xml
index 15de7f88694c..b291f0dfee2c 100644
--- a/packages/SystemUI/res/values-sw/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-sw/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Kimezimwa"</item>
<item msgid="4875147066469902392">"Kimewashwa"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Hakipatikani"</item>
<item msgid="5044688398303285224">"Kimezimwa"</item>
diff --git a/packages/SystemUI/res/values-ta/strings.xml b/packages/SystemUI/res/values-ta/strings.xml
index 159c4c570bf5..315e19872986 100644
--- a/packages/SystemUI/res/values-ta/strings.xml
+++ b/packages/SystemUI/res/values-ta/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"இந்த ஸ்கிரீன்ஷாட்டை <xliff:g id="APPNAME">%1$s</xliff:g> கண்டறிந்துள்ளது."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"இந்த ஸ்கிரீன்ஷாட்டை <xliff:g id="APPNAME">%1$s</xliff:g> மற்றும் திறந்திருக்கும் பிற ஆப்ஸ் கண்டறிந்துள்ளன."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"குறிப்பில் சேர்"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"இணைப்பைச் சேர்"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"ஸ்கிரீன் ரெக்கார்டர்"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"ஸ்க்ரீன் ரெக்கார்டிங் செயலாக்கப்படுகிறது"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"திரை ரெக்கார்டிங் அமர்விற்கான தொடர் அறிவிப்பு"</string>
@@ -127,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"பார்க்கத் தட்டவும்"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"ஸ்கிரீன் ரெக்கார்டிங்கைச் சேமிப்பதில் பிழை ஏற்பட்டது"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"ஸ்கிரீன் ரெக்கார்டிங்கைத் தொடங்குவதில் பிழை"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; ஆப்ஸை ரெக்கார்டு செய்வதை நிறுத்துவீர்கள்"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"ரெக்கார்டிங்கை நிறுத்து"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"திரையைப் பகிர்கிறது"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"திரையைப் பகிர்வதை நிறுத்தவா?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; ஆப்ஸைப் பகிர்வதை நிறுத்துவீர்கள்"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"பகிர்வதை நிறுத்து"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"திரையை அலைபரப்புகிறது"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"அலைபரப்பை நிறுத்தவா?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"திரையை அலைபரப்புகிறது"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; ஆப்ஸை அலைபரப்புவதை நிறுத்துவீர்கள்"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"அலைபரப்புவதை நிறுத்து"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"மூடு"</string>
<string name="issuerecord_title" msgid="286627115110121849">"சிக்கல் ரெக்கார்டர்"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"சிக்கல் ரெக்கார்டிங்கைச் செயலாக்குகிறது"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"சிக்கல் சேகரிப்பு அமர்வுக்கான பின்னணிச் செயல்பாட்டின் அறிவிப்பு"</string>
@@ -162,13 +170,12 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"சிக்கல் தொடர்பான ரெக்கார்டிங்கைச் சேமிப்பதில் பிழை ஏற்பட்டது"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"சிக்கலை ரெக்கார்டிங் செய்யத் தொடங்குவதில் பிழை ஏற்பட்டது"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"முழுத் திரையில் காட்டுகிறது"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"வெளியேற, உங்கள் திரையின் மேலிருந்து கீழ்நோக்கி ஸ்வைப் செய்யவும்"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"சரி"</string>
<string name="accessibility_back" msgid="6530104400086152611">"பின்செல்"</string>
<string name="accessibility_home" msgid="5430449841237966217">"முகப்பு"</string>
<string name="accessibility_menu" msgid="2701163794470513040">"மெனு"</string>
- <string name="accessibility_accessibility_button" msgid="4089042473497107709">"அணுகல்தன்மை"</string>
+ <string name="accessibility_accessibility_button" msgid="4089042473497107709">"மாற்றுத்திறன் வசதி"</string>
<string name="accessibility_rotate_button" msgid="1238584767612362586">"திரையைச் சுழற்று"</string>
<string name="accessibility_recent" msgid="901641734769533575">"மேலோட்டப் பார்வை"</string>
<string name="accessibility_camera_button" msgid="2938898391716647247">"கேமரா"</string>
@@ -196,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"முகம் மூலம் அன்லாக் செய்யப்பட்டது. தொடர அழுத்தவும்."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"முகம் அங்கீகரிக்கப்பட்டது. தொடர அழுத்தவும்."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"முகம் அங்கீகரிக்கப்பட்டது. தொடர அன்லாக் ஐகானை அழுத்தவும்."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"முகம் கொண்டு அன்லாக் செய்யப்பட்டது. தொடர தட்டவும்."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"அங்கீகரிக்கப்பட்டது"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"அங்கீகரிப்பை ரத்துசெய்"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"கூடுதல் விருப்பங்கள்"</string>
@@ -297,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"ஸ்கிரீன் சேவர்"</string>
<string name="ethernet_label" msgid="2203544727007463351">"ஈதர்நெட்"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"தொந்தரவு செய்ய வேண்டாம்"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"புளூடூத்"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"இணைக்கப்பட்ட சாதனங்கள் இல்லை"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"சாதனத்தை இணைக்க/துண்டிக்க தட்டவும்"</string>
@@ -308,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"சேமிக்கப்பட்டது"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"இணைப்பு நீக்கும்"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"செயல்படுத்தும்"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"தானாகவே நாளை இயக்கப்படும்"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"விரைவுப் பகிர்தல், Find My Device போன்ற அம்சங்கள் புளூடூத்தைப் பயன்படுத்துகின்றன"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"நாளை காலை புளூடூத் இயக்கப்படும்"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"ஆடியோவைப் பகிர்"</string>
@@ -478,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"கூடுதல் விட்ஜெட்களைச் சேருங்கள்"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"விட்ஜெட்களைப் பிரத்தியேகமாக்க நீண்ட நேரம் அழுத்துக"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"விட்ஜெட்களைப் பிரத்தியேகமாக்குங்கள்"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"விட்ஜெட்களைப் பிரத்தியேகப்படுத்த அன்லாக் செய்யுங்கள்"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"முடக்கப்பட்ட விட்ஜெட்டுக்கான ஆப்ஸ் ஐகான்"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"நிறுவப்படும் விட்ஜெட்டுக்கான ஆப்ஸ் ஐகான்"</string>
<string name="edit_widget" msgid="9030848101135393954">"விட்ஜெட்டைத் திருத்து"</string>
@@ -498,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"விட்ஜெட்டைத் தேர்ந்தெடுக்கும்"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"விட்ஜெட்டை அகற்றும்"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"தேர்ந்தெடுத்த விட்ஜெட்டைக் காட்சிப்படுத்தும்"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"பூட்டுத் திரை விட்ஜெட்கள்"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"விட்ஜெட்டைப் பயன்படுத்தி ஆப்ஸைத் திறக்க, அது நீங்கள்தான் என்பதை உறுதிசெய்ய வேண்டும். அத்துடன், உங்கள் டேப்லெட் பூட்டப்பட்டிருந்தாலும்கூட அவற்றை யார் வேண்டுமானாலும் பார்க்கலாம் என்பதை நினைவில்கொள்ளுங்கள். சில விட்ஜெட்கள் உங்கள் பூட்டுத் திரைக்காக உருவாக்கப்பட்டவை அல்ல என்பதையும் அவற்றை இங்கே சேர்ப்பது பாதுகாப்பற்றதாக இருக்கக்கூடும் என்பதையும் நினைவில்கொள்ளுங்கள்."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"சரி"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"பயனரை மாற்று"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"கீழ் இழுக்கும் மெனு"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"இந்த அமர்வின் எல்லா ஆப்ஸும் தரவும் நீக்கப்படும்."</string>
@@ -644,7 +651,7 @@
<string name="stream_notification" msgid="7930294049046243939">"அறிவிப்பு"</string>
<string name="stream_bluetooth_sco" msgid="6234562365528664331">"புளூடூத்"</string>
<string name="stream_dtmf" msgid="7322536356554673067">"டூயல் டோன் மல்டி ஃப்ரீக்வென்சி"</string>
- <string name="stream_accessibility" msgid="3873610336741987152">"அணுகல்தன்மை"</string>
+ <string name="stream_accessibility" msgid="3873610336741987152">"மாற்றுத்திறன் வசதி"</string>
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"ஒலி"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"அதிர்வு"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"அமைதி"</string>
@@ -725,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"இயல்புநிலை"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"தானியங்கு"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"ஒலி / அதிர்வு இல்லை"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"ஒலி / அதிர்வு இல்லாமல் உரையாடல் பிரிவின் கீழ்ப் பகுதியில் தோன்றும்"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"சாதன அமைப்புகளைப் பொறுத்து ஒலிக்கக்கூடும் அல்லது அதிர்வடையக்கூடும்"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"சாதன அமைப்புகளைப் பொறுத்து ஒலிக்கக்கூடும் அல்லது அதிர்வடையக்கூடும். இயல்பாக, <xliff:g id="APP_NAME">%1$s</xliff:g> ஆப்ஸில் பெறப்படும் உரையாடல் அறிவிப்புகள் குமிழ்களாகத் தோன்றும்."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"இந்த அறிவிப்பு ஒலி எழுப்ப வேண்டுமா அதிர வேண்டுமா என்பதை சிஸ்டம் தீர்மானிக்கும்"</string>
@@ -782,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"பேஜ் அப்"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"பேஜ் டவுன்"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"டெலிட்"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"ஹோம்"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"என்ட்"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"இன்சர்ட்"</string>
@@ -950,7 +960,7 @@
<string name="notification_channel_setup" msgid="7660580986090760350">"அமைவு"</string>
<string name="notification_channel_storage" msgid="2720725707628094977">"சேமிப்பிடம்"</string>
<string name="notification_channel_hints" msgid="7703783206000346876">"குறிப்புகள்"</string>
- <string name="notification_channel_accessibility" msgid="8956203986976245820">"அணுகல்தன்மை"</string>
+ <string name="notification_channel_accessibility" msgid="8956203986976245820">"மாற்றுத்திறன் வசதி"</string>
<string name="instant_apps" msgid="8337185853050247304">"Instant Apps"</string>
<string name="instant_apps_title" msgid="8942706782103036910">"<xliff:g id="APP">%1$s</xliff:g> இயங்குகிறது"</string>
<string name="instant_apps_message" msgid="6112428971833011754">"நிறுவ வேண்டிய தேவையில்லாமல் ஆப்ஸ் திறக்கப்பட்டது."</string>
@@ -1364,20 +1374,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"திரைப் பிரிப்பு"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"உள்ளீடு"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"ஆப்ஸ் ஷார்ட்கட்கள்"</string>
- <string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"அணுகல்தன்மை"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
+ <string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"மாற்றுத்திறன் வசதி"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"கீபோர்டு ஷார்ட்கட்கள்"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"தேடல் ஷார்ட்கட்கள்"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"சுருக்குவதற்கான ஐகான்"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"விரிவாக்குவதற்கான ஐகான்"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"அல்லது"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"பின்செல்வதற்கான சைகை"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"முகப்பிற்குச் செல்வதற்கான சைகை"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"ஆக்ஷன் பட்டன்"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"முடிந்தது"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"அருமை!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"பின்செல்"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"பின்செல்ல, உங்கள் டச்பேடில் எங்கு வேண்டுமானாலும் இடது அல்லது வலதுபுறமாக மூன்று விரல்களால் ஸ்வைப் செய்யவும்."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"மூன்று விரல்கள் வலது மற்றும் இடதுபுறம் நகர்வதை டச்பேட் காட்டுகிறது"</string>
@@ -1386,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"நிலை, %2$d இல் %1$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"ஹோம் கன்ட்ரோல்கள்"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"ஹோம் கன்ட்ரோல்களை ஸ்கிரீன் சேவராக அணுகலாம்"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-ta/tiles_states_strings.xml b/packages/SystemUI/res/values-ta/tiles_states_strings.xml
index a3b9538f891c..a180f4907a18 100644
--- a/packages/SystemUI/res/values-ta/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-ta/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"முடக்கப்பட்டுள்ளது"</item>
<item msgid="4875147066469902392">"இயக்கப்பட்டுள்ளது"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"கிடைக்கவில்லை"</item>
<item msgid="5044688398303285224">"முடக்கப்பட்டுள்ளது"</item>
diff --git a/packages/SystemUI/res/values-te/strings.xml b/packages/SystemUI/res/values-te/strings.xml
index 6a91bca56717..87e205bfec16 100644
--- a/packages/SystemUI/res/values-te/strings.xml
+++ b/packages/SystemUI/res/values-te/strings.xml
@@ -126,31 +126,27 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"చూడటానికి ట్యాప్ చేయండి"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"స్క్రీన్ రికార్డింగ్‌ను సేవ్ చేయడంలో ఎర్రర్ ఏర్పడింది"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"స్క్రీన్ రికార్డింగ్ ప్రారంభించడంలో ఎర్రర్ ఏర్పడింది"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
- <skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
- <skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"మీరు &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;ను రికార్డ్ చేయడం ఆపివేస్తారు"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
- <skip />
+ <string name="screenrecord_stop_dialog_title" msgid="8716193661764511095">"రికార్డింగ్‌ను ఆపివేయాలా?"</string>
+ <string name="screenrecord_stop_dialog_message" msgid="6262768207331626817">"మీరు ప్రస్తుతం మీ మొత్తం స్క్రీన్‌ను రికార్డ్ చేస్తున్నారు"</string>
+ <string name="screenrecord_stop_dialog_message_specific_app" msgid="5995770227684523244">"మీరు ప్రస్తుతం <xliff:g id="APP_NAME">%1$s</xliff:g>‌ను రికార్డ్ చేస్తున్నారు"</string>
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"రికార్డింగ్‌ను ఆపివేయండి"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"స్క్రీన్‌ను షేర్ చేస్తోంది"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
- <skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
- <skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"మీరు &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;ను షేర్ చేయడం ఆపివేస్తారు"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
- <skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"స్క్రీన్‌ను ప్రసారం చేస్తోంది"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
- <skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
- <skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"మీరు &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;ను ప్రసారం చేయడం ఆపివేస్తారు"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
- <skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
- <skip />
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"స్క్రీన్‌ను షేర్ చేయడం ఆపివేయాలా?"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen_with_host_app" msgid="522823522115375414">"మీరు ప్రస్తుతం మీ మొత్తం స్క్రీన్‌ను <xliff:g id="HOST_APP_NAME">%1$s</xliff:g>‌తో షేర్ చేస్తున్నారు"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen" msgid="5090115386271179270">"మీరు ప్రస్తుతం మీ మొత్తం స్క్రీన్‌ను యాప్‌తో షేర్ చేస్తున్నారు"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_specific" msgid="5923772039347985172">"మీరు ప్రస్తుతం <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g>‌ను షేర్ చేస్తున్నారు"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_generic" msgid="6681016774654578261">"మీరు ప్రస్తుతం యాప్‌ను షేర్ చేస్తున్నారు"</string>
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"షేర్ చేయడాన్ని ఆపివేయండి"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"స్క్రీన్‌ను ప్రసారం చేస్తోంది"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"ప్రసారం చేయడం ఆపివేయాలా?"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen_with_device" msgid="1474703115926205251">"మీరు ప్రస్తుతం మీ స్క్రీన్ మొత్తాన్ని <xliff:g id="DEVICE_NAME">%1$s</xliff:g>‌కు ప్రసారం చేస్తున్నారు"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen" msgid="8419219169553867625">"మీరు ప్రస్తుతం మీ స్క్రీన్ మొత్తాన్ని సమీపంలోని పరికరానికి ప్రసారం చేస్తున్నారు"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app_with_device" msgid="2715934698604085519">"మీరు ప్రస్తుతం <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g>‌ను <xliff:g id="DEVICE_NAME">%2$s</xliff:g>‌కు ప్రసారం చేస్తున్నారు"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="8616103075630934513">"మీరు ప్రస్తుతం <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g>‌ను సమీపంలోని పరికరానికి ప్రసారం చేస్తున్నారు"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic_with_device" msgid="9213582497852420203">"మీరు ప్రస్తుతం <xliff:g id="DEVICE_NAME">%1$s</xliff:g>‌కు ప్రసారం చేస్తున్నారు"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic" msgid="4100272100480415076">"మీరు ప్రస్తుతం సమీపంలోని పరికరానికి ప్రసారం చేస్తున్నారు"</string>
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"ప్రసారాన్ని ఆపివేయండి"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"మూసివేయండి"</string>
<string name="issuerecord_title" msgid="286627115110121849">"సమస్య రికార్డర్"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"సమస్య రికార్డింగ్ ప్రాసెసింగ్"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"సమస్య సేకరణ సెషన్ కోసం కొనసాగుతోన్న నోటిఫికేషన్"</string>
@@ -161,8 +157,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"సమస్య రికార్డింగ్‌ను సేవ్ చేయడంలో ఎర్రర్ ఏర్పడింది"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"సమస్య రికార్డింగ్‌ను ప్రారంభించడంలో ఎర్రర్ ఏర్పడింది"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"ఫుల్ స్క్రీన్‌లో చూస్తున్నారు"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"ఎగ్జిట్ అవ్వడానికి, మీ స్క్రీన్ పై నుండి కిందికి స్వైప్ చేయండి"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"సరే"</string>
<string name="accessibility_back" msgid="6530104400086152611">"వెనుకకు"</string>
<string name="accessibility_home" msgid="5430449841237966217">"హోమ్"</string>
@@ -295,6 +290,8 @@
<string name="start_dreams" msgid="9131802557946276718">"స్క్రీన్ సేవర్"</string>
<string name="ethernet_label" msgid="2203544727007463351">"ఈథర్‌నెట్"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"అంతరాయం కలిగించవద్దు"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"బ్లూటూత్"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"జత చేసిన పరికరాలు ఏవీ అందుబాటులో లేవు"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"పరికరాన్ని కనెక్ట్ చేయడానికి లేదా డిస్‌కనెక్ట్ చేయడానికి ట్యాప్ చేయండి"</string>
@@ -306,8 +303,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"సేవ్ అయ్యింది"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"డిస్‌కనెక్ట్ చేయండి"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"యాక్టివేట్ చేయండి"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"రేపు ఆటోమేటిక్‌గా ఆన్ చేస్తుంది"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"క్విక్ షేర్, Find My Device వంటి ఫీచర్‌లు బ్లూటూత్‌ను ఉపయోగిస్తాయి"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"బ్లూటూత్ రేపు ఉదయం ఆన్ అవుతుంది"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"ఆడియోను షేర్ చేయండి"</string>
@@ -476,8 +472,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"మరిన్ని విడ్జెట్‌లను జోడించండి"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"విడ్జెట్‌లను అనుకూలీకరించడానికి, నొక్కి, ఉంచండి"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"విడ్జెట్‌లను అనుకూలంగా మార్చండి"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"విడ్జెట్‌లను అనుకూలంగా మార్చుకోవడానికి అన్‌లాక్ చేయండి"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"డిజేబుల్ చేయబడిన విడ్జెట్ కోసం యాప్ చిహ్నం"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"ఇన్‌స్టాల్ చేస్తున్న విడ్జెట్ కోసం యాప్ చిహ్నం"</string>
<string name="edit_widget" msgid="9030848101135393954">"విడ్జెట్‌ను ఎడిట్ చేయండి"</string>
@@ -496,12 +491,11 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"విడ్జెట్‌ను ఎంచుకోండి"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"విడ్జెట్‌ను తీసివేయండి"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"ఎంచుకున్న విడ్జెట్ కోసం ప్లేస్‌ను ఎంచుకోండి"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
- <skip />
+ <string name="communal_widget_picker_title" msgid="1953369090475731663">"లాక్ స్క్రీన్ విడ్జెట్‌లు"</string>
+ <string name="communal_widget_picker_description" msgid="490515450110487871">"మీ టాబ్లెట్ లాక్ చేసి ఉన్నా, మీ లాక్ స్క్రీన్‌లో విడ్జెట్‌లను ఎవరైనా చూడవచ్చు."</string>
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"లాక్ స్క్రీన్ విడ్జెట్‌లు"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"విడ్జెట్‌ను ఉపయోగించి యాప్‌ను తెరవడానికి, ఇది మీరేనని వెరిఫై చేయాల్సి ఉంటుంది. అలాగే, మీ టాబ్లెట్ లాక్ చేసి ఉన్నప్పటికీ, ఎవరైనా వాటిని చూడగలరని గుర్తుంచుకోండి. కొన్ని విడ్జెట్‌లు మీ లాక్ స్క్రీన్‌కు తగినవి కాకపోవచ్చు, వాటిని ఇక్కడ జోడించడం సురక్షితం కాకపోవచ్చు."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"అర్థమైంది"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"వినియోగదారుని మార్చు"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"పుల్‌డౌన్ మెనూ"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"ఈ సెషన్‌లోని అన్ని యాప్‌లు మరియు డేటా తొలగించబడతాయి."</string>
@@ -723,7 +717,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"ఆటోమేటిక్ సెట్టింగ్"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"ఆటోమేటిక్"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"సౌండ్ లేదా వైబ్రేషన్‌లు ఏవీ ఉండవు"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"శబ్దం లేదా వైబ్రేషన్ లేదు, సంభాషణ విభాగం దిగువన కనిపిస్తుంది"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"పరికర సెట్టింగ్‌ల ఆధారంగా రింగ్ లేదా వైబ్రేట్ కావచ్చు"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"పరికర సెట్టింగ్‌ల ఆధారంగా రింగ్ లేదా వైబ్రేట్ కావచ్చు. <xliff:g id="APP_NAME">%1$s</xliff:g> నుండి సంభాషణలు ఆటోమేటిక్‌గా బబుల్‌లో కనిపిస్తాయి."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"ఈ నోటిఫికేషన్ వచ్చినప్పుడు శబ్దం చేయాలా లేదా వైబ్రేట్ చేయాలా అనేది నిర్ణయించడానికి సిస్టమ్‌కు అనుమతి ఇవ్వండి"</string>
@@ -780,6 +775,7 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page Down"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Delete"</string>
+ <string name="keyboard_key_esc" msgid="6230365950511411322">"Esc"</string>
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1362,20 +1358,18 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"స్ప్లిట్ స్క్రీన్"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"ఇన్‌పుట్"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"యాప్ షార్ట్‌కట్‌లు"</string>
+ <string name="shortcut_helper_category_current_app_shortcuts" msgid="4017840565974573628">"ప్రస్తుత యాప్"</string>
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"యాక్సెసిబిలిటీ"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"కీబోర్డ్ షార్ట్‌కట్‌లు"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"సెర్చ్ షార్ట్‌కట్‌లు"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"కుదించండి చిహ్నం"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"విస్తరించండి చిహ్నం"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"లేదా"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"వెనుకకు పంపే సంజ్ఞ"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"హోమ్‌కు పంపే సంజ్ఞ"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"యాక్షన్ కీ"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"పూర్తయింది"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"విజయవంతమైంది!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"వెనుకకు"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"వెనుకకు వెళ్లడానికి, టచ్‌ప్యాడ్‌లో ఎక్కడైనా మూడు వేళ్లను ఉపయోగించి ఎడమ లేదా కుడికి స్వైప్ చేయండి."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"మూడు వేళ్లు కుడి, ఎడమకు కదులుతున్నట్లు చూపే టచ్‌ప్యాడ్"</string>
@@ -1384,4 +1378,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"%2$dలో %1$dవ స్థాయి"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"హోమ్ కంట్రోల్స్"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"హోమ్ కంట్రోల్స్‌ను స్క్రీన్ సేవర్‌గా చేసి వేగంగా యాక్సెస్ పొందండి"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-te/tiles_states_strings.xml b/packages/SystemUI/res/values-te/tiles_states_strings.xml
index 6584cdd59282..609a846cd936 100644
--- a/packages/SystemUI/res/values-te/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-te/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"ఆఫ్‌లో ఉంది"</item>
<item msgid="4875147066469902392">"ఆన్‌లో ఉంది"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"అందుబాటులో లేదు"</item>
<item msgid="5044688398303285224">"ఆఫ్‌లో ఉంది"</item>
diff --git a/packages/SystemUI/res/values-th/strings.xml b/packages/SystemUI/res/values-th/strings.xml
index c868b66718e5..6449dd85056f 100644
--- a/packages/SystemUI/res/values-th/strings.xml
+++ b/packages/SystemUI/res/values-th/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> ตรวจพบภาพหน้าจอนี้"</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> และแอปอื่นๆ ที่เปิดอยู่ตรวจพบภาพหน้าจอนี้"</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"เพิ่มลงในโน้ต"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"รวมลิงก์"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"โปรแกรมบันทึกหน้าจอ"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"กำลังประมวลผลการอัดหน้าจอ"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"การแจ้งเตือนต่อเนื่องสำหรับเซสชันการบันทึกหน้าจอ"</string>
@@ -127,31 +126,27 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"แตะเพื่อดู"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"เกิดข้อผิดพลาดในการบันทึกหน้าจอ"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"เกิดข้อผิดพลาดขณะเริ่มบันทึกหน้าจอ"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
- <skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
- <skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"คุณจะหยุดการบันทึก &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
- <skip />
+ <string name="screenrecord_stop_dialog_title" msgid="8716193661764511095">"หยุดบันทึกใช่ไหม"</string>
+ <string name="screenrecord_stop_dialog_message" msgid="6262768207331626817">"คุณกำลังบันทึกทั้งหน้าจอ"</string>
+ <string name="screenrecord_stop_dialog_message_specific_app" msgid="5995770227684523244">"คุณกำลังบันทึก <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"หยุดบันทึก"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"กำลังแชร์หน้าจอ"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
- <skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
- <skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"คุณจะหยุดการแชร์ &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
- <skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"กำลังแคสต์หน้าจอ"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
- <skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
- <skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"คุณจะหยุดการแคสต์ &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
- <skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
- <skip />
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"หยุดแชร์หน้าจอไหม"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen_with_host_app" msgid="522823522115375414">"คุณกำลังแชร์ทั้งหน้าจอกับ <xliff:g id="HOST_APP_NAME">%1$s</xliff:g>"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen" msgid="5090115386271179270">"คุณกำลังแชร์ทั้งหน้าจอกับแอป"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_specific" msgid="5923772039347985172">"คุณกำลังแชร์ <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g>"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_generic" msgid="6681016774654578261">"คุณกำลังแชร์แอป"</string>
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"หยุดแชร์"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"กำลังแคสต์หน้าจอ"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"หยุดการแคสต์ไหม"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen_with_device" msgid="1474703115926205251">"คุณกำลังแคสต์ทั้งหน้าจอไปยัง <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen" msgid="8419219169553867625">"คุณกำลังแคสต์ทั้งหน้าจอไปยังอุปกรณ์ที่อยู่ใกล้เคียง"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app_with_device" msgid="2715934698604085519">"คุณกำลังแคสต์ <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> ไปยัง <xliff:g id="DEVICE_NAME">%2$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="8616103075630934513">"คุณกำลังแคสต์ <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> ไปยังอุปกรณ์ที่อยู่ใกล้เคียง"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic_with_device" msgid="9213582497852420203">"คุณกำลังแคสต์ไปยัง <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic" msgid="4100272100480415076">"คุณกำลังแคสต์ไปยังอุปกรณ์ที่อยู่ใกล้เคียง"</string>
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"หยุดแคสต์"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"ปิด"</string>
<string name="issuerecord_title" msgid="286627115110121849">"โปรแกรมบันทึกปัญหา"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"กำลังประมวลผลการบันทึกปัญหา"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"การแจ้งเตือนต่อเนื่องสำหรับเซสชันการรวบรวมปัญหา"</string>
@@ -162,8 +157,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"เกิดข้อผิดพลาดในการบันทึกไฟล์บันทึกปัญหา"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"เกิดข้อผิดพลาดในการเริ่มบันทึกปัญหา"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"กำลังดูแบบเต็มหน้าจอ"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"หากต้องการออก ให้ปัดลงจากด้านบนของหน้าจอ"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"รับทราบ"</string>
<string name="accessibility_back" msgid="6530104400086152611">"กลับ"</string>
<string name="accessibility_home" msgid="5430449841237966217">"หน้าแรก"</string>
@@ -196,8 +190,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"ปลดล็อกด้วยใบหน้าแล้ว กดเพื่อดำเนินการต่อ"</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"จดจำใบหน้าได้ กดเพื่อดำเนินการต่อ"</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"จดจำใบหน้าได้ กดไอคอนปลดล็อกเพื่อดำเนินการต่อ"</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"ปลดล็อกด้วยใบหน้าแล้ว แตะเพื่อดำเนินการต่อ"</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"ตรวจสอบสิทธิ์แล้ว"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"ยกเลิกการตรวจสอบสิทธิ์"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"ตัวเลือกเพิ่มเติม"</string>
@@ -297,6 +290,7 @@
<string name="start_dreams" msgid="9131802557946276718">"ภาพพักหน้าจอ"</string>
<string name="ethernet_label" msgid="2203544727007463351">"อีเทอร์เน็ต"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"ห้ามรบกวน"</string>
+ <string name="quick_settings_modes_label" msgid="5407025818652750501">"โหมดสำคัญ"</string>
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"บลูทูธ"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"ไม่มีอุปกรณ์ที่จับคู่ที่สามารถใช้ได้"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"แตะเพื่อเชื่อมต่อหรือยกเลิกการเชื่อมต่ออุปกรณ์"</string>
@@ -308,8 +302,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"บันทึกแล้ว"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"ยกเลิกการเชื่อมต่อ"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"เปิดใช้งาน"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"เปิดอัตโนมัติในวันพรุ่งนี้"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"ฟีเจอร์ต่างๆ เช่น Quick Share และ \"หาอุปกรณ์ของฉัน\" ใช้บลูทูธ"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"บลูทูธจะเปิดพรุ่งนี้เช้า"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"แชร์เสียง"</string>
@@ -478,8 +471,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"เพิ่มวิดเจ็ตอีก"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"กดค้างเพื่อปรับแต่งวิดเจ็ต"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"ปรับแต่งวิดเจ็ต"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"ปลดล็อกเพื่อปรับแต่งวิดเจ็ต"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"ไอคอนแอปสำหรับวิดเจ็ตที่ปิดใช้อยู่"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"ไอคอนแอปสำหรับวิดเจ็ตที่กำลังติดตั้ง"</string>
<string name="edit_widget" msgid="9030848101135393954">"แก้ไขวิดเจ็ต"</string>
@@ -498,12 +490,11 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"เลือกวิดเจ็ต"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"นำวิดเจ็ตออก"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"จัดวางวิดเจ็ตที่เลือก"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
- <skip />
+ <string name="communal_widget_picker_title" msgid="1953369090475731663">"วิดเจ็ตในหน้าจอล็อก"</string>
+ <string name="communal_widget_picker_description" msgid="490515450110487871">"ทุกคนจะดูวิดเจ็ตที่อยู่ในหน้าจอล็อกของคุณได้ แม้ว่าแท็บเล็ตจะล็อกอยู่ก็ตาม"</string>
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"วิดเจ็ตในหน้าจอล็อก"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"หากต้องการเปิดแอปโดยใช้วิดเจ็ต คุณจะต้องยืนยันตัวตนของคุณ นอกจากนี้ โปรดทราบว่าผู้อื่นจะดูวิดเจ็ตเหล่านี้ได้แม้ว่าแท็บเล็ตจะล็อกอยู่ก็ตาม วิดเจ็ตบางอย่างอาจไม่ได้มีไว้สำหรับหน้าจอล็อกของคุณ และอาจไม่ปลอดภัยที่จะเพิ่มที่นี่"</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"รับทราบ"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"สลับผู้ใช้"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"เมนูแบบเลื่อนลง"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"ระบบจะลบแอปและข้อมูลทั้งหมดในเซสชันนี้"</string>
@@ -725,7 +716,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"ค่าเริ่มต้น"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"อัตโนมัติ"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"ไม่มีเสียงหรือการสั่น"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"ไม่มีเสียงหรือการสั่น และปรากฏต่ำลงมาในส่วนการสนทนา"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"อาจส่งเสียงหรือสั่นโดยขึ้นอยู่กับการตั้งค่าอุปกรณ์"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"อาจส่งเสียงหรือสั่นโดยขึ้นอยู่กับการตั้งค่าอุปกรณ์ การสนทนาจาก <xliff:g id="APP_NAME">%1$s</xliff:g> จะแสดงเป็นบับเบิลโดยค่าเริ่มต้น"</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"ให้ระบบพิจารณาว่าจะให้การแจ้งเตือนนี้ส่งเสียงหรือสั่นหรือไม่"</string>
@@ -782,6 +774,7 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"เลื่อนหน้าขึ้น"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"เลื่อนหน้าลง"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"ลบ"</string>
+ <string name="keyboard_key_esc" msgid="6230365950511411322">"Esc"</string>
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"แทรก"</string>
@@ -1364,20 +1357,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"แยกหน้าจอ"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"อินพุต"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"แป้นพิมพ์ลัดของแอป"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"การช่วยเหลือพิเศษ"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"แป้นพิมพ์ลัด"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"ค้นหาแป้นพิมพ์ลัด"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"ไอคอนยุบ"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"ไอคอนขยาย"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"หรือ"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"ท่าทางสัมผัสสำหรับย้อนกลับ"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"ท่าทางสัมผัสสำหรับหน้าแรก"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"ปุ่มดำเนินการ"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"เสร็จสิ้น"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"เก่งมาก"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"ย้อนกลับ"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"หากต้องการย้อนกลับ ให้ใช้ 3 นิ้วปัดไปทางซ้ายหรือขวาที่ใดก็ได้บนทัชแพด"</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"ทัชแพดแสดงภาพ 3 นิ้วเลื่อนไปทางขวาและซ้าย"</string>
@@ -1386,4 +1378,5 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"ระดับที่ %1$d จาก %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"ระบบควบคุมอุปกรณ์สมาร์ทโฮม"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"เข้าถึงระบบควบคุมอุปกรณ์สมาร์ทโฮมได้อย่างรวดเร็วผ่านภาพพักหน้าจอ"</string>
+ <string name="volume_undo_action" msgid="5815519725211877114">"เลิกทำ"</string>
</resources>
diff --git a/packages/SystemUI/res/values-th/tiles_states_strings.xml b/packages/SystemUI/res/values-th/tiles_states_strings.xml
index 8b7187b66baa..20f66da1bfe0 100644
--- a/packages/SystemUI/res/values-th/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-th/tiles_states_strings.xml
@@ -56,6 +56,11 @@
<item msgid="5376619709702103243">"ปิด"</item>
<item msgid="4875147066469902392">"เปิด"</item>
</string-array>
+ <string-array name="tile_states_modes">
+ <item msgid="7764936419245199023">"ไม่พร้อมใช้งาน"</item>
+ <item msgid="2004750556637773692">"ปิด"</item>
+ <item msgid="8968530753931637871">"เปิด"</item>
+ </string-array>
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"ไม่พร้อมใช้งาน"</item>
<item msgid="5044688398303285224">"ปิด"</item>
diff --git a/packages/SystemUI/res/values-tl/strings.xml b/packages/SystemUI/res/values-tl/strings.xml
index 005211d6a6ce..e52ebccf58fb 100644
--- a/packages/SystemUI/res/values-tl/strings.xml
+++ b/packages/SystemUI/res/values-tl/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"Na-detect ng <xliff:g id="APPNAME">%1$s</xliff:g> ang screenshot. na ito"</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"Na-detect ng <xliff:g id="APPNAME">%1$s</xliff:g> at ng iba pang bukas na app ang screenshot na ito."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Idagdag sa tala"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Isama ang link"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Recorder ng Screen"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Pinoproseso screen recording"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Kasalukuyang notification para sa session ng pag-record ng screen"</string>
@@ -127,31 +126,27 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"I-tap para tingnan"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Nagka-error sa pag-save ng recording ng screen"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Nagkaroon ng error sa pagsisimula ng pag-record ng screen"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
- <skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
- <skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Hihinto ka sa pag-record ng &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
- <skip />
+ <string name="screenrecord_stop_dialog_title" msgid="8716193661764511095">"Ihinto ang pag-record?"</string>
+ <string name="screenrecord_stop_dialog_message" msgid="6262768207331626817">"Kasalukuyan mong nire-record ang iyong buong screen"</string>
+ <string name="screenrecord_stop_dialog_message_specific_app" msgid="5995770227684523244">"Kasalukuyan mong nire-record ang <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Huminto sa pag-record"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Ibinabahagi ang screen"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
- <skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
- <skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Hihinto ka sa pagbabahagi ng &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
- <skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Kina-cast ang screen"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
- <skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
- <skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Hihinto ka sa pag-cast ng &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
- <skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
- <skip />
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Ihinto ang pagbabahagi ng screen?"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen_with_host_app" msgid="522823522115375414">"Kasalukuyan mong ibinabahagi ang iyong buong screen sa <xliff:g id="HOST_APP_NAME">%1$s</xliff:g>"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen" msgid="5090115386271179270">"Kasalukuyan mong ibinabahagi ang iyong buong screen sa isang app"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_specific" msgid="5923772039347985172">"Kasalukuyan kang nagbabahagi ng <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g>"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_generic" msgid="6681016774654578261">"Kasalukuyan kang nagbabahagi ng app"</string>
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Ihinto ang pagbabahagi"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Kina-cast ang screen"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Ihinto ang pag-cast?"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen_with_device" msgid="1474703115926205251">"Kasalukuyan mong kina-cast ang iyong buong screen sa <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen" msgid="8419219169553867625">"Kasalukuyan mong kina-cast ang iyong buong screen sa isang kalapit na device"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app_with_device" msgid="2715934698604085519">"Kasalukuyan kang nagka-cast ng <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> sa <xliff:g id="DEVICE_NAME">%2$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="8616103075630934513">"Kasalukuyan kang nagka-cast ng <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> sa isang kalapit na device"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic_with_device" msgid="9213582497852420203">"Kasalukuyan kang nagka-cast sa <xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic" msgid="4100272100480415076">"Kasalukuyan kang nagka-cast sa isang kalapit na device"</string>
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Ihinto ang pag-cast"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Isara"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Recorder ng Isyu"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Pinoproseso: recording ng isyu"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Kasalukuyang notification para sa session ng pangongolekta ng isyu"</string>
@@ -162,8 +157,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Nagkaroon ng error sa pag-save ng recording ng isyu"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Nagkaroon ng error sa pagsisimula ng pag-record ng isyu"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Nanonood sa full screen"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Para lumabas, mag-swipe pababa mula sa itaas ng iyong screen"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"OK"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Bumalik"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Home"</string>
@@ -196,8 +190,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Na-unlock gamit ang mukha. Pindutin para magpatuloy."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Nakilala ang mukha. Pindutin para magpatuloy."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Nakilala ang mukha. Pindutin ang unlock para magpatuloy."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Na-unlock gamit ang mukha. I-tap para magpatuloy."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Na-authenticate"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Kanselahin ang Pag-authenticate"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Higit Pang Opsyon"</string>
@@ -297,6 +290,7 @@
<string name="start_dreams" msgid="9131802557946276718">"Screen saver"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Huwag Istorbohin"</string>
+ <string name="quick_settings_modes_label" msgid="5407025818652750501">"Mga mode ng priyoridad"</string>
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Walang available na mga magkapares na device"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Mag-tap para magkonekta o magdiskonekta ng device"</string>
@@ -308,8 +302,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Na-save"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"idiskonekta"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"i-activate"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Awtomatikong i-on bukas"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Gumagamit ng Bluetooth ang mga feature tulad ng Quick Share at Hanapin ang Aking Device"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Mag-o-on ang Bluetooth bukas ng umaga"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Ibahagi ang audio"</string>
@@ -478,8 +471,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Magdagdag ng higit pang widget"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Pindutin nang matagal para i-customize ang mga widget"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"I-customize ang mga widget"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Mag-unlock para ma-customize ang mga widget"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Icon ng app para sa na-disable na widget"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Ini-install ang icon ng app para sa isang widget"</string>
<string name="edit_widget" msgid="9030848101135393954">"I-edit ang widget"</string>
@@ -498,12 +490,11 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"pumili ng widget"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"alisin ang widget"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"ilagay ang napiling widget"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
- <skip />
+ <string name="communal_widget_picker_title" msgid="1953369090475731663">"Mga widget ng lock screen"</string>
+ <string name="communal_widget_picker_description" msgid="490515450110487871">"Makikita ng sinuman ang mga widget sa lock screen, kahit naka-lock ang tablet."</string>
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Mga widget ng lock screen"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Para magbukas ng app gamit ang isang widget, kakailanganin mong i-verify na ikaw iyan. Bukod pa rito, tandaang puwedeng tingnan ng kahit na sino ang mga ito, kahit na naka-lock ang iyong tablet. Posibleng hindi para sa iyong lock screen ang ilang widget at posibleng hindi ligtas ang mga ito na idagdag dito."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"OK"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Magpalit ng user"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"pulldown menu"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Ide-delete ang lahat ng app at data sa session na ito."</string>
@@ -725,7 +716,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Default"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Awtomatiko"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Walang tunog o pag-vibrate"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Walang tunog o pag-vibrate at lumalabas nang mas mababa sa seksyon ng pag-uusap"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Puwedeng mag-ring o mag-vibrate batay sa mga setting ng device"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Puwedeng mag-ring o mag-vibrate batay sa mga setting ng device. Mga pag-uusap mula sa <xliff:g id="APP_NAME">%1$s</xliff:g> bubble bilang default."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Ipatukoy sa system kung dapat gumawa ng tunog o pag-vibrate ang notification na ito"</string>
@@ -782,6 +774,7 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page Down"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Delete"</string>
+ <string name="keyboard_key_esc" msgid="6230365950511411322">"Esc"</string>
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1364,20 +1357,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Split screen"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Input"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Mga shortcut ng app"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Accessibility"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Mga keyboard shortcut"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Mga shortcut ng paghahanap"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"I-collapse ang icon"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"I-expand ang icon"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"o"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Galaw para bumalik"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Galaw para sa Home"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Action key"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Tapos na"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Magaling!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Bumalik"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Para bumalik, mag-swipe pakaliwa o pakanan gamit ang tatlong daliri kahit saan sa touchpad."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Touchpad na nagpapakita ng tatlong daliring gumagalaw pakanan at pakaliwa"</string>
@@ -1386,4 +1378,5 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Level %1$d sa %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Mga Home Control"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Mabilis i-access ang home control bilang screensaver"</string>
+ <string name="volume_undo_action" msgid="5815519725211877114">"I-undo"</string>
</resources>
diff --git a/packages/SystemUI/res/values-tl/tiles_states_strings.xml b/packages/SystemUI/res/values-tl/tiles_states_strings.xml
index fe2827f6a4e9..85c4cfab149c 100644
--- a/packages/SystemUI/res/values-tl/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-tl/tiles_states_strings.xml
@@ -56,6 +56,11 @@
<item msgid="5376619709702103243">"Naka-off"</item>
<item msgid="4875147066469902392">"Naka-on"</item>
</string-array>
+ <string-array name="tile_states_modes">
+ <item msgid="7764936419245199023">"Hindi available"</item>
+ <item msgid="2004750556637773692">"Naka-off"</item>
+ <item msgid="8968530753931637871">"Naka-on"</item>
+ </string-array>
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Hindi available"</item>
<item msgid="5044688398303285224">"Naka-off"</item>
diff --git a/packages/SystemUI/res/values-tr/strings.xml b/packages/SystemUI/res/values-tr/strings.xml
index f468d5daf95b..2c429d8caa36 100644
--- a/packages/SystemUI/res/values-tr/strings.xml
+++ b/packages/SystemUI/res/values-tr/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> bu ekran görüntüsünü algıladı."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> ve diğer açık uygulamalar bu ekran görüntüsünü algıladı."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Nota ekle"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Bağlantıyı dahil et"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Ekran Kaydedicisi"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Ekran kaydı işleniyor"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Ekran kaydı oturumu için devam eden bildirim"</string>
@@ -127,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Görüntülemek için dokunun"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Ekran kaydı saklanırken hata oluştu"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Ekran kaydı başlatılırken hata oluştu"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; içeriğini kaydetmeyi durdurursunuz"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Kaydı durdur"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Ekran paylaşılıyor"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Ekran paylaşımı durdurulsun mu?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; içeriğini paylaşmayı durdurursunuz"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Paylaşımı durdur"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Ekran yayınlanıyor"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Yayın durdurulsun mu?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Ekran yayınlanıyor"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; içeriğini yayınlamayı durdurursunuz"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Yayını durdur"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Kapat"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Sorun Kaydedici"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Sorun kaydı işleniyor"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Sorun toplama oturumuyla ilgili devam eden görev bildirimi"</string>
@@ -162,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Sorun kaydı saklanırken hata oluştu"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Sorun kaydı başlatılırken hata oluştu"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Tam ekran olarak görüntüleme"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Çıkmak için ekranın üst kısmından aşağı doğru kaydırın"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"Anladım"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Geri"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Ana sayfa"</string>
@@ -196,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Cihazın kilidini yüzünüzle açtınız. Devam etmek için basın."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Yüzünüz tanındı. Devam etmek için basın."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Yüzünüz tanındı. Kilit açma simgesine basın."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Kilidi yüzünüzle açtınız. Devam etmek için dokunun."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Kimliği Doğrulandı"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Kimlik doğrulamayı iptal et"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Diğer Seçenekler"</string>
@@ -297,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Ekran koruyucu"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Rahatsız Etmeyin"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Kullanılabilir eşlenmiş cihaz yok"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Cihaz bağlamak veya cihazın bağlantısını kesmek için dokunun"</string>
@@ -308,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Kaydedildi"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"bağlantıyı kes"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"etkinleştir"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Yarın otomatik olarak aç"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Quick Share ve Cihazımı Bul gibi özellikler Bluetooth\'u kullanır"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bluetooth yarın sabah açılacak"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Sesi paylaş"</string>
@@ -478,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Daha fazla widget ekle"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Widget\'ları özelleştirmek için uzun basın"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Widget\'ları özelleştir"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Widget\'ları özelleştirmek için kilidi açın"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Devre dışı bırakılan widget\'ın uygulama simgesi"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Yüklenmeye devam eden bir widget\'ın uygulama simgesi"</string>
<string name="edit_widget" msgid="9030848101135393954">"Widget\'ı düzenle"</string>
@@ -498,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"widget seçin"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"widget\'ı kaldır"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"seçilen widget\'ı yerleştir"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Kilit ekranı widget\'ları"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Widget kullanarak bir uygulamayı açmak için kimliğinizi doğrulamanız gerekir. Ayrıca, tabletiniz kilitliyken bile widget\'ların herkes tarafından görüntülenebileceğini unutmayın. Bazı widget\'lar kilit ekranınız için tasarlanmamış olabileceğinden buraya eklenmeleri güvenli olmayabilir."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"Anladım"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Kullanıcı değiştirme"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"açılır menü"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Bu oturumdaki tüm uygulamalar ve veriler silinecek."</string>
@@ -725,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Varsayılan"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Otomatik"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Sessiz veya titreşim yok"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Ses veya titreşim yok, görüşme bölümünün altında görünür"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Cihaz ayarlarına bağlı olarak zili çalabilir veya titreyebilir"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Cihaz ayarlarına bağlı olarak zili çalabilir veya titreyebilir <xliff:g id="APP_NAME">%1$s</xliff:g> adlı uygulamadan görüşmeler varsayılan olarak baloncukla gösterilir."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Bu bildirimin ses çıkarması veya titreşmesi gerekip gerekmediğine sistem karar versin"</string>
@@ -782,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Sayfa Yukarı"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Sayfa Aşağı"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Delete"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1364,20 +1374,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Bölünmüş ekran"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Giriş"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Uygulama kısayolları"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Erişilebilirlik"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Klavye kısayolları"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Arama kısayolları"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Daralt simgesi"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Genişlet simgesi"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"veya"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Geri hareketi"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Ana sayfa hareketi"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Eylem tuşu"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Bitti"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Tebrikler!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Geri dön"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Geri dönmek için dokunmatik alanın herhangi bir yerinde üç parmağınızla sola veya sağa kaydırın."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Sağa ve sola hareket eden üç parmağın gösterildiği dokunmatik alan"</string>
@@ -1386,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Seviye %1$d / %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Ev Kontrolleri"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Ekran koruyucu olarak ev kontrollerinize hızla erişin"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-tr/tiles_states_strings.xml b/packages/SystemUI/res/values-tr/tiles_states_strings.xml
index 1ed106f4efd2..b26588befe4d 100644
--- a/packages/SystemUI/res/values-tr/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-tr/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Kapalı"</item>
<item msgid="4875147066469902392">"Açık"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Kullanılamıyor"</item>
<item msgid="5044688398303285224">"Kapalı"</item>
diff --git a/packages/SystemUI/res/values-uk/strings.xml b/packages/SystemUI/res/values-uk/strings.xml
index c13aac71e9ba..3ebb787fd1ac 100644
--- a/packages/SystemUI/res/values-uk/strings.xml
+++ b/packages/SystemUI/res/values-uk/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"Додаток <xliff:g id="APPNAME">%1$s</xliff:g> виявив цей знімок екрана."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> та інші відкриті додатки виявили цей знімок екрана."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Додати до примітки"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Додати посилання"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Запис відео з екрана"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Обробка записування екрана"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Сповіщення про сеанс запису екрана"</string>
@@ -127,33 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Натисніть, щоб переглянути"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Не вдалося зберегти запис відео з екрана"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Не вдалося почати запис екрана"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
+ <skip />
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Ви зупините запис контенту з додатка &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Зупинити запис"</string>
+ <string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Показ екрана"</string>
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Зупинити показ екрана?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
<skip />
- <!-- no translation found for share_to_app_chip_accessibility_label (4210256229976947065) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Ви зупините надсилання контенту з додатка &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Зупинити показ"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Трансляція екрана"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Зупинити трансляцію?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <!-- no translation found for cast_to_other_device_chip_accessibility_label (1680650146639059938) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Ви зупините трансляцію контенту з додатка &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
<skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Припинити трансляцію"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Закрити"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Засіб запису проблем"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Обробка запису проблеми"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Поточне сповіщення про сеанс збирання даних про проблему"</string>
@@ -164,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Не вдалося зберегти запис проблеми"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Не вдалося почати запис проблеми"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Перегляд на весь екран"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Щоб вийти, проведіть пальцем униз від верхнього краю екрана"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"OK"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Назад"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Головна"</string>
@@ -198,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Розблоковано (фейс-контроль). Натисніть, щоб продовжити."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Обличчя розпізнано. Натисніть, щоб продовжити."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Обличчя розпізнано. Натисніть значок розблокування."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Розблоковано (фейс-контроль). Натисніть, щоб продовжити."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Автентифіковано"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Скасувати автентифікацію"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Інші опції"</string>
@@ -299,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Заставка"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Не турбувати"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Немає спарених пристроїв"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Натисніть, щоб під’єднати або від’єднати пристрій"</string>
@@ -310,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Збережено"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"від’єднати"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"активувати"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Автоматично ввімкнути завтра"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Такі функції, як швидкий обмін і \"Знайти пристрій\", використовують Bluetooth"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bluetooth увімкнеться завтра вранці"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Поділитись аудіо"</string>
@@ -480,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Додати більше віджетів"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Утримуйте, щоб налаштувати віджети"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Налаштувати віджети"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Розблокуйте екран, щоб налаштувати віджети"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Значок додатка для вимкненого віджета"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Значок додатка для віджета, що встановлюється"</string>
<string name="edit_widget" msgid="9030848101135393954">"Редагувати віджет"</string>
@@ -500,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"виберіть віджет"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"видалити віджет"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"розмістити вибраний віджет"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Віджети для заблокованого екрана"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Щоб відкрити додаток за допомогою віджета, вам потрібно буде підтвердити особу. Пам’ятайте також, що бачити віджети можуть усі, навіть коли планшет заблоковано. Можливо, деякі віджети не призначені для заблокованого екрана, і додавати їх на нього може бути небезпечно."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"OK"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Змінити користувача"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"спадне меню"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Усі додатки й дані з цього сеансу буде видалено."</string>
@@ -727,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"За умовчанням"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Автоматично"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Без звуку чи вібрації"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Без звуку чи вібрації, з\'являється нижче в розділі розмов"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Дзвінок або вібрація залежно від налаштувань пристрою"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Може дзвонити або вібрувати залежно від налаштувань пристрою. Показує спливаючі розмови з додатка <xliff:g id="APP_NAME">%1$s</xliff:g> за умовчанням."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Дозволити системі визначати, чи має сповіщення супроводжуватися звуком або вібрацією"</string>
@@ -784,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Сторінка вгору"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Сторінка вниз"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Delete"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1359,31 +1367,26 @@
<string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"Використовується додатком <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string>
<string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"Нещодавно використано (<xliff:g id="APP_NAME">%1$s</xliff:g>, <xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string>
<string name="shortcut_helper_category_system" msgid="462110876978937359">"Система"</string>
- <!-- no translation found for shortcut_helper_category_system_controls (3153344561395751020) -->
- <skip />
- <!-- no translation found for shortcut_helper_category_system_apps (6001757545472556810) -->
- <skip />
+ <string name="shortcut_helper_category_system_controls" msgid="3153344561395751020">"Елементи керування системою"</string>
+ <string name="shortcut_helper_category_system_apps" msgid="6001757545472556810">"Системні додатки"</string>
<string name="shortcut_helper_category_multitasking" msgid="7413381961404090136">"Багатозадачність"</string>
- <!-- no translation found for shortcutHelper_category_recent_apps (7918731953612377145) -->
- <skip />
- <!-- no translation found for shortcutHelper_category_split_screen (1159669813444812244) -->
- <skip />
+ <string name="shortcutHelper_category_recent_apps" msgid="7918731953612377145">"Нещодавні додатки"</string>
+ <string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Розділити екран"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Введення"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Комбінації клавіш для додатків"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Доступність"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Комбінації клавіш"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Комбінації клавіш для пошуку"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Значок згортання"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Значок розгортання"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"або"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Жест \"Назад\""</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Жест переходу на головний екран"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Клавіша дії"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Готово"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Чудово!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Назад"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Щоб перейти назад, проведіть трьома пальцями вліво або вправо по сенсорній панелі."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Сенсорна панель із зображенням трьох пальців, що рухаються вправо й уліво"</string>
@@ -1392,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Рівень %1$d з %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Автоматизація дому"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Швидкий доступ до керування домом через заставку"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-uk/tiles_states_strings.xml b/packages/SystemUI/res/values-uk/tiles_states_strings.xml
index 61e62e4395ce..2d869166d475 100644
--- a/packages/SystemUI/res/values-uk/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-uk/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Вимкнено"</item>
<item msgid="4875147066469902392">"Увімкнено"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Недоступно"</item>
<item msgid="5044688398303285224">"Вимкнено"</item>
diff --git a/packages/SystemUI/res/values-ur/strings.xml b/packages/SystemUI/res/values-ur/strings.xml
index 9c6df9036663..fe8eb4da467b 100644
--- a/packages/SystemUI/res/values-ur/strings.xml
+++ b/packages/SystemUI/res/values-ur/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"‫<xliff:g id="APPNAME">%1$s</xliff:g> نے اس اسکرین شاٹ کا پتا لگایا۔"</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"‫<xliff:g id="APPNAME">%1$s</xliff:g> اور دیگر کھلی ایپس نے اس اسکرین شاٹ کا پتا لگایا۔"</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"نوٹ میں شامل کریں"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"لنک شامل کریں"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"اسکرین ریکارڈر"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"سکرین ریکارڈنگ پروسیس ہورہی ہے"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"اسکرین ریکارڈ سیشن کیلئے جاری اطلاع"</string>
@@ -127,31 +126,27 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"دیکھنے کے لیے تھپتھپائیں"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"اسکرین ریکارڈنگ محفوظ کرنے میں خرابی"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"اسکرین ریکارڈنگ شروع کرنے میں خرابی"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
- <skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
- <skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"‏آپ &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; کو ریکارڈ نہیں کر پائیں گے"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
- <skip />
+ <string name="screenrecord_stop_dialog_title" msgid="8716193661764511095">"ریکارڈنگ روکیں؟"</string>
+ <string name="screenrecord_stop_dialog_message" msgid="6262768207331626817">"آپ فی الحال اپنی پوری اسکرین ریکارڈ کر رہے ہیں"</string>
+ <string name="screenrecord_stop_dialog_message_specific_app" msgid="5995770227684523244">"آپ فی الحال <xliff:g id="APP_NAME">%1$s</xliff:g> ریکارڈ کر رہے ہیں"</string>
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"ریکارڈنگ روکیں"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"اسکرین کا اشتراک ہو رہا ہے"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
- <skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
- <skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"‏آپ &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; کا اشتراک نہیں کر پائیں گے"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
- <skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"اسکرین کاسٹ ہو رہی ہے"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
- <skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
- <skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"‏آپ &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; کو کاسٹ نہیں کر پائیں گے"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
- <skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
- <skip />
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"اسکرین کا اشتراک روکیں؟"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen_with_host_app" msgid="522823522115375414">"آپ فی الحال <xliff:g id="HOST_APP_NAME">%1$s</xliff:g> کے ساتھ اپنی پوری اسکرین کا اشتراک کر رہے ہیں"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen" msgid="5090115386271179270">"آپ فی الحال ایک ایپ کے ساتھ اپنی پوری اسکرین کا اشتراک کر رہے ہیں"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_specific" msgid="5923772039347985172">"آپ فی الحال <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> کا اشتراک کر رہے ہیں"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_generic" msgid="6681016774654578261">"آپ فی الحال ایک ایپ کا اشتراک کر رہے ہیں"</string>
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"اشتراک کرنا روکیں"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"اسکرین کاسٹ ہو رہی ہے"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"کاسٹ کرنا بند کریں؟"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen_with_device" msgid="1474703115926205251">"آپ فی الحال اپنی پوری اسکرین کو <xliff:g id="DEVICE_NAME">%1$s</xliff:g> پر کاسٹ کر رہے ہیں"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen" msgid="8419219169553867625">"آپ فی الحال اپنی پوری اسکرین کو ایک قریبی آلہ پر کاسٹ کر رہے ہیں"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app_with_device" msgid="2715934698604085519">"آپ فی الحال <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> کو <xliff:g id="DEVICE_NAME">%2$s</xliff:g> پر کاسٹ کر رہے ہیں"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="8616103075630934513">"آپ فی الحال <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> کو ایک قریبی آلہ پر کاسٹ کر رہے ہیں"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic_with_device" msgid="9213582497852420203">"آپ فی الحال <xliff:g id="DEVICE_NAME">%1$s</xliff:g> پر کاسٹ کر رہے ہیں"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic" msgid="4100272100480415076">"آپ فی الحال ایک قریبی آلہ پر کاسٹ کر رہے ہیں"</string>
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"کاسٹ کرنا بند کریں"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"بند کریں"</string>
<string name="issuerecord_title" msgid="286627115110121849">"ایشو ریکارڈر"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"ایشو ریکارڈنگ پروسیس ہو رہی ہے"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"ایشو کلیکشن سیشن کے لیے جاری اطلاع"</string>
@@ -162,8 +157,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"ایشو ریکارڈنگ محفوظ کرنے میں خرابی"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"ایشو ریکارڈنگ شروع کرنے میں خرابی"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"فُل اسکرین میں دیکھ رہے ہیں"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"باہر نکلنے کے لیے اپنی اسکرین کے اوپری حصے سے نیچے کی طرف سوائپ کریں"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"سمجھ آ گئی"</string>
<string name="accessibility_back" msgid="6530104400086152611">"واپس جائیں"</string>
<string name="accessibility_home" msgid="5430449841237966217">"ہوم"</string>
@@ -196,8 +190,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"چہرے سے انلاک کیا گیا۔ جاری رکھنے کے لیے دبائیں۔"</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"چہرے کی شناخت ہو گئی۔ جاری رکھنے کے لیے دبائیں۔"</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"چہرے کی شناخت ہو گئی۔ جاری رکھنے کیلئے انلاک آئیکن دبائیں۔"</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"چہرے سے غیر مقفل کیا گیا۔ جاری رکھنے کیلئے تھپتھپائیں۔"</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"تصدیق کردہ"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"تصدیق کو منسوخ کریں"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"مزید اختیارات"</string>
@@ -297,6 +290,7 @@
<string name="start_dreams" msgid="9131802557946276718">"اسکرین سیور"</string>
<string name="ethernet_label" msgid="2203544727007463351">"ایتھرنیٹ"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"ڈسٹرب نہ کریں"</string>
+ <string name="quick_settings_modes_label" msgid="5407025818652750501">"ترجیحی وضع"</string>
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"بلوٹوتھ"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"کوئی جوڑا بنائے ہوئے آلات دستیاب نہیں ہیں"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"کسی آلے کو منسلک یا غیر منسلک کرنے کے لیے تھپتھپائیں"</string>
@@ -308,8 +302,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"محفوظ ہے"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"غیر منسلک کریں"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"فعال کریں"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"خودکار طور پر کل آن کریں"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"فوری اشتراک اور \'میرا آلہ ڈھونڈیں\' جیسی خصوصیات بلوٹوتھ کا استعمال کرتی ہیں"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"بلوٹوتھ کل صبح آن ہو جائے گا"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"آڈیو کا اشتراک کریں"</string>
@@ -478,8 +471,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"مزید ویجٹس شامل کریں"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"ویجٹس کو حسب ضرورت بنانے کے لیے لانگ پریس کریں"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"ویجیٹس کو حسب ضرورت بنائیں"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"ویجیٹس کو حسب ضرورت بنانے کے لیے غیر مقفل کریں"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"غیر فعال ویجیٹ کے لئے ایپ آئیکن"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"انسٹال ہونے والے ویجیٹ کا ایپ آئیکن"</string>
<string name="edit_widget" msgid="9030848101135393954">"ویجیٹ میں ترمیم کریں"</string>
@@ -498,12 +490,11 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"ویجیٹ منتخب کریں"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"ویجیٹ ہٹائیں"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"منتخب ویجیٹ رکھیں"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
- <skip />
+ <string name="communal_widget_picker_title" msgid="1953369090475731663">"مقفل اسکرین کے ویجیٹس"</string>
+ <string name="communal_widget_picker_description" msgid="490515450110487871">"کوئی بھی آپ کی مقفل اسکرین پر ویجیٹ دیکھ سکتا ہے اگرچہ آپ کا ٹیبلیٹ مقفل ہو۔"</string>
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"مقفل اسکرین کے ویجیٹس"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"ویجیٹ کے ذریعے ایپ کھولنے کے لیے آپ کو تصدیق کرنی ہوگی کہ یہ آپ ہی ہیں۔ نیز، ذہن میں رکھیں کہ کوئی بھی انہیں دیکھ سکتا ہے، یہاں تک کہ جب آپ کا ٹیبلیٹ مقفل ہو۔ ہو سکتا ہے کچھ ویجٹس آپ کی لاک اسکرین کے لیے نہ بنائے گئے ہوں اور یہاں شامل کرنا غیر محفوظ ہو سکتا ہے۔"</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"سمجھ آ گئی"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"صارف سوئچ کریں"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"پل ڈاؤن مینیو"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"اس سیشن میں موجود سبھی ایپس اور ڈیٹا کو حذف کر دیا جائے گا۔"</string>
@@ -729,7 +720,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"ڈیفالٹ"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"خودکار"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"کوئی آواز یا وائبریشن نہیں"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"کوئی آواز یا وائبریشن نہیں اور گفتگو کے سیکشن میں نیچے ظاہر ہوتا ہے"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"آلے کی ترتیبات کی بنیاد پر وائبریٹ یا گھنٹی بج سکتی ہے"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"آلے کی ترتیبات بنیاد پر وائبریٹ یا گھنٹی بج سکتی ہے۔ بذریعہ ڈیفالٹ <xliff:g id="APP_NAME">%1$s</xliff:g> بلبلہ سے گفتگوئیں۔"</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"سسٹم کو اس بات کا تعین کرنے دیں کہ آیا اس اطلاع کی آواز ہو یا وائبریٹ ہونا چاہیے"</string>
@@ -786,6 +778,7 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page Down"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Delete"</string>
+ <string name="keyboard_key_esc" msgid="6230365950511411322">"Esc"</string>
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1368,20 +1361,18 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"اسپلٹ اسکرین"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"ان پٹ"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"ایپ شارٹ کٹس"</string>
+ <string name="shortcut_helper_category_current_app_shortcuts" msgid="4017840565974573628">"موجودہ ایپ"</string>
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"ایکسیسبیلٹی"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"کی بورڈ شارٹ کٹس"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"تلاش کے شارٹ کٹس"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"آئیکن سکیڑیں"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"آئیکن پھیلائیں"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"یا"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"پیچھے جانے کا اشارہ"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"ہوم کا اشارہ"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"ایکشن کلید"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"ہو گیا"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"بہترین!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"واپس جائیں"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"واپس جانے کے لیے، ٹچ پیڈ پر کہیں بھی تین انگلیوں کی مدد سے دائیں یا بائیں سوائپ کریں۔"</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"ٹچ پیڈ دائیں اور بائیں حرکت کرتی ہوئی تین انگلیاں دکھا رہا ہے"</string>
@@ -1390,4 +1381,5 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"‏%2$d میں سے ‎%1$d کا لیول"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"ہوم کنٹرولز"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"اسکرین سیور کے بطور اپنے ہوم کنٹرولز تک فوری رسائی حاصل کریں"</string>
+ <string name="volume_undo_action" msgid="5815519725211877114">"کالعدم کریں"</string>
</resources>
diff --git a/packages/SystemUI/res/values-ur/tiles_states_strings.xml b/packages/SystemUI/res/values-ur/tiles_states_strings.xml
index ebbc30ebca58..e398b2f84803 100644
--- a/packages/SystemUI/res/values-ur/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-ur/tiles_states_strings.xml
@@ -56,6 +56,11 @@
<item msgid="5376619709702103243">"آف ہے"</item>
<item msgid="4875147066469902392">"آن ہے"</item>
</string-array>
+ <string-array name="tile_states_modes">
+ <item msgid="7764936419245199023">"دستیاب نہیں ہے"</item>
+ <item msgid="2004750556637773692">"آف ہے"</item>
+ <item msgid="8968530753931637871">"آن ہے"</item>
+ </string-array>
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"دستیاب نہیں ہے"</item>
<item msgid="5044688398303285224">"آف ہے"</item>
diff --git a/packages/SystemUI/res/values-uz/strings.xml b/packages/SystemUI/res/values-uz/strings.xml
index 1e55f29f37f1..7e9466c35b21 100644
--- a/packages/SystemUI/res/values-uz/strings.xml
+++ b/packages/SystemUI/res/values-uz/strings.xml
@@ -126,31 +126,27 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Koʻrish uchun bosing"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Ekran yozuvi saqlanmadi"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Ekranni yozib olish boshlanmadi"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
- <skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
- <skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; yozib olinishini toʻxtatasiz"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
- <skip />
+ <string name="screenrecord_stop_dialog_title" msgid="8716193661764511095">"Yozuv toʻxtatilsinmi?"</string>
+ <string name="screenrecord_stop_dialog_message" msgid="6262768207331626817">"Hozir butun ekran yozib olinmoqda"</string>
+ <string name="screenrecord_stop_dialog_message_specific_app" msgid="5995770227684523244">"Hozir <xliff:g id="APP_NAME">%1$s</xliff:g> ilovasi yozib olinmoqda"</string>
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Yozuvni toʻxtatish"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Ekran ulashilmoqda"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
- <skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
- <skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; ulashuvini toʻxtatasiz"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
- <skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Ekran namoyish qilinmoqda"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
- <skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
- <skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; translatsiyasini toʻxtatasiz"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
- <skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
- <skip />
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Ekran namoyishi toʻxtatilsinmi?"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen_with_host_app" msgid="522823522115375414">"Hozir butun ekran <xliff:g id="HOST_APP_NAME">%1$s</xliff:g> ilovasiga ulashilmoqda"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen" msgid="5090115386271179270">"Hozir butun ekran ilovaga ulashilmoqda"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_specific" msgid="5923772039347985172">"Hozir <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> ilovasiga kontent ulashilmoqda"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_generic" msgid="6681016774654578261">"Hozir ilovaga kontent ulashilmoqda"</string>
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Namoyishni toʻxtatish"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Ekran translatsiya qilinmoqda"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Toʻxtatilsinmi?"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen_with_device" msgid="1474703115926205251">"Hozir butun ekran <xliff:g id="DEVICE_NAME">%1$s</xliff:g> qurilmasiga translatsiya qilinmoqda"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen" msgid="8419219169553867625">"Hozir butun ekran atrofdagi qurilmaga translatsiya qilinmoqda"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app_with_device" msgid="2715934698604085519">"Hozir <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> ilovasi <xliff:g id="DEVICE_NAME">%2$s</xliff:g> qurilmasiga translatsiya qilinmoqda"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="8616103075630934513">"Hozir <xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> ilovasi atrofdagi qurilmaga translatsiya qilinmoqda"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic_with_device" msgid="9213582497852420203">"Hozir <xliff:g id="DEVICE_NAME">%1$s</xliff:g> qurilmasiga kontent translatsiya qilinmoqda"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic" msgid="4100272100480415076">"Hozir atrofdagi qurilmaga kontent translatsiya qilinmoqda"</string>
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Toʻxtatish"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Yopish"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Muammoni yozib olish vositasi"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Yozuv qayta ishlanmoqda"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Muammo toʻplash seansi uchun faol bildirishnoma"</string>
@@ -161,8 +157,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Yozuv saqlanmadi"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Yozib olish boshlanmadi"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Butun ekran rejimi"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Chiqish uchun ekranning tepasidan pastga suring"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"OK"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Orqaga"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Uyga"</string>
@@ -295,6 +290,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Ekran lavhasi"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Bezovta qilinmasin"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Ulangan qurilmalar topilmadi"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Qurilma ulash yoki uzish uchun tegining"</string>
@@ -306,8 +303,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Saqlangan"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"uzish"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"faollashtirish"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Ertaga avtomatik yoqilsin"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Tezkor ulashuv va Qurilmamni top kabi funksiyalar Bluetooth ishlatadi"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bluetooth ertaga ertalab yoqiladi"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Audioni ulashish"</string>
@@ -476,8 +472,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Koʻproq vidjetlar qoʻshish"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Vidjetlarni sozlash uchun bosib turing"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Vidjetlarni moslashtirish"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Vidjetlarni moslash uchun qulfdan chiqaring"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Faolsizlantirilgan vidjet uchun ilova belgisi"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Oʻrnatilayotgan vidjet uchun ilova belgisi"</string>
<string name="edit_widget" msgid="9030848101135393954">"Vidjetni tahrirlash"</string>
@@ -496,12 +491,11 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"vidjet tanlash"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"vidjetni olib tashlash"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"tanlangan vidjetni joylash"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
- <skip />
+ <string name="communal_widget_picker_title" msgid="1953369090475731663">"Ekran qulfi vidjetlari"</string>
+ <string name="communal_widget_picker_description" msgid="490515450110487871">"Ekran quflidagi vidjetlar hammaga koʻrinadi, hatto planshet qulflanganda ham."</string>
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Ekran qulfi vidjetlari"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Ilovani vidjet orqali ochish uchun shaxsingizni tasdiqlashingiz kerak. Shuningdek, planshet qulflanganda ham bu axborotlar hammaga koʻrinishini unutmang. Ayrim vidjetlar ekran qulfiga moslanmagan va ularni bu yerda chiqarish xavfli boʻlishi mumkin."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"OK"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Foydalanuvchini almashtirish"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"tortib tushiriladigan menyu"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Ushbu seansdagi barcha ilovalar va ma’lumotlar o‘chirib tashlanadi."</string>
@@ -723,7 +717,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Standart"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Avtomatik"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Tovush yoki tebranishsiz"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Tovush yoki tebranishsiz hamda suhbatlar ruknining pastida chiqadi"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Qurilma sozlamalari asosida jiringlashi yoki tebranishi mumkin"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Qurilma sozlamalari asosida jiringlashi yoki tebranishi mumkin. <xliff:g id="APP_NAME">%1$s</xliff:g> suhbatlari standart holatda bulutcha shaklida chiqadi."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Bu bildirishnoma jiringlashi yoki tebranishini hal qilsin"</string>
@@ -780,6 +775,7 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page Down"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Delete"</string>
+ <string name="keyboard_key_esc" msgid="6230365950511411322">"Esc"</string>
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1362,20 +1358,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Ekranni ikkiga ajratish"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Kiritish"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Ilova yorliqlari"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Qulayliklar"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Tezkor tugmalar"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Tezkor tugmalar qidiruvi"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Yigʻish belgisi"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Yoyish belgisi"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"yoki"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Orqaga qaytish ishorasi"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Asosiy ekran ishorasi"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Amal tugmasi"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Tayyor"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Barakalla!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Orqaga qaytish"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Ortga qaytish uchun sensorli panelda uchta barmoqni chapga yoki oʻngga suring."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Sensorli panelda uchta barmoq chapga va oʻngga harakatlanishi"</string>
@@ -1384,4 +1379,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Daraja: %1$d / %2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Uy boshqaruvi"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Uy boshqaruvi tugmalarini ekran lavhasida tezkor oching"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-uz/tiles_states_strings.xml b/packages/SystemUI/res/values-uz/tiles_states_strings.xml
index 2ae811233176..da9c98f82df8 100644
--- a/packages/SystemUI/res/values-uz/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-uz/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Oʻchiq"</item>
<item msgid="4875147066469902392">"Yoniq"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Ishlamaydi"</item>
<item msgid="5044688398303285224">"Oʻchiq"</item>
diff --git a/packages/SystemUI/res/values-vi/strings.xml b/packages/SystemUI/res/values-vi/strings.xml
index f52b83157bdb..42909c996e2c 100644
--- a/packages/SystemUI/res/values-vi/strings.xml
+++ b/packages/SystemUI/res/values-vi/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> đã phát hiện thấy ảnh chụp màn hình này."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> và các ứng dụng đang mở khác đã phát hiện thấy ảnh chụp màn hình này."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Thêm vào ghi chú"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Thêm đường liên kết"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Trình ghi màn hình"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Đang xử lý video ghi màn hình"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Thông báo đang diễn ra về phiên ghi màn hình"</string>
@@ -127,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Nhấn để xem"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Có lỗi xảy ra khi lưu video ghi màn hình"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Lỗi khi bắt đầu ghi màn hình"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Bạn sẽ dừng ghi âm nội dung của &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Dừng ghi"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Đang chia sẻ màn hình"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Dừng chia sẻ màn hình?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Bạn sẽ dừng chia sẻ nội dung của &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Dừng chia sẻ"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Đang truyền màn hình"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Dừng truyền?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Đang truyền màn hình"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Bạn sẽ dừng truyền nội dung của &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Dừng truyền"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Đóng"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Trình ghi sự cố"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Đang xử lý bản ghi sự cố"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Thông báo hiển thị liên tục cho một phiên thu thập sự cố"</string>
@@ -162,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Đã xảy ra lỗi khi lưu bản ghi sự cố"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Đã xảy ra lỗi khi bắt đầu ghi sự cố"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Xem toàn màn hình"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Để thoát, hãy vuốt xuống từ đầu màn hình"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"Tôi hiểu"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Quay lại"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Trang chủ"</string>
@@ -196,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Đã mở khoá bằng khuôn mặt. Hãy nhấn để tiếp tục."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Đã nhận diện khuôn mặt. Hãy nhấn để tiếp tục."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Đã nhận diện khuôn mặt. Nhấn biểu tượng mở khoá để tiếp tục."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Đã mở khoá bằng khuôn mặt. Nhấn để tiếp tục."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Đã xác thực"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Huỷ quy trình xác thực"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Tuỳ chọn khác"</string>
@@ -297,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Trình bảo vệ m.hình"</string>
<string name="ethernet_label" msgid="2203544727007463351">"Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Không làm phiền"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Không có thiết bị nào được ghép nối"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Nhấn để kết nối/ngắt kết nối với một thiết bị"</string>
@@ -308,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Đã lưu"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"ngắt kết nối"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"kích hoạt"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Tự động bật vào ngày mai"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Các tính năng như Chia sẻ nhanh và Tìm thiết bị của tôi đều sử dụng Bluetooth"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"Bluetooth sẽ bật vào sáng mai"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Chia sẻ âm thanh"</string>
@@ -478,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Thêm tiện ích khác"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Nhấn và giữ để tuỳ chỉnh tiện ích"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Tuỳ chỉnh tiện ích"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Mở khoá để tuỳ chỉnh các tiện ích"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Biểu tượng ứng dụng của tiện ích đã bị vô hiệu hoá"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Đang cài đặt biểu tượng ứng dụng của một tiện ích"</string>
<string name="edit_widget" msgid="9030848101135393954">"Chỉnh sửa tiện ích"</string>
@@ -498,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"chọn tiện ích"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"xoá tiện ích"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"đặt tiện ích đã chọn vào vị trí"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Tiện ích trên màn hình khoá"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Để dùng tiện ích mở một ứng dụng, bạn cần xác minh danh tính của mình. Ngoài ra, hãy lưu ý rằng bất kỳ ai cũng có thể xem các tiện ích này, ngay cả khi máy tính bảng của bạn được khoá. Một số tiện ích có thể không dành cho màn hình khoá và không an toàn khi thêm vào đây."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"Tôi hiểu"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Chuyển đổi người dùng"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"trình đơn kéo xuống"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Tất cả ứng dụng và dữ liệu trong phiên này sẽ bị xóa."</string>
@@ -725,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Mặc định"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Tự động"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Không phát âm thanh hoặc rung"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Không phát âm thanh hoặc rung và xuất hiện phía dưới trong phần cuộc trò chuyện"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Có thể đổ chuông hoặc rung tuỳ theo chế độ cài đặt trên thiết bị"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Có thể đổ chuông hoặc rung tuỳ theo chế độ cài đặt trên thiết bị. Theo mặc định, các cuộc trò chuyện từ <xliff:g id="APP_NAME">%1$s</xliff:g> sẽ hiển thị dưới dạng bong bóng."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Cho phép hệ thống quyết định xem thông báo này phát âm thanh hay rung"</string>
@@ -782,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page Down"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Delete"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"Cuối"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1364,20 +1374,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Chia đôi màn hình"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Phương thức nhập"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Lối tắt ứng dụng"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Hỗ trợ tiếp cận"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Phím tắt"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Lối tắt tìm kiếm"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Biểu tượng Thu gọn"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Biểu tượng Mở rộng"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"hoặc"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Cử chỉ quay lại"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Cử chỉ chuyển đến màn hình chính"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Phím hành động"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Xong"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Tuyệt vời!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Quay lại"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Để quay lại, hãy vuốt sang trái hoặc sang phải bằng 3 ngón tay ở vị trí bất kỳ trên bàn di chuột."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Minh hoạ thao tác di chuyển sang phải và sang trái bằng 3 ngón tay trên bàn di chuột"</string>
@@ -1386,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Độ sáng %1$d/%2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Điều khiển nhà"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Điều khiển nhà nhanh bằng trình bảo vệ màn hình"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-vi/tiles_states_strings.xml b/packages/SystemUI/res/values-vi/tiles_states_strings.xml
index d9d8af1d644c..efcc373124a3 100644
--- a/packages/SystemUI/res/values-vi/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-vi/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Đang tắt"</item>
<item msgid="4875147066469902392">"Đang bật"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Không hoạt động"</item>
<item msgid="5044688398303285224">"Đang tắt"</item>
diff --git a/packages/SystemUI/res/values-zh-rCN/strings.xml b/packages/SystemUI/res/values-zh-rCN/strings.xml
index 6a5d4be23ec8..b21bd9799086 100644
--- a/packages/SystemUI/res/values-zh-rCN/strings.xml
+++ b/packages/SystemUI/res/values-zh-rCN/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"<xliff:g id="APPNAME">%1$s</xliff:g> 检测到此屏幕截图。"</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"<xliff:g id="APPNAME">%1$s</xliff:g> 及其他打开的应用检测到此屏幕截图。"</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"添加到备注中"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"包括链接"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"屏幕录制器"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"正在处理屏幕录制视频"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"持续显示屏幕录制会话通知"</string>
@@ -127,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"点按即可查看"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"保存屏幕录制内容时出错"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"启动屏幕录制时出错"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"将停止录制&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;的内容"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"停止录制"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"正在共享屏幕"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"要停止共享屏幕吗?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"将停止分享&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;的内容"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"停止共享"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"正在投屏"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"停止投屏吗?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"正在投放屏幕"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"将停止投放&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;的内容"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"停止投屏"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"关闭"</string>
<string name="issuerecord_title" msgid="286627115110121849">"问题录制器"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"正在处理问题录制"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"针对问题收集会话的持续性通知"</string>
@@ -162,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"保存问题录制内容时出错"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"启动问题录制时出错"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"目前处于全屏模式"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"若要退出,请从屏幕顶部向下滑动"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"知道了"</string>
<string name="accessibility_back" msgid="6530104400086152611">"返回"</string>
<string name="accessibility_home" msgid="5430449841237966217">"主屏幕"</string>
@@ -196,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"已通过面孔识别解锁。点按即可继续。"</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"识别出面孔。点按即可继续。"</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"识别出面孔。按下解锁图标即可继续。"</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"已通过面孔识别解锁。点按即可继续。"</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"已经过身份验证"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"取消身份验证"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"更多选项"</string>
@@ -297,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"屏保"</string>
<string name="ethernet_label" msgid="2203544727007463351">"有线网络"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"勿扰"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"蓝牙"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"没有可用的配对设备"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"点按即可连接设备或断开设备连接"</string>
@@ -308,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"已保存"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"断开连接"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"启用"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"明天自动开启"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"快速分享、查找我的设备等功能会使用蓝牙"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"蓝牙将在明天早上开启"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"分享音频"</string>
@@ -478,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"添加更多微件"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"长按即可自定义微件"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"自定义微件"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"解锁即可自定义微件"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"已停用微件的应用图标"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"代表正在安装的微件的应用图标"</string>
<string name="edit_widget" msgid="9030848101135393954">"修改微件"</string>
@@ -498,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"选择微件"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"移除微件"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"放置所选微件"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"锁定的屏幕中的微件"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"若要使用微件打开应用,您需要验证是您本人在操作。另外请注意,任何人都可以查看此类微件,即使您的平板电脑已锁定。有些微件可能不适合显示在锁定的屏幕中,因此添加到这里可能不安全。"</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"知道了"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"切换用户"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"下拉菜单"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"此会话中的所有应用和数据都将被删除。"</string>
@@ -725,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"默认"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"自动"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"不发出提示音,也不振动"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"不发出提示音,也不振动;显示在对话部分的靠下位置"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"可能会响铃或振动,取决于设备设置"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"可能会响铃或振动,取决于设备设置。默认情况下,来自<xliff:g id="APP_NAME">%1$s</xliff:g>的对话会以消息气泡的形式显示。"</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"让系统决定是否应让设备在收到此通知时发出提示音或振动"</string>
@@ -782,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"向上翻页"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"PgDn"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"删除"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert"</string>
@@ -1364,20 +1374,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"分屏"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"输入"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"应用快捷键"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"无障碍功能"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"键盘快捷键"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"搜索快捷键"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"收起图标"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"展开图标"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"或"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"返回手势"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"主屏幕手势"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"快捷操作按键"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"完成"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"太棒了!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"返回"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"如要返回,请使用三根手指在触控板上的任意位置左滑或右滑。"</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"触控板,其中显示了三根手指右移和左移"</string>
@@ -1386,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"第 %1$d 级,共 %2$d 级"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"家居控制"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"通过屏保快速访问家居控制功能"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-zh-rCN/tiles_states_strings.xml b/packages/SystemUI/res/values-zh-rCN/tiles_states_strings.xml
index 0446a1bc538b..a0d37b945d0f 100644
--- a/packages/SystemUI/res/values-zh-rCN/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-zh-rCN/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"已关闭"</item>
<item msgid="4875147066469902392">"已开启"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"不可用"</item>
<item msgid="5044688398303285224">"已关闭"</item>
diff --git a/packages/SystemUI/res/values-zh-rHK/strings.xml b/packages/SystemUI/res/values-zh-rHK/strings.xml
index 1e316e7822b4..daac54e264bc 100644
--- a/packages/SystemUI/res/values-zh-rHK/strings.xml
+++ b/packages/SystemUI/res/values-zh-rHK/strings.xml
@@ -126,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"輕按即可查看"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"儲存螢幕錄影時發生錯誤"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"開始錄影畫面時發生錯誤"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"你將停止錄影「<xliff:g id="APP_NAME">%1$s</xliff:g>」&lt;b&gt;&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"停止錄製"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"正在分享螢幕"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"要停止分享螢幕嗎?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"你將停止分享「<xliff:g id="APP_NAME">%1$s</xliff:g>」&lt;b&gt;&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"正在投放螢幕"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"停止分享"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"正在投放螢幕"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"要停止投放嗎?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"你將停止投放「<xliff:g id="APP_NAME">%1$s</xliff:g>」&lt;b&gt;&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
+ <skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
+ <skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"停止投放"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"關閉"</string>
<string name="issuerecord_title" msgid="286627115110121849">"問題記錄工具"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"正在處理問題記錄"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"問題收集工作階段的持續通知"</string>
@@ -161,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"儲存錄影問題時發生錯誤"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"開始記錄問題時發生錯誤"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"以全螢幕檢視"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"如要離開,請從螢幕頂部向下滑動"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"知道了"</string>
<string name="accessibility_back" msgid="6530104400086152611">"返回"</string>
<string name="accessibility_home" msgid="5430449841237966217">"首頁"</string>
@@ -295,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"螢幕保護程式"</string>
<string name="ethernet_label" msgid="2203544727007463351">"以太網"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"請勿騷擾"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"藍牙"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"找不到配對的裝置"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"輕按即可連結或解除連結裝置"</string>
@@ -306,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"已儲存"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"解除連結"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"啟動"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"明天自動開啟"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"「快速共享」和「尋找我的裝置」等功能都會使用藍牙"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"藍牙將於明天上午開啟"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"分享音訊"</string>
@@ -476,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"新增更多小工具"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"長按即可自訂小工具"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"自訂小工具"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"解鎖即可自訂小工具"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"已停用小工具的應用程式圖示"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"此應用程式圖示用來表示安裝中的小工具"</string>
<string name="edit_widget" msgid="9030848101135393954">"編輯小工具"</string>
@@ -496,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"揀小工具"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"移除小工具"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"放置所選小工具"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"上鎖畫面小工具"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"如要使用小工具開啟應用程式,系統會要求你驗證身分。請注意,即使平板電腦已鎖定,所有人還是能查看小工具。部分小工具可能不適用於上鎖畫面,而且新增至這裡後可能會有安全疑慮。"</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"知道了"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"切換使用者"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"下拉式選單"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"這個工作階段中的所有應用程式和資料都會被刪除。"</string>
@@ -723,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"預設"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"自動"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"無音效或震動"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"無音效或震動,並在對話部分的較低位置顯示"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"可能會根據裝置設定發出鈴聲或震動"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"可能會根據裝置設定發出鈴聲或震動。根據預設,來自 <xliff:g id="APP_NAME">%1$s</xliff:g> 的對話會以對話氣泡顯示。"</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"由系統判斷是否要讓此通知發出音效或震動"</string>
@@ -780,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"上一頁"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"下一頁"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"刪除"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"插入"</string>
@@ -1362,20 +1374,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"分割螢幕"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"輸入"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"應用程式捷徑"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"無障礙功能"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"鍵盤快速鍵"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"搜尋快速鍵"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"收合圖示"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"展開圖示"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"或"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"返去手勢"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"主畫面手勢"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"快捷操作鍵"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"完成"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"太好了!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"返回"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"用三隻手指在觸控板上任何一處左右滑動即可返回。"</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"觸控板上有三隻手指左右移動"</string>
@@ -1384,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"第 %1$d 級,共 %2$d 級"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"智能家居"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"在螢幕保護程式畫面上控制智能家居"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-zh-rHK/tiles_states_strings.xml b/packages/SystemUI/res/values-zh-rHK/tiles_states_strings.xml
index cca7ac42906a..de07c6c05376 100644
--- a/packages/SystemUI/res/values-zh-rHK/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-zh-rHK/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"已關閉"</item>
<item msgid="4875147066469902392">"已開啟"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"無法使用"</item>
<item msgid="5044688398303285224">"已關閉"</item>
diff --git a/packages/SystemUI/res/values-zh-rTW/strings.xml b/packages/SystemUI/res/values-zh-rTW/strings.xml
index fa1136f1e759..a29d47b0743b 100644
--- a/packages/SystemUI/res/values-zh-rTW/strings.xml
+++ b/packages/SystemUI/res/values-zh-rTW/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"「<xliff:g id="APPNAME">%1$s</xliff:g>」偵測到這張螢幕截圖。"</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"「<xliff:g id="APPNAME">%1$s</xliff:g>」和其他開啟的應用程式偵測到這張螢幕截圖。"</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"新增至記事本"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"包含連結"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"螢幕錄影器"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"處理螢幕錄影內容"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"持續顯示螢幕畫面錄製工作階段通知"</string>
@@ -127,31 +126,40 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"輕觸即可查看"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"儲存螢幕錄影內容時發生錯誤"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"開始錄製螢幕畫面時發生錯誤"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
+ <!-- no translation found for screenrecord_stop_dialog_title (8716193661764511095) -->
<skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
+ <!-- no translation found for screenrecord_stop_dialog_message (6262768207331626817) -->
<skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"系統將停止錄製「&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;」的內容"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
+ <!-- no translation found for screenrecord_stop_dialog_message_specific_app (5995770227684523244) -->
<skip />
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"停止錄音"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"正在分享畫面"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"要停止分享畫面嗎?"</string>
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen_with_host_app (522823522115375414) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_entire_screen (5090115386271179270) -->
+ <skip />
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_specific (5923772039347985172) -->
<skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
+ <!-- no translation found for share_to_app_stop_dialog_message_single_app_generic (6681016774654578261) -->
<skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"系統將停止分享「&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;」的內容"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"停止分享"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"正在投放畫面"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"要停止投放嗎?"</string>
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen_with_device (1474703115926205251) -->
<skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"正在投放畫面"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_entire_screen (8419219169553867625) -->
<skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app_with_device (2715934698604085519) -->
<skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"系統將停止投放「&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;」的內容"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_specific_app (8616103075630934513) -->
<skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic_with_device (9213582497852420203) -->
<skip />
+ <!-- no translation found for cast_to_other_device_stop_dialog_message_generic (4100272100480415076) -->
+ <skip />
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"停止投放"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"關閉"</string>
<string name="issuerecord_title" msgid="286627115110121849">"問題記錄工具"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"正在處理問題記錄"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"問題收集工作階段的持續性通知"</string>
@@ -162,8 +170,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"儲存問題記錄時發生錯誤"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"開始記錄問題時發生錯誤"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"以全螢幕檢視"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"如要離開,請從螢幕頂端向下滑動"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"我知道了"</string>
<string name="accessibility_back" msgid="6530104400086152611">"返回"</string>
<string name="accessibility_home" msgid="5430449841237966217">"主畫面"</string>
@@ -196,8 +203,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"裝置已透過你的臉解鎖,按下即可繼續操作。"</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"臉孔辨識完成,按下即可繼續操作。"</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"臉孔辨識完成,按下「解鎖」圖示即可繼續操作。"</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"裝置已透過你的臉解鎖,輕觸這裡即可繼續。"</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"已通過驗證"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"取消驗證"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"更多選項"</string>
@@ -297,6 +303,8 @@
<string name="start_dreams" msgid="9131802557946276718">"螢幕保護程式"</string>
<string name="ethernet_label" msgid="2203544727007463351">"乙太網路"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"零打擾"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"藍牙"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"找不到配對的裝置"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"輕觸即可連結/取消連結裝置"</string>
@@ -308,8 +316,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"已儲存"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"取消連結"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"啟用"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"明天自動開啟"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"「快速分享」和「尋找我的裝置」等功能都需要使用藍牙技術"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"藍牙會在明天早上開啟"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"分享音訊"</string>
@@ -478,8 +485,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"新增更多小工具"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"長按即可自訂小工具"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"自訂小工具"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"解鎖即可自訂小工具"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"所停用小工具的應用程式圖示"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"這個應用程式圖示用來表示安裝中的小工具"</string>
<string name="edit_widget" msgid="9030848101135393954">"編輯小工具"</string>
@@ -498,12 +504,13 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"選取小工具"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"移除小工具"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"放置所選小工具"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
+ <!-- no translation found for communal_widget_picker_title (1953369090475731663) -->
<skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
+ <!-- no translation found for communal_widget_picker_description (490515450110487871) -->
<skip />
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"螢幕鎖定小工具"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"如要使用小工具開啟應用程式,系統會要求你驗證身分。請注意,即使平板電腦已鎖定,所有人還是能查看小工具。某些小工具可能不適用於螢幕鎖定畫面,而且新增到這裡可能有安全疑慮。"</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"我知道了"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"切換使用者"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"下拉式選單"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"這個工作階段中的所有應用程式和資料都會刪除。"</string>
@@ -725,7 +732,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"預設"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"自動"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"不震動或發出聲音"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"不震動或發出聲音,並顯示在對話區的下方"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"根據裝置的設定響鈴或震動"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"根據裝置的設定響鈴或震動。根據預設,來自「<xliff:g id="APP_NAME">%1$s</xliff:g>」的對話會以對話框形式顯示。"</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"由系統判斷要讓裝置在收到這則通知時震動還是發出音效"</string>
@@ -782,6 +790,8 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Page Up 鍵"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Page Down 鍵"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Delete 鍵"</string>
+ <!-- no translation found for keyboard_key_esc (6230365950511411322) -->
+ <skip />
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Home 鍵"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"End 鍵"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Insert 鍵"</string>
@@ -1364,20 +1374,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"分割畫面"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"輸入"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"應用程式捷徑"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"無障礙"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"鍵盤快速鍵"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"搜尋快速鍵"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"收合圖示"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"展開圖示"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"或"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"返回手勢"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"主畫面手勢"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"快捷操作鍵"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"完成"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"太棒了!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"返回"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"如要返回,請用三指在觸控板上向左或右滑動。"</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"動畫顯示三指正在觸控板上向左右移動"</string>
@@ -1386,4 +1395,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"第 %1$d 級,共 %2$d 級"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"居家控制"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"在螢幕保護程式畫面上快速存取居家控制功能"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-zh-rTW/tiles_states_strings.xml b/packages/SystemUI/res/values-zh-rTW/tiles_states_strings.xml
index 4cc580434a36..cbbea4106375 100644
--- a/packages/SystemUI/res/values-zh-rTW/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-zh-rTW/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"已關閉"</item>
<item msgid="4875147066469902392">"已開啟"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"無法使用"</item>
<item msgid="5044688398303285224">"已關閉"</item>
diff --git a/packages/SystemUI/res/values-zu/strings.xml b/packages/SystemUI/res/values-zu/strings.xml
index e9e723966372..a23c69f5d771 100644
--- a/packages/SystemUI/res/values-zu/strings.xml
+++ b/packages/SystemUI/res/values-zu/strings.xml
@@ -103,8 +103,7 @@
<string name="screenshot_detected_template" msgid="7940376642921719915">"I-<xliff:g id="APPNAME">%1$s</xliff:g> ithole lesi sithombe-skrini."</string>
<string name="screenshot_detected_multiple_template" msgid="7644827792093819241">"I-<xliff:g id="APPNAME">%1$s</xliff:g> namanye ama-app avuliwe athole lesi sithombe-skrini."</string>
<string name="app_clips_save_add_to_note" msgid="3460200751278069445">"Engeza kunothi"</string>
- <!-- no translation found for backlinks_include_link (4562093591148248158) -->
- <skip />
+ <string name="backlinks_include_link" msgid="4562093591148248158">"Faka ilinki"</string>
<string name="screenrecord_title" msgid="4257171601439507792">"Okokuqopha iskrini"</string>
<string name="screenrecord_background_processing_label" msgid="7244617554884238898">"Icubungula okokuqopha iskrini"</string>
<string name="screenrecord_channel_description" msgid="4147077128486138351">"Isaziso esiqhubekayo seseshini yokurekhoda isikrini"</string>
@@ -127,31 +126,27 @@
<string name="screenrecord_save_text" msgid="3008973099800840163">"Thepha ukuze ubuke"</string>
<string name="screenrecord_save_error" msgid="5862648532560118815">"Iphutha lokulondoloza okokuqopha iskrini"</string>
<string name="screenrecord_start_error" msgid="2200660692479682368">"Iphutha lokuqala ukurekhoda isikrini"</string>
- <!-- no translation found for screenrecord_stop_dialog_title (2685522129492260887) -->
- <skip />
- <!-- no translation found for screenrecord_stop_dialog_message (1926783607059442889) -->
- <skip />
- <string name="screenrecord_stop_dialog_message_specific_app" msgid="5285148796772616326">"Uzoyeka ukurekhoda &lt;b&gt;i-<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for screenrecord_stop_dialog_button (2883812564938194350) -->
- <skip />
+ <string name="screenrecord_stop_dialog_title" msgid="8716193661764511095">"Misa ukurekhoda?"</string>
+ <string name="screenrecord_stop_dialog_message" msgid="6262768207331626817">"Njengamanje urekhoda sonke isikrini sakho"</string>
+ <string name="screenrecord_stop_dialog_message_specific_app" msgid="5995770227684523244">"Njengamanje urekhoda i-<xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
+ <string name="screenrecord_stop_dialog_button" msgid="2883812564938194350">"Misa ukurekhoda"</string>
<string name="share_to_app_chip_accessibility_label" msgid="4210256229976947065">"Yabelana ngesikrini"</string>
- <!-- no translation found for share_to_app_stop_dialog_title (9212915050910250438) -->
- <skip />
- <!-- no translation found for share_to_app_stop_dialog_message (3181723638915877339) -->
- <skip />
- <string name="share_to_app_stop_dialog_message_specific_app" msgid="124371406810544777">"Uzoyeka ukwaba &lt;b&gt;i-<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for share_to_app_stop_dialog_button (6334056916284230217) -->
- <skip />
- <string name="cast_to_other_device_chip_accessibility_label" msgid="1680650146639059938">"Isikrini sokusakaza"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_title (1910372600290258193) -->
- <skip />
- <!-- no translation found for cast_to_other_device_stop_dialog_message (1502520537030715412) -->
- <skip />
- <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="4891536209254041850">"Uzoyeka ukusakaza &lt;b&gt;i-<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;"</string>
- <!-- no translation found for cast_to_other_device_stop_dialog_button (6420183747435521834) -->
- <skip />
- <!-- no translation found for close_dialog_button (4749497706540104133) -->
- <skip />
+ <string name="share_to_app_stop_dialog_title" msgid="9212915050910250438">"Misa ukwabelana ngeskrini?"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen_with_host_app" msgid="522823522115375414">"Njengamanje wabelana ngaso sonke isikrini sakho ne-<xliff:g id="HOST_APP_NAME">%1$s</xliff:g>"</string>
+ <string name="share_to_app_stop_dialog_message_entire_screen" msgid="5090115386271179270">"Njengamanje wabelana ngaso sonke isikrini sakho ne-app"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_specific" msgid="5923772039347985172">"Njengamanje wabelana nge-<xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g>"</string>
+ <string name="share_to_app_stop_dialog_message_single_app_generic" msgid="6681016774654578261">"Njengamanje wabelana nge-app"</string>
+ <string name="share_to_app_stop_dialog_button" msgid="6334056916284230217">"Misa ukwabelana"</string>
+ <string name="cast_screen_to_other_device_chip_accessibility_label" msgid="4687917476203009885">"Isikrini sokusakaza"</string>
+ <string name="cast_to_other_device_stop_dialog_title" msgid="7836517190930357326">"Misa ukusakaza?"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen_with_device" msgid="1474703115926205251">"Njengamanje usakaza sonke isikrini sakho ku-<xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen" msgid="8419219169553867625">"Njengamanje usakaza sonke isikrini sakho kudivayisi eseduzane"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app_with_device" msgid="2715934698604085519">"Njengamanje usakaza i-<xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> ku-<xliff:g id="DEVICE_NAME">%2$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_specific_app" msgid="8616103075630934513">"Njengamanje usakaza i-<xliff:g id="APP_BEING_SHARED_NAME">%1$s</xliff:g> kudivayisi eseduzane"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic_with_device" msgid="9213582497852420203">"Njengamanje usakaza ku-<xliff:g id="DEVICE_NAME">%1$s</xliff:g>"</string>
+ <string name="cast_to_other_device_stop_dialog_message_generic" msgid="4100272100480415076">"Njengamanje usakaza kudivayisi eseduzane"</string>
+ <string name="cast_to_other_device_stop_dialog_button" msgid="6420183747435521834">"Misa ukusakaza"</string>
+ <string name="close_dialog_button" msgid="4749497706540104133">"Vala"</string>
<string name="issuerecord_title" msgid="286627115110121849">"Ushicilelo Lokurekhoda"</string>
<string name="issuerecord_background_processing_label" msgid="1666840264959336876">"Icubungula ushicilelo lokurekhoda"</string>
<string name="issuerecord_channel_description" msgid="6142326363431474632">"Isaziso esiqhubekayo seqoqo leseshini yoshicilelo"</string>
@@ -162,8 +157,7 @@
<string name="issuerecord_save_error" msgid="6913040083446722726">"Iphutha ekulondolozeni ushicilelo lokurekhoda"</string>
<string name="issuerecord_start_error" msgid="3402782952722871190">"Iphutha lokuqalisa ushicilelo lokurekhoda"</string>
<string name="immersive_cling_title" msgid="8372056499315585941">"Ukubuka isikrini esigcwele"</string>
- <!-- no translation found for immersive_cling_description (2717426731830851921) -->
- <skip />
+ <string name="immersive_cling_description" msgid="2717426731830851921">"Ukuze uphume, swayiphela phansi kusukela phezulu esikrinini sakho"</string>
<string name="immersive_cling_positive" msgid="3076681691468978568">"Ngiyezwa"</string>
<string name="accessibility_back" msgid="6530104400086152611">"Emuva"</string>
<string name="accessibility_home" msgid="5430449841237966217">"Ekhaya"</string>
@@ -196,8 +190,7 @@
<string name="biometric_dialog_tap_confirm_with_face_alt_1" msgid="439152621640507113">"Vula ngobuso. Cindezela ukuze uqhubeke."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_2" msgid="8586608186457385108">"Ubuso buyaziwa. Cindezela ukuze uqhubeke."</string>
<string name="biometric_dialog_tap_confirm_with_face_alt_3" msgid="2192670471930606539">"Ubuso buyaziwa. Cindezela isithonjana sokuvula ukuze uqhubeke."</string>
- <!-- no translation found for biometric_dialog_tap_confirm_with_face_sfps (2499213248903257928) -->
- <skip />
+ <string name="biometric_dialog_tap_confirm_with_face_sfps" msgid="2499213248903257928">"Kuvulwe ngobuso. Thepha ukuze uqhubeke."</string>
<string name="biometric_dialog_authenticated" msgid="7337147327545272484">"Kugunyaziwe"</string>
<string name="biometric_dialog_cancel_authentication" msgid="981316588773442637">"Khansela Ukuqinisekisa"</string>
<string name="biometric_dialog_content_view_more_options_button" msgid="2663810393874865475">"Okukhethwayo Okwengeziwe"</string>
@@ -297,6 +290,8 @@
<string name="start_dreams" msgid="9131802557946276718">"Isigciniskrini"</string>
<string name="ethernet_label" msgid="2203544727007463351">"I-Ethernet"</string>
<string name="quick_settings_dnd_label" msgid="7728690179108024338">"Ungaphazamisi"</string>
+ <!-- no translation found for quick_settings_modes_label (5407025818652750501) -->
+ <skip />
<string name="quick_settings_bluetooth_label" msgid="7018763367142041481">"I-Bluetooth"</string>
<string name="quick_settings_bluetooth_detail_empty_text" msgid="5760239584390514322">"Awekho amadivayisi abhanqiwe atholakalayo"</string>
<string name="quick_settings_bluetooth_tile_subtitle" msgid="212752719010829550">"Thepha ukuze uxhumae noma ungaxhumi idivaysi"</string>
@@ -308,8 +303,7 @@
<string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Ilondoloziwe"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_disconnect" msgid="415980329093277342">"nqamula"</string>
<string name="accessibility_quick_settings_bluetooth_device_tap_to_activate" msgid="3724301751036877403">"yenza kusebenze"</string>
- <!-- no translation found for turn_on_bluetooth_auto_tomorrow (3345758139235739006) -->
- <skip />
+ <string name="turn_on_bluetooth_auto_tomorrow" msgid="3345758139235739006">"Vula ngokuzenzekelayo kusasa"</string>
<string name="turn_on_bluetooth_auto_info_disabled" msgid="682984290339848844">"Izakhi ezifana nokuthi Ukwabelana Ngokushesha kanye nokuthi Thola Idivayisi Yami zisebenzisa i-Bluetooth"</string>
<string name="turn_on_bluetooth_auto_info_enabled" msgid="7440944034584560279">"IBluetooth izovuleka kusasa ekuseni"</string>
<string name="quick_settings_bluetooth_audio_sharing_button" msgid="7545274861795853838">"Yabelana ngomsindo"</string>
@@ -478,8 +472,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Engeza amawijethi engeziwe"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Cindezela isikhathi eside ukuze wenze ngokwezifiso amawijethi"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Yenza ngokwezifiso amawijethi"</string>
- <!-- no translation found for unlock_reason_to_customize_widgets (5011909432460546033) -->
- <skip />
+ <string name="unlock_reason_to_customize_widgets" msgid="5011909432460546033">"Vula ukuze uhlele amawijethi ngendlela oyifisayo"</string>
<string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Isithonjana se-app sewijethi evaliwe"</string>
<string name="icon_description_for_pending_widget" msgid="8413816401868001755">"Isithonjana se-app sewijethi siyafakwa"</string>
<string name="edit_widget" msgid="9030848101135393954">"Hlela amawijethi"</string>
@@ -498,12 +491,11 @@
<string name="accessibility_action_label_select_widget" msgid="8897281501387398191">"khetha iwijethi"</string>
<string name="accessibility_action_label_remove_widget" msgid="3373779447448758070">"susa iwijethi"</string>
<string name="accessibility_action_label_place_widget" msgid="1914197458644168978">"beka iwijethi ekhethiwe"</string>
- <!-- no translation found for communal_widgets_disclaimer_title (1150954395585308868) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_text (1423545475160506349) -->
- <skip />
- <!-- no translation found for communal_widgets_disclaimer_button (4423059765740780753) -->
- <skip />
+ <string name="communal_widget_picker_title" msgid="1953369090475731663">"Amawijethi wesikrini esikhiyiwe"</string>
+ <string name="communal_widget_picker_description" msgid="490515450110487871">"Noma ubani angabuka amawijethi ngisho noma ithebulethi ikhiyiwe."</string>
+ <string name="communal_widgets_disclaimer_title" msgid="1150954395585308868">"Amawijethi wesikrini esikhiyiwe"</string>
+ <string name="communal_widgets_disclaimer_text" msgid="1423545475160506349">"Ukuze uvule i-app usebenzisa iwijethi, uzodinga ukuqinisekisa ukuthi nguwe. Futhi, khumbula ukuthi noma ubani angakwazi ukuzibuka, nanoma ithebhulethi yakho ikhiyiwe. Amanye amawijethi kungenzeka abengahloselwe ukukhiya isikrini sakho futhi kungenzeka awaphephile ukuthi angafakwa lapha."</string>
+ <string name="communal_widgets_disclaimer_button" msgid="4423059765740780753">"Ngiyezwa"</string>
<string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Shintsha umsebenzisi"</string>
<string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"imenyu yokudonsela phansi"</string>
<string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Wonke ama-app nedatha kulesi sikhathi azosuswa."</string>
@@ -725,7 +717,8 @@
<string name="notification_alert_title" msgid="3656229781017543655">"Okuzenzekelayo"</string>
<string name="notification_automatic_title" msgid="3745465364578762652">"Okuzenzekelayo"</string>
<string name="notification_channel_summary_low" msgid="4860617986908931158">"Awukho umsindo noma ukudlidliza"</string>
- <string name="notification_conversation_summary_low" msgid="1734433426085468009">"Awukho umsindo noma ukudlidliza futhi ivela ngezansi esigabeni sengxoxo"</string>
+ <!-- no translation found for notification_conversation_summary_low (3855696451919728790) -->
+ <skip />
<string name="notification_channel_summary_default" msgid="777294388712200605">"Ingase ikhale noma idlidlize ngokusekelwe kumasethingi edivayisi"</string>
<string name="notification_channel_summary_default_with_bubbles" msgid="3482483084451555344">"Ingase ikhale noma idlidlize kuya ngamasethingi wedivayisi. Izingxoxo ezivela ku-<xliff:g id="APP_NAME">%1$s</xliff:g> ziba yibhamuza ngokuzenzakalela."</string>
<string name="notification_channel_summary_automatic" msgid="5813109268050235275">"Vumela isistimu inqume uma lesi saziso kufanele senze umsindo noma sidlidlize"</string>
@@ -782,6 +775,7 @@
<string name="keyboard_key_page_up" msgid="173914303254199845">"Ikhasi phezulu"</string>
<string name="keyboard_key_page_down" msgid="9035902490071829731">"Ikhasi phansi"</string>
<string name="keyboard_key_forward_del" msgid="5325501825762733459">"Susa"</string>
+ <string name="keyboard_key_esc" msgid="6230365950511411322">"Esc"</string>
<string name="keyboard_key_move_home" msgid="3496502501803911971">"Ekhaya"</string>
<string name="keyboard_key_move_end" msgid="99190401463834854">"Phelisa"</string>
<string name="keyboard_key_insert" msgid="4621692715704410493">"Faka"</string>
@@ -1364,20 +1358,19 @@
<string name="shortcutHelper_category_split_screen" msgid="1159669813444812244">"Hlukanisa isikrini"</string>
<string name="shortcut_helper_category_input" msgid="8674018654124839566">"Okokufaka"</string>
<string name="shortcut_helper_category_app_shortcuts" msgid="8010249408308587117">"Izinqamuleli Zohlelo lokusebenza"</string>
+ <!-- no translation found for shortcut_helper_category_current_app_shortcuts (4017840565974573628) -->
+ <skip />
<string name="shortcut_helper_category_a11y" msgid="6314444792641773464">"Ukufinyeleleka"</string>
<string name="shortcut_helper_title" msgid="8567500639300970049">"Izinqamuleli zekhibhodi"</string>
<string name="shortcut_helper_search_placeholder" msgid="5488547526269871819">"Sesha izinqamuleli"</string>
<string name="shortcut_helper_content_description_collapse_icon" msgid="8028015738431664954">"Goqa isithonjana"</string>
<string name="shortcut_helper_content_description_expand_icon" msgid="1084435697860417390">"Nweba isithonjana"</string>
<string name="shortcut_helper_key_combinations_or_separator" msgid="7082902112102125540">"noma"</string>
- <!-- no translation found for touchpad_tutorial_back_gesture_button (2746834288077265946) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_home_gesture_button (7640544867625955304) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_action_key_button (3220074511852927267) -->
- <skip />
- <!-- no translation found for touchpad_tutorial_done_button (176168488821755503) -->
- <skip />
+ <string name="touchpad_tutorial_back_gesture_button" msgid="2746834288077265946">"Ukunyakazisa umzimba kwangemuva"</string>
+ <string name="touchpad_tutorial_home_gesture_button" msgid="7640544867625955304">"Ukunyakazisa umzimba kwasekhaya"</string>
+ <string name="touchpad_tutorial_action_key_button" msgid="3220074511852927267">"Inkinobho yokufinyelela"</string>
+ <string name="touchpad_tutorial_done_button" msgid="176168488821755503">"Kwenziwe"</string>
+ <string name="touchpad_tutorial_gesture_done" msgid="4784438360736821255">"Umsebenzi omuhle!"</string>
<string name="touchpad_back_gesture_action_title" msgid="7199067250654332735">"Buyela emuva"</string>
<string name="touchpad_back_gesture_guidance" msgid="4222430588599527272">"Ukuze ubuyele emuva, swayiphela kwesokunxele noma kwesokudla usebenzisa iminwe emithathu noma yikuphi ephedini yokuthinta."</string>
<string name="touchpad_back_gesture_animation_content_description" msgid="2646107450922379918">"Iphedi yokuthinta ebonisa iminwe emithathu iya kwesokudla nakwesokunxele"</string>
@@ -1386,4 +1379,6 @@
<string name="keyboard_backlight_value" msgid="7336398765584393538">"Ileveli %1$d ka-%2$d"</string>
<string name="home_controls_dream_label" msgid="6567105701292324257">"Izilawuli Zasekhaya"</string>
<string name="home_controls_dream_description" msgid="4644150952104035789">"Finyelela ngokushesha izilawuli zakho zasekhaya njengesigcini-skrini"</string>
+ <!-- no translation found for volume_undo_action (5815519725211877114) -->
+ <skip />
</resources>
diff --git a/packages/SystemUI/res/values-zu/tiles_states_strings.xml b/packages/SystemUI/res/values-zu/tiles_states_strings.xml
index a795ee8b9d75..8d6b84357e25 100644
--- a/packages/SystemUI/res/values-zu/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-zu/tiles_states_strings.xml
@@ -56,6 +56,9 @@
<item msgid="5376619709702103243">"Valiwe"</item>
<item msgid="4875147066469902392">"Vuliwe"</item>
</string-array>
+ <!-- no translation found for tile_states_modes:0 (7764936419245199023) -->
+ <!-- no translation found for tile_states_modes:1 (2004750556637773692) -->
+ <!-- no translation found for tile_states_modes:2 (8968530753931637871) -->
<string-array name="tile_states_flashlight">
<item msgid="3465257127433353857">"Akutholakali"</item>
<item msgid="5044688398303285224">"Valiwe"</item>
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index 80b9ec7748b9..30f23bfc9753 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -104,7 +104,7 @@
<!-- Tiles native to System UI. Order should match "quick_settings_tiles_default" -->
<string name="quick_settings_tiles_stock" translatable="false">
- internet,bt,flashlight,dnd,alarm,airplane,controls,wallet,rotation,battery,cast,screenrecord,mictoggle,cameratoggle,location,hotspot,inversion,saver,dark,work,night,reverse,reduce_brightness,qr_code_scanner,onehanded,color_correction,dream,font_scaling,record_issue,hearing_devices
+ internet,bt,flashlight,dnd,modes,alarm,airplane,controls,wallet,rotation,battery,cast,screenrecord,mictoggle,cameratoggle,location,hotspot,inversion,saver,dark,work,night,reverse,reduce_brightness,qr_code_scanner,onehanded,color_correction,dream,font_scaling,record_issue,hearing_devices
</string>
<!-- The tiles to display in QuickSettings -->
@@ -287,7 +287,8 @@
<integer name="doze_small_icon_alpha">222</integer><!-- 87% of 0xff -->
<!-- Doze: Table that translates sensor values from the doze_brightness_sensor_type sensor
- to brightness values; -1 means keeping the current brightness. -->
+ to brightness values in the integer scale [1, 255]; -1 means keeping the current
+ brightness. -->
<integer-array name="config_doze_brightness_sensor_to_brightness">
<item>-1</item> <!-- 0: OFF -->
<item>2</item> <!-- 1: NIGHT -->
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index 40bdc3eb50f8..eda7bb0e7f6d 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -1323,6 +1323,7 @@
<dimen name="magnifier_drag_handle_padding">3dp</dimen>
<!-- Magnification settings panel -->
<dimen name="magnification_setting_view_margin">24dp</dimen>
+ <dimen name="magnification_setting_view_item_horizontal_spacing">12dp</dimen>
<dimen name="magnification_setting_text_size">18sp</dimen>
<dimen name="magnification_setting_background_padding">24dp</dimen>
<dimen name="magnification_setting_background_corner_radius">28dp</dimen>
diff --git a/packages/SystemUI/res/values/flags.xml b/packages/SystemUI/res/values/flags.xml
index 763930db1d55..07a40c86d03a 100644
--- a/packages/SystemUI/res/values/flags.xml
+++ b/packages/SystemUI/res/values/flags.xml
@@ -33,9 +33,4 @@
<!-- Whether the user switcher chip shows in the status bar. When true, the multi user
avatar will no longer show on the lockscreen -->
<bool name="flag_user_switcher_chip">false</bool>
-
- <!-- Whether the battery icon is allowed to display a shield when battery life is being
- protected. -->
- <bool name="flag_battery_shield_icon">false</bool>
-
</resources>
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index 0637d3911b29..acc12d7fdaf0 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -321,11 +321,11 @@
<!-- A toast message shown when the screen recording cannot be started due to a generic error [CHAR LIMIT=NONE] -->
<string name="screenrecord_start_error">Error starting screen recording</string>
<!-- Title for a dialog shown to the user that will let them stop recording their screen [CHAR LIMIT=50] -->
- <string name="screenrecord_stop_dialog_title">Stop recording screen?</string>
- <!-- Text telling a user that they will stop recording their screen if they click the "Stop recording" button [CHAR LIMIT=100] -->
- <string name="screenrecord_stop_dialog_message">You will stop recording your screen</string>
- <!-- Text telling a user that they will stop recording the contents of the specified [app_name] if they click the "Stop recording" button. Note that the app name will appear in bold. [CHAR LIMIT=100] -->
- <string name="screenrecord_stop_dialog_message_specific_app">You will stop recording &lt;b><xliff:g id="app_name" example="Photos App">%1$s</xliff:g>&lt;/b></string>
+ <string name="screenrecord_stop_dialog_title">Stop recording?</string>
+ <!-- Text telling a user that they're currently recording their screen [CHAR LIMIT=100] -->
+ <string name="screenrecord_stop_dialog_message">You\'re currently recording your entire screen</string>
+ <!-- Text telling a user that they're currently recording the contents of the specified [app_name]. [CHAR LIMIT=100] -->
+ <string name="screenrecord_stop_dialog_message_specific_app">You\'re currently recording <xliff:g id="app_name" example="Photos App">%1$s</xliff:g></string>
<!-- Button to stop a screen recording [CHAR LIMIT=35] -->
<string name="screenrecord_stop_dialog_button">Stop recording</string>
@@ -333,25 +333,33 @@
<string name="share_to_app_chip_accessibility_label">Sharing screen</string>
<!-- Title for a dialog shown to the user that will let them stop sharing their screen to another app on the device [CHAR LIMIT=50] -->
<string name="share_to_app_stop_dialog_title">Stop sharing screen?</string>
- <!-- Text telling a user that they will stop sharing their screen if they click the "Stop sharing" button [CHAR LIMIT=100] -->
- <string name="share_to_app_stop_dialog_message">You will stop sharing your screen</string>
- <!-- Text telling a user that they will stop sharing the contents of the specified [app_name] if they click the "Stop sharing" button. Note that the app name will appear in bold. [CHAR LIMIT=100] -->
- <string name="share_to_app_stop_dialog_message_specific_app">You will stop sharing &lt;b><xliff:g id="app_name" example="Photos App">%1$s</xliff:g>&lt;/b></string>
+ <!-- Text telling a user that they're currently sharing their entire screen to [host_app_name] (i.e. [host_app_name] can currently see all screen content) [CHAR LIMIT=150] -->
+ <string name="share_to_app_stop_dialog_message_entire_screen_with_host_app">You\'re currently sharing your entire screen with <xliff:g id="host_app_name" example="Screen Recorder App">%1$s</xliff:g></string>
+ <!-- Text telling a user that they're currently sharing their entire screen to an app (but we don't know what app) [CHAR LIMIT=150] -->
+ <string name="share_to_app_stop_dialog_message_entire_screen">You\'re currently sharing your entire screen with an app</string>
+ <!-- Text telling a user that they're currently sharing the contents of [app_being_shared_name]. (i.e. some app can currently see the content of [app_being_shared_name]). [CHAR LIMIT=150] -->
+ <string name="share_to_app_stop_dialog_message_single_app_specific">You\'re currently sharing <xliff:g id="app_being_shared_name" example="Photos App">%1$s</xliff:g></string>
+ <!-- Text telling a user that they're currently sharing their screen [CHAR LIMIT=150] -->
+ <string name="share_to_app_stop_dialog_message_single_app_generic">You\'re currently sharing an app</string>
<!-- Button to stop screen sharing [CHAR LIMIT=35] -->
<string name="share_to_app_stop_dialog_button">Stop sharing</string>
<!-- Content description for the status bar chip shown to the user when they're casting their screen to a different device [CHAR LIMIT=NONE] -->
<string name="cast_screen_to_other_device_chip_accessibility_label">Casting screen</string>
- <!-- Title for a dialog shown to the user that will let them stop casting their screen to a different device [CHAR LIMIT=50] -->
- <string name="cast_screen_to_other_device_stop_dialog_title">Stop casting screen?</string>
<!-- Title for a dialog shown to the user that will let them stop casting to a different device [CHAR LIMIT=50] -->
<string name="cast_to_other_device_stop_dialog_title">Stop casting?</string>
- <!-- Text telling a user that they will stop casting their screen to a different device if they click the "Stop casting" button [CHAR LIMIT=100] -->
- <string name="cast_screen_to_other_device_stop_dialog_message">You will stop casting your screen</string>
- <!-- Text telling a user that they will stop casting the contents of the specified [app_name] to a different device if they click the "Stop casting" button. Note that the app name will appear in bold. [CHAR LIMIT=100] -->
- <string name="cast_screen_to_other_device_stop_dialog_message_specific_app">You will stop casting &lt;b><xliff:g id="app_name" example="Photos App">%1$s</xliff:g>&lt;/b></string>
- <!-- Text telling a user that they're currently casting to a different device [CHAR LIMIT=100] -->
- <string name="cast_to_other_device_stop_dialog_message">You\'re currently casting</string>
+ <!-- Text telling a user that they're currently casting their screen to a different device. The device receiving the cast is named [device_name]. [CHAR LIMIT=150] -->
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen_with_device">You\'re currently casting your entire screen to <xliff:g id="device_name" example="Living Room Device">%1$s</xliff:g></string>
+ <!-- Text telling a user that they're currently casting their screen to a nearby device. [CHAR LIMIT=150] -->
+ <string name="cast_to_other_device_stop_dialog_message_entire_screen">You\'re currently casting your entire screen to a nearby device</string>
+ <!-- Text telling a user that they're currently casting the contents of [app_being_shared_name] to a different device. The device receiving the cast is named [device_name]. [CHAR LIMIT=150] -->
+ <string name="cast_to_other_device_stop_dialog_message_specific_app_with_device">You\'re currently casting <xliff:g id="app_being_shared_name" example="Photos App">%1$s</xliff:g> to <xliff:g id="device_name" example="Living Room Device">%2$s</xliff:g></string>
+ <!-- Text telling a user that they're currently casting the contents of [app_being_shared_name] to a different device. [CHAR LIMIT=150] -->
+ <string name="cast_to_other_device_stop_dialog_message_specific_app">You\'re currently casting <xliff:g id="app_being_shared_name" example="Photos App">%1$s</xliff:g> to a nearby device</string>
+ <!-- Text telling a user that they're currently casting to a different device. The device receiving the cast is named [device_name]. [CHAR LIMIT=100] -->
+ <string name="cast_to_other_device_stop_dialog_message_generic_with_device">You\'re currently casting to <xliff:g id="device_name" example="Living Room Device">%1$s</xliff:g></string>
+ <!-- Text telling a user that they're currently casting to a nearby device [CHAR LIMIT=100] -->
+ <string name="cast_to_other_device_stop_dialog_message_generic">You\'re currently casting to a nearby device</string>
<!-- Button to stop screen casting to a different device [CHAR LIMIT=35] -->
<string name="cast_to_other_device_stop_dialog_button">Stop casting</string>
@@ -708,6 +716,8 @@
<!-- QuickSettings: Do not disturb - Priority only [CHAR LIMIT=NONE] -->
<!-- QuickSettings: Do not disturb - Alarms only [CHAR LIMIT=NONE] -->
<!-- QuickSettings: Do not disturb - Total silence [CHAR LIMIT=NONE] -->
+ <!-- QuickSettings: Priority modes [CHAR LIMIT=NONE] -->
+ <string name="quick_settings_modes_label">Priority modes</string>
<!-- QuickSettings: Bluetooth [CHAR LIMIT=NONE] -->
<string name="quick_settings_bluetooth_label">Bluetooth</string>
<!-- QuickSettings: Bluetooth (Multiple) [CHAR LIMIT=NONE] -->
@@ -1074,6 +1084,21 @@
<!-- QuickStep: Accessibility to toggle overview [CHAR LIMIT=40] -->
<string name="quick_step_accessibility_toggle_overview">Toggle Overview</string>
+ <!-- Priority modes dialog title [CHAR LIMIT=35] -->
+ <string name="zen_modes_dialog_title">Priority modes</string>
+
+ <!-- Priority modes dialog confirmation button [CHAR LIMIT=15] -->
+ <string name="zen_modes_dialog_done">Done</string>
+
+ <!-- Priority modes dialog settings shortcut button [CHAR LIMIT=15] -->
+ <string name="zen_modes_dialog_settings">Settings</string>
+
+ <!-- Priority modes: label for an active mode [CHAR LIMIT=35] -->
+ <string name="zen_mode_on">On</string>
+
+ <!-- Priority modes: label for an inactive mode [CHAR LIMIT=35] -->
+ <string name="zen_mode_off">Off</string>
+
<!-- Zen mode: Priority only introduction message on first use -->
<string name="zen_priority_introduction">You won\'t be disturbed by sounds and vibrations, except from alarms, reminders, events, and callers you specify. You\'ll still hear anything you choose to play including music, videos, and games.</string>
@@ -1235,6 +1260,12 @@
<string name="accessibility_action_label_remove_widget">remove widget</string>
<!-- Label for accessibility action to place a widget in edit mode after selecting move widget. [CHAR LIMIT=NONE] -->
<string name="accessibility_action_label_place_widget">place selected widget</string>
+ <!-- Title in the communal widget picker. [CHAR LIMIT=50] -->
+ <string name="communal_widget_picker_title">Lock screen widgets</string>
+ <!-- Text displayed below the title in the communal widget picker providing additional details about the communal surface. [CHAR LIMIT=80] -->
+ <string name="communal_widget_picker_description">Anyone can view widgets on your lock screen, even if your tablet\'s locked.</string>
+ <!-- Label for accessibility action to unselect a widget in edit mode. [CHAR LIMIT=NONE] -->
+ <string name="accessibility_action_label_unselect_widget">unselect widget</string>
<!-- Title shown above information regarding lock screen widgets. [CHAR LIMIT=50] -->
<string name="communal_widgets_disclaimer_title">Lock screen widgets</string>
<!-- Information about lock screen widgets presented to the user. [CHAR LIMIT=NONE] -->
@@ -1400,10 +1431,10 @@
<string name="no_unseen_notif_text">No new notifications</string>
<!-- Title of heads up notification for adaptive notifications user education. [CHAR LIMIT=50] -->
- <string name="adaptive_notification_edu_hun_title">Adaptive notifications is on</string>
+ <string name="adaptive_notification_edu_hun_title">Notification cooldown is on</string>
<!-- Text of heads up notification for adaptive notifications user education. [CHAR LIMIT=100] -->
- <string name="adaptive_notification_edu_hun_text">Your device now lowers the volume and reduces pop-ups on the screen for up to two minutes when you receive many notifications in a short time span.</string>
+ <string name="adaptive_notification_edu_hun_text">Your device volume and alerts are reduced automatically for up to 2 minutes when you get too many notifications at once.</string>
<!-- Action label for going to adaptive notification settings [CHAR LIMIT=20] -->
<string name="go_to_adaptive_notification_settings">Turn off</string>
@@ -1859,7 +1890,7 @@
<string name="notification_channel_summary_low">No sound or vibration</string>
<!-- [CHAR LIMIT=150] Notification Importance title: low importance level summary -->
- <string name="notification_conversation_summary_low">No sound or vibration and appears lower in conversation section</string>
+ <string name="notification_conversation_summary_low">No sound or vibration but still appears in the conversation section</string>
<!-- [CHAR LIMIT=150] Notification Importance title: normal importance level summary -->
<string name="notification_channel_summary_default">May ring or vibrate based on device settings</string>
@@ -2038,6 +2069,8 @@
<string name="keyboard_key_page_down">Page Down</string>
<!-- Name used to refer to the "Delete" key on the keyboard. -->
<string name="keyboard_key_forward_del">Delete</string>
+ <!-- Name used to refer to the "Esc" or "Escape" key on the keyboard. -->
+ <string name="keyboard_key_esc">Esc</string>
<!-- Name used to refer to the "Home" move key on the keyboard. -->
<string name="keyboard_key_move_home">Home</string>
<!-- Name used to refer to the "End" move key on the keyboard. -->
@@ -3583,6 +3616,10 @@
that shows the user which keyboard shortcuts they can use. The "App shortcuts" are
for example "Open browser" or "Open calculator". [CHAR LIMIT=NONE] -->
<string name="shortcut_helper_category_app_shortcuts">App shortcuts</string>
+ <!-- Default Title of the keyboard shortcut helper category for current app. The helper is a
+ component that shows the user which keyboard shortcuts they can use. The current app
+ shortcuts are shortcuts provided by the currently open app. [CHAR LIMIT=NONE] -->
+ <string name="shortcut_helper_category_current_app_shortcuts">Current App</string>
<!-- Title of the keyboard shortcut helper category "Accessibility". The helper is a component
that shows the user which keyboard shortcuts they can use. The "Accessibility" shortcuts
are for example "Turn on talkback". [CHAR LIMIT=NONE] -->
@@ -3638,4 +3675,33 @@
<string name="home_controls_dream_label">Home Controls</string>
<!-- Description for home control panel [CHAR LIMIT=67] -->
<string name="home_controls_dream_description">Quickly access your home controls as a screensaver</string>
+ <!-- Label for volume undo action [CHAR LIMIT=NONE] -->
+ <string name="volume_undo_action">Undo</string>
+
+ <!-- Keyboard touchpad contextual education strings-->
+ <!-- Education toast text for Back [CHAR_LIMIT=100] -->
+ <string name="back_edu_toast_content">To go back, swipe left or right with three fingers on the touchpad</string>
+ <!-- Education toast text for Home [CHAR_LIMIT=100] -->
+ <string name="home_edu_toast_content">To go home, swipe up with three fingers on the touchpad</string>
+ <!-- Education toast text for Overview [CHAR_LIMIT=100] -->
+ <string name="overview_edu_toast_content">To view recent apps, swipe up and hold with three fingers on the touchpad</string>
+ <!-- Education toast text for All Apps [CHAR_LIMIT=100] -->
+ <string name="all_apps_edu_toast_content">To view all your apps, press the action key on your keyboard</string>
+
+ <!-- Education notification title for Back [CHAR_LIMIT=100] -->
+ <string name="back_edu_notification_title">Use your touchpad to go back</string>
+ <!-- Education notification text for Back [CHAR_LIMIT=100] -->
+ <string name="back_edu_notification_content">Swipe left or right using three fingers. Tap to learn more gestures.</string>
+ <!-- Education notification title for Home [CHAR_LIMIT=100] -->
+ <string name="home_edu_notification_title">Use your touchpad to go home</string>
+ <!-- Education notification text for Home [CHAR_LIMIT=100] -->
+ <string name="home_edu_notification_content">Swipe up using three fingers. Tap to learn more gestures.</string>
+ <!-- Education notification title for Overview [CHAR_LIMIT=100] -->
+ <string name="overview_edu_notification_title">Use your touchpad to view recent apps</string>
+ <!-- Education notification text for Overview [CHAR_LIMIT=100] -->
+ <string name="overview_edu_notification_content">Swipe up and hold using three fingers. Tap to learn more gestures.</string>
+ <!-- Education notification title for All Apps [CHAR_LIMIT=100] -->
+ <string name="all_apps_edu_notification_title">Use your keyboard to view all apps</string>
+ <!-- Education notification text for All Apps [CHAR_LIMIT=100] -->
+ <string name="all_apps_edu_notification_content">Press the action key at any time. Tap to learn more gestures.</string>
</resources>
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
index 7475eb2eceaa..36912acbbdb9 100644
--- a/packages/SystemUI/res/values/styles.xml
+++ b/packages/SystemUI/res/values/styles.xml
@@ -1604,7 +1604,6 @@
<item name="android:fontFamily">google-sans</item>
<item name="android:textColor">?androidprv:attr/textColorPrimary</item>
<item name="android:textSize">@dimen/magnification_setting_text_size</item>
- <item name="android:singleLine">true</item>
</style>
<style name="TextAppearance.MagnificationSetting.EditButton">
diff --git a/packages/SystemUI/res/values/tiles_states_strings.xml b/packages/SystemUI/res/values/tiles_states_strings.xml
index ad09b466dd3e..c7029272db7d 100644
--- a/packages/SystemUI/res/values/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values/tiles_states_strings.xml
@@ -85,6 +85,16 @@
<item>On</item>
</string-array>
+ <!-- State names for modes (Priority modes) tile: unavailable, off, on.
+ This subtitle is shown when the tile is in that particular state but does not set its own
+ subtitle, so some of these may never appear on screen. They should still be translated as
+ if they could appear. [CHAR LIMIT=32] -->
+ <string-array name="tile_states_modes">
+ <item>Unavailable</item>
+ <item>Off</item>
+ <item>On</item>
+ </string-array>
+
<!-- State names for flashlight tile: unavailable, off, on.
This subtitle is shown when the tile is in that particular state but does not set its own
subtitle, so some of these may never appear on screen. They should still be translated as
diff --git a/packages/SystemUI/res/xml/large_screen_shade_header.xml b/packages/SystemUI/res/xml/large_screen_shade_header.xml
index fe61c46e341d..eb0aae9ebcf1 100644
--- a/packages/SystemUI/res/xml/large_screen_shade_header.xml
+++ b/packages/SystemUI/res/xml/large_screen_shade_header.xml
@@ -33,6 +33,7 @@
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_marginStart="8dp"
+ app:layout_constraintBaseline_toBaselineOf="@id/clock"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/clock"
app:layout_constraintTop_toTopOf="parent" />
diff --git a/packages/SystemUI/schemas/com.android.systemui.communal.data.db.CommunalDatabase/2.json b/packages/SystemUI/schemas/com.android.systemui.communal.data.db.CommunalDatabase/2.json
new file mode 100644
index 000000000000..f10d92a3fc0f
--- /dev/null
+++ b/packages/SystemUI/schemas/com.android.systemui.communal.data.db.CommunalDatabase/2.json
@@ -0,0 +1,81 @@
+{
+ "formatVersion": 1,
+ "database": {
+ "version": 2,
+ "identityHash": "02e2da2d36e6955200edd5fb49e63c72",
+ "entities": [
+ {
+ "tableName": "communal_widget_table",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`uid` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `widget_id` INTEGER NOT NULL, `component_name` TEXT NOT NULL, `item_id` INTEGER NOT NULL, `user_serial_number` INTEGER NOT NULL DEFAULT -1)",
+ "fields": [
+ {
+ "fieldPath": "uid",
+ "columnName": "uid",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "widgetId",
+ "columnName": "widget_id",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "componentName",
+ "columnName": "component_name",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "itemId",
+ "columnName": "item_id",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "userSerialNumber",
+ "columnName": "user_serial_number",
+ "affinity": "INTEGER",
+ "notNull": true,
+ "defaultValue": "-1"
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": true,
+ "columnNames": [
+ "uid"
+ ]
+ }
+ },
+ {
+ "tableName": "communal_item_rank_table",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`uid` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `rank` INTEGER NOT NULL DEFAULT 0)",
+ "fields": [
+ {
+ "fieldPath": "uid",
+ "columnName": "uid",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "rank",
+ "columnName": "rank",
+ "affinity": "INTEGER",
+ "notNull": true,
+ "defaultValue": "0"
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": true,
+ "columnNames": [
+ "uid"
+ ]
+ }
+ }
+ ],
+ "setupQueries": [
+ "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
+ "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '02e2da2d36e6955200edd5fb49e63c72')"
+ ]
+ }
+} \ No newline at end of file
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/education/GestureType.kt b/packages/SystemUI/shared/src/com/android/systemui/shared/education/GestureType.kt
new file mode 100644
index 000000000000..9a5c77ac1679
--- /dev/null
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/education/GestureType.kt
@@ -0,0 +1,21 @@
+/*
+ * 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.systemui.shared.education
+
+enum class GestureType {
+ BACK_GESTURE,
+}
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/pip/PipSurfaceTransactionHelper.java b/packages/SystemUI/shared/src/com/android/systemui/shared/pip/PipSurfaceTransactionHelper.java
index c225cbcc6e81..f2899889a3a0 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/pip/PipSurfaceTransactionHelper.java
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/pip/PipSurfaceTransactionHelper.java
@@ -128,19 +128,20 @@ public class PipSurfaceTransactionHelper {
mTmpDestinationRect.inset(insets);
// Scale by the shortest edge and offset such that the top/left of the scaled inset
// source rect aligns with the top/left of the destination bounds
- final float scale = sourceBounds.width() <= sourceBounds.height()
- ? (float) destinationBounds.width() / sourceBounds.width()
- : (float) destinationBounds.height() / sourceBounds.height();
+ final float scale = Math.max((float) destinationBounds.width() / sourceBounds.width(),
+ (float) destinationBounds.height() / sourceBounds.height());
mTmpTransform.setRotate(degree, 0, 0);
mTmpTransform.postScale(scale, scale);
final float cornerRadius = getScaledCornerRadius(mTmpDestinationRect, destinationBounds);
// adjust the positions, take account also the insets
final float adjustedPositionX, adjustedPositionY;
if (degree < 0) {
- adjustedPositionX = positionX + insets.top * scale;
+ // Counter-clockwise rotation.
+ adjustedPositionX = positionX - insets.top * scale;
adjustedPositionY = positionY + insets.left * scale;
} else {
- adjustedPositionX = positionX - insets.top * scale;
+ // Clockwise rotation.
+ adjustedPositionX = positionX + insets.top * scale;
adjustedPositionY = positionY - insets.left * scale;
}
tx.setMatrix(leash, mTmpTransform, mTmpFloat9)
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/recents/ISystemUiProxy.aidl b/packages/SystemUI/shared/src/com/android/systemui/shared/recents/ISystemUiProxy.aidl
index 090033d41ffa..5d804cc22b39 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/recents/ISystemUiProxy.aidl
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/recents/ISystemUiProxy.aidl
@@ -120,7 +120,7 @@ interface ISystemUiProxy {
oneway void notifyTaskbarAutohideSuspend(boolean suspend) = 48;
/**
- * Notifies SystemUI to invoke IME Switcher.
+ * Notifies that the IME switcher button has been pressed.
*/
oneway void onImeSwitcherPressed() = 49;
@@ -167,5 +167,10 @@ interface ISystemUiProxy {
*/
oneway void toggleQuickSettingsPanel() = 56;
- // Next id = 57
+ /**
+ * Notifies that the IME Switcher button has been long pressed.
+ */
+ oneway void onImeSwitcherLongPress() = 57;
+
+ // Next id = 58
}
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/ActivityManagerWrapper.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/ActivityManagerWrapper.java
index 845ca5e8b9ec..3019fe796d7d 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/ActivityManagerWrapper.java
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/ActivityManagerWrapper.java
@@ -344,7 +344,7 @@ public class ActivityManagerWrapper {
* Shows a voice session identified by {@code token}
* @return true if the session was shown, false otherwise
*/
- public boolean showVoiceSession(@NonNull IBinder token, @NonNull Bundle args, int flags,
+ public boolean showVoiceSession(IBinder token, @NonNull Bundle args, int flags,
@Nullable String attributionTag) {
IVoiceInteractionManagerService service = IVoiceInteractionManagerService.Stub.asInterface(
ServiceManager.getService(Context.VOICE_INTERACTION_MANAGER_SERVICE));
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardPinBasedInputViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardPinBasedInputViewController.java
index 10d1891c8405..0f61233ac64f 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardPinBasedInputViewController.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardPinBasedInputViewController.java
@@ -34,6 +34,7 @@ import com.android.internal.util.LatencyTracker;
import com.android.internal.widget.LockPatternUtils;
import com.android.keyguard.KeyguardSecurityModel.SecurityMode;
import com.android.keyguard.domain.interactor.KeyguardKeyboardInteractor;
+import com.android.systemui.Flags;
import com.android.systemui.classifier.FalsingCollector;
import com.android.systemui.flags.FeatureFlags;
import com.android.systemui.res.R;
@@ -130,7 +131,10 @@ public abstract class KeyguardPinBasedInputViewController<T extends KeyguardPinB
verifyPasswordAndUnlock();
}
});
- okButton.setOnHoverListener(mLiftToActivateListener);
+
+ if (!Flags.simPinTalkbackFixForDoubleSubmit()) {
+ okButton.setOnHoverListener(mLiftToActivateListener);
+ }
}
if (pinInputFieldStyledFocusState()) {
collectFlow(mPasswordEntry, mKeyguardKeyboardInteractor.isAnyKeyboardConnected(),
diff --git a/packages/SystemUI/src/com/android/systemui/Dependency.java b/packages/SystemUI/src/com/android/systemui/Dependency.java
index a42f4c2dda4c..baf8f5aeba29 100644
--- a/packages/SystemUI/src/com/android/systemui/Dependency.java
+++ b/packages/SystemUI/src/com/android/systemui/Dependency.java
@@ -54,7 +54,6 @@ import com.android.systemui.statusbar.phone.SystemUIDialogManager;
import com.android.systemui.statusbar.policy.BluetoothController;
import com.android.systemui.statusbar.policy.DeviceProvisionedController;
import com.android.systemui.statusbar.window.StatusBarWindowController;
-import com.android.systemui.tuner.TunablePadding.TunablePaddingService;
import com.android.systemui.tuner.TunerService;
import dagger.Lazy;
@@ -129,7 +128,6 @@ public class Dependency {
@Nullable
@Inject Lazy<VolumeDialogController> mVolumeDialogController;
@Inject Lazy<MetricsLogger> mMetricsLogger;
- @Inject Lazy<TunablePaddingService> mTunablePaddingService;
@Inject Lazy<UiOffloadThread> mUiOffloadThread;
@Inject Lazy<LightBarController> mLightBarController;
@Inject Lazy<OverviewProxyService> mOverviewProxyService;
@@ -177,7 +175,6 @@ public class Dependency {
mProviders.put(FragmentService.class, mFragmentService::get);
mProviders.put(VolumeDialogController.class, mVolumeDialogController::get);
mProviders.put(MetricsLogger.class, mMetricsLogger::get);
- mProviders.put(TunablePaddingService.class, mTunablePaddingService::get);
mProviders.put(UiOffloadThread.class, mUiOffloadThread::get);
mProviders.put(LightBarController.class, mLightBarController::get);
mProviders.put(OverviewProxyService.class, mOverviewProxyService::get);
diff --git a/packages/SystemUI/src/com/android/systemui/accessibility/MagnificationImpl.java b/packages/SystemUI/src/com/android/systemui/accessibility/MagnificationImpl.java
index 6e5e44e45548..e9c9bc7799a5 100644
--- a/packages/SystemUI/src/com/android/systemui/accessibility/MagnificationImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/accessibility/MagnificationImpl.java
@@ -363,6 +363,16 @@ public class MagnificationImpl implements Magnification, CommandQueue.Callbacks
}
@MainThread
+ void updateSettingsButtonStatus(int displayId,
+ @WindowMagnificationSettings.MagnificationSize int index) {
+ final MagnificationSettingsController magnificationSettingsController =
+ mMagnificationSettingsSupplier.get(displayId);
+ if (magnificationSettingsController != null) {
+ magnificationSettingsController.updateSettingsButtonStatusOnRestore(index);
+ }
+ }
+
+ @MainThread
void toggleSettingsPanelVisibility(int displayId) {
final MagnificationSettingsController magnificationSettingsController =
mMagnificationSettingsSupplier.get(displayId);
@@ -446,6 +456,11 @@ public class MagnificationImpl implements Magnification, CommandQueue.Callbacks
@VisibleForTesting
final WindowMagnifierCallback mWindowMagnifierCallback = new WindowMagnifierCallback() {
@Override
+ public void onWindowMagnifierBoundsRestored(int displayId, int index) {
+ mHandler.post(() -> updateSettingsButtonStatus(displayId, index));
+ }
+
+ @Override
public void onWindowMagnifierBoundsChanged(int displayId, Rect frame) {
if (mMagnificationConnectionImpl != null) {
mMagnificationConnectionImpl.onWindowMagnifierBoundsChanged(displayId, frame);
diff --git a/packages/SystemUI/src/com/android/systemui/accessibility/MagnificationSettingsController.java b/packages/SystemUI/src/com/android/systemui/accessibility/MagnificationSettingsController.java
index b4530ace68d6..caf55174b6b5 100644
--- a/packages/SystemUI/src/com/android/systemui/accessibility/MagnificationSettingsController.java
+++ b/packages/SystemUI/src/com/android/systemui/accessibility/MagnificationSettingsController.java
@@ -26,6 +26,7 @@ import android.content.res.Configuration;
import android.util.Range;
import android.view.WindowManager;
+import com.android.internal.accessibility.common.MagnificationConstants;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.graphics.SfVsyncFrameCallbackProvider;
import com.android.systemui.util.settings.SecureSettings;
@@ -40,7 +41,8 @@ import com.android.systemui.util.settings.SecureSettings;
public class MagnificationSettingsController implements ComponentCallbacks {
// It should be consistent with the value defined in WindowMagnificationGestureHandler.
- private static final Range<Float> A11Y_ACTION_SCALE_RANGE = new Range<>(1.0f, 8.0f);
+ private static final Range<Float> A11Y_ACTION_SCALE_RANGE =
+ new Range<>(1.0f, MagnificationConstants.SCALE_MAX_VALUE);
private final Context mContext;
@@ -98,6 +100,10 @@ public class MagnificationSettingsController implements ComponentCallbacks {
mWindowMagnificationSettings.toggleSettingsPanelVisibility();
}
+ void updateSettingsButtonStatusOnRestore(@MagnificationSize int index) {
+ mWindowMagnificationSettings.updateSelectedButton(index);
+ }
+
void closeMagnificationSettings() {
mContext.unregisterComponentCallbacks(this);
mWindowMagnificationSettings.hideSettingPanel();
diff --git a/packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnificationController.java b/packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnificationController.java
index b37ba8994e44..3828f9f66857 100644
--- a/packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnificationController.java
+++ b/packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnificationController.java
@@ -127,6 +127,7 @@ class WindowMagnificationController implements View.OnTouchListener, SurfaceHold
private final WindowManager mWm;
private float mScale;
+ private int mSettingsButtonIndex = MagnificationSize.DEFAULT;
/**
* MagnificationFrame represents the bound of {@link #mMirrorSurfaceView} and is constrained
@@ -436,6 +437,7 @@ class WindowMagnificationController implements View.OnTouchListener, SurfaceHold
if (!mMagnificationSizeScaleOptions.contains(index)) {
return;
}
+ mSettingsButtonIndex = index;
int size = getMagnificationWindowSizeFromIndex(index);
setWindowSize(size, size);
}
@@ -446,6 +448,10 @@ class WindowMagnificationController implements View.OnTouchListener, SurfaceHold
return (int) (initSize * scale) - (int) (initSize * scale) % 2;
}
+ int getMagnificationFrameSizeFromIndex(@MagnificationSize int index) {
+ return getMagnificationWindowSizeFromIndex(index) - 2 * mMirrorSurfaceMargin;
+ }
+
void setEditMagnifierSizeMode(boolean enable) {
mEditSizeEnable = enable;
applyResourcesValues();
@@ -457,8 +463,11 @@ class WindowMagnificationController implements View.OnTouchListener, SurfaceHold
if (!enable) {
// Keep the magnifier size when exiting edit mode
- mWindowMagnificationFrameSizePrefs.saveSizeForCurrentDensity(
+ mWindowMagnificationFrameSizePrefs.saveIndexAndSizeForCurrentDensity(
+ mSettingsButtonIndex,
new Size(mMagnificationFrame.width(), mMagnificationFrame.height()));
+ } else {
+ mSettingsButtonIndex = MagnificationSize.CUSTOM;
}
}
@@ -944,7 +953,8 @@ class WindowMagnificationController implements View.OnTouchListener, SurfaceHold
}
private void setMagnificationFrame(int width, int height, int centerX, int centerY) {
- mWindowMagnificationFrameSizePrefs.saveSizeForCurrentDensity(new Size(width, height));
+ mWindowMagnificationFrameSizePrefs.saveIndexAndSizeForCurrentDensity(
+ mSettingsButtonIndex, new Size(width, height));
// Sets the initial frame area for the mirror and place it to the given center on the
// display.
@@ -954,6 +964,10 @@ class WindowMagnificationController implements View.OnTouchListener, SurfaceHold
}
private Size restoreMagnificationWindowFrameSizeIfPossible() {
+ if (Flags.saveAndRestoreMagnificationSettingsButtons()) {
+ return restoreMagnificationWindowFrameIndexAndSizeIfPossible();
+ }
+
if (!mWindowMagnificationFrameSizePrefs.isPreferenceSavedForCurrentDensity()) {
return getDefaultMagnificationWindowFrameSize();
}
@@ -961,8 +975,37 @@ class WindowMagnificationController implements View.OnTouchListener, SurfaceHold
return mWindowMagnificationFrameSizePrefs.getSizeForCurrentDensity();
}
+ private Size restoreMagnificationWindowFrameIndexAndSizeIfPossible() {
+ if (!mWindowMagnificationFrameSizePrefs.isPreferenceSavedForCurrentDensity()) {
+ notifyWindowSizeRestored(MagnificationSize.DEFAULT);
+ return getDefaultMagnificationWindowFrameSize();
+ }
+
+ // This will return DEFAULT index if the stored preference is in an invalid format.
+ // Therefore, except CUSTOM, we would like to calculate the window width and height based
+ // on the restored MagnificationSize index.
+ int restoredIndex = mWindowMagnificationFrameSizePrefs.getIndexForCurrentDensity();
+ notifyWindowSizeRestored(restoredIndex);
+ if (restoredIndex == MagnificationSize.CUSTOM) {
+ return mWindowMagnificationFrameSizePrefs.getSizeForCurrentDensity();
+ }
+
+ int restoredSize = getMagnificationFrameSizeFromIndex(restoredIndex);
+ return new Size(restoredSize, restoredSize);
+ }
+
+ private void notifyWindowSizeRestored(@MagnificationSize int index) {
+ mSettingsButtonIndex = index;
+ if (isActivated()) {
+ // Send the callback only if the window magnification is activated. The check is to
+ // avoid updating the settings panel in the cases that window magnification is not yet
+ // activated such as during the constructor initialization of this class.
+ mWindowMagnifierCallback.onWindowMagnifierBoundsRestored(mDisplayId, index);
+ }
+ }
+
private Size getDefaultMagnificationWindowFrameSize() {
- final int defaultSize = getMagnificationWindowSizeFromIndex(MagnificationSize.MEDIUM)
+ final int defaultSize = getMagnificationWindowSizeFromIndex(MagnificationSize.DEFAULT)
- 2 * mMirrorSurfaceMargin;
return new Size(defaultSize, defaultSize);
}
diff --git a/packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnificationFrameSizePrefs.java b/packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnificationFrameSizePrefs.java
index e83e85e1af1a..ee36c6e8ad35 100644
--- a/packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnificationFrameSizePrefs.java
+++ b/packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnificationFrameSizePrefs.java
@@ -16,10 +16,14 @@
package com.android.systemui.accessibility;
+import static com.android.systemui.accessibility.WindowMagnificationSettings.MagnificationSize;
+
import android.content.Context;
import android.content.SharedPreferences;
import android.util.Size;
+import com.android.systemui.Flags;
+
/**
* Class to handle SharedPreference for window magnification size.
*/
@@ -47,9 +51,15 @@ final class WindowMagnificationFrameSizePrefs {
/**
* Saves the window frame size for current screen density.
*/
- public void saveSizeForCurrentDensity(Size size) {
- mWindowMagnificationSizePreferences.edit()
- .putString(getKey(), size.toString()).apply();
+ public void saveIndexAndSizeForCurrentDensity(int index, Size size) {
+ if (Flags.saveAndRestoreMagnificationSettingsButtons()) {
+ mWindowMagnificationSizePreferences.edit()
+ .putString(getKey(),
+ WindowMagnificationFrameSpec.serialize(index, size)).apply();
+ } else {
+ mWindowMagnificationSizePreferences.edit()
+ .putString(getKey(), size.toString()).apply();
+ }
}
/**
@@ -62,10 +72,32 @@ final class WindowMagnificationFrameSizePrefs {
}
/**
+ * Gets the index preference for current screen density. Returns DEFAULT if no preference
+ * is found.
+ */
+ public @MagnificationSize int getIndexForCurrentDensity() {
+ final String spec = mWindowMagnificationSizePreferences.getString(getKey(), null);
+ if (spec == null) {
+ return MagnificationSize.DEFAULT;
+ }
+ try {
+ return WindowMagnificationFrameSpec.deserialize(spec).getIndex();
+ } catch (NumberFormatException e) {
+ return MagnificationSize.DEFAULT;
+ }
+ }
+
+ /**
* Gets the size preference for current screen density.
*/
public Size getSizeForCurrentDensity() {
- return Size.parseSize(mWindowMagnificationSizePreferences.getString(getKey(), null));
+ if (Flags.saveAndRestoreMagnificationSettingsButtons()) {
+ return WindowMagnificationFrameSpec
+ .deserialize(mWindowMagnificationSizePreferences.getString(getKey(), null))
+ .getSize();
+ } else {
+ return Size.parseSize(mWindowMagnificationSizePreferences.getString(getKey(), null));
+ }
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnificationFrameSpec.kt b/packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnificationFrameSpec.kt
new file mode 100644
index 000000000000..c261a997aec5
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnificationFrameSpec.kt
@@ -0,0 +1,46 @@
+/*
+ * 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.accessibility
+
+import android.util.Size
+
+data class WindowMagnificationFrameSpec(val index: Int, val size: Size) {
+
+ companion object {
+ private fun throwInvalidWindowMagnificationFrameSpec(s: String?): Nothing {
+ throw NumberFormatException("Invalid WindowMagnificationFrameSpec: \"$s\"")
+ }
+
+ @JvmStatic fun serialize(index: Int, size: Size) = "$index,$size"
+
+ @JvmStatic
+ fun deserialize(s: String): WindowMagnificationFrameSpec {
+ val separatorIndex = s.indexOf(',')
+ if (separatorIndex < 0) {
+ throwInvalidWindowMagnificationFrameSpec(s)
+ }
+ return try {
+ WindowMagnificationFrameSpec(
+ s.substring(0, separatorIndex).toInt(),
+ Size.parseSize(s.substring(separatorIndex + 1))
+ )
+ } catch (e: NumberFormatException) {
+ throwInvalidWindowMagnificationFrameSpec(s)
+ }
+ }
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnificationSettings.java b/packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnificationSettings.java
index f2a68a8d9fd7..99d966dfd9aa 100644
--- a/packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnificationSettings.java
+++ b/packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnificationSettings.java
@@ -55,10 +55,10 @@ import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.SeekBar;
import android.widget.Switch;
-import android.widget.TextView;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.graphics.SfVsyncFrameCallbackProvider;
+import com.android.systemui.Flags;
import com.android.systemui.common.ui.view.SeekBarWithIconButtonsView;
import com.android.systemui.res.R;
import com.android.systemui.util.settings.SecureSettings;
@@ -90,7 +90,6 @@ class WindowMagnificationSettings implements MagnificationGestureDetector.OnGest
private SeekBarWithIconButtonsView mZoomSeekbar;
private LinearLayout mAllowDiagonalScrollingView;
- private TextView mAllowDiagonalScrollingTitle;
private Switch mAllowDiagonalScrollingSwitch;
private LinearLayout mPanelView;
private LinearLayout mSettingView;
@@ -98,10 +97,9 @@ class WindowMagnificationSettings implements MagnificationGestureDetector.OnGest
private ImageButton mMediumButton;
private ImageButton mLargeButton;
private Button mDoneButton;
- private TextView mSizeTitle;
private Button mEditButton;
private ImageButton mFullScreenButton;
- private int mLastSelectedButtonIndex = MagnificationSize.NONE;
+ private int mLastSelectedButtonIndex = MagnificationSize.DEFAULT;
private boolean mAllowDiagonalScrolling = false;
@@ -118,19 +116,21 @@ class WindowMagnificationSettings implements MagnificationGestureDetector.OnGest
@Retention(RetentionPolicy.SOURCE)
@IntDef({
- MagnificationSize.NONE,
+ MagnificationSize.CUSTOM,
MagnificationSize.SMALL,
MagnificationSize.MEDIUM,
MagnificationSize.LARGE,
- MagnificationSize.FULLSCREEN
+ MagnificationSize.FULLSCREEN,
+ MagnificationSize.DEFAULT
})
/** Denotes the Magnification size type. */
public @interface MagnificationSize {
- int NONE = 0;
+ int CUSTOM = 0;
int SMALL = 1;
int MEDIUM = 2;
int LARGE = 3;
int FULLSCREEN = 4;
+ int DEFAULT = MEDIUM;
}
@VisibleForTesting
@@ -448,13 +448,20 @@ class WindowMagnificationSettings implements MagnificationGestureDetector.OnGest
private void updateUIControlsIfNeeded() {
int capability = getMagnificationCapability();
int selectedButtonIndex = mLastSelectedButtonIndex;
+ WindowMagnificationFrameSizePrefs windowMagnificationFrameSizePrefs =
+ new WindowMagnificationFrameSizePrefs(mContext);
switch (capability) {
case ACCESSIBILITY_MAGNIFICATION_MODE_WINDOW:
mEditButton.setVisibility(View.VISIBLE);
mAllowDiagonalScrollingView.setVisibility(View.VISIBLE);
mFullScreenButton.setVisibility(View.GONE);
if (selectedButtonIndex == MagnificationSize.FULLSCREEN) {
- selectedButtonIndex = MagnificationSize.NONE;
+ if (Flags.saveAndRestoreMagnificationSettingsButtons()) {
+ selectedButtonIndex =
+ windowMagnificationFrameSizePrefs.getIndexForCurrentDensity();
+ } else {
+ selectedButtonIndex = MagnificationSize.CUSTOM;
+ }
}
break;
@@ -522,11 +529,8 @@ class WindowMagnificationSettings implements MagnificationGestureDetector.OnGest
mMediumButton = mSettingView.findViewById(R.id.magnifier_medium_button);
mLargeButton = mSettingView.findViewById(R.id.magnifier_large_button);
mDoneButton = mSettingView.findViewById(R.id.magnifier_done_button);
- mSizeTitle = mSettingView.findViewById(R.id.magnifier_size_title);
mEditButton = mSettingView.findViewById(R.id.magnifier_edit_button);
mFullScreenButton = mSettingView.findViewById(R.id.magnifier_full_button);
- mAllowDiagonalScrollingTitle =
- mSettingView.findViewById(R.id.magnifier_horizontal_lock_title);
mZoomSeekbar = mSettingView.findViewById(R.id.magnifier_zoom_slider);
mZoomSeekbar.setMax((int) (mZoomSeekbar.getChangeMagnitude()
@@ -550,8 +554,6 @@ class WindowMagnificationSettings implements MagnificationGestureDetector.OnGest
mDoneButton.setOnClickListener(mButtonClickListener);
mFullScreenButton.setOnClickListener(mButtonClickListener);
mEditButton.setOnClickListener(mButtonClickListener);
- mSizeTitle.setSelected(true);
- mAllowDiagonalScrollingTitle.setSelected(true);
mSettingView.setOnApplyWindowInsetsListener((v, insets) -> {
// Adds a pending post check to avoiding redundant calculation because this callback
@@ -578,6 +580,7 @@ class WindowMagnificationSettings implements MagnificationGestureDetector.OnGest
// CONFIG_FONT_SCALE: font size change
// CONFIG_LOCALE: language change
// CONFIG_DENSITY: display size change
+ mParams.width = getPanelWidth(mContext);
mParams.accessibilityTitle = getAccessibilityWindowTitle(mContext);
boolean showSettingPanelAfterConfigChange = mIsVisible;
@@ -620,7 +623,7 @@ class WindowMagnificationSettings implements MagnificationGestureDetector.OnGest
public void editMagnifierSizeMode(boolean enable) {
setEditMagnifierSizeMode(enable);
- updateSelectedButton(MagnificationSize.NONE);
+ updateSelectedButton(MagnificationSize.CUSTOM);
hideSettingPanel();
}
@@ -628,7 +631,7 @@ class WindowMagnificationSettings implements MagnificationGestureDetector.OnGest
if (index == MagnificationSize.FULLSCREEN) {
// transit to fullscreen magnifier if needed
transitToMagnificationMode(ACCESSIBILITY_MAGNIFICATION_MODE_FULLSCREEN);
- } else if (index != MagnificationSize.NONE) {
+ } else if (index != MagnificationSize.CUSTOM) {
// update the window magnifier size
mCallback.onSetMagnifierSize(index);
// transit to window magnifier if needed
@@ -660,9 +663,22 @@ class WindowMagnificationSettings implements MagnificationGestureDetector.OnGest
mCallback.onEditMagnifierSizeMode(enable);
}
- private static LayoutParams createLayoutParams(Context context) {
+ private int getPanelWidth(Context context) {
+ // The magnification settings panel width is limited to the minimum of
+ // 1. display width
+ // 2. panel done button width + left and right padding
+ // So we can directly calculate the proper panel width at runtime
+ int displayWidth = mWindowManager.getCurrentWindowMetrics().getBounds().width();
+ int contentWidth = context.getResources()
+ .getDimensionPixelSize(R.dimen.magnification_setting_button_done_width);
+ int padding = context.getResources()
+ .getDimensionPixelSize(R.dimen.magnification_setting_background_padding);
+ return Math.min(displayWidth, contentWidth + 2 * padding);
+ }
+
+ private LayoutParams createLayoutParams(Context context) {
final LayoutParams params = new LayoutParams(
- LayoutParams.WRAP_CONTENT,
+ getPanelWidth(context),
LayoutParams.WRAP_CONTENT,
LayoutParams.TYPE_NAVIGATION_BAR_PANEL,
LayoutParams.FLAG_NOT_FOCUSABLE,
@@ -700,7 +716,7 @@ class WindowMagnificationSettings implements MagnificationGestureDetector.OnGest
});
}
- private void updateSelectedButton(@MagnificationSize int index) {
+ void updateSelectedButton(@MagnificationSize int index) {
// Clear the state of last selected button
if (mLastSelectedButtonIndex == MagnificationSize.SMALL) {
mSmallButton.setSelected(false);
diff --git a/packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnifierCallback.java b/packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnifierCallback.java
index a25e9a20f81c..b4a248239f46 100644
--- a/packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnifierCallback.java
+++ b/packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnifierCallback.java
@@ -16,6 +16,8 @@
package com.android.systemui.accessibility;
+import static com.android.systemui.accessibility.WindowMagnificationSettings.MagnificationSize;
+
import android.graphics.Rect;
/**
@@ -68,4 +70,9 @@ interface WindowMagnifierCallback {
* @param displayId The logical display id.
*/
void onClickSettingsButton(int displayId);
+
+ /**
+ * Called when restoring the magnification window size.
+ */
+ void onWindowMagnifierBoundsRestored(int displayId, @MagnificationSize int index);
}
diff --git a/packages/SystemUI/src/com/android/systemui/accessibility/floatingmenu/MenuViewLayer.java b/packages/SystemUI/src/com/android/systemui/accessibility/floatingmenu/MenuViewLayer.java
index 4a28d8b05661..27ded747fd55 100644
--- a/packages/SystemUI/src/com/android/systemui/accessibility/floatingmenu/MenuViewLayer.java
+++ b/packages/SystemUI/src/com/android/systemui/accessibility/floatingmenu/MenuViewLayer.java
@@ -515,7 +515,7 @@ class MenuViewLayer extends FrameLayout implements
List<ResolveInfo> activities = packageManager.queryIntentActivities(intent,
PackageManager.ResolveInfoFlags.of(PackageManager.MATCH_DEFAULT_ONLY));
if (!activities.isEmpty()) {
- mContext.startActivity(intent);
+ mContext.startActivityAsUser(intent, UserHandle.CURRENT);
mStatusBarManager.collapsePanels();
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/accessibility/hearingaid/HearingDevicesDialogDelegate.java b/packages/SystemUI/src/com/android/systemui/accessibility/hearingaid/HearingDevicesDialogDelegate.java
index 961d6aa1b821..f041f4d5963f 100644
--- a/packages/SystemUI/src/com/android/systemui/accessibility/hearingaid/HearingDevicesDialogDelegate.java
+++ b/packages/SystemUI/src/com/android/systemui/accessibility/hearingaid/HearingDevicesDialogDelegate.java
@@ -186,7 +186,7 @@ public class HearingDevicesDialogDelegate implements SystemUIDialog.Delegate,
}
@Override
- public void onDeviceItemGearClicked(@NonNull DeviceItem deviceItem, @NonNull View view) {
+ public void onDeviceItemGearClicked(@NonNull DeviceItem deviceItem, @NonNull View view) {
dismissDialogIfExists();
Intent intent = new Intent(ACTION_BLUETOOTH_DEVICE_DETAILS);
Bundle bundle = new Bundle();
@@ -198,7 +198,7 @@ public class HearingDevicesDialogDelegate implements SystemUIDialog.Delegate,
}
@Override
- public void onDeviceItemOnClicked(@NonNull DeviceItem deviceItem, @NonNull View view) {
+ public void onDeviceItemOnClicked(@NonNull DeviceItem deviceItem, @NonNull View view) {
CachedBluetoothDevice cachedBluetoothDevice = deviceItem.getCachedBluetoothDevice();
switch (deviceItem.getType()) {
case ACTIVE_MEDIA_BLUETOOTH_DEVICE, CONNECTED_BLUETOOTH_DEVICE ->
@@ -226,8 +226,8 @@ public class HearingDevicesDialogDelegate implements SystemUIDialog.Delegate,
final int activePresetIndex = mPresetsController.getActivePresetIndex();
refreshPresetInfoAdapter(presetInfos, activePresetIndex);
mPresetSpinner.setVisibility(
- (activeHearingDevice != null && !mPresetInfoAdapter.isEmpty()) ? VISIBLE
- : GONE);
+ (activeHearingDevice != null && activeHearingDevice.isConnectedHapClientDevice()
+ && !mPresetInfoAdapter.isEmpty()) ? VISIBLE : GONE);
});
}
@@ -303,6 +303,11 @@ public class HearingDevicesDialogDelegate implements SystemUIDialog.Delegate,
mLocalBluetoothManager.getEventManager().unregisterCallback(this);
}
+ @VisibleForTesting
+ void setHearingDevicesPresetsController(HearingDevicesPresetsController controller) {
+ mPresetsController = controller;
+ }
+
private void setupDeviceListView(SystemUIDialog dialog) {
mDeviceList.setLayoutManager(new LinearLayoutManager(dialog.getContext()));
mHearingDeviceItemList = getHearingDevicesList();
@@ -311,12 +316,15 @@ public class HearingDevicesDialogDelegate implements SystemUIDialog.Delegate,
}
private void setupPresetSpinner(SystemUIDialog dialog) {
- mPresetsController = new HearingDevicesPresetsController(mProfileManager, mPresetCallback);
+ if (mPresetsController == null) {
+ mPresetsController = new HearingDevicesPresetsController(mProfileManager,
+ mPresetCallback);
+ }
final CachedBluetoothDevice activeHearingDevice = getActiveHearingDevice(
mHearingDeviceItemList);
mPresetsController.setActiveHearingDevice(activeHearingDevice);
- mPresetInfoAdapter = new ArrayAdapter<String>(dialog.getContext(),
+ mPresetInfoAdapter = new ArrayAdapter<>(dialog.getContext(),
R.layout.hearing_devices_preset_spinner_selected,
R.id.hearing_devices_preset_option_text);
mPresetInfoAdapter.setDropDownViewResource(
@@ -350,7 +358,8 @@ public class HearingDevicesDialogDelegate implements SystemUIDialog.Delegate,
final int activePresetIndex = mPresetsController.getActivePresetIndex();
refreshPresetInfoAdapter(presetInfos, activePresetIndex);
mPresetSpinner.setVisibility(
- (activeHearingDevice != null && !mPresetInfoAdapter.isEmpty()) ? VISIBLE : GONE);
+ (activeHearingDevice != null && activeHearingDevice.isConnectedHapClientDevice()
+ && !mPresetInfoAdapter.isEmpty()) ? VISIBLE : GONE);
}
private void setupPairNewDeviceButton(SystemUIDialog dialog, @Visibility int visibility) {
diff --git a/packages/SystemUI/src/com/android/systemui/ambient/touch/ShadeTouchHandler.java b/packages/SystemUI/src/com/android/systemui/ambient/touch/ShadeTouchHandler.java
index fcd7ef53d42a..baca9594dd2f 100644
--- a/packages/SystemUI/src/com/android/systemui/ambient/touch/ShadeTouchHandler.java
+++ b/packages/SystemUI/src/com/android/systemui/ambient/touch/ShadeTouchHandler.java
@@ -26,7 +26,7 @@ import android.view.MotionEvent;
import androidx.annotation.NonNull;
-import com.android.systemui.Flags;
+import com.android.systemui.communal.domain.interactor.CommunalSettingsInteractor;
import com.android.systemui.shade.ShadeViewController;
import com.android.systemui.statusbar.phone.CentralSurfaces;
@@ -44,6 +44,8 @@ public class ShadeTouchHandler implements TouchHandler {
private final ShadeViewController mShadeViewController;
private final DreamManager mDreamManager;
private final int mInitiationHeight;
+ private final CommunalSettingsInteractor
+ mCommunalSettingsInteractor;
/**
* Tracks whether or not we are capturing a given touch. Will be null before and after a touch.
@@ -54,10 +56,12 @@ public class ShadeTouchHandler implements TouchHandler {
ShadeTouchHandler(Optional<CentralSurfaces> centralSurfaces,
ShadeViewController shadeViewController,
DreamManager dreamManager,
+ CommunalSettingsInteractor communalSettingsInteractor,
@Named(NOTIFICATION_SHADE_GESTURE_INITIATION_HEIGHT) int initiationHeight) {
mSurfaces = centralSurfaces;
mShadeViewController = shadeViewController;
mDreamManager = dreamManager;
+ mCommunalSettingsInteractor = communalSettingsInteractor;
mInitiationHeight = initiationHeight;
}
@@ -75,7 +79,8 @@ public class ShadeTouchHandler implements TouchHandler {
if (mCapture != null && mCapture) {
sendTouchEvent((MotionEvent) ev);
}
- if (((MotionEvent) ev).getAction() == MotionEvent.ACTION_UP) {
+ if (((MotionEvent) ev).getAction() == MotionEvent.ACTION_UP
+ || ((MotionEvent) ev).getAction() == MotionEvent.ACTION_CANCEL) {
session.pop();
}
}
@@ -107,7 +112,7 @@ public class ShadeTouchHandler implements TouchHandler {
}
private void sendTouchEvent(MotionEvent event) {
- if (Flags.communalHub() && !mDreamManager.isDreaming()) {
+ if (mCommunalSettingsInteractor.isCommunalFlagEnabled() && !mDreamManager.isDreaming()) {
// Send touches to central surfaces only when on the glanceable hub while not dreaming.
// While sending touches where while dreaming will open the shade, the shade
// while closing if opened then closed in the same gesture.
diff --git a/packages/SystemUI/src/com/android/systemui/ambient/touch/TouchMonitor.java b/packages/SystemUI/src/com/android/systemui/ambient/touch/TouchMonitor.java
index 4035e957a2db..efa55e90081e 100644
--- a/packages/SystemUI/src/com/android/systemui/ambient/touch/TouchMonitor.java
+++ b/packages/SystemUI/src/com/android/systemui/ambient/touch/TouchMonitor.java
@@ -128,8 +128,13 @@ public class TouchMonitor {
completer.set(predecessor);
}
- if (mActiveTouchSessions.isEmpty() && mStopMonitoringPending) {
- stopMonitoring(false);
+ if (mActiveTouchSessions.isEmpty()) {
+ if (mStopMonitoringPending) {
+ stopMonitoring(false);
+ } else {
+ // restart monitoring to reset any destructive state on the input session
+ startMonitoring();
+ }
}
});
diff --git a/packages/SystemUI/src/com/android/systemui/assist/ui/DefaultUiController.java b/packages/SystemUI/src/com/android/systemui/assist/ui/DefaultUiController.java
index 56273eb9a2cf..6e257442d139 100644
--- a/packages/SystemUI/src/com/android/systemui/assist/ui/DefaultUiController.java
+++ b/packages/SystemUI/src/com/android/systemui/assist/ui/DefaultUiController.java
@@ -33,6 +33,7 @@ import android.view.WindowManager;
import android.view.animation.PathInterpolator;
import android.widget.FrameLayout;
+import com.android.app.viewcapture.ViewCaptureAwareWindowManager;
import com.android.internal.logging.MetricsLogger;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.systemui.assist.AssistLogger;
@@ -66,7 +67,7 @@ public class DefaultUiController implements AssistManager.UiController {
protected InvocationLightsView mInvocationLightsView;
protected final AssistLogger mAssistLogger;
- private final WindowManager mWindowManager;
+ private final ViewCaptureAwareWindowManager mWindowManager;
private final MetricsLogger mMetricsLogger;
private final Lazy<AssistManager> mAssistManagerLazy;
private final WindowManager.LayoutParams mLayoutParams;
@@ -80,12 +81,12 @@ public class DefaultUiController implements AssistManager.UiController {
@Inject
public DefaultUiController(Context context, AssistLogger assistLogger,
- WindowManager windowManager, MetricsLogger metricsLogger,
- Lazy<AssistManager> assistManagerLazy,
+ ViewCaptureAwareWindowManager viewCaptureAwareWindowManager,
+ MetricsLogger metricsLogger, Lazy<AssistManager> assistManagerLazy,
NavigationBarController navigationBarController) {
mAssistLogger = assistLogger;
mRoot = new FrameLayout(context);
- mWindowManager = windowManager;
+ mWindowManager = viewCaptureAwareWindowManager;
mMetricsLogger = metricsLogger;
mAssistManagerLazy = assistManagerLazy;
diff --git a/packages/SystemUI/src/com/android/systemui/authentication/data/repository/AuthenticationRepository.kt b/packages/SystemUI/src/com/android/systemui/authentication/data/repository/AuthenticationRepository.kt
index a9f985f0955b..468737d9372f 100644
--- a/packages/SystemUI/src/com/android/systemui/authentication/data/repository/AuthenticationRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/authentication/data/repository/AuthenticationRepository.kt
@@ -288,6 +288,7 @@ constructor(
override suspend fun reportAuthenticationAttempt(isSuccessful: Boolean) {
withContext(backgroundDispatcher) {
if (isSuccessful) {
+ lockPatternUtils.userPresent(selectedUserId)
lockPatternUtils.reportSuccessfulPasswordAttempt(selectedUserId)
_hasLockoutOccurred.value = false
} else {
diff --git a/packages/SystemUI/src/com/android/systemui/battery/BatteryMeterView.java b/packages/SystemUI/src/com/android/systemui/battery/BatteryMeterView.java
index 5c53234f74eb..e63472684585 100644
--- a/packages/SystemUI/src/com/android/systemui/battery/BatteryMeterView.java
+++ b/packages/SystemUI/src/com/android/systemui/battery/BatteryMeterView.java
@@ -88,7 +88,6 @@ public class BatteryMeterView extends LinearLayout implements DarkReceiver {
private boolean mPowerSaveEnabled;
private boolean mIsBatteryDefender;
private boolean mIsIncompatibleCharging;
- private boolean mDisplayShieldEnabled;
// Error state where we know nothing about the current battery state
private boolean mBatteryStateUnknown;
// Lazily-loaded since this is expected to be a rare-if-ever state
@@ -270,7 +269,7 @@ public class BatteryMeterView extends LinearLayout implements DarkReceiver {
int resId = 0;
if (mPowerSaveEnabled) {
resId = R.drawable.battery_unified_attr_powersave;
- } else if (mIsBatteryDefender && mDisplayShieldEnabled) {
+ } else if (mIsBatteryDefender) {
resId = R.drawable.battery_unified_attr_defend;
} else if (isCharging) {
resId = R.drawable.battery_unified_attr_charging;
@@ -288,7 +287,7 @@ public class BatteryMeterView extends LinearLayout implements DarkReceiver {
private ColorProfile getCurrentColorProfile() {
return getColorProfile(
mPowerSaveEnabled,
- mIsBatteryDefender && mDisplayShieldEnabled,
+ mIsBatteryDefender,
mPluggedIn,
mLevel <= 20);
}
@@ -410,10 +409,6 @@ public class BatteryMeterView extends LinearLayout implements DarkReceiver {
mBatteryEstimateFetcher = fetcher;
}
- void setDisplayShieldEnabled(boolean displayShieldEnabled) {
- mDisplayShieldEnabled = displayShieldEnabled;
- }
-
void updatePercentText() {
if (!newStatusBarIcons()) {
updatePercentTextLegacy();
@@ -659,7 +654,7 @@ public class BatteryMeterView extends LinearLayout implements DarkReceiver {
float mainBatteryWidth =
res.getDimensionPixelSize(R.dimen.status_bar_battery_icon_width) * iconScaleFactor;
- boolean displayShield = mDisplayShieldEnabled && mIsBatteryDefender;
+ boolean displayShield = mIsBatteryDefender;
float fullBatteryIconHeight =
BatterySpecs.getFullBatteryHeight(mainBatteryHeight, displayShield);
float fullBatteryIconWidth =
diff --git a/packages/SystemUI/src/com/android/systemui/battery/BatteryMeterViewController.java b/packages/SystemUI/src/com/android/systemui/battery/BatteryMeterViewController.java
index 4f13e6ffd0b5..9a30c213a2f9 100644
--- a/packages/SystemUI/src/com/android/systemui/battery/BatteryMeterViewController.java
+++ b/packages/SystemUI/src/com/android/systemui/battery/BatteryMeterViewController.java
@@ -34,7 +34,6 @@ import com.android.systemui.dagger.SysUISingleton;
import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.flags.FeatureFlags;
import com.android.systemui.flags.Flags;
-import com.android.systemui.res.R;
import com.android.systemui.settings.UserTracker;
import com.android.systemui.statusbar.phone.StatusBarLocation;
import com.android.systemui.statusbar.phone.ui.StatusBarIconController;
@@ -153,8 +152,6 @@ public class BatteryMeterViewController extends ViewController<BatteryMeterView>
mBatteryController = batteryController;
mView.setBatteryEstimateFetcher(mBatteryController::getEstimatedTimeRemainingString);
- mView.setDisplayShieldEnabled(
- getContext().getResources().getBoolean(R.bool.flag_battery_shield_icon));
mSlotBattery = getResources().getString(com.android.internal.R.string.status_bar_battery);
mSettingObserver = new SettingObserver(mMainHandler);
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleController.kt b/packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleController.kt
index d2c62272e2ec..b10d37e5c27a 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleController.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleController.kt
@@ -34,7 +34,9 @@ import com.android.settingslib.Utils
import com.android.systemui.CoreStartable
import com.android.systemui.Flags.lightRevealMigration
import com.android.systemui.biometrics.data.repository.FacePropertyRepository
+import com.android.systemui.biometrics.shared.model.FingerprintSensorType
import com.android.systemui.biometrics.shared.model.UdfpsOverlayParams
+import com.android.systemui.biometrics.shared.model.toSensorType
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.deviceentry.domain.interactor.AuthRippleInteractor
import com.android.systemui.deviceentry.shared.DeviceEntryUdfpsRefactor
@@ -61,14 +63,16 @@ import javax.inject.Provider
/**
* Controls two ripple effects:
- * 1. Unlocked ripple: shows when authentication is successful
- * 2. UDFPS dwell ripple: shows when the user has their finger down on the UDFPS area and reacts
- * to errors and successes
+ * 1. Unlocked ripple: shows when authentication is successful
+ * 2. UDFPS dwell ripple: shows when the user has their finger down on the UDFPS area and reacts to
+ * errors and successes
*
* The ripple uses the accent color of the current theme.
*/
@SysUISingleton
-class AuthRippleController @Inject constructor(
+class AuthRippleController
+@Inject
+constructor(
private val sysuiContext: Context,
private val authController: AuthController,
private val configurationController: ConfigurationController,
@@ -92,8 +96,7 @@ class AuthRippleController @Inject constructor(
KeyguardStateController.Callback,
WakefulnessLifecycle.Observer {
- @VisibleForTesting
- internal var startLightRevealScrimOnKeyguardFadingAway = false
+ @VisibleForTesting internal var startLightRevealScrimOnKeyguardFadingAway = false
var lightRevealScrimAnimator: ValueAnimator? = null
var fingerprintSensorLocation: Point? = null
private var faceSensorLocation: Point? = null
@@ -101,6 +104,7 @@ class AuthRippleController @Inject constructor(
private var udfpsController: UdfpsController? = null
private var udfpsRadius: Float = -1f
+ private var udfpsType: FingerprintSensorType = FingerprintSensorType.UNKNOWN
override fun start() {
init()
@@ -141,15 +145,17 @@ class AuthRippleController @Inject constructor(
private val biometricModeListener =
object : BiometricUnlockController.BiometricUnlockEventsListener {
override fun onBiometricUnlockedWithKeyguardDismissal(
- biometricSourceType: BiometricSourceType?
+ biometricSourceType: BiometricSourceType?
) {
DeviceEntryUdfpsRefactor.assertInLegacyMode()
if (biometricSourceType != null) {
showUnlockRippleInternal(biometricSourceType)
} else {
- logger.log(TAG,
- LogLevel.ERROR,
- "Unexpected scenario where biometricSourceType is null")
+ logger.log(
+ TAG,
+ LogLevel.ERROR,
+ "Unexpected scenario where biometricSourceType is null"
+ )
}
}
}
@@ -168,16 +174,16 @@ class AuthRippleController @Inject constructor(
notificationShadeWindowController.setForcePluginOpen(false, this)
}
- @Deprecated("Update authRippleInteractor.showUnlockRipple instead of calling this.")
- fun showUnlockRipple(biometricSourceType: BiometricSourceType) {
- DeviceEntryUdfpsRefactor.assertInLegacyMode()
- showUnlockRippleInternal(biometricSourceType)
- }
+ @Deprecated("Update authRippleInteractor.showUnlockRipple instead of calling this.")
+ fun showUnlockRipple(biometricSourceType: BiometricSourceType) {
+ DeviceEntryUdfpsRefactor.assertInLegacyMode()
+ showUnlockRippleInternal(biometricSourceType)
+ }
private fun showUnlockRippleInternal(biometricSourceType: BiometricSourceType) {
val keyguardNotShowing = !keyguardStateController.isShowing
- val unlockNotAllowed = !keyguardUpdateMonitor
- .isUnlockingWithBiometricAllowed(biometricSourceType)
+ val unlockNotAllowed =
+ !keyguardUpdateMonitor.isUnlockingWithBiometricAllowed(biometricSourceType)
if (keyguardNotShowing || unlockNotAllowed) {
logger.notShowingUnlockRipple(keyguardNotShowing, unlockNotAllowed)
return
@@ -187,30 +193,32 @@ class AuthRippleController @Inject constructor(
if (biometricSourceType == BiometricSourceType.FINGERPRINT) {
fingerprintSensorLocation?.let {
mView.setFingerprintSensorLocation(it, udfpsRadius)
- circleReveal = CircleReveal(
+ circleReveal =
+ CircleReveal(
it.x,
it.y,
0,
Math.max(
- Math.max(it.x, displayMetrics.widthPixels - it.x),
- Math.max(it.y, displayMetrics.heightPixels - it.y)
+ Math.max(it.x, displayMetrics.widthPixels - it.x),
+ Math.max(it.y, displayMetrics.heightPixels - it.y)
)
- )
+ )
logger.showingUnlockRippleAt(it.x, it.y, "FP sensor radius: $udfpsRadius")
showUnlockedRipple()
}
} else if (biometricSourceType == BiometricSourceType.FACE) {
faceSensorLocation?.let {
mView.setSensorLocation(it)
- circleReveal = CircleReveal(
+ circleReveal =
+ CircleReveal(
it.x,
it.y,
0,
Math.max(
- Math.max(it.x, displayMetrics.widthPixels - it.x),
- Math.max(it.y, displayMetrics.heightPixels - it.y)
+ Math.max(it.x, displayMetrics.widthPixels - it.x),
+ Math.max(it.y, displayMetrics.heightPixels - it.y)
)
- )
+ )
logger.showingUnlockRippleAt(it.x, it.y, "Face unlock ripple")
showUnlockedRipple()
}
@@ -234,9 +242,7 @@ class AuthRippleController @Inject constructor(
mView.startUnlockedRipple(
/* end runnable */
- Runnable {
- notificationShadeWindowController.setForcePluginOpen(false, this)
- }
+ Runnable { notificationShadeWindowController.setForcePluginOpen(false, this) }
)
}
@@ -248,32 +254,36 @@ class AuthRippleController @Inject constructor(
if (keyguardStateController.isKeyguardFadingAway) {
if (startLightRevealScrimOnKeyguardFadingAway) {
lightRevealScrimAnimator?.cancel()
- lightRevealScrimAnimator = ValueAnimator.ofFloat(.1f, 1f).apply {
- interpolator = Interpolators.LINEAR_OUT_SLOW_IN
- duration = RIPPLE_ANIMATION_DURATION
- startDelay = keyguardStateController.keyguardFadingAwayDelay
- addUpdateListener { animator ->
- if (lightRevealScrim.revealEffect != circleReveal) {
- // if something else took over the reveal, let's cancel ourselves
- cancel()
- return@addUpdateListener
- }
- lightRevealScrim.revealAmount = animator.animatedValue as Float
- }
- addListener(object : AnimatorListenerAdapter() {
- override fun onAnimationEnd(animation: Animator) {
- // Reset light reveal scrim to the default, so the CentralSurfaces
- // can handle any subsequent light reveal changes
- // (ie: from dozing changes)
- if (lightRevealScrim.revealEffect == circleReveal) {
- lightRevealScrim.revealEffect = LiftReveal
+ lightRevealScrimAnimator =
+ ValueAnimator.ofFloat(.1f, 1f).apply {
+ interpolator = Interpolators.LINEAR_OUT_SLOW_IN
+ duration = RIPPLE_ANIMATION_DURATION
+ startDelay = keyguardStateController.keyguardFadingAwayDelay
+ addUpdateListener { animator ->
+ if (lightRevealScrim.revealEffect != circleReveal) {
+ // if something else took over the reveal, let's cancel ourselves
+ cancel()
+ return@addUpdateListener
}
-
- lightRevealScrimAnimator = null
+ lightRevealScrim.revealAmount = animator.animatedValue as Float
}
- })
- start()
- }
+ addListener(
+ object : AnimatorListenerAdapter() {
+ override fun onAnimationEnd(animation: Animator) {
+ // Reset light reveal scrim to the default, so the
+ // CentralSurfaces
+ // can handle any subsequent light reveal changes
+ // (ie: from dozing changes)
+ if (lightRevealScrim.revealEffect == circleReveal) {
+ lightRevealScrim.revealEffect = LiftReveal
+ }
+
+ lightRevealScrimAnimator = null
+ }
+ }
+ )
+ start()
+ }
startLightRevealScrimOnKeyguardFadingAway = false
}
}
@@ -297,8 +307,9 @@ class AuthRippleController @Inject constructor(
}
private fun updateRippleColor() {
- mView.setLockScreenColor(Utils.getColorAttrDefaultColor(sysuiContext,
- R.attr.wallpaperTextColorAccent))
+ mView.setLockScreenColor(
+ Utils.getColorAttrDefaultColor(sysuiContext, R.attr.wallpaperTextColorAccent)
+ )
}
private fun showDwellRipple() {
@@ -321,46 +332,52 @@ class AuthRippleController @Inject constructor(
}
}
- override fun onBiometricAuthFailed(biometricSourceType: BiometricSourceType) {
- if (biometricSourceType == BiometricSourceType.FINGERPRINT) {
- mView.retractDwellRipple()
+ override fun onBiometricAuthFailed(biometricSourceType: BiometricSourceType) {
+ if (biometricSourceType == BiometricSourceType.FINGERPRINT) {
+ mView.retractDwellRipple()
+ }
}
- }
- override fun onBiometricAcquired(
- biometricSourceType: BiometricSourceType,
- acquireInfo: Int
- ) {
- if (biometricSourceType == BiometricSourceType.FINGERPRINT &&
- BiometricFingerprintConstants.shouldDisableUdfpsDisplayMode(acquireInfo) &&
- acquireInfo != BiometricFingerprintConstants.FINGERPRINT_ACQUIRED_GOOD) {
- // received an 'acquiredBad' message, so immediately retract
- mView.retractDwellRipple()
+ override fun onBiometricAcquired(
+ biometricSourceType: BiometricSourceType,
+ acquireInfo: Int
+ ) {
+ if (
+ biometricSourceType == BiometricSourceType.FINGERPRINT &&
+ BiometricFingerprintConstants.shouldDisableUdfpsDisplayMode(acquireInfo) &&
+ acquireInfo != BiometricFingerprintConstants.FINGERPRINT_ACQUIRED_GOOD
+ ) {
+ // received an 'acquiredBad' message, so immediately retract
+ mView.retractDwellRipple()
+ }
}
- }
- override fun onKeyguardBouncerStateChanged(bouncerIsOrWillBeShowing: Boolean) {
- if (bouncerIsOrWillBeShowing) {
- mView.fadeDwellRipple()
+ override fun onKeyguardBouncerStateChanged(bouncerIsOrWillBeShowing: Boolean) {
+ if (bouncerIsOrWillBeShowing) {
+ mView.fadeDwellRipple()
+ }
}
}
- }
private val configurationChangedListener =
object : ConfigurationController.ConfigurationListener {
override fun onUiModeChanged() {
updateRippleColor()
}
+
override fun onThemeChanged() {
updateRippleColor()
}
- }
+ }
private val udfpsControllerCallback =
object : UdfpsController.Callback {
override fun onFingerDown() {
- // only show dwell ripple for device entry
- if (keyguardUpdateMonitor.isFingerprintDetectionRunning) {
+ // only show dwell ripple for device entry non-ultrasonic udfps
+ if (
+ keyguardUpdateMonitor.isFingerprintDetectionRunning &&
+ udfpsType != FingerprintSensorType.UDFPS_ULTRASONIC
+ ) {
showDwellRipple()
}
}
@@ -386,6 +403,7 @@ class AuthRippleController @Inject constructor(
if (it.size > 0) {
udfpsController = udfpsControllerProvider.get()
udfpsRadius = authController.udfpsRadius
+ udfpsType = it[0].sensorType.toSensorType()
if (mView.isAttachedToWindow) {
udfpsController?.addCallback(udfpsControllerCallback)
@@ -402,9 +420,11 @@ class AuthRippleController @Inject constructor(
when (args[0]) {
"dwell" -> {
showDwellRipple()
- pw.println("lock screen dwell ripple: " +
+ pw.println(
+ "lock screen dwell ripple: " +
"\n\tsensorLocation=$fingerprintSensorLocation" +
- "\n\tudfpsRadius=$udfpsRadius")
+ "\n\tudfpsRadius=$udfpsRadius"
+ )
}
"fingerprint" -> {
pw.println("fingerprint ripple sensorLocation=$fingerprintSensorLocation")
@@ -416,9 +436,11 @@ class AuthRippleController @Inject constructor(
showUnlockRippleInternal(BiometricSourceType.FACE)
}
"custom" -> {
- if (args.size != 3 ||
- args[1].toFloatOrNull() == null ||
- args[2].toFloatOrNull() == null) {
+ if (
+ args.size != 3 ||
+ args[1].toFloatOrNull() == null ||
+ args[2].toFloatOrNull() == null
+ ) {
invalidCommand(pw)
return
}
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/FaceHelpMessageDebouncer.kt b/packages/SystemUI/src/com/android/systemui/biometrics/FaceHelpMessageDebouncer.kt
new file mode 100644
index 000000000000..1685f49e4f3e
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/FaceHelpMessageDebouncer.kt
@@ -0,0 +1,125 @@
+/*
+ * 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.biometrics
+
+import android.util.Log
+import com.android.systemui.deviceentry.shared.model.HelpFaceAuthenticationStatus
+
+/**
+ * Debounces face help messages with parameters:
+ * - window: Window of time (in milliseconds) to analyze face acquired messages)
+ * - startWindow: Window of time on start required before showing the first help message
+ * - shownFaceMessageFrequencyBoost: Frequency boost given to messages that are currently shown to
+ * the user
+ */
+class FaceHelpMessageDebouncer(
+ private val window: Long = DEFAULT_WINDOW_MS,
+ private val startWindow: Long = window,
+ private val shownFaceMessageFrequencyBoost: Int = 4,
+) {
+ private val TAG = "FaceHelpMessageDebouncer"
+ private var startTime = 0L
+ private var helpFaceAuthStatuses: MutableList<HelpFaceAuthenticationStatus> = mutableListOf()
+ private var lastMessageIdShown: Int? = null
+
+ /** Remove messages that are outside of the time [window]. */
+ private fun removeOldMessages(currTimestamp: Long) {
+ var numToRemove = 0
+ // This works under the assumption that timestamps are ordered from first to last
+ // in chronological order
+ for (index in helpFaceAuthStatuses.indices) {
+ if ((helpFaceAuthStatuses[index].createdAt + window) >= currTimestamp) {
+ break // all timestamps from here and on are within the window
+ }
+ numToRemove += 1
+ }
+
+ // Remove all outside time window
+ repeat(numToRemove) { helpFaceAuthStatuses.removeFirst() }
+
+ if (numToRemove > 0) {
+ Log.v(TAG, "removedFirst=$numToRemove")
+ }
+ }
+
+ private fun getMostFrequentHelpMessage(): HelpFaceAuthenticationStatus? {
+ // freqMap: msgId => frequency
+ val freqMap = helpFaceAuthStatuses.groupingBy { it.msgId }.eachCount().toMutableMap()
+
+ // Give shownFaceMessageFrequencyBoost to lastMessageIdShown
+ if (lastMessageIdShown != null) {
+ freqMap.computeIfPresent(lastMessageIdShown!!) { _, value ->
+ value + shownFaceMessageFrequencyBoost
+ }
+ }
+ // Go through all msgId keys & find the highest frequency msgId
+ val msgIdWithHighestFrequency =
+ freqMap.entries
+ .maxWithOrNull { (msgId1, freq1), (msgId2, freq2) ->
+ // ties are broken by more recent message
+ if (freq1 == freq2) {
+ helpFaceAuthStatuses
+ .findLast { it.msgId == msgId1 }!!
+ .createdAt
+ .compareTo(
+ helpFaceAuthStatuses.findLast { it.msgId == msgId2 }!!.createdAt
+ )
+ } else {
+ freq1.compareTo(freq2)
+ }
+ }
+ ?.key
+ return helpFaceAuthStatuses.findLast { it.msgId == msgIdWithHighestFrequency }
+ }
+
+ fun addMessage(helpFaceAuthStatus: HelpFaceAuthenticationStatus) {
+ helpFaceAuthStatuses.add(helpFaceAuthStatus)
+ Log.v(TAG, "added message=$helpFaceAuthStatus")
+ }
+
+ fun getMessageToShow(atTimestamp: Long): HelpFaceAuthenticationStatus? {
+ if (helpFaceAuthStatuses.isEmpty() || (atTimestamp - startTime) < startWindow) {
+ // there's not enough time that has passed to determine whether to show anything yet
+ Log.v(TAG, "No message; haven't made initial threshold window OR no messages")
+ return null
+ }
+ removeOldMessages(atTimestamp)
+ val messageToShow = getMostFrequentHelpMessage()
+ if (lastMessageIdShown != messageToShow?.msgId) {
+ Log.v(
+ TAG,
+ "showMessage previousLastMessageId=$lastMessageIdShown" +
+ "\n\tmessageToShow=$messageToShow " +
+ "\n\thelpFaceAuthStatusesSize=${helpFaceAuthStatuses.size}" +
+ "\n\thelpFaceAuthStatuses=$helpFaceAuthStatuses"
+ )
+ lastMessageIdShown = messageToShow?.msgId
+ }
+ return messageToShow
+ }
+
+ fun startNewFaceAuthSession(faceAuthStartedTime: Long) {
+ Log.d(TAG, "startNewFaceAuthSession at startTime=$startTime")
+ startTime = faceAuthStartedTime
+ helpFaceAuthStatuses.clear()
+ lastMessageIdShown = null
+ }
+
+ companion object {
+ const val DEFAULT_WINDOW_MS = 200L
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/BiometricViewBinder.kt b/packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/BiometricViewBinder.kt
index c868d01de743..430887dfcab6 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/BiometricViewBinder.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/ui/binder/BiometricViewBinder.kt
@@ -94,8 +94,16 @@ object BiometricViewBinder {
val textColorError =
view.resources.getColor(R.color.biometric_dialog_error, view.context.theme)
+
+ val attributes =
+ view.context.obtainStyledAttributes(
+ R.style.TextAppearance_AuthCredential_Indicator,
+ intArrayOf(android.R.attr.textColor)
+ )
val textColorHint =
- view.resources.getColor(R.color.biometric_dialog_gray, view.context.theme)
+ if (constraintBp()) attributes.getColor(0, 0)
+ else view.resources.getColor(R.color.biometric_dialog_gray, view.context.theme)
+ attributes.recycle()
val logoView = view.requireViewById<ImageView>(R.id.logo)
val logoDescriptionView = view.requireViewById<TextView>(R.id.logo_description)
diff --git a/packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/AlternateBouncerInteractor.kt b/packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/AlternateBouncerInteractor.kt
index 1d11dfbc48a8..4984fc61c8f8 100644
--- a/packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/AlternateBouncerInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/AlternateBouncerInteractor.kt
@@ -102,11 +102,7 @@ constructor(
if (alternateBouncerSupported) {
combine(
keyguardTransitionInteractor.get().currentKeyguardState,
- if (SceneContainerFlag.isEnabled) {
- sceneInteractor.get().currentScene
- } else {
- flowOf(Scenes.Lockscreen)
- },
+ sceneInteractor.get().currentScene,
::Pair
)
.flatMapLatest { (currentKeyguardState, transitionState) ->
@@ -220,6 +216,7 @@ constructor(
return (systemClock.uptimeMillis() - bouncerRepository.lastAlternateBouncerVisibleTime) >
MIN_VISIBILITY_DURATION_UNTIL_TOUCHES_DISMISS_ALTERNATE_BOUNCER_MS
}
+
/**
* Should only be called through StatusBarKeyguardViewManager which propagates the source of
* truth to other concerned controllers. Will hide the alternate bouncer if it's no longer
diff --git a/packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/PrimaryBouncerInteractor.kt b/packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/PrimaryBouncerInteractor.kt
index 3c5e571f5181..c28bce2e0de1 100644
--- a/packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/PrimaryBouncerInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/PrimaryBouncerInteractor.kt
@@ -134,7 +134,7 @@ constructor(
// TODO(b/243695312): Encapsulate all of the show logic for the bouncer.
/** Show the bouncer if necessary and set the relevant states. */
@JvmOverloads
- fun show(isScrimmed: Boolean) {
+ fun show(isScrimmed: Boolean): Boolean {
// When the scene container framework is enabled, instead of calling this, call
// SceneInteractor#changeScene(Scenes.Bouncer, ...).
SceneContainerFlag.assertInLegacyMode()
@@ -146,44 +146,48 @@ constructor(
"primaryBouncerDelegate is set. Let's exit early so we don't " +
"set the wrong primaryBouncer state."
)
- return
+ return false
}
- // Reset some states as we show the bouncer.
- repository.setKeyguardAuthenticatedBiometrics(null)
- repository.setPrimaryStartingToHide(false)
+ try {
+ Trace.beginSection("KeyguardBouncer#show")
+ // Reset some states as we show the bouncer.
+ repository.setKeyguardAuthenticatedBiometrics(null)
+ repository.setPrimaryStartingToHide(false)
- val resumeBouncer =
- (isBouncerShowing() || repository.primaryBouncerShowingSoon.value) &&
- needsFullscreenBouncer()
+ val resumeBouncer =
+ (isBouncerShowing() || repository.primaryBouncerShowingSoon.value) &&
+ needsFullscreenBouncer()
- Trace.beginSection("KeyguardBouncer#show")
- repository.setPrimaryScrimmed(isScrimmed)
- if (isScrimmed) {
- setPanelExpansion(KeyguardBouncerConstants.EXPANSION_VISIBLE)
- }
+ repository.setPrimaryScrimmed(isScrimmed)
+ if (isScrimmed) {
+ setPanelExpansion(KeyguardBouncerConstants.EXPANSION_VISIBLE)
+ }
- // In this special case, we want to hide the bouncer and show it again. We want to emit
- // show(true) again so that we can reinflate the new view.
- if (resumeBouncer) {
- repository.setPrimaryShow(false)
- }
+ // In this special case, we want to hide the bouncer and show it again. We want to emit
+ // show(true) again so that we can reinflate the new view.
+ if (resumeBouncer) {
+ repository.setPrimaryShow(false)
+ }
- if (primaryBouncerView.delegate?.showNextSecurityScreenOrFinish() == true) {
- // Keyguard is done.
- return
- }
+ if (primaryBouncerView.delegate?.showNextSecurityScreenOrFinish() == true) {
+ // Keyguard is done.
+ return false
+ }
- repository.setPrimaryShowingSoon(true)
- if (usePrimaryBouncerPassiveAuthDelay()) {
- Log.d(TAG, "delay bouncer, passive auth may succeed")
- mainHandler.postDelayed(showRunnable, passiveAuthBouncerDelay)
- } else {
- DejankUtils.postAfterTraversal(showRunnable)
+ repository.setPrimaryShowingSoon(true)
+ if (usePrimaryBouncerPassiveAuthDelay()) {
+ Log.d(TAG, "delay bouncer, passive auth may succeed")
+ mainHandler.postDelayed(showRunnable, passiveAuthBouncerDelay)
+ } else {
+ DejankUtils.postAfterTraversal(showRunnable)
+ }
+ keyguardStateController.notifyPrimaryBouncerShowing(true)
+ primaryBouncerCallbackInteractor.dispatchStartingToShow()
+ return true
+ } finally {
+ Trace.endSection()
}
- keyguardStateController.notifyPrimaryBouncerShowing(true)
- primaryBouncerCallbackInteractor.dispatchStartingToShow()
- Trace.endSection()
}
/** Sets the correct bouncer states to hide the bouncer. */
diff --git a/packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/BouncerMessageViewModel.kt b/packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/BouncerMessageViewModel.kt
index 6cb9b16e2f9b..810b6d10f355 100644
--- a/packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/BouncerMessageViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/BouncerMessageViewModel.kt
@@ -32,7 +32,7 @@ import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.deviceentry.domain.interactor.BiometricMessageInteractor
import com.android.systemui.deviceentry.domain.interactor.DeviceEntryFaceAuthInteractor
import com.android.systemui.deviceentry.domain.interactor.DeviceEntryFingerprintAuthInteractor
-import com.android.systemui.deviceentry.domain.interactor.DeviceEntryInteractor
+import com.android.systemui.deviceentry.domain.interactor.DeviceUnlockedInteractor
import com.android.systemui.deviceentry.shared.model.DeviceEntryRestrictionReason
import com.android.systemui.deviceentry.shared.model.FaceFailureMessage
import com.android.systemui.deviceentry.shared.model.FaceLockoutMessage
@@ -75,7 +75,7 @@ class BouncerMessageViewModel(
private val clock: SystemClock,
private val biometricMessageInteractor: BiometricMessageInteractor,
private val faceAuthInteractor: DeviceEntryFaceAuthInteractor,
- private val deviceEntryInteractor: DeviceEntryInteractor,
+ private val deviceUnlockedInteractor: DeviceUnlockedInteractor,
private val fingerprintInteractor: DeviceEntryFingerprintAuthInteractor,
flags: ComposeBouncerFlags,
) {
@@ -119,7 +119,7 @@ class BouncerMessageViewModel(
}
} else if (authMethod.isSecure) {
combine(
- deviceEntryInteractor.deviceEntryRestrictionReason,
+ deviceUnlockedInteractor.deviceEntryRestrictionReason,
lockoutMessage,
fingerprintInteractor.isFingerprintCurrentlyAllowedOnBouncer,
resetToDefault,
@@ -413,7 +413,7 @@ object BouncerMessageViewModelModule {
clock: SystemClock,
biometricMessageInteractor: BiometricMessageInteractor,
faceAuthInteractor: DeviceEntryFaceAuthInteractor,
- deviceEntryInteractor: DeviceEntryInteractor,
+ deviceUnlockedInteractor: DeviceUnlockedInteractor,
fingerprintInteractor: DeviceEntryFingerprintAuthInteractor,
flags: ComposeBouncerFlags,
userSwitcherViewModel: UserSwitcherViewModel,
@@ -427,7 +427,7 @@ object BouncerMessageViewModelModule {
clock = clock,
biometricMessageInteractor = biometricMessageInteractor,
faceAuthInteractor = faceAuthInteractor,
- deviceEntryInteractor = deviceEntryInteractor,
+ deviceUnlockedInteractor = deviceUnlockedInteractor,
fingerprintInteractor = fingerprintInteractor,
flags = flags,
selectedUser = userSwitcherViewModel.selectedUser,
diff --git a/packages/SystemUI/src/com/android/systemui/clipboardoverlay/ClipboardOverlayView.java b/packages/SystemUI/src/com/android/systemui/clipboardoverlay/ClipboardOverlayView.java
index ba236ba016ff..1762d82b3237 100644
--- a/packages/SystemUI/src/com/android/systemui/clipboardoverlay/ClipboardOverlayView.java
+++ b/packages/SystemUI/src/com/android/systemui/clipboardoverlay/ClipboardOverlayView.java
@@ -18,8 +18,6 @@ package com.android.systemui.clipboardoverlay;
import static android.content.res.Configuration.ORIENTATION_PORTRAIT;
-import static com.android.systemui.Flags.screenshotShelfUi2;
-
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
@@ -61,7 +59,6 @@ import androidx.core.view.accessibility.AccessibilityNodeInfoCompat;
import com.android.systemui.res.R;
import com.android.systemui.screenshot.DraggableConstraintLayout;
import com.android.systemui.screenshot.FloatingWindowUtil;
-import com.android.systemui.screenshot.OverlayActionChip;
import com.android.systemui.screenshot.ui.binder.ActionButtonViewBinder;
import com.android.systemui.screenshot.ui.viewmodel.ActionButtonAppearance;
import com.android.systemui.screenshot.ui.viewmodel.ActionButtonViewModel;
@@ -152,66 +149,47 @@ public class ClipboardOverlayView extends DraggableConstraintLayout {
}
private void bindDefaultActionChips() {
- if (screenshotShelfUi2()) {
- mActionButtonViewBinder.bind(mRemoteCopyChip,
- ActionButtonViewModel.Companion.withNextId(
- new ActionButtonAppearance(
- Icon.createWithResource(mContext,
- R.drawable.ic_baseline_devices_24).loadDrawable(
- mContext),
- null,
- mContext.getString(R.string.clipboard_send_nearby_description),
- true),
- new Function0<>() {
- @Override
- public Unit invoke() {
- if (mClipboardCallbacks != null) {
- mClipboardCallbacks.onRemoteCopyButtonTapped();
- }
- return null;
+ mActionButtonViewBinder.bind(mRemoteCopyChip,
+ ActionButtonViewModel.Companion.withNextId(
+ new ActionButtonAppearance(
+ Icon.createWithResource(mContext,
+ R.drawable.ic_baseline_devices_24).loadDrawable(
+ mContext),
+ null,
+ mContext.getString(R.string.clipboard_send_nearby_description),
+ true),
+ new Function0<>() {
+ @Override
+ public Unit invoke() {
+ if (mClipboardCallbacks != null) {
+ mClipboardCallbacks.onRemoteCopyButtonTapped();
}
- }));
- mActionButtonViewBinder.bind(mShareChip,
- ActionButtonViewModel.Companion.withNextId(
- new ActionButtonAppearance(
- Icon.createWithResource(mContext,
- R.drawable.ic_screenshot_share).loadDrawable(mContext),
- null,
- mContext.getString(com.android.internal.R.string.share),
- true),
- new Function0<>() {
- @Override
- public Unit invoke() {
- if (mClipboardCallbacks != null) {
- mClipboardCallbacks.onShareButtonTapped();
- }
- return null;
+ return null;
+ }
+ }));
+ mActionButtonViewBinder.bind(mShareChip,
+ ActionButtonViewModel.Companion.withNextId(
+ new ActionButtonAppearance(
+ Icon.createWithResource(mContext,
+ R.drawable.ic_screenshot_share).loadDrawable(mContext),
+ null,
+ mContext.getString(com.android.internal.R.string.share),
+ true),
+ new Function0<>() {
+ @Override
+ public Unit invoke() {
+ if (mClipboardCallbacks != null) {
+ mClipboardCallbacks.onShareButtonTapped();
}
- }));
- } else {
- mShareChip.setAlpha(1);
- mRemoteCopyChip.setAlpha(1);
-
- ((ImageView) mRemoteCopyChip.findViewById(R.id.overlay_action_chip_icon)).setImageIcon(
- Icon.createWithResource(mContext, R.drawable.ic_baseline_devices_24));
- ((ImageView) mShareChip.findViewById(R.id.overlay_action_chip_icon)).setImageIcon(
- Icon.createWithResource(mContext, R.drawable.ic_screenshot_share));
-
- mShareChip.setContentDescription(
- mContext.getString(com.android.internal.R.string.share));
- mRemoteCopyChip.setContentDescription(
- mContext.getString(R.string.clipboard_send_nearby_description));
- }
+ return null;
+ }
+ }));
}
@Override
public void setCallbacks(SwipeDismissCallbacks callbacks) {
super.setCallbacks(callbacks);
ClipboardOverlayCallbacks clipboardCallbacks = (ClipboardOverlayCallbacks) callbacks;
- if (!screenshotShelfUi2()) {
- mShareChip.setOnClickListener(v -> clipboardCallbacks.onShareButtonTapped());
- mRemoteCopyChip.setOnClickListener(v -> clipboardCallbacks.onRemoteCopyButtonTapped());
- }
mDismissButton.setOnClickListener(v -> clipboardCallbacks.onDismissButtonTapped());
mClipboardPreview.setOnClickListener(v -> clipboardCallbacks.onPreviewTapped());
mMinimizedPreview.setOnClickListener(v -> clipboardCallbacks.onMinimizedViewTapped());
@@ -495,12 +473,7 @@ public class ClipboardOverlayView extends DraggableConstraintLayout {
void setActionChip(RemoteAction action, Runnable onFinish) {
mActionContainerBackground.setVisibility(View.VISIBLE);
- View chip;
- if (screenshotShelfUi2()) {
- chip = constructShelfActionChip(action, onFinish);
- } else {
- chip = constructActionChip(action, onFinish);
- }
+ View chip = constructShelfActionChip(action, onFinish);
mActionContainer.addView(chip);
mActionChips.add(chip);
}
@@ -534,17 +507,6 @@ public class ClipboardOverlayView extends DraggableConstraintLayout {
return chip;
}
- private OverlayActionChip constructActionChip(RemoteAction action, Runnable onFinish) {
- OverlayActionChip chip = (OverlayActionChip) LayoutInflater.from(mContext).inflate(
- R.layout.overlay_action_chip, mActionContainer, false);
- chip.setText(action.getTitle());
- chip.setContentDescription(action.getTitle());
- chip.setIcon(action.getIcon(), false);
- chip.setPendingIntent(action.getActionIntent(), onFinish);
- chip.setAlpha(1);
- return chip;
- }
-
private static void updateTextSize(CharSequence text, TextView textView) {
Paint paint = new Paint(textView.getPaint());
Resources res = textView.getResources();
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/DraggableConstraintLayout.java b/packages/SystemUI/src/com/android/systemui/clipboardoverlay/DraggableConstraintLayout.java
index b55bba9f2279..b55bba9f2279 100644
--- a/packages/SystemUI/src/com/android/systemui/screenshot/DraggableConstraintLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/clipboardoverlay/DraggableConstraintLayout.java
diff --git a/packages/SystemUI/src/com/android/systemui/clipboardoverlay/dagger/ClipboardOverlayModule.java b/packages/SystemUI/src/com/android/systemui/clipboardoverlay/dagger/ClipboardOverlayModule.java
index 740a93eb081c..ff9fba4c03f1 100644
--- a/packages/SystemUI/src/com/android/systemui/clipboardoverlay/dagger/ClipboardOverlayModule.java
+++ b/packages/SystemUI/src/com/android/systemui/clipboardoverlay/dagger/ClipboardOverlayModule.java
@@ -18,8 +18,6 @@ package com.android.systemui.clipboardoverlay.dagger;
import static android.view.WindowManager.LayoutParams.TYPE_SCREENSHOT;
-import static com.android.systemui.Flags.screenshotShelfUi2;
-
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import android.content.Context;
@@ -59,13 +57,8 @@ public interface ClipboardOverlayModule {
*/
@Provides
static ClipboardOverlayView provideClipboardOverlayView(@OverlayWindowContext Context context) {
- if (screenshotShelfUi2()) {
- return (ClipboardOverlayView) LayoutInflater.from(context).inflate(
- R.layout.clipboard_overlay2, null);
- } else {
- return (ClipboardOverlayView) LayoutInflater.from(context).inflate(
- R.layout.clipboard_overlay, null);
- }
+ return (ClipboardOverlayView) LayoutInflater.from(context).inflate(
+ R.layout.clipboard_overlay, null);
}
@Qualifier
diff --git a/packages/SystemUI/src/com/android/systemui/common/ui/view/LongPressHandlingView.kt b/packages/SystemUI/src/com/android/systemui/common/ui/view/LongPressHandlingView.kt
index 85e2bdb43ba5..b6ace81d18ba 100644
--- a/packages/SystemUI/src/com/android/systemui/common/ui/view/LongPressHandlingView.kt
+++ b/packages/SystemUI/src/com/android/systemui/common/ui/view/LongPressHandlingView.kt
@@ -19,10 +19,14 @@ package com.android.systemui.common.ui.view
import android.annotation.SuppressLint
import android.content.Context
+import android.os.Bundle
import android.util.AttributeSet
import android.view.MotionEvent
import android.view.View
import android.view.ViewConfiguration
+import android.view.accessibility.AccessibilityNodeInfo
+import android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction
+import androidx.core.view.accessibility.AccessibilityNodeInfoCompat
import com.android.systemui.shade.TouchLogger
import kotlin.math.pow
import kotlin.math.sqrt
@@ -44,6 +48,10 @@ class LongPressHandlingView(
attrs,
) {
+ init {
+ setupAccessibilityDelegate()
+ }
+
constructor(
context: Context,
attrs: AttributeSet?,
@@ -55,6 +63,7 @@ class LongPressHandlingView(
view: View,
x: Int,
y: Int,
+ isA11yAction: Boolean = false,
)
/** Notifies that the gesture was too short for a long press, it is actually a click. */
@@ -63,6 +72,8 @@ class LongPressHandlingView(
var listener: Listener? = null
+ var accessibilityHintLongPressAction: AccessibilityAction? = null
+
private val interactionHandler: LongPressHandlingViewInteractionHandler by lazy {
LongPressHandlingViewInteractionHandler(
postDelayed = { block, timeoutMs ->
@@ -107,6 +118,51 @@ class LongPressHandlingView(
override fun onTouchEvent(event: MotionEvent?): Boolean {
return interactionHandler.onTouchEvent(event?.toModel())
}
+
+ private fun setupAccessibilityDelegate() {
+ accessibilityDelegate =
+ object : AccessibilityDelegate() {
+ override fun onInitializeAccessibilityNodeInfo(
+ v: View,
+ info: AccessibilityNodeInfo
+ ) {
+ super.onInitializeAccessibilityNodeInfo(v, info)
+ if (
+ interactionHandler.isLongPressHandlingEnabled &&
+ accessibilityHintLongPressAction != null
+ ) {
+ info.addAction(accessibilityHintLongPressAction)
+ }
+ }
+
+ override fun performAccessibilityAction(
+ host: View,
+ action: Int,
+ args: Bundle?
+ ): Boolean {
+ return if (
+ interactionHandler.isLongPressHandlingEnabled &&
+ action == AccessibilityNodeInfoCompat.ACTION_LONG_CLICK
+ ) {
+ val longPressHandlingView = host as? LongPressHandlingView
+ if (longPressHandlingView != null) {
+ // the coordinates are not available as it is an a11y long press
+ listener?.onLongPressDetected(
+ view = longPressHandlingView,
+ x = 0,
+ y = 0,
+ isA11yAction = true,
+ )
+ true
+ } else {
+ false
+ }
+ } else {
+ super.performAccessibilityAction(host, action, args)
+ }
+ }
+ }
+ }
}
private fun MotionEvent.toModel(): LongPressHandlingViewInteractionHandler.MotionEventModel {
diff --git a/packages/SystemUI/src/com/android/systemui/communal/CommunalBackupRestoreStartable.kt b/packages/SystemUI/src/com/android/systemui/communal/CommunalBackupRestoreStartable.kt
index cdeeb6ff0b23..7abad1448318 100644
--- a/packages/SystemUI/src/com/android/systemui/communal/CommunalBackupRestoreStartable.kt
+++ b/packages/SystemUI/src/com/android/systemui/communal/CommunalBackupRestoreStartable.kt
@@ -21,6 +21,9 @@ import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.content.IntentFilter
+import android.database.ContentObserver
+import android.os.Handler
+import android.provider.Settings.Secure.USER_SETUP_COMPLETE
import com.android.systemui.CoreStartable
import com.android.systemui.broadcast.BroadcastDispatcher
import com.android.systemui.communal.domain.interactor.CommunalInteractor
@@ -29,6 +32,7 @@ import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.log.LogBuffer
import com.android.systemui.log.core.Logger
import com.android.systemui.log.dagger.CommunalLog
+import com.android.systemui.util.settings.SecureSettings
import javax.inject.Inject
@SysUISingleton
@@ -38,10 +42,15 @@ constructor(
private val broadcastDispatcher: BroadcastDispatcher,
private val communalInteractor: CommunalInteractor,
@CommunalLog logBuffer: LogBuffer,
+ private val secureSettings: SecureSettings,
+ handler: Handler,
) : CoreStartable, BroadcastReceiver() {
private val logger = Logger(logBuffer, TAG)
+ private var oldToNewWidgetIdMap = emptyMap<Int, Int>()
+ private var userSetupComplete = false
+
override fun start() {
broadcastDispatcher.registerReceiver(
receiver = this,
@@ -73,8 +82,53 @@ constructor(
return
}
- val oldToNewWidgetIdMap = oldIds.zip(newIds).toMap()
- communalInteractor.restoreWidgets(oldToNewWidgetIdMap)
+ oldToNewWidgetIdMap = oldIds.zip(newIds).toMap()
+
+ logger.i({ "On old to new widget ids mapping updated: $str1" }) {
+ str1 = oldToNewWidgetIdMap.toString()
+ }
+
+ maybeRestoreWidgets()
+
+ // Start observing if user setup is not complete
+ if (!userSetupComplete) {
+ startObservingUserSetupComplete()
+ }
+ }
+
+ private val userSetupObserver =
+ object : ContentObserver(handler) {
+ override fun onChange(selfChange: Boolean) {
+ maybeRestoreWidgets()
+
+ // Stop observing once user setup is complete
+ if (userSetupComplete) {
+ stopObservingUserSetupComplete()
+ }
+ }
+ }
+
+ private fun maybeRestoreWidgets() {
+ val newValue = secureSettings.getInt(USER_SETUP_COMPLETE) > 0
+
+ if (userSetupComplete != newValue) {
+ userSetupComplete = newValue
+ logger.i({ "User setup complete: $bool1" }) { bool1 = userSetupComplete }
+ }
+
+ if (userSetupComplete && oldToNewWidgetIdMap.isNotEmpty()) {
+ logger.i("Starting to restore widgets")
+ communalInteractor.restoreWidgets(oldToNewWidgetIdMap.toMap())
+ oldToNewWidgetIdMap = emptyMap()
+ }
+ }
+
+ private fun startObservingUserSetupComplete() {
+ secureSettings.registerContentObserverSync(USER_SETUP_COMPLETE, userSetupObserver)
+ }
+
+ private fun stopObservingUserSetupComplete() {
+ secureSettings.unregisterContentObserverSync(userSetupObserver)
}
companion object {
diff --git a/packages/SystemUI/src/com/android/systemui/communal/CommunalDreamStartable.kt b/packages/SystemUI/src/com/android/systemui/communal/CommunalDreamStartable.kt
index 38f51daca2a4..0582cc20927c 100644
--- a/packages/SystemUI/src/com/android/systemui/communal/CommunalDreamStartable.kt
+++ b/packages/SystemUI/src/com/android/systemui/communal/CommunalDreamStartable.kt
@@ -19,9 +19,9 @@ package com.android.systemui.communal
import android.annotation.SuppressLint
import android.app.DreamManager
import com.android.systemui.CoreStartable
-import com.android.systemui.Flags.communalHub
import com.android.systemui.Flags.glanceableHubAllowKeyguardWhenDreaming
import com.android.systemui.Flags.restartDreamOnUnocclude
+import com.android.systemui.communal.domain.interactor.CommunalSettingsInteractor
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Background
import com.android.systemui.keyguard.domain.interactor.KeyguardInteractor
@@ -48,6 +48,7 @@ class CommunalDreamStartable
@Inject
constructor(
private val powerInteractor: PowerInteractor,
+ private val communalSettingsInteractor: CommunalSettingsInteractor,
private val keyguardInteractor: KeyguardInteractor,
private val keyguardTransitionInteractor: KeyguardTransitionInteractor,
private val dreamManager: DreamManager,
@@ -55,7 +56,7 @@ constructor(
) : CoreStartable {
@SuppressLint("MissingPermission")
override fun start() {
- if (!communalHub()) {
+ if (!communalSettingsInteractor.isCommunalFlagEnabled()) {
return
}
diff --git a/packages/SystemUI/src/com/android/systemui/communal/CommunalOngoingContentStartable.kt b/packages/SystemUI/src/com/android/systemui/communal/CommunalOngoingContentStartable.kt
new file mode 100644
index 000000000000..b1b02cec871d
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/communal/CommunalOngoingContentStartable.kt
@@ -0,0 +1,58 @@
+/*
+ * 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.communal
+
+import com.android.systemui.CoreStartable
+import com.android.systemui.communal.data.repository.CommunalMediaRepository
+import com.android.systemui.communal.data.repository.CommunalSmartspaceRepository
+import com.android.systemui.communal.domain.interactor.CommunalInteractor
+import com.android.systemui.communal.domain.interactor.CommunalSettingsInteractor
+import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.dagger.qualifiers.Background
+import javax.inject.Inject
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.launch
+
+@SysUISingleton
+class CommunalOngoingContentStartable
+@Inject
+constructor(
+ @Background val bgScope: CoroutineScope,
+ private val communalInteractor: CommunalInteractor,
+ private val communalMediaRepository: CommunalMediaRepository,
+ private val communalSettingsInteractor: CommunalSettingsInteractor,
+ private val communalSmartspaceRepository: CommunalSmartspaceRepository,
+) : CoreStartable {
+
+ override fun start() {
+ if (!communalSettingsInteractor.isCommunalFlagEnabled()) {
+ return
+ }
+
+ bgScope.launch {
+ communalInteractor.isCommunalEnabled.collect { enabled ->
+ if (enabled) {
+ communalMediaRepository.startListening()
+ communalSmartspaceRepository.startListening()
+ } else {
+ communalMediaRepository.stopListening()
+ communalSmartspaceRepository.stopListening()
+ }
+ }
+ }
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/communal/CommunalSceneStartable.kt b/packages/SystemUI/src/com/android/systemui/communal/CommunalSceneStartable.kt
index 88c3f9f6af2e..e9b23850627a 100644
--- a/packages/SystemUI/src/com/android/systemui/communal/CommunalSceneStartable.kt
+++ b/packages/SystemUI/src/com/android/systemui/communal/CommunalSceneStartable.kt
@@ -18,9 +18,11 @@ package com.android.systemui.communal
import android.provider.Settings
import com.android.compose.animation.scene.SceneKey
+import com.android.compose.animation.scene.TransitionKey
import com.android.systemui.CoreStartable
import com.android.systemui.communal.domain.interactor.CommunalInteractor
import com.android.systemui.communal.domain.interactor.CommunalSceneInteractor
+import com.android.systemui.communal.domain.interactor.CommunalSettingsInteractor
import com.android.systemui.communal.shared.model.CommunalScenes
import com.android.systemui.communal.shared.model.CommunalTransitionKeys
import com.android.systemui.dagger.SysUISingleton
@@ -28,6 +30,7 @@ import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.dagger.qualifiers.Background
import com.android.systemui.dagger.qualifiers.Main
import com.android.systemui.dock.DockManager
+import com.android.systemui.flags.FeatureFlagsClassic
import com.android.systemui.keyguard.domain.interactor.KeyguardInteractor
import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor
import com.android.systemui.keyguard.shared.model.KeyguardState
@@ -68,12 +71,14 @@ class CommunalSceneStartable
constructor(
private val dockManager: DockManager,
private val communalInteractor: CommunalInteractor,
+ private val communalSettingsInteractor: CommunalSettingsInteractor,
private val communalSceneInteractor: CommunalSceneInteractor,
private val keyguardTransitionInteractor: KeyguardTransitionInteractor,
private val keyguardInteractor: KeyguardInteractor,
private val systemSettings: SystemSettings,
centralSurfacesOpt: Optional<CentralSurfaces>,
private val notificationShadeWindowController: NotificationShadeWindowController,
+ private val featureFlagsClassic: FeatureFlagsClassic,
@Application private val applicationScope: CoroutineScope,
@Background private val bgScope: CoroutineScope,
@Main private val mainDispatcher: CoroutineDispatcher,
@@ -87,12 +92,22 @@ constructor(
private val centralSurfaces: CentralSurfaces? by centralSurfacesOpt
override fun start() {
+ if (!communalSettingsInteractor.isCommunalFlagEnabled()) {
+ return
+ }
+
// Handle automatically switching based on keyguard state.
keyguardTransitionInteractor.startedKeyguardTransitionStep
.mapLatest(::determineSceneAfterTransition)
.filterNotNull()
- .onEach { nextScene ->
- communalSceneInteractor.changeScene(nextScene, CommunalTransitionKeys.SimpleFade)
+ .onEach { (nextScene, nextTransition) ->
+ if (!communalSceneInteractor.isLaunchingWidget.value) {
+ // When launching a widget, we don't want to animate the scene change or the
+ // Communal Hub will reveal the wallpaper even though it shouldn't. Instead we
+ // snap to the new scene as part of the launch animation, once the activity
+ // launch is done, so we don't change scene here.
+ communalSceneInteractor.changeScene(nextScene, nextTransition)
+ }
}
.launchIn(applicationScope)
@@ -188,7 +203,7 @@ constructor(
private suspend fun determineSceneAfterTransition(
lastStartedTransition: TransitionStep,
- ): SceneKey? {
+ ): Pair<SceneKey, TransitionKey>? {
val to = lastStartedTransition.to
val from = lastStartedTransition.from
val docked = dockManager.isDocked
@@ -201,22 +216,27 @@ constructor(
// underneath the hub is shown. When launching activities over lockscreen, we only
// change scenes once the activity launch animation is finished, so avoid
// changing the scene here.
- CommunalScenes.Blank
+ Pair(CommunalScenes.Blank, CommunalTransitionKeys.SimpleFade)
}
to == KeyguardState.GLANCEABLE_HUB && from == KeyguardState.OCCLUDED -> {
// When transitioning to the hub from an occluded state, fade out the hub without
// doing any translation.
- CommunalScenes.Communal
+ Pair(CommunalScenes.Communal, CommunalTransitionKeys.SimpleFade)
}
// Transitioning to Blank scene when entering the edit mode will be handled separately
// with custom animations.
to == KeyguardState.GONE && !communalInteractor.editModeOpen.value ->
- CommunalScenes.Blank
+ Pair(CommunalScenes.Blank, CommunalTransitionKeys.SimpleFade)
!docked && !KeyguardState.deviceIsAwakeInState(to) -> {
// If the user taps the screen and wakes the device within this timeout, we don't
// want to dismiss the hub
delay(AWAKE_DEBOUNCE_DELAY)
- CommunalScenes.Blank
+ Pair(CommunalScenes.Blank, CommunalTransitionKeys.SimpleFade)
+ }
+ from == KeyguardState.DOZING && to == KeyguardState.GLANCEABLE_HUB -> {
+ // Make sure the communal hub is showing (immediately, not fading in) when
+ // transitioning from dozing to hub.
+ Pair(CommunalScenes.Communal, CommunalTransitionKeys.Immediately)
}
else -> null
}
diff --git a/packages/SystemUI/src/com/android/systemui/communal/dagger/CommunalModule.kt b/packages/SystemUI/src/com/android/systemui/communal/dagger/CommunalModule.kt
index 2406cc6bcea2..a44533555a04 100644
--- a/packages/SystemUI/src/com/android/systemui/communal/dagger/CommunalModule.kt
+++ b/packages/SystemUI/src/com/android/systemui/communal/dagger/CommunalModule.kt
@@ -17,14 +17,17 @@
package com.android.systemui.communal.dagger
import android.content.Context
+import com.android.systemui.CoreStartable
import com.android.systemui.communal.data.backup.CommunalBackupUtils
import com.android.systemui.communal.data.db.CommunalDatabaseModule
import com.android.systemui.communal.data.repository.CommunalMediaRepositoryModule
import com.android.systemui.communal.data.repository.CommunalPrefsRepositoryModule
import com.android.systemui.communal.data.repository.CommunalRepositoryModule
import com.android.systemui.communal.data.repository.CommunalSettingsRepositoryModule
+import com.android.systemui.communal.data.repository.CommunalSmartspaceRepositoryModule
import com.android.systemui.communal.data.repository.CommunalTutorialRepositoryModule
import com.android.systemui.communal.data.repository.CommunalWidgetRepositoryModule
+import com.android.systemui.communal.domain.interactor.CommunalSceneTransitionInteractor
import com.android.systemui.communal.shared.model.CommunalScenes
import com.android.systemui.communal.util.CommunalColors
import com.android.systemui.communal.util.CommunalColorsImpl
@@ -39,6 +42,8 @@ import com.android.systemui.scene.shared.model.SceneDataSourceDelegator
import dagger.Binds
import dagger.Module
import dagger.Provides
+import dagger.multibindings.ClassKey
+import dagger.multibindings.IntoMap
import kotlinx.coroutines.CoroutineScope
@Module(
@@ -52,6 +57,8 @@ import kotlinx.coroutines.CoroutineScope
CommunalWidgetModule::class,
CommunalPrefsRepositoryModule::class,
CommunalSettingsRepositoryModule::class,
+ CommunalSmartspaceRepositoryModule::class,
+ CommunalStartableModule::class,
]
)
interface CommunalModule {
@@ -66,6 +73,13 @@ interface CommunalModule {
@Binds fun bindCommunalColors(impl: CommunalColorsImpl): CommunalColors
+ @Binds
+ @IntoMap
+ @ClassKey(CommunalSceneTransitionInteractor::class)
+ abstract fun bindCommunalSceneTransitionInteractor(
+ impl: CommunalSceneTransitionInteractor
+ ): CoreStartable
+
companion object {
@Provides
@Communal
diff --git a/packages/SystemUI/src/com/android/systemui/communal/dagger/CommunalStartableModule.kt b/packages/SystemUI/src/com/android/systemui/communal/dagger/CommunalStartableModule.kt
new file mode 100644
index 000000000000..74a2cd3f22c4
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/communal/dagger/CommunalStartableModule.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.communal.dagger
+
+import com.android.systemui.CoreStartable
+import com.android.systemui.communal.CommunalBackupRestoreStartable
+import com.android.systemui.communal.CommunalDreamStartable
+import com.android.systemui.communal.CommunalOngoingContentStartable
+import com.android.systemui.communal.CommunalSceneStartable
+import com.android.systemui.communal.log.CommunalLoggerStartable
+import com.android.systemui.communal.widgets.CommunalAppWidgetHostStartable
+import dagger.Binds
+import dagger.Module
+import dagger.multibindings.ClassKey
+import dagger.multibindings.IntoMap
+
+@Module
+interface CommunalStartableModule {
+ @Binds
+ @IntoMap
+ @ClassKey(CommunalLoggerStartable::class)
+ fun bindCommunalLoggerStartable(impl: CommunalLoggerStartable): CoreStartable
+
+ @Binds
+ @IntoMap
+ @ClassKey(CommunalSceneStartable::class)
+ fun bindCommunalSceneStartable(impl: CommunalSceneStartable): CoreStartable
+
+ @Binds
+ @IntoMap
+ @ClassKey(CommunalDreamStartable::class)
+ fun bindCommunalDreamStartable(impl: CommunalDreamStartable): CoreStartable
+
+ @Binds
+ @IntoMap
+ @ClassKey(CommunalAppWidgetHostStartable::class)
+ fun bindCommunalAppWidgetHostStartable(impl: CommunalAppWidgetHostStartable): CoreStartable
+
+ @Binds
+ @IntoMap
+ @ClassKey(CommunalBackupRestoreStartable::class)
+ fun bindCommunalBackupRestoreStartable(impl: CommunalBackupRestoreStartable): CoreStartable
+
+ @Binds
+ @IntoMap
+ @ClassKey(CommunalOngoingContentStartable::class)
+ fun bindCommunalOngoingContentStartable(impl: CommunalOngoingContentStartable): CoreStartable
+}
diff --git a/packages/SystemUI/src/com/android/systemui/communal/data/backup/CommunalBackupUtils.kt b/packages/SystemUI/src/com/android/systemui/communal/data/backup/CommunalBackupUtils.kt
index a8e5174494a1..c3d2683ce953 100644
--- a/packages/SystemUI/src/com/android/systemui/communal/data/backup/CommunalBackupUtils.kt
+++ b/packages/SystemUI/src/com/android/systemui/communal/data/backup/CommunalBackupUtils.kt
@@ -43,11 +43,13 @@ class CommunalBackupUtils(
val widgetsFromDb = runBlocking { database.communalWidgetDao().getWidgets().first() }
val widgetsState = mutableListOf<CommunalHubState.CommunalWidgetItem>()
widgetsFromDb.keys.forEach { rankItem ->
+ val widget = widgetsFromDb[rankItem]!!
widgetsState.add(
CommunalHubState.CommunalWidgetItem().apply {
rank = rankItem.rank
- widgetId = widgetsFromDb[rankItem]!!.widgetId
- componentName = widgetsFromDb[rankItem]?.componentName
+ widgetId = widget.widgetId
+ componentName = widget.componentName
+ userSerialNumber = widget.userSerialNumber
}
)
}
diff --git a/packages/SystemUI/src/com/android/systemui/communal/data/db/CommunalDatabase.kt b/packages/SystemUI/src/com/android/systemui/communal/data/db/CommunalDatabase.kt
index 3ce81094b696..dff63527ba05 100644
--- a/packages/SystemUI/src/com/android/systemui/communal/data/db/CommunalDatabase.kt
+++ b/packages/SystemUI/src/com/android/systemui/communal/data/db/CommunalDatabase.kt
@@ -17,17 +17,21 @@
package com.android.systemui.communal.data.db
import android.content.Context
+import android.util.Log
import androidx.annotation.VisibleForTesting
import androidx.room.Database
import androidx.room.Room
import androidx.room.RoomDatabase
+import androidx.room.migration.Migration
+import androidx.sqlite.db.SupportSQLiteDatabase
import com.android.systemui.res.R
-@Database(entities = [CommunalWidgetItem::class, CommunalItemRank::class], version = 1)
+@Database(entities = [CommunalWidgetItem::class, CommunalItemRank::class], version = 2)
abstract class CommunalDatabase : RoomDatabase() {
abstract fun communalWidgetDao(): CommunalWidgetDao
companion object {
+ private const val TAG = "CommunalDatabase"
private var instance: CommunalDatabase? = null
/**
@@ -51,7 +55,8 @@ abstract class CommunalDatabase : RoomDatabase() {
context.resources.getString(R.string.config_communalDatabase)
)
.also { builder ->
- builder.fallbackToDestructiveMigration(dropAllTables = false)
+ builder.addMigrations(MIGRATION_1_2)
+ builder.fallbackToDestructiveMigration(dropAllTables = true)
callback?.let { callback -> builder.addCallback(callback) }
}
.build()
@@ -64,5 +69,23 @@ abstract class CommunalDatabase : RoomDatabase() {
fun setInstance(database: CommunalDatabase) {
instance = database
}
+
+ /**
+ * This migration adds a user_serial_number column and sets its default value as
+ * [CommunalWidgetItem.USER_SERIAL_NUMBER_UNDEFINED]. Work profile widgets added before the
+ * migration still work as expected, but they would be backed up as personal.
+ */
+ @VisibleForTesting
+ val MIGRATION_1_2 =
+ object : Migration(1, 2) {
+ override fun migrate(db: SupportSQLiteDatabase) {
+ Log.i(TAG, "Migrating from version 1 to 2")
+ db.execSQL(
+ "ALTER TABLE communal_widget_table " +
+ "ADD COLUMN user_serial_number INTEGER NOT NULL DEFAULT " +
+ "${CommunalWidgetItem.USER_SERIAL_NUMBER_UNDEFINED}"
+ )
+ }
+ }
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/communal/data/db/CommunalEntities.kt b/packages/SystemUI/src/com/android/systemui/communal/data/db/CommunalEntities.kt
index 0d5336ab8540..e33aead11842 100644
--- a/packages/SystemUI/src/com/android/systemui/communal/data/db/CommunalEntities.kt
+++ b/packages/SystemUI/src/com/android/systemui/communal/data/db/CommunalEntities.kt
@@ -29,7 +29,28 @@ data class CommunalWidgetItem(
@ColumnInfo(name = "component_name") val componentName: String,
/** Reference the id of an item persisted in the glanceable hub */
@ColumnInfo(name = "item_id") val itemId: Long,
-)
+ /**
+ * A serial number of the user that the widget provider is associated with. For example, a work
+ * profile widget.
+ *
+ * A serial number may be different from its user id in that user ids may be recycled but serial
+ * numbers are unique until the device is wiped.
+ *
+ * Most commonly, this value would be 0 for the primary user, and 10 for the work profile.
+ */
+ @ColumnInfo(name = "user_serial_number", defaultValue = "$USER_SERIAL_NUMBER_UNDEFINED")
+ val userSerialNumber: Int,
+) {
+ companion object {
+ /**
+ * The user serial number associated with the widget is undefined.
+ *
+ * This should only happen for widgets migrated from V1 before user serial number was
+ * included in the schema.
+ */
+ const val USER_SERIAL_NUMBER_UNDEFINED = -1
+ }
+}
@Entity(tableName = "communal_item_rank_table")
data class CommunalItemRank(
diff --git a/packages/SystemUI/src/com/android/systemui/communal/data/db/CommunalWidgetDao.kt b/packages/SystemUI/src/com/android/systemui/communal/data/db/CommunalWidgetDao.kt
index d174fd1c97ea..933a25a21578 100644
--- a/packages/SystemUI/src/com/android/systemui/communal/data/db/CommunalWidgetDao.kt
+++ b/packages/SystemUI/src/com/android/systemui/communal/data/db/CommunalWidgetDao.kt
@@ -17,6 +17,7 @@
package com.android.systemui.communal.data.db
import android.content.ComponentName
+import android.os.UserManager
import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Query
@@ -26,7 +27,7 @@ import androidx.sqlite.db.SupportSQLiteDatabase
import com.android.systemui.communal.nano.CommunalHubState
import com.android.systemui.communal.widgets.CommunalWidgetHost
import com.android.systemui.communal.widgets.CommunalWidgetModule.Companion.DEFAULT_WIDGETS
-import com.android.systemui.dagger.qualifiers.Application
+import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Background
import com.android.systemui.log.LogBuffer
import com.android.systemui.log.core.Logger
@@ -34,58 +35,96 @@ import com.android.systemui.log.dagger.CommunalLog
import javax.inject.Inject
import javax.inject.Named
import javax.inject.Provider
-import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.launch
-import kotlinx.coroutines.withContext
/**
* Callback that will be invoked when the Room database is created. Then the database will be
* populated with pre-configured default widgets to be rendered in the glanceable hub.
*/
+@SysUISingleton
class DefaultWidgetPopulation
@Inject
constructor(
- @Application private val applicationScope: CoroutineScope,
- @Background private val bgDispatcher: CoroutineDispatcher,
+ @Background private val bgScope: CoroutineScope,
private val communalWidgetHost: CommunalWidgetHost,
private val communalWidgetDaoProvider: Provider<CommunalWidgetDao>,
@Named(DEFAULT_WIDGETS) private val defaultWidgets: Array<String>,
@CommunalLog logBuffer: LogBuffer,
+ private val userManager: UserManager,
) : RoomDatabase.Callback() {
companion object {
private const val TAG = "DefaultWidgetPopulation"
}
+
private val logger = Logger(logBuffer, TAG)
+ /**
+ * Reason for skipping default widgets population. Do not skip if this value is
+ * [SkipReason.NONE].
+ */
+ private var skipReason = SkipReason.NONE
+
override fun onCreate(db: SupportSQLiteDatabase) {
super.onCreate(db)
- applicationScope.launch {
- addDefaultWidgets()
- logger.i("Default widgets were populated in the database.")
+
+ if (skipReason != SkipReason.NONE) {
+ logger.i("Skipped populating default widgets. Reason: $skipReason")
+ return
}
- }
- // Read default widgets from config.xml and populate the database.
- private suspend fun addDefaultWidgets() =
- withContext(bgDispatcher) {
+ bgScope.launch {
+ // Default widgets should be associated with the main user.
+ val user = userManager.mainUser
+
+ if (user == null) {
+ logger.w(
+ "Skipped populating default widgets. Reason: device does not have a main user"
+ )
+ return@launch
+ }
+
+ val userSerialNumber = userManager.getUserSerialNumber(user.identifier)
+
defaultWidgets.forEachIndexed { index, name ->
val provider = ComponentName.unflattenFromString(name)
provider?.let {
- val id = communalWidgetHost.allocateIdAndBindWidget(provider)
+ val id = communalWidgetHost.allocateIdAndBindWidget(provider, user)
id?.let {
communalWidgetDaoProvider
.get()
.addWidget(
widgetId = id,
- provider = provider,
- priority = defaultWidgets.size - index
+ componentName = name,
+ priority = defaultWidgets.size - index,
+ userSerialNumber = userSerialNumber,
)
}
}
}
+
+ logger.i("Populated default widgets in the database.")
}
+ }
+
+ /**
+ * Skip populating default widgets in the Glanceable Hub when the database is created. This has
+ * no effect if default widgets have been populated already.
+ *
+ * @param skipReason Reason for skipping the default widgets population.
+ */
+ fun skipDefaultWidgetsPopulation(skipReason: SkipReason) {
+ this.skipReason = skipReason
+ }
+
+ /** Reason for skipping default widgets population. */
+ enum class SkipReason {
+ /** Do not skip. */
+ NONE,
+ /** Widgets are restored from a backup. */
+ RESTORED_FROM_BACKUP,
+ }
}
@Dao
@@ -106,10 +145,16 @@ interface CommunalWidgetDao {
fun deleteItemRankById(itemId: Long)
@Query(
- "INSERT INTO communal_widget_table(widget_id, component_name, item_id) " +
- "VALUES(:widgetId, :componentName, :itemId)"
+ "INSERT INTO communal_widget_table" +
+ "(widget_id, component_name, item_id, user_serial_number) " +
+ "VALUES(:widgetId, :componentName, :itemId, :userSerialNumber)"
)
- fun insertWidget(widgetId: Int, componentName: String, itemId: Long): Long
+ fun insertWidget(
+ widgetId: Int,
+ componentName: String,
+ itemId: Long,
+ userSerialNumber: Int,
+ ): Long
@Query("INSERT INTO communal_item_rank_table(rank) VALUES(:rank)")
fun insertItemRank(rank: Int): Long
@@ -132,28 +177,41 @@ interface CommunalWidgetDao {
}
@Transaction
- fun addWidget(widgetId: Int, provider: ComponentName, priority: Int): Long {
+ fun addWidget(
+ widgetId: Int,
+ provider: ComponentName,
+ priority: Int,
+ userSerialNumber: Int,
+ ): Long {
return addWidget(
widgetId = widgetId,
componentName = provider.flattenToString(),
priority = priority,
+ userSerialNumber = userSerialNumber,
)
}
@Transaction
- fun addWidget(widgetId: Int, componentName: String, priority: Int): Long {
+ fun addWidget(
+ widgetId: Int,
+ componentName: String,
+ priority: Int,
+ userSerialNumber: Int,
+ ): Long {
return insertWidget(
widgetId = widgetId,
componentName = componentName,
itemId = insertItemRank(priority),
+ userSerialNumber = userSerialNumber,
)
}
@Transaction
fun deleteWidgetById(widgetId: Int): Boolean {
val widget =
- getWidgetByIdNow(widgetId) ?: // no entry to delete from db
- return false
+ getWidgetByIdNow(widgetId)
+ ?: // no entry to delete from db
+ return false
deleteItemRankById(widget.itemId)
deleteWidgets(widget)
@@ -166,6 +224,8 @@ interface CommunalWidgetDao {
clearCommunalWidgetsTable()
clearCommunalItemRankTable()
- state.widgets.forEach { addWidget(it.widgetId, it.componentName, it.rank) }
+ state.widgets.forEach {
+ addWidget(it.widgetId, it.componentName, it.rank, it.userSerialNumber)
+ }
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/communal/data/model/CommunalSmartspaceTimer.kt b/packages/SystemUI/src/com/android/systemui/communal/data/model/CommunalSmartspaceTimer.kt
new file mode 100644
index 000000000000..ff9dddd7c516
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/communal/data/model/CommunalSmartspaceTimer.kt
@@ -0,0 +1,29 @@
+/*
+ * 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.communal.data.model
+
+import android.widget.RemoteViews
+
+/** Data model of a smartspace timer in the Glanceable Hub. */
+data class CommunalSmartspaceTimer(
+ /** Unique id that identifies the timer. */
+ val smartspaceTargetId: String,
+ /** Timestamp in milliseconds of when the timer was created. */
+ val createdTimestampMillis: Long,
+ /** Remote views for the timer that is rendered in Glanceable Hub. */
+ val remoteViews: RemoteViews,
+)
diff --git a/packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalMediaRepository.kt b/packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalMediaRepository.kt
index e5a0e5070b94..fe9154c192c5 100644
--- a/packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalMediaRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalMediaRepository.kt
@@ -30,6 +30,12 @@ import kotlinx.coroutines.flow.MutableStateFlow
/** Encapsulates the state of smartspace in communal. */
interface CommunalMediaRepository {
val mediaModel: Flow<CommunalMediaModel>
+
+ /** Start listening for media updates. */
+ fun startListening()
+
+ /** Stop listening for media updates. */
+ fun stopListening()
}
@SysUISingleton
@@ -38,29 +44,7 @@ class CommunalMediaRepositoryImpl
constructor(
private val mediaDataManager: MediaDataManager,
@CommunalTableLog tableLogBuffer: TableLogBuffer,
-) : CommunalMediaRepository {
-
- private val mediaDataListener =
- object : MediaDataManager.Listener {
- override fun onMediaDataLoaded(
- key: String,
- oldKey: String?,
- data: MediaData,
- immediately: Boolean,
- receivedSmartspaceCardLatency: Int,
- isSsReactivated: Boolean
- ) {
- updateMediaModel(data)
- }
-
- override fun onMediaDataRemoved(key: String, userInitiated: Boolean) {
- updateMediaModel()
- }
- }
-
- init {
- mediaDataManager.addListener(mediaDataListener)
- }
+) : CommunalMediaRepository, MediaDataManager.Listener {
private val _mediaModel: MutableStateFlow<CommunalMediaModel> =
MutableStateFlow(CommunalMediaModel.INACTIVE)
@@ -72,6 +56,29 @@ constructor(
initialValue = CommunalMediaModel.INACTIVE,
)
+ override fun startListening() {
+ mediaDataManager.addListener(this)
+ }
+
+ override fun stopListening() {
+ mediaDataManager.removeListener(this)
+ }
+
+ override fun onMediaDataLoaded(
+ key: String,
+ oldKey: String?,
+ data: MediaData,
+ immediately: Boolean,
+ receivedSmartspaceCardLatency: Int,
+ isSsReactivated: Boolean
+ ) {
+ updateMediaModel(data)
+ }
+
+ override fun onMediaDataRemoved(key: String, userInitiated: Boolean) {
+ updateMediaModel()
+ }
+
private fun updateMediaModel(data: MediaData? = null) {
if (mediaDataManager.hasActiveMediaOrRecommendation()) {
_mediaModel.value =
diff --git a/packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalPrefsRepository.kt b/packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalPrefsRepository.kt
index d8067b887c67..4de39c457f3b 100644
--- a/packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalPrefsRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalPrefsRepository.kt
@@ -49,14 +49,8 @@ interface CommunalPrefsRepository {
/** Whether the CTA tile has been dismissed. */
fun isCtaDismissed(user: UserInfo): Flow<Boolean>
- /** Whether the lock screen widget disclaimer has been dismissed by the user. */
- fun isDisclaimerDismissed(user: UserInfo): Flow<Boolean>
-
/** Save the CTA tile dismissed state for the current user. */
suspend fun setCtaDismissed(user: UserInfo)
-
- /** Save the lock screen widget disclaimer dismissed state for the current user. */
- suspend fun setDisclaimerDismissed(user: UserInfo)
}
@OptIn(ExperimentalCoroutinesApi::class)
@@ -74,9 +68,6 @@ constructor(
override fun isCtaDismissed(user: UserInfo): Flow<Boolean> =
readKeyForUser(user, CTA_DISMISSED_STATE)
- override fun isDisclaimerDismissed(user: UserInfo): Flow<Boolean> =
- readKeyForUser(user, DISCLAIMER_DISMISSED_STATE)
-
/**
* Emits an event each time a Backup & Restore restoration job is completed, and once at the
* start of collection.
@@ -97,12 +88,6 @@ constructor(
logger.i("Dismissed CTA tile")
}
- override suspend fun setDisclaimerDismissed(user: UserInfo) =
- withContext(bgDispatcher) {
- getSharedPrefsForUser(user).edit().putBoolean(DISCLAIMER_DISMISSED_STATE, true).apply()
- logger.i("Dismissed widget disclaimer")
- }
-
private fun getSharedPrefsForUser(user: UserInfo): SharedPreferences {
return userFileManager.getSharedPreferences(
FILE_NAME,
@@ -124,6 +109,5 @@ constructor(
const val TAG = "CommunalPrefsRepository"
const val FILE_NAME = "communal_hub_prefs"
const val CTA_DISMISSED_STATE = "cta_dismissed"
- const val DISCLAIMER_DISMISSED_STATE = "disclaimer_dismissed"
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalSceneRepository.kt b/packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalSceneRepository.kt
index 7a4006d515f7..260dcbad6201 100644
--- a/packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalSceneRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalSceneRepository.kt
@@ -28,7 +28,6 @@ import com.android.systemui.scene.shared.model.SceneDataSource
import javax.inject.Inject
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.ExperimentalCoroutinesApi
-import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.SharingStarted
@@ -52,7 +51,7 @@ interface CommunalSceneRepository {
fun changeScene(toScene: SceneKey, transitionKey: TransitionKey? = null)
/** Immediately snaps to the desired scene. */
- fun snapToScene(toScene: SceneKey, delayMillis: Long = 0)
+ fun snapToScene(toScene: SceneKey)
/**
* Updates the transition state of the hub [SceneTransitionLayout].
@@ -93,11 +92,10 @@ constructor(
}
}
- override fun snapToScene(toScene: SceneKey, delayMillis: Long) {
+ override fun snapToScene(toScene: SceneKey) {
applicationScope.launch {
// SceneTransitionLayout state updates must be triggered on the thread the STL was
// created on.
- delay(delayMillis)
sceneDataSource.snapToScene(toScene)
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalSceneTransitionRepository.kt b/packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalSceneTransitionRepository.kt
new file mode 100644
index 000000000000..7d9e1df41e6f
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalSceneTransitionRepository.kt
@@ -0,0 +1,32 @@
+/*
+ * 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.communal.data.repository
+
+import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.keyguard.shared.model.KeyguardState
+import javax.inject.Inject
+import kotlinx.coroutines.flow.MutableStateFlow
+
+@SysUISingleton
+class CommunalSceneTransitionRepository @Inject constructor() {
+ /**
+ * This [KeyguardState] will indicate which sub state within KTF should be navigated to when the
+ * next transition away from communal scene is started. It will be consumed exactly once and
+ * after that the state will be set back to null.
+ */
+ val nextLockscreenTargetState: MutableStateFlow<KeyguardState?> = MutableStateFlow(null)
+}
diff --git a/packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalSettingsRepository.kt b/packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalSettingsRepository.kt
index e3ef6bbfad61..7b54815ab344 100644
--- a/packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalSettingsRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalSettingsRepository.kt
@@ -20,6 +20,7 @@ import android.app.admin.DevicePolicyManager
import android.app.admin.DevicePolicyManager.KEYGUARD_DISABLE_WIDGETS_ALL
import android.content.IntentFilter
import android.content.pm.UserInfo
+import android.os.UserHandle
import android.provider.Settings
import com.android.systemui.Flags.communalHub
import com.android.systemui.broadcast.BroadcastDispatcher
@@ -51,6 +52,14 @@ interface CommunalSettingsRepository {
/** A [CommunalEnabledState] for the specified user. */
fun getEnabledState(user: UserInfo): Flow<CommunalEnabledState>
+ /**
+ * Returns true if both the communal trunk-stable flag and resource flag are enabled.
+ *
+ * The trunk-stable flag is controlled by server rollout and is on all devices. The resource
+ * flag is enabled via resource overlay only on products we want the hub to be present on.
+ */
+ fun getFlagEnabled(): Boolean
+
/** Keyguard widgets enabled state by Device Policy Manager for the specified user. */
fun getAllowedByDevicePolicy(user: UserInfo): Flow<Boolean>
@@ -69,15 +78,15 @@ constructor(
private val devicePolicyManager: DevicePolicyManager,
) : CommunalSettingsRepository {
- private val flagEnabled: Boolean by lazy {
- featureFlagsClassic.isEnabled(Flags.COMMUNAL_SERVICE_ENABLED) && communalHub()
+ override fun getFlagEnabled(): Boolean {
+ return featureFlagsClassic.isEnabled(Flags.COMMUNAL_SERVICE_ENABLED) && communalHub()
}
override fun getEnabledState(user: UserInfo): Flow<CommunalEnabledState> {
if (!user.isMain) {
return flowOf(CommunalEnabledState(DISABLED_REASON_INVALID_USER))
}
- if (!flagEnabled) {
+ if (!getFlagEnabled()) {
return flowOf(CommunalEnabledState(DISABLED_REASON_FLAG))
}
return combine(
@@ -102,7 +111,10 @@ constructor(
.broadcastFlow(
filter =
IntentFilter(DevicePolicyManager.ACTION_DEVICE_POLICY_MANAGER_STATE_CHANGED),
- user = user.userHandle
+ // In COPE management mode, the restriction from the managed profile may
+ // propagate to the main profile. Therefore listen to this broadcast across
+ // all users and update the state each time it changes.
+ user = UserHandle.ALL,
)
.emitOnStart()
.map { devicePolicyManager.areKeyguardWidgetsAllowed(user.id) }
diff --git a/packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalSmartspaceRepository.kt b/packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalSmartspaceRepository.kt
new file mode 100644
index 000000000000..e1d9bef67490
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalSmartspaceRepository.kt
@@ -0,0 +1,123 @@
+/*
+ * 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.communal.data.repository
+
+import android.app.smartspace.SmartspaceTarget
+import android.os.Parcelable
+import androidx.annotation.VisibleForTesting
+import com.android.systemui.communal.data.model.CommunalSmartspaceTimer
+import com.android.systemui.communal.smartspace.CommunalSmartspaceController
+import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.dagger.qualifiers.Main
+import com.android.systemui.plugins.BcSmartspaceDataPlugin
+import com.android.systemui.util.time.SystemClock
+import java.util.concurrent.Executor
+import javax.inject.Inject
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.MutableStateFlow
+
+interface CommunalSmartspaceRepository {
+ /** Smartspace timer targets for the communal surface. */
+ val timers: Flow<List<CommunalSmartspaceTimer>>
+
+ /** Start listening for smartspace updates. */
+ fun startListening()
+
+ /** Stop listening for smartspace updates. */
+ fun stopListening()
+}
+
+@SysUISingleton
+class CommunalSmartspaceRepositoryImpl
+@Inject
+constructor(
+ private val communalSmartspaceController: CommunalSmartspaceController,
+ @Main private val uiExecutor: Executor,
+ private val systemClock: SystemClock,
+) : CommunalSmartspaceRepository, BcSmartspaceDataPlugin.SmartspaceTargetListener {
+
+ private val _timers: MutableStateFlow<List<CommunalSmartspaceTimer>> =
+ MutableStateFlow(emptyList())
+ override val timers: Flow<List<CommunalSmartspaceTimer>> = _timers
+
+ private var targetCreationTimes = emptyMap<String, Long>()
+
+ override fun onSmartspaceTargetsUpdated(targetsNullable: MutableList<out Parcelable>?) {
+ val targets = targetsNullable?.filterIsInstance<SmartspaceTarget>() ?: emptyList()
+ val timerTargets =
+ targets
+ .filter { target ->
+ target.featureType == SmartspaceTarget.FEATURE_TIMER &&
+ target.remoteViews != null
+ }
+ .associateBy { stableId(it.smartspaceTargetId) }
+
+ // The creation times from smartspace targets are unreliable (b/318535930). Therefore,
+ // SystemUI uses the timestamp of which a timer first appears, and caches these values to
+ // prevent timers from swapping positions in the hub.
+ targetCreationTimes =
+ timerTargets.mapValues { (stableId, _) ->
+ targetCreationTimes[stableId] ?: systemClock.currentTimeMillis()
+ }
+
+ _timers.value =
+ timerTargets.map { (stableId, target) ->
+ CommunalSmartspaceTimer(
+ // The view layer should have the instance based smartspaceTargetId instead of
+ // stable id, so that when a new instance of the timer is created, for example,
+ // when it is paused, the view should re-render its remote views.
+ smartspaceTargetId = target.smartspaceTargetId,
+ createdTimestampMillis = targetCreationTimes[stableId]!!,
+ remoteViews = target.remoteViews!!,
+ )
+ }
+ }
+
+ override fun startListening() {
+ if (android.app.smartspace.flags.Flags.remoteViews()) {
+ uiExecutor.execute {
+ communalSmartspaceController.addListener(
+ listener = this@CommunalSmartspaceRepositoryImpl
+ )
+ }
+ }
+ }
+
+ override fun stopListening() {
+ uiExecutor.execute {
+ communalSmartspaceController.removeListener(
+ listener = this@CommunalSmartspaceRepositoryImpl
+ )
+ }
+ }
+
+ companion object {
+ /**
+ * The smartspace target id is instance-based, meaning a single timer (from the user's
+ * perspective) can have multiple instances. For example, when a timer is paused, a new
+ * instance is created. To address this, SystemUI manually removes the instance id to
+ * maintain a consistent id across sessions.
+ *
+ * It is assumed that timer target ids follow this format: timer-${stableId}-${instanceId}.
+ * This function returns timer-${stableId}, stripping out the instance id.
+ */
+ @VisibleForTesting
+ fun stableId(targetId: String): String {
+ return targetId.split("-").take(2).joinToString("-")
+ }
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/smartspace/data/repository/SmartspaceRepositoryModule.kt b/packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalSmartspaceRepositoryModule.kt
index c77bcc50b69a..b11c6d6d5d55 100644
--- a/packages/SystemUI/src/com/android/systemui/smartspace/data/repository/SmartspaceRepositoryModule.kt
+++ b/packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalSmartspaceRepositoryModule.kt
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2023 The Android Open Source Project
+ * 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.
@@ -14,12 +14,15 @@
* limitations under the License.
*/
-package com.android.systemui.smartspace.data.repository
+package com.android.systemui.communal.data.repository
import dagger.Binds
import dagger.Module
@Module
-interface SmartspaceRepositoryModule {
- @Binds fun smartspaceRepository(impl: SmartspaceRepositoryImpl): SmartspaceRepository
+interface CommunalSmartspaceRepositoryModule {
+ @Binds
+ fun communalSmartspaceRepository(
+ impl: CommunalSmartspaceRepositoryImpl
+ ): CommunalSmartspaceRepository
}
diff --git a/packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalWidgetRepository.kt b/packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalWidgetRepository.kt
index fdb797d5ba06..e65e5e5688f5 100644
--- a/packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalWidgetRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalWidgetRepository.kt
@@ -20,10 +20,14 @@ import android.app.backup.BackupManager
import android.appwidget.AppWidgetProviderInfo
import android.content.ComponentName
import android.os.UserHandle
+import android.os.UserManager
import com.android.systemui.common.data.repository.PackageChangeRepository
import com.android.systemui.common.shared.model.PackageInstallSession
import com.android.systemui.communal.data.backup.CommunalBackupUtils
import com.android.systemui.communal.data.db.CommunalWidgetDao
+import com.android.systemui.communal.data.db.CommunalWidgetItem
+import com.android.systemui.communal.data.db.DefaultWidgetPopulation
+import com.android.systemui.communal.data.db.DefaultWidgetPopulation.SkipReason.RESTORED_FROM_BACKUP
import com.android.systemui.communal.nano.CommunalHubState
import com.android.systemui.communal.proto.toCommunalHubState
import com.android.systemui.communal.shared.model.CommunalWidgetContentModel
@@ -98,6 +102,8 @@ constructor(
private val backupManager: BackupManager,
private val backupUtils: CommunalBackupUtils,
packageChangeRepository: PackageChangeRepository,
+ private val userManager: UserManager,
+ private val defaultWidgetPopulation: DefaultWidgetPopulation,
) : CommunalWidgetRepository {
companion object {
const val TAG = "CommunalWidgetRepository"
@@ -185,6 +191,7 @@ constructor(
widgetId = id,
provider = provider,
priority = priority,
+ userSerialNumber = userManager.getUserSerialNumber(user.identifier),
)
backupManager.dataChanged()
} else {
@@ -228,9 +235,38 @@ constructor(
return@launch
}
+ // Abort restoring widgets if this code is somehow run on a device that does not have
+ // a main user, e.g. auto.
+ val mainUser = userManager.mainUser
+ if (mainUser == null) {
+ logger.w("Skipped restoring widgets because device does not have a main user")
+ return@launch
+ }
+
val widgetsWithHost = appWidgetHost.appWidgetIds.toList()
val widgetsToRemove = widgetsWithHost.toMutableList()
+ val oldUserSerialNumbers = state.widgets.map { it.userSerialNumber }.distinct()
+ val usersMap =
+ oldUserSerialNumbers.associateWith { oldUserSerialNumber ->
+ if (oldUserSerialNumber == CommunalWidgetItem.USER_SERIAL_NUMBER_UNDEFINED) {
+ // If user serial number from the backup is undefined, the widget was added
+ // to the hub before user serial numbers are stored in the database. In this
+ // case, we restore the widget with the main user.
+ mainUser
+ } else {
+ // If the user serial number is defined, look up whether the user is
+ // restored. This API returns a user handle matching its backed up user
+ // serial number, if the user is restored. Otherwise, null is returned.
+ backupManager.getUserForAncestralSerialNumber(oldUserSerialNumber.toLong())
+ ?: null
+ }
+ }
+ logger.d({ "Restored users map: $str1" }) { str1 = usersMap.toString() }
+
+ // A set to hold all widgets that belong to non-main users
+ val secondaryUserWidgets = mutableSetOf<CommunalHubState.CommunalWidgetItem>()
+
// Produce a new state to be restored, skipping invalid widgets
val newWidgets =
state.widgets.mapNotNull { restoredWidget ->
@@ -249,20 +285,67 @@ constructor(
return@mapNotNull null
}
+ // Skip if user / profile is not registered
+ val newUser = usersMap[restoredWidget.userSerialNumber]
+ if (newUser == null) {
+ logger.d({
+ "Skipped restoring widget $int1 because its user $int2 is not " +
+ "registered"
+ }) {
+ int1 = restoredWidget.widgetId
+ int2 = restoredWidget.userSerialNumber
+ }
+ return@mapNotNull null
+ }
+
+ // Place secondary user widgets in a bucket to be manually bound later because
+ // of a platform bug (b/349852237) that backs up work profile widgets as
+ // personal.
+ if (newUser.identifier != mainUser.identifier) {
+ logger.d({
+ "Skipped restoring widget $int1 for now because its new user $int2 " +
+ "is secondary. This widget will be bound later."
+ }) {
+ int1 = restoredWidget.widgetId
+ int2 = newUser.identifier
+ }
+ secondaryUserWidgets.add(restoredWidget)
+ return@mapNotNull null
+ }
+
widgetsToRemove.remove(newWidgetId)
CommunalHubState.CommunalWidgetItem().apply {
widgetId = newWidgetId
componentName = restoredWidget.componentName
rank = restoredWidget.rank
+ userSerialNumber = userManager.getUserSerialNumber(newUser.identifier)
}
}
val newState = CommunalHubState().apply { widgets = newWidgets.toTypedArray() }
+ // Skip default widgets population
+ defaultWidgetPopulation.skipDefaultWidgetsPopulation(RESTORED_FROM_BACKUP)
+
// Restore database
- logger.i("Restoring communal database $newState")
+ logger.i("Restoring communal database:\n$newState")
communalWidgetDao.restoreCommunalHubState(newState)
+ // Manually bind each secondary user widget due to platform bug b/349852237
+ secondaryUserWidgets.forEach { widget ->
+ val newUser = usersMap[widget.userSerialNumber]!!
+ logger.i({ "Binding secondary user ($int1) widget $int2: $str1" }) {
+ int1 = newUser.identifier
+ int2 = widget.widgetId
+ str1 = widget.componentName
+ }
+ addWidget(
+ provider = ComponentName.unflattenFromString(widget.componentName)!!,
+ user = newUser,
+ priority = widget.rank,
+ )
+ }
+
// Delete restored state file from disk
backupUtils.clear()
diff --git a/packages/SystemUI/src/com/android/systemui/communal/domain/interactor/CommunalInteractor.kt b/packages/SystemUI/src/com/android/systemui/communal/domain/interactor/CommunalInteractor.kt
index f5255ac4d545..dbddc23d6146 100644
--- a/packages/SystemUI/src/com/android/systemui/communal/domain/interactor/CommunalInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/communal/domain/interactor/CommunalInteractor.kt
@@ -16,18 +16,20 @@
package com.android.systemui.communal.domain.interactor
-import android.app.smartspace.SmartspaceTarget
import android.content.ComponentName
import android.content.Intent
import android.content.IntentFilter
+import android.content.pm.UserInfo
import android.os.UserHandle
import android.os.UserManager
import android.provider.Settings
+import com.android.app.tracing.coroutines.launch
import com.android.compose.animation.scene.ObservableTransitionState
import com.android.compose.animation.scene.SceneKey
import com.android.compose.animation.scene.TransitionKey
import com.android.systemui.broadcast.BroadcastDispatcher
import com.android.systemui.communal.data.repository.CommunalMediaRepository
+import com.android.systemui.communal.data.repository.CommunalSmartspaceRepository
import com.android.systemui.communal.data.repository.CommunalWidgetRepository
import com.android.systemui.communal.domain.model.CommunalContentModel
import com.android.systemui.communal.domain.model.CommunalContentModel.WidgetContent
@@ -59,15 +61,16 @@ import com.android.systemui.scene.domain.interactor.SceneInteractor
import com.android.systemui.scene.shared.flag.SceneContainerFlag
import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.settings.UserTracker
-import com.android.systemui.smartspace.data.repository.SmartspaceRepository
import com.android.systemui.util.kotlin.BooleanFlowOperators.allOf
import com.android.systemui.util.kotlin.BooleanFlowOperators.not
import com.android.systemui.util.kotlin.emitOnStart
import javax.inject.Inject
+import kotlin.time.Duration.Companion.minutes
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.channels.BufferOverflow
+import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableSharedFlow
import kotlinx.coroutines.flow.MutableStateFlow
@@ -81,7 +84,6 @@ import kotlinx.coroutines.flow.emptyFlow
import kotlinx.coroutines.flow.filter
import kotlinx.coroutines.flow.flatMapLatest
import kotlinx.coroutines.flow.flow
-import kotlinx.coroutines.flow.flowOf
import kotlinx.coroutines.flow.flowOn
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.onEach
@@ -95,12 +97,13 @@ class CommunalInteractor
@Inject
constructor(
@Application val applicationScope: CoroutineScope,
+ @Background private val bgScope: CoroutineScope,
@Background val bgDispatcher: CoroutineDispatcher,
broadcastDispatcher: BroadcastDispatcher,
private val widgetRepository: CommunalWidgetRepository,
private val communalPrefsInteractor: CommunalPrefsInteractor,
private val mediaRepository: CommunalMediaRepository,
- smartspaceRepository: SmartspaceRepository,
+ private val smartspaceRepository: CommunalSmartspaceRepository,
keyguardInteractor: KeyguardInteractor,
keyguardTransitionInteractor: KeyguardTransitionInteractor,
communalSettingsInteractor: CommunalSettingsInteractor,
@@ -118,9 +121,25 @@ constructor(
private val _editModeOpen = MutableStateFlow(false)
- /** Whether edit mode is currently open. */
+ /**
+ * Whether edit mode is currently open. This will be true from onCreate to onDestroy in
+ * [EditWidgetsActivity] and thus does not correspond to whether or not the activity is visible.
+ *
+ * Note that since this is called in onDestroy, it's not guaranteed to ever be set to false when
+ * edit mode is closed, such as in the case that a user exits edit mode manually with a back
+ * gesture or navigation gesture.
+ */
val editModeOpen: StateFlow<Boolean> = _editModeOpen.asStateFlow()
+ private val _editActivityShowing = MutableStateFlow(false)
+
+ /**
+ * Whether the edit mode activity is currently showing. This is true from onStart to onStop in
+ * [EditWidgetsActivity] so may be false even when the user is in edit mode, such as when a
+ * widget's individual configuration activity has launched.
+ */
+ val editActivityShowing: StateFlow<Boolean> = _editActivityShowing.asStateFlow()
+
/** Whether communal features are enabled. */
val isCommunalEnabled: StateFlow<Boolean> = communalSettingsInteractor.isCommunalEnabled
@@ -149,6 +168,17 @@ constructor(
replay = 1,
)
+ private val _isDisclaimerDismissed = MutableStateFlow(false)
+ val isDisclaimerDismissed: Flow<Boolean> = _isDisclaimerDismissed.asStateFlow()
+
+ fun setDisclaimerDismissed() {
+ bgScope.launch("$TAG#setDisclaimerDismissed") {
+ _isDisclaimerDismissed.value = true
+ delay(DISCLAIMER_RESET_MILLIS)
+ _isDisclaimerDismissed.value = false
+ }
+ }
+
/** Whether to show communal when exiting the occluded state. */
val showCommunalFromOccluded: Flow<Boolean> =
keyguardTransitionInteractor.startedKeyguardTransitionStep
@@ -302,6 +332,10 @@ constructor(
_editModeOpen.value = isOpen
}
+ fun setEditActivityShowing(isOpen: Boolean) {
+ _editActivityShowing.value = isOpen
+ }
+
/** Show the widget editor Activity. */
fun showWidgetEditor(
preselectedKey: String? = null,
@@ -386,11 +420,11 @@ constructor(
combine(
widgetRepository.communalWidgets
.map { filterWidgetsByExistingUsers(it) }
- .combine(communalSettingsInteractor.allowedByDevicePolicyForWorkProfile) {
+ .combine(communalSettingsInteractor.workProfileUserDisallowedByDevicePolicy) {
// exclude widgets under work profile if not allowed by device policy
widgets,
- allowedForWorkProfile ->
- filterWidgetsAllowedByDevicePolicy(widgets, allowedForWorkProfile)
+ disallowedByPolicyUser ->
+ filterWidgetsAllowedByDevicePolicy(widgets, disallowedByPolicyUser)
},
updateOnWorkProfileBroadcastReceived,
) { widgets, _ ->
@@ -418,13 +452,11 @@ constructor(
/** Filter widgets based on whether their associated profile is allowed by device policy. */
private fun filterWidgetsAllowedByDevicePolicy(
list: List<CommunalWidgetContentModel>,
- allowedByDevicePolicyForWorkProfile: Boolean
+ disallowedByDevicePolicyUser: UserInfo?
): List<CommunalWidgetContentModel> =
- if (allowedByDevicePolicyForWorkProfile) {
+ if (disallowedByDevicePolicyUser == null) {
list
} else {
- // Get associated work profile for the currently selected user.
- val workProfile = userTracker.userProfiles.find { it.isManagedProfile }
list.filter { model ->
val uid =
when (model) {
@@ -432,20 +464,7 @@ constructor(
model.providerInfo.profile.identifier
is CommunalWidgetContentModel.Pending -> model.user.identifier
}
- uid != workProfile?.id
- }
- }
-
- /** A flow of available smartspace targets. Currently only showing timers. */
- private val smartspaceTargets: Flow<List<SmartspaceTarget>> =
- if (!smartspaceRepository.isSmartspaceRemoteViewsEnabled) {
- flowOf(emptyList())
- } else {
- smartspaceRepository.communalSmartspaceTargets.map { targets ->
- targets.filter { target ->
- target.featureType == SmartspaceTarget.FEATURE_TIMER &&
- target.remoteViews != null
- }
+ uid != disallowedByDevicePolicyUser.id
}
}
@@ -473,16 +492,16 @@ constructor(
* sized dynamically.
*/
fun getOngoingContent(mediaHostVisible: Boolean): Flow<List<CommunalContentModel.Ongoing>> =
- combine(smartspaceTargets, mediaRepository.mediaModel) { smartspace, media ->
+ combine(smartspaceRepository.timers, mediaRepository.mediaModel) { timers, media ->
val ongoingContent = mutableListOf<CommunalContentModel.Ongoing>()
- // Add smartspace
+ // Add smartspace timers
ongoingContent.addAll(
- smartspace.map { target ->
+ timers.map { timer ->
CommunalContentModel.Smartspace(
- smartspaceTargetId = target.smartspaceTargetId,
- remoteViews = target.remoteViews!!,
- createdTimestampMillis = target.creationTimeMillis,
+ smartspaceTargetId = timer.smartspaceTargetId,
+ remoteViews = timer.remoteViews,
+ createdTimestampMillis = timer.createdTimestampMillis,
)
}
)
@@ -526,6 +545,14 @@ constructor(
}
companion object {
+ const val TAG = "CommunalInteractor"
+
+ /**
+ * The amount of time between showing the widget disclaimer to the user as measured from the
+ * moment the disclaimer is dimsissed.
+ */
+ val DISCLAIMER_RESET_MILLIS = 30.minutes
+
/**
* The user activity timeout which should be used when the communal hub is opened. A value
* of -1 means that the user's chosen screen timeout will be used instead.
@@ -557,4 +584,29 @@ constructor(
)
}
}
+
+ /**
+ * {@link #setScrollPosition} persists the current communal grid scroll position (to volatile
+ * memory) so that the next presentation of the grid (either as glanceable hub or edit mode) can
+ * restore position.
+ */
+ fun setScrollPosition(firstVisibleItemIndex: Int, firstVisibleItemOffset: Int) {
+ _firstVisibleItemIndex = firstVisibleItemIndex
+ _firstVisibleItemOffset = firstVisibleItemOffset
+ }
+
+ fun resetScrollPosition() {
+ _firstVisibleItemIndex = 0
+ _firstVisibleItemOffset = 0
+ }
+
+ val firstVisibleItemIndex: Int
+ get() = _firstVisibleItemIndex
+
+ private var _firstVisibleItemIndex: Int = 0
+
+ val firstVisibleItemOffset: Int
+ get() = _firstVisibleItemOffset
+
+ private var _firstVisibleItemOffset: Int = 0
}
diff --git a/packages/SystemUI/src/com/android/systemui/communal/domain/interactor/CommunalPrefsInteractor.kt b/packages/SystemUI/src/com/android/systemui/communal/domain/interactor/CommunalPrefsInteractor.kt
index 3517650c8cf3..0b5f40d8041e 100644
--- a/packages/SystemUI/src/com/android/systemui/communal/domain/interactor/CommunalPrefsInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/communal/domain/interactor/CommunalPrefsInteractor.kt
@@ -17,7 +17,6 @@
package com.android.systemui.communal.domain.interactor
import android.content.pm.UserInfo
-import com.android.app.tracing.coroutines.launch
import com.android.systemui.communal.data.repository.CommunalPrefsRepository
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Background
@@ -43,7 +42,7 @@ constructor(
private val repository: CommunalPrefsRepository,
userInteractor: SelectedUserInteractor,
private val userTracker: UserTracker,
- @CommunalTableLog tableLogBuffer: TableLogBuffer
+ @CommunalTableLog tableLogBuffer: TableLogBuffer,
) {
val isCtaDismissed: Flow<Boolean> =
@@ -64,25 +63,6 @@ constructor(
suspend fun setCtaDismissed(user: UserInfo = userTracker.userInfo) =
repository.setCtaDismissed(user)
- val isDisclaimerDismissed: Flow<Boolean> =
- userInteractor.selectedUserInfo
- .flatMapLatest { user -> repository.isDisclaimerDismissed(user) }
- .logDiffsForTable(
- tableLogBuffer = tableLogBuffer,
- columnPrefix = "",
- columnName = "isDisclaimerDismissed",
- initialValue = false,
- )
- .stateIn(
- scope = bgScope,
- started = SharingStarted.WhileSubscribed(),
- initialValue = false,
- )
-
- fun setDisclaimerDismissed(user: UserInfo = userTracker.userInfo) {
- bgScope.launch("$TAG#setDisclaimerDismissed") { repository.setDisclaimerDismissed(user) }
- }
-
private companion object {
const val TAG = "CommunalPrefsInteractor"
}
diff --git a/packages/SystemUI/src/com/android/systemui/communal/domain/interactor/CommunalSceneInteractor.kt b/packages/SystemUI/src/com/android/systemui/communal/domain/interactor/CommunalSceneInteractor.kt
index fd540c4b6708..45cfe3673f3d 100644
--- a/packages/SystemUI/src/com/android/systemui/communal/domain/interactor/CommunalSceneInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/communal/domain/interactor/CommunalSceneInteractor.kt
@@ -16,6 +16,7 @@
package com.android.systemui.communal.domain.interactor
+import com.android.app.tracing.coroutines.launch
import com.android.compose.animation.scene.ObservableTransitionState
import com.android.compose.animation.scene.SceneKey
import com.android.compose.animation.scene.TransitionKey
@@ -26,9 +27,11 @@ import com.android.systemui.communal.shared.model.CommunalTransitionKeys
import com.android.systemui.communal.shared.model.EditModeState
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
+import com.android.systemui.keyguard.shared.model.KeyguardState
import javax.inject.Inject
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.SharingStarted
@@ -39,6 +42,7 @@ import kotlinx.coroutines.flow.flatMapLatest
import kotlinx.coroutines.flow.flowOf
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.stateIn
+import kotlinx.coroutines.launch
@OptIn(ExperimentalCoroutinesApi::class)
@SysUISingleton
@@ -48,17 +52,57 @@ constructor(
@Application private val applicationScope: CoroutineScope,
private val communalSceneRepository: CommunalSceneRepository,
) {
+ private val _isLaunchingWidget = MutableStateFlow(false)
+
+ /** Whether a widget launch is currently in progress. */
+ val isLaunchingWidget: StateFlow<Boolean> = _isLaunchingWidget.asStateFlow()
+
+ fun setIsLaunchingWidget(launching: Boolean) {
+ _isLaunchingWidget.value = launching
+ }
+
+ fun interface OnSceneAboutToChangeListener {
+ /** Notifies that the scene is about to change to [toScene]. */
+ fun onSceneAboutToChange(toScene: SceneKey, keyguardState: KeyguardState?)
+ }
+
+ private val onSceneAboutToChangeListener = mutableSetOf<OnSceneAboutToChangeListener>()
+
+ /** Registers a listener which is called when the scene is about to change. */
+ fun registerSceneStateProcessor(processor: OnSceneAboutToChangeListener) {
+ onSceneAboutToChangeListener.add(processor)
+ }
+
/**
* Asks for an asynchronous scene witch to [newScene], which will use the corresponding
* installed transition or the one specified by [transitionKey], if provided.
*/
- fun changeScene(newScene: SceneKey, transitionKey: TransitionKey? = null) {
- communalSceneRepository.changeScene(newScene, transitionKey)
+ fun changeScene(
+ newScene: SceneKey,
+ transitionKey: TransitionKey? = null,
+ keyguardState: KeyguardState? = null,
+ ) {
+ applicationScope.launch {
+ notifyListeners(newScene, keyguardState)
+ communalSceneRepository.changeScene(newScene, transitionKey)
+ }
}
/** Immediately snaps to the new scene. */
- fun snapToScene(newScene: SceneKey, delayMillis: Long = 0) {
- communalSceneRepository.snapToScene(newScene, delayMillis)
+ fun snapToScene(
+ newScene: SceneKey,
+ delayMillis: Long = 0,
+ keyguardState: KeyguardState? = null
+ ) {
+ applicationScope.launch("$TAG#snapToScene") {
+ delay(delayMillis)
+ notifyListeners(newScene, keyguardState)
+ communalSceneRepository.snapToScene(newScene)
+ }
+ }
+
+ private fun notifyListeners(newScene: SceneKey, keyguardState: KeyguardState?) {
+ onSceneAboutToChangeListener.forEach { it.onSceneAboutToChange(newScene, keyguardState) }
}
/** Changes to Blank scene when starting an activity after dismissing keyguard. */
@@ -155,4 +199,8 @@ constructor(
started = SharingStarted.WhileSubscribed(),
initialValue = false,
)
+
+ private companion object {
+ const val TAG = "CommunalSceneInteractor"
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/communal/domain/interactor/CommunalSceneTransitionInteractor.kt b/packages/SystemUI/src/com/android/systemui/communal/domain/interactor/CommunalSceneTransitionInteractor.kt
new file mode 100644
index 000000000000..8351566fcae6
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/communal/domain/interactor/CommunalSceneTransitionInteractor.kt
@@ -0,0 +1,293 @@
+/*
+ * 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.communal.domain.interactor
+
+import com.android.compose.animation.scene.ObservableTransitionState
+import com.android.compose.animation.scene.SceneKey
+import com.android.compose.animation.scene.SceneTransitionLayout
+import com.android.systemui.CoreStartable
+import com.android.systemui.Flags.communalSceneKtfRefactor
+import com.android.systemui.communal.data.repository.CommunalSceneTransitionRepository
+import com.android.systemui.communal.shared.model.CommunalScenes
+import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.dagger.qualifiers.Application
+import com.android.systemui.keyguard.domain.interactor.InternalKeyguardTransitionInteractor
+import com.android.systemui.keyguard.domain.interactor.KeyguardInteractor
+import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor
+import com.android.systemui.keyguard.shared.model.KeyguardState
+import com.android.systemui.keyguard.shared.model.TransitionInfo
+import com.android.systemui.keyguard.shared.model.TransitionModeOnCanceled
+import com.android.systemui.keyguard.shared.model.TransitionState
+import com.android.systemui.scene.shared.flag.SceneContainerFlag
+import com.android.systemui.util.kotlin.pairwise
+import java.util.UUID
+import javax.inject.Inject
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.Job
+import kotlinx.coroutines.flow.SharingStarted
+import kotlinx.coroutines.flow.StateFlow
+import kotlinx.coroutines.flow.combine
+import kotlinx.coroutines.flow.stateIn
+import kotlinx.coroutines.launch
+
+/**
+ * This class listens to [SceneTransitionLayout] transitions and manages keyguard transition
+ * framework (KTF) states accordingly for communal states.
+ *
+ * There are a few rules:
+ * - There are only 2 communal scenes: [CommunalScenes.Communal] and [CommunalScenes.Blank]
+ * - When scene framework is on [CommunalScenes.Blank], KTF is allowed to change its scenes freely
+ * - When scene framework is on [CommunalScenes.Communal], KTF is locked into
+ * [KeyguardState.GLANCEABLE_HUB]
+ */
+@SysUISingleton
+class CommunalSceneTransitionInteractor
+@Inject
+constructor(
+ val transitionInteractor: KeyguardTransitionInteractor,
+ val internalTransitionInteractor: InternalKeyguardTransitionInteractor,
+ private val settingsInteractor: CommunalSettingsInteractor,
+ @Application private val applicationScope: CoroutineScope,
+ private val sceneInteractor: CommunalSceneInteractor,
+ private val repository: CommunalSceneTransitionRepository,
+ keyguardInteractor: KeyguardInteractor,
+) : CoreStartable, CommunalSceneInteractor.OnSceneAboutToChangeListener {
+
+ private var currentTransitionId: UUID? = null
+ private var progressJob: Job? = null
+
+ private val currentToState: KeyguardState
+ get() = internalTransitionInteractor.currentTransitionInfoInternal.value.to
+
+ /**
+ * The next keyguard state to trigger when exiting [CommunalScenes.Communal]. This is only used
+ * if the state is changed by user gesture or not explicitly defined by the caller when changing
+ * scenes programmatically.
+ *
+ * This is needed because we do not always want to exit back to the KTF state we came from. For
+ * example, when going from HUB (Communal) -> OCCLUDED (Blank) -> HUB (Communal) and then
+ * closing the hub via gesture, we don't want to go back to OCCLUDED but instead either go to
+ * DREAM or LOCKSCREEN depending on if there is a dream showing.
+ */
+ private val nextKeyguardStateInternal =
+ combine(
+ keyguardInteractor.isDreaming,
+ keyguardInteractor.isKeyguardOccluded,
+ keyguardInteractor.isKeyguardGoingAway,
+ ) { dreaming, occluded, keyguardGoingAway ->
+ if (keyguardGoingAway) {
+ KeyguardState.GONE
+ } else if (dreaming) {
+ KeyguardState.DREAMING
+ } else if (occluded) {
+ KeyguardState.OCCLUDED
+ } else {
+ KeyguardState.LOCKSCREEN
+ }
+ }
+
+ private val nextKeyguardState: StateFlow<KeyguardState> =
+ combine(
+ repository.nextLockscreenTargetState,
+ nextKeyguardStateInternal,
+ ) { override, nextState ->
+ override ?: nextState
+ }
+ .stateIn(
+ scope = applicationScope,
+ started = SharingStarted.Eagerly,
+ initialValue = KeyguardState.LOCKSCREEN,
+ )
+
+ override fun start() {
+ if (
+ communalSceneKtfRefactor() &&
+ settingsInteractor.isCommunalFlagEnabled() &&
+ !SceneContainerFlag.isEnabled
+ ) {
+ sceneInteractor.registerSceneStateProcessor(this)
+ listenForSceneTransitionProgress()
+ }
+ }
+
+ /**
+ * Called when the scene is programmatically changed, allowing callers to specify which KTF
+ * state should be set when transitioning to [CommunalScenes.Blank]
+ */
+ override fun onSceneAboutToChange(toScene: SceneKey, keyguardState: KeyguardState?) {
+ if (toScene != CommunalScenes.Blank || keyguardState == null) return
+ repository.nextLockscreenTargetState.value = keyguardState
+ }
+
+ /** Monitors [SceneTransitionLayout] state and updates KTF state accordingly. */
+ private fun listenForSceneTransitionProgress() {
+ applicationScope.launch {
+ sceneInteractor.transitionState
+ .pairwise(ObservableTransitionState.Idle(CommunalScenes.Blank))
+ .collect { (prevTransition, transition) ->
+ when (transition) {
+ is ObservableTransitionState.Idle -> handleIdle(prevTransition, transition)
+ is ObservableTransitionState.Transition ->
+ handleTransition(prevTransition, transition)
+ }
+ }
+ }
+ }
+
+ private suspend fun handleIdle(
+ prevTransition: ObservableTransitionState,
+ idle: ObservableTransitionState.Idle
+ ) {
+ if (
+ prevTransition is ObservableTransitionState.Transition &&
+ currentTransitionId != null &&
+ idle.currentScene == prevTransition.toScene
+ ) {
+ finishCurrentTransition()
+ } else {
+ // We may receive an Idle event without a corresponding Transition
+ // event, such as when snapping to a scene without an animation.
+ val targetState =
+ if (idle.currentScene == CommunalScenes.Blank) {
+ nextKeyguardState.value
+ } else {
+ KeyguardState.GLANCEABLE_HUB
+ }
+ transitionKtfTo(targetState)
+ repository.nextLockscreenTargetState.value = null
+ }
+ }
+
+ private fun finishCurrentTransition() {
+ internalTransitionInteractor.updateTransition(
+ currentTransitionId!!,
+ 1f,
+ TransitionState.FINISHED
+ )
+ resetTransitionData()
+ }
+
+ private suspend fun finishReversedTransitionTo(state: KeyguardState) {
+ val newTransition =
+ TransitionInfo(
+ ownerName = this::class.java.simpleName,
+ from = internalTransitionInteractor.currentTransitionInfoInternal.value.to,
+ to = state,
+ animator = null,
+ modeOnCanceled = TransitionModeOnCanceled.REVERSE
+ )
+ currentTransitionId = internalTransitionInteractor.startTransition(newTransition)
+ internalTransitionInteractor.updateTransition(
+ currentTransitionId!!,
+ 1f,
+ TransitionState.FINISHED
+ )
+ resetTransitionData()
+ }
+
+ private fun resetTransitionData() {
+ progressJob?.cancel()
+ progressJob = null
+ currentTransitionId = null
+ }
+
+ private suspend fun handleTransition(
+ prevTransition: ObservableTransitionState,
+ transition: ObservableTransitionState.Transition
+ ) {
+ if (prevTransition.isTransitioning(from = transition.fromScene, to = transition.toScene)) {
+ // This is a new transition, but exactly the same as the previous state. Skip resetting
+ // KTF for this case and just collect the new progress instead.
+ collectProgress(transition)
+ } else if (transition.toScene == CommunalScenes.Communal) {
+ if (currentTransitionId != null) {
+ if (currentToState == KeyguardState.GLANCEABLE_HUB) {
+ transitionKtfTo(transitionInteractor.getStartedFromState())
+ }
+ }
+ startTransitionToGlanceableHub()
+ collectProgress(transition)
+ } else if (transition.toScene == CommunalScenes.Blank) {
+ if (currentTransitionId != null) {
+ // Another transition started before this one is completed. Transition to the
+ // GLANCEABLE_HUB state so that we can properly transition away from it.
+ transitionKtfTo(KeyguardState.GLANCEABLE_HUB)
+ }
+ startTransitionFromGlanceableHub()
+ collectProgress(transition)
+ }
+ }
+
+ private suspend fun transitionKtfTo(state: KeyguardState) {
+ val currentTransition = transitionInteractor.transitionState.value
+ if (currentTransition.isFinishedIn(state)) {
+ // This is already the state we want to be in
+ resetTransitionData()
+ } else if (currentTransition.isTransitioning(to = state)) {
+ finishCurrentTransition()
+ } else {
+ finishReversedTransitionTo(state)
+ }
+ }
+
+ private fun collectProgress(transition: ObservableTransitionState.Transition) {
+ progressJob?.cancel()
+ progressJob = applicationScope.launch { transition.progress.collect { updateProgress(it) } }
+ }
+
+ private suspend fun startTransitionFromGlanceableHub() {
+ val newTransition =
+ TransitionInfo(
+ ownerName = this::class.java.simpleName,
+ from = KeyguardState.GLANCEABLE_HUB,
+ to = nextKeyguardState.value,
+ animator = null,
+ modeOnCanceled = TransitionModeOnCanceled.RESET,
+ )
+ repository.nextLockscreenTargetState.value = null
+ startTransition(newTransition)
+ }
+
+ private suspend fun startTransitionToGlanceableHub() {
+ val currentState = internalTransitionInteractor.currentTransitionInfoInternal.value.to
+ val newTransition =
+ TransitionInfo(
+ ownerName = this::class.java.simpleName,
+ from = currentState,
+ to = KeyguardState.GLANCEABLE_HUB,
+ animator = null,
+ modeOnCanceled = TransitionModeOnCanceled.RESET,
+ )
+ startTransition(newTransition)
+ }
+
+ private suspend fun startTransition(transitionInfo: TransitionInfo) {
+ if (currentTransitionId != null) {
+ resetTransitionData()
+ }
+ currentTransitionId = internalTransitionInteractor.startTransition(transitionInfo)
+ }
+
+ private fun updateProgress(progress: Float) {
+ if (currentTransitionId == null) return
+ internalTransitionInteractor.updateTransition(
+ currentTransitionId!!,
+ progress.coerceIn(0f, 1f),
+ TransitionState.RUNNING
+ )
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/communal/domain/interactor/CommunalSettingsInteractor.kt b/packages/SystemUI/src/com/android/systemui/communal/domain/interactor/CommunalSettingsInteractor.kt
index 47b75c458d20..0cdbad40b2d1 100644
--- a/packages/SystemUI/src/com/android/systemui/communal/domain/interactor/CommunalSettingsInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/communal/domain/interactor/CommunalSettingsInteractor.kt
@@ -69,6 +69,18 @@ constructor(
// Start this eagerly since the value is accessed synchronously in many places.
.stateIn(scope = bgScope, started = SharingStarted.Eagerly, initialValue = false)
+ /**
+ * Returns true if both the communal trunk-stable flag and resource flag are enabled.
+ *
+ * The trunk-stable flag is controlled by server rollout and is on all devices. The resource
+ * flag is enabled via resource overlay only on products we want the hub to be present on.
+ *
+ * If this is false, then the hub is definitely not available on the device. If this is true,
+ * refer to [isCommunalEnabled] which takes into account other factors that can change at
+ * runtime.
+ */
+ fun isCommunalFlagEnabled(): Boolean = repository.getFlagEnabled()
+
/** The type of background to use for the hub. Used to experiment with different backgrounds */
val communalBackground: Flow<CommunalBackgroundType> =
userInteractor.selectedUserInfo
@@ -92,15 +104,22 @@ constructor(
awaitClose { userTracker.removeCallback(callback) }
}
- /** Whether or not keyguard widgets are allowed for work profile by device policy manager. */
- val allowedByDevicePolicyForWorkProfile: StateFlow<Boolean> =
+ /**
+ * A user that device policy says shouldn't allow communal widgets, or null if there are no
+ * restrictions.
+ */
+ val workProfileUserDisallowedByDevicePolicy: StateFlow<UserInfo?> =
workProfileUserInfoCallbackFlow
.flatMapLatest { workProfile ->
- workProfile?.let { repository.getAllowedByDevicePolicy(it) } ?: flowOf(false)
+ workProfile?.let {
+ repository.getAllowedByDevicePolicy(it).map { allowed ->
+ if (!allowed) it else null
+ }
+ } ?: flowOf(null)
}
.stateIn(
scope = bgScope,
started = SharingStarted.WhileSubscribed(),
- initialValue = false
+ initialValue = null
)
}
diff --git a/packages/SystemUI/src/com/android/systemui/communal/proto/communal_hub_state.proto b/packages/SystemUI/src/com/android/systemui/communal/proto/communal_hub_state.proto
index 08162593b4d5..bc14ae1eaff4 100644
--- a/packages/SystemUI/src/com/android/systemui/communal/proto/communal_hub_state.proto
+++ b/packages/SystemUI/src/com/android/systemui/communal/proto/communal_hub_state.proto
@@ -35,5 +35,8 @@ message CommunalHubState {
// Rank or order of the widget in the communal hub.
int32 rank = 3;
+
+ // Serial number of the user associated with the widget.
+ int32 user_serial_number = 4;
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/communal/smartspace/SmartspaceInteractionHandler.kt b/packages/SystemUI/src/com/android/systemui/communal/smartspace/SmartspaceInteractionHandler.kt
index a88b777be785..4e3d3ff8a265 100644
--- a/packages/SystemUI/src/com/android/systemui/communal/smartspace/SmartspaceInteractionHandler.kt
+++ b/packages/SystemUI/src/com/android/systemui/communal/smartspace/SmartspaceInteractionHandler.kt
@@ -22,21 +22,25 @@ import android.content.Intent
import android.view.View
import android.widget.RemoteViews
import com.android.systemui.animation.ActivityTransitionAnimator
+import com.android.systemui.communal.domain.interactor.CommunalSceneInteractor
import com.android.systemui.communal.util.InteractionHandlerDelegate
import com.android.systemui.communal.widgets.SmartspaceAppWidgetHostView
import com.android.systemui.plugins.ActivityStarter
import javax.inject.Inject
-/**
- * Handles interactions on smartspace elements on the hub.
- */
-class SmartspaceInteractionHandler @Inject constructor(
+/** Handles interactions on smartspace elements on the hub. */
+class SmartspaceInteractionHandler
+@Inject
+constructor(
private val activityStarter: ActivityStarter,
+ communalSceneInteractor: CommunalSceneInteractor,
) : RemoteViews.InteractionHandler {
- private val delegate = InteractionHandlerDelegate(
- findViewToAnimate = { view -> view is SmartspaceAppWidgetHostView },
- intentStarter = this::startIntent,
- )
+ private val delegate =
+ InteractionHandlerDelegate(
+ communalSceneInteractor,
+ findViewToAnimate = { view -> view is SmartspaceAppWidgetHostView },
+ intentStarter = this::startIntent,
+ )
override fun onInteraction(
view: View,
diff --git a/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/BaseCommunalViewModel.kt b/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/BaseCommunalViewModel.kt
index 6ec6ec1113a0..01ed2b71bea0 100644
--- a/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/BaseCommunalViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/BaseCommunalViewModel.kt
@@ -27,6 +27,7 @@ import com.android.systemui.communal.domain.interactor.CommunalSceneInteractor
import com.android.systemui.communal.domain.model.CommunalContentModel
import com.android.systemui.communal.shared.model.EditModeState
import com.android.systemui.communal.widgets.WidgetConfigurator
+import com.android.systemui.keyguard.shared.model.KeyguardState
import com.android.systemui.media.controls.ui.view.MediaHost
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableStateFlow
@@ -59,12 +60,32 @@ abstract class BaseCommunalViewModel(
/** Accessibility delegate to be set on CommunalAppWidgetHostView. */
open val widgetAccessibilityDelegate: View.AccessibilityDelegate? = null
+ /**
+ * The up-to-date value of the grid scroll offset. persisted to interactor on
+ * {@link #persistScrollPosition}
+ */
+ private var currentScrollOffset = 0
+
+ /**
+ * The up-to-date value of the grid scroll index. persisted to interactor on
+ * {@link #persistScrollPosition}
+ */
+ private var currentScrollIndex = 0
+
fun signalUserInteraction() {
communalInteractor.signalUserInteraction()
}
- fun changeScene(scene: SceneKey, transitionKey: TransitionKey? = null) {
- communalSceneInteractor.changeScene(scene, transitionKey)
+ /**
+ * Asks for an asynchronous scene witch to [newScene], which will use the corresponding
+ * installed transition or the one specified by [transitionKey], if provided.
+ */
+ fun changeScene(
+ scene: SceneKey,
+ transitionKey: TransitionKey? = null,
+ keyguardState: KeyguardState? = null
+ ) {
+ communalSceneInteractor.changeScene(scene, transitionKey, keyguardState)
}
fun setEditModeState(state: EditModeState?) = communalSceneInteractor.setEditModeState(state)
@@ -147,6 +168,28 @@ abstract class BaseCommunalViewModel(
/** Called as the user request to show the customize widget button. */
open fun onLongClick() {}
+ /** Called when the grid scroll position has been updated. */
+ open fun onScrollPositionUpdated(firstVisibleItemIndex: Int, firstVisibleItemScroll: Int) {
+ currentScrollIndex = firstVisibleItemIndex
+ currentScrollOffset = firstVisibleItemScroll
+ }
+
+ /** Stores scroll values to interactor. */
+ protected fun persistScrollPosition() {
+ communalInteractor.setScrollPosition(currentScrollIndex, currentScrollOffset)
+ }
+
+ /** Invoked after scroll values are used to initialize grid position. */
+ open fun clearPersistedScrollPosition() {
+ communalInteractor.setScrollPosition(0, 0)
+ }
+
+ val savedFirstScrollIndex: Int
+ get() = communalInteractor.firstVisibleItemIndex
+
+ val savedFirstScrollOffset: Int
+ get() = communalInteractor.firstVisibleItemOffset
+
/** Set the key of the currently selected item */
fun setSelectedKey(key: String?) {
_selectedKey.value = key
diff --git a/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalEditModeViewModel.kt b/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalEditModeViewModel.kt
index 2e92438ab890..830f543fd06f 100644
--- a/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalEditModeViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalEditModeViewModel.kt
@@ -24,7 +24,6 @@ import android.content.res.Resources
import android.util.Log
import androidx.activity.result.ActivityResultLauncher
import com.android.internal.logging.UiEventLogger
-import com.android.systemui.Flags.enableWidgetPickerSizeFilter
import com.android.systemui.communal.data.model.CommunalWidgetCategories
import com.android.systemui.communal.domain.interactor.CommunalInteractor
import com.android.systemui.communal.domain.interactor.CommunalPrefsInteractor
@@ -43,6 +42,7 @@ import com.android.systemui.log.dagger.CommunalLog
import com.android.systemui.media.controls.ui.view.MediaHost
import com.android.systemui.media.dagger.MediaModule
import com.android.systemui.res.R
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.util.kotlin.BooleanFlowOperators.allOf
import com.android.systemui.util.kotlin.BooleanFlowOperators.not
import javax.inject.Inject
@@ -81,10 +81,10 @@ constructor(
communalSceneInteractor.editModeState.map { it == EditModeState.SHOWING }
val showDisclaimer: Flow<Boolean> =
- allOf(isCommunalContentVisible, not(communalPrefsInteractor.isDisclaimerDismissed))
+ allOf(isCommunalContentVisible, not(communalInteractor.isDisclaimerDismissed))
fun onDisclaimerDismissed() {
- communalPrefsInteractor.setDisclaimerDismissed()
+ communalInteractor.setDisclaimerDismissed()
}
/**
@@ -93,7 +93,10 @@ constructor(
*/
val canShowEditMode =
allOf(
- keyguardTransitionInteractor.isFinishedIn(KeyguardState.GONE),
+ keyguardTransitionInteractor.isFinishedIn(
+ scene = Scenes.Gone,
+ stateWithoutSceneContainer = KeyguardState.GONE
+ ),
communalInteractor.editModeOpen
)
.filter { it }
@@ -172,21 +175,28 @@ constructor(
return Intent(Intent.ACTION_PICK).apply {
setPackage(packageName)
- if (enableWidgetPickerSizeFilter()) {
- putExtra(
- EXTRA_DESIRED_WIDGET_WIDTH,
- resources.getDimensionPixelSize(R.dimen.communal_widget_picker_desired_width)
- )
- putExtra(
- EXTRA_DESIRED_WIDGET_HEIGHT,
- resources.getDimensionPixelSize(R.dimen.communal_widget_picker_desired_height)
- )
- }
+ putExtra(
+ EXTRA_DESIRED_WIDGET_WIDTH,
+ resources.getDimensionPixelSize(R.dimen.communal_widget_picker_desired_width)
+ )
+ putExtra(
+ EXTRA_DESIRED_WIDGET_HEIGHT,
+ resources.getDimensionPixelSize(R.dimen.communal_widget_picker_desired_height)
+ )
putExtra(
AppWidgetManager.EXTRA_CATEGORY_FILTER,
CommunalWidgetCategories.defaultCategories
)
+
+ communalSettingsInteractor.workProfileUserDisallowedByDevicePolicy.value?.let {
+ putExtra(EXTRA_USER_ID_FILTER, arrayListOf(it.id))
+ }
putExtra(EXTRA_UI_SURFACE_KEY, EXTRA_UI_SURFACE_VALUE)
+ putExtra(EXTRA_PICKER_TITLE, resources.getString(R.string.communal_widget_picker_title))
+ putExtra(
+ EXTRA_PICKER_DESCRIPTION,
+ resources.getString(R.string.communal_widget_picker_description)
+ )
putParcelableArrayListExtra(EXTRA_ADDED_APP_WIDGETS_KEY, excludeList)
}
}
@@ -204,9 +214,20 @@ constructor(
/** Sets whether edit mode is currently open */
fun setEditModeOpen(isOpen: Boolean) = communalInteractor.setEditModeOpen(isOpen)
+ /**
+ * Sets whether the edit mode activity is currently showing.
+ *
+ * See [CommunalInteractor.editActivityShowing] for more info.
+ */
+ fun setEditActivityShowing(showing: Boolean) =
+ communalInteractor.setEditActivityShowing(showing)
+
/** Called when exiting the edit mode, before transitioning back to the communal scene. */
fun cleanupEditModeState() {
communalSceneInteractor.setEditModeState(null)
+
+ // Set the scroll position of the glanceable hub to match where we are now.
+ persistScrollPosition()
}
companion object {
@@ -214,8 +235,11 @@ constructor(
private const val EXTRA_DESIRED_WIDGET_WIDTH = "desired_widget_width"
private const val EXTRA_DESIRED_WIDGET_HEIGHT = "desired_widget_height"
+ private const val EXTRA_PICKER_TITLE = "picker_title"
+ private const val EXTRA_PICKER_DESCRIPTION = "picker_description"
private const val EXTRA_UI_SURFACE_KEY = "ui_surface"
private const val EXTRA_UI_SURFACE_VALUE = "widgets_hub"
+ private const val EXTRA_USER_ID_FILTER = "filtered_user_ids"
const val EXTRA_ADDED_APP_WIDGETS_KEY = "added_app_widgets"
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalViewModel.kt b/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalViewModel.kt
index 780bf70f3f7b..1e087f789faa 100644
--- a/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalViewModel.kt
@@ -17,6 +17,7 @@
package com.android.systemui.communal.ui.viewmodel
import android.content.res.Resources
+import android.os.Bundle
import android.view.View
import android.view.accessibility.AccessibilityNodeInfo
import com.android.systemui.communal.domain.interactor.CommunalInteractor
@@ -209,6 +210,20 @@ constructor(
)
)
}
+
+ override fun performAccessibilityAction(
+ host: View,
+ action: Int,
+ args: Bundle?
+ ): Boolean {
+ when (action) {
+ AccessibilityNodeInfo.AccessibilityAction.ACTION_LONG_CLICK.id -> {
+ onOpenWidgetEditor()
+ return true
+ }
+ }
+ return super.performAccessibilityAction(host, action, args)
+ }
}
private val _isEnableWidgetDialogShowing: MutableStateFlow<Boolean> = MutableStateFlow(false)
@@ -233,7 +248,10 @@ constructor(
override fun onOpenWidgetEditor(
shouldOpenWidgetPickerOnStart: Boolean,
- ) = communalInteractor.showWidgetEditor(selectedKey.value, shouldOpenWidgetPickerOnStart)
+ ) {
+ persistScrollPosition()
+ communalInteractor.showWidgetEditor(selectedKey.value, shouldOpenWidgetPickerOnStart)
+ }
override fun onDismissCtaTile() {
scope.launch {
diff --git a/packages/SystemUI/src/com/android/systemui/communal/util/InteractionHandlerDelegate.kt b/packages/SystemUI/src/com/android/systemui/communal/util/InteractionHandlerDelegate.kt
index 40b182dba817..51a5fcd6b873 100644
--- a/packages/SystemUI/src/com/android/systemui/communal/util/InteractionHandlerDelegate.kt
+++ b/packages/SystemUI/src/com/android/systemui/communal/util/InteractionHandlerDelegate.kt
@@ -24,17 +24,17 @@ import android.widget.RemoteViews
import androidx.core.util.component1
import androidx.core.util.component2
import com.android.systemui.animation.ActivityTransitionAnimator
-
+import com.android.systemui.communal.domain.interactor.CommunalSceneInteractor
+import com.android.systemui.communal.widgets.CommunalTransitionAnimatorController
/** A delegate that can be used to launch activities from [RemoteViews] */
class InteractionHandlerDelegate(
+ private val communalSceneInteractor: CommunalSceneInteractor,
private val findViewToAnimate: (View) -> Boolean,
private val intentStarter: IntentStarter,
) : RemoteViews.InteractionHandler {
- /**
- * Responsible for starting the pending intent for launching activities.
- */
+ /** Responsible for starting the pending intent for launching activities. */
fun interface IntentStarter {
fun startPendingIntent(
intent: PendingIntent,
@@ -57,7 +57,10 @@ class InteractionHandlerDelegate(
// activities.
val hostView = getNearestParent(view)
val animationController =
- hostView?.let(ActivityTransitionAnimator.Controller::fromView)
+ hostView?.let(ActivityTransitionAnimator.Controller::fromView)?.let {
+ communalSceneInteractor.setIsLaunchingWidget(true)
+ CommunalTransitionAnimatorController(it, communalSceneInteractor)
+ }
val (fillInIntent, activityOptions) = launchOptions
intentStarter.startPendingIntent(
pendingIntent,
@@ -66,7 +69,6 @@ class InteractionHandlerDelegate(
animationController
)
}
-
else -> RemoteViews.startPendingIntent(view, pendingIntent, launchOptions)
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/communal/widgets/CommunalTransitionAnimatorController.kt b/packages/SystemUI/src/com/android/systemui/communal/widgets/CommunalTransitionAnimatorController.kt
new file mode 100644
index 000000000000..08444623f24d
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/communal/widgets/CommunalTransitionAnimatorController.kt
@@ -0,0 +1,58 @@
+/*
+ * 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.communal.widgets
+
+import com.android.systemui.animation.ActivityTransitionAnimator
+import com.android.systemui.animation.DelegateTransitionAnimatorController
+import com.android.systemui.communal.domain.interactor.CommunalSceneInteractor
+import com.android.systemui.communal.shared.model.CommunalScenes
+
+/**
+ * An [ActivityTransitionAnimator.Controller] that takes care of updating the state of the Communal
+ * Hub at the right time.
+ */
+class CommunalTransitionAnimatorController(
+ delegate: ActivityTransitionAnimator.Controller,
+ private val communalSceneInteractor: CommunalSceneInteractor,
+) : DelegateTransitionAnimatorController(delegate) {
+ override fun onIntentStarted(willAnimate: Boolean) {
+ if (!willAnimate) {
+ // Other callbacks won't happen, so reset the state here.
+ communalSceneInteractor.setIsLaunchingWidget(false)
+ }
+ delegate.onIntentStarted(willAnimate)
+ }
+
+ override fun onTransitionAnimationStart(isExpandingFullyAbove: Boolean) {
+ delegate.onTransitionAnimationStart(isExpandingFullyAbove)
+ // TODO(b/330672236): move this to onTransitionAnimationEnd() without the delay.
+ communalSceneInteractor.snapToScene(
+ CommunalScenes.Blank,
+ ActivityTransitionAnimator.TIMINGS.totalDuration
+ )
+ }
+
+ override fun onTransitionAnimationCancelled(newKeyguardOccludedState: Boolean?) {
+ communalSceneInteractor.setIsLaunchingWidget(false)
+ delegate.onTransitionAnimationCancelled(newKeyguardOccludedState)
+ }
+
+ override fun onTransitionAnimationEnd(isExpandingFullyAbove: Boolean) {
+ communalSceneInteractor.setIsLaunchingWidget(false)
+ delegate.onTransitionAnimationEnd(isExpandingFullyAbove)
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/communal/widgets/CommunalWidgetModule.kt b/packages/SystemUI/src/com/android/systemui/communal/widgets/CommunalWidgetModule.kt
index 2000f96bcdb0..684303ae73cc 100644
--- a/packages/SystemUI/src/com/android/systemui/communal/widgets/CommunalWidgetModule.kt
+++ b/packages/SystemUI/src/com/android/systemui/communal/widgets/CommunalWidgetModule.kt
@@ -43,12 +43,6 @@ interface CommunalWidgetModule {
@SysUISingleton
@Provides
- fun provideAppWidgetManager(@Application context: Context): Optional<AppWidgetManager> {
- return Optional.ofNullable(AppWidgetManager.getInstance(context))
- }
-
- @SysUISingleton
- @Provides
fun provideCommunalAppWidgetHost(
@Application context: Context,
@Background backgroundScope: CoroutineScope,
diff --git a/packages/SystemUI/src/com/android/systemui/communal/widgets/EditWidgetsActivity.kt b/packages/SystemUI/src/com/android/systemui/communal/widgets/EditWidgetsActivity.kt
index 46f802fd2bce..08fe42ede5d3 100644
--- a/packages/SystemUI/src/com/android/systemui/communal/widgets/EditWidgetsActivity.kt
+++ b/packages/SystemUI/src/com/android/systemui/communal/widgets/EditWidgetsActivity.kt
@@ -96,8 +96,7 @@ constructor(
run { Log.w(TAG, "No AppWidgetProviderInfo found in result.") }
}
}
- }
- ?: run { Log.w(TAG, "No data in result.") }
+ } ?: run { Log.w(TAG, "No data in result.") }
}
else ->
Log.w(
@@ -195,6 +194,8 @@ constructor(
override fun onStart() {
super.onStart()
+ communalViewModel.setEditActivityShowing(true)
+
if (shouldOpenWidgetPickerOnStart) {
onOpenWidgetPicker()
shouldOpenWidgetPickerOnStart = false
@@ -206,6 +207,7 @@ constructor(
override fun onStop() {
super.onStop()
+ communalViewModel.setEditActivityShowing(false)
logger.i("Stopping the communal widget editor activity")
uiEventLogger.log(CommunalUiEvent.COMMUNAL_HUB_EDIT_MODE_GONE)
diff --git a/packages/SystemUI/src/com/android/systemui/communal/widgets/WidgetInteractionHandler.kt b/packages/SystemUI/src/com/android/systemui/communal/widgets/WidgetInteractionHandler.kt
index 72f9180c51d2..519903e55c50 100644
--- a/packages/SystemUI/src/com/android/systemui/communal/widgets/WidgetInteractionHandler.kt
+++ b/packages/SystemUI/src/com/android/systemui/communal/widgets/WidgetInteractionHandler.kt
@@ -22,6 +22,7 @@ import android.content.Intent
import android.view.View
import android.widget.RemoteViews
import com.android.systemui.animation.ActivityTransitionAnimator
+import com.android.systemui.communal.domain.interactor.CommunalSceneInteractor
import com.android.systemui.communal.util.InteractionHandlerDelegate
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.plugins.ActivityStarter
@@ -32,10 +33,12 @@ class WidgetInteractionHandler
@Inject
constructor(
private val activityStarter: ActivityStarter,
+ private val communalSceneInteractor: CommunalSceneInteractor
) : RemoteViews.InteractionHandler {
private val delegate =
InteractionHandlerDelegate(
+ communalSceneInteractor,
findViewToAnimate = { view -> view is CommunalAppWidgetHostView },
intentStarter = this::startIntent,
)
diff --git a/packages/SystemUI/src/com/android/systemui/controls/ui/DetailDialog.kt b/packages/SystemUI/src/com/android/systemui/controls/ui/DetailDialog.kt
index 7f8103e63684..6864f4e96994 100644
--- a/packages/SystemUI/src/com/android/systemui/controls/ui/DetailDialog.kt
+++ b/packages/SystemUI/src/com/android/systemui/controls/ui/DetailDialog.kt
@@ -18,7 +18,7 @@ package com.android.systemui.controls.ui
import android.app.Activity
import android.app.ActivityOptions
-import android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED
+import android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS
import android.app.Dialog
import android.app.PendingIntent
import android.content.ComponentName
@@ -93,8 +93,8 @@ class DetailDialog(
0 /* enterResId */,
0 /* exitResId */
).apply {
- pendingIntentBackgroundActivityStartMode = MODE_BACKGROUND_ACTIVITY_START_ALLOWED
- isPendingIntentBackgroundActivityLaunchAllowedByPermission = true
+ pendingIntentBackgroundActivityStartMode =
+ MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS
taskAlwaysOnTop = true
}
diff --git a/packages/SystemUI/src/com/android/systemui/dagger/FrameworkServicesModule.java b/packages/SystemUI/src/com/android/systemui/dagger/FrameworkServicesModule.java
index b0fc60e74b52..2ea27b76d81b 100644
--- a/packages/SystemUI/src/com/android/systemui/dagger/FrameworkServicesModule.java
+++ b/packages/SystemUI/src/com/android/systemui/dagger/FrameworkServicesModule.java
@@ -16,6 +16,9 @@
package com.android.systemui.dagger;
+import static com.android.systemui.Flags.enableViewCaptureTracing;
+import static com.android.systemui.util.ConvenienceExtensionsKt.toKotlinLazy;
+
import android.annotation.Nullable;
import android.annotation.SuppressLint;
import android.app.ActivityManager;
@@ -39,6 +42,7 @@ import android.app.job.JobScheduler;
import android.app.role.RoleManager;
import android.app.smartspace.SmartspaceManager;
import android.app.trust.TrustManager;
+import android.appwidget.AppWidgetManager;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothManager;
import android.companion.virtual.VirtualDeviceManager;
@@ -111,6 +115,9 @@ import android.view.textclassifier.TextClassificationManager;
import androidx.asynclayoutinflater.view.AsyncLayoutInflater;
import androidx.core.app.NotificationManagerCompat;
+import com.android.app.viewcapture.ViewCapture;
+import com.android.app.viewcapture.ViewCaptureAwareWindowManager;
+import com.android.app.viewcapture.ViewCaptureFactory;
import com.android.internal.app.IBatteryStats;
import com.android.internal.appwidget.IAppWidgetService;
import com.android.internal.jank.InteractionJankMonitor;
@@ -125,6 +132,7 @@ import com.android.systemui.shared.system.PackageManagerWrapper;
import com.android.systemui.user.utils.UserScopedService;
import com.android.systemui.user.utils.UserScopedServiceImpl;
+import dagger.Lazy;
import dagger.Module;
import dagger.Provides;
@@ -367,6 +375,12 @@ public class FrameworkServicesModule {
@Provides
@Singleton
+ static Optional<AppWidgetManager> provideAppWidgetManager(@Application Context context) {
+ return Optional.ofNullable(AppWidgetManager.getInstance(context));
+ }
+
+ @Provides
+ @Singleton
static IAppWidgetService provideIAppWidgetService() {
return IAppWidgetService.Stub.asInterface(
ServiceManager.getService(Context.APPWIDGET_SERVICE));
@@ -680,6 +694,15 @@ public class FrameworkServicesModule {
@Provides
@Singleton
+ static ViewCaptureAwareWindowManager provideViewCaptureAwareWindowManager(
+ WindowManager windowManager, Lazy<ViewCapture> daggerLazyViewCapture) {
+ return new ViewCaptureAwareWindowManager(windowManager,
+ /* lazyViewCapture= */ toKotlinLazy(daggerLazyViewCapture),
+ /* isViewCaptureEnabled= */ enableViewCaptureTracing());
+ }
+
+ @Provides
+ @Singleton
static PermissionManager providePermissionManager(Context context) {
PermissionManager pm = context.getSystemService(PermissionManager.class);
if (pm != null) {
@@ -764,4 +787,10 @@ public class FrameworkServicesModule {
return IDeviceIdleController.Stub.asInterface(
ServiceManager.getService(Context.DEVICE_IDLE_CONTROLLER));
}
+
+ @Provides
+ @Singleton
+ static ViewCapture provideViewCapture(Context context) {
+ return ViewCaptureFactory.getInstance(context);
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/dagger/SystemUICoreStartableModule.kt b/packages/SystemUI/src/com/android/systemui/dagger/SystemUICoreStartableModule.kt
index 593196c54dae..88601dab891d 100644
--- a/packages/SystemUI/src/com/android/systemui/dagger/SystemUICoreStartableModule.kt
+++ b/packages/SystemUI/src/com/android/systemui/dagger/SystemUICoreStartableModule.kt
@@ -24,11 +24,6 @@ import com.android.systemui.accessibility.Magnification
import com.android.systemui.back.domain.interactor.BackActionInteractor
import com.android.systemui.biometrics.BiometricNotificationService
import com.android.systemui.clipboardoverlay.ClipboardListener
-import com.android.systemui.communal.CommunalDreamStartable
-import com.android.systemui.communal.CommunalBackupRestoreStartable
-import com.android.systemui.communal.CommunalSceneStartable
-import com.android.systemui.communal.log.CommunalLoggerStartable
-import com.android.systemui.communal.widgets.CommunalAppWidgetHostStartable
import com.android.systemui.controls.dagger.StartControlsStartableModule
import com.android.systemui.dagger.qualifiers.PerUser
import com.android.systemui.dreams.AssistantAttentionMonitor
@@ -80,12 +75,13 @@ import dagger.multibindings.IntoMap
* @deprecated
*/
@Module(
- includes = [
- MultiUserUtilsModule::class,
- StartControlsStartableModule::class,
- StartBinderLoggerModule::class,
- WallpaperModule::class,
- ]
+ includes =
+ [
+ MultiUserUtilsModule::class,
+ StartControlsStartableModule::class,
+ StartBinderLoggerModule::class,
+ WallpaperModule::class,
+ ]
)
abstract class SystemUICoreStartableModule {
/** Inject into BiometricNotificationService */
@@ -96,25 +92,25 @@ abstract class SystemUICoreStartableModule {
service: BiometricNotificationService
): CoreStartable
- /** Inject into ClipboardListener. */
+ /** Inject into ClipboardListener. */
@Binds
@IntoMap
@ClassKey(ClipboardListener::class)
abstract fun bindClipboardListener(sysui: ClipboardListener): CoreStartable
- /** Inject into GlobalActionsComponent. */
+ /** Inject into GlobalActionsComponent. */
@Binds
@IntoMap
@ClassKey(GlobalActionsComponent::class)
abstract fun bindGlobalActionsComponent(sysui: GlobalActionsComponent): CoreStartable
- /** Inject into InstantAppNotifier. */
+ /** Inject into InstantAppNotifier. */
@Binds
@IntoMap
@ClassKey(InstantAppNotifier::class)
abstract fun bindInstantAppNotifier(sysui: InstantAppNotifier): CoreStartable
- /** Inject into KeyboardUI. */
+ /** Inject into KeyboardUI. */
@Binds
@IntoMap
@ClassKey(KeyboardUI::class)
@@ -125,7 +121,7 @@ abstract class SystemUICoreStartableModule {
@IntoMap
@ClassKey(MediaProjectionTaskSwitcherCoreStartable::class)
abstract fun bindProjectedTaskListener(
- sysui: MediaProjectionTaskSwitcherCoreStartable
+ sysui: MediaProjectionTaskSwitcherCoreStartable
): CoreStartable
/** Inject into KeyguardBiometricLockoutLogger */
@@ -136,38 +132,38 @@ abstract class SystemUICoreStartableModule {
sysui: KeyguardBiometricLockoutLogger
): CoreStartable
- /** Inject into KeyguardViewMediator. */
+ /** Inject into KeyguardViewMediator. */
@Binds
@IntoMap
@ClassKey(KeyguardViewMediator::class)
abstract fun bindKeyguardViewMediator(sysui: KeyguardViewMediator): CoreStartable
- /** Inject into LatencyTests. */
+ /** Inject into LatencyTests. */
@Binds
@IntoMap
@ClassKey(LatencyTester::class)
abstract fun bindLatencyTester(sysui: LatencyTester): CoreStartable
- /** Inject into DisplaySwitchLatencyTracker. */
+ /** Inject into DisplaySwitchLatencyTracker. */
@Binds
@IntoMap
@ClassKey(DisplaySwitchLatencyTracker::class)
abstract fun bindDisplaySwitchLatencyTracker(sysui: DisplaySwitchLatencyTracker): CoreStartable
- /** Inject into NotificationChannels. */
+ /** Inject into NotificationChannels. */
@Binds
@IntoMap
@ClassKey(NotificationChannels::class)
@PerUser
abstract fun bindNotificationChannels(sysui: NotificationChannels): CoreStartable
- /** Inject into ImmersiveModeConfirmation. */
+ /** Inject into ImmersiveModeConfirmation. */
@Binds
@IntoMap
@ClassKey(ImmersiveModeConfirmation::class)
abstract fun bindImmersiveModeConfirmation(sysui: ImmersiveModeConfirmation): CoreStartable
- /** Inject into RingtonePlayer. */
+ /** Inject into RingtonePlayer. */
@Binds
@IntoMap
@ClassKey(RingtonePlayer::class)
@@ -179,50 +175,49 @@ abstract class SystemUICoreStartableModule {
@ClassKey(GesturePointerEventListener::class)
abstract fun bindGesturePointerEventListener(sysui: GesturePointerEventListener): CoreStartable
- /** Inject into SessionTracker. */
+ /** Inject into SessionTracker. */
@Binds
@IntoMap
@ClassKey(SessionTracker::class)
abstract fun bindSessionTracker(service: SessionTracker): CoreStartable
- /** Inject into ShortcutKeyDispatcher. */
+ /** Inject into ShortcutKeyDispatcher. */
@Binds
@IntoMap
@ClassKey(ShortcutKeyDispatcher::class)
abstract fun bindShortcutKeyDispatcher(sysui: ShortcutKeyDispatcher): CoreStartable
- /** Inject into SliceBroadcastRelayHandler. */
+ /** Inject into SliceBroadcastRelayHandler. */
@Binds
@IntoMap
@ClassKey(SliceBroadcastRelayHandler::class)
abstract fun bindSliceBroadcastRelayHandler(sysui: SliceBroadcastRelayHandler): CoreStartable
- /** Inject into StorageNotification. */
+ /** Inject into StorageNotification. */
@Binds
@IntoMap
@ClassKey(StorageNotification::class)
abstract fun bindStorageNotification(sysui: StorageNotification): CoreStartable
- /** Inject into ThemeOverlayController. */
+ /** Inject into ThemeOverlayController. */
@Binds
@IntoMap
@ClassKey(ThemeOverlayController::class)
abstract fun bindThemeOverlayController(sysui: ThemeOverlayController): CoreStartable
-
- /** Inject into MediaOutputSwitcherDialogUI. */
+ /** Inject into MediaOutputSwitcherDialogUI. */
@Binds
@IntoMap
@ClassKey(MediaOutputSwitcherDialogUI::class)
abstract fun MediaOutputSwitcherDialogUI(sysui: MediaOutputSwitcherDialogUI): CoreStartable
- /** Inject into Magnification. */
+ /** Inject into Magnification. */
@Binds
@IntoMap
@ClassKey(Magnification::class)
abstract fun bindMagnification(sysui: Magnification): CoreStartable
- /** Inject into WMShell. */
+ /** Inject into WMShell. */
@Binds
@IntoMap
@ClassKey(WMShell::class)
@@ -239,7 +234,7 @@ abstract class SystemUICoreStartableModule {
@IntoMap
@ClassKey(MediaTttChipControllerReceiver::class)
abstract fun bindMediaTttChipControllerReceiver(
- sysui: MediaTttChipControllerReceiver
+ sysui: MediaTttChipControllerReceiver
): CoreStartable
/** Inject into MediaTttCommandLineHelper. */
@@ -254,8 +249,6 @@ abstract class SystemUICoreStartableModule {
@ClassKey(ChipbarCoordinator::class)
abstract fun bindChipbarController(sysui: ChipbarCoordinator): CoreStartable
-
-
/** Inject into StylusUsiPowerStartable) */
@Binds
@IntoMap
@@ -267,21 +260,21 @@ abstract class SystemUICoreStartableModule {
@ClassKey(PhysicalKeyboardCoreStartable::class)
abstract fun bindKeyboardCoreStartable(listener: PhysicalKeyboardCoreStartable): CoreStartable
- /** Inject into MuteQuickAffordanceCoreStartable*/
+ /** Inject into MuteQuickAffordanceCoreStartable */
@Binds
@IntoMap
@ClassKey(MuteQuickAffordanceCoreStartable::class)
abstract fun bindMuteQuickAffordanceCoreStartable(
- sysui: MuteQuickAffordanceCoreStartable
+ sysui: MuteQuickAffordanceCoreStartable
): CoreStartable
- /**Inject into DreamMonitor */
+ /** Inject into DreamMonitor */
@Binds
@IntoMap
@ClassKey(DreamMonitor::class)
abstract fun bindDreamMonitor(sysui: DreamMonitor): CoreStartable
- /**Inject into AssistantAttentionMonitor */
+ /** Inject into AssistantAttentionMonitor */
@Binds
@IntoMap
@ClassKey(AssistantAttentionMonitor::class)
@@ -321,35 +314,6 @@ abstract class SystemUICoreStartableModule {
@Binds
@IntoMap
- @ClassKey(CommunalLoggerStartable::class)
- abstract fun bindCommunalLoggerStartable(impl: CommunalLoggerStartable): CoreStartable
-
- @Binds
- @IntoMap
- @ClassKey(CommunalSceneStartable::class)
- abstract fun bindCommunalSceneStartable(impl: CommunalSceneStartable): CoreStartable
-
- @Binds
- @IntoMap
- @ClassKey(CommunalDreamStartable::class)
- abstract fun bindCommunalDreamStartable(impl: CommunalDreamStartable): CoreStartable
-
- @Binds
- @IntoMap
- @ClassKey(CommunalAppWidgetHostStartable::class)
- abstract fun bindCommunalAppWidgetHostStartable(
- impl: CommunalAppWidgetHostStartable
- ): CoreStartable
-
- @Binds
- @IntoMap
- @ClassKey(CommunalBackupRestoreStartable::class)
- abstract fun bindCommunalBackupRestoreStartable(
- impl: CommunalBackupRestoreStartable
- ): CoreStartable
-
- @Binds
- @IntoMap
@ClassKey(HomeControlsDreamStartable::class)
abstract fun bindHomeControlsDreamStartable(impl: HomeControlsDreamStartable): CoreStartable
diff --git a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java
index 572283ab839f..1771f4dc8572 100644
--- a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java
+++ b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java
@@ -61,6 +61,7 @@ import com.android.systemui.display.DisplayModule;
import com.android.systemui.doze.dagger.DozeComponent;
import com.android.systemui.dreams.dagger.DreamModule;
import com.android.systemui.dump.DumpManager;
+import com.android.systemui.education.dagger.ContextualEducationModule;
import com.android.systemui.flags.FeatureFlags;
import com.android.systemui.flags.FlagDependenciesModule;
import com.android.systemui.flags.FlagsModule;
@@ -110,6 +111,7 @@ import com.android.systemui.startable.Dependencies;
import com.android.systemui.statusbar.CommandQueue;
import com.android.systemui.statusbar.NotificationLockscreenUserManager;
import com.android.systemui.statusbar.NotificationShadeWindowController;
+import com.android.systemui.statusbar.chips.StatusBarChipsModule;
import com.android.systemui.statusbar.connectivity.ConnectivityModule;
import com.android.systemui.statusbar.dagger.StatusBarModule;
import com.android.systemui.statusbar.disableflags.dagger.DisableFlagsModule;
@@ -244,6 +246,7 @@ import javax.inject.Named;
SmartspaceModule.class,
StatusBarEventsModule.class,
StatusBarModule.class,
+ StatusBarChipsModule.class,
StatusBarPipelineModule.class,
StatusBarPolicyModule.class,
StatusBarViewBinderModule.class,
@@ -259,7 +262,8 @@ import javax.inject.Named;
UserModule.class,
UtilModule.class,
NoteTaskModule.class,
- WalletModule.class
+ WalletModule.class,
+ ContextualEducationModule.class
},
subcomponents = {
ComplicationComponent.class,
diff --git a/packages/SystemUI/src/com/android/systemui/deviceentry/data/repository/DeviceEntryFaceAuthRepository.kt b/packages/SystemUI/src/com/android/systemui/deviceentry/data/repository/DeviceEntryFaceAuthRepository.kt
index ed30d59a94fa..9460eaf8abca 100644
--- a/packages/SystemUI/src/com/android/systemui/deviceentry/data/repository/DeviceEntryFaceAuthRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/deviceentry/data/repository/DeviceEntryFaceAuthRepository.kt
@@ -57,16 +57,13 @@ import com.android.systemui.log.FaceAuthenticationLogger
import com.android.systemui.log.SessionTracker
import com.android.systemui.log.table.TableLogBuffer
import com.android.systemui.power.domain.interactor.PowerInteractor
-import com.android.systemui.res.R
import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.statusbar.phone.KeyguardBypassController
import com.android.systemui.user.data.model.SelectionStatus
import com.android.systemui.user.data.repository.UserRepository
import com.google.errorprone.annotations.CompileTimeConstant
import java.io.PrintWriter
-import java.util.Arrays
import java.util.concurrent.Executor
-import java.util.stream.Collectors
import javax.inject.Inject
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.CoroutineScope
@@ -170,7 +167,6 @@ constructor(
) : DeviceEntryFaceAuthRepository, Dumpable {
private var authCancellationSignal: CancellationSignal? = null
private var detectCancellationSignal: CancellationSignal? = null
- private var faceAcquiredInfoIgnoreList: Set<Int>
private var retryCount = 0
private var pendingAuthenticateRequest = MutableStateFlow<AuthenticationRequest?>(null)
@@ -240,14 +236,6 @@ constructor(
faceManager?.addLockoutResetCallback(faceLockoutResetCallback)
faceAuthLogger.addLockoutResetCallbackDone()
}
- faceAcquiredInfoIgnoreList =
- Arrays.stream(
- context.resources.getIntArray(
- R.array.config_face_acquire_device_entry_ignorelist
- )
- )
- .boxed()
- .collect(Collectors.toSet())
dumpManager.registerCriticalDumpable("DeviceEntryFaceAuthRepositoryImpl", this)
canRunFaceAuth =
@@ -303,7 +291,10 @@ constructor(
private fun listenForSchedulingWatchdog() {
keyguardTransitionInteractor
- .transition(Edge.create(to = KeyguardState.GONE))
+ .transition(
+ edge = Edge.create(to = Scenes.Gone),
+ edgeWithoutSceneContainer = Edge.create(to = KeyguardState.GONE),
+ )
.filter { it.transitionState == TransitionState.FINISHED }
.onEach {
// We deliberately want to run this in background because scheduleWatchdog does
@@ -324,7 +315,7 @@ constructor(
combine(
keyguardTransitionInteractor.isFinishedIn(
scene = Scenes.Gone,
- stateWithoutSceneContainer = KeyguardState.GONE
+ stateWithoutSceneContainer = KeyguardState.GONE,
),
keyguardInteractor.statusBarState,
) { isFinishedInGoneState, statusBarState ->
@@ -482,10 +473,8 @@ constructor(
}
override fun onAuthenticationHelp(code: Int, helpStr: CharSequence?) {
- if (faceAcquiredInfoIgnoreList.contains(code)) {
- return
- }
- _authenticationStatus.value = HelpFaceAuthenticationStatus(code, helpStr.toString())
+ _authenticationStatus.value =
+ HelpFaceAuthenticationStatus(code, helpStr?.toString())
}
override fun onAuthenticationSucceeded(result: FaceManager.AuthenticationResult) {
@@ -728,7 +717,6 @@ constructor(
pw.println(" _pendingAuthenticateRequest: ${pendingAuthenticateRequest.value}")
pw.println(" authCancellationSignal: $authCancellationSignal")
pw.println(" detectCancellationSignal: $detectCancellationSignal")
- pw.println(" faceAcquiredInfoIgnoreList: $faceAcquiredInfoIgnoreList")
pw.println(" _authenticationStatus: ${_authenticationStatus.value}")
pw.println(" _detectionStatus: ${_detectionStatus.value}")
pw.println(" currentUserId: $currentUserId")
diff --git a/packages/SystemUI/src/com/android/systemui/deviceentry/data/repository/DeviceEntryRepository.kt b/packages/SystemUI/src/com/android/systemui/deviceentry/data/repository/DeviceEntryRepository.kt
index 0f189788457c..3f937bba46d4 100644
--- a/packages/SystemUI/src/com/android/systemui/deviceentry/data/repository/DeviceEntryRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/deviceentry/data/repository/DeviceEntryRepository.kt
@@ -13,8 +13,10 @@ import javax.inject.Inject
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.channels.awaitClose
+import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.StateFlow
+import kotlinx.coroutines.flow.asStateFlow
import kotlinx.coroutines.flow.stateIn
import kotlinx.coroutines.withContext
@@ -25,7 +27,7 @@ interface DeviceEntryRepository {
* chosen any secure authentication method and even if they set the lockscreen to be dismissed
* when the user swipes on it.
*/
- suspend fun isLockscreenEnabled(): Boolean
+ val isLockscreenEnabled: StateFlow<Boolean>
/**
* Whether lockscreen bypass is enabled. When enabled, the lockscreen will be automatically
@@ -41,10 +43,11 @@ interface DeviceEntryRepository {
val isBypassEnabled: StateFlow<Boolean>
/**
- * Reports, to system server, that the user is "present" now. This is a signal that system
- * server uses to know that the device has been entered.
+ * Whether the lockscreen is enabled for the current user. This is `true` whenever the user has
+ * chosen any secure authentication method and even if they set the lockscreen to be dismissed
+ * when the user swipes on it.
*/
- suspend fun reportUserPresent()
+ suspend fun isLockscreenEnabled(): Boolean
}
/** Encapsulates application state for device entry. */
@@ -59,12 +62,8 @@ constructor(
private val keyguardBypassController: KeyguardBypassController,
) : DeviceEntryRepository {
- override suspend fun isLockscreenEnabled(): Boolean {
- return withContext(backgroundDispatcher) {
- val selectedUserId = userRepository.getSelectedUserInfo().id
- !lockPatternUtils.isLockScreenDisabled(selectedUserId)
- }
- }
+ private val _isLockscreenEnabled = MutableStateFlow(true)
+ override val isLockscreenEnabled: StateFlow<Boolean> = _isLockscreenEnabled.asStateFlow()
override val isBypassEnabled: StateFlow<Boolean> =
conflatedCallbackFlow {
@@ -85,16 +84,14 @@ constructor(
initialValue = keyguardBypassController.bypassEnabled,
)
- override suspend fun reportUserPresent() {
- withContext(backgroundDispatcher) {
- val selectedUserId = userRepository.selectedUser.value.userInfo.id
- lockPatternUtils.userPresent(selectedUserId)
+ override suspend fun isLockscreenEnabled(): Boolean {
+ return withContext(backgroundDispatcher) {
+ val selectedUserId = userRepository.getSelectedUserInfo().id
+ val isEnabled = !lockPatternUtils.isLockScreenDisabled(selectedUserId)
+ _isLockscreenEnabled.value = isEnabled
+ isEnabled
}
}
-
- companion object {
- private const val TAG = "DeviceEntryRepositoryImpl"
- }
}
@Module
diff --git a/packages/SystemUI/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryFaceAuthStatusInteractor.kt b/packages/SystemUI/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryFaceAuthStatusInteractor.kt
new file mode 100644
index 000000000000..34b1544489bd
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryFaceAuthStatusInteractor.kt
@@ -0,0 +1,95 @@
+/*
+ * 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.deviceentry.domain.interactor
+
+import android.content.res.Resources
+import android.hardware.biometrics.BiometricFaceConstants
+import com.android.systemui.biometrics.FaceHelpMessageDebouncer
+import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.dagger.qualifiers.Application
+import com.android.systemui.dagger.qualifiers.Main
+import com.android.systemui.deviceentry.data.repository.DeviceEntryFaceAuthRepository
+import com.android.systemui.deviceentry.shared.model.AcquiredFaceAuthenticationStatus
+import com.android.systemui.deviceentry.shared.model.FaceAuthenticationStatus
+import com.android.systemui.deviceentry.shared.model.HelpFaceAuthenticationStatus
+import com.android.systemui.res.R
+import java.util.Arrays
+import java.util.stream.Collectors
+import javax.inject.Inject
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.flow.SharingStarted
+import kotlinx.coroutines.flow.StateFlow
+import kotlinx.coroutines.flow.stateIn
+import kotlinx.coroutines.flow.transform
+
+/**
+ * Process face authentication statuses.
+ * - Ignores face help messages based on R.array.config_face_acquire_device_entry_ignorelist.
+ * - Uses FaceHelpMessageDebouncer to debounce flickery help messages.
+ */
+@SysUISingleton
+class DeviceEntryFaceAuthStatusInteractor
+@Inject
+constructor(
+ repository: DeviceEntryFaceAuthRepository,
+ @Main private val resources: Resources,
+ @Application private val applicationScope: CoroutineScope,
+) {
+ private val faceHelpMessageDebouncer = FaceHelpMessageDebouncer()
+ private var faceAcquiredInfoIgnoreList: Set<Int> =
+ Arrays.stream(resources.getIntArray(R.array.config_face_acquire_device_entry_ignorelist))
+ .boxed()
+ .collect(Collectors.toSet())
+
+ val authenticationStatus: StateFlow<FaceAuthenticationStatus?> =
+ repository.authenticationStatus
+ .transform { authenticationStatus ->
+ if (authenticationStatus is AcquiredFaceAuthenticationStatus) {
+ if (
+ authenticationStatus.acquiredInfo ==
+ BiometricFaceConstants.FACE_ACQUIRED_START
+ ) {
+ faceHelpMessageDebouncer.startNewFaceAuthSession(
+ authenticationStatus.createdAt
+ )
+ }
+ }
+
+ if (authenticationStatus is HelpFaceAuthenticationStatus) {
+ if (!faceAcquiredInfoIgnoreList.contains(authenticationStatus.msgId)) {
+ faceHelpMessageDebouncer.addMessage(authenticationStatus)
+ }
+
+ val messageToShow =
+ faceHelpMessageDebouncer.getMessageToShow(
+ atTimestamp = authenticationStatus.createdAt,
+ )
+ if (messageToShow != null) {
+ emit(messageToShow)
+ }
+
+ return@transform
+ }
+
+ emit(authenticationStatus)
+ }
+ .stateIn(
+ scope = applicationScope,
+ started = SharingStarted.WhileSubscribed(),
+ initialValue = null,
+ )
+}
diff --git a/packages/SystemUI/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryInteractor.kt b/packages/SystemUI/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryInteractor.kt
index 425bb965f34d..9b95ac4797c0 100644
--- a/packages/SystemUI/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryInteractor.kt
@@ -16,19 +16,14 @@
package com.android.systemui.deviceentry.domain.interactor
-import androidx.annotation.VisibleForTesting
import com.android.systemui.authentication.domain.interactor.AuthenticationInteractor
import com.android.systemui.authentication.shared.model.AuthenticationMethodModel
import com.android.systemui.bouncer.domain.interactor.AlternateBouncerInteractor
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.deviceentry.data.repository.DeviceEntryRepository
-import com.android.systemui.deviceentry.shared.model.DeviceEntryRestrictionReason
-import com.android.systemui.flags.SystemPropertiesHelper
-import com.android.systemui.keyguard.domain.interactor.TrustInteractor
import com.android.systemui.scene.domain.interactor.SceneInteractor
import com.android.systemui.scene.shared.model.Scenes
-import com.android.systemui.util.kotlin.Quad
import com.android.systemui.utils.coroutines.flow.mapLatestConflated
import javax.inject.Inject
import kotlinx.coroutines.CoroutineScope
@@ -39,10 +34,8 @@ import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.combine
import kotlinx.coroutines.flow.filter
import kotlinx.coroutines.flow.first
-import kotlinx.coroutines.flow.flatMapLatest
-import kotlinx.coroutines.flow.flowOf
import kotlinx.coroutines.flow.map
-import kotlinx.coroutines.flow.onEach
+import kotlinx.coroutines.flow.onStart
import kotlinx.coroutines.flow.stateIn
import kotlinx.coroutines.launch
@@ -61,12 +54,7 @@ constructor(
private val repository: DeviceEntryRepository,
private val authenticationInteractor: AuthenticationInteractor,
private val sceneInteractor: SceneInteractor,
- faceAuthInteractor: DeviceEntryFaceAuthInteractor,
- private val fingerprintAuthInteractor: DeviceEntryFingerprintAuthInteractor,
- private val biometricSettingsInteractor: DeviceEntryBiometricSettingsInteractor,
- private val trustInteractor: TrustInteractor,
private val deviceUnlockedInteractor: DeviceUnlockedInteractor,
- private val systemPropertiesHelper: SystemPropertiesHelper,
private val alternateBouncerInteractor: AlternateBouncerInteractor,
) {
/**
@@ -109,17 +97,16 @@ constructor(
false
}
}
- .onEach { isDeviceEntered ->
- if (isDeviceEntered) {
- repository.reportUserPresent()
- }
- }
.stateIn(
scope = applicationScope,
started = SharingStarted.Eagerly,
initialValue = false,
)
+ val isLockscreenEnabled: Flow<Boolean> by lazy {
+ repository.isLockscreenEnabled.onStart { refreshLockscreenEnabled() }
+ }
+
/**
* Whether it's currently possible to swipe up to enter the device without requiring
* authentication or when the device is already authenticated using a passive authentication
@@ -134,14 +121,14 @@ constructor(
*/
val canSwipeToEnter: StateFlow<Boolean?> =
combine(
- // This is true when the user has chosen to show the lockscreen but has not made it
- // secure.
authenticationInteractor.authenticationMethod.map {
- it == AuthenticationMethodModel.None && repository.isLockscreenEnabled()
+ it == AuthenticationMethodModel.None
},
+ isLockscreenEnabled,
deviceUnlockedInteractor.deviceUnlockStatus,
isDeviceEntered
- ) { isSwipeAuthMethod, deviceUnlockStatus, isDeviceEntered ->
+ ) { isNoneAuthMethod, isLockscreenEnabled, deviceUnlockStatus, isDeviceEntered ->
+ val isSwipeAuthMethod = isNoneAuthMethod && isLockscreenEnabled
(isSwipeAuthMethod ||
(deviceUnlockStatus.isUnlocked &&
deviceUnlockStatus.deviceUnlockSource?.dismissesLockscreen == false)) &&
@@ -156,70 +143,6 @@ constructor(
initialValue = null,
)
- private val faceEnrolledAndEnabled = biometricSettingsInteractor.isFaceAuthEnrolledAndEnabled
- private val fingerprintEnrolledAndEnabled =
- biometricSettingsInteractor.isFingerprintAuthEnrolledAndEnabled
- private val trustAgentEnabled = trustInteractor.isEnrolledAndEnabled
-
- private val faceOrFingerprintOrTrustEnabled: Flow<Triple<Boolean, Boolean, Boolean>> =
- combine(faceEnrolledAndEnabled, fingerprintEnrolledAndEnabled, trustAgentEnabled, ::Triple)
-
- /**
- * Reason why device entry is restricted to certain authentication methods for the current user.
- *
- * Emits null when there are no device entry restrictions active.
- */
- val deviceEntryRestrictionReason: Flow<DeviceEntryRestrictionReason?> =
- faceOrFingerprintOrTrustEnabled.flatMapLatest {
- (faceEnabled, fingerprintEnabled, trustEnabled) ->
- if (faceEnabled || fingerprintEnabled || trustEnabled) {
- combine(
- biometricSettingsInteractor.authenticationFlags,
- faceAuthInteractor.isLockedOut,
- fingerprintAuthInteractor.isLockedOut,
- trustInteractor.isTrustAgentCurrentlyAllowed,
- ::Quad
- )
- .map { (authFlags, isFaceLockedOut, isFingerprintLockedOut, trustManaged) ->
- when {
- authFlags.isPrimaryAuthRequiredAfterReboot &&
- wasRebootedForMainlineUpdate ->
- DeviceEntryRestrictionReason.DeviceNotUnlockedSinceMainlineUpdate
- authFlags.isPrimaryAuthRequiredAfterReboot ->
- DeviceEntryRestrictionReason.DeviceNotUnlockedSinceReboot
- authFlags.isPrimaryAuthRequiredAfterDpmLockdown ->
- DeviceEntryRestrictionReason.PolicyLockdown
- authFlags.isInUserLockdown -> DeviceEntryRestrictionReason.UserLockdown
- authFlags.isPrimaryAuthRequiredForUnattendedUpdate ->
- DeviceEntryRestrictionReason.UnattendedUpdate
- authFlags.isPrimaryAuthRequiredAfterTimeout ->
- DeviceEntryRestrictionReason.SecurityTimeout
- authFlags.isPrimaryAuthRequiredAfterLockout ->
- DeviceEntryRestrictionReason.BouncerLockedOut
- isFingerprintLockedOut ->
- DeviceEntryRestrictionReason.StrongBiometricsLockedOut
- isFaceLockedOut && faceAuthInteractor.isFaceAuthStrong() ->
- DeviceEntryRestrictionReason.StrongBiometricsLockedOut
- isFaceLockedOut -> DeviceEntryRestrictionReason.NonStrongFaceLockedOut
- authFlags.isSomeAuthRequiredAfterAdaptiveAuthRequest ->
- DeviceEntryRestrictionReason.AdaptiveAuthRequest
- (trustEnabled && !trustManaged) &&
- (authFlags.someAuthRequiredAfterTrustAgentExpired ||
- authFlags.someAuthRequiredAfterUserRequest) ->
- DeviceEntryRestrictionReason.TrustAgentDisabled
- authFlags.strongerAuthRequiredAfterNonStrongBiometricsTimeout ->
- DeviceEntryRestrictionReason.NonStrongBiometricsSecurityTimeout
- else -> null
- }
- }
- } else {
- flowOf(null)
- }
- }
-
- /** Whether the device is in lockdown mode, where bouncer input is required to unlock. */
- val isInLockdown: Flow<Boolean> = deviceEntryRestrictionReason.map { it.isInLockdown() }
-
/**
* Attempt to enter the device and dismiss the lockscreen. If authentication is required to
* unlock the device it will transition to bouncer.
@@ -268,25 +191,15 @@ constructor(
return repository.isLockscreenEnabled()
}
- fun DeviceEntryRestrictionReason?.isInLockdown(): Boolean {
- return when (this) {
- DeviceEntryRestrictionReason.UserLockdown -> true
- DeviceEntryRestrictionReason.PolicyLockdown -> true
-
- // Add individual enum value instead of using "else" so new reasons are guaranteed
- // to be added here at compile-time.
- null -> false
- DeviceEntryRestrictionReason.DeviceNotUnlockedSinceReboot -> false
- DeviceEntryRestrictionReason.BouncerLockedOut -> false
- DeviceEntryRestrictionReason.AdaptiveAuthRequest -> false
- DeviceEntryRestrictionReason.NonStrongBiometricsSecurityTimeout -> false
- DeviceEntryRestrictionReason.TrustAgentDisabled -> false
- DeviceEntryRestrictionReason.StrongBiometricsLockedOut -> false
- DeviceEntryRestrictionReason.SecurityTimeout -> false
- DeviceEntryRestrictionReason.DeviceNotUnlockedSinceMainlineUpdate -> false
- DeviceEntryRestrictionReason.UnattendedUpdate -> false
- DeviceEntryRestrictionReason.NonStrongFaceLockedOut -> false
- }
+ /**
+ * Forces a refresh of the value of [isLockscreenEnabled] such that the flow emits the latest
+ * value.
+ *
+ * Without calling this method, the flow will have a stale value unless the collector is removed
+ * and re-added.
+ */
+ suspend fun refreshLockscreenEnabled() {
+ isLockscreenEnabled()
}
/**
@@ -296,12 +209,4 @@ constructor(
* lockscreen.
*/
val isBypassEnabled: StateFlow<Boolean> = repository.isBypassEnabled
-
- private val wasRebootedForMainlineUpdate
- get() = systemPropertiesHelper.get(SYS_BOOT_REASON_PROP) == REBOOT_MAINLINE_UPDATE
-
- companion object {
- @VisibleForTesting const val SYS_BOOT_REASON_PROP = "sys.boot.reason.last"
- @VisibleForTesting const val REBOOT_MAINLINE_UPDATE = "reboot,mainline_update"
- }
}
diff --git a/packages/SystemUI/src/com/android/systemui/deviceentry/domain/interactor/DeviceUnlockedInteractor.kt b/packages/SystemUI/src/com/android/systemui/deviceentry/domain/interactor/DeviceUnlockedInteractor.kt
index 51416905b0c0..e17e530a03d9 100644
--- a/packages/SystemUI/src/com/android/systemui/deviceentry/domain/interactor/DeviceUnlockedInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/deviceentry/domain/interactor/DeviceUnlockedInteractor.kt
@@ -16,20 +16,26 @@
package com.android.systemui.deviceentry.domain.interactor
+import androidx.annotation.VisibleForTesting
import com.android.systemui.authentication.domain.interactor.AuthenticationInteractor
import com.android.systemui.authentication.shared.model.AuthenticationMethodModel
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.deviceentry.data.repository.DeviceEntryRepository
+import com.android.systemui.deviceentry.shared.model.DeviceEntryRestrictionReason
import com.android.systemui.deviceentry.shared.model.DeviceUnlockSource
import com.android.systemui.deviceentry.shared.model.DeviceUnlockStatus
+import com.android.systemui.flags.SystemPropertiesHelper
import com.android.systemui.keyguard.domain.interactor.TrustInteractor
import com.android.systemui.power.domain.interactor.PowerInteractor
+import com.android.systemui.utils.coroutines.flow.flatMapLatestConflated
import javax.inject.Inject
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.StateFlow
+import kotlinx.coroutines.flow.combine
import kotlinx.coroutines.flow.filter
import kotlinx.coroutines.flow.flatMapLatest
import kotlinx.coroutines.flow.flowOf
@@ -49,6 +55,8 @@ constructor(
faceAuthInteractor: DeviceEntryFaceAuthInteractor,
fingerprintAuthInteractor: DeviceEntryFingerprintAuthInteractor,
private val powerInteractor: PowerInteractor,
+ private val biometricSettingsInteractor: DeviceEntryBiometricSettingsInteractor,
+ private val systemPropertiesHelper: SystemPropertiesHelper,
) {
private val deviceUnlockSource =
@@ -69,6 +77,75 @@ constructor(
.map { DeviceUnlockSource.BouncerInput }
)
+ private val faceEnrolledAndEnabled = biometricSettingsInteractor.isFaceAuthEnrolledAndEnabled
+ private val fingerprintEnrolledAndEnabled =
+ biometricSettingsInteractor.isFingerprintAuthEnrolledAndEnabled
+ private val trustAgentEnabled = trustInteractor.isEnrolledAndEnabled
+
+ private val faceOrFingerprintOrTrustEnabled: Flow<Triple<Boolean, Boolean, Boolean>> =
+ combine(faceEnrolledAndEnabled, fingerprintEnrolledAndEnabled, trustAgentEnabled, ::Triple)
+
+ /**
+ * Reason why device entry is restricted to certain authentication methods for the current user.
+ *
+ * Emits null when there are no device entry restrictions active.
+ */
+ val deviceEntryRestrictionReason: Flow<DeviceEntryRestrictionReason?> =
+ faceOrFingerprintOrTrustEnabled.flatMapLatest {
+ (faceEnabled, fingerprintEnabled, trustEnabled) ->
+ if (faceEnabled || fingerprintEnabled || trustEnabled) {
+ combine(
+ biometricSettingsInteractor.authenticationFlags,
+ faceAuthInteractor.isLockedOut,
+ fingerprintAuthInteractor.isLockedOut,
+ trustInteractor.isTrustAgentCurrentlyAllowed,
+ ) { authFlags, isFaceLockedOut, isFingerprintLockedOut, trustManaged ->
+ when {
+ authFlags.isPrimaryAuthRequiredAfterReboot &&
+ wasRebootedForMainlineUpdate() ->
+ DeviceEntryRestrictionReason.DeviceNotUnlockedSinceMainlineUpdate
+ authFlags.isPrimaryAuthRequiredAfterReboot ->
+ DeviceEntryRestrictionReason.DeviceNotUnlockedSinceReboot
+ authFlags.isPrimaryAuthRequiredAfterDpmLockdown ->
+ DeviceEntryRestrictionReason.PolicyLockdown
+ authFlags.isInUserLockdown -> DeviceEntryRestrictionReason.UserLockdown
+ authFlags.isPrimaryAuthRequiredForUnattendedUpdate ->
+ DeviceEntryRestrictionReason.UnattendedUpdate
+ authFlags.isPrimaryAuthRequiredAfterTimeout ->
+ DeviceEntryRestrictionReason.SecurityTimeout
+ authFlags.isPrimaryAuthRequiredAfterLockout ->
+ DeviceEntryRestrictionReason.BouncerLockedOut
+ isFingerprintLockedOut ->
+ DeviceEntryRestrictionReason.StrongBiometricsLockedOut
+ isFaceLockedOut && faceAuthInteractor.isFaceAuthStrong() ->
+ DeviceEntryRestrictionReason.StrongBiometricsLockedOut
+ isFaceLockedOut -> DeviceEntryRestrictionReason.NonStrongFaceLockedOut
+ authFlags.isSomeAuthRequiredAfterAdaptiveAuthRequest ->
+ DeviceEntryRestrictionReason.AdaptiveAuthRequest
+ (trustEnabled && !trustManaged) &&
+ (authFlags.someAuthRequiredAfterTrustAgentExpired ||
+ authFlags.someAuthRequiredAfterUserRequest) ->
+ DeviceEntryRestrictionReason.TrustAgentDisabled
+ authFlags.strongerAuthRequiredAfterNonStrongBiometricsTimeout ->
+ DeviceEntryRestrictionReason.NonStrongBiometricsSecurityTimeout
+ else -> null
+ }
+ }
+ } else {
+ biometricSettingsInteractor.authenticationFlags.map { authFlags ->
+ when {
+ authFlags.isInUserLockdown -> DeviceEntryRestrictionReason.UserLockdown
+ authFlags.isPrimaryAuthRequiredAfterDpmLockdown ->
+ DeviceEntryRestrictionReason.PolicyLockdown
+ else -> null
+ }
+ }
+ }
+ }
+
+ /** Whether the device is in lockdown mode, where bouncer input is required to unlock. */
+ val isInLockdown: Flow<Boolean> = deviceEntryRestrictionReason.map { it.isInLockdown() }
+
/**
* Whether the device is unlocked or not, along with the information about the authentication
* method that was used to unlock the device.
@@ -90,13 +167,18 @@ constructor(
// Device is locked if SIM is locked.
flowOf(DeviceUnlockStatus(false, null))
} else {
- powerInteractor.isAsleep.flatMapLatest { isAsleep ->
- if (isAsleep) {
- flowOf(DeviceUnlockStatus(false, null))
- } else {
- deviceUnlockSource.map { DeviceUnlockStatus(true, it) }
+ combine(
+ powerInteractor.isAsleep,
+ isInLockdown,
+ ::Pair,
+ )
+ .flatMapLatestConflated { (isAsleep, isInLockdown) ->
+ if (isAsleep || isInLockdown) {
+ flowOf(DeviceUnlockStatus(false, null))
+ } else {
+ deviceUnlockSource.map { DeviceUnlockStatus(true, it) }
+ }
}
- }
}
}
.stateIn(
@@ -104,4 +186,34 @@ constructor(
started = SharingStarted.Eagerly,
initialValue = DeviceUnlockStatus(false, null),
)
+
+ private fun DeviceEntryRestrictionReason?.isInLockdown(): Boolean {
+ return when (this) {
+ DeviceEntryRestrictionReason.UserLockdown -> true
+ DeviceEntryRestrictionReason.PolicyLockdown -> true
+
+ // Add individual enum value instead of using "else" so new reasons are guaranteed
+ // to be added here at compile-time.
+ null -> false
+ DeviceEntryRestrictionReason.DeviceNotUnlockedSinceReboot -> false
+ DeviceEntryRestrictionReason.BouncerLockedOut -> false
+ DeviceEntryRestrictionReason.AdaptiveAuthRequest -> false
+ DeviceEntryRestrictionReason.NonStrongBiometricsSecurityTimeout -> false
+ DeviceEntryRestrictionReason.TrustAgentDisabled -> false
+ DeviceEntryRestrictionReason.StrongBiometricsLockedOut -> false
+ DeviceEntryRestrictionReason.SecurityTimeout -> false
+ DeviceEntryRestrictionReason.DeviceNotUnlockedSinceMainlineUpdate -> false
+ DeviceEntryRestrictionReason.UnattendedUpdate -> false
+ DeviceEntryRestrictionReason.NonStrongFaceLockedOut -> false
+ }
+ }
+
+ private fun wasRebootedForMainlineUpdate(): Boolean {
+ return systemPropertiesHelper.get(SYS_BOOT_REASON_PROP) == REBOOT_MAINLINE_UPDATE
+ }
+
+ companion object {
+ @VisibleForTesting const val SYS_BOOT_REASON_PROP = "sys.boot.reason.last"
+ @VisibleForTesting const val REBOOT_MAINLINE_UPDATE = "reboot,mainline_update"
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/deviceentry/domain/interactor/SystemUIDeviceEntryFaceAuthInteractor.kt b/packages/SystemUI/src/com/android/systemui/deviceentry/domain/interactor/SystemUIDeviceEntryFaceAuthInteractor.kt
index d12ea4573fbe..c536d6b4f6f8 100644
--- a/packages/SystemUI/src/com/android/systemui/deviceentry/domain/interactor/SystemUIDeviceEntryFaceAuthInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/deviceentry/domain/interactor/SystemUIDeviceEntryFaceAuthInteractor.kt
@@ -90,6 +90,7 @@ constructor(
private val powerInteractor: PowerInteractor,
private val biometricSettingsRepository: BiometricSettingsRepository,
private val trustManager: TrustManager,
+ deviceEntryFaceAuthStatusInteractor: DeviceEntryFaceAuthStatusInteractor,
) : DeviceEntryFaceAuthInteractor {
private val listeners: MutableList<FaceAuthenticationListener> = mutableListOf()
@@ -276,9 +277,13 @@ constructor(
}
private val faceAuthenticationStatusOverride = MutableStateFlow<FaceAuthenticationStatus?>(null)
+
/** Provide the status of face authentication */
override val authenticationStatus =
- merge(faceAuthenticationStatusOverride.filterNotNull(), repository.authenticationStatus)
+ merge(
+ faceAuthenticationStatusOverride.filterNotNull(),
+ deviceEntryFaceAuthStatusInteractor.authenticationStatus.filterNotNull(),
+ )
/** Provide the status of face detection */
override val detectionStatus = repository.detectionStatus
diff --git a/packages/SystemUI/src/com/android/systemui/display/data/repository/DisplayRepository.kt b/packages/SystemUI/src/com/android/systemui/display/data/repository/DisplayRepository.kt
index 0bcfa9616b76..69ddb62cc05a 100644
--- a/packages/SystemUI/src/com/android/systemui/display/data/repository/DisplayRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/display/data/repository/DisplayRepository.kt
@@ -44,6 +44,7 @@ import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.combine
import kotlinx.coroutines.flow.distinctUntilChanged
+import kotlinx.coroutines.flow.filter
import kotlinx.coroutines.flow.filterIsInstance
import kotlinx.coroutines.flow.flowOn
import kotlinx.coroutines.flow.map
@@ -137,6 +138,7 @@ constructor(
override val displayAdditionEvent: Flow<Display?> =
allDisplayEvents.filterIsInstance<DisplayEvent.Added>().map { getDisplay(it.displayId) }
+ // TODO: b/345472038 - Delete after the flag is ramped up.
private val oldEnabledDisplays: Flow<Set<Display>> =
allDisplayEvents
.map { getDisplays() }
@@ -167,6 +169,9 @@ constructor(
}
.debugLog("enabledDisplayIds")
+ private val defaultDisplay by lazy {
+ getDisplay(Display.DEFAULT_DISPLAY) ?: error("Unable to get default display.")
+ }
/**
* Represents displays that went though the [DisplayListener.onDisplayAdded] callback.
*
@@ -181,11 +186,7 @@ constructor(
.stateIn(
bgApplicationScope,
started = SharingStarted.WhileSubscribed(),
- initialValue =
- setOf(
- getDisplay(Display.DEFAULT_DISPLAY)
- ?: error("Unable to get default display.")
- )
+ initialValue = setOf(defaultDisplay)
)
} else {
oldEnabledDisplays
@@ -344,9 +345,10 @@ constructor(
.debugLog("pendingDisplay")
override val defaultDisplayOff: Flow<Boolean> =
- displays
- .map { displays -> displays.firstOrNull { it.displayId == Display.DEFAULT_DISPLAY } }
- .map { it?.state == Display.STATE_OFF }
+ displayChangeEvent
+ .filter { it == Display.DEFAULT_DISPLAY }
+ .map { defaultDisplay.state == Display.STATE_OFF }
+ .distinctUntilChanged()
private fun <T> Flow<T>.debugLog(flowName: String): Flow<T> {
return if (DEBUG) {
diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeHost.java b/packages/SystemUI/src/com/android/systemui/doze/DozeHost.java
index 8776ec5496c8..17b455d7ef6f 100644
--- a/packages/SystemUI/src/com/android/systemui/doze/DozeHost.java
+++ b/packages/SystemUI/src/com/android/systemui/doze/DozeHost.java
@@ -18,6 +18,8 @@ package com.android.systemui.doze;
import android.annotation.NonNull;
+import androidx.annotation.MainThread;
+
/**
* Interface the doze service uses to communicate with the rest of system UI.
*/
@@ -27,6 +29,7 @@ public interface DozeHost {
void startDozing();
void pulseWhileDozing(@NonNull PulseCallback callback, int reason);
void stopDozing();
+ @MainThread
void dozeTimeTick();
boolean isPowerSaveActive();
boolean isPulsingBlocked();
diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeSensors.java b/packages/SystemUI/src/com/android/systemui/doze/DozeSensors.java
index 7ae840938fe7..e07b5c228585 100644
--- a/packages/SystemUI/src/com/android/systemui/doze/DozeSensors.java
+++ b/packages/SystemUI/src/com/android/systemui/doze/DozeSensors.java
@@ -48,6 +48,7 @@ import com.android.internal.R;
import com.android.internal.logging.UiEvent;
import com.android.internal.logging.UiEventLogger;
import com.android.internal.logging.UiEventLoggerImpl;
+import com.android.systemui.Flags;
import com.android.systemui.biometrics.AuthController;
import com.android.systemui.plugins.SensorManagerPlugin;
import com.android.systemui.statusbar.phone.DozeParameters;
@@ -426,7 +427,11 @@ public class DozeSensors {
}
if (!anyListening) {
- mSecureSettings.unregisterContentObserverSync(mSettingsObserver);
+ if (Flags.registerContentObserversAsync()) {
+ mSecureSettings.unregisterContentObserverAsync(mSettingsObserver);
+ } else {
+ mSecureSettings.unregisterContentObserverSync(mSettingsObserver);
+ }
} else if (!mSettingRegistered) {
for (TriggerSensor s : mTriggerSensors) {
s.registerSettingsObserver(mSettingsObserver);
@@ -750,8 +755,13 @@ public class DozeSensors {
public void registerSettingsObserver(ContentObserver settingsObserver) {
if (mConfigured && !TextUtils.isEmpty(mSetting)) {
- mSecureSettings.registerContentObserverForUserSync(
- mSetting, mSettingsObserver, UserHandle.USER_ALL);
+ if (Flags.registerContentObserversAsync()) {
+ mSecureSettings.registerContentObserverForUserAsync(
+ mSetting, mSettingsObserver, UserHandle.USER_ALL);
+ } else {
+ mSecureSettings.registerContentObserverForUserSync(
+ mSetting, mSettingsObserver, UserHandle.USER_ALL);
+ }
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeUi.java b/packages/SystemUI/src/com/android/systemui/doze/DozeUi.java
index 1a06418065a2..9def81a89e3a 100644
--- a/packages/SystemUI/src/com/android/systemui/doze/DozeUi.java
+++ b/packages/SystemUI/src/com/android/systemui/doze/DozeUi.java
@@ -27,6 +27,8 @@ import android.os.SystemClock;
import android.text.format.Formatter;
import android.util.Log;
+import androidx.annotation.AnyThread;
+
import com.android.systemui.dagger.qualifiers.Background;
import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.doze.dagger.DozeScope;
@@ -55,7 +57,7 @@ public class DozeUi implements DozeMachine.Part {
private final DozeParameters mDozeParameters;
private final DozeLog mDozeLog;
private final DelayableExecutor mBgExecutor;
- private long mLastTimeTickElapsed = 0;
+ private volatile long mLastTimeTickElapsed = 0;
// If time tick is scheduled and there's not a pending runnable to cancel:
private volatile boolean mTimeTickScheduled;
private final Runnable mCancelTimeTickerRunnable = new Runnable() {
@@ -218,10 +220,15 @@ public class DozeUi implements DozeMachine.Part {
return calendar.getTimeInMillis();
}
+ @AnyThread
private void onTimeTick() {
verifyLastTimeTick();
- mHost.dozeTimeTick();
+ if (dozeuiSchedulingAlarmsBackgroundExecution()) {
+ mHandler.post(mHost::dozeTimeTick);
+ } else {
+ mHost.dozeTimeTick();
+ }
// Keep wakelock until a frame has been pushed.
mHandler.post(mWakeLock.wrap(() -> {}));
diff --git a/packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayAnimationsController.kt b/packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayAnimationsController.kt
index 3294c816d67c..b45ebd865c55 100644
--- a/packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayAnimationsController.kt
+++ b/packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayAnimationsController.kt
@@ -256,6 +256,7 @@ constructor(
it.cancel()
null
}
+ mOverlayStateController.setExitAnimationsRunning(false)
}
private fun blurAnimator(
diff --git a/packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayService.java b/packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayService.java
index c6c5747973b3..83fa001d104e 100644
--- a/packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayService.java
+++ b/packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayService.java
@@ -45,6 +45,7 @@ import androidx.lifecycle.LifecycleService;
import androidx.lifecycle.ServiceLifecycleDispatcher;
import androidx.lifecycle.ViewModelStore;
+import com.android.app.viewcapture.ViewCaptureAwareWindowManager;
import com.android.dream.lowlight.dagger.LowLightDreamModule;
import com.android.internal.logging.UiEvent;
import com.android.internal.logging.UiEventLogger;
@@ -97,7 +98,7 @@ public class DreamOverlayService extends android.service.dreams.DreamOverlayServ
@Nullable
private final ComponentName mHomeControlPanelDreamComponent;
private final UiEventLogger mUiEventLogger;
- private final WindowManager mWindowManager;
+ private final ViewCaptureAwareWindowManager mWindowManager;
private final String mWindowTitle;
// A reference to the {@link Window} used to hold the dream overlay.
@@ -244,7 +245,7 @@ public class DreamOverlayService extends android.service.dreams.DreamOverlayServ
Context context,
DreamOverlayLifecycleOwner lifecycleOwner,
@Main DelayableExecutor executor,
- WindowManager windowManager,
+ ViewCaptureAwareWindowManager viewCaptureAwareWindowManager,
ComplicationComponent.Factory complicationComponentFactory,
com.android.systemui.dreams.complication.dagger.ComplicationComponent.Factory
dreamComplicationComponentFactory,
@@ -267,7 +268,7 @@ public class DreamOverlayService extends android.service.dreams.DreamOverlayServ
super(executor);
mContext = context;
mExecutor = executor;
- mWindowManager = windowManager;
+ mWindowManager = viewCaptureAwareWindowManager;
mKeyguardUpdateMonitor = keyguardUpdateMonitor;
mScrimManager = scrimManager;
mLowLightDreamComponent = lowLightDreamComponent;
diff --git a/packages/SystemUI/src/com/android/systemui/dreams/homecontrols/TaskFragmentComponent.kt b/packages/SystemUI/src/com/android/systemui/dreams/homecontrols/TaskFragmentComponent.kt
index 297ad847caa6..befd822e14cd 100644
--- a/packages/SystemUI/src/com/android/systemui/dreams/homecontrols/TaskFragmentComponent.kt
+++ b/packages/SystemUI/src/com/android/systemui/dreams/homecontrols/TaskFragmentComponent.kt
@@ -161,5 +161,6 @@ constructor(
TASK_FRAGMENT_TRANSIT_CLOSE,
false
)
+ organizer.unregisterOrganizer()
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/education/dagger/ContextualEducationModule.kt b/packages/SystemUI/src/com/android/systemui/education/dagger/ContextualEducationModule.kt
new file mode 100644
index 000000000000..0e2e2e6277f2
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/education/dagger/ContextualEducationModule.kt
@@ -0,0 +1,102 @@
+/*
+ * 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.systemui.education.dagger
+
+import com.android.systemui.CoreStartable
+import com.android.systemui.Flags
+import com.android.systemui.dagger.qualifiers.Background
+import com.android.systemui.education.data.repository.ContextualEducationRepository
+import com.android.systemui.education.data.repository.ContextualEducationRepositoryImpl
+import com.android.systemui.education.domain.interactor.ContextualEducationInteractor
+import com.android.systemui.education.domain.interactor.KeyboardTouchpadEduStatsInteractor
+import com.android.systemui.education.domain.interactor.KeyboardTouchpadEduStatsInteractorImpl
+import com.android.systemui.shared.education.GestureType
+import dagger.Binds
+import dagger.Lazy
+import dagger.Module
+import dagger.Provides
+import dagger.multibindings.ClassKey
+import dagger.multibindings.IntoMap
+import java.time.Clock
+import javax.inject.Qualifier
+import kotlinx.coroutines.CoroutineDispatcher
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.SupervisorJob
+
+@Module
+interface ContextualEducationModule {
+ @Binds
+ fun bindContextualEducationRepository(
+ impl: ContextualEducationRepositoryImpl
+ ): ContextualEducationRepository
+
+ @Qualifier annotation class EduDataStoreScope
+
+ @Qualifier annotation class EduClock
+
+ companion object {
+ @EduDataStoreScope
+ @Provides
+ fun provideEduDataStoreScope(
+ @Background bgDispatcher: CoroutineDispatcher
+ ): CoroutineScope {
+ return CoroutineScope(bgDispatcher + SupervisorJob())
+ }
+
+ @EduClock
+ @Provides
+ fun provideEduClock(): Clock {
+ return Clock.systemUTC()
+ }
+
+ @Provides
+ @IntoMap
+ @ClassKey(ContextualEducationInteractor::class)
+ fun provideContextualEducationInteractor(
+ implLazy: Lazy<ContextualEducationInteractor>
+ ): CoreStartable {
+ return if (Flags.keyboardTouchpadContextualEducation()) {
+ implLazy.get()
+ } else {
+ // No-op implementation when the flag is disabled.
+ return NoOpCoreStartable
+ }
+ }
+
+ @Provides
+ fun provideKeyboardTouchpadEduStatsInteractor(
+ implLazy: Lazy<KeyboardTouchpadEduStatsInteractorImpl>
+ ): KeyboardTouchpadEduStatsInteractor {
+ return if (Flags.keyboardTouchpadContextualEducation()) {
+ implLazy.get()
+ } else {
+ // No-op implementation when the flag is disabled.
+ return NoOpKeyboardTouchpadEduStatsInteractor
+ }
+ }
+ }
+
+ private object NoOpKeyboardTouchpadEduStatsInteractor : KeyboardTouchpadEduStatsInteractor {
+ override fun incrementSignalCount(gestureType: GestureType) {}
+
+ override fun updateShortcutTriggerTime(gestureType: GestureType) {}
+ }
+
+ private object NoOpCoreStartable : CoreStartable {
+ override fun start() {}
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/education/data/model/GestureEduModel.kt b/packages/SystemUI/src/com/android/systemui/education/data/model/GestureEduModel.kt
new file mode 100644
index 000000000000..9f6cb4d027e6
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/education/data/model/GestureEduModel.kt
@@ -0,0 +1,29 @@
+/*
+ * 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.systemui.education.data.model
+
+import java.time.Instant
+
+/**
+ * Model to store education data related to each gesture (e.g. Back, Home, All Apps, Overview). Each
+ * gesture stores its own model separately.
+ */
+data class GestureEduModel(
+ val signalCount: Int = 0,
+ val educationShownCount: Int = 0,
+ val lastShortcutTriggeredTime: Instant? = null,
+)
diff --git a/packages/SystemUI/src/com/android/systemui/education/data/repository/ContextualEducationRepository.kt b/packages/SystemUI/src/com/android/systemui/education/data/repository/ContextualEducationRepository.kt
new file mode 100644
index 000000000000..248b7a526256
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/education/data/repository/ContextualEducationRepository.kt
@@ -0,0 +1,66 @@
+/*
+ * 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.systemui.education.data.repository
+
+import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.education.dagger.ContextualEducationModule.EduClock
+import com.android.systemui.education.data.model.GestureEduModel
+import com.android.systemui.shared.education.GestureType
+import java.time.Clock
+import javax.inject.Inject
+import kotlinx.coroutines.flow.Flow
+
+/** Encapsulates the functions of ContextualEducationRepository. */
+interface ContextualEducationRepository {
+ fun setUser(userId: Int)
+
+ fun readGestureEduModelFlow(gestureType: GestureType): Flow<GestureEduModel>
+
+ suspend fun incrementSignalCount(gestureType: GestureType)
+
+ suspend fun updateShortcutTriggerTime(gestureType: GestureType)
+}
+
+/**
+ * Provide methods to read and update on field level and allow setting datastore when user is
+ * changed
+ */
+@SysUISingleton
+class ContextualEducationRepositoryImpl
+@Inject
+constructor(
+ @EduClock private val clock: Clock,
+ private val userEduRepository: UserContextualEducationRepository
+) : ContextualEducationRepository {
+ /** To change data store when user is changed */
+ override fun setUser(userId: Int) = userEduRepository.setUser(userId)
+
+ override fun readGestureEduModelFlow(gestureType: GestureType) =
+ userEduRepository.readGestureEduModelFlow(gestureType)
+
+ override suspend fun incrementSignalCount(gestureType: GestureType) {
+ userEduRepository.updateGestureEduModel(gestureType) {
+ it.copy(signalCount = it.signalCount + 1)
+ }
+ }
+
+ override suspend fun updateShortcutTriggerTime(gestureType: GestureType) {
+ userEduRepository.updateGestureEduModel(gestureType) {
+ it.copy(lastShortcutTriggeredTime = clock.instant())
+ }
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/education/data/repository/UserContextualEducationRepository.kt b/packages/SystemUI/src/com/android/systemui/education/data/repository/UserContextualEducationRepository.kt
new file mode 100644
index 000000000000..b7fc7733f3e6
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/education/data/repository/UserContextualEducationRepository.kt
@@ -0,0 +1,142 @@
+/*
+ * 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.systemui.education.data.repository
+
+import android.content.Context
+import androidx.datastore.core.DataStore
+import androidx.datastore.preferences.core.MutablePreferences
+import androidx.datastore.preferences.core.PreferenceDataStoreFactory
+import androidx.datastore.preferences.core.Preferences
+import androidx.datastore.preferences.core.edit
+import androidx.datastore.preferences.core.intPreferencesKey
+import androidx.datastore.preferences.core.longPreferencesKey
+import androidx.datastore.preferences.preferencesDataStoreFile
+import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.dagger.qualifiers.Application
+import com.android.systemui.education.dagger.ContextualEducationModule.EduDataStoreScope
+import com.android.systemui.education.data.model.GestureEduModel
+import com.android.systemui.shared.education.GestureType
+import java.time.Instant
+import javax.inject.Inject
+import javax.inject.Provider
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.cancel
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.MutableStateFlow
+import kotlinx.coroutines.flow.filterNotNull
+import kotlinx.coroutines.flow.first
+import kotlinx.coroutines.flow.flatMapLatest
+import kotlinx.coroutines.flow.map
+
+/**
+ * A contextual education repository to:
+ * 1) store education data per user
+ * 2) provide methods to read and update data on model-level
+ * 3) provide method to enable changing datastore when user is changed
+ */
+@SysUISingleton
+class UserContextualEducationRepository
+@Inject
+constructor(
+ @Application private val applicationContext: Context,
+ @EduDataStoreScope private val dataStoreScopeProvider: Provider<CoroutineScope>
+) {
+ companion object {
+ const val SIGNAL_COUNT_SUFFIX = "_SIGNAL_COUNT"
+ const val NUMBER_OF_EDU_SHOWN_SUFFIX = "_NUMBER_OF_EDU_SHOWN"
+ const val LAST_SHORTCUT_TRIGGERED_TIME_SUFFIX = "_LAST_SHORTCUT_TRIGGERED_TIME"
+
+ const val DATASTORE_DIR = "education/USER%s_ContextualEducation"
+ }
+
+ private var dataStoreScope: CoroutineScope? = null
+
+ private val datastore = MutableStateFlow<DataStore<Preferences>?>(null)
+
+ @OptIn(kotlinx.coroutines.ExperimentalCoroutinesApi::class)
+ private val prefData: Flow<Preferences> = datastore.filterNotNull().flatMapLatest { it.data }
+
+ internal fun setUser(userId: Int) {
+ dataStoreScope?.cancel()
+ val newDsScope = dataStoreScopeProvider.get()
+ datastore.value =
+ PreferenceDataStoreFactory.create(
+ produceFile = {
+ applicationContext.preferencesDataStoreFile(
+ String.format(DATASTORE_DIR, userId)
+ )
+ },
+ scope = newDsScope,
+ )
+ dataStoreScope = newDsScope
+ }
+
+ internal fun readGestureEduModelFlow(gestureType: GestureType): Flow<GestureEduModel> =
+ prefData.map { preferences -> getGestureEduModel(gestureType, preferences) }
+
+ private fun getGestureEduModel(
+ gestureType: GestureType,
+ preferences: Preferences
+ ): GestureEduModel {
+ return GestureEduModel(
+ signalCount = preferences[getSignalCountKey(gestureType)] ?: 0,
+ educationShownCount = preferences[getEducationShownCountKey(gestureType)] ?: 0,
+ lastShortcutTriggeredTime =
+ preferences[getLastShortcutTriggeredTimeKey(gestureType)]?.let {
+ Instant.ofEpochMilli(it)
+ },
+ )
+ }
+
+ internal suspend fun updateGestureEduModel(
+ gestureType: GestureType,
+ transform: (GestureEduModel) -> GestureEduModel
+ ) {
+ datastore.filterNotNull().first().edit { preferences ->
+ val currentModel = getGestureEduModel(gestureType, preferences)
+ val updatedModel = transform(currentModel)
+ preferences[getSignalCountKey(gestureType)] = updatedModel.signalCount
+ preferences[getEducationShownCountKey(gestureType)] = updatedModel.educationShownCount
+ updateTimeByInstant(
+ preferences,
+ updatedModel.lastShortcutTriggeredTime,
+ getLastShortcutTriggeredTimeKey(gestureType)
+ )
+ }
+ }
+
+ private fun getSignalCountKey(gestureType: GestureType): Preferences.Key<Int> =
+ intPreferencesKey(gestureType.name + SIGNAL_COUNT_SUFFIX)
+
+ private fun getEducationShownCountKey(gestureType: GestureType): Preferences.Key<Int> =
+ intPreferencesKey(gestureType.name + NUMBER_OF_EDU_SHOWN_SUFFIX)
+
+ private fun getLastShortcutTriggeredTimeKey(gestureType: GestureType): Preferences.Key<Long> =
+ longPreferencesKey(gestureType.name + LAST_SHORTCUT_TRIGGERED_TIME_SUFFIX)
+
+ private fun updateTimeByInstant(
+ preferences: MutablePreferences,
+ instant: Instant?,
+ key: Preferences.Key<Long>
+ ) {
+ if (instant != null) {
+ preferences[key] = instant.toEpochMilli()
+ } else {
+ preferences.remove(key)
+ }
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/education/domain/interactor/ContextualEducationInteractor.kt b/packages/SystemUI/src/com/android/systemui/education/domain/interactor/ContextualEducationInteractor.kt
new file mode 100644
index 000000000000..e2aa9111246b
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/education/domain/interactor/ContextualEducationInteractor.kt
@@ -0,0 +1,54 @@
+/*
+ * 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.systemui.education.domain.interactor
+
+import com.android.systemui.CoreStartable
+import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.dagger.qualifiers.Background
+import com.android.systemui.education.data.repository.ContextualEducationRepository
+import com.android.systemui.shared.education.GestureType
+import com.android.systemui.user.domain.interactor.SelectedUserInteractor
+import javax.inject.Inject
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.flow.collectLatest
+import kotlinx.coroutines.launch
+
+/**
+ * Allows updating education data (e.g. signal count, shortcut time) for different gesture types.
+ * Change user education repository when user is changed.
+ */
+@SysUISingleton
+class ContextualEducationInteractor
+@Inject
+constructor(
+ @Background private val backgroundScope: CoroutineScope,
+ private val selectedUserInteractor: SelectedUserInteractor,
+ private val repository: ContextualEducationRepository,
+) : CoreStartable {
+
+ override fun start() {
+ backgroundScope.launch {
+ selectedUserInteractor.selectedUser.collectLatest { repository.setUser(it) }
+ }
+ }
+
+ suspend fun incrementSignalCount(gestureType: GestureType) =
+ repository.incrementSignalCount(gestureType)
+
+ suspend fun updateShortcutTriggerTime(gestureType: GestureType) =
+ repository.updateShortcutTriggerTime(gestureType)
+}
diff --git a/packages/SystemUI/src/com/android/systemui/education/domain/interactor/KeyboardTouchpadEduStatsInteractor.kt b/packages/SystemUI/src/com/android/systemui/education/domain/interactor/KeyboardTouchpadEduStatsInteractor.kt
new file mode 100644
index 000000000000..643e571d2927
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/education/domain/interactor/KeyboardTouchpadEduStatsInteractor.kt
@@ -0,0 +1,55 @@
+/*
+ * 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.systemui.education.domain.interactor
+
+import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.dagger.qualifiers.Background
+import com.android.systemui.shared.education.GestureType
+import javax.inject.Inject
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.launch
+
+/**
+ * Encapsulates the update functions of KeyboardTouchpadEduStatsInteractor. This encapsulation is
+ * for having a different implementation of interactor when the feature flag is off.
+ */
+interface KeyboardTouchpadEduStatsInteractor {
+ fun incrementSignalCount(gestureType: GestureType)
+
+ fun updateShortcutTriggerTime(gestureType: GestureType)
+}
+
+/** Allow update to education data related to keyboard/touchpad. */
+@SysUISingleton
+class KeyboardTouchpadEduStatsInteractorImpl
+@Inject
+constructor(
+ @Background private val backgroundScope: CoroutineScope,
+ private val contextualEducationInteractor: ContextualEducationInteractor
+) : KeyboardTouchpadEduStatsInteractor {
+
+ override fun incrementSignalCount(gestureType: GestureType) {
+ // Todo: check if keyboard/touchpad is connected before update
+ backgroundScope.launch { contextualEducationInteractor.incrementSignalCount(gestureType) }
+ }
+
+ override fun updateShortcutTriggerTime(gestureType: GestureType) {
+ backgroundScope.launch {
+ contextualEducationInteractor.updateShortcutTriggerTime(gestureType)
+ }
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/flags/FlagDependencies.kt b/packages/SystemUI/src/com/android/systemui/flags/FlagDependencies.kt
index af7ecf66d107..0e06117b2693 100644
--- a/packages/SystemUI/src/com/android/systemui/flags/FlagDependencies.kt
+++ b/packages/SystemUI/src/com/android/systemui/flags/FlagDependencies.kt
@@ -28,6 +28,8 @@ import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.keyguard.KeyguardBottomAreaRefactor
import com.android.systemui.keyguard.MigrateClocksToBlueprint
import com.android.systemui.keyguard.shared.ComposeLockscreen
+import com.android.systemui.qs.flags.NewQsUI
+import com.android.systemui.qs.flags.QSComposeFragment
import com.android.systemui.scene.shared.flag.SceneContainerFlag
import com.android.systemui.shade.shared.flag.DualShade
import com.android.systemui.statusbar.notification.collection.SortBySectionTimeFlag
@@ -35,6 +37,8 @@ import com.android.systemui.statusbar.notification.footer.shared.FooterViewRefac
import com.android.systemui.statusbar.notification.interruption.VisualInterruptionRefactor
import com.android.systemui.statusbar.notification.shared.NotificationAvalancheSuppression
import com.android.systemui.statusbar.notification.shared.NotificationIconContainerRefactor
+import com.android.systemui.statusbar.notification.shared.NotificationMinimalismPrototype
+import com.android.systemui.statusbar.notification.shared.NotificationsHeadsUpRefactor
import com.android.systemui.statusbar.notification.shared.NotificationsLiveDataStoreRefactor
import com.android.systemui.statusbar.notification.shared.PriorityPeopleSection
import javax.inject.Inject
@@ -53,6 +57,7 @@ class FlagDependencies @Inject constructor(featureFlags: FeatureFlagsClassic, ha
FooterViewRefactor.token dependsOn NotificationIconContainerRefactor.token
NotificationAvalancheSuppression.token dependsOn VisualInterruptionRefactor.token
PriorityPeopleSection.token dependsOn SortBySectionTimeFlag.token
+ NotificationMinimalismPrototype.token dependsOn NotificationsHeadsUpRefactor.token
// SceneContainer dependencies
SceneContainerFlag.getFlagDependencies().forEach { (alpha, beta) -> alpha dependsOn beta }
@@ -66,14 +71,20 @@ class FlagDependencies @Inject constructor(featureFlags: FeatureFlagsClassic, ha
// DualShade dependencies
DualShade.token dependsOn SceneContainerFlag.getMainAconfigFlag()
+
+ // QS Fragment using Compose dependencies
+ QSComposeFragment.token dependsOn NewQsUI.token
}
private inline val politeNotifications
get() = FlagToken(FLAG_POLITE_NOTIFICATIONS, politeNotifications())
+
private inline val crossAppPoliteNotifications
get() = FlagToken(FLAG_CROSS_APP_POLITE_NOTIFICATIONS, crossAppPoliteNotifications())
+
private inline val vibrateWhileUnlockedToken: FlagToken
get() = FlagToken(FLAG_VIBRATE_WHILE_UNLOCKED, vibrateWhileUnlocked())
+
private inline val communalHub
get() = FlagToken(FLAG_COMMUNAL_HUB, communalHub())
}
diff --git a/packages/SystemUI/src/com/android/systemui/flags/Flags.kt b/packages/SystemUI/src/com/android/systemui/flags/Flags.kt
index 3d3584e29def..d0beb7abc25b 100644
--- a/packages/SystemUI/src/com/android/systemui/flags/Flags.kt
+++ b/packages/SystemUI/src/com/android/systemui/flags/Flags.kt
@@ -137,12 +137,6 @@ object Flags {
// TODO(b/267722622): Tracking Bug
@JvmField val WALLPAPER_PICKER_UI_FOR_AIWP = releasedFlag("wallpaper_picker_ui_for_aiwp")
- /** Whether to allow long-press on the lock screen to directly open wallpaper picker. */
- // TODO(b/277220285): Tracking bug.
- @JvmField
- val LOCK_SCREEN_LONG_PRESS_DIRECT_TO_WPP =
- unreleasedFlag("lock_screen_long_press_directly_opens_wallpaper_picker")
-
/** Whether page transition animations in the wallpaper picker are enabled */
// TODO(b/291710220): Tracking bug.
@JvmField
diff --git a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java
index 1e4fb4f15062..493afde96aff 100644
--- a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java
+++ b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java
@@ -64,7 +64,6 @@ import android.os.Trace;
import android.os.UserHandle;
import android.os.UserManager;
import android.provider.Settings;
-import android.service.dreams.IDreamManager;
import android.sysprop.TelephonyProperties;
import android.telecom.TelecomManager;
import android.telephony.ServiceState;
@@ -197,7 +196,6 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene
private final Context mContext;
private final GlobalActionsManager mWindowManagerFuncs;
private final AudioManager mAudioManager;
- private final IDreamManager mDreamManager;
private final DevicePolicyManager mDevicePolicyManager;
private final LockPatternUtils mLockPatternUtils;
private final SelectedUserInteractor mSelectedUserInteractor;
@@ -345,7 +343,6 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene
Context context,
GlobalActionsManager windowManagerFuncs,
AudioManager audioManager,
- IDreamManager iDreamManager,
DevicePolicyManager devicePolicyManager,
LockPatternUtils lockPatternUtils,
BroadcastDispatcher broadcastDispatcher,
@@ -382,7 +379,6 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene
mContext = context;
mWindowManagerFuncs = windowManagerFuncs;
mAudioManager = audioManager;
- mDreamManager = iDreamManager;
mDevicePolicyManager = devicePolicyManager;
mLockPatternUtils = lockPatternUtils;
mTelephonyListenerManager = telephonyListenerManager;
@@ -510,20 +506,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene
mHandler.sendEmptyMessage(MESSAGE_DISMISS);
}
- protected void awakenIfNecessary() {
- if (mDreamManager != null) {
- try {
- if (mDreamManager.isDreaming()) {
- mDreamManager.awaken();
- }
- } catch (RemoteException e) {
- // we tried
- }
- }
- }
-
protected void handleShow(@Nullable Expandable expandable) {
- awakenIfNecessary();
mDialog = createDialog();
prepareDialog();
diff --git a/packages/SystemUI/src/com/android/systemui/haptics/qs/QSLongPressEffect.kt b/packages/SystemUI/src/com/android/systemui/haptics/qs/QSLongPressEffect.kt
index 7b5139aa510e..491c73d0ae56 100644
--- a/packages/SystemUI/src/com/android/systemui/haptics/qs/QSLongPressEffect.kt
+++ b/packages/SystemUI/src/com/android/systemui/haptics/qs/QSLongPressEffect.kt
@@ -16,9 +16,17 @@
package com.android.systemui.haptics.qs
+import android.content.ComponentName
import android.os.VibrationEffect
+import android.service.quicksettings.Tile
+import android.view.View
import androidx.annotation.VisibleForTesting
+import com.android.systemui.animation.ActivityTransitionAnimator
+import com.android.systemui.animation.DelegateTransitionAnimatorController
+import com.android.systemui.animation.DialogCuj
+import com.android.systemui.animation.DialogTransitionAnimator
import com.android.systemui.animation.Expandable
+import com.android.systemui.plugins.FalsingManager
import com.android.systemui.plugins.qs.QSTile
import com.android.systemui.statusbar.VibratorHelper
import com.android.systemui.statusbar.policy.KeyguardStateController
@@ -40,6 +48,7 @@ class QSLongPressEffect
constructor(
private val vibratorHelper: VibratorHelper?,
private val keyguardStateController: KeyguardStateController,
+ private val falsingManager: FalsingManager,
) {
var effectDuration = 0
@@ -55,6 +64,7 @@ constructor(
/** The [QSTile] and [Expandable] used to perform a long-click and click actions */
var qsTile: QSTile? = null
var expandable: Expandable? = null
+ private set
/** Haptic effects */
private val durations =
@@ -122,29 +132,34 @@ constructor(
}
fun handleAnimationStart() {
- vibrate(longPressHint)
- setState(State.RUNNING_FORWARD)
+ if (state == State.TIMEOUT_WAIT) {
+ vibrate(longPressHint)
+ setState(State.RUNNING_FORWARD)
+ }
}
/** This function is called both when an animator completes or gets cancelled */
fun handleAnimationComplete() {
when (state) {
State.RUNNING_FORWARD -> {
- setState(State.IDLE)
vibrate(snapEffect)
if (keyguardStateController.isUnlocked) {
- qsTile?.longClick(expandable)
+ setState(State.LONG_CLICKED)
} else {
callback?.onResetProperties()
- qsTile?.longClick(expandable)
+ setState(State.IDLE)
}
+ qsTile?.longClick(expandable)
}
State.RUNNING_BACKWARDS_FROM_UP -> {
- setState(State.IDLE)
callback?.onEffectFinishedReversing()
+ setState(getStateForClick())
qsTile?.click(expandable)
}
- State.RUNNING_BACKWARDS_FROM_CANCEL -> setState(State.IDLE)
+ State.RUNNING_BACKWARDS_FROM_CANCEL -> {
+ callback?.onEffectFinishedReversing()
+ setState(State.IDLE)
+ }
else -> {}
}
}
@@ -160,14 +175,37 @@ constructor(
}
fun onTileClick(): Boolean {
- if (state == State.TIMEOUT_WAIT) {
- setState(State.IDLE)
- qsTile?.let {
- it.click(expandable)
- return true
- }
+ val isStateClickable = state == State.TIMEOUT_WAIT || state == State.IDLE
+
+ // Ignore View-generated clicks on invalid states or if the bouncer is showing
+ if (keyguardStateController.isPrimaryBouncerShowing || !isStateClickable) return false
+
+ setState(getStateForClick())
+ qsTile?.click(expandable)
+ return true
+ }
+
+ /**
+ * Get the appropriate state for a click action.
+ *
+ * In some occasions, the click action will not result in a subsequent action that resets the
+ * state upon completion (e.g., a launch transition animation). In these cases, the state needs
+ * to be reset before the click is dispatched.
+ */
+ @VisibleForTesting
+ fun getStateForClick(): State {
+ val isTileUnavailable = qsTile?.state?.state == Tile.STATE_UNAVAILABLE
+ val isFalseTapWhileLocked =
+ !keyguardStateController.isUnlocked &&
+ falsingManager.isFalseTap(FalsingManager.LOW_PENALTY)
+ val handlesLongClick = qsTile?.state?.handlesLongClick == true
+ return if (isTileUnavailable || isFalseTapWhileLocked || !handlesLongClick) {
+ // The click event will not perform an action that resets the state. Therefore, this is
+ // the last opportunity to reset the state back to IDLE.
+ State.IDLE
+ } else {
+ State.CLICKED
}
- return false
}
/**
@@ -194,14 +232,63 @@ constructor(
return true
}
+ fun resetState() = setState(State.IDLE)
+
+ fun createExpandableFromView(view: View) {
+ expandable =
+ object : Expandable {
+ override fun activityTransitionController(
+ launchCujType: Int?,
+ cookie: ActivityTransitionAnimator.TransitionCookie?,
+ component: ComponentName?,
+ returnCujType: Int?,
+ ): ActivityTransitionAnimator.Controller? {
+ val delegatedController =
+ ActivityTransitionAnimator.Controller.fromView(
+ view,
+ launchCujType,
+ cookie,
+ component,
+ returnCujType,
+ )
+ return delegatedController?.let { createTransitionControllerDelegate(it) }
+ }
+
+ override fun dialogTransitionController(
+ cuj: DialogCuj?,
+ ): DialogTransitionAnimator.Controller? =
+ DialogTransitionAnimator.Controller.fromView(view, cuj)
+ }
+ }
+
+ @VisibleForTesting
+ fun createTransitionControllerDelegate(
+ controller: ActivityTransitionAnimator.Controller
+ ): DelegateTransitionAnimatorController {
+ val delegated =
+ object : DelegateTransitionAnimatorController(controller) {
+ override fun onTransitionAnimationCancelled(newKeyguardOccludedState: Boolean?) {
+ if (state == State.LONG_CLICKED) {
+ setState(State.RUNNING_BACKWARDS_FROM_CANCEL)
+ callback?.onReverseAnimator(false)
+ }
+ delegate.onTransitionAnimationCancelled(newKeyguardOccludedState)
+ }
+ }
+ return delegated
+ }
+
enum class State {
IDLE, /* The effect is idle waiting for touch input */
TIMEOUT_WAIT, /* The effect is waiting for a tap timeout period */
RUNNING_FORWARD, /* The effect is running normally */
/* The effect was interrupted by an ACTION_UP and is now running backwards */
RUNNING_BACKWARDS_FROM_UP,
- /* The effect was interrupted by an ACTION_CANCEL and is now running backwards */
+ /* The effect was cancelled by an ACTION_CANCEL or a shade collapse and is now running
+ backwards */
RUNNING_BACKWARDS_FROM_CANCEL,
+ CLICKED, /* The effect has ended with a click */
+ LONG_CLICKED, /* The effect has ended with a long-click */
}
/** Callbacks to notify view and animator actions */
@@ -217,7 +304,7 @@ constructor(
fun onStartAnimator()
/** Reverse the effect animator */
- fun onReverseAnimator()
+ fun onReverseAnimator(playHaptics: Boolean = true)
/** Cancel the effect animator */
fun onCancelAnimator()
diff --git a/packages/SystemUI/src/com/android/systemui/inputdevice/data/repository/InputDeviceRepository.kt b/packages/SystemUI/src/com/android/systemui/inputdevice/data/repository/InputDeviceRepository.kt
new file mode 100644
index 000000000000..3b161b659af9
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/inputdevice/data/repository/InputDeviceRepository.kt
@@ -0,0 +1,95 @@
+/*
+ * 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.inputdevice.data.repository
+
+import android.annotation.SuppressLint
+import android.hardware.input.InputManager
+import android.os.Handler
+import com.android.systemui.common.coroutine.ChannelExt.trySendWithFailureLogging
+import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.dagger.qualifiers.Background
+import com.android.systemui.utils.coroutines.flow.conflatedCallbackFlow
+import javax.inject.Inject
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.channels.SendChannel
+import kotlinx.coroutines.channels.awaitClose
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.SharingStarted
+import kotlinx.coroutines.flow.shareIn
+
+@SysUISingleton
+class InputDeviceRepository
+@Inject
+constructor(
+ @Background private val backgroundHandler: Handler,
+ @Background private val backgroundScope: CoroutineScope,
+ private val inputManager: InputManager
+) {
+
+ sealed interface DeviceChange
+
+ data class DeviceAdded(val deviceId: Int) : DeviceChange
+
+ data object DeviceRemoved : DeviceChange
+
+ data object FreshStart : DeviceChange
+
+ /**
+ * Emits collection of all currently connected keyboards and what was the last [DeviceChange].
+ * It emits collection so that every new subscriber to this SharedFlow can get latest state of
+ * all keyboards. Otherwise we might get into situation where subscriber timing on
+ * initialization matter and later subscriber will only get latest device and will miss all
+ * previous devices.
+ */
+ // TODO(b/351984587): Replace with StateFlow
+ @SuppressLint("SharedFlowCreation")
+ val deviceChange: Flow<Pair<Collection<Int>, DeviceChange>> =
+ conflatedCallbackFlow {
+ var connectedDevices = inputManager.inputDeviceIds.toSet()
+ val listener =
+ object : InputManager.InputDeviceListener {
+ override fun onInputDeviceAdded(deviceId: Int) {
+ connectedDevices = connectedDevices + deviceId
+ sendWithLogging(connectedDevices to DeviceAdded(deviceId))
+ }
+
+ override fun onInputDeviceChanged(deviceId: Int) = Unit
+
+ override fun onInputDeviceRemoved(deviceId: Int) {
+ connectedDevices = connectedDevices - deviceId
+ sendWithLogging(connectedDevices to DeviceRemoved)
+ }
+ }
+ sendWithLogging(connectedDevices to FreshStart)
+ inputManager.registerInputDeviceListener(listener, backgroundHandler)
+ awaitClose { inputManager.unregisterInputDeviceListener(listener) }
+ }
+ .shareIn(
+ scope = backgroundScope,
+ started = SharingStarted.Lazily,
+ replay = 1,
+ )
+
+ private fun <T> SendChannel<T>.sendWithLogging(element: T) {
+ trySendWithFailureLogging(element, TAG)
+ }
+
+ companion object {
+ const val TAG = "InputDeviceRepository"
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/keyboard/data/repository/KeyboardRepository.kt b/packages/SystemUI/src/com/android/systemui/keyboard/data/repository/KeyboardRepository.kt
index 91d528074723..817849c41297 100644
--- a/packages/SystemUI/src/com/android/systemui/keyboard/data/repository/KeyboardRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyboard/data/repository/KeyboardRepository.kt
@@ -21,21 +21,23 @@ import android.hardware.input.InputManager
import android.hardware.input.InputManager.KeyboardBacklightListener
import android.hardware.input.KeyboardBacklightState
import com.android.systemui.common.coroutine.ChannelExt.trySendWithFailureLogging
-import com.android.systemui.common.coroutine.ConflatedCallbackFlow.conflatedCallbackFlow
import com.android.systemui.dagger.SysUISingleton
-import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.dagger.qualifiers.Background
+import com.android.systemui.inputdevice.data.repository.InputDeviceRepository
+import com.android.systemui.inputdevice.data.repository.InputDeviceRepository.DeviceAdded
+import com.android.systemui.inputdevice.data.repository.InputDeviceRepository.DeviceChange
+import com.android.systemui.inputdevice.data.repository.InputDeviceRepository.DeviceRemoved
+import com.android.systemui.inputdevice.data.repository.InputDeviceRepository.FreshStart
import com.android.systemui.keyboard.data.model.Keyboard
import com.android.systemui.keyboard.shared.model.BacklightModel
+import com.android.systemui.utils.coroutines.flow.conflatedCallbackFlow
import java.util.concurrent.Executor
import javax.inject.Inject
import kotlinx.coroutines.CoroutineDispatcher
-import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.FlowPreview
import kotlinx.coroutines.channels.SendChannel
import kotlinx.coroutines.channels.awaitClose
import kotlinx.coroutines.flow.Flow
-import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.asFlow
import kotlinx.coroutines.flow.distinctUntilChanged
import kotlinx.coroutines.flow.emptyFlow
@@ -44,7 +46,6 @@ import kotlinx.coroutines.flow.flowOf
import kotlinx.coroutines.flow.flowOn
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.mapNotNull
-import kotlinx.coroutines.flow.shareIn
/**
* Provides information about physical keyboard states. [CommandLineKeyboardRepository] can be
@@ -71,50 +72,15 @@ interface KeyboardRepository {
class KeyboardRepositoryImpl
@Inject
constructor(
- @Application private val applicationScope: CoroutineScope,
@Background private val backgroundDispatcher: CoroutineDispatcher,
private val inputManager: InputManager,
+ inputDeviceRepository: InputDeviceRepository
) : KeyboardRepository {
- private sealed interface DeviceChange
- private data class DeviceAdded(val deviceId: Int) : DeviceChange
- private object DeviceRemoved : DeviceChange
- private object FreshStart : DeviceChange
-
- /**
- * Emits collection of all currently connected keyboards and what was the last [DeviceChange].
- * It emits collection so that every new subscriber to this SharedFlow can get latest state of
- * all keyboards. Otherwise we might get into situation where subscriber timing on
- * initialization matter and later subscriber will only get latest device and will miss all
- * previous devices.
- */
private val keyboardsChange: Flow<Pair<Collection<Int>, DeviceChange>> =
- conflatedCallbackFlow {
- var connectedDevices = inputManager.inputDeviceIds.toSet()
- val listener =
- object : InputManager.InputDeviceListener {
- override fun onInputDeviceAdded(deviceId: Int) {
- connectedDevices = connectedDevices + deviceId
- sendWithLogging(connectedDevices to DeviceAdded(deviceId))
- }
-
- override fun onInputDeviceChanged(deviceId: Int) = Unit
-
- override fun onInputDeviceRemoved(deviceId: Int) {
- connectedDevices = connectedDevices - deviceId
- sendWithLogging(connectedDevices to DeviceRemoved)
- }
- }
- sendWithLogging(connectedDevices to FreshStart)
- inputManager.registerInputDeviceListener(listener, /* handler= */ null)
- awaitClose { inputManager.unregisterInputDeviceListener(listener) }
- }
- .map { (ids, change) -> ids.filter { id -> isPhysicalFullKeyboard(id) } to change }
- .shareIn(
- scope = applicationScope,
- started = SharingStarted.Lazily,
- replay = 1,
- )
+ inputDeviceRepository.deviceChange.map { (ids, change) ->
+ ids.filter { id -> isPhysicalFullKeyboard(id) } to change
+ }
@FlowPreview
override val newlyConnectedKeyboard: Flow<Keyboard> =
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 6364a6fb53c9..906f600e3826 100644
--- a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/ShortcutHelperModule.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/ShortcutHelperModule.kt
@@ -20,10 +20,14 @@ import android.app.Activity
import com.android.systemui.CoreStartable
import com.android.systemui.Flags.keyboardShortcutHelperRewrite
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
import com.android.systemui.keyboard.shortcut.data.source.InputShortcutsSource
import com.android.systemui.keyboard.shortcut.data.source.KeyboardShortcutGroupsSource
import com.android.systemui.keyboard.shortcut.data.source.MultitaskingShortcutsSource
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.InputShortcuts
import com.android.systemui.keyboard.shortcut.qualifiers.MultitaskingShortcuts
import com.android.systemui.keyboard.shortcut.qualifiers.SystemShortcuts
@@ -53,9 +57,19 @@ interface ShortcutHelperModule {
fun multitaskingShortcutsSource(impl: MultitaskingShortcutsSource): KeyboardShortcutGroupsSource
@Binds
+ @CurrentAppShortcuts
+ fun currentAppShortcutsSource(impl: CurrentAppShortcutsSource): KeyboardShortcutGroupsSource
+
+ @Binds
@InputShortcuts
fun inputShortcutsSources(impl: InputShortcutsSource): KeyboardShortcutGroupsSource
+ @Binds
+ @AppCategoriesShortcuts
+ fun appCategoriesShortcutsSource(
+ impl: AppCategoriesShortcutsSource
+ ): KeyboardShortcutGroupsSource
+
companion object {
@Provides
@IntoMap
diff --git a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/repository/ShortcutHelperCategoriesRepository.kt b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/repository/ShortcutHelperCategoriesRepository.kt
index 133dab6b4d7b..495e8f322f00 100644
--- a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/repository/ShortcutHelperCategoriesRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/repository/ShortcutHelperCategoriesRepository.kt
@@ -17,8 +17,10 @@
package com.android.systemui.keyboard.shortcut.data.repository
import android.content.Context
+import android.graphics.drawable.Icon
import android.hardware.input.InputManager
import android.util.Log
+import android.view.InputDevice
import android.view.KeyCharacterMap
import android.view.KeyEvent
import android.view.KeyboardShortcutGroup
@@ -26,22 +28,31 @@ import android.view.KeyboardShortcutInfo
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Background
import com.android.systemui.keyboard.shortcut.data.source.KeyboardShortcutGroupsSource
+import com.android.systemui.keyboard.shortcut.qualifiers.AppCategoriesShortcuts
+import com.android.systemui.keyboard.shortcut.qualifiers.CurrentAppShortcuts
import com.android.systemui.keyboard.shortcut.qualifiers.InputShortcuts
import com.android.systemui.keyboard.shortcut.qualifiers.MultitaskingShortcuts
import com.android.systemui.keyboard.shortcut.qualifiers.SystemShortcuts
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.IME
-import com.android.systemui.keyboard.shortcut.shared.model.ShortcutCategoryType.MULTI_TASKING
-import com.android.systemui.keyboard.shortcut.shared.model.ShortcutCategoryType.SYSTEM
+import com.android.systemui.keyboard.shortcut.shared.model.ShortcutCategoryType.AppCategories
+import com.android.systemui.keyboard.shortcut.shared.model.ShortcutCategoryType.CurrentApp
+import com.android.systemui.keyboard.shortcut.shared.model.ShortcutCategoryType.InputMethodEditor
+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.ShortcutHelperState.Active
+import com.android.systemui.keyboard.shortcut.shared.model.ShortcutIcon
import com.android.systemui.keyboard.shortcut.shared.model.ShortcutKey
import com.android.systemui.keyboard.shortcut.shared.model.ShortcutSubCategory
import javax.inject.Inject
import kotlinx.coroutines.CoroutineDispatcher
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.map
+import kotlinx.coroutines.flow.stateIn
import kotlinx.coroutines.withContext
@SysUISingleton
@@ -49,10 +60,13 @@ class ShortcutHelperCategoriesRepository
@Inject
constructor(
private val context: Context,
+ @Background private val backgroundScope: CoroutineScope,
@Background private val backgroundDispatcher: CoroutineDispatcher,
@SystemShortcuts private val systemShortcutsSource: KeyboardShortcutGroupsSource,
@MultitaskingShortcuts private val multitaskingShortcutsSource: KeyboardShortcutGroupsSource,
+ @AppCategoriesShortcuts private val appCategoriesShortcutsSource: KeyboardShortcutGroupsSource,
@InputShortcuts private val inputShortcutsSource: KeyboardShortcutGroupsSource,
+ @CurrentAppShortcuts private val currentAppShortcutsSource: KeyboardShortcutGroupsSource,
private val inputManager: InputManager,
stateRepository: ShortcutHelperStateRepository
) {
@@ -66,56 +80,95 @@ constructor(
}
}
- val systemShortcutsCategory =
- activeInputDevice.map {
- if (it != null) {
- toShortcutCategory(
- it.keyCharacterMap,
- SYSTEM,
- systemShortcutsSource.shortcutGroups(it.id)
+ val categories: Flow<List<ShortcutCategory>> =
+ activeInputDevice
+ .map {
+ if (it == null) {
+ return@map emptyList()
+ }
+ return@map listOfNotNull(
+ fetchSystemShortcuts(it),
+ fetchMultiTaskingShortcuts(it),
+ fetchAppCategoriesShortcuts(it),
+ fetchImeShortcuts(it),
+ fetchCurrentAppShortcuts(it),
)
- } else {
- null
}
- }
+ .stateIn(
+ scope = backgroundScope,
+ started = SharingStarted.Lazily,
+ initialValue = emptyList(),
+ )
- val multitaskingShortcutsCategory =
- activeInputDevice.map {
- if (it != null) {
- toShortcutCategory(
- it.keyCharacterMap,
- MULTI_TASKING,
- multitaskingShortcutsSource.shortcutGroups(it.id)
- )
- } else {
- null
- }
+ private suspend fun fetchSystemShortcuts(inputDevice: InputDevice) =
+ toShortcutCategory(
+ inputDevice.keyCharacterMap,
+ System,
+ systemShortcutsSource.shortcutGroups(inputDevice.id),
+ keepIcons = true,
+ )
+
+ private suspend fun fetchMultiTaskingShortcuts(inputDevice: InputDevice) =
+ toShortcutCategory(
+ inputDevice.keyCharacterMap,
+ MultiTasking,
+ multitaskingShortcutsSource.shortcutGroups(inputDevice.id),
+ keepIcons = true,
+ )
+
+ private suspend fun fetchAppCategoriesShortcuts(inputDevice: InputDevice) =
+ toShortcutCategory(
+ inputDevice.keyCharacterMap,
+ AppCategories,
+ appCategoriesShortcutsSource.shortcutGroups(inputDevice.id),
+ keepIcons = true,
+ )
+
+ private suspend fun fetchImeShortcuts(inputDevice: InputDevice) =
+ toShortcutCategory(
+ inputDevice.keyCharacterMap,
+ InputMethodEditor,
+ inputShortcutsSource.shortcutGroups(inputDevice.id),
+ keepIcons = false,
+ )
+
+ private suspend fun fetchCurrentAppShortcuts(inputDevice: InputDevice): ShortcutCategory? {
+ val shortcutGroups = currentAppShortcutsSource.shortcutGroups(inputDevice.id)
+ val categoryType = getCurrentAppShortcutCategoryType(shortcutGroups)
+ return if (categoryType == null) {
+ null
+ } else {
+ toShortcutCategory(
+ inputDevice.keyCharacterMap,
+ categoryType,
+ shortcutGroups,
+ keepIcons = false
+ )
}
+ }
- val imeShortcutsCategory =
- activeInputDevice.map {
- if (it != null) {
- toShortcutCategory(
- it.keyCharacterMap,
- IME,
- inputShortcutsSource.shortcutGroups(it.id)
- )
- } else {
- null
- }
+ private fun getCurrentAppShortcutCategoryType(
+ shortcutGroups: List<KeyboardShortcutGroup>
+ ): ShortcutCategoryType? {
+ return if (shortcutGroups.isEmpty()) {
+ null
+ } else {
+ CurrentApp(packageName = shortcutGroups[0].packageName.toString())
}
+ }
private fun toShortcutCategory(
keyCharacterMap: KeyCharacterMap,
type: ShortcutCategoryType,
shortcutGroups: List<KeyboardShortcutGroup>,
+ keepIcons: Boolean,
): ShortcutCategory? {
val subCategories =
shortcutGroups
.map { shortcutGroup ->
ShortcutSubCategory(
shortcutGroup.label.toString(),
- toShortcuts(keyCharacterMap, shortcutGroup.items)
+ toShortcuts(keyCharacterMap, shortcutGroup.items, keepIcons)
)
}
.filter { it.shortcuts.isNotEmpty() }
@@ -129,16 +182,37 @@ constructor(
private fun toShortcuts(
keyCharacterMap: KeyCharacterMap,
- infoList: List<KeyboardShortcutInfo>
- ) = infoList.mapNotNull { toShortcut(keyCharacterMap, it) }
+ infoList: List<KeyboardShortcutInfo>,
+ keepIcons: Boolean,
+ ) = infoList.mapNotNull { toShortcut(keyCharacterMap, it, keepIcons) }
private fun toShortcut(
keyCharacterMap: KeyCharacterMap,
- shortcutInfo: KeyboardShortcutInfo
+ shortcutInfo: KeyboardShortcutInfo,
+ keepIcon: Boolean,
): Shortcut? {
- val shortcutCommand = toShortcutCommand(keyCharacterMap, shortcutInfo)
- return if (shortcutCommand == null) null
- else Shortcut(label = shortcutInfo.label!!.toString(), commands = listOf(shortcutCommand))
+ val shortcutCommand = toShortcutCommand(keyCharacterMap, shortcutInfo) ?: return null
+ return Shortcut(
+ label = shortcutInfo.label!!.toString(),
+ icon = toShortcutIcon(keepIcon, shortcutInfo),
+ commands = listOf(shortcutCommand)
+ )
+ }
+
+ private fun toShortcutIcon(
+ keepIcon: Boolean,
+ shortcutInfo: KeyboardShortcutInfo
+ ): ShortcutIcon? {
+ if (!keepIcon) {
+ return null
+ }
+ val icon = shortcutInfo.icon ?: return null
+ // For now only keep icons of type resource, which is what the "default apps" shortcuts
+ // provide.
+ if (icon.type != Icon.TYPE_RESOURCE || icon.resPackage.isNullOrEmpty() || icon.resId <= 0) {
+ return null
+ }
+ return ShortcutIcon(packageName = icon.resPackage, resourceId = icon.resId)
}
private fun toShortcutCommand(
@@ -159,7 +233,7 @@ constructor(
Log.wtf(TAG, "Unsupported modifiers remaining: $remainingModifiers")
return null
}
- if (info.keycode != 0) {
+ if (info.keycode != 0 || info.baseCharacter > Char.MIN_VALUE) {
keys += toShortcutKey(keyCharacterMap, info.keycode, info.baseCharacter) ?: return null
}
if (keys.isEmpty()) {
@@ -179,7 +253,7 @@ constructor(
return ShortcutKey.Icon(iconResId)
}
if (baseCharacter > Char.MIN_VALUE) {
- return ShortcutKey.Text(baseCharacter.toString())
+ return ShortcutKey.Text(baseCharacter.uppercase())
}
val specialKeyLabel = ShortcutHelperKeys.specialKeyLabels[keyCode]
if (specialKeyLabel != 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 0aced8c95662..cbe6fc7c6026 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
@@ -222,7 +222,7 @@ object ShortcutHelperKeys {
{ context ->
context.getString(R.string.keyboard_key_forward_del)
},
- KEYCODE_ESCAPE to { "Esc" },
+ KEYCODE_ESCAPE to { context -> context.getString(R.string.keyboard_key_esc) },
KEYCODE_SYSRQ to { "SysRq" },
KEYCODE_BREAK to { "Break" },
KEYCODE_SCROLL_LOCK to { "Scroll Lock" },
diff --git a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/source/AppCategoriesShortcutsSource.kt b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/source/AppCategoriesShortcutsSource.kt
new file mode 100644
index 000000000000..d6c6d5b3a83c
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/source/AppCategoriesShortcutsSource.kt
@@ -0,0 +1,44 @@
+/*
+ * 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.data.source
+
+import android.view.KeyboardShortcutGroup
+import android.view.WindowManager
+import com.android.systemui.dagger.qualifiers.Background
+import com.android.systemui.keyboard.shortcut.extensions.copy
+import javax.inject.Inject
+import kotlinx.coroutines.CoroutineDispatcher
+import kotlinx.coroutines.withContext
+
+class AppCategoriesShortcutsSource
+@Inject
+constructor(
+ private val windowManager: WindowManager,
+ @Background private val backgroundDispatcher: CoroutineDispatcher,
+) : KeyboardShortcutGroupsSource {
+
+ override suspend fun shortcutGroups(deviceId: Int): List<KeyboardShortcutGroup> =
+ withContext(backgroundDispatcher) {
+ val group = windowManager.getApplicationLaunchKeyboardShortcuts(deviceId)
+ return@withContext if (group == null) {
+ emptyList()
+ } else {
+ val sortedShortcutItems = group.items.sortedBy { it.label!!.toString().lowercase() }
+ listOf(group.copy(items = sortedShortcutItems))
+ }
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/source/CurrentAppShortcutsSource.kt b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/source/CurrentAppShortcutsSource.kt
new file mode 100644
index 000000000000..7e6ed19d6070
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/source/CurrentAppShortcutsSource.kt
@@ -0,0 +1,34 @@
+/*
+ * 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.data.source
+
+import android.view.KeyboardShortcutGroup
+import android.view.WindowManager
+import android.view.WindowManager.KeyboardShortcutsReceiver
+import javax.inject.Inject
+import kotlinx.coroutines.suspendCancellableCoroutine
+
+class CurrentAppShortcutsSource @Inject constructor(private val windowManager: WindowManager) :
+ KeyboardShortcutGroupsSource {
+ override suspend fun shortcutGroups(deviceId: Int): List<KeyboardShortcutGroup> =
+ suspendCancellableCoroutine { continuation ->
+ val shortcutsReceiver = KeyboardShortcutsReceiver {
+ continuation.resumeWith(Result.success(it ?: emptyList()))
+ }
+ windowManager.requestAppKeyboardShortcuts(shortcutsReceiver, deviceId)
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/source/InputShortcutsSource.kt b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/source/InputShortcutsSource.kt
index aba441546e35..1b2098650278 100644
--- a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/source/InputShortcutsSource.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/data/source/InputShortcutsSource.kt
@@ -59,7 +59,7 @@ constructor(@Main private val resources: Resources, private val windowManager: W
private suspend fun getImeShortcutGroup(deviceId: Int): List<KeyboardShortcutGroup> =
suspendCancellableCoroutine { continuation ->
val shortcutsReceiver = KeyboardShortcutsReceiver {
- continuation.resumeWith(Result.success(it))
+ continuation.resumeWith(Result.success(it ?: emptyList()))
}
windowManager.requestImeKeyboardShortcuts(shortcutsReceiver, deviceId)
}
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 ead10e5be4e1..6f19561dd87b 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
@@ -23,7 +23,6 @@ import com.android.systemui.keyboard.shortcut.shared.model.ShortcutCategory
import com.android.systemui.keyboard.shortcut.shared.model.ShortcutSubCategory
import javax.inject.Inject
import kotlinx.coroutines.flow.Flow
-import kotlinx.coroutines.flow.combine
import kotlinx.coroutines.flow.map
@SysUISingleton
@@ -33,14 +32,9 @@ constructor(
categoriesRepository: ShortcutHelperCategoriesRepository,
) {
- private val systemsShortcutCategory = categoriesRepository.systemShortcutsCategory
- private val multitaskingShortcutsCategory = categoriesRepository.multitaskingShortcutsCategory
- private val imeShortcutsCategory = categoriesRepository.imeShortcutsCategory
-
val shortcutCategories: Flow<List<ShortcutCategory>> =
- combine(systemsShortcutCategory, multitaskingShortcutsCategory, imeShortcutsCategory) {
- shortcutCategories ->
- shortcutCategories.filterNotNull().map { groupSubCategoriesInCategory(it) }
+ categoriesRepository.categories.map { categories ->
+ categories.map { category -> groupSubCategoriesInCategory(category) }
}
private fun groupSubCategoriesInCategory(shortcutCategory: ShortcutCategory): ShortcutCategory {
@@ -62,6 +56,10 @@ constructor(
.groupBy { it.label }
.entries
.map { (commonLabel, groupedShortcuts) ->
- Shortcut(label = commonLabel, commands = groupedShortcuts.flatMap { it.commands })
+ Shortcut(
+ label = commonLabel,
+ icon = groupedShortcuts.firstOrNull()?.icon,
+ commands = groupedShortcuts.flatMap { it.commands }
+ )
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/extensions/KeyboardShortcutGroupExtensions.kt b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/extensions/KeyboardShortcutGroupExtensions.kt
new file mode 100644
index 000000000000..3a120bdcc9c0
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/extensions/KeyboardShortcutGroupExtensions.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.systemui.keyboard.shortcut.extensions
+
+import android.view.KeyboardShortcutGroup
+import android.view.KeyboardShortcutInfo
+
+fun KeyboardShortcutGroup.copy(
+ label: CharSequence = getLabel(),
+ items: List<KeyboardShortcutInfo> = getItems(),
+ isSystemGroup: Boolean = isSystemGroup(),
+ packageName: CharSequence? = getPackageName(),
+) = KeyboardShortcutGroup(label, items, isSystemGroup).also { it.packageName = packageName }
diff --git a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/qualifiers/AppCategoriesShortcuts.kt b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/qualifiers/AppCategoriesShortcuts.kt
new file mode 100644
index 000000000000..b105ff67beaa
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/qualifiers/AppCategoriesShortcuts.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 AppCategoriesShortcuts
diff --git a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/qualifiers/CurrentAppShortcuts.kt b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/qualifiers/CurrentAppShortcuts.kt
new file mode 100644
index 000000000000..51631b11b27c
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/qualifiers/CurrentAppShortcuts.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 CurrentAppShortcuts
diff --git a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/shared/model/Shortcut.kt b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/shared/model/Shortcut.kt
index adc6d952f2c3..5f8570cba7a6 100644
--- a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/shared/model/Shortcut.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/shared/model/Shortcut.kt
@@ -16,7 +16,11 @@
package com.android.systemui.keyboard.shortcut.shared.model
-data class Shortcut(val label: String, val commands: List<ShortcutCommand>)
+data class Shortcut(
+ val label: String,
+ val commands: List<ShortcutCommand>,
+ val icon: ShortcutIcon? = null,
+)
class ShortcutBuilder(private val label: String) {
val commands = mutableListOf<ShortcutCommand>()
diff --git a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/shared/model/ShortcutCategory.kt b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/shared/model/ShortcutCategory.kt
index 5d0535905540..4eabefcd2d41 100644
--- a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/shared/model/ShortcutCategory.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/shared/model/ShortcutCategory.kt
@@ -16,10 +16,16 @@
package com.android.systemui.keyboard.shortcut.shared.model
-enum class ShortcutCategoryType {
- SYSTEM,
- MULTI_TASKING,
- IME
+sealed interface ShortcutCategoryType {
+ data object System : ShortcutCategoryType
+
+ data object MultiTasking : ShortcutCategoryType
+
+ data object InputMethodEditor : ShortcutCategoryType
+
+ data object AppCategories : ShortcutCategoryType
+
+ data class CurrentApp(val packageName: String) : ShortcutCategoryType
}
data class ShortcutCategory(
diff --git a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/shared/model/ShortcutIcon.kt b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/shared/model/ShortcutIcon.kt
new file mode 100644
index 000000000000..8b720a5a44eb
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/shared/model/ShortcutIcon.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 ShortcutIcon(val packageName: String, val resourceId: 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 b703892c2fa7..869f00cae08e 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
@@ -16,8 +16,13 @@
package com.android.systemui.keyboard.shortcut.ui.composable
+import android.content.Context
+import android.content.pm.PackageManager.NameNotFoundException
+import android.graphics.drawable.Icon
+import android.util.Log
import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.core.animateFloatAsState
+import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
@@ -43,6 +48,7 @@ import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.OpenInNew
+import androidx.compose.material.icons.filled.Apps
import androidx.compose.material.icons.filled.ExpandMore
import androidx.compose.material.icons.filled.Keyboard
import androidx.compose.material.icons.filled.Search
@@ -52,6 +58,7 @@ import androidx.compose.material3.CenterAlignedTopAppBar
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Icon
+import androidx.compose.material3.LocalContentColor
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.NavigationDrawerItemColors
import androidx.compose.material3.NavigationDrawerItemDefaults
@@ -63,18 +70,21 @@ import androidx.compose.material3.TopAppBarDefaults
import androidx.compose.material3.windowsizeclass.WindowHeightSizeClass
import androidx.compose.material3.windowsizeclass.WindowWidthSizeClass
import androidx.compose.runtime.Composable
+import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
+import androidx.compose.ui.focus.FocusRequester
+import androidx.compose.ui.focus.focusRequester
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.RectangleShape
import androidx.compose.ui.graphics.Shape
import androidx.compose.ui.graphics.graphicsLayer
-import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.input.nestedscroll.nestedScroll
+import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.rememberNestedScrollInteropConnection
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
@@ -86,15 +96,19 @@ import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.compose.ui.util.fastForEach
import androidx.compose.ui.util.fastForEachIndexed
+import com.android.compose.ui.graphics.painter.rememberDrawablePainter
import com.android.compose.windowsizeclass.LocalWindowSizeClass
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.ShortcutCommand
+import com.android.systemui.keyboard.shortcut.shared.model.ShortcutIcon
import com.android.systemui.keyboard.shortcut.shared.model.ShortcutKey
import com.android.systemui.keyboard.shortcut.shared.model.ShortcutSubCategory
+import com.android.systemui.keyboard.shortcut.ui.model.IconSource
import com.android.systemui.keyboard.shortcut.ui.model.ShortcutsUiState
import com.android.systemui.res.R
+import com.android.systemui.statusbar.phone.CentralSurfaces
@Composable
fun ShortcutHelper(
@@ -109,6 +123,7 @@ fun ShortcutHelper(
ShortcutHelperSinglePane(
modifier,
shortcutsUiState.shortcutCategories,
+ shortcutsUiState.defaultSelectedCategory,
onKeyboardSettingsClicked
)
} else {
@@ -135,6 +150,7 @@ private fun shouldUseSinglePane() =
private fun ShortcutHelperSinglePane(
modifier: Modifier = Modifier,
categories: List<ShortcutCategory>,
+ defaultSelectedCategory: ShortcutCategoryType,
onKeyboardSettingsClicked: () -> Unit,
) {
Column(
@@ -148,7 +164,7 @@ private fun ShortcutHelperSinglePane(
Spacer(modifier = Modifier.height(6.dp))
ShortcutsSearchBar()
Spacer(modifier = Modifier.height(16.dp))
- CategoriesPanelSinglePane(categories)
+ CategoriesPanelSinglePane(categories, defaultSelectedCategory)
Spacer(modifier = Modifier.weight(1f))
KeyboardSettings(onClick = onKeyboardSettingsClicked)
}
@@ -157,8 +173,10 @@ private fun ShortcutHelperSinglePane(
@Composable
private fun CategoriesPanelSinglePane(
categories: List<ShortcutCategory>,
+ defaultSelectedCategory: ShortcutCategoryType,
) {
- var expandedCategory by remember { mutableStateOf<ShortcutCategory?>(null) }
+ val selectedCategory = categories.firstOrNull { it.type == defaultSelectedCategory }
+ var expandedCategory by remember { mutableStateOf(selectedCategory) }
Column(verticalArrangement = Arrangement.spacedBy(2.dp)) {
categories.fastForEachIndexed { index, category ->
val isExpanded = expandedCategory == category
@@ -204,9 +222,9 @@ private fun CategoryItemSinglePane(
verticalAlignment = Alignment.CenterVertically,
modifier = Modifier.fillMaxWidth().heightIn(min = 88.dp).padding(horizontal = 16.dp)
) {
- Icon(category.icon, contentDescription = null)
+ ShortcutCategoryIcon(category.icon)
Spacer(modifier = Modifier.width(16.dp))
- Text(stringResource(category.labelResId))
+ Text(category.label(LocalContext.current))
Spacer(modifier = Modifier.weight(1f))
RotatingExpandCollapseIcon(isExpanded)
}
@@ -215,21 +233,67 @@ private fun CategoryItemSinglePane(
}
}
-private val ShortcutCategory.icon: ImageVector
+private val ShortcutCategory.icon: IconSource
+ @Composable
get() =
when (type) {
- ShortcutCategoryType.SYSTEM -> Icons.Default.Tv
- ShortcutCategoryType.MULTI_TASKING -> Icons.Default.VerticalSplit
- ShortcutCategoryType.IME -> Icons.Default.Keyboard
+ ShortcutCategoryType.System -> IconSource(imageVector = Icons.Default.Tv)
+ ShortcutCategoryType.MultiTasking ->
+ IconSource(imageVector = Icons.Default.VerticalSplit)
+ ShortcutCategoryType.InputMethodEditor ->
+ IconSource(imageVector = Icons.Default.Keyboard)
+ ShortcutCategoryType.AppCategories -> IconSource(imageVector = Icons.Default.Apps)
+ is ShortcutCategoryType.CurrentApp -> {
+ val context = LocalContext.current
+ val iconDrawable = context.packageManager.getApplicationIcon(type.packageName)
+ IconSource(painter = rememberDrawablePainter(drawable = iconDrawable))
+ }
}
-private val ShortcutCategory.labelResId: Int
- get() =
- when (type) {
- ShortcutCategoryType.SYSTEM -> R.string.shortcut_helper_category_system
- ShortcutCategoryType.MULTI_TASKING -> R.string.shortcut_helper_category_multitasking
- ShortcutCategoryType.IME -> R.string.shortcut_helper_category_input
- }
+@Composable
+fun ShortcutCategoryIcon(
+ source: IconSource,
+ contentDescription: String? = null,
+ modifier: Modifier = Modifier,
+ tint: Color = LocalContentColor.current
+) {
+ if (source.imageVector != null) {
+ Icon(source.imageVector, contentDescription, modifier, tint)
+ } else if (source.painter != null) {
+ Image(source.painter, contentDescription, modifier)
+ }
+}
+
+private fun ShortcutCategory.label(context: Context): String =
+ when (type) {
+ ShortcutCategoryType.System -> context.getString(R.string.shortcut_helper_category_system)
+ ShortcutCategoryType.MultiTasking ->
+ context.getString(R.string.shortcut_helper_category_multitasking)
+ ShortcutCategoryType.InputMethodEditor ->
+ context.getString(R.string.shortcut_helper_category_input)
+ ShortcutCategoryType.AppCategories ->
+ context.getString(R.string.shortcut_helper_category_app_shortcuts)
+ is ShortcutCategoryType.CurrentApp -> getApplicationLabelForCurrentApp(type, context)
+ }
+
+private fun getApplicationLabelForCurrentApp(
+ type: ShortcutCategoryType.CurrentApp,
+ context: Context
+): String {
+ val packageManagerForUser = CentralSurfaces.getPackageManagerForUser(context, context.userId)
+ return try {
+ val currentAppInfo =
+ packageManagerForUser.getApplicationInfoAsUser(
+ type.packageName,
+ /* flags = */ 0,
+ context.userId
+ )
+ packageManagerForUser.getApplicationLabel(currentAppInfo).toString()
+ } catch (e: NameNotFoundException) {
+ Log.wtf(ShortcutHelper.TAG, "Couldn't find app info by package name ${type.packageName}")
+ context.getString(R.string.shortcut_helper_category_current_app_shortcuts)
+ }
+}
@Composable
private fun RotatingExpandCollapseIcon(isExpanded: Boolean) {
@@ -359,10 +423,21 @@ private fun SubCategoryTitle(title: String) {
@Composable
private fun ShortcutViewDualPane(shortcut: Shortcut) {
Row(Modifier.padding(vertical = 16.dp)) {
- ShortcutDescriptionText(
+ Row(
modifier = Modifier.width(160.dp).align(Alignment.CenterVertically),
- shortcut = shortcut,
- )
+ horizontalArrangement = Arrangement.spacedBy(16.dp),
+ verticalAlignment = Alignment.CenterVertically,
+ ) {
+ if (shortcut.icon != null) {
+ ShortcutIcon(
+ shortcut.icon,
+ modifier = Modifier.size(36.dp),
+ )
+ }
+ ShortcutDescriptionText(
+ shortcut = shortcut,
+ )
+ }
Spacer(modifier = Modifier.width(16.dp))
ShortcutKeyCombinations(
modifier = Modifier.weight(1f),
@@ -371,6 +446,24 @@ private fun ShortcutViewDualPane(shortcut: Shortcut) {
}
}
+@Composable
+fun ShortcutIcon(
+ icon: ShortcutIcon,
+ modifier: Modifier = Modifier,
+ contentDescription: String? = null,
+) {
+ val context = LocalContext.current
+ val drawable =
+ remember(icon.packageName, icon.resourceId) {
+ Icon.createWithResource(icon.packageName, icon.resourceId).loadDrawable(context)
+ } ?: return
+ Image(
+ painter = rememberDrawablePainter(drawable),
+ contentDescription = contentDescription,
+ modifier = modifier,
+ )
+}
+
@OptIn(ExperimentalLayoutApi::class)
@Composable
private fun ShortcutKeyCombinations(
@@ -488,8 +581,8 @@ private fun CategoriesPanelTwoPane(
Column {
categories.fastForEach {
CategoryItemTwoPane(
- label = stringResource(it.labelResId),
- icon = it.icon,
+ label = it.label(LocalContext.current),
+ iconSource = it.icon,
selected = selectedCategory == it.type,
onClick = { onCategoryClicked(it) }
)
@@ -500,7 +593,7 @@ private fun CategoriesPanelTwoPane(
@Composable
private fun CategoryItemTwoPane(
label: String,
- icon: ImageVector,
+ iconSource: IconSource,
selected: Boolean,
onClick: () -> Unit,
colors: NavigationDrawerItemColors =
@@ -514,9 +607,9 @@ private fun CategoryItemTwoPane(
color = colors.containerColor(selected).value,
) {
Row(Modifier.padding(horizontal = 24.dp), verticalAlignment = Alignment.CenterVertically) {
- Icon(
+ ShortcutCategoryIcon(
modifier = Modifier.size(24.dp),
- imageVector = icon,
+ source = iconSource,
contentDescription = null,
tint = colors.iconColor(selected).value
)
@@ -552,8 +645,10 @@ private fun TitleBar() {
@OptIn(ExperimentalMaterial3Api::class)
private fun ShortcutsSearchBar() {
var query by remember { mutableStateOf("") }
+ val focusRequester = remember { FocusRequester() }
+ LaunchedEffect(Unit) { focusRequester.requestFocus() }
SearchBar(
- modifier = Modifier.fillMaxWidth(),
+ modifier = Modifier.fillMaxWidth().focusRequester(focusRequester),
colors = SearchBarDefaults.colors(containerColor = MaterialTheme.colorScheme.surfaceBright),
query = query,
active = false,
@@ -612,4 +707,6 @@ object ShortcutHelper {
object Dimensions {
val SinglePaneCategoryCornerRadius = 28.dp
}
+
+ internal const val TAG = "ShortcutHelperUI"
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/ui/model/IconSource.kt b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/ui/model/IconSource.kt
new file mode 100644
index 000000000000..7fc0103d861f
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/keyboard/shortcut/ui/model/IconSource.kt
@@ -0,0 +1,22 @@
+/*
+ * 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.ui.model
+
+import androidx.compose.ui.graphics.painter.Painter
+import androidx.compose.ui.graphics.vector.ImageVector
+
+data class IconSource(val imageVector: ImageVector? = null, val painter: Painter? = null)
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 e602cad30daa..25574ea551b4 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
@@ -19,7 +19,9 @@ package com.android.systemui.keyboard.shortcut.ui.viewmodel
import com.android.systemui.dagger.qualifiers.Background
import com.android.systemui.keyboard.shortcut.domain.interactor.ShortcutHelperCategoriesInteractor
import com.android.systemui.keyboard.shortcut.domain.interactor.ShortcutHelperStateInteractor
-import com.android.systemui.keyboard.shortcut.shared.model.ShortcutHelperState
+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.CurrentApp
import com.android.systemui.keyboard.shortcut.ui.model.ShortcutsUiState
import javax.inject.Inject
import kotlinx.coroutines.CoroutineDispatcher
@@ -40,8 +42,8 @@ constructor(
) {
val shouldShow =
- stateInteractor.state
- .map { it is ShortcutHelperState.Active }
+ categoriesInteractor.shortcutCategories
+ .map { it.isNotEmpty() }
.distinctUntilChanged()
.flowOn(backgroundDispatcher)
@@ -53,7 +55,7 @@ constructor(
} else {
ShortcutsUiState.Active(
shortcutCategories = it,
- defaultSelectedCategory = it.first().type,
+ defaultSelectedCategory = getDefaultSelectedCategory(it),
)
}
}
@@ -63,6 +65,13 @@ constructor(
initialValue = ShortcutsUiState.Inactive
)
+ private fun getDefaultSelectedCategory(
+ categories: List<ShortcutCategory>
+ ): ShortcutCategoryType {
+ val currentAppShortcuts = categories.firstOrNull { it.type is CurrentApp }
+ return currentAppShortcuts?.type ?: categories.first().type
+ }
+
fun onViewClosed() {
stateInteractor.onViewClosed()
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardService.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardService.java
index c4b70d8013bf..9f3311373709 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardService.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardService.java
@@ -81,6 +81,7 @@ import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.flags.FeatureFlags;
import com.android.systemui.keyguard.domain.interactor.KeyguardEnabledInteractor;
import com.android.systemui.keyguard.domain.interactor.KeyguardInteractor;
+import com.android.systemui.keyguard.domain.interactor.KeyguardWakeDirectlyToGoneInteractor;
import com.android.systemui.keyguard.ui.binder.KeyguardSurfaceBehindParamsApplier;
import com.android.systemui.keyguard.ui.binder.KeyguardSurfaceBehindViewBinder;
import com.android.systemui.keyguard.ui.binder.WindowManagerLockscreenVisibilityViewBinder;
@@ -317,7 +318,7 @@ public class KeyguardService extends Service {
private final WindowManagerOcclusionManager mWmOcclusionManager;
private final KeyguardEnabledInteractor mKeyguardEnabledInteractor;
-
+ private final KeyguardWakeDirectlyToGoneInteractor mKeyguardWakeDirectlyToGoneInteractor;
private final Lazy<FoldGracePeriodProvider> mFoldGracePeriodProvider = new Lazy<>() {
@Override
public FoldGracePeriodProvider get() {
@@ -344,7 +345,8 @@ public class KeyguardService extends Service {
@Main Executor mainExecutor,
KeyguardInteractor keyguardInteractor,
KeyguardEnabledInteractor keyguardEnabledInteractor,
- Lazy<KeyguardStateCallbackStartable> keyguardStateCallbackStartableLazy) {
+ Lazy<KeyguardStateCallbackStartable> keyguardStateCallbackStartableLazy,
+ KeyguardWakeDirectlyToGoneInteractor keyguardWakeDirectlyToGoneInteractor) {
super();
mKeyguardViewMediator = keyguardViewMediator;
mKeyguardLifecyclesDispatcher = keyguardLifecyclesDispatcher;
@@ -372,6 +374,7 @@ public class KeyguardService extends Service {
mWmOcclusionManager = windowManagerOcclusionManager;
mKeyguardEnabledInteractor = keyguardEnabledInteractor;
+ mKeyguardWakeDirectlyToGoneInteractor = keyguardWakeDirectlyToGoneInteractor;
}
@Override
@@ -486,6 +489,7 @@ public class KeyguardService extends Service {
public void onDreamingStarted() {
trace("onDreamingStarted");
checkPermission();
+ mKeyguardWakeDirectlyToGoneInteractor.onDreamingStarted();
mKeyguardInteractor.setDreaming(true);
mKeyguardViewMediator.onDreamingStarted();
}
@@ -494,6 +498,7 @@ public class KeyguardService extends Service {
public void onDreamingStopped() {
trace("onDreamingStopped");
checkPermission();
+ mKeyguardWakeDirectlyToGoneInteractor.onDreamingStopped();
mKeyguardInteractor.setDreaming(false);
mKeyguardViewMediator.onDreamingStopped();
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt
index b32d0950e0d2..d1a84632e0eb 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt
@@ -103,14 +103,14 @@ const val DISMISS_AMOUNT_EXIT_KEYGUARD_THRESHOLD = 0.3f
* swiped away via a touch gesture, or when it's flinging expanded/collapsed after a swipe.
*/
const val LEGACY_UNLOCK_ANIMATION_DURATION_MS = 200L
-const val UNLOCK_ANIMATION_DURATION_MS = 167L
+const val UNLOCK_ANIMATION_DURATION_MS = 300L
/**
* If there are two different wallpapers on home and lock screen, duration and delay of the lock
* wallpaper fade out.
*/
-const val LOCK_WALLPAPER_FADE_OUT_DURATION = 140L
-const val LOCK_WALLPAPER_FADE_OUT_START_DELAY = 0L
+const val LOCK_WALLPAPER_FADE_OUT_DURATION = 150L
+const val LOCK_WALLPAPER_FADE_OUT_START_DELAY = 150L
/**
* How long the in-window launcher icon animation takes. This is used if the launcher is underneath
@@ -167,7 +167,7 @@ class KeyguardUnlockAnimationController @Inject constructor(
private val statusBarStateController: SysuiStatusBarStateController,
private val notificationShadeWindowController: NotificationShadeWindowController,
private val powerManager: PowerManager,
- private val wallpaperManager: WallpaperManager
+ private val wallpaperManager: WallpaperManager,
) : KeyguardStateController.Callback, ISysuiUnlockAnimationController.Stub() {
interface KeyguardUnlockAnimationListener {
@@ -380,7 +380,6 @@ class KeyguardUnlockAnimationController @Inject constructor(
else LAUNCHER_ICONS_ANIMATION_DURATION_MS
interpolator = if (fasterUnlockTransition()) Interpolators.LINEAR
else Interpolators.ALPHA_OUT
- if (fasterUnlockTransition()) startDelay = CANNED_UNLOCK_START_DELAY
addUpdateListener { valueAnimator: ValueAnimator ->
setWallpaperAppearAmount(
valueAnimator.animatedValue as Float, openingWallpaperTargets)
@@ -647,14 +646,12 @@ class KeyguardUnlockAnimationController @Inject constructor(
val isWakeAndUnlockNotFromDream = biometricUnlockControllerLazy.get().isWakeAndUnlock &&
biometricUnlockControllerLazy.get().mode != MODE_WAKE_AND_UNLOCK_FROM_DREAM
- val duration = if (fasterUnlockTransition()) UNLOCK_ANIMATION_DURATION_MS
- else LAUNCHER_ICONS_ANIMATION_DURATION_MS
listeners.forEach {
it.onUnlockAnimationStarted(
playingCannedUnlockAnimation /* playingCannedAnimation */,
isWakeAndUnlockNotFromDream /* isWakeAndUnlockNotFromDream */,
cannedUnlockStartDelayMs() /* unlockStartDelay */,
- duration /* unlockAnimationDuration */) }
+ LAUNCHER_ICONS_ANIMATION_DURATION_MS /* unlockAnimationDuration */) }
// Finish the keyguard remote animation if the dismiss amount has crossed the threshold.
// Check it here in case there is no more change to the dismiss amount after the last change
@@ -746,6 +743,10 @@ class KeyguardUnlockAnimationController @Inject constructor(
// As soon as the shade starts animating out of the way, start the canned unlock animation,
// which will finish keyguard exit when it completes. The in-window animations in the
// Launcher window will end on their own.
+ if (fasterUnlockTransition() && openingWallpaperTargets?.isNotEmpty() == true) {
+ fadeOutWallpaper()
+ }
+
handler.postDelayed({
if (keyguardViewMediator.get().isShowingAndNotOccluded &&
!keyguardStateController.isKeyguardGoingAway) {
@@ -754,9 +755,8 @@ class KeyguardUnlockAnimationController @Inject constructor(
return@postDelayed
}
- if ((openingWallpaperTargets?.isNotEmpty() == true)) {
+ if (openingWallpaperTargets?.isNotEmpty() == true) {
fadeInWallpaper()
- if (fasterUnlockTransition()) fadeOutWallpaper()
hideKeyguardViewAfterRemoteAnimation()
} else {
keyguardViewMediator.get().exitKeyguardAndFinishSurfaceBehindRemoteAnimation(
@@ -1038,6 +1038,7 @@ class KeyguardUnlockAnimationController @Inject constructor(
surfaceBehindAlphaAnimator.cancel()
surfaceBehindEntryAnimator.cancel()
wallpaperCannedUnlockAnimator.cancel()
+ if (fasterUnlockTransition()) wallpaperFadeOutUnlockAnimator.cancel()
// That target is no longer valid since the animation finished, null it out.
surfaceBehindRemoteAnimationTargets = null
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewConfigurator.kt b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewConfigurator.kt
index 608e25a82eff..80cf4c50866c 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewConfigurator.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewConfigurator.kt
@@ -21,6 +21,7 @@ import android.content.Context
import android.view.LayoutInflater
import android.view.View
import androidx.compose.foundation.layout.fillMaxSize
+import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.ComposeView
import androidx.constraintlayout.widget.ConstraintSet
@@ -29,9 +30,9 @@ import androidx.constraintlayout.widget.ConstraintSet.END
import androidx.constraintlayout.widget.ConstraintSet.PARENT_ID
import androidx.constraintlayout.widget.ConstraintSet.START
import androidx.constraintlayout.widget.ConstraintSet.TOP
+import com.android.compose.animation.scene.MutableSceneTransitionLayoutState
import com.android.compose.animation.scene.SceneKey
import com.android.compose.animation.scene.SceneTransitionLayout
-import com.android.compose.animation.scene.transitions
import com.android.internal.jank.InteractionJankMonitor
import com.android.keyguard.KeyguardStatusView
import com.android.keyguard.KeyguardStatusViewController
@@ -42,6 +43,7 @@ import com.android.systemui.CoreStartable
import com.android.systemui.biometrics.ui.binder.DeviceEntryUnlockTrackerViewBinder
import com.android.systemui.common.ui.ConfigurationState
import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.dagger.qualifiers.Main
import com.android.systemui.deviceentry.domain.interactor.DeviceEntryHapticsInteractor
import com.android.systemui.deviceentry.shared.DeviceEntryUdfpsRefactor
import com.android.systemui.keyguard.domain.interactor.KeyguardClockInteractor
@@ -73,6 +75,7 @@ import com.android.systemui.temporarydisplay.chipbar.ChipbarCoordinator
import dagger.Lazy
import java.util.Optional
import javax.inject.Inject
+import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.DisposableHandle
import kotlinx.coroutines.ExperimentalCoroutinesApi
@@ -108,11 +111,11 @@ constructor(
private val clockInteractor: KeyguardClockInteractor,
private val keyguardViewMediator: KeyguardViewMediator,
private val deviceEntryUnlockTrackerViewBinder: Optional<DeviceEntryUnlockTrackerViewBinder>,
+ @Main private val mainDispatcher: CoroutineDispatcher,
) : CoreStartable {
private var rootViewHandle: DisposableHandle? = null
private var indicationAreaHandle: DisposableHandle? = null
- private val sceneKey = SceneKey("root-view-scene-key")
var keyguardStatusViewController: KeyguardStatusViewController? = null
get() {
@@ -215,6 +218,7 @@ constructor(
vibratorHelper,
falsingManager,
keyguardViewMediator,
+ mainDispatcher,
)
}
@@ -229,12 +233,10 @@ constructor(
setContent {
// STL is used solely to provide a SceneScope to enable us to invoke SceneScope
// composables.
- SceneTransitionLayout(
- currentScene = sceneKey,
- onChangeScene = {},
- transitions = transitions {},
- ) {
- scene(sceneKey) {
+ val currentScene = remember { SceneKey("root-view-scene-key") }
+ val state = remember { MutableSceneTransitionLayoutState(currentScene) }
+ SceneTransitionLayout(state) {
+ scene(currentScene) {
with(
LockscreenContent(
viewModel = viewModel,
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
index 1ea5d1c00561..e46a7cbf9bb0 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
@@ -78,7 +78,6 @@ import android.os.Looper;
import android.os.Message;
import android.os.PowerManager;
import android.os.RemoteException;
-import android.os.ServiceManager;
import android.os.SystemProperties;
import android.os.Trace;
import android.os.UserHandle;
@@ -151,6 +150,7 @@ import com.android.systemui.keyguard.shared.model.TransitionStep;
import com.android.systemui.log.SessionTracker;
import com.android.systemui.navigationbar.NavigationModeController;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
+import com.android.systemui.process.ProcessWrapper;
import com.android.systemui.res.R;
import com.android.systemui.scene.shared.flag.SceneContainerFlag;
import com.android.systemui.settings.UserTracker;
@@ -360,6 +360,7 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
private final SecureSettings mSecureSettings;
private final SystemSettings mSystemSettings;
private final SystemClock mSystemClock;
+ private final ProcessWrapper mProcessWrapper;
private final SystemPropertiesHelper mSystemPropertiesHelper;
/**
@@ -1459,10 +1460,12 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
Lazy<ActivityTransitionAnimator> activityTransitionAnimator,
Lazy<ScrimController> scrimControllerLazy,
IActivityTaskManager activityTaskManagerService,
+ IStatusBarService statusBarService,
FeatureFlags featureFlags,
SecureSettings secureSettings,
SystemSettings systemSettings,
SystemClock systemClock,
+ ProcessWrapper processWrapper,
@Main CoroutineDispatcher mainDispatcher,
Lazy<DreamViewModel> dreamViewModel,
Lazy<CommunalTransitionViewModel> communalTransitionViewModel,
@@ -1487,9 +1490,9 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
mSecureSettings = secureSettings;
mSystemSettings = systemSettings;
mSystemClock = systemClock;
+ mProcessWrapper = processWrapper;
mSystemPropertiesHelper = systemPropertiesHelper;
- mStatusBarService = IStatusBarService.Stub.asInterface(
- ServiceManager.getService(Context.STATUS_BAR_SERVICE));
+ mStatusBarService = statusBarService;
mKeyguardDisplayManager = keyguardDisplayManager;
mShadeController = shadeControllerLazy;
dumpManager.registerDumpable(this);
@@ -2722,13 +2725,13 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
if (mGoingToSleep) {
mUpdateMonitor.clearFingerprintRecognizedWhenKeyguardDone(currentUser);
Log.i(TAG, "Device is going to sleep, aborting keyguardDone");
- return;
- }
- setPendingLock(false); // user may have authenticated during the screen off animation
+ } else {
+ setPendingLock(false); // user may have authenticated during the screen off animation
- handleHide();
- mKeyguardInteractor.keyguardDoneAnimationsFinished();
- mUpdateMonitor.clearFingerprintRecognizedWhenKeyguardDone(currentUser);
+ handleHide();
+ mKeyguardInteractor.keyguardDoneAnimationsFinished();
+ mUpdateMonitor.clearFingerprintRecognizedWhenKeyguardDone(currentUser);
+ }
Trace.endSection();
}
@@ -2834,6 +2837,14 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
*/
private void handleShow(Bundle options) {
Trace.beginSection("KeyguardViewMediator#handleShow");
+ try {
+ handleShowInner(options);
+ } finally {
+ Trace.endSection();
+ }
+ }
+
+ private void handleShowInner(Bundle options) {
final boolean showUnlocked = options != null
&& options.getBoolean(OPTION_SHOW_DISMISSIBLE, false);
final int currentUser = mSelectedUserInteractor.getSelectedUserId();
@@ -2885,8 +2896,6 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
mKeyguardDisplayManager.show();
scheduleNonStrongBiometricIdleTimeout();
-
- Trace.endSection();
}
/**
@@ -3065,6 +3074,17 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
RemoteAnimationTarget[] apps, RemoteAnimationTarget[] wallpapers,
RemoteAnimationTarget[] nonApps, IRemoteAnimationFinishedCallback finishedCallback) {
Trace.beginSection("KeyguardViewMediator#handleStartKeyguardExitAnimation");
+ try {
+ handleStartKeyguardExitAnimationInner(startTime, fadeoutDuration, apps, wallpapers,
+ nonApps, finishedCallback);
+ } finally {
+ Trace.endSection();
+ }
+ }
+
+ private void handleStartKeyguardExitAnimationInner(long startTime, long fadeoutDuration,
+ RemoteAnimationTarget[] apps, RemoteAnimationTarget[] wallpapers,
+ RemoteAnimationTarget[] nonApps, IRemoteAnimationFinishedCallback finishedCallback) {
Log.d(TAG, "handleStartKeyguardExitAnimation startTime=" + startTime
+ " fadeoutDuration=" + fadeoutDuration);
synchronized (KeyguardViewMediator.this) {
@@ -3253,8 +3273,6 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
onKeyguardExitFinished();
}
}
-
- Trace.endSection();
}
private void onKeyguardExitFinished() {
@@ -3496,12 +3514,20 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
// TODO (b/155663717) After restart, status bar will not properly hide home button
// unless disable is called to show un-hide it once first
if (forceClearFlags) {
- try {
- mStatusBarService.disableForUser(flags, mStatusBarDisableToken,
- mContext.getPackageName(),
- mSelectedUserInteractor.getSelectedUserId(true));
- } catch (RemoteException e) {
- Log.d(TAG, "Failed to force clear flags", e);
+ if (UserManager.isVisibleBackgroundUsersEnabled()
+ && !mProcessWrapper.isSystemUser() && !mProcessWrapper.isForegroundUser()) {
+ // TODO: b/341604160 - Support visible background users properly.
+ if (DEBUG) {
+ Log.d(TAG, "Status bar manager is disabled for visible background users");
+ }
+ } else {
+ try {
+ mStatusBarService.disableForUser(flags, mStatusBarDisableToken,
+ mContext.getPackageName(),
+ mSelectedUserInteractor.getSelectedUserId(true));
+ } catch (RemoteException e) {
+ Log.d(TAG, "Failed to force clear flags", e);
+ }
}
}
@@ -3525,6 +3551,14 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
}
if (!SceneContainerFlag.isEnabled()) {
+ if (UserManager.isVisibleBackgroundUsersEnabled()
+ && !mProcessWrapper.isSystemUser() && !mProcessWrapper.isForegroundUser()) {
+ // TODO: b/341604160 - Support visible background users properly.
+ if (DEBUG) {
+ Log.d(TAG, "Status bar manager is disabled for visible background users");
+ }
+ return;
+ }
try {
mStatusBarService.disableForUser(flags, mStatusBarDisableToken,
mContext.getPackageName(),
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ResourceTrimmer.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ResourceTrimmer.kt
index 97ea16d7f8c8..b9e513586298 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ResourceTrimmer.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ResourceTrimmer.kt
@@ -24,11 +24,7 @@ import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.dagger.qualifiers.Background
import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor
-import com.android.systemui.keyguard.shared.model.Edge
import com.android.systemui.keyguard.shared.model.KeyguardState.GONE
-import com.android.systemui.keyguard.shared.model.TransitionState
-import com.android.systemui.scene.domain.interactor.SceneInteractor
-import com.android.systemui.scene.shared.flag.SceneContainerFlag
import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.utils.GlobalWindowManager
import javax.inject.Inject
@@ -52,24 +48,15 @@ constructor(
private val globalWindowManager: GlobalWindowManager,
@Application private val applicationScope: CoroutineScope,
@Background private val bgDispatcher: CoroutineDispatcher,
- private val sceneInteractor: SceneInteractor,
) : CoreStartable {
override fun start() {
Log.d(LOG_TAG, "Resource trimmer registered.")
applicationScope.launch(bgDispatcher) {
- // We drop 1 to avoid triggering on initial collect().
- if (SceneContainerFlag.isEnabled) {
- sceneInteractor.transitionState
- .filter { it.isIdle(Scenes.Gone) }
- .collect { onKeyguardGone() }
- } else {
- keyguardTransitionInteractor.transition(Edge.create(to = GONE)).collect {
- if (it.transitionState == TransitionState.FINISHED) {
- onKeyguardGone()
- }
- }
- }
+ keyguardTransitionInteractor
+ .isFinishedIn(scene = Scenes.Gone, stateWithoutSceneContainer = GONE)
+ .filter { isOnGone -> isOnGone }
+ .collect { onKeyguardGone() }
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/dagger/KeyguardModule.java b/packages/SystemUI/src/com/android/systemui/keyguard/dagger/KeyguardModule.java
index 15dac0981117..a43bfd3a8fff 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/dagger/KeyguardModule.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/dagger/KeyguardModule.java
@@ -23,6 +23,7 @@ import android.os.PowerManager;
import com.android.internal.jank.InteractionJankMonitor;
import com.android.internal.logging.UiEventLogger;
+import com.android.internal.statusbar.IStatusBarService;
import com.android.internal.widget.LockPatternUtils;
import com.android.keyguard.KeyguardDisplayManager;
import com.android.keyguard.KeyguardUpdateMonitor;
@@ -64,6 +65,7 @@ import com.android.systemui.keyguard.shared.quickaffordance.KeyguardQuickAfforda
import com.android.systemui.keyguard.ui.transitions.DeviceEntryIconTransitionModule;
import com.android.systemui.log.SessionTracker;
import com.android.systemui.navigationbar.NavigationModeController;
+import com.android.systemui.process.ProcessWrapper;
import com.android.systemui.settings.UserTracker;
import com.android.systemui.shade.ShadeController;
import com.android.systemui.statusbar.NotificationShadeDepthController;
@@ -158,10 +160,12 @@ public interface KeyguardModule {
Lazy<ActivityTransitionAnimator> activityTransitionAnimator,
Lazy<ScrimController> scrimControllerLazy,
IActivityTaskManager activityTaskManagerService,
+ IStatusBarService statusBarService,
FeatureFlags featureFlags,
SecureSettings secureSettings,
SystemSettings systemSettings,
SystemClock systemClock,
+ ProcessWrapper processWrapper,
@Main CoroutineDispatcher mainDispatcher,
Lazy<DreamViewModel> dreamViewModel,
Lazy<CommunalTransitionViewModel> communalTransitionViewModel,
@@ -206,10 +210,12 @@ public interface KeyguardModule {
activityTransitionAnimator,
scrimControllerLazy,
activityTaskManagerService,
+ statusBarService,
featureFlags,
secureSettings,
systemSettings,
systemClock,
+ processWrapper,
mainDispatcher,
dreamViewModel,
communalTransitionViewModel,
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardRepository.kt b/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardRepository.kt
index f837d8efdcc5..ae751dbacd68 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardRepository.kt
@@ -127,6 +127,30 @@ interface KeyguardRepository {
*/
val isKeyguardEnabled: StateFlow<Boolean>
+ /**
+ * Whether we can transition directly back to GONE from AOD/DOZING without any authentication
+ * events (such as a fingerprint wake and unlock), even though authentication would normally be
+ * required. This means that if you tap the screen or press the power button, you'll return
+ * directly to the unlocked app content without seeing the lockscreen, even if a secure
+ * authentication method (PIN/password/biometrics) is set.
+ *
+ * This is true in these cases:
+ * - The screen timed out, but the "lock after screen timeout" duration (default 5 seconds) has
+ * not yet elapsed.
+ * - The power button was pressed, but "power button instantly locks" is not enabled, and the
+ * "lock after screen timeout" duration has not elapsed.
+ *
+ * Note that this value specifically tells us if we can *ignore* authentication that would
+ * otherwise be required to transition from AOD/DOZING -> GONE. AOD/DOZING -> GONE is also
+ * possible if keyguard is disabled, either from an app request or because security is set to
+ * "none", but in that case, auth is not required so this boolean is not relevant.
+ *
+ * See [KeyguardWakeToGoneInteractor].
+ */
+ val canIgnoreAuthAndReturnToGone: StateFlow<Boolean>
+
+ fun setCanIgnoreAuthAndReturnToGone(canWake: Boolean)
+
/** Is the always-on display available to be used? */
val isAodAvailable: StateFlow<Boolean>
@@ -386,6 +410,13 @@ constructor(
MutableStateFlow(!lockPatternUtils.isLockScreenDisabled(userTracker.userId))
override val isKeyguardEnabled: StateFlow<Boolean> = _isKeyguardEnabled.asStateFlow()
+ private val _canIgnoreAuthAndReturnToGone = MutableStateFlow(false)
+ override val canIgnoreAuthAndReturnToGone = _canIgnoreAuthAndReturnToGone.asStateFlow()
+
+ override fun setCanIgnoreAuthAndReturnToGone(canWakeToGone: Boolean) {
+ _canIgnoreAuthAndReturnToGone.value = canWakeToGone
+ }
+
private val _isDozing = MutableStateFlow(statusBarStateController.isDozing)
override val isDozing: StateFlow<Boolean> = _isDozing.asStateFlow()
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardTransitionRepository.kt b/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardTransitionRepository.kt
index 1b201ceda310..aaeeb3911797 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardTransitionRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/KeyguardTransitionRepository.kt
@@ -252,7 +252,10 @@ constructor(
return@withContext null
}
?: run {
- emitTransition(TransitionStep(info, startingValue, TransitionState.STARTED))
+ emitTransition(
+ nextStep = TransitionStep(info, startingValue, TransitionState.STARTED),
+ isManual = true,
+ )
// No animator, so it's manual. Provide a mechanism to callback
updateTransitionId = UUID.randomUUID()
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromAodTransitionInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromAodTransitionInteractor.kt
index 868c4629dbb3..e5ccc4a14003 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromAodTransitionInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromAodTransitionInteractor.kt
@@ -17,6 +17,7 @@
package com.android.systemui.keyguard.domain.interactor
import android.animation.ValueAnimator
+import android.util.Log
import com.android.app.animation.Interpolators
import com.android.app.tracing.coroutines.launch
import com.android.systemui.dagger.SysUISingleton
@@ -53,6 +54,7 @@ constructor(
powerInteractor: PowerInteractor,
keyguardOcclusionInteractor: KeyguardOcclusionInteractor,
val deviceEntryRepository: DeviceEntryRepository,
+ private val wakeToGoneInteractor: KeyguardWakeDirectlyToGoneInteractor,
) :
TransitionInteractor(
fromState = KeyguardState.AOD,
@@ -98,6 +100,7 @@ constructor(
keyguardInteractor.primaryBouncerShowing,
keyguardInteractor.isKeyguardOccluded,
canDismissLockscreen,
+ wakeToGoneInteractor.canWakeDirectlyToGone,
)
.collect {
(
@@ -107,6 +110,7 @@ constructor(
primaryBouncerShowing,
isKeyguardOccludedLegacy,
canDismissLockscreen,
+ canWakeDirectlyToGone,
) ->
if (!maybeHandleInsecurePowerGesture()) {
val shouldTransitionToLockscreen =
@@ -115,7 +119,9 @@ constructor(
// needed. Also, don't react to wake and unlock events, as we'll be
// receiving a call to #dismissAod() shortly when the authentication
// completes.
- !maybeStartTransitionToOccludedOrInsecureCamera() &&
+ !maybeStartTransitionToOccludedOrInsecureCamera { state, reason ->
+ startTransitionTo(state, ownerReason = reason)
+ } &&
!isWakeAndUnlock(biometricUnlockState.mode) &&
!primaryBouncerShowing
} else {
@@ -131,10 +137,11 @@ constructor(
val shouldTransitionToGone =
(!KeyguardWmStateRefactor.isEnabled && canDismissLockscreen) ||
- (KeyguardWmStateRefactor.isEnabled &&
- !deviceEntryRepository.isLockscreenEnabled())
+ (KeyguardWmStateRefactor.isEnabled && canWakeDirectlyToGone)
if (shouldTransitionToGone) {
+ // TODO(b/336576536): Check if adaptation for scene framework is needed
+ if (SceneContainerFlag.isEnabled) return@collect
startTransitionTo(
toState = KeyguardState.GONE,
)
@@ -180,11 +187,7 @@ constructor(
.filterRelevantKeyguardStateAnd { isOccluded -> isOccluded }
.collect {
if (!maybeHandleInsecurePowerGesture()) {
- startTransitionTo(
- toState = KeyguardState.OCCLUDED,
- modeOnCanceled = TransitionModeOnCanceled.RESET,
- ownerReason = "isOccluded = true",
- )
+ Log.i(TAG, "Ignoring change to isOccluded to prevent errant AOD->OCCLUDED")
}
}
}
@@ -195,6 +198,7 @@ constructor(
* PRIMARY_BOUNCER.
*/
private fun listenForAodToPrimaryBouncer() {
+ // TODO(b/336576536): Check if adaptation for scene framework is needed
if (SceneContainerFlag.isEnabled) return
scope.launch("$TAG#listenForAodToPrimaryBouncer") {
keyguardInteractor.primaryBouncerShowing
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromDozingTransitionInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromDozingTransitionInteractor.kt
index 76e88a2a2cd6..8ef138eeb16a 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromDozingTransitionInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromDozingTransitionInteractor.kt
@@ -17,17 +17,24 @@
package com.android.systemui.keyguard.domain.interactor
import android.animation.ValueAnimator
+import android.annotation.SuppressLint
+import android.app.DreamManager
import com.android.app.animation.Interpolators
+import com.android.systemui.Flags.communalSceneKtfRefactor
import com.android.systemui.communal.domain.interactor.CommunalInteractor
+import com.android.systemui.communal.domain.interactor.CommunalSceneInteractor
+import com.android.systemui.communal.shared.model.CommunalScenes
+import com.android.systemui.communal.shared.model.CommunalTransitionKeys
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Background
import com.android.systemui.dagger.qualifiers.Main
-import com.android.systemui.deviceentry.data.repository.DeviceEntryRepository
+import com.android.systemui.deviceentry.domain.interactor.DeviceEntryInteractor
import com.android.systemui.keyguard.KeyguardWmStateRefactor
import com.android.systemui.keyguard.data.repository.KeyguardTransitionRepository
import com.android.systemui.keyguard.shared.model.BiometricUnlockMode.Companion.isWakeAndUnlock
import com.android.systemui.keyguard.shared.model.KeyguardState
import com.android.systemui.power.domain.interactor.PowerInteractor
+import com.android.systemui.power.shared.model.WakeSleepReason
import com.android.systemui.scene.shared.flag.SceneContainerFlag
import com.android.systemui.util.kotlin.Utils.Companion.sample
import com.android.systemui.util.kotlin.sample
@@ -53,8 +60,11 @@ constructor(
keyguardInteractor: KeyguardInteractor,
powerInteractor: PowerInteractor,
private val communalInteractor: CommunalInteractor,
+ private val communalSceneInteractor: CommunalSceneInteractor,
keyguardOcclusionInteractor: KeyguardOcclusionInteractor,
- val deviceEntryRepository: DeviceEntryRepository,
+ val deviceEntryInteractor: DeviceEntryInteractor,
+ private val wakeToGoneInteractor: KeyguardWakeDirectlyToGoneInteractor,
+ private val dreamManager: DreamManager,
) :
TransitionInteractor(
fromState = KeyguardState.DOZING,
@@ -114,6 +124,7 @@ constructor(
}
}
+ @SuppressLint("MissingPermission")
private fun listenForDozingToAny() {
if (KeyguardWmStateRefactor.isEnabled) {
return
@@ -125,7 +136,8 @@ constructor(
.filterRelevantKeyguardStateAnd { isAwake -> isAwake }
.sample(
keyguardInteractor.isKeyguardOccluded,
- communalInteractor.isIdleOnCommunal,
+ communalInteractor.isCommunalAvailable,
+ communalSceneInteractor.isIdleOnCommunal,
canTransitionToGoneOnWake,
keyguardInteractor.primaryBouncerShowing,
)
@@ -133,10 +145,11 @@ constructor(
(
_,
occluded,
+ isCommunalAvailable,
isIdleOnCommunal,
canTransitionToGoneOnWake,
primaryBouncerShowing) ->
- if (!deviceEntryRepository.isLockscreenEnabled()) {
+ if (!deviceEntryInteractor.isLockscreenEnabled()) {
if (SceneContainerFlag.isEnabled) {
// TODO(b/336576536): Check if adaptation for scene framework is needed
} else {
@@ -156,12 +169,25 @@ constructor(
}
} else if (occluded) {
startTransitionTo(KeyguardState.OCCLUDED)
- } else if (isIdleOnCommunal) {
+ } else if (isIdleOnCommunal && !communalSceneKtfRefactor()) {
if (SceneContainerFlag.isEnabled) {
// TODO(b/336576536): Check if adaptation for scene framework is needed
} else {
startTransitionTo(KeyguardState.GLANCEABLE_HUB)
}
+ } else if (
+ powerInteractor.detailedWakefulness.value.lastWakeReason ==
+ WakeSleepReason.POWER_BUTTON &&
+ isCommunalAvailable &&
+ dreamManager.canStartDreaming(true)
+ ) {
+ // This case handles tapping the power button to transition through
+ // dream -> off -> hub.
+ if (SceneContainerFlag.isEnabled) {
+ // TODO(b/336576536): Check if adaptation for scene framework is needed
+ } else {
+ transitionToGlanceableHub()
+ }
} else {
startTransitionTo(KeyguardState.LOCKSCREEN)
}
@@ -170,6 +196,7 @@ constructor(
}
/** Figure out what state to transition to when we awake from DOZING. */
+ @SuppressLint("MissingPermission")
private fun listenForWakeFromDozing() {
if (!KeyguardWmStateRefactor.isEnabled) {
return
@@ -179,24 +206,28 @@ constructor(
powerInteractor.detailedWakefulness
.filterRelevantKeyguardStateAnd { it.isAwake() }
.sample(
- communalInteractor.isIdleOnCommunal,
+ communalInteractor.isCommunalAvailable,
+ communalSceneInteractor.isIdleOnCommunal,
keyguardInteractor.biometricUnlockState,
- canTransitionToGoneOnWake,
+ wakeToGoneInteractor.canWakeDirectlyToGone,
keyguardInteractor.primaryBouncerShowing,
)
.collect {
(
_,
+ isCommunalAvailable,
isIdleOnCommunal,
biometricUnlockState,
- canDismissLockscreen,
+ canWakeDirectlyToGone,
primaryBouncerShowing) ->
if (
- !maybeStartTransitionToOccludedOrInsecureCamera() &&
+ !maybeStartTransitionToOccludedOrInsecureCamera { state, reason ->
+ startTransitionTo(state, ownerReason = reason)
+ } &&
// Handled by dismissFromDozing().
!isWakeAndUnlock(biometricUnlockState.mode)
) {
- if (!KeyguardWmStateRefactor.isEnabled && canDismissLockscreen) {
+ if (canWakeDirectlyToGone) {
if (SceneContainerFlag.isEnabled) {
// TODO(b/336576536): Check if adaptation for scene framework is
// needed
@@ -206,38 +237,39 @@ constructor(
ownerReason = "waking from dozing"
)
}
- } else if (
- KeyguardWmStateRefactor.isEnabled &&
- !deviceEntryRepository.isLockscreenEnabled()
- ) {
+ } else if (primaryBouncerShowing) {
if (SceneContainerFlag.isEnabled) {
// TODO(b/336576536): Check if adaptation for scene framework is
// needed
} else {
startTransitionTo(
- KeyguardState.GONE,
+ KeyguardState.PRIMARY_BOUNCER,
ownerReason = "waking from dozing"
)
}
- } else if (primaryBouncerShowing) {
+ } else if (isIdleOnCommunal && !communalSceneKtfRefactor()) {
if (SceneContainerFlag.isEnabled) {
// TODO(b/336576536): Check if adaptation for scene framework is
// needed
} else {
startTransitionTo(
- KeyguardState.PRIMARY_BOUNCER,
+ KeyguardState.GLANCEABLE_HUB,
ownerReason = "waking from dozing"
)
}
- } else if (isIdleOnCommunal) {
+ } else if (
+ powerInteractor.detailedWakefulness.value.lastWakeReason ==
+ WakeSleepReason.POWER_BUTTON &&
+ isCommunalAvailable &&
+ dreamManager.canStartDreaming(true)
+ ) {
+ // This case handles tapping the power button to transition through
+ // dream -> off -> hub.
if (SceneContainerFlag.isEnabled) {
// TODO(b/336576536): Check if adaptation for scene framework is
// needed
} else {
- startTransitionTo(
- KeyguardState.GLANCEABLE_HUB,
- ownerReason = "waking from dozing"
- )
+ transitionToGlanceableHub()
}
} else {
startTransitionTo(
@@ -250,6 +282,18 @@ constructor(
}
}
+ private suspend fun transitionToGlanceableHub() {
+ if (communalSceneKtfRefactor()) {
+ communalSceneInteractor.changeScene(
+ CommunalScenes.Communal,
+ // Immediately show the hub when transitioning from dozing to hub.
+ CommunalTransitionKeys.Immediately,
+ )
+ } else {
+ startTransitionTo(KeyguardState.GLANCEABLE_HUB)
+ }
+ }
+
/** Dismisses keyguard from the DOZING state. */
fun dismissFromDozing() {
scope.launch { startTransitionTo(KeyguardState.GONE) }
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromDreamingTransitionInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromDreamingTransitionInteractor.kt
index 0e764879d8f6..4c3a75e765b6 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromDreamingTransitionInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromDreamingTransitionInteractor.kt
@@ -19,10 +19,12 @@ package com.android.systemui.keyguard.domain.interactor
import android.animation.ValueAnimator
import com.android.app.animation.Interpolators
import com.android.app.tracing.coroutines.launch
-import com.android.systemui.Flags.communalHub
+import com.android.systemui.Flags.communalSceneKtfRefactor
+import com.android.systemui.communal.domain.interactor.CommunalSettingsInteractor
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Background
import com.android.systemui.dagger.qualifiers.Main
+import com.android.systemui.deviceentry.domain.interactor.DeviceEntryInteractor
import com.android.systemui.keyguard.KeyguardWmStateRefactor
import com.android.systemui.keyguard.data.repository.KeyguardTransitionRepository
import com.android.systemui.keyguard.shared.model.BiometricUnlockMode
@@ -37,11 +39,14 @@ import kotlin.time.Duration.Companion.milliseconds
import kotlin.time.Duration.Companion.seconds
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.FlowPreview
import kotlinx.coroutines.flow.combine
import kotlinx.coroutines.flow.debounce
+import kotlinx.coroutines.flow.filter
import kotlinx.coroutines.launch
+@OptIn(ExperimentalCoroutinesApi::class)
@SysUISingleton
class FromDreamingTransitionInteractor
@Inject
@@ -54,8 +59,10 @@ constructor(
@Main mainDispatcher: CoroutineDispatcher,
keyguardInteractor: KeyguardInteractor,
private val glanceableHubTransitions: GlanceableHubTransitions,
+ private val communalSettingsInteractor: CommunalSettingsInteractor,
powerInteractor: PowerInteractor,
keyguardOcclusionInteractor: KeyguardOcclusionInteractor,
+ private val deviceEntryInteractor: DeviceEntryInteractor,
) :
TransitionInteractor(
fromState = KeyguardState.DREAMING,
@@ -72,10 +79,12 @@ constructor(
listenForDreamingToOccluded()
listenForDreamingToGoneWhenDismissable()
listenForDreamingToGoneFromBiometricUnlock()
- listenForDreamingToLockscreen()
+ listenForDreamingToLockscreenOrGone()
listenForDreamingToAodOrDozing()
listenForTransitionToCamera(scope, keyguardInteractor)
- listenForDreamingToGlanceableHub()
+ if (!communalSceneKtfRefactor()) {
+ listenForDreamingToGlanceableHub()
+ }
listenForDreamingToPrimaryBouncer()
}
@@ -90,7 +99,7 @@ constructor(
}
private fun listenForDreamingToGlanceableHub() {
- if (!communalHub()) return
+ if (!communalSettingsInteractor.isCommunalFlagEnabled()) return
// TODO(b/336576536): Check if adaptation for scene framework is needed
if (SceneContainerFlag.isEnabled) return
scope.launch("$TAG#listenForDreamingToGlanceableHub", mainDispatcher) {
@@ -132,17 +141,7 @@ constructor(
@OptIn(FlowPreview::class)
private fun listenForDreamingToOccluded() {
- if (KeyguardWmStateRefactor.isEnabled) {
- scope.launch {
- combine(
- keyguardInteractor.isDreaming,
- keyguardOcclusionInteractor.isShowWhenLockedActivityOnTop,
- ::Pair
- )
- .filterRelevantKeyguardStateAnd { (isDreaming, _) -> !isDreaming }
- .collect { maybeStartTransitionToOccludedOrInsecureCamera() }
- }
- } else {
+ if (!KeyguardWmStateRefactor.isEnabled) {
scope.launch {
combine(
keyguardInteractor.isKeyguardOccluded,
@@ -168,21 +167,41 @@ constructor(
}
}
- private fun listenForDreamingToLockscreen() {
+ private fun listenForDreamingToLockscreenOrGone() {
if (!KeyguardWmStateRefactor.isEnabled) {
return
}
scope.launch {
- keyguardOcclusionInteractor.isShowWhenLockedActivityOnTop
- .filterRelevantKeyguardStateAnd { onTop -> !onTop }
- .collect { startTransitionTo(KeyguardState.LOCKSCREEN) }
+ keyguardInteractor.isDreaming
+ .filter { !it }
+ .sample(deviceEntryInteractor.isUnlocked, ::Pair)
+ .collect { (_, dismissable) ->
+ // TODO(b/349837588): Add check for -> OCCLUDED.
+ if (dismissable) {
+ startTransitionTo(
+ KeyguardState.GONE,
+ ownerReason = "No longer dreaming; dismissable"
+ )
+ } else {
+ startTransitionTo(
+ KeyguardState.LOCKSCREEN,
+ ownerReason = "No longer dreaming"
+ )
+ }
+ }
}
}
private fun listenForDreamingToGoneWhenDismissable() {
- // TODO(b/336576536): Check if adaptation for scene framework is needed
- if (SceneContainerFlag.isEnabled) return
+ if (SceneContainerFlag.isEnabled) {
+ return // TODO(b/336576536): Check if adaptation for scene framework is needed
+ }
+
+ if (KeyguardWmStateRefactor.isEnabled) {
+ return
+ }
+
scope.launch {
keyguardInteractor.isAbleToDream
.sampleCombine(
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromGlanceableHubTransitionInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromGlanceableHubTransitionInteractor.kt
index 8041dd933143..d81195060071 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromGlanceableHubTransitionInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromGlanceableHubTransitionInteractor.kt
@@ -19,7 +19,11 @@ package com.android.systemui.keyguard.domain.interactor
import android.animation.ValueAnimator
import com.android.app.animation.Interpolators
import com.android.app.tracing.coroutines.launch
-import com.android.systemui.Flags
+import com.android.systemui.Flags.communalSceneKtfRefactor
+import com.android.systemui.communal.domain.interactor.CommunalSceneInteractor
+import com.android.systemui.communal.domain.interactor.CommunalSettingsInteractor
+import com.android.systemui.communal.shared.model.CommunalScenes
+import com.android.systemui.communal.shared.model.CommunalTransitionKeys
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Background
import com.android.systemui.dagger.qualifiers.Main
@@ -30,6 +34,7 @@ import com.android.systemui.keyguard.shared.model.TransitionModeOnCanceled
import com.android.systemui.power.domain.interactor.PowerInteractor
import com.android.systemui.scene.shared.flag.SceneContainerFlag
import com.android.systemui.util.kotlin.BooleanFlowOperators.allOf
+import com.android.systemui.util.kotlin.BooleanFlowOperators.noneOf
import com.android.systemui.util.kotlin.BooleanFlowOperators.not
import javax.inject.Inject
import kotlin.time.Duration.Companion.milliseconds
@@ -48,7 +53,9 @@ constructor(
@Main mainDispatcher: CoroutineDispatcher,
@Background bgDispatcher: CoroutineDispatcher,
private val glanceableHubTransitions: GlanceableHubTransitions,
+ private val communalSettingsInteractor: CommunalSettingsInteractor,
keyguardInteractor: KeyguardInteractor,
+ private val communalSceneInteractor: CommunalSceneInteractor,
override val transitionRepository: KeyguardTransitionRepository,
override val internalTransitionInteractor: InternalKeyguardTransitionInteractor,
transitionInteractor: KeyguardTransitionInteractor,
@@ -68,10 +75,12 @@ constructor(
override fun start() {
// TODO(b/336576536): Check if adaptation for scene framework is needed
if (SceneContainerFlag.isEnabled) return
- if (!Flags.communalHub()) {
+ if (!communalSettingsInteractor.isCommunalFlagEnabled()) {
return
}
- listenForHubToLockscreenOrDreaming()
+ if (!communalSceneKtfRefactor()) {
+ listenForHubToLockscreenOrDreaming()
+ }
listenForHubToDozing()
listenForHubToPrimaryBouncer()
listenForHubToAlternateBouncer()
@@ -119,7 +128,10 @@ constructor(
scope.launch("$TAG#listenForHubToPrimaryBouncer") {
keyguardInteractor.primaryBouncerShowing
.filterRelevantKeyguardStateAnd { primaryBouncerShowing -> primaryBouncerShowing }
- .collect { startTransitionTo(KeyguardState.PRIMARY_BOUNCER) }
+ .collect {
+ // Bouncer shows on top of the hub, so do not change scenes here.
+ startTransitionTo(KeyguardState.PRIMARY_BOUNCER)
+ }
}
}
@@ -129,7 +141,10 @@ constructor(
.filterRelevantKeyguardStateAnd { alternateBouncerShowing ->
alternateBouncerShowing
}
- .collect { pair -> startTransitionTo(KeyguardState.ALTERNATE_BOUNCER) }
+ .collect { pair ->
+ // Bouncer shows on top of the hub, so do not change scenes here.
+ startTransitionTo(KeyguardState.ALTERNATE_BOUNCER)
+ }
}
}
@@ -138,10 +153,18 @@ constructor(
powerInteractor.isAsleep
.filterRelevantKeyguardStateAnd { isAsleep -> isAsleep }
.collect {
- startTransitionTo(
- toState = KeyguardState.DOZING,
- modeOnCanceled = TransitionModeOnCanceled.LAST_VALUE,
- )
+ if (communalSceneKtfRefactor()) {
+ communalSceneInteractor.changeScene(
+ newScene = CommunalScenes.Blank,
+ transitionKey = CommunalTransitionKeys.Immediately,
+ keyguardState = KeyguardState.DOZING,
+ )
+ } else {
+ startTransitionTo(
+ toState = KeyguardState.DOZING,
+ modeOnCanceled = TransitionModeOnCanceled.LAST_VALUE,
+ )
+ }
}
}
}
@@ -151,7 +174,44 @@ constructor(
scope.launch {
keyguardOcclusionInteractor.isShowWhenLockedActivityOnTop
.filterRelevantKeyguardStateAnd { onTop -> onTop }
- .collect { maybeStartTransitionToOccludedOrInsecureCamera() }
+ .collect {
+ maybeStartTransitionToOccludedOrInsecureCamera { state, reason ->
+ if (communalSceneKtfRefactor()) {
+ communalSceneInteractor.changeScene(
+ newScene = CommunalScenes.Blank,
+ transitionKey = CommunalTransitionKeys.SimpleFade,
+ keyguardState = state,
+ )
+ null
+ } else {
+ startTransitionTo(state, ownerReason = reason)
+ }
+ }
+ }
+ }
+ } else if (communalSceneKtfRefactor()) {
+ scope.launch {
+ allOf(
+ keyguardInteractor.isKeyguardOccluded,
+ noneOf(
+ // Dream is a special-case of occluded, so filter out the dreaming
+ // case here.
+ keyguardInteractor.isDreaming,
+ // When launching activities from widgets on the hub, we have a
+ // custom occlusion animation.
+ communalSceneInteractor.isLaunchingWidget,
+ ),
+ )
+ .filterRelevantKeyguardStateAnd { isOccludedAndNotDreamingNorLaunchingWidget ->
+ isOccludedAndNotDreamingNorLaunchingWidget
+ }
+ .collect { _ ->
+ communalSceneInteractor.changeScene(
+ newScene = CommunalScenes.Blank,
+ transitionKey = CommunalTransitionKeys.SimpleFade,
+ keyguardState = KeyguardState.OCCLUDED,
+ )
+ }
}
} else {
scope.launch {
@@ -159,18 +219,41 @@ constructor(
.filterRelevantKeyguardStateAnd { isOccludedAndNotDreaming ->
isOccludedAndNotDreaming
}
- .collect { isOccludedAndNotDreaming ->
- startTransitionTo(KeyguardState.OCCLUDED)
- }
+ .collect { _ -> startTransitionTo(KeyguardState.OCCLUDED) }
}
}
}
private fun listenForHubToGone() {
- scope.launch {
- keyguardInteractor.isKeyguardGoingAway
- .filterRelevantKeyguardStateAnd { isKeyguardGoingAway -> isKeyguardGoingAway }
- .collect { startTransitionTo(KeyguardState.GONE) }
+ // TODO(b/336576536): Check if adaptation for scene framework is needed
+ if (SceneContainerFlag.isEnabled) return
+ if (communalSceneKtfRefactor()) {
+ scope.launch {
+ allOf(
+ keyguardInteractor.isKeyguardGoingAway,
+ // TODO(b/327225415): Handle edit mode opening here to avoid going to GONE
+ // state until after edit mode is ready to be shown.
+ noneOf(
+ // When launching activities from widgets on the hub, we wait to change
+ // scenes until the activity launch is complete.
+ communalSceneInteractor.isLaunchingWidget,
+ ),
+ )
+ .filterRelevantKeyguardStateAnd { isKeyguardGoingAway -> isKeyguardGoingAway }
+ .collect {
+ communalSceneInteractor.changeScene(
+ newScene = CommunalScenes.Blank,
+ transitionKey = CommunalTransitionKeys.SimpleFade,
+ keyguardState = KeyguardState.GONE
+ )
+ }
+ }
+ } else {
+ scope.launch {
+ keyguardInteractor.isKeyguardGoingAway
+ .filterRelevantKeyguardStateAnd { isKeyguardGoingAway -> isKeyguardGoingAway }
+ .collect { startTransitionTo(KeyguardState.GONE) }
+ }
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromLockscreenTransitionInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromLockscreenTransitionInteractor.kt
index ff15a1bc34d0..16c014f451f3 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromLockscreenTransitionInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromLockscreenTransitionInteractor.kt
@@ -20,7 +20,8 @@ import android.animation.ValueAnimator
import android.util.MathUtils
import com.android.app.animation.Interpolators
import com.android.app.tracing.coroutines.launch
-import com.android.systemui.Flags
+import com.android.systemui.Flags.communalSceneKtfRefactor
+import com.android.systemui.communal.domain.interactor.CommunalSettingsInteractor
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Background
import com.android.systemui.dagger.qualifiers.Main
@@ -66,6 +67,7 @@ constructor(
private val shadeRepository: ShadeRepository,
powerInteractor: PowerInteractor,
private val glanceableHubTransitions: GlanceableHubTransitions,
+ private val communalSettingsInteractor: CommunalSettingsInteractor,
private val swipeToDismissInteractor: SwipeToDismissInteractor,
keyguardOcclusionInteractor: KeyguardOcclusionInteractor,
) :
@@ -89,7 +91,9 @@ constructor(
listenForLockscreenToPrimaryBouncerDragging()
listenForLockscreenToAlternateBouncer()
listenForLockscreenTransitionToCamera()
- listenForLockscreenToGlanceableHub()
+ if (!communalSceneKtfRefactor()) {
+ listenForLockscreenToGlanceableHub()
+ }
}
/**
@@ -272,10 +276,9 @@ constructor(
}
private fun listenForLockscreenToGone() {
- if (KeyguardWmStateRefactor.isEnabled) {
- return
- }
-
+ // TODO(b/336576536): Check if adaptation for scene framework is needed
+ if (SceneContainerFlag.isEnabled) return
+ if (KeyguardWmStateRefactor.isEnabled) return
scope.launch("$TAG#listenForLockscreenToGone") {
keyguardInteractor.isKeyguardGoingAway
.filterRelevantKeyguardStateAnd { isKeyguardGoingAway -> isKeyguardGoingAway }
@@ -289,6 +292,7 @@ constructor(
}
private fun listenForLockscreenToGoneDragging() {
+ // TODO(b/336576536): Check if adaptation for scene framework is needed
if (SceneContainerFlag.isEnabled) return
if (KeyguardWmStateRefactor.isEnabled) {
// When the refactor is enabled, we no longer use isKeyguardGoingAway.
@@ -349,7 +353,7 @@ constructor(
private fun listenForLockscreenToGlanceableHub() {
// TODO(b/336576536): Check if adaptation for scene framework is needed
if (SceneContainerFlag.isEnabled) return
- if (!Flags.communalHub()) {
+ if (!communalSettingsInteractor.isCommunalFlagEnabled()) {
return
}
scope.launch(mainDispatcher) {
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromOccludedTransitionInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromOccludedTransitionInteractor.kt
index 84ca6672d509..2f320409f231 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromOccludedTransitionInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromOccludedTransitionInteractor.kt
@@ -18,8 +18,12 @@ package com.android.systemui.keyguard.domain.interactor
import android.animation.ValueAnimator
import com.android.app.animation.Interpolators
+import com.android.systemui.Flags.communalSceneKtfRefactor
import com.android.systemui.Flags.restartDreamOnUnocclude
import com.android.systemui.communal.domain.interactor.CommunalInteractor
+import com.android.systemui.communal.domain.interactor.CommunalSceneInteractor
+import com.android.systemui.communal.shared.model.CommunalScenes
+import com.android.systemui.communal.shared.model.CommunalTransitionKeys
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Background
import com.android.systemui.dagger.qualifiers.Main
@@ -49,6 +53,7 @@ constructor(
keyguardInteractor: KeyguardInteractor,
powerInteractor: PowerInteractor,
private val communalInteractor: CommunalInteractor,
+ private val communalSceneInteractor: CommunalSceneInteractor,
keyguardOcclusionInteractor: KeyguardOcclusionInteractor,
) :
TransitionInteractor(
@@ -71,6 +76,8 @@ constructor(
}
private fun listenForOccludedToPrimaryBouncer() {
+ // TODO(b/336576536): Check if adaptation for scene framework is needed
+ if (SceneContainerFlag.isEnabled) return
scope.launch {
keyguardInteractor.primaryBouncerShowing
.filterRelevantKeyguardStateAnd { isBouncerShowing -> isBouncerShowing }
@@ -138,7 +145,14 @@ constructor(
} else if (isIdleOnCommunal || showCommunalFromOccluded) {
// TODO(b/336576536): Check if adaptation for scene framework is needed
if (SceneContainerFlag.isEnabled) return
- startTransitionTo(KeyguardState.GLANCEABLE_HUB)
+ if (communalSceneKtfRefactor()) {
+ communalSceneInteractor.changeScene(
+ CommunalScenes.Communal,
+ CommunalTransitionKeys.SimpleFade
+ )
+ } else {
+ startTransitionTo(KeyguardState.GLANCEABLE_HUB)
+ }
} else {
startTransitionTo(KeyguardState.LOCKSCREEN)
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromPrimaryBouncerTransitionInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromPrimaryBouncerTransitionInteractor.kt
index f98ed15a21c6..6c89ce055470 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromPrimaryBouncerTransitionInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromPrimaryBouncerTransitionInteractor.kt
@@ -40,7 +40,6 @@ import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.distinctUntilChanged
-import kotlinx.coroutines.flow.flowOf
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.onStart
import kotlinx.coroutines.launch
@@ -81,25 +80,18 @@ constructor(
}
val surfaceBehindVisibility: Flow<Boolean?> =
- if (SceneContainerFlag.isEnabled) {
- // The edge Scenes.Bouncer <-> Scenes.Gone is handled by STL
- flowOf(null)
- } else {
- transitionInteractor
- .transition(
- edge = Edge.INVALID,
- edgeWithoutSceneContainer =
- Edge.create(from = KeyguardState.PRIMARY_BOUNCER, to = KeyguardState.GONE)
- )
- .map<TransitionStep, Boolean?> {
- it.value > TO_GONE_SURFACE_BEHIND_VISIBLE_THRESHOLD
- }
- .onStart {
- // Default to null ("don't care, use a reasonable default").
- emit(null)
- }
- .distinctUntilChanged()
- }
+ transitionInteractor
+ .transition(
+ edge = Edge.INVALID,
+ edgeWithoutSceneContainer =
+ Edge.create(from = KeyguardState.PRIMARY_BOUNCER, to = KeyguardState.GONE)
+ )
+ .map<TransitionStep, Boolean?> { it.value > TO_GONE_SURFACE_BEHIND_VISIBLE_THRESHOLD }
+ .onStart {
+ // Default to null ("don't care, use a reasonable default").
+ emit(null)
+ }
+ .distinctUntilChanged()
fun dismissPrimaryBouncer() {
scope.launch { startTransitionTo(KeyguardState.GONE) }
@@ -121,10 +113,9 @@ constructor(
(isBouncerShowing, isAwake, isActiveDreamLockscreenHosted, isIdleOnCommunal)
->
if (
- !maybeStartTransitionToOccludedOrInsecureCamera() &&
- !isBouncerShowing &&
- isAwake &&
- !isActiveDreamLockscreenHosted
+ !maybeStartTransitionToOccludedOrInsecureCamera { state, reason ->
+ startTransitionTo(state, ownerReason = reason)
+ } && !isBouncerShowing && isAwake && !isActiveDreamLockscreenHosted
) {
val toState =
if (isIdleOnCommunal) {
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardBlueprintInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardBlueprintInteractor.kt
index 41c39597dc02..e2bb540f6645 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardBlueprintInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardBlueprintInteractor.kt
@@ -19,7 +19,6 @@
package com.android.systemui.keyguard.domain.interactor
-import android.content.Context
import com.android.systemui.CoreStartable
import com.android.systemui.biometrics.domain.interactor.FingerprintPropertyInteractor
import com.android.systemui.common.ui.domain.interactor.ConfigurationInteractor
@@ -32,15 +31,12 @@ import com.android.systemui.keyguard.ui.view.layout.blueprints.DefaultKeyguardBl
import com.android.systemui.keyguard.ui.view.layout.blueprints.SplitShadeKeyguardBlueprint
import com.android.systemui.keyguard.ui.view.layout.blueprints.transitions.IntraBlueprintTransition.Config
import com.android.systemui.keyguard.ui.view.layout.blueprints.transitions.IntraBlueprintTransition.Type
-import com.android.systemui.keyguard.ui.view.layout.sections.ClockSection
import com.android.systemui.keyguard.ui.view.layout.sections.SmartspaceSection
import com.android.systemui.shade.domain.interactor.ShadeInteractor
-import com.android.systemui.shade.shared.model.ShadeMode
import javax.inject.Inject
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.StateFlow
-import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.flow.filter
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.launch
@@ -51,13 +47,10 @@ class KeyguardBlueprintInteractor
constructor(
private val keyguardBlueprintRepository: KeyguardBlueprintRepository,
@Application private val applicationScope: CoroutineScope,
- private val context: Context,
- private val shadeInteractor: ShadeInteractor,
- private val clockInteractor: KeyguardClockInteractor,
+ shadeInteractor: ShadeInteractor,
private val configurationInteractor: ConfigurationInteractor,
private val fingerprintPropertyInteractor: FingerprintPropertyInteractor,
private val smartspaceSection: SmartspaceSection,
- private val clockSection: ClockSection,
) : CoreStartable {
/** The current blueprint for the lockscreen. */
val blueprint: StateFlow<KeyguardBlueprint> = keyguardBlueprintRepository.blueprint
@@ -70,8 +63,8 @@ constructor(
/** Current BlueprintId */
val blueprintId =
- shadeInteractor.shadeMode.map { shadeMode ->
- val useSplitShade = shadeMode == ShadeMode.Split && !ComposeLockscreen.isEnabled
+ shadeInteractor.isShadeLayoutWide.map { isShadeLayoutWide ->
+ val useSplitShade = isShadeLayoutWide && !ComposeLockscreen.isEnabled
when {
useSplitShade -> SplitShadeKeyguardBlueprint.ID
else -> DefaultKeyguardBlueprint.DEFAULT
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardClockInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardClockInteractor.kt
index 142b1a031277..c0049d4e2e6c 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardClockInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardClockInteractor.kt
@@ -31,7 +31,6 @@ import com.android.systemui.plugins.clocks.ClockController
import com.android.systemui.plugins.clocks.ClockId
import com.android.systemui.scene.shared.flag.SceneContainerFlag
import com.android.systemui.shade.domain.interactor.ShadeInteractor
-import com.android.systemui.shade.shared.model.ShadeMode
import com.android.systemui.statusbar.notification.domain.interactor.ActiveNotificationsInteractor
import com.android.systemui.statusbar.notification.domain.interactor.HeadsUpNotificationInteractor
import com.android.systemui.util.kotlin.combine
@@ -45,6 +44,7 @@ import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.stateIn
private val TAG = KeyguardClockInteractor::class.simpleName
+
/** Manages and encapsulates the clock components of the lockscreen root view. */
@SysUISingleton
class KeyguardClockInteractor
@@ -77,16 +77,16 @@ constructor(
val clockSize: StateFlow<ClockSize> =
if (SceneContainerFlag.isEnabled) {
combine(
- shadeInteractor.shadeMode,
+ shadeInteractor.isShadeLayoutWide,
activeNotificationsInteractor.areAnyNotificationsPresent,
mediaCarouselInteractor.hasActiveMediaOrRecommendation,
keyguardInteractor.isDozing,
isOnAod,
- ) { shadeMode, hasNotifs, hasMedia, isDozing, isOnAod ->
+ ) { isShadeLayoutWide, hasNotifs, hasMedia, isDozing, isOnAod ->
return@combine when {
keyguardClockRepository.shouldForceSmallClock && !isOnAod -> ClockSize.SMALL
- shadeMode == ShadeMode.Single && (hasNotifs || hasMedia) -> ClockSize.SMALL
- shadeMode == ShadeMode.Single -> ClockSize.LARGE
+ !isShadeLayoutWide && (hasNotifs || hasMedia) -> ClockSize.SMALL
+ !isShadeLayoutWide -> ClockSize.LARGE
hasMedia && !isDozing -> ClockSize.SMALL
else -> ClockSize.LARGE
}
@@ -103,21 +103,21 @@ constructor(
val clockShouldBeCentered: Flow<Boolean> =
if (SceneContainerFlag.isEnabled) {
combine(
- shadeInteractor.shadeMode,
+ shadeInteractor.isShadeLayoutWide,
activeNotificationsInteractor.areAnyNotificationsPresent,
keyguardInteractor.isActiveDreamLockscreenHosted,
isOnAod,
headsUpNotificationInteractor.isHeadsUpOrAnimatingAway,
keyguardInteractor.isDozing,
) {
- shadeMode,
+ isShadeLayoutWide,
areAnyNotificationsPresent,
isActiveDreamLockscreenHosted,
isOnAod,
isHeadsUp,
isDozing ->
when {
- shadeMode != ShadeMode.Split -> true
+ !isShadeLayoutWide -> true
!areAnyNotificationsPresent -> true
isActiveDreamLockscreenHosted -> true
// Pulsing notification appears on the right. Move clock left to avoid overlap.
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissActionInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissActionInteractor.kt
index 1aac1c5940b3..f4d82659971d 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissActionInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissActionInteractor.kt
@@ -25,9 +25,8 @@ import com.android.systemui.keyguard.shared.model.KeyguardDone
import com.android.systemui.keyguard.shared.model.KeyguardState.ALTERNATE_BOUNCER
import com.android.systemui.keyguard.shared.model.KeyguardState.GONE
import com.android.systemui.keyguard.shared.model.KeyguardState.PRIMARY_BOUNCER
-import com.android.systemui.scene.domain.interactor.SceneInteractor
-import com.android.systemui.scene.shared.flag.SceneContainerFlag
import com.android.systemui.scene.shared.model.Scenes
+import com.android.systemui.util.kotlin.Utils.Companion.sampleFilter
import com.android.systemui.util.kotlin.sample
import javax.inject.Inject
import kotlinx.coroutines.CoroutineScope
@@ -35,6 +34,7 @@ import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.StateFlow
+import kotlinx.coroutines.flow.combine
import kotlinx.coroutines.flow.filter
import kotlinx.coroutines.flow.filterNot
import kotlinx.coroutines.flow.map
@@ -51,7 +51,6 @@ constructor(
transitionInteractor: KeyguardTransitionInteractor,
val dismissInteractor: KeyguardDismissInteractor,
@Application private val applicationScope: CoroutineScope,
- sceneInteractor: SceneInteractor,
) {
val dismissAction: Flow<DismissAction> = repository.dismissAction
@@ -76,11 +75,10 @@ constructor(
)
private val finishedTransitionToGone: Flow<Unit> =
- if (SceneContainerFlag.isEnabled) {
- sceneInteractor.transitionState.filter { it.isIdle(Scenes.Gone) }.map {}
- } else {
- transitionInteractor.finishedKeyguardState.filter { it == GONE }.map {}
- }
+ transitionInteractor
+ .isFinishedIn(scene = Scenes.Gone, stateWithoutSceneContainer = GONE)
+ .filter { it }
+ .map {}
val executeDismissAction: Flow<() -> KeyguardDone> =
merge(
@@ -90,12 +88,24 @@ constructor(
.sample(dismissAction)
.filterNot { it is DismissAction.None }
.map { it.onDismissAction }
+
val resetDismissAction: Flow<Unit> =
- transitionInteractor.finishedKeyguardTransitionStep
- .filter { it.to != ALTERNATE_BOUNCER && it.to != PRIMARY_BOUNCER && it.to != GONE }
- .sample(dismissAction)
- .filterNot { it is DismissAction.None }
- .map {} // map to Unit
+ combine(
+ transitionInteractor.isFinishedIn(
+ scene = Scenes.Gone,
+ stateWithoutSceneContainer = GONE
+ ),
+ transitionInteractor.isFinishedIn(
+ scene = Scenes.Bouncer,
+ stateWithoutSceneContainer = PRIMARY_BOUNCER
+ ),
+ transitionInteractor.isFinishedIn(state = ALTERNATE_BOUNCER)
+ ) { isOnGone, isOnBouncer, isOnAltBouncer ->
+ !isOnGone && !isOnBouncer && !isOnAltBouncer
+ }
+ .filter { it }
+ .sampleFilter(dismissAction) { it !is DismissAction.None }
+ .map {}
fun runDismissAnimationOnKeyguard(): Boolean {
return willAnimateDismissActionOnLockscreen.value
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardEnabledInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardEnabledInteractor.kt
index 66efde1c8358..4aef8084e5e7 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardEnabledInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardEnabledInteractor.kt
@@ -90,17 +90,13 @@ constructor(
* GONE.
*/
scope.launch {
- repository.isKeyguardEnabled
- .filter { enabled -> !enabled }
- .sampleCombine(
- biometricSettingsRepository.isCurrentUserInLockdown,
- internalTransitionInteractor.currentTransitionInfoInternal,
- )
- .collect { (_, inLockdown, currentTransitionInfo) ->
- if (currentTransitionInfo.to != KeyguardState.GONE && !inLockdown) {
+ if (!SceneContainerFlag.isEnabled) {
+ showKeyguardWhenReenabled
+ .filter { shouldDismiss -> shouldDismiss }
+ .collect {
transitionInteractor.startDismissKeyguardTransition("keyguard disabled")
}
- }
+ }
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractor.kt
index 859326a29b28..046e79cd04c4 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractor.kt
@@ -52,7 +52,6 @@ import com.android.systemui.statusbar.CommandQueue
import com.android.systemui.statusbar.notification.NotificationUtils.interpolate
import com.android.systemui.statusbar.notification.stack.domain.interactor.SharedNotificationContainerInteractor
import com.android.systemui.util.kotlin.Utils.Companion.sample as sampleCombine
-import com.android.systemui.util.kotlin.Utils.Companion.sampleFilter
import com.android.systemui.util.kotlin.pairwise
import com.android.systemui.util.kotlin.sample
import javax.inject.Inject
@@ -189,7 +188,7 @@ constructor(
* Whether the system is dreaming. [isDreaming] will be always be true when [isDozing] is true,
* but not vice-versa.
*/
- val isDreaming: Flow<Boolean> = repository.isDreaming
+ val isDreaming: StateFlow<Boolean> = repository.isDreaming
/** Whether the system is dreaming with an overlay active */
val isDreamingWithOverlay: Flow<Boolean> = repository.isDreamingWithOverlay
@@ -206,7 +205,8 @@ constructor(
trySendWithFailureLogging(
cameraLaunchSourceIntToModel(source),
TAG,
- "updated onCameraLaunchGestureDetected")
+ "updated onCameraLaunchGestureDetected"
+ )
}
}
@@ -251,13 +251,17 @@ constructor(
/** Keyguard can be clipped at the top as the shade is dragged */
val topClippingBounds: Flow<Int?> by lazy {
- repository.topClippingBounds
- .sampleFilter(
+ combineTransform(
keyguardTransitionInteractor
.transitionValue(scene = Scenes.Gone, stateWithoutSceneContainer = GONE)
- .onStart { emit(0f) }
- ) { goneValue ->
- goneValue != 1f
+ .map { it == 1f }
+ .onStart { emit(false) }
+ .distinctUntilChanged(),
+ repository.topClippingBounds
+ ) { isGone, topClippingBounds ->
+ if (!isGone) {
+ emit(topClippingBounds)
+ }
}
.distinctUntilChanged()
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardOcclusionInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardOcclusionInteractor.kt
index 5af38ba49b85..7f1e881c0863 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardOcclusionInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardOcclusionInteractor.kt
@@ -97,8 +97,8 @@ constructor(
powerInteractor.detailedWakefulness
.sample(
transitionInteractor.isFinishedIn(
- Scenes.Gone,
- stateWithoutSceneContainer = KeyguardState.GONE
+ scene = Scenes.Gone,
+ stateWithoutSceneContainer = KeyguardState.GONE,
),
::Pair
)
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardSurfaceBehindInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardSurfaceBehindInteractor.kt
index bcbdc9cca83b..377a03edf88d 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardSurfaceBehindInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardSurfaceBehindInteractor.kt
@@ -58,12 +58,12 @@ constructor(
val viewParams: Flow<KeyguardSurfaceBehindModel> =
combine(
transitionInteractor.isInTransition(
- Edge.create(to = Scenes.Gone),
- edgeWithoutSceneContainer = Edge.create(to = KeyguardState.GONE)
+ edge = Edge.create(to = Scenes.Gone),
+ edgeWithoutSceneContainer = Edge.create(to = KeyguardState.GONE),
),
transitionInteractor.isFinishedIn(
- Scenes.Gone,
- stateWithoutSceneContainer = KeyguardState.GONE
+ scene = Scenes.Gone,
+ stateWithoutSceneContainer = KeyguardState.GONE,
),
notificationLaunchInteractor.isLaunchAnimationRunning,
) { transitioningToGone, isOnGone, notifAnimationRunning ->
@@ -112,8 +112,8 @@ constructor(
notificationLaunchInteractor.isLaunchAnimationRunning
.sample(
transitionInteractor.isFinishedIn(
- Scenes.Gone,
- stateWithoutSceneContainer = KeyguardState.GONE
+ scene = Scenes.Gone,
+ stateWithoutSceneContainer = KeyguardState.GONE,
),
::Pair
)
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardTouchHandlingInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardTouchHandlingInteractor.kt
index 7a06d2fe9254..cd49c6a4d2e0 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardTouchHandlingInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardTouchHandlingInteractor.kt
@@ -129,13 +129,16 @@ constructor(
}
}
- /** Notifies that the user has long-pressed on the lock screen. */
- fun onLongPress() {
+ /** Notifies that the user has long-pressed on the lock screen.
+ *
+ * @param isA11yAction: Whether the action was performed as an a11y action
+ */
+ fun onLongPress(isA11yAction: Boolean = false) {
if (!isLongPressHandlingEnabled.value) {
return
}
- if (featureFlags.isEnabled(Flags.LOCK_SCREEN_LONG_PRESS_DIRECT_TO_WPP)) {
+ if (isA11yAction) {
showSettings()
} else {
showMenu()
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardWakeDirectlyToGoneInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardWakeDirectlyToGoneInteractor.kt
new file mode 100644
index 000000000000..f0bf4029ab39
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardWakeDirectlyToGoneInteractor.kt
@@ -0,0 +1,372 @@
+/*
+ * 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.keyguard.domain.interactor
+
+import android.annotation.SuppressLint
+import android.app.AlarmManager
+import android.app.PendingIntent
+import android.content.BroadcastReceiver
+import android.content.Context
+import android.content.Intent
+import android.content.IntentFilter
+import android.provider.Settings
+import android.provider.Settings.Secure
+import com.android.internal.widget.LockPatternUtils
+import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.dagger.qualifiers.Application
+import com.android.systemui.keyguard.KeyguardViewMediator
+import com.android.systemui.keyguard.KeyguardWmStateRefactor
+import com.android.systemui.keyguard.data.repository.KeyguardRepository
+import com.android.systemui.keyguard.shared.model.BiometricUnlockMode
+import com.android.systemui.keyguard.shared.model.KeyguardState
+import com.android.systemui.keyguard.shared.model.KeyguardState.Companion.deviceIsAsleepInState
+import com.android.systemui.keyguard.shared.model.KeyguardState.Companion.deviceIsAwakeInState
+import com.android.systemui.power.domain.interactor.PowerInteractor
+import com.android.systemui.power.shared.model.WakeSleepReason
+import com.android.systemui.user.domain.interactor.SelectedUserInteractor
+import com.android.systemui.util.kotlin.sample
+import com.android.systemui.util.settings.SecureSettings
+import com.android.systemui.util.settings.SystemSettings
+import com.android.systemui.util.time.SystemClock
+import javax.inject.Inject
+import kotlin.math.max
+import kotlin.math.min
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.combine
+import kotlinx.coroutines.flow.distinctUntilChanged
+import kotlinx.coroutines.flow.distinctUntilChangedBy
+import kotlinx.coroutines.flow.map
+import kotlinx.coroutines.launch
+
+/**
+ * Logic related to the ability to wake directly to GONE from asleep (AOD/DOZING), without going
+ * through LOCKSCREEN or a BOUNCER state.
+ *
+ * This is possible in the following scenarios:
+ * - The lockscreen is disabled, either from an app request (SUW does this), or by the security
+ * "None" setting.
+ * - A biometric authentication event occurred while we were asleep (fingerprint auth, etc). This
+ * specifically is referred to throughout the codebase as "wake and unlock".
+ * - The screen timed out, but the "lock after screen timeout" duration has not elapsed.
+ * - The power button was pressed, but "power button instantly locks" is disabled and the "lock
+ * after screen timeout" duration has not elapsed.
+ *
+ * In these cases, no (further) authentication is required, and we can transition directly from
+ * AOD/DOZING -> GONE.
+ */
+@SysUISingleton
+class KeyguardWakeDirectlyToGoneInteractor
+@Inject
+constructor(
+ @Application private val scope: CoroutineScope,
+ private val context: Context,
+ private val repository: KeyguardRepository,
+ private val systemClock: SystemClock,
+ private val alarmManager: AlarmManager,
+ private val transitionInteractor: KeyguardTransitionInteractor,
+ private val powerInteractor: PowerInteractor,
+ private val secureSettings: SecureSettings,
+ private val lockPatternUtils: LockPatternUtils,
+ private val systemSettings: SystemSettings,
+ private val selectedUserInteractor: SelectedUserInteractor,
+) {
+
+ /**
+ * Whether the lockscreen was disabled as of the last wake/sleep event, according to
+ * LockPatternUtils.
+ *
+ * This will always be true if [repository.isKeyguardServiceEnabled]=false, but it can also be
+ * true when the keyguard service is enabled if the lockscreen has been disabled via adb using
+ * the `adb shell locksettings set-disabled true` command, which is often done in tests.
+ *
+ * Unlike keyguardServiceEnabled, changes to this value should *not* immediately show or hide
+ * the keyguard. If the lockscreen is disabled in this way, it will just not show on the next
+ * sleep/wake.
+ */
+ private val isLockscreenDisabled: Flow<Boolean> =
+ powerInteractor.isAwake.map { isLockscreenDisabled() }
+
+ /**
+ * Whether we can wake from AOD/DOZING directly to GONE, bypassing LOCKSCREEN/BOUNCER states.
+ *
+ * This is possible in the following cases:
+ * - Keyguard is disabled, either from an app request or from security being set to "None".
+ * - We're wake and unlocking (fingerprint auth occurred while asleep).
+ * - We're allowed to ignore auth and return to GONE, due to timeouts not elapsing.
+ */
+ val canWakeDirectlyToGone =
+ combine(
+ repository.isKeyguardEnabled,
+ isLockscreenDisabled,
+ repository.biometricUnlockState,
+ repository.canIgnoreAuthAndReturnToGone,
+ ) {
+ keyguardEnabled,
+ isLockscreenDisabled,
+ biometricUnlockState,
+ canIgnoreAuthAndReturnToGone ->
+ (!keyguardEnabled || isLockscreenDisabled) ||
+ BiometricUnlockMode.isWakeAndUnlock(biometricUnlockState.mode) ||
+ canIgnoreAuthAndReturnToGone
+ }
+ .distinctUntilChanged()
+
+ /**
+ * Counter that is incremented every time we wake up or stop dreaming. Upon sleeping/dreaming,
+ * we put the current value of this counter into the intent extras of the timeout alarm intent.
+ * If this value has changed by the time we receive the intent, it is discarded since it's out
+ * of date.
+ */
+ var timeoutCounter = 0
+
+ var isAwake = false
+
+ private val broadcastReceiver: BroadcastReceiver =
+ object : BroadcastReceiver() {
+ override fun onReceive(context: Context, intent: Intent) {
+ if (DELAYED_KEYGUARD_ACTION == intent.action) {
+ val sequence = intent.getIntExtra(SEQ_EXTRA_KEY, 0)
+ synchronized(this) {
+ if (timeoutCounter == sequence) {
+ // If the sequence # matches, we have not woken up or stopped dreaming
+ // since
+ // the alarm was set. That means this is still relevant - the lock
+ // timeout
+ // has elapsed, so let the repository know that we can no longer return
+ // to
+ // GONE without authenticating.
+ repository.setCanIgnoreAuthAndReturnToGone(false)
+ }
+ }
+ }
+ }
+ }
+
+ init {
+ setOrCancelAlarmFromWakefulness()
+ listenForWakeToClearCanIgnoreAuth()
+ registerBroadcastReceiver()
+ }
+
+ fun onDreamingStarted() {
+ // If we start dreaming while awake, lock after the normal timeout.
+ if (isAwake) {
+ setResetCanIgnoreAuthAlarm()
+ }
+ }
+
+ fun onDreamingStopped() {
+ // Cancel the timeout if we stop dreaming while awake.
+ if (isAwake) {
+ cancelCanIgnoreAuthAlarm()
+ }
+ }
+
+ private fun setOrCancelAlarmFromWakefulness() {
+ scope.launch {
+ powerInteractor.detailedWakefulness
+ .distinctUntilChangedBy { it.isAwake() }
+ .sample(transitionInteractor.currentKeyguardState, ::Pair)
+ .collect { (wakefulness, currentState) ->
+ // Save isAwake for use in onDreamingStarted/onDreamingStopped.
+ this@KeyguardWakeDirectlyToGoneInteractor.isAwake = wakefulness.isAwake()
+
+ // If we're sleeping from GONE, check the timeout and lock instantly settings.
+ // These are not relevant if we're coming from non-GONE states.
+ if (!isAwake && currentState == KeyguardState.GONE) {
+ val lockTimeoutDuration = getCanIgnoreAuthAndReturnToGoneDuration()
+
+ // If the screen timed out and went to sleep, and the lock timeout is > 0ms,
+ // then we can return to GONE until that duration elapses. If the power
+ // button was pressed but "instantly locks" is disabled, then we can also
+ // return to GONE until the timeout duration elapses.
+ if (
+ (wakefulness.lastSleepReason == WakeSleepReason.TIMEOUT &&
+ lockTimeoutDuration > 0) ||
+ (wakefulness.lastSleepReason == WakeSleepReason.POWER_BUTTON &&
+ !willLockImmediately())
+ ) {
+
+ // Let the repository know that we can return to GONE until we notify
+ // it otherwise.
+ repository.setCanIgnoreAuthAndReturnToGone(true)
+ setResetCanIgnoreAuthAlarm()
+ }
+ } else if (isAwake) {
+ // If we're waking up, ignore the alarm if it goes off since it's no longer
+ // relevant. Once a wake KeyguardTransition is started, we'll also clear the
+ // canIgnoreAuthAndReturnToGone value in listenForWakeToClearCanIgnoreAuth.
+ cancelCanIgnoreAuthAlarm()
+ }
+ }
+ }
+ }
+
+ /** Clears the canIgnoreAuthAndReturnToGone value upon waking. */
+ private fun listenForWakeToClearCanIgnoreAuth() {
+ scope.launch {
+ transitionInteractor
+ .isInTransitionWhere(
+ fromStatePredicate = { deviceIsAsleepInState(it) },
+ toStatePredicate = { deviceIsAwakeInState(it) },
+ )
+ .collect {
+ // This value is reset when the timeout alarm fires, but if the device is woken
+ // back up before then, it needs to be reset here. The alarm is cancelled
+ // immediately upon waking up, but since this value is used by keyguard
+ // transition internals to decide whether we can transition to GONE, wait until
+ // that decision is made before resetting it.
+ repository.setCanIgnoreAuthAndReturnToGone(false)
+ }
+ }
+ }
+
+ /**
+ * Registers the broadcast receiver to receive the alarm intent.
+ *
+ * TODO(b/351817381): Investigate using BroadcastDispatcher vs. ignoring this lint warning.
+ */
+ @SuppressLint("WrongConstant", "RegisterReceiverViaContext")
+ private fun registerBroadcastReceiver() {
+ val delayedActionFilter = IntentFilter()
+ delayedActionFilter.addAction(KeyguardViewMediator.DELAYED_KEYGUARD_ACTION)
+ // TODO(b/346803756): Listen for DELAYED_LOCK_PROFILE_ACTION.
+ delayedActionFilter.priority = IntentFilter.SYSTEM_HIGH_PRIORITY
+ context.registerReceiver(
+ broadcastReceiver,
+ delayedActionFilter,
+ SYSTEMUI_PERMISSION,
+ null /* scheduler */,
+ Context.RECEIVER_EXPORTED_UNAUDITED
+ )
+ }
+
+ /** Set an alarm for */
+ private fun setResetCanIgnoreAuthAlarm() {
+ if (!KeyguardWmStateRefactor.isEnabled) {
+ return
+ }
+
+ val intent =
+ Intent(DELAYED_KEYGUARD_ACTION).apply {
+ setPackage(context.packageName)
+ putExtra(SEQ_EXTRA_KEY, timeoutCounter)
+ addFlags(Intent.FLAG_RECEIVER_FOREGROUND)
+ }
+
+ val sender =
+ PendingIntent.getBroadcast(
+ context,
+ 0,
+ intent,
+ PendingIntent.FLAG_CANCEL_CURRENT or PendingIntent.FLAG_IMMUTABLE
+ )
+
+ val time = systemClock.elapsedRealtime() + getCanIgnoreAuthAndReturnToGoneDuration()
+ alarmManager.setExactAndAllowWhileIdle(AlarmManager.ELAPSED_REALTIME_WAKEUP, time, sender)
+
+ // TODO(b/346803756): Migrate support for child profiles.
+ }
+
+ /**
+ * Cancel the timeout by incrementing the counter so that we ignore the intent when it's
+ * received.
+ */
+ private fun cancelCanIgnoreAuthAlarm() {
+ timeoutCounter++
+ }
+
+ /**
+ * Whether pressing the power button locks the device immediately; vs. waiting for a specified
+ * timeout first.
+ */
+ private fun willLockImmediately(
+ userId: Int = selectedUserInteractor.getSelectedUserId()
+ ): Boolean {
+ return lockPatternUtils.getPowerButtonInstantlyLocks(userId) ||
+ !lockPatternUtils.isSecure(userId)
+ }
+
+ /**
+ * Returns whether the lockscreen is disabled, either because the keyguard service is disabled
+ * or because an adb command has disabled the lockscreen.
+ */
+ private fun isLockscreenDisabled(
+ userId: Int = selectedUserInteractor.getSelectedUserId()
+ ): Boolean {
+ return lockPatternUtils.isLockScreenDisabled(userId)
+ }
+
+ /**
+ * Returns the duration within which we can return to GONE without auth after a screen timeout
+ * (or power button press, if lock instantly is disabled).
+ *
+ * This takes into account the user's settings as well as device policy maximums.
+ */
+ private fun getCanIgnoreAuthAndReturnToGoneDuration(
+ userId: Int = selectedUserInteractor.getSelectedUserId()
+ ): Long {
+ // The timeout duration from settings (Security > Device Unlock > Gear icon > "Lock after
+ // screen timeout".
+ val durationSetting: Long =
+ secureSettings
+ .getIntForUser(
+ Secure.LOCK_SCREEN_LOCK_AFTER_TIMEOUT,
+ KEYGUARD_CAN_IGNORE_AUTH_DURATION,
+ userId
+ )
+ .toLong()
+
+ // Device policy maximum timeout.
+ val durationDevicePolicyMax =
+ lockPatternUtils.devicePolicyManager.getMaximumTimeToLock(null, userId)
+
+ return if (durationDevicePolicyMax <= 0) {
+ durationSetting
+ } else {
+ var displayTimeout =
+ systemSettings
+ .getIntForUser(
+ Settings.System.SCREEN_OFF_TIMEOUT,
+ KEYGUARD_DISPLAY_TIMEOUT_DELAY_DEFAULT,
+ userId
+ )
+ .toLong()
+
+ // Ignore negative values. I don't know why this would be negative, but this check has
+ // been around since 2016 and I see no upside to removing it.
+ displayTimeout = max(displayTimeout, 0)
+
+ // Respect the shorter of: the device policy (maximum duration between last user action
+ // and fully locking) or the "Lock after screen timeout" setting.
+ max(min(durationDevicePolicyMax - displayTimeout, durationSetting), 0)
+ }
+ }
+
+ companion object {
+ private const val DELAYED_KEYGUARD_ACTION =
+ "com.android.internal.policy.impl.PhoneWindowManager.DELAYED_KEYGUARD"
+ private const val DELAYED_LOCK_PROFILE_ACTION =
+ "com.android.internal.policy.impl.PhoneWindowManager.DELAYED_LOCK"
+ private const val SYSTEMUI_PERMISSION = "com.android.systemui.permission.SELF"
+ private const val SEQ_EXTRA_KEY = "count"
+
+ private const val KEYGUARD_CAN_IGNORE_AUTH_DURATION = 5000
+ private const val KEYGUARD_DISPLAY_TIMEOUT_DELAY_DEFAULT = 30000
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/TransitionInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/TransitionInteractor.kt
index bbc3d7699dee..d06ee645652c 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/TransitionInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/TransitionInteractor.kt
@@ -122,9 +122,14 @@ sealed class TransitionInteractor(
* SHOW_WHEN_LOCKED activity, or back to [KeyguardState.GONE], for some power button launch
* gesture cases. If so, start the transition.
*
+ * @param startTransition A callback which is triggered to start the transition to the desired
+ * KeyguardState. Allows caller to hook into the transition start if needed.
+ *
* Returns true if a transition was started, false otherwise.
*/
- suspend fun maybeStartTransitionToOccludedOrInsecureCamera(): Boolean {
+ suspend fun maybeStartTransitionToOccludedOrInsecureCamera(
+ startTransition: suspend (state: KeyguardState, reason: String) -> UUID?
+ ): Boolean {
// The refactor is required for the occlusion interactor to work.
KeyguardWmStateRefactor.isUnexpectedlyInLegacyMode()
@@ -136,10 +141,7 @@ sealed class TransitionInteractor(
if (!maybeHandleInsecurePowerGesture()) {
// Otherwise, the double tap gesture occurred while not GONE and not dismissable,
// which means we will launch the secure camera, which OCCLUDES the keyguard.
- startTransitionTo(
- KeyguardState.OCCLUDED,
- ownerReason = "Power button gesture on lockscreen"
- )
+ startTransition(KeyguardState.OCCLUDED, "Power button gesture on lockscreen")
}
return true
@@ -147,10 +149,7 @@ sealed class TransitionInteractor(
// A SHOW_WHEN_LOCKED activity is on top of the task stack. Transition to OCCLUDED so
// it's visible.
// TODO(b/307976454) - Centralize transition to DREAMING here.
- startTransitionTo(
- KeyguardState.OCCLUDED,
- ownerReason = "SHOW_WHEN_LOCKED activity on top"
- )
+ startTransition(KeyguardState.OCCLUDED, "SHOW_WHEN_LOCKED activity on top")
return true
} else {
@@ -168,8 +167,7 @@ sealed class TransitionInteractor(
*/
@Deprecated("Will be merged into maybeStartTransitionToOccludedOrInsecureCamera")
suspend fun maybeHandleInsecurePowerGesture(): Boolean {
- // TODO(b/336576536): Check if adaptation for scene framework is needed
- if (SceneContainerFlag.isEnabled) return true
+ if (SceneContainerFlag.isEnabled) return false
if (keyguardOcclusionInteractor.shouldTransitionFromPowerButtonGesture()) {
if (keyguardInteractor.isKeyguardDismissible.value) {
startTransitionTo(
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/WindowManagerLockscreenVisibilityInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/WindowManagerLockscreenVisibilityInteractor.kt
index 3355ffd83138..e1b333dd1d06 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/WindowManagerLockscreenVisibilityInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/WindowManagerLockscreenVisibilityInteractor.kt
@@ -21,14 +21,17 @@ package com.android.systemui.keyguard.domain.interactor
import com.android.compose.animation.scene.ObservableTransitionState
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.deviceentry.domain.interactor.DeviceEntryInteractor
+import com.android.systemui.keyguard.data.repository.KeyguardTransitionRepository
import com.android.systemui.keyguard.shared.model.BiometricUnlockMode
import com.android.systemui.keyguard.shared.model.Edge
import com.android.systemui.keyguard.shared.model.KeyguardState
+import com.android.systemui.keyguard.shared.model.KeyguardState.Companion.deviceIsAsleepInState
import com.android.systemui.keyguard.shared.model.TransitionState
import com.android.systemui.scene.domain.interactor.SceneInteractor
import com.android.systemui.scene.shared.flag.SceneContainerFlag
import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.statusbar.notification.domain.interactor.NotificationLaunchAnimationInteractor
+import com.android.systemui.util.kotlin.Utils.Companion.toTriple
import com.android.systemui.util.kotlin.sample
import com.android.systemui.utils.coroutines.flow.flatMapLatestConflated
import dagger.Lazy
@@ -41,11 +44,13 @@ import kotlinx.coroutines.flow.flatMapLatest
import kotlinx.coroutines.flow.flowOf
import kotlinx.coroutines.flow.map
+@OptIn(ExperimentalCoroutinesApi::class)
@SysUISingleton
class WindowManagerLockscreenVisibilityInteractor
@Inject
constructor(
keyguardInteractor: KeyguardInteractor,
+ transitionRepository: KeyguardTransitionRepository,
transitionInteractor: KeyguardTransitionInteractor,
surfaceBehindInteractor: KeyguardSurfaceBehindInteractor,
fromLockscreenInteractor: FromLockscreenTransitionInteractor,
@@ -54,9 +59,15 @@ constructor(
notificationLaunchAnimationInteractor: NotificationLaunchAnimationInteractor,
sceneInteractor: Lazy<SceneInteractor>,
deviceEntryInteractor: Lazy<DeviceEntryInteractor>,
+ wakeToGoneInteractor: KeyguardWakeDirectlyToGoneInteractor,
) {
private val defaultSurfaceBehindVisibility =
- transitionInteractor.finishedKeyguardState.map(::isSurfaceVisible)
+ combine(
+ transitionInteractor.finishedKeyguardState,
+ wakeToGoneInteractor.canWakeDirectlyToGone,
+ ) { finishedState, canWakeDirectlyToGone ->
+ isSurfaceVisible(finishedState) || canWakeDirectlyToGone
+ }
/**
* Surface visibility provided by the From*TransitionInteractor responsible for the currently
@@ -71,6 +82,7 @@ constructor(
private val transitionSpecificSurfaceBehindVisibility: Flow<Boolean?> =
transitionInteractor.startedKeyguardTransitionStep
.flatMapLatest { startedStep ->
+ SceneContainerFlag.assertInLegacyMode()
when (startedStep.from) {
KeyguardState.LOCKSCREEN -> {
fromLockscreenInteractor.surfaceBehindVisibility
@@ -203,9 +215,13 @@ constructor(
if (SceneContainerFlag.isEnabled) {
isDeviceNotEntered
} else {
- transitionInteractor.currentKeyguardState
- .sample(transitionInteractor.startedStepWithPrecedingStep, ::Pair)
- .map { (currentState, startedWithPrev) ->
+ combine(
+ transitionInteractor.currentKeyguardState,
+ wakeToGoneInteractor.canWakeDirectlyToGone,
+ ::Pair
+ )
+ .sample(transitionInteractor.startedStepWithPrecedingStep, ::toTriple)
+ .map { (currentState, canWakeDirectlyToGone, startedWithPrev) ->
val startedFromStep = startedWithPrev.previousValue
val startedStep = startedWithPrev.newValue
val returningToGoneAfterCancellation =
@@ -213,16 +229,33 @@ constructor(
startedFromStep.transitionState == TransitionState.CANCELED &&
startedFromStep.from == KeyguardState.GONE
- if (!returningToGoneAfterCancellation) {
- // By default, apply the lockscreen visibility of the current state.
- deviceEntryInteractor.get().isLockscreenEnabled() &&
- KeyguardState.lockscreenVisibleInState(currentState)
- } else {
- // If we're transitioning to GONE after a prior canceled transition from
- // GONE, then this is the camera launch transition from an asleep state back
- // to GONE. We don't want to show the lockscreen since we're aborting the
- // lock and going back to GONE.
+ val transitionInfo = transitionRepository.currentTransitionInfoInternal.value
+ val wakingDirectlyToGone =
+ deviceIsAsleepInState(transitionInfo.from) &&
+ transitionInfo.to == KeyguardState.GONE
+
+ if (returningToGoneAfterCancellation || wakingDirectlyToGone) {
+ // GONE -> AOD/DOZING (cancel) -> GONE is the camera launch transition,
+ // which means we never want to show the lockscreen throughout the
+ // transition. Same for waking directly to gone, due to the lockscreen being
+ // disabled or because the device was woken back up before the lock timeout
+ // duration elapsed.
KeyguardState.lockscreenVisibleInState(KeyguardState.GONE)
+ } else if (canWakeDirectlyToGone) {
+ // Never show the lockscreen if we can wake directly to GONE. This means
+ // that the lock timeout has not yet elapsed, or the keyguard is disabled.
+ // In either case, we don't show the activity lock screen until one of those
+ // conditions changes.
+ false
+ } else if (
+ currentState == KeyguardState.DREAMING &&
+ deviceEntryInteractor.get().isUnlocked.value
+ ) {
+ // Dreams dismiss keyguard and return to GONE if they can.
+ false
+ } else {
+ // Otherwise, use the visibility of the current state.
+ KeyguardState.lockscreenVisibleInState(currentState)
}
}
.distinctUntilChanged()
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/shared/model/KeyguardState.kt b/packages/SystemUI/src/com/android/systemui/keyguard/shared/model/KeyguardState.kt
index 8db6a43efc07..24db3c2c70a2 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/shared/model/KeyguardState.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/shared/model/KeyguardState.kt
@@ -61,6 +61,11 @@ enum class KeyguardState {
* The security screen prompt UI, containing PIN, Password, Pattern for the user to verify their
* credentials.
*/
+ @Deprecated(
+ "This state won't exist anymore when scene container gets enabled. If you are " +
+ "writing prod code today, make sure to either use flag aware APIs in " +
+ "[KeyguardTransitionInteractor] or flag appropriately with [SceneContainerFlag]."
+ )
PRIMARY_BOUNCER,
/**
* Device is actively displaying keyguard UI and is not in low-power mode. Device may be
@@ -72,12 +77,22 @@ enum class KeyguardState {
* hub UI. From this state, the user can swipe from the left edge to go back to the lock screen
* or dream, as well as swipe down for the notifications and up for the bouncer.
*/
+ @Deprecated(
+ "This state won't exist anymore when scene container gets enabled. If you are " +
+ "writing prod code today, make sure to either use flag aware APIs in " +
+ "[KeyguardTransitionInteractor] or flag appropriately with [SceneContainerFlag]."
+ )
GLANCEABLE_HUB,
/**
* Keyguard is no longer visible. In most cases the user has just authenticated and keyguard is
* being removed, but there are other cases where the user is swiping away keyguard, such as
* with SWIPE security method or face unlock without bypass.
*/
+ @Deprecated(
+ "This state won't exist anymore when scene container gets enabled. If you are " +
+ "writing prod code today, make sure to either use flag aware APIs in " +
+ "[KeyguardTransitionInteractor] or flag appropriately with [SceneContainerFlag]."
+ )
GONE,
/**
* Only used in scene framework. This means we are currently on any scene framework scene that
@@ -143,6 +158,7 @@ enum class KeyguardState {
/** Whether the lockscreen is visible when we're FINISHED in the given state. */
fun lockscreenVisibleInState(state: KeyguardState): Boolean {
+ // TODO(b/349784682): Transform deprecated states for Flexiglass
return state != GONE
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/DeviceEntryIconViewBinder.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/DeviceEntryIconViewBinder.kt
index 76f7749754a2..1b9788f2d401 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/DeviceEntryIconViewBinder.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/DeviceEntryIconViewBinder.kt
@@ -74,8 +74,8 @@ object DeviceEntryIconViewBinder {
val bgView = view.bgView
longPressHandlingView.listener =
object : LongPressHandlingView.Listener {
- override fun onLongPressDetected(view: View, x: Int, y: Int) {
- if (falsingManager.isFalseLongTap(FalsingManager.LOW_PENALTY)) {
+ override fun onLongPressDetected(view: View, x: Int, y: Int, isA11yAction: Boolean) {
+ if (!isA11yAction && falsingManager.isFalseLongTap(FalsingManager.LOW_PENALTY)) {
return
}
vibratorHelper.performHapticFeedback(
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardLongPressViewBinder.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardLongPressViewBinder.kt
index 057b4f9a671d..b387855ad553 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardLongPressViewBinder.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardLongPressViewBinder.kt
@@ -18,12 +18,15 @@
package com.android.systemui.keyguard.ui.binder
import android.view.View
+import android.view.accessibility.AccessibilityNodeInfo
+import androidx.core.view.accessibility.AccessibilityNodeInfoCompat
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.repeatOnLifecycle
import com.android.app.tracing.coroutines.launch
import com.android.systemui.common.ui.view.LongPressHandlingView
import com.android.systemui.keyguard.ui.viewmodel.KeyguardTouchHandlingViewModel
import com.android.systemui.lifecycle.repeatWhenAttached
+import com.android.systemui.res.R
import com.android.systemui.plugins.FalsingManager
object KeyguardLongPressViewBinder {
@@ -43,14 +46,19 @@ object KeyguardLongPressViewBinder {
onSingleTap: () -> Unit,
falsingManager: FalsingManager,
) {
+ view.accessibilityHintLongPressAction =
+ AccessibilityNodeInfo.AccessibilityAction(
+ AccessibilityNodeInfoCompat.ACTION_LONG_CLICK,
+ view.resources.getString(R.string.lock_screen_settings)
+ )
view.listener =
object : LongPressHandlingView.Listener {
- override fun onLongPressDetected(view: View, x: Int, y: Int) {
- if (falsingManager.isFalseLongTap(FalsingManager.LOW_PENALTY)) {
+ override fun onLongPressDetected(view: View, x: Int, y: Int, isA11yAction: Boolean) {
+ if (!isA11yAction && falsingManager.isFalseLongTap(FalsingManager.LOW_PENALTY)) {
return
}
- viewModel.onLongPress()
+ viewModel.onLongPress(isA11yAction)
}
override fun onSingleTapDetected(view: View) {
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardRootViewBinder.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardRootViewBinder.kt
index 8f149fbe99de..f96f053b8da1 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardRootViewBinder.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardRootViewBinder.kt
@@ -37,6 +37,7 @@ import androidx.activity.setViewTreeOnBackPressedDispatcherOwner
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.repeatOnLifecycle
import com.android.app.animation.Interpolators
+import com.android.app.tracing.coroutines.launch
import com.android.internal.jank.InteractionJankMonitor
import com.android.internal.jank.InteractionJankMonitor.CUJ_SCREEN_OFF_SHOW_AOD
import com.android.systemui.Flags.newAodTransition
@@ -80,6 +81,7 @@ import com.android.systemui.util.ui.isAnimating
import com.android.systemui.util.ui.stopAnimating
import com.android.systemui.util.ui.value
import kotlin.math.min
+import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.DisposableHandle
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.coroutineScope
@@ -110,6 +112,7 @@ object KeyguardRootViewBinder {
vibratorHelper: VibratorHelper?,
falsingManager: FalsingManager?,
keyguardViewMediator: KeyguardViewMediator?,
+ mainImmediateDispatcher: CoroutineDispatcher,
): DisposableHandle {
val disposables = DisposableHandles()
val childViews = mutableMapOf<Int, View>()
@@ -128,6 +131,30 @@ object KeyguardRootViewBinder {
val burnInParams = MutableStateFlow(BurnInParameters())
val viewState = ViewStateAccessor(alpha = { view.alpha })
+
+ disposables +=
+ view.repeatWhenAttached(mainImmediateDispatcher) {
+ repeatOnLifecycle(Lifecycle.State.CREATED) {
+ if (MigrateClocksToBlueprint.isEnabled) {
+ launch("$TAG#topClippingBounds") {
+ val clipBounds = Rect()
+ viewModel.topClippingBounds.collect { clipTop ->
+ if (clipTop == null) {
+ view.setClipBounds(null)
+ } else {
+ clipBounds.apply {
+ top = clipTop
+ left = view.getLeft()
+ right = view.getRight()
+ bottom = view.getBottom()
+ }
+ view.setClipBounds(clipBounds)
+ }
+ }
+ }
+ }
+ }
+ }
disposables +=
view.repeatWhenAttached {
repeatOnLifecycle(Lifecycle.State.CREATED) {
@@ -192,23 +219,6 @@ object KeyguardRootViewBinder {
}
launch {
- val clipBounds = Rect()
- viewModel.topClippingBounds.collect { clipTop ->
- if (clipTop == null) {
- view.setClipBounds(null)
- } else {
- clipBounds.apply {
- top = clipTop
- left = view.getLeft()
- right = view.getRight()
- bottom = view.getBottom()
- }
- view.setClipBounds(clipBounds)
- }
- }
- }
-
- launch {
viewModel.lockscreenStateAlpha(viewState).collect { alpha ->
childViews[statusViewId]?.alpha = alpha
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/preview/KeyguardPreviewRenderer.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/preview/KeyguardPreviewRenderer.kt
index 4f0ac42a0e87..bc5b7b923082 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/preview/KeyguardPreviewRenderer.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/preview/KeyguardPreviewRenderer.kt
@@ -394,6 +394,7 @@ constructor(
null, // device entry haptics not required for preview mode
null, // falsing manager not required for preview mode
null, // keyguard view mediator is not required for preview mode
+ mainDispatcher,
)
}
rootView.addView(
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/preview/KeyguardRemotePreviewManager.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/preview/KeyguardRemotePreviewManager.kt
index 940d1e10651a..0532ee285d1d 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/preview/KeyguardRemotePreviewManager.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/preview/KeyguardRemotePreviewManager.kt
@@ -25,6 +25,8 @@ import android.os.Messenger
import android.util.ArrayMap
import android.util.Log
import androidx.annotation.VisibleForTesting
+import com.android.app.tracing.coroutines.runBlocking
+import com.android.systemui.Flags
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.dagger.qualifiers.Background
@@ -55,7 +57,14 @@ constructor(
var observer: PreviewLifecycleObserver? = null
return try {
- val renderer = previewRendererFactory.create(request)
+ val renderer =
+ if (Flags.lockscreenPreviewRendererCreateOnMainThread()) {
+ runBlocking ("$TAG#previewRendererFactory.create", mainDispatcher) {
+ previewRendererFactory.create(request)
+ }
+ } else {
+ previewRendererFactory.create(request)
+ }
observer =
PreviewLifecycleObserver(
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/SideFpsProgressBar.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/SideFpsProgressBar.kt
index 853f1769994e..1fd609dba637 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/SideFpsProgressBar.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/SideFpsProgressBar.kt
@@ -26,6 +26,7 @@ import android.view.ViewGroup.LayoutParams.MATCH_PARENT
import android.view.WindowManager
import android.widget.ProgressBar
import androidx.core.view.isGone
+import com.android.app.viewcapture.ViewCaptureAwareWindowManager
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.res.R
import javax.inject.Inject
@@ -37,7 +38,7 @@ class SideFpsProgressBar
@Inject
constructor(
private val layoutInflater: LayoutInflater,
- private val windowManager: WindowManager,
+ private val windowManager: ViewCaptureAwareWindowManager,
) {
private var overlayView: View? = null
@@ -90,7 +91,7 @@ constructor(
) {
if (overlayView == null) {
overlayView = layoutInflater.inflate(R.layout.sidefps_progress_bar, null, false)
- windowManager.addView(overlayView, overlayViewParams)
+ windowManager.addView(requireNotNull(overlayView), overlayViewParams)
progressBar?.pivotX = 0.0f
progressBar?.pivotY = 0.0f
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/AccessibilityActionsSection.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/AccessibilityActionsSection.kt
index 5e5330ebd6ec..717a89801ba4 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/AccessibilityActionsSection.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/AccessibilityActionsSection.kt
@@ -21,7 +21,7 @@ import android.content.Context
import android.view.View
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.constraintlayout.widget.ConstraintSet
-import com.android.systemui.Flags
+import com.android.systemui.communal.domain.interactor.CommunalSettingsInteractor
import com.android.systemui.keyguard.shared.model.KeyguardSection
import com.android.systemui.keyguard.ui.binder.AccessibilityActionsViewBinder
import com.android.systemui.keyguard.ui.viewmodel.AccessibilityActionsViewModel
@@ -38,12 +38,13 @@ class AccessibilityActionsSection
@Inject
constructor(
private val context: Context,
+ private val communalSettingsInteractor: CommunalSettingsInteractor,
private val accessibilityActionsViewModel: AccessibilityActionsViewModel,
) : KeyguardSection() {
private var accessibilityActionsViewHandle: DisposableHandle? = null
override fun addViews(constraintLayout: ConstraintLayout) {
- if (!communalEnabled(context)) {
+ if (!communalSettingsInteractor.isCommunalFlagEnabled()) {
return
}
val view = View(constraintLayout.context).apply { id = R.id.accessibility_actions_view }
@@ -51,7 +52,7 @@ constructor(
}
override fun bindData(constraintLayout: ConstraintLayout) {
- if (!communalEnabled(context)) {
+ if (!communalSettingsInteractor.isCommunalFlagEnabled()) {
return
}
accessibilityActionsViewHandle =
@@ -100,7 +101,3 @@ constructor(
constraintLayout.removeView(R.id.accessibility_actions_view)
}
}
-
-private fun communalEnabled(context: Context): Boolean {
- return context.resources.getBoolean(R.bool.config_communalServiceEnabled) && Flags.communalHub()
-}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/ClockSection.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/ClockSection.kt
index 91e48b56b4f5..c8fe55d2a7c4 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/ClockSection.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/ClockSection.kt
@@ -25,7 +25,6 @@ import androidx.constraintlayout.widget.ConstraintSet
import androidx.constraintlayout.widget.ConstraintSet.BOTTOM
import androidx.constraintlayout.widget.ConstraintSet.END
import androidx.constraintlayout.widget.ConstraintSet.GONE
-import androidx.constraintlayout.widget.ConstraintSet.MATCH_CONSTRAINT
import androidx.constraintlayout.widget.ConstraintSet.PARENT_ID
import androidx.constraintlayout.widget.ConstraintSet.START
import androidx.constraintlayout.widget.ConstraintSet.TOP
@@ -184,7 +183,11 @@ constructor(
getDimen(ENHANCED_SMARTSPACE_HEIGHT)
connect(R.id.lockscreen_clock_view_large, TOP, PARENT_ID, TOP, largeClockTopMargin)
constrainWidth(R.id.lockscreen_clock_view_large, WRAP_CONTENT)
- constrainHeight(R.id.lockscreen_clock_view_large, MATCH_CONSTRAINT)
+
+ // The following two lines make lockscreen_clock_view_large is constrained to available
+ // height when it goes beyond constraints; otherwise, it use WRAP_CONTENT
+ constrainHeight(R.id.lockscreen_clock_view_large, WRAP_CONTENT)
+ constrainMaxHeight(R.id.lockscreen_clock_view_large, 0)
constrainWidth(R.id.lockscreen_clock_view, WRAP_CONTENT)
constrainHeight(
R.id.lockscreen_clock_view,
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/AlternateBouncerToGoneTransitionViewModel.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/AlternateBouncerToGoneTransitionViewModel.kt
index bb4fb7961ed0..e9db1d23ec3c 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/AlternateBouncerToGoneTransitionViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/AlternateBouncerToGoneTransitionViewModel.kt
@@ -83,6 +83,7 @@ constructor(
MathUtils.lerp(startAlpha, 0f, it)
}
},
+ onFinish = { 1f },
)
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/BouncerToGoneFlows.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/BouncerToGoneFlows.kt
index caa043622e18..8485a265fc70 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/BouncerToGoneFlows.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/BouncerToGoneFlows.kt
@@ -22,6 +22,7 @@ import com.android.systemui.keyguard.domain.interactor.KeyguardDismissActionInte
import com.android.systemui.keyguard.shared.model.Edge
import com.android.systemui.keyguard.shared.model.KeyguardState
import com.android.systemui.keyguard.shared.model.KeyguardState.GONE
+import com.android.systemui.keyguard.shared.model.KeyguardState.PRIMARY_BOUNCER
import com.android.systemui.keyguard.shared.model.ScrimAlpha
import com.android.systemui.keyguard.ui.KeyguardTransitionAnimationFlow
import com.android.systemui.scene.shared.flag.SceneContainerFlag
@@ -75,9 +76,12 @@ constructor(
return animationFlow
.setup(
duration = duration,
- // TODO(b/330311871): from can be PRIMARY_BOUNCER which would be a scene -> scene
- // transition
- edge = Edge.create(from = from, to = Scenes.Gone)
+ edge =
+ if (from == PRIMARY_BOUNCER) {
+ Edge.INVALID
+ } else {
+ Edge.create(from = from, to = Scenes.Gone)
+ }
)
.setupWithoutSceneContainer(
edge = Edge.create(from = from, to = GONE),
@@ -105,9 +109,12 @@ constructor(
animationFlow
.setup(
duration = duration,
- // TODO(b/330311871): from can be PRIMARY_BOUNCER which would be a scene ->
- // scene transition
- edge = Edge.create(from = fromState, to = Scenes.Gone),
+ edge =
+ if (fromState == PRIMARY_BOUNCER) {
+ Edge.INVALID
+ } else {
+ Edge.create(from = fromState, to = Scenes.Gone)
+ }
)
.setupWithoutSceneContainer(
edge = Edge.create(from = fromState, to = GONE),
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/DreamingToAodTransitionViewModel.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/DreamingToAodTransitionViewModel.kt
index 754ed6cc3327..1ee0368f15b1 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/DreamingToAodTransitionViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/DreamingToAodTransitionViewModel.kt
@@ -25,6 +25,7 @@ import com.android.systemui.keyguard.shared.model.KeyguardState.DREAMING
import com.android.systemui.keyguard.ui.KeyguardTransitionAnimationFlow
import com.android.systemui.keyguard.ui.transitions.DeviceEntryIconTransition
import javax.inject.Inject
+import kotlin.time.Duration.Companion.milliseconds
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.emptyFlow
@@ -45,6 +46,13 @@ constructor(
edge = Edge.create(from = DREAMING, to = AOD),
)
+ /** Lockscreen views alpha */
+ val lockscreenAlpha: Flow<Float> =
+ transitionAnimation.sharedFlow(
+ duration = 300.milliseconds,
+ onStep = { it },
+ )
+
val deviceEntryBackgroundViewAlpha: Flow<Float> =
transitionAnimation.immediatelyTransitionTo(0f)
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/GoneToGlanceableHubTransitionViewModel.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/GoneToGlanceableHubTransitionViewModel.kt
index 8eab406a1273..6a3573ab0119 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/GoneToGlanceableHubTransitionViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/GoneToGlanceableHubTransitionViewModel.kt
@@ -23,7 +23,6 @@ import com.android.systemui.keyguard.shared.model.KeyguardState.GLANCEABLE_HUB
import com.android.systemui.keyguard.shared.model.KeyguardState.GONE
import com.android.systemui.keyguard.ui.KeyguardTransitionAnimationFlow
import com.android.systemui.keyguard.ui.transitions.DeviceEntryIconTransition
-import com.android.systemui.scene.shared.model.Scenes
import javax.inject.Inject
import kotlin.time.Duration.Companion.milliseconds
import kotlinx.coroutines.flow.Flow
@@ -37,7 +36,7 @@ constructor(
private val transitionAnimation =
animationFlow
- .setup(duration = TO_GLANCEABLE_HUB_DURATION, edge = Edge.create(GONE, Scenes.Communal))
+ .setup(duration = TO_GLANCEABLE_HUB_DURATION, edge = Edge.INVALID)
.setupWithoutSceneContainer(edge = Edge.create(GONE, GLANCEABLE_HUB))
override val deviceEntryParentViewAlpha: Flow<Float> =
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardClockViewModel.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardClockViewModel.kt
index 573b75e623fb..73028c5cf496 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardClockViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardClockViewModel.kt
@@ -30,7 +30,6 @@ import com.android.systemui.keyguard.shared.model.ClockSize
import com.android.systemui.keyguard.shared.model.ClockSizeSetting
import com.android.systemui.res.R
import com.android.systemui.shade.domain.interactor.ShadeInteractor
-import com.android.systemui.shade.shared.model.ShadeMode
import com.android.systemui.statusbar.notification.icon.ui.viewmodel.NotificationIconContainerAlwaysOnDisplayViewModel
import com.android.systemui.statusbar.ui.SystemBarUtilsProxy
import javax.inject.Inject
@@ -119,26 +118,25 @@ constructor(
combine(
isLargeClockVisible,
clockShouldBeCentered,
- shadeInteractor.shadeMode,
+ shadeInteractor.isShadeLayoutWide,
currentClock,
- ) { isLargeClockVisible, clockShouldBeCentered, shadeMode, currentClock ->
- val shouldUseSplitShade = shadeMode == ShadeMode.Split
+ ) { isLargeClockVisible, clockShouldBeCentered, isShadeLayoutWide, currentClock ->
if (currentClock?.config?.useCustomClockScene == true) {
when {
- shouldUseSplitShade && clockShouldBeCentered ->
+ isShadeLayoutWide && clockShouldBeCentered ->
ClockLayout.WEATHER_LARGE_CLOCK
- shouldUseSplitShade && isLargeClockVisible ->
+ isShadeLayoutWide && isLargeClockVisible ->
ClockLayout.SPLIT_SHADE_WEATHER_LARGE_CLOCK
- shouldUseSplitShade -> ClockLayout.SPLIT_SHADE_SMALL_CLOCK
+ isShadeLayoutWide -> ClockLayout.SPLIT_SHADE_SMALL_CLOCK
isLargeClockVisible -> ClockLayout.WEATHER_LARGE_CLOCK
else -> ClockLayout.SMALL_CLOCK
}
} else {
when {
- shouldUseSplitShade && clockShouldBeCentered -> ClockLayout.LARGE_CLOCK
- shouldUseSplitShade && isLargeClockVisible ->
+ isShadeLayoutWide && clockShouldBeCentered -> ClockLayout.LARGE_CLOCK
+ isShadeLayoutWide && isLargeClockVisible ->
ClockLayout.SPLIT_SHADE_LARGE_CLOCK
- shouldUseSplitShade -> ClockLayout.SPLIT_SHADE_SMALL_CLOCK
+ isShadeLayoutWide -> ClockLayout.SPLIT_SHADE_SMALL_CLOCK
isLargeClockVisible -> ClockLayout.LARGE_CLOCK
else -> ClockLayout.SMALL_CLOCK
}
@@ -164,7 +162,7 @@ constructor(
/** Calculates the top margin for the small clock. */
fun getSmallClockTopMargin(): Int {
val statusBarHeight = systemBarUtils.getStatusBarHeaderHeightKeyguard()
- return if (shadeInteractor.shadeMode.value == ShadeMode.Split) {
+ return if (shadeInteractor.isShadeLayoutWide.value) {
resources.getDimensionPixelSize(R.dimen.keyguard_split_shade_top_margin) -
if (ComposeLockscreen.isEnabled) statusBarHeight else 0
} else {
@@ -176,7 +174,7 @@ constructor(
val smallClockTopMargin =
combine(
configurationInteractor.onAnyConfigurationChange,
- shadeInteractor.shadeMode,
+ shadeInteractor.isShadeLayoutWide,
) { _, _ ->
getSmallClockTopMargin()
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModel.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModel.kt
index 0fb29c297002..350ceb47848f 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModel.kt
@@ -91,8 +91,9 @@ constructor(
private val dozingToGoneTransitionViewModel: DozingToGoneTransitionViewModel,
private val dozingToLockscreenTransitionViewModel: DozingToLockscreenTransitionViewModel,
private val dozingToOccludedTransitionViewModel: DozingToOccludedTransitionViewModel,
- private val dreamingToLockscreenTransitionViewModel: DreamingToLockscreenTransitionViewModel,
+ private val dreamingToAodTransitionViewModel: DreamingToAodTransitionViewModel,
private val dreamingToGoneTransitionViewModel: DreamingToGoneTransitionViewModel,
+ private val dreamingToLockscreenTransitionViewModel: DreamingToLockscreenTransitionViewModel,
private val glanceableHubToLockscreenTransitionViewModel:
GlanceableHubToLockscreenTransitionViewModel,
private val goneToAodTransitionViewModel: GoneToAodTransitionViewModel,
@@ -160,7 +161,7 @@ constructor(
edgeWithoutSceneContainer = Edge.create(from = LOCKSCREEN, to = GONE),
),
keyguardTransitionInteractor.isInTransition(
- edge = Edge.create(from = PRIMARY_BOUNCER, to = Scenes.Lockscreen),
+ edge = Edge.create(from = Scenes.Bouncer, to = LOCKSCREEN),
edgeWithoutSceneContainer =
Edge.create(from = PRIMARY_BOUNCER, to = LOCKSCREEN),
),
@@ -243,6 +244,7 @@ constructor(
dozingToGoneTransitionViewModel.lockscreenAlpha(viewState),
dozingToLockscreenTransitionViewModel.lockscreenAlpha,
dozingToOccludedTransitionViewModel.lockscreenAlpha(viewState),
+ dreamingToAodTransitionViewModel.lockscreenAlpha,
dreamingToGoneTransitionViewModel.lockscreenAlpha,
dreamingToLockscreenTransitionViewModel.lockscreenAlpha,
glanceableHubToLockscreenTransitionViewModel.keyguardAlpha,
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardTouchHandlingViewModel.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardTouchHandlingViewModel.kt
index f1cbf256a00f..1d2edc6d406b 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardTouchHandlingViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardTouchHandlingViewModel.kt
@@ -33,9 +33,12 @@ constructor(
/** Whether the long-press handling feature should be enabled. */
val isLongPressHandlingEnabled: Flow<Boolean> = interactor.isLongPressHandlingEnabled
- /** Notifies that the user has long-pressed on the lock screen. */
- fun onLongPress() {
- interactor.onLongPress()
+ /** Notifies that the user has long-pressed on the lock screen.
+ *
+ * @param isA11yAction: Whether the action was performed as an a11y action
+ */
+ fun onLongPress(isA11yAction: Boolean) {
+ interactor.onLongPress(isA11yAction)
}
/**
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenContentViewModel.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenContentViewModel.kt
index 1de0abeb931b..4bfefda63466 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenContentViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenContentViewModel.kt
@@ -17,6 +17,7 @@
package com.android.systemui.keyguard.ui.viewmodel
import android.content.res.Resources
+import com.android.compose.animation.scene.SceneKey
import com.android.internal.annotations.VisibleForTesting
import com.android.systemui.biometrics.AuthController
import com.android.systemui.dagger.SysUISingleton
@@ -25,15 +26,18 @@ import com.android.systemui.keyguard.domain.interactor.KeyguardBlueprintInteract
import com.android.systemui.keyguard.domain.interactor.KeyguardClockInteractor
import com.android.systemui.keyguard.shared.model.ClockSize
import com.android.systemui.res.R
+import com.android.systemui.scene.domain.interactor.SceneContainerOcclusionInteractor
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.shade.domain.interactor.ShadeInteractor
-import com.android.systemui.shade.shared.model.ShadeMode
import com.android.systemui.unfold.domain.interactor.UnfoldTransitionInteractor
import javax.inject.Inject
import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.combine
import kotlinx.coroutines.flow.distinctUntilChanged
+import kotlinx.coroutines.flow.flowOf
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.stateIn
@@ -48,33 +52,14 @@ constructor(
val shadeInteractor: ShadeInteractor,
@Application private val applicationScope: CoroutineScope,
unfoldTransitionInteractor: UnfoldTransitionInteractor,
+ occlusionInteractor: SceneContainerOcclusionInteractor,
) {
@VisibleForTesting val clockSize = clockInteractor.clockSize
val isUdfpsVisible: Boolean
get() = authController.isUdfpsSupported
- val shouldUseSplitNotificationShade: StateFlow<Boolean> =
- shadeInteractor.shadeMode
- .map { it == ShadeMode.Split }
- .stateIn(
- scope = applicationScope,
- started = SharingStarted.WhileSubscribed(),
- initialValue = false,
- )
-
- val areNotificationsVisible: StateFlow<Boolean> =
- combine(
- clockSize,
- shouldUseSplitNotificationShade,
- ) { clockSize, shouldUseSplitNotificationShade ->
- clockSize == ClockSize.SMALL || shouldUseSplitNotificationShade
- }
- .stateIn(
- scope = applicationScope,
- started = SharingStarted.WhileSubscribed(),
- initialValue = false,
- )
+ val isShadeLayoutWide: StateFlow<Boolean> = shadeInteractor.isShadeLayoutWide
/** Amount of horizontal translation that should be applied to elements in the scene. */
val unfoldTranslations: StateFlow<UnfoldTranslations> =
@@ -93,6 +78,35 @@ constructor(
initialValue = UnfoldTranslations(),
)
+ /** Whether the content of the scene UI should be shown. */
+ val isContentVisible: StateFlow<Boolean> =
+ occlusionInteractor.isOccludingActivityShown
+ .map { !it }
+ .stateIn(
+ scope = applicationScope,
+ started = SharingStarted.WhileSubscribed(),
+ initialValue = true,
+ )
+
+ /**
+ * Returns a flow that indicates whether lockscreen notifications should be rendered in the
+ * given [sceneKey].
+ */
+ fun areNotificationsVisible(sceneKey: SceneKey): Flow<Boolean> {
+ // `Scenes.NotificationsShade` renders its own separate notifications stack, so when it's
+ // open we avoid rendering the lockscreen notifications stack.
+ if (sceneKey == Scenes.NotificationsShade) {
+ return flowOf(false)
+ }
+
+ return combine(
+ clockSize,
+ shadeInteractor.isShadeLayoutWide,
+ ) { clockSize, isShadeLayoutWide ->
+ clockSize == ClockSize.SMALL || isShadeLayoutWide
+ }
+ }
+
fun getSmartSpacePaddingTop(resources: Resources): Int {
return if (clockSize.value == ClockSize.LARGE) {
resources.getDimensionPixelSize(R.dimen.keyguard_smartspace_top_offset) +
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/PrimaryBouncerToGlanceableHubTransitionViewModel.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/PrimaryBouncerToGlanceableHubTransitionViewModel.kt
index 754fb94a572e..9ec15dcff5f4 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/PrimaryBouncerToGlanceableHubTransitionViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/PrimaryBouncerToGlanceableHubTransitionViewModel.kt
@@ -23,7 +23,6 @@ import com.android.systemui.keyguard.shared.model.KeyguardState.GLANCEABLE_HUB
import com.android.systemui.keyguard.shared.model.KeyguardState.PRIMARY_BOUNCER
import com.android.systemui.keyguard.ui.KeyguardTransitionAnimationFlow
import com.android.systemui.keyguard.ui.transitions.DeviceEntryIconTransition
-import com.android.systemui.scene.shared.model.Scenes
import javax.inject.Inject
import kotlinx.coroutines.flow.Flow
@@ -33,10 +32,7 @@ class PrimaryBouncerToGlanceableHubTransitionViewModel
constructor(animationFlow: KeyguardTransitionAnimationFlow) : DeviceEntryIconTransition {
private val transitionAnimation =
animationFlow
- .setup(
- duration = TO_GLANCEABLE_HUB_DURATION,
- edge = Edge.create(PRIMARY_BOUNCER, Scenes.Communal)
- )
+ .setup(duration = TO_GLANCEABLE_HUB_DURATION, edge = Edge.INVALID)
.setupWithoutSceneContainer(edge = Edge.create(PRIMARY_BOUNCER, GLANCEABLE_HUB))
override val deviceEntryParentViewAlpha: Flow<Float> =
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/PrimaryBouncerToGoneTransitionViewModel.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/PrimaryBouncerToGoneTransitionViewModel.kt
index 7ae455818952..8811908e1d45 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/PrimaryBouncerToGoneTransitionViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/PrimaryBouncerToGoneTransitionViewModel.kt
@@ -26,7 +26,6 @@ import com.android.systemui.keyguard.shared.model.KeyguardState.PRIMARY_BOUNCER
import com.android.systemui.keyguard.shared.model.ScrimAlpha
import com.android.systemui.keyguard.ui.KeyguardTransitionAnimationFlow
import com.android.systemui.scene.shared.flag.SceneContainerFlag
-import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.statusbar.SysuiStatusBarStateController
import dagger.Lazy
import javax.inject.Inject
@@ -54,7 +53,7 @@ constructor(
animationFlow
.setup(
duration = TO_GONE_DURATION,
- edge = Edge.create(from = PRIMARY_BOUNCER, to = Scenes.Gone),
+ edge = Edge.INVALID,
)
.setupWithoutSceneContainer(
edge = Edge.create(from = PRIMARY_BOUNCER, to = GONE),
@@ -81,6 +80,7 @@ constructor(
1f - it
}
},
+ onFinish = { 1f },
)
/** Bouncer container alpha */
diff --git a/packages/SystemUI/src/com/android/systemui/log/SessionTracker.java b/packages/SystemUI/src/com/android/systemui/log/SessionTracker.java
index d848b431bcc9..e8ded03e3b38 100644
--- a/packages/SystemUI/src/com/android/systemui/log/SessionTracker.java
+++ b/packages/SystemUI/src/com/android/systemui/log/SessionTracker.java
@@ -22,6 +22,7 @@ import static android.app.StatusBarManager.SESSION_KEYGUARD;
import android.annotation.Nullable;
import android.os.RemoteException;
+import android.os.UserManager;
import android.util.Log;
import androidx.annotation.NonNull;
@@ -36,6 +37,7 @@ import com.android.keyguard.KeyguardUpdateMonitorCallback;
import com.android.systemui.CoreStartable;
import com.android.systemui.biometrics.AuthController;
import com.android.systemui.dagger.SysUISingleton;
+import com.android.systemui.process.ProcessWrapper;
import com.android.systemui.statusbar.policy.KeyguardStateController;
import java.io.PrintWriter;
@@ -63,6 +65,7 @@ public class SessionTracker implements CoreStartable {
private final KeyguardUpdateMonitor mKeyguardUpdateMonitor;
private final KeyguardStateController mKeyguardStateController;
private final UiEventLogger mUiEventLogger;
+ private final ProcessWrapper mProcessWrapper;
private final Map<Integer, InstanceId> mSessionToInstanceId = new HashMap<>();
private boolean mKeyguardSessionStarted;
@@ -73,13 +76,15 @@ public class SessionTracker implements CoreStartable {
AuthController authController,
KeyguardUpdateMonitor keyguardUpdateMonitor,
KeyguardStateController keyguardStateController,
- UiEventLogger uiEventLogger
+ UiEventLogger uiEventLogger,
+ ProcessWrapper processWrapper
) {
mStatusBarManagerService = statusBarService;
mAuthController = authController;
mKeyguardUpdateMonitor = keyguardUpdateMonitor;
mKeyguardStateController = keyguardStateController;
mUiEventLogger = uiEventLogger;
+ mProcessWrapper = processWrapper;
}
@Override
@@ -109,6 +114,16 @@ public class SessionTracker implements CoreStartable {
final InstanceId instanceId = mInstanceIdGenerator.newInstanceId();
mSessionToInstanceId.put(type, instanceId);
+
+ if (UserManager.isVisibleBackgroundUsersEnabled() && !mProcessWrapper.isSystemUser()
+ && !mProcessWrapper.isForegroundUser()) {
+ // TODO: b/341604160 - Support visible background users properly.
+ if (DEBUG) {
+ Log.d(TAG, "Status bar manager is disabled for visible background users");
+ }
+ return;
+ }
+
try {
if (DEBUG) {
Log.d(TAG, "Session start for [" + getString(type) + "] id=" + instanceId);
@@ -139,6 +154,14 @@ public class SessionTracker implements CoreStartable {
if (endSessionUiEvent != null) {
mUiEventLogger.log(endSessionUiEvent, instanceId);
}
+ if (UserManager.isVisibleBackgroundUsersEnabled() && !mProcessWrapper.isSystemUser()
+ && !mProcessWrapper.isForegroundUser()) {
+ // TODO: b/341604160 - Support visible background users properly.
+ if (DEBUG) {
+ Log.d(TAG, "Status bar manager is disabled for visible background users");
+ }
+ return;
+ }
mStatusBarManagerService.onSessionEnded(type, instanceId);
} catch (RemoteException e) {
Log.e(TAG, "Unable to send onSessionEnded for session="
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 52b0b87ddb58..b2ba0e1cd6a6 100644
--- a/packages/SystemUI/src/com/android/systemui/log/dagger/LogModule.java
+++ b/packages/SystemUI/src/com/android/systemui/log/dagger/LogModule.java
@@ -169,6 +169,14 @@ public class LogModule {
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
@@ -369,9 +377,9 @@ public class LogModule {
*/
@Provides
@SysUISingleton
- @MediaLoadingLog
- public static LogBuffer providesMediaLoadingLogBuffer(LogBufferFactory factory) {
- return factory.create("MediaLoadingLog", 20);
+ @MediaLog
+ public static LogBuffer providesMediaLogBuffer(LogBufferFactory factory) {
+ return factory.create("MediaLog", 20);
}
/** Allows logging buffers to be tweaked via adb on debug builds but not on prod builds. */
diff --git a/packages/SystemUI/src/com/android/systemui/log/dagger/MediaLog.kt b/packages/SystemUI/src/com/android/systemui/log/dagger/MediaLog.kt
new file mode 100644
index 000000000000..d1dc6f394ee5
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/log/dagger/MediaLog.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.log.dagger
+
+import com.android.systemui.log.LogBuffer
+import javax.inject.Qualifier
+
+/** A [LogBuffer] for [com.android.systemui.media.controls.shared.MediaLogger] */
+@Qualifier @MustBeDocumented @Retention(AnnotationRetention.RUNTIME) annotation class MediaLog
diff --git a/packages/SystemUI/src/com/android/systemui/log/dagger/MediaLoadingLog.kt b/packages/SystemUI/src/com/android/systemui/log/dagger/VisualStabilityLog.kt
index 05e1b2e2cd23..b45ffc1128b1 100644
--- a/packages/SystemUI/src/com/android/systemui/log/dagger/MediaLoadingLog.kt
+++ b/packages/SystemUI/src/com/android/systemui/log/dagger/VisualStabilityLog.kt
@@ -16,11 +16,10 @@
package com.android.systemui.log.dagger
-import com.android.systemui.log.LogBuffer
import javax.inject.Qualifier
-/** A [LogBuffer] for [com.android.systemui.media.controls.domain.pipeline.MediaLoadingLogger] */
+/** A [com.android.systemui.log.LogBuffer] for visual stability-related messages. */
@Qualifier
@MustBeDocumented
@Retention(AnnotationRetention.RUNTIME)
-annotation class MediaLoadingLog
+annotation class VisualStabilityLog
diff --git a/packages/SystemUI/src/com/android/systemui/media/RingtonePlayer.java b/packages/SystemUI/src/com/android/systemui/media/RingtonePlayer.java
index bda006915c94..e7c2a454e16c 100644
--- a/packages/SystemUI/src/com/android/systemui/media/RingtonePlayer.java
+++ b/packages/SystemUI/src/com/android/systemui/media/RingtonePlayer.java
@@ -17,7 +17,6 @@
package com.android.systemui.media;
import android.annotation.Nullable;
-import android.content.ContentProvider;
import android.content.ContentResolver;
import android.content.Context;
import android.content.pm.PackageManager.NameNotFoundException;
@@ -124,13 +123,9 @@ public class RingtonePlayer implements CoreStartable {
boolean looping, @Nullable VolumeShaper.Configuration volumeShaperConfig)
throws RemoteException {
if (LOGD) {
- Log.d(TAG, "play(token=" + token + ", uri=" + uri
- + ", uid=" + Binder.getCallingUid()
- + ") uriUserId=" + ContentProvider.getUserIdFromUri(uri)
- + " callingUserId=" + Binder.getCallingUserHandle().getIdentifier());
+ Log.d(TAG, "play(token=" + token + ", uri=" + uri + ", uid="
+ + Binder.getCallingUid() + ")");
}
- enforceUriUserId(uri);
-
Client client;
synchronized (mClients) {
client = mClients.get(token);
@@ -212,7 +207,6 @@ public class RingtonePlayer implements CoreStartable {
@Override
public String getTitle(Uri uri) {
- enforceUriUserId(uri);
final UserHandle user = Binder.getCallingUserHandle();
return Ringtone.getTitle(getContextForUser(user), uri,
false /*followSettingsUri*/, false /*allowRemote*/);
@@ -245,25 +239,6 @@ public class RingtonePlayer implements CoreStartable {
}
throw new SecurityException("Uri is not ringtone, alarm, or notification: " + uri);
}
-
- /**
- * Must be called from the Binder calling thread.
- * Ensures caller is from the same userId as the content they're trying to access.
- * @param uri the URI to check
- * @throws SecurityException when non-system call or userId in uri differs from the
- * caller's userId
- */
- private void enforceUriUserId(Uri uri) throws SecurityException {
- final int uriUserId = ContentProvider.getUserIdFromUri(uri);
- final int callerUserId = Binder.getCallingUserHandle().getIdentifier();
- // for a non-system call, verify the URI to play belongs to the same user as the caller
- if (UserHandle.isApp(Binder.getCallingUid()) && uriUserId != callerUserId) {
- throw new SecurityException("Illegal access to uri=" + uri
- + " content associated with user=" + uriUserId
- + ", request originates from user=" + callerUserId);
- }
- }
-
};
private Context getContextForUser(UserHandle user) {
diff --git a/packages/SystemUI/src/com/android/systemui/media/controls/domain/pipeline/MediaDataFilterImpl.kt b/packages/SystemUI/src/com/android/systemui/media/controls/domain/pipeline/MediaDataFilterImpl.kt
index 803e7efa7f60..68f1af311b1b 100644
--- a/packages/SystemUI/src/com/android/systemui/media/controls/domain/pipeline/MediaDataFilterImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/controls/domain/pipeline/MediaDataFilterImpl.kt
@@ -27,6 +27,7 @@ import com.android.systemui.broadcast.BroadcastSender
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Main
import com.android.systemui.media.controls.data.repository.MediaFilterRepository
+import com.android.systemui.media.controls.shared.MediaLogger
import com.android.systemui.media.controls.shared.model.EXTRA_KEY_TRIGGER_RESUME
import com.android.systemui.media.controls.shared.model.MediaData
import com.android.systemui.media.controls.shared.model.MediaDataLoadingModel
@@ -70,7 +71,7 @@ constructor(
private val logger: MediaUiEventLogger,
private val mediaFlags: MediaFlags,
private val mediaFilterRepository: MediaFilterRepository,
- private val mediaLoadingLogger: MediaLoadingLogger,
+ private val mediaLogger: MediaLogger,
) : MediaDataManager.Listener {
/** Non-UI listeners to media changes. */
private val _listeners: MutableSet<MediaDataProcessor.Listener> = mutableSetOf()
@@ -118,7 +119,7 @@ constructor(
val isUpdate = mediaFilterRepository.addSelectedUserMediaEntry(data)
- mediaLoadingLogger.logMediaLoaded(data.instanceId, data.active, "loading media")
+ mediaLogger.logMediaLoaded(data.instanceId, data.active, "loading media")
mediaFilterRepository.addMediaDataLoadingState(
MediaDataLoadingModel.Loaded(data.instanceId),
isUpdate
@@ -189,7 +190,7 @@ constructor(
isSsReactivated = true
)
)
- mediaLoadingLogger.logMediaLoaded(
+ mediaLogger.logMediaLoaded(
mediaData.instanceId,
mediaData.active,
"reactivating media instead of smartspace"
@@ -226,7 +227,7 @@ constructor(
mediaFilterRepository.setRecommendationsLoadingState(
SmartspaceMediaLoadingModel.Loaded(key, shouldPrioritizeMutable)
)
- mediaLoadingLogger.logRecommendationLoaded(key, data.isActive, "loading recommendations")
+ mediaLogger.logRecommendationLoaded(key, data.isActive, "loading recommendations")
listeners.forEach { it.onSmartspaceMediaDataLoaded(key, data, shouldPrioritizeMutable) }
}
@@ -237,7 +238,7 @@ constructor(
mediaFilterRepository.addMediaDataLoadingState(
MediaDataLoadingModel.Removed(instanceId)
)
- mediaLoadingLogger.logMediaRemoved(instanceId, "removing media card")
+ mediaLogger.logMediaRemoved(instanceId, "removing media card")
// Only notify listeners if something actually changed
listeners.forEach { it.onMediaDataRemoved(key, userInitiated) }
}
@@ -253,11 +254,7 @@ constructor(
mediaFilterRepository.addMediaDataLoadingState(
MediaDataLoadingModel.Loaded(lastActiveId, immediately)
)
- mediaLoadingLogger.logMediaLoaded(
- lastActiveId,
- it.active,
- "expiring reactivated id"
- )
+ mediaLogger.logMediaLoaded(lastActiveId, it.active, "expiring reactivated id")
listeners.forEach { listener ->
getKey(lastActiveId)?.let { lastActiveKey ->
listener.onMediaDataLoaded(lastActiveKey, lastActiveKey, it, immediately)
@@ -278,11 +275,7 @@ constructor(
mediaFilterRepository.setRecommendationsLoadingState(
SmartspaceMediaLoadingModel.Removed(key, immediately)
)
- mediaLoadingLogger.logRecommendationRemoved(
- key,
- immediately,
- "removing recommendations card"
- )
+ mediaLogger.logRecommendationRemoved(key, immediately, "removing recommendations card")
listeners.forEach { it.onSmartspaceMediaDataRemoved(key, immediately) }
}
@@ -296,10 +289,7 @@ constructor(
mediaFilterRepository.addMediaDataLoadingState(
MediaDataLoadingModel.Removed(data.instanceId)
)
- mediaLoadingLogger.logMediaRemoved(
- data.instanceId,
- "Removing $key after profile change"
- )
+ mediaLogger.logMediaRemoved(data.instanceId, "Removing $key after profile change")
listeners.forEach { listener -> listener.onMediaDataRemoved(key, false) }
}
}
@@ -316,7 +306,7 @@ constructor(
mediaFilterRepository.addMediaDataLoadingState(
MediaDataLoadingModel.Removed(instanceId)
)
- mediaLoadingLogger.logMediaRemoved(instanceId, "Removing media after user change")
+ mediaLogger.logMediaRemoved(instanceId, "Removing media after user change")
getKey(instanceId)?.let {
listenersCopy.forEach { listener -> listener.onMediaDataRemoved(it, false) }
}
@@ -329,7 +319,7 @@ constructor(
MediaDataLoadingModel.Loaded(data.instanceId),
isUpdate
)
- mediaLoadingLogger.logMediaLoaded(
+ mediaLogger.logMediaLoaded(
data.instanceId,
data.active,
"Re-adding $key after user change"
diff --git a/packages/SystemUI/src/com/android/systemui/media/controls/domain/pipeline/MediaLoadingLogger.kt b/packages/SystemUI/src/com/android/systemui/media/controls/shared/MediaLogger.kt
index c6cfd659eed5..2b710b5a67b7 100644
--- a/packages/SystemUI/src/com/android/systemui/media/controls/domain/pipeline/MediaLoadingLogger.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/controls/shared/MediaLogger.kt
@@ -14,18 +14,18 @@
* limitations under the License.
*/
-package com.android.systemui.media.controls.domain.pipeline
+package com.android.systemui.media.controls.shared
import com.android.internal.logging.InstanceId
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.log.LogBuffer
import com.android.systemui.log.core.LogLevel
-import com.android.systemui.log.dagger.MediaLoadingLog
+import com.android.systemui.log.dagger.MediaLog
import javax.inject.Inject
/** A buffered log for media loading events. */
@SysUISingleton
-class MediaLoadingLogger @Inject constructor(@MediaLoadingLog private val buffer: LogBuffer) {
+class MediaLogger @Inject constructor(@MediaLog private val buffer: LogBuffer) {
fun logMediaLoaded(instanceId: InstanceId, active: Boolean, reason: String) {
buffer.log(
@@ -78,7 +78,43 @@ class MediaLoadingLogger @Inject constructor(@MediaLoadingLog private val buffer
)
}
+ fun logMediaCardAdded(instanceId: InstanceId) {
+ buffer.log(
+ TAG,
+ LogLevel.DEBUG,
+ { str1 = instanceId.toString() },
+ { "adding media card $str1 to carousel" }
+ )
+ }
+
+ fun logMediaCardRemoved(instanceId: InstanceId) {
+ buffer.log(
+ TAG,
+ LogLevel.DEBUG,
+ { str1 = instanceId.toString() },
+ { "removing media card $str1 from carousel" }
+ )
+ }
+
+ fun logMediaRecommendationCardAdded(key: String) {
+ buffer.log(
+ TAG,
+ LogLevel.DEBUG,
+ { str1 = key },
+ { "adding recommendation card $str1 to carousel" }
+ )
+ }
+
+ fun logMediaRecommendationCardRemoved(key: String) {
+ buffer.log(
+ TAG,
+ LogLevel.DEBUG,
+ { str1 = key },
+ { "removing recommendation card $str1 from carousel" }
+ )
+ }
+
companion object {
- private const val TAG = "MediaLoadingLog"
+ private const val TAG = "MediaLog"
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/MediaCarouselController.kt b/packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/MediaCarouselController.kt
index 125f97375fea..c5d7b25827ea 100644
--- a/packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/MediaCarouselController.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/MediaCarouselController.kt
@@ -662,13 +662,9 @@ constructor(
@VisibleForTesting
internal fun listenForAnyStateToGoneKeyguardTransition(scope: CoroutineScope): Job {
return scope.launch {
- if (SceneContainerFlag.isEnabled) {
- sceneInteractor.transitionState.filter { it.isIdle(Scenes.Gone) }
- } else {
- keyguardTransitionInteractor.transition(Edge.create(to = GONE)).filter {
- it.transitionState == TransitionState.FINISHED
- }
- }
+ keyguardTransitionInteractor
+ .isFinishedIn(scene = Scenes.Gone, stateWithoutSceneContainer = GONE)
+ .filter { it }
.collect {
showMediaCarousel()
updateHostVisibility()
@@ -849,8 +845,25 @@ constructor(
commonViewModels.addAll(viewModels)
// Ensure we only show the needed UMOs in media carousel.
- val viewSet = viewModels.toHashSet()
- controllerByViewModel.filter { !viewSet.contains(it.key) }.forEach { onRemoved(it.key) }
+ val viewIds =
+ viewModels
+ .map { mediaCommonViewModel ->
+ when (mediaCommonViewModel) {
+ is MediaCommonViewModel.MediaControl ->
+ mediaCommonViewModel.instanceId.toString()
+ is MediaCommonViewModel.MediaRecommendations -> mediaCommonViewModel.key
+ }
+ }
+ .toHashSet()
+ controllerByViewModel
+ .filter {
+ when (val viewModel = it.key) {
+ is MediaCommonViewModel.MediaControl ->
+ !viewIds.contains(viewModel.instanceId.toString())
+ is MediaCommonViewModel.MediaRecommendations -> !viewIds.contains(viewModel.key)
+ }
+ }
+ .forEach { onRemoved(it.key) }
}
private suspend fun getMediaLockScreenSetting(): Boolean {
@@ -875,6 +888,8 @@ constructor(
heightInSceneContainerPx = height
mediaCarouselScrollHandler.playerWidthPlusPadding =
width + context.resources.getDimensionPixelSize(R.dimen.qs_media_padding)
+ mediaContent.minimumWidth = widthInSceneContainerPx
+ mediaContent.minimumHeight = heightInSceneContainerPx
updatePlayers(recreateMedia = true)
}
diff --git a/packages/SystemUI/src/com/android/systemui/media/controls/ui/viewmodel/MediaCarouselViewModel.kt b/packages/SystemUI/src/com/android/systemui/media/controls/ui/viewmodel/MediaCarouselViewModel.kt
index c453a212a3cd..e7f7171d5be3 100644
--- a/packages/SystemUI/src/com/android/systemui/media/controls/ui/viewmodel/MediaCarouselViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/controls/ui/viewmodel/MediaCarouselViewModel.kt
@@ -23,6 +23,7 @@ import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.dagger.qualifiers.Background
import com.android.systemui.media.controls.domain.pipeline.interactor.MediaCarouselInteractor
import com.android.systemui.media.controls.domain.pipeline.interactor.factory.MediaControlInteractorFactory
+import com.android.systemui.media.controls.shared.MediaLogger
import com.android.systemui.media.controls.shared.model.MediaCommonModel
import com.android.systemui.media.controls.util.MediaFlags
import com.android.systemui.media.controls.util.MediaUiEventLogger
@@ -52,6 +53,7 @@ constructor(
private val recommendationsViewModel: MediaRecommendationsViewModel,
private val logger: MediaUiEventLogger,
private val mediaFlags: MediaFlags,
+ private val mediaLogger: MediaLogger,
) {
val mediaItems: StateFlow<List<MediaCommonViewModel>> =
@@ -131,10 +133,14 @@ constructor(
instanceId = instanceId,
immediatelyUpdateUi = commonModel.mediaLoadedModel.immediatelyUpdateUi,
controlViewModel = createMediaControlViewModel(instanceId),
- onAdded = { onMediaControlAddedOrUpdated(it, commonModel) },
+ onAdded = {
+ mediaLogger.logMediaCardAdded(instanceId)
+ onMediaControlAddedOrUpdated(it, commonModel)
+ },
onRemoved = {
interactor.removeMediaControl(instanceId, delay = 0L)
mediaControlByInstanceId.remove(instanceId)
+ mediaLogger.logMediaCardRemoved(instanceId)
},
onUpdated = { onMediaControlAddedOrUpdated(it, commonModel) },
isMediaFromRec = commonModel.isMediaFromRec,
@@ -168,6 +174,9 @@ constructor(
mediaFlags.isPersistentSsCardEnabled(),
recsViewModel = recommendationsViewModel,
onAdded = { commonViewModel ->
+ mediaLogger.logMediaRecommendationCardAdded(
+ commonModel.recsLoadingModel.key
+ )
onMediaRecommendationAddedOrUpdated(
commonViewModel as MediaCommonViewModel.MediaRecommendations
)
@@ -215,6 +224,7 @@ constructor(
commonModel: MediaCommonModel.MediaRecommendations,
immediatelyRemove: Boolean
) {
+ mediaLogger.logMediaRecommendationCardRemoved(commonModel.recsLoadingModel.key)
if (immediatelyRemove || isReorderingAllowed()) {
interactor.dismissSmartspaceRecommendation(commonModel.recsLoadingModel.key, 0L)
mediaRecs = null
diff --git a/packages/SystemUI/src/com/android/systemui/mediaprojection/MediaProjectionLog.kt b/packages/SystemUI/src/com/android/systemui/mediaprojection/MediaProjectionLog.kt
new file mode 100644
index 000000000000..a80bc0975197
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/mediaprojection/MediaProjectionLog.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.mediaprojection
+
+import javax.inject.Qualifier
+
+/** Logs for media projection related events. */
+@Qualifier
+@MustBeDocumented
+@Retention(AnnotationRetention.RUNTIME)
+annotation class MediaProjectionLog
diff --git a/packages/SystemUI/src/com/android/systemui/mediaprojection/MediaProjectionModule.kt b/packages/SystemUI/src/com/android/systemui/mediaprojection/MediaProjectionModule.kt
index 34894599aaf9..7fd77a9bdb00 100644
--- a/packages/SystemUI/src/com/android/systemui/mediaprojection/MediaProjectionModule.kt
+++ b/packages/SystemUI/src/com/android/systemui/mediaprojection/MediaProjectionModule.kt
@@ -16,12 +16,25 @@
package com.android.systemui.mediaprojection
+import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.log.LogBuffer
+import com.android.systemui.log.LogBufferFactory
import com.android.systemui.mediaprojection.data.repository.MediaProjectionManagerRepository
import com.android.systemui.mediaprojection.data.repository.MediaProjectionRepository
import dagger.Binds
import dagger.Module
+import dagger.Provides
@Module
interface MediaProjectionModule {
@Binds fun mediaRepository(impl: MediaProjectionManagerRepository): MediaProjectionRepository
+
+ companion object {
+ @Provides
+ @SysUISingleton
+ @MediaProjectionLog
+ fun provideMediaProjectionLogBuffer(factory: LogBufferFactory): LogBuffer {
+ return factory.create("MediaProjection", 50)
+ }
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/mediaprojection/data/model/MediaProjectionState.kt b/packages/SystemUI/src/com/android/systemui/mediaprojection/data/model/MediaProjectionState.kt
index de300b2ff900..82b48251cc8a 100644
--- a/packages/SystemUI/src/com/android/systemui/mediaprojection/data/model/MediaProjectionState.kt
+++ b/packages/SystemUI/src/com/android/systemui/mediaprojection/data/model/MediaProjectionState.kt
@@ -28,13 +28,25 @@ sealed interface MediaProjectionState {
*
* @property hostPackage the package name of the app that is receiving the content of the media
* projection (aka which app the phone screen contents are being sent to).
+ * @property hostDeviceName the name of the other device that's receiving the content of the
+ * media projection. Null if the media projection is going to this same device (e.g. another
+ * app is recording the screen).
*/
- sealed class Projecting(open val hostPackage: String) : MediaProjectionState {
+ sealed class Projecting(
+ open val hostPackage: String,
+ open val hostDeviceName: String?,
+ ) : MediaProjectionState {
/** The entire screen is being projected. */
- data class EntireScreen(override val hostPackage: String) : Projecting(hostPackage)
+ data class EntireScreen(
+ override val hostPackage: String,
+ override val hostDeviceName: String? = null,
+ ) : Projecting(hostPackage, hostDeviceName)
/** Only a single task is being projected. */
- data class SingleTask(override val hostPackage: String, val task: RunningTaskInfo) :
- Projecting(hostPackage)
+ data class SingleTask(
+ override val hostPackage: String,
+ override val hostDeviceName: String?,
+ val task: RunningTaskInfo,
+ ) : Projecting(hostPackage, hostDeviceName)
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/mediaprojection/data/repository/MediaProjectionManagerRepository.kt b/packages/SystemUI/src/com/android/systemui/mediaprojection/data/repository/MediaProjectionManagerRepository.kt
index 8a9adc7a5c88..5704e8048b7d 100644
--- a/packages/SystemUI/src/com/android/systemui/mediaprojection/data/repository/MediaProjectionManagerRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/mediaprojection/data/repository/MediaProjectionManagerRepository.kt
@@ -17,10 +17,10 @@
package com.android.systemui.mediaprojection.data.repository
import android.app.ActivityManager.RunningTaskInfo
+import android.hardware.display.DisplayManager
import android.media.projection.MediaProjectionInfo
import android.media.projection.MediaProjectionManager
import android.os.Handler
-import android.util.Log
import android.view.ContentRecordingSession
import android.view.ContentRecordingSession.RECORD_CONTENT_DISPLAY
import com.android.systemui.common.coroutine.ChannelExt.trySendWithFailureLogging
@@ -28,6 +28,9 @@ 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.Main
+import com.android.systemui.log.LogBuffer
+import com.android.systemui.log.core.LogLevel
+import com.android.systemui.mediaprojection.MediaProjectionLog
import com.android.systemui.mediaprojection.MediaProjectionServiceHelper
import com.android.systemui.mediaprojection.data.model.MediaProjectionState
import com.android.systemui.mediaprojection.taskswitcher.data.repository.TasksRepository
@@ -35,37 +38,49 @@ import com.android.systemui.utils.coroutines.flow.conflatedCallbackFlow
import javax.inject.Inject
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.channels.awaitClose
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.SharingStarted
+import kotlinx.coroutines.flow.mapLatest
import kotlinx.coroutines.flow.stateIn
-import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
@SysUISingleton
+@OptIn(ExperimentalCoroutinesApi::class)
class MediaProjectionManagerRepository
@Inject
constructor(
private val mediaProjectionManager: MediaProjectionManager,
+ private val displayManager: DisplayManager,
@Main private val handler: Handler,
@Application private val applicationScope: CoroutineScope,
@Background private val backgroundDispatcher: CoroutineDispatcher,
private val tasksRepository: TasksRepository,
private val mediaProjectionServiceHelper: MediaProjectionServiceHelper,
+ @MediaProjectionLog private val logger: LogBuffer,
) : MediaProjectionRepository {
override suspend fun switchProjectedTask(task: RunningTaskInfo) {
withContext(backgroundDispatcher) {
if (mediaProjectionServiceHelper.updateTaskRecordingSession(task.token)) {
- Log.d(TAG, "Successfully switched projected task")
+ logger.log(TAG, LogLevel.DEBUG, {}, { "Successfully switched projected task" })
} else {
- Log.d(TAG, "Failed to switch projected task")
+ logger.log(TAG, LogLevel.WARNING, {}, { "Failed to switch projected task" })
}
}
}
override suspend fun stopProjecting() {
- withContext(backgroundDispatcher) { mediaProjectionManager.stopActiveProjection() }
+ withContext(backgroundDispatcher) {
+ logger.log(
+ TAG,
+ LogLevel.DEBUG,
+ {},
+ { "Requesting MediaProjectionManager#stopActiveProjection" },
+ )
+ mediaProjectionManager.stopActiveProjection()
+ }
}
override val mediaProjectionState: Flow<MediaProjectionState> =
@@ -73,28 +88,65 @@ constructor(
val callback =
object : MediaProjectionManager.Callback() {
override fun onStart(info: MediaProjectionInfo?) {
- Log.d(TAG, "MediaProjectionManager.Callback#onStart")
- trySendWithFailureLogging(MediaProjectionState.NotProjecting, TAG)
+ logger.log(
+ TAG,
+ LogLevel.DEBUG,
+ {},
+ { "MediaProjectionManager.Callback#onStart" },
+ )
+ trySendWithFailureLogging(CallbackEvent.OnStart, TAG)
}
override fun onStop(info: MediaProjectionInfo?) {
- Log.d(TAG, "MediaProjectionManager.Callback#onStop")
- trySendWithFailureLogging(MediaProjectionState.NotProjecting, TAG)
+ logger.log(
+ TAG,
+ LogLevel.DEBUG,
+ {},
+ { "MediaProjectionManager.Callback#onStop" },
+ )
+ trySendWithFailureLogging(CallbackEvent.OnStop, TAG)
}
override fun onRecordingSessionSet(
info: MediaProjectionInfo,
session: ContentRecordingSession?
) {
- Log.d(TAG, "MediaProjectionManager.Callback#onSessionStarted: $session")
- launch {
- trySendWithFailureLogging(stateForSession(info, session), TAG)
- }
+ logger.log(
+ TAG,
+ LogLevel.DEBUG,
+ { str1 = session.toString() },
+ { "MediaProjectionManager.Callback#onSessionStarted: $str1" },
+ )
+ trySendWithFailureLogging(
+ CallbackEvent.OnRecordingSessionSet(info, session),
+ TAG,
+ )
}
}
mediaProjectionManager.addCallback(callback, handler)
awaitClose { mediaProjectionManager.removeCallback(callback) }
}
+ // When we get an #onRecordingSessionSet event, we need to do some work in the
+ // background before emitting the right state value. But when we get an #onStop
+ // event, we immediately know what state value to emit.
+ //
+ // Without `mapLatest`, this could be a problem if an #onRecordingSessionSet event
+ // comes in and then an #onStop event comes in shortly afterwards (b/352483752):
+ // 1. #onRecordingSessionSet -> start some work in the background
+ // 2. #onStop -> immediately emit "Not Projecting"
+ // 3. onRecordingSessionSet work finishes -> emit "Projecting"
+ //
+ // At step 3, we *shouldn't* emit "Projecting" because #onStop was the last callback
+ // event we received, so we should be "Not Projecting". This `mapLatest` ensures
+ // that if an #onStop event comes in, we cancel any ongoing work for
+ // #onRecordingSessionSet and we don't emit "Projecting".
+ .mapLatest {
+ when (it) {
+ is CallbackEvent.OnStart,
+ is CallbackEvent.OnStop -> MediaProjectionState.NotProjecting
+ is CallbackEvent.OnRecordingSessionSet -> stateForSession(it.info, it.session)
+ }
+ }
.stateIn(
scope = applicationScope,
started = SharingStarted.Lazily,
@@ -110,14 +162,36 @@ constructor(
}
val hostPackage = info.packageName
+ val hostDeviceName =
+ withContext(backgroundDispatcher) {
+ // If the projection is to a different device, then the session's display ID should
+ // identify the display associated with that different device.
+ displayManager.getDisplay(session.virtualDisplayId)?.name
+ }
+
if (session.contentToRecord == RECORD_CONTENT_DISPLAY || session.tokenToRecord == null) {
- return MediaProjectionState.Projecting.EntireScreen(hostPackage)
+ return MediaProjectionState.Projecting.EntireScreen(hostPackage, hostDeviceName)
}
val matchingTask =
tasksRepository.findRunningTaskFromWindowContainerToken(
checkNotNull(session.tokenToRecord)
- ) ?: return MediaProjectionState.Projecting.EntireScreen(hostPackage)
- return MediaProjectionState.Projecting.SingleTask(hostPackage, matchingTask)
+ ) ?: return MediaProjectionState.Projecting.EntireScreen(hostPackage, hostDeviceName)
+ return MediaProjectionState.Projecting.SingleTask(hostPackage, hostDeviceName, matchingTask)
+ }
+
+ /**
+ * Translates [MediaProjectionManager.Callback] events into objects so that we always maintain
+ * the correct callback ordering.
+ */
+ sealed interface CallbackEvent {
+ data object OnStart : CallbackEvent
+
+ data object OnStop : CallbackEvent
+
+ data class OnRecordingSessionSet(
+ val info: MediaProjectionInfo,
+ val session: ContentRecordingSession?,
+ ) : CallbackEvent
}
companion object {
diff --git a/packages/SystemUI/src/com/android/systemui/mediaprojection/permission/BaseMediaProjectionPermissionDialogDelegate.kt b/packages/SystemUI/src/com/android/systemui/mediaprojection/permission/BaseMediaProjectionPermissionDialogDelegate.kt
index 6224170fd906..83f694bb1980 100644
--- a/packages/SystemUI/src/com/android/systemui/mediaprojection/permission/BaseMediaProjectionPermissionDialogDelegate.kt
+++ b/packages/SystemUI/src/com/android/systemui/mediaprojection/permission/BaseMediaProjectionPermissionDialogDelegate.kt
@@ -104,7 +104,7 @@ abstract class BaseMediaProjectionPermissionDialogDelegate<T : AlertDialog>(
private fun initScreenShareSpinner() {
val adapter = OptionsAdapter(dialog.context.applicationContext, screenShareOptions)
- screenShareModeSpinner = dialog.requireViewById(R.id.screen_share_mode_spinner)
+ screenShareModeSpinner = dialog.requireViewById(R.id.screen_share_mode_options)
screenShareModeSpinner.adapter = adapter
screenShareModeSpinner.onItemSelectedListener = this
diff --git a/packages/SystemUI/src/com/android/systemui/mediaprojection/permission/MediaProjectionPermissionActivity.java b/packages/SystemUI/src/com/android/systemui/mediaprojection/permission/MediaProjectionPermissionActivity.java
index f004c3a8916f..6c5337418d02 100644
--- a/packages/SystemUI/src/com/android/systemui/mediaprojection/permission/MediaProjectionPermissionActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/mediaprojection/permission/MediaProjectionPermissionActivity.java
@@ -187,44 +187,17 @@ public class MediaProjectionPermissionActivity extends Activity
}
}
- TextPaint paint = new TextPaint();
- paint.setTextSize(42);
-
CharSequence dialogText = null;
CharSequence dialogTitle = null;
- String appName = null;
- if (Utils.isHeadlessRemoteDisplayProvider(packageManager, mPackageName)) {
+
+ final String appName = extractAppName(aInfo, packageManager);
+ final boolean hasCastingCapabilities =
+ Utils.isHeadlessRemoteDisplayProvider(packageManager, mPackageName);
+
+ if (hasCastingCapabilities) {
dialogText = getString(R.string.media_projection_sys_service_dialog_warning);
dialogTitle = getString(R.string.media_projection_sys_service_dialog_title);
} else {
- String label = aInfo.loadLabel(packageManager).toString();
-
- // If the label contains new line characters it may push the security
- // message below the fold of the dialog. Labels shouldn't have new line
- // characters anyways, so just truncate the message the first time one
- // is seen.
- final int labelLength = label.length();
- int offset = 0;
- while (offset < labelLength) {
- final int codePoint = label.codePointAt(offset);
- final int type = Character.getType(codePoint);
- if (type == Character.LINE_SEPARATOR
- || type == Character.CONTROL
- || type == Character.PARAGRAPH_SEPARATOR) {
- label = label.substring(0, offset) + ELLIPSIS;
- break;
- }
- offset += Character.charCount(codePoint);
- }
-
- if (label.isEmpty()) {
- label = mPackageName;
- }
-
- String unsanitizedAppName = TextUtils.ellipsize(label,
- paint, MAX_APP_NAME_SIZE_PX, TextUtils.TruncateAt.END).toString();
- appName = BidiFormatter.getInstance().unicodeWrap(unsanitizedAppName);
-
String actionText = getString(R.string.media_projection_dialog_warning, appName);
SpannableString message = new SpannableString(actionText);
@@ -255,6 +228,7 @@ public class MediaProjectionPermissionActivity extends Activity
grantMediaProjectionPermission(selectedOption.getMode());
},
() -> finish(RECORD_CANCEL, /* projection= */ null),
+ hasCastingCapabilities,
appName,
overrideDisableSingleAppOption,
mUid,
@@ -289,6 +263,47 @@ public class MediaProjectionPermissionActivity extends Activity
}
}
+ private String extractAppName(ApplicationInfo applicationInfo, PackageManager packageManager) {
+ String label = applicationInfo.loadLabel(packageManager).toString();
+
+ // If the label contains new line characters it may push the security
+ // message below the fold of the dialog. Labels shouldn't have new line
+ // characters anyways, so just truncate the message the first time one
+ // is seen.
+ final int labelLength = label.length();
+ int offset = 0;
+ while (offset < labelLength) {
+ final int codePoint = label.codePointAt(offset);
+ final int type = Character.getType(codePoint);
+ if (type == Character.LINE_SEPARATOR
+ || type == Character.CONTROL
+ || type == Character.PARAGRAPH_SEPARATOR) {
+ label = label.substring(0, offset) + ELLIPSIS;
+ break;
+ }
+ offset += Character.charCount(codePoint);
+ }
+
+ if (label.isEmpty()) {
+ label = mPackageName;
+ }
+
+ TextPaint paint = new TextPaint();
+ paint.setTextSize(42);
+
+ String unsanitizedAppName = TextUtils.ellipsize(label,
+ paint, MAX_APP_NAME_SIZE_PX, TextUtils.TruncateAt.END).toString();
+ String appName = BidiFormatter.getInstance().unicodeWrap(unsanitizedAppName);
+
+ // Have app name be the package name as a default fallback, if specific app name can't be
+ // extracted
+ if (appName == null || appName.isEmpty()) {
+ return mPackageName;
+ }
+
+ return appName;
+ }
+
@Override
protected void onDestroy() {
super.onDestroy();
diff --git a/packages/SystemUI/src/com/android/systemui/mediaprojection/permission/MediaProjectionPermissionDialogDelegate.kt b/packages/SystemUI/src/com/android/systemui/mediaprojection/permission/MediaProjectionPermissionDialogDelegate.kt
index 8858041ae529..6d1a4587d089 100644
--- a/packages/SystemUI/src/com/android/systemui/mediaprojection/permission/MediaProjectionPermissionDialogDelegate.kt
+++ b/packages/SystemUI/src/com/android/systemui/mediaprojection/permission/MediaProjectionPermissionDialogDelegate.kt
@@ -29,13 +29,20 @@ class MediaProjectionPermissionDialogDelegate(
mediaProjectionConfig: MediaProjectionConfig?,
private val onStartRecordingClicked: Consumer<MediaProjectionPermissionDialogDelegate>,
private val onCancelClicked: Runnable,
- private val appName: String?,
- private val forceShowPartialScreenshare: Boolean,
+ private val hasCastingCapabilities: Boolean,
+ appName: String,
+ forceShowPartialScreenshare: Boolean,
hostUid: Int,
mediaProjectionMetricsLogger: MediaProjectionMetricsLogger,
) :
BaseMediaProjectionPermissionDialogDelegate<AlertDialog>(
- createOptionList(context, appName, mediaProjectionConfig, forceShowPartialScreenshare),
+ createOptionList(
+ context,
+ appName,
+ hasCastingCapabilities,
+ mediaProjectionConfig,
+ forceShowPartialScreenshare
+ ),
appName,
hostUid,
mediaProjectionMetricsLogger
@@ -43,7 +50,7 @@ class MediaProjectionPermissionDialogDelegate(
override fun onCreate(dialog: AlertDialog, savedInstanceState: Bundle?) {
super.onCreate(dialog, savedInstanceState)
// TODO(b/270018943): Handle the case of System sharing (not recording nor casting)
- if (appName == null) {
+ if (hasCastingCapabilities) {
setDialogTitle(R.string.media_projection_entry_cast_permission_dialog_title)
setStartButtonText(R.string.media_projection_entry_cast_permission_dialog_continue)
} else {
@@ -65,30 +72,29 @@ class MediaProjectionPermissionDialogDelegate(
companion object {
private fun createOptionList(
context: Context,
- appName: String?,
+ appName: String,
+ hasCastingCapabilities: Boolean,
mediaProjectionConfig: MediaProjectionConfig?,
overrideDisableSingleAppOption: Boolean = false,
): List<ScreenShareOption> {
val singleAppWarningText =
- if (appName == null) {
+ if (hasCastingCapabilities) {
R.string.media_projection_entry_cast_permission_dialog_warning_single_app
} else {
R.string.media_projection_entry_app_permission_dialog_warning_single_app
}
val entireScreenWarningText =
- if (appName == null) {
+ if (hasCastingCapabilities) {
R.string.media_projection_entry_cast_permission_dialog_warning_entire_screen
} else {
R.string.media_projection_entry_app_permission_dialog_warning_entire_screen
}
- // The single app option should only be disabled if there is an app name provided,
- // the client has setup a MediaProjection with
- // MediaProjectionConfig#createConfigForDefaultDisplay, AND it hasn't been overridden by
- // the OVERRIDE_DISABLE_SINGLE_APP_OPTION per-app override.
+ // The single app option should only be disabled if the client has setup a
+ // MediaProjection with MediaProjectionConfig#createConfigForDefaultDisplay AND
+ // it hasn't been overridden by the OVERRIDE_DISABLE_SINGLE_APP_OPTION per-app override.
val singleAppOptionDisabled =
- appName != null &&
- !overrideDisableSingleAppOption &&
+ !overrideDisableSingleAppOption &&
mediaProjectionConfig?.regionToCapture ==
MediaProjectionConfig.CAPTURE_REGION_FIXED_DISPLAY
diff --git a/packages/SystemUI/src/com/android/systemui/qs/panels/shared/model/IconLabelVisibilityLog.kt b/packages/SystemUI/src/com/android/systemui/mediarouter/MediaRouterLog.kt
index c92234c3e535..16bf0ffbf9e9 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/panels/shared/model/IconLabelVisibilityLog.kt
+++ b/packages/SystemUI/src/com/android/systemui/mediarouter/MediaRouterLog.kt
@@ -14,11 +14,12 @@
* limitations under the License.
*/
-package com.android.systemui.qs.panels.shared.model
+package com.android.systemui.mediarouter
import javax.inject.Qualifier
+/** Logs for events related to MediaRouter APIs. */
@Qualifier
@MustBeDocumented
@Retention(AnnotationRetention.RUNTIME)
-annotation class IconLabelVisibilityLog()
+annotation class MediaRouterLog
diff --git a/packages/SystemUI/src/com/android/systemui/mediarouter/MediaRouterModule.kt b/packages/SystemUI/src/com/android/systemui/mediarouter/MediaRouterModule.kt
index c07e3a0e7cec..df5dae4dd33a 100644
--- a/packages/SystemUI/src/com/android/systemui/mediarouter/MediaRouterModule.kt
+++ b/packages/SystemUI/src/com/android/systemui/mediarouter/MediaRouterModule.kt
@@ -16,12 +16,25 @@
package com.android.systemui.mediarouter
+import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.log.LogBuffer
+import com.android.systemui.log.LogBufferFactory
import com.android.systemui.mediarouter.data.repository.MediaRouterRepository
import com.android.systemui.mediarouter.data.repository.MediaRouterRepositoryImpl
import dagger.Binds
import dagger.Module
+import dagger.Provides
@Module
interface MediaRouterModule {
@Binds fun mediaRouterRepository(impl: MediaRouterRepositoryImpl): MediaRouterRepository
+
+ companion object {
+ @Provides
+ @SysUISingleton
+ @MediaRouterLog
+ fun provideMediaRouterLogBuffer(factory: LogBufferFactory): LogBuffer {
+ return factory.create("MediaRouter", 50)
+ }
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/mediarouter/data/repository/MediaRouterRepository.kt b/packages/SystemUI/src/com/android/systemui/mediarouter/data/repository/MediaRouterRepository.kt
index 998d76ced9f7..debb667bbb15 100644
--- a/packages/SystemUI/src/com/android/systemui/mediarouter/data/repository/MediaRouterRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/mediarouter/data/repository/MediaRouterRepository.kt
@@ -18,6 +18,9 @@ package com.android.systemui.mediarouter.data.repository
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
+import com.android.systemui.log.LogBuffer
+import com.android.systemui.log.core.LogLevel
+import com.android.systemui.mediarouter.MediaRouterLog
import com.android.systemui.statusbar.policy.CastController
import com.android.systemui.statusbar.policy.CastDevice
import com.android.systemui.utils.coroutines.flow.conflatedCallbackFlow
@@ -26,6 +29,9 @@ import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.channels.awaitClose
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.StateFlow
+import kotlinx.coroutines.flow.distinctUntilChanged
+import kotlinx.coroutines.flow.map
+import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.flow.stateIn
/** A repository for data coming from MediaRouter APIs. */
@@ -43,23 +49,29 @@ class MediaRouterRepositoryImpl
constructor(
@Application private val scope: CoroutineScope,
private val castController: CastController,
+ @MediaRouterLog private val logger: LogBuffer,
) : MediaRouterRepository {
override val castDevices: StateFlow<List<CastDevice>> =
conflatedCallbackFlow {
- val callback =
- CastController.Callback {
- val mediaRouterCastDevices =
- castController.castDevices.filter {
- it.origin == CastDevice.CastOrigin.MediaRouter
- }
- trySend(mediaRouterCastDevices)
- }
+ val callback = CastController.Callback { trySend(castController.castDevices) }
castController.addCallback(callback)
awaitClose { castController.removeCallback(callback) }
}
+ // The CastController.Callback is pretty noisy and sends the same values multiple times
+ // in a row, so use a distinctUntilChanged before logging.
+ .distinctUntilChanged()
+ .onEach { allDevices ->
+ val logString = allDevices.map { it.shortLogString }.toString()
+ logger.log(TAG, LogLevel.INFO, { str1 = logString }, { "All cast devices: $str1" })
+ }
+ .map { it.filter { device -> device.origin == CastDevice.CastOrigin.MediaRouter } }
.stateIn(scope, SharingStarted.WhileSubscribed(), emptyList())
override fun stopCasting(device: CastDevice) {
castController.stopCasting(device)
}
+
+ companion object {
+ private const val TAG = "MediaRouterRepo"
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/gestural/BackPanelController.kt b/packages/SystemUI/src/com/android/systemui/navigationbar/gestural/BackPanelController.kt
index 18358a79cbca..d8c13b6e8f6d 100644
--- a/packages/SystemUI/src/com/android/systemui/navigationbar/gestural/BackPanelController.kt
+++ b/packages/SystemUI/src/com/android/systemui/navigationbar/gestural/BackPanelController.kt
@@ -33,6 +33,7 @@ import androidx.annotation.VisibleForTesting
import androidx.core.os.postDelayed
import androidx.core.view.isVisible
import androidx.dynamicanimation.animation.DynamicAnimation
+import com.android.app.viewcapture.ViewCaptureAwareWindowManager
import com.android.internal.jank.Cuj
import com.android.internal.jank.InteractionJankMonitor
import com.android.internal.util.LatencyTracker
@@ -83,7 +84,7 @@ private const val DEBUG = false
class BackPanelController
internal constructor(
context: Context,
- private val windowManager: WindowManager,
+ private val windowManager: ViewCaptureAwareWindowManager,
private val viewConfiguration: ViewConfiguration,
private val mainHandler: Handler,
private val systemClock: SystemClock,
@@ -102,7 +103,7 @@ internal constructor(
class Factory
@Inject
constructor(
- private val windowManager: WindowManager,
+ private val windowManager: ViewCaptureAwareWindowManager,
private val viewConfiguration: ViewConfiguration,
@BackPanelUiThread private val uiThreadContext: UiThreadContext,
private val systemClock: SystemClock,
diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/gestural/EdgeBackGestureHandler.java b/packages/SystemUI/src/com/android/systemui/navigationbar/gestural/EdgeBackGestureHandler.java
index c9be9938ef74..947336d41590 100644
--- a/packages/SystemUI/src/com/android/systemui/navigationbar/gestural/EdgeBackGestureHandler.java
+++ b/packages/SystemUI/src/com/android/systemui/navigationbar/gestural/EdgeBackGestureHandler.java
@@ -91,6 +91,7 @@ import com.android.systemui.shared.system.QuickStepContract.SystemUiStateFlags;
import com.android.systemui.shared.system.SysUiStatsLog;
import com.android.systemui.shared.system.TaskStackChangeListener;
import com.android.systemui.shared.system.TaskStackChangeListeners;
+import com.android.systemui.statusbar.NotificationShadeWindowController;
import com.android.systemui.statusbar.phone.LightBarController;
import com.android.systemui.util.concurrency.BackPanelUiThread;
import com.android.systemui.util.concurrency.UiThreadContext;
@@ -297,6 +298,7 @@ public class EdgeBackGestureHandler implements PluginListener<NavigationEdgeBack
private Date mTmpLogDate = new Date();
private final GestureNavigationSettingsObserver mGestureNavigationSettingsObserver;
+ private final NotificationShadeWindowController mNotificationShadeWindowController;
private final NavigationEdgeBackPlugin.BackCallback mBackCallback =
new NavigationEdgeBackPlugin.BackCallback() {
@@ -423,7 +425,8 @@ public class EdgeBackGestureHandler implements PluginListener<NavigationEdgeBack
Optional<DesktopMode> desktopModeOptional,
FalsingManager falsingManager,
Provider<BackGestureTfClassifierProvider> backGestureTfClassifierProviderProvider,
- Provider<LightBarController> lightBarControllerProvider) {
+ Provider<LightBarController> lightBarControllerProvider,
+ NotificationShadeWindowController notificationShadeWindowController) {
mContext = context;
mDisplayId = context.getDisplayId();
mUiThreadContext = uiThreadContext;
@@ -479,6 +482,7 @@ public class EdgeBackGestureHandler implements PluginListener<NavigationEdgeBack
this::onNavigationSettingsChanged);
updateCurrentUserResources();
+ mNotificationShadeWindowController = notificationShadeWindowController;
}
public void setStateChangeCallback(Runnable callback) {
@@ -1297,6 +1301,9 @@ public class EdgeBackGestureHandler implements PluginListener<NavigationEdgeBack
mBackAnimation.setPilferPointerCallback(() -> {
pilferPointers();
});
+ mBackAnimation.setTopUiRequestCallback(
+ (requestTopUi, tag) -> mUiThreadContext.getExecutor().execute(() ->
+ mNotificationShadeWindowController.setRequestTopUi(requestTopUi, tag)));
updateBackAnimationThresholds();
if (mLightBarControllerProvider.get() != null) {
mBackAnimation.setStatusBarCustomizer((appearance) -> {
@@ -1333,6 +1340,7 @@ public class EdgeBackGestureHandler implements PluginListener<NavigationEdgeBack
private final Provider<BackGestureTfClassifierProvider>
mBackGestureTfClassifierProviderProvider;
private final Provider<LightBarController> mLightBarControllerProvider;
+ private final NotificationShadeWindowController mNotificationShadeWindowController;
@Inject
public Factory(OverviewProxyService overviewProxyService,
@@ -1353,7 +1361,8 @@ public class EdgeBackGestureHandler implements PluginListener<NavigationEdgeBack
FalsingManager falsingManager,
Provider<BackGestureTfClassifierProvider>
backGestureTfClassifierProviderProvider,
- Provider<LightBarController> lightBarControllerProvider) {
+ Provider<LightBarController> lightBarControllerProvider,
+ NotificationShadeWindowController notificationShadeWindowController) {
mOverviewProxyService = overviewProxyService;
mSysUiState = sysUiState;
mPluginManager = pluginManager;
@@ -1372,6 +1381,7 @@ public class EdgeBackGestureHandler implements PluginListener<NavigationEdgeBack
mFalsingManager = falsingManager;
mBackGestureTfClassifierProviderProvider = backGestureTfClassifierProviderProvider;
mLightBarControllerProvider = lightBarControllerProvider;
+ mNotificationShadeWindowController = notificationShadeWindowController;
}
/** Construct a {@link EdgeBackGestureHandler}. */
@@ -1396,7 +1406,8 @@ public class EdgeBackGestureHandler implements PluginListener<NavigationEdgeBack
mDesktopModeOptional,
mFalsingManager,
mBackGestureTfClassifierProviderProvider,
- mLightBarControllerProvider));
+ mLightBarControllerProvider,
+ mNotificationShadeWindowController));
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/views/NavigationBar.java b/packages/SystemUI/src/com/android/systemui/navigationbar/views/NavigationBar.java
index e832abb420f0..afdfa5932162 100644
--- a/packages/SystemUI/src/com/android/systemui/navigationbar/views/NavigationBar.java
+++ b/packages/SystemUI/src/com/android/systemui/navigationbar/views/NavigationBar.java
@@ -40,6 +40,8 @@ import static com.android.systemui.navigationbar.NavBarHelper.transitionMode;
import static com.android.systemui.recents.OverviewProxyService.OverviewProxyListener;
import static com.android.systemui.shared.recents.utilities.Utilities.isLargeScreen;
import static com.android.systemui.shared.rotation.RotationButtonController.DEBUG_ROTATION;
+import static com.android.systemui.shared.statusbar.phone.BarTransitions.MODE_OPAQUE;
+import static com.android.systemui.shared.statusbar.phone.BarTransitions.TransitionMode;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_A11Y_BUTTON_CLICKABLE;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_A11Y_BUTTON_LONG_CLICKABLE;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_ALLOW_GESTURE_IGNORING_BAR_VISIBILITY;
@@ -48,8 +50,6 @@ import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_I
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_NAV_BAR_HIDDEN;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_SCREEN_PINNING;
import static com.android.systemui.shared.system.QuickStepContract.isGesturalMode;
-import static com.android.systemui.shared.statusbar.phone.BarTransitions.MODE_OPAQUE;
-import static com.android.systemui.shared.statusbar.phone.BarTransitions.TransitionMode;
import static com.android.systemui.statusbar.phone.CentralSurfaces.DEBUG_WINDOW_STATE;
import static com.android.systemui.statusbar.phone.CentralSurfaces.dumpBarTransitions;
import static com.android.systemui.util.Utils.isGesturalModeOnDefaultDisplay;
@@ -97,6 +97,7 @@ import android.view.WindowInsetsController.Behavior;
import android.view.WindowManager;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityManager;
+import android.view.inputmethod.Flags;
import android.view.inputmethod.InputMethodManager;
import androidx.annotation.Nullable;
@@ -117,17 +118,17 @@ import com.android.systemui.dagger.qualifiers.DisplayId;
import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.keyguard.WakefulnessLifecycle;
import com.android.systemui.model.SysUiState;
-import com.android.systemui.navigationbar.views.buttons.NavBarButtonClickLogger;
import com.android.systemui.navigationbar.NavBarHelper;
import com.android.systemui.navigationbar.NavigationBarComponent.NavigationBarScope;
import com.android.systemui.navigationbar.NavigationModeController;
import com.android.systemui.navigationbar.NavigationModeController.ModeChangedListener;
+import com.android.systemui.navigationbar.gestural.EdgeBackGestureHandler;
+import com.android.systemui.navigationbar.gestural.QuickswitchOrientedNavHandle;
import com.android.systemui.navigationbar.views.buttons.ButtonDispatcher;
import com.android.systemui.navigationbar.views.buttons.DeadZone;
import com.android.systemui.navigationbar.views.buttons.KeyButtonView;
+import com.android.systemui.navigationbar.views.buttons.NavBarButtonClickLogger;
import com.android.systemui.navigationbar.views.buttons.NavbarOrientationTrackingLogger;
-import com.android.systemui.navigationbar.gestural.EdgeBackGestureHandler;
-import com.android.systemui.navigationbar.gestural.QuickswitchOrientedNavHandle;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.recents.OverviewProxyService;
import com.android.systemui.recents.Recents;
@@ -1348,6 +1349,9 @@ public class NavigationBar extends ViewController<NavigationBarView> implements
ButtonDispatcher imeSwitcherButton = mView.getImeSwitchButton();
imeSwitcherButton.setOnClickListener(this::onImeSwitcherClick);
+ if (Flags.imeSwitcherRevamp()) {
+ imeSwitcherButton.setOnLongClickListener(this::onImeSwitcherLongClick);
+ }
updateScreenPinningGestures();
}
@@ -1501,12 +1505,29 @@ public class NavigationBar extends ViewController<NavigationBarView> implements
mCommandQueue.toggleRecentApps();
}
- private void onImeSwitcherClick(View v) {
+ @VisibleForTesting
+ void onImeSwitcherClick(View v) {
+ mNavBarButtonClickLogger.logImeSwitcherClick();
+ if (Flags.imeSwitcherRevamp()) {
+ mInputMethodManager.onImeSwitchButtonClickFromSystem(mDisplayId);
+ } else {
+ mInputMethodManager.showInputMethodPickerFromSystem(
+ true /* showAuxiliarySubtypes */, mDisplayId);
+ }
+ mUiEventLogger.log(KeyButtonView.NavBarButtonEvent.NAVBAR_IME_SWITCHER_BUTTON_TAP);
+ }
+
+ @VisibleForTesting
+ boolean onImeSwitcherLongClick(View v) {
+ if (!Flags.imeSwitcherRevamp()) {
+ return false;
+ }
mNavBarButtonClickLogger.logImeSwitcherClick();
mInputMethodManager.showInputMethodPickerFromSystem(
true /* showAuxiliarySubtypes */, mDisplayId);
- mUiEventLogger.log(KeyButtonView.NavBarButtonEvent.NAVBAR_IME_SWITCHER_BUTTON_TAP);
- };
+ mUiEventLogger.log(KeyButtonView.NavBarButtonEvent.NAVBAR_IME_SWITCHER_BUTTON_LONGPRESS);
+ return true;
+ }
private boolean onLongPressBackHome(View v) {
return onLongPressNavigationButtons(v, R.id.back, R.id.home);
diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/views/NavigationBarView.java b/packages/SystemUI/src/com/android/systemui/navigationbar/views/NavigationBarView.java
index 0f360973019f..c4abcd2afc4f 100644
--- a/packages/SystemUI/src/com/android/systemui/navigationbar/views/NavigationBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/navigationbar/views/NavigationBarView.java
@@ -19,7 +19,6 @@ package com.android.systemui.navigationbar.views;
import static android.inputmethodservice.InputMethodService.canImeRenderGesturalNavButtons;
import static android.view.WindowManagerPolicyConstants.NAV_BAR_MODE_GESTURAL;
-import static com.android.systemui.Flags.enableViewCaptureTracing;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_HOME_DISABLED;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_OVERVIEW_DISABLED;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_SEARCH_DISABLED;
@@ -38,7 +37,6 @@ import android.content.res.Configuration;
import android.graphics.Canvas;
import android.graphics.Point;
import android.graphics.Rect;
-import android.media.permission.SafeCloseable;
import android.os.Bundle;
import android.os.RemoteException;
import android.util.AttributeSet;
@@ -56,24 +54,24 @@ import android.view.WindowManager;
import android.view.WindowManagerGlobal;
import android.view.accessibility.AccessibilityNodeInfo;
import android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction;
+import android.view.inputmethod.Flags;
import android.widget.FrameLayout;
import androidx.annotation.Nullable;
import com.android.app.animation.Interpolators;
-import com.android.app.viewcapture.ViewCaptureFactory;
import com.android.internal.annotations.VisibleForTesting;
import com.android.settingslib.Utils;
import com.android.systemui.Gefingerpoken;
import com.android.systemui.model.SysUiState;
import com.android.systemui.navigationbar.ScreenPinningNotify;
+import com.android.systemui.navigationbar.gestural.EdgeBackGestureHandler;
import com.android.systemui.navigationbar.views.buttons.ButtonDispatcher;
import com.android.systemui.navigationbar.views.buttons.ContextualButton;
import com.android.systemui.navigationbar.views.buttons.ContextualButtonGroup;
import com.android.systemui.navigationbar.views.buttons.DeadZone;
import com.android.systemui.navigationbar.views.buttons.KeyButtonDrawable;
import com.android.systemui.navigationbar.views.buttons.NearestTouchFrame;
-import com.android.systemui.navigationbar.gestural.EdgeBackGestureHandler;
import com.android.systemui.recents.Recents;
import com.android.systemui.res.R;
import com.android.systemui.settings.DisplayTracker;
@@ -181,7 +179,6 @@ public class NavigationBarView extends FrameLayout {
private boolean mOverviewProxyEnabled;
private boolean mShowSwipeUpUi;
private UpdateActiveTouchRegionsCallback mUpdateActiveTouchRegionsCallback;
- private SafeCloseable mViewCaptureCloseable;
private class NavTransitionListener implements TransitionListener {
private boolean mBackTransitioning;
@@ -289,8 +286,11 @@ public class NavigationBarView extends FrameLayout {
// Set up the context group of buttons
mContextualButtonGroup = new ContextualButtonGroup(R.id.menu_container);
+ final int switcherResId = Flags.imeSwitcherRevamp()
+ ? com.android.internal.R.drawable.ic_ime_switcher_new
+ : R.drawable.ic_ime_switcher_default;
final ContextualButton imeSwitcherButton = new ContextualButton(R.id.ime_switcher,
- mLightContext, R.drawable.ic_ime_switcher_default);
+ mLightContext, switcherResId);
final ContextualButton accessibilityButton =
new ContextualButton(R.id.accessibility_button, mLightContext,
R.drawable.ic_sysbar_accessibility_button);
@@ -1082,10 +1082,6 @@ public class NavigationBarView extends FrameLayout {
}
updateNavButtonIcons();
- if (enableViewCaptureTracing()) {
- mViewCaptureCloseable = ViewCaptureFactory.getInstance(getContext())
- .startCapture(getRootView(), ".NavigationBarView");
- }
}
@Override
@@ -1098,9 +1094,6 @@ public class NavigationBarView extends FrameLayout {
mFloatingRotationButton.hide();
mRotationButtonController.unregisterListeners();
}
- if (mViewCaptureCloseable != null) {
- mViewCaptureCloseable.close();
- }
}
void dump(PrintWriter pw) {
diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/views/buttons/KeyButtonView.java b/packages/SystemUI/src/com/android/systemui/navigationbar/views/buttons/KeyButtonView.java
index 1e85d6c9237b..133d14ddb9f4 100644
--- a/packages/SystemUI/src/com/android/systemui/navigationbar/views/buttons/KeyButtonView.java
+++ b/packages/SystemUI/src/com/android/systemui/navigationbar/views/buttons/KeyButtonView.java
@@ -112,6 +112,9 @@ public class KeyButtonView extends ImageView implements ButtonInterface {
@UiEvent(doc = "The overview button was long-pressed in the navigation bar.")
NAVBAR_OVERVIEW_BUTTON_LONGPRESS(538),
+ @UiEvent(doc = "The ime switcher button was long-pressed in the navigation bar.")
+ NAVBAR_IME_SWITCHER_BUTTON_LONGPRESS(1799),
+
NONE(0); // an event we should not log
private final int mId;
diff --git a/packages/SystemUI/src/com/android/systemui/people/widget/PeopleBackupHelper.java b/packages/SystemUI/src/com/android/systemui/people/widget/PeopleBackupHelper.java
index d8c96dd182b4..eadbffe49495 100644
--- a/packages/SystemUI/src/com/android/systemui/people/widget/PeopleBackupHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/people/widget/PeopleBackupHelper.java
@@ -41,6 +41,8 @@ import android.preference.PreferenceManager;
import android.text.TextUtils;
import android.util.Log;
+import androidx.annotation.Nullable;
+
import com.android.internal.annotations.VisibleForTesting;
import com.android.systemui.people.PeopleBackupFollowUpJob;
import com.android.systemui.people.SharedPreferencesHelper;
@@ -67,6 +69,7 @@ public class PeopleBackupHelper extends SharedPreferencesBackupHelper {
private final UserHandle mUserHandle;
private final PackageManager mPackageManager;
private final IPeopleManager mIPeopleManager;
+ @Nullable
private final AppWidgetManager mAppWidgetManager;
/**
@@ -404,6 +407,9 @@ public class PeopleBackupHelper extends SharedPreferencesBackupHelper {
private List<String> getExistingWidgetsForUser(int userId) {
List<String> existingWidgets = new ArrayList<>();
+ if (mAppWidgetManager == null) {
+ return existingWidgets;
+ }
int[] ids = mAppWidgetManager.getAppWidgetIds(
new ComponentName(mContext, PeopleSpaceWidgetProvider.class));
for (int id : ids) {
@@ -491,7 +497,11 @@ public class PeopleBackupHelper extends SharedPreferencesBackupHelper {
/** Sends a broadcast to update the existing Conversation widgets. */
public static void updateWidgets(Context context) {
- int[] widgetIds = AppWidgetManager.getInstance(context)
+ AppWidgetManager manager = AppWidgetManager.getInstance(context);
+ if (manager == null) {
+ return;
+ }
+ int[] widgetIds = manager
.getAppWidgetIds(new ComponentName(context, PeopleSpaceWidgetProvider.class));
if (DEBUG) {
for (int id : widgetIds) {
diff --git a/packages/SystemUI/src/com/android/systemui/people/widget/PeopleSpaceWidgetManager.java b/packages/SystemUI/src/com/android/systemui/people/widget/PeopleSpaceWidgetManager.java
index 0a880293ca76..b0de80c8d7bb 100644
--- a/packages/SystemUI/src/com/android/systemui/people/widget/PeopleSpaceWidgetManager.java
+++ b/packages/SystemUI/src/com/android/systemui/people/widget/PeopleSpaceWidgetManager.java
@@ -140,7 +140,7 @@ public class PeopleSpaceWidgetManager implements Dumpable {
private final Object mLock = new Object();
private final Context mContext;
private LauncherApps mLauncherApps;
- private AppWidgetManager mAppWidgetManager;
+ private Optional<AppWidgetManager> mAppWidgetManagerOptional;
private IPeopleManager mIPeopleManager;
private SharedPreferences mSharedPrefs;
private PeopleManager mPeopleManager;
@@ -183,8 +183,9 @@ public class PeopleSpaceWidgetManager implements Dumpable {
};
@Inject
- public PeopleSpaceWidgetManager(Context context, LauncherApps launcherApps,
- CommonNotifCollection notifCollection,
+ public PeopleSpaceWidgetManager(Context context,
+ Optional<AppWidgetManager> appWidgetManagerOptional,
+ LauncherApps launcherApps, CommonNotifCollection notifCollection,
PackageManager packageManager, Optional<Bubbles> bubblesOptional,
UserManager userManager, NotificationManager notificationManager,
BroadcastDispatcher broadcastDispatcher, @Background Executor bgExecutor,
@@ -192,7 +193,7 @@ public class PeopleSpaceWidgetManager implements Dumpable {
@NonNull KeyguardUpdateMonitor keyguardUpdateMonitor) {
if (DEBUG) Log.d(TAG, "constructor");
mContext = context;
- mAppWidgetManager = AppWidgetManager.getInstance(context);
+ mAppWidgetManagerOptional = appWidgetManagerOptional;
mIPeopleManager = IPeopleManager.Stub.asInterface(
ServiceManager.getService(Context.PEOPLE_SERVICE));
mLauncherApps = launcherApps;
@@ -266,14 +267,14 @@ public class PeopleSpaceWidgetManager implements Dumpable {
*/
@VisibleForTesting
PeopleSpaceWidgetManager(Context context,
- AppWidgetManager appWidgetManager, IPeopleManager iPeopleManager,
+ Optional<AppWidgetManager> appWidgetManager, IPeopleManager iPeopleManager,
PeopleManager peopleManager, LauncherApps launcherApps,
CommonNotifCollection notifCollection, PackageManager packageManager,
Optional<Bubbles> bubblesOptional, UserManager userManager, BackupManager backupManager,
INotificationManager iNotificationManager, NotificationManager notificationManager,
@Background Executor executor, UserTracker userTracker) {
mContext = context;
- mAppWidgetManager = appWidgetManager;
+ mAppWidgetManagerOptional = appWidgetManager;
mIPeopleManager = iPeopleManager;
mPeopleManager = peopleManager;
mLauncherApps = launcherApps;
@@ -337,6 +338,10 @@ public class PeopleSpaceWidgetManager implements Dumpable {
/** Updates the current widget view with provided {@link PeopleSpaceTile}. */
private void updateAppWidgetViews(int appWidgetId, PeopleSpaceTile tile, Bundle options) {
+ if (mAppWidgetManagerOptional.isEmpty()) {
+ return;
+ }
+
PeopleTileKey key = getKeyFromStorageByWidgetId(appWidgetId);
if (DEBUG) Log.d(TAG, "Widget: " + appWidgetId + " for: " + key.toString());
@@ -349,7 +354,7 @@ public class PeopleSpaceWidgetManager implements Dumpable {
// Tell the AppWidgetManager to perform an update on the current app widget.
if (DEBUG) Log.d(TAG, "Calling update widget for widgetId: " + appWidgetId);
- mAppWidgetManager.updateAppWidget(appWidgetId, views);
+ mAppWidgetManagerOptional.get().updateAppWidget(appWidgetId, views);
}
/** Updates tile in app widget options and the current view. */
@@ -362,13 +367,17 @@ public class PeopleSpaceWidgetManager implements Dumpable {
/** Updates tile in app widget options and the current view. */
public void updateAppWidgetOptionsAndView(int appWidgetId, PeopleSpaceTile tile) {
+ if (mAppWidgetManagerOptional.isEmpty()) {
+ return;
+ }
+
if (tile == null) {
Log.w(TAG, "Storing null tile for widget " + appWidgetId);
}
synchronized (mTiles) {
mTiles.put(appWidgetId, tile);
}
- Bundle options = mAppWidgetManager.getAppWidgetOptions(appWidgetId);
+ Bundle options = mAppWidgetManagerOptional.get().getAppWidgetOptions(appWidgetId);
updateAppWidgetViews(appWidgetId, tile, options);
}
@@ -484,6 +493,10 @@ public class PeopleSpaceWidgetManager implements Dumpable {
private void updateWidgetsWithNotificationChangedInBackground(StatusBarNotification sbn,
PeopleSpaceUtils.NotificationAction action,
Collection<NotificationEntry> notifications) {
+ if (mAppWidgetManagerOptional.isEmpty()) {
+ return;
+ }
+
try {
PeopleTileKey key = new PeopleTileKey(
sbn.getShortcutId(), sbn.getUser().getIdentifier(), sbn.getPackageName());
@@ -491,7 +504,7 @@ public class PeopleSpaceWidgetManager implements Dumpable {
if (DEBUG) Log.d(TAG, "Sbn doesn't contain valid PeopleTileKey: " + key.toString());
return;
}
- int[] widgetIds = mAppWidgetManager.getAppWidgetIds(
+ int[] widgetIds = mAppWidgetManagerOptional.get().getAppWidgetIds(
new ComponentName(mContext, PeopleSpaceWidgetProvider.class)
);
if (widgetIds.length == 0) {
@@ -807,10 +820,14 @@ public class PeopleSpaceWidgetManager implements Dumpable {
UserHandle user,
NotificationChannel channel,
int modificationType) {
+ if (mAppWidgetManagerOptional.isEmpty()) {
+ return;
+ }
+
if (channel.isConversation()) {
mBgExecutor.execute(() -> {
if (mUserManager.isUserUnlocked(user)) {
- updateWidgets(mAppWidgetManager.getAppWidgetIds(
+ updateWidgets(mAppWidgetManagerOptional.get().getAppWidgetIds(
new ComponentName(mContext, PeopleSpaceWidgetProvider.class)
));
}
@@ -829,13 +846,18 @@ public class PeopleSpaceWidgetManager implements Dumpable {
// learning about the widget. If so, the widget adder should have populated options with
// PeopleTileKey arguments.
if (DEBUG) Log.d(TAG, "onAppWidgetOptionsChanged called for widget: " + appWidgetId);
+ if (mAppWidgetManagerOptional.isEmpty()) {
+ return;
+ }
+
PeopleTileKey optionsKey = AppWidgetOptionsHelper.getPeopleTileKeyFromBundle(newOptions);
if (PeopleTileKey.isValid(optionsKey)) {
if (DEBUG) {
Log.d(TAG, "PeopleTileKey was present in Options, shortcutId: "
+ optionsKey.getShortcutId());
}
- AppWidgetOptionsHelper.removePeopleTileKey(mAppWidgetManager, appWidgetId);
+ AppWidgetOptionsHelper.removePeopleTileKey(mAppWidgetManagerOptional.get(),
+ appWidgetId);
addNewWidget(appWidgetId, optionsKey);
}
// Update views for new widget dimensions.
@@ -1004,6 +1026,10 @@ public class PeopleSpaceWidgetManager implements Dumpable {
public boolean requestPinAppWidget(ShortcutInfo shortcutInfo, Bundle options) {
if (DEBUG) Log.d(TAG, "Requesting pin widget, shortcutId: " + shortcutInfo.getId());
+ if (mAppWidgetManagerOptional.isEmpty()) {
+ return false;
+ }
+
RemoteViews widgetPreview = getPreview(shortcutInfo.getId(),
shortcutInfo.getUserHandle(), shortcutInfo.getPackage(), options);
if (widgetPreview == null) {
@@ -1017,7 +1043,8 @@ public class PeopleSpaceWidgetManager implements Dumpable {
PeopleSpaceWidgetPinnedReceiver.getPendingIntent(mContext, shortcutInfo);
ComponentName componentName = new ComponentName(mContext, PeopleSpaceWidgetProvider.class);
- return mAppWidgetManager.requestPinAppWidget(componentName, extras, successCallback);
+ return mAppWidgetManagerOptional.get().requestPinAppWidget(componentName, extras,
+ successCallback);
}
/** Returns a list of map entries corresponding to user's priority conversations. */
@@ -1104,7 +1131,11 @@ public class PeopleSpaceWidgetManager implements Dumpable {
/** Updates any app widget to the current state, triggered by a broadcast update. */
@VisibleForTesting
void updateWidgetsFromBroadcastInBackground(String entryPoint) {
- int[] appWidgetIds = mAppWidgetManager.getAppWidgetIds(
+ if (mAppWidgetManagerOptional.isEmpty()) {
+ return;
+ }
+
+ int[] appWidgetIds = mAppWidgetManagerOptional.get().getAppWidgetIds(
new ComponentName(mContext, PeopleSpaceWidgetProvider.class));
if (appWidgetIds == null) {
return;
@@ -1272,13 +1303,17 @@ public class PeopleSpaceWidgetManager implements Dumpable {
remapSharedFile(widgets);
remapFollowupFile(widgets);
- int[] widgetIds = mAppWidgetManager.getAppWidgetIds(
+ if (mAppWidgetManagerOptional.isEmpty()) {
+ return;
+ }
+
+ int[] widgetIds = mAppWidgetManagerOptional.get().getAppWidgetIds(
new ComponentName(mContext, PeopleSpaceWidgetProvider.class));
Bundle b = new Bundle();
b.putBoolean(AppWidgetManager.OPTION_APPWIDGET_RESTORE_COMPLETED, true);
for (int id : widgetIds) {
if (DEBUG) Log.d(TAG, "Setting widget as restored, widget id:" + id);
- mAppWidgetManager.updateAppWidgetOptions(id, b);
+ mAppWidgetManagerOptional.get().updateAppWidgetOptions(id, b);
}
updateWidgets(widgetIds);
@@ -1437,14 +1472,15 @@ public class PeopleSpaceWidgetManager implements Dumpable {
@VisibleForTesting
void updateGeneratedPreviewForUser(UserHandle user) {
if (!generatedPreviews() || mUpdatedPreviews.get(user.getIdentifier())
- || !mUserManager.isUserUnlocked(user)) {
+ || !mUserManager.isUserUnlocked(user) || mAppWidgetManagerOptional.isEmpty()) {
return;
}
// The widget provider may be disabled on SystemUI implementers, e.g. TvSystemUI.
ComponentName provider = new ComponentName(mContext, PeopleSpaceWidgetProvider.class);
- List<AppWidgetProviderInfo> infos = mAppWidgetManager.getInstalledProvidersForPackage(
- mContext.getPackageName(), user);
+ List<AppWidgetProviderInfo> infos =
+ mAppWidgetManagerOptional.get().getInstalledProvidersForPackage(
+ mContext.getPackageName(), user);
if (infos.stream().noneMatch(info -> info.provider.equals(provider))) {
return;
}
@@ -1452,7 +1488,7 @@ public class PeopleSpaceWidgetManager implements Dumpable {
if (DEBUG) {
Log.d(TAG, "Updating People Space widget preview for user " + user.getIdentifier());
}
- boolean success = mAppWidgetManager.setWidgetPreview(
+ boolean success = mAppWidgetManagerOptional.get().setWidgetPreview(
provider, WIDGET_CATEGORY_HOME_SCREEN | WIDGET_CATEGORY_KEYGUARD,
new RemoteViews(mContext.getPackageName(),
R.layout.people_space_placeholder_layout));
diff --git a/packages/SystemUI/src/com/android/systemui/power/shared/model/WakeSleepReason.kt b/packages/SystemUI/src/com/android/systemui/power/shared/model/WakeSleepReason.kt
index 7505566898c0..776a8f47f056 100644
--- a/packages/SystemUI/src/com/android/systemui/power/shared/model/WakeSleepReason.kt
+++ b/packages/SystemUI/src/com/android/systemui/power/shared/model/WakeSleepReason.kt
@@ -54,7 +54,10 @@ enum class WakeSleepReason(
OTHER(isTouch = false, PowerManager.WAKE_REASON_UNKNOWN),
/** Device goes to sleep due to folding of a foldable device. */
- FOLD(isTouch = false, PowerManager.GO_TO_SLEEP_REASON_DEVICE_FOLD);
+ FOLD(isTouch = false, PowerManager.GO_TO_SLEEP_REASON_DEVICE_FOLD),
+
+ /** Device goes to sleep because it timed out. */
+ TIMEOUT(isTouch = false, PowerManager.GO_TO_SLEEP_REASON_TIMEOUT);
companion object {
fun fromPowerManagerWakeReason(reason: Int): WakeSleepReason {
@@ -75,6 +78,7 @@ enum class WakeSleepReason(
fun fromPowerManagerSleepReason(reason: Int): WakeSleepReason {
return when (reason) {
PowerManager.GO_TO_SLEEP_REASON_POWER_BUTTON -> POWER_BUTTON
+ PowerManager.GO_TO_SLEEP_REASON_TIMEOUT -> TIMEOUT
PowerManager.GO_TO_SLEEP_REASON_DEVICE_FOLD -> FOLD
else -> OTHER
}
diff --git a/packages/SystemUI/src/com/android/systemui/process/ProcessWrapper.java b/packages/SystemUI/src/com/android/systemui/process/ProcessWrapper.java
index b4cc196b89ed..294d0c75167a 100644
--- a/packages/SystemUI/src/com/android/systemui/process/ProcessWrapper.java
+++ b/packages/SystemUI/src/com/android/systemui/process/ProcessWrapper.java
@@ -16,6 +16,7 @@
package com.android.systemui.process;
+import android.app.ActivityManager;
import android.os.Process;
import android.os.UserHandle;
@@ -37,6 +38,13 @@ public class ProcessWrapper {
}
/**
+ * Returns {@code true} if the foreground user is running the current process.
+ */
+ public boolean isForegroundUser() {
+ return ActivityManager.getCurrentUser() == myUserHandle().getIdentifier();
+ }
+
+ /**
* Returns {@link UserHandle} as returned statically by {@link Process#myUserHandle()}.
*
* This should not be used to get the "current" user. This information only applies to the
diff --git a/packages/SystemUI/src/com/android/systemui/qs/ReduceBrightColorsController.java b/packages/SystemUI/src/com/android/systemui/qs/ReduceBrightColorsController.java
index 10c8e530553a..cf1dca3cbb23 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/ReduceBrightColorsController.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/ReduceBrightColorsController.java
@@ -16,6 +16,8 @@
package com.android.systemui.qs;
+import android.content.res.Resources;
+
import com.android.systemui.statusbar.policy.CallbackController;
public interface ReduceBrightColorsController extends
@@ -27,6 +29,14 @@ public interface ReduceBrightColorsController extends
/** Sets the activation state of Reduce Bright Colors */
void setReduceBrightColorsActivated(boolean activated);
+ /** Sets whether Reduce Bright Colors is enabled */
+ void setReduceBrightColorsFeatureAvailable(boolean enabled);
+
+ /** Gets whether Reduce Bright Colors is enabled */
+ boolean isReduceBrightColorsFeatureAvailable();
+
+ /** Gets whether Reduce Bright Colors is being transitioned to Even Dimmer */
+ boolean isInUpgradeMode(Resources resources);
/**
* Listener invoked whenever the Reduce Bright Colors settings are changed.
*/
@@ -38,5 +48,12 @@ public interface ReduceBrightColorsController extends
*/
default void onActivated(boolean activated) {
}
+ /**
+ * Listener invoked when the feature enabled state changes.
+ *
+ * @param enabled {@code true} if Reduce Bright Colors feature is enabled.
+ */
+ default void onFeatureEnabledChanged(boolean enabled) {
+ }
}
} \ No newline at end of file
diff --git a/packages/SystemUI/src/com/android/systemui/qs/ReduceBrightColorsControllerImpl.java b/packages/SystemUI/src/com/android/systemui/qs/ReduceBrightColorsControllerImpl.java
index 846d63f10875..4d6cf78610d9 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/ReduceBrightColorsControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/ReduceBrightColorsControllerImpl.java
@@ -19,6 +19,7 @@
package com.android.systemui.qs;
import android.content.Context;
+import android.content.res.Resources;
import android.database.ContentObserver;
import android.hardware.display.ColorDisplayManager;
import android.net.Uri;
@@ -47,6 +48,7 @@ public class ReduceBrightColorsControllerImpl implements
private final ContentObserver mContentObserver;
private final SecureSettings mSecureSettings;
private final ArrayList<ReduceBrightColorsController.Listener> mListeners = new ArrayList<>();
+ private boolean mAvailable = true;
@Inject
public ReduceBrightColorsControllerImpl(UserTracker userTracker,
@@ -75,12 +77,20 @@ public class ReduceBrightColorsControllerImpl implements
mCurrentUserTrackerCallback = new UserTracker.Callback() {
@Override
public void onUserChanged(int newUser, Context userContext) {
+ mAvailable = true;
synchronized (mListeners) {
if (mListeners.size() > 0) {
- mSecureSettings.unregisterContentObserverSync(mContentObserver);
- mSecureSettings.registerContentObserverForUserSync(
- Settings.Secure.REDUCE_BRIGHT_COLORS_ACTIVATED,
- false, mContentObserver, newUser);
+ if (com.android.systemui.Flags.registerContentObserversAsync()) {
+ mSecureSettings.unregisterContentObserverAsync(mContentObserver);
+ mSecureSettings.registerContentObserverForUserAsync(
+ Settings.Secure.REDUCE_BRIGHT_COLORS_ACTIVATED,
+ false, mContentObserver, newUser);
+ } else {
+ mSecureSettings.unregisterContentObserverSync(mContentObserver);
+ mSecureSettings.registerContentObserverForUserSync(
+ Settings.Secure.REDUCE_BRIGHT_COLORS_ACTIVATED,
+ false, mContentObserver, newUser);
+ }
}
}
}
@@ -94,9 +104,15 @@ public class ReduceBrightColorsControllerImpl implements
if (!mListeners.contains(listener)) {
mListeners.add(listener);
if (mListeners.size() == 1) {
- mSecureSettings.registerContentObserverForUserSync(
- Settings.Secure.REDUCE_BRIGHT_COLORS_ACTIVATED,
- false, mContentObserver, mUserTracker.getUserId());
+ if (com.android.systemui.Flags.registerContentObserversAsync()) {
+ mSecureSettings.registerContentObserverForUserAsync(
+ Settings.Secure.REDUCE_BRIGHT_COLORS_ACTIVATED,
+ false, mContentObserver, mUserTracker.getUserId());
+ } else {
+ mSecureSettings.registerContentObserverForUserSync(
+ Settings.Secure.REDUCE_BRIGHT_COLORS_ACTIVATED,
+ false, mContentObserver, mUserTracker.getUserId());
+ }
}
}
}
@@ -106,7 +122,11 @@ public class ReduceBrightColorsControllerImpl implements
public void removeCallback(@androidx.annotation.NonNull Listener listener) {
synchronized (mListeners) {
if (mListeners.remove(listener) && mListeners.size() == 0) {
- mSecureSettings.unregisterContentObserverSync(mContentObserver);
+ if (com.android.systemui.Flags.registerContentObserversAsync()) {
+ mSecureSettings.unregisterContentObserverAsync(mContentObserver);
+ } else {
+ mSecureSettings.unregisterContentObserverSync(mContentObserver);
+ }
}
}
}
@@ -121,10 +141,36 @@ public class ReduceBrightColorsControllerImpl implements
mManager.setReduceBrightColorsActivated(activated);
}
+ @Override
+ public void setReduceBrightColorsFeatureAvailable(boolean enabled) {
+ mAvailable = enabled;
+ dispatchOnEnabledChanged(enabled);
+ mAvailable = true;
+ }
+
+ @Override
+ public boolean isReduceBrightColorsFeatureAvailable() {
+ return mAvailable;
+ }
+
+ @Override
+ public boolean isInUpgradeMode(Resources resources) {
+ return com.android.server.display.feature.flags.Flags.evenDimmer()
+ && resources.getBoolean(
+ com.android.internal.R.bool.config_evenDimmerEnabled);
+ }
+
private void dispatchOnActivated(boolean activated) {
ArrayList<Listener> copy = new ArrayList<>(mListeners);
for (Listener l : copy) {
l.onActivated(activated);
}
}
+
+ private void dispatchOnEnabledChanged(boolean enabled) {
+ ArrayList<Listener> copy = new ArrayList<>(mListeners);
+ for (Listener l : copy) {
+ l.onFeatureEnabledChanged(enabled);
+ }
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/SettingObserver.java b/packages/SystemUI/src/com/android/systemui/qs/SettingObserver.java
index 6092348b964e..2287f4d68933 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/SettingObserver.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/SettingObserver.java
@@ -19,6 +19,7 @@ package com.android.systemui.qs;
import android.database.ContentObserver;
import android.os.Handler;
+import com.android.systemui.Flags;
import com.android.systemui.statusbar.policy.Listenable;
import com.android.systemui.util.settings.SecureSettings;
import com.android.systemui.util.settings.SettingsProxy;
@@ -74,10 +75,20 @@ public abstract class SettingObserver extends ContentObserver implements Listena
mListening = listening;
if (listening) {
mObservedValue = getValueFromProvider();
- mSettingsProxy.registerContentObserverSync(
- mSettingsProxy.getUriFor(mSettingName), false, this);
+ if (Flags.qsRegisterSettingObserverOnBgThread()) {
+ mSettingsProxy.registerContentObserverAsync(
+ mSettingsProxy.getUriFor(mSettingName), false, this,
+ () -> mObservedValue = getValueFromProvider());
+ } else {
+ mSettingsProxy.registerContentObserverSync(
+ mSettingsProxy.getUriFor(mSettingName), false, this);
+ }
} else {
- mSettingsProxy.unregisterContentObserverSync(this);
+ if (Flags.qsRegisterSettingObserverOnBgThread()) {
+ mSettingsProxy.unregisterContentObserverAsync(this);
+ } else {
+ mSettingsProxy.unregisterContentObserverSync(this);
+ }
mObservedValue = mDefaultValue;
}
}
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 a45d6f63cd81..89f85ab14dd6 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java
@@ -32,6 +32,7 @@ import android.widget.Button;
import androidx.annotation.Nullable;
+import com.android.server.display.feature.flags.Flags;
import com.android.systemui.dagger.qualifiers.Background;
import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.plugins.qs.QSTile;
@@ -116,6 +117,10 @@ public class TileQueryHelper {
final ArrayList<QSTile> tilesToAdd = new ArrayList<>();
possibleTiles.remove("cell");
possibleTiles.remove("wifi");
+ if (Flags.evenDimmer() && mContext.getResources().getBoolean(
+ com.android.internal.R.bool.config_evenDimmerEnabled)) {
+ possibleTiles.remove("reduce_brightness");
+ }
for (String spec : possibleTiles) {
// Only add current and stock tiles that can be created from QSFactoryImpl.
diff --git a/packages/SystemUI/src/com/android/systemui/qs/flags/NewQsUI.kt b/packages/SystemUI/src/com/android/systemui/qs/flags/NewQsUI.kt
index 8af566523b67..ee709c4cf41a 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/flags/NewQsUI.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/flags/NewQsUI.kt
@@ -20,7 +20,7 @@ import com.android.systemui.Flags
import com.android.systemui.flags.FlagToken
import com.android.systemui.flags.RefactorFlagUtils
-/** Helper for reading or using the notification avalanche suppression flag state. */
+/** Helper for reading or using the new QS UI flag state. */
@Suppress("NOTHING_TO_INLINE")
object NewQsUI {
/** The aconfig flag name */
diff --git a/packages/SystemUI/src/com/android/systemui/qs/flags/QSComposeFragment.kt b/packages/SystemUI/src/com/android/systemui/qs/flags/QSComposeFragment.kt
new file mode 100644
index 000000000000..664d49607f89
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/qs/flags/QSComposeFragment.kt
@@ -0,0 +1,53 @@
+/*
+ * 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.qs.flags
+
+import com.android.systemui.Flags
+import com.android.systemui.flags.FlagToken
+import com.android.systemui.flags.RefactorFlagUtils
+
+/** Helper for reading or using the new QS UI in NPVC flag state. */
+@Suppress("NOTHING_TO_INLINE")
+object QSComposeFragment {
+ /** The aconfig flag name */
+ const val FLAG_NAME = Flags.FLAG_QS_UI_REFACTOR_COMPOSE_FRAGMENT
+
+ /** A token used for dependency declaration */
+ val token: FlagToken
+ get() = FlagToken(FLAG_NAME, isEnabled)
+
+ /** Is the refactor enabled */
+ @JvmStatic
+ inline val isEnabled
+ get() = Flags.qsUiRefactorComposeFragment() && NewQsUI.isEnabled
+
+ /**
+ * Called to ensure code is only run when the flag is enabled. This protects users from the
+ * unintended behaviors caused by accidentally running new logic, while also crashing on an eng
+ * build to ensure that the refactor author catches issues in testing.
+ */
+ @JvmStatic
+ inline fun isUnexpectedlyInLegacyMode() =
+ RefactorFlagUtils.isUnexpectedlyInLegacyMode(isEnabled, FLAG_NAME)
+
+ /**
+ * Called to ensure code is only run when the flag is disabled. This will throw an exception if
+ * the flag is enabled to ensure that the refactor author catches issues in testing.
+ */
+ @JvmStatic
+ inline fun assertInLegacyMode() = RefactorFlagUtils.assertInLegacyMode(isEnabled, FLAG_NAME)
+}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/panels/dagger/PanelsModule.kt b/packages/SystemUI/src/com/android/systemui/qs/panels/dagger/PanelsModule.kt
index ff20707c1922..78f4b4b32237 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/panels/dagger/PanelsModule.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/panels/dagger/PanelsModule.kt
@@ -19,18 +19,17 @@ package com.android.systemui.qs.panels.dagger
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.log.LogBuffer
import com.android.systemui.log.LogBufferFactory
+import com.android.systemui.qs.panels.data.repository.DefaultLargeTilesRepository
+import com.android.systemui.qs.panels.data.repository.DefaultLargeTilesRepositoryImpl
import com.android.systemui.qs.panels.data.repository.GridLayoutTypeRepository
import com.android.systemui.qs.panels.data.repository.GridLayoutTypeRepositoryImpl
-import com.android.systemui.qs.panels.data.repository.IconTilesRepository
-import com.android.systemui.qs.panels.data.repository.IconTilesRepositoryImpl
import com.android.systemui.qs.panels.domain.interactor.GridTypeConsistencyInteractor
import com.android.systemui.qs.panels.domain.interactor.InfiniteGridConsistencyInteractor
import com.android.systemui.qs.panels.domain.interactor.NoopGridConsistencyInteractor
-import com.android.systemui.qs.panels.shared.model.GridConsistencyLog
import com.android.systemui.qs.panels.shared.model.GridLayoutType
-import com.android.systemui.qs.panels.shared.model.IconLabelVisibilityLog
import com.android.systemui.qs.panels.shared.model.InfiniteGridLayoutType
import com.android.systemui.qs.panels.shared.model.PaginatedGridLayoutType
+import com.android.systemui.qs.panels.shared.model.PanelsLog
import com.android.systemui.qs.panels.shared.model.PartitionedGridLayoutType
import com.android.systemui.qs.panels.shared.model.StretchedGridLayoutType
import com.android.systemui.qs.panels.ui.compose.GridLayout
@@ -53,7 +52,10 @@ import javax.inject.Named
@Module
interface PanelsModule {
- @Binds fun bindIconTilesRepository(impl: IconTilesRepositoryImpl): IconTilesRepository
+ @Binds
+ fun bindDefaultLargeTilesSpecsRepository(
+ impl: DefaultLargeTilesRepositoryImpl
+ ): DefaultLargeTilesRepository
@Binds
fun bindGridLayoutTypeRepository(impl: GridLayoutTypeRepositoryImpl): GridLayoutTypeRepository
@@ -87,16 +89,9 @@ interface PanelsModule {
companion object {
@Provides
@SysUISingleton
- @GridConsistencyLog
- fun providesGridConsistencyLog(factory: LogBufferFactory): LogBuffer {
- return factory.create("GridConsistencyLog", 50)
- }
-
- @Provides
- @SysUISingleton
- @IconLabelVisibilityLog
- fun providesIconTileLabelVisibilityLog(factory: LogBufferFactory): LogBuffer {
- return factory.create("IconLabelVisibilityLog", 50)
+ @PanelsLog
+ fun providesPanelsLog(factory: LogBufferFactory): LogBuffer {
+ return factory.create("PanelsLog", 50)
}
@Provides
diff --git a/packages/SystemUI/src/com/android/systemui/qs/panels/data/repository/IconTilesRepository.kt b/packages/SystemUI/src/com/android/systemui/qs/panels/data/repository/DefaultLargeTilesRepository.kt
index 095bdf2ff5bd..9a1671df60e9 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/panels/data/repository/IconTilesRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/panels/data/repository/DefaultLargeTilesRepository.kt
@@ -20,25 +20,18 @@ import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.qs.pipeline.shared.TileSpec
import javax.inject.Inject
-/** Repository for checking if a tile should be displayed as an icon. */
-interface IconTilesRepository {
- fun isIconTile(spec: TileSpec): Boolean
+/** Repository for the default set of [TileSpec] that should be displayed as large tiles. */
+interface DefaultLargeTilesRepository {
+ val defaultLargeTiles: Set<TileSpec>
}
@SysUISingleton
-class IconTilesRepositoryImpl @Inject constructor() : IconTilesRepository {
-
- override fun isIconTile(spec: TileSpec): Boolean {
- return !LARGE_TILES.contains(spec)
- }
-
- companion object {
- private val LARGE_TILES =
- setOf(
- TileSpec.create("internet"),
- TileSpec.create("bt"),
- TileSpec.create("dnd"),
- TileSpec.create("cast"),
- )
- }
+class DefaultLargeTilesRepositoryImpl @Inject constructor() : DefaultLargeTilesRepository {
+ override val defaultLargeTiles =
+ setOf(
+ TileSpec.create("internet"),
+ TileSpec.create("bt"),
+ TileSpec.create("dnd"),
+ TileSpec.create("cast"),
+ )
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/panels/data/repository/QSPreferencesRepository.kt b/packages/SystemUI/src/com/android/systemui/qs/panels/data/repository/QSPreferencesRepository.kt
index f3e5b8f0c214..971598dea0bd 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/panels/data/repository/QSPreferencesRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/panels/data/repository/QSPreferencesRepository.kt
@@ -20,6 +20,7 @@ import android.content.Context
import android.content.SharedPreferences
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Background
+import com.android.systemui.qs.pipeline.shared.TileSpec
import com.android.systemui.settings.UserFileManager
import com.android.systemui.user.data.repository.UserRepository
import com.android.systemui.util.kotlin.SharedPreferencesExt.observe
@@ -40,6 +41,7 @@ class QSPreferencesRepository
constructor(
private val userFileManager: UserFileManager,
private val userRepository: UserRepository,
+ private val defaultLargeTilesRepository: DefaultLargeTilesRepository,
@Background private val backgroundDispatcher: CoroutineDispatcher,
) {
/** Whether to show the labels on icon tiles for the current user. */
@@ -51,6 +53,23 @@ constructor(
}
.flowOn(backgroundDispatcher)
+ /** Set of [TileSpec] to display as large tiles for the current user. */
+ val largeTilesSpecs: Flow<Set<TileSpec>> =
+ userRepository.selectedUserInfo
+ .flatMapLatest { userInfo ->
+ val prefs = getSharedPrefs(userInfo.id)
+ prefs.observe().emitOnStart().map {
+ prefs
+ .getStringSet(
+ LARGE_TILES_SPECS_KEY,
+ defaultLargeTilesRepository.defaultLargeTiles.map { it.spec }.toSet()
+ )
+ ?.map { TileSpec.create(it) }
+ ?.toSet() ?: defaultLargeTilesRepository.defaultLargeTiles
+ }
+ }
+ .flowOn(backgroundDispatcher)
+
/** Sets for the current user whether to show the labels on icon tiles. */
fun setShowLabels(showLabels: Boolean) {
with(getSharedPrefs(userRepository.getSelectedUserInfo().id)) {
@@ -58,6 +77,13 @@ constructor(
}
}
+ /** Sets for the current user the set of [TileSpec] to display as large tiles. */
+ fun setLargeTilesSpecs(specs: Set<TileSpec>) {
+ with(getSharedPrefs(userRepository.getSelectedUserInfo().id)) {
+ edit().putStringSet(LARGE_TILES_SPECS_KEY, specs.map { it.spec }.toSet()).apply()
+ }
+ }
+
private fun getSharedPrefs(userId: Int): SharedPreferences {
return userFileManager.getSharedPreferences(
FILE_NAME,
@@ -68,6 +94,7 @@ constructor(
companion object {
private const val ICON_LABELS_KEY = "show_icon_labels"
+ private const val LARGE_TILES_SPECS_KEY = "large_tiles_specs"
const val FILE_NAME = "quick_settings_prefs"
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/panels/data/repository/StockTilesRepository.kt b/packages/SystemUI/src/com/android/systemui/qs/panels/data/repository/StockTilesRepository.kt
index ec9d151a26d3..86a29f91e51c 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/panels/data/repository/StockTilesRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/panels/data/repository/StockTilesRepository.kt
@@ -17,6 +17,7 @@
package com.android.systemui.qs.panels.data.repository
import android.content.res.Resources
+import com.android.server.display.feature.flags.Flags
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Main
import com.android.systemui.qs.pipeline.shared.TileSpec
@@ -32,10 +33,15 @@ constructor(
/**
* List of stock platform tiles. All of the specs will be of type [TileSpec.PlatformTileSpec].
*/
+ val shouldRemoveRbcTile: Boolean =
+ Flags.evenDimmer() &&
+ resources.getBoolean(com.android.internal.R.bool.config_evenDimmerEnabled)
+
val stockTiles =
resources
.getString(R.string.quick_settings_tiles_stock)
.split(",")
+ .filterNot { shouldRemoveRbcTile && it.equals("reduce_brightness") }
.map(TileSpec::create)
.filterNot { it is TileSpec.Invalid }
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/panels/domain/interactor/GridConsistencyInteractor.kt b/packages/SystemUI/src/com/android/systemui/qs/panels/domain/interactor/GridConsistencyInteractor.kt
index 7732092d6bcf..a2e7ea6fe797 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/panels/domain/interactor/GridConsistencyInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/panels/domain/interactor/GridConsistencyInteractor.kt
@@ -20,8 +20,8 @@ import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.log.LogBuffer
import com.android.systemui.log.core.LogLevel
-import com.android.systemui.qs.panels.shared.model.GridConsistencyLog
import com.android.systemui.qs.panels.shared.model.GridLayoutType
+import com.android.systemui.qs.panels.shared.model.PanelsLog
import com.android.systemui.qs.pipeline.domain.interactor.CurrentTilesInteractor
import com.android.systemui.qs.pipeline.shared.TileSpec
import javax.inject.Inject
@@ -39,7 +39,7 @@ constructor(
private val consistencyInteractors:
Map<GridLayoutType, @JvmSuppressWildcards GridTypeConsistencyInteractor>,
private val defaultConsistencyInteractor: GridTypeConsistencyInteractor,
- @GridConsistencyLog private val logBuffer: LogBuffer,
+ @PanelsLog private val logBuffer: LogBuffer,
@Application private val applicationScope: CoroutineScope,
) {
fun start() {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/panels/domain/interactor/IconLabelVisibilityInteractor.kt b/packages/SystemUI/src/com/android/systemui/qs/panels/domain/interactor/IconLabelVisibilityInteractor.kt
index 6a899b07b2a0..fe4012787394 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/panels/domain/interactor/IconLabelVisibilityInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/panels/domain/interactor/IconLabelVisibilityInteractor.kt
@@ -20,7 +20,7 @@ import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.log.LogBuffer
import com.android.systemui.log.core.LogLevel
-import com.android.systemui.qs.panels.shared.model.IconLabelVisibilityLog
+import com.android.systemui.qs.panels.shared.model.PanelsLog
import javax.inject.Inject
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.flow.SharingStarted
@@ -33,7 +33,7 @@ class IconLabelVisibilityInteractor
@Inject
constructor(
private val preferencesInteractor: QSPreferencesInteractor,
- @IconLabelVisibilityLog private val logBuffer: LogBuffer,
+ @PanelsLog private val logBuffer: LogBuffer,
@Application scope: CoroutineScope,
) {
val showLabels: StateFlow<Boolean> =
diff --git a/packages/SystemUI/src/com/android/systemui/qs/panels/domain/interactor/IconTilesInteractor.kt b/packages/SystemUI/src/com/android/systemui/qs/panels/domain/interactor/IconTilesInteractor.kt
index 524ea8b70100..b18358cedde7 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/panels/domain/interactor/IconTilesInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/panels/domain/interactor/IconTilesInteractor.kt
@@ -17,12 +17,54 @@
package com.android.systemui.qs.panels.domain.interactor
import com.android.systemui.dagger.SysUISingleton
-import com.android.systemui.qs.panels.data.repository.IconTilesRepository
+import com.android.systemui.dagger.qualifiers.Application
+import com.android.systemui.log.LogBuffer
+import com.android.systemui.log.core.LogLevel
+import com.android.systemui.qs.panels.data.repository.DefaultLargeTilesRepository
+import com.android.systemui.qs.panels.shared.model.PanelsLog
import com.android.systemui.qs.pipeline.shared.TileSpec
import javax.inject.Inject
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.flow.SharingStarted
+import kotlinx.coroutines.flow.onEach
+import kotlinx.coroutines.flow.stateIn
-/** Interactor for retrieving the list of [TileSpec] to be displayed as icons. */
+/** Interactor for retrieving the list of [TileSpec] to be displayed as icons and resizing icons. */
@SysUISingleton
-class IconTilesInteractor @Inject constructor(private val repo: IconTilesRepository) {
- fun isIconTile(spec: TileSpec): Boolean = repo.isIconTile(spec)
+class IconTilesInteractor
+@Inject
+constructor(
+ repo: DefaultLargeTilesRepository,
+ private val preferencesInteractor: QSPreferencesInteractor,
+ @PanelsLog private val logBuffer: LogBuffer,
+ @Application private val applicationScope: CoroutineScope
+) {
+
+ private val largeTilesSpecs =
+ preferencesInteractor.largeTilesSpecs
+ .onEach { logChange(it) }
+ .stateIn(applicationScope, SharingStarted.Eagerly, repo.defaultLargeTiles)
+
+ fun isIconTile(spec: TileSpec): Boolean = !largeTilesSpecs.value.contains(spec)
+
+ fun resize(spec: TileSpec, toIcon: Boolean) {
+ if (toIcon) {
+ preferencesInteractor.setLargeTilesSpecs(largeTilesSpecs.value - spec)
+ } else {
+ preferencesInteractor.setLargeTilesSpecs(largeTilesSpecs.value + spec)
+ }
+ }
+
+ private fun logChange(specs: Set<TileSpec>) {
+ logBuffer.log(
+ LOG_BUFFER_LARGE_TILES_SPECS_CHANGE_TAG,
+ LogLevel.DEBUG,
+ { str1 = specs.toString() },
+ { "Large tiles change: $str1" }
+ )
+ }
+
+ private companion object {
+ const val LOG_BUFFER_LARGE_TILES_SPECS_CHANGE_TAG = "LargeTilesSpecsChange"
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/panels/domain/interactor/QSPreferencesInteractor.kt b/packages/SystemUI/src/com/android/systemui/qs/panels/domain/interactor/QSPreferencesInteractor.kt
index 811be80d23fa..854e23f16a13 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/panels/domain/interactor/QSPreferencesInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/panels/domain/interactor/QSPreferencesInteractor.kt
@@ -18,14 +18,20 @@ package com.android.systemui.qs.panels.domain.interactor
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.qs.panels.data.repository.QSPreferencesRepository
+import com.android.systemui.qs.pipeline.shared.TileSpec
import javax.inject.Inject
import kotlinx.coroutines.flow.Flow
@SysUISingleton
class QSPreferencesInteractor @Inject constructor(private val repo: QSPreferencesRepository) {
val showLabels: Flow<Boolean> = repo.showLabels
+ val largeTilesSpecs: Flow<Set<TileSpec>> = repo.largeTilesSpecs
fun setShowLabels(showLabels: Boolean) {
repo.setShowLabels(showLabels)
}
+
+ fun setLargeTilesSpecs(specs: Set<TileSpec>) {
+ repo.setLargeTilesSpecs(specs)
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/panels/shared/model/GridConsistencyLog.kt b/packages/SystemUI/src/com/android/systemui/qs/panels/shared/model/PanelsLog.kt
index 884cde35a1aa..50cb3869f79e 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/panels/shared/model/GridConsistencyLog.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/panels/shared/model/PanelsLog.kt
@@ -18,7 +18,4 @@ package com.android.systemui.qs.panels.shared.model
import javax.inject.Qualifier
-@Qualifier
-@MustBeDocumented
-@Retention(AnnotationRetention.RUNTIME)
-annotation class GridConsistencyLog()
+@Qualifier @MustBeDocumented @Retention(AnnotationRetention.RUNTIME) annotation class PanelsLog()
diff --git a/packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/DragAndDropState.kt b/packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/DragAndDropState.kt
index 007ec3a911e1..782fb2ad25a0 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/DragAndDropState.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/DragAndDropState.kt
@@ -48,6 +48,9 @@ class DragAndDropState(
val sourceSpec: MutableState<TileSpec?>,
private val listState: EditTileListState
) {
+ val dragInProgress: Boolean
+ get() = sourceSpec.value != null
+
/** Returns index of the dragged tile if it's present in the list. Returns -1 if not. */
fun currentPosition(): Int {
return sourceSpec.value?.let { listState.indexOf(it) } ?: -1
@@ -65,6 +68,12 @@ class DragAndDropState(
sourceSpec.value?.let { listState.move(it, targetSpec) }
}
+ fun movedOutOfBounds() {
+ // Removing the tiles from the current tile grid if it moves out of bounds. This clears
+ // the spacer and makes it apparent that dropping the tile at that point would remove it.
+ sourceSpec.value?.let { listState.removeFromCurrent(it) }
+ }
+
fun onDrop() {
sourceSpec.value = null
}
@@ -112,6 +121,42 @@ fun Modifier.dragAndDropTile(
}
/**
+ * Registers a composable as a [DragAndDropTarget] to receive drop events. Use this outside the tile
+ * grid to catch out of bounds drops.
+ *
+ * @param dragAndDropState The [DragAndDropState] using the tiles list
+ * @param onDrop Action to be executed when a [TileSpec] is dropped on the composable
+ */
+@Composable
+fun Modifier.dragAndDropRemoveZone(
+ dragAndDropState: DragAndDropState,
+ onDrop: (TileSpec) -> Unit,
+): Modifier {
+ val target =
+ remember(dragAndDropState) {
+ object : DragAndDropTarget {
+ override fun onDrop(event: DragAndDropEvent): Boolean {
+ return dragAndDropState.sourceSpec.value?.let {
+ onDrop(it)
+ dragAndDropState.onDrop()
+ true
+ } ?: false
+ }
+
+ override fun onEntered(event: DragAndDropEvent) {
+ dragAndDropState.movedOutOfBounds()
+ }
+ }
+ }
+ return dragAndDropTarget(
+ shouldStartDragAndDrop = { event ->
+ event.mimeTypes().contains(QsDragAndDrop.TILESPEC_MIME_TYPE)
+ },
+ target = target,
+ )
+}
+
+/**
* Registers a tile list as a [DragAndDropTarget] to receive drop events. Use this on list
* containers to catch drops outside of tiles.
*
@@ -128,6 +173,10 @@ fun Modifier.dragAndDropTileList(
val target =
remember(dragAndDropState) {
object : DragAndDropTarget {
+ override fun onEnded(event: DragAndDropEvent) {
+ dragAndDropState.onDrop()
+ }
+
override fun onDrop(event: DragAndDropEvent): Boolean {
return dragAndDropState.sourceSpec.value?.let {
onDrop(it, dragAndDropState.currentPosition())
@@ -149,11 +198,13 @@ fun Modifier.dragAndDropTileList(
fun Modifier.dragAndDropTileSource(
tileSpec: TileSpec,
onTap: (TileSpec) -> Unit,
+ onDoubleTap: (TileSpec) -> Unit,
dragAndDropState: DragAndDropState
): Modifier {
return dragAndDropSource {
detectTapGestures(
onTap = { onTap(tileSpec) },
+ onDoubleTap = { onDoubleTap(tileSpec) },
onLongPress = {
dragAndDropState.onStarted(tileSpec)
diff --git a/packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/EditTileListState.kt b/packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/EditTileListState.kt
index 482c498d37d7..34876c4cf7f3 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/EditTileListState.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/EditTileListState.kt
@@ -46,6 +46,18 @@ class EditTileListState(tiles: List<EditTileViewModel>) {
tiles.apply { add(toIndex, removeAt(fromIndex).copy(isCurrent = isMovingToCurrent)) }
}
+ /**
+ * Sets the [TileSpec] as a non-current tile. Use this when a tile is dragged out of the current
+ * tile grid.
+ */
+ fun removeFromCurrent(tileSpec: TileSpec) {
+ val fromIndex = indexOf(tileSpec)
+ if (fromIndex >= 0 && fromIndex < tiles.size) {
+ // Mark the moving tile as non-current
+ tiles[fromIndex] = tiles[fromIndex].copy(isCurrent = false)
+ }
+ }
+
fun indexOf(tileSpec: TileSpec): Int {
return tiles.indexOfFirst { it.tileSpec == tileSpec }
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/InfiniteGridLayout.kt b/packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/InfiniteGridLayout.kt
index ea97f0de2bb8..add830e9760d 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/InfiniteGridLayout.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/InfiniteGridLayout.kt
@@ -22,6 +22,7 @@ import androidx.compose.foundation.lazy.grid.GridItemSpan
import androidx.compose.runtime.Composable
import androidx.compose.runtime.DisposableEffect
import androidx.compose.runtime.getValue
+import androidx.compose.runtime.rememberUpdatedState
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.dimensionResource
import androidx.lifecycle.compose.collectAsStateWithLifecycle
@@ -76,14 +77,18 @@ constructor(
onRemoveTile: (TileSpec) -> Unit,
) {
val columns by gridSizeViewModel.columns.collectAsStateWithLifecycle()
+ val isIcon: (TileSpec) -> Boolean by rememberUpdatedState { tileSpec ->
+ iconTilesViewModel.isIconTile(tileSpec)
+ }
DefaultEditTileGrid(
tiles = tiles,
- isIconOnly = iconTilesViewModel::isIconTile,
- columns = GridCells.Fixed(columns),
+ isIconOnly = isIcon,
+ columns = columns,
modifier = modifier,
onAddTile = onAddTile,
onRemoveTile = onRemoveTile,
+ onResize = iconTilesViewModel::resize,
)
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/PartitionedGridLayout.kt b/packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/PartitionedGridLayout.kt
index 092ad44d289b..6c84eddb5e38 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/PartitionedGridLayout.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/PartitionedGridLayout.kt
@@ -122,6 +122,9 @@ class PartitionedGridLayout @Inject constructor(private val viewModel: Partition
val addTileToEnd: (TileSpec) -> Unit by rememberUpdatedState {
onAddTile(it, CurrentTilesInteractor.POSITION_AT_END)
}
+ val onDoubleTap: (TileSpec) -> Unit by rememberUpdatedState { tileSpec ->
+ viewModel.resize(tileSpec, !viewModel.isIconTile(tileSpec))
+ }
val largeTileHeight = tileHeight()
val iconTileHeight = tileHeight(showLabels)
val tilePadding = dimensionResource(R.dimen.qs_tile_margin_vertical)
@@ -161,6 +164,7 @@ class PartitionedGridLayout @Inject constructor(private val viewModel: Partition
tilePadding = tilePadding,
onAdd = onAddTile,
onRemove = onRemoveTile,
+ onDoubleTap = onDoubleTap,
isIconOnly = viewModel::isIconTile,
columns = columns,
showLabels = showLabels,
@@ -173,6 +177,7 @@ class PartitionedGridLayout @Inject constructor(private val viewModel: Partition
tilePadding = tilePadding,
addTileToEnd = addTileToEnd,
onRemove = onRemoveTile,
+ onDoubleTap = onDoubleTap,
isIconOnly = viewModel::isIconTile,
showLabels = showLabels,
columns = columns,
@@ -203,6 +208,7 @@ class PartitionedGridLayout @Inject constructor(private val viewModel: Partition
tilePadding: Dp,
onAdd: (TileSpec, Int) -> Unit,
onRemove: (TileSpec) -> Unit,
+ onDoubleTap: (TileSpec) -> Unit,
isIconOnly: (TileSpec) -> Boolean,
showLabels: Boolean,
columns: Int,
@@ -224,6 +230,7 @@ class PartitionedGridLayout @Inject constructor(private val viewModel: Partition
tiles = largeTiles,
clickAction = ClickAction.REMOVE,
onClick = onRemove,
+ onDoubleTap = onDoubleTap,
isIconOnly = { false },
dragAndDropState = dragAndDropState,
acceptDrops = { !isIconOnly(it) },
@@ -244,6 +251,7 @@ class PartitionedGridLayout @Inject constructor(private val viewModel: Partition
tiles = smallTiles,
clickAction = ClickAction.REMOVE,
onClick = onRemove,
+ onDoubleTap = onDoubleTap,
isIconOnly = { true },
showLabels = showLabels,
dragAndDropState = dragAndDropState,
@@ -263,6 +271,7 @@ class PartitionedGridLayout @Inject constructor(private val viewModel: Partition
tilePadding: Dp,
addTileToEnd: (TileSpec) -> Unit,
onRemove: (TileSpec) -> Unit,
+ onDoubleTap: (TileSpec) -> Unit,
isIconOnly: (TileSpec) -> Boolean,
showLabels: Boolean,
columns: Int,
@@ -298,6 +307,7 @@ class PartitionedGridLayout @Inject constructor(private val viewModel: Partition
addTileToEnd,
isIconOnly,
dragAndDropState,
+ onDoubleTap = onDoubleTap,
acceptDrops = { true },
onDrop = onDrop,
)
@@ -309,8 +319,9 @@ class PartitionedGridLayout @Inject constructor(private val viewModel: Partition
ClickAction.ADD,
addTileToEnd,
isIconOnly,
+ dragAndDropState,
+ onDoubleTap = onDoubleTap,
showLabels = showLabels,
- dragAndDropState = dragAndDropState,
acceptDrops = { true },
onDrop = onDrop,
)
@@ -322,8 +333,9 @@ class PartitionedGridLayout @Inject constructor(private val viewModel: Partition
ClickAction.ADD,
addTileToEnd,
isIconOnly,
+ dragAndDropState,
+ onDoubleTap = onDoubleTap,
showLabels = showLabels,
- dragAndDropState = dragAndDropState,
acceptDrops = { true },
onDrop = onDrop,
)
@@ -360,11 +372,6 @@ class PartitionedGridLayout @Inject constructor(private val viewModel: Partition
}
}
- private fun gridHeight(nTiles: Int, tileHeight: Dp, columns: Int, padding: Dp): Dp {
- val rows = (nTiles + columns - 1) / columns
- return ((tileHeight + padding) * rows) - padding
- }
-
/** Fill up the rest of the row if it's not complete. */
private fun LazyGridScope.fillUpRow(nTiles: Int, columns: Int) {
if (nTiles % columns != 0) {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/StretchedGridLayout.kt b/packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/StretchedGridLayout.kt
index 4a9010270ac5..3e48245a3d36 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/StretchedGridLayout.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/StretchedGridLayout.kt
@@ -100,10 +100,11 @@ constructor(
DefaultEditTileGrid(
tiles = tiles,
isIconOnly = iconTilesViewModel::isIconTile,
- columns = GridCells.Fixed(columns),
+ columns = columns,
modifier = modifier,
onAddTile = onAddTile,
onRemoveTile = onRemoveTile,
+ onResize = iconTilesViewModel::resize,
)
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/Tile.kt b/packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/Tile.kt
index 0bb4cfa327a9..bd7956d7d3e1 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/Tile.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/panels/ui/compose/Tile.kt
@@ -23,13 +23,19 @@ import android.service.quicksettings.Tile.STATE_ACTIVE
import android.service.quicksettings.Tile.STATE_INACTIVE
import android.text.TextUtils
import androidx.appcompat.content.res.AppCompatResources
+import androidx.compose.animation.AnimatedContent
+import androidx.compose.animation.AnimatedVisibility
+import androidx.compose.animation.fadeIn
+import androidx.compose.animation.fadeOut
import androidx.compose.animation.graphics.ExperimentalAnimationGraphicsApi
import androidx.compose.animation.graphics.res.animatedVectorResource
import androidx.compose.animation.graphics.res.rememberAnimatedVectorPainter
import androidx.compose.animation.graphics.vector.AnimatedImageVector
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.Image
+import androidx.compose.foundation.LocalOverscrollConfiguration
import androidx.compose.foundation.basicMarquee
+import androidx.compose.foundation.border
import androidx.compose.foundation.combinedClickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Arrangement.spacedBy
@@ -37,20 +43,31 @@ import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.BoxScope
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
+import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.aspectRatio
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxSize
+import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
+import androidx.compose.foundation.layout.wrapContentSize
import androidx.compose.foundation.lazy.grid.GridCells
import androidx.compose.foundation.lazy.grid.GridItemSpan
import androidx.compose.foundation.lazy.grid.LazyGridScope
import androidx.compose.foundation.lazy.grid.LazyVerticalGrid
+import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.shape.CircleShape
+import androidx.compose.foundation.shape.RoundedCornerShape
+import androidx.compose.foundation.verticalScroll
+import androidx.compose.material.icons.Icons
+import androidx.compose.material.icons.filled.Clear
+import androidx.compose.material3.Icon
+import androidx.compose.material3.LocalContentColor
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
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
@@ -80,8 +97,9 @@ import com.android.systemui.common.shared.model.Icon
import com.android.systemui.common.ui.compose.Icon
import com.android.systemui.common.ui.compose.load
import com.android.systemui.plugins.qs.QSTile
+import com.android.systemui.qs.panels.shared.model.SizedTile
+import com.android.systemui.qs.panels.shared.model.TileRow
import com.android.systemui.qs.panels.ui.viewmodel.EditTileViewModel
-import com.android.systemui.qs.panels.ui.viewmodel.TileUiState
import com.android.systemui.qs.panels.ui.viewmodel.TileViewModel
import com.android.systemui.qs.panels.ui.viewmodel.toUiState
import com.android.systemui.qs.pipeline.domain.interactor.CurrentTilesInteractor
@@ -91,7 +109,6 @@ import com.android.systemui.res.R
import java.util.function.Supplier
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.delay
-import kotlinx.coroutines.flow.mapLatest
object TileType
@@ -103,29 +120,27 @@ fun Tile(
showLabels: Boolean = false,
modifier: Modifier,
) {
- val state: TileUiState by
- tile.state
- .mapLatest { it.toUiState() }
- .collectAsStateWithLifecycle(tile.currentState.toUiState())
- val colors = TileDefaults.getColorForState(state.state)
+ val state by tile.state.collectAsStateWithLifecycle(tile.currentState)
+ val uiState = remember(state) { state.toUiState() }
+ val colors = TileDefaults.getColorForState(uiState.state)
TileContainer(
colors = colors,
showLabels = showLabels,
- label = state.label.toString(),
+ label = uiState.label,
iconOnly = iconOnly,
clickEnabled = true,
onClick = tile::onClick,
onLongClick = tile::onLongClick,
modifier = modifier,
) {
- val icon = getTileIcon(icon = state.icon)
+ val icon = getTileIcon(icon = uiState.icon)
if (iconOnly) {
TileIcon(icon = icon, color = colors.icon, modifier = Modifier.align(Alignment.Center))
} else {
LargeTileContent(
- label = state.label.toString(),
- secondaryLabel = state.secondaryLabel.toString(),
+ label = uiState.label,
+ secondaryLabel = uiState.secondaryLabel,
icon = icon,
colors = colors,
clickEnabled = true,
@@ -234,19 +249,26 @@ private fun LargeTileContent(
Text(
label,
color = colors.label,
- modifier = Modifier.basicMarquee(),
+ modifier = Modifier.tileMarquee(),
)
if (!TextUtils.isEmpty(secondaryLabel)) {
Text(
secondaryLabel ?: "",
color = colors.secondaryLabel,
- modifier = Modifier.basicMarquee(),
+ modifier = Modifier.tileMarquee(),
)
}
}
}
}
+private fun Modifier.tileMarquee(): Modifier {
+ return basicMarquee(
+ iterations = 1,
+ initialDelayMillis = 200,
+ )
+}
+
@Composable
fun TileLazyGrid(
modifier: Modifier = Modifier,
@@ -266,76 +288,263 @@ fun TileLazyGrid(
fun DefaultEditTileGrid(
tiles: List<EditTileViewModel>,
isIconOnly: (TileSpec) -> Boolean,
- columns: GridCells,
+ columns: Int,
modifier: Modifier,
onAddTile: (TileSpec, Int) -> Unit,
onRemoveTile: (TileSpec) -> Unit,
+ onResize: (TileSpec, Boolean) -> Unit,
) {
val currentListState = rememberEditListState(tiles)
val dragAndDropState = rememberDragAndDropState(currentListState)
-
val (currentTiles, otherTiles) = currentListState.tiles.partition { it.isCurrent }
- val (otherTilesStock, otherTilesCustom) =
- otherTiles
- .filter { !dragAndDropState.isMoving(it.tileSpec) }
- .partition { it.appName == null }
+
val addTileToEnd: (TileSpec) -> Unit by rememberUpdatedState {
onAddTile(it, CurrentTilesInteractor.POSITION_AT_END)
}
-
val onDropAdd: (TileSpec, Int) -> Unit by rememberUpdatedState { tileSpec, position ->
onAddTile(tileSpec, position)
}
- val onDropRemove: (TileSpec, Int) -> Unit by rememberUpdatedState { tileSpec, _ ->
- onRemoveTile(tileSpec)
+ val onDoubleTap: (TileSpec) -> Unit by rememberUpdatedState { tileSpec ->
+ onResize(tileSpec, !isIconOnly(tileSpec))
}
+ val tilePadding = dimensionResource(R.dimen.qs_tile_margin_vertical)
- TileLazyGrid(
- modifier = modifier.dragAndDropTileList(dragAndDropState, { true }, onDropAdd),
- columns = columns
+ CompositionLocalProvider(LocalOverscrollConfiguration provides null) {
+ Column(
+ verticalArrangement =
+ spacedBy(dimensionResource(id = R.dimen.qs_label_container_margin)),
+ modifier = modifier.fillMaxSize().verticalScroll(rememberScrollState())
+ ) {
+ AnimatedContent(
+ targetState = dragAndDropState.dragInProgress,
+ modifier = Modifier.wrapContentSize()
+ ) { dragIsInProgress ->
+ EditGridHeader(Modifier.dragAndDropRemoveZone(dragAndDropState, onRemoveTile)) {
+ if (dragIsInProgress) {
+ RemoveTileTarget()
+ } else {
+ Text(text = "Hold and drag to rearrange tiles.")
+ }
+ }
+ }
+
+ CurrentTilesGrid(
+ currentTiles,
+ columns,
+ tilePadding,
+ isIconOnly,
+ onRemoveTile,
+ onDoubleTap,
+ dragAndDropState,
+ onDropAdd,
+ )
+
+ // Hide available tiles when dragging
+ AnimatedVisibility(
+ visible = !dragAndDropState.dragInProgress,
+ enter = fadeIn(),
+ exit = fadeOut()
+ ) {
+ Column(
+ verticalArrangement =
+ spacedBy(dimensionResource(id = R.dimen.qs_label_container_margin)),
+ modifier = modifier.fillMaxSize()
+ ) {
+ EditGridHeader { Text(text = "Hold and drag to add tiles.") }
+
+ AvailableTileGrid(
+ otherTiles,
+ columns,
+ tilePadding,
+ addTileToEnd,
+ dragAndDropState,
+ )
+ }
+ }
+
+ // Drop zone to remove tiles dragged out of the tile grid
+ Spacer(
+ modifier =
+ Modifier.fillMaxWidth()
+ .weight(1f)
+ .dragAndDropRemoveZone(dragAndDropState, onRemoveTile)
+ )
+ }
+ }
+}
+
+@Composable
+private fun EditGridHeader(
+ modifier: Modifier = Modifier,
+ content: @Composable BoxScope.() -> Unit
+) {
+ CompositionLocalProvider(
+ LocalContentColor provides MaterialTheme.colorScheme.onBackground.copy(alpha = .5f)
) {
- // These Text are just placeholders to see the different sections. Not final UI.
- item(span = { GridItemSpan(maxLineSpan) }) { Text("Current tiles", color = Color.White) }
+ Box(
+ contentAlignment = Alignment.Center,
+ modifier = modifier.fillMaxWidth().height(TileDefaults.EditGridHeaderHeight)
+ ) {
+ content()
+ }
+ }
+}
- editTiles(
- currentTiles,
- ClickAction.REMOVE,
- onRemoveTile,
- isIconOnly,
- indicatePosition = true,
- dragAndDropState = dragAndDropState,
- acceptDrops = { true },
- onDrop = onDropAdd,
- )
+@Composable
+private fun RemoveTileTarget() {
+ Row(
+ verticalAlignment = Alignment.CenterVertically,
+ horizontalArrangement = tileHorizontalArrangement(),
+ modifier =
+ Modifier.fillMaxHeight()
+ .border(1.dp, LocalContentColor.current, shape = TileDefaults.TileShape)
+ .padding(10.dp)
+ ) {
+ Icon(imageVector = Icons.Default.Clear, contentDescription = null)
+ Text(text = "Remove")
+ }
+}
- item(span = { GridItemSpan(maxLineSpan) }) { Text("Tiles to add", color = Color.White) }
+@Composable
+private fun CurrentTilesContainer(content: @Composable () -> Unit) {
+ Box(
+ Modifier.fillMaxWidth()
+ .border(
+ width = 1.dp,
+ color = MaterialTheme.colorScheme.onBackground.copy(alpha = .5f),
+ shape = RoundedCornerShape(48.dp),
+ )
+ .padding(dimensionResource(R.dimen.qs_tile_margin_vertical))
+ ) {
+ content()
+ }
+}
+
+@Composable
+private fun CurrentTilesGrid(
+ tiles: List<EditTileViewModel>,
+ columns: Int,
+ tilePadding: Dp,
+ isIconOnly: (TileSpec) -> Boolean,
+ onClick: (TileSpec) -> Unit,
+ onDoubleTap: (TileSpec) -> Unit,
+ dragAndDropState: DragAndDropState,
+ onDrop: (TileSpec, Int) -> Unit
+) {
+ val tileHeight = tileHeight()
+ val currentRows =
+ remember(tiles) {
+ calculateRows(
+ tiles.map {
+ SizedTile(
+ it,
+ if (isIconOnly(it.tileSpec)) {
+ 1
+ } else {
+ 2
+ }
+ )
+ },
+ columns
+ )
+ }
+ val currentGridHeight = gridHeight(currentRows, tileHeight, tilePadding)
+ // Current tiles
+ CurrentTilesContainer {
+ TileLazyGrid(
+ modifier =
+ Modifier.height(currentGridHeight)
+ .dragAndDropTileList(dragAndDropState, { true }, onDrop),
+ columns = GridCells.Fixed(columns)
+ ) {
+ editTiles(
+ tiles,
+ ClickAction.REMOVE,
+ onClick,
+ isIconOnly,
+ dragAndDropState,
+ onDoubleTap = onDoubleTap,
+ indicatePosition = true,
+ acceptDrops = { true },
+ onDrop = onDrop,
+ )
+ }
+ }
+}
+@Composable
+private fun AvailableTileGrid(
+ tiles: List<EditTileViewModel>,
+ columns: Int,
+ tilePadding: Dp,
+ onClick: (TileSpec) -> Unit,
+ dragAndDropState: DragAndDropState,
+) {
+ val (otherTilesStock, otherTilesCustom) =
+ tiles.filter { !dragAndDropState.isMoving(it.tileSpec) }.partition { it.appName == null }
+ val availableTileHeight = tileHeight(true)
+ val availableGridHeight = gridHeight(tiles.size, availableTileHeight, columns, tilePadding)
+
+ // Available tiles
+ TileLazyGrid(
+ modifier =
+ Modifier.height(availableGridHeight)
+ .dragAndDropTileList(dragAndDropState, { false }, { _, _ -> }),
+ columns = GridCells.Fixed(columns)
+ ) {
editTiles(
otherTilesStock,
ClickAction.ADD,
- addTileToEnd,
- isIconOnly,
+ onClick,
+ isIconOnly = { true },
dragAndDropState = dragAndDropState,
- acceptDrops = { true },
- onDrop = onDropRemove,
+ acceptDrops = { false },
+ showLabels = true,
)
-
- item(span = { GridItemSpan(maxLineSpan) }) {
- Text("Custom tiles to add", color = Color.White)
- }
-
editTiles(
otherTilesCustom,
ClickAction.ADD,
- addTileToEnd,
- isIconOnly,
+ onClick,
+ isIconOnly = { true },
dragAndDropState = dragAndDropState,
- acceptDrops = { true },
- onDrop = onDropRemove,
+ acceptDrops = { false },
+ showLabels = true,
)
}
}
+fun gridHeight(nTiles: Int, tileHeight: Dp, columns: Int, padding: Dp): Dp {
+ val rows = (nTiles + columns - 1) / columns
+ return gridHeight(rows, tileHeight, padding)
+}
+
+fun gridHeight(rows: Int, tileHeight: Dp, padding: Dp): Dp {
+ return ((tileHeight + padding) * rows) - padding
+}
+
+private fun calculateRows(tiles: List<SizedTile<EditTileViewModel>>, columns: Int): Int {
+ val row = TileRow<EditTileViewModel>(columns)
+ var count = 0
+
+ for (tile in tiles) {
+ if (row.maybeAddTile(tile)) {
+ if (row.isFull()) {
+ // Row is full, no need to stretch tiles
+ count += 1
+ row.clear()
+ }
+ } else {
+ count += 1
+ row.clear()
+ row.maybeAddTile(tile)
+ }
+ }
+ if (row.tiles.isNotEmpty()) {
+ count += 1
+ }
+ return count
+}
+
fun LazyGridScope.editTiles(
tiles: List<EditTileViewModel>,
clickAction: ClickAction,
@@ -343,7 +552,8 @@ fun LazyGridScope.editTiles(
isIconOnly: (TileSpec) -> Boolean,
dragAndDropState: DragAndDropState,
acceptDrops: (TileSpec) -> Boolean,
- onDrop: (TileSpec, Int) -> Unit,
+ onDoubleTap: (TileSpec) -> Unit = {},
+ onDrop: (TileSpec, Int) -> Unit = { _, _ -> },
showLabels: Boolean = false,
indicatePosition: Boolean = false,
) {
@@ -386,6 +596,7 @@ fun LazyGridScope.editTiles(
.dragAndDropTileSource(
viewModel.tileSpec,
onClick,
+ onDoubleTap,
dragAndDropState,
)
)
@@ -522,6 +733,7 @@ private data class TileColors(
private object TileDefaults {
val TileShape = CircleShape
val IconTileWithLabelHeight = 140.dp
+ val EditGridHeaderHeight = 60.dp
@Composable
fun activeTileColors(): TileColors =
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 62bfc72f07f2..ef2c8bfe0e4c 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
@@ -151,12 +151,27 @@ constructor(
* present, it will be moved to the new position.
*/
fun addTile(tileSpec: TileSpec, position: Int = POSITION_AT_END) {
- // Removing tile if it's already present to insert it at the new index.
- if (currentTilesInteractor.currentTilesSpecs.contains(tileSpec)) {
- removeTile(tileSpec)
+ val specs = currentTilesInteractor.currentTilesSpecs.toMutableList()
+ val currentPosition = specs.indexOf(tileSpec)
+
+ if (currentPosition != -1) {
+ // No operation needed if the element is already in the list at the right position
+ if (currentPosition == position) {
+ return
+ }
+ // Removing tile if it's present at a different position to insert it at the new index.
+ specs.removeAt(currentPosition)
+ }
+
+ if (position >= 0 && position < specs.size) {
+ specs.add(position, tileSpec)
+ } else {
+ specs.add(tileSpec)
}
- currentTilesInteractor.addTile(tileSpec, position)
+ // Setting the new tiles as one operation to avoid UI jank with tiles disappearing and
+ // reappearing
+ currentTilesInteractor.setTiles(specs)
}
/** Immediately removes [tileSpec] from the current tiles. */
diff --git a/packages/SystemUI/src/com/android/systemui/qs/panels/ui/viewmodel/IconTilesViewModel.kt b/packages/SystemUI/src/com/android/systemui/qs/panels/ui/viewmodel/IconTilesViewModel.kt
index 117c85c9c3ba..8d2d74af5835 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/panels/ui/viewmodel/IconTilesViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/panels/ui/viewmodel/IconTilesViewModel.kt
@@ -23,10 +23,14 @@ import javax.inject.Inject
interface IconTilesViewModel {
fun isIconTile(spec: TileSpec): Boolean
+
+ fun resize(spec: TileSpec, toIcon: Boolean)
}
@SysUISingleton
class IconTilesViewModelImpl @Inject constructor(private val interactor: IconTilesInteractor) :
IconTilesViewModel {
override fun isIconTile(spec: TileSpec): Boolean = interactor.isIconTile(spec)
+
+ override fun resize(spec: TileSpec, toIcon: Boolean) = interactor.resize(spec, toIcon)
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/panels/ui/viewmodel/QuickQuickSettingsViewModel.kt b/packages/SystemUI/src/com/android/systemui/qs/panels/ui/viewmodel/QuickQuickSettingsViewModel.kt
index b3acaced8ef2..bb004946a4d1 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/panels/ui/viewmodel/QuickQuickSettingsViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/panels/ui/viewmodel/QuickQuickSettingsViewModel.kt
@@ -26,8 +26,8 @@ import com.android.systemui.qs.pipeline.shared.TileSpec
import javax.inject.Inject
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.ExperimentalCoroutinesApi
-import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.SharingStarted
+import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.combine
import kotlinx.coroutines.flow.flatMapLatest
import kotlinx.coroutines.flow.mapLatest
@@ -54,14 +54,24 @@ constructor(
quickQuickSettingsRowInteractor.defaultRows
)
- val tileViewModels: Flow<List<SizedTile<TileViewModel>>> =
- columns.flatMapLatest { columns ->
- tilesInteractor.currentTiles.combine(rows, ::Pair).mapLatest { (tiles, rows) ->
- tiles
- .map { SizedTile(TileViewModel(it.tile, it.spec), it.spec.width) }
- .let { splitInRowsSequence(it, columns).take(rows).toList().flatten() }
+ val tileViewModels: StateFlow<List<SizedTile<TileViewModel>>> =
+ columns
+ .flatMapLatest { columns ->
+ tilesInteractor.currentTiles.combine(rows, ::Pair).mapLatest { (tiles, rows) ->
+ tiles
+ .map { SizedTile(TileViewModel(it.tile, it.spec), it.spec.width) }
+ .let { splitInRowsSequence(it, columns).take(rows).toList().flatten() }
+ }
}
- }
+ .stateIn(
+ applicationScope,
+ SharingStarted.WhileSubscribed(),
+ tilesInteractor.currentTiles.value
+ .map { SizedTile(TileViewModel(it.tile, it.spec), it.spec.width) }
+ .let {
+ splitInRowsSequence(it, columns.value).take(rows.value).toList().flatten()
+ }
+ )
private val TileSpec.width: Int
get() = if (iconTilesViewModel.isIconTile(this)) 1 else 2
diff --git a/packages/SystemUI/src/com/android/systemui/qs/panels/ui/viewmodel/TileUiState.kt b/packages/SystemUI/src/com/android/systemui/qs/panels/ui/viewmodel/TileUiState.kt
index 578a292deb7c..4ec59c969a59 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/panels/ui/viewmodel/TileUiState.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/panels/ui/viewmodel/TileUiState.kt
@@ -16,20 +16,22 @@
package com.android.systemui.qs.panels.ui.viewmodel
+import androidx.compose.runtime.Immutable
import com.android.systemui.plugins.qs.QSTile
import java.util.function.Supplier
+@Immutable
data class TileUiState(
- val label: CharSequence,
- val secondaryLabel: CharSequence,
+ val label: String,
+ val secondaryLabel: String,
val state: Int,
val icon: Supplier<QSTile.Icon>,
)
fun QSTile.State.toUiState(): TileUiState {
return TileUiState(
- label ?: "",
- secondaryLabel ?: "",
+ label?.toString() ?: "",
+ secondaryLabel?.toString() ?: "",
state,
icon?.let { Supplier { icon } } ?: iconSupplier,
)
diff --git a/packages/SystemUI/src/com/android/systemui/qs/panels/ui/viewmodel/TileViewModel.kt b/packages/SystemUI/src/com/android/systemui/qs/panels/ui/viewmodel/TileViewModel.kt
index 7505b90ee844..8578bb0ef9a1 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/panels/ui/viewmodel/TileViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/panels/ui/viewmodel/TileViewModel.kt
@@ -16,6 +16,7 @@
package com.android.systemui.qs.panels.ui.viewmodel
+import androidx.compose.runtime.Immutable
import com.android.systemui.animation.Expandable
import com.android.systemui.plugins.qs.QSTile
import com.android.systemui.qs.pipeline.shared.TileSpec
@@ -25,6 +26,7 @@ import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.distinctUntilChanged
import kotlinx.coroutines.flow.onStart
+@Immutable
class TileViewModel(private val tile: QSTile, val spec: TileSpec) {
val state: Flow<QSTile.State> =
conflatedCallbackFlow {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/pipeline/domain/autoaddable/ReduceBrightColorsAutoAddable.kt b/packages/SystemUI/src/com/android/systemui/qs/pipeline/domain/autoaddable/ReduceBrightColorsAutoAddable.kt
index 9c1b85799648..4d823ab216f0 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/pipeline/domain/autoaddable/ReduceBrightColorsAutoAddable.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/pipeline/domain/autoaddable/ReduceBrightColorsAutoAddable.kt
@@ -38,10 +38,11 @@ class ReduceBrightColorsAutoAddable
@Inject
constructor(
controller: ReduceBrightColorsController,
- @Named(RBC_AVAILABLE) private val available: Boolean,
+ @Named(RBC_AVAILABLE) private var available: Boolean,
) :
CallbackControllerAutoAddable<
- ReduceBrightColorsController.Listener, ReduceBrightColorsController
+ ReduceBrightColorsController.Listener,
+ ReduceBrightColorsController
>(controller) {
override val spec: TileSpec
@@ -50,10 +51,16 @@ constructor(
override fun ProducerScope<AutoAddSignal>.getCallback(): ReduceBrightColorsController.Listener {
return object : ReduceBrightColorsController.Listener {
override fun onActivated(activated: Boolean) {
- if (activated) {
+ if (activated && available) {
sendAdd()
}
}
+
+ override fun onFeatureEnabledChanged(enabled: Boolean) {
+ if (!enabled) {
+ available = false
+ }
+ }
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSIconViewImpl.java b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSIconViewImpl.java
index 720120b630d5..5ea8c2183295 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSIconViewImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSIconViewImpl.java
@@ -14,6 +14,8 @@
package com.android.systemui.qs.tileimpl;
+import static com.android.systemui.Flags.removeUpdateListenerInQsIconViewImpl;
+
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ArgbEvaluator;
@@ -204,6 +206,9 @@ public class QSIconViewImpl extends QSIconView {
values.setEvaluator(ArgbEvaluator.getInstance());
mColorAnimator.setValues(values);
mColorAnimator.removeAllListeners();
+ if (removeUpdateListenerInQsIconViewImpl()) {
+ mColorAnimator.removeAllUpdateListeners();
+ }
mColorAnimator.addUpdateListener(animation -> {
setTint(iv, (int) animation.getAnimatedValue());
});
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt
index 44c846b5c631..dbfe8188b1b5 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileViewImpl.kt
@@ -93,6 +93,7 @@ constructor(
@VisibleForTesting internal const val TILE_STATE_RES_PREFIX = "tile_states_"
@VisibleForTesting internal const val LONG_PRESS_EFFECT_WIDTH_SCALE = 1.1f
@VisibleForTesting internal const val LONG_PRESS_EFFECT_HEIGHT_SCALE = 1.2f
+ internal val EMPTY_RECT = Rect()
}
private val icon: QSIconViewImpl = QSIconViewImpl(context)
@@ -106,7 +107,9 @@ constructor(
set(value) {
if (field == value) return
field = value
- updateHeight()
+ if (longPressEffect?.state != QSLongPressEffect.State.RUNNING_BACKWARDS_FROM_CANCEL) {
+ updateHeight()
+ }
}
override var squishinessFraction: Float = 1f
@@ -380,13 +383,6 @@ constructor(
}
private fun updateHeight() {
- // TODO(b/332900989): Find a more robust way of resetting the tile if not reset by the
- // launch animation.
- if (!haveLongPressPropertiesBeenReset && longPressEffect != null) {
- // The launch animation of a long-press effect did not reset the long-press effect so
- // we must do it here
- resetLongPressEffectProperties()
- }
val actualHeight =
if (heightOverride != HeightOverrideable.NO_OVERRIDE) {
heightOverride
@@ -415,17 +411,17 @@ constructor(
}
override fun init(tile: QSTile) {
- val expandable = Expandable.fromView(this)
if (longPressEffect != null) {
isHapticFeedbackEnabled = false
longPressEffect.qsTile = tile
- longPressEffect.expandable = expandable
+ longPressEffect.createExpandableFromView(this)
initLongPressEffectCallback()
init(
{ _: View -> longPressEffect.onTileClick() },
null, // Haptics and long-clicks will be handled by the [QSLongPressEffect]
)
} else {
+ val expandable = Expandable.fromView(this)
init(
{ _: View? -> tile.click(expandable) },
{ _: View? ->
@@ -473,10 +469,10 @@ constructor(
}
}
- override fun onReverseAnimator() {
+ override fun onReverseAnimator(playHaptics: Boolean) {
longPressEffectAnimator?.let {
val pausedProgress = it.animatedFraction
- longPressEffect?.playReverseHaptics(pausedProgress)
+ if (playHaptics) longPressEffect?.playReverseHaptics(pausedProgress)
it.reverse()
}
}
@@ -771,11 +767,14 @@ constructor(
lastIconTint = icon.getColor(state)
// Long-press effects
+ longPressEffect?.qsTile?.state?.handlesLongClick = state.handlesLongClick
if (
state.handlesLongClick &&
longPressEffect?.initializeEffect(longPressEffectDuration) == true
) {
showRippleEffect = false
+ longPressEffect.qsTile?.state?.state = lastState // Store the tile's state
+ longPressEffect.resetState()
initializeLongPressProperties(measuredHeight, measuredWidth)
} else {
// Long-press effects might have been enabled before but the new state does not
@@ -906,12 +905,13 @@ constructor(
}
override fun onActivityLaunchAnimationEnd() {
+ longPressEffect?.resetState()
if (longPressEffect != null && !haveLongPressPropertiesBeenReset) {
resetLongPressEffectProperties()
}
}
- fun prepareForLaunch() {
+ private fun prepareForLaunch() {
val startingHeight = initialLongPressProperties?.height?.toInt() ?: 0
val startingWidth = initialLongPressProperties?.width?.toInt() ?: 0
val deltaH = finalLongPressProperties?.height?.minus(startingHeight)?.toInt() ?: 0
@@ -922,7 +922,12 @@ constructor(
paddingForLaunch.bottom = deltaH / 2
}
- override fun getPaddingForLaunchAnimation(): Rect = paddingForLaunch
+ override fun getPaddingForLaunchAnimation(): Rect =
+ if (longPressEffect?.state == QSLongPressEffect.State.LONG_CLICKED) {
+ paddingForLaunch
+ } else {
+ EMPTY_RECT
+ }
fun updateLongPressEffectProperties(effectProgress: Float) {
if (!isLongClickable || longPressEffect == null) return
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/SubtitleArrayMapping.kt b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/SubtitleArrayMapping.kt
index f34389ec8cb5..53594bbb2c84 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/SubtitleArrayMapping.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/SubtitleArrayMapping.kt
@@ -20,12 +20,14 @@ import com.android.systemui.res.R
/** Return the subtitle resource Id of the given tile. */
object SubtitleArrayMapping {
private val subtitleIdsMap: HashMap<String, Int> = HashMap()
+
init {
subtitleIdsMap["internet"] = R.array.tile_states_internet
subtitleIdsMap["wifi"] = R.array.tile_states_wifi
subtitleIdsMap["cell"] = R.array.tile_states_cell
subtitleIdsMap["battery"] = R.array.tile_states_battery
subtitleIdsMap["dnd"] = R.array.tile_states_dnd
+ subtitleIdsMap["modes"] = R.array.tile_states_modes
subtitleIdsMap["flashlight"] = R.array.tile_states_flashlight
subtitleIdsMap["rotation"] = R.array.tile_states_rotation
subtitleIdsMap["bt"] = R.array.tile_states_bt
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/ModesTile.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/ModesTile.kt
new file mode 100644
index 000000000000..a3000316057f
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/ModesTile.kt
@@ -0,0 +1,119 @@
+/*
+ * 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.qs.tiles
+
+import android.app.Flags
+import android.content.Intent
+import android.os.Handler
+import android.os.Looper
+import androidx.lifecycle.Lifecycle
+import androidx.lifecycle.coroutineScope
+import androidx.lifecycle.repeatOnLifecycle
+import com.android.internal.logging.MetricsLogger
+import com.android.systemui.animation.Expandable
+import com.android.systemui.dagger.qualifiers.Background
+import com.android.systemui.dagger.qualifiers.Main
+import com.android.systemui.plugins.ActivityStarter
+import com.android.systemui.plugins.FalsingManager
+import com.android.systemui.plugins.qs.QSTile.BooleanState
+import com.android.systemui.plugins.statusbar.StatusBarStateController
+import com.android.systemui.qs.QSHost
+import com.android.systemui.qs.QsEventLogger
+import com.android.systemui.qs.logging.QSLogger
+import com.android.systemui.qs.tileimpl.QSTileImpl
+import com.android.systemui.qs.tiles.impl.modes.domain.interactor.ModesTileDataInteractor
+import com.android.systemui.qs.tiles.impl.modes.domain.interactor.ModesTileUserActionInteractor
+import com.android.systemui.qs.tiles.impl.modes.domain.model.ModesTileModel
+import com.android.systemui.qs.tiles.impl.modes.ui.ModesTileMapper
+import com.android.systemui.qs.tiles.viewmodel.QSTileConfigProvider
+import com.android.systemui.qs.tiles.viewmodel.QSTileState
+import com.android.systemui.res.R
+import javax.inject.Inject
+import kotlinx.coroutines.launch
+import kotlinx.coroutines.runBlocking
+
+class ModesTile
+@Inject
+constructor(
+ host: QSHost,
+ uiEventLogger: QsEventLogger,
+ @Background backgroundLooper: Looper,
+ @Main mainHandler: Handler,
+ falsingManager: FalsingManager,
+ metricsLogger: MetricsLogger,
+ statusBarStateController: StatusBarStateController,
+ activityStarter: ActivityStarter,
+ qsLogger: QSLogger,
+ qsTileConfigProvider: QSTileConfigProvider,
+ dataInteractor: ModesTileDataInteractor,
+ private val tileMapper: ModesTileMapper,
+ private val userActionInteractor: ModesTileUserActionInteractor,
+) :
+ QSTileImpl<BooleanState>(
+ host,
+ uiEventLogger,
+ backgroundLooper,
+ mainHandler,
+ falsingManager,
+ metricsLogger,
+ statusBarStateController,
+ activityStarter,
+ qsLogger
+ ) {
+
+ private lateinit var tileState: QSTileState
+ private val config = qsTileConfigProvider.getConfig(TILE_SPEC)
+
+ init {
+ lifecycle.coroutineScope.launch {
+ lifecycle.repeatOnLifecycle(Lifecycle.State.RESUMED) {
+ dataInteractor.tileData().collect { refreshState(it) }
+ }
+ }
+ }
+
+ override fun isAvailable(): Boolean = Flags.modesUi()
+
+ override fun getTileLabel(): CharSequence = tileState.label
+
+ override fun newTileState() = BooleanState()
+
+ override fun handleClick(expandable: Expandable?) = runBlocking {
+ userActionInteractor.handleClick(expandable)
+ }
+
+ override fun getLongClickIntent(): Intent = userActionInteractor.longClickIntent
+
+ override fun handleUpdateState(booleanState: BooleanState?, arg: Any?) {
+ if (arg is ModesTileModel) {
+ tileState = tileMapper.map(config, arg)
+
+ booleanState?.apply {
+ state = tileState.activationState.legacyState
+ icon = ResourceIcon.get(tileState.iconRes ?: R.drawable.qs_dnd_icon_off)
+ label = tileLabel
+ secondaryLabel = tileState.secondaryLabel
+ contentDescription = tileState.contentDescription
+ forceExpandIcon = true
+ }
+ }
+ }
+
+ companion object {
+ const val TILE_SPEC = "modes"
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/ReduceBrightColorsTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/ReduceBrightColorsTile.java
index 34723523b84f..af5b31180159 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/ReduceBrightColorsTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/ReduceBrightColorsTile.java
@@ -48,12 +48,13 @@ import javax.inject.Named;
/** Quick settings tile: Reduce Bright Colors **/
public class ReduceBrightColorsTile extends QSTileImpl<QSTile.BooleanState>
- implements ReduceBrightColorsController.Listener{
+ implements ReduceBrightColorsController.Listener {
public static final String TILE_SPEC = "reduce_brightness";
- private final boolean mIsAvailable;
+ private boolean mIsAvailable;
private final ReduceBrightColorsController mReduceBrightColorsController;
private boolean mIsListening;
+ private final boolean mInUpgradeMode;
@Inject
public ReduceBrightColorsTile(
@@ -73,9 +74,11 @@ public class ReduceBrightColorsTile extends QSTileImpl<QSTile.BooleanState>
statusBarStateController, activityStarter, qsLogger);
mReduceBrightColorsController = reduceBrightColorsController;
mReduceBrightColorsController.observe(getLifecycle(), this);
- mIsAvailable = isAvailable;
+ mInUpgradeMode = reduceBrightColorsController.isInUpgradeMode(mContext.getResources());
+ mIsAvailable = isAvailable || mInUpgradeMode;
}
+
@Override
public boolean isAvailable() {
return mIsAvailable;
@@ -93,12 +96,28 @@ public class ReduceBrightColorsTile extends QSTileImpl<QSTile.BooleanState>
@Override
public Intent getLongClickIntent() {
- return new Intent(Settings.ACTION_REDUCE_BRIGHT_COLORS_SETTINGS);
+ return goToEvenDimmer() ? new Intent(Settings.ACTION_DISPLAY_SETTINGS) : new Intent(
+ Settings.ACTION_REDUCE_BRIGHT_COLORS_SETTINGS);
+ }
+
+ private boolean goToEvenDimmer() {
+ if (mInUpgradeMode) {
+ mHost.removeTile(getTileSpec());
+ mIsAvailable = false;
+ return true;
+ }
+ return false;
}
@Override
protected void handleClick(@Nullable Expandable expandable) {
- mReduceBrightColorsController.setReduceBrightColorsActivated(!mState.value);
+
+ if (goToEvenDimmer()) {
+ mActivityStarter.postStartActivityDismissingKeyguard(
+ new Intent(Settings.ACTION_DISPLAY_SETTINGS), 0);
+ } else {
+ mReduceBrightColorsController.setReduceBrightColorsActivated(!mState.value);
+ }
}
@Override
@@ -127,4 +146,9 @@ public class ReduceBrightColorsTile extends QSTileImpl<QSTile.BooleanState>
public void onActivated(boolean activated) {
refreshState();
}
+
+ @Override
+ public void onFeatureEnabledChanged(boolean enabled) {
+ refreshState();
+ }
}
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 df7430a0f729..158eb6eb5e89 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
@@ -65,6 +65,7 @@ import androidx.annotation.Nullable;
import androidx.annotation.VisibleForTesting;
import androidx.annotation.WorkerThread;
+import com.android.app.viewcapture.ViewCaptureAwareWindowManager;
import com.android.internal.logging.UiEventLogger;
import com.android.keyguard.KeyguardUpdateMonitor;
import com.android.keyguard.KeyguardUpdateMonitorCallback;
@@ -184,7 +185,7 @@ public class InternetDialogController implements AccessPointController.AccessPoi
private GlobalSettings mGlobalSettings;
private int mDefaultDataSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID;
private ConnectivityManager.NetworkCallback mConnectivityManagerNetworkCallback;
- private WindowManager mWindowManager;
+ private ViewCaptureAwareWindowManager mWindowManager;
private ToastFactory mToastFactory;
private SignalDrawable mSignalDrawable;
private SignalDrawable mSecondarySignalDrawable; // For the secondary mobile data sub in DSDS
@@ -246,7 +247,7 @@ public class InternetDialogController implements AccessPointController.AccessPoi
@Main Handler handler, @Main Executor mainExecutor,
BroadcastDispatcher broadcastDispatcher, KeyguardUpdateMonitor keyguardUpdateMonitor,
GlobalSettings globalSettings, KeyguardStateController keyguardStateController,
- WindowManager windowManager, ToastFactory toastFactory,
+ ViewCaptureAwareWindowManager viewCaptureAwareWindowManager, ToastFactory toastFactory,
@Background Handler workerHandler,
CarrierConfigTracker carrierConfigTracker,
LocationController locationController,
@@ -278,7 +279,7 @@ public class InternetDialogController implements AccessPointController.AccessPoi
mAccessPointController = accessPointController;
mWifiIconInjector = new WifiUtils.InternetIconInjector(mContext);
mConnectivityManagerNetworkCallback = new DataConnectivityListener();
- mWindowManager = windowManager;
+ mWindowManager = viewCaptureAwareWindowManager;
mToastFactory = toastFactory;
mSignalDrawable = new SignalDrawable(mContext);
mSecondarySignalDrawable = new SignalDrawable(mContext);
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 c971f547c302..edc49cac2f92 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
@@ -183,9 +183,9 @@ public class InternetDialogDelegate implements
Context context,
InternetDialogManager internetDialogManager,
InternetDialogController internetDialogController,
- @Assisted(ABOVE_STATUS_BAR) boolean canConfigMobileData,
- @Assisted(CAN_CONFIG_MOBILE_DATA) boolean canConfigWifi,
- @Assisted(CAN_CONFIG_WIFI) boolean aboveStatusBar,
+ @Assisted(CAN_CONFIG_MOBILE_DATA) boolean canConfigMobileData,
+ @Assisted(CAN_CONFIG_WIFI) boolean canConfigWifi,
+ @Assisted(ABOVE_STATUS_BAR) boolean aboveStatusBar,
@Assisted CoroutineScope coroutineScope,
UiEventLogger uiEventLogger,
DialogTransitionAnimator dialogTransitionAnimator,
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
new file mode 100644
index 000000000000..31e91aa8fe87
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/modes/domain/interactor/ModesTileDataInteractor.kt
@@ -0,0 +1,51 @@
+/*
+ * 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.qs.tiles.impl.modes.domain.interactor
+
+import android.app.Flags
+import android.os.UserHandle
+import com.android.settingslib.notification.data.repository.ZenModeRepository
+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 javax.inject.Inject
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.distinctUntilChanged
+import kotlinx.coroutines.flow.flowOf
+import kotlinx.coroutines.flow.map
+
+class ModesTileDataInteractor @Inject constructor(val zenModeRepository: ZenModeRepository) :
+ QSTileDataInteractor<ModesTileModel> {
+ private val zenModeActive =
+ zenModeRepository.modes
+ .map { modes -> modes.any { mode -> mode.isActive } }
+ .distinctUntilChanged()
+
+ override fun tileData(
+ user: UserHandle,
+ triggers: Flow<DataUpdateTrigger>
+ ): Flow<ModesTileModel> = tileData()
+
+ /**
+ * An adapted version of the base class' [tileData] method for use in an old-style tile.
+ *
+ * TODO(b/299909989): Remove after the transition.
+ */
+ fun tileData() = zenModeActive.map { ModesTileModel(isActivated = it) }
+
+ override fun availability(user: UserHandle): Flow<Boolean> = flowOf(Flags.modesUi())
+}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/modes/domain/interactor/ModesTileUserActionInteractor.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/modes/domain/interactor/ModesTileUserActionInteractor.kt
new file mode 100644
index 000000000000..4c6563d6c143
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/modes/domain/interactor/ModesTileUserActionInteractor.kt
@@ -0,0 +1,79 @@
+/*
+ * 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.qs.tiles.impl.modes.domain.interactor
+
+//noinspection CleanArchitectureDependencyViolation: dialog needs to be opened on click
+import android.content.Intent
+import android.provider.Settings
+import com.android.internal.jank.InteractionJankMonitor
+import com.android.systemui.animation.DialogCuj
+import com.android.systemui.animation.DialogTransitionAnimator
+import com.android.systemui.animation.Expandable
+import com.android.systemui.dagger.qualifiers.Main
+import com.android.systemui.qs.tiles.base.actions.QSTileIntentUserInputHandler
+import com.android.systemui.qs.tiles.base.interactor.QSTileInput
+import com.android.systemui.qs.tiles.base.interactor.QSTileUserActionInteractor
+import com.android.systemui.qs.tiles.impl.modes.domain.model.ModesTileModel
+import com.android.systemui.qs.tiles.viewmodel.QSTileUserAction
+import com.android.systemui.statusbar.policy.ui.dialog.ModesDialogDelegate
+import javax.inject.Inject
+import kotlin.coroutines.CoroutineContext
+import kotlinx.coroutines.withContext
+
+class ModesTileUserActionInteractor
+@Inject
+constructor(
+ @Main private val coroutineContext: CoroutineContext,
+ private val qsTileIntentUserActionHandler: QSTileIntentUserInputHandler,
+ private val dialogTransitionAnimator: DialogTransitionAnimator,
+ private val dialogDelegate: ModesDialogDelegate,
+) : QSTileUserActionInteractor<ModesTileModel> {
+ val longClickIntent = Intent(Settings.ACTION_ZEN_MODE_SETTINGS)
+
+ override suspend fun handleInput(input: QSTileInput<ModesTileModel>) {
+ with(input) {
+ when (action) {
+ is QSTileUserAction.Click -> {
+ handleClick(action.expandable)
+ }
+ is QSTileUserAction.LongClick -> {
+ qsTileIntentUserActionHandler.handle(action.expandable, longClickIntent)
+ }
+ }
+ }
+ }
+
+ suspend fun handleClick(expandable: Expandable?) {
+ // Show a dialog with the list of modes to configure. Dialogs shown by the
+ // DialogTransitionAnimator must be created and shown on the main thread, so we post it to
+ // the UI handler.
+ withContext(coroutineContext) {
+ val dialog = dialogDelegate.createDialog()
+
+ expandable
+ ?.dialogTransitionController(
+ DialogCuj(InteractionJankMonitor.CUJ_SHADE_DIALOG_OPEN, INTERACTION_JANK_TAG)
+ )
+ ?.let { controller -> dialogTransitionAnimator.show(dialog, controller) }
+ ?: dialog.show()
+ }
+ }
+
+ companion object {
+ private const val INTERACTION_JANK_TAG = "configure_priority_modes"
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/modes/domain/model/ModesTileModel.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/modes/domain/model/ModesTileModel.kt
new file mode 100644
index 000000000000..e44413a962f4
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/modes/domain/model/ModesTileModel.kt
@@ -0,0 +1,18 @@
+/*
+ * 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.qs.tiles.impl.modes.domain.model
+data class ModesTileModel(val isActivated: Boolean)
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/modes/ui/ModesTileMapper.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/modes/ui/ModesTileMapper.kt
new file mode 100644
index 000000000000..7048adab329d
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/modes/ui/ModesTileMapper.kt
@@ -0,0 +1,64 @@
+/*
+ * 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.qs.tiles.impl.modes.ui
+
+import android.content.res.Resources
+import com.android.systemui.common.shared.model.Icon
+import com.android.systemui.dagger.qualifiers.Main
+import com.android.systemui.qs.tiles.base.interactor.QSTileDataToStateMapper
+import com.android.systemui.qs.tiles.impl.modes.domain.model.ModesTileModel
+import com.android.systemui.qs.tiles.viewmodel.QSTileConfig
+import com.android.systemui.qs.tiles.viewmodel.QSTileState
+import com.android.systemui.res.R
+import javax.inject.Inject
+
+class ModesTileMapper
+@Inject
+constructor(
+ @Main private val resources: Resources,
+ val theme: Resources.Theme,
+) : QSTileDataToStateMapper<ModesTileModel> {
+ override fun map(config: QSTileConfig, data: ModesTileModel): QSTileState =
+ QSTileState.build(resources, theme, config.uiConfig) {
+ iconRes =
+ if (data.isActivated) {
+ R.drawable.qs_dnd_icon_on
+ } else {
+ R.drawable.qs_dnd_icon_off
+ }
+ val icon =
+ Icon.Loaded(
+ resources.getDrawable(iconRes!!, theme),
+ contentDescription = null,
+ )
+ this.icon = { icon }
+ if (data.isActivated) {
+ activationState = QSTileState.ActivationState.ACTIVE
+ secondaryLabel = "Some modes enabled idk" // TODO(b/346519570)
+ } else {
+ activationState = QSTileState.ActivationState.INACTIVE
+ secondaryLabel = "Off" // TODO(b/346519570)
+ }
+ contentDescription = label
+ supportedActions =
+ setOf(
+ QSTileState.UserAction.CLICK,
+ QSTileState.UserAction.LONG_CLICK,
+ )
+ sideViewIcon = QSTileState.SideViewIcon.Chevron
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/reducebrightness/domain/interactor/ReduceBrightColorsTileDataInteractor.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/reducebrightness/domain/interactor/ReduceBrightColorsTileDataInteractor.kt
index 98fd561b27d6..00b1e41461f5 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/reducebrightness/domain/interactor/ReduceBrightColorsTileDataInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/reducebrightness/domain/interactor/ReduceBrightColorsTileDataInteractor.kt
@@ -23,13 +23,13 @@ import com.android.systemui.qs.dagger.QSFlagsModule.RBC_AVAILABLE
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.reducebrightness.domain.model.ReduceBrightColorsTileModel
+import com.android.systemui.util.kotlin.isAvailable
import com.android.systemui.util.kotlin.isEnabled
import javax.inject.Inject
import javax.inject.Named
import kotlin.coroutines.CoroutineContext
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.distinctUntilChanged
-import kotlinx.coroutines.flow.flowOf
import kotlinx.coroutines.flow.flowOn
import kotlinx.coroutines.flow.map
@@ -52,5 +52,7 @@ constructor(
.map { ReduceBrightColorsTileModel(it) }
.flowOn(bgCoroutineContext)
}
- override fun availability(user: UserHandle): Flow<Boolean> = flowOf(isAvailable)
+
+ override fun availability(user: UserHandle): Flow<Boolean> =
+ reduceBrightColorsController.isAvailable()
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/reducebrightness/domain/interactor/ReduceBrightColorsTileUserActionInteractor.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/reducebrightness/domain/interactor/ReduceBrightColorsTileUserActionInteractor.kt
index 14dbe0e8a69a..ed5e4fe74962 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/reducebrightness/domain/interactor/ReduceBrightColorsTileUserActionInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/reducebrightness/domain/interactor/ReduceBrightColorsTileUserActionInteractor.kt
@@ -17,7 +17,9 @@
package com.android.systemui.qs.tiles.impl.reducebrightness.domain.interactor
import android.content.Intent
+import android.content.res.Resources
import android.provider.Settings
+import com.android.systemui.dagger.qualifiers.Main
import com.android.systemui.qs.ReduceBrightColorsController
import com.android.systemui.qs.tiles.base.actions.QSTileIntentUserInputHandler
import com.android.systemui.qs.tiles.base.interactor.QSTileInput
@@ -30,19 +32,40 @@ import javax.inject.Inject
class ReduceBrightColorsTileUserActionInteractor
@Inject
constructor(
+ @Main private val resources: Resources,
private val qsTileIntentUserActionHandler: QSTileIntentUserInputHandler,
private val reduceBrightColorsController: ReduceBrightColorsController,
) : QSTileUserActionInteractor<ReduceBrightColorsTileModel> {
+ val isInUpgradeMode: Boolean = reduceBrightColorsController.isInUpgradeMode(resources)
+
override suspend fun handleInput(input: QSTileInput<ReduceBrightColorsTileModel>): Unit =
with(input) {
when (action) {
is QSTileUserAction.Click -> {
+ if (isInUpgradeMode) {
+ reduceBrightColorsController.setReduceBrightColorsFeatureAvailable(false)
+ qsTileIntentUserActionHandler.handle(
+ action.expandable,
+ Intent(Settings.ACTION_DISPLAY_SETTINGS)
+ )
+ // TODO(b/349458355): show dialog
+ return@with
+ }
reduceBrightColorsController.setReduceBrightColorsActivated(
!input.data.isEnabled
)
}
is QSTileUserAction.LongClick -> {
+ if (isInUpgradeMode) {
+ reduceBrightColorsController.setReduceBrightColorsFeatureAvailable(false)
+ qsTileIntentUserActionHandler.handle(
+ action.expandable,
+ Intent(Settings.ACTION_DISPLAY_SETTINGS)
+ )
+ // TODO(b/349458355): show dialog
+ return@with
+ }
qsTileIntentUserActionHandler.handle(
action.expandable,
Intent(Settings.ACTION_REDUCE_BRIGHT_COLORS_SETTINGS)
diff --git a/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java b/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java
index b3624ad4ad82..371707d78500 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java
@@ -72,6 +72,7 @@ import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.Surface;
import android.view.accessibility.AccessibilityManager;
+import android.view.inputmethod.Flags;
import android.view.inputmethod.InputMethodManager;
import androidx.annotation.NonNull;
@@ -302,10 +303,29 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis
public void onImeSwitcherPressed() {
// TODO(b/204901476) We're intentionally using the default display for now since
// Launcher/Taskbar isn't display aware.
+ if (Flags.imeSwitcherRevamp()) {
+ mContext.getSystemService(InputMethodManager.class)
+ .onImeSwitchButtonClickFromSystem(mDisplayTracker.getDefaultDisplayId());
+ } else {
+ mContext.getSystemService(InputMethodManager.class)
+ .showInputMethodPickerFromSystem(true /* showAuxiliarySubtypes */,
+ mDisplayTracker.getDefaultDisplayId());
+ }
+ mUiEventLogger.log(KeyButtonView.NavBarButtonEvent.NAVBAR_IME_SWITCHER_BUTTON_TAP);
+ }
+
+ @Override
+ public void onImeSwitcherLongPress() {
+ if (!Flags.imeSwitcherRevamp()) {
+ return;
+ }
+ // TODO(b/204901476) We're intentionally using the default display for now since
+ // Launcher/Taskbar isn't display aware.
mContext.getSystemService(InputMethodManager.class)
.showInputMethodPickerFromSystem(true /* showAuxiliarySubtypes */,
mDisplayTracker.getDefaultDisplayId());
- mUiEventLogger.log(KeyButtonView.NavBarButtonEvent.NAVBAR_IME_SWITCHER_BUTTON_TAP);
+ mUiEventLogger.log(
+ KeyButtonView.NavBarButtonEvent.NAVBAR_IME_SWITCHER_BUTTON_LONGPRESS);
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/recordissue/IssueRecordingService.kt b/packages/SystemUI/src/com/android/systemui/recordissue/IssueRecordingService.kt
index 4a4c73ba9c81..98a61df4ca55 100644
--- a/packages/SystemUI/src/com/android/systemui/recordissue/IssueRecordingService.kt
+++ b/packages/SystemUI/src/com/android/systemui/recordissue/IssueRecordingService.kt
@@ -74,7 +74,7 @@ constructor(
when (intent?.action) {
ACTION_START -> {
bgExecutor.execute {
- traceurMessageSender.startTracing(issueRecordingState.traceType)
+ traceurMessageSender.startTracing(issueRecordingState.traceConfig)
}
issueRecordingState.isRecording = true
if (!issueRecordingState.recordScreen) {
diff --git a/packages/SystemUI/src/com/android/systemui/recordissue/IssueRecordingState.kt b/packages/SystemUI/src/com/android/systemui/recordissue/IssueRecordingState.kt
index b077349ade74..761290071177 100644
--- a/packages/SystemUI/src/com/android/systemui/recordissue/IssueRecordingState.kt
+++ b/packages/SystemUI/src/com/android/systemui/recordissue/IssueRecordingState.kt
@@ -22,7 +22,8 @@ import com.android.systemui.recordissue.RecordIssueModule.Companion.TILE_SPEC
import com.android.systemui.res.R
import com.android.systemui.settings.UserFileManager
import com.android.systemui.settings.UserTracker
-import com.android.traceur.TraceUtils.PresetTraceType
+import com.android.traceur.PresetTraceConfigs
+import com.android.traceur.TraceConfig
import java.util.concurrent.CopyOnWriteArrayList
import javax.inject.Inject
@@ -53,8 +54,8 @@ constructor(
get() = prefs.getInt(KEY_ISSUE_TYPE_RES, ISSUE_TYPE_NOT_SET)
set(value) = prefs.edit().putInt(KEY_ISSUE_TYPE_RES, value).apply()
- val traceType: PresetTraceType
- get() = ALL_ISSUE_TYPES[issueTypeRes] ?: PresetTraceType.UNSET
+ val traceConfig: TraceConfig
+ get() = ALL_ISSUE_TYPES[issueTypeRes] ?: PresetTraceConfigs.getDefaultConfig()
private val listeners = CopyOnWriteArrayList<Runnable>()
@@ -83,12 +84,12 @@ constructor(
const val KEY_ISSUE_TYPE_RES = "key_issueTypeRes"
const val ISSUE_TYPE_NOT_SET = -1
- val ALL_ISSUE_TYPES: Map<Int, PresetTraceType> =
+ val ALL_ISSUE_TYPES: Map<Int, TraceConfig?> =
hashMapOf(
- Pair(R.string.performance, PresetTraceType.PERFORMANCE),
- Pair(R.string.user_interface, PresetTraceType.UI),
- Pair(R.string.battery, PresetTraceType.BATTERY),
- Pair(R.string.thermal, PresetTraceType.THERMAL)
+ Pair(R.string.performance, PresetTraceConfigs.getPerformanceConfig()),
+ Pair(R.string.user_interface, PresetTraceConfigs.getUiConfig()),
+ Pair(R.string.battery, PresetTraceConfigs.getBatteryConfig()),
+ Pair(R.string.thermal, PresetTraceConfigs.getThermalConfig()),
)
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/recordissue/RecordIssueDialogDelegate.kt b/packages/SystemUI/src/com/android/systemui/recordissue/RecordIssueDialogDelegate.kt
index bbf4e51b35e9..8a51ad4cbd71 100644
--- a/packages/SystemUI/src/com/android/systemui/recordissue/RecordIssueDialogDelegate.kt
+++ b/packages/SystemUI/src/com/android/systemui/recordissue/RecordIssueDialogDelegate.kt
@@ -87,7 +87,10 @@ constructor(
setNegativeButton(R.string.cancel) { _, _ -> }
setPositiveButton(R.string.qs_record_issue_start) { _, _ -> onStarted.run() }
}
- bgExecutor.execute { traceurMessageSender.bindToTraceur(dialog.context) }
+ bgExecutor.execute {
+ traceurMessageSender.onBoundToTraceur.add { traceurMessageSender.getTags() }
+ traceurMessageSender.bindToTraceur(dialog.context)
+ }
}
override fun createDialog(): SystemUIDialog = factory.create(this)
diff --git a/packages/SystemUI/src/com/android/systemui/recordissue/TraceurMessageSender.kt b/packages/SystemUI/src/com/android/systemui/recordissue/TraceurMessageSender.kt
index 51744aa47c1a..a31a9ef26b16 100644
--- a/packages/SystemUI/src/com/android/systemui/recordissue/TraceurMessageSender.kt
+++ b/packages/SystemUI/src/com/android/systemui/recordissue/TraceurMessageSender.kt
@@ -35,7 +35,7 @@ import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Background
import com.android.traceur.FileSender
import com.android.traceur.MessageConstants
-import com.android.traceur.TraceUtils.PresetTraceType
+import com.android.traceur.TraceConfig
import javax.inject.Inject
private const val TAG = "TraceurMessageSender"
@@ -45,11 +45,15 @@ class TraceurMessageSender @Inject constructor(@Background private val backgroun
private var binder: Messenger? = null
private var isBound: Boolean = false
+ val onBoundToTraceur = mutableListOf<Runnable>()
+
private val traceurConnection =
object : ServiceConnection {
override fun onServiceConnected(className: ComponentName, service: IBinder) {
binder = Messenger(service)
isBound = true
+ onBoundToTraceur.forEach(Runnable::run)
+ onBoundToTraceur.clear()
}
override fun onServiceDisconnected(className: ComponentName) {
@@ -93,9 +97,9 @@ class TraceurMessageSender @Inject constructor(@Background private val backgroun
}
@WorkerThread
- fun startTracing(traceType: PresetTraceType) {
+ fun startTracing(traceType: TraceConfig) {
val data =
- Bundle().apply { putSerializable(MessageConstants.INTENT_EXTRA_TRACE_TYPE, traceType) }
+ Bundle().apply { putParcelable(MessageConstants.INTENT_EXTRA_TRACE_TYPE, traceType) }
notifyTraceur(MessageConstants.START_WHAT, data)
}
@@ -103,11 +107,17 @@ class TraceurMessageSender @Inject constructor(@Background private val backgroun
@WorkerThread
fun shareTraces(context: Context, screenRecord: Uri?) {
- val replyHandler = Messenger(TraceurMessageHandler(context, screenRecord, backgroundLooper))
+ val replyHandler = Messenger(ShareFilesHandler(context, screenRecord, backgroundLooper))
notifyTraceur(MessageConstants.SHARE_WHAT, replyTo = replyHandler)
}
@WorkerThread
+ fun getTags() {
+ val replyHandler = Messenger(TagsHandler(backgroundLooper))
+ notifyTraceur(MessageConstants.TAGS_WHAT, replyTo = replyHandler)
+ }
+
+ @WorkerThread
private fun notifyTraceur(what: Int, data: Bundle = Bundle(), replyTo: Messenger? = null) {
try {
binder!!.send(
@@ -122,7 +132,7 @@ class TraceurMessageSender @Inject constructor(@Background private val backgroun
}
}
- private class TraceurMessageHandler(
+ private class ShareFilesHandler(
private val context: Context,
private val screenRecord: Uri?,
looper: Looper,
@@ -154,4 +164,29 @@ class TraceurMessageSender @Inject constructor(@Background private val backgroun
context.startActivity(fileSharingIntent)
}
}
+
+ private class TagsHandler(looper: Looper) : Handler(looper) {
+
+ override fun handleMessage(msg: Message) {
+ if (MessageConstants.TAGS_WHAT == msg.what) {
+ val keys = msg.data.getStringArrayList(MessageConstants.BUNDLE_KEY_TAGS)
+ val values =
+ msg.data.getStringArrayList(MessageConstants.BUNDLE_KEY_TAG_DESCRIPTIONS)
+ if (keys == null || values == null) {
+ throw IllegalArgumentException(
+ "Neither keys: $keys, nor values: $values can " + "be null"
+ )
+ }
+
+ val tags = keys.zip(values).map { "${it.first}: ${it.second}" }.toSet()
+ Log.e(
+ TAG,
+ "These tags: $tags will be saved and used for the Custom Trace" +
+ " Config dialog in a future CL. This log will be removed."
+ )
+ } else {
+ throw IllegalArgumentException("received unknown msg.what: " + msg.what)
+ }
+ }
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/scene/domain/interactor/SceneContainerOcclusionInteractor.kt b/packages/SystemUI/src/com/android/systemui/scene/domain/interactor/SceneContainerOcclusionInteractor.kt
index 233e9b5bf818..2d510e1cb659 100644
--- a/packages/SystemUI/src/com/android/systemui/scene/domain/interactor/SceneContainerOcclusionInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/scene/domain/interactor/SceneContainerOcclusionInteractor.kt
@@ -43,8 +43,14 @@ constructor(
sceneInteractor: SceneInteractor,
keyguardTransitionInteractor: KeyguardTransitionInteractor,
) {
- /** Whether a show-when-locked activity is at the top of the current activity stack. */
- private val isOccludingActivityShown: StateFlow<Boolean> =
+ /**
+ * Whether a show-when-locked activity is at the top of the current activity stack.
+ *
+ * Note: this isn't enough to figure out whether the scene container UI should be invisible as
+ * that also depends on the things like the state of AOD and the current scene. If the code
+ * needs that, [invisibleDueToOcclusion] should be collected instead.
+ */
+ val isOccludingActivityShown: StateFlow<Boolean> =
keyguardOcclusionInteractor.isShowWhenLockedActivityOnTop.stateIn(
scope = applicationScope,
started = SharingStarted.WhileSubscribed(),
@@ -69,6 +75,9 @@ constructor(
/**
* Whether the scene container should become invisible due to "occlusion" by an in-foreground
* "show when locked" activity.
+ *
+ * Note: this returns `false` when an overlaid scene (like shade or QS) is shown above the
+ * occluding activity.
*/
val invisibleDueToOcclusion: StateFlow<Boolean> =
combine(
diff --git a/packages/SystemUI/src/com/android/systemui/scene/domain/startable/SceneContainerStartable.kt b/packages/SystemUI/src/com/android/systemui/scene/domain/startable/SceneContainerStartable.kt
index 1f4820aa8de6..72f37fc98e17 100644
--- a/packages/SystemUI/src/com/android/systemui/scene/domain/startable/SceneContainerStartable.kt
+++ b/packages/SystemUI/src/com/android/systemui/scene/domain/startable/SceneContainerStartable.kt
@@ -149,6 +149,7 @@ constructor(
resetShadeSessions()
handleKeyguardEnabledness()
notifyKeyguardDismissCallbacks()
+ refreshLockscreenEnabled()
} else {
sceneLogger.logFrameworkEnabled(
isEnabled = false,
@@ -186,7 +187,6 @@ constructor(
applicationScope.launch {
// TODO(b/296114544): Combine with some global hun state to make it visible!
deviceProvisioningInteractor.isDeviceProvisioned
- .distinctUntilChanged()
.flatMapLatest { isAllowedToBeVisible ->
if (isAllowedToBeVisible) {
combine(
@@ -665,7 +665,7 @@ constructor(
keyguardEnabledInteractor.isKeyguardEnabled
.sample(
combine(
- deviceEntryInteractor.isInLockdown,
+ deviceUnlockedInteractor.isInLockdown,
deviceEntryInteractor.isDeviceEntered,
::Pair,
)
@@ -735,4 +735,22 @@ constructor(
}
}
}
+
+ /**
+ * Keeps the value of [DeviceEntryInteractor.isLockscreenEnabled] fresh.
+ *
+ * This is needed because that value is sourced from a non-observable data source
+ * (`LockPatternUtils`, which doesn't expose a listener or callback for this value). Therefore,
+ * every time a transition to the `Lockscreen` scene is started, the value is re-fetched and
+ * cached.
+ */
+ private fun refreshLockscreenEnabled() {
+ applicationScope.launch {
+ sceneInteractor.transitionState
+ .map { it.isTransitioning(to = Scenes.Lockscreen) }
+ .distinctUntilChanged()
+ .filter { it }
+ .collectLatest { deviceEntryInteractor.refreshLockscreenEnabled() }
+ }
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/screenrecord/RecordingController.java b/packages/SystemUI/src/com/android/systemui/screenrecord/RecordingController.java
index 3dc207063060..46c586163ce8 100644
--- a/packages/SystemUI/src/com/android/systemui/screenrecord/RecordingController.java
+++ b/packages/SystemUI/src/com/android/systemui/screenrecord/RecordingController.java
@@ -27,7 +27,6 @@ import android.os.Bundle;
import android.os.CountDownTimer;
import android.os.Process;
import android.os.UserHandle;
-import android.util.Log;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@@ -60,8 +59,6 @@ import javax.inject.Inject;
@SysUISingleton
public class RecordingController
implements CallbackController<RecordingController.RecordingStateChangeCallback> {
- private static final String TAG = "RecordingController";
-
private boolean mIsStarting;
private boolean mIsRecording;
private PendingIntent mStopIntent;
@@ -71,6 +68,7 @@ public class RecordingController
private final BroadcastDispatcher mBroadcastDispatcher;
private final FeatureFlags mFlags;
private final UserTracker mUserTracker;
+ private final RecordingControllerLogger mRecordingControllerLogger;
private final MediaProjectionMetricsLogger mMediaProjectionMetricsLogger;
private final ScreenCaptureDisabledDialogDelegate mScreenCaptureDisabledDialogDelegate;
private final ScreenRecordDialogDelegate.Factory mScreenRecordDialogFactory;
@@ -102,9 +100,10 @@ public class RecordingController
if (intent != null && INTENT_UPDATE_STATE.equals(intent.getAction())) {
if (intent.hasExtra(EXTRA_STATE)) {
boolean state = intent.getBooleanExtra(EXTRA_STATE, false);
+ mRecordingControllerLogger.logIntentStateUpdated(state);
updateState(state);
} else {
- Log.e(TAG, "Received update intent with no state");
+ mRecordingControllerLogger.logIntentMissingState();
}
}
}
@@ -120,6 +119,7 @@ public class RecordingController
FeatureFlags flags,
Lazy<ScreenCaptureDevicePolicyResolver> devicePolicyResolver,
UserTracker userTracker,
+ RecordingControllerLogger recordingControllerLogger,
MediaProjectionMetricsLogger mediaProjectionMetricsLogger,
ScreenCaptureDisabledDialogDelegate screenCaptureDisabledDialogDelegate,
ScreenRecordDialogDelegate.Factory screenRecordDialogFactory,
@@ -130,6 +130,7 @@ public class RecordingController
mDevicePolicyResolver = devicePolicyResolver;
mBroadcastDispatcher = broadcastDispatcher;
mUserTracker = userTracker;
+ mRecordingControllerLogger = recordingControllerLogger;
mMediaProjectionMetricsLogger = mediaProjectionMetricsLogger;
mScreenCaptureDisabledDialogDelegate = screenCaptureDisabledDialogDelegate;
mScreenRecordDialogFactory = screenRecordDialogFactory;
@@ -212,9 +213,9 @@ public class RecordingController
IntentFilter stateFilter = new IntentFilter(INTENT_UPDATE_STATE);
mBroadcastDispatcher.registerReceiver(mStateChangeReceiver, stateFilter, null,
UserHandle.ALL);
- Log.d(TAG, "sent start intent");
+ mRecordingControllerLogger.logSentStartIntent();
} catch (PendingIntent.CanceledException e) {
- Log.e(TAG, "Pending intent was cancelled: " + e.getMessage());
+ mRecordingControllerLogger.logPendingIntentCancelled(e);
}
}
};
@@ -227,9 +228,10 @@ public class RecordingController
*/
public void cancelCountdown() {
if (mCountDownTimer != null) {
+ mRecordingControllerLogger.logCountdownCancelled();
mCountDownTimer.cancel();
} else {
- Log.e(TAG, "Timer was null");
+ mRecordingControllerLogger.logCountdownCancelErrorNoTimer();
}
mIsStarting = false;
@@ -260,13 +262,14 @@ public class RecordingController
public void stopRecording() {
try {
if (mStopIntent != null) {
+ mRecordingControllerLogger.logRecordingStopped();
mStopIntent.send(mInteractiveBroadcastOption);
} else {
- Log.e(TAG, "Stop intent was null");
+ mRecordingControllerLogger.logRecordingStopErrorNoStopIntent();
}
updateState(false);
} catch (PendingIntent.CanceledException e) {
- Log.e(TAG, "Error stopping: " + e.getMessage());
+ mRecordingControllerLogger.logRecordingStopError(e);
}
}
@@ -275,6 +278,7 @@ public class RecordingController
* @param isRecording
*/
public synchronized void updateState(boolean isRecording) {
+ mRecordingControllerLogger.logStateUpdated(isRecording);
if (!isRecording && mIsRecording) {
// Unregister receivers if we have stopped recording
mUserTracker.removeCallback(mUserChangedCallback);
diff --git a/packages/SystemUI/src/com/android/systemui/screenrecord/RecordingControllerLog.kt b/packages/SystemUI/src/com/android/systemui/screenrecord/RecordingControllerLog.kt
new file mode 100644
index 000000000000..dd2baef35bd5
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/screenrecord/RecordingControllerLog.kt
@@ -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 com.android.systemui.screenrecord
+
+import javax.inject.Qualifier
+
+/**
+ * Logs for screen record events. See [com.android.systemui.screenrecord.RecordingController] and
+ * [com.android.systemui.screenrecord.RecordingControllerLogger].
+ */
+@Qualifier
+@MustBeDocumented
+@Retention(AnnotationRetention.RUNTIME)
+annotation class RecordingControllerLog
diff --git a/packages/SystemUI/src/com/android/systemui/screenrecord/RecordingControllerLogger.kt b/packages/SystemUI/src/com/android/systemui/screenrecord/RecordingControllerLogger.kt
new file mode 100644
index 000000000000..e16c010f32b4
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/screenrecord/RecordingControllerLogger.kt
@@ -0,0 +1,77 @@
+/*
+ * 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.screenrecord
+
+import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.log.LogBuffer
+import com.android.systemui.log.core.LogLevel
+import javax.inject.Inject
+
+/** Helper class for logging events to [RecordingControllerLog] from Java. */
+@SysUISingleton
+class RecordingControllerLogger
+@Inject
+constructor(
+ @RecordingControllerLog private val logger: LogBuffer,
+) {
+ fun logStateUpdated(isRecording: Boolean) =
+ logger.log(
+ TAG,
+ LogLevel.DEBUG,
+ { bool1 = isRecording },
+ { "Updating state. isRecording=$bool1" },
+ )
+
+ fun logIntentStateUpdated(isRecording: Boolean) =
+ logger.log(
+ TAG,
+ LogLevel.DEBUG,
+ { bool1 = isRecording },
+ { "Update intent has state. isRecording=$bool1" },
+ )
+
+ fun logIntentMissingState() =
+ logger.log(TAG, LogLevel.ERROR, {}, { "Received update intent with no state" })
+
+ fun logSentStartIntent() = logger.log(TAG, LogLevel.DEBUG, {}, { "Sent start intent" })
+
+ fun logPendingIntentCancelled(e: Exception) =
+ logger.log(TAG, LogLevel.ERROR, {}, { "Pending intent was cancelled" }, e)
+
+ fun logCountdownCancelled() =
+ logger.log(TAG, LogLevel.DEBUG, {}, { "Record countdown cancelled" })
+
+ fun logCountdownCancelErrorNoTimer() =
+ logger.log(TAG, LogLevel.ERROR, {}, { "Couldn't cancel countdown because timer was null" })
+
+ fun logRecordingStopped() = logger.log(TAG, LogLevel.DEBUG, {}, { "Stopping recording" })
+
+ fun logRecordingStopErrorNoStopIntent() =
+ logger.log(
+ TAG,
+ LogLevel.ERROR,
+ {},
+ { "Couldn't stop recording because stop intent was null" },
+ )
+
+ fun logRecordingStopError(e: Exception) =
+ logger.log(TAG, LogLevel.DEBUG, {}, { "Couldn't stop recording" }, e)
+
+ companion object {
+ private const val TAG = "RecordingController"
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/screenrecord/ScreenRecordModule.kt b/packages/SystemUI/src/com/android/systemui/screenrecord/ScreenRecordModule.kt
index d7ddc507da82..a830e1bbfe72 100644
--- a/packages/SystemUI/src/com/android/systemui/screenrecord/ScreenRecordModule.kt
+++ b/packages/SystemUI/src/com/android/systemui/screenrecord/ScreenRecordModule.kt
@@ -16,6 +16,9 @@
package com.android.systemui.screenrecord
+import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.log.LogBuffer
+import com.android.systemui.log.LogBufferFactory
import com.android.systemui.qs.QsEventLogger
import com.android.systemui.qs.pipeline.shared.TileSpec
import com.android.systemui.qs.tileimpl.QSTileImpl
@@ -53,7 +56,7 @@ interface ScreenRecordModule {
@IntoMap
@StringKey(SCREEN_RECORD_TILE_SPEC)
fun provideScreenRecordAvailabilityInteractor(
- impl: ScreenRecordTileDataInteractor
+ impl: ScreenRecordTileDataInteractor
): QSTileAvailabilityInteractor
companion object {
@@ -89,5 +92,12 @@ interface ScreenRecordModule {
stateInteractor,
mapper,
)
+
+ @Provides
+ @SysUISingleton
+ @RecordingControllerLog
+ fun provideRecordingControllerLogBuffer(factory: LogBufferFactory): LogBuffer {
+ return factory.create("RecordingControllerLog", 50)
+ }
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/ActionExecutor.kt b/packages/SystemUI/src/com/android/systemui/screenshot/ActionExecutor.kt
index 1868b4a29f20..54e0319da58f 100644
--- a/packages/SystemUI/src/com/android/systemui/screenshot/ActionExecutor.kt
+++ b/packages/SystemUI/src/com/android/systemui/screenshot/ActionExecutor.kt
@@ -40,7 +40,7 @@ constructor(
private val intentExecutor: ActionIntentExecutor,
@Application private val applicationScope: CoroutineScope,
@Assisted val window: Window,
- @Assisted val viewProxy: ScreenshotViewProxy,
+ @Assisted val viewProxy: ScreenshotShelfViewProxy,
@Assisted val finishDismiss: () -> Unit,
) {
@@ -109,7 +109,7 @@ constructor(
interface Factory {
fun create(
window: Window,
- viewProxy: ScreenshotViewProxy,
+ viewProxy: ScreenshotShelfViewProxy,
finishDismiss: (() -> Unit)
): ActionExecutor
}
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/LegacyScreenshotViewProxy.kt b/packages/SystemUI/src/com/android/systemui/screenshot/LegacyScreenshotViewProxy.kt
deleted file mode 100644
index 3d024a6a8ccf..000000000000
--- a/packages/SystemUI/src/com/android/systemui/screenshot/LegacyScreenshotViewProxy.kt
+++ /dev/null
@@ -1,242 +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.systemui.screenshot
-
-import android.animation.Animator
-import android.app.Notification
-import android.content.Context
-import android.graphics.Bitmap
-import android.graphics.Rect
-import android.util.Log
-import android.view.KeyEvent
-import android.view.LayoutInflater
-import android.view.ScrollCaptureResponse
-import android.view.View
-import android.view.ViewTreeObserver
-import android.view.WindowInsets
-import android.window.OnBackInvokedCallback
-import android.window.OnBackInvokedDispatcher
-import androidx.appcompat.content.res.AppCompatResources
-import com.android.internal.logging.UiEventLogger
-import com.android.systemui.flags.FeatureFlags
-import com.android.systemui.res.R
-import com.android.systemui.screenshot.LogConfig.DEBUG_DISMISS
-import com.android.systemui.screenshot.ScreenshotEvent.SCREENSHOT_DISMISSED_OTHER
-import com.android.systemui.screenshot.scroll.ScrollCaptureController
-import dagger.assisted.Assisted
-import dagger.assisted.AssistedFactory
-import dagger.assisted.AssistedInject
-
-/**
- * Legacy implementation of screenshot view methods. Just proxies the calls down into the original
- * ScreenshotView.
- */
-class LegacyScreenshotViewProxy
-@AssistedInject
-constructor(
- private val logger: UiEventLogger,
- flags: FeatureFlags,
- @Assisted private val context: Context,
- @Assisted private val displayId: Int
-) : ScreenshotViewProxy {
- override val view: ScreenshotView =
- LayoutInflater.from(context).inflate(R.layout.screenshot, null) as ScreenshotView
- override val screenshotPreview: View
- override var packageName: String = ""
- set(value) {
- field = value
- view.setPackageName(value)
- }
- override var callbacks: ScreenshotView.ScreenshotViewCallback? = null
- set(value) {
- field = value
- view.setCallbacks(value)
- }
- override var screenshot: ScreenshotData? = null
- set(value) {
- field = value
- value?.let {
- val badgeBg =
- AppCompatResources.getDrawable(context, R.drawable.overlay_badge_background)
- val user = it.userHandle
- if (badgeBg != null && user != null) {
- view.badgeScreenshot(context.packageManager.getUserBadgedIcon(badgeBg, user))
- }
- view.setScreenshot(it)
- }
- }
-
- override val isAttachedToWindow
- get() = view.isAttachedToWindow
- override val isDismissing
- get() = view.isDismissing
- override val isPendingSharedTransition
- get() = view.isPendingSharedTransition
-
- init {
- view.setUiEventLogger(logger)
- view.setDefaultDisplay(displayId)
- view.setFlags(flags)
- addPredictiveBackListener { requestDismissal(SCREENSHOT_DISMISSED_OTHER) }
- setOnKeyListener { requestDismissal(SCREENSHOT_DISMISSED_OTHER) }
- if (LogConfig.DEBUG_WINDOW) {
- Log.d(TAG, "adding OnComputeInternalInsetsListener")
- }
- view.viewTreeObserver.addOnComputeInternalInsetsListener(view)
- screenshotPreview = view.screenshotPreview
- }
-
- override fun reset() = view.reset()
- override fun updateInsets(insets: WindowInsets) = view.updateInsets(insets)
- override fun updateOrientation(insets: WindowInsets) = view.updateOrientation(insets)
-
- override fun createScreenshotDropInAnimation(screenRect: Rect, showFlash: Boolean): Animator =
- view.createScreenshotDropInAnimation(screenRect, showFlash)
-
- override fun addQuickShareChip(quickShareAction: Notification.Action) =
- view.addQuickShareChip(quickShareAction)
-
- override fun setChipIntents(imageData: ScreenshotController.SavedImageData) =
- view.setChipIntents(imageData)
-
- override fun requestDismissal(event: ScreenshotEvent?) {
- if (DEBUG_DISMISS) {
- Log.d(TAG, "screenshot dismissal requested")
- }
- // If we're already animating out, don't restart the animation
- if (view.isDismissing) {
- if (DEBUG_DISMISS) {
- Log.v(TAG, "Already dismissing, ignoring duplicate command $event")
- }
- return
- }
- event?.let { logger.log(event, 0, packageName) }
- view.animateDismissal()
- }
-
- override fun showScrollChip(packageName: String, onClick: Runnable) =
- view.showScrollChip(packageName, onClick)
-
- override fun hideScrollChip() = view.hideScrollChip()
-
- override fun prepareScrollingTransition(
- response: ScrollCaptureResponse,
- screenBitmap: Bitmap,
- newScreenshot: Bitmap,
- screenshotTakenInPortrait: Boolean,
- onTransitionPrepared: Runnable,
- ) {
- view.prepareScrollingTransition(
- response,
- screenBitmap,
- newScreenshot,
- screenshotTakenInPortrait
- )
- view.post { onTransitionPrepared.run() }
- }
-
- override fun startLongScreenshotTransition(
- transitionDestination: Rect,
- onTransitionEnd: Runnable,
- longScreenshot: ScrollCaptureController.LongScreenshot
- ) = view.startLongScreenshotTransition(transitionDestination, onTransitionEnd, longScreenshot)
-
- override fun restoreNonScrollingUi() = view.restoreNonScrollingUi()
-
- override fun fadeForSharedTransition() {} // unused
-
- override fun stopInputListening() = view.stopInputListening()
-
- override fun requestFocus() {
- view.requestFocus()
- }
-
- override fun announceForAccessibility(string: String) = view.announceForAccessibility(string)
-
- override fun prepareEntranceAnimation(runnable: Runnable) {
- view.viewTreeObserver.addOnPreDrawListener(
- object : ViewTreeObserver.OnPreDrawListener {
- override fun onPreDraw(): Boolean {
- if (LogConfig.DEBUG_WINDOW) {
- Log.d(TAG, "onPreDraw: startAnimation")
- }
- view.viewTreeObserver.removeOnPreDrawListener(this)
- runnable.run()
- return true
- }
- }
- )
- }
-
- private fun addPredictiveBackListener(onDismissRequested: (ScreenshotEvent) -> Unit) {
- val onBackInvokedCallback = OnBackInvokedCallback {
- if (LogConfig.DEBUG_INPUT) {
- Log.d(TAG, "Predictive Back callback dispatched")
- }
- onDismissRequested.invoke(SCREENSHOT_DISMISSED_OTHER)
- }
- view.addOnAttachStateChangeListener(
- object : View.OnAttachStateChangeListener {
- override fun onViewAttachedToWindow(v: View) {
- if (LogConfig.DEBUG_INPUT) {
- Log.d(TAG, "Registering Predictive Back callback")
- }
- view
- .findOnBackInvokedDispatcher()
- ?.registerOnBackInvokedCallback(
- OnBackInvokedDispatcher.PRIORITY_DEFAULT,
- onBackInvokedCallback
- )
- }
-
- override fun onViewDetachedFromWindow(view: View) {
- if (LogConfig.DEBUG_INPUT) {
- Log.d(TAG, "Unregistering Predictive Back callback")
- }
- view
- .findOnBackInvokedDispatcher()
- ?.unregisterOnBackInvokedCallback(onBackInvokedCallback)
- }
- }
- )
- }
- private fun setOnKeyListener(onDismissRequested: (ScreenshotEvent) -> Unit) {
- view.setOnKeyListener(
- object : View.OnKeyListener {
- override fun onKey(view: View, keyCode: Int, event: KeyEvent): Boolean {
- if (keyCode == KeyEvent.KEYCODE_BACK || keyCode == KeyEvent.KEYCODE_ESCAPE) {
- if (LogConfig.DEBUG_INPUT) {
- Log.d(TAG, "onKeyEvent: $keyCode")
- }
- onDismissRequested.invoke(SCREENSHOT_DISMISSED_OTHER)
- return true
- }
- return false
- }
- }
- )
- }
-
- @AssistedFactory
- interface Factory : ScreenshotViewProxy.Factory {
- override fun getProxy(context: Context, displayId: Int): LegacyScreenshotViewProxy
- }
-
- companion object {
- private const val TAG = "LegacyScreenshotViewProxy"
- }
-}
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/MessageContainerController.kt b/packages/SystemUI/src/com/android/systemui/screenshot/MessageContainerController.kt
index 596046268984..474afa8bcb9d 100644
--- a/packages/SystemUI/src/com/android/systemui/screenshot/MessageContainerController.kt
+++ b/packages/SystemUI/src/com/android/systemui/screenshot/MessageContainerController.kt
@@ -137,7 +137,7 @@ constructor(
val offset = container.height + params.topMargin + params.bottomMargin
val anim = if (animateIn) ValueAnimator.ofFloat(0f, 1f) else ValueAnimator.ofFloat(1f, 0f)
with(anim) {
- duration = ScreenshotView.SCREENSHOT_ACTIONS_EXPANSION_DURATION_MS
+ duration = MESSAGE_EXPANSION_DURATION_MS
interpolator = AccelerateDecelerateInterpolator()
addUpdateListener { valueAnimator: ValueAnimator ->
val interpolation = valueAnimator.animatedValue as Float
@@ -147,4 +147,8 @@ constructor(
}
return anim
}
+
+ companion object {
+ const val MESSAGE_EXPANSION_DURATION_MS: Long = 400
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/OverlayActionChip.java b/packages/SystemUI/src/com/android/systemui/screenshot/OverlayActionChip.java
deleted file mode 100644
index 9e68c48c2c16..000000000000
--- a/packages/SystemUI/src/com/android/systemui/screenshot/OverlayActionChip.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.systemui.screenshot;
-
-import static java.util.Objects.requireNonNull;
-
-import android.app.ActivityOptions;
-import android.app.BroadcastOptions;
-import android.app.PendingIntent;
-import android.content.Context;
-import android.graphics.drawable.Icon;
-import android.util.AttributeSet;
-import android.util.Log;
-import android.widget.FrameLayout;
-import android.widget.ImageView;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-
-import com.android.systemui.res.R;
-
-/**
- * View for a chip with an icon and text.
- */
-public class OverlayActionChip extends FrameLayout {
-
- private static final String TAG = "ScreenshotActionChip";
-
- private ImageView mIconView;
- private TextView mTextView;
- private boolean mIsPending = false;
-
- public OverlayActionChip(Context context) {
- this(context, null);
- }
-
- public OverlayActionChip(Context context, AttributeSet attrs) {
- this(context, attrs, 0);
- }
-
- public OverlayActionChip(Context context, AttributeSet attrs, int defStyleAttr) {
- this(context, attrs, defStyleAttr, 0);
- }
-
- public OverlayActionChip(
- Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
- super(context, attrs, defStyleAttr, defStyleRes);
- }
-
- @Override
- protected void onFinishInflate() {
- mIconView = requireNonNull(findViewById(R.id.overlay_action_chip_icon));
- mTextView = requireNonNull(findViewById(R.id.overlay_action_chip_text));
- updatePadding(mTextView.getText().length() > 0);
- }
-
- @Override
- public void setPressed(boolean pressed) {
- // override pressed state to true if there is an action pending
- super.setPressed(mIsPending || pressed);
- }
-
- /**
- * Set chip icon and whether to tint with theme color
- */
- public void setIcon(Icon icon, boolean tint) {
- mIconView.setImageIcon(icon);
- if (!tint) {
- mIconView.setImageTintList(null);
- }
- }
-
- /**
- * Set chip text
- */
- public void setText(CharSequence text) {
- mTextView.setText(text);
- updatePadding(text.length() > 0);
- }
-
- /**
- * Set PendingIntent to be sent and Runnable to be run, when chip is clicked
- */
- public void setPendingIntent(PendingIntent intent, Runnable finisher) {
- setOnClickListener(v -> {
- try {
- BroadcastOptions options = BroadcastOptions.makeBasic();
- options.setInteractive(true);
- options.setPendingIntentBackgroundActivityStartMode(
- ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED);
- intent.send(options.toBundle());
- finisher.run();
- } catch (PendingIntent.CanceledException e) {
- Log.e(TAG, "Intent cancelled", e);
- }
- });
- }
-
- /**
- * Set pressed state of chip (to be used when chip is clicked before underlying intent is ready)
- */
- public void setIsPending(boolean isPending) {
- mIsPending = isPending;
- setPressed(mIsPending);
- }
-
- private void updatePadding(boolean hasText) {
- LinearLayout.LayoutParams iconParams =
- (LinearLayout.LayoutParams) mIconView.getLayoutParams();
- LinearLayout.LayoutParams textParams =
- (LinearLayout.LayoutParams) mTextView.getLayoutParams();
- if (hasText) {
- int paddingStart = mContext.getResources().getDimensionPixelSize(
- R.dimen.overlay_action_chip_padding_start);
- int spacing = mContext.getResources().getDimensionPixelSize(
- R.dimen.overlay_action_chip_spacing);
- int paddingEnd = mContext.getResources().getDimensionPixelSize(
- R.dimen.overlay_action_chip_padding_end);
- iconParams.setMarginStart(paddingStart);
- iconParams.setMarginEnd(spacing);
- textParams.setMarginEnd(paddingEnd);
- } else {
- int paddingHorizontal = mContext.getResources().getDimensionPixelSize(
- R.dimen.overlay_action_chip_icon_only_padding_horizontal);
- iconParams.setMarginStart(paddingHorizontal);
- iconParams.setMarginEnd(paddingHorizontal);
- }
- mIconView.setLayoutParams(iconParams);
- mTextView.setLayoutParams(textParams);
- }
-}
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/SaveImageInBackgroundTask.java b/packages/SystemUI/src/com/android/systemui/screenshot/SaveImageInBackgroundTask.java
index 49144091cb62..54ae225442c9 100644
--- a/packages/SystemUI/src/com/android/systemui/screenshot/SaveImageInBackgroundTask.java
+++ b/packages/SystemUI/src/com/android/systemui/screenshot/SaveImageInBackgroundTask.java
@@ -49,6 +49,7 @@ import java.util.List;
import java.util.Random;
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
+import java.util.function.Consumer;
/**
* An AsyncTask that saves an image to the media store in the background.
@@ -59,12 +60,73 @@ class SaveImageInBackgroundTask extends AsyncTask<Void, Void, Void> {
private static final String SCREENSHOT_ID_TEMPLATE = "Screenshot_%s";
private static final String SCREENSHOT_SHARE_SUBJECT_TEMPLATE = "Screenshot (%s)";
+ /**
+ * POD used in the AsyncTask which saves an image in the background.
+ */
+ static class SaveImageInBackgroundData {
+ public Bitmap image;
+ public Consumer<Uri> finisher;
+ public ActionsReadyListener mActionsReadyListener;
+ public QuickShareActionReadyListener mQuickShareActionsReadyListener;
+ public UserHandle owner;
+ public int displayId;
+
+ void clearImage() {
+ image = null;
+ }
+ }
+
+ /**
+ * Structure returned by the SaveImageInBackgroundTask
+ */
+ public static class SavedImageData {
+ public Uri uri;
+ public List<Notification.Action> smartActions;
+ public Notification.Action quickShareAction;
+ public UserHandle owner;
+ public String subject; // Title for sharing
+ public Long imageTime; // Time at which screenshot was saved
+
+ /**
+ * Used to reset the return data on error
+ */
+ public void reset() {
+ uri = null;
+ smartActions = null;
+ quickShareAction = null;
+ subject = null;
+ imageTime = null;
+ }
+ }
+
+ /**
+ * Structure returned by the QueryQuickShareInBackgroundTask
+ */
+ static class QuickShareData {
+ public Notification.Action quickShareAction;
+
+ /**
+ * Used to reset the return data on error
+ */
+ public void reset() {
+ quickShareAction = null;
+ }
+ }
+
+ interface ActionsReadyListener {
+ void onActionsReady(SavedImageData imageData);
+ }
+
+ interface QuickShareActionReadyListener {
+ void onActionsReady(QuickShareData quickShareData);
+ }
+
private final Context mContext;
private FeatureFlags mFlags;
private final ScreenshotSmartActions mScreenshotSmartActions;
- private final ScreenshotController.SaveImageInBackgroundData mParams;
- private final ScreenshotController.SavedImageData mImageData;
- private final ScreenshotController.QuickShareData mQuickShareData;
+ private final SaveImageInBackgroundData mParams;
+ private final SavedImageData mImageData;
+ private final QuickShareData mQuickShareData;
private final ScreenshotNotificationSmartActionsProvider mSmartActionsProvider;
private String mScreenshotId;
@@ -77,15 +139,15 @@ class SaveImageInBackgroundTask extends AsyncTask<Void, Void, Void> {
FeatureFlags flags,
ImageExporter exporter,
ScreenshotSmartActions screenshotSmartActions,
- ScreenshotController.SaveImageInBackgroundData data,
+ SaveImageInBackgroundData data,
ScreenshotNotificationSmartActionsProvider
screenshotNotificationSmartActionsProvider
) {
mContext = context;
mFlags = flags;
mScreenshotSmartActions = screenshotSmartActions;
- mImageData = new ScreenshotController.SavedImageData();
- mQuickShareData = new ScreenshotController.QuickShareData();
+ mImageData = new SavedImageData();
+ mQuickShareData = new QuickShareData();
mImageExporter = exporter;
// Prepare all the output metadata
@@ -195,7 +257,7 @@ class SaveImageInBackgroundTask extends AsyncTask<Void, Void, Void> {
* Update the listener run when the saving task completes. Used to avoid showing UI for the
* first screenshot when a second one is taken.
*/
- void setActionsReadyListener(ScreenshotController.ActionsReadyListener listener) {
+ void setActionsReadyListener(ActionsReadyListener listener) {
mParams.mActionsReadyListener = listener;
}
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotController.java b/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotController.java
index c87b1f526957..0a4635e0849b 100644
--- a/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotController.java
+++ b/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotController.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2020 The Android Open Source Project
+ * 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.
@@ -20,7 +20,7 @@ import static android.content.res.Configuration.ORIENTATION_PORTRAIT;
import static android.view.WindowManager.LayoutParams.TYPE_SCREENSHOT;
import static com.android.systemui.Flags.screenshotPrivateProfileAccessibilityAnnouncementFix;
-import static com.android.systemui.Flags.screenshotShelfUi2;
+import static com.android.systemui.Flags.screenshotSaveImageExporter;
import static com.android.systemui.screenshot.LogConfig.DEBUG_ANIM;
import static com.android.systemui.screenshot.LogConfig.DEBUG_CALLBACK;
import static com.android.systemui.screenshot.LogConfig.DEBUG_INPUT;
@@ -35,10 +35,7 @@ import android.animation.AnimatorListenerAdapter;
import android.annotation.MainThread;
import android.annotation.NonNull;
import android.annotation.Nullable;
-import android.app.ActivityOptions;
-import android.app.ExitTransitionCoordinator;
import android.app.ICompatCameraControlCallback;
-import android.app.Notification;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@@ -55,7 +52,6 @@ import android.os.UserManager;
import android.provider.Settings;
import android.util.DisplayMetrics;
import android.util.Log;
-import android.util.Pair;
import android.view.Display;
import android.view.ScrollCaptureResponse;
import android.view.View;
@@ -67,7 +63,6 @@ import android.view.WindowManager;
import android.widget.Toast;
import android.window.WindowContext;
-import com.android.internal.app.ChooserActivity;
import com.android.internal.logging.UiEventLogger;
import com.android.internal.policy.PhoneWindow;
import com.android.settingslib.applications.InterestingConfigChanges;
@@ -89,7 +84,6 @@ import dagger.assisted.AssistedInject;
import kotlin.Unit;
-import java.util.List;
import java.util.UUID;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
@@ -104,67 +98,6 @@ import javax.inject.Provider;
public class ScreenshotController implements ScreenshotHandler {
private static final String TAG = logTag(ScreenshotController.class);
- /**
- * POD used in the AsyncTask which saves an image in the background.
- */
- static class SaveImageInBackgroundData {
- public Bitmap image;
- public Consumer<Uri> finisher;
- public ScreenshotController.ActionsReadyListener mActionsReadyListener;
- public ScreenshotController.QuickShareActionReadyListener mQuickShareActionsReadyListener;
- public UserHandle owner;
- public int displayId;
-
- void clearImage() {
- image = null;
- }
- }
-
- /**
- * Structure returned by the SaveImageInBackgroundTask
- */
- public static class SavedImageData {
- public Uri uri;
- public List<Notification.Action> smartActions;
- public Notification.Action quickShareAction;
- public UserHandle owner;
- public String subject; // Title for sharing
- public Long imageTime; // Time at which screenshot was saved
-
- /**
- * Used to reset the return data on error
- */
- public void reset() {
- uri = null;
- smartActions = null;
- quickShareAction = null;
- subject = null;
- imageTime = null;
- }
- }
-
- /**
- * Structure returned by the QueryQuickShareInBackgroundTask
- */
- static class QuickShareData {
- public Notification.Action quickShareAction;
-
- /**
- * Used to reset the return data on error
- */
- public void reset() {
- quickShareAction = null;
- }
- }
-
- interface ActionsReadyListener {
- void onActionsReady(ScreenshotController.SavedImageData imageData);
- }
-
- interface QuickShareActionReadyListener {
- void onActionsReady(ScreenshotController.QuickShareData quickShareData);
- }
-
public interface TransitionDestination {
/**
* Allows the long screenshot activity to call back with a destination location (the bounds
@@ -191,7 +124,7 @@ public class ScreenshotController implements ScreenshotHandler {
private final WindowContext mContext;
private final FeatureFlags mFlags;
- private final ScreenshotViewProxy mViewProxy;
+ private final ScreenshotShelfViewProxy mViewProxy;
private final ScreenshotNotificationsController mNotificationsController;
private final ScreenshotSmartActions mScreenshotSmartActions;
private final UiEventLogger mUiEventLogger;
@@ -213,7 +146,6 @@ public class ScreenshotController implements ScreenshotHandler {
private final ScreenshotNotificationSmartActionsProvider
mScreenshotNotificationSmartActionsProvider;
private final TimeoutHandler mScreenshotHandler;
- private final ActionIntentExecutor mActionIntentExecutor;
private final UserManager mUserManager;
private final AssistContentRequester mAssistContentRequester;
private final ActionExecutor mActionExecutor;
@@ -231,13 +163,6 @@ public class ScreenshotController implements ScreenshotHandler {
private String mPackageName = "";
private final BroadcastReceiver mCopyBroadcastReceiver;
- // When false, the screenshot is taken without showing the ui. Note that this only applies to
- // external displays, as on the default one the UI should **always** be shown.
- // This is needed in case of screenshot during display mirroring, as adding another window to
- // the external display makes mirroring stop.
- // When there is a way to distinguish between displays that are mirroring or extending, this
- // can be removed and we can directly show the ui only in the extended case.
- private final Boolean mShowUIOnExternalDisplay;
/** Tracks config changes that require re-creating UI */
private final InterestingConfigChanges mConfigChanges = new InterestingConfigChanges(
ActivityInfo.CONFIG_ORIENTATION
@@ -253,7 +178,7 @@ public class ScreenshotController implements ScreenshotHandler {
Context context,
WindowManager windowManager,
FeatureFlags flags,
- ScreenshotViewProxy.Factory viewProxyFactory,
+ ScreenshotShelfViewProxy.Factory viewProxyFactory,
ScreenshotSmartActions screenshotSmartActions,
ScreenshotNotificationsController.Factory screenshotNotificationsControllerFactory,
UiEventLogger uiEventLogger,
@@ -266,15 +191,13 @@ public class ScreenshotController implements ScreenshotHandler {
BroadcastDispatcher broadcastDispatcher,
ScreenshotNotificationSmartActionsProvider screenshotNotificationSmartActionsProvider,
ScreenshotActionsController.Factory screenshotActionsControllerFactory,
- ActionIntentExecutor actionIntentExecutor,
ActionExecutor.Factory actionExecutorFactory,
UserManager userManager,
AssistContentRequester assistContentRequester,
MessageContainerController messageContainerController,
Provider<ScreenshotSoundController> screenshotSoundController,
AnnouncementResolver announcementResolver,
- @Assisted Display display,
- @Assisted boolean showUIOnExternalDisplay
+ @Assisted Display display
) {
mScreenshotSmartActions = screenshotSmartActions;
mNotificationsController = screenshotNotificationsControllerFactory.create(
@@ -297,7 +220,6 @@ public class ScreenshotController implements ScreenshotHandler {
final Context displayContext = context.createDisplayContext(display);
mContext = (WindowContext) displayContext.createWindowContext(TYPE_SCREENSHOT, null);
mFlags = flags;
- mActionIntentExecutor = actionIntentExecutor;
mUserManager = userManager;
mMessageContainerController = messageContainerController;
mAssistContentRequester = assistContentRequester;
@@ -348,7 +270,6 @@ public class ScreenshotController implements ScreenshotHandler {
mBroadcastDispatcher.registerReceiver(mCopyBroadcastReceiver, new IntentFilter(
ClipboardOverlayController.COPY_OVERLAY_ACTION), null, null,
Context.RECEIVER_NOT_EXPORTED, ClipboardOverlayController.SELF_PERMISSION);
- mShowUIOnExternalDisplay = showUIOnExternalDisplay;
}
@Override
@@ -382,7 +303,7 @@ public class ScreenshotController implements ScreenshotHandler {
Log.w(TAG, "User setup not complete, displaying toast only");
// User setup isn't complete, so we don't want to show any UI beyond a toast, as editing
// and sharing shouldn't be exposed to the user.
- saveScreenshotAndToast(screenshot.getUserHandle(), finisher);
+ saveScreenshotAndToast(screenshot, finisher);
return;
}
@@ -398,31 +319,23 @@ public class ScreenshotController implements ScreenshotHandler {
prepareViewForNewScreenshot(screenshot, oldPackageName);
- if (!shouldShowUi()) {
- saveScreenshotInWorkerThread(
- screenshot.getUserHandle(), finisher, this::logSuccessOnActionsReady,
- (ignored) -> {
- });
- return;
- }
-
final UUID requestId;
- if (screenshotShelfUi2()) {
- requestId = mActionsController.setCurrentScreenshot(screenshot);
- saveScreenshotInBackground(screenshot, requestId, finisher);
-
- if (screenshot.getTaskId() >= 0) {
- mAssistContentRequester.requestAssistContent(
- screenshot.getTaskId(),
- assistContent ->
- mActionsController.onAssistContent(requestId, assistContent));
- } else {
- mActionsController.onAssistContent(requestId, null);
+ requestId = mActionsController.setCurrentScreenshot(screenshot);
+ saveScreenshotInBackground(screenshot, requestId, finisher, result -> {
+ if (result.uri != null) {
+ ScreenshotSavedResult savedScreenshot = new ScreenshotSavedResult(
+ result.uri, screenshot.getUserOrDefault(), result.timestamp);
+ mActionsController.setCompletedScreenshot(requestId, savedScreenshot);
}
+ });
+
+ if (screenshot.getTaskId() >= 0) {
+ mAssistContentRequester.requestAssistContent(
+ screenshot.getTaskId(),
+ assistContent ->
+ mActionsController.onAssistContent(requestId, assistContent));
} else {
- requestId = UUID.randomUUID(); // passed through but unused for legacy UI
- saveScreenshotInWorkerThread(screenshot.getUserHandle(), finisher,
- this::showUiOnActionsReady, this::showUiOnQuickShareActionReady);
+ mActionsController.onAssistContent(requestId, null);
}
// The window is focusable by default
@@ -458,13 +371,6 @@ public class ScreenshotController implements ScreenshotHandler {
// ignore system bar insets for the purpose of window layout
mWindow.getDecorView().setOnApplyWindowInsetsListener(
(v, insets) -> WindowInsets.CONSUMED);
- if (!screenshotShelfUi2()) {
- mScreenshotHandler.cancelTimeout(); // restarted after animation
- }
- }
-
- private boolean shouldShowUi() {
- return mDisplay.getDisplayId() == Display.DEFAULT_DISPLAY || mShowUIOnExternalDisplay;
}
void prepareViewForNewScreenshot(@NonNull ScreenshotData screenshot, String oldPackageName) {
@@ -501,9 +407,6 @@ public class ScreenshotController implements ScreenshotHandler {
}
mViewProxy.setPackageName(mPackageName);
-
- mViewProxy.updateOrientation(
- mWindowManager.getCurrentWindowMetrics().getWindowInsets());
}
/**
@@ -515,11 +418,7 @@ public class ScreenshotController implements ScreenshotHandler {
}
boolean isPendingSharedTransition() {
- if (screenshotShelfUi2()) {
- return mActionExecutor.isPendingSharedTransition();
- } else {
- return mViewProxy.isPendingSharedTransition();
- }
+ return mActionExecutor.isPendingSharedTransition();
}
// Any cleanup needed when the service is being destroyed.
@@ -556,7 +455,7 @@ public class ScreenshotController implements ScreenshotHandler {
}
mMessageContainerController.setView(mViewProxy.getView());
- mViewProxy.setCallbacks(new ScreenshotView.ScreenshotViewCallback() {
+ mViewProxy.setCallbacks(new ScreenshotShelfViewProxy.ScreenshotViewCallback() {
@Override
public void onUserInteraction() {
if (DEBUG_INPUT) {
@@ -566,13 +465,6 @@ public class ScreenshotController implements ScreenshotHandler {
}
@Override
- public void onAction(Intent intent, UserHandle owner, boolean overrideTransition) {
- Pair<ActivityOptions, ExitTransitionCoordinator> exit = createWindowTransition();
- mActionIntentExecutor.launchIntentAsync(
- intent, owner, overrideTransition, exit.first, exit.second);
- }
-
- @Override
public void onDismiss() {
finishDismiss();
}
@@ -603,11 +495,7 @@ public class ScreenshotController implements ScreenshotHandler {
if (mConfigChanges.applyNewConfig(mContext.getResources())) {
// Hide the scroll chip until we know it's available in this
// orientation
- if (screenshotShelfUi2()) {
- mActionsController.onScrollChipInvalidated();
- } else {
- mViewProxy.hideScrollChip();
- }
+ mActionsController.onScrollChipInvalidated();
// Delay scroll capture eval a bit to allow the underlying activity
// to set up in the new orientation.
mScreenshotHandler.postDelayed(
@@ -640,13 +528,8 @@ public class ScreenshotController implements ScreenshotHandler {
(response) -> {
mUiEventLogger.log(ScreenshotEvent.SCREENSHOT_LONG_SCREENSHOT_IMPRESSION,
0, response.getPackageName());
- if (screenshotShelfUi2()) {
- mActionsController.onScrollChipReady(requestId,
- () -> onScrollButtonClicked(owner, response));
- } else {
- mViewProxy.showScrollChip(response.getPackageName(),
- () -> onScrollButtonClicked(owner, response));
- }
+ mActionsController.onScrollChipReady(requestId,
+ () -> onScrollButtonClicked(owner, response));
return Unit.INSTANCE;
}
);
@@ -715,11 +598,9 @@ public class ScreenshotController implements ScreenshotHandler {
mWindowManager.addView(decorView, mWindowLayoutParams);
decorView.requestApplyInsets();
- if (screenshotShelfUi2()) {
- ViewGroup layout = decorView.requireViewById(android.R.id.content);
- layout.setClipChildren(false);
- layout.setClipToPadding(false);
- }
+ ViewGroup layout = decorView.requireViewById(android.R.id.content);
+ layout.setClipChildren(false);
+ layout.setClipToPadding(false);
}
void removeWindow() {
@@ -749,29 +630,40 @@ public class ScreenshotController implements ScreenshotHandler {
* Save the bitmap but don't show the normal screenshot UI.. just a toast (or notification on
* failure).
*/
- private void saveScreenshotAndToast(UserHandle owner, Consumer<Uri> finisher) {
+ private void saveScreenshotAndToast(ScreenshotData screenshot, Consumer<Uri> finisher) {
// Play the shutter sound to notify that we've taken a screenshot
playCameraSoundIfNeeded();
- saveScreenshotInWorkerThread(
- owner,
- /* onComplete */ finisher,
- /* actionsReadyListener */ imageData -> {
- if (DEBUG_CALLBACK) {
- Log.d(TAG, "returning URI to finisher (Consumer<URI>): " + imageData.uri);
- }
- finisher.accept(imageData.uri);
- if (imageData.uri == null) {
- mUiEventLogger.log(ScreenshotEvent.SCREENSHOT_NOT_SAVED, 0, mPackageName);
- mNotificationsController.notifyScreenshotError(
- R.string.screenshot_failed_to_save_text);
- } else {
- mUiEventLogger.log(ScreenshotEvent.SCREENSHOT_SAVED, 0, mPackageName);
- mScreenshotHandler.post(() -> Toast.makeText(mContext,
- R.string.screenshot_saved_title, Toast.LENGTH_SHORT).show());
- }
- },
- null);
+ if (screenshotSaveImageExporter()) {
+ saveScreenshotInBackground(screenshot, UUID.randomUUID(), finisher, result -> {
+ if (result.uri != null) {
+ mScreenshotHandler.post(() -> Toast.makeText(mContext,
+ R.string.screenshot_saved_title, Toast.LENGTH_SHORT).show());
+ }
+ });
+ } else {
+ saveScreenshotInWorkerThread(
+ screenshot.getUserHandle(),
+ /* onComplete */ finisher,
+ /* actionsReadyListener */ imageData -> {
+ if (DEBUG_CALLBACK) {
+ Log.d(TAG,
+ "returning URI to finisher (Consumer<URI>): " + imageData.uri);
+ }
+ finisher.accept(imageData.uri);
+ if (imageData.uri == null) {
+ mUiEventLogger.log(ScreenshotEvent.SCREENSHOT_NOT_SAVED, 0,
+ mPackageName);
+ mNotificationsController.notifyScreenshotError(
+ R.string.screenshot_failed_to_save_text);
+ } else {
+ mUiEventLogger.log(ScreenshotEvent.SCREENSHOT_SAVED, 0, mPackageName);
+ mScreenshotHandler.post(() -> Toast.makeText(mContext,
+ R.string.screenshot_saved_title, Toast.LENGTH_SHORT).show());
+ }
+ },
+ null);
+ }
}
/**
@@ -803,33 +695,6 @@ public class ScreenshotController implements ScreenshotHandler {
mScreenshotAnimation.start();
}
- /**
- * Supplies the necessary bits for the shared element transition to share sheet.
- * Note that once called, the action intent to share must be sent immediately after.
- */
- private Pair<ActivityOptions, ExitTransitionCoordinator> createWindowTransition() {
- ExitTransitionCoordinator.ExitTransitionCallbacks callbacks =
- new ExitTransitionCoordinator.ExitTransitionCallbacks() {
- @Override
- public boolean isReturnTransitionAllowed() {
- return false;
- }
-
- @Override
- public void hideSharedElements() {
- finishDismiss();
- }
-
- @Override
- public void onFinish() {
- }
- };
-
- return ActivityOptions.startSharedElementAnimation(mWindow, callbacks, null,
- Pair.create(mViewProxy.getScreenshotPreview(),
- ChooserActivity.FIRST_IMAGE_PREVIEW_TRANSITION_NAME));
- }
-
/** Reset screenshot view and then call onCompleteRunnable */
private void finishDismiss() {
Log.d(TAG, "finishDismiss");
@@ -844,8 +709,8 @@ public class ScreenshotController implements ScreenshotHandler {
mScreenshotHandler.cancelTimeout();
}
- private void saveScreenshotInBackground(
- ScreenshotData screenshot, UUID requestId, Consumer<Uri> finisher) {
+ private void saveScreenshotInBackground(ScreenshotData screenshot, UUID requestId,
+ Consumer<Uri> finisher, Consumer<ImageExporter.Result> onResult) {
ListenableFuture<ImageExporter.Result> future = mImageExporter.export(mBgExecutor,
requestId, screenshot.getBitmap(), screenshot.getUserOrDefault(),
mDisplay.getDisplayId());
@@ -854,10 +719,7 @@ public class ScreenshotController implements ScreenshotHandler {
ImageExporter.Result result = future.get();
Log.d(TAG, "Saved screenshot: " + result);
logScreenshotResultStatus(result.uri, screenshot.getUserHandle());
- if (result.uri != null) {
- mActionsController.setCompletedScreenshot(requestId, new ScreenshotSavedResult(
- result.uri, screenshot.getUserOrDefault(), result.timestamp));
- }
+ onResult.accept(result);
if (DEBUG_CALLBACK) {
Log.d(TAG, "finished background processing, Calling (Consumer<Uri>) "
+ "finisher.accept(\"" + result.uri + "\"");
@@ -879,11 +741,11 @@ public class ScreenshotController implements ScreenshotHandler {
private void saveScreenshotInWorkerThread(
UserHandle owner,
@NonNull Consumer<Uri> finisher,
- @Nullable ActionsReadyListener actionsReadyListener,
- @Nullable QuickShareActionReadyListener
+ @Nullable SaveImageInBackgroundTask.ActionsReadyListener actionsReadyListener,
+ @Nullable SaveImageInBackgroundTask.QuickShareActionReadyListener
quickShareActionsReadyListener) {
- ScreenshotController.SaveImageInBackgroundData
- data = new ScreenshotController.SaveImageInBackgroundData();
+ SaveImageInBackgroundTask.SaveImageInBackgroundData
+ data = new SaveImageInBackgroundTask.SaveImageInBackgroundData();
data.image = mScreenBitmap;
data.finisher = finisher;
data.mActionsReadyListener = actionsReadyListener;
@@ -902,62 +764,6 @@ public class ScreenshotController implements ScreenshotHandler {
mSaveInBgTask.execute();
}
-
- /**
- * Sets up the action shade and its entrance animation, once we get the screenshot URI.
- */
- private void showUiOnActionsReady(ScreenshotController.SavedImageData imageData) {
- logSuccessOnActionsReady(imageData);
- mScreenshotHandler.resetTimeout();
-
- if (imageData.uri != null) {
- if (DEBUG_UI) {
- Log.d(TAG, "Showing UI actions");
- }
- if (!imageData.owner.equals(Process.myUserHandle())) {
- Log.d(TAG, "Screenshot saved to user " + imageData.owner + " as "
- + imageData.uri);
- }
- mScreenshotHandler.post(() -> {
- if (mScreenshotAnimation != null && mScreenshotAnimation.isRunning()) {
- mScreenshotAnimation.addListener(new AnimatorListenerAdapter() {
- @Override
- public void onAnimationEnd(Animator animation) {
- super.onAnimationEnd(animation);
- mViewProxy.setChipIntents(imageData);
- }
- });
- } else {
- mViewProxy.setChipIntents(imageData);
- }
- });
- }
- }
-
- /**
- * Sets up the action shade and its entrance animation, once we get the Quick Share action data.
- */
- private void showUiOnQuickShareActionReady(ScreenshotController.QuickShareData quickShareData) {
- if (DEBUG_UI) {
- Log.d(TAG, "Showing UI for Quick Share action");
- }
- if (quickShareData.quickShareAction != null) {
- mScreenshotHandler.post(() -> {
- if (mScreenshotAnimation != null && mScreenshotAnimation.isRunning()) {
- mScreenshotAnimation.addListener(new AnimatorListenerAdapter() {
- @Override
- public void onAnimationEnd(Animator animation) {
- super.onAnimationEnd(animation);
- mViewProxy.addQuickShareChip(quickShareData.quickShareAction);
- }
- });
- } else {
- mViewProxy.addQuickShareChip(quickShareData.quickShareAction);
- }
- });
- }
- }
-
/**
* Logs success/failure of the screenshot saving task, and shows an error if it failed.
*/
@@ -978,7 +784,7 @@ public class ScreenshotController implements ScreenshotHandler {
/**
* Logs success/failure of the screenshot saving task, and shows an error if it failed.
*/
- private void logSuccessOnActionsReady(ScreenshotController.SavedImageData imageData) {
+ private void logSuccessOnActionsReady(SaveImageInBackgroundTask.SavedImageData imageData) {
logScreenshotResultStatus(imageData.uri, imageData.owner);
}
@@ -1053,9 +859,7 @@ public class ScreenshotController implements ScreenshotHandler {
* Creates an instance of the controller for that specific display.
*
* @param display display to capture
- * @param showUIOnExternalDisplay Whether the UI should be shown if this is an external
- * display.
*/
- ScreenshotController create(Display display, boolean showUIOnExternalDisplay);
+ ScreenshotController create(Display display);
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotShelfViewProxy.kt b/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotShelfViewProxy.kt
index 1b5fa345ebb4..50215af30ad4 100644
--- a/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotShelfViewProxy.kt
+++ b/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotShelfViewProxy.kt
@@ -18,7 +18,6 @@ package com.android.systemui.screenshot
import android.animation.Animator
import android.animation.AnimatorListenerAdapter
-import android.app.Notification
import android.content.Context
import android.graphics.Bitmap
import android.graphics.Rect
@@ -45,7 +44,6 @@ import com.android.systemui.res.R
import com.android.systemui.screenshot.LogConfig.DEBUG_DISMISS
import com.android.systemui.screenshot.LogConfig.DEBUG_INPUT
import com.android.systemui.screenshot.LogConfig.DEBUG_WINDOW
-import com.android.systemui.screenshot.ScreenshotController.SavedImageData
import com.android.systemui.screenshot.ScreenshotEvent.SCREENSHOT_DISMISSED_OTHER
import com.android.systemui.screenshot.scroll.ScrollCaptureController
import com.android.systemui.screenshot.ui.ScreenshotAnimationController
@@ -70,13 +68,23 @@ constructor(
private val thumbnailObserver: ThumbnailObserver,
@Assisted private val context: Context,
@Assisted private val displayId: Int
-) : ScreenshotViewProxy {
- override val view: ScreenshotShelfView =
+) {
+
+ interface ScreenshotViewCallback {
+ fun onUserInteraction()
+
+ fun onDismiss()
+
+ /** DOWN motion event was observed outside of the touchable areas of this view. */
+ fun onTouchOutside()
+ }
+
+ val view: ScreenshotShelfView =
LayoutInflater.from(context).inflate(R.layout.screenshot_shelf, null) as ScreenshotShelfView
- override val screenshotPreview: View
- override var packageName: String = ""
- override var callbacks: ScreenshotView.ScreenshotViewCallback? = null
- override var screenshot: ScreenshotData? = null
+ val screenshotPreview: View
+ var packageName: String = ""
+ var callbacks: ScreenshotViewCallback? = null
+ var screenshot: ScreenshotData? = null
set(value) {
value?.let {
viewModel.setScreenshotBitmap(it.bitmap)
@@ -92,10 +100,11 @@ constructor(
field = value
}
- override val isAttachedToWindow
+ val isAttachedToWindow
get() = view.isAttachedToWindow
- override var isDismissing = false
- override var isPendingSharedTransition = false
+
+ var isDismissing = false
+ var isPendingSharedTransition = false
private val animationController = ScreenshotAnimationController(view, viewModel)
private var inputMonitor: InputMonitorCompat? = null
@@ -136,17 +145,17 @@ constructor(
)
}
- override fun reset() {
+ fun reset() {
animationController.cancel()
isPendingSharedTransition = false
viewModel.reset()
}
- override fun updateInsets(insets: WindowInsets) {
+
+ fun updateInsets(insets: WindowInsets) {
view.updateInsets(insets)
}
- override fun updateOrientation(insets: WindowInsets) {}
- override fun createScreenshotDropInAnimation(screenRect: Rect, showFlash: Boolean): Animator {
+ fun createScreenshotDropInAnimation(screenRect: Rect, showFlash: Boolean): Animator {
val entrance =
animationController.getEntranceAnimation(screenRect, showFlash) {
viewModel.setAnimationState(AnimationState.ENTRANCE_REVEAL)
@@ -164,11 +173,7 @@ constructor(
return entrance
}
- override fun addQuickShareChip(quickShareAction: Notification.Action) {}
-
- override fun setChipIntents(imageData: SavedImageData) {}
-
- override fun requestDismissal(event: ScreenshotEvent?) {
+ fun requestDismissal(event: ScreenshotEvent?) {
requestDismissal(event, null)
}
@@ -187,6 +192,7 @@ constructor(
override fun onAnimationStart(animator: Animator) {
isDismissing = true
}
+
override fun onAnimationEnd(animator: Animator) {
isDismissing = false
callbacks?.onDismiss()
@@ -196,11 +202,7 @@ constructor(
animator.start()
}
- override fun showScrollChip(packageName: String, onClick: Runnable) {}
-
- override fun hideScrollChip() {}
-
- override fun prepareScrollingTransition(
+ fun prepareScrollingTransition(
response: ScrollCaptureResponse,
screenBitmap: Bitmap, // unused
newScreenshot: Bitmap,
@@ -228,7 +230,7 @@ constructor(
return r
}
- override fun startLongScreenshotTransition(
+ fun startLongScreenshotTransition(
transitionDestination: Rect,
onTransitionEnd: Runnable,
longScreenshot: ScrollCaptureController.LongScreenshot,
@@ -243,27 +245,27 @@ constructor(
transitionAnimation.start()
}
- override fun restoreNonScrollingUi() {
+ fun restoreNonScrollingUi() {
viewModel.setScrollableRect(null)
viewModel.setScrollingScrimBitmap(null)
animationController.restoreUI()
callbacks?.onUserInteraction() // reset the timeout
}
- override fun stopInputListening() {
+ fun stopInputListening() {
inputMonitor?.dispose()
inputMonitor = null
inputEventReceiver?.dispose()
inputEventReceiver = null
}
- override fun requestFocus() {
+ fun requestFocus() {
view.requestFocus()
}
- override fun announceForAccessibility(string: String) = view.announceForAccessibility(string)
+ fun announceForAccessibility(string: String) = view.announceForAccessibility(string)
- override fun prepareEntranceAnimation(runnable: Runnable) {
+ fun prepareEntranceAnimation(runnable: Runnable) {
view.viewTreeObserver.addOnPreDrawListener(
object : ViewTreeObserver.OnPreDrawListener {
override fun onPreDraw(): Boolean {
@@ -276,7 +278,7 @@ constructor(
)
}
- override fun fadeForSharedTransition() {
+ fun fadeForSharedTransition() {
animationController.fadeForSharedTransition()
}
@@ -349,7 +351,7 @@ constructor(
}
@AssistedFactory
- interface Factory : ScreenshotViewProxy.Factory {
- override fun getProxy(context: Context, displayId: Int): ScreenshotShelfViewProxy
+ interface Factory {
+ fun getProxy(context: Context, displayId: Int): ScreenshotShelfViewProxy
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotView.java b/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotView.java
deleted file mode 100644
index 59e38a836258..000000000000
--- a/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotView.java
+++ /dev/null
@@ -1,1126 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.systemui.screenshot;
-
-import static android.content.res.Configuration.ORIENTATION_PORTRAIT;
-
-import static com.android.internal.jank.InteractionJankMonitor.CUJ_TAKE_SCREENSHOT;
-import static com.android.systemui.screenshot.LogConfig.DEBUG_ANIM;
-import static com.android.systemui.screenshot.LogConfig.DEBUG_DISMISS;
-import static com.android.systemui.screenshot.LogConfig.DEBUG_INPUT;
-import static com.android.systemui.screenshot.LogConfig.DEBUG_SCROLL;
-import static com.android.systemui.screenshot.LogConfig.DEBUG_UI;
-import static com.android.systemui.screenshot.LogConfig.DEBUG_WINDOW;
-import static com.android.systemui.screenshot.LogConfig.logTag;
-import static com.android.systemui.screenshot.ScreenshotController.SCREENSHOT_CORNER_DEFAULT_TIMEOUT_MILLIS;
-
-import static java.util.Objects.requireNonNull;
-
-import android.animation.Animator;
-import android.animation.AnimatorListenerAdapter;
-import android.animation.AnimatorSet;
-import android.animation.ValueAnimator;
-import android.annotation.Nullable;
-import android.app.ActivityManager;
-import android.app.BroadcastOptions;
-import android.app.Notification;
-import android.content.Context;
-import android.content.Intent;
-import android.content.res.ColorStateList;
-import android.content.res.Resources;
-import android.graphics.Bitmap;
-import android.graphics.BlendMode;
-import android.graphics.Color;
-import android.graphics.Insets;
-import android.graphics.Matrix;
-import android.graphics.PointF;
-import android.graphics.Rect;
-import android.graphics.Region;
-import android.graphics.drawable.BitmapDrawable;
-import android.graphics.drawable.ColorDrawable;
-import android.graphics.drawable.Drawable;
-import android.graphics.drawable.Icon;
-import android.graphics.drawable.InsetDrawable;
-import android.graphics.drawable.LayerDrawable;
-import android.os.Bundle;
-import android.os.Looper;
-import android.os.RemoteException;
-import android.os.UserHandle;
-import android.util.AttributeSet;
-import android.util.DisplayMetrics;
-import android.util.Log;
-import android.util.MathUtils;
-import android.view.Choreographer;
-import android.view.Display;
-import android.view.DisplayCutout;
-import android.view.GestureDetector;
-import android.view.LayoutInflater;
-import android.view.MotionEvent;
-import android.view.ScrollCaptureResponse;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.ViewTreeObserver;
-import android.view.WindowInsets;
-import android.view.WindowManager;
-import android.view.WindowMetrics;
-import android.view.accessibility.AccessibilityManager;
-import android.view.animation.AnimationUtils;
-import android.view.animation.Interpolator;
-import android.widget.FrameLayout;
-import android.widget.HorizontalScrollView;
-import android.widget.ImageView;
-import android.widget.LinearLayout;
-
-import androidx.constraintlayout.widget.ConstraintLayout;
-
-import com.android.internal.jank.InteractionJankMonitor;
-import com.android.internal.logging.UiEventLogger;
-import com.android.systemui.flags.FeatureFlags;
-import com.android.systemui.res.R;
-import com.android.systemui.screenshot.scroll.ScrollCaptureController;
-import com.android.systemui.shared.system.InputChannelCompat;
-import com.android.systemui.shared.system.InputMonitorCompat;
-import com.android.systemui.shared.system.QuickStepContract;
-
-import java.util.ArrayList;
-
-/**
- * Handles the visual elements and animations for the screenshot flow.
- */
-public class ScreenshotView extends FrameLayout implements
- ViewTreeObserver.OnComputeInternalInsetsListener {
-
- public interface ScreenshotViewCallback {
- void onUserInteraction();
-
- void onAction(Intent intent, UserHandle owner, boolean overrideTransition);
-
- void onDismiss();
-
- /** DOWN motion event was observed outside of the touchable areas of this view. */
- void onTouchOutside();
- }
-
- private static final String TAG = logTag(ScreenshotView.class);
-
- private static final long SCREENSHOT_FLASH_IN_DURATION_MS = 133;
- private static final long SCREENSHOT_FLASH_OUT_DURATION_MS = 217;
- // delay before starting to fade in dismiss button
- private static final long SCREENSHOT_TO_CORNER_DISMISS_DELAY_MS = 200;
- private static final long SCREENSHOT_TO_CORNER_X_DURATION_MS = 234;
- private static final long SCREENSHOT_TO_CORNER_Y_DURATION_MS = 500;
- private static final long SCREENSHOT_TO_CORNER_SCALE_DURATION_MS = 234;
- public static final long SCREENSHOT_ACTIONS_EXPANSION_DURATION_MS = 400;
- private static final long SCREENSHOT_ACTIONS_ALPHA_DURATION_MS = 100;
- private static final float SCREENSHOT_ACTIONS_START_SCALE_X = .7f;
-
- private final Resources mResources;
- private final Interpolator mFastOutSlowIn;
- private final DisplayMetrics mDisplayMetrics;
- private final float mFixedSize;
- private final AccessibilityManager mAccessibilityManager;
- private final GestureDetector mSwipeDetector;
-
- private int mDefaultDisplay = Display.DEFAULT_DISPLAY;
- private int mNavMode;
- private boolean mOrientationPortrait;
- private boolean mDirectionLTR;
-
- private ImageView mScrollingScrim;
- private DraggableConstraintLayout mScreenshotStatic;
- private ImageView mScreenshotPreview;
- private ImageView mScreenshotBadge;
- private View mScreenshotPreviewBorder;
- private ImageView mScrollablePreview;
- private ImageView mScreenshotFlash;
- private ImageView mActionsContainerBackground;
- private HorizontalScrollView mActionsContainer;
- private LinearLayout mActionsView;
- private FrameLayout mDismissButton;
- private OverlayActionChip mShareChip;
- private OverlayActionChip mEditChip;
- private OverlayActionChip mScrollChip;
- private OverlayActionChip mQuickShareChip;
-
- private UiEventLogger mUiEventLogger;
- private ScreenshotViewCallback mCallbacks;
- private boolean mPendingSharedTransition;
- private InputMonitorCompat mInputMonitor;
- private InputChannelCompat.InputEventReceiver mInputEventReceiver;
- private boolean mShowScrollablePreview;
- private String mPackageName = "";
-
- private final ArrayList<OverlayActionChip> mSmartChips = new ArrayList<>();
- private PendingInteraction mPendingInteraction;
- // Should only be set/used if the SCREENSHOT_METADATA flag is set.
- private ScreenshotData mScreenshotData;
-
- private final InteractionJankMonitor mInteractionJankMonitor;
- private FeatureFlags mFlags;
- private final Bundle mInteractiveBroadcastOption;
-
- private enum PendingInteraction {
- PREVIEW,
- EDIT,
- SHARE,
- QUICK_SHARE
- }
-
- public ScreenshotView(Context context) {
- this(context, null);
- }
-
- public ScreenshotView(Context context, AttributeSet attrs) {
- this(context, attrs, 0);
- }
-
- public ScreenshotView(Context context, AttributeSet attrs, int defStyleAttr) {
- this(context, attrs, defStyleAttr, 0);
- }
-
- public ScreenshotView(
- Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
- super(context, attrs, defStyleAttr, defStyleRes);
- mResources = mContext.getResources();
- mInteractionJankMonitor = getInteractionJankMonitorInstance();
-
- BroadcastOptions options = BroadcastOptions.makeBasic();
- options.setInteractive(true);
- mInteractiveBroadcastOption = options.toBundle();
-
- mFixedSize = mResources.getDimensionPixelSize(R.dimen.overlay_x_scale);
-
- // standard material ease
- mFastOutSlowIn =
- AnimationUtils.loadInterpolator(mContext, android.R.interpolator.fast_out_slow_in);
-
- mDisplayMetrics = new DisplayMetrics();
- mContext.getDisplay().getRealMetrics(mDisplayMetrics);
-
- mAccessibilityManager = AccessibilityManager.getInstance(mContext);
-
- mSwipeDetector = new GestureDetector(mContext,
- new GestureDetector.SimpleOnGestureListener() {
- final Rect mActionsRect = new Rect();
-
- @Override
- public boolean onScroll(
- MotionEvent ev1, MotionEvent ev2, float distanceX, float distanceY) {
- mActionsContainer.getBoundsOnScreen(mActionsRect);
- // return true if we aren't in the actions bar, or if we are but it isn't
- // scrollable in the direction of movement
- return !mActionsRect.contains((int) ev2.getRawX(), (int) ev2.getRawY())
- || !mActionsContainer.canScrollHorizontally((int) distanceX);
- }
- });
- mSwipeDetector.setIsLongpressEnabled(false);
- addOnAttachStateChangeListener(new OnAttachStateChangeListener() {
- @Override
- public void onViewAttachedToWindow(View v) {
- startInputListening();
- }
-
- @Override
- public void onViewDetachedFromWindow(View v) {
- stopInputListening();
- }
- });
- }
-
- private InteractionJankMonitor getInteractionJankMonitorInstance() {
- return InteractionJankMonitor.getInstance();
- }
-
- public void hideScrollChip() {
- mScrollChip.setVisibility(View.GONE);
- }
-
- /**
- * Called to display the scroll action chip when support is detected.
- *
- * @param packageName the owning package of the window to be captured
- * @param onClick the action to take when the chip is clicked.
- */
- public void showScrollChip(String packageName, Runnable onClick) {
- if (DEBUG_SCROLL) {
- Log.d(TAG, "Showing Scroll option");
- }
- mScrollChip.setVisibility(VISIBLE);
- mScrollChip.setOnClickListener((v) -> onClick.run());
- }
-
- @Override // ViewTreeObserver.OnComputeInternalInsetsListener
- public void onComputeInternalInsets(ViewTreeObserver.InternalInsetsInfo inoutInfo) {
- inoutInfo.setTouchableInsets(ViewTreeObserver.InternalInsetsInfo.TOUCHABLE_INSETS_REGION);
- inoutInfo.touchableRegion.set(getTouchRegion(true));
- }
-
- private Region getSwipeRegion() {
- Region swipeRegion = new Region();
-
- final Rect tmpRect = new Rect();
- int swipePadding = (int) FloatingWindowUtil.dpToPx(
- mDisplayMetrics, DraggableConstraintLayout.SWIPE_PADDING_DP * -1);
- mScreenshotPreview.getBoundsOnScreen(tmpRect);
- tmpRect.inset(swipePadding, swipePadding);
- swipeRegion.op(tmpRect, Region.Op.UNION);
- mActionsContainerBackground.getBoundsOnScreen(tmpRect);
- tmpRect.inset(swipePadding, swipePadding);
- swipeRegion.op(tmpRect, Region.Op.UNION);
- mDismissButton.getBoundsOnScreen(tmpRect);
- swipeRegion.op(tmpRect, Region.Op.UNION);
-
- View messageContainer = findViewById(R.id.screenshot_message_container);
- if (messageContainer != null) {
- messageContainer.getBoundsOnScreen(tmpRect);
- swipeRegion.op(tmpRect, Region.Op.UNION);
- }
- View messageDismiss = findViewById(R.id.message_dismiss_button);
- if (messageDismiss != null) {
- messageDismiss.getBoundsOnScreen(tmpRect);
- swipeRegion.op(tmpRect, Region.Op.UNION);
- }
-
- return swipeRegion;
- }
-
- private Region getTouchRegion(boolean includeScrim) {
- Region touchRegion = getSwipeRegion();
-
- if (includeScrim && mScrollingScrim.getVisibility() == View.VISIBLE) {
- final Rect tmpRect = new Rect();
- mScrollingScrim.getBoundsOnScreen(tmpRect);
- touchRegion.op(tmpRect, Region.Op.UNION);
- }
-
- if (QuickStepContract.isGesturalMode(mNavMode)) {
- final WindowManager wm = mContext.getSystemService(WindowManager.class);
- final WindowMetrics windowMetrics = wm.getCurrentWindowMetrics();
- final Insets gestureInsets = windowMetrics.getWindowInsets().getInsets(
- WindowInsets.Type.systemGestures());
- // Receive touches in gesture insets such that they don't cause TOUCH_OUTSIDE
- Rect inset = new Rect(0, 0, gestureInsets.left, mDisplayMetrics.heightPixels);
- touchRegion.op(inset, Region.Op.UNION);
- inset.set(mDisplayMetrics.widthPixels - gestureInsets.right, 0,
- mDisplayMetrics.widthPixels, mDisplayMetrics.heightPixels);
- touchRegion.op(inset, Region.Op.UNION);
- }
- return touchRegion;
- }
-
- private void startInputListening() {
- stopInputListening();
- mInputMonitor = new InputMonitorCompat("Screenshot", mDefaultDisplay);
- mInputEventReceiver = mInputMonitor.getInputReceiver(
- Looper.getMainLooper(), Choreographer.getInstance(), ev -> {
- if (ev instanceof MotionEvent) {
- MotionEvent event = (MotionEvent) ev;
- if (event.getActionMasked() == MotionEvent.ACTION_DOWN
- && !getTouchRegion(false).contains(
- (int) event.getRawX(), (int) event.getRawY())) {
- mCallbacks.onTouchOutside();
- }
- }
- });
- }
-
- void stopInputListening() {
- if (mInputMonitor != null) {
- mInputMonitor.dispose();
- mInputMonitor = null;
- }
- if (mInputEventReceiver != null) {
- mInputEventReceiver.dispose();
- mInputEventReceiver = null;
- }
- }
-
- @Override // View
- protected void onFinishInflate() {
- super.onFinishInflate();
- mScrollingScrim = requireNonNull(findViewById(R.id.screenshot_scrolling_scrim));
- mScreenshotStatic = requireNonNull(findViewById(R.id.screenshot_static));
- mScreenshotPreview = requireNonNull(findViewById(R.id.screenshot_preview));
-
- mScreenshotPreviewBorder = requireNonNull(
- findViewById(R.id.screenshot_preview_border));
- mScreenshotPreview.setClipToOutline(true);
- mScreenshotBadge = requireNonNull(findViewById(R.id.screenshot_badge));
-
- mActionsContainerBackground = requireNonNull(findViewById(
- R.id.actions_container_background));
- mActionsContainer = requireNonNull(findViewById(R.id.actions_container));
- mActionsView = requireNonNull(findViewById(R.id.screenshot_actions));
- mDismissButton = requireNonNull(findViewById(R.id.screenshot_dismiss_button));
- mScrollablePreview = requireNonNull(findViewById(R.id.screenshot_scrollable_preview));
- mScreenshotFlash = requireNonNull(findViewById(R.id.screenshot_flash));
- mShareChip = requireNonNull(mActionsContainer.findViewById(R.id.screenshot_share_chip));
- mEditChip = requireNonNull(mActionsContainer.findViewById(R.id.screenshot_edit_chip));
- mScrollChip = requireNonNull(mActionsContainer.findViewById(R.id.screenshot_scroll_chip));
-
- setFocusable(true);
- mActionsContainer.setScrollX(0);
-
- mNavMode = getResources().getInteger(
- com.android.internal.R.integer.config_navBarInteractionMode);
- mOrientationPortrait =
- getResources().getConfiguration().orientation == ORIENTATION_PORTRAIT;
- mDirectionLTR =
- getResources().getConfiguration().getLayoutDirection() == View.LAYOUT_DIRECTION_LTR;
-
- // Get focus so that the key events go to the layout.
- setFocusableInTouchMode(true);
- requestFocus();
-
- mScreenshotStatic.setCallbacks(new DraggableConstraintLayout.SwipeDismissCallbacks() {
- @Override
- public void onInteraction() {
- mCallbacks.onUserInteraction();
- }
-
- @Override
- public void onSwipeDismissInitiated(Animator animator) {
- if (DEBUG_DISMISS) {
- Log.d(ScreenshotView.TAG, "dismiss triggered via swipe gesture");
- }
- mUiEventLogger.log(ScreenshotEvent.SCREENSHOT_SWIPE_DISMISSED, 0,
- mPackageName);
- }
-
- @Override
- public void onDismissComplete() {
- if (mInteractionJankMonitor.isInstrumenting(CUJ_TAKE_SCREENSHOT)) {
- mInteractionJankMonitor.end(CUJ_TAKE_SCREENSHOT);
- }
- mCallbacks.onDismiss();
- }
- });
- }
-
- View getScreenshotPreview() {
- return mScreenshotPreview;
- }
-
- void setUiEventLogger(UiEventLogger uiEventLogger) {
- mUiEventLogger = uiEventLogger;
- }
-
- void setCallbacks(ScreenshotViewCallback callbacks) {
- mCallbacks = callbacks;
- }
-
- void setFlags(FeatureFlags flags) {
- mFlags = flags;
- }
-
- void setScreenshot(Bitmap bitmap, Insets screenInsets) {
- mScreenshotPreview.setImageDrawable(createScreenDrawable(mResources, bitmap, screenInsets));
- }
-
- void setScreenshot(ScreenshotData screenshot) {
- mScreenshotData = screenshot;
- setScreenshot(screenshot.getBitmap(), screenshot.getInsets());
- mScreenshotPreview.setImageDrawable(createScreenDrawable(mResources, screenshot.getBitmap(),
- screenshot.getInsets()));
- }
-
- void setPackageName(String packageName) {
- mPackageName = packageName;
- }
-
- void setDefaultDisplay(int displayId) {
- mDefaultDisplay = displayId;
- }
-
- void updateInsets(WindowInsets insets) {
- int orientation = mContext.getResources().getConfiguration().orientation;
- mOrientationPortrait = (orientation == ORIENTATION_PORTRAIT);
- FrameLayout.LayoutParams p =
- (FrameLayout.LayoutParams) mScreenshotStatic.getLayoutParams();
- DisplayCutout cutout = insets.getDisplayCutout();
- Insets navBarInsets = insets.getInsets(WindowInsets.Type.navigationBars());
- if (cutout == null) {
- p.setMargins(0, 0, 0, navBarInsets.bottom);
- } else {
- Insets waterfall = cutout.getWaterfallInsets();
- if (mOrientationPortrait) {
- p.setMargins(
- waterfall.left,
- Math.max(cutout.getSafeInsetTop(), waterfall.top),
- waterfall.right,
- Math.max(cutout.getSafeInsetBottom(),
- Math.max(navBarInsets.bottom, waterfall.bottom)));
- } else {
- p.setMargins(
- Math.max(cutout.getSafeInsetLeft(), waterfall.left),
- waterfall.top,
- Math.max(cutout.getSafeInsetRight(), waterfall.right),
- Math.max(navBarInsets.bottom, waterfall.bottom));
- }
- }
- mScreenshotStatic.setLayoutParams(p);
- mScreenshotStatic.requestLayout();
- }
-
- void updateOrientation(WindowInsets insets) {
- int orientation = mContext.getResources().getConfiguration().orientation;
- mOrientationPortrait = (orientation == ORIENTATION_PORTRAIT);
- updateInsets(insets);
- ViewGroup.LayoutParams params = mScreenshotPreview.getLayoutParams();
- if (mOrientationPortrait) {
- params.width = (int) mFixedSize;
- params.height = LayoutParams.WRAP_CONTENT;
- mScreenshotPreview.setScaleType(ImageView.ScaleType.FIT_START);
- } else {
- params.width = LayoutParams.WRAP_CONTENT;
- params.height = (int) mFixedSize;
- mScreenshotPreview.setScaleType(ImageView.ScaleType.FIT_END);
- }
-
- mScreenshotPreview.setLayoutParams(params);
- }
-
- AnimatorSet createScreenshotDropInAnimation(Rect bounds, boolean showFlash) {
- if (DEBUG_ANIM) {
- Log.d(TAG, "createAnim: bounds=" + bounds + " showFlash=" + showFlash);
- }
-
- Rect targetPosition = new Rect();
- mScreenshotPreview.getHitRect(targetPosition);
-
- // ratio of preview width, end vs. start size
- float cornerScale =
- mFixedSize / (mOrientationPortrait ? bounds.width() : bounds.height());
- final float currentScale = 1 / cornerScale;
-
- AnimatorSet dropInAnimation = new AnimatorSet();
- ValueAnimator flashInAnimator = ValueAnimator.ofFloat(0, 1);
- flashInAnimator.setDuration(SCREENSHOT_FLASH_IN_DURATION_MS);
- flashInAnimator.setInterpolator(mFastOutSlowIn);
- flashInAnimator.addUpdateListener(animation ->
- mScreenshotFlash.setAlpha((float) animation.getAnimatedValue()));
-
- ValueAnimator flashOutAnimator = ValueAnimator.ofFloat(1, 0);
- flashOutAnimator.setDuration(SCREENSHOT_FLASH_OUT_DURATION_MS);
- flashOutAnimator.setInterpolator(mFastOutSlowIn);
- flashOutAnimator.addUpdateListener(animation ->
- mScreenshotFlash.setAlpha((float) animation.getAnimatedValue()));
-
- // animate from the current location, to the static preview location
- final PointF startPos = new PointF(bounds.centerX(), bounds.centerY());
- final PointF finalPos = new PointF(targetPosition.exactCenterX(),
- targetPosition.exactCenterY());
-
- // Shift to screen coordinates so that the animation runs on top of the entire screen,
- // including e.g. bars covering the display cutout.
- int[] locInScreen = mScreenshotPreview.getLocationOnScreen();
- startPos.offset(targetPosition.left - locInScreen[0], targetPosition.top - locInScreen[1]);
-
- if (DEBUG_ANIM) {
- Log.d(TAG, "toCorner: startPos=" + startPos);
- Log.d(TAG, "toCorner: finalPos=" + finalPos);
- }
-
- ValueAnimator toCorner = ValueAnimator.ofFloat(0, 1);
- toCorner.setDuration(SCREENSHOT_TO_CORNER_Y_DURATION_MS);
-
- toCorner.addListener(new AnimatorListenerAdapter() {
- @Override
- public void onAnimationStart(Animator animation) {
- mScreenshotPreview.setScaleX(currentScale);
- mScreenshotPreview.setScaleY(currentScale);
- mScreenshotPreview.setVisibility(View.VISIBLE);
- if (mAccessibilityManager.isEnabled()) {
- mDismissButton.setAlpha(0);
- mDismissButton.setVisibility(View.VISIBLE);
- }
- }
- });
-
- float xPositionPct =
- SCREENSHOT_TO_CORNER_X_DURATION_MS / (float) SCREENSHOT_TO_CORNER_Y_DURATION_MS;
- float dismissPct =
- SCREENSHOT_TO_CORNER_DISMISS_DELAY_MS / (float) SCREENSHOT_TO_CORNER_Y_DURATION_MS;
- float scalePct =
- SCREENSHOT_TO_CORNER_SCALE_DURATION_MS / (float) SCREENSHOT_TO_CORNER_Y_DURATION_MS;
- toCorner.addUpdateListener(animation -> {
- float t = animation.getAnimatedFraction();
- if (t < scalePct) {
- float scale = MathUtils.lerp(
- currentScale, 1, mFastOutSlowIn.getInterpolation(t / scalePct));
- mScreenshotPreview.setScaleX(scale);
- mScreenshotPreview.setScaleY(scale);
- } else {
- mScreenshotPreview.setScaleX(1);
- mScreenshotPreview.setScaleY(1);
- }
-
- if (t < xPositionPct) {
- float xCenter = MathUtils.lerp(startPos.x, finalPos.x,
- mFastOutSlowIn.getInterpolation(t / xPositionPct));
- mScreenshotPreview.setX(xCenter - mScreenshotPreview.getWidth() / 2f);
- } else {
- mScreenshotPreview.setX(finalPos.x - mScreenshotPreview.getWidth() / 2f);
- }
- float yCenter = MathUtils.lerp(
- startPos.y, finalPos.y, mFastOutSlowIn.getInterpolation(t));
- mScreenshotPreview.setY(yCenter - mScreenshotPreview.getHeight() / 2f);
-
- if (t >= dismissPct) {
- mDismissButton.setAlpha((t - dismissPct) / (1 - dismissPct));
- float currentX = mScreenshotPreview.getX();
- float currentY = mScreenshotPreview.getY();
- mDismissButton.setY(currentY - mDismissButton.getHeight() / 2f);
- if (mDirectionLTR) {
- mDismissButton.setX(currentX + mScreenshotPreview.getWidth()
- - mDismissButton.getWidth() / 2f);
- } else {
- mDismissButton.setX(currentX - mDismissButton.getWidth() / 2f);
- }
- }
- });
-
- mScreenshotFlash.setAlpha(0f);
- mScreenshotFlash.setVisibility(View.VISIBLE);
-
- ValueAnimator borderFadeIn = ValueAnimator.ofFloat(0, 1);
- borderFadeIn.setDuration(100);
- borderFadeIn.addUpdateListener((animation) -> {
- float borderAlpha = animation.getAnimatedFraction();
- mScreenshotPreviewBorder.setAlpha(borderAlpha);
- mScreenshotBadge.setAlpha(borderAlpha);
- });
-
- if (showFlash) {
- dropInAnimation.play(flashOutAnimator).after(flashInAnimator);
- dropInAnimation.play(flashOutAnimator).with(toCorner);
- } else {
- dropInAnimation.play(toCorner);
- }
- dropInAnimation.play(borderFadeIn).after(toCorner);
-
- dropInAnimation.addListener(new AnimatorListenerAdapter() {
- @Override
- public void onAnimationCancel(Animator animation) {
- mInteractionJankMonitor.cancel(CUJ_TAKE_SCREENSHOT);
- }
-
- @Override
- public void onAnimationStart(Animator animation) {
- InteractionJankMonitor.Configuration.Builder builder =
- InteractionJankMonitor.Configuration.Builder.withView(
- CUJ_TAKE_SCREENSHOT, mScreenshotPreview)
- .setTag("DropIn");
- mInteractionJankMonitor.begin(builder);
- }
-
- @Override
- public void onAnimationEnd(Animator animation) {
- if (DEBUG_ANIM) {
- Log.d(TAG, "drop-in animation ended");
- }
- mDismissButton.setOnClickListener(view -> {
- if (DEBUG_INPUT) {
- Log.d(TAG, "dismiss button clicked");
- }
- mUiEventLogger.log(
- ScreenshotEvent.SCREENSHOT_EXPLICIT_DISMISSAL, 0, mPackageName);
- animateDismissal();
- });
- mDismissButton.setAlpha(1);
- float dismissOffset = mDismissButton.getWidth() / 2f;
- float finalDismissX = mDirectionLTR
- ? finalPos.x - dismissOffset + bounds.width() * cornerScale / 2f
- : finalPos.x - dismissOffset - bounds.width() * cornerScale / 2f;
- mDismissButton.setX(finalDismissX);
- mDismissButton.setY(
- finalPos.y - dismissOffset - bounds.height() * cornerScale / 2f);
- mScreenshotPreview.setScaleX(1);
- mScreenshotPreview.setScaleY(1);
- mScreenshotPreview.setX(finalPos.x - mScreenshotPreview.getWidth() / 2f);
- mScreenshotPreview.setY(finalPos.y - mScreenshotPreview.getHeight() / 2f);
- requestLayout();
- mInteractionJankMonitor.end(CUJ_TAKE_SCREENSHOT);
- createScreenshotActionsShadeAnimation().start();
- }
- });
-
- return dropInAnimation;
- }
-
- ValueAnimator createScreenshotActionsShadeAnimation() {
- // By default the activities won't be able to start immediately; override this to keep
- // the same behavior as if started from a notification
- try {
- ActivityManager.getService().resumeAppSwitches();
- } catch (RemoteException e) {
- }
-
- ArrayList<OverlayActionChip> chips = new ArrayList<>();
-
- mShareChip.setContentDescription(mContext.getString(R.string.screenshot_share_description));
- mShareChip.setIcon(Icon.createWithResource(mContext, R.drawable.ic_screenshot_share), true);
- mShareChip.setOnClickListener(v -> {
- mShareChip.setIsPending(true);
- mEditChip.setIsPending(false);
- if (mQuickShareChip != null) {
- mQuickShareChip.setIsPending(false);
- }
- mPendingInteraction = PendingInteraction.SHARE;
- });
- chips.add(mShareChip);
-
- mEditChip.setContentDescription(
- mContext.getString(R.string.screenshot_edit_description));
- mEditChip.setIcon(Icon.createWithResource(mContext, R.drawable.ic_screenshot_edit),
- true);
- mEditChip.setOnClickListener(v -> {
- mEditChip.setIsPending(true);
- mShareChip.setIsPending(false);
- if (mQuickShareChip != null) {
- mQuickShareChip.setIsPending(false);
- }
- mPendingInteraction = PendingInteraction.EDIT;
- });
- chips.add(mEditChip);
-
- mScreenshotPreview.setOnClickListener(v -> {
- mShareChip.setIsPending(false);
- mEditChip.setIsPending(false);
- if (mQuickShareChip != null) {
- mQuickShareChip.setIsPending(false);
- }
- mPendingInteraction = PendingInteraction.PREVIEW;
- });
-
- mScrollChip.setText(mContext.getString(R.string.screenshot_scroll_label));
- mScrollChip.setIcon(Icon.createWithResource(mContext,
- R.drawable.ic_screenshot_scroll), true);
- chips.add(mScrollChip);
-
- // remove the margin from the last chip so that it's correctly aligned with the end
- LinearLayout.LayoutParams params = (LinearLayout.LayoutParams)
- mActionsView.getChildAt(0).getLayoutParams();
- params.setMarginEnd(0);
- mActionsView.getChildAt(0).setLayoutParams(params);
-
- ValueAnimator animator = ValueAnimator.ofFloat(0, 1);
- animator.setDuration(SCREENSHOT_ACTIONS_EXPANSION_DURATION_MS);
- float alphaFraction = (float) SCREENSHOT_ACTIONS_ALPHA_DURATION_MS
- / SCREENSHOT_ACTIONS_EXPANSION_DURATION_MS;
- mActionsContainer.setAlpha(0f);
- mActionsContainerBackground.setAlpha(0f);
- mActionsContainer.setVisibility(View.VISIBLE);
- mActionsContainerBackground.setVisibility(View.VISIBLE);
-
- animator.addListener(new AnimatorListenerAdapter() {
- @Override
- public void onAnimationCancel(Animator animation) {
- mInteractionJankMonitor.cancel(CUJ_TAKE_SCREENSHOT);
- }
-
- @Override
- public void onAnimationEnd(Animator animation) {
- mInteractionJankMonitor.end(CUJ_TAKE_SCREENSHOT);
- }
-
- @Override
- public void onAnimationStart(Animator animation) {
- InteractionJankMonitor.Configuration.Builder builder =
- InteractionJankMonitor.Configuration.Builder.withView(
- CUJ_TAKE_SCREENSHOT, mScreenshotStatic)
- .setTag("Actions")
- .setTimeout(SCREENSHOT_CORNER_DEFAULT_TIMEOUT_MILLIS);
- mInteractionJankMonitor.begin(builder);
- }
- });
-
- animator.addUpdateListener(animation -> {
- float t = animation.getAnimatedFraction();
- float containerAlpha = t < alphaFraction ? t / alphaFraction : 1;
- mActionsContainer.setAlpha(containerAlpha);
- mActionsContainerBackground.setAlpha(containerAlpha);
- float containerScale = SCREENSHOT_ACTIONS_START_SCALE_X
- + (t * (1 - SCREENSHOT_ACTIONS_START_SCALE_X));
- mActionsContainer.setScaleX(containerScale);
- mActionsContainerBackground.setScaleX(containerScale);
- for (OverlayActionChip chip : chips) {
- chip.setAlpha(t);
- chip.setScaleX(1 / containerScale); // invert to keep size of children constant
- }
- mActionsContainer.setScrollX(mDirectionLTR ? 0 : mActionsContainer.getWidth());
- mActionsContainer.setPivotX(mDirectionLTR ? 0 : mActionsContainer.getWidth());
- mActionsContainerBackground.setPivotX(
- mDirectionLTR ? 0 : mActionsContainerBackground.getWidth());
- });
- return animator;
- }
-
- void badgeScreenshot(@Nullable Drawable badge) {
- mScreenshotBadge.setImageDrawable(badge);
- mScreenshotBadge.setVisibility(badge != null ? View.VISIBLE : View.GONE);
- }
-
- void setChipIntents(ScreenshotController.SavedImageData imageData) {
- mShareChip.setOnClickListener(v -> {
- mUiEventLogger.log(ScreenshotEvent.SCREENSHOT_SHARE_TAPPED, 0, mPackageName);
- prepareSharedTransition();
-
- Intent shareIntent = ActionIntentCreator.INSTANCE.createShareWithSubject(
- imageData.uri, imageData.subject);
- mCallbacks.onAction(shareIntent, imageData.owner, false);
-
- });
- mEditChip.setOnClickListener(v -> {
- mUiEventLogger.log(ScreenshotEvent.SCREENSHOT_EDIT_TAPPED, 0, mPackageName);
- prepareSharedTransition();
- mCallbacks.onAction(
- ActionIntentCreator.INSTANCE.createEdit(imageData.uri, mContext),
- imageData.owner, true);
- });
- mScreenshotPreview.setOnClickListener(v -> {
- mUiEventLogger.log(ScreenshotEvent.SCREENSHOT_PREVIEW_TAPPED, 0, mPackageName);
- prepareSharedTransition();
- mCallbacks.onAction(
- ActionIntentCreator.INSTANCE.createEdit(imageData.uri, mContext),
- imageData.owner, true);
- });
- if (mQuickShareChip != null) {
- if (imageData.quickShareAction != null) {
- mQuickShareChip.setPendingIntent(imageData.quickShareAction.actionIntent,
- () -> {
- mUiEventLogger.log(
- ScreenshotEvent.SCREENSHOT_SMART_ACTION_TAPPED, 0,
- mPackageName);
- animateDismissal();
- });
- } else {
- // hide chip and unset pending interaction if necessary, since we don't actually
- // have a useable quick share intent
- Log.wtf(TAG, "Showed quick share chip, but quick share intent was null");
- if (mPendingInteraction == PendingInteraction.QUICK_SHARE) {
- mPendingInteraction = null;
- }
- mQuickShareChip.setVisibility(GONE);
- }
- }
-
- if (mPendingInteraction != null) {
- switch (mPendingInteraction) {
- case PREVIEW:
- mScreenshotPreview.callOnClick();
- break;
- case SHARE:
- mShareChip.callOnClick();
- break;
- case EDIT:
- mEditChip.callOnClick();
- break;
- case QUICK_SHARE:
- mQuickShareChip.callOnClick();
- break;
- }
- } else {
- LayoutInflater inflater = LayoutInflater.from(mContext);
-
- for (Notification.Action smartAction : imageData.smartActions) {
- OverlayActionChip actionChip = (OverlayActionChip) inflater.inflate(
- R.layout.overlay_action_chip, mActionsView, false);
- actionChip.setText(smartAction.title);
- actionChip.setIcon(smartAction.getIcon(), false);
- actionChip.setPendingIntent(smartAction.actionIntent,
- () -> {
- mUiEventLogger.log(ScreenshotEvent.SCREENSHOT_SMART_ACTION_TAPPED,
- 0, mPackageName);
- animateDismissal();
- });
- actionChip.setAlpha(1);
- mActionsView.addView(actionChip, mActionsView.getChildCount() - 1);
- mSmartChips.add(actionChip);
- }
- }
- }
-
- void addQuickShareChip(Notification.Action quickShareAction) {
- if (mQuickShareChip != null) {
- mSmartChips.remove(mQuickShareChip);
- mActionsView.removeView(mQuickShareChip);
- }
- if (mPendingInteraction == PendingInteraction.QUICK_SHARE) {
- mPendingInteraction = null;
- }
- if (mPendingInteraction == null) {
- LayoutInflater inflater = LayoutInflater.from(mContext);
- mQuickShareChip = (OverlayActionChip) inflater.inflate(
- R.layout.overlay_action_chip, mActionsView, false);
- mQuickShareChip.setText(quickShareAction.title);
- mQuickShareChip.setIcon(quickShareAction.getIcon(), false);
- mQuickShareChip.setOnClickListener(v -> {
- mShareChip.setIsPending(false);
- mEditChip.setIsPending(false);
- mQuickShareChip.setIsPending(true);
- mPendingInteraction = PendingInteraction.QUICK_SHARE;
- });
- mQuickShareChip.setAlpha(1);
- mActionsView.addView(mQuickShareChip);
- mSmartChips.add(mQuickShareChip);
- }
- }
-
- private Rect scrollableAreaOnScreen(ScrollCaptureResponse response) {
- Rect r = new Rect(response.getBoundsInWindow());
- Rect windowInScreen = response.getWindowBounds();
- r.offset(windowInScreen.left, windowInScreen.top);
- r.intersect(new Rect(0, 0, mDisplayMetrics.widthPixels, mDisplayMetrics.heightPixels));
- return r;
- }
-
- void startLongScreenshotTransition(Rect destination, Runnable onTransitionEnd,
- ScrollCaptureController.LongScreenshot longScreenshot) {
- mPendingSharedTransition = true;
- AnimatorSet animSet = new AnimatorSet();
-
- ValueAnimator scrimAnim = ValueAnimator.ofFloat(0, 1);
- scrimAnim.addUpdateListener(animation ->
- mScrollingScrim.setAlpha(1 - animation.getAnimatedFraction()));
-
- if (mShowScrollablePreview) {
- mScrollablePreview.setImageBitmap(longScreenshot.toBitmap());
- float startX = mScrollablePreview.getX();
- float startY = mScrollablePreview.getY();
- int[] locInScreen = mScrollablePreview.getLocationOnScreen();
- destination.offset((int) startX - locInScreen[0], (int) startY - locInScreen[1]);
- mScrollablePreview.setPivotX(0);
- mScrollablePreview.setPivotY(0);
- mScrollablePreview.setAlpha(1f);
- float currentScale = mScrollablePreview.getWidth() / (float) longScreenshot.getWidth();
- Matrix matrix = new Matrix();
- matrix.setScale(currentScale, currentScale);
- matrix.postTranslate(
- longScreenshot.getLeft() * currentScale,
- longScreenshot.getTop() * currentScale);
- mScrollablePreview.setImageMatrix(matrix);
- float destinationScale = destination.width() / (float) mScrollablePreview.getWidth();
-
- ValueAnimator previewAnim = ValueAnimator.ofFloat(0, 1);
- previewAnim.addUpdateListener(animation -> {
- float t = animation.getAnimatedFraction();
- float currScale = MathUtils.lerp(1, destinationScale, t);
- mScrollablePreview.setScaleX(currScale);
- mScrollablePreview.setScaleY(currScale);
- mScrollablePreview.setX(MathUtils.lerp(startX, destination.left, t));
- mScrollablePreview.setY(MathUtils.lerp(startY, destination.top, t));
- });
- ValueAnimator previewFadeAnim = ValueAnimator.ofFloat(1, 0);
- previewFadeAnim.addUpdateListener(animation ->
- mScrollablePreview.setAlpha(1 - animation.getAnimatedFraction()));
- animSet.play(previewAnim).with(scrimAnim).before(previewFadeAnim);
- previewAnim.addListener(new AnimatorListenerAdapter() {
- @Override
- public void onAnimationEnd(Animator animation) {
- super.onAnimationEnd(animation);
- onTransitionEnd.run();
- }
- });
- } else {
- // if we switched orientations between the original screenshot and the long screenshot
- // capture, just fade out the scrim instead of running the preview animation
- animSet.play(scrimAnim);
- animSet.addListener(new AnimatorListenerAdapter() {
- @Override
- public void onAnimationEnd(Animator animation) {
- super.onAnimationEnd(animation);
- onTransitionEnd.run();
- }
- });
- }
- animSet.addListener(new AnimatorListenerAdapter() {
- @Override
- public void onAnimationEnd(Animator animation) {
- super.onAnimationEnd(animation);
- mCallbacks.onDismiss();
- }
- });
- animSet.start();
- }
-
- void prepareScrollingTransition(ScrollCaptureResponse response, Bitmap screenBitmap,
- Bitmap newBitmap, boolean screenshotTakenInPortrait) {
- mShowScrollablePreview = (screenshotTakenInPortrait == mOrientationPortrait);
-
- mScrollingScrim.setImageBitmap(newBitmap);
- mScrollingScrim.setVisibility(View.VISIBLE);
-
- if (mShowScrollablePreview) {
- Rect scrollableArea = scrollableAreaOnScreen(response);
-
- float scale = mFixedSize
- / (mOrientationPortrait ? screenBitmap.getWidth() : screenBitmap.getHeight());
- ConstraintLayout.LayoutParams params =
- (ConstraintLayout.LayoutParams) mScrollablePreview.getLayoutParams();
-
- params.width = (int) (scale * scrollableArea.width());
- params.height = (int) (scale * scrollableArea.height());
- Matrix matrix = new Matrix();
- matrix.setScale(scale, scale);
- matrix.postTranslate(-scrollableArea.left * scale, -scrollableArea.top * scale);
-
- mScrollablePreview.setTranslationX(scale
- * (mDirectionLTR ? scrollableArea.left : scrollableArea.right - getWidth()));
- mScrollablePreview.setTranslationY(scale * scrollableArea.top);
- mScrollablePreview.setImageMatrix(matrix);
- mScrollablePreview.setImageBitmap(screenBitmap);
- mScrollablePreview.setVisibility(View.VISIBLE);
- }
- mDismissButton.setVisibility(View.GONE);
- mActionsContainer.setVisibility(View.GONE);
- // set these invisible, but not gone, so that the views are laid out correctly
- mActionsContainerBackground.setVisibility(View.INVISIBLE);
- mScreenshotPreviewBorder.setVisibility(View.INVISIBLE);
- mScreenshotPreview.setVisibility(View.INVISIBLE);
- mScrollingScrim.setImageTintBlendMode(BlendMode.SRC_ATOP);
- ValueAnimator anim = ValueAnimator.ofFloat(0, .3f);
- anim.addUpdateListener(animation -> mScrollingScrim.setImageTintList(
- ColorStateList.valueOf(Color.argb((float) animation.getAnimatedValue(), 0, 0, 0))));
- anim.setDuration(200);
- anim.start();
- }
-
- void restoreNonScrollingUi() {
- mScrollChip.setVisibility(View.GONE);
- mScrollablePreview.setVisibility(View.GONE);
- mScrollingScrim.setVisibility(View.GONE);
-
- if (mAccessibilityManager.isEnabled()) {
- mDismissButton.setVisibility(View.VISIBLE);
- }
- mActionsContainer.setVisibility(View.VISIBLE);
- mActionsContainerBackground.setVisibility(View.VISIBLE);
- mScreenshotPreviewBorder.setVisibility(View.VISIBLE);
- mScreenshotPreview.setVisibility(View.VISIBLE);
- // reset the timeout
- mCallbacks.onUserInteraction();
- }
-
- boolean isDismissing() {
- return mScreenshotStatic.isDismissing();
- }
-
- boolean isPendingSharedTransition() {
- return mPendingSharedTransition;
- }
-
- void animateDismissal() {
- mScreenshotStatic.dismiss();
- }
-
- void reset() {
- if (DEBUG_UI) {
- Log.d(TAG, "reset screenshot view");
- }
- mScreenshotStatic.cancelDismissal();
- if (DEBUG_WINDOW) {
- Log.d(TAG, "removing OnComputeInternalInsetsListener");
- }
- // Make sure we clean up the view tree observer
- getViewTreeObserver().removeOnComputeInternalInsetsListener(this);
- // Clear any references to the bitmap
- mScreenshotPreview.setImageDrawable(null);
- mScreenshotPreview.setVisibility(View.INVISIBLE);
- mScreenshotPreview.setAlpha(1f);
- mScreenshotPreviewBorder.setAlpha(0);
- mScreenshotBadge.setAlpha(0f);
- mScreenshotBadge.setVisibility(View.GONE);
- mScreenshotBadge.setImageDrawable(null);
- mPendingSharedTransition = false;
- mActionsContainerBackground.setVisibility(View.INVISIBLE);
- mActionsContainer.setVisibility(View.GONE);
- mDismissButton.setVisibility(View.GONE);
- mScrollingScrim.setVisibility(View.GONE);
- mScrollablePreview.setVisibility(View.GONE);
- mScreenshotStatic.setTranslationX(0);
- mScreenshotPreview.setContentDescription(
- mContext.getResources().getString(R.string.screenshot_preview_description));
- mScreenshotPreview.setOnClickListener(null);
- mShareChip.setOnClickListener(null);
- mScrollingScrim.setVisibility(View.GONE);
- mEditChip.setOnClickListener(null);
- mShareChip.setIsPending(false);
- mEditChip.setIsPending(false);
- mPendingInteraction = null;
- for (OverlayActionChip chip : mSmartChips) {
- mActionsView.removeView(chip);
- }
- mSmartChips.clear();
- mQuickShareChip = null;
- setAlpha(1);
- mScreenshotStatic.setAlpha(1);
- mScreenshotData = null;
- }
-
- private void prepareSharedTransition() {
- mPendingSharedTransition = true;
- // fade out non-preview UI
- createScreenshotFadeDismissAnimation().start();
- }
-
- ValueAnimator createScreenshotFadeDismissAnimation() {
- ValueAnimator alphaAnim = ValueAnimator.ofFloat(0, 1);
- alphaAnim.addUpdateListener(animation -> {
- float alpha = 1 - animation.getAnimatedFraction();
- mDismissButton.setAlpha(alpha);
- mActionsContainerBackground.setAlpha(alpha);
- mActionsContainer.setAlpha(alpha);
- mScreenshotPreviewBorder.setAlpha(alpha);
- mScreenshotBadge.setAlpha(alpha);
- });
- alphaAnim.setDuration(600);
- return alphaAnim;
- }
-
- /**
- * Create a drawable using the size of the bitmap and insets as the fractional inset parameters.
- */
- private static Drawable createScreenDrawable(Resources res, Bitmap bitmap, Insets insets) {
- int insettedWidth = bitmap.getWidth() - insets.left - insets.right;
- int insettedHeight = bitmap.getHeight() - insets.top - insets.bottom;
-
- BitmapDrawable bitmapDrawable = new BitmapDrawable(res, bitmap);
- if (insettedHeight == 0 || insettedWidth == 0 || bitmap.getWidth() == 0
- || bitmap.getHeight() == 0) {
- Log.e(TAG, "Can't create inset drawable, using 0 insets bitmap and insets create "
- + "degenerate region: " + bitmap.getWidth() + "x" + bitmap.getHeight() + " "
- + bitmapDrawable);
- return bitmapDrawable;
- }
-
- InsetDrawable insetDrawable = new InsetDrawable(bitmapDrawable,
- -1f * insets.left / insettedWidth,
- -1f * insets.top / insettedHeight,
- -1f * insets.right / insettedWidth,
- -1f * insets.bottom / insettedHeight);
-
- if (insets.left < 0 || insets.top < 0 || insets.right < 0 || insets.bottom < 0) {
- // Are any of the insets negative, meaning the bitmap is smaller than the bounds so need
- // to fill in the background of the drawable.
- return new LayerDrawable(new Drawable[]{
- new ColorDrawable(Color.BLACK), insetDrawable});
- } else {
- return insetDrawable;
- }
- }
-}
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotViewProxy.kt b/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotViewProxy.kt
deleted file mode 100644
index df93a5e56c22..000000000000
--- a/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotViewProxy.kt
+++ /dev/null
@@ -1,76 +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.systemui.screenshot
-
-import android.animation.Animator
-import android.app.Notification
-import android.content.Context
-import android.graphics.Bitmap
-import android.graphics.Rect
-import android.view.ScrollCaptureResponse
-import android.view.View
-import android.view.ViewGroup
-import android.view.WindowInsets
-import com.android.systemui.screenshot.scroll.ScrollCaptureController
-
-/** Abstraction of the surface between ScreenshotController and ScreenshotView */
-interface ScreenshotViewProxy {
- val view: ViewGroup
- val screenshotPreview: View
-
- var packageName: String
- var callbacks: ScreenshotView.ScreenshotViewCallback?
- var screenshot: ScreenshotData?
-
- val isAttachedToWindow: Boolean
- val isDismissing: Boolean
- val isPendingSharedTransition: Boolean
-
- fun reset()
- fun updateInsets(insets: WindowInsets)
- fun updateOrientation(insets: WindowInsets)
- fun createScreenshotDropInAnimation(screenRect: Rect, showFlash: Boolean): Animator
- fun addQuickShareChip(quickShareAction: Notification.Action)
- fun setChipIntents(imageData: ScreenshotController.SavedImageData)
- fun requestDismissal(event: ScreenshotEvent?)
-
- fun showScrollChip(packageName: String, onClick: Runnable)
- fun hideScrollChip()
- fun prepareScrollingTransition(
- response: ScrollCaptureResponse,
- screenBitmap: Bitmap,
- newScreenshot: Bitmap,
- screenshotTakenInPortrait: Boolean,
- onTransitionPrepared: Runnable,
- )
- fun startLongScreenshotTransition(
- transitionDestination: Rect,
- onTransitionEnd: Runnable,
- longScreenshot: ScrollCaptureController.LongScreenshot
- )
- fun restoreNonScrollingUi()
- fun fadeForSharedTransition()
-
- fun stopInputListening()
- fun requestFocus()
- fun announceForAccessibility(string: String)
- fun prepareEntranceAnimation(runnable: Runnable)
-
- interface Factory {
- fun getProxy(context: Context, displayId: Int): ScreenshotViewProxy
- }
-}
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/TakeScreenshotExecutor.kt b/packages/SystemUI/src/com/android/systemui/screenshot/TakeScreenshotExecutor.kt
index 2699657847b9..07f6e85cfad8 100644
--- a/packages/SystemUI/src/com/android/systemui/screenshot/TakeScreenshotExecutor.kt
+++ b/packages/SystemUI/src/com/android/systemui/screenshot/TakeScreenshotExecutor.kt
@@ -219,7 +219,7 @@ constructor(
}
private fun getScreenshotController(display: Display): ScreenshotController {
- val controller = screenshotController ?: screenshotControllerFactory.create(display, false)
+ val controller = screenshotController ?: screenshotControllerFactory.create(display)
screenshotController = controller
return controller
}
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/appclips/AppClipsViewModel.java b/packages/SystemUI/src/com/android/systemui/screenshot/appclips/AppClipsViewModel.java
index 8c833eccb1fb..bd9e295b58f8 100644
--- a/packages/SystemUI/src/com/android/systemui/screenshot/appclips/AppClipsViewModel.java
+++ b/packages/SystemUI/src/com/android/systemui/screenshot/appclips/AppClipsViewModel.java
@@ -33,6 +33,7 @@ import android.content.ClipData;
import android.content.ComponentName;
import android.content.Intent;
import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
import android.graphics.Bitmap;
import android.graphics.HardwareRenderer;
import android.graphics.RecordingCanvas;
@@ -267,6 +268,8 @@ final class AppClipsViewModel extends ViewModel {
}
private boolean canAppStartThroughLauncher(String packageName) {
+ // Use Intent.resolveActivity API to check if the intent resolves as that is what Android
+ // uses internally when apps use Context.startActivity.
return getMainLauncherIntentForPackage(packageName).resolveActivity(mPackageManager)
!= null;
}
@@ -366,10 +369,19 @@ final class AppClipsViewModel extends ViewModel {
return taskInfo.topActivityInfo.loadLabel(mPackageManager).toString();
}
- private Intent getMainLauncherIntentForPackage(String packageName) {
- return new Intent(ACTION_MAIN)
- .addCategory(CATEGORY_LAUNCHER)
- .setPackage(packageName);
+ private Intent getMainLauncherIntentForPackage(String pkgName) {
+ Intent intent = new Intent(ACTION_MAIN).addCategory(CATEGORY_LAUNCHER).setPackage(pkgName);
+
+ // Not all apps use DEFAULT_CATEGORY for their main launcher activity so the exact component
+ // needs to be queried and set on the Intent in order for note-taking apps to be able to
+ // start this intent. When starting an activity with an implicit intent, Android adds the
+ // DEFAULT_CATEGORY flag otherwise it fails to resolve the intent.
+ ResolveInfo resolvedActivity = mPackageManager.resolveActivity(intent, /* flags= */ 0);
+ if (resolvedActivity != null) {
+ intent.setComponent(resolvedActivity.getComponentInfo().getComponentName());
+ }
+
+ return intent;
}
/** Helper factory to help with injecting {@link AppClipsViewModel}. */
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/dagger/ScreenshotModule.java b/packages/SystemUI/src/com/android/systemui/screenshot/dagger/ScreenshotModule.java
index 8235325fffad..682f848bfaad 100644
--- a/packages/SystemUI/src/com/android/systemui/screenshot/dagger/ScreenshotModule.java
+++ b/packages/SystemUI/src/com/android/systemui/screenshot/dagger/ScreenshotModule.java
@@ -16,23 +16,18 @@
package com.android.systemui.screenshot.dagger;
-import static com.android.systemui.Flags.screenshotShelfUi2;
-
import android.app.Service;
import android.view.accessibility.AccessibilityManager;
import com.android.systemui.dagger.SysUISingleton;
import com.android.systemui.screenshot.ImageCapture;
import com.android.systemui.screenshot.ImageCaptureImpl;
-import com.android.systemui.screenshot.LegacyScreenshotViewProxy;
import com.android.systemui.screenshot.ScreenshotPolicy;
import com.android.systemui.screenshot.ScreenshotPolicyImpl;
-import com.android.systemui.screenshot.ScreenshotShelfViewProxy;
import com.android.systemui.screenshot.ScreenshotSoundController;
import com.android.systemui.screenshot.ScreenshotSoundControllerImpl;
import com.android.systemui.screenshot.ScreenshotSoundProvider;
import com.android.systemui.screenshot.ScreenshotSoundProviderImpl;
-import com.android.systemui.screenshot.ScreenshotViewProxy;
import com.android.systemui.screenshot.TakeScreenshotExecutor;
import com.android.systemui.screenshot.TakeScreenshotExecutorImpl;
import com.android.systemui.screenshot.TakeScreenshotService;
@@ -95,15 +90,4 @@ public abstract class ScreenshotModule {
AccessibilityManager accessibilityManager) {
return new ScreenshotViewModel(accessibilityManager);
}
-
- @Provides
- static ScreenshotViewProxy.Factory providesScreenshotViewProxyFactory(
- ScreenshotShelfViewProxy.Factory shelfScreenshotViewProxyFactory,
- LegacyScreenshotViewProxy.Factory legacyScreenshotViewProxyFactory) {
- if (screenshotShelfUi2()) {
- return shelfScreenshotViewProxyFactory;
- } else {
- return legacyScreenshotViewProxyFactory;
- }
- }
}
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/policy/PolicyRequestProcessor.kt b/packages/SystemUI/src/com/android/systemui/screenshot/policy/PolicyRequestProcessor.kt
index 4f27b9e4dbf0..b3d5c9e9691c 100644
--- a/packages/SystemUI/src/com/android/systemui/screenshot/policy/PolicyRequestProcessor.kt
+++ b/packages/SystemUI/src/com/android/systemui/screenshot/policy/PolicyRequestProcessor.kt
@@ -99,7 +99,7 @@ class PolicyRequestProcessor(
original,
updates.component,
updates.owner,
- type.displayId
+ type.displayId,
)
}
return updated
@@ -120,6 +120,7 @@ class PolicyRequestProcessor(
return replaceWithScreenshot(
original = original,
componentName = topMainRootTask?.topActivity ?: defaultComponent,
+ taskId = topMainRootTask?.taskId,
owner = defaultOwner,
displayId = original.displayId
)
@@ -144,11 +145,12 @@ class PolicyRequestProcessor(
)
}
- suspend fun replaceWithScreenshot(
+ private suspend fun replaceWithScreenshot(
original: ScreenshotData,
componentName: ComponentName?,
owner: UserHandle?,
displayId: Int,
+ taskId: Int? = null,
): ScreenshotData {
Log.i(TAG, "Capturing screenshot: $componentName / $owner")
val screenshot = captureDisplay(displayId)
@@ -157,7 +159,8 @@ class PolicyRequestProcessor(
bitmap = screenshot,
userHandle = owner,
topComponent = componentName,
- screenBounds = Rect(0, 0, screenshot?.width ?: 0, screenshot?.height ?: 0)
+ screenBounds = Rect(0, 0, screenshot?.width ?: 0, screenshot?.height ?: 0),
+ taskId = taskId ?: -1,
)
}
diff --git a/packages/SystemUI/src/com/android/systemui/settings/brightness/BrightnessController.java b/packages/SystemUI/src/com/android/systemui/settings/brightness/BrightnessController.java
index 498107624f9b..8e539499cb14 100644
--- a/packages/SystemUI/src/com/android/systemui/settings/brightness/BrightnessController.java
+++ b/packages/SystemUI/src/com/android/systemui/settings/brightness/BrightnessController.java
@@ -137,14 +137,24 @@ public class BrightnessController implements ToggleSlider.Listener, MirroredBrig
public void startObserving() {
if (!mObserving) {
mObserving = true;
- mSecureSettings.registerContentObserverForUserSync(
- BRIGHTNESS_MODE_URI,
- false, this, UserHandle.USER_ALL);
+ if (Flags.registerContentObserversAsync()) {
+ mSecureSettings.registerContentObserverForUserAsync(
+ BRIGHTNESS_MODE_URI,
+ false, this, UserHandle.USER_ALL);
+ } else {
+ mSecureSettings.registerContentObserverForUserSync(
+ BRIGHTNESS_MODE_URI,
+ false, this, UserHandle.USER_ALL);
+ }
}
}
public void stopObserving() {
- mSecureSettings.unregisterContentObserverSync(this);
+ if (Flags.registerContentObserversAsync()) {
+ mSecureSettings.unregisterContentObserverAsync(this);
+ } else {
+ mSecureSettings.unregisterContentObserverSync(this);
+ }
mObserving = false;
}
diff --git a/packages/SystemUI/src/com/android/systemui/shade/GlanceableHubContainerController.kt b/packages/SystemUI/src/com/android/systemui/shade/GlanceableHubContainerController.kt
index d870fe69463d..b468d0e75a7a 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/GlanceableHubContainerController.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/GlanceableHubContainerController.kt
@@ -50,19 +50,21 @@ import com.android.systemui.communal.ui.viewmodel.CommunalViewModel
import com.android.systemui.communal.util.CommunalColors
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.keyguard.domain.interactor.KeyguardInteractor
+import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor
+import com.android.systemui.keyguard.shared.model.Edge
+import com.android.systemui.keyguard.shared.model.KeyguardState
import com.android.systemui.lifecycle.repeatWhenAttached
import com.android.systemui.res.R
import com.android.systemui.scene.shared.flag.SceneContainerFlag
import com.android.systemui.scene.shared.model.SceneDataSourceDelegator
import com.android.systemui.shade.domain.interactor.ShadeInteractor
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController
-import com.android.systemui.util.kotlin.BooleanFlowOperators.allOf
import com.android.systemui.util.kotlin.BooleanFlowOperators.anyOf
-import com.android.systemui.util.kotlin.BooleanFlowOperators.not
import com.android.systemui.util.kotlin.collectFlow
import java.util.function.Consumer
import javax.inject.Inject
import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.combine
import kotlinx.coroutines.launch
/**
@@ -77,6 +79,7 @@ constructor(
private val communalInteractor: CommunalInteractor,
private val communalViewModel: CommunalViewModel,
private val keyguardInteractor: KeyguardInteractor,
+ private val keyguardTransitionInteractor: KeyguardTransitionInteractor,
private val shadeInteractor: ShadeInteractor,
private val powerManager: PowerManager,
private val communalColors: CommunalColors,
@@ -149,6 +152,19 @@ constructor(
private var hubShowing = false
/**
+ * True if we're transitioning to or from edit mode
+ *
+ * We block all touches and gestures when edit mode is open to prevent funky transition issues
+ * when entering and exiting edit mode because we delay exiting the hub scene when entering edit
+ * mode and enter the hub scene early when exiting edit mode to make for a smoother transition.
+ * Gestures during these transitions can result in broken and unexpected UI states.
+ *
+ * Tracks [CommunalInteractor.editActivityShowing] and the [KeyguardState.GONE] to
+ * [KeyguardState.GLANCEABLE_HUB] transition.
+ */
+ private var inEditModeTransition = false
+
+ /**
* True if either the primary or alternate bouncer are open, meaning the hub should not receive
* any touch input.
*/
@@ -165,7 +181,14 @@ constructor(
*
* Based on [ShadeInteractor.isAnyFullyExpanded] and [ShadeInteractor.isUserInteracting].
*/
- private var shadeShowing = false
+ private var shadeShowingAndConsumingTouches = false
+
+ /**
+ * True if the shade ever fully expands and the user isn't interacting with it (aka finger on
+ * screen dragging). In this case, the shade should handle all touch events until it has fully
+ * collapsed.
+ */
+ private var userNotInteractiveAtShadeFullyExpanded = false
/**
* True if the device is dreaming, in which case we shouldn't do anything for top/bottom swipes
@@ -317,9 +340,41 @@ constructor(
)
collectFlow(
containerView,
- allOf(shadeInteractor.isAnyFullyExpanded, not(shadeInteractor.isUserInteracting)),
+ // When leaving edit mode, editActivityShowing is true until the edit mode activity
+ // finishes itself and the device locks, after which isInTransition will be true until
+ // we're fully on the hub.
+ anyOf(
+ communalInteractor.editActivityShowing,
+ keyguardTransitionInteractor.isInTransition(
+ Edge.create(KeyguardState.GONE, KeyguardState.GLANCEABLE_HUB)
+ )
+ ),
{
- shadeShowing = it
+ inEditModeTransition = it
+ updateTouchHandlingState()
+ }
+ )
+ collectFlow(
+ containerView,
+ combine(
+ shadeInteractor.isAnyFullyExpanded,
+ shadeInteractor.isUserInteracting,
+ shadeInteractor.isShadeFullyCollapsed,
+ ::Triple
+ ),
+ { (isFullyExpanded, isUserInteracting, isShadeFullyCollapsed) ->
+ val expandedAndNotInteractive = isFullyExpanded && !isUserInteracting
+
+ // If we ever are fully expanded and not interacting, capture this state as we
+ // should not handle touches until we fully collapse again
+ userNotInteractiveAtShadeFullyExpanded =
+ !isShadeFullyCollapsed &&
+ (userNotInteractiveAtShadeFullyExpanded || expandedAndNotInteractive)
+
+ // If the shade reaches full expansion without interaction, then we should allow it
+ // to consume touches rather than handling it here until it disappears.
+ shadeShowingAndConsumingTouches =
+ userNotInteractiveAtShadeFullyExpanded || expandedAndNotInteractive
updateTouchHandlingState()
}
)
@@ -337,7 +392,11 @@ constructor(
* Also clears gesture exclusion zones when the hub is occluded or gone.
*/
private fun updateTouchHandlingState() {
- val shouldInterceptGestures = hubShowing && !(shadeShowing || anyBouncerShowing)
+ // Only listen to gestures when we're settled in the hub keyguard state and the shade
+ // bouncer are not showing on top.
+ val shouldInterceptGestures =
+ hubShowing &&
+ !(shadeShowingAndConsumingTouches || anyBouncerShowing || inEditModeTransition)
if (shouldInterceptGestures) {
lifecycleRegistry.currentState = Lifecycle.State.RESUMED
} else {
@@ -389,17 +448,18 @@ constructor(
return false
}
- return communalContainerView?.let { handleTouchEventOnCommunalView(it, ev) } ?: false
+ return communalContainerView?.let { handleTouchEventOnCommunalView(ev) } ?: false
}
- private fun handleTouchEventOnCommunalView(view: View, ev: MotionEvent): Boolean {
+ private fun handleTouchEventOnCommunalView(ev: MotionEvent): Boolean {
val isDown = ev.actionMasked == MotionEvent.ACTION_DOWN
val isUp = ev.actionMasked == MotionEvent.ACTION_UP
+ val isMove = ev.actionMasked == MotionEvent.ACTION_MOVE
val isCancel = ev.actionMasked == MotionEvent.ACTION_CANCEL
- val hubOccluded = anyBouncerShowing || shadeShowing
+ val hubOccluded = anyBouncerShowing || shadeShowingAndConsumingTouches
- if (isDown && !hubOccluded) {
+ if ((isDown || isMove) && !hubOccluded) {
isTrackingHubTouch = true
}
@@ -407,7 +467,7 @@ constructor(
if (isUp || isCancel) {
isTrackingHubTouch = false
}
- return dispatchTouchEvent(view, ev)
+ return dispatchTouchEvent(ev)
}
return false
@@ -417,7 +477,14 @@ constructor(
* Dispatches the touch event to the communal container and sends a user activity event to reset
* the screen timeout.
*/
- private fun dispatchTouchEvent(view: View, ev: MotionEvent): Boolean {
+ private fun dispatchTouchEvent(ev: MotionEvent): Boolean {
+ if (inEditModeTransition) {
+ // Consume but ignore touches while we're transitioning to or from edit mode so that the
+ // user can't trigger another transition, such as by swiping the hub away, tapping a
+ // widget, or opening the shade/bouncer. Doing any of these while transitioning can
+ // result in broken states.
+ return true
+ }
try {
var handled = false
communalContainerWrapper?.dispatchTouchEvent(ev) {
diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
index 04de2c220a6b..c1caeed05cb6 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
+++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
@@ -1774,8 +1774,9 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
// the small clock here
// With migrateClocksToBlueprint, weather clock will have behaviors similar to other clocks
if (!MigrateClocksToBlueprint.isEnabled()) {
+ boolean bypassEnabled = mKeyguardBypassController.getBypassEnabled();
if (mKeyguardStatusViewController.isLargeClockBlockingNotificationShelf()
- && hasVisibleNotifications() && isOnAod()) {
+ && hasVisibleNotifications() && (isOnAod() || bypassEnabled)) {
return SMALL;
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/shade/QuickSettingsControllerImpl.java b/packages/SystemUI/src/com/android/systemui/shade/QuickSettingsControllerImpl.java
index 4f6a64f043d2..bd0868530cba 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/QuickSettingsControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/shade/QuickSettingsControllerImpl.java
@@ -1265,20 +1265,20 @@ public class QuickSettingsControllerImpl implements QuickSettingsController, Dum
mTranslationForFullShadeTransition = qsTranslation;
updateQsFrameTranslation();
float currentTranslation = mQsFrame.getTranslationY();
- int clipTop = mEnableClipping
- ? (int) (top - currentTranslation - mQsFrame.getTop()) : 0;
- int clipBottom = mEnableClipping
- ? (int) (bottom - currentTranslation - mQsFrame.getTop()) : 0;
+ int clipTop = (int) (top - currentTranslation - mQsFrame.getTop());
+ int clipBottom = (int) (bottom - currentTranslation - mQsFrame.getTop());
mVisible = qsVisible;
mQs.setQsVisible(qsVisible);
- mQs.setFancyClipping(
- mDisplayLeftInset,
- clipTop,
- mDisplayRightInset,
- clipBottom,
- radius,
- qsVisible && !mSplitShadeEnabled,
- mIsFullWidth);
+ if (mEnableClipping) {
+ mQs.setFancyClipping(
+ mDisplayLeftInset,
+ clipTop,
+ mDisplayRightInset,
+ clipBottom,
+ radius,
+ qsVisible && !mSplitShadeEnabled,
+ mIsFullWidth);
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeControllerSceneImpl.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeControllerSceneImpl.kt
index 5065baa04623..23e2620ac6d6 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/ShadeControllerSceneImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeControllerSceneImpl.kt
@@ -76,7 +76,7 @@ constructor(
scope.launch {
shadeInteractor.isAnyExpanded.collect {
if (!it) {
- runPostCollapseActions()
+ withContext(mainDispatcher) { runPostCollapseActions() }
}
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/shade/data/repository/ShadeRepository.kt b/packages/SystemUI/src/com/android/systemui/shade/data/repository/ShadeRepository.kt
index 4d43ad52019a..a4fed873362b 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/data/repository/ShadeRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/data/repository/ShadeRepository.kt
@@ -19,8 +19,6 @@ import android.content.Context
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.res.R
-import com.android.systemui.shade.shared.flag.DualShade
-import com.android.systemui.shade.shared.model.ShadeMode
import javax.inject.Inject
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
@@ -105,18 +103,26 @@ interface ShadeRepository {
@Deprecated("Use ShadeInteractor.isQsBypassingShade instead")
val legacyExpandImmediate: StateFlow<Boolean>
- val shadeMode: StateFlow<ShadeMode>
-
/** Whether dual shade should be aligned to the bottom (true) or to the top (false). */
val isDualShadeAlignedToBottom: Boolean
+ /**
+ * Whether the shade layout should be wide (true) or narrow (false).
+ *
+ * In a wide layout, notifications and quick settings each take up only half the screen width
+ * (whether they are shown at the same time or not). In a narrow layout, they can each be as
+ * wide as the entire screen.
+ */
+ val isShadeLayoutWide: StateFlow<Boolean>
+
/** True when QS is taking up the entire screen, i.e. fully expanded on a non-unfolded phone. */
@Deprecated("Use ShadeInteractor instead") val legacyQsFullscreen: StateFlow<Boolean>
/** NPVC.mClosing as a flow. */
@Deprecated("Use ShadeAnimationInteractor instead") val legacyIsClosing: StateFlow<Boolean>
- fun setShadeMode(mode: ShadeMode)
+ /** Sets whether the shade layout should be wide (true) or narrow (false). */
+ fun setShadeLayoutWide(isShadeLayoutWide: Boolean)
/** Sets whether a closing animation is happening. */
@Deprecated("Use ShadeAnimationInteractor instead") fun setLegacyIsClosing(isClosing: Boolean)
@@ -183,6 +189,7 @@ interface ShadeRepository {
class ShadeRepositoryImpl @Inject constructor(@Application applicationContext: Context) :
ShadeRepository {
private val _qsExpansion = MutableStateFlow(0f)
+ @Deprecated("Use ShadeInteractor.qsExpansion instead")
override val qsExpansion: StateFlow<Float> = _qsExpansion.asStateFlow()
private val _lockscreenShadeExpansion = MutableStateFlow(0f)
@@ -204,6 +211,7 @@ class ShadeRepositoryImpl @Inject constructor(@Application applicationContext: C
@Deprecated("Use ShadeInteractor instead")
override val legacyShadeTracking: StateFlow<Boolean> = _legacyShadeTracking.asStateFlow()
+ @Deprecated("Use ShadeInteractor.isUserInteractingWithShade instead")
override val legacyLockscreenShadeTracking = MutableStateFlow(false)
private val _legacyQsTracking = MutableStateFlow(false)
@@ -227,20 +235,22 @@ class ShadeRepositoryImpl @Inject constructor(@Application applicationContext: C
@Deprecated("Use ShadeInteractor instead")
override val legacyQsFullscreen: StateFlow<Boolean> = _legacyQsFullscreen.asStateFlow()
- val _shadeMode = MutableStateFlow(if (DualShade.isEnabled) ShadeMode.Dual else ShadeMode.Single)
- override val shadeMode: StateFlow<ShadeMode> = _shadeMode.asStateFlow()
+ private val _isShadeLayoutWide = MutableStateFlow(false)
+ override val isShadeLayoutWide: StateFlow<Boolean> = _isShadeLayoutWide.asStateFlow()
override val isDualShadeAlignedToBottom =
applicationContext.resources.getBoolean(R.bool.config_dualShadeAlignedToBottom)
- override fun setShadeMode(shadeMode: ShadeMode) {
- _shadeMode.value = shadeMode
+ override fun setShadeLayoutWide(isShadeLayoutWide: Boolean) {
+ _isShadeLayoutWide.value = isShadeLayoutWide
}
+ @Deprecated("Use ShadeInteractor instead")
override fun setLegacyQsFullscreen(legacyQsFullscreen: Boolean) {
_legacyQsFullscreen.value = legacyQsFullscreen
}
+ @Deprecated("Use ShadeInteractor instead")
override fun setLegacyExpandImmediate(legacyExpandImmediate: Boolean) {
_legacyExpandImmediate.value = legacyExpandImmediate
}
diff --git a/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractor.kt b/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractor.kt
index ef0a842ecc0c..45f359efbb7a 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractor.kt
@@ -52,9 +52,25 @@ interface ShadeInteractor : BaseShadeInteractor {
/** Are touches allowed on the notification panel? */
val isShadeTouchable: Flow<Boolean>
- /** Emits true if the shade can be expanded from QQS to QS and false otherwise. */
+ /** Whether the shade can be expanded from QQS to QS. */
val isExpandToQsEnabled: Flow<Boolean>
+ /**
+ * The version of the shade layout to use.
+ *
+ * Note: Most likely, you want to read [isShadeLayoutWide] instead of this.
+ */
+ val shadeMode: StateFlow<ShadeMode>
+
+ /**
+ * Whether the shade layout should be wide (true) or narrow (false).
+ *
+ * In a wide layout, notifications and quick settings each take up only half the screen width
+ * (whether they are shown at the same time or not). In a narrow layout, they can each be as
+ * wide as the entire screen.
+ */
+ val isShadeLayoutWide: StateFlow<Boolean>
+
/** How to align the shade content. */
val shadeAlignment: ShadeAlignment
}
@@ -113,8 +129,6 @@ interface BaseShadeInteractor {
* animating.
*/
val isUserInteractingWithQs: Flow<Boolean>
-
- val shadeMode: StateFlow<ShadeMode>
}
fun createAnyExpansionFlow(
diff --git a/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractorEmptyImpl.kt b/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractorEmptyImpl.kt
index 6226d077b135..e77aca93aeca 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractorEmptyImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractorEmptyImpl.kt
@@ -47,5 +47,6 @@ class ShadeInteractorEmptyImpl @Inject constructor() : ShadeInteractor {
override val isShadeTouchable: Flow<Boolean> = inactiveFlowBoolean
override val isExpandToQsEnabled: Flow<Boolean> = inactiveFlowBoolean
override val shadeMode: StateFlow<ShadeMode> = MutableStateFlow(ShadeMode.Single)
+ override val isShadeLayoutWide: StateFlow<Boolean> = inactiveFlowBoolean
override val shadeAlignment: ShadeAlignment = ShadeAlignment.Top
}
diff --git a/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractorImpl.kt b/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractorImpl.kt
index 55f019b01164..684a4845144e 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractorImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractorImpl.kt
@@ -25,7 +25,9 @@ import com.android.systemui.keyguard.shared.model.Edge
import com.android.systemui.keyguard.shared.model.KeyguardState
import com.android.systemui.power.domain.interactor.PowerInteractor
import com.android.systemui.shade.data.repository.ShadeRepository
+import com.android.systemui.shade.shared.flag.DualShade
import com.android.systemui.shade.shared.model.ShadeAlignment
+import com.android.systemui.shade.shared.model.ShadeMode
import com.android.systemui.statusbar.disableflags.data.repository.DisableFlagsRepository
import com.android.systemui.statusbar.phone.DozeParameters
import com.android.systemui.statusbar.policy.data.repository.UserSetupRepository
@@ -60,8 +62,7 @@ constructor(
) : ShadeInteractor, BaseShadeInteractor by baseShadeInteractor {
override val isShadeEnabled: StateFlow<Boolean> =
disableFlagsRepository.disableFlags
- .map { isDisabledByFlags -> isDisabledByFlags.isShadeEnabled() }
- .distinctUntilChanged()
+ .map { it.isShadeEnabled() }
.stateIn(scope, SharingStarted.Eagerly, initialValue = false)
override val isQsEnabled: StateFlow<Boolean> =
@@ -102,6 +103,17 @@ constructor(
}
}
+ override val isShadeLayoutWide: StateFlow<Boolean> = shadeRepository.isShadeLayoutWide
+
+ override val shadeMode: StateFlow<ShadeMode> =
+ isShadeLayoutWide
+ .map(this::determineShadeMode)
+ .stateIn(
+ scope,
+ SharingStarted.Eagerly,
+ initialValue = determineShadeMode(isShadeLayoutWide.value)
+ )
+
override val shadeAlignment: ShadeAlignment =
if (shadeRepository.isDualShadeAlignedToBottom) {
ShadeAlignment.Bottom
@@ -125,4 +137,12 @@ constructor(
disableFlags.isQuickSettingsEnabled() &&
!isDozing
}
+
+ private fun determineShadeMode(isShadeLayoutWide: Boolean): ShadeMode {
+ return when {
+ DualShade.isEnabled -> ShadeMode.Dual
+ isShadeLayoutWide -> ShadeMode.Split
+ else -> ShadeMode.Single
+ }
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractorLegacyImpl.kt b/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractorLegacyImpl.kt
index 7d46d2ba17da..f39ee9afd039 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractorLegacyImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractorLegacyImpl.kt
@@ -21,7 +21,6 @@ import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.keyguard.data.repository.KeyguardRepository
import com.android.systemui.keyguard.shared.model.StatusBarState
import com.android.systemui.shade.data.repository.ShadeRepository
-import com.android.systemui.shade.shared.model.ShadeMode
import com.android.systemui.statusbar.notification.stack.domain.interactor.SharedNotificationContainerInteractor
import javax.inject.Inject
import kotlinx.coroutines.CoroutineScope
@@ -105,8 +104,6 @@ constructor(
override val isUserInteractingWithQs: Flow<Boolean> =
userInteractingFlow(repository.legacyQsTracking, repository.qsExpansion)
- override val shadeMode: StateFlow<ShadeMode> = repository.shadeMode
-
/**
* Return a flow for whether a user is interacting with an expandable shade component using
* tracking and expansion flows. NOTE: expansion must be a `StateFlow` to guarantee that
diff --git a/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractorSceneContainerImpl.kt b/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractorSceneContainerImpl.kt
index d5b4f4d7e623..b2142a515923 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractorSceneContainerImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractorSceneContainerImpl.kt
@@ -22,8 +22,6 @@ import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.scene.domain.interactor.SceneInteractor
import com.android.systemui.scene.shared.model.SceneFamilies
-import com.android.systemui.shade.data.repository.ShadeRepository
-import com.android.systemui.shade.shared.model.ShadeMode
import com.android.systemui.statusbar.notification.stack.domain.interactor.SharedNotificationContainerInteractor
import com.android.systemui.utils.coroutines.flow.flatMapLatestConflated
import javax.inject.Inject
@@ -45,10 +43,7 @@ constructor(
@Application scope: CoroutineScope,
sceneInteractor: SceneInteractor,
sharedNotificationContainerInteractor: SharedNotificationContainerInteractor,
- shadeRepository: ShadeRepository,
) : BaseShadeInteractor {
- override val shadeMode: StateFlow<ShadeMode> = shadeRepository.shadeMode
-
override val shadeExpansion: StateFlow<Float> =
sceneBasedExpansion(sceneInteractor, SceneFamilies.NotifShade)
.stateIn(scope, SharingStarted.Eagerly, 0f)
diff --git a/packages/SystemUI/src/com/android/systemui/shade/domain/startable/ShadeStartable.kt b/packages/SystemUI/src/com/android/systemui/shade/domain/startable/ShadeStartable.kt
index 354d379d2ea2..5eb3a1cc1348 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/domain/startable/ShadeStartable.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/domain/startable/ShadeStartable.kt
@@ -29,8 +29,6 @@ import com.android.systemui.shade.ShadeExpansionStateManager
import com.android.systemui.shade.TouchLogger.Companion.logTouchesTo
import com.android.systemui.shade.data.repository.ShadeRepository
import com.android.systemui.shade.domain.interactor.PanelExpansionInteractor
-import com.android.systemui.shade.shared.flag.DualShade
-import com.android.systemui.shade.shared.model.ShadeMode
import com.android.systemui.shade.transition.ScrimShadeTransitionController
import com.android.systemui.statusbar.PulseExpansionHandler
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController
@@ -40,7 +38,6 @@ import javax.inject.Provider
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.flow.combine
import kotlinx.coroutines.flow.launchIn
-import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.onStart
import kotlinx.coroutines.launch
@@ -63,7 +60,7 @@ constructor(
) : CoreStartable {
override fun start() {
- hydrateShadeMode()
+ hydrateShadeLayoutWidth()
hydrateShadeExpansionStateManager()
logTouchesTo(touchLog)
scrimShadeTransitionController.init()
@@ -86,22 +83,17 @@ constructor(
}
}
- private fun hydrateShadeMode() {
- if (DualShade.isEnabled) {
- shadeRepository.setShadeMode(ShadeMode.Dual)
- return
- }
+ private fun hydrateShadeLayoutWidth() {
applicationScope.launch {
configurationRepository.onAnyConfigurationChange
// Force initial collection.
.onStart { emit(Unit) }
- .map { applicationContext.resources }
- .map { resources ->
- splitShadeStateController.shouldUseSplitNotificationShade(resources)
- }
- .collect { isSplitShade ->
- shadeRepository.setShadeMode(
- if (isSplitShade) ShadeMode.Split else ShadeMode.Single
+ .collect {
+ val resources = applicationContext.resources
+ // The configuration for 'shouldUseSplitNotificationShade' dictates the width of
+ // the shade in both split-shade and dual-shade modes.
+ shadeRepository.setShadeLayoutWide(
+ splitShadeStateController.shouldUseSplitNotificationShade(resources)
)
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/shade/shared/model/ShadeMode.kt b/packages/SystemUI/src/com/android/systemui/shade/shared/model/ShadeMode.kt
index 8214a24a9a38..a8199a402ef1 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/shared/model/ShadeMode.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/shared/model/ShadeMode.kt
@@ -29,6 +29,8 @@ sealed interface ShadeMode {
/**
* The split shade where, on large screens and unfolded foldables, the QS and notification parts
* are placed side-by-side and expand/collapse as a single panel.
+ *
+ * Note: This isn't the only mode where the shade is wide.
*/
data object Split : ShadeMode
diff --git a/packages/SystemUI/src/com/android/systemui/smartspace/dagger/SmartspaceModule.kt b/packages/SystemUI/src/com/android/systemui/smartspace/dagger/SmartspaceModule.kt
index 2f58b35ae182..ea4e065be84b 100644
--- a/packages/SystemUI/src/com/android/systemui/smartspace/dagger/SmartspaceModule.kt
+++ b/packages/SystemUI/src/com/android/systemui/smartspace/dagger/SmartspaceModule.kt
@@ -18,51 +18,35 @@ package com.android.systemui.smartspace.dagger
import com.android.systemui.plugins.BcSmartspaceDataPlugin
import com.android.systemui.smartspace.SmartspacePrecondition
import com.android.systemui.smartspace.SmartspaceTargetFilter
-import com.android.systemui.smartspace.data.repository.SmartspaceRepositoryModule
import com.android.systemui.smartspace.preconditions.LockscreenPrecondition
import dagger.Binds
import dagger.BindsOptionalOf
import dagger.Module
import javax.inject.Named
-@Module(subcomponents = [SmartspaceViewComponent::class],
- includes = [SmartspaceRepositoryModule::class])
+@Module(subcomponents = [SmartspaceViewComponent::class])
abstract class SmartspaceModule {
@Module
companion object {
- /**
- * The BcSmartspaceDataProvider for dreams.
- */
+ /** The BcSmartspaceDataProvider for dreams. */
const val DREAM_SMARTSPACE_DATA_PLUGIN = "dreams_smartspace_data_plugin"
- /**
- * The BcSmartspaceDataPlugin for the standalone weather on dream.
- */
+ /** The BcSmartspaceDataPlugin for the standalone weather on dream. */
const val DREAM_WEATHER_SMARTSPACE_DATA_PLUGIN = "dream_weather_smartspace_data_plugin"
- /**
- * The target filter for smartspace over lockscreen.
- */
+ /** The target filter for smartspace over lockscreen. */
const val LOCKSCREEN_SMARTSPACE_TARGET_FILTER = "lockscreen_smartspace_target_filter"
- /**
- * The precondition for smartspace over lockscreen
- */
+ /** The precondition for smartspace over lockscreen */
const val LOCKSCREEN_SMARTSPACE_PRECONDITION = "lockscreen_smartspace_precondition"
- /**
- * The BcSmartspaceDataPlugin for the standalone date (+alarm+dnd).
- */
+ /** The BcSmartspaceDataPlugin for the standalone date (+alarm+dnd). */
const val DATE_SMARTSPACE_DATA_PLUGIN = "date_smartspace_data_plugin"
- /**
- * The BcSmartspaceDataPlugin for the standalone weather.
- */
+ /** The BcSmartspaceDataPlugin for the standalone weather. */
const val WEATHER_SMARTSPACE_DATA_PLUGIN = "weather_smartspace_data_plugin"
- /**
- * The BcSmartspaceDataProvider for the glanceable hub.
- */
+ /** The BcSmartspaceDataProvider for the glanceable hub. */
const val GLANCEABLE_HUB_SMARTSPACE_DATA_PLUGIN = "glanceable_hub_smartspace_data_plugin"
}
diff --git a/packages/SystemUI/src/com/android/systemui/smartspace/data/repository/SmartspaceRepository.kt b/packages/SystemUI/src/com/android/systemui/smartspace/data/repository/SmartspaceRepository.kt
deleted file mode 100644
index 52a1c1555591..000000000000
--- a/packages/SystemUI/src/com/android/systemui/smartspace/data/repository/SmartspaceRepository.kt
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (C) 2023 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.systemui.smartspace.data.repository
-
-import android.app.smartspace.SmartspaceTarget
-import android.os.Parcelable
-import android.widget.RemoteViews
-import com.android.systemui.communal.smartspace.CommunalSmartspaceController
-import com.android.systemui.dagger.SysUISingleton
-import com.android.systemui.dagger.qualifiers.Main
-import com.android.systemui.plugins.BcSmartspaceDataPlugin
-import java.util.concurrent.Executor
-import javax.inject.Inject
-import kotlinx.coroutines.flow.Flow
-import kotlinx.coroutines.flow.MutableStateFlow
-import kotlinx.coroutines.flow.onCompletion
-import kotlinx.coroutines.flow.onStart
-
-interface SmartspaceRepository {
- /** Whether [RemoteViews] are passed through smartspace targets. */
- val isSmartspaceRemoteViewsEnabled: Boolean
-
- /** Smartspace targets for the communal surface. */
- val communalSmartspaceTargets: Flow<List<SmartspaceTarget>>
-}
-
-@SysUISingleton
-class SmartspaceRepositoryImpl
-@Inject
-constructor(
- private val communalSmartspaceController: CommunalSmartspaceController,
- @Main private val uiExecutor: Executor,
-) : SmartspaceRepository, BcSmartspaceDataPlugin.SmartspaceTargetListener {
-
- override val isSmartspaceRemoteViewsEnabled: Boolean
- get() = android.app.smartspace.flags.Flags.remoteViews()
-
- private val _communalSmartspaceTargets: MutableStateFlow<List<SmartspaceTarget>> =
- MutableStateFlow(emptyList())
- override val communalSmartspaceTargets: Flow<List<SmartspaceTarget>> =
- _communalSmartspaceTargets
- .onStart {
- uiExecutor.execute {
- communalSmartspaceController.addListener(
- listener = this@SmartspaceRepositoryImpl
- )
- }
- }
- .onCompletion {
- uiExecutor.execute {
- communalSmartspaceController.removeListener(
- listener = this@SmartspaceRepositoryImpl
- )
- }
- }
-
- override fun onSmartspaceTargetsUpdated(targetsNullable: MutableList<out Parcelable>?) {
- targetsNullable?.let { targets ->
- _communalSmartspaceTargets.value = targets.filterIsInstance<SmartspaceTarget>()
- }
- ?: run { _communalSmartspaceTargets.value = emptyList() }
- }
-}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
index c9126161c40f..b9d24abc4037 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
@@ -51,6 +51,7 @@ import android.os.ParcelFileDescriptor;
import android.os.Process;
import android.os.RemoteException;
import android.os.UserHandle;
+import android.os.UserManager;
import android.util.Pair;
import android.util.SparseArray;
import android.view.KeyEvent;
@@ -200,6 +201,7 @@ public class CommandQueue extends IStatusBar.Stub implements
* event.
*/
private int mLastUpdatedImeDisplayId = INVALID_DISPLAY;
+ private final Context mContext;
private final DisplayTracker mDisplayTracker;
private final @Nullable CommandRegistry mRegistry;
private final @Nullable DumpHandler mDumpHandler;
@@ -571,6 +573,7 @@ public class CommandQueue extends IStatusBar.Stub implements
DumpHandler dumpHandler,
Lazy<PowerInteractor> powerInteractor
) {
+ mContext = context;
mDisplayTracker = displayTracker;
mRegistry = registry;
mDumpHandler = dumpHandler;
@@ -1209,7 +1212,12 @@ public class CommandQueue extends IStatusBar.Stub implements
boolean showImeSwitcher) {
if (displayId == INVALID_DISPLAY) return;
- if (mLastUpdatedImeDisplayId != displayId
+ boolean isConcurrentMultiUserModeEnabled = UserManager.isVisibleBackgroundUsersEnabled()
+ && mContext.getResources().getBoolean(android.R.bool.config_perDisplayFocusEnabled)
+ && android.view.inputmethod.Flags.concurrentInputMethods();
+
+ if (!isConcurrentMultiUserModeEnabled
+ && mLastUpdatedImeDisplayId != displayId
&& mLastUpdatedImeDisplayId != INVALID_DISPLAY) {
// Set previous NavBar's IME window status as invisible when IME
// window switched to another display for single-session IME case.
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ImmersiveModeConfirmation.java b/packages/SystemUI/src/com/android/systemui/statusbar/ImmersiveModeConfirmation.java
index abf258c44556..693cc4a659c7 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/ImmersiveModeConfirmation.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/ImmersiveModeConfirmation.java
@@ -485,9 +485,8 @@ public class ImmersiveModeConfirmation implements CoreStartable, CommandQueue.Ca
final boolean intersectsTopCutout = topDisplayCutout.intersects(
width - (windowWidth / 2), 0,
width + (windowWidth / 2), topDisplayCutout.bottom);
- if (mClingWindow != null &&
- (windowWidth < 0 || (width > 0 && intersectsTopCutout))) {
- final View iconView = mClingWindow.findViewById(R.id.immersive_cling_icon);
+ if (windowWidth < 0 || (width > 0 && intersectsTopCutout)) {
+ final View iconView = findViewById(R.id.immersive_cling_icon);
RelativeLayout.LayoutParams lp = (RelativeLayout.LayoutParams)
iconView.getLayoutParams();
lp.topMargin = topDisplayCutout.bottom;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcutListSearch.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcutListSearch.java
index 342ec0dc228d..c997ac5ad9df 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcutListSearch.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcutListSearch.java
@@ -19,6 +19,7 @@ package com.android.systemui.statusbar;
import static android.view.View.IMPORTANT_FOR_ACCESSIBILITY_YES;
import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_DIALOG;
+import static com.android.systemui.Flags.fetchBookmarksXmlKeyboardShortcuts;
import static com.android.systemui.Flags.validateKeyboardShortcutHelperIconUri;
import android.annotation.NonNull;
@@ -149,7 +150,7 @@ public final class KeyboardShortcutListSearch {
private KeyCharacterMap mBackupKeyCharacterMap;
@VisibleForTesting
- KeyboardShortcutListSearch(Context context, WindowManager windowManager) {
+ KeyboardShortcutListSearch(Context context, WindowManager windowManager, int deviceId) {
this.mContext = new ContextThemeWrapper(
context, R.style.KeyboardShortcutHelper);
this.mPackageManager = AppGlobals.getPackageManager();
@@ -159,12 +160,12 @@ public final class KeyboardShortcutListSearch {
this.mWindowManager = mContext.getSystemService(WindowManager.class);
}
loadResources(this.mContext);
- createHardcodedShortcuts();
+ createHardcodedShortcuts(deviceId);
}
- private static KeyboardShortcutListSearch getInstance(Context context) {
+ private static KeyboardShortcutListSearch getInstance(Context context, int deviceId) {
if (sInstance == null) {
- sInstance = new KeyboardShortcutListSearch(context, null);
+ sInstance = new KeyboardShortcutListSearch(context, null, deviceId);
}
return sInstance;
}
@@ -176,7 +177,7 @@ public final class KeyboardShortcutListSearch {
if (sInstance != null && !sInstance.mContext.equals(context)) {
dismiss();
}
- getInstance(context).showKeyboardShortcuts(deviceId);
+ getInstance(context, deviceId).showKeyboardShortcuts(deviceId);
}
}
@@ -274,7 +275,8 @@ public final class KeyboardShortcutListSearch {
context.getString(R.string.keyboard_key_button_template, "Mode"));
mSpecialCharacterNames.put(
KeyEvent.KEYCODE_FORWARD_DEL, context.getString(R.string.keyboard_key_forward_del));
- mSpecialCharacterNames.put(KeyEvent.KEYCODE_ESCAPE, "Esc");
+ mSpecialCharacterNames.put(
+ KeyEvent.KEYCODE_ESCAPE, context.getString(R.string.keyboard_key_esc));
mSpecialCharacterNames.put(KeyEvent.KEYCODE_SYSRQ, "SysRq");
mSpecialCharacterNames.put(KeyEvent.KEYCODE_BREAK, "Break");
mSpecialCharacterNames.put(KeyEvent.KEYCODE_SCROLL_LOCK, "Scroll Lock");
@@ -366,7 +368,7 @@ public final class KeyboardShortcutListSearch {
KeyEvent.META_META_ON, context.getDrawable(R.drawable.ic_ksh_key_meta));
}
- private void createHardcodedShortcuts() {
+ private void createHardcodedShortcuts(int deviceId) {
// Add system shortcuts
mKeySearchResultMap.put(SHORTCUT_SYSTEM_INDEX, true);
mSystemGroup.add(getMultiMappingSystemShortcuts(mContext));
@@ -376,7 +378,7 @@ public final class KeyboardShortcutListSearch {
mInputGroup.add(getMultiMappingInputShortcuts(mContext));
// Add open apps shortcuts
final List<KeyboardShortcutMultiMappingGroup> appShortcuts =
- Arrays.asList(getDefaultMultiMappingApplicationShortcuts());
+ Arrays.asList(getDefaultMultiMappingApplicationShortcuts(deviceId));
if (appShortcuts != null && !appShortcuts.isEmpty()) {
mOpenAppsGroup = appShortcuts;
mKeySearchResultMap.put(SHORTCUT_OPENAPPS_INDEX, true);
@@ -738,35 +740,50 @@ public final class KeyboardShortcutListSearch {
shortcutMultiMappingInfoList);
}
- private KeyboardShortcutMultiMappingGroup getDefaultMultiMappingApplicationShortcuts() {
- final int userId = mContext.getUserId();
- PackageInfo assistPackageInfo = getAssistPackageInfo(mContext, mPackageManager, userId);
- CharSequence categoryTitle =
- mContext.getString(R.string.keyboard_shortcut_group_applications);
+ private KeyboardShortcutMultiMappingGroup getDefaultMultiMappingApplicationShortcuts(
+ int deviceId) {
List<ShortcutMultiMappingInfo> shortcutMultiMappingInfos = new ArrayList<>();
-
- String[] intentCategories = {
- Intent.CATEGORY_APP_BROWSER,
- Intent.CATEGORY_APP_CONTACTS,
- Intent.CATEGORY_APP_EMAIL,
- Intent.CATEGORY_APP_CALENDAR,
- Intent.CATEGORY_APP_MAPS,
- Intent.CATEGORY_APP_MUSIC,
- Intent.CATEGORY_APP_MESSAGING,
- Intent.CATEGORY_APP_CALCULATOR,
-
- };
- String[] shortcutLabels = {
- mContext.getString(R.string.keyboard_shortcut_group_applications_browser),
- mContext.getString(R.string.keyboard_shortcut_group_applications_contacts),
- mContext.getString(R.string.keyboard_shortcut_group_applications_email),
- mContext.getString(R.string.keyboard_shortcut_group_applications_calendar),
- mContext.getString(R.string.keyboard_shortcut_group_applications_maps),
- mContext.getString(R.string.keyboard_shortcut_group_applications_music),
- mContext.getString(R.string.keyboard_shortcut_group_applications_sms),
- mContext.getString(R.string.keyboard_shortcut_group_applications_calculator)
- };
- int[] keyCodes = {
+ CharSequence categoryTitle;
+ if (fetchBookmarksXmlKeyboardShortcuts()) {
+ KeyboardShortcutGroup apps =
+ mWindowManager.getApplicationLaunchKeyboardShortcuts(deviceId);
+ List<KeyboardShortcutMultiMappingGroup> shortcuts =
+ reMapToKeyboardShortcutMultiMappingGroup(Arrays.asList(apps));
+ for (KeyboardShortcutMultiMappingGroup group : shortcuts) {
+ for (ShortcutMultiMappingInfo keyboardShortcutInfo : group.getItems()) {
+ shortcutMultiMappingInfos.add(keyboardShortcutInfo);
+ }
+ }
+ categoryTitle = apps.getLabel();
+ } else {
+ // Show shortcuts based on AOSP bookmarks.xml
+ categoryTitle = mContext.getString(R.string.keyboard_shortcut_group_applications);
+ final int userId = mContext.getUserId();
+ PackageInfo assistPackageInfo =
+ getAssistPackageInfo(mContext, mPackageManager, userId);
+
+ String[] intentCategories = {
+ Intent.CATEGORY_APP_BROWSER,
+ Intent.CATEGORY_APP_CONTACTS,
+ Intent.CATEGORY_APP_EMAIL,
+ Intent.CATEGORY_APP_CALENDAR,
+ Intent.CATEGORY_APP_MAPS,
+ Intent.CATEGORY_APP_MUSIC,
+ Intent.CATEGORY_APP_MESSAGING,
+ Intent.CATEGORY_APP_CALCULATOR,
+ };
+ String[] shortcutLabels = {
+ mContext.getString(R.string.keyboard_shortcut_group_applications_browser),
+ mContext.getString(R.string.keyboard_shortcut_group_applications_contacts),
+ mContext.getString(R.string.keyboard_shortcut_group_applications_email),
+ mContext.getString(R.string.keyboard_shortcut_group_applications_calendar),
+ mContext.getString(R.string.keyboard_shortcut_group_applications_maps),
+ mContext.getString(R.string.keyboard_shortcut_group_applications_music),
+ mContext.getString(R.string.keyboard_shortcut_group_applications_sms),
+ mContext.getString(R.string.keyboard_shortcut_group_applications_calculator)
+ };
+
+ int[] keyCodes = {
KeyEvent.KEYCODE_B,
KeyEvent.KEYCODE_C,
KeyEvent.KEYCODE_E,
@@ -775,52 +792,44 @@ public final class KeyboardShortcutListSearch {
KeyEvent.KEYCODE_P,
KeyEvent.KEYCODE_S,
KeyEvent.KEYCODE_U,
- };
+ };
- // Assist.
- if (assistPackageInfo != null) {
+ // Assist.
if (assistPackageInfo != null) {
- final Icon assistIcon = Icon.createWithResource(
- assistPackageInfo.applicationInfo.packageName,
- assistPackageInfo.applicationInfo.icon);
- CharSequence assistLabel =
- mContext.getString(R.string.keyboard_shortcut_group_applications_assist);
- KeyboardShortcutInfo assistShortcutInfo = new KeyboardShortcutInfo(
- assistLabel,
- assistIcon,
- KeyEvent.KEYCODE_A,
- KeyEvent.META_META_ON);
- shortcutMultiMappingInfos.add(
- new ShortcutMultiMappingInfo(
- assistLabel,
- assistIcon,
- Arrays.asList(new ShortcutKeyGroup(assistShortcutInfo, null))));
+ if (assistPackageInfo != null) {
+ final Icon assistIcon = Icon.createWithResource(
+ assistPackageInfo.applicationInfo.packageName,
+ assistPackageInfo.applicationInfo.icon);
+ CharSequence assistLabel = mContext.getString(
+ R.string.keyboard_shortcut_group_applications_assist);
+ KeyboardShortcutInfo assistShortcutInfo = new KeyboardShortcutInfo(
+ assistLabel,
+ assistIcon,
+ KeyEvent.KEYCODE_A,
+ KeyEvent.META_META_ON);
+ shortcutMultiMappingInfos.add(
+ new ShortcutMultiMappingInfo(
+ assistLabel,
+ assistIcon,
+ Arrays.asList(new ShortcutKeyGroup(assistShortcutInfo, null))));
+ }
}
- }
- // Browser (Chrome as default): Meta + B
- // Contacts: Meta + C
- // Email (Gmail as default): Meta + E
- // Gmail: Meta + G
- // Calendar: Meta + K
- // Maps: Meta + M
- // Music: Meta + P
- // SMS: Meta + S
- // Calculator: Meta + U
- for (int i = 0; i < shortcutLabels.length; i++) {
- final Icon icon = getIconForIntentCategory(intentCategories[i], userId);
- if (icon != null) {
- CharSequence label =
- shortcutLabels[i];
- KeyboardShortcutInfo keyboardShortcutInfo = new KeyboardShortcutInfo(
- label,
- icon,
- keyCodes[i],
- KeyEvent.META_META_ON);
- List<ShortcutKeyGroup> shortcutKeyGroups =
- Arrays.asList(new ShortcutKeyGroup(keyboardShortcutInfo, null));
- shortcutMultiMappingInfos.add(
- new ShortcutMultiMappingInfo(label, icon, shortcutKeyGroups));
+ for (int i = 0; i < shortcutLabels.length; i++) {
+ final Icon icon = getIconForIntentCategory(intentCategories[i], userId);
+ if (icon != null) {
+ CharSequence label =
+ shortcutLabels[i];
+ KeyboardShortcutInfo keyboardShortcutInfo = new KeyboardShortcutInfo(
+ label,
+ icon,
+ keyCodes[i],
+ KeyEvent.META_META_ON);
+ List<ShortcutKeyGroup> shortcutKeyGroups =
+ Arrays.asList(new ShortcutKeyGroup(keyboardShortcutInfo, null));
+ shortcutMultiMappingInfos.add(
+ new ShortcutMultiMappingInfo(label, icon, shortcutKeyGroups));
+ }
}
}
@@ -1220,7 +1229,8 @@ public final class KeyboardShortcutListSearch {
String shortcutKeyString = null;
Drawable shortcutKeyDrawable = null;
if (info.getBaseCharacter() > Character.MIN_VALUE) {
- shortcutKeyString = String.valueOf(info.getBaseCharacter());
+ shortcutKeyString = String.valueOf(info.getBaseCharacter())
+ .toUpperCase(Locale.getDefault());
} else if (mSpecialCharacterNames.get(info.getKeycode()) != null) {
shortcutKeyString = mSpecialCharacterNames.get(info.getKeycode());
} else {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcuts.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcuts.java
index 6ee13c3b1801..766c391b14d8 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcuts.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcuts.java
@@ -20,6 +20,7 @@ import static android.content.Context.LAYOUT_INFLATER_SERVICE;
import static android.view.View.IMPORTANT_FOR_ACCESSIBILITY_YES;
import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_DIALOG;
+import static com.android.systemui.Flags.fetchBookmarksXmlKeyboardShortcuts;
import static com.android.systemui.Flags.validateKeyboardShortcutHelperIconUri;
import android.annotation.NonNull;
@@ -75,6 +76,7 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
+import java.util.Locale;
/**
* Contains functionality for handling keyboard shortcuts.
@@ -133,6 +135,7 @@ public final class KeyboardShortcuts {
@Nullable private List<KeyboardShortcutGroup> mReceivedAppShortcutGroups = null;
@Nullable private List<KeyboardShortcutGroup> mReceivedImeShortcutGroups = null;
+ @Nullable private KeyboardShortcutGroup mDefaultApplicationShortcuts = null;
@VisibleForTesting
KeyboardShortcuts(Context context, WindowManager windowManager) {
@@ -259,7 +262,8 @@ public final class KeyboardShortcuts {
context.getString(R.string.keyboard_key_button_template, "Mode"));
mSpecialCharacterNames.put(
KeyEvent.KEYCODE_FORWARD_DEL, context.getString(R.string.keyboard_key_forward_del));
- mSpecialCharacterNames.put(KeyEvent.KEYCODE_ESCAPE, "Esc");
+ mSpecialCharacterNames.put(
+ KeyEvent.KEYCODE_ESCAPE, context.getString(R.string.keyboard_key_esc));
mSpecialCharacterNames.put(KeyEvent.KEYCODE_SYSRQ, "SysRq");
mSpecialCharacterNames.put(KeyEvent.KEYCODE_BREAK, "Break");
mSpecialCharacterNames.put(KeyEvent.KEYCODE_SCROLL_LOCK, "Scroll Lock");
@@ -389,6 +393,7 @@ public final class KeyboardShortcuts {
mReceivedAppShortcutGroups = null;
mReceivedImeShortcutGroups = null;
+ mDefaultApplicationShortcuts = getDefaultApplicationShortcuts(deviceId);
mWindowManager.requestAppKeyboardShortcuts(
result -> {
mBackgroundHandler.post(() -> {
@@ -442,10 +447,8 @@ public final class KeyboardShortcuts {
mReceivedAppShortcutGroups = null;
mReceivedImeShortcutGroups = null;
- final KeyboardShortcutGroup defaultAppShortcuts =
- getDefaultApplicationShortcuts();
- if (defaultAppShortcuts != null) {
- shortcutGroups.add(defaultAppShortcuts);
+ if (mDefaultApplicationShortcuts != null) {
+ shortcutGroups.add(mDefaultApplicationShortcuts);
}
shortcutGroups.add(getSystemShortcuts());
showKeyboardShortcutsDialog(shortcutGroups);
@@ -498,7 +501,7 @@ public final class KeyboardShortcuts {
return systemGroup;
}
- private KeyboardShortcutGroup getDefaultApplicationShortcuts() {
+ private KeyboardShortcutGroup getDefaultApplicationShortcuts(int deviceId) {
final int userId = mContext.getUserId();
List<KeyboardShortcutInfo> keyboardShortcutInfoAppItems = new ArrayList<>();
@@ -523,70 +526,82 @@ public final class KeyboardShortcuts {
keyboardShortcutInfoAppItems.add(new KeyboardShortcutInfo(
mContext.getString(R.string.keyboard_shortcut_group_applications_assist),
assistIcon,
- KeyEvent.KEYCODE_UNKNOWN,
+ KeyEvent.KEYCODE_A,
KeyEvent.META_META_ON));
}
}
- // Browser.
- final Icon browserIcon = getIconForIntentCategory(Intent.CATEGORY_APP_BROWSER, userId);
- if (browserIcon != null) {
- keyboardShortcutInfoAppItems.add(new KeyboardShortcutInfo(
- mContext.getString(R.string.keyboard_shortcut_group_applications_browser),
- browserIcon,
- KeyEvent.KEYCODE_B,
- KeyEvent.META_META_ON));
- }
+ CharSequence categoryTitle;
+ if (fetchBookmarksXmlKeyboardShortcuts()) {
+ KeyboardShortcutGroup apps =
+ mWindowManager.getApplicationLaunchKeyboardShortcuts(deviceId);
+ categoryTitle = apps.getLabel();
+ keyboardShortcutInfoAppItems.addAll(apps.getItems());
+ } else {
+ categoryTitle = mContext.getString(R.string.keyboard_shortcut_group_applications);
+ // Browser.
+ final Icon browserIcon = getIconForIntentCategory(Intent.CATEGORY_APP_BROWSER, userId);
+ if (browserIcon != null) {
+ keyboardShortcutInfoAppItems.add(new KeyboardShortcutInfo(
+ mContext.getString(R.string.keyboard_shortcut_group_applications_browser),
+ browserIcon,
+ KeyEvent.KEYCODE_B,
+ KeyEvent.META_META_ON));
+ }
- // Contacts.
- final Icon contactsIcon = getIconForIntentCategory(Intent.CATEGORY_APP_CONTACTS, userId);
- if (contactsIcon != null) {
- keyboardShortcutInfoAppItems.add(new KeyboardShortcutInfo(
- mContext.getString(R.string.keyboard_shortcut_group_applications_contacts),
- contactsIcon,
- KeyEvent.KEYCODE_C,
- KeyEvent.META_META_ON));
- }
+ // Contacts.
+ final Icon contactsIcon = getIconForIntentCategory(
+ Intent.CATEGORY_APP_CONTACTS, userId);
+ if (contactsIcon != null) {
+ keyboardShortcutInfoAppItems.add(new KeyboardShortcutInfo(
+ mContext.getString(R.string.keyboard_shortcut_group_applications_contacts),
+ contactsIcon,
+ KeyEvent.KEYCODE_C,
+ KeyEvent.META_META_ON));
+ }
- // Email.
- final Icon emailIcon = getIconForIntentCategory(Intent.CATEGORY_APP_EMAIL, userId);
- if (emailIcon != null) {
- keyboardShortcutInfoAppItems.add(new KeyboardShortcutInfo(
- mContext.getString(R.string.keyboard_shortcut_group_applications_email),
- emailIcon,
- KeyEvent.KEYCODE_E,
- KeyEvent.META_META_ON));
- }
+ // Email.
+ final Icon emailIcon = getIconForIntentCategory(Intent.CATEGORY_APP_EMAIL, userId);
+ if (emailIcon != null) {
+ keyboardShortcutInfoAppItems.add(new KeyboardShortcutInfo(
+ mContext.getString(R.string.keyboard_shortcut_group_applications_email),
+ emailIcon,
+ KeyEvent.KEYCODE_E,
+ KeyEvent.META_META_ON));
+ }
- // Messaging.
- final Icon messagingIcon = getIconForIntentCategory(Intent.CATEGORY_APP_MESSAGING, userId);
- if (messagingIcon != null) {
- keyboardShortcutInfoAppItems.add(new KeyboardShortcutInfo(
- mContext.getString(R.string.keyboard_shortcut_group_applications_sms),
- messagingIcon,
- KeyEvent.KEYCODE_S,
- KeyEvent.META_META_ON));
- }
+ // Messaging.
+ final Icon messagingIcon = getIconForIntentCategory(
+ Intent.CATEGORY_APP_MESSAGING, userId);
+ if (messagingIcon != null) {
+ keyboardShortcutInfoAppItems.add(new KeyboardShortcutInfo(
+ mContext.getString(R.string.keyboard_shortcut_group_applications_sms),
+ messagingIcon,
+ KeyEvent.KEYCODE_S,
+ KeyEvent.META_META_ON));
+ }
- // Music.
- final Icon musicIcon = getIconForIntentCategory(Intent.CATEGORY_APP_MUSIC, userId);
- if (musicIcon != null) {
- keyboardShortcutInfoAppItems.add(new KeyboardShortcutInfo(
- mContext.getString(R.string.keyboard_shortcut_group_applications_music),
- musicIcon,
- KeyEvent.KEYCODE_P,
- KeyEvent.META_META_ON));
- }
+ // Music.
+ final Icon musicIcon = getIconForIntentCategory(Intent.CATEGORY_APP_MUSIC, userId);
+ if (musicIcon != null) {
+ keyboardShortcutInfoAppItems.add(new KeyboardShortcutInfo(
+ mContext.getString(R.string.keyboard_shortcut_group_applications_music),
+ musicIcon,
+ KeyEvent.KEYCODE_P,
+ KeyEvent.META_META_ON));
+ }
- // Calendar.
- final Icon calendarIcon = getIconForIntentCategory(Intent.CATEGORY_APP_CALENDAR, userId);
- if (calendarIcon != null) {
- keyboardShortcutInfoAppItems.add(new KeyboardShortcutInfo(
- mContext.getString(R.string.keyboard_shortcut_group_applications_calendar),
- calendarIcon,
- KeyEvent.KEYCODE_K,
- KeyEvent.META_META_ON));
+ // Calendar.
+ final Icon calendarIcon = getIconForIntentCategory(
+ Intent.CATEGORY_APP_CALENDAR, userId);
+ if (calendarIcon != null) {
+ keyboardShortcutInfoAppItems.add(new KeyboardShortcutInfo(
+ mContext.getString(R.string.keyboard_shortcut_group_applications_calendar),
+ calendarIcon,
+ KeyEvent.KEYCODE_K,
+ KeyEvent.META_META_ON));
+ }
}
final int itemsSize = keyboardShortcutInfoAppItems.size();
@@ -597,7 +612,7 @@ public final class KeyboardShortcuts {
// Sorts by label, case insensitive with nulls and/or empty labels last.
Collections.sort(keyboardShortcutInfoAppItems, mApplicationItemsComparator);
return new KeyboardShortcutGroup(
- mContext.getString(R.string.keyboard_shortcut_group_applications),
+ categoryTitle,
keyboardShortcutInfoAppItems,
true);
}
@@ -776,7 +791,8 @@ public final class KeyboardShortcuts {
String shortcutKeyString = null;
Drawable shortcutKeyDrawable = null;
if (info.getBaseCharacter() > Character.MIN_VALUE) {
- shortcutKeyString = String.valueOf(info.getBaseCharacter());
+ shortcutKeyString = String.valueOf(info.getBaseCharacter())
+ .toUpperCase(Locale.getDefault());
} else if (mSpecialCharacterNames.get(info.getKeycode()) != null) {
shortcutKeyString = mSpecialCharacterNames.get(info.getKeycode());
} else {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarStateControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarStateControllerImpl.java
index e505ef753dce..0957e5a5df35 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarStateControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarStateControllerImpl.java
@@ -51,6 +51,7 @@ import com.android.systemui.deviceentry.shared.model.DeviceUnlockStatus;
import com.android.systemui.keyguard.MigrateClocksToBlueprint;
import com.android.systemui.keyguard.domain.interactor.KeyguardClockInteractor;
import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor;
+import com.android.systemui.keyguard.shared.model.KeyguardState;
import com.android.systemui.plugins.statusbar.StatusBarStateController.StateListener;
import com.android.systemui.res.R;
import com.android.systemui.scene.domain.interactor.SceneContainerOcclusionInteractor;
@@ -223,6 +224,10 @@ public class StatusBarStateControllerImpl implements
mSceneContainerOcclusionInteractorLazy.get().getInvisibleDueToOcclusion(),
this::calculateStateFromSceneFramework),
this::onStatusBarStateChanged);
+
+ mJavaAdapter.alwaysCollectFlow(
+ mKeyguardTransitionInteractorLazy.get().transitionValue(KeyguardState.AOD),
+ this::onAodKeyguardStateTransitionValueChanged);
}
}
@@ -693,6 +698,14 @@ public class StatusBarStateControllerImpl implements
updateStateAndNotifyListeners(newState);
}
+ private void onAodKeyguardStateTransitionValueChanged(float value) {
+ if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) {
+ return;
+ }
+
+ setDozeAmountInternal(value);
+ }
+
private static final Map<SceneKey, Integer> sStatusBarStateByLockedSceneKey = Map.of(
Scenes.Lockscreen, StatusBarState.KEYGUARD,
Scenes.Bouncer, StatusBarState.KEYGUARD,
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/chips/StatusBarChipsLog.kt b/packages/SystemUI/src/com/android/systemui/statusbar/chips/StatusBarChipsLog.kt
new file mode 100644
index 000000000000..ecb628674352
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/chips/StatusBarChipsLog.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.chips
+
+import javax.inject.Qualifier
+
+/** Logs for events related to the status bar chips. */
+@Qualifier
+@MustBeDocumented
+@Retention(AnnotationRetention.RUNTIME)
+annotation class StatusBarChipsLog
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/chips/StatusBarChipsModule.kt b/packages/SystemUI/src/com/android/systemui/statusbar/chips/StatusBarChipsModule.kt
new file mode 100644
index 000000000000..173ff37cc3b8
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/chips/StatusBarChipsModule.kt
@@ -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 com.android.systemui.statusbar.chips
+
+import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.log.LogBuffer
+import com.android.systemui.log.LogBufferFactory
+import dagger.Module
+import dagger.Provides
+
+@Module
+abstract class StatusBarChipsModule {
+ companion object {
+ @Provides
+ @SysUISingleton
+ @StatusBarChipsLog
+ fun provideChipsLogBuffer(factory: LogBufferFactory): LogBuffer {
+ return factory.create("StatusBarChips", 200)
+ }
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/chips/call/domain/interactor/CallChipInteractor.kt b/packages/SystemUI/src/com/android/systemui/statusbar/chips/call/domain/interactor/CallChipInteractor.kt
index 7e9acafa0bff..eaefc111ae3d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/chips/call/domain/interactor/CallChipInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/chips/call/domain/interactor/CallChipInteractor.kt
@@ -17,15 +17,36 @@
package com.android.systemui.statusbar.chips.call.domain.interactor
import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.dagger.qualifiers.Application
+import com.android.systemui.log.LogBuffer
+import com.android.systemui.log.core.LogLevel
+import com.android.systemui.statusbar.chips.StatusBarChipsLog
import com.android.systemui.statusbar.phone.ongoingcall.data.repository.OngoingCallRepository
+import com.android.systemui.statusbar.phone.ongoingcall.shared.model.OngoingCallModel
import javax.inject.Inject
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.flow.SharingStarted
+import kotlinx.coroutines.flow.StateFlow
+import kotlinx.coroutines.flow.onEach
+import kotlinx.coroutines.flow.stateIn
/** Interactor for the ongoing phone call chip shown in the status bar. */
@SysUISingleton
class CallChipInteractor
@Inject
constructor(
+ @Application private val scope: CoroutineScope,
repository: OngoingCallRepository,
+ @StatusBarChipsLog private val logger: LogBuffer,
) {
- val ongoingCallState = repository.ongoingCallState
+ val ongoingCallState: StateFlow<OngoingCallModel> =
+ repository.ongoingCallState
+ .onEach {
+ logger.log(TAG, LogLevel.INFO, { str1 = it::class.simpleName }, { "State: $str1" })
+ }
+ .stateIn(scope, SharingStarted.Lazily, OngoingCallModel.NoCall)
+
+ companion object {
+ private const val TAG = "OngoingCall"
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/chips/call/ui/viewmodel/CallChipViewModel.kt b/packages/SystemUI/src/com/android/systemui/statusbar/chips/call/ui/viewmodel/CallChipViewModel.kt
index ed1756aff8c1..59fd0ca4513e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/chips/call/ui/viewmodel/CallChipViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/chips/call/ui/viewmodel/CallChipViewModel.kt
@@ -23,8 +23,11 @@ import com.android.systemui.common.shared.model.ContentDescription
import com.android.systemui.common.shared.model.Icon
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
+import com.android.systemui.log.LogBuffer
+import com.android.systemui.log.core.LogLevel
import com.android.systemui.plugins.ActivityStarter
import com.android.systemui.res.R
+import com.android.systemui.statusbar.chips.StatusBarChipsLog
import com.android.systemui.statusbar.chips.call.domain.interactor.CallChipInteractor
import com.android.systemui.statusbar.chips.ui.model.ColorsModel
import com.android.systemui.statusbar.chips.ui.model.OngoingActivityChipModel
@@ -48,12 +51,13 @@ constructor(
interactor: CallChipInteractor,
systemClock: SystemClock,
private val activityStarter: ActivityStarter,
+ @StatusBarChipsLog private val logger: LogBuffer,
) : OngoingActivityChipViewModel {
override val chip: StateFlow<OngoingActivityChipModel> =
interactor.ongoingCallState
.map { state ->
when (state) {
- is OngoingCallModel.NoCall -> OngoingActivityChipModel.Hidden
+ is OngoingCallModel.NoCall -> OngoingActivityChipModel.Hidden()
is OngoingCallModel.InCall -> {
// This block mimics OngoingCallController#updateChip.
if (state.startTimeMs <= 0L) {
@@ -78,7 +82,7 @@ constructor(
}
}
}
- .stateIn(scope, SharingStarted.WhileSubscribed(), OngoingActivityChipModel.Hidden)
+ .stateIn(scope, SharingStarted.WhileSubscribed(), OngoingActivityChipModel.Hidden())
private fun getOnClickListener(state: OngoingCallModel.InCall): View.OnClickListener? {
if (state.intent == null) {
@@ -86,9 +90,9 @@ constructor(
}
return View.OnClickListener { view ->
+ logger.log(TAG, LogLevel.INFO, {}, { "Chip clicked" })
val backgroundView =
view.requireViewById<ChipBackgroundContainer>(R.id.ongoing_activity_chip_background)
- // TODO(b/332662551): Log the click event.
// This mimics OngoingCallController#updateChipClickListener.
activityStarter.postStartActivityDismissingKeyguard(
state.intent,
@@ -108,5 +112,6 @@ constructor(
R.string.ongoing_phone_call_content_description,
),
)
+ private const val TAG = "CallVM"
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/chips/casttootherdevice/domain/interactor/MediaRouterChipInteractor.kt b/packages/SystemUI/src/com/android/systemui/statusbar/chips/casttootherdevice/domain/interactor/MediaRouterChipInteractor.kt
index 21f301c47467..7c95f1e42080 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/chips/casttootherdevice/domain/interactor/MediaRouterChipInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/chips/casttootherdevice/domain/interactor/MediaRouterChipInteractor.kt
@@ -18,7 +18,10 @@ package com.android.systemui.statusbar.chips.casttootherdevice.domain.interactor
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
+import com.android.systemui.log.LogBuffer
+import com.android.systemui.log.core.LogLevel
import com.android.systemui.mediarouter.data.repository.MediaRouterRepository
+import com.android.systemui.statusbar.chips.StatusBarChipsLog
import com.android.systemui.statusbar.chips.casttootherdevice.domain.model.MediaRouterCastModel
import com.android.systemui.statusbar.policy.CastDevice
import javax.inject.Inject
@@ -38,6 +41,7 @@ class MediaRouterChipInteractor
constructor(
@Application private val scope: CoroutineScope,
private val mediaRouterRepository: MediaRouterRepository,
+ @StatusBarChipsLog private val logger: LogBuffer,
) {
private val activeCastDevice: StateFlow<CastDevice?> =
mediaRouterRepository.castDevices
@@ -49,8 +53,10 @@ constructor(
activeCastDevice
.map {
if (it != null) {
- MediaRouterCastModel.Casting
+ logger.log(TAG, LogLevel.INFO, { str1 = it.name }, { "State: Casting($str1)" })
+ MediaRouterCastModel.Casting(deviceName = it.name)
} else {
+ logger.log(TAG, LogLevel.INFO, {}, { "State: DoingNothing" })
MediaRouterCastModel.DoingNothing
}
}
@@ -60,4 +66,8 @@ constructor(
fun stopCasting() {
activeCastDevice.value?.let { mediaRouterRepository.stopCasting(it) }
}
+
+ companion object {
+ private const val TAG = "MediaRouter"
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/chips/casttootherdevice/domain/model/MediaRouterCastModel.kt b/packages/SystemUI/src/com/android/systemui/statusbar/chips/casttootherdevice/domain/model/MediaRouterCastModel.kt
index b228922d1721..1f84d7cb60b4 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/chips/casttootherdevice/domain/model/MediaRouterCastModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/chips/casttootherdevice/domain/model/MediaRouterCastModel.kt
@@ -21,6 +21,10 @@ sealed interface MediaRouterCastModel {
/** MediaRouter isn't aware of any active cast. */
data object DoingNothing : MediaRouterCastModel
- /** MediaRouter has an active cast. */
- data object Casting : MediaRouterCastModel
+ /**
+ * MediaRouter has an active cast.
+ *
+ * @property deviceName the name of the device receiving the cast.
+ */
+ data class Casting(val deviceName: String?) : MediaRouterCastModel
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/chips/casttootherdevice/ui/view/EndCastScreenToOtherDeviceDialogDelegate.kt b/packages/SystemUI/src/com/android/systemui/statusbar/chips/casttootherdevice/ui/view/EndCastScreenToOtherDeviceDialogDelegate.kt
index ffb20a7fd3b8..6ea72b97cb3a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/chips/casttootherdevice/ui/view/EndCastScreenToOtherDeviceDialogDelegate.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/chips/casttootherdevice/ui/view/EndCastScreenToOtherDeviceDialogDelegate.kt
@@ -16,7 +16,9 @@
package com.android.systemui.statusbar.chips.casttootherdevice.ui.view
+import android.content.Context
import android.os.Bundle
+import com.android.systemui.mediaprojection.data.model.MediaProjectionState
import com.android.systemui.res.R
import com.android.systemui.statusbar.chips.casttootherdevice.ui.viewmodel.CastToOtherDeviceChipViewModel.Companion.CAST_TO_OTHER_DEVICE_ICON
import com.android.systemui.statusbar.chips.mediaprojection.domain.model.ProjectionChipModel
@@ -26,6 +28,7 @@ import com.android.systemui.statusbar.phone.SystemUIDialog
/** A dialog that lets the user stop an ongoing cast-screen-to-other-device event. */
class EndCastScreenToOtherDeviceDialogDelegate(
private val endMediaProjectionDialogHelper: EndMediaProjectionDialogHelper,
+ private val context: Context,
private val stopAction: () -> Unit,
private val state: ProjectionChipModel.Projecting,
) : SystemUIDialog.Delegate {
@@ -36,21 +39,52 @@ class EndCastScreenToOtherDeviceDialogDelegate(
override fun beforeCreate(dialog: SystemUIDialog, savedInstanceState: Bundle?) {
with(dialog) {
setIcon(CAST_TO_OTHER_DEVICE_ICON)
- setTitle(R.string.cast_screen_to_other_device_stop_dialog_title)
- // TODO(b/332662551): Include device name in this string.
- setMessage(
- endMediaProjectionDialogHelper.getDialogMessage(
- state.projectionState,
- genericMessageResId = R.string.cast_screen_to_other_device_stop_dialog_message,
- specificAppMessageResId =
- R.string.cast_screen_to_other_device_stop_dialog_message_specific_app,
- )
- )
+ setTitle(R.string.cast_to_other_device_stop_dialog_title)
+ setMessage(getMessage())
// No custom on-click, because the dialog will automatically be dismissed when the
// button is clicked anyway.
setNegativeButton(R.string.close_dialog_button, /* onClick= */ null)
- setPositiveButton(R.string.cast_to_other_device_stop_dialog_button) { _, _ ->
- stopAction.invoke()
+ setPositiveButton(
+ R.string.cast_to_other_device_stop_dialog_button,
+ endMediaProjectionDialogHelper.wrapStopAction(stopAction),
+ )
+ }
+ }
+
+ private fun getMessage(): String {
+ val hostDeviceName = state.projectionState.hostDeviceName
+ return if (state.projectionState is MediaProjectionState.Projecting.SingleTask) {
+ val appBeingSharedName =
+ endMediaProjectionDialogHelper.getAppName(state.projectionState)
+ if (appBeingSharedName != null && hostDeviceName != null) {
+ context.getString(
+ R.string.cast_to_other_device_stop_dialog_message_specific_app_with_device,
+ appBeingSharedName,
+ hostDeviceName,
+ )
+ } else if (appBeingSharedName != null) {
+ context.getString(
+ R.string.cast_to_other_device_stop_dialog_message_specific_app,
+ appBeingSharedName,
+ )
+ } else if (hostDeviceName != null) {
+ context.getString(
+ R.string.cast_to_other_device_stop_dialog_message_generic_with_device,
+ hostDeviceName,
+ )
+ } else {
+ context.getString(R.string.cast_to_other_device_stop_dialog_message_generic)
+ }
+ } else {
+ if (hostDeviceName != null) {
+ context.getString(
+ R.string.cast_to_other_device_stop_dialog_message_entire_screen_with_device,
+ hostDeviceName,
+ )
+ } else {
+ context.getString(
+ R.string.cast_to_other_device_stop_dialog_message_entire_screen,
+ )
}
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/chips/casttootherdevice/ui/view/EndGenericCastToOtherDeviceDialogDelegate.kt b/packages/SystemUI/src/com/android/systemui/statusbar/chips/casttootherdevice/ui/view/EndGenericCastToOtherDeviceDialogDelegate.kt
index afe67b489abb..b0c832172776 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/chips/casttootherdevice/ui/view/EndGenericCastToOtherDeviceDialogDelegate.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/chips/casttootherdevice/ui/view/EndGenericCastToOtherDeviceDialogDelegate.kt
@@ -16,6 +16,7 @@
package com.android.systemui.statusbar.chips.casttootherdevice.ui.view
+import android.content.Context
import android.os.Bundle
import com.android.systemui.res.R
import com.android.systemui.statusbar.chips.casttootherdevice.ui.viewmodel.CastToOtherDeviceChipViewModel.Companion.CAST_TO_OTHER_DEVICE_ICON
@@ -29,6 +30,8 @@ import com.android.systemui.statusbar.phone.SystemUIDialog
*/
class EndGenericCastToOtherDeviceDialogDelegate(
private val endMediaProjectionDialogHelper: EndMediaProjectionDialogHelper,
+ private val context: Context,
+ private val deviceName: String?,
private val stopAction: () -> Unit,
) : SystemUIDialog.Delegate {
override fun createDialog(): SystemUIDialog {
@@ -36,17 +39,26 @@ class EndGenericCastToOtherDeviceDialogDelegate(
}
override fun beforeCreate(dialog: SystemUIDialog, savedInstanceState: Bundle?) {
+ val message =
+ if (deviceName != null) {
+ context.getString(
+ R.string.cast_to_other_device_stop_dialog_message_generic_with_device,
+ deviceName,
+ )
+ } else {
+ context.getString(R.string.cast_to_other_device_stop_dialog_message_generic)
+ }
with(dialog) {
setIcon(CAST_TO_OTHER_DEVICE_ICON)
setTitle(R.string.cast_to_other_device_stop_dialog_title)
- // TODO(b/332662551): Include device name in this string.
- setMessage(R.string.cast_to_other_device_stop_dialog_message)
+ setMessage(message)
// No custom on-click, because the dialog will automatically be dismissed when the
// button is clicked anyway.
setNegativeButton(R.string.close_dialog_button, /* onClick= */ null)
- setPositiveButton(R.string.cast_to_other_device_stop_dialog_button) { _, _ ->
- stopAction.invoke()
- }
+ setPositiveButton(
+ R.string.cast_to_other_device_stop_dialog_button,
+ endMediaProjectionDialogHelper.wrapStopAction(stopAction),
+ )
}
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/chips/casttootherdevice/ui/viewmodel/CastToOtherDeviceChipViewModel.kt b/packages/SystemUI/src/com/android/systemui/statusbar/chips/casttootherdevice/ui/viewmodel/CastToOtherDeviceChipViewModel.kt
index 2eff33610754..d9b0504308f8 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/chips/casttootherdevice/ui/viewmodel/CastToOtherDeviceChipViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/chips/casttootherdevice/ui/viewmodel/CastToOtherDeviceChipViewModel.kt
@@ -16,13 +16,19 @@
package com.android.systemui.statusbar.chips.casttootherdevice.ui.viewmodel
+import android.content.Context
import androidx.annotation.DrawableRes
+import com.android.internal.jank.Cuj
+import com.android.systemui.animation.DialogCuj
import com.android.systemui.animation.DialogTransitionAnimator
import com.android.systemui.common.shared.model.ContentDescription
import com.android.systemui.common.shared.model.Icon
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
+import com.android.systemui.log.LogBuffer
+import com.android.systemui.log.core.LogLevel
import com.android.systemui.res.R
+import com.android.systemui.statusbar.chips.StatusBarChipsLog
import com.android.systemui.statusbar.chips.casttootherdevice.domain.interactor.MediaRouterChipInteractor
import com.android.systemui.statusbar.chips.casttootherdevice.domain.model.MediaRouterCastModel
import com.android.systemui.statusbar.chips.casttootherdevice.ui.view.EndCastScreenToOtherDeviceDialogDelegate
@@ -32,6 +38,7 @@ import com.android.systemui.statusbar.chips.mediaprojection.domain.model.Project
import com.android.systemui.statusbar.chips.mediaprojection.ui.view.EndMediaProjectionDialogHelper
import com.android.systemui.statusbar.chips.ui.model.ColorsModel
import com.android.systemui.statusbar.chips.ui.model.OngoingActivityChipModel
+import com.android.systemui.statusbar.chips.ui.viewmodel.ChipTransitionHelper
import com.android.systemui.statusbar.chips.ui.viewmodel.OngoingActivityChipViewModel
import com.android.systemui.statusbar.chips.ui.viewmodel.OngoingActivityChipViewModel.Companion.createDialogLaunchOnClickListener
import com.android.systemui.util.time.SystemClock
@@ -53,11 +60,13 @@ class CastToOtherDeviceChipViewModel
@Inject
constructor(
@Application private val scope: CoroutineScope,
+ private val context: Context,
private val mediaProjectionChipInteractor: MediaProjectionChipInteractor,
private val mediaRouterChipInteractor: MediaRouterChipInteractor,
private val systemClock: SystemClock,
private val dialogTransitionAnimator: DialogTransitionAnimator,
private val endMediaProjectionDialogHelper: EndMediaProjectionDialogHelper,
+ @StatusBarChipsLog private val logger: LogBuffer,
) : OngoingActivityChipViewModel {
/**
* The cast chip to show, based only on MediaProjection API events.
@@ -70,18 +79,18 @@ constructor(
mediaProjectionChipInteractor.projection
.map { projectionModel ->
when (projectionModel) {
- is ProjectionChipModel.NotProjecting -> OngoingActivityChipModel.Hidden
+ is ProjectionChipModel.NotProjecting -> OngoingActivityChipModel.Hidden()
is ProjectionChipModel.Projecting -> {
if (projectionModel.type != ProjectionChipModel.Type.CAST_TO_OTHER_DEVICE) {
- OngoingActivityChipModel.Hidden
+ OngoingActivityChipModel.Hidden()
} else {
createCastScreenToOtherDeviceChip(projectionModel)
}
}
}
}
- // See b/347726238.
- .stateIn(scope, SharingStarted.Lazily, OngoingActivityChipModel.Hidden)
+ // See b/347726238 for [SharingStarted.Lazily] reasoning.
+ .stateIn(scope, SharingStarted.Lazily, OngoingActivityChipModel.Hidden())
/**
* The cast chip to show, based only on MediaRouter API events.
@@ -105,7 +114,7 @@ constructor(
mediaRouterChipInteractor.mediaRouterCastingState
.map { routerModel ->
when (routerModel) {
- is MediaRouterCastModel.DoingNothing -> OngoingActivityChipModel.Hidden
+ is MediaRouterCastModel.DoingNothing -> OngoingActivityChipModel.Hidden()
is MediaRouterCastModel.Casting -> {
// A consequence of b/269975671 is that MediaRouter will mark a device as
// casting before casting has actually started. To alleviate this bug a bit,
@@ -115,14 +124,24 @@ constructor(
// This does mean that the audio-only casting chip will *never* show a
// timer, because audio-only casting never activates the MediaProjection
// APIs and those are the only cast APIs that show a timer.
- createIconOnlyCastChip()
+ createIconOnlyCastChip(routerModel.deviceName)
}
}
}
- .stateIn(scope, SharingStarted.WhileSubscribed(), OngoingActivityChipModel.Hidden)
+ .stateIn(scope, SharingStarted.WhileSubscribed(), OngoingActivityChipModel.Hidden())
- override val chip: StateFlow<OngoingActivityChipModel> =
+ private val internalChip: StateFlow<OngoingActivityChipModel> =
combine(projectionChip, routerChip) { projection, router ->
+ logger.log(
+ TAG,
+ LogLevel.INFO,
+ {
+ str1 = projection.logName
+ str2 = router.logName
+ },
+ { "projectionChip=$str1 > routerChip=$str2" }
+ )
+
// A consequence of b/269975671 is that MediaRouter and MediaProjection APIs fire at
// different times when *screen* casting:
//
@@ -145,14 +164,24 @@ constructor(
router
}
}
- .stateIn(scope, SharingStarted.WhileSubscribed(), OngoingActivityChipModel.Hidden)
+ .stateIn(scope, SharingStarted.WhileSubscribed(), OngoingActivityChipModel.Hidden())
+
+ private val hideChipDuringDialogTransitionHelper = ChipTransitionHelper(scope)
+
+ override val chip: StateFlow<OngoingActivityChipModel> =
+ hideChipDuringDialogTransitionHelper.createChipFlow(internalChip)
/** Stops the currently active projection. */
- private fun stopProjecting() {
+ private fun stopProjectingFromDialog() {
+ logger.log(TAG, LogLevel.INFO, {}, { "Stop casting requested from dialog (projection)" })
+ hideChipDuringDialogTransitionHelper.onActivityStoppedFromDialog()
mediaProjectionChipInteractor.stopProjecting()
}
- private fun stopMediaRouterCasting() {
+ /** Stops the currently active media route. */
+ private fun stopMediaRouterCastingFromDialog() {
+ logger.log(TAG, LogLevel.INFO, {}, { "Stop casting requested from dialog (router)" })
+ hideChipDuringDialogTransitionHelper.onActivityStoppedFromDialog()
mediaRouterChipInteractor.stopCasting()
}
@@ -174,11 +203,14 @@ constructor(
createDialogLaunchOnClickListener(
createCastScreenToOtherDeviceDialogDelegate(state),
dialogTransitionAnimator,
+ DialogCuj(Cuj.CUJ_STATUS_BAR_LAUNCH_DIALOG_FROM_CHIP, tag = "Cast to other device"),
+ logger,
+ TAG,
),
)
}
- private fun createIconOnlyCastChip(): OngoingActivityChipModel.Shown {
+ private fun createIconOnlyCastChip(deviceName: String?): OngoingActivityChipModel.Shown {
return OngoingActivityChipModel.Shown.IconOnly(
icon =
Icon.Resource(
@@ -188,8 +220,14 @@ constructor(
),
colors = ColorsModel.Red,
createDialogLaunchOnClickListener(
- createGenericCastToOtherDeviceDialogDelegate(),
+ createGenericCastToOtherDeviceDialogDelegate(deviceName),
dialogTransitionAnimator,
+ DialogCuj(
+ Cuj.CUJ_STATUS_BAR_LAUNCH_DIALOG_FROM_CHIP,
+ tag = "Cast to other device audio only",
+ ),
+ logger,
+ TAG,
),
)
}
@@ -199,17 +237,21 @@ constructor(
) =
EndCastScreenToOtherDeviceDialogDelegate(
endMediaProjectionDialogHelper,
- stopAction = this::stopProjecting,
+ context,
+ stopAction = this::stopProjectingFromDialog,
state,
)
- private fun createGenericCastToOtherDeviceDialogDelegate() =
+ private fun createGenericCastToOtherDeviceDialogDelegate(deviceName: String?) =
EndGenericCastToOtherDeviceDialogDelegate(
endMediaProjectionDialogHelper,
- stopAction = this::stopMediaRouterCasting,
+ context,
+ deviceName,
+ stopAction = this::stopMediaRouterCastingFromDialog,
)
companion object {
@DrawableRes val CAST_TO_OTHER_DEVICE_ICON = R.drawable.ic_cast_connected
+ private const val TAG = "CastToOtherVM"
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/chips/mediaprojection/domain/interactor/MediaProjectionChipInteractor.kt b/packages/SystemUI/src/com/android/systemui/statusbar/chips/mediaprojection/domain/interactor/MediaProjectionChipInteractor.kt
index 20ebae72e01d..191c221f43c6 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/chips/mediaprojection/domain/interactor/MediaProjectionChipInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/chips/mediaprojection/domain/interactor/MediaProjectionChipInteractor.kt
@@ -19,8 +19,11 @@ package com.android.systemui.statusbar.chips.mediaprojection.domain.interactor
import android.content.pm.PackageManager
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
+import com.android.systemui.log.LogBuffer
+import com.android.systemui.log.core.LogLevel
import com.android.systemui.mediaprojection.data.model.MediaProjectionState
import com.android.systemui.mediaprojection.data.repository.MediaProjectionRepository
+import com.android.systemui.statusbar.chips.StatusBarChipsLog
import com.android.systemui.statusbar.chips.mediaprojection.domain.model.ProjectionChipModel
import com.android.systemui.util.Utils
import javax.inject.Inject
@@ -45,12 +48,16 @@ constructor(
@Application private val scope: CoroutineScope,
private val mediaProjectionRepository: MediaProjectionRepository,
private val packageManager: PackageManager,
+ @StatusBarChipsLog private val logger: LogBuffer,
) {
val projection: StateFlow<ProjectionChipModel> =
mediaProjectionRepository.mediaProjectionState
.map { state ->
when (state) {
- is MediaProjectionState.NotProjecting -> ProjectionChipModel.NotProjecting
+ is MediaProjectionState.NotProjecting -> {
+ logger.log(TAG, LogLevel.INFO, {}, { "State: NotProjecting" })
+ ProjectionChipModel.NotProjecting
+ }
is MediaProjectionState.Projecting -> {
val type =
if (isProjectionToOtherDevice(state.hostPackage)) {
@@ -58,6 +65,16 @@ constructor(
} else {
ProjectionChipModel.Type.SHARE_TO_APP
}
+ logger.log(
+ TAG,
+ LogLevel.INFO,
+ {
+ str1 = type.name
+ str2 = state.hostPackage
+ str3 = state.hostDeviceName
+ },
+ { "State: Projecting(type=$str1 hostPackage=$str2 hostDevice=$str3)" }
+ )
ProjectionChipModel.Projecting(type, state)
}
}
@@ -81,4 +98,8 @@ constructor(
// marked as going to a different device, even if that isn't always true. See b/321078669.
return Utils.isHeadlessRemoteDisplayProvider(packageManager, packageName)
}
+
+ companion object {
+ private const val TAG = "MediaProjection"
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/chips/mediaprojection/ui/view/EndMediaProjectionDialogHelper.kt b/packages/SystemUI/src/com/android/systemui/statusbar/chips/mediaprojection/ui/view/EndMediaProjectionDialogHelper.kt
index 402306a12144..2d9ccb7b09b0 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/chips/mediaprojection/ui/view/EndMediaProjectionDialogHelper.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/chips/mediaprojection/ui/view/EndMediaProjectionDialogHelper.kt
@@ -16,13 +16,10 @@
package com.android.systemui.statusbar.chips.mediaprojection.ui.view
-import android.annotation.StringRes
import android.app.ActivityManager
-import android.content.Context
+import android.content.DialogInterface
import android.content.pm.PackageManager
-import android.text.Html
-import android.text.Html.FROM_HTML_MODE_LEGACY
-import android.text.TextUtils
+import com.android.systemui.animation.DialogTransitionAnimator
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.mediaprojection.data.model.MediaProjectionState
import com.android.systemui.statusbar.phone.SystemUIDialog
@@ -34,64 +31,62 @@ class EndMediaProjectionDialogHelper
@Inject
constructor(
private val dialogFactory: SystemUIDialog.Factory,
+ private val dialogTransitionAnimator: DialogTransitionAnimator,
private val packageManager: PackageManager,
- private val context: Context
) {
/** Creates a new [SystemUIDialog] using the given delegate. */
fun createDialog(delegate: SystemUIDialog.Delegate): SystemUIDialog {
return dialogFactory.create(delegate)
}
- /** See other [getDialogMessage]. */
- fun getDialogMessage(
- state: MediaProjectionState.Projecting,
- @StringRes genericMessageResId: Int,
- @StringRes specificAppMessageResId: Int,
- ): CharSequence {
+ /**
+ * Returns the click listener that should be invoked if a user clicks "Stop" on the end media
+ * projection dialog.
+ *
+ * The click listener will invoke [stopAction] and also do some UI manipulation.
+ *
+ * @param stopAction an action that, when invoked, should notify system API(s) that the media
+ * projection should be stopped.
+ */
+ fun wrapStopAction(stopAction: () -> Unit): DialogInterface.OnClickListener {
+ return DialogInterface.OnClickListener { _, _ ->
+ // If the projection is stopped, then the chip will disappear, so we don't want the
+ // dialog to animate back into the chip just for the chip to disappear in a few frames.
+ dialogTransitionAnimator.disableAllCurrentDialogsExitAnimations()
+ stopAction.invoke()
+ // TODO(b/332662551): If the projection is stopped, there's a brief moment where the
+ // dialog closes and the chip re-shows because the system APIs haven't come back and
+ // told SysUI that the projection has officially stopped. It would be great for the chip
+ // to not re-show at all.
+ }
+ }
+
+ fun getAppName(state: MediaProjectionState.Projecting): CharSequence? {
val specificTaskInfo =
if (state is MediaProjectionState.Projecting.SingleTask) {
state.task
} else {
null
}
- return getDialogMessage(specificTaskInfo, genericMessageResId, specificAppMessageResId)
+ return getAppName(specificTaskInfo)
+ }
+
+ fun getAppName(specificTaskInfo: ActivityManager.RunningTaskInfo?): CharSequence? {
+ val packageName = specificTaskInfo?.baseIntent?.component?.packageName ?: return null
+ return getAppName(packageName)
}
/**
- * Returns the message to show in the dialog based on the specific media projection state.
- *
- * @param genericMessageResId a res ID for a more generic "end projection" message
- * @param specificAppMessageResId a res ID for an "end projection" message that also lets us
- * specify which app is currently being projected.
+ * Returns the human-readable application name for the given package, or null if it couldn't be
+ * found for any reason.
*/
- fun getDialogMessage(
- specificTaskInfo: ActivityManager.RunningTaskInfo?,
- @StringRes genericMessageResId: Int,
- @StringRes specificAppMessageResId: Int,
- ): CharSequence {
- if (specificTaskInfo == null) {
- return context.getString(genericMessageResId)
- }
- val packageName =
- specificTaskInfo.baseIntent.component?.packageName
- ?: return context.getString(genericMessageResId)
+ fun getAppName(packageName: String): CharSequence? {
return try {
val appInfo = packageManager.getApplicationInfo(packageName, 0)
- val appName = appInfo.loadLabel(packageManager)
- getSpecificAppMessageText(specificAppMessageResId, appName)
+ appInfo.loadLabel(packageManager)
} catch (e: PackageManager.NameNotFoundException) {
// TODO(b/332662551): Log this error.
- context.getString(genericMessageResId)
+ null
}
}
-
- private fun getSpecificAppMessageText(
- @StringRes specificAppMessageResId: Int,
- appName: CharSequence,
- ): CharSequence {
- // https://developer.android.com/guide/topics/resources/string-resource#StylingWithHTML
- val escapedAppName = TextUtils.htmlEncode(appName.toString())
- val text = context.getString(specificAppMessageResId, escapedAppName)
- return Html.fromHtml(text, FROM_HTML_MODE_LEGACY)
- }
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/chips/screenrecord/domain/interactor/ScreenRecordChipInteractor.kt b/packages/SystemUI/src/com/android/systemui/statusbar/chips/screenrecord/domain/interactor/ScreenRecordChipInteractor.kt
index 43b1d1681a4c..28a8385e5f77 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/chips/screenrecord/domain/interactor/ScreenRecordChipInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/chips/screenrecord/domain/interactor/ScreenRecordChipInteractor.kt
@@ -18,10 +18,13 @@ package com.android.systemui.statusbar.chips.screenrecord.domain.interactor
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
+import com.android.systemui.log.LogBuffer
+import com.android.systemui.log.core.LogLevel
import com.android.systemui.mediaprojection.data.model.MediaProjectionState
import com.android.systemui.mediaprojection.data.repository.MediaProjectionRepository
import com.android.systemui.screenrecord.data.model.ScreenRecordModel
import com.android.systemui.screenrecord.data.repository.ScreenRecordRepository
+import com.android.systemui.statusbar.chips.StatusBarChipsLog
import com.android.systemui.statusbar.chips.screenrecord.domain.model.ScreenRecordChipModel
import javax.inject.Inject
import kotlinx.coroutines.CoroutineScope
@@ -39,6 +42,7 @@ constructor(
@Application private val scope: CoroutineScope,
private val screenRecordRepository: ScreenRecordRepository,
private val mediaProjectionRepository: MediaProjectionRepository,
+ @StatusBarChipsLog private val logger: LogBuffer,
) {
val screenRecordState: StateFlow<ScreenRecordChipModel> =
// ScreenRecordRepository has the main "is the screen being recorded?" state, and
@@ -49,9 +53,19 @@ constructor(
mediaProjectionRepository.mediaProjectionState,
) { screenRecordState, mediaProjectionState ->
when (screenRecordState) {
- is ScreenRecordModel.DoingNothing -> ScreenRecordChipModel.DoingNothing
- is ScreenRecordModel.Starting ->
+ is ScreenRecordModel.DoingNothing -> {
+ logger.log(TAG, LogLevel.INFO, {}, { "State: DoingNothing" })
+ ScreenRecordChipModel.DoingNothing
+ }
+ is ScreenRecordModel.Starting -> {
+ logger.log(
+ TAG,
+ LogLevel.INFO,
+ { long1 = screenRecordState.millisUntilStarted },
+ { "State: Starting($long1)" }
+ )
ScreenRecordChipModel.Starting(screenRecordState.millisUntilStarted)
+ }
is ScreenRecordModel.Recording -> {
val recordedTask =
if (
@@ -61,6 +75,12 @@ constructor(
} else {
null
}
+ logger.log(
+ TAG,
+ LogLevel.INFO,
+ { str1 = recordedTask?.baseIntent?.component?.packageName },
+ { "State: Recording(taskPackage=$str1)" }
+ )
ScreenRecordChipModel.Recording(recordedTask)
}
}
@@ -71,4 +91,8 @@ constructor(
fun stopRecording() {
scope.launch { screenRecordRepository.stopRecording() }
}
+
+ companion object {
+ private const val TAG = "ScreenRecord"
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/chips/screenrecord/ui/view/EndScreenRecordingDialogDelegate.kt b/packages/SystemUI/src/com/android/systemui/statusbar/chips/screenrecord/ui/view/EndScreenRecordingDialogDelegate.kt
index 9adbff9d304a..72656ca1934c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/chips/screenrecord/ui/view/EndScreenRecordingDialogDelegate.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/chips/screenrecord/ui/view/EndScreenRecordingDialogDelegate.kt
@@ -17,6 +17,7 @@
package com.android.systemui.statusbar.chips.screenrecord.ui.view
import android.app.ActivityManager
+import android.content.Context
import android.os.Bundle
import com.android.systemui.res.R
import com.android.systemui.statusbar.chips.mediaprojection.ui.view.EndMediaProjectionDialogHelper
@@ -26,6 +27,7 @@ import com.android.systemui.statusbar.phone.SystemUIDialog
/** A dialog that lets the user stop an ongoing screen recording. */
class EndScreenRecordingDialogDelegate(
private val endMediaProjectionDialogHelper: EndMediaProjectionDialogHelper,
+ val context: Context,
private val stopAction: () -> Unit,
private val recordedTask: ActivityManager.RunningTaskInfo?,
) : SystemUIDialog.Delegate {
@@ -35,22 +37,25 @@ class EndScreenRecordingDialogDelegate(
}
override fun beforeCreate(dialog: SystemUIDialog, savedInstanceState: Bundle?) {
+ val appName = endMediaProjectionDialogHelper.getAppName(recordedTask)
+ val message =
+ if (appName != null) {
+ context.getString(R.string.screenrecord_stop_dialog_message_specific_app, appName)
+ } else {
+ context.getString(R.string.screenrecord_stop_dialog_message)
+ }
+
with(dialog) {
setIcon(ScreenRecordChipViewModel.ICON)
setTitle(R.string.screenrecord_stop_dialog_title)
- setMessage(
- endMediaProjectionDialogHelper.getDialogMessage(
- recordedTask,
- genericMessageResId = R.string.screenrecord_stop_dialog_message,
- specificAppMessageResId = R.string.screenrecord_stop_dialog_message_specific_app
- )
- )
+ setMessage(message)
// No custom on-click, because the dialog will automatically be dismissed when the
// button is clicked anyway.
setNegativeButton(R.string.close_dialog_button, /* onClick= */ null)
- setPositiveButton(R.string.screenrecord_stop_dialog_button) { _, _ ->
- stopAction.invoke()
- }
+ setPositiveButton(
+ R.string.screenrecord_stop_dialog_button,
+ endMediaProjectionDialogHelper.wrapStopAction(stopAction),
+ )
}
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/chips/screenrecord/ui/viewmodel/ScreenRecordChipViewModel.kt b/packages/SystemUI/src/com/android/systemui/statusbar/chips/screenrecord/ui/viewmodel/ScreenRecordChipViewModel.kt
index 53679f1c0a6c..fcf3de42eb32 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/chips/screenrecord/ui/viewmodel/ScreenRecordChipViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/chips/screenrecord/ui/viewmodel/ScreenRecordChipViewModel.kt
@@ -17,20 +17,28 @@
package com.android.systemui.statusbar.chips.screenrecord.ui.viewmodel
import android.app.ActivityManager
+import android.content.Context
import androidx.annotation.DrawableRes
+import com.android.internal.jank.Cuj
+import com.android.systemui.animation.DialogCuj
import com.android.systemui.animation.DialogTransitionAnimator
import com.android.systemui.common.shared.model.ContentDescription
import com.android.systemui.common.shared.model.Icon
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
+import com.android.systemui.log.LogBuffer
+import com.android.systemui.log.core.LogLevel
import com.android.systemui.res.R
import com.android.systemui.screenrecord.data.model.ScreenRecordModel.Starting.Companion.toCountdownSeconds
+import com.android.systemui.statusbar.chips.StatusBarChipsLog
import com.android.systemui.statusbar.chips.mediaprojection.ui.view.EndMediaProjectionDialogHelper
import com.android.systemui.statusbar.chips.screenrecord.domain.interactor.ScreenRecordChipInteractor
import com.android.systemui.statusbar.chips.screenrecord.domain.model.ScreenRecordChipModel
import com.android.systemui.statusbar.chips.screenrecord.ui.view.EndScreenRecordingDialogDelegate
+import com.android.systemui.statusbar.chips.sharetoapp.ui.viewmodel.ShareToAppChipViewModel
import com.android.systemui.statusbar.chips.ui.model.ColorsModel
import com.android.systemui.statusbar.chips.ui.model.OngoingActivityChipModel
+import com.android.systemui.statusbar.chips.ui.viewmodel.ChipTransitionHelper
import com.android.systemui.statusbar.chips.ui.viewmodel.OngoingActivityChipViewModel
import com.android.systemui.statusbar.chips.ui.viewmodel.OngoingActivityChipViewModel.Companion.createDialogLaunchOnClickListener
import com.android.systemui.util.time.SystemClock
@@ -47,16 +55,20 @@ class ScreenRecordChipViewModel
@Inject
constructor(
@Application private val scope: CoroutineScope,
+ private val context: Context,
private val interactor: ScreenRecordChipInteractor,
+ private val shareToAppChipViewModel: ShareToAppChipViewModel,
private val systemClock: SystemClock,
private val endMediaProjectionDialogHelper: EndMediaProjectionDialogHelper,
private val dialogTransitionAnimator: DialogTransitionAnimator,
+ @StatusBarChipsLog private val logger: LogBuffer,
) : OngoingActivityChipViewModel {
- override val chip: StateFlow<OngoingActivityChipModel> =
+
+ private val internalChip =
interactor.screenRecordState
.map { state ->
when (state) {
- is ScreenRecordChipModel.DoingNothing -> OngoingActivityChipModel.Hidden
+ is ScreenRecordChipModel.DoingNothing -> OngoingActivityChipModel.Hidden()
is ScreenRecordChipModel.Starting -> {
OngoingActivityChipModel.Shown.Countdown(
colors = ColorsModel.Red,
@@ -77,25 +89,45 @@ constructor(
createDialogLaunchOnClickListener(
createDelegate(state.recordedTask),
dialogTransitionAnimator,
+ DialogCuj(
+ Cuj.CUJ_STATUS_BAR_LAUNCH_DIALOG_FROM_CHIP,
+ tag = "Screen record",
+ ),
+ logger,
+ TAG,
),
)
}
}
}
- // See b/347726238.
- .stateIn(scope, SharingStarted.Lazily, OngoingActivityChipModel.Hidden)
+ // See b/347726238 for [SharingStarted.Lazily] reasoning.
+ .stateIn(scope, SharingStarted.Lazily, OngoingActivityChipModel.Hidden())
+
+ private val chipTransitionHelper = ChipTransitionHelper(scope)
+
+ override val chip: StateFlow<OngoingActivityChipModel> =
+ chipTransitionHelper.createChipFlow(internalChip)
private fun createDelegate(
recordedTask: ActivityManager.RunningTaskInfo?
): EndScreenRecordingDialogDelegate {
return EndScreenRecordingDialogDelegate(
endMediaProjectionDialogHelper,
- stopAction = interactor::stopRecording,
+ context,
+ stopAction = this::stopRecordingFromDialog,
recordedTask,
)
}
+ private fun stopRecordingFromDialog() {
+ logger.log(TAG, LogLevel.INFO, {}, { "Stop recording requested from dialog" })
+ chipTransitionHelper.onActivityStoppedFromDialog()
+ shareToAppChipViewModel.onRecordingStoppedFromDialog()
+ interactor.stopRecording()
+ }
+
companion object {
@DrawableRes val ICON = R.drawable.ic_screenrecord
+ private const val TAG = "ScreenRecordVM"
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/chips/sharetoapp/ui/view/EndShareToAppDialogDelegate.kt b/packages/SystemUI/src/com/android/systemui/statusbar/chips/sharetoapp/ui/view/EndShareToAppDialogDelegate.kt
index 7e7ef402b226..d10bd7705ce9 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/chips/sharetoapp/ui/view/EndShareToAppDialogDelegate.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/chips/sharetoapp/ui/view/EndShareToAppDialogDelegate.kt
@@ -16,7 +16,9 @@
package com.android.systemui.statusbar.chips.sharetoapp.ui.view
+import android.content.Context
import android.os.Bundle
+import com.android.systemui.mediaprojection.data.model.MediaProjectionState
import com.android.systemui.res.R
import com.android.systemui.statusbar.chips.mediaprojection.domain.model.ProjectionChipModel
import com.android.systemui.statusbar.chips.mediaprojection.ui.view.EndMediaProjectionDialogHelper
@@ -26,6 +28,7 @@ import com.android.systemui.statusbar.phone.SystemUIDialog
/** A dialog that lets the user stop an ongoing share-screen-to-app event. */
class EndShareToAppDialogDelegate(
private val endMediaProjectionDialogHelper: EndMediaProjectionDialogHelper,
+ private val context: Context,
private val stopAction: () -> Unit,
private val state: ProjectionChipModel.Projecting,
) : SystemUIDialog.Delegate {
@@ -37,18 +40,41 @@ class EndShareToAppDialogDelegate(
with(dialog) {
setIcon(SHARE_TO_APP_ICON)
setTitle(R.string.share_to_app_stop_dialog_title)
- setMessage(
- endMediaProjectionDialogHelper.getDialogMessage(
- state.projectionState,
- genericMessageResId = R.string.share_to_app_stop_dialog_message,
- specificAppMessageResId = R.string.share_to_app_stop_dialog_message_specific_app
- )
- )
+ setMessage(getMessage())
// No custom on-click, because the dialog will automatically be dismissed when the
// button is clicked anyway.
setNegativeButton(R.string.close_dialog_button, /* onClick= */ null)
- setPositiveButton(R.string.share_to_app_stop_dialog_button) { _, _ ->
- stopAction.invoke()
+ setPositiveButton(
+ R.string.share_to_app_stop_dialog_button,
+ endMediaProjectionDialogHelper.wrapStopAction(stopAction),
+ )
+ }
+ }
+
+ private fun getMessage(): String {
+ return if (state.projectionState is MediaProjectionState.Projecting.SingleTask) {
+ // If a single app is being shared, use the name of the app being shared in the dialog
+ val appBeingSharedName =
+ endMediaProjectionDialogHelper.getAppName(state.projectionState)
+ if (appBeingSharedName != null) {
+ context.getString(
+ R.string.share_to_app_stop_dialog_message_single_app_specific,
+ appBeingSharedName,
+ )
+ } else {
+ context.getString(R.string.share_to_app_stop_dialog_message_single_app_generic)
+ }
+ } else {
+ // Otherwise, use the name of the app *receiving* the share
+ val hostAppName =
+ endMediaProjectionDialogHelper.getAppName(state.projectionState.hostPackage)
+ if (hostAppName != null) {
+ context.getString(
+ R.string.share_to_app_stop_dialog_message_entire_screen_with_host_app,
+ hostAppName
+ )
+ } else {
+ context.getString(R.string.share_to_app_stop_dialog_message_entire_screen)
}
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/chips/sharetoapp/ui/viewmodel/ShareToAppChipViewModel.kt b/packages/SystemUI/src/com/android/systemui/statusbar/chips/sharetoapp/ui/viewmodel/ShareToAppChipViewModel.kt
index 8aef5a4e7629..85973fca4326 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/chips/sharetoapp/ui/viewmodel/ShareToAppChipViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/chips/sharetoapp/ui/viewmodel/ShareToAppChipViewModel.kt
@@ -16,19 +16,26 @@
package com.android.systemui.statusbar.chips.sharetoapp.ui.viewmodel
+import android.content.Context
import androidx.annotation.DrawableRes
+import com.android.internal.jank.Cuj
+import com.android.systemui.animation.DialogCuj
import com.android.systemui.animation.DialogTransitionAnimator
import com.android.systemui.common.shared.model.ContentDescription
import com.android.systemui.common.shared.model.Icon
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
+import com.android.systemui.log.LogBuffer
+import com.android.systemui.log.core.LogLevel
import com.android.systemui.res.R
+import com.android.systemui.statusbar.chips.StatusBarChipsLog
import com.android.systemui.statusbar.chips.mediaprojection.domain.interactor.MediaProjectionChipInteractor
import com.android.systemui.statusbar.chips.mediaprojection.domain.model.ProjectionChipModel
import com.android.systemui.statusbar.chips.mediaprojection.ui.view.EndMediaProjectionDialogHelper
import com.android.systemui.statusbar.chips.sharetoapp.ui.view.EndShareToAppDialogDelegate
import com.android.systemui.statusbar.chips.ui.model.ColorsModel
import com.android.systemui.statusbar.chips.ui.model.OngoingActivityChipModel
+import com.android.systemui.statusbar.chips.ui.viewmodel.ChipTransitionHelper
import com.android.systemui.statusbar.chips.ui.viewmodel.OngoingActivityChipViewModel
import com.android.systemui.statusbar.chips.ui.viewmodel.OngoingActivityChipViewModel.Companion.createDialogLaunchOnClickListener
import com.android.systemui.util.time.SystemClock
@@ -48,30 +55,53 @@ class ShareToAppChipViewModel
@Inject
constructor(
@Application private val scope: CoroutineScope,
+ private val context: Context,
private val mediaProjectionChipInteractor: MediaProjectionChipInteractor,
private val systemClock: SystemClock,
- private val dialogTransitionAnimator: DialogTransitionAnimator,
private val endMediaProjectionDialogHelper: EndMediaProjectionDialogHelper,
+ private val dialogTransitionAnimator: DialogTransitionAnimator,
+ @StatusBarChipsLog private val logger: LogBuffer,
) : OngoingActivityChipViewModel {
- override val chip: StateFlow<OngoingActivityChipModel> =
+ private val internalChip =
mediaProjectionChipInteractor.projection
.map { projectionModel ->
when (projectionModel) {
- is ProjectionChipModel.NotProjecting -> OngoingActivityChipModel.Hidden
+ is ProjectionChipModel.NotProjecting -> OngoingActivityChipModel.Hidden()
is ProjectionChipModel.Projecting -> {
if (projectionModel.type != ProjectionChipModel.Type.SHARE_TO_APP) {
- OngoingActivityChipModel.Hidden
+ OngoingActivityChipModel.Hidden()
} else {
createShareToAppChip(projectionModel)
}
}
}
}
- // See b/347726238.
- .stateIn(scope, SharingStarted.Lazily, OngoingActivityChipModel.Hidden)
+ // See b/347726238 for [SharingStarted.Lazily] reasoning.
+ .stateIn(scope, SharingStarted.Lazily, OngoingActivityChipModel.Hidden())
+
+ private val chipTransitionHelper = ChipTransitionHelper(scope)
+
+ override val chip: StateFlow<OngoingActivityChipModel> =
+ chipTransitionHelper.createChipFlow(internalChip)
+
+ /**
+ * Notifies this class that the user just stopped a screen recording from the dialog that's
+ * shown when you tap the recording chip.
+ */
+ fun onRecordingStoppedFromDialog() {
+ // When a screen recording is active, share-to-app is also active (screen recording is just
+ // a special case of share-to-app, where the specific app receiving the share is System UI).
+ // When a screen recording is stopped, we immediately hide the screen recording chip in
+ // [com.android.systemui.statusbar.chips.screenrecord.ui.viewmodel.ScreenRecordChipViewModel].
+ // We *also* need to immediately hide the share-to-app chip so it doesn't briefly show.
+ // See b/350891338.
+ chipTransitionHelper.onActivityStoppedFromDialog()
+ }
/** Stops the currently active projection. */
- private fun stopProjecting() {
+ private fun stopProjectingFromDialog() {
+ logger.log(TAG, LogLevel.INFO, {}, { "Stop sharing requested from dialog" })
+ chipTransitionHelper.onActivityStoppedFromDialog()
mediaProjectionChipInteractor.stopProjecting()
}
@@ -89,7 +119,13 @@ constructor(
startTimeMs = systemClock.elapsedRealtime(),
createDialogLaunchOnClickListener(
createShareToAppDialogDelegate(state),
- dialogTransitionAnimator
+ dialogTransitionAnimator,
+ DialogCuj(
+ Cuj.CUJ_STATUS_BAR_LAUNCH_DIALOG_FROM_CHIP,
+ tag = "Share to app",
+ ),
+ logger,
+ TAG,
),
)
}
@@ -97,11 +133,13 @@ constructor(
private fun createShareToAppDialogDelegate(state: ProjectionChipModel.Projecting) =
EndShareToAppDialogDelegate(
endMediaProjectionDialogHelper,
- stopAction = this::stopProjecting,
+ context,
+ stopAction = this::stopProjectingFromDialog,
state,
)
companion object {
@DrawableRes val SHARE_TO_APP_ICON = R.drawable.ic_present_to_all
+ private const val TAG = "ShareToAppVM"
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/model/ColorsModel.kt b/packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/model/ColorsModel.kt
index b2140f793ced..130b1170c9f1 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/model/ColorsModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/model/ColorsModel.kt
@@ -18,6 +18,7 @@ package com.android.systemui.statusbar.chips.ui.model
import android.content.Context
import android.content.res.ColorStateList
+import android.view.ContextThemeWrapper
import androidx.annotation.ColorInt
import com.android.settingslib.Utils
import com.android.systemui.res.R
@@ -41,8 +42,11 @@ sealed interface ColorsModel {
/** The chip should have a red background with white text. */
data object Red : ColorsModel {
- override fun background(context: Context): ColorStateList =
- ColorStateList.valueOf(context.getColor(R.color.GM2_red_600))
+ override fun background(context: Context): ColorStateList {
+ val themedContext =
+ ContextThemeWrapper(context, com.android.internal.R.style.Theme_DeviceDefault_Light)
+ return Utils.getColorAttr(themedContext, com.android.internal.R.attr.materialColorError)
+ }
override fun text(context: Context) = context.getColor(android.R.color.white)
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/model/OngoingActivityChipModel.kt b/packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/model/OngoingActivityChipModel.kt
index e8d895c3c266..17cf60bf2dc5 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/model/OngoingActivityChipModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/model/OngoingActivityChipModel.kt
@@ -21,8 +21,19 @@ import com.android.systemui.common.shared.model.Icon
/** Model representing the display of an ongoing activity as a chip in the status bar. */
sealed class OngoingActivityChipModel {
- /** This chip shouldn't be shown. */
- data object Hidden : OngoingActivityChipModel()
+ /** Condensed name representing the model, used for logs. */
+ abstract val logName: String
+
+ /**
+ * This chip shouldn't be shown.
+ *
+ * @property shouldAnimate true if the transition from [Shown] to [Hidden] should be animated,
+ * and false if that transition should *not* be animated (i.e. the chip view should
+ * immediately disappear).
+ */
+ data class Hidden(val shouldAnimate: Boolean = true) : OngoingActivityChipModel() {
+ override val logName = "Hidden(anim=$shouldAnimate)"
+ }
/** This chip should be shown with the given information. */
abstract class Shown(
@@ -42,7 +53,9 @@ sealed class OngoingActivityChipModel {
override val icon: Icon,
override val colors: ColorsModel,
override val onClickListener: View.OnClickListener?,
- ) : Shown(icon, colors, onClickListener)
+ ) : Shown(icon, colors, onClickListener) {
+ override val logName = "Shown.Icon"
+ }
/** The chip shows a timer, counting up from [startTimeMs]. */
data class Timer(
@@ -59,7 +72,9 @@ sealed class OngoingActivityChipModel {
*/
val startTimeMs: Long,
override val onClickListener: View.OnClickListener?,
- ) : Shown(icon, colors, onClickListener)
+ ) : Shown(icon, colors, onClickListener) {
+ override val logName = "Shown.Timer"
+ }
/**
* This chip shows a countdown using [secondsUntilStarted]. Used to inform users that an
@@ -69,6 +84,8 @@ sealed class OngoingActivityChipModel {
override val colors: ColorsModel,
/** The number of seconds until an event is started. */
val secondsUntilStarted: Long,
- ) : Shown(icon = null, colors, onClickListener = null)
+ ) : Shown(icon = null, colors, onClickListener = null) {
+ override val logName = "Shown.Countdown"
+ }
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/viewmodel/ChipTransitionHelper.kt b/packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/viewmodel/ChipTransitionHelper.kt
new file mode 100644
index 000000000000..92e72c29519a
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/viewmodel/ChipTransitionHelper.kt
@@ -0,0 +1,97 @@
+/*
+ * 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.chips.ui.viewmodel
+
+import android.annotation.SuppressLint
+import com.android.systemui.dagger.qualifiers.Application
+import com.android.systemui.statusbar.chips.ui.model.OngoingActivityChipModel
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.delay
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.MutableSharedFlow
+import kotlinx.coroutines.flow.SharingStarted
+import kotlinx.coroutines.flow.StateFlow
+import kotlinx.coroutines.flow.combine
+import kotlinx.coroutines.flow.stateIn
+import kotlinx.coroutines.flow.transformLatest
+import kotlinx.coroutines.launch
+
+/**
+ * A class that can help [OngoingActivityChipViewModel] instances with various transition states.
+ *
+ * For now, this class's only functionality is immediately hiding the chip if the user has tapped an
+ * activity chip and then clicked "Stop" on the resulting dialog. There's a bit of a delay between
+ * when the user clicks "Stop" and when the system services notify SysUI that the activity has
+ * indeed stopped. We don't want the chip to briefly show for a few frames during that delay, so
+ * this class helps us immediately hide the chip as soon as the user clicks "Stop" in the dialog.
+ * See b/353249803#comment4.
+ */
+@OptIn(ExperimentalCoroutinesApi::class)
+class ChipTransitionHelper(@Application private val scope: CoroutineScope) {
+ /** A flow that emits each time the user has clicked "Stop" on the dialog. */
+ @SuppressLint("SharedFlowCreation")
+ private val activityStoppedFromDialogEvent = MutableSharedFlow<Unit>()
+
+ /** True if the user recently stopped the activity from the dialog. */
+ private val wasActivityRecentlyStoppedFromDialog: Flow<Boolean> =
+ activityStoppedFromDialogEvent
+ .transformLatest {
+ // Give system services 500ms to stop the activity and notify SysUI. Once more than
+ // 500ms has elapsed, we should go back to using the current system service
+ // information as the source of truth.
+ emit(true)
+ delay(500)
+ emit(false)
+ }
+ // Use stateIn so that the flow created in [createChipFlow] is guaranteed to
+ // emit. (`combine`s require that all input flows have emitted.)
+ .stateIn(scope, SharingStarted.Lazily, false)
+
+ /**
+ * Notifies this class that the user just clicked "Stop" on the stop dialog that's shown when
+ * the chip is tapped.
+ *
+ * Call this method in order to immediately hide the chip.
+ */
+ fun onActivityStoppedFromDialog() {
+ // Because this event causes UI changes, make sure it's launched on the main thread scope.
+ scope.launch { activityStoppedFromDialogEvent.emit(Unit) }
+ }
+
+ /**
+ * Creates a flow that will forcibly hide the chip if the user recently stopped the activity
+ * (see [onActivityStoppedFromDialog]). In general, this flow just uses value in [chip].
+ */
+ fun createChipFlow(chip: Flow<OngoingActivityChipModel>): StateFlow<OngoingActivityChipModel> {
+ return combine(
+ chip,
+ wasActivityRecentlyStoppedFromDialog,
+ ) { chipModel, activityRecentlyStopped ->
+ if (activityRecentlyStopped) {
+ // There's a bit of a delay between when the user stops an activity via
+ // SysUI and when the system services notify SysUI that the activity has
+ // indeed stopped. Prevent the chip from showing during this delay by
+ // immediately hiding it without any animation.
+ OngoingActivityChipModel.Hidden(shouldAnimate = false)
+ } else {
+ chipModel
+ }
+ }
+ .stateIn(scope, SharingStarted.WhileSubscribed(), OngoingActivityChipModel.Hidden())
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipViewModel.kt b/packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipViewModel.kt
index 0dbf5d613038..2fc366b7f078 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipViewModel.kt
@@ -17,8 +17,12 @@
package com.android.systemui.statusbar.chips.ui.viewmodel
import android.view.View
+import com.android.systemui.animation.DialogCuj
import com.android.systemui.animation.DialogTransitionAnimator
+import com.android.systemui.log.LogBuffer
+import com.android.systemui.log.core.LogLevel
import com.android.systemui.res.R
+import com.android.systemui.statusbar.chips.StatusBarChipsLog
import com.android.systemui.statusbar.chips.ui.model.OngoingActivityChipModel
import com.android.systemui.statusbar.chips.ui.view.ChipBackgroundContainer
import com.android.systemui.statusbar.phone.SystemUIDialog
@@ -37,18 +41,18 @@ interface OngoingActivityChipViewModel {
fun createDialogLaunchOnClickListener(
dialogDelegate: SystemUIDialog.Delegate,
dialogTransitionAnimator: DialogTransitionAnimator,
+ cuj: DialogCuj,
+ @StatusBarChipsLog logger: LogBuffer,
+ tag: String,
): View.OnClickListener {
return View.OnClickListener { view ->
+ logger.log(tag, LogLevel.INFO, {}, { "Chip clicked" })
val dialog = dialogDelegate.createDialog()
val launchableView =
view.requireViewById<ChipBackgroundContainer>(
R.id.ongoing_activity_chip_background
)
- // TODO(b/343699052): This makes a beautiful animate-in, but the
- // animate-out looks odd because the dialog animates back into the chip
- // but then the chip disappears. If we aren't able to address
- // b/343699052 in time for launch, we should just use `dialog.show`.
- dialogTransitionAnimator.showFromView(dialog, launchableView)
+ dialogTransitionAnimator.showFromView(dialog, launchableView, cuj)
}
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipsViewModel.kt b/packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipsViewModel.kt
index 9c8086fd073d..b0d897def53f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipsViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipsViewModel.kt
@@ -18,16 +18,22 @@ package com.android.systemui.statusbar.chips.ui.viewmodel
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
+import com.android.systemui.log.LogBuffer
+import com.android.systemui.log.core.LogLevel
+import com.android.systemui.statusbar.chips.StatusBarChipsLog
import com.android.systemui.statusbar.chips.call.ui.viewmodel.CallChipViewModel
import com.android.systemui.statusbar.chips.casttootherdevice.ui.viewmodel.CastToOtherDeviceChipViewModel
import com.android.systemui.statusbar.chips.screenrecord.ui.viewmodel.ScreenRecordChipViewModel
import com.android.systemui.statusbar.chips.sharetoapp.ui.viewmodel.ShareToAppChipViewModel
import com.android.systemui.statusbar.chips.ui.model.OngoingActivityChipModel
+import com.android.systemui.util.kotlin.pairwise
import javax.inject.Inject
import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.combine
+import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.stateIn
/**
@@ -45,35 +51,134 @@ constructor(
shareToAppChipViewModel: ShareToAppChipViewModel,
castToOtherDeviceChipViewModel: CastToOtherDeviceChipViewModel,
callChipViewModel: CallChipViewModel,
+ @StatusBarChipsLog private val logger: LogBuffer,
) {
+ private enum class ChipType {
+ ScreenRecord,
+ ShareToApp,
+ CastToOtherDevice,
+ Call,
+ }
+
+ /** Model that helps us internally track the various chip states from each of the types. */
+ private sealed interface InternalChipModel {
+ /**
+ * Represents that we've internally decided to show the chip with type [type] with the given
+ * [model] information.
+ */
+ data class Shown(val type: ChipType, val model: OngoingActivityChipModel.Shown) :
+ InternalChipModel
+
+ /**
+ * Represents that all chip types would like to be hidden. Each value specifies *how* that
+ * chip type should get hidden.
+ */
+ data class Hidden(
+ val screenRecord: OngoingActivityChipModel.Hidden,
+ val shareToApp: OngoingActivityChipModel.Hidden,
+ val castToOtherDevice: OngoingActivityChipModel.Hidden,
+ val call: OngoingActivityChipModel.Hidden,
+ ) : InternalChipModel
+ }
+
+ private val internalChip: Flow<InternalChipModel> =
+ combine(
+ screenRecordChipViewModel.chip,
+ shareToAppChipViewModel.chip,
+ castToOtherDeviceChipViewModel.chip,
+ callChipViewModel.chip,
+ ) { screenRecord, shareToApp, castToOtherDevice, call ->
+ logger.log(
+ TAG,
+ LogLevel.INFO,
+ {
+ str1 = screenRecord.logName
+ str2 = shareToApp.logName
+ str3 = castToOtherDevice.logName
+ },
+ { "Chips: ScreenRecord=$str1 > ShareToApp=$str2 > CastToOther=$str3..." },
+ )
+ logger.log(TAG, LogLevel.INFO, { str1 = call.logName }, { "... > Call=$str1" })
+ // This `when` statement shows the priority order of the chips.
+ when {
+ // Screen recording also activates the media projection APIs, so whenever the
+ // screen recording chip is active, the media projection chip would also be
+ // active. We want the screen-recording-specific chip shown in this case, so we
+ // give the screen recording chip priority. See b/296461748.
+ screenRecord is OngoingActivityChipModel.Shown ->
+ InternalChipModel.Shown(ChipType.ScreenRecord, screenRecord)
+ shareToApp is OngoingActivityChipModel.Shown ->
+ InternalChipModel.Shown(ChipType.ShareToApp, shareToApp)
+ castToOtherDevice is OngoingActivityChipModel.Shown ->
+ InternalChipModel.Shown(ChipType.CastToOtherDevice, castToOtherDevice)
+ call is OngoingActivityChipModel.Shown ->
+ InternalChipModel.Shown(ChipType.Call, call)
+ else -> {
+ // We should only get here if all chip types are hidden
+ check(screenRecord is OngoingActivityChipModel.Hidden)
+ check(shareToApp is OngoingActivityChipModel.Hidden)
+ check(castToOtherDevice is OngoingActivityChipModel.Hidden)
+ check(call is OngoingActivityChipModel.Hidden)
+ InternalChipModel.Hidden(
+ screenRecord = screenRecord,
+ shareToApp = shareToApp,
+ castToOtherDevice = castToOtherDevice,
+ call = call,
+ )
+ }
+ }
+ }
+
/**
* A flow modeling the chip that should be shown in the status bar after accounting for possibly
- * multiple ongoing activities.
+ * multiple ongoing activities and animation requirements.
*
* [com.android.systemui.statusbar.phone.fragment.CollapsedStatusBarFragment] is responsible for
* actually displaying the chip.
*/
val chip: StateFlow<OngoingActivityChipModel> =
- combine(
- screenRecordChipViewModel.chip,
- shareToAppChipViewModel.chip,
- castToOtherDeviceChipViewModel.chip,
- callChipViewModel.chip,
- ) { screenRecord, shareToApp, castToOtherDevice, call ->
- // This `when` statement shows the priority order of the chips
- when {
- // Screen recording also activates the media projection APIs, so whenever the
- // screen recording chip is active, the media projection chip would also be
- // active. We want the screen-recording-specific chip shown in this case, so we
- // give the screen recording chip priority. See b/296461748.
- screenRecord is OngoingActivityChipModel.Shown -> screenRecord
- shareToApp is OngoingActivityChipModel.Shown -> shareToApp
- castToOtherDevice is OngoingActivityChipModel.Shown -> castToOtherDevice
- else -> call
+ internalChip
+ .pairwise(initialValue = DEFAULT_INTERNAL_HIDDEN_MODEL)
+ .map { (old, new) ->
+ if (old is InternalChipModel.Shown && new is InternalChipModel.Hidden) {
+ // If we're transitioning from showing the chip to hiding the chip, different
+ // chips require different animation behaviors. For example, the screen share
+ // chips shouldn't animate if the user stopped the screen share from the dialog
+ // (see b/353249803#comment4), but the call chip should always animate.
+ //
+ // This `when` block makes sure that when we're transitioning from Shown to
+ // Hidden, we check what chip type was previously showing and we use that chip
+ // type's hide animation behavior.
+ when (old.type) {
+ ChipType.ScreenRecord -> new.screenRecord
+ ChipType.ShareToApp -> new.shareToApp
+ ChipType.CastToOtherDevice -> new.castToOtherDevice
+ ChipType.Call -> new.call
+ }
+ } else if (new is InternalChipModel.Shown) {
+ // If we have a chip to show, always show it.
+ new.model
+ } else {
+ // In the Hidden -> Hidden transition, it shouldn't matter which hidden model we
+ // choose because no animation should happen regardless.
+ OngoingActivityChipModel.Hidden()
}
}
// Some of the chips could have timers in them and we don't want the start time
// for those timers to get reset for any reason. So, as soon as any subscriber has
- // requested the chip information, we need to maintain it forever. See b/347726238.
- .stateIn(scope, SharingStarted.Lazily, OngoingActivityChipModel.Hidden)
+ // requested the chip information, we maintain it forever by using
+ // [SharingStarted.Lazily]. See b/347726238.
+ .stateIn(scope, SharingStarted.Lazily, OngoingActivityChipModel.Hidden())
+
+ companion object {
+ private const val TAG = "ChipsViewModel"
+
+ private val DEFAULT_INTERNAL_HIDDEN_MODEL =
+ InternalChipModel.Hidden(
+ screenRecord = OngoingActivityChipModel.Hidden(),
+ shareToApp = OngoingActivityChipModel.Hidden(),
+ castToOtherDevice = OngoingActivityChipModel.Hidden(),
+ call = OngoingActivityChipModel.Hidden(),
+ )
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/domain/interactor/StatusBarKeyguardViewManagerInteractor.kt b/packages/SystemUI/src/com/android/systemui/statusbar/domain/interactor/StatusBarKeyguardViewManagerInteractor.kt
index ef96f43ec17e..9ca110e8c561 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/domain/interactor/StatusBarKeyguardViewManagerInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/domain/interactor/StatusBarKeyguardViewManagerInteractor.kt
@@ -93,8 +93,8 @@ constructor(
private val occlusionStateFromFinishedStep =
combine(
keyguardTransitionInteractor.isFinishedIn(
- Scenes.Gone,
- stateWithoutSceneContainer = KeyguardState.GONE
+ scene = Scenes.Gone,
+ stateWithoutSceneContainer = KeyguardState.GONE,
),
keyguardTransitionInteractor.isFinishedIn(KeyguardState.OCCLUDED),
keyguardOcclusionInteractor.isShowWhenLockedActivityOnTop,
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationSectionsFeatureManager.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationSectionsFeatureManager.kt
index 3dcaff3de35a..b342722ebb09 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationSectionsFeatureManager.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationSectionsFeatureManager.kt
@@ -52,8 +52,11 @@ constructor(val proxy: DeviceConfigProxy, val context: Context) {
}
fun getNotificationBuckets(): IntArray {
- if (PriorityPeopleSection.isEnabled || NotificationMinimalismPrototype.V2.isEnabled
- || NotificationClassificationFlag.isEnabled) {
+ if (
+ PriorityPeopleSection.isEnabled ||
+ NotificationMinimalismPrototype.isEnabled ||
+ NotificationClassificationFlag.isEnabled
+ ) {
// We don't need this list to be adaptive, it can be the superset of all features.
return PriorityBucket.getAllInOrder()
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinator.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinator.kt
index 0bb18d704ac7..9240c1c7a113 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinator.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinator.kt
@@ -469,10 +469,24 @@ constructor(
get() = state
override fun onPanelExpansionChanged(event: ShadeExpansionChangeEvent) {
- val collapsedEnough = event.fraction <= 0.9f
- if (collapsedEnough != this.collapsedEnoughToHide) {
- val couldShowPulsingHuns = canShowPulsingHuns
- this.collapsedEnoughToHide = collapsedEnough
+ val fraction = event.fraction
+
+ val wasCollapsedEnoughToHide = collapsedEnoughToHide
+ val isCollapsedEnoughToHide = fraction <= 0.9f
+
+ if (isCollapsedEnoughToHide != wasCollapsedEnoughToHide) {
+ val couldShowPulsingHuns = this.canShowPulsingHuns
+ this.collapsedEnoughToHide = isCollapsedEnoughToHide
+ val canShowPulsingHuns = this.canShowPulsingHuns
+
+ logger.logOnPanelExpansionChanged(
+ fraction,
+ wasCollapsedEnoughToHide,
+ isCollapsedEnoughToHide,
+ couldShowPulsingHuns,
+ canShowPulsingHuns
+ )
+
if (couldShowPulsingHuns && !canShowPulsingHuns) {
updateNotificationVisibility(animate = true, increaseSpeed = true)
headsUpManager.releaseAllImmediately()
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinatorLogger.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinatorLogger.kt
index 9619bea5efd4..752ec2d2840c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinatorLogger.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationWakeUpCoordinatorLogger.kt
@@ -182,6 +182,31 @@ constructor(@NotificationLockscreenLog private val buffer: LogBuffer) {
)
}
+ fun logOnPanelExpansionChanged(
+ fraction: Float,
+ wasCollapsedEnoughToHide: Boolean,
+ isCollapsedEnoughToHide: Boolean,
+ couldShowPulsingHuns: Boolean,
+ canShowPulsingHuns: Boolean
+ ) {
+ buffer.log(
+ TAG,
+ DEBUG,
+ {
+ double1 = fraction.toDouble()
+ bool1 = wasCollapsedEnoughToHide
+ bool2 = isCollapsedEnoughToHide
+ bool3 = couldShowPulsingHuns
+ bool4 = canShowPulsingHuns
+ },
+ {
+ "onPanelExpansionChanged($double1):" +
+ " collapsedEnoughToHide: $bool1 -> $bool2," +
+ " canShowPulsingHuns: $bool3 -> $bool4"
+ }
+ )
+ }
+
fun logSetWakingUp(wakingUp: Boolean, requestDelayedAnimation: Boolean) {
buffer.log(
TAG,
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationEntry.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationEntry.java
index f98a88f5328b..cb133ecadab2 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationEntry.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationEntry.java
@@ -698,7 +698,7 @@ public final class NotificationEntry extends ListEntry implements NotificationRo
}
public void setHeadsUpIsVisible() {
- if (row != null) row.setHeadsUpIsVisible();
+ if (row != null) row.markHeadsUpSeen();
}
//TODO: i'm imagining a world where this isn't just the row, but I could be rwong
@@ -1005,6 +1005,16 @@ public final class NotificationEntry extends ListEntry implements NotificationRo
mIsMarkedForUserTriggeredMovement = marked;
}
+ private boolean mSeenInShade = false;
+
+ public void setSeenInShade(boolean seen) {
+ mSeenInShade = seen;
+ }
+
+ public boolean isSeenInShade() {
+ return mSeenInShade;
+ }
+
public void setIsHeadsUpEntry(boolean isHeadsUpEntry) {
mIsHeadsUpEntry = isHeadsUpEntry;
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/KeyguardCoordinator.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/KeyguardCoordinator.kt
index 1434dc034881..b1b2a653fde2 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/KeyguardCoordinator.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/KeyguardCoordinator.kt
@@ -16,62 +16,15 @@
package com.android.systemui.statusbar.notification.collection.coordinator
-import android.app.NotificationManager
-import android.os.UserHandle
-import android.provider.Settings
-import androidx.annotation.VisibleForTesting
-import com.android.systemui.Dumpable
-import com.android.systemui.dagger.qualifiers.Application
-import com.android.systemui.dagger.qualifiers.Background
-import com.android.systemui.dump.DumpManager
-import com.android.systemui.keyguard.data.repository.KeyguardRepository
-import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor
-import com.android.systemui.keyguard.shared.model.KeyguardState
import com.android.systemui.plugins.statusbar.StatusBarStateController
-import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.statusbar.StatusBarState
-import com.android.systemui.statusbar.expansionChanges
-import com.android.systemui.statusbar.notification.collection.GroupEntry
-import com.android.systemui.statusbar.notification.collection.ListEntry
import com.android.systemui.statusbar.notification.collection.NotifPipeline
import com.android.systemui.statusbar.notification.collection.NotificationEntry
import com.android.systemui.statusbar.notification.collection.coordinator.dagger.CoordinatorScope
import com.android.systemui.statusbar.notification.collection.listbuilder.pluggable.NotifFilter
-import com.android.systemui.statusbar.notification.collection.listbuilder.pluggable.NotifPromoter
-import com.android.systemui.statusbar.notification.collection.listbuilder.pluggable.NotifSectioner
-import com.android.systemui.statusbar.notification.collection.notifcollection.NotifCollectionListener
import com.android.systemui.statusbar.notification.collection.provider.SectionHeaderVisibilityProvider
-import com.android.systemui.statusbar.notification.domain.interactor.SeenNotificationsInteractor
import com.android.systemui.statusbar.notification.interruption.KeyguardNotificationVisibilityProvider
-import com.android.systemui.statusbar.notification.shared.NotificationMinimalismPrototype
-import com.android.systemui.statusbar.notification.stack.BUCKET_TOP_ONGOING
-import com.android.systemui.statusbar.notification.stack.BUCKET_TOP_UNSEEN
-import com.android.systemui.statusbar.policy.HeadsUpManager
-import com.android.systemui.statusbar.policy.headsUpEvents
-import com.android.systemui.util.asIndenting
-import com.android.systemui.util.indentIfPossible
-import com.android.systemui.util.settings.SecureSettings
-import com.android.systemui.util.settings.SettingsProxyExt.observerFlow
-import java.io.PrintWriter
import javax.inject.Inject
-import kotlin.time.Duration.Companion.seconds
-import kotlinx.coroutines.CoroutineDispatcher
-import kotlinx.coroutines.CoroutineScope
-import kotlinx.coroutines.Job
-import kotlinx.coroutines.coroutineScope
-import kotlinx.coroutines.delay
-import kotlinx.coroutines.flow.Flow
-import kotlinx.coroutines.flow.MutableSharedFlow
-import kotlinx.coroutines.flow.collectLatest
-import kotlinx.coroutines.flow.conflate
-import kotlinx.coroutines.flow.distinctUntilChanged
-import kotlinx.coroutines.flow.flowOf
-import kotlinx.coroutines.flow.flowOn
-import kotlinx.coroutines.flow.map
-import kotlinx.coroutines.flow.onEach
-import kotlinx.coroutines.flow.onStart
-import kotlinx.coroutines.launch
-import kotlinx.coroutines.yield
/**
* Filters low priority and privacy-sensitive notifications from the lockscreen, and hides section
@@ -82,24 +35,10 @@ import kotlinx.coroutines.yield
class KeyguardCoordinator
@Inject
constructor(
- @Background private val bgDispatcher: CoroutineDispatcher,
- private val dumpManager: DumpManager,
- private val headsUpManager: HeadsUpManager,
private val keyguardNotificationVisibilityProvider: KeyguardNotificationVisibilityProvider,
- private val keyguardRepository: KeyguardRepository,
- private val keyguardTransitionInteractor: KeyguardTransitionInteractor,
- private val logger: KeyguardCoordinatorLogger,
- @Application private val scope: CoroutineScope,
private val sectionHeaderVisibilityProvider: SectionHeaderVisibilityProvider,
- private val secureSettings: SecureSettings,
- private val seenNotificationsInteractor: SeenNotificationsInteractor,
private val statusBarStateController: StatusBarStateController,
-) : Coordinator, Dumpable {
-
- private val unseenNotifications = mutableSetOf<NotificationEntry>()
- private val unseenEntryAdded = MutableSharedFlow<NotificationEntry>(extraBufferCapacity = 1)
- private val unseenEntryRemoved = MutableSharedFlow<NotificationEntry>(extraBufferCapacity = 1)
- private var unseenFilterEnabled = false
+) : Coordinator {
override fun attach(pipeline: NotifPipeline) {
setupInvalidateNotifListCallbacks()
@@ -107,382 +46,14 @@ constructor(
pipeline.addFinalizeFilter(notifFilter)
keyguardNotificationVisibilityProvider.addOnStateChangedListener(::invalidateListFromFilter)
updateSectionHeadersVisibility()
- attachUnseenFilter(pipeline)
- }
-
- private fun attachUnseenFilter(pipeline: NotifPipeline) {
- if (NotificationMinimalismPrototype.V2.isEnabled) {
- pipeline.addPromoter(unseenNotifPromoter)
- pipeline.addOnBeforeTransformGroupsListener(::pickOutTopUnseenNotifs)
- }
- pipeline.addFinalizeFilter(unseenNotifFilter)
- pipeline.addCollectionListener(collectionListener)
- scope.launch { trackUnseenFilterSettingChanges() }
- dumpManager.registerDumpable(this)
- }
-
- private suspend fun trackSeenNotifications() {
- // Whether or not keyguard is visible (or occluded).
- val isKeyguardPresent: Flow<Boolean> =
- keyguardTransitionInteractor
- .transitionValue(Scenes.Gone, stateWithoutSceneContainer = KeyguardState.GONE)
- .map { it == 0f }
- .distinctUntilChanged()
- .onEach { trackingUnseen -> logger.logTrackingUnseen(trackingUnseen) }
-
- // Separately track seen notifications while the device is locked, applying once the device
- // is unlocked.
- val notificationsSeenWhileLocked = mutableSetOf<NotificationEntry>()
-
- // Use [collectLatest] to cancel any running jobs when [trackingUnseen] changes.
- isKeyguardPresent.collectLatest { isKeyguardPresent: Boolean ->
- if (isKeyguardPresent) {
- // Keyguard is not gone, notifications need to be visible for a certain threshold
- // before being marked as seen
- trackSeenNotificationsWhileLocked(notificationsSeenWhileLocked)
- } else {
- // Mark all seen-while-locked notifications as seen for real.
- if (notificationsSeenWhileLocked.isNotEmpty()) {
- unseenNotifications.removeAll(notificationsSeenWhileLocked)
- logger.logAllMarkedSeenOnUnlock(
- seenCount = notificationsSeenWhileLocked.size,
- remainingUnseenCount = unseenNotifications.size
- )
- notificationsSeenWhileLocked.clear()
- }
- unseenNotifFilter.invalidateList("keyguard no longer showing")
- // Keyguard is gone, notifications can be immediately marked as seen when they
- // become visible.
- trackSeenNotificationsWhileUnlocked()
- }
- }
- }
-
- /**
- * Keep [notificationsSeenWhileLocked] updated to represent which notifications have actually
- * been "seen" while the device is on the keyguard.
- */
- private suspend fun trackSeenNotificationsWhileLocked(
- notificationsSeenWhileLocked: MutableSet<NotificationEntry>,
- ) = coroutineScope {
- // Remove removed notifications from the set
- launch {
- unseenEntryRemoved.collect { entry ->
- if (notificationsSeenWhileLocked.remove(entry)) {
- logger.logRemoveSeenOnLockscreen(entry)
- }
- }
- }
- // Use collectLatest so that the timeout delay is cancelled if the device enters doze, and
- // is restarted when doze ends.
- keyguardRepository.isDozing.collectLatest { isDozing ->
- if (!isDozing) {
- trackSeenNotificationsWhileLockedAndNotDozing(notificationsSeenWhileLocked)
- }
- }
- }
-
- /**
- * Keep [notificationsSeenWhileLocked] updated to represent which notifications have actually
- * been "seen" while the device is on the keyguard and not dozing. Any new and existing unseen
- * notifications are not marked as seen until they are visible for the [SEEN_TIMEOUT] duration.
- */
- private suspend fun trackSeenNotificationsWhileLockedAndNotDozing(
- notificationsSeenWhileLocked: MutableSet<NotificationEntry>
- ) = coroutineScope {
- // All child tracking jobs will be cancelled automatically when this is cancelled.
- val trackingJobsByEntry = mutableMapOf<NotificationEntry, Job>()
-
- /**
- * Wait for the user to spend enough time on the lock screen before removing notification
- * from unseen set upon unlock.
- */
- suspend fun trackSeenDurationThreshold(entry: NotificationEntry) {
- if (notificationsSeenWhileLocked.remove(entry)) {
- logger.logResetSeenOnLockscreen(entry)
- }
- delay(SEEN_TIMEOUT)
- notificationsSeenWhileLocked.add(entry)
- trackingJobsByEntry.remove(entry)
- logger.logSeenOnLockscreen(entry)
- }
-
- /** Stop any unseen tracking when a notification is removed. */
- suspend fun stopTrackingRemovedNotifs(): Nothing =
- unseenEntryRemoved.collect { entry ->
- trackingJobsByEntry.remove(entry)?.let {
- it.cancel()
- logger.logStopTrackingLockscreenSeenDuration(entry)
- }
- }
-
- /** Start tracking new notifications when they are posted. */
- suspend fun trackNewUnseenNotifs(): Nothing = coroutineScope {
- unseenEntryAdded.collect { entry ->
- logger.logTrackingLockscreenSeenDuration(entry)
- // If this is an update, reset the tracking.
- trackingJobsByEntry[entry]?.let {
- it.cancel()
- logger.logResetSeenOnLockscreen(entry)
- }
- trackingJobsByEntry[entry] = launch { trackSeenDurationThreshold(entry) }
- }
- }
-
- // Start tracking for all notifications that are currently unseen.
- logger.logTrackingLockscreenSeenDuration(unseenNotifications)
- unseenNotifications.forEach { entry ->
- trackingJobsByEntry[entry] = launch { trackSeenDurationThreshold(entry) }
- }
-
- launch { trackNewUnseenNotifs() }
- launch { stopTrackingRemovedNotifs() }
- }
-
- // Track "seen" notifications, marking them as such when either shade is expanded or the
- // notification becomes heads up.
- private suspend fun trackSeenNotificationsWhileUnlocked() {
- coroutineScope {
- launch { clearUnseenNotificationsWhenShadeIsExpanded() }
- launch { markHeadsUpNotificationsAsSeen() }
- }
- }
-
- private suspend fun clearUnseenNotificationsWhenShadeIsExpanded() {
- statusBarStateController.expansionChanges.collectLatest { isExpanded ->
- // Give keyguard events time to propagate, in case this expansion is part of the
- // keyguard transition and not the user expanding the shade
- yield()
- if (isExpanded) {
- logger.logShadeExpanded()
- unseenNotifications.clear()
- }
- }
- }
-
- private suspend fun markHeadsUpNotificationsAsSeen() {
- headsUpManager.allEntries
- .filter { it.isRowPinned }
- .forEach { unseenNotifications.remove(it) }
- headsUpManager.headsUpEvents.collect { (entry, isHun) ->
- if (isHun) {
- logger.logUnseenHun(entry.key)
- unseenNotifications.remove(entry)
- }
- }
}
- private fun unseenFeatureEnabled(): Flow<Boolean> {
- if (
- NotificationMinimalismPrototype.V1.isEnabled ||
- NotificationMinimalismPrototype.V2.isEnabled
- ) {
- return flowOf(true)
- }
- return secureSettings
- // emit whenever the setting has changed
- .observerFlow(
- UserHandle.USER_ALL,
- Settings.Secure.LOCK_SCREEN_SHOW_ONLY_UNSEEN_NOTIFICATIONS,
- )
- // perform a query immediately
- .onStart { emit(Unit) }
- // for each change, lookup the new value
- .map {
- secureSettings.getIntForUser(
- name = Settings.Secure.LOCK_SCREEN_SHOW_ONLY_UNSEEN_NOTIFICATIONS,
- def = 0,
- userHandle = UserHandle.USER_CURRENT,
- ) == 1
- }
- // don't emit anything if nothing has changed
- .distinctUntilChanged()
- // perform lookups on the bg thread pool
- .flowOn(bgDispatcher)
- // only track the most recent emission, if events are happening faster than they can be
- // consumed
- .conflate()
- }
-
- private suspend fun trackUnseenFilterSettingChanges() {
- unseenFeatureEnabled().collectLatest { setting ->
- // update local field and invalidate if necessary
- if (setting != unseenFilterEnabled) {
- unseenFilterEnabled = setting
- unseenNotifFilter.invalidateList("unseen setting changed")
- }
- // if the setting is enabled, then start tracking and filtering unseen notifications
- if (setting) {
- trackSeenNotifications()
- }
- }
- }
-
- private val collectionListener =
- object : NotifCollectionListener {
- override fun onEntryAdded(entry: NotificationEntry) {
- if (
- keyguardRepository.isKeyguardShowing() || !statusBarStateController.isExpanded
- ) {
- logger.logUnseenAdded(entry.key)
- unseenNotifications.add(entry)
- unseenEntryAdded.tryEmit(entry)
- }
- }
-
- override fun onEntryUpdated(entry: NotificationEntry) {
- if (
- keyguardRepository.isKeyguardShowing() || !statusBarStateController.isExpanded
- ) {
- logger.logUnseenUpdated(entry.key)
- unseenNotifications.add(entry)
- unseenEntryAdded.tryEmit(entry)
- }
- }
-
- override fun onEntryRemoved(entry: NotificationEntry, reason: Int) {
- if (unseenNotifications.remove(entry)) {
- logger.logUnseenRemoved(entry.key)
- unseenEntryRemoved.tryEmit(entry)
- }
- }
- }
-
- private fun pickOutTopUnseenNotifs(list: List<ListEntry>) {
- if (NotificationMinimalismPrototype.V2.isUnexpectedlyInLegacyMode()) return
- // Only ever elevate a top unseen notification on keyguard, not even locked shade
- if (statusBarStateController.state != StatusBarState.KEYGUARD) {
- seenNotificationsInteractor.setTopOngoingNotification(null)
- seenNotificationsInteractor.setTopUnseenNotification(null)
- return
- }
- // On keyguard pick the top-ranked unseen or ongoing notification to elevate
- val nonSummaryEntries: Sequence<NotificationEntry> =
- list
- .asSequence()
- .flatMap {
- when (it) {
- is NotificationEntry -> listOfNotNull(it)
- is GroupEntry -> it.children
- else -> error("unhandled type of $it")
- }
- }
- .filter { it.importance >= NotificationManager.IMPORTANCE_DEFAULT }
- seenNotificationsInteractor.setTopOngoingNotification(
- nonSummaryEntries
- .filter { ColorizedFgsCoordinator.isRichOngoing(it) }
- .minByOrNull { it.ranking.rank }
- )
- seenNotificationsInteractor.setTopUnseenNotification(
- nonSummaryEntries
- .filter { !ColorizedFgsCoordinator.isRichOngoing(it) && it in unseenNotifications }
- .minByOrNull { it.ranking.rank }
- )
- }
-
- @VisibleForTesting
- internal val unseenNotifPromoter =
- object : NotifPromoter("$TAG-unseen") {
- override fun shouldPromoteToTopLevel(child: NotificationEntry): Boolean =
- if (NotificationMinimalismPrototype.V2.isUnexpectedlyInLegacyMode()) false
- else if (!NotificationMinimalismPrototype.V2.ungroupTopUnseen) false
- else
- seenNotificationsInteractor.isTopOngoingNotification(child) ||
- seenNotificationsInteractor.isTopUnseenNotification(child)
- }
-
- val topOngoingSectioner =
- object : NotifSectioner("TopOngoing", BUCKET_TOP_ONGOING) {
- override fun isInSection(entry: ListEntry): Boolean {
- if (NotificationMinimalismPrototype.V2.isUnexpectedlyInLegacyMode()) return false
- return entry.anyEntry { notificationEntry ->
- seenNotificationsInteractor.isTopOngoingNotification(notificationEntry)
- }
- }
- }
-
- val topUnseenSectioner =
- object : NotifSectioner("TopUnseen", BUCKET_TOP_UNSEEN) {
- override fun isInSection(entry: ListEntry): Boolean {
- if (NotificationMinimalismPrototype.V2.isUnexpectedlyInLegacyMode()) return false
- return entry.anyEntry { notificationEntry ->
- seenNotificationsInteractor.isTopUnseenNotification(notificationEntry)
- }
- }
- }
-
- private fun ListEntry.anyEntry(predicate: (NotificationEntry?) -> Boolean) =
- when {
- predicate(representativeEntry) -> true
- this !is GroupEntry -> false
- else -> children.any(predicate)
- }
-
- @VisibleForTesting
- internal val unseenNotifFilter =
- object : NotifFilter("$TAG-unseen") {
-
- var hasFilteredAnyNotifs = false
-
- /**
- * Encapsulates a definition of "being on the keyguard". Note that these two definitions
- * are wildly different: [StatusBarState.KEYGUARD] is when on the lock screen and does
- * not include shade or occluded states, whereas [KeyguardRepository.isKeyguardShowing]
- * is any state where the keyguard has not been dismissed, including locked shade and
- * occluded lock screen.
- *
- * Returning false for locked shade and occluded states means that this filter will
- * allow seen notifications to appear in the locked shade.
- */
- private fun isOnKeyguard(): Boolean =
- if (NotificationMinimalismPrototype.V2.isEnabled) {
- false // disable this feature under this prototype
- } else if (
- NotificationMinimalismPrototype.V1.isEnabled &&
- NotificationMinimalismPrototype.V1.showOnLockedShade
- ) {
- statusBarStateController.state == StatusBarState.KEYGUARD
- } else {
- keyguardRepository.isKeyguardShowing()
- }
-
- override fun shouldFilterOut(entry: NotificationEntry, now: Long): Boolean =
- when {
- // Don't apply filter if the setting is disabled
- !unseenFilterEnabled -> false
- // Don't apply filter if the keyguard isn't currently showing
- !isOnKeyguard() -> false
- // Don't apply the filter if the notification is unseen
- unseenNotifications.contains(entry) -> false
- // Don't apply the filter to (non-promoted) group summaries
- // - summary will be pruned if necessary, depending on if children are filtered
- entry.parent?.summary == entry -> false
- // Check that the entry satisfies certain characteristics that would bypass the
- // filter
- shouldIgnoreUnseenCheck(entry) -> false
- else -> true
- }.also { hasFiltered -> hasFilteredAnyNotifs = hasFilteredAnyNotifs || hasFiltered }
-
- override fun onCleanup() {
- logger.logProviderHasFilteredOutSeenNotifs(hasFilteredAnyNotifs)
- seenNotificationsInteractor.setHasFilteredOutSeenNotifications(hasFilteredAnyNotifs)
- hasFilteredAnyNotifs = false
- }
- }
-
private val notifFilter: NotifFilter =
object : NotifFilter(TAG) {
override fun shouldFilterOut(entry: NotificationEntry, now: Long): Boolean =
keyguardNotificationVisibilityProvider.shouldHideNotification(entry)
}
- private fun shouldIgnoreUnseenCheck(entry: NotificationEntry): Boolean =
- when {
- entry.isMediaNotification -> true
- entry.sbn.isOngoing -> true
- else -> false
- }
-
// TODO(b/206118999): merge this class with SensitiveContentCoordinator which also depends on
// these same updates
private fun setupInvalidateNotifListCallbacks() {}
@@ -499,22 +70,7 @@ constructor(
sectionHeaderVisibilityProvider.sectionHeadersVisible = showSections
}
- override fun dump(pw: PrintWriter, args: Array<out String>) =
- with(pw.asIndenting()) {
- println(
- "notificationListInteractor.hasFilteredOutSeenNotifications.value=" +
- seenNotificationsInteractor.hasFilteredOutSeenNotifications.value
- )
- println("unseen notifications:")
- indentIfPossible {
- for (notification in unseenNotifications) {
- println(notification.key)
- }
- }
- }
-
companion object {
private const val TAG = "KeyguardCoordinator"
- private val SEEN_TIMEOUT = 5.seconds
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/LockScreenMinimalismCoordinator.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/LockScreenMinimalismCoordinator.kt
new file mode 100644
index 000000000000..a6605f652ff3
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/LockScreenMinimalismCoordinator.kt
@@ -0,0 +1,295 @@
+/*
+ * 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.collection.coordinator
+
+import android.annotation.SuppressLint
+import android.app.NotificationManager
+import android.os.UserHandle
+import android.provider.Settings
+import androidx.annotation.VisibleForTesting
+import com.android.systemui.Dumpable
+import com.android.systemui.dagger.qualifiers.Application
+import com.android.systemui.dagger.qualifiers.Background
+import com.android.systemui.dump.DumpManager
+import com.android.systemui.plugins.statusbar.StatusBarStateController
+import com.android.systemui.shade.domain.interactor.ShadeInteractor
+import com.android.systemui.statusbar.StatusBarState
+import com.android.systemui.statusbar.notification.collection.GroupEntry
+import com.android.systemui.statusbar.notification.collection.ListEntry
+import com.android.systemui.statusbar.notification.collection.NotifPipeline
+import com.android.systemui.statusbar.notification.collection.NotificationEntry
+import com.android.systemui.statusbar.notification.collection.coordinator.dagger.CoordinatorScope
+import com.android.systemui.statusbar.notification.collection.listbuilder.pluggable.NotifPromoter
+import com.android.systemui.statusbar.notification.collection.listbuilder.pluggable.NotifSectioner
+import com.android.systemui.statusbar.notification.collection.notifcollection.NotifCollectionListener
+import com.android.systemui.statusbar.notification.domain.interactor.HeadsUpNotificationInteractor
+import com.android.systemui.statusbar.notification.domain.interactor.SeenNotificationsInteractor
+import com.android.systemui.statusbar.notification.shared.NotificationMinimalismPrototype
+import com.android.systemui.statusbar.notification.stack.BUCKET_TOP_ONGOING
+import com.android.systemui.statusbar.notification.stack.BUCKET_TOP_UNSEEN
+import com.android.systemui.util.asIndenting
+import com.android.systemui.util.printCollection
+import com.android.systemui.util.settings.SecureSettings
+import com.android.systemui.util.settings.SettingsProxyExt.observerFlow
+import java.io.PrintWriter
+import javax.inject.Inject
+import kotlin.time.Duration.Companion.seconds
+import kotlinx.coroutines.CoroutineDispatcher
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.coroutineScope
+import kotlinx.coroutines.delay
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.collectLatest
+import kotlinx.coroutines.flow.conflate
+import kotlinx.coroutines.flow.distinctUntilChanged
+import kotlinx.coroutines.flow.flowOf
+import kotlinx.coroutines.flow.flowOn
+import kotlinx.coroutines.flow.map
+import kotlinx.coroutines.flow.onStart
+import kotlinx.coroutines.launch
+
+/**
+ * If the setting is enabled, this will track seen notifications and ensure that they only show in
+ * the shelf on the lockscreen.
+ *
+ * This class is a replacement of the [OriginalUnseenKeyguardCoordinator].
+ */
+@CoordinatorScope
+@SuppressLint("SharedFlowCreation")
+class LockScreenMinimalismCoordinator
+@Inject
+constructor(
+ @Background private val bgDispatcher: CoroutineDispatcher,
+ private val dumpManager: DumpManager,
+ private val headsUpInteractor: HeadsUpNotificationInteractor,
+ private val logger: LockScreenMinimalismCoordinatorLogger,
+ @Application private val scope: CoroutineScope,
+ private val secureSettings: SecureSettings,
+ private val seenNotificationsInteractor: SeenNotificationsInteractor,
+ private val statusBarStateController: StatusBarStateController,
+ private val shadeInteractor: ShadeInteractor,
+) : Coordinator, Dumpable {
+
+ private val unseenNotifications = mutableSetOf<NotificationEntry>()
+ private var isShadeVisible = false
+ private var unseenFilterEnabled = false
+
+ override fun attach(pipeline: NotifPipeline) {
+ if (NotificationMinimalismPrototype.isUnexpectedlyInLegacyMode()) {
+ return
+ }
+ pipeline.addPromoter(unseenNotifPromoter)
+ pipeline.addOnBeforeTransformGroupsListener(::pickOutTopUnseenNotifs)
+ pipeline.addCollectionListener(collectionListener)
+ scope.launch { trackUnseenFilterSettingChanges() }
+ dumpManager.registerDumpable(this)
+ }
+
+ private suspend fun trackSeenNotifications() {
+ coroutineScope {
+ launch { clearUnseenNotificationsWhenShadeIsExpanded() }
+ launch { markHeadsUpNotificationsAsSeen() }
+ }
+ }
+
+ private suspend fun clearUnseenNotificationsWhenShadeIsExpanded() {
+ shadeInteractor.isShadeFullyExpanded.collectLatest { isExpanded ->
+ // Give keyguard events time to propagate, in case this expansion is part of the
+ // keyguard transition and not the user expanding the shade
+ delay(SHADE_VISIBLE_SEEN_TIMEOUT)
+ isShadeVisible = isExpanded
+ if (isExpanded) {
+ logger.logShadeVisible(unseenNotifications.size)
+ unseenNotifications.clear()
+ // no need to invalidateList; filtering is inactive while shade is open
+ } else {
+ logger.logShadeHidden()
+ }
+ }
+ }
+
+ private suspend fun markHeadsUpNotificationsAsSeen() {
+ headsUpInteractor.topHeadsUpRowIfPinned
+ .map { it?.let { headsUpInteractor.notificationKey(it) } }
+ .collectLatest { key ->
+ if (key == null) {
+ logger.logTopHeadsUpRow(key = null, wasUnseenWhenPinned = false)
+ } else {
+ val wasUnseenWhenPinned = unseenNotifications.any { it.key == key }
+ logger.logTopHeadsUpRow(key, wasUnseenWhenPinned)
+ if (wasUnseenWhenPinned) {
+ delay(HEADS_UP_SEEN_TIMEOUT)
+ val wasUnseenAfterDelay = unseenNotifications.removeIf { it.key == key }
+ logger.logHunHasBeenSeen(key, wasUnseenAfterDelay)
+ // no need to invalidateList; nothing should change until after heads up
+ }
+ }
+ }
+ }
+
+ private fun unseenFeatureEnabled(): Flow<Boolean> {
+ // TODO(b/330387368): create LOCK_SCREEN_NOTIFICATION_MINIMALISM setting to use here?
+ // Or should we actually just repurpose using the existing setting?
+ if (NotificationMinimalismPrototype.isEnabled) {
+ return flowOf(true)
+ }
+ return secureSettings
+ // emit whenever the setting has changed
+ .observerFlow(
+ UserHandle.USER_ALL,
+ Settings.Secure.LOCK_SCREEN_SHOW_ONLY_UNSEEN_NOTIFICATIONS,
+ )
+ // perform a query immediately
+ .onStart { emit(Unit) }
+ // for each change, lookup the new value
+ .map {
+ secureSettings.getIntForUser(
+ name = Settings.Secure.LOCK_SCREEN_SHOW_ONLY_UNSEEN_NOTIFICATIONS,
+ def = 0,
+ userHandle = UserHandle.USER_CURRENT,
+ ) == 1
+ }
+ // don't emit anything if nothing has changed
+ .distinctUntilChanged()
+ // perform lookups on the bg thread pool
+ .flowOn(bgDispatcher)
+ // only track the most recent emission, if events are happening faster than they can be
+ // consumed
+ .conflate()
+ }
+
+ private suspend fun trackUnseenFilterSettingChanges() {
+ unseenFeatureEnabled().collectLatest { isSettingEnabled ->
+ // update local field and invalidate if necessary
+ if (isSettingEnabled != unseenFilterEnabled) {
+ unseenFilterEnabled = isSettingEnabled
+ unseenNotifPromoter.invalidateList("unseen setting changed")
+ }
+ // if the setting is enabled, then start tracking and filtering unseen notifications
+ logger.logTrackingUnseen(isSettingEnabled)
+ if (isSettingEnabled) {
+ trackSeenNotifications()
+ }
+ }
+ }
+
+ private val collectionListener =
+ object : NotifCollectionListener {
+ override fun onEntryAdded(entry: NotificationEntry) {
+ if (!isShadeVisible) {
+ logger.logUnseenAdded(entry.key)
+ unseenNotifications.add(entry)
+ }
+ }
+
+ override fun onEntryUpdated(entry: NotificationEntry) {
+ if (!isShadeVisible) {
+ logger.logUnseenUpdated(entry.key)
+ unseenNotifications.add(entry)
+ }
+ }
+
+ override fun onEntryRemoved(entry: NotificationEntry, reason: Int) {
+ if (unseenNotifications.remove(entry)) {
+ logger.logUnseenRemoved(entry.key)
+ }
+ }
+ }
+
+ private fun pickOutTopUnseenNotifs(list: List<ListEntry>) {
+ if (NotificationMinimalismPrototype.isUnexpectedlyInLegacyMode()) return
+ // Only ever elevate a top unseen notification on keyguard, not even locked shade
+ if (statusBarStateController.state != StatusBarState.KEYGUARD) {
+ seenNotificationsInteractor.setTopOngoingNotification(null)
+ seenNotificationsInteractor.setTopUnseenNotification(null)
+ return
+ }
+ // On keyguard pick the top-ranked unseen or ongoing notification to elevate
+ val nonSummaryEntries: Sequence<NotificationEntry> =
+ list
+ .asSequence()
+ .flatMap {
+ when (it) {
+ is NotificationEntry -> listOfNotNull(it)
+ is GroupEntry -> it.children
+ else -> error("unhandled type of $it")
+ }
+ }
+ .filter { it.importance >= NotificationManager.IMPORTANCE_DEFAULT }
+ seenNotificationsInteractor.setTopOngoingNotification(
+ nonSummaryEntries
+ .filter { ColorizedFgsCoordinator.isRichOngoing(it) }
+ .minByOrNull { it.ranking.rank }
+ )
+ seenNotificationsInteractor.setTopUnseenNotification(
+ nonSummaryEntries
+ .filter { !ColorizedFgsCoordinator.isRichOngoing(it) && it in unseenNotifications }
+ .minByOrNull { it.ranking.rank }
+ )
+ }
+
+ @VisibleForTesting
+ val unseenNotifPromoter =
+ object : NotifPromoter(TAG) {
+ override fun shouldPromoteToTopLevel(child: NotificationEntry): Boolean =
+ when {
+ NotificationMinimalismPrototype.isUnexpectedlyInLegacyMode() -> false
+ seenNotificationsInteractor.isTopOngoingNotification(child) -> true
+ !NotificationMinimalismPrototype.ungroupTopUnseen -> false
+ else -> seenNotificationsInteractor.isTopUnseenNotification(child)
+ }
+ }
+
+ val topOngoingSectioner =
+ object : NotifSectioner("TopOngoing", BUCKET_TOP_ONGOING) {
+ override fun isInSection(entry: ListEntry): Boolean {
+ if (NotificationMinimalismPrototype.isUnexpectedlyInLegacyMode()) return false
+ return entry.anyEntry { notificationEntry ->
+ seenNotificationsInteractor.isTopOngoingNotification(notificationEntry)
+ }
+ }
+ }
+
+ val topUnseenSectioner =
+ object : NotifSectioner("TopUnseen", BUCKET_TOP_UNSEEN) {
+ override fun isInSection(entry: ListEntry): Boolean {
+ if (NotificationMinimalismPrototype.isUnexpectedlyInLegacyMode()) return false
+ return entry.anyEntry { notificationEntry ->
+ seenNotificationsInteractor.isTopUnseenNotification(notificationEntry)
+ }
+ }
+ }
+
+ private fun ListEntry.anyEntry(predicate: (NotificationEntry?) -> Boolean) =
+ when {
+ predicate(representativeEntry) -> true
+ this !is GroupEntry -> false
+ else -> children.any(predicate)
+ }
+
+ override fun dump(pw: PrintWriter, args: Array<out String>) =
+ with(pw.asIndenting()) {
+ seenNotificationsInteractor.dump(this)
+ printCollection("unseen notifications", unseenNotifications) { println(it.key) }
+ }
+
+ companion object {
+ private const val TAG = "LockScreenMinimalismCoordinator"
+ private val SHADE_VISIBLE_SEEN_TIMEOUT = 0.25.seconds
+ private val HEADS_UP_SEEN_TIMEOUT = 0.75.seconds
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/LockScreenMinimalismCoordinatorLogger.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/LockScreenMinimalismCoordinatorLogger.kt
new file mode 100644
index 000000000000..e44a77c30999
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/LockScreenMinimalismCoordinatorLogger.kt
@@ -0,0 +1,99 @@
+/*
+ * 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.collection.coordinator
+
+import com.android.systemui.log.LogBuffer
+import com.android.systemui.log.core.LogLevel
+import com.android.systemui.log.dagger.UnseenNotificationLog
+import javax.inject.Inject
+
+private const val TAG = "LockScreenMinimalismCoordinator"
+
+class LockScreenMinimalismCoordinatorLogger
+@Inject
+constructor(
+ @UnseenNotificationLog private val buffer: LogBuffer,
+) {
+
+ fun logTrackingUnseen(trackingUnseen: Boolean) =
+ buffer.log(
+ TAG,
+ LogLevel.DEBUG,
+ messageInitializer = { bool1 = trackingUnseen },
+ messagePrinter = { "${if (bool1) "Start" else "Stop"} tracking unseen notifications." },
+ )
+
+ fun logShadeVisible(numUnseen: Int) {
+ buffer.log(
+ TAG,
+ LogLevel.DEBUG,
+ messageInitializer = { int1 = numUnseen },
+ messagePrinter = { "Shade expanded. Notifications marked as seen: $int1" }
+ )
+ }
+
+ fun logShadeHidden() {
+ buffer.log(TAG, LogLevel.DEBUG, "Shade no longer expanded.")
+ }
+
+ fun logUnseenAdded(key: String) =
+ buffer.log(
+ TAG,
+ LogLevel.DEBUG,
+ messageInitializer = { str1 = key },
+ messagePrinter = { "Unseen notif added: $str1" },
+ )
+
+ fun logUnseenUpdated(key: String) =
+ buffer.log(
+ TAG,
+ LogLevel.DEBUG,
+ messageInitializer = { str1 = key },
+ messagePrinter = { "Unseen notif updated: $str1" },
+ )
+
+ fun logUnseenRemoved(key: String) =
+ buffer.log(
+ TAG,
+ LogLevel.DEBUG,
+ messageInitializer = { str1 = key },
+ messagePrinter = { "Unseen notif removed: $str1" },
+ )
+
+ fun logHunHasBeenSeen(key: String, wasUnseen: Boolean) =
+ buffer.log(
+ TAG,
+ LogLevel.DEBUG,
+ messageInitializer = {
+ str1 = key
+ bool1 = wasUnseen
+ },
+ messagePrinter = { "Heads up notif has been seen: $str1 wasUnseen=$bool1" },
+ )
+
+ fun logTopHeadsUpRow(key: String?, wasUnseenWhenPinned: Boolean) {
+ buffer.log(
+ TAG,
+ LogLevel.DEBUG,
+ messageInitializer = {
+ str1 = key
+ bool1 = wasUnseenWhenPinned
+ },
+ messagePrinter = { "New notif is top heads up: $str1 wasUnseen=$bool1" },
+ )
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/NotifCoordinators.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/NotifCoordinators.kt
index e0389820aedf..73ce48b2324a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/NotifCoordinators.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/NotifCoordinators.kt
@@ -17,7 +17,11 @@ package com.android.systemui.statusbar.notification.collection.coordinator
import com.android.systemui.flags.FeatureFlags
import com.android.systemui.flags.Flags.LOCKSCREEN_WALLPAPER_DREAM_ENABLED
-import com.android.systemui.statusbar.notification.collection.*
+import com.android.systemui.statusbar.notification.collection.NotifPipeline
+import com.android.systemui.statusbar.notification.collection.NotificationClassificationFlag
+import com.android.systemui.statusbar.notification.collection.PipelineDumpable
+import com.android.systemui.statusbar.notification.collection.PipelineDumper
+import com.android.systemui.statusbar.notification.collection.SortBySectionTimeFlag
import com.android.systemui.statusbar.notification.collection.coordinator.dagger.CoordinatorScope
import com.android.systemui.statusbar.notification.collection.listbuilder.pluggable.NotifSectioner
import com.android.systemui.statusbar.notification.collection.provider.SectionStyleProvider
@@ -42,6 +46,8 @@ constructor(
hideLocallyDismissedNotifsCoordinator: HideLocallyDismissedNotifsCoordinator,
hideNotifsForOtherUsersCoordinator: HideNotifsForOtherUsersCoordinator,
keyguardCoordinator: KeyguardCoordinator,
+ unseenKeyguardCoordinator: OriginalUnseenKeyguardCoordinator,
+ lockScreenMinimalismCoordinator: LockScreenMinimalismCoordinator,
rankingCoordinator: RankingCoordinator,
colorizedFgsCoordinator: ColorizedFgsCoordinator,
deviceProvisionedCoordinator: DeviceProvisionedCoordinator,
@@ -82,6 +88,11 @@ constructor(
mCoordinators.add(hideLocallyDismissedNotifsCoordinator)
mCoordinators.add(hideNotifsForOtherUsersCoordinator)
mCoordinators.add(keyguardCoordinator)
+ if (NotificationMinimalismPrototype.isEnabled) {
+ mCoordinators.add(lockScreenMinimalismCoordinator)
+ } else {
+ mCoordinators.add(unseenKeyguardCoordinator)
+ }
mCoordinators.add(rankingCoordinator)
mCoordinators.add(colorizedFgsCoordinator)
mCoordinators.add(deviceProvisionedCoordinator)
@@ -114,12 +125,12 @@ constructor(
}
// Manually add Ordered Sections
- if (NotificationMinimalismPrototype.V2.isEnabled) {
- mOrderedSections.add(keyguardCoordinator.topOngoingSectioner) // Top Ongoing
+ if (NotificationMinimalismPrototype.isEnabled) {
+ mOrderedSections.add(lockScreenMinimalismCoordinator.topOngoingSectioner) // Top Ongoing
}
mOrderedSections.add(headsUpCoordinator.sectioner) // HeadsUp
- if (NotificationMinimalismPrototype.V2.isEnabled) {
- mOrderedSections.add(keyguardCoordinator.topUnseenSectioner) // Top Unseen
+ if (NotificationMinimalismPrototype.isEnabled) {
+ mOrderedSections.add(lockScreenMinimalismCoordinator.topUnseenSectioner) // Top Unseen
}
mOrderedSections.add(colorizedFgsCoordinator.sectioner) // ForegroundService
if (PriorityPeopleSection.isEnabled) {
@@ -131,10 +142,10 @@ constructor(
}
mOrderedSections.add(rankingCoordinator.alertingSectioner) // Alerting
if (NotificationClassificationFlag.isEnabled) {
- mOrderedSections.add(bundleCoordinator.newsSectioner);
- mOrderedSections.add(bundleCoordinator.socialSectioner);
- mOrderedSections.add(bundleCoordinator.recsSectioner);
- mOrderedSections.add(bundleCoordinator.promoSectioner);
+ mOrderedSections.add(bundleCoordinator.newsSectioner)
+ mOrderedSections.add(bundleCoordinator.socialSectioner)
+ mOrderedSections.add(bundleCoordinator.recsSectioner)
+ mOrderedSections.add(bundleCoordinator.promoSectioner)
}
mOrderedSections.add(rankingCoordinator.silentSectioner) // Silent
mOrderedSections.add(rankingCoordinator.minimizedSectioner) // Minimized
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/OriginalUnseenKeyguardCoordinator.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/OriginalUnseenKeyguardCoordinator.kt
new file mode 100644
index 000000000000..5b25b117c761
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/OriginalUnseenKeyguardCoordinator.kt
@@ -0,0 +1,389 @@
+/*
+ * 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.collection.coordinator
+
+import android.annotation.SuppressLint
+import android.os.UserHandle
+import android.provider.Settings
+import androidx.annotation.VisibleForTesting
+import com.android.systemui.Dumpable
+import com.android.systemui.dagger.qualifiers.Application
+import com.android.systemui.dagger.qualifiers.Background
+import com.android.systemui.dump.DumpManager
+import com.android.systemui.keyguard.data.repository.KeyguardRepository
+import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor
+import com.android.systemui.keyguard.shared.model.KeyguardState
+import com.android.systemui.plugins.statusbar.StatusBarStateController
+import com.android.systemui.scene.shared.model.Scenes
+import com.android.systemui.statusbar.expansionChanges
+import com.android.systemui.statusbar.notification.collection.NotifPipeline
+import com.android.systemui.statusbar.notification.collection.NotificationEntry
+import com.android.systemui.statusbar.notification.collection.coordinator.dagger.CoordinatorScope
+import com.android.systemui.statusbar.notification.collection.listbuilder.pluggable.NotifFilter
+import com.android.systemui.statusbar.notification.collection.notifcollection.NotifCollectionListener
+import com.android.systemui.statusbar.notification.domain.interactor.SeenNotificationsInteractor
+import com.android.systemui.statusbar.notification.shared.NotificationMinimalismPrototype
+import com.android.systemui.statusbar.policy.HeadsUpManager
+import com.android.systemui.statusbar.policy.headsUpEvents
+import com.android.systemui.util.asIndenting
+import com.android.systemui.util.indentIfPossible
+import com.android.systemui.util.settings.SecureSettings
+import com.android.systemui.util.settings.SettingsProxyExt.observerFlow
+import java.io.PrintWriter
+import javax.inject.Inject
+import kotlin.time.Duration.Companion.seconds
+import kotlinx.coroutines.CoroutineDispatcher
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.Job
+import kotlinx.coroutines.coroutineScope
+import kotlinx.coroutines.delay
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.MutableSharedFlow
+import kotlinx.coroutines.flow.collectLatest
+import kotlinx.coroutines.flow.conflate
+import kotlinx.coroutines.flow.distinctUntilChanged
+import kotlinx.coroutines.flow.flowOf
+import kotlinx.coroutines.flow.flowOn
+import kotlinx.coroutines.flow.map
+import kotlinx.coroutines.flow.onEach
+import kotlinx.coroutines.flow.onStart
+import kotlinx.coroutines.launch
+import kotlinx.coroutines.yield
+
+/**
+ * If the setting is enabled, this will track and hide seen notifications on the lockscreen.
+ *
+ * This is the "original" unseen keyguard coordinator because this is the logic originally developed
+ * for large screen devices where showing "seen" notifications on the lock screen was distracting.
+ * Moreover, this file was created during a project that will replace this logic, so the
+ * [LockScreenMinimalismCoordinator] is the expected replacement of this file.
+ */
+@CoordinatorScope
+@SuppressLint("SharedFlowCreation")
+class OriginalUnseenKeyguardCoordinator
+@Inject
+constructor(
+ @Background private val bgDispatcher: CoroutineDispatcher,
+ private val dumpManager: DumpManager,
+ private val headsUpManager: HeadsUpManager,
+ private val keyguardRepository: KeyguardRepository,
+ private val keyguardTransitionInteractor: KeyguardTransitionInteractor,
+ private val logger: KeyguardCoordinatorLogger,
+ @Application private val scope: CoroutineScope,
+ private val secureSettings: SecureSettings,
+ private val seenNotificationsInteractor: SeenNotificationsInteractor,
+ private val statusBarStateController: StatusBarStateController,
+) : Coordinator, Dumpable {
+
+ private val unseenNotifications = mutableSetOf<NotificationEntry>()
+ private val unseenEntryAdded = MutableSharedFlow<NotificationEntry>(extraBufferCapacity = 1)
+ private val unseenEntryRemoved = MutableSharedFlow<NotificationEntry>(extraBufferCapacity = 1)
+ private var unseenFilterEnabled = false
+
+ override fun attach(pipeline: NotifPipeline) {
+ NotificationMinimalismPrototype.assertInLegacyMode()
+ pipeline.addFinalizeFilter(unseenNotifFilter)
+ pipeline.addCollectionListener(collectionListener)
+ scope.launch { trackUnseenFilterSettingChanges() }
+ dumpManager.registerDumpable(this)
+ }
+
+ private suspend fun trackSeenNotifications() {
+ // Whether or not keyguard is visible (or occluded).
+ @Suppress("DEPRECATION")
+ val isKeyguardPresentFlow: Flow<Boolean> =
+ keyguardTransitionInteractor
+ .transitionValue(
+ scene = Scenes.Gone,
+ stateWithoutSceneContainer = KeyguardState.GONE,
+ )
+ .map { it == 0f }
+ .distinctUntilChanged()
+ .onEach { trackingUnseen -> logger.logTrackingUnseen(trackingUnseen) }
+
+ // Separately track seen notifications while the device is locked, applying once the device
+ // is unlocked.
+ val notificationsSeenWhileLocked = mutableSetOf<NotificationEntry>()
+
+ // Use [collectLatest] to cancel any running jobs when [trackingUnseen] changes.
+ isKeyguardPresentFlow.collectLatest { isKeyguardPresent: Boolean ->
+ if (isKeyguardPresent) {
+ // Keyguard is not gone, notifications need to be visible for a certain threshold
+ // before being marked as seen
+ trackSeenNotificationsWhileLocked(notificationsSeenWhileLocked)
+ } else {
+ // Mark all seen-while-locked notifications as seen for real.
+ if (notificationsSeenWhileLocked.isNotEmpty()) {
+ unseenNotifications.removeAll(notificationsSeenWhileLocked)
+ logger.logAllMarkedSeenOnUnlock(
+ seenCount = notificationsSeenWhileLocked.size,
+ remainingUnseenCount = unseenNotifications.size
+ )
+ notificationsSeenWhileLocked.clear()
+ }
+ unseenNotifFilter.invalidateList("keyguard no longer showing")
+ // Keyguard is gone, notifications can be immediately marked as seen when they
+ // become visible.
+ trackSeenNotificationsWhileUnlocked()
+ }
+ }
+ }
+
+ /**
+ * Keep [notificationsSeenWhileLocked] updated to represent which notifications have actually
+ * been "seen" while the device is on the keyguard.
+ */
+ private suspend fun trackSeenNotificationsWhileLocked(
+ notificationsSeenWhileLocked: MutableSet<NotificationEntry>,
+ ) = coroutineScope {
+ // Remove removed notifications from the set
+ launch {
+ unseenEntryRemoved.collect { entry ->
+ if (notificationsSeenWhileLocked.remove(entry)) {
+ logger.logRemoveSeenOnLockscreen(entry)
+ }
+ }
+ }
+ // Use collectLatest so that the timeout delay is cancelled if the device enters doze, and
+ // is restarted when doze ends.
+ keyguardRepository.isDozing.collectLatest { isDozing ->
+ if (!isDozing) {
+ trackSeenNotificationsWhileLockedAndNotDozing(notificationsSeenWhileLocked)
+ }
+ }
+ }
+
+ /**
+ * Keep [notificationsSeenWhileLocked] updated to represent which notifications have actually
+ * been "seen" while the device is on the keyguard and not dozing. Any new and existing unseen
+ * notifications are not marked as seen until they are visible for the [SEEN_TIMEOUT] duration.
+ */
+ private suspend fun trackSeenNotificationsWhileLockedAndNotDozing(
+ notificationsSeenWhileLocked: MutableSet<NotificationEntry>
+ ) = coroutineScope {
+ // All child tracking jobs will be cancelled automatically when this is cancelled.
+ val trackingJobsByEntry = mutableMapOf<NotificationEntry, Job>()
+
+ /**
+ * Wait for the user to spend enough time on the lock screen before removing notification
+ * from unseen set upon unlock.
+ */
+ suspend fun trackSeenDurationThreshold(entry: NotificationEntry) {
+ if (notificationsSeenWhileLocked.remove(entry)) {
+ logger.logResetSeenOnLockscreen(entry)
+ }
+ delay(SEEN_TIMEOUT)
+ notificationsSeenWhileLocked.add(entry)
+ trackingJobsByEntry.remove(entry)
+ logger.logSeenOnLockscreen(entry)
+ }
+
+ /** Stop any unseen tracking when a notification is removed. */
+ suspend fun stopTrackingRemovedNotifs(): Nothing =
+ unseenEntryRemoved.collect { entry ->
+ trackingJobsByEntry.remove(entry)?.let {
+ it.cancel()
+ logger.logStopTrackingLockscreenSeenDuration(entry)
+ }
+ }
+
+ /** Start tracking new notifications when they are posted. */
+ suspend fun trackNewUnseenNotifs(): Nothing = coroutineScope {
+ unseenEntryAdded.collect { entry ->
+ logger.logTrackingLockscreenSeenDuration(entry)
+ // If this is an update, reset the tracking.
+ trackingJobsByEntry[entry]?.let {
+ it.cancel()
+ logger.logResetSeenOnLockscreen(entry)
+ }
+ trackingJobsByEntry[entry] = launch { trackSeenDurationThreshold(entry) }
+ }
+ }
+
+ // Start tracking for all notifications that are currently unseen.
+ logger.logTrackingLockscreenSeenDuration(unseenNotifications)
+ unseenNotifications.forEach { entry ->
+ trackingJobsByEntry[entry] = launch { trackSeenDurationThreshold(entry) }
+ }
+
+ launch { trackNewUnseenNotifs() }
+ launch { stopTrackingRemovedNotifs() }
+ }
+
+ // Track "seen" notifications, marking them as such when either shade is expanded or the
+ // notification becomes heads up.
+ private suspend fun trackSeenNotificationsWhileUnlocked() {
+ coroutineScope {
+ launch { clearUnseenNotificationsWhenShadeIsExpanded() }
+ launch { markHeadsUpNotificationsAsSeen() }
+ }
+ }
+
+ private suspend fun clearUnseenNotificationsWhenShadeIsExpanded() {
+ statusBarStateController.expansionChanges.collectLatest { isExpanded ->
+ // Give keyguard events time to propagate, in case this expansion is part of the
+ // keyguard transition and not the user expanding the shade
+ yield()
+ if (isExpanded) {
+ logger.logShadeExpanded()
+ unseenNotifications.clear()
+ }
+ }
+ }
+
+ private suspend fun markHeadsUpNotificationsAsSeen() {
+ headsUpManager.allEntries
+ .filter { it.isRowPinned }
+ .forEach { unseenNotifications.remove(it) }
+ headsUpManager.headsUpEvents.collect { (entry, isHun) ->
+ if (isHun) {
+ logger.logUnseenHun(entry.key)
+ unseenNotifications.remove(entry)
+ }
+ }
+ }
+
+ private fun unseenFeatureEnabled(): Flow<Boolean> {
+ if (NotificationMinimalismPrototype.isEnabled) {
+ // TODO(b/330387368): should this really just be turned off? If so, hide the setting.
+ return flowOf(false)
+ }
+ return secureSettings
+ // emit whenever the setting has changed
+ .observerFlow(
+ UserHandle.USER_ALL,
+ Settings.Secure.LOCK_SCREEN_SHOW_ONLY_UNSEEN_NOTIFICATIONS,
+ )
+ // perform a query immediately
+ .onStart { emit(Unit) }
+ // for each change, lookup the new value
+ .map {
+ secureSettings.getIntForUser(
+ name = Settings.Secure.LOCK_SCREEN_SHOW_ONLY_UNSEEN_NOTIFICATIONS,
+ def = 0,
+ userHandle = UserHandle.USER_CURRENT,
+ ) == 1
+ }
+ // don't emit anything if nothing has changed
+ .distinctUntilChanged()
+ // perform lookups on the bg thread pool
+ .flowOn(bgDispatcher)
+ // only track the most recent emission, if events are happening faster than they can be
+ // consumed
+ .conflate()
+ }
+
+ private suspend fun trackUnseenFilterSettingChanges() {
+ unseenFeatureEnabled().collectLatest { setting ->
+ // update local field and invalidate if necessary
+ if (setting != unseenFilterEnabled) {
+ unseenFilterEnabled = setting
+ unseenNotifFilter.invalidateList("unseen setting changed")
+ }
+ // if the setting is enabled, then start tracking and filtering unseen notifications
+ if (setting) {
+ trackSeenNotifications()
+ }
+ }
+ }
+
+ private val collectionListener =
+ object : NotifCollectionListener {
+ override fun onEntryAdded(entry: NotificationEntry) {
+ if (
+ keyguardRepository.isKeyguardShowing() || !statusBarStateController.isExpanded
+ ) {
+ logger.logUnseenAdded(entry.key)
+ unseenNotifications.add(entry)
+ unseenEntryAdded.tryEmit(entry)
+ }
+ }
+
+ override fun onEntryUpdated(entry: NotificationEntry) {
+ if (
+ keyguardRepository.isKeyguardShowing() || !statusBarStateController.isExpanded
+ ) {
+ logger.logUnseenUpdated(entry.key)
+ unseenNotifications.add(entry)
+ unseenEntryAdded.tryEmit(entry)
+ }
+ }
+
+ override fun onEntryRemoved(entry: NotificationEntry, reason: Int) {
+ if (unseenNotifications.remove(entry)) {
+ logger.logUnseenRemoved(entry.key)
+ unseenEntryRemoved.tryEmit(entry)
+ }
+ }
+ }
+
+ @VisibleForTesting
+ val unseenNotifFilter =
+ object : NotifFilter(TAG) {
+
+ var hasFilteredAnyNotifs = false
+
+ override fun shouldFilterOut(entry: NotificationEntry, now: Long): Boolean =
+ when {
+ // Don't apply filter if the setting is disabled
+ !unseenFilterEnabled -> false
+ // Don't apply filter if the keyguard isn't currently showing
+ !keyguardRepository.isKeyguardShowing() -> false
+ // Don't apply the filter if the notification is unseen
+ unseenNotifications.contains(entry) -> false
+ // Don't apply the filter to (non-promoted) group summaries
+ // - summary will be pruned if necessary, depending on if children are filtered
+ entry.parent?.summary == entry -> false
+ // Check that the entry satisfies certain characteristics that would bypass the
+ // filter
+ shouldIgnoreUnseenCheck(entry) -> false
+ else -> true
+ }.also { hasFiltered -> hasFilteredAnyNotifs = hasFilteredAnyNotifs || hasFiltered }
+
+ override fun onCleanup() {
+ logger.logProviderHasFilteredOutSeenNotifs(hasFilteredAnyNotifs)
+ seenNotificationsInteractor.setHasFilteredOutSeenNotifications(hasFilteredAnyNotifs)
+ hasFilteredAnyNotifs = false
+ }
+ }
+
+ private fun shouldIgnoreUnseenCheck(entry: NotificationEntry): Boolean =
+ when {
+ entry.isMediaNotification -> true
+ entry.sbn.isOngoing -> true
+ else -> false
+ }
+
+ override fun dump(pw: PrintWriter, args: Array<out String>) =
+ with(pw.asIndenting()) {
+ println(
+ "notificationListInteractor.hasFilteredOutSeenNotifications.value=" +
+ seenNotificationsInteractor.hasFilteredOutSeenNotifications.value
+ )
+ println("unseen notifications:")
+ indentIfPossible {
+ for (notification in unseenNotifications) {
+ println(notification.key)
+ }
+ }
+ }
+
+ companion object {
+ private const val TAG = "OriginalUnseenKeyguardCoordinator"
+ private val SEEN_TIMEOUT = 5.seconds
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/VisualStabilityCoordinator.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/VisualStabilityCoordinator.java
index caa6c17ac3d2..696298e82db9 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/VisualStabilityCoordinator.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/VisualStabilityCoordinator.java
@@ -18,8 +18,6 @@ package com.android.systemui.statusbar.notification.collection.coordinator;
import static com.android.systemui.keyguard.WakefulnessLifecycle.WAKEFULNESS_ASLEEP;
-import android.util.Log;
-
import androidx.annotation.NonNull;
import androidx.annotation.VisibleForTesting;
@@ -29,7 +27,10 @@ import com.android.systemui.dagger.SysUISingleton;
import com.android.systemui.dagger.qualifiers.Background;
import com.android.systemui.dump.DumpManager;
import com.android.systemui.keyguard.WakefulnessLifecycle;
+import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor;
+import com.android.systemui.keyguard.shared.model.KeyguardState;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
+import com.android.systemui.scene.shared.flag.SceneContainerFlag;
import com.android.systemui.shade.domain.interactor.ShadeAnimationInteractor;
import com.android.systemui.statusbar.notification.VisibilityLocationProvider;
import com.android.systemui.statusbar.notification.collection.GroupEntry;
@@ -41,7 +42,6 @@ import com.android.systemui.statusbar.notification.collection.provider.VisualSta
import com.android.systemui.statusbar.notification.domain.interactor.SeenNotificationsInteractor;
import com.android.systemui.statusbar.notification.shared.NotificationMinimalismPrototype;
import com.android.systemui.statusbar.policy.HeadsUpManager;
-import com.android.systemui.util.Compile;
import com.android.systemui.util.concurrency.DelayableExecutor;
import com.android.systemui.util.kotlin.JavaAdapter;
@@ -61,8 +61,6 @@ import javax.inject.Inject;
// TODO(b/204468557): Move to @CoordinatorScope
@SysUISingleton
public class VisualStabilityCoordinator implements Coordinator, Dumpable {
- public static final String TAG = "VisualStability";
- public static final boolean DEBUG = Compile.IS_DEBUG && Log.isLoggable(TAG, Log.VERBOSE);
private final DelayableExecutor mDelayableExecutor;
private final HeadsUpManager mHeadsUpManager;
private final SeenNotificationsInteractor mSeenNotificationsInteractor;
@@ -73,6 +71,8 @@ public class VisualStabilityCoordinator implements Coordinator, Dumpable {
private final VisualStabilityProvider mVisualStabilityProvider;
private final WakefulnessLifecycle mWakefulnessLifecycle;
private final CommunalInteractor mCommunalInteractor;
+ private final KeyguardTransitionInteractor mKeyguardTransitionInteractor;
+ private final VisualStabilityCoordinatorLogger mLogger;
private boolean mSleepy = true;
private boolean mFullyDozed;
@@ -81,6 +81,7 @@ public class VisualStabilityCoordinator implements Coordinator, Dumpable {
private boolean mNotifPanelCollapsing;
private boolean mNotifPanelLaunchingActivity;
private boolean mCommunalShowing = false;
+ private boolean mLockscreenShowing = false;
private boolean mPipelineRunAllowed;
private boolean mReorderingAllowed;
@@ -109,7 +110,9 @@ public class VisualStabilityCoordinator implements Coordinator, Dumpable {
VisibilityLocationProvider visibilityLocationProvider,
VisualStabilityProvider visualStabilityProvider,
WakefulnessLifecycle wakefulnessLifecycle,
- CommunalInteractor communalInteractor) {
+ CommunalInteractor communalInteractor,
+ KeyguardTransitionInteractor keyguardTransitionInteractor,
+ VisualStabilityCoordinatorLogger logger) {
mHeadsUpManager = headsUpManager;
mShadeAnimationInteractor = shadeAnimationInteractor;
mJavaAdapter = javaAdapter;
@@ -120,6 +123,8 @@ public class VisualStabilityCoordinator implements Coordinator, Dumpable {
mStatusBarStateController = statusBarStateController;
mDelayableExecutor = delayableExecutor;
mCommunalInteractor = communalInteractor;
+ mKeyguardTransitionInteractor = keyguardTransitionInteractor;
+ mLogger = logger;
dumpManager.registerDumpable(this);
}
@@ -138,6 +143,9 @@ public class VisualStabilityCoordinator implements Coordinator, Dumpable {
this::onLaunchingActivityChanged);
mJavaAdapter.alwaysCollectFlow(mCommunalInteractor.isIdleOnCommunal(),
this::onCommunalShowingChanged);
+ mJavaAdapter.alwaysCollectFlow(mKeyguardTransitionInteractor.transitionValue(
+ KeyguardState.LOCKSCREEN),
+ this::onLockscreenKeyguardStateTransitionValueChanged);
pipeline.setVisualStabilityManager(mNotifStabilityManager);
}
@@ -150,8 +158,9 @@ public class VisualStabilityCoordinator implements Coordinator, Dumpable {
if (entry == null) {
return false;
}
- boolean isTopUnseen = NotificationMinimalismPrototype.V2.isEnabled()
- && mSeenNotificationsInteractor.isTopUnseenNotification(entry);
+ boolean isTopUnseen = NotificationMinimalismPrototype.isEnabled()
+ && (mSeenNotificationsInteractor.isTopUnseenNotification(entry)
+ || mSeenNotificationsInteractor.isTopOngoingNotification(entry));
if (isTopUnseen || mHeadsUpManager.isHeadsUpEntry(entry.getKey())) {
return !mVisibilityLocationProvider.isInVisibleLocation(entry);
}
@@ -220,12 +229,12 @@ public class VisualStabilityCoordinator implements Coordinator, Dumpable {
boolean wasReorderingAllowed = mReorderingAllowed;
mPipelineRunAllowed = !isPanelCollapsingOrLaunchingActivity();
mReorderingAllowed = isReorderingAllowed();
- if (DEBUG && (wasPipelineRunAllowed != mPipelineRunAllowed
- || wasReorderingAllowed != mReorderingAllowed)) {
- Log.d(TAG, "Stability allowances changed:"
- + " pipelineRunAllowed " + wasPipelineRunAllowed + "->" + mPipelineRunAllowed
- + " reorderingAllowed " + wasReorderingAllowed + "->" + mReorderingAllowed
- + " when setting " + field + "=" + value);
+ if (wasPipelineRunAllowed != mPipelineRunAllowed
+ || wasReorderingAllowed != mReorderingAllowed) {
+ mLogger.logAllowancesChanged(
+ wasPipelineRunAllowed, mPipelineRunAllowed,
+ wasReorderingAllowed, mReorderingAllowed,
+ field, value);
}
if (mPipelineRunAllowed && mIsSuppressingPipelineRun) {
mNotifStabilityManager.invalidateList("pipeline run suppression ended");
@@ -250,7 +259,9 @@ public class VisualStabilityCoordinator implements Coordinator, Dumpable {
}
private boolean isReorderingAllowed() {
- return ((mFullyDozed && mSleepy) || !mPanelExpanded || mCommunalShowing) && !mPulsing;
+ final boolean sleepyAndDozed = mFullyDozed && mSleepy;
+ final boolean stackShowing = mPanelExpanded || mLockscreenShowing;
+ return (sleepyAndDozed || !stackShowing || mCommunalShowing) && !mPulsing;
}
/**
@@ -363,4 +374,14 @@ public class VisualStabilityCoordinator implements Coordinator, Dumpable {
mCommunalShowing = isShowing;
updateAllowedStates("communalShowing", isShowing);
}
+
+ private void onLockscreenKeyguardStateTransitionValueChanged(float value) {
+ if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) {
+ return;
+ }
+
+ final boolean isShowing = value > 0.0f;
+ mLockscreenShowing = isShowing;
+ updateAllowedStates("lockscreenShowing", isShowing);
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/VisualStabilityCoordinatorLogger.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/VisualStabilityCoordinatorLogger.kt
new file mode 100644
index 000000000000..fe23e4e12db4
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/VisualStabilityCoordinatorLogger.kt
@@ -0,0 +1,56 @@
+/*
+ * 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.collection.coordinator
+
+import com.android.systemui.log.LogBuffer
+import com.android.systemui.log.core.LogLevel
+import com.android.systemui.log.dagger.VisualStabilityLog
+import javax.inject.Inject
+
+private const val TAG = "VisualStability"
+
+class VisualStabilityCoordinatorLogger
+@Inject
+constructor(@VisualStabilityLog private val buffer: LogBuffer) {
+ fun logAllowancesChanged(
+ wasRunAllowed: Boolean,
+ isRunAllowed: Boolean,
+ wasReorderingAllowed: Boolean,
+ isReorderingAllowed: Boolean,
+ field: String,
+ value: Boolean
+ ) {
+ buffer.log(
+ TAG,
+ LogLevel.DEBUG,
+ {
+ bool1 = wasRunAllowed
+ bool2 = isRunAllowed
+ bool3 = wasReorderingAllowed
+ bool4 = isReorderingAllowed
+ str1 = field
+ str2 = value.toString()
+ },
+ {
+ "stability allowances changed:" +
+ " pipelineRunAllowed $bool1->$bool2" +
+ " reorderingAllowed $bool3->$bool4" +
+ " when setting $str1=$str2"
+ }
+ )
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/provider/VisualStabilityProvider.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/provider/VisualStabilityProvider.kt
index f166d32812ae..5614f3fc9590 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/provider/VisualStabilityProvider.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/provider/VisualStabilityProvider.kt
@@ -2,6 +2,7 @@ package com.android.systemui.statusbar.notification.collection.provider
import android.util.ArraySet
import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.statusbar.notification.shared.NotificationThrottleHun
import com.android.systemui.util.ListenerSet
import javax.inject.Inject
@@ -21,7 +22,7 @@ class VisualStabilityProvider @Inject constructor() {
field = value
if (value) {
notifyReorderingAllowed()
- } else {
+ } else if (NotificationThrottleHun.isEnabled){
banListeners.forEach { listener ->
listener.onReorderingBanned()
}
@@ -70,5 +71,4 @@ fun interface OnReorderingAllowedListener {
fun interface OnReorderingBannedListener {
fun onReorderingBanned()
-}
-
+} \ No newline at end of file
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 fec7cf060480..ca5f49d28823 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
@@ -18,12 +18,14 @@ package com.android.systemui.statusbar.notification.dagger;
import android.app.NotificationManager;
import android.content.Context;
+import android.os.Handler;
import android.service.notification.NotificationListenerService;
import com.android.internal.jank.InteractionJankMonitor;
import com.android.settingslib.notification.data.repository.ZenModeRepository;
import com.android.settingslib.notification.data.repository.ZenModeRepositoryImpl;
import com.android.settingslib.notification.domain.interactor.NotificationsSoundPolicyInteractor;
+import com.android.settingslib.notification.modes.ZenModesBackend;
import com.android.systemui.CoreStartable;
import com.android.systemui.dagger.SysUISingleton;
import com.android.systemui.dagger.qualifiers.Application;
@@ -283,9 +285,12 @@ public interface NotificationsModule {
Context context,
NotificationManager notificationManager,
@Application CoroutineScope coroutineScope,
- @Background CoroutineContext coroutineContext) {
+ @Background CoroutineContext coroutineContext,
+ @Background Handler handler
+ ) {
return new ZenModeRepositoryImpl(context, notificationManager,
- coroutineScope, coroutineContext);
+ ZenModesBackend.getInstance(context), context.getContentResolver(),
+ coroutineScope, coroutineContext, handler);
}
@Provides
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/domain/interactor/HeadsUpNotificationInteractor.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/domain/interactor/HeadsUpNotificationInteractor.kt
index cdab108c0254..24b75d49ed16 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/domain/interactor/HeadsUpNotificationInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/domain/interactor/HeadsUpNotificationInteractor.kt
@@ -25,10 +25,12 @@ import com.android.systemui.shade.domain.interactor.ShadeInteractor
import com.android.systemui.statusbar.notification.data.repository.HeadsUpRepository
import com.android.systemui.statusbar.notification.data.repository.HeadsUpRowRepository
import com.android.systemui.statusbar.notification.shared.HeadsUpRowKey
+import com.android.systemui.statusbar.notification.shared.NotificationsHeadsUpRefactor
import javax.inject.Inject
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.combine
+import kotlinx.coroutines.flow.distinctUntilChanged
import kotlinx.coroutines.flow.flatMapLatest
import kotlinx.coroutines.flow.flowOf
import kotlinx.coroutines.flow.map
@@ -43,40 +45,66 @@ constructor(
private val shadeInteractor: ShadeInteractor,
) {
+ /** The top-ranked heads up row, regardless of pinned state */
val topHeadsUpRow: Flow<HeadsUpRowKey?> = headsUpRepository.topHeadsUpRow
+ /** The top-ranked heads up row, if that row is pinned */
+ val topHeadsUpRowIfPinned: Flow<HeadsUpRowKey?> =
+ headsUpRepository.topHeadsUpRow
+ .flatMapLatest { repository ->
+ repository?.isPinned?.map { pinned -> repository.takeIf { pinned } } ?: flowOf(null)
+ }
+ .distinctUntilChanged()
+
/** Set of currently pinned top-level heads up rows to be displayed. */
- val pinnedHeadsUpRows: Flow<Set<HeadsUpRowKey>> =
- headsUpRepository.activeHeadsUpRows.flatMapLatest { repositories ->
- if (repositories.isNotEmpty()) {
- val toCombine: List<Flow<Pair<HeadsUpRowRepository, Boolean>>> =
- repositories.map { repo -> repo.isPinned.map { isPinned -> repo to isPinned } }
- combine(toCombine) { pairs ->
- pairs.filter { (_, isPinned) -> isPinned }.map { (repo, _) -> repo }.toSet()
+ val pinnedHeadsUpRows: Flow<Set<HeadsUpRowKey>> by lazy {
+ if (NotificationsHeadsUpRefactor.isUnexpectedlyInLegacyMode()) {
+ flowOf(emptySet())
+ } else {
+ headsUpRepository.activeHeadsUpRows.flatMapLatest { repositories ->
+ if (repositories.isNotEmpty()) {
+ val toCombine: List<Flow<Pair<HeadsUpRowRepository, Boolean>>> =
+ repositories.map { repo ->
+ repo.isPinned.map { isPinned -> repo to isPinned }
+ }
+ combine(toCombine) { pairs ->
+ pairs.filter { (_, isPinned) -> isPinned }.map { (repo, _) -> repo }.toSet()
+ }
+ } else {
+ // if the set is empty, there are no flows to combine
+ flowOf(emptySet())
}
- } else {
- // if the set is empty, there are no flows to combine
- flowOf(emptySet())
}
}
+ }
/** Are there any pinned heads up rows to display? */
- val hasPinnedRows: Flow<Boolean> =
- headsUpRepository.activeHeadsUpRows.flatMapLatest { rows ->
- if (rows.isNotEmpty()) {
- combine(rows.map { it.isPinned }) { pins -> pins.any { it } }
- } else {
- // if the set is empty, there are no flows to combine
- flowOf(false)
+ val hasPinnedRows: Flow<Boolean> by lazy {
+ if (NotificationsHeadsUpRefactor.isUnexpectedlyInLegacyMode()) {
+ flowOf(false)
+ } else {
+ headsUpRepository.activeHeadsUpRows.flatMapLatest { rows ->
+ if (rows.isNotEmpty()) {
+ combine(rows.map { it.isPinned }) { pins -> pins.any { it } }
+ } else {
+ // if the set is empty, there are no flows to combine
+ flowOf(false)
+ }
}
}
+ }
- val isHeadsUpOrAnimatingAway: Flow<Boolean> =
- combine(hasPinnedRows, headsUpRepository.isHeadsUpAnimatingAway) {
- hasPinnedRows,
- animatingAway ->
- hasPinnedRows || animatingAway
+ val isHeadsUpOrAnimatingAway: Flow<Boolean> by lazy {
+ if (NotificationsHeadsUpRefactor.isUnexpectedlyInLegacyMode()) {
+ flowOf(false)
+ } else {
+ combine(hasPinnedRows, headsUpRepository.isHeadsUpAnimatingAway) {
+ hasPinnedRows,
+ animatingAway ->
+ hasPinnedRows || animatingAway
+ }
}
+ }
private val canShowHeadsUp: Flow<Boolean> =
combine(
@@ -94,16 +122,24 @@ constructor(
}
}
- val showHeadsUpStatusBar: Flow<Boolean> =
- combine(hasPinnedRows, canShowHeadsUp) { hasPinnedRows, canShowHeadsUp ->
- hasPinnedRows && canShowHeadsUp
+ val showHeadsUpStatusBar: Flow<Boolean> by lazy {
+ if (NotificationsHeadsUpRefactor.isUnexpectedlyInLegacyMode()) {
+ flowOf(false)
+ } else {
+ combine(hasPinnedRows, canShowHeadsUp) { hasPinnedRows, canShowHeadsUp ->
+ hasPinnedRows && canShowHeadsUp
+ }
}
+ }
fun headsUpRow(key: HeadsUpRowKey): HeadsUpRowInteractor =
HeadsUpRowInteractor(key as HeadsUpRowRepository)
fun elementKeyFor(key: HeadsUpRowKey) = (key as HeadsUpRowRepository).elementKey
+ /** Returns the Notification Key (the standard string) of this row. */
+ fun notificationKey(key: HeadsUpRowKey): String = (key as HeadsUpRowRepository).key
+
fun setHeadsUpAnimatingAway(animatingAway: Boolean) {
headsUpRepository.setHeadsUpAnimatingAway(animatingAway)
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/domain/interactor/SeenNotificationsInteractor.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/domain/interactor/SeenNotificationsInteractor.kt
index 85c66bd6f25a..948a3c2f65b0 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/domain/interactor/SeenNotificationsInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/domain/interactor/SeenNotificationsInteractor.kt
@@ -16,10 +16,12 @@
package com.android.systemui.statusbar.notification.domain.interactor
+import android.util.IndentingPrintWriter
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.statusbar.notification.collection.NotificationEntry
import com.android.systemui.statusbar.notification.data.repository.ActiveNotificationListRepository
import com.android.systemui.statusbar.notification.shared.NotificationMinimalismPrototype
+import com.android.systemui.util.printSection
import javax.inject.Inject
import kotlinx.coroutines.flow.StateFlow
@@ -41,24 +43,42 @@ constructor(
/** Set the entry that is identified as the top ongoing notification. */
fun setTopOngoingNotification(entry: NotificationEntry?) {
- if (NotificationMinimalismPrototype.V2.isUnexpectedlyInLegacyMode()) return
+ if (NotificationMinimalismPrototype.isUnexpectedlyInLegacyMode()) return
notificationListRepository.topOngoingNotificationKey.value = entry?.key
}
/** Determine if the given notification is the top ongoing notification. */
fun isTopOngoingNotification(entry: NotificationEntry?): Boolean =
- if (NotificationMinimalismPrototype.V2.isUnexpectedlyInLegacyMode()) false
+ if (NotificationMinimalismPrototype.isUnexpectedlyInLegacyMode()) false
else
entry != null && notificationListRepository.topOngoingNotificationKey.value == entry.key
/** Set the entry that is identified as the top unseen notification. */
fun setTopUnseenNotification(entry: NotificationEntry?) {
- if (NotificationMinimalismPrototype.V2.isUnexpectedlyInLegacyMode()) return
+ if (NotificationMinimalismPrototype.isUnexpectedlyInLegacyMode()) return
notificationListRepository.topUnseenNotificationKey.value = entry?.key
}
/** Determine if the given notification is the top unseen notification. */
fun isTopUnseenNotification(entry: NotificationEntry?): Boolean =
- if (NotificationMinimalismPrototype.V2.isUnexpectedlyInLegacyMode()) false
+ if (NotificationMinimalismPrototype.isUnexpectedlyInLegacyMode()) false
else entry != null && notificationListRepository.topUnseenNotificationKey.value == entry.key
+
+ fun dump(pw: IndentingPrintWriter) =
+ with(pw) {
+ printSection("SeenNotificationsInteractor") {
+ print(
+ "hasFilteredOutSeenNotifications",
+ notificationListRepository.hasFilteredOutSeenNotifications.value
+ )
+ print(
+ "topOngoingNotificationKey",
+ notificationListRepository.topOngoingNotificationKey.value
+ )
+ print(
+ "topUnseenNotificationKey",
+ notificationListRepository.topUnseenNotificationKey.value
+ )
+ }
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java
index 9e943ee597f3..1cbb16e3983a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java
@@ -371,12 +371,6 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
setUserExpanded(nowExpanded);
}
- if (ExpandHeadsUpOnInlineReply.isEnabled() && mExpandable) {
- // it is triggered by the user.
- // So, mHasUserChangedExpansion should be marked true.
- mHasUserChangedExpansion = true;
- }
-
notifyHeightChanged(/* needsAnimation= */ true);
mOnExpandClickListener.onExpandClicked(mEntry, v, nowExpanded);
if (shouldLogExpandClickMetric) {
@@ -865,8 +859,8 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
}
@Override
- public void setHeadsUpIsVisible() {
- super.setHeadsUpIsVisible();
+ public void markHeadsUpSeen() {
+ super.markHeadsUpSeen();
mMustStayOnScreen = false;
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableView.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableView.java
index 2af119f98f4a..6becbd295264 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableView.java
@@ -637,7 +637,10 @@ public abstract class ExpandableView extends FrameLayout implements Dumpable, Ro
return false;
}
- public void setHeadsUpIsVisible() {
+ /**
+ * Called, when the notification has been seen by the user in the heads up state.
+ */
+ public void markHeadsUpSeen() {
}
public boolean showingPulsing() {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/RichOngoingNotificationContentExtractor.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/RichOngoingNotificationContentExtractor.kt
index b5ea861c19a6..fe86375d628e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/RichOngoingNotificationContentExtractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/RichOngoingNotificationContentExtractor.kt
@@ -17,6 +17,7 @@
package com.android.systemui.statusbar.notification.row
import android.app.Notification
+import android.app.Notification.RichOngoingStyle
import android.app.PendingIntent
import android.content.Context
import android.util.Log
@@ -68,12 +69,14 @@ class RichOngoingNotificationContentExtractorImpl @Inject constructor() :
builder: Notification.Builder,
systemUIContext: Context,
packageContext: Context
- ): RichOngoingContentModel? =
+ ): RichOngoingContentModel? {
+ if (builder.style !is RichOngoingStyle) return null
+
try {
val sbn = entry.sbn
val notification = sbn.notification
val icon = IconModel(notification.smallIcon)
- if (sbn.packageName == "com.google.android.deskclock") {
+ return if (sbn.packageName == "com.google.android.deskclock") {
when (notification.channelId) {
"Timers v2" -> {
parseTimerNotification(notification, icon)
@@ -90,8 +93,9 @@ class RichOngoingNotificationContentExtractorImpl @Inject constructor() :
} else null
} catch (e: Exception) {
Log.e("RONs", "Error parsing RON", e)
- null
+ return null
}
+ }
/**
* FOR PROTOTYPING ONLY: create a RON TimerContentModel using the time information available
@@ -118,12 +122,15 @@ class RichOngoingNotificationContentExtractorImpl @Inject constructor() :
val timeRemaining = parseTimeDelta(remaining)
TimerContentModel(
icon = icon,
- name = total,
+ // TODO: b/352142761 - define and use a string resource rather than " Timer".
+ // (The UX isn't final so using " Timer" for now).
+ name = total.replace("Σ", "") + " Timer",
state =
TimerContentModel.TimerState.Paused(
timeRemaining = timeRemaining,
- resumeIntent = notification.findActionWithName("Resume"),
- resetIntent = notification.findActionWithName("Reset"),
+ resumeIntent = notification.findStartIntent(),
+ addMinuteAction = notification.findAddMinuteAction(),
+ resetAction = notification.findResetAction(),
)
)
}
@@ -132,12 +139,15 @@ class RichOngoingNotificationContentExtractorImpl @Inject constructor() :
val finishTime = parseCurrentTime(current) + parseTimeDelta(remaining).toMillis()
TimerContentModel(
icon = icon,
- name = total,
+ // TODO: b/352142761 - define and use a string resource rather than " Timer".
+ // (The UX isn't final so using " Timer" for now).
+ name = total.replace("Σ", "") + " Timer",
state =
TimerContentModel.TimerState.Running(
finishTime = finishTime,
- pauseIntent = notification.findActionWithName("Pause"),
- addOneMinuteIntent = notification.findActionWithName("Add 1 min"),
+ pauseIntent = notification.findPauseIntent(),
+ addMinuteAction = notification.findAddMinuteAction(),
+ resetAction = notification.findResetAction(),
)
)
}
@@ -145,8 +155,34 @@ class RichOngoingNotificationContentExtractorImpl @Inject constructor() :
}
}
- private fun Notification.findActionWithName(name: String): PendingIntent? {
- return actions.firstOrNull { name == it.title?.toString() }?.actionIntent
+ private fun Notification.findPauseIntent(): PendingIntent? {
+ return actions
+ .firstOrNull { it.actionIntent.intent?.action?.endsWith(".PAUSE_TIMER") == true }
+ ?.actionIntent
+ }
+
+ private fun Notification.findStartIntent(): PendingIntent? {
+ return actions
+ .firstOrNull { it.actionIntent.intent?.action?.endsWith(".START_TIMER") == true }
+ ?.actionIntent
+ }
+
+ // TODO: b/352142761 - switch to system attributes for label and icon.
+ // - We probably want a consistent look for the Reset button. (Double check with UX.)
+ // - Using the custom assets now since I couldn't an existing "Reset" icon.
+ private fun Notification.findResetAction(): Notification.Action? {
+ return actions.firstOrNull {
+ it.actionIntent.intent?.action?.endsWith(".RESET_TIMER") == true
+ }
+ }
+
+ // TODO: b/352142761 - check with UX on whether this should be required.
+ // - Alternative is to allow for optional actions in addition to main and reset.
+ // - For optional actions, we should take the custom label and icon.
+ private fun Notification.findAddMinuteAction(): Notification.Action? {
+ return actions.firstOrNull {
+ it.actionIntent.intent?.action?.endsWith(".ADD_MINUTE_TIMER") == true
+ }
}
private fun parseCurrentTime(current: String): Long {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/shared/RichOngoingClock.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/shared/RichOngoingClock.kt
index 558470175e8d..33b256456ca3 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/shared/RichOngoingClock.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/shared/RichOngoingClock.kt
@@ -16,6 +16,7 @@
package com.android.systemui.statusbar.notification.row.shared
+import android.app.Notification
import android.app.PendingIntent
import java.time.Duration
@@ -32,6 +33,9 @@ data class TimerContentModel(
) : RichOngoingContentModel {
/** The state (paused or running) of the timer, and relevant time */
sealed interface TimerState {
+ val addMinuteAction: Notification.Action?
+ val resetAction: Notification.Action?
+
/**
* Indicates a running timer
*
@@ -41,7 +45,8 @@ data class TimerContentModel(
data class Running(
val finishTime: Long,
val pauseIntent: PendingIntent?,
- val addOneMinuteIntent: PendingIntent?,
+ override val addMinuteAction: Notification.Action?,
+ override val resetAction: Notification.Action?,
) : TimerState
/**
@@ -53,7 +58,8 @@ data class TimerContentModel(
data class Paused(
val timeRemaining: Duration,
val resumeIntent: PendingIntent?,
- val resetIntent: PendingIntent?,
+ override val addMinuteAction: Notification.Action?,
+ override val resetAction: Notification.Action?,
) : TimerState
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ui/view/TimerButtonView.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ui/view/TimerButtonView.kt
index 0d83aced6d07..8c951877544c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ui/view/TimerButtonView.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ui/view/TimerButtonView.kt
@@ -18,8 +18,9 @@ package com.android.systemui.statusbar.notification.row.ui.view
import android.annotation.DrawableRes
import android.content.Context
+import android.graphics.BlendMode
import android.util.AttributeSet
-import android.widget.Button
+import com.android.internal.widget.EmphasizedNotificationButton
class TimerButtonView
@JvmOverloads
@@ -28,14 +29,19 @@ constructor(
attrs: AttributeSet? = null,
defStyleAttr: Int = 0,
defStyleRes: Int = 0,
-) : Button(context, attrs, defStyleAttr, defStyleRes) {
+) : EmphasizedNotificationButton(context, attrs, defStyleAttr, defStyleRes) {
private val Int.dp: Int
get() = (this * context.resources.displayMetrics.density).toInt()
fun setIcon(@DrawableRes icon: Int) {
val drawable = context.getDrawable(icon)
+
+ drawable?.mutate()
+ drawable?.setTintList(textColors)
+ drawable?.setTintBlendMode(BlendMode.SRC_IN)
drawable?.setBounds(0, 0, 24.dp, 24.dp)
+
setCompoundDrawablesRelative(drawable, null, null, null)
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ui/view/TimerView.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ui/view/TimerView.kt
index 2e164d60431d..d481b50101c1 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ui/view/TimerView.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ui/view/TimerView.kt
@@ -17,7 +17,7 @@
package com.android.systemui.statusbar.notification.row.ui.view
import android.content.Context
-import android.graphics.drawable.Drawable
+import android.graphics.drawable.Icon
import android.os.SystemClock
import android.util.AttributeSet
import android.widget.Chronometer
@@ -48,6 +48,9 @@ constructor(
lateinit var altButton: TimerButtonView
private set
+ lateinit var resetButton: TimerButtonView
+ private set
+
override fun onFinishInflate() {
super.onFinishInflate()
icon = requireViewById(R.id.icon)
@@ -56,13 +59,14 @@ constructor(
pausedTimeRemaining = requireViewById(R.id.pausedTimeRemaining)
mainButton = requireViewById(R.id.mainButton)
altButton = requireViewById(R.id.altButton)
+ resetButton = requireViewById(R.id.resetButton)
}
/** the resources configuration has changed such that the view needs to be reinflated */
fun isReinflateNeeded(): Boolean = configTracker.hasUnhandledConfigChange()
- fun setIcon(iconDrawable: Drawable?) {
- this.icon.setImageDrawable(iconDrawable)
+ fun setIcon(icon: Icon?) {
+ this.icon.setImageIcon(icon)
}
fun setLabel(label: String) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ui/viewbinder/TimerViewBinder.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ui/viewbinder/TimerViewBinder.kt
index c9ff58961582..042d1bcfb2ee 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ui/viewbinder/TimerViewBinder.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ui/viewbinder/TimerViewBinder.kt
@@ -16,6 +16,8 @@
package com.android.systemui.statusbar.notification.row.ui.viewbinder
+import android.content.res.ColorStateList
+import android.graphics.drawable.Icon
import android.view.View
import androidx.core.view.isGone
import androidx.lifecycle.lifecycleScope
@@ -46,12 +48,43 @@ object TimerViewBinder {
launch { viewModel.countdownTime.collect { view.setCountdownTime(it) } }
launch { viewModel.mainButtonModel.collect { bind(view.mainButton, it) } }
launch { viewModel.altButtonModel.collect { bind(view.altButton, it) } }
+ launch { viewModel.resetButtonModel.collect { bind(view.resetButton, it) } }
}
fun bind(buttonView: TimerButtonView, model: TimerViewModel.ButtonViewModel?) {
if (model != null) {
- buttonView.setIcon(model.iconRes)
- buttonView.setText(model.labelRes)
+ buttonView.setButtonBackground(
+ ColorStateList.valueOf(
+ buttonView.context.getColor(com.android.internal.R.color.system_accent2_100)
+ )
+ )
+ buttonView.setTextColor(
+ buttonView.context.getColor(
+ com.android.internal.R.color.notification_primary_text_color_light
+ )
+ )
+
+ when (model) {
+ is TimerViewModel.ButtonViewModel.WithSystemAttrs -> {
+ buttonView.setIcon(model.iconRes)
+ buttonView.setText(model.labelRes)
+ }
+ is TimerViewModel.ButtonViewModel.WithCustomAttrs -> {
+ // TODO: b/352142761 - is there a better way to deal with TYPE_RESOURCE icons
+ // with empty resPackage? RemoteViews handles this by using a different
+ // `contextForResources` for inflation.
+ val icon =
+ if (model.icon.type == Icon.TYPE_RESOURCE && model.icon.resPackage == "")
+ Icon.createWithResource(
+ "com.google.android.deskclock",
+ model.icon.resId
+ )
+ else model.icon
+ buttonView.setImageIcon(icon)
+ buttonView.text = model.label
+ }
+ }
+
buttonView.setOnClickListener(
model.pendingIntent?.let { pendingIntent ->
View.OnClickListener { pendingIntent.send() }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ui/viewmodel/TimerViewModel.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ui/viewmodel/TimerViewModel.kt
index a85c87f288d3..768a093e0b65 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ui/viewmodel/TimerViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ui/viewmodel/TimerViewModel.kt
@@ -19,7 +19,7 @@ package com.android.systemui.statusbar.notification.row.ui.viewmodel
import android.annotation.DrawableRes
import android.annotation.StringRes
import android.app.PendingIntent
-import android.graphics.drawable.Drawable
+import android.graphics.drawable.Icon
import com.android.systemui.dump.DumpManager
import com.android.systemui.statusbar.notification.row.domain.interactor.NotificationRowInteractor
import com.android.systemui.statusbar.notification.row.shared.RichOngoingNotificationFlag
@@ -44,7 +44,7 @@ constructor(
private val state: Flow<TimerState> = rowInteractor.timerContentModel.mapNotNull { it.state }
- val icon: Flow<Drawable?> = rowInteractor.timerContentModel.mapNotNull { it.icon.drawable }
+ val icon: Flow<Icon?> = rowInteractor.timerContentModel.mapNotNull { it.icon.icon }
val label: Flow<String> = rowInteractor.timerContentModel.mapNotNull { it.name }
@@ -57,13 +57,13 @@ constructor(
state.map {
when (it) {
is TimerState.Paused ->
- ButtonViewModel(
+ ButtonViewModel.WithSystemAttrs(
it.resumeIntent,
com.android.systemui.res.R.string.controls_media_resume, // "Resume",
com.android.systemui.res.R.drawable.ic_media_play
)
is TimerState.Running ->
- ButtonViewModel(
+ ButtonViewModel.WithSystemAttrs(
it.pauseIntent,
com.android.systemui.res.R.string.controls_media_button_pause, // "Pause",
com.android.systemui.res.R.drawable.ic_media_pause
@@ -73,31 +73,41 @@ constructor(
val altButtonModel: Flow<ButtonViewModel?> =
state.map {
- when (it) {
- is TimerState.Paused ->
- it.resetIntent?.let { resetIntent ->
- ButtonViewModel(
- resetIntent,
- com.android.systemui.res.R.string.reset, // "Reset",
- com.android.systemui.res.R.drawable.ic_close_white_rounded
- )
- }
- is TimerState.Running ->
- it.addOneMinuteIntent?.let { addOneMinuteIntent ->
- ButtonViewModel(
- addOneMinuteIntent,
- com.android.systemui.res.R.string.add, // "Add 1 minute",
- com.android.systemui.res.R.drawable.ic_add
- )
- }
+ it.addMinuteAction?.let { action ->
+ ButtonViewModel.WithCustomAttrs(
+ action.actionIntent,
+ action.title, // "1:00",
+ action.getIcon()
+ )
+ }
+ }
+
+ val resetButtonModel: Flow<ButtonViewModel?> =
+ state.map {
+ it.resetAction?.let { action ->
+ ButtonViewModel.WithCustomAttrs(
+ action.actionIntent,
+ action.title, // "Reset",
+ action.getIcon()
+ )
}
}
- data class ButtonViewModel(
- val pendingIntent: PendingIntent?,
- @StringRes val labelRes: Int,
- @DrawableRes val iconRes: Int,
- )
+ sealed interface ButtonViewModel {
+ val pendingIntent: PendingIntent?
+
+ data class WithSystemAttrs(
+ override val pendingIntent: PendingIntent?,
+ @StringRes val labelRes: Int,
+ @DrawableRes val iconRes: Int,
+ ) : ButtonViewModel
+
+ data class WithCustomAttrs(
+ override val pendingIntent: PendingIntent?,
+ val label: CharSequence,
+ val icon: Icon,
+ ) : ButtonViewModel
+ }
}
private fun Duration.format(): String {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/shared/NotificationMinimalismPrototype.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/shared/NotificationMinimalismPrototype.kt
index bf37036ee018..06f3db504aaf 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/shared/NotificationMinimalismPrototype.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/shared/NotificationMinimalismPrototype.kt
@@ -24,102 +24,43 @@ import com.android.systemui.flags.RefactorFlagUtils
/** Helper for reading or using the minimalism prototype flag state. */
@Suppress("NOTHING_TO_INLINE")
object NotificationMinimalismPrototype {
-
- val version: Int by lazy {
- SystemProperties.getInt("persist.notification_minimalism_prototype.version", 2)
- }
-
- object V1 {
- /** The aconfig flag name */
- const val FLAG_NAME = Flags.FLAG_NOTIFICATION_MINIMALISM_PROTOTYPE
-
- /** A token used for dependency declaration */
- val token: FlagToken
- get() = FlagToken(FLAG_NAME, isEnabled)
-
- /** Is the heads-up cycling animation enabled */
- @JvmStatic
- inline val isEnabled
- get() = Flags.notificationMinimalismPrototype() && version == 1
-
- /**
- * the prototype will now show seen notifications on the locked shade by default, but this
- * property read allows that to be quickly disabled for testing
- */
- val showOnLockedShade: Boolean
- get() =
- if (isUnexpectedlyInLegacyMode()) false
- else
- SystemProperties.getBoolean(
- "persist.notification_minimalism_prototype.show_on_locked_shade",
- true
- )
-
- /** gets the configurable max number of notifications */
- val maxNotifs: Int
- get() =
- if (isUnexpectedlyInLegacyMode()) -1
- else
- SystemProperties.getInt(
- "persist.notification_minimalism_prototype.lock_screen_max_notifs",
- 1
- )
-
- /**
- * Called to ensure code is only run when the flag is enabled. This protects users from the
- * unintended behaviors caused by accidentally running new logic, while also crashing on an
- * eng build to ensure that the refactor author catches issues in testing.
- */
- @JvmStatic
- inline fun isUnexpectedlyInLegacyMode() =
- RefactorFlagUtils.isUnexpectedlyInLegacyMode(isEnabled, FLAG_NAME)
-
- /**
- * Called to ensure code is only run when the flag is disabled. This will throw an exception
- * if the flag is enabled to ensure that the refactor author catches issues in testing.
- */
- @JvmStatic
- inline fun assertInLegacyMode() = RefactorFlagUtils.assertInLegacyMode(isEnabled, FLAG_NAME)
- }
- object V2 {
- const val FLAG_NAME = Flags.FLAG_NOTIFICATION_MINIMALISM_PROTOTYPE
-
- /** A token used for dependency declaration */
- val token: FlagToken
- get() = FlagToken(FLAG_NAME, isEnabled)
-
- /** Is the heads-up cycling animation enabled */
- @JvmStatic
- inline val isEnabled
- get() = Flags.notificationMinimalismPrototype() && version == 2
-
- /**
- * The prototype will (by default) use a promoter to ensure that the top unseen notification
- * is not grouped, but this property read allows that behavior to be disabled.
- */
- val ungroupTopUnseen: Boolean
- get() =
- if (isUnexpectedlyInLegacyMode()) false
- else
- SystemProperties.getBoolean(
- "persist.notification_minimalism_prototype.ungroup_top_unseen",
- true
- )
-
- /**
- * Called to ensure code is only run when the flag is enabled. This protects users from the
- * unintended behaviors caused by accidentally running new logic, while also crashing on an
- * eng build to ensure that the refactor author catches issues in testing.
- */
- @JvmStatic
- inline fun isUnexpectedlyInLegacyMode() =
- RefactorFlagUtils.isUnexpectedlyInLegacyMode(isEnabled, FLAG_NAME)
-
- /**
- * Called to ensure code is only run when the flag is disabled. This will throw an exception
- * if the flag is enabled to ensure that the refactor author catches issues in testing.
- */
- @JvmStatic
- inline fun assertInLegacyMode() = RefactorFlagUtils.assertInLegacyMode(isEnabled, FLAG_NAME)
- }
+ const val FLAG_NAME = Flags.FLAG_NOTIFICATION_MINIMALISM_PROTOTYPE
+
+ /** A token used for dependency declaration */
+ val token: FlagToken
+ get() = FlagToken(FLAG_NAME, isEnabled)
+
+ /** Is the heads-up cycling animation enabled */
+ @JvmStatic
+ inline val isEnabled
+ get() = Flags.notificationMinimalismPrototype()
+
+ /**
+ * The prototype will (by default) use a promoter to ensure that the top unseen notification is
+ * not grouped, but this property read allows that behavior to be disabled.
+ */
+ val ungroupTopUnseen: Boolean
+ get() =
+ if (isUnexpectedlyInLegacyMode()) false
+ else
+ SystemProperties.getBoolean(
+ "persist.notification_minimalism_prototype.ungroup_top_unseen",
+ false
+ )
+
+ /**
+ * Called to ensure code is only run when the flag is enabled. This protects users from the
+ * unintended behaviors caused by accidentally running new logic, while also crashing on an eng
+ * build to ensure that the refactor author catches issues in testing.
+ */
+ @JvmStatic
+ inline fun isUnexpectedlyInLegacyMode() =
+ RefactorFlagUtils.isUnexpectedlyInLegacyMode(isEnabled, FLAG_NAME)
+
+ /**
+ * Called to ensure code is only run when the flag is disabled. This will throw an exception if
+ * the flag is enabled to ensure that the refactor author catches issues in testing.
+ */
+ @JvmStatic
+ inline fun assertInLegacyMode() = RefactorFlagUtils.assertInLegacyMode(isEnabled, FLAG_NAME)
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/AmbientState.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/AmbientState.java
index fbddc060bcee..7c3072df0875 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/AmbientState.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/AmbientState.java
@@ -66,6 +66,8 @@ public class AmbientState implements Dumpable {
private StatusBarKeyguardViewManager mStatusBarKeyguardViewManager;
private float mStackTop;
private float mStackCutoff;
+ private float mHeadsUpTop;
+ private float mHeadsUpBottom;
private int mScrollY;
private float mOverScrollTopAmount;
private float mOverScrollBottomAmount;
@@ -377,6 +379,30 @@ public class AmbientState implements Dumpable {
this.mStackCutoff = stackCutoff;
}
+ /** y coordinate of the top position of a pinned HUN */
+ public float getHeadsUpTop() {
+ if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) return 0f;
+ return mHeadsUpTop;
+ }
+
+ /** @see #getHeadsUpTop() */
+ public void setHeadsUpTop(float mHeadsUpTop) {
+ if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) return;
+ this.mHeadsUpTop = mHeadsUpTop;
+ }
+
+ /** the bottom-most y position where we can draw pinned HUNs */
+ public float getHeadsUpBottom() {
+ if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) return 0f;
+ return mHeadsUpBottom;
+ }
+
+ /** @see #getHeadsUpBottom() */
+ public void setHeadsUpBottom(float headsUpBottom) {
+ if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) return;
+ mHeadsUpBottom = headsUpBottom;
+ }
+
public int getScrollY() {
return mScrollY;
}
@@ -784,7 +810,9 @@ public class AmbientState implements Dumpable {
@Override
public void dump(PrintWriter pw, String[] args) {
pw.println("mStackTop=" + mStackTop);
- pw.println("mStackCutoff" + mStackCutoff);
+ pw.println("mStackCutoff=" + mStackCutoff);
+ pw.println("mHeadsUpTop=" + mHeadsUpTop);
+ pw.println("mHeadsUpBottom=" + mHeadsUpBottom);
pw.println("mTopPadding=" + mTopPadding);
pw.println("mStackTopMargin=" + mStackTopMargin);
pw.println("mStackTranslation=" + mStackTranslation);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ExpandableViewState.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ExpandableViewState.java
index d1e5ab04a630..83de2265b98e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ExpandableViewState.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ExpandableViewState.java
@@ -176,7 +176,7 @@ public class ExpandableViewState extends ViewState {
expandableView.setInShelf(inShelf);
if (headsUpIsVisible) {
- expandableView.setHeadsUpIsVisible();
+ expandableView.markHeadsUpSeen();
}
}
}
@@ -231,7 +231,7 @@ public class ExpandableViewState extends ViewState {
expandableView.setInShelf(this.inShelf);
if (headsUpIsVisible) {
- expandableView.setHeadsUpIsVisible();
+ expandableView.markHeadsUpSeen();
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
index dab379930105..5d2b61b42db9 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
@@ -111,6 +111,7 @@ import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow
import com.android.systemui.statusbar.notification.row.ExpandableView;
import com.android.systemui.statusbar.notification.row.StackScrollerDecorView;
import com.android.systemui.statusbar.notification.shared.NotificationHeadsUpCycling;
+import com.android.systemui.statusbar.notification.shared.NotificationThrottleHun;
import com.android.systemui.statusbar.notification.shared.NotificationsHeadsUpRefactor;
import com.android.systemui.statusbar.notification.shared.NotificationsImprovedHunAnimation;
import com.android.systemui.statusbar.notification.shared.NotificationsLiveDataStoreRefactor;
@@ -715,6 +716,7 @@ public class NotificationStackScrollLayout
}
public float getNotificationSquishinessFraction() {
+ SceneContainerFlag.assertInLegacyMode();
return mStackScrollAlgorithm.getNotificationSquishinessFraction(mAmbientState);
}
@@ -833,7 +835,7 @@ public class NotificationStackScrollLayout
y = (int) mAmbientState.getStackCutoff();
drawDebugInfo(canvas, y, Color.MAGENTA, /* label= */ "getStackCutoff() = " + y);
- y = (int) mScrollViewFields.getHeadsUpTop();
+ y = (int) mAmbientState.getHeadsUpTop();
drawDebugInfo(canvas, y, Color.GREEN, /* label= */ "getHeadsUpTop() = " + y);
y += getTopHeadsUpHeight();
@@ -860,7 +862,7 @@ public class NotificationStackScrollLayout
/* label= */ "getHeight() - mKeyguardBottomPadding = " + y);
}
- y = getHeight() - getEmptyBottomMargin();
+ y = getHeight() - getEmptyBottomMarginInternal();
drawDebugInfo(canvas, y, Color.GREEN,
/* label= */ "getHeight() - getEmptyBottomMargin() = " + y);
@@ -1221,7 +1223,12 @@ public class NotificationStackScrollLayout
@Override
public void setHeadsUpTop(float headsUpTop) {
- mScrollViewFields.setHeadsUpTop(headsUpTop);
+ mAmbientState.setHeadsUpTop(headsUpTop);
+ }
+
+ @Override
+ public void setHeadsUpBottom(float headsUpBottom) {
+ mAmbientState.setHeadsUpBottom(headsUpBottom);
}
@Override
@@ -1270,7 +1277,7 @@ public class NotificationStackScrollLayout
private void updateAlgorithmLayoutMinHeight() {
mAmbientState.setLayoutMinHeight(mQsFullScreen || isHeadsUpTransition()
- ? getLayoutMinHeight() : 0);
+ ? getLayoutMinHeightInternal() : 0);
}
/**
@@ -1444,7 +1451,7 @@ public class NotificationStackScrollLayout
} else {
if (mQsExpansionFraction <= 0 && !shouldSkipHeightUpdate()) {
final float endHeight = updateStackEndHeight(
- getHeight(), getEmptyBottomMargin(), getTopPadding());
+ getHeight(), getEmptyBottomMarginInternal(), getTopPadding());
updateStackHeight(endHeight, fraction);
} else {
// Always updateStackHeight to prevent jumps in the stack height when this fraction
@@ -1617,7 +1624,7 @@ public class NotificationStackScrollLayout
float appear;
float expandAmount;
if (mKeyguardBypassEnabled && onKeyguard()) {
- appear = calculateAppearFractionBypass();
+ appear = calculateAppearFractionBypassInternal();
expandAmount = getPulseHeight();
} else {
appear = MathUtils.saturate(calculateAppearFraction(mExpandedHeight));
@@ -1642,6 +1649,7 @@ public class NotificationStackScrollLayout
* Return the height of the content ignoring the footer.
*/
public int getIntrinsicContentHeight() {
+ SceneContainerFlag.assertInLegacyMode();
return (int) mIntrinsicContentHeight;
}
@@ -2373,6 +2381,11 @@ public class NotificationStackScrollLayout
* @return the first child which has visibility unequal to GONE
*/
public ExpandableView getFirstChildNotGone() {
+ SceneContainerFlag.assertInLegacyMode();
+ return getFirstChildNotGoneInternal();
+ }
+
+ private ExpandableView getFirstChildNotGoneInternal() {
int childCount = getChildCount();
for (int i = 0; i < childCount; i++) {
View child = getChildAt(i);
@@ -2432,6 +2445,7 @@ public class NotificationStackScrollLayout
* @return the number of children which have visibility unequal to GONE
*/
public int getNotGoneChildCount() {
+ SceneContainerFlag.assertInLegacyMode();
int childCount = getChildCount();
int count = 0;
for (int i = 0; i < childCount; i++) {
@@ -2642,7 +2656,7 @@ public class NotificationStackScrollLayout
*/
public void updateTopPadding(float qsHeight, boolean animate) {
int topPadding = (int) qsHeight;
- int minStackHeight = getLayoutMinHeight();
+ int minStackHeight = getLayoutMinHeightInternal();
if (topPadding + minStackHeight > getHeight()) {
mTopPaddingOverflow = topPadding + minStackHeight - getHeight();
} else {
@@ -2658,6 +2672,11 @@ public class NotificationStackScrollLayout
}
public int getLayoutMinHeight() {
+ SceneContainerFlag.assertInLegacyMode();
+ return getLayoutMinHeightInternal();
+ }
+
+ private int getLayoutMinHeightInternal() {
if (isHeadsUpTransition()) {
ExpandableNotificationRow trackedHeadsUpRow = mAmbientState.getTrackedHeadsUpRow();
if (trackedHeadsUpRow.isAboveShelf()) {
@@ -3430,7 +3449,7 @@ public class NotificationStackScrollLayout
* @return Whether a y coordinate is inside the content.
*/
public boolean isInContentBounds(float y) {
- return y < getHeight() - getEmptyBottomMargin();
+ return y < getHeight() - getEmptyBottomMarginInternal();
}
private float getTouchSlop(MotionEvent event) {
@@ -3506,7 +3525,7 @@ public class NotificationStackScrollLayout
// Only when scene container is enabled, mark that we are being dragged so that we start
// dispatching the rest of the gesture to scene container.
void startOverscrollAfterExpanding() {
- SceneContainerFlag.isUnexpectedlyInLegacyMode();
+ if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) return;
getExpandHelper().finishExpanding();
setIsBeingDragged(true);
}
@@ -3514,7 +3533,7 @@ public class NotificationStackScrollLayout
// Only when scene container is enabled, mark that we are being dragged so that we start
// dispatching the rest of the gesture to scene container.
void startDraggingOnHun() {
- SceneContainerFlag.isUnexpectedlyInLegacyMode();
+ if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) return;
setIsBeingDragged(true);
}
@@ -4063,10 +4082,16 @@ public class NotificationStackScrollLayout
}
boolean isScrolledToBottom() {
+ SceneContainerFlag.assertInLegacyMode();
return mScrollAdapter.isScrolledToBottom();
}
int getEmptyBottomMargin() {
+ SceneContainerFlag.assertInLegacyMode();
+ return getEmptyBottomMarginInternal();
+ }
+
+ private int getEmptyBottomMarginInternal() {
int contentHeight;
if (mShouldUseSplitNotificationShade) {
// When in split shade and there are no notifications, the height can be too low, as
@@ -4249,7 +4274,7 @@ public class NotificationStackScrollLayout
private void updateScrollPositionOnExpandInBottom(ExpandableView view) {
if (view instanceof ExpandableNotificationRow row && !onKeyguard()) {
// TODO: once we're recycling this will need to check the adapter position of the child
- if (row.isUserLocked() && row != getFirstChildNotGone()) {
+ if (row.isUserLocked() && row != getFirstChildNotGoneInternal()) {
if (row.isSummaryWithChildren()) {
return;
}
@@ -4536,7 +4561,7 @@ public class NotificationStackScrollLayout
// clipped when pulsing
float ownTranslationZ = 0;
if (mKeyguardBypassEnabled && mAmbientState.isHiddenAtAll()) {
- ExpandableView firstChildNotGone = getFirstChildNotGone();
+ ExpandableView firstChildNotGone = getFirstChildNotGoneInternal();
if (firstChildNotGone != null && firstChildNotGone.showingPulsing()) {
ownTranslationZ = firstChildNotGone.getTranslationZ();
}
@@ -4684,10 +4709,12 @@ public class NotificationStackScrollLayout
}
public int getEmptyShadeViewHeight() {
+ SceneContainerFlag.assertInLegacyMode();
return mEmptyShadeView.getHeight();
}
public float getBottomMostNotificationBottom() {
+ SceneContainerFlag.assertInLegacyMode();
final int count = getChildCount();
float max = 0;
for (int childIdx = 0; childIdx < count; childIdx++) {
@@ -4836,14 +4863,23 @@ public class NotificationStackScrollLayout
* @param isHeadsUp true for appear, false for disappear animations
*/
public void generateHeadsUpAnimation(ExpandableNotificationRow row, boolean isHeadsUp) {
- final boolean add = mAnimationsEnabled && (isHeadsUp || mHeadsUpGoingAwayAnimationsAllowed);
+ boolean addAnimation =
+ mAnimationsEnabled && (isHeadsUp || mHeadsUpGoingAwayAnimationsAllowed);
+ if (NotificationThrottleHun.isEnabled()) {
+ final boolean closedAndSeenInShade = !mIsExpanded && row.getEntry() != null
+ && row.getEntry().isSeenInShade();
+ addAnimation = addAnimation && !closedAndSeenInShade;
+ }
if (SPEW) {
Log.v(TAG, "generateHeadsUpAnimation:"
- + " willAdd=" + add
- + " isHeadsUp=" + isHeadsUp
- + " row=" + row.getEntry().getKey());
- }
- if (add) {
+ + " addAnimation=" + addAnimation
+ + (row.getEntry() == null ? " entry NULL "
+ : " isSeenInShade=" + row.getEntry().isSeenInShade()
+ + " row=" + row.getEntry().getKey())
+ + " mIsExpanded=" + mIsExpanded
+ + " isHeadsUp=" + isHeadsUp);
+ }
+ if (addAnimation) {
// If we're hiding a HUN we just started showing THIS FRAME, then remove that event,
// and do not add the disappear event either.
if (!isHeadsUp && mHeadsUpChangeAnimations.remove(new Pair<>(row, true))) {
@@ -4873,6 +4909,7 @@ public class NotificationStackScrollLayout
* @param bottomBarHeight the height of the bar on the bottom
*/
public void setHeadsUpBoundaries(int height, int bottomBarHeight) {
+ SceneContainerFlag.assertInLegacyMode();
mAmbientState.setMaxHeadsUpTranslation(height - bottomBarHeight);
mStackScrollAlgorithm.setHeadsUpAppearHeightBottom(height);
mStateAnimator.setHeadsUpAppearHeightBottom(height);
@@ -5110,6 +5147,7 @@ public class NotificationStackScrollLayout
}
public float getOpeningHeight() {
+ SceneContainerFlag.assertInLegacyMode();
if (mEmptyShadeView.getVisibility() == GONE) {
return getMinExpansionHeight();
} else {
@@ -5566,6 +5604,11 @@ public class NotificationStackScrollLayout
}
public float calculateAppearFractionBypass() {
+ SceneContainerFlag.assertInLegacyMode();
+ return calculateAppearFractionBypassInternal();
+ }
+
+ private float calculateAppearFractionBypassInternal() {
float pulseHeight = getPulseHeight();
// The total distance required to fully reveal the header
float totalDistance = getIntrinsicPadding();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java
index 36930bf0d528..a072ea6ec3eb 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java
@@ -1004,6 +1004,7 @@ public class NotificationStackScrollLayoutController implements Dumpable {
}
public int getRight() {
+ SceneContainerFlag.assertInLegacyMode();
return mView.getRight();
}
@@ -1015,6 +1016,7 @@ public class NotificationStackScrollLayoutController implements Dumpable {
* @return the left of the view.
*/
public int getLeft() {
+ SceneContainerFlag.assertInLegacyMode();
return mView.getLeft();
}
@@ -1022,6 +1024,7 @@ public class NotificationStackScrollLayoutController implements Dumpable {
* @return the top of the view.
*/
public int getTop() {
+ SceneContainerFlag.assertInLegacyMode();
return mView.getTop();
}
@@ -1029,6 +1032,7 @@ public class NotificationStackScrollLayoutController implements Dumpable {
* @return the bottom of the view.
*/
public int getBottom() {
+ SceneContainerFlag.assertInLegacyMode();
return mView.getBottom();
}
@@ -1158,6 +1162,7 @@ public class NotificationStackScrollLayoutController implements Dumpable {
}
public int getIntrinsicContentHeight() {
+ SceneContainerFlag.assertInLegacyMode();
return mView.getIntrinsicContentHeight();
}
@@ -1216,6 +1221,7 @@ public class NotificationStackScrollLayoutController implements Dumpable {
}
public float getX() {
+ SceneContainerFlag.assertInLegacyMode();
return mView.getX();
}
@@ -1224,14 +1230,17 @@ public class NotificationStackScrollLayoutController implements Dumpable {
}
public float getWidth() {
+ SceneContainerFlag.assertInLegacyMode();
return mView.getWidth();
}
public float getOpeningHeight() {
+ SceneContainerFlag.assertInLegacyMode();
return mView.getOpeningHeight();
}
public float getBottomMostNotificationBottom() {
+ SceneContainerFlag.assertInLegacyMode();
return mView.getBottomMostNotificationBottom();
}
@@ -1266,10 +1275,12 @@ public class NotificationStackScrollLayoutController implements Dumpable {
}
public float getNotificationSquishinessFraction() {
+ SceneContainerFlag.assertInLegacyMode();
return mView.getNotificationSquishinessFraction();
}
public float calculateAppearFractionBypass() {
+ SceneContainerFlag.assertInLegacyMode();
return mView.calculateAppearFractionBypass();
}
@@ -1279,22 +1290,27 @@ public class NotificationStackScrollLayoutController implements Dumpable {
}
public boolean isScrolledToBottom() {
+ SceneContainerFlag.assertInLegacyMode();
return mView.isScrolledToBottom();
}
public int getNotGoneChildCount() {
+ SceneContainerFlag.assertInLegacyMode();
return mView.getNotGoneChildCount();
}
public float getIntrinsicPadding() {
+ SceneContainerFlag.assertInLegacyMode();
return mView.getIntrinsicPadding();
}
public float getLayoutMinHeight() {
+ SceneContainerFlag.assertInLegacyMode();
return mView.getLayoutMinHeight();
}
public int getEmptyBottomMargin() {
+ SceneContainerFlag.assertInLegacyMode();
return mView.getEmptyBottomMargin();
}
@@ -1307,6 +1323,7 @@ public class NotificationStackScrollLayoutController implements Dumpable {
}
public float getEmptyShadeViewHeight() {
+ SceneContainerFlag.assertInLegacyMode();
return mView.getEmptyShadeViewHeight();
}
@@ -1474,6 +1491,7 @@ public class NotificationStackScrollLayoutController implements Dumpable {
}
public boolean isShowingEmptyShadeView() {
+ SceneContainerFlag.assertInLegacyMode();
return mView.isEmptyShadeViewVisible();
}
@@ -1602,6 +1620,7 @@ public class NotificationStackScrollLayoutController implements Dumpable {
}
public ExpandableView getFirstChildNotGone() {
+ SceneContainerFlag.assertInLegacyMode();
return mView.getFirstChildNotGone();
}
@@ -1713,6 +1732,7 @@ public class NotificationStackScrollLayoutController implements Dumpable {
}
public boolean isLongPressInProgress() {
+ SceneContainerFlag.assertInLegacyMode();
return mLongPressedView != null;
}
@@ -1722,6 +1742,7 @@ public class NotificationStackScrollLayoutController implements Dumpable {
* from the keyguard host to the quick settings one.
*/
public int getFullShadeTransitionInset() {
+ SceneContainerFlag.assertInLegacyMode();
MediaContainerView view = mKeyguardMediaController.getSinglePaneContainer();
if (view == null || view.getHeight() == 0
|| mStatusBarStateController.getState() != KEYGUARD) {
@@ -2013,6 +2034,7 @@ public class NotificationStackScrollLayoutController implements Dumpable {
hunWantsIt = mHeadsUpTouchHelper.onInterceptTouchEvent(ev);
if (hunWantsIt) {
mView.startDraggingOnHun();
+ mHeadsUpManager.unpinAll(true);
}
}
boolean swipeWantsIt = false;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackSizeCalculator.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackSizeCalculator.kt
index 391bc43a784c..06222fdb2761 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackSizeCalculator.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackSizeCalculator.kt
@@ -74,7 +74,7 @@ constructor(
/** Whether we allow keyguard to show less important notifications above the shelf. */
private val limitLockScreenToOneImportant
- get() = NotificationMinimalismPrototype.V2.isEnabled
+ get() = NotificationMinimalismPrototype.isEnabled
/** Minimum space between two notifications, see [calculateGapAndDividerHeight]. */
private var dividerHeight by notNull<Float>()
@@ -405,16 +405,8 @@ constructor(
fun updateResources() {
maxKeyguardNotifications =
- infiniteIfNegative(
- if (NotificationMinimalismPrototype.V1.isEnabled) {
- NotificationMinimalismPrototype.V1.maxNotifs
- } else {
- resources.getInteger(R.integer.keyguard_max_notification_count)
- }
- )
- maxNotificationsExcludesMedia =
- NotificationMinimalismPrototype.V1.isEnabled ||
- NotificationMinimalismPrototype.V2.isEnabled
+ infiniteIfNegative(resources.getInteger(R.integer.keyguard_max_notification_count))
+ maxNotificationsExcludesMedia = NotificationMinimalismPrototype.isEnabled
dividerHeight =
max(1f, resources.getDimensionPixelSize(R.dimen.notification_divider_height).toFloat())
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ScrollViewFields.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ScrollViewFields.kt
index 97ec39192cc8..383d8b3b26b5 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ScrollViewFields.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ScrollViewFields.kt
@@ -32,8 +32,6 @@ import java.util.function.Consumer
class ScrollViewFields {
/** Used to produce the clipping path */
var scrimClippingShape: ShadeScrimShape? = null
- /** Y coordinate in view pixels of the top of the HUN */
- var headsUpTop: Float = 0f
/** Whether the notifications are scrolled all the way to the top (i.e. when freshly opened) */
var isScrolledToTop: Boolean = true
@@ -74,7 +72,6 @@ class ScrollViewFields {
fun dump(pw: IndentingPrintWriter) {
pw.printSection("StackViewStates") {
pw.println("scrimClippingShape", scrimClippingShape)
- pw.println("headsUpTop", headsUpTop)
pw.println("isScrolledToTop", isScrolledToTop)
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java
index 4282fa25a4eb..b801e5d89b84 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java
@@ -79,9 +79,7 @@ public class StackScrollAlgorithm {
private int mHeadsUpAppearHeightBottom;
private int mHeadsUpCyclingPadding;
- public StackScrollAlgorithm(
- Context context,
- ViewGroup hostView) {
+ public StackScrollAlgorithm(Context context, ViewGroup hostView) {
mHostView = hostView;
initView(context);
}
@@ -865,7 +863,10 @@ public class StackScrollAlgorithm {
// Move the tracked heads up into position during the appear animation, by interpolating
// between the HUN inset (where it will appear as a HUN) and the end position in the shade
- float headsUpTranslation = mHeadsUpInset - ambientState.getStackTopMargin();
+ float headsUpTranslation =
+ SceneContainerFlag.isEnabled()
+ ? ambientState.getHeadsUpTop()
+ : mHeadsUpInset - ambientState.getStackTopMargin();
ExpandableNotificationRow trackedHeadsUpRow = ambientState.getTrackedHeadsUpRow();
if (trackedHeadsUpRow != null) {
ExpandableViewState childState = trackedHeadsUpRow.getViewState();
@@ -894,21 +895,44 @@ public class StackScrollAlgorithm {
boolean isTopEntry = topHeadsUpEntry == row;
float unmodifiedEndLocation = childState.getYTranslation() + childState.height;
if (mIsExpanded) {
- if (shouldHunBeVisibleWhenScrolled(row.mustStayOnScreen(),
- childState.headsUpIsVisible, row.showingPulsing(),
- ambientState.isOnKeyguard(), row.getEntry().isStickyAndNotDemoted())) {
- // Ensure that the heads up is always visible even when scrolled off.
- // NSSL y starts at top of screen in non-split-shade, but below the qs offset
- // in split shade, so we only need to inset by the scrim padding in split shade.
- // TODO(b/332574413) get the clamp inset from HeadsUpNotificationPlaceholder
- final float clampInset = ambientState.getUseSplitShade()
- ? mNotificationScrimPadding : mQuickQsOffsetHeight;
- clampHunToTop(clampInset, ambientState.getStackTranslation(),
- row.getCollapsedHeight(), childState);
- if (isTopEntry && row.isAboveShelf()) {
- // the first hun can't get off screen.
- clampHunToMaxTranslation(ambientState, row, childState);
- childState.hidden = false;
+ if (SceneContainerFlag.isEnabled()) {
+ if (shouldHunBeVisibleWhenScrolled(row.mustStayOnScreen(),
+ childState.headsUpIsVisible, row.showingPulsing(),
+ ambientState.isOnKeyguard(), row.getEntry().isStickyAndNotDemoted())) {
+ clampHunToTop(
+ /* headsUpTop = */ headsUpTranslation,
+ /* collapsedHeight = */ row.getCollapsedHeight(),
+ /* viewState = */ childState
+ );
+ if (isTopEntry && row.isAboveShelf()) {
+ clampHunToMaxTranslation(
+ /* headsUpTop = */ headsUpTranslation,
+ /* headsUpBottom = */ ambientState.getHeadsUpBottom(),
+ /* viewState = */ childState
+ );
+ updateCornerRoundnessForPinnedHun(row, ambientState.getStackTop());
+ childState.hidden = false;
+ }
+ }
+ } else {
+ if (shouldHunBeVisibleWhenScrolled(row.mustStayOnScreen(),
+ childState.headsUpIsVisible, row.showingPulsing(),
+ ambientState.isOnKeyguard(), row.getEntry().isStickyAndNotDemoted())) {
+ // Ensure that the heads up is always visible even when scrolled off.
+ // NSSL y starts at top of screen in non-split-shade, but below the qs
+ // offset
+ // in split shade, so we only need to inset by the scrim padding in split
+ // shade.
+ final float clampInset = ambientState.getUseSplitShade()
+ ? mNotificationScrimPadding : mQuickQsOffsetHeight;
+ clampHunToTop(clampInset, ambientState.getStackTranslation(),
+ row.getCollapsedHeight(), childState);
+ if (isTopEntry && row.isAboveShelf()) {
+ // the first hun can't get off screen.
+ clampHunToMaxTranslation(ambientState, row, childState);
+ updateCornerRoundnessForPinnedHun(row, ambientState.getStackY());
+ childState.hidden = false;
+ }
}
}
}
@@ -1005,9 +1029,13 @@ public class StackScrollAlgorithm {
@VisibleForTesting
void clampHunToTop(float clampInset, float stackTranslation, float collapsedHeight,
ExpandableViewState viewState) {
+ SceneContainerFlag.assertInLegacyMode();
+ clampHunToTop(clampInset + stackTranslation, collapsedHeight, viewState);
+ }
- final float newTranslation = Math.max(clampInset + stackTranslation,
- viewState.getYTranslation());
+ @VisibleForTesting
+ void clampHunToTop(float headsUpTop, float collapsedHeight, ExpandableViewState viewState) {
+ final float newTranslation = Math.max(headsUpTop, viewState.getYTranslation());
// Transition from collapsed pinned state to fully expanded state
// when the pinned HUN approaches its actual location (when scrolling back to top).
@@ -1020,9 +1048,12 @@ public class StackScrollAlgorithm {
// while the rest of notifications are scrolled offscreen.
private void clampHunToMaxTranslation(AmbientState ambientState, ExpandableNotificationRow row,
ExpandableViewState childState) {
+ SceneContainerFlag.assertInLegacyMode();
float maxHeadsUpTranslation = ambientState.getMaxHeadsUpTranslation();
- final float maxShelfPosition = ambientState.getInnerHeight() + ambientState.getTopPadding()
- + ambientState.getStackTranslation();
+ final float maxShelfPosition =
+ ambientState.getInnerHeight()
+ + ambientState.getTopPadding()
+ + ambientState.getStackTranslation();
maxHeadsUpTranslation = Math.min(maxHeadsUpTranslation, maxShelfPosition);
final float bottomPosition = maxHeadsUpTranslation - row.getCollapsedHeight();
@@ -1030,13 +1061,20 @@ public class StackScrollAlgorithm {
childState.height = (int) Math.min(childState.height, maxHeadsUpTranslation
- newTranslation);
childState.setYTranslation(newTranslation);
+ }
+
+ private void clampHunToMaxTranslation(float headsUpTop, float headsUpBottom,
+ ExpandableViewState viewState) {
+ if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) return;
+ final float maxHeight = headsUpTop - headsUpBottom;
+ viewState.setYTranslation(Math.min(headsUpTop, viewState.getYTranslation()));
+ viewState.height = (int) Math.min(maxHeight, viewState.height);
+ }
+ private void updateCornerRoundnessForPinnedHun(ExpandableNotificationRow row, float stackTop) {
// Animate pinned HUN bottom corners to and from original roundness.
final float originalCornerRadius =
row.isLastInSection() ? 1f : (mSmallCornerRadius / mLargeCornerRadius);
- final float stackTop = SceneContainerFlag.isEnabled()
- ? ambientState.getStackTop()
- : ambientState.getStackY();
final float bottomValue = computeCornerRoundnessForPinnedHun(mHostView.getHeight(),
stackTop, getMaxAllowedChildHeight(row), originalCornerRadius);
row.requestBottomRoundness(bottomValue, STACK_SCROLL_ALGO);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/view/NotificationScrollView.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/view/NotificationScrollView.kt
index 762c507220fa..6226fe7952f6 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/view/NotificationScrollView.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/view/NotificationScrollView.kt
@@ -59,6 +59,9 @@ interface NotificationScrollView {
/** set the y position in px of the top of the HUN in this view's coordinates */
fun setHeadsUpTop(headsUpTop: Float)
+ /** set the bottom-most y position in px, where we can draw HUNs in this view's coordinates */
+ fun setHeadsUpBottom(headsUpBottom: Float)
+
/** set whether the view has been scrolled all the way to the top */
fun setScrolledToTop(scrolledToTop: Boolean)
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewbinder/SharedNotificationContainerBinder.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewbinder/SharedNotificationContainerBinder.kt
index 497ffcab32f2..05415503675c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewbinder/SharedNotificationContainerBinder.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewbinder/SharedNotificationContainerBinder.kt
@@ -20,9 +20,9 @@ import android.view.View
import android.view.WindowInsets
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.repeatOnLifecycle
-import com.android.systemui.Flags.communalHub
import com.android.systemui.common.ui.view.onApplyWindowInsets
import com.android.systemui.common.ui.view.onLayoutChanged
+import com.android.systemui.communal.domain.interactor.CommunalSettingsInteractor
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Main
import com.android.systemui.keyguard.ui.viewmodel.BurnInParameters
@@ -38,12 +38,14 @@ import com.android.systemui.util.kotlin.DisposableHandles
import javax.inject.Inject
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.DisposableHandle
+import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.flatMapLatest
import kotlinx.coroutines.flow.update
import kotlinx.coroutines.launch
/** Binds the shared notification container to its view-model. */
+@OptIn(ExperimentalCoroutinesApi::class)
@SysUISingleton
class SharedNotificationContainerBinder
@Inject
@@ -51,6 +53,7 @@ constructor(
private val controller: NotificationStackScrollLayoutController,
private val notificationStackSizeCalculator: NotificationStackSizeCalculator,
private val notificationScrollViewBinder: NotificationScrollViewBinder,
+ private val communalSettingsInteractor: CommunalSettingsInteractor,
@Main private val mainImmediateDispatcher: CoroutineDispatcher,
) {
@@ -162,7 +165,7 @@ constructor(
}
}
- if (communalHub()) {
+ if (communalSettingsInteractor.isCommunalFlagEnabled()) {
launch {
viewModel.glanceableHubAlpha.collect {
controller.setMaxAlphaForGlanceableHub(it)
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationListViewModel.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationListViewModel.kt
index b54f9c4c6d32..5fba615e020b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationListViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationListViewModel.kt
@@ -275,13 +275,7 @@ constructor(
if (NotificationsHeadsUpRefactor.isUnexpectedlyInLegacyMode()) {
flowOf(false)
} else {
- combine(
- notificationStackInteractor.isShowingOnLockscreen,
- shadeInteractor.isShadeFullyCollapsed
- ) { (isKeyguardShowing, isShadeFullyCollapsed) ->
- !isKeyguardShowing && isShadeFullyCollapsed
- }
- .dumpWhileCollecting("headsUpAnimationsEnabled")
+ flowOf(true).dumpWhileCollecting("headsUpAnimationsEnabled")
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationsPlaceholderViewModel.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationsPlaceholderViewModel.kt
index eb1f7784f3aa..1a7bc169ea2a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationsPlaceholderViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationsPlaceholderViewModel.kt
@@ -110,6 +110,11 @@ constructor(
interactor.setScrolledToTop(scrolledToTop)
}
+ /** Sets whether the heads up notification is animating away. */
+ fun setHeadsUpAnimatingAway(animatingAway: Boolean) {
+ headsUpNotificationInteractor.setHeadsUpAnimatingAway(animatingAway)
+ }
+
/** Snooze the currently pinned HUN. */
fun snoozeHun() {
headsUpNotificationInteractor.snooze()
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModel.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModel.kt
index 534d9d2cc824..99f7a75676e1 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModel.kt
@@ -141,6 +141,7 @@ constructor(
private val communalSceneInteractor: CommunalSceneInteractor,
unfoldTransitionInteractor: UnfoldTransitionInteractor,
) : FlowDumperImpl(dumpManager) {
+ // TODO(b/349784682): Transform deprecated states for Flexiglass
private val statesForConstrainedNotifications: Set<KeyguardState> =
setOf(AOD, LOCKSCREEN, DOZING, ALTERNATE_BOUNCER, PRIMARY_BOUNCER)
private val statesForHiddenKeyguard: Set<KeyguardState> = setOf(GONE, OCCLUDED)
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/ui/viewbinder/HeadsUpNotificationViewBinder.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/ui/viewbinder/HeadsUpNotificationViewBinder.kt
index 52cb48be041f..8d73983e4053 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/ui/viewbinder/HeadsUpNotificationViewBinder.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/ui/viewbinder/HeadsUpNotificationViewBinder.kt
@@ -51,8 +51,8 @@ constructor(private val viewModel: NotificationListViewModel) {
}
removed.forEach { key ->
val row = obtainView(key)
- parentView.generateHeadsUpAnimation(row, /* isHeadsUp = */ false)
- row.setHeadsUpIsVisible()
+ parentView.generateHeadsUpAnimation(row, /* isHeadsUp= */ false)
+ row.markHeadsUpSeen()
}
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ActivityStarterImpl.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ActivityStarterImpl.kt
index 97266c57ba09..86c7c6bd1e86 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ActivityStarterImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ActivityStarterImpl.kt
@@ -24,6 +24,7 @@ import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Main
import com.android.systemui.plugins.ActivityStarter
import com.android.systemui.plugins.ActivityStarter.OnDismissAction
+import com.android.systemui.scene.shared.flag.SceneContainerFlag
import com.android.systemui.statusbar.SysuiStatusBarStateController
import com.android.systemui.util.concurrency.DelayableExecutor
import dagger.Lazy
@@ -36,10 +37,16 @@ class ActivityStarterImpl
constructor(
private val statusBarStateController: SysuiStatusBarStateController,
@Main private val mainExecutor: DelayableExecutor,
+ activityStarterInternal: Lazy<ActivityStarterInternalImpl>,
legacyActivityStarter: Lazy<LegacyActivityStarterInternalImpl>
) : ActivityStarter {
- private val activityStarterInternal: ActivityStarterInternal = legacyActivityStarter.get()
+ private val activityStarterInternal: ActivityStarterInternal =
+ if (SceneContainerFlag.isEnabled) {
+ activityStarterInternal.get()
+ } else {
+ legacyActivityStarter.get()
+ }
override fun startPendingIntentDismissingKeyguard(intent: PendingIntent) {
activityStarterInternal.startPendingIntentDismissingKeyguard(
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ActivityStarterInternalImpl.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ActivityStarterInternalImpl.kt
index ae98e1d60589..107bf1edb74f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ActivityStarterInternalImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ActivityStarterInternalImpl.kt
@@ -16,23 +16,93 @@
package com.android.systemui.statusbar.phone
+import android.app.ActivityManager
+import android.app.ActivityOptions
+import android.app.ActivityTaskManager
import android.app.PendingIntent
+import android.app.TaskStackBuilder
+import android.content.Context
import android.content.Intent
+import android.content.res.Resources
import android.os.Bundle
+import android.os.RemoteException
import android.os.UserHandle
+import android.provider.Settings
+import android.util.Log
+import android.view.RemoteAnimationAdapter
import android.view.View
+import android.view.WindowManager
+import com.android.systemui.ActivityIntentHelper
+import com.android.systemui.Flags
import com.android.systemui.animation.ActivityTransitionAnimator
+import com.android.systemui.animation.DelegateTransitionAnimatorController
+import com.android.systemui.assist.AssistManager
+import com.android.systemui.camera.CameraIntents
+import com.android.systemui.communal.domain.interactor.CommunalSceneInteractor
+import com.android.systemui.communal.shared.model.CommunalScenes
import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.dagger.qualifiers.DisplayId
+import com.android.systemui.dagger.qualifiers.Main
+import com.android.systemui.deviceentry.domain.interactor.DeviceEntryInteractor
+import com.android.systemui.keyguard.KeyguardViewMediator
+import com.android.systemui.keyguard.domain.interactor.KeyguardInteractor
+import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor
+import com.android.systemui.keyguard.shared.model.KeyguardState
import com.android.systemui.plugins.ActivityStarter
+import com.android.systemui.res.R
+import com.android.systemui.scene.shared.flag.SceneContainerFlag
+import com.android.systemui.shade.ShadeController
+import com.android.systemui.shade.domain.interactor.ShadeAnimationInteractor
+import com.android.systemui.statusbar.CommandQueue
+import com.android.systemui.statusbar.NotificationLockscreenUserManager
+import com.android.systemui.statusbar.NotificationShadeWindowController
+import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow
+import com.android.systemui.statusbar.policy.domain.interactor.DeviceProvisioningInteractor
+import com.android.systemui.statusbar.window.StatusBarWindowController
+import com.android.systemui.user.domain.interactor.SelectedUserInteractor
+import com.android.systemui.util.concurrency.DelayableExecutor
+import com.android.systemui.util.kotlin.getOrNull
+import dagger.Lazy
+import java.util.Optional
import javax.inject.Inject
+import kotlinx.coroutines.ExperimentalCoroutinesApi
/**
- * Encapsulates the activity logic for activity starter when flexiglass is enabled.
+ * Encapsulates the activity logic for activity starter when the SceneContainerFlag is enabled.
*
* TODO: b/308819693
*/
+@ExperimentalCoroutinesApi
@SysUISingleton
-class ActivityStarterInternalImpl @Inject constructor() : ActivityStarterInternal {
+class ActivityStarterInternalImpl
+@Inject
+constructor(
+ private val statusBarKeyguardViewManagerLazy: Lazy<StatusBarKeyguardViewManager>,
+ private val keyguardInteractor: KeyguardInteractor,
+ private val centralSurfacesOptLazy: Lazy<Optional<CentralSurfaces>>,
+ private val context: Context,
+ @Main private val resources: Resources,
+ private val selectedUserInteractor: SelectedUserInteractor,
+ private val deviceEntryInteractor: DeviceEntryInteractor,
+ private val activityTransitionAnimator: ActivityTransitionAnimator,
+ @DisplayId private val displayId: Int,
+ private val deviceProvisioningInteractor: DeviceProvisioningInteractor,
+ private val activityIntentHelper: ActivityIntentHelper,
+ private val keyguardTransitionInteractor: KeyguardTransitionInteractor,
+ private val assistManagerLazy: Lazy<AssistManager>,
+ @Main private val mainExecutor: DelayableExecutor,
+ private val shadeControllerLazy: Lazy<ShadeController>,
+ private val communalSceneInteractor: CommunalSceneInteractor,
+ private val statusBarWindowController: StatusBarWindowController,
+ private val keyguardViewMediatorLazy: Lazy<KeyguardViewMediator>,
+ private val shadeAnimationInteractor: ShadeAnimationInteractor,
+ private val notifShadeWindowControllerLazy: Lazy<NotificationShadeWindowController>,
+ private val commandQueue: CommandQueue,
+ private val lockScreenUserManager: NotificationLockscreenUserManager,
+) : ActivityStarterInternal {
+ private val centralSurfaces: CentralSurfaces?
+ get() = centralSurfacesOptLazy.get().getOrNull()
+
override fun startPendingIntentDismissingKeyguard(
intent: PendingIntent,
dismissShade: Boolean,
@@ -45,7 +115,119 @@ class ActivityStarterInternalImpl @Inject constructor() : ActivityStarterInterna
extraOptions: Bundle?,
customMessage: String?,
) {
- TODO("Not yet implemented b/308819693")
+ if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) return
+ val animationController =
+ if (associatedView is ExpandableNotificationRow) {
+ centralSurfaces?.getAnimatorControllerFromNotification(associatedView)
+ } else animationController
+
+ val willLaunchResolverActivity =
+ intent.isActivity &&
+ activityIntentHelper.wouldPendingLaunchResolverActivity(
+ intent,
+ lockScreenUserManager.currentUserId,
+ )
+
+ val actuallyShowOverLockscreen =
+ showOverLockscreen &&
+ intent.isActivity &&
+ (skipLockscreenChecks ||
+ activityIntentHelper.wouldPendingShowOverLockscreen(
+ intent,
+ lockScreenUserManager.currentUserId
+ ))
+
+ val animate =
+ !willLaunchResolverActivity &&
+ animationController != null &&
+ shouldAnimateLaunch(intent.isActivity, actuallyShowOverLockscreen)
+
+ // We wrap animationCallback with a StatusBarLaunchAnimatorController so
+ // that the shade is collapsed after the animation (or when it is cancelled,
+ // aborted, etc).
+ val statusBarController =
+ wrapAnimationControllerForShadeOrStatusBar(
+ animationController = animationController,
+ dismissShade = dismissShade,
+ isLaunchForActivity = intent.isActivity,
+ )
+ val controller =
+ if (actuallyShowOverLockscreen) {
+ wrapAnimationControllerForLockscreen(dismissShade, statusBarController)
+ } else {
+ statusBarController
+ }
+
+ // If we animate, don't collapse the shade and defer the keyguard dismiss (in case we
+ // run the animation on the keyguard). The animation will take care of (instantly)
+ // collapsing the shade and hiding the keyguard once it is done.
+ val collapse = dismissShade && !animate
+ val runnable = Runnable {
+ try {
+ activityTransitionAnimator.startPendingIntentWithAnimation(
+ controller,
+ animate,
+ intent.creatorPackage,
+ actuallyShowOverLockscreen,
+ object : ActivityTransitionAnimator.PendingIntentStarter {
+ override fun startPendingIntent(
+ animationAdapter: RemoteAnimationAdapter?
+ ): Int {
+ val options =
+ ActivityOptions(
+ CentralSurfaces.getActivityOptions(displayId, animationAdapter)
+ .apply { extraOptions?.let { putAll(it) } }
+ )
+ // TODO b/221255671: restrict this to only be set for notifications
+ options.isEligibleForLegacyPermissionPrompt = true
+ options.setPendingIntentBackgroundActivityStartMode(
+ ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED
+ )
+ return intent.sendAndReturnResult(
+ context,
+ 0,
+ fillInIntent,
+ null,
+ null,
+ null,
+ options.toBundle()
+ )
+ }
+ },
+ )
+ } catch (e: PendingIntent.CanceledException) {
+ // the stack trace isn't very helpful here.
+ // Just log the exception message.
+ Log.w(TAG, "Sending intent failed: $e")
+ if (!collapse) {
+ // executeRunnableDismissingKeyguard did not collapse for us already.
+ shadeControllerLazy.get().collapseOnMainThread()
+ }
+ // TODO: Dismiss Keyguard.
+ }
+ if (intent.isActivity) {
+ assistManagerLazy.get().hideAssist()
+ // This activity could have started while the device is dreaming, in which case
+ // the dream would occlude the activity. In order to show the newly started
+ // activity, we wake from the dream.
+ centralSurfaces?.awakenDreams()
+ }
+ intentSentUiThreadCallback?.let { mainExecutor.execute(it) }
+ }
+
+ if (!actuallyShowOverLockscreen) {
+ mainExecutor.execute {
+ executeRunnableDismissingKeyguard(
+ runnable = runnable,
+ afterKeyguardGone = willLaunchResolverActivity,
+ dismissShade = collapse,
+ willAnimateOnKeyguard = animate,
+ customMessage = customMessage,
+ )
+ }
+ } else {
+ mainExecutor.execute(runnable)
+ }
}
override fun startActivityDismissingKeyguard(
@@ -59,7 +241,116 @@ class ActivityStarterInternalImpl @Inject constructor() : ActivityStarterInterna
disallowEnterPictureInPictureWhileLaunching: Boolean,
userHandle: UserHandle?
) {
- TODO("Not yet implemented b/308819693")
+ if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) return
+ val userHandle: UserHandle = userHandle ?: getActivityUserHandle(intent)
+
+ if (onlyProvisioned && !deviceProvisioningInteractor.isDeviceProvisioned()) return
+
+ val willLaunchResolverActivity: Boolean =
+ activityIntentHelper.wouldLaunchResolverActivity(
+ intent,
+ selectedUserInteractor.getSelectedUserId(),
+ )
+
+ val animate =
+ animationController != null &&
+ !willLaunchResolverActivity &&
+ shouldAnimateLaunch(isActivityIntent = true)
+ val animController =
+ wrapAnimationControllerForShadeOrStatusBar(
+ animationController = animationController,
+ dismissShade = dismissShade,
+ isLaunchForActivity = true,
+ )
+
+ // If we animate, we will dismiss the shade only once the animation is done. This is
+ // taken care of by the StatusBarLaunchAnimationController.
+ val dismissShadeDirectly = dismissShade && animController == null
+
+ val runnable = Runnable {
+ assistManagerLazy.get().hideAssist()
+ intent.flags =
+ if (intent.flags and Intent.FLAG_ACTIVITY_REORDER_TO_FRONT != 0) {
+ Intent.FLAG_ACTIVITY_NEW_TASK
+ } else {
+ Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP
+ }
+ intent.addFlags(flags)
+ val result = intArrayOf(ActivityManager.START_CANCELED)
+ activityTransitionAnimator.startIntentWithAnimation(
+ animController,
+ animate,
+ intent.getPackage()
+ ) { adapter: RemoteAnimationAdapter? ->
+ val options =
+ ActivityOptions(CentralSurfaces.getActivityOptions(displayId, adapter))
+
+ // We know that the intent of the caller is to dismiss the keyguard and
+ // this runnable is called right after the keyguard is solved, so we tell
+ // WM that we should dismiss it to avoid flickers when opening an activity
+ // that can also be shown over the keyguard.
+ options.setDismissKeyguardIfInsecure()
+ options.setDisallowEnterPictureInPictureWhileLaunching(
+ disallowEnterPictureInPictureWhileLaunching
+ )
+ if (CameraIntents.isInsecureCameraIntent(intent)) {
+ // Normally an activity will set it's requested rotation
+ // animation on its window. However when launching an activity
+ // causes the orientation to change this is too late. In these cases
+ // the default animation is used. This doesn't look good for
+ // the camera (as it rotates the camera contents out of sync
+ // with physical reality). So, we ask the WindowManager to
+ // force the cross fade animation if an orientation change
+ // happens to occur during the launch.
+ options.rotationAnimationHint =
+ WindowManager.LayoutParams.ROTATION_ANIMATION_SEAMLESS
+ }
+ if (Settings.Panel.ACTION_VOLUME == intent.action) {
+ // Settings Panel is implemented as activity(not a dialog), so
+ // underlying app is paused and may enter picture-in-picture mode
+ // as a result.
+ // So we need to disable picture-in-picture mode here
+ // if it is volume panel.
+ options.setDisallowEnterPictureInPictureWhileLaunching(true)
+ }
+ try {
+ result[0] =
+ ActivityTaskManager.getService()
+ .startActivityAsUser(
+ null,
+ context.basePackageName,
+ context.attributionTag,
+ intent,
+ intent.resolveTypeIfNeeded(context.contentResolver),
+ null,
+ null,
+ 0,
+ Intent.FLAG_ACTIVITY_NEW_TASK,
+ null,
+ options.toBundle(),
+ userHandle.identifier,
+ )
+ } catch (e: RemoteException) {
+ Log.w(TAG, "Unable to start activity", e)
+ }
+ result[0]
+ }
+ callback?.onActivityStarted(result[0])
+ }
+ val cancelRunnable = Runnable {
+ callback?.onActivityStarted(ActivityManager.START_CANCELED)
+ }
+ // Do not deferKeyguard when occluded because, when keyguard is occluded,
+ // we do not launch the activity until keyguard is done.
+ executeRunnableDismissingKeyguard(
+ runnable,
+ cancelRunnable,
+ dismissShadeDirectly,
+ willLaunchResolverActivity,
+ deferred = !isKeyguardOccluded(),
+ animate,
+ customMessage,
+ )
}
override fun startActivity(
@@ -69,7 +360,64 @@ class ActivityStarterInternalImpl @Inject constructor() : ActivityStarterInterna
showOverLockscreenWhenLocked: Boolean,
userHandle: UserHandle?
) {
- TODO("Not yet implemented b/308819693")
+ if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) return
+ val userHandle = userHandle ?: getActivityUserHandle(intent)
+ // Make sure that we dismiss the keyguard if it is directly dismissible or when we don't
+ // want to show the activity above it.
+ if (deviceEntryInteractor.isUnlocked.value || !showOverLockscreenWhenLocked) {
+ startActivityDismissingKeyguard(
+ intent = intent,
+ onlyProvisioned = false,
+ dismissShade = dismissShade,
+ disallowEnterPictureInPictureWhileLaunching = false,
+ callback = null,
+ flags = 0,
+ animationController = animationController,
+ userHandle = userHandle,
+ )
+ return
+ }
+
+ val animate =
+ animationController != null &&
+ shouldAnimateLaunch(
+ isActivityIntent = true,
+ showOverLockscreen = showOverLockscreenWhenLocked
+ )
+
+ var controller: ActivityTransitionAnimator.Controller? = null
+ if (animate) {
+ // Wrap the animation controller to dismiss the shade and set
+ // mIsLaunchingActivityOverLockscreen during the animation.
+ val delegate =
+ wrapAnimationControllerForShadeOrStatusBar(
+ animationController = animationController,
+ dismissShade = dismissShade,
+ isLaunchForActivity = true,
+ )
+ controller = wrapAnimationControllerForLockscreen(dismissShade, delegate)
+ } else if (dismissShade) {
+ // The animation will take care of dismissing the shade at the end of the animation.
+ // If we don't animate, collapse it directly.
+ shadeControllerLazy.get().cancelExpansionAndCollapseShade()
+ }
+
+ // We should exit the dream to prevent the activity from starting below the
+ // dream.
+ if (keyguardInteractor.isDreaming.value) {
+ centralSurfaces?.awakenDreams()
+ }
+
+ activityTransitionAnimator.startIntentWithAnimation(
+ controller,
+ animate,
+ intent.getPackage(),
+ showOverLockscreenWhenLocked
+ ) { adapter: RemoteAnimationAdapter? ->
+ TaskStackBuilder.create(context)
+ .addNextIntent(intent)
+ .startActivities(CentralSurfaces.getActivityOptions(displayId, adapter), userHandle)
+ }
}
override fun dismissKeyguardThenExecute(
@@ -78,7 +426,23 @@ class ActivityStarterInternalImpl @Inject constructor() : ActivityStarterInterna
afterKeyguardGone: Boolean,
customMessage: String?
) {
- TODO("Not yet implemented b/308819693")
+ if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) return
+ Log.i(TAG, "Invoking dismissKeyguardThenExecute, afterKeyguardGone: $afterKeyguardGone")
+
+ // TODO b/308819693: startWakeAndUnlock animation when pulsing
+
+ if (isKeyguardShowing()) {
+ statusBarKeyguardViewManagerLazy
+ .get()
+ .dismissWithAction(action, cancel, afterKeyguardGone, customMessage)
+ } else {
+ // If the keyguard isn't showing but the device is dreaming, we should exit the
+ // dream.
+ if (keyguardInteractor.isDreaming.value) {
+ centralSurfaces?.awakenDreams()
+ }
+ action.onDismiss()
+ }
}
override fun executeRunnableDismissingKeyguard(
@@ -90,10 +454,195 @@ class ActivityStarterInternalImpl @Inject constructor() : ActivityStarterInterna
willAnimateOnKeyguard: Boolean,
customMessage: String?
) {
- TODO("Not yet implemented b/308819693")
+ if (SceneContainerFlag.isUnexpectedlyInLegacyMode()) return
+ val onDismissAction: ActivityStarter.OnDismissAction =
+ object : ActivityStarter.OnDismissAction {
+ override fun onDismiss(): Boolean {
+ if (runnable != null) {
+ if (isKeyguardOccluded()) {
+ statusBarKeyguardViewManagerLazy
+ .get()
+ .addAfterKeyguardGoneRunnable(runnable)
+ } else {
+ mainExecutor.execute(runnable)
+ }
+ }
+ if (dismissShade) {
+ shadeControllerLazy.get().collapseShadeForActivityStart()
+ }
+ if (Flags.communalHub()) {
+ communalSceneInteractor.changeSceneForActivityStartOnDismissKeyguard()
+ }
+ return deferred
+ }
+
+ override fun willRunAnimationOnKeyguard(): Boolean {
+ if (Flags.communalHub() && communalSceneInteractor.isIdleOnCommunal.value) {
+ // Override to false when launching activity over the hub that requires auth
+ return false
+ }
+ return willAnimateOnKeyguard
+ }
+ }
+ dismissKeyguardThenExecute(
+ onDismissAction,
+ cancelAction,
+ afterKeyguardGone,
+ customMessage,
+ )
}
override fun shouldAnimateLaunch(isActivityIntent: Boolean): Boolean {
- TODO("Not yet implemented b/308819693")
+ return shouldAnimateLaunch(isActivityIntent, false)
+ }
+
+ /**
+ * Whether we should animate an activity launch.
+ *
+ * Note: This method must be called *before* dismissing the keyguard.
+ */
+ private fun shouldAnimateLaunch(
+ isActivityIntent: Boolean,
+ showOverLockscreen: Boolean,
+ ): Boolean {
+ // TODO(b/294418322): always support launch animations when occluded.
+ val ignoreOcclusion = showOverLockscreen && Flags.mediaLockscreenLaunchAnimation()
+ if (isKeyguardOccluded() && !ignoreOcclusion) {
+ return false
+ }
+
+ // Always animate if we are not showing the keyguard or if we animate over the lockscreen
+ // (without unlocking it).
+ if (showOverLockscreen || !isKeyguardShowing()) {
+ return true
+ }
+
+ // We don't animate non-activity launches as they can break the animation.
+ // TODO(b/184121838): Support non activity launches on the lockscreen.
+ return isActivityIntent
+ }
+
+ /** Retrieves the current user handle to start the Activity. */
+ private fun getActivityUserHandle(intent: Intent): UserHandle {
+ val packages: Array<String> = resources.getStringArray(R.array.system_ui_packages)
+ for (pkg in packages) {
+ val componentName = intent.component ?: break
+ if (pkg == componentName.packageName) {
+ return UserHandle(UserHandle.myUserId())
+ }
+ }
+ return UserHandle(selectedUserInteractor.getSelectedUserId())
+ }
+
+ private fun isKeyguardShowing(): Boolean {
+ return !deviceEntryInteractor.isDeviceEntered.value
+ }
+
+ private fun isKeyguardOccluded(): Boolean {
+ return keyguardTransitionInteractor.getCurrentState() == KeyguardState.OCCLUDED
+ }
+
+ /**
+ * Return a [ActivityTransitionAnimator.Controller] wrapping `animationController` so that:
+ * - if it launches in the notification shade window and `dismissShade` is true, then the shade
+ * will be instantly dismissed at the end of the animation.
+ * - if it launches in status bar window, it will make the status bar window match the device
+ * size during the animation (that way, the animation won't be clipped by the status bar
+ * size).
+ *
+ * @param animationController the controller that is wrapped and will drive the main animation.
+ * @param dismissShade whether the notification shade will be dismissed at the end of the
+ * animation. This is ignored if `animationController` is not animating in the shade window.
+ * @param isLaunchForActivity whether the launch is for an activity.
+ */
+ private fun wrapAnimationControllerForShadeOrStatusBar(
+ animationController: ActivityTransitionAnimator.Controller?,
+ dismissShade: Boolean,
+ isLaunchForActivity: Boolean,
+ ): ActivityTransitionAnimator.Controller? {
+ if (animationController == null) {
+ return null
+ }
+ val rootView = animationController.transitionContainer.rootView
+ val controllerFromStatusBar: Optional<ActivityTransitionAnimator.Controller> =
+ statusBarWindowController.wrapAnimationControllerIfInStatusBar(
+ rootView,
+ animationController
+ )
+ if (controllerFromStatusBar.isPresent) {
+ return controllerFromStatusBar.get()
+ }
+
+ centralSurfaces?.let {
+ // If the view is not in the status bar, then we are animating a view in the shade.
+ // We have to make sure that we collapse it when the animation ends or is cancelled.
+ if (dismissShade) {
+ return StatusBarTransitionAnimatorController(
+ animationController,
+ shadeAnimationInteractor,
+ shadeControllerLazy.get(),
+ notifShadeWindowControllerLazy.get(),
+ commandQueue,
+ displayId,
+ isLaunchForActivity
+ )
+ }
+ }
+
+ return animationController
+ }
+
+ /**
+ * Wraps an animation controller so that if an activity would be launched on top of the
+ * lockscreen, the correct flags are set for it to be occluded.
+ */
+ private fun wrapAnimationControllerForLockscreen(
+ dismissShade: Boolean,
+ animationController: ActivityTransitionAnimator.Controller?
+ ): ActivityTransitionAnimator.Controller? {
+ return animationController?.let {
+ object : DelegateTransitionAnimatorController(it) {
+ override fun onIntentStarted(willAnimate: Boolean) {
+ delegate.onIntentStarted(willAnimate)
+ if (willAnimate) {
+ centralSurfaces?.setIsLaunchingActivityOverLockscreen(true, dismissShade)
+ }
+ }
+
+ override fun onTransitionAnimationStart(isExpandingFullyAbove: Boolean) {
+ super.onTransitionAnimationStart(isExpandingFullyAbove)
+ if (Flags.communalHub()) {
+ communalSceneInteractor.snapToScene(
+ CommunalScenes.Blank,
+ ActivityTransitionAnimator.TIMINGS.totalDuration
+ )
+ }
+ }
+
+ override fun onTransitionAnimationEnd(isExpandingFullyAbove: Boolean) {
+ // Set mIsLaunchingActivityOverLockscreen to false before actually
+ // finishing the animation so that we can assume that
+ // mIsLaunchingActivityOverLockscreen being true means that we will
+ // collapse the shade (or at least run the post collapse runnables)
+ // later on.
+ centralSurfaces?.setIsLaunchingActivityOverLockscreen(false, false)
+ delegate.onTransitionAnimationEnd(isExpandingFullyAbove)
+ }
+
+ override fun onTransitionAnimationCancelled(newKeyguardOccludedState: Boolean?) {
+ // Set mIsLaunchingActivityOverLockscreen to false before actually
+ // finishing the animation so that we can assume that
+ // mIsLaunchingActivityOverLockscreen being true means that we will
+ // collapse the shade (or at least run the // post collapse
+ // runnables) later on.
+ centralSurfaces?.setIsLaunchingActivityOverLockscreen(false, false)
+ delegate.onTransitionAnimationCancelled(newKeyguardOccludedState)
+ }
+ }
+ }
+ }
+
+ companion object {
+ private const val TAG = "ActivityStarterInternalImpl"
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/AutoTileManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/AutoTileManager.java
index 91b5d0be6f04..a5388564d5fd 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/AutoTileManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/AutoTileManager.java
@@ -414,6 +414,14 @@ public class AutoTileManager implements UserAwareController {
}
}
+ @Override
+ public void onFeatureEnabledChanged(boolean enabled) {
+ if (!enabled) {
+ mHost.removeTile(BRIGHTNESS);
+ mHandler.post(() -> mReduceBrightColorsController.removeCallback(this));
+ }
+ }
+
private void addReduceBrightColorsTile() {
if (mAutoTracker.isAdded(BRIGHTNESS)) return;
mHost.addTile(BRIGHTNESS);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java
index 97b6f95ef3c4..6f29f618ee0d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java
@@ -53,11 +53,14 @@ import com.android.systemui.keyguard.WakefulnessLifecycle;
import com.android.systemui.keyguard.domain.interactor.BiometricUnlockInteractor;
import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor;
import com.android.systemui.keyguard.shared.model.BiometricUnlockSource;
+import com.android.systemui.keyguard.shared.model.Edge;
import com.android.systemui.keyguard.shared.model.KeyguardState;
+import com.android.systemui.keyguard.shared.model.TransitionState;
import com.android.systemui.keyguard.shared.model.TransitionStep;
import com.android.systemui.log.SessionTracker;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.res.R;
+import com.android.systemui.scene.shared.model.Scenes;
import com.android.systemui.statusbar.NotificationMediaManager;
import com.android.systemui.statusbar.NotificationShadeWindowController;
import com.android.systemui.statusbar.VibratorHelper;
@@ -327,14 +330,17 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
mSelectedUserInteractor = selectedUserInteractor;
mKeyguardTransitionInteractor = keyguardTransitionInteractor;
javaAdapter.alwaysCollectFlow(
- keyguardTransitionInteractor.getStartedKeyguardTransitionStep(),
- this::consumeTransitionStepOnStartedKeyguardState);
+ keyguardTransitionInteractor.transition(
+ /* edge */ Edge.create(Scenes.Gone, null),
+ /* edgeWithoutSceneContainer */ Edge.create(
+ KeyguardState.GONE, (KeyguardState) null)),
+ this::consumeFromGoneTransitions);
dumpManager.registerDumpable(this);
}
@VisibleForTesting
- protected void consumeTransitionStepOnStartedKeyguardState(TransitionStep transitionStep) {
- if (transitionStep.getFrom() == KeyguardState.GONE) {
+ protected void consumeFromGoneTransitions(TransitionStep transitionStep) {
+ if (transitionStep.getTransitionState() == TransitionState.STARTED) {
mBiometricUnlockInteractor.setBiometricUnlockState(MODE_NONE, null);
}
}
@@ -363,10 +369,12 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
private void releaseBiometricWakeLock() {
if (mWakeLock != null) {
+ Trace.beginSection("release wake-and-unlock");
mHandler.removeCallbacks(mReleaseBiometricWakeLockRunnable);
mLogger.i("releasing biometric wakelock");
mWakeLock.release();
mWakeLock = null;
+ Trace.endSection();
}
}
@@ -392,7 +400,7 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
}
mWakeLock = mPowerManager.newWakeLock(
PowerManager.PARTIAL_WAKE_LOCK, BIOMETRIC_WAKE_LOCK_NAME);
- Trace.beginSection("acquiring wake-and-unlock");
+ Trace.beginSection("acquire wake-and-unlock");
mWakeLock.acquire();
Trace.endSection();
mLogger.i("biometric acquired, grabbing biometric wakelock");
@@ -406,14 +414,13 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
public void onBiometricDetected(int userId, BiometricSourceType biometricSourceType,
boolean isStrongBiometric) {
Trace.beginSection("BiometricUnlockController#onBiometricDetected");
- if (mUpdateMonitor.isGoingToSleep()) {
- Trace.endSection();
- return;
+ if (!mUpdateMonitor.isGoingToSleep()) {
+ startWakeAndUnlock(
+ MODE_SHOW_BOUNCER,
+ BiometricUnlockSource.Companion.fromBiometricSourceType(biometricSourceType)
+ );
}
- startWakeAndUnlock(
- MODE_SHOW_BOUNCER,
- BiometricUnlockSource.Companion.fromBiometricSourceType(biometricSourceType)
- );
+ Trace.endSection();
}
@Override
@@ -445,6 +452,7 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
} else {
mLogger.d("onBiometricUnlocked aborted by bypass controller");
}
+ Trace.endSection();
}
/**
@@ -473,6 +481,7 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
@WakeAndUnlockMode int mode,
BiometricUnlockSource biometricUnlockSource
) {
+ Trace.beginSection("BiometricUnlockController#startWakeAndUnlock");
mLogger.logStartWakeAndUnlock(mode);
boolean wasDeviceInteractive = mUpdateMonitor.isDeviceInteractive();
mMode = mode;
@@ -495,9 +504,7 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
"android.policy:BIOMETRIC"
);
}
- Trace.beginSection("release wake-and-unlock");
releaseBiometricWakeLock();
- Trace.endSection();
};
final boolean wakeInKeyguard = mMode == MODE_WAKE_AND_UNLOCK_FROM_DREAM
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeParameters.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeParameters.java
index a11cbc3bf231..98869bef5bf0 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeParameters.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeParameters.java
@@ -37,6 +37,7 @@ import androidx.annotation.VisibleForTesting;
import com.android.keyguard.KeyguardUpdateMonitor;
import com.android.keyguard.KeyguardUpdateMonitorCallback;
import com.android.systemui.Dumpable;
+import com.android.systemui.Flags;
import com.android.systemui.dagger.SysUISingleton;
import com.android.systemui.dagger.qualifiers.Background;
import com.android.systemui.dagger.qualifiers.Main;
@@ -54,6 +55,7 @@ import com.android.systemui.statusbar.policy.DevicePostureController;
import com.android.systemui.tuner.TunerService;
import com.android.systemui.unfold.FoldAodAnimationController;
import com.android.systemui.unfold.SysUIUnfoldComponent;
+import com.android.systemui.util.settings.SecureSettings;
import java.io.PrintWriter;
import java.util.Optional;
@@ -86,6 +88,7 @@ public class DozeParameters implements
private final FoldAodAnimationController mFoldAodAnimationController;
private final UnlockedScreenOffAnimationController mUnlockedScreenOffAnimationController;
private final UserTracker mUserTracker;
+ private final SecureSettings mSecureSettings;
private boolean mDozeAlwaysOn;
private boolean mControlScreenOffAnimation;
@@ -130,7 +133,8 @@ public class DozeParameters implements
ConfigurationController configurationController,
StatusBarStateController statusBarStateController,
UserTracker userTracker,
- DozeInteractor dozeInteractor) {
+ DozeInteractor dozeInteractor,
+ SecureSettings secureSettings) {
mResources = resources;
mAmbientDisplayConfiguration = ambientDisplayConfiguration;
mAlwaysOnPolicy = alwaysOnDisplayPolicy;
@@ -144,6 +148,7 @@ public class DozeParameters implements
mUnlockedScreenOffAnimationController = unlockedScreenOffAnimationController;
mUserTracker = userTracker;
mDozeInteractor = dozeInteractor;
+ mSecureSettings = secureSettings;
keyguardUpdateMonitor.registerCallback(mKeyguardVisibilityCallback);
tunerService.addTunable(
@@ -160,7 +165,8 @@ public class DozeParameters implements
mFoldAodAnimationController.addCallback(this);
}
- SettingsObserver quickPickupSettingsObserver = new SettingsObserver(context, handler);
+ SettingsObserver quickPickupSettingsObserver =
+ new SettingsObserver(context, handler, mSecureSettings);
quickPickupSettingsObserver.observe();
batteryController.addCallback(new BatteryStateChangeCallback() {
@@ -479,18 +485,36 @@ public class DozeParameters implements
Settings.Secure.getUriFor(Settings.Secure.DOZE_ALWAYS_ON);
private final Context mContext;
- SettingsObserver(Context context, Handler handler) {
+ private final Handler mHandler;
+ private final SecureSettings mSecureSettings;
+
+ SettingsObserver(Context context, Handler handler, SecureSettings secureSettings) {
super(handler);
mContext = context;
+ mHandler = handler;
+ mSecureSettings = secureSettings;
}
void observe() {
- ContentResolver resolver = mContext.getContentResolver();
- resolver.registerContentObserver(mQuickPickupGesture, false, this,
- UserHandle.USER_ALL);
- resolver.registerContentObserver(mPickupGesture, false, this, UserHandle.USER_ALL);
- resolver.registerContentObserver(mAlwaysOnEnabled, false, this, UserHandle.USER_ALL);
- update(null);
+ if (Flags.registerContentObserversAsync()) {
+ mSecureSettings.registerContentObserverForUserAsync(mQuickPickupGesture,
+ this, UserHandle.USER_ALL);
+ mSecureSettings.registerContentObserverForUserAsync(mPickupGesture,
+ this, UserHandle.USER_ALL);
+ mSecureSettings.registerContentObserverForUserAsync(mAlwaysOnEnabled,
+ this, UserHandle.USER_ALL,
+ // The register calls are called in order, so this ensures that update()
+ // is called after them all and value retrieval isn't racy.
+ () -> mHandler.post(() -> update(null)));
+ } else {
+ ContentResolver resolver = mContext.getContentResolver();
+ resolver.registerContentObserver(mQuickPickupGesture, false, this,
+ UserHandle.USER_ALL);
+ resolver.registerContentObserver(mPickupGesture, false, this, UserHandle.USER_ALL);
+ resolver.registerContentObserver(mAlwaysOnEnabled, false, this,
+ UserHandle.USER_ALL);
+ update(null);
+ }
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeServiceHost.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeServiceHost.java
index 330383ff03af..a32d5fef58eb 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeServiceHost.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeServiceHost.java
@@ -29,8 +29,10 @@ import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
+import androidx.annotation.MainThread;
import androidx.annotation.Nullable;
+import com.android.app.tracing.TraceUtils;
import com.android.internal.annotations.VisibleForTesting;
import com.android.keyguard.KeyguardUpdateMonitor;
import com.android.systemui.assist.AssistManager;
@@ -61,6 +63,8 @@ import com.android.systemui.util.IListenerSet;
import dagger.Lazy;
+import kotlin.Unit;
+
import kotlinx.coroutines.ExperimentalCoroutinesApi;
import javax.inject.Inject;
@@ -109,7 +113,7 @@ public final class DozeServiceHost implements DozeHost {
private CentralSurfaces mCentralSurfaces;
private boolean mAlwaysOnSuppressed;
private boolean mPulsePending;
- private DozeInteractor mDozeInteractor;
+ private final DozeInteractor mDozeInteractor;
@Inject
public DozeServiceHost(DozeLog dozeLog, PowerManager powerManager,
@@ -337,13 +341,17 @@ public final class DozeServiceHost implements DozeHost {
}
@Override
+ @MainThread
public void dozeTimeTick() {
- mDozeInteractor.dozeTimeTick();
- mShadeLockscreenInteractor.dozeTimeTick();
- mAuthController.dozeTimeTick();
- if (mAmbientIndicationContainer instanceof DozeReceiver) {
- ((DozeReceiver) mAmbientIndicationContainer).dozeTimeTick();
- }
+ TraceUtils.trace("DozeServiceHost#dozeTimeTick", () -> {
+ mDozeInteractor.dozeTimeTick();
+ mShadeLockscreenInteractor.dozeTimeTick();
+ mAuthController.dozeTimeTick();
+ if (mAmbientIndicationContainer instanceof DozeReceiver) {
+ ((DozeReceiver) mAmbientIndicationContainer).dozeTimeTick();
+ }
+ return Unit.INSTANCE;
+ });
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpManagerPhone.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpManagerPhone.java
index 0623bb2c274a..e08dbb9df7dc 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpManagerPhone.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpManagerPhone.java
@@ -31,7 +31,6 @@ import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.logging.UiEventLogger;
import com.android.internal.policy.SystemBarUtils;
import com.android.systemui.dagger.SysUISingleton;
-import com.android.systemui.dagger.qualifiers.Background;
import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.plugins.statusbar.StatusBarStateController.StateListener;
@@ -46,6 +45,7 @@ import com.android.systemui.statusbar.notification.collection.render.GroupMember
import com.android.systemui.statusbar.notification.data.repository.HeadsUpRepository;
import com.android.systemui.statusbar.notification.data.repository.HeadsUpRowRepository;
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;
+import com.android.systemui.statusbar.notification.shared.NotificationThrottleHun;
import com.android.systemui.statusbar.notification.shared.NotificationsHeadsUpRefactor;
import com.android.systemui.statusbar.policy.AccessibilityManagerWrapper;
import com.android.systemui.statusbar.policy.AnimationStateHandler;
@@ -173,11 +173,14 @@ public class HeadsUpManagerPhone extends BaseHeadsUpManager implements
updateResources();
}
});
- if (!NotificationsHeadsUpRefactor.isEnabled()) {
- javaAdapter.alwaysCollectFlow(shadeInteractor.isAnyExpanded(),
+ javaAdapter.alwaysCollectFlow(shadeInteractor.isAnyExpanded(),
this::onShadeOrQsExpanded);
+ if (NotificationThrottleHun.isEnabled()) {
+ mVisualStabilityProvider.addPersistentReorderingBannedListener(
+ mOnReorderingBannedListener);
+ mVisualStabilityProvider.addPersistentReorderingAllowedListener(
+ mOnReorderingAllowedListener);
}
- mVisualStabilityProvider.addPersistentReorderingBannedListener(mOnReorderingBannedListener);
}
public void setAnimationStateHandler(AnimationStateHandler handler) {
@@ -272,10 +275,9 @@ public class HeadsUpManagerPhone extends BaseHeadsUpManager implements
}
private void onShadeOrQsExpanded(Boolean isExpanded) {
- NotificationsHeadsUpRefactor.assertInLegacyMode();
if (isExpanded != mIsExpanded) {
mIsExpanded = isExpanded;
- if (isExpanded) {
+ if (!NotificationsHeadsUpRefactor.isEnabled() && isExpanded) {
mHeadsUpAnimatingAway.setValue(false);
}
}
@@ -306,6 +308,9 @@ public class HeadsUpManagerPhone extends BaseHeadsUpManager implements
HeadsUpEntryPhone headsUpEntry = getHeadsUpEntryPhone(entry.getKey());
if (headsUpEntry != null && headsUpEntry.mRemoteInputActive != remoteInputActive) {
headsUpEntry.mRemoteInputActive = remoteInputActive;
+ if (ExpandHeadsUpOnInlineReply.isEnabled() && remoteInputActive) {
+ headsUpEntry.mRemoteInputActivatedAtLeastOnce = true;
+ }
if (remoteInputActive) {
headsUpEntry.cancelAutoRemovalCallbacks("setRemoteInputActive(true)");
} else {
@@ -385,8 +390,9 @@ public class HeadsUpManagerPhone extends BaseHeadsUpManager implements
private final OnReorderingAllowedListener mOnReorderingAllowedListener = () -> {
mAnimationStateHandler.setHeadsUpGoingAwayAnimationsAllowed(false);
- mAvalancheController.setEnableAtRuntime(true);
-
+ if (NotificationThrottleHun.isEnabled()) {
+ mAvalancheController.setEnableAtRuntime(true);
+ }
for (NotificationEntry entry : mEntriesToRemoveWhenReorderingAllowed) {
if (isHeadsUpEntry(entry.getKey())) {
// Maybe the heads-up was removed already
@@ -399,13 +405,6 @@ public class HeadsUpManagerPhone extends BaseHeadsUpManager implements
private final OnReorderingBannedListener mOnReorderingBannedListener = () -> {
if (mAvalancheController != null) {
- // Waiting HUNs in AvalancheController are still promoted to the HUN section and thus
- // seen in open shade; clear them so we don't show them again when the shade closes and
- // reordering is allowed again.
- final int numDropped = mAvalancheController.getWaitingKeys().size();
- mAvalancheController.logDroppedHunsInBackground(numDropped);
- mAvalancheController.clearNext();
-
// In open shade the first HUN is pinned, and visual stability logic prevents us from
// unpinning this first HUN as long as the shade remains open. AvalancheController only
// shows the next HUN when the currently showing HUN is unpinned, so we must disable
@@ -414,8 +413,8 @@ public class HeadsUpManagerPhone extends BaseHeadsUpManager implements
mAvalancheController.setEnableAtRuntime(false);
// Note that we cannot do the above when
- // 1) the remove runnable runs because its delay means it may not run before shade close
- // 2) reordering is allowed again (when shade closes) because the HUN appear animation
+ // 1) The remove runnable runs because its delay means it may not run before shade close
+ // 2) Reordering is allowed again (when shade closes) because the HUN appear animation
// will have started by then
}
};
@@ -592,18 +591,36 @@ public class HeadsUpManagerPhone extends BaseHeadsUpManager implements
}
@Override
- protected Runnable createRemoveRunnable(NotificationEntry entry) {
- return () -> {
+ protected void setEntry(@androidx.annotation.NonNull NotificationEntry entry,
+ @androidx.annotation.Nullable Runnable removeRunnable) {
+ super.setEntry(entry, removeRunnable);
+
+ if (NotificationThrottleHun.isEnabled()) {
if (!mVisualStabilityProvider.isReorderingAllowed()
// We don't want to allow reordering while pulsing, but headsup need to
// time out anyway
&& !entry.showingPulsing()) {
mEntriesToRemoveWhenReorderingAllowed.add(entry);
+ entry.setSeenInShade(true);
+ }
+ }
+ }
+
+ @Override
+ protected Runnable createRemoveRunnable(NotificationEntry entry) {
+ return () -> {
+ if (!NotificationThrottleHun.isEnabled()
+ && !mVisualStabilityProvider.isReorderingAllowed()
+ // We don't want to allow reordering while pulsing, but headsup need to
+ // time out anyway
+ && !entry.showingPulsing()) {
+ mEntriesToRemoveWhenReorderingAllowed.add(entry);
mVisualStabilityProvider.addTemporaryReorderingAllowedListener(
mOnReorderingAllowedListener);
} else if (mTrackingHeadsUp) {
mEntriesToRemoveAfterExpand.add(entry);
- } else {
+ } else if (mVisualStabilityProvider.isReorderingAllowed()
+ || entry.showingPulsing()) {
removeEntry(entry.getKey(), "createRemoveRunnable");
}
};
@@ -616,8 +633,10 @@ public class HeadsUpManagerPhone extends BaseHeadsUpManager implements
if (mEntriesToRemoveAfterExpand.contains(mEntry)) {
mEntriesToRemoveAfterExpand.remove(mEntry);
}
- if (mEntriesToRemoveWhenReorderingAllowed.contains(mEntry)) {
- mEntriesToRemoveWhenReorderingAllowed.remove(mEntry);
+ if (!NotificationThrottleHun.isEnabled()) {
+ if (mEntriesToRemoveWhenReorderingAllowed.contains(mEntry)) {
+ mEntriesToRemoveWhenReorderingAllowed.remove(mEntry);
+ }
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpTouchHelper.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpTouchHelper.java
index 7f16e18716c4..26bd7ac74d97 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpTouchHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpTouchHelper.java
@@ -124,7 +124,6 @@ public class HeadsUpTouchHelper implements Gefingerpoken {
mPanel.setHeadsUpDraggingStartingHeight(startHeight);
mPanel.startExpand(x, y, true /* startTracking */, startHeight);
- // TODO(b/340514839): Figure out where to move this side effect in flexiglass
if (!SceneContainerFlag.isEnabled()) {
// This call needs to be after the expansion start otherwise we will get a
// flicker of one frame as it's not expanded yet.
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBypassController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBypassController.kt
index 97791acfb43a..316e1f13bc2b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBypassController.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBypassController.kt
@@ -22,6 +22,7 @@ import android.content.res.Resources
import android.hardware.biometrics.BiometricSourceType
import android.provider.Settings
import com.android.app.tracing.ListenersTracing.forEachTraced
+import com.android.app.tracing.coroutines.launch
import com.android.systemui.Dumpable
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
@@ -159,7 +160,7 @@ class KeyguardBypassController @Inject constructor(
}
fun listenForQsExpandedChange() =
- applicationScope.launch {
+ applicationScope.launch("listenForQsExpandedChange") {
shadeInteractorLazy.get().qsExpansion.map { it > 0f }.distinctUntilChanged()
.collect { isQsExpanded ->
val changed = qsExpanded != isQsExpanded
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LegacyActivityStarterInternalImpl.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LegacyActivityStarterInternalImpl.kt
index bcb613fe2b8c..1a4708170a05 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LegacyActivityStarterInternalImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LegacyActivityStarterInternalImpl.kt
@@ -33,14 +33,13 @@ import android.view.View
import android.view.WindowManager
import com.android.keyguard.KeyguardUpdateMonitor
import com.android.systemui.ActivityIntentHelper
-import com.android.systemui.Flags.communalHub
import com.android.systemui.Flags.mediaLockscreenLaunchAnimation
import com.android.systemui.animation.ActivityTransitionAnimator
import com.android.systemui.animation.DelegateTransitionAnimatorController
import com.android.systemui.assist.AssistManager
import com.android.systemui.camera.CameraIntents
import com.android.systemui.communal.domain.interactor.CommunalSceneInteractor
-import com.android.systemui.communal.shared.model.CommunalScenes
+import com.android.systemui.communal.domain.interactor.CommunalSettingsInteractor
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.DisplayId
import com.android.systemui.dagger.qualifiers.Main
@@ -94,6 +93,7 @@ constructor(
private val activityIntentHelper: ActivityIntentHelper,
@Main private val mainExecutor: DelayableExecutor,
private val communalSceneInteractor: CommunalSceneInteractor,
+ private val communalSettingsInteractor: CommunalSettingsInteractor,
) : ActivityStarterInternal {
private val centralSurfaces: CentralSurfaces?
get() = centralSurfacesOptLazy.get().getOrNull()
@@ -207,10 +207,16 @@ constructor(
val cancelRunnable = Runnable {
callback?.onActivityStarted(ActivityManager.START_CANCELED)
}
- // Do not deferKeyguard when occluded because, when keyguard is occluded,
- // we do not launch the activity until keyguard is done.
+ // Do not deferKeyguard when occluded because, when keyguard is occluded, we do not launch
+ // the activity until keyguard is done. The only exception is when we're on the Hub and want
+ // to dismiss the shade immediately, which means that another animation will take care of
+ // the transition.
val occluded = (keyguardStateController.isShowing && keyguardStateController.isOccluded)
- val deferred = !occluded
+ val dismissOnCommunal =
+ communalSettingsInteractor.isCommunalFlagEnabled() &&
+ communalSceneInteractor.isCommunalVisible.value &&
+ dismissShadeDirectly
+ val deferred = !occluded || dismissOnCommunal
executeRunnableDismissingKeyguard(
runnable,
cancelRunnable,
@@ -276,10 +282,11 @@ constructor(
statusBarController
}
+ val isCommunalDismissLaunch = isCommunalWidgetLaunch() && !actuallyShowOverLockscreen
// If we animate, don't collapse the shade and defer the keyguard dismiss (in case we
// run the animation on the keyguard). The animation will take care of (instantly)
// collapsing the shade and hiding the keyguard once it is done.
- val collapse = dismissShade && !animate
+ val collapse = (dismissShade || isCommunalDismissLaunch) && !animate
val runnable = Runnable {
try {
activityTransitionAnimator.startPendingIntentWithAnimation(
@@ -338,8 +345,9 @@ constructor(
postOnUiThread(delay = 0) {
executeRunnableDismissingKeyguard(
runnable = runnable,
- afterKeyguardGone = willLaunchResolverActivity,
dismissShade = collapse,
+ afterKeyguardGone = willLaunchResolverActivity,
+ deferred = isCommunalDismissLaunch,
willAnimateOnKeyguard = animate,
customMessage = customMessage,
)
@@ -460,8 +468,18 @@ constructor(
object : ActivityStarter.OnDismissAction {
override fun onDismiss(): Boolean {
if (runnable != null) {
+ // We don't wait for Keyguard to be gone if we're dismissing the shade
+ // immediately and we're on the Communal Hub. This is to make sure that the
+ // Hub -> Edit Mode transition is seamless.
+ val dismissOnCommunal =
+ communalSettingsInteractor.isCommunalFlagEnabled() &&
+ communalSceneInteractor.isCommunalVisible.value &&
+ dismissShade
if (
- keyguardStateController.isShowing && keyguardStateController.isOccluded
+ keyguardStateController.isShowing &&
+ keyguardStateController.isOccluded &&
+ !isCommunalWidgetLaunch() &&
+ !dismissOnCommunal
) {
statusBarKeyguardViewManagerLazy
.get()
@@ -473,17 +491,10 @@ constructor(
if (dismissShade) {
shadeControllerLazy.get().collapseShadeForActivityStart()
}
- if (communalHub()) {
- communalSceneInteractor.changeSceneForActivityStartOnDismissKeyguard()
- }
return deferred
}
override fun willRunAnimationOnKeyguard(): Boolean {
- if (communalHub() && communalSceneInteractor.isIdleOnCommunal.value) {
- // Override to false when launching activity over the hub that requires auth
- return false
- }
return willAnimateOnKeyguard
}
}
@@ -564,12 +575,6 @@ constructor(
override fun onTransitionAnimationStart(isExpandingFullyAbove: Boolean) {
super.onTransitionAnimationStart(isExpandingFullyAbove)
- if (communalHub()) {
- communalSceneInteractor.snapToScene(
- CommunalScenes.Blank,
- ActivityTransitionAnimator.TIMINGS.totalDuration
- )
- }
// Double check that the keyguard is still showing and not going
// away, but if so set the keyguard occluded. Typically, WM will let
// KeyguardViewMediator know directly, but we're overriding that to
@@ -639,7 +644,8 @@ constructor(
showOverLockscreen: Boolean,
): Boolean {
// TODO(b/294418322): always support launch animations when occluded.
- val ignoreOcclusion = showOverLockscreen && mediaLockscreenLaunchAnimation()
+ val ignoreOcclusion =
+ (showOverLockscreen && mediaLockscreenLaunchAnimation()) || isCommunalWidgetLaunch()
if (keyguardStateController.isOccluded && !ignoreOcclusion) {
return false
}
@@ -659,6 +665,12 @@ constructor(
return shouldAnimateLaunch(isActivityIntent, false)
}
+ private fun isCommunalWidgetLaunch(): Boolean {
+ return communalSettingsInteractor.isCommunalFlagEnabled() &&
+ communalSceneInteractor.isCommunalVisible.value &&
+ communalSceneInteractor.isLaunchingWidget.value
+ }
+
private fun postOnUiThread(delay: Int = 0, runnable: Runnable) {
mainExecutor.executeDelayed(runnable, delay.toLong())
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
index e4edfa4a2bfe..069c6241491c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
@@ -474,6 +474,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump
// PRIMARY_BOUNCER->GONE
collectFlow(behindScrim, mKeyguardTransitionInteractor.transition(
+ Edge.Companion.getINVALID(),
Edge.Companion.create(PRIMARY_BOUNCER, GONE)),
mBouncerToGoneTransition, mMainDispatcher);
collectFlow(behindScrim, mPrimaryBouncerToGoneTransitionViewModel.getScrimAlpha(),
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
index 0316b0eead25..8f2ad40e7130 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
@@ -55,6 +55,7 @@ import com.android.keyguard.KeyguardUpdateMonitorCallback;
import com.android.keyguard.KeyguardViewController;
import com.android.keyguard.TrustGrantFlags;
import com.android.keyguard.ViewMediatorCallback;
+import com.android.systemui.Flags;
import com.android.systemui.biometrics.domain.interactor.UdfpsOverlayInteractor;
import com.android.systemui.bouncer.domain.interactor.AlternateBouncerInteractor;
import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerCallbackInteractor;
@@ -63,6 +64,7 @@ import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor;
import com.android.systemui.bouncer.ui.BouncerView;
import com.android.systemui.dagger.SysUISingleton;
import com.android.systemui.dagger.qualifiers.Main;
+import com.android.systemui.deviceentry.domain.interactor.DeviceEntryInteractor;
import com.android.systemui.deviceentry.shared.DeviceEntryUdfpsRefactor;
import com.android.systemui.dock.DockManager;
import com.android.systemui.dreams.DreamOverlayStateController;
@@ -167,6 +169,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
private final BouncerView mPrimaryBouncerView;
private final Lazy<ShadeController> mShadeController;
private final Lazy<SceneInteractor> mSceneInteractorLazy;
+ private final Lazy<DeviceEntryInteractor> mDeviceEntryInteractorLazy;
private Job mListenForAlternateBouncerTransitionSteps = null;
private Job mListenForKeyguardAuthenticatedBiometricsHandled = null;
@@ -395,7 +398,8 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
Lazy<KeyguardSurfaceBehindInteractor> surfaceBehindInteractor,
JavaAdapter javaAdapter,
Lazy<SceneInteractor> sceneInteractorLazy,
- StatusBarKeyguardViewManagerInteractor statusBarKeyguardViewManagerInteractor
+ StatusBarKeyguardViewManagerInteractor statusBarKeyguardViewManagerInteractor,
+ Lazy<DeviceEntryInteractor> deviceEntryInteractorLazy
) {
mContext = context;
mViewMediatorCallback = callback;
@@ -430,6 +434,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
mJavaAdapter = javaAdapter;
mSceneInteractorLazy = sceneInteractorLazy;
mStatusBarKeyguardViewManagerInteractor = statusBarKeyguardViewManagerInteractor;
+ mDeviceEntryInteractorLazy = deviceEntryInteractorLazy;
}
KeyguardTransitionInteractor mKeyguardTransitionInteractor;
@@ -704,15 +709,30 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
* {@link #needsFullscreenBouncer()}.
*/
protected void showBouncerOrKeyguard(boolean hideBouncerWhenShowing) {
- if (needsFullscreenBouncer() && !mDozing) {
+ boolean isDozing = mDozing;
+ if (Flags.simPinRaceConditionOnRestart()) {
+ KeyguardState toState = mKeyguardTransitionInteractor.getTransitionState().getValue()
+ .getTo();
+ isDozing = mDozing || toState == KeyguardState.DOZING || toState == KeyguardState.AOD;
+ }
+ if (needsFullscreenBouncer() && !isDozing) {
// The keyguard might be showing (already). So we need to hide it.
if (!primaryBouncerIsShowing()) {
- mCentralSurfaces.hideKeyguard();
if (SceneContainerFlag.isEnabled()) {
+ mCentralSurfaces.hideKeyguard();
mSceneInteractorLazy.get().changeScene(
Scenes.Bouncer, "StatusBarKeyguardViewManager.showBouncerOrKeyguard");
} else {
- mPrimaryBouncerInteractor.show(/* isScrimmed= */ true);
+ if (Flags.simPinRaceConditionOnRestart()) {
+ if (mPrimaryBouncerInteractor.show(/* isScrimmed= */ true)) {
+ mCentralSurfaces.hideKeyguard();
+ } else {
+ mCentralSurfaces.showKeyguard();
+ }
+ } else {
+ mCentralSurfaces.hideKeyguard();
+ mPrimaryBouncerInteractor.show(/* isScrimmed= */ true);
+ }
}
} else {
Log.e(TAG, "Attempted to show the sim bouncer when it is already showing.");
@@ -735,6 +755,11 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
* {@see KeyguardBouncer#show(boolean, boolean)}
*/
public void showBouncer(boolean scrimmed) {
+ if (SceneContainerFlag.isEnabled()) {
+ mDeviceEntryInteractorLazy.get().attemptDeviceEntry();
+ return;
+ }
+
if (DeviceEntryUdfpsRefactor.isEnabled()) {
if (mAlternateBouncerInteractor.canShowAlternateBouncerForFingerprint()) {
Log.d(TAG, "showBouncer:alternateBouncer.forceShow()");
@@ -777,8 +802,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
hideAlternateBouncer(false);
if (mKeyguardStateController.isShowing() && !isBouncerShowing()) {
if (SceneContainerFlag.isEnabled()) {
- mSceneInteractorLazy.get().changeScene(
- Scenes.Bouncer, "StatusBarKeyguardViewManager.showPrimaryBouncer");
+ mDeviceEntryInteractorLazy.get().attemptDeviceEntry();
} else {
mPrimaryBouncerInteractor.show(scrimmed);
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragment.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragment.java
index aced0be4cc46..0320a7ae103b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragment.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragment.java
@@ -528,9 +528,10 @@ public class CollapsedStatusBarFragment extends Fragment implements CommandQueue
}
@Override
- public void onOngoingActivityStatusChanged(boolean hasOngoingActivity) {
+ public void onOngoingActivityStatusChanged(
+ boolean hasOngoingActivity, boolean shouldAnimate) {
mHasOngoingActivity = hasOngoingActivity;
- updateStatusBarVisibilities(/* animate= */ true);
+ updateStatusBarVisibilities(shouldAnimate);
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ongoingcall/shared/model/OngoingCallModel.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ongoingcall/shared/model/OngoingCallModel.kt
index 2c4848776b66..f81b952ee3b2 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ongoingcall/shared/model/OngoingCallModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ongoingcall/shared/model/OngoingCallModel.kt
@@ -18,7 +18,13 @@ package com.android.systemui.statusbar.phone.ongoingcall.shared.model
import android.app.PendingIntent
-/** Represents the state of any ongoing calls. */
+/**
+ * Represents the state of any ongoing calls.
+ *
+ * TODO(b/332662551): If there's an ongoing call but the user has the call app open, then we use the
+ * NoCall model, *not* the InCall model, which is confusing when looking at the logs. We may want
+ * to make that more clear, either with better logging or different models.
+ */
sealed interface OngoingCallModel {
/** There is no ongoing call. */
data object NoCall : OngoingCallModel
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconInteractor.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconInteractor.kt
index 507759c037ba..68163b28dd09 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconInteractor.kt
@@ -325,7 +325,7 @@ class MobileIconInteractorImpl(
}
.stateIn(scope, SharingStarted.WhileSubscribed(), true)
- private val shownLevel: StateFlow<Int> =
+ private val cellularShownLevel: StateFlow<Int> =
combine(
level,
isInService,
@@ -337,15 +337,19 @@ class MobileIconInteractorImpl(
}
.stateIn(scope, SharingStarted.WhileSubscribed(), 0)
+ // Satellite level is unaffected by the isInService or inflateSignalStrength properties
+ // See b/346904529 for details
+ private val satelliteShownLevel: StateFlow<Int> = level
+
private val cellularIcon: Flow<SignalIconModel.Cellular> =
combine(
- shownLevel,
+ cellularShownLevel,
numberOfLevels,
showExclamationMark,
carrierNetworkChangeActive,
- ) { shownLevel, numberOfLevels, showExclamationMark, carrierNetworkChange ->
+ ) { cellularShownLevel, numberOfLevels, showExclamationMark, carrierNetworkChange ->
SignalIconModel.Cellular(
- shownLevel,
+ cellularShownLevel,
numberOfLevels,
showExclamationMark,
carrierNetworkChange,
@@ -353,7 +357,7 @@ class MobileIconInteractorImpl(
}
private val satelliteIcon: Flow<SignalIconModel.Satellite> =
- shownLevel.map {
+ satelliteShownLevel.map {
SignalIconModel.Satellite(
level = it,
icon =
@@ -365,7 +369,7 @@ class MobileIconInteractorImpl(
override val signalLevelIcon: StateFlow<SignalIconModel> = run {
val initial =
SignalIconModel.Cellular(
- shownLevel.value,
+ cellularShownLevel.value,
numberOfLevels.value,
showExclamationMark.value,
carrierNetworkChangeActive.value,
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/shared/ui/binder/CollapsedStatusBarViewBinder.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/shared/ui/binder/CollapsedStatusBarViewBinder.kt
index ae1898bc479c..16bd7f830c66 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/shared/ui/binder/CollapsedStatusBarViewBinder.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/shared/ui/binder/CollapsedStatusBarViewBinder.kt
@@ -110,7 +110,7 @@ class CollapsedStatusBarViewBinderImpl @Inject constructor() : CollapsedStatusBa
chipView.setOnClickListener(chipModel.onClickListener)
// Accessibility
- setChipAccessibility(chipModel, chipView)
+ setChipAccessibility(chipModel, chipView, chipBackgroundView)
// Colors
val textColor = chipModel.colors.text(chipContext)
@@ -122,7 +122,8 @@ class CollapsedStatusBarViewBinderImpl @Inject constructor() : CollapsedStatusBa
// Notify listeners
listener.onOngoingActivityStatusChanged(
- hasOngoingActivity = true
+ hasOngoingActivity = true,
+ shouldAnimate = true,
)
}
is OngoingActivityChipModel.Hidden -> {
@@ -130,7 +131,8 @@ class CollapsedStatusBarViewBinderImpl @Inject constructor() : CollapsedStatusBa
// b/192243808 and [Chronometer.start].
chipTimeView.stop()
listener.onOngoingActivityStatusChanged(
- hasOngoingActivity = false
+ hasOngoingActivity = false,
+ shouldAnimate = chipModel.shouldAnimate,
)
}
}
@@ -211,7 +213,11 @@ class CollapsedStatusBarViewBinderImpl @Inject constructor() : CollapsedStatusBa
this.setPaddingRelative(/* start= */ 0, paddingTop, paddingEnd, paddingBottom)
}
- private fun setChipAccessibility(chipModel: OngoingActivityChipModel.Shown, chipView: View) {
+ private fun setChipAccessibility(
+ chipModel: OngoingActivityChipModel.Shown,
+ chipView: View,
+ chipBackgroundView: View,
+ ) {
when (chipModel) {
is OngoingActivityChipModel.Shown.Countdown -> {
// Set as assertive so talkback will announce the countdown
@@ -222,6 +228,16 @@ class CollapsedStatusBarViewBinderImpl @Inject constructor() : CollapsedStatusBa
chipView.accessibilityLiveRegion = View.ACCESSIBILITY_LIVE_REGION_NONE
}
}
+ // Clickable chips need to be a minimum size for accessibility purposes, but let
+ // non-clickable chips be smaller.
+ if (chipModel.onClickListener != null) {
+ chipBackgroundView.minimumWidth =
+ chipBackgroundView.context.resources.getDimensionPixelSize(
+ R.dimen.min_clickable_item_size
+ )
+ } else {
+ chipBackgroundView.minimumWidth = 0
+ }
}
private fun animateLightsOutView(view: View, visible: Boolean) {
@@ -266,8 +282,13 @@ interface StatusBarVisibilityChangeListener {
/** Called when a transition from lockscreen to dream has started. */
fun onTransitionFromLockscreenToDreamStarted()
- /** Called when the status of the ongoing activity chip (active or not active) has changed. */
- fun onOngoingActivityStatusChanged(hasOngoingActivity: Boolean)
+ /**
+ * Called when the status of the ongoing activity chip (active or not active) has changed.
+ *
+ * @param shouldAnimate true if the chip should animate in/out, and false if the chip should
+ * immediately appear/disappear.
+ */
+ fun onOngoingActivityStatusChanged(hasOngoingActivity: Boolean, shouldAnimate: Boolean)
/**
* Called when the scene state has changed such that the home status bar is newly allowed or no
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/AvalancheController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/policy/AvalancheController.kt
index 8aabdf2a40f2..a88c6d707da4 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/AvalancheController.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/AvalancheController.kt
@@ -37,14 +37,27 @@ import javax.inject.Inject
@SysUISingleton
class AvalancheController
@Inject
-constructor(dumpManager: DumpManager,
- private val uiEventLogger: UiEventLogger,
- @Background private val bgHandler: Handler
+constructor(
+ dumpManager: DumpManager,
+ private val uiEventLogger: UiEventLogger,
+ @Background private val bgHandler: Handler
) : Dumpable {
private val tag = "AvalancheController"
private val debug = Compile.IS_DEBUG && Log.isLoggable(tag, Log.DEBUG)
var enableAtRuntime = true
+ set(value) {
+ if (!value) {
+ // Waiting HUNs in AvalancheController are shown in the HUN section in open shade.
+ // Clear them so we don't show them again when the shade closes and reordering is
+ // allowed again.
+ logDroppedHunsInBackground(getWaitingKeys().size)
+ clearNext()
+ }
+ if (field != value) {
+ field = value
+ }
+ }
// HUN showing right now, in the floating state where full shade is hidden, on launcher or AOD
@VisibleForTesting var headsUpEntryShowing: HeadsUpEntry? = null
@@ -87,16 +100,20 @@ constructor(dumpManager: DumpManager,
dumpManager.registerNormalDumpable(tag, /* module */ this)
}
- fun isEnabled() : Boolean {
- return NotificationThrottleHun.isEnabled && enableAtRuntime
- }
-
fun getShowingHunKey(): String {
return getKey(headsUpEntryShowing)
}
+ fun isEnabled(): Boolean {
+ return NotificationThrottleHun.isEnabled && enableAtRuntime
+ }
+
/** Run or delay Runnable for given HeadsUpEntry */
- fun update(entry: HeadsUpEntry?, runnable: Runnable, label: String) {
+ fun update(entry: HeadsUpEntry?, runnable: Runnable?, label: String) {
+ if (runnable == null) {
+ log { "Runnable is NULL, stop update." }
+ return
+ }
if (!isEnabled()) {
runnable.run()
return
@@ -152,7 +169,11 @@ constructor(dumpManager: DumpManager,
* Run or ignore Runnable for given HeadsUpEntry. If entry was never shown, ignore and delete
* all Runnables associated with that entry.
*/
- fun delete(entry: HeadsUpEntry?, runnable: Runnable, label: String) {
+ fun delete(entry: HeadsUpEntry?, runnable: Runnable?, label: String) {
+ if (runnable == null) {
+ log { "Runnable is NULL, stop delete." }
+ return
+ }
if (!isEnabled()) {
runnable.run()
return
@@ -182,7 +203,8 @@ constructor(dumpManager: DumpManager,
showNext()
runnable.run()
} else {
- log { "$fn => removing untracked ${getKey(entry)}" }
+ log { "$fn => run runnable for untracked shown ${getKey(entry)}" }
+ runnable.run()
}
logState("after $fn")
}
@@ -337,13 +359,15 @@ constructor(dumpManager: DumpManager,
showNow(headsUpEntryShowing!!, headsUpEntryShowingRunnableList)
}
- fun logDroppedHunsInBackground(numDropped: Int) {
- bgHandler.post(Runnable {
- // Do this in the background to avoid missing frames when closing the shade
- for (n in 1..numDropped) {
- uiEventLogger.log(ThrottleEvent.AVALANCHE_THROTTLING_HUN_DROPPED)
+ private fun logDroppedHunsInBackground(numDropped: Int) {
+ bgHandler.post(
+ Runnable {
+ // Do this in the background to avoid missing frames when closing the shade
+ for (n in 1..numDropped) {
+ uiEventLogger.log(ThrottleEvent.AVALANCHE_THROTTLING_HUN_DROPPED)
+ }
}
- })
+ )
}
fun clearNext() {
@@ -364,7 +388,8 @@ constructor(dumpManager: DumpManager,
"\nPREVIOUS: [$previousHunKey]" +
"\nNEXT LIST: $nextListStr" +
"\nNEXT MAP: $nextMapStr" +
- "\nDROPPED: $dropSetStr"
+ "\nDROPPED: $dropSetStr" +
+ "\nENABLED: $enableAtRuntime"
}
private fun logState(reason: String) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BaseHeadsUpManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BaseHeadsUpManager.java
index 220e729625af..65171358b050 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BaseHeadsUpManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BaseHeadsUpManager.java
@@ -41,6 +41,7 @@ import com.android.systemui.statusbar.notification.collection.NotificationEntry;
import com.android.systemui.statusbar.notification.row.NotificationRowContentBinder.InflationFlag;
import com.android.systemui.statusbar.notification.shared.NotificationThrottleHun;
import com.android.systemui.statusbar.notification.shared.NotificationsHeadsUpRefactor;
+import com.android.systemui.statusbar.phone.ExpandHeadsUpOnInlineReply;
import com.android.systemui.util.ListenerSet;
import com.android.systemui.util.concurrency.DelayableExecutor;
import com.android.systemui.util.settings.GlobalSettings;
@@ -726,6 +727,7 @@ public abstract class BaseHeadsUpManager implements HeadsUpManager {
* of AvalancheController that take it as param.
*/
public class HeadsUpEntry implements Comparable<HeadsUpEntry> {
+ public boolean mRemoteInputActivatedAtLeastOnce;
public boolean mRemoteInputActive;
public boolean mUserActionMayIndirectlyRemove;
@@ -756,7 +758,7 @@ public abstract class BaseHeadsUpManager implements HeadsUpManager {
setEntry(entry, createRemoveRunnable(entry));
}
- private void setEntry(@NonNull final NotificationEntry entry,
+ protected void setEntry(@NonNull final NotificationEntry entry,
@Nullable Runnable removeRunnable) {
mEntry = entry;
mRemoveRunnable = removeRunnable;
@@ -835,6 +837,15 @@ public abstract class BaseHeadsUpManager implements HeadsUpManager {
*/
public boolean isSticky() {
if (mEntry == null) return false;
+
+ if (ExpandHeadsUpOnInlineReply.isEnabled()) {
+ // we don't consider pinned and expanded huns as sticky after the remote input
+ // has been activated for them
+ if (!mRemoteInputActive && mRemoteInputActivatedAtLeastOnce) {
+ return false;
+ }
+ }
+
return (mEntry.isRowPinned() && mExpanded)
|| mRemoteInputActive
|| hasFullScreenIntent(mEntry);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/CastControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/CastControllerImpl.java
index 45cb52a8b1ad..7b82b565fc4d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/CastControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/CastControllerImpl.java
@@ -26,7 +26,6 @@ import android.media.projection.MediaProjectionInfo;
import android.media.projection.MediaProjectionManager;
import android.os.Handler;
import android.util.ArrayMap;
-import android.util.Log;
import androidx.annotation.NonNull;
import androidx.annotation.VisibleForTesting;
@@ -46,11 +45,11 @@ import javax.inject.Inject;
/** Platform implementation of the cast controller. **/
@SysUISingleton
public class CastControllerImpl implements CastController {
- public static final String TAG = "CastController";
- private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
+ private static final String TAG = "CastController";
private final Context mContext;
private final PackageManager mPackageManager;
+ private final CastControllerLogger mLogger;
@GuardedBy("mCallbacks")
private final ArrayList<Callback> mCallbacks = new ArrayList<Callback>();
private final MediaRouter mMediaRouter;
@@ -67,20 +66,22 @@ public class CastControllerImpl implements CastController {
public CastControllerImpl(
Context context,
PackageManager packageManager,
- DumpManager dumpManager) {
+ DumpManager dumpManager,
+ CastControllerLogger logger) {
mContext = context;
mPackageManager = packageManager;
+ mLogger = logger;
mMediaRouter = (MediaRouter) context.getSystemService(Context.MEDIA_ROUTER_SERVICE);
mMediaRouter.setRouterGroupId(MediaRouter.MIRRORING_GROUP_ID);
mProjectionManager = (MediaProjectionManager)
context.getSystemService(Context.MEDIA_PROJECTION_SERVICE);
mProjection = mProjectionManager.getActiveProjectionInfo();
mProjectionManager.addCallback(mProjectionCallback, new Handler());
- dumpManager.registerDumpable(TAG, this);
- if (DEBUG) Log.d(TAG, "new CastController()");
+ dumpManager.registerNormalDumpable(TAG, this);
}
- public void dump(PrintWriter pw, String[] args) {
+ @Override
+ public void dump(PrintWriter pw, @NonNull String[] args) {
pw.println("CastController state:");
pw.print(" mDiscovering="); pw.println(mDiscovering);
pw.print(" mCallbackRegistered="); pw.println(mCallbackRegistered);
@@ -88,7 +89,7 @@ public class CastControllerImpl implements CastController {
pw.print(" mRoutes.size="); pw.println(mRoutes.size());
for (int i = 0; i < mRoutes.size(); i++) {
final RouteInfo route = mRoutes.valueAt(i);
- pw.print(" "); pw.println(routeToString(route));
+ pw.print(" "); pw.println(CastControllerLogger.Companion.toLogString(route));
}
pw.print(" mProjection="); pw.println(mProjection);
}
@@ -119,7 +120,7 @@ public class CastControllerImpl implements CastController {
synchronized (mDiscoveringLock) {
if (mDiscovering == request) return;
mDiscovering = request;
- if (DEBUG) Log.d(TAG, "setDiscovering: " + request);
+ mLogger.logDiscovering(request);
handleDiscoveryChangeLocked();
}
}
@@ -166,7 +167,8 @@ public class CastControllerImpl implements CastController {
CastDevice.Companion.toCastDevice(
mProjection,
mContext,
- mPackageManager));
+ mPackageManager,
+ mLogger));
}
}
@@ -177,22 +179,24 @@ public class CastControllerImpl implements CastController {
public void startCasting(CastDevice device) {
if (device == null || device.getTag() == null) return;
final RouteInfo route = (RouteInfo) device.getTag();
- if (DEBUG) Log.d(TAG, "startCasting: " + routeToString(route));
+ mLogger.logStartCasting(route);
mMediaRouter.selectRoute(ROUTE_TYPE_REMOTE_DISPLAY, route);
}
@Override
public void stopCasting(CastDevice device) {
+ // TODO(b/332662551): Convert Logcat to LogBuffer.
final boolean isProjection = device.getTag() instanceof MediaProjectionInfo;
- if (DEBUG) Log.d(TAG, "stopCasting isProjection=" + isProjection);
+ mLogger.logStopCasting(isProjection);
if (isProjection) {
final MediaProjectionInfo projection = (MediaProjectionInfo) device.getTag();
if (Objects.equals(mProjectionManager.getActiveProjectionInfo(), projection)) {
mProjectionManager.stopActiveProjection();
} else {
- Log.w(TAG, "Projection is no longer active: " + projection);
+ mLogger.logStopCastingNoProjection(projection);
}
} else {
+ mLogger.logStopCastingMediaRouter();
mMediaRouter.getFallbackRoute().select();
}
}
@@ -217,7 +221,7 @@ public class CastControllerImpl implements CastController {
}
}
if (changed) {
- if (DEBUG) Log.d(TAG, "setProjection: " + oldProjection + " -> " + mProjection);
+ mLogger.logSetProjection(oldProjection, mProjection);
fireOnCastDevicesChanged();
}
}
@@ -264,42 +268,30 @@ public class CastControllerImpl implements CastController {
callback.onCastDevicesChanged();
}
- private static String routeToString(RouteInfo route) {
- if (route == null) return null;
- final StringBuilder sb = new StringBuilder().append(route.getName()).append('/')
- .append(route.getDescription()).append('@').append(route.getDeviceAddress())
- .append(",status=").append(route.getStatus());
- if (route.isDefault()) sb.append(",default");
- if (route.isEnabled()) sb.append(",enabled");
- if (route.isConnecting()) sb.append(",connecting");
- if (route.isSelected()) sb.append(",selected");
- return sb.append(",id=").append(route.getTag()).toString();
- }
-
private final MediaRouter.SimpleCallback mMediaCallback = new MediaRouter.SimpleCallback() {
@Override
public void onRouteAdded(MediaRouter router, RouteInfo route) {
- if (DEBUG) Log.d(TAG, "onRouteAdded: " + routeToString(route));
+ mLogger.logRouteAdded(route);
updateRemoteDisplays();
}
@Override
public void onRouteChanged(MediaRouter router, RouteInfo route) {
- if (DEBUG) Log.d(TAG, "onRouteChanged: " + routeToString(route));
+ mLogger.logRouteChanged(route);
updateRemoteDisplays();
}
@Override
public void onRouteRemoved(MediaRouter router, RouteInfo route) {
- if (DEBUG) Log.d(TAG, "onRouteRemoved: " + routeToString(route));
+ mLogger.logRouteRemoved(route);
updateRemoteDisplays();
}
@Override
public void onRouteSelected(MediaRouter router, int type, RouteInfo route) {
- if (DEBUG) Log.d(TAG, "onRouteSelected(" + type + "): " + routeToString(route));
+ mLogger.logRouteSelected(route, type);
updateRemoteDisplays();
}
@Override
public void onRouteUnselected(MediaRouter router, int type, RouteInfo route) {
- if (DEBUG) Log.d(TAG, "onRouteUnselected(" + type + "): " + routeToString(route));
+ mLogger.logRouteUnselected(route, type);
updateRemoteDisplays();
}
};
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/CastControllerLogger.kt b/packages/SystemUI/src/com/android/systemui/statusbar/policy/CastControllerLogger.kt
new file mode 100644
index 000000000000..9a3a244c6157
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/CastControllerLogger.kt
@@ -0,0 +1,141 @@
+/*
+ * 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.policy
+
+import android.media.MediaRouter.RouteInfo
+import android.media.projection.MediaProjectionInfo
+import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.log.LogBuffer
+import com.android.systemui.log.core.LogLevel
+import com.android.systemui.log.core.MessageInitializer
+import com.android.systemui.log.core.MessagePrinter
+import com.android.systemui.statusbar.policy.dagger.CastControllerLog
+import javax.inject.Inject
+
+/** Helper class for logging events to [CastControllerLog] from Java. */
+@SysUISingleton
+class CastControllerLogger
+@Inject
+constructor(
+ @CastControllerLog val logger: LogBuffer,
+) {
+ /** Passthrough to [logger]. */
+ inline fun log(
+ tag: String,
+ level: LogLevel,
+ messageInitializer: MessageInitializer,
+ noinline messagePrinter: MessagePrinter,
+ exception: Throwable? = null,
+ ) {
+ logger.log(tag, level, messageInitializer, messagePrinter, exception)
+ }
+
+ fun logDiscovering(isDiscovering: Boolean) =
+ logger.log(TAG, LogLevel.DEBUG, { bool1 = isDiscovering }, { "setDiscovering: $bool1" })
+
+ fun logStartCasting(route: RouteInfo) =
+ logger.log(TAG, LogLevel.DEBUG, { str1 = route.toLogString() }, { "startCasting: $str1" })
+
+ fun logStopCasting(isProjection: Boolean) =
+ logger.log(
+ TAG,
+ LogLevel.DEBUG,
+ { bool1 = isProjection },
+ { "stopCasting. isProjection=$bool1" },
+ )
+
+ fun logStopCastingNoProjection(projection: MediaProjectionInfo) =
+ logger.log(
+ TAG,
+ LogLevel.WARNING,
+ { str1 = projection.toString() },
+ { "stopCasting failed because projection is no longer active: $str1" },
+ )
+
+ fun logStopCastingMediaRouter() =
+ logger.log(
+ TAG,
+ LogLevel.DEBUG,
+ {},
+ { "stopCasting is selecting fallback route in MediaRouter" },
+ )
+
+ fun logSetProjection(oldInfo: MediaProjectionInfo?, newInfo: MediaProjectionInfo?) =
+ logger.log(
+ TAG,
+ LogLevel.DEBUG,
+ {
+ str1 = oldInfo.toString()
+ str2 = newInfo.toString()
+ },
+ { "setProjection: $str1 -> $str2" },
+ )
+
+ fun logRouteAdded(route: RouteInfo) =
+ logger.log(TAG, LogLevel.DEBUG, { str1 = route.toLogString() }, { "onRouteAdded: $str1" })
+
+ fun logRouteChanged(route: RouteInfo) =
+ logger.log(TAG, LogLevel.DEBUG, { str1 = route.toLogString() }, { "onRouteChanged: $str1" })
+
+ fun logRouteRemoved(route: RouteInfo) =
+ logger.log(TAG, LogLevel.DEBUG, { str1 = route.toLogString() }, { "onRouteRemoved: $str1" })
+
+ fun logRouteSelected(route: RouteInfo, type: Int) =
+ logger.log(
+ TAG,
+ LogLevel.DEBUG,
+ {
+ str1 = route.toLogString()
+ int1 = type
+ },
+ { "onRouteSelected($int1): $str1" },
+ )
+
+ fun logRouteUnselected(route: RouteInfo, type: Int) =
+ logger.log(
+ TAG,
+ LogLevel.DEBUG,
+ {
+ str1 = route.toLogString()
+ int1 = type
+ },
+ { "onRouteUnselected($int1): $str1" },
+ )
+
+ companion object {
+ @JvmStatic
+ fun RouteInfo?.toLogString(): String? {
+ if (this == null) return null
+ val sb =
+ StringBuilder()
+ .append(name)
+ .append('/')
+ .append(description)
+ .append('@')
+ .append(deviceAddress)
+ .append(",status=")
+ .append(status)
+ if (isDefault) sb.append(",default")
+ if (isEnabled) sb.append(",enabled")
+ if (isConnecting) sb.append(",connecting")
+ if (isSelected) sb.append(",selected")
+ return sb.append(",id=").append(this.tag).toString()
+ }
+
+ private const val TAG = "CastController"
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/CastDevice.kt b/packages/SystemUI/src/com/android/systemui/statusbar/policy/CastDevice.kt
index 5fc160bd5da3..a787f7e09f0d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/CastDevice.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/CastDevice.kt
@@ -20,7 +20,7 @@ import android.content.pm.PackageManager
import android.media.MediaRouter
import android.media.projection.MediaProjectionInfo
import android.text.TextUtils
-import android.util.Log
+import com.android.systemui.log.core.LogLevel
import com.android.systemui.res.R
import com.android.systemui.util.Utils
@@ -38,6 +38,9 @@ data class CastDevice(
) {
val isCasting = state == CastState.Connecting || state == CastState.Connected
+ val shortLogString: String =
+ "CastDevice(id=$id name=$name description=$description state=$state origin=$origin)"
+
companion object {
/** Creates a [CastDevice] based on the provided information from MediaRouter. */
fun MediaRouter.RouteInfo.toCastDevice(context: Context): CastDevice {
@@ -61,11 +64,12 @@ data class CastDevice(
/** Creates a [CastDevice] based on the provided information from MediaProjection. */
fun MediaProjectionInfo.toCastDevice(
context: Context,
- packageManager: PackageManager
+ packageManager: PackageManager,
+ logger: CastControllerLogger,
): CastDevice {
return CastDevice(
id = this.packageName,
- name = getAppName(this.packageName, packageManager),
+ name = getAppName(this.packageName, packageManager, logger),
description = context.getString(R.string.quick_settings_casting),
state = CastState.Connected,
tag = this,
@@ -73,7 +77,11 @@ data class CastDevice(
)
}
- private fun getAppName(packageName: String, packageManager: PackageManager): String {
+ private fun getAppName(
+ packageName: String,
+ packageManager: PackageManager,
+ logger: CastControllerLogger,
+ ): String {
if (Utils.isHeadlessRemoteDisplayProvider(packageManager, packageName)) {
return ""
}
@@ -83,9 +91,20 @@ data class CastDevice(
if (!TextUtils.isEmpty(label)) {
return label.toString()
}
- Log.w(CastControllerImpl.TAG, "No label found for package: $packageName")
+ logger.log(
+ "#getAppName",
+ LogLevel.WARNING,
+ { str1 = packageName },
+ { "No label found for package: $str1" },
+ )
} catch (e: PackageManager.NameNotFoundException) {
- Log.w(CastControllerImpl.TAG, "Error getting appName for package: $packageName", e)
+ logger.log(
+ "#getAppName",
+ LogLevel.WARNING,
+ { str1 = packageName },
+ { "Error getting appName for package=$str1" },
+ e,
+ )
}
return packageName
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/PolicyModule.kt b/packages/SystemUI/src/com/android/systemui/statusbar/policy/PolicyModule.kt
index 2ce2bc83aa25..cf9a78f1c11c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/PolicyModule.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/PolicyModule.kt
@@ -29,6 +29,7 @@ import com.android.systemui.qs.tiles.DndTile
import com.android.systemui.qs.tiles.FlashlightTile
import com.android.systemui.qs.tiles.LocationTile
import com.android.systemui.qs.tiles.MicrophoneToggleTile
+import com.android.systemui.qs.tiles.ModesTile
import com.android.systemui.qs.tiles.UiModeNightTile
import com.android.systemui.qs.tiles.WorkModeTile
import com.android.systemui.qs.tiles.base.interactor.QSTileAvailabilityInteractor
@@ -45,6 +46,10 @@ import com.android.systemui.qs.tiles.impl.location.domain.LocationTileMapper
import com.android.systemui.qs.tiles.impl.location.domain.interactor.LocationTileDataInteractor
import com.android.systemui.qs.tiles.impl.location.domain.interactor.LocationTileUserActionInteractor
import com.android.systemui.qs.tiles.impl.location.domain.model.LocationTileModel
+import com.android.systemui.qs.tiles.impl.modes.domain.interactor.ModesTileDataInteractor
+import com.android.systemui.qs.tiles.impl.modes.domain.interactor.ModesTileUserActionInteractor
+import com.android.systemui.qs.tiles.impl.modes.domain.model.ModesTileModel
+import com.android.systemui.qs.tiles.impl.modes.ui.ModesTileMapper
import com.android.systemui.qs.tiles.impl.sensorprivacy.SensorPrivacyToggleTileDataInteractor
import com.android.systemui.qs.tiles.impl.sensorprivacy.domain.SensorPrivacyToggleTileUserActionInteractor
import com.android.systemui.qs.tiles.impl.sensorprivacy.domain.model.SensorPrivacyToggleTileModel
@@ -75,6 +80,12 @@ interface PolicyModule {
/** Inject DndTile into tileMap in QSModule */
@Binds @IntoMap @StringKey(DndTile.TILE_SPEC) fun bindDndTile(dndTile: DndTile): QSTileImpl<*>
+ /** Inject ModesTile into tileMap in QSModule */
+ @Binds
+ @IntoMap
+ @StringKey(ModesTile.TILE_SPEC)
+ fun bindModesTile(modesTile: ModesTile): QSTileImpl<*>
+
/** Inject WorkModeTile into tileMap in QSModule */
@Binds
@IntoMap
@@ -85,35 +96,35 @@ interface PolicyModule {
@IntoMap
@StringKey(FLASHLIGHT_TILE_SPEC)
fun provideAirplaneModeAvailabilityInteractor(
- impl: FlashlightTileDataInteractor
+ impl: FlashlightTileDataInteractor
): QSTileAvailabilityInteractor
@Binds
@IntoMap
@StringKey(LOCATION_TILE_SPEC)
fun provideLocationAvailabilityInteractor(
- impl: LocationTileDataInteractor
+ impl: LocationTileDataInteractor
): QSTileAvailabilityInteractor
@Binds
@IntoMap
@StringKey(ALARM_TILE_SPEC)
fun provideAlarmAvailabilityInteractor(
- impl: AlarmTileDataInteractor
+ impl: AlarmTileDataInteractor
): QSTileAvailabilityInteractor
@Binds
@IntoMap
@StringKey(UIMODENIGHT_TILE_SPEC)
fun provideUiModeNightAvailabilityInteractor(
- impl: UiModeNightTileDataInteractor
+ impl: UiModeNightTileDataInteractor
): QSTileAvailabilityInteractor
@Binds
@IntoMap
@StringKey(WORK_MODE_TILE_SPEC)
fun provideWorkModeAvailabilityInteractor(
- impl: WorkModeTileDataInteractor
+ impl: WorkModeTileDataInteractor
): QSTileAvailabilityInteractor
companion object {
@@ -125,6 +136,7 @@ interface PolicyModule {
const val CAMERA_TOGGLE_TILE_SPEC = "cameratoggle"
const val MIC_TOGGLE_TILE_SPEC = "mictoggle"
const val DND_TILE_SPEC = "dnd"
+ const val MODES_TILE_SPEC = "modes"
/** Inject flashlight config */
@Provides
@@ -327,7 +339,7 @@ interface PolicyModule {
@IntoMap
@StringKey(CAMERA_TOGGLE_TILE_SPEC)
fun provideCameraToggleAvailabilityInteractor(
- factory: SensorPrivacyToggleTileDataInteractor.Factory
+ factory: SensorPrivacyToggleTileDataInteractor.Factory
): QSTileAvailabilityInteractor {
return factory.create(CAMERA)
}
@@ -369,12 +381,11 @@ interface PolicyModule {
@IntoMap
@StringKey(MIC_TOGGLE_TILE_SPEC)
fun provideMicToggleModeAvailabilityInteractor(
- factory: SensorPrivacyToggleTileDataInteractor.Factory
+ factory: SensorPrivacyToggleTileDataInteractor.Factory
): QSTileAvailabilityInteractor {
return factory.create(MICROPHONE)
}
-
/** Inject microphone toggle config */
@Provides
@IntoMap
@@ -389,6 +400,37 @@ interface PolicyModule {
),
instanceId = uiEventLogger.getNewInstanceId(),
)
+
+ @Provides
+ @IntoMap
+ @StringKey(MODES_TILE_SPEC)
+ fun provideModesTileConfig(uiEventLogger: QsEventLogger): QSTileConfig =
+ QSTileConfig(
+ tileSpec = TileSpec.create(MODES_TILE_SPEC),
+ uiConfig =
+ QSTileUIConfig.Resource(
+ iconRes = R.drawable.qs_dnd_icon_off,
+ labelRes = R.string.quick_settings_modes_label,
+ ),
+ instanceId = uiEventLogger.getNewInstanceId(),
+ )
+
+ /** Inject ModesTile into tileViewModelMap in QSModule */
+ @Provides
+ @IntoMap
+ @StringKey(MODES_TILE_SPEC)
+ fun provideModesTileViewModel(
+ factory: QSTileViewModelFactory.Static<ModesTileModel>,
+ mapper: ModesTileMapper,
+ stateInteractor: ModesTileDataInteractor,
+ userActionInteractor: ModesTileUserActionInteractor
+ ): QSTileViewModel =
+ factory.create(
+ TileSpec.create(MODES_TILE_SPEC),
+ userActionInteractor,
+ stateInteractor,
+ mapper,
+ )
}
/** Inject FlashlightTile into tileMap in QSModule */
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/SplitShadeStateController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/policy/SplitShadeStateController.kt
index d120a1bd3840..72d093c65a91 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/SplitShadeStateController.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/SplitShadeStateController.kt
@@ -22,10 +22,10 @@ interface SplitShadeStateController {
/** Returns true if the device should use the split notification shade. */
@Deprecated(
- message = "This is deprecated, please use ShadeInteractor#isSplitShade instead",
+ message = "This is deprecated, please use ShadeInteractor#shadeMode instead",
replaceWith =
ReplaceWith(
- "shadeInteractor.isSplitShade",
+ "shadeInteractor.shadeMode",
"com.android.systemui.shade.domain.interactor.ShadeInteractor",
),
)
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/dagger/CastControllerLog.kt b/packages/SystemUI/src/com/android/systemui/statusbar/policy/dagger/CastControllerLog.kt
new file mode 100644
index 000000000000..23aade6e6c17
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/dagger/CastControllerLog.kt
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar.policy.dagger
+
+import javax.inject.Qualifier
+
+/**
+ * Logs for cast events. See [com.android.systemui.statusbar.policy.CastControllerImpl] and
+ * [com.android.systemui.statusbar.policy.CastControllerLogger].
+ */
+@Qualifier
+@MustBeDocumented
+@Retention(AnnotationRetention.RUNTIME)
+annotation class CastControllerLog
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/dagger/StatusBarPolicyModule.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/dagger/StatusBarPolicyModule.java
index e08e4d70a18e..71bcdfcba049 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/dagger/StatusBarPolicyModule.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/dagger/StatusBarPolicyModule.java
@@ -228,4 +228,12 @@ public interface StatusBarPolicyModule {
static LogBuffer provideBatteryControllerLog(LogBufferFactory factory) {
return factory.create(BatteryControllerLogger.TAG, 30);
}
+
+ /** Provides a log buffer for CastControllerImpl */
+ @Provides
+ @SysUISingleton
+ @CastControllerLog
+ static LogBuffer provideCastControllerLog(LogBufferFactory factory) {
+ return factory.create("CastControllerLog", 50);
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/data/repository/DeviceProvisioningRepository.kt b/packages/SystemUI/src/com/android/systemui/statusbar/policy/data/repository/DeviceProvisioningRepository.kt
index 483855409b91..07bbca74e12e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/data/repository/DeviceProvisioningRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/data/repository/DeviceProvisioningRepository.kt
@@ -31,6 +31,13 @@ interface DeviceProvisioningRepository {
* @see android.provider.Settings.Global.DEVICE_PROVISIONED
*/
val isDeviceProvisioned: Flow<Boolean>
+
+ /**
+ * Whether this device has been provisioned.
+ *
+ * @see android.provider.Settings.Global.DEVICE_PROVISIONED
+ */
+ fun isDeviceProvisioned(): Boolean
}
@Module
@@ -48,11 +55,15 @@ constructor(
val listener =
object : DeviceProvisionedController.DeviceProvisionedListener {
override fun onDeviceProvisionedChanged() {
- trySend(deviceProvisionedController.isDeviceProvisioned)
+ trySend(isDeviceProvisioned())
}
}
deviceProvisionedController.addCallback(listener)
- trySend(deviceProvisionedController.isDeviceProvisioned)
+ trySend(isDeviceProvisioned())
awaitClose { deviceProvisionedController.removeCallback(listener) }
}
+
+ override fun isDeviceProvisioned(): Boolean {
+ return deviceProvisionedController.isDeviceProvisioned
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/domain/interactor/DeviceProvisioningInteractor.kt b/packages/SystemUI/src/com/android/systemui/statusbar/policy/domain/interactor/DeviceProvisioningInteractor.kt
index 66ed092fcce1..ace4ce0673a4 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/domain/interactor/DeviceProvisioningInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/domain/interactor/DeviceProvisioningInteractor.kt
@@ -26,7 +26,7 @@ import kotlinx.coroutines.flow.Flow
class DeviceProvisioningInteractor
@Inject
constructor(
- repository: DeviceProvisioningRepository,
+ private val repository: DeviceProvisioningRepository,
) {
/**
* Whether this device has been provisioned.
@@ -34,4 +34,8 @@ constructor(
* @see android.provider.Settings.Global.DEVICE_PROVISIONED
*/
val isDeviceProvisioned: Flow<Boolean> = repository.isDeviceProvisioned
+
+ fun isDeviceProvisioned(): Boolean {
+ return repository.isDeviceProvisioned()
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/domain/interactor/ZenModeInteractor.kt b/packages/SystemUI/src/com/android/systemui/statusbar/policy/domain/interactor/ZenModeInteractor.kt
index e4d06681d439..7a521a6ba28f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/domain/interactor/ZenModeInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/domain/interactor/ZenModeInteractor.kt
@@ -16,8 +16,14 @@
package com.android.systemui.statusbar.policy.domain.interactor
+import android.content.Context
import android.provider.Settings
+import androidx.concurrent.futures.await
import com.android.settingslib.notification.data.repository.ZenModeRepository
+import com.android.settingslib.notification.modes.ZenIconLoader
+import com.android.settingslib.notification.modes.ZenMode
+import com.android.systemui.common.shared.model.Icon
+import java.time.Duration
import javax.inject.Inject
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.combine
@@ -28,7 +34,9 @@ import kotlinx.coroutines.flow.map
* An interactor that performs business logic related to the status and configuration of Zen Mode
* (or Do Not Disturb/DND Mode).
*/
-class ZenModeInteractor @Inject constructor(repository: ZenModeRepository) {
+class ZenModeInteractor @Inject constructor(private val repository: ZenModeRepository) {
+ private val iconLoader: ZenIconLoader = ZenIconLoader.getInstance()
+
val isZenModeEnabled: Flow<Boolean> =
repository.globalZenMode
.map {
@@ -52,4 +60,18 @@ class ZenModeInteractor @Inject constructor(repository: ZenModeRepository) {
}
}
.distinctUntilChanged()
+
+ val modes: Flow<List<ZenMode>> = repository.modes
+
+ suspend fun getModeIcon(mode: ZenMode, context: Context): Icon {
+ return Icon.Loaded(mode.getIcon(context, iconLoader).await(), contentDescription = null)
+ }
+
+ fun activateMode(zenMode: ZenMode, duration: Duration? = null) {
+ repository.activateMode(zenMode, duration)
+ }
+
+ fun deactivateMode(zenMode: ZenMode) {
+ repository.deactivateMode(zenMode)
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/ui/dialog/ModesDialogDelegate.kt b/packages/SystemUI/src/com/android/systemui/statusbar/policy/ui/dialog/ModesDialogDelegate.kt
new file mode 100644
index 000000000000..2b094d6b4922
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/ui/dialog/ModesDialogDelegate.kt
@@ -0,0 +1,84 @@
+/*
+ * 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.policy.ui.dialog
+
+import android.content.Intent
+import android.provider.Settings
+import androidx.compose.material3.Text
+import androidx.compose.ui.res.stringResource
+import com.android.compose.PlatformButton
+import com.android.compose.PlatformOutlinedButton
+import com.android.systemui.animation.DialogTransitionAnimator
+import com.android.systemui.dialog.ui.composable.AlertDialogContent
+import com.android.systemui.plugins.ActivityStarter
+import com.android.systemui.res.R
+import com.android.systemui.statusbar.phone.SystemUIDialog
+import com.android.systemui.statusbar.phone.SystemUIDialogFactory
+import com.android.systemui.statusbar.phone.create
+import com.android.systemui.statusbar.policy.ui.dialog.composable.ModeTileGrid
+import com.android.systemui.statusbar.policy.ui.dialog.viewmodel.ModesDialogViewModel
+import javax.inject.Inject
+
+class ModesDialogDelegate
+@Inject
+constructor(
+ private val sysuiDialogFactory: SystemUIDialogFactory,
+ private val dialogTransitionAnimator: DialogTransitionAnimator,
+ private val activityStarter: ActivityStarter,
+ private val viewModel: ModesDialogViewModel,
+) : SystemUIDialog.Delegate {
+ override fun createDialog(): SystemUIDialog {
+ return sysuiDialogFactory.create { dialog ->
+ AlertDialogContent(
+ title = { Text(stringResource(R.string.zen_modes_dialog_title)) },
+ content = { ModeTileGrid(viewModel) },
+ neutralButton = {
+ PlatformOutlinedButton(
+ onClick = {
+ val animationController =
+ dialogTransitionAnimator.createActivityTransitionController(
+ dialog.getButton(SystemUIDialog.BUTTON_NEUTRAL)
+ )
+ if (animationController == null) {
+ // The controller will take care of dismissing for us after the
+ // animation, but let's make sure we dismiss the dialog if we don't
+ // animate it.
+ dialog.dismiss()
+ }
+ activityStarter.startActivity(
+ ZEN_MODE_SETTINGS_INTENT,
+ true /* dismissShade */,
+ animationController
+ )
+ }
+ ) {
+ Text(stringResource(R.string.zen_modes_dialog_settings))
+ }
+ },
+ positiveButton = {
+ PlatformButton(onClick = { dialog.dismiss() }) {
+ Text(stringResource(R.string.zen_modes_dialog_done))
+ }
+ },
+ )
+ }
+ }
+
+ companion object {
+ private val ZEN_MODE_SETTINGS_INTENT = Intent(Settings.ACTION_ZEN_MODE_SETTINGS)
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/ui/dialog/composable/ModeTile.kt b/packages/SystemUI/src/com/android/systemui/statusbar/policy/ui/dialog/composable/ModeTile.kt
new file mode 100644
index 000000000000..91bfdff1095e
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/ui/dialog/composable/ModeTile.kt
@@ -0,0 +1,91 @@
+/*
+ * 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.policy.ui.dialog.composable
+
+import androidx.compose.foundation.basicMarquee
+import androidx.compose.foundation.combinedClickable
+import androidx.compose.foundation.layout.Arrangement
+import androidx.compose.foundation.layout.Column
+import androidx.compose.foundation.layout.Row
+import androidx.compose.foundation.layout.padding
+import androidx.compose.foundation.layout.size
+import androidx.compose.foundation.shape.RoundedCornerShape
+import androidx.compose.material3.LocalContentColor
+import androidx.compose.material3.MaterialTheme
+import androidx.compose.material3.Surface
+import androidx.compose.material3.Text
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.CompositionLocalProvider
+import androidx.compose.ui.Alignment
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.text.font.FontWeight
+import androidx.compose.ui.unit.dp
+import com.android.systemui.common.ui.compose.Icon
+import com.android.systemui.statusbar.policy.ui.dialog.viewmodel.ModeTileViewModel
+
+@Composable
+fun ModeTile(viewModel: ModeTileViewModel) {
+ val tileColor =
+ if (viewModel.enabled) MaterialTheme.colorScheme.primary
+ else MaterialTheme.colorScheme.surfaceVariant
+ val contentColor =
+ if (viewModel.enabled) MaterialTheme.colorScheme.onPrimary
+ else MaterialTheme.colorScheme.onSurfaceVariant
+
+ CompositionLocalProvider(LocalContentColor provides contentColor) {
+ Surface(
+ color = tileColor,
+ shape = RoundedCornerShape(16.dp),
+ modifier =
+ Modifier.combinedClickable(
+ onClick = viewModel.onClick,
+ onLongClick = viewModel.onLongClick
+ ),
+ ) {
+ Row(
+ modifier = Modifier.padding(20.dp),
+ verticalAlignment = Alignment.CenterVertically,
+ horizontalArrangement =
+ Arrangement.spacedBy(
+ space = 10.dp,
+ alignment = Alignment.Start,
+ ),
+ ) {
+ Icon(icon = viewModel.icon, modifier = Modifier.size(24.dp))
+ Column {
+ Text(
+ viewModel.text,
+ fontWeight = FontWeight.W500,
+ modifier = Modifier.tileMarquee()
+ )
+ Text(
+ viewModel.subtext,
+ fontWeight = FontWeight.W400,
+ modifier = Modifier.tileMarquee()
+ )
+ }
+ }
+ }
+ }
+}
+
+private fun Modifier.tileMarquee(): Modifier {
+ return this.basicMarquee(
+ iterations = 1,
+ initialDelayMillis = 200,
+ )
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/ui/dialog/composable/ModeTileGrid.kt b/packages/SystemUI/src/com/android/systemui/statusbar/policy/ui/dialog/composable/ModeTileGrid.kt
new file mode 100644
index 000000000000..73d361f69eac
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/ui/dialog/composable/ModeTileGrid.kt
@@ -0,0 +1,50 @@
+/*
+ * 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.policy.ui.dialog.composable
+
+import androidx.compose.foundation.layout.Arrangement
+import androidx.compose.foundation.layout.fillMaxWidth
+import androidx.compose.foundation.layout.heightIn
+import androidx.compose.foundation.layout.padding
+import androidx.compose.foundation.lazy.grid.GridCells
+import androidx.compose.foundation.lazy.grid.LazyVerticalGrid
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.getValue
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.unit.dp
+import androidx.lifecycle.compose.collectAsStateWithLifecycle
+import com.android.systemui.statusbar.policy.ui.dialog.viewmodel.ModesDialogViewModel
+
+@Composable
+fun ModeTileGrid(viewModel: ModesDialogViewModel) {
+ val tiles by viewModel.tiles.collectAsStateWithLifecycle(initialValue = emptyList())
+
+ // TODO(b/346519570): Handle what happens when we have more than a few modes.
+ LazyVerticalGrid(
+ columns = GridCells.Fixed(2),
+ modifier = Modifier.padding(8.dp).fillMaxWidth().heightIn(max = 300.dp),
+ verticalArrangement = Arrangement.spacedBy(8.dp),
+ horizontalArrangement = Arrangement.spacedBy(8.dp),
+ ) {
+ items(
+ tiles.size,
+ key = { index -> tiles[index].id },
+ ) { index ->
+ ModeTile(viewModel = tiles[index])
+ }
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/ui/dialog/viewmodel/ModeTileViewModel.kt b/packages/SystemUI/src/com/android/systemui/statusbar/policy/ui/dialog/viewmodel/ModeTileViewModel.kt
new file mode 100644
index 000000000000..5bd26ccc965f
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/ui/dialog/viewmodel/ModeTileViewModel.kt
@@ -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 com.android.systemui.statusbar.policy.ui.dialog.viewmodel
+
+import com.android.systemui.common.shared.model.Icon
+
+/**
+ * Viewmodel for a tile representing a single priority ("zen") mode, for use within the modes
+ * dialog. Not to be confused with ModesTile, which is the Quick Settings tile that opens the
+ * dialog.
+ */
+data class ModeTileViewModel(
+ val id: String,
+ val icon: Icon,
+ val text: String,
+ val subtext: String,
+ val enabled: Boolean,
+ val contentDescription: String,
+ val onClick: () -> Unit,
+ val onLongClick: () -> Unit,
+)
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/ui/dialog/viewmodel/ModesDialogViewModel.kt b/packages/SystemUI/src/com/android/systemui/statusbar/policy/ui/dialog/viewmodel/ModesDialogViewModel.kt
new file mode 100644
index 000000000000..e84c8b61ff54
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/ui/dialog/viewmodel/ModesDialogViewModel.kt
@@ -0,0 +1,87 @@
+/*
+ * 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.policy.ui.dialog.viewmodel
+
+import android.content.Context
+import com.android.settingslib.notification.modes.ZenMode
+import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.dagger.qualifiers.Background
+import com.android.systemui.res.R
+import com.android.systemui.statusbar.policy.domain.interactor.ZenModeInteractor
+import javax.inject.Inject
+import kotlinx.coroutines.CoroutineDispatcher
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.flowOn
+import kotlinx.coroutines.flow.map
+
+/**
+ * Viewmodel for the priority ("zen") modes dialog that can be opened from quick settings. It allows
+ * the user to quickly toggle modes.
+ */
+@SysUISingleton
+class ModesDialogViewModel
+@Inject
+constructor(
+ val context: Context,
+ zenModeInteractor: ZenModeInteractor,
+ @Background val bgDispatcher: CoroutineDispatcher,
+) {
+ // Modes that should be displayed in the dialog
+ // TODO(b/346519570): Include modes that have not been set up yet.
+ private val visibleModes: Flow<List<ZenMode>> =
+ zenModeInteractor.modes.map {
+ it.filter { mode ->
+ mode.rule.isEnabled && (mode.isActive || mode.rule.isManualInvocationAllowed)
+ }
+ }
+
+ val tiles: Flow<List<ModeTileViewModel>> =
+ visibleModes
+ .map { modesList ->
+ modesList.map { mode ->
+ ModeTileViewModel(
+ id = mode.id,
+ icon = zenModeInteractor.getModeIcon(mode, context),
+ text = mode.rule.name,
+ subtext = getTileSubtext(mode),
+ enabled = mode.isActive,
+ // TODO(b/346519570): This should be some combination of the above, e.g.
+ // "ON: Do Not Disturb, Until Mon 08:09"; see DndTile.
+ contentDescription = "",
+ onClick = {
+ if (mode.isActive) {
+ zenModeInteractor.deactivateMode(mode)
+ } else {
+ // TODO(b/346519570): Handle duration for DND mode.
+ zenModeInteractor.activateMode(mode)
+ }
+ },
+ onLongClick = {
+ // TODO(b/346519570): Open settings page for mode.
+ }
+ )
+ }
+ }
+ .flowOn(bgDispatcher)
+
+ private fun getTileSubtext(mode: ZenMode): String {
+ // TODO(b/346519570): Use ZenModeConfig.getDescription for manual DND
+ val on = context.resources.getString(R.string.zen_mode_on)
+ val off = context.resources.getString(R.string.zen_mode_off)
+ return mode.rule.triggerDescription ?: if (mode.isActive) on else off
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/touchpad/tutorial/ui/view/BackGestureTutorialScreen.kt b/packages/SystemUI/src/com/android/systemui/touchpad/tutorial/ui/composable/BackGestureTutorialScreen.kt
index 04a47985dc29..396c6b82639e 100644
--- a/packages/SystemUI/src/com/android/systemui/touchpad/tutorial/ui/view/BackGestureTutorialScreen.kt
+++ b/packages/SystemUI/src/com/android/systemui/touchpad/tutorial/ui/composable/BackGestureTutorialScreen.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.systemui.touchpad.tutorial.ui.view
+package com.android.systemui.touchpad.tutorial.ui.composable
import androidx.activity.compose.BackHandler
import androidx.annotation.StringRes
diff --git a/packages/SystemUI/src/com/android/systemui/touchpad/tutorial/ui/view/TutorialComponents.kt b/packages/SystemUI/src/com/android/systemui/touchpad/tutorial/ui/composable/TutorialComponents.kt
index 16fa91d59ea5..f2276c8be71d 100644
--- a/packages/SystemUI/src/com/android/systemui/touchpad/tutorial/ui/view/TutorialComponents.kt
+++ b/packages/SystemUI/src/com/android/systemui/touchpad/tutorial/ui/composable/TutorialComponents.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.systemui.touchpad.tutorial.ui.view
+package com.android.systemui.touchpad.tutorial.ui.composable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Row
diff --git a/packages/SystemUI/src/com/android/systemui/touchpad/tutorial/ui/view/TutorialSelectionScreen.kt b/packages/SystemUI/src/com/android/systemui/touchpad/tutorial/ui/composable/TutorialSelectionScreen.kt
index 877bbe18fc43..14355fa18335 100644
--- a/packages/SystemUI/src/com/android/systemui/touchpad/tutorial/ui/view/TutorialSelectionScreen.kt
+++ b/packages/SystemUI/src/com/android/systemui/touchpad/tutorial/ui/composable/TutorialSelectionScreen.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.systemui.touchpad.tutorial.ui.view
+package com.android.systemui.touchpad.tutorial.ui.composable
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
diff --git a/packages/SystemUI/src/com/android/systemui/touchpad/tutorial/ui/view/TouchpadTutorialActivity.kt b/packages/SystemUI/src/com/android/systemui/touchpad/tutorial/ui/view/TouchpadTutorialActivity.kt
index 93c26583e11e..088a8fd95e60 100644
--- a/packages/SystemUI/src/com/android/systemui/touchpad/tutorial/ui/view/TouchpadTutorialActivity.kt
+++ b/packages/SystemUI/src/com/android/systemui/touchpad/tutorial/ui/view/TouchpadTutorialActivity.kt
@@ -27,10 +27,12 @@ import androidx.compose.runtime.getValue
import androidx.lifecycle.Lifecycle.State.STARTED
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.android.compose.theme.PlatformTheme
-import com.android.systemui.touchpad.tutorial.ui.Screen.BACK_GESTURE
-import com.android.systemui.touchpad.tutorial.ui.Screen.HOME_GESTURE
-import com.android.systemui.touchpad.tutorial.ui.Screen.TUTORIAL_SELECTION
-import com.android.systemui.touchpad.tutorial.ui.TouchpadTutorialViewModel
+import com.android.systemui.touchpad.tutorial.ui.composable.BackGestureTutorialScreen
+import com.android.systemui.touchpad.tutorial.ui.composable.TutorialSelectionScreen
+import com.android.systemui.touchpad.tutorial.ui.viewmodel.Screen.BACK_GESTURE
+import com.android.systemui.touchpad.tutorial.ui.viewmodel.Screen.HOME_GESTURE
+import com.android.systemui.touchpad.tutorial.ui.viewmodel.Screen.TUTORIAL_SELECTION
+import com.android.systemui.touchpad.tutorial.ui.viewmodel.TouchpadTutorialViewModel
import javax.inject.Inject
class TouchpadTutorialActivity
diff --git a/packages/SystemUI/src/com/android/systemui/touchpad/tutorial/ui/TouchpadTutorialViewModel.kt b/packages/SystemUI/src/com/android/systemui/touchpad/tutorial/ui/viewmodel/TouchpadTutorialViewModel.kt
index 9e6553a4b234..11984af0281a 100644
--- a/packages/SystemUI/src/com/android/systemui/touchpad/tutorial/ui/TouchpadTutorialViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/touchpad/tutorial/ui/viewmodel/TouchpadTutorialViewModel.kt
@@ -14,14 +14,14 @@
* limitations under the License.
*/
-package com.android.systemui.touchpad.tutorial.ui
+package com.android.systemui.touchpad.tutorial.ui.viewmodel
import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProvider
import com.android.systemui.touchpad.tutorial.domain.interactor.TouchpadGesturesInteractor
+import javax.inject.Inject
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
-import javax.inject.Inject
class TouchpadTutorialViewModel(private val gesturesInteractor: TouchpadGesturesInteractor) :
ViewModel() {
diff --git a/packages/SystemUI/src/com/android/systemui/tuner/TunablePadding.java b/packages/SystemUI/src/com/android/systemui/tuner/TunablePadding.java
deleted file mode 100644
index d54c07c87b40..000000000000
--- a/packages/SystemUI/src/com/android/systemui/tuner/TunablePadding.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the
- * License is distributed on an "AS IS" BASIS, WITHOUT 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.tuner;
-
-import android.util.DisplayMetrics;
-import android.view.View;
-import android.view.WindowManager;
-
-import com.android.systemui.Dependency;
-import com.android.systemui.dagger.SysUISingleton;
-import com.android.systemui.tuner.TunerService.Tunable;
-
-import javax.inject.Inject;
-
-/**
- * Version of Space that can be resized by a tunable setting.
- */
-public class TunablePadding implements Tunable {
-
- public static final int FLAG_START = 1;
- public static final int FLAG_END = 2;
- public static final int FLAG_TOP = 4;
- public static final int FLAG_BOTTOM = 8;
-
- private final int mFlags;
- private final View mView;
- private final int mDefaultSize;
- private final float mDensity;
- private final TunerService mTunerService;
-
- private TunablePadding(String key, int def, int flags, View view, TunerService tunerService) {
- mDefaultSize = def;
- mFlags = flags;
- mView = view;
- DisplayMetrics metrics = new DisplayMetrics();
- view.getContext().getSystemService(WindowManager.class)
- .getDefaultDisplay().getMetrics(metrics);
- mDensity = metrics.density;
- mTunerService = tunerService;
- mTunerService.addTunable(this, key);
- }
-
- @Override
- public void onTuningChanged(String key, String newValue) {
- int dimen = mDefaultSize;
- if (newValue != null) {
- try {
- dimen = (int) (Integer.parseInt(newValue) * mDensity);
- } catch (NumberFormatException ex) {}
- }
- int left = mView.isLayoutRtl() ? FLAG_END : FLAG_START;
- int right = mView.isLayoutRtl() ? FLAG_START : FLAG_END;
- mView.setPadding(getPadding(dimen, left), getPadding(dimen, FLAG_TOP),
- getPadding(dimen, right), getPadding(dimen, FLAG_BOTTOM));
- }
-
- private int getPadding(int dimen, int flag) {
- return ((mFlags & flag) != 0) ? dimen : 0;
- }
-
- public void destroy() {
- mTunerService.removeTunable(this);
- }
-
- /**
- * Exists for easy injecting in tests.
- */
- @SysUISingleton
- public static class TunablePaddingService {
-
- private final TunerService mTunerService;
-
- /**
- */
- @Inject
- public TunablePaddingService(TunerService tunerService) {
- mTunerService = tunerService;
- }
-
- public TunablePadding add(View view, String key, int defaultSize, int flags) {
- if (view == null) {
- throw new IllegalArgumentException();
- }
- return new TunablePadding(key, defaultSize, flags, view, mTunerService);
- }
- }
-
- public static TunablePadding addTunablePadding(View view, String key, int defaultSize,
- int flags) {
- return Dependency.get(TunablePaddingService.class).add(view, key, defaultSize, flags);
- }
-}
diff --git a/packages/SystemUI/src/com/android/systemui/util/ConvenienceExtensions.kt b/packages/SystemUI/src/com/android/systemui/util/ConvenienceExtensions.kt
index ec7aabb58b49..f2132248e4f7 100644
--- a/packages/SystemUI/src/com/android/systemui/util/ConvenienceExtensions.kt
+++ b/packages/SystemUI/src/com/android/systemui/util/ConvenienceExtensions.kt
@@ -20,6 +20,7 @@ import android.graphics.Rect
import android.util.IndentingPrintWriter
import android.view.View
import android.view.ViewGroup
+import dagger.Lazy
import java.io.PrintWriter
/** [Sequence] that yields all of the direct children of this [ViewGroup] */
@@ -56,3 +57,8 @@ val View.boundsOnScreen: Rect
getBoundsOnScreen(bounds)
return bounds
}
+
+/** Extension method to convert [dagger.Lazy] to [kotlin.Lazy] for object of any class [T]. */
+fun <T> Lazy<T>.toKotlinLazy(): kotlin.Lazy<T> {
+ return lazy { this.get() }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/util/kotlin/ReduceBrightColorsControllerExt.kt b/packages/SystemUI/src/com/android/systemui/util/kotlin/ReduceBrightColorsControllerExt.kt
index ee00e8b04ef1..e6e2a0767012 100644
--- a/packages/SystemUI/src/com/android/systemui/util/kotlin/ReduceBrightColorsControllerExt.kt
+++ b/packages/SystemUI/src/com/android/systemui/util/kotlin/ReduceBrightColorsControllerExt.kt
@@ -35,3 +35,17 @@ fun ReduceBrightColorsController.isEnabled(): Flow<Boolean> {
}
.onStart { emit(isReduceBrightColorsActivated) }
}
+
+fun ReduceBrightColorsController.isAvailable(): Flow<Boolean> {
+ return conflatedCallbackFlow {
+ val callback =
+ object : ReduceBrightColorsController.Listener {
+ override fun onFeatureEnabledChanged(enabled: Boolean) {
+ trySend(enabled)
+ }
+ }
+ addCallback(callback)
+ awaitClose { removeCallback(callback) }
+ }
+ .onStart { emit(isReduceBrightColorsFeatureAvailable) }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/util/service/PersistentConnectionManager.java b/packages/SystemUI/src/com/android/systemui/util/service/PersistentConnectionManager.java
index 64f8246118c8..a58a264c8348 100644
--- a/packages/SystemUI/src/com/android/systemui/util/service/PersistentConnectionManager.java
+++ b/packages/SystemUI/src/com/android/systemui/util/service/PersistentConnectionManager.java
@@ -27,6 +27,7 @@ import android.util.Log;
import androidx.annotation.NonNull;
+import com.android.app.tracing.TraceStateLogger;
import com.android.systemui.Dumpable;
import com.android.systemui.dagger.qualifiers.Background;
import com.android.systemui.dump.DumpManager;
@@ -41,11 +42,11 @@ import javax.inject.Named;
/**
* The {@link PersistentConnectionManager} is responsible for maintaining a connection to a
* {@link ObservableServiceConnection}.
+ *
* @param <T> The transformed connection type handled by the service.
*/
public class PersistentConnectionManager<T> implements Dumpable {
private static final String TAG = "PersistentConnManager";
- private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
private final SystemClock mSystemClock;
private final DelayableExecutor mBgExecutor;
@@ -55,6 +56,7 @@ public class PersistentConnectionManager<T> implements Dumpable {
private final Observer mObserver;
private final DumpManager mDumpManager;
private final String mDumpsysName;
+ private final TraceStateLogger mConnectionReasonLogger;
private int mReconnectAttempts = 0;
private Runnable mCurrentReconnectCancelable;
@@ -64,36 +66,52 @@ public class PersistentConnectionManager<T> implements Dumpable {
private final Runnable mConnectRunnable = new Runnable() {
@Override
public void run() {
+ mConnectionReasonLogger.log("ConnectionReasonRetry");
mCurrentReconnectCancelable = null;
mConnection.bind();
}
};
- private final Observer.Callback mObserverCallback = () -> initiateConnectionAttempt();
+ private final Observer.Callback mObserverCallback = () -> initiateConnectionAttempt(
+ "ConnectionReasonObserver");
private final ObservableServiceConnection.Callback<T> mConnectionCallback =
new ObservableServiceConnection.Callback<>() {
- private long mStartTime;
-
- @Override
- public void onConnected(ObservableServiceConnection connection, Object proxy) {
- mStartTime = mSystemClock.currentTimeMillis();
- }
-
- @Override
- public void onDisconnected(ObservableServiceConnection connection, int reason) {
- // Do not attempt to reconnect if we were manually unbound
- if (reason == ObservableServiceConnection.DISCONNECT_REASON_UNBIND) {
- return;
- }
-
- if (mSystemClock.currentTimeMillis() - mStartTime > mMinConnectionDuration) {
- initiateConnectionAttempt();
- } else {
- scheduleConnectionAttempt();
- }
- }
- };
+ private long mStartTime = -1;
+
+ @Override
+ public void onConnected(ObservableServiceConnection connection, Object proxy) {
+ mStartTime = mSystemClock.currentTimeMillis();
+ }
+
+ @Override
+ public void onDisconnected(ObservableServiceConnection connection, int reason) {
+ // Do not attempt to reconnect if we were manually unbound
+ if (reason == ObservableServiceConnection.DISCONNECT_REASON_UNBIND) {
+ return;
+ }
+
+ if (mStartTime <= 0) {
+ Log.e(TAG, "onDisconnected called with invalid connection start time: "
+ + mStartTime);
+ return;
+ }
+
+ final float connectionDuration = mSystemClock.currentTimeMillis() - mStartTime;
+ // Reset the start time.
+ mStartTime = -1;
+
+ if (connectionDuration > mMinConnectionDuration) {
+ Log.i(TAG, "immediately reconnecting since service was connected for "
+ + connectionDuration
+ + "ms which is longer than the min duration of "
+ + mMinConnectionDuration + "ms");
+ initiateConnectionAttempt("ConnectionReasonMinDurationMet");
+ } else {
+ scheduleConnectionAttempt();
+ }
+ }
+ };
@Inject
public PersistentConnectionManager(
@@ -112,6 +130,7 @@ public class PersistentConnectionManager<T> implements Dumpable {
mObserver = observer;
mDumpManager = dumpManager;
mDumpsysName = TAG + "#" + dumpsysName;
+ mConnectionReasonLogger = new TraceStateLogger(mDumpsysName);
mMaxReconnectAttempts = maxReconnectAttempts;
mBaseReconnectDelayMs = baseReconnectDelayMs;
@@ -125,7 +144,7 @@ public class PersistentConnectionManager<T> implements Dumpable {
mDumpManager.registerCriticalDumpable(mDumpsysName, this);
mConnection.addCallback(mConnectionCallback);
mObserver.addCallback(mObserverCallback);
- initiateConnectionAttempt();
+ initiateConnectionAttempt("ConnectionReasonStart");
}
/**
@@ -140,6 +159,7 @@ public class PersistentConnectionManager<T> implements Dumpable {
/**
* Add a callback to the {@link ObservableServiceConnection}.
+ *
* @param callback The callback to add.
*/
public void addConnectionCallback(ObservableServiceConnection.Callback<T> callback) {
@@ -148,6 +168,7 @@ public class PersistentConnectionManager<T> implements Dumpable {
/**
* Remove a callback from the {@link ObservableServiceConnection}.
+ *
* @param callback The callback to remove.
*/
public void removeConnectionCallback(ObservableServiceConnection.Callback<T> callback) {
@@ -163,10 +184,10 @@ public class PersistentConnectionManager<T> implements Dumpable {
mConnection.dump(pw);
}
- private void initiateConnectionAttempt() {
+ private void initiateConnectionAttempt(String reason) {
+ mConnectionReasonLogger.log(reason);
// Reset attempts
mReconnectAttempts = 0;
-
// The first attempt is always a direct invocation rather than delayed.
mConnection.bind();
}
@@ -179,20 +200,15 @@ public class PersistentConnectionManager<T> implements Dumpable {
}
if (mReconnectAttempts >= mMaxReconnectAttempts) {
- if (DEBUG) {
- Log.d(TAG, "exceeded max connection attempts.");
- }
+ Log.d(TAG, "exceeded max connection attempts.");
return;
}
final long reconnectDelayMs =
(long) Math.scalb(mBaseReconnectDelayMs, mReconnectAttempts);
- if (DEBUG) {
- Log.d(TAG,
- "scheduling connection attempt in " + reconnectDelayMs + "milliseconds");
- }
-
+ Log.d(TAG,
+ "scheduling connection attempt in " + reconnectDelayMs + "milliseconds");
mCurrentReconnectCancelable = mBgExecutor.executeDelayed(mConnectRunnable,
reconnectDelayMs);
diff --git a/packages/SystemUI/src/com/android/systemui/util/settings/SettingsProxy.kt b/packages/SystemUI/src/com/android/systemui/util/settings/SettingsProxy.kt
index fe540445793e..b5934ec680d3 100644
--- a/packages/SystemUI/src/com/android/systemui/util/settings/SettingsProxy.kt
+++ b/packages/SystemUI/src/com/android/systemui/util/settings/SettingsProxy.kt
@@ -19,6 +19,7 @@ import android.content.ContentResolver
import android.database.ContentObserver
import android.net.Uri
import android.provider.Settings.SettingNotFoundException
+import androidx.annotation.AnyThread
import androidx.annotation.WorkerThread
import com.android.app.tracing.TraceUtils.trace
import kotlinx.coroutines.CoroutineDispatcher
@@ -57,7 +58,7 @@ interface SettingsProxy {
* @param name to look up in the table
* @return the corresponding content URI, or null if not present
*/
- fun getUriFor(name: String): Uri
+ @AnyThread fun getUriFor(name: String): Uri
/**
* Registers listener for a given content observer <b>while blocking the current thread</b>.
@@ -89,12 +90,31 @@ interface SettingsProxy {
*
* API corresponding to [registerContentObserver] for Java usage.
*/
+ @AnyThread
fun registerContentObserverAsync(name: String, settingsObserver: ContentObserver) =
CoroutineScope(backgroundDispatcher).launch {
registerContentObserverSync(getUriFor(name), settingsObserver)
}
/**
+ * Convenience wrapper around [ContentResolver.registerContentObserver].'
+ *
+ * API corresponding to [registerContentObserver] for Java usage. After registration is
+ * complete, the callback block is called on the <b>background thread</b> to allow for update of
+ * value.
+ */
+ @AnyThread
+ fun registerContentObserverAsync(
+ name: String,
+ settingsObserver: ContentObserver,
+ @WorkerThread registered: Runnable
+ ) =
+ CoroutineScope(backgroundDispatcher).launch {
+ registerContentObserverSync(getUriFor(name), settingsObserver)
+ registered.run()
+ }
+
+ /**
* Registers listener for a given content observer <b>while blocking the current thread</b>.
*
* This should not be called from the main thread, use [registerContentObserver] or
@@ -120,6 +140,7 @@ interface SettingsProxy {
*
* API corresponding to [registerContentObserver] for Java usage.
*/
+ @AnyThread
fun registerContentObserverAsync(uri: Uri, settingsObserver: ContentObserver) =
CoroutineScope(backgroundDispatcher).launch {
registerContentObserverSync(uri, settingsObserver)
@@ -128,8 +149,27 @@ interface SettingsProxy {
/**
* Convenience wrapper around [ContentResolver.registerContentObserver].'
*
+ * API corresponding to [registerContentObserver] for Java usage. After registration is
+ * complete, the callback block is called on the <b>background thread</b> to allow for update of
+ * value.
+ */
+ @AnyThread
+ fun registerContentObserverAsync(
+ uri: Uri,
+ settingsObserver: ContentObserver,
+ @WorkerThread registered: Runnable
+ ) =
+ CoroutineScope(backgroundDispatcher).launch {
+ registerContentObserverSync(uri, settingsObserver)
+ registered.run()
+ }
+
+ /**
+ * Convenience wrapper around [ContentResolver.registerContentObserver].'
+ *
* Implicitly calls [getUriFor] on the passed in name.
*/
+ @WorkerThread
fun registerContentObserverSync(
name: String,
notifyForDescendants: Boolean,
@@ -158,6 +198,7 @@ interface SettingsProxy {
*
* API corresponding to [registerContentObserver] for Java usage.
*/
+ @AnyThread
fun registerContentObserverAsync(
name: String,
notifyForDescendants: Boolean,
@@ -168,6 +209,25 @@ interface SettingsProxy {
}
/**
+ * Convenience wrapper around [ContentResolver.registerContentObserver].'
+ *
+ * API corresponding to [registerContentObserver] for Java usage. After registration is
+ * complete, the callback block is called on the <b>background thread</b> to allow for update of
+ * value.
+ */
+ @AnyThread
+ fun registerContentObserverAsync(
+ name: String,
+ notifyForDescendants: Boolean,
+ settingsObserver: ContentObserver,
+ @WorkerThread registered: Runnable
+ ) =
+ CoroutineScope(backgroundDispatcher).launch {
+ registerContentObserverSync(getUriFor(name), notifyForDescendants, settingsObserver)
+ registered.run()
+ }
+
+ /**
* Registers listener for a given content observer <b>while blocking the current thread</b>.
*
* This should not be called from the main thread, use [registerContentObserver] or
@@ -207,6 +267,7 @@ interface SettingsProxy {
*
* API corresponding to [registerContentObserver] for Java usage.
*/
+ @AnyThread
fun registerContentObserverAsync(
uri: Uri,
notifyForDescendants: Boolean,
@@ -217,6 +278,25 @@ interface SettingsProxy {
}
/**
+ * Convenience wrapper around [ContentResolver.registerContentObserver].'
+ *
+ * API corresponding to [registerContentObserver] for Java usage. After registration is
+ * complete, the callback block is called on the <b>background thread</b> to allow for update of
+ * value.
+ */
+ @AnyThread
+ fun registerContentObserverAsync(
+ uri: Uri,
+ notifyForDescendants: Boolean,
+ settingsObserver: ContentObserver,
+ @WorkerThread registered: Runnable
+ ) =
+ CoroutineScope(backgroundDispatcher).launch {
+ registerContentObserverSync(uri, notifyForDescendants, settingsObserver)
+ registered.run()
+ }
+
+ /**
* Unregisters the given content observer <b>while blocking the current thread</b>.
*
* This should not be called from the main thread, use [unregisterContentObserver] or
@@ -246,6 +326,7 @@ interface SettingsProxy {
* API corresponding to [unregisterContentObserver] for Java usage to ensure that
* [ContentObserver] registration happens on a worker thread.
*/
+ @AnyThread
fun unregisterContentObserverAsync(settingsObserver: ContentObserver) =
CoroutineScope(backgroundDispatcher).launch { unregisterContentObserver(settingsObserver) }
diff --git a/packages/SystemUI/src/com/android/systemui/util/settings/UserSettingsProxy.kt b/packages/SystemUI/src/com/android/systemui/util/settings/UserSettingsProxy.kt
index 3bf5b6511eb3..848a6e691082 100644
--- a/packages/SystemUI/src/com/android/systemui/util/settings/UserSettingsProxy.kt
+++ b/packages/SystemUI/src/com/android/systemui/util/settings/UserSettingsProxy.kt
@@ -16,6 +16,7 @@
package com.android.systemui.util.settings
import android.annotation.UserIdInt
+import android.annotation.WorkerThread
import android.content.ContentResolver
import android.database.ContentObserver
import android.net.Uri
@@ -66,6 +67,7 @@ interface UserSettingsProxy : SettingsProxy {
} else userTracker.userId
}
+ @WorkerThread
override fun registerContentObserverSync(uri: Uri, settingsObserver: ContentObserver) {
registerContentObserverForUserSync(uri, settingsObserver, userId)
}
@@ -82,6 +84,7 @@ interface UserSettingsProxy : SettingsProxy {
}
/** Convenience wrapper around [ContentResolver.registerContentObserver].' */
+ @WorkerThread
override fun registerContentObserverSync(
uri: Uri,
notifyForDescendants: Boolean,
@@ -119,6 +122,7 @@ interface UserSettingsProxy : SettingsProxy {
*
* Implicitly calls [getUriFor] on the passed in name.
*/
+ @WorkerThread
fun registerContentObserverForUserSync(
name: String,
settingsObserver: ContentObserver,
@@ -159,6 +163,7 @@ interface UserSettingsProxy : SettingsProxy {
}
/** Convenience wrapper around [ContentResolver.registerContentObserver] */
+ @WorkerThread
fun registerContentObserverForUserSync(
uri: Uri,
settingsObserver: ContentObserver,
@@ -199,10 +204,29 @@ interface UserSettingsProxy : SettingsProxy {
}
/**
+ * Convenience wrapper around [ContentResolver.registerContentObserver].'
+ *
+ * API corresponding to [registerContentObserverForUser] for Java usage. After registration is
+ * complete, the callback block is called on the <b>background thread</b> to allow for update of
+ * value.
+ */
+ fun registerContentObserverForUserAsync(
+ uri: Uri,
+ settingsObserver: ContentObserver,
+ userHandle: Int,
+ @WorkerThread registered: Runnable
+ ) =
+ CoroutineScope(backgroundDispatcher).launch {
+ registerContentObserverForUserSync(uri, settingsObserver, userHandle)
+ registered.run()
+ }
+
+ /**
* Convenience wrapper around [ContentResolver.registerContentObserver]
*
* Implicitly calls [getUriFor] on the passed in name.
*/
+ @WorkerThread
fun registerContentObserverForUserSync(
name: String,
notifyForDescendants: Boolean,
@@ -262,6 +286,7 @@ interface UserSettingsProxy : SettingsProxy {
}
/** Convenience wrapper around [ContentResolver.registerContentObserver] */
+ @WorkerThread
fun registerContentObserverForUserSync(
uri: Uri,
notifyForDescendants: Boolean,
diff --git a/packages/SystemUI/src/com/android/systemui/volume/CsdWarningDialog.java b/packages/SystemUI/src/com/android/systemui/volume/CsdWarningDialog.java
index bd698ab8ad5c..bb230e6b0305 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/CsdWarningDialog.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/CsdWarningDialog.java
@@ -30,21 +30,31 @@ import android.content.IntentFilter;
import android.media.AudioManager;
import android.provider.Settings;
import android.util.Log;
+import android.util.Pair;
import android.view.KeyEvent;
import android.view.WindowManager;
+import androidx.annotation.VisibleForTesting;
+
import com.android.internal.annotations.GuardedBy;
import com.android.internal.messages.nano.SystemMessageProto;
+import com.android.systemui.Flags;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.dagger.qualifiers.Background;
+import com.android.systemui.plugins.VolumeDialog;
import com.android.systemui.res.R;
import com.android.systemui.statusbar.phone.SystemUIDialog;
import com.android.systemui.util.NotificationChannels;
import com.android.systemui.util.concurrency.DelayableExecutor;
+import com.google.common.collect.ImmutableList;
+
import dagger.assisted.Assisted;
import dagger.assisted.AssistedFactory;
import dagger.assisted.AssistedInject;
+import java.util.Optional;
+
/**
* A class that implements the three Computed Sound Dose-related warnings defined in
* {@link AudioManager}:
@@ -75,6 +85,9 @@ public class CsdWarningDialog extends SystemUIDialog
private static final int KEY_CONFIRM_ALLOWED_AFTER_MS = 1000; // milliseconds
// time after which action is taken when the user hasn't ack'd or dismissed the dialog
public static final int NO_ACTION_TIMEOUT_MS = 5000;
+ // Notification dismiss intent
+ private static final String DISMISS_CSD_NOTIFICATION =
+ "com.android.systemui.volume.DISMISS_CSD_NOTIFICATION";
private final Context mContext;
private final AudioManager mAudioManager;
@@ -95,21 +108,32 @@ public class CsdWarningDialog extends SystemUIDialog
private long mShowTime;
+ @VisibleForTesting public int mCachedMediaStreamVolume;
+ private Optional<ImmutableList<Pair<String, Intent>>> mActionIntents;
+ private final BroadcastDispatcher mBroadcastDispatcher;
+
/**
* To inject dependencies and allow for easier testing
*/
@AssistedFactory
public interface Factory {
- /**
- * Create a dialog object
- */
- CsdWarningDialog create(int csdWarning, Runnable onCleanup);
+ /** Create a dialog object */
+ CsdWarningDialog create(
+ int csdWarning,
+ Runnable onCleanup,
+ Optional<ImmutableList<Pair<String, Intent>>> actionIntents);
}
@AssistedInject
- public CsdWarningDialog(@Assisted @AudioManager.CsdWarning int csdWarning, Context context,
- AudioManager audioManager, NotificationManager notificationManager,
- @Background DelayableExecutor delayableExecutor, @Assisted Runnable onCleanup) {
+ public CsdWarningDialog(
+ @Assisted @AudioManager.CsdWarning int csdWarning,
+ Context context,
+ AudioManager audioManager,
+ NotificationManager notificationManager,
+ @Background DelayableExecutor delayableExecutor,
+ @Assisted Runnable onCleanup,
+ @Assisted Optional<ImmutableList<Pair<String, Intent>>> actionIntents,
+ BroadcastDispatcher broadcastDispatcher) {
super(context);
mCsdWarning = csdWarning;
mContext = context;
@@ -118,7 +142,8 @@ public class CsdWarningDialog extends SystemUIDialog
mOnCleanup = onCleanup;
mDelayableExecutor = delayableExecutor;
-
+ mActionIntents = actionIntents;
+ mBroadcastDispatcher = broadcastDispatcher;
getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ERROR);
setShowForAllUsers(true);
setMessage(mContext.getString(getStringForWarning(csdWarning)));
@@ -133,14 +158,17 @@ public class CsdWarningDialog extends SystemUIDialog
Context.RECEIVER_EXPORTED_UNAUDITED);
if (csdWarning == AudioManager.CSD_WARNING_DOSE_REACHED_1X) {
- mNoUserActionRunnable = () -> {
- if (mCsdWarning == AudioManager.CSD_WARNING_DOSE_REACHED_1X) {
- // unlike on the 5x dose repeat, level is only reduced to RS1 when the warning
- // is not acknowledged quickly enough
- mAudioManager.lowerVolumeToRs1();
- sendNotification(/*for5XCsd=*/false);
- }
- };
+ mNoUserActionRunnable =
+ () -> {
+ if (mCsdWarning == AudioManager.CSD_WARNING_DOSE_REACHED_1X) {
+ // unlike on the 5x dose repeat, level is only reduced to RS1 when the
+ // warning is not acknowledged quickly enough
+ mCachedMediaStreamVolume =
+ mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC);
+ mAudioManager.lowerVolumeToRs1();
+ sendNotification(/* for5XCsd= */ false);
+ }
+ };
} else {
mNoUserActionRunnable = null;
}
@@ -242,6 +270,38 @@ public class CsdWarningDialog extends SystemUIDialog
}
};
+ @VisibleForTesting
+ public final BroadcastReceiver mReceiverUndo =
+ new BroadcastReceiver() {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ if (Flags.sounddoseCustomization()
+ && VolumeDialog.ACTION_VOLUME_UNDO.equals(intent.getAction())) {
+ if (D.BUG) Log.d(TAG, "Received ACTION_VOLUME_UNDO");
+ mAudioManager.setStreamVolume(
+ AudioManager.STREAM_MUSIC,
+ mCachedMediaStreamVolume,
+ AudioManager.FLAG_SHOW_UI);
+ mNotificationManager.cancel(
+ SystemMessageProto.SystemMessage.NOTE_CSD_LOWER_AUDIO);
+ destroy();
+ }
+ }
+ };
+
+ @VisibleForTesting
+ public final BroadcastReceiver mReceiverDismissNotification =
+ new BroadcastReceiver() {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ if (Flags.sounddoseCustomization()
+ && DISMISS_CSD_NOTIFICATION.equals(intent.getAction())) {
+ if (D.BUG) Log.d(TAG, "Received DISMISS_CSD_NOTIFICATION");
+ destroy();
+ }
+ }
+ };
+
private @StringRes int getStringForWarning(@AudioManager.CsdWarning int csdWarning) {
switch (csdWarning) {
case AudioManager.CSD_WARNING_DOSE_REACHED_1X:
@@ -259,7 +319,7 @@ public class CsdWarningDialog extends SystemUIDialog
Log.w(TAG, "Notification dose repeat 5x is not shown for " + mCsdWarning);
return;
}
-
+ mCachedMediaStreamVolume = mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC);
mAudioManager.lowerVolumeToRs1();
sendNotification(/*for5XCsd=*/true);
}
@@ -288,7 +348,62 @@ public class CsdWarningDialog extends SystemUIDialog
.setAutoCancel(true)
.setCategory(Notification.CATEGORY_SYSTEM);
+ if (Flags.sounddoseCustomization()
+ && mActionIntents.isPresent()
+ && !mActionIntents.get().isEmpty()) {
+ ImmutableList<Pair<String, Intent>> actionIntentsList = mActionIntents.get();
+ for (Pair<String, Intent> intentPair : actionIntentsList) {
+ if (intentPair != null && intentPair.first != null && intentPair.second != null) {
+ PendingIntent pendingActionIntent =
+ PendingIntent.getBroadcast(mContext, 0, intentPair.second,
+ FLAG_IMMUTABLE);
+ builder.addAction(0, intentPair.first, pendingActionIntent);
+ // Register receiver to undo volume only when
+ // notification conaining the undo action would be sent.
+ if (intentPair.first == mContext.getString(R.string.volume_undo_action)) {
+ final IntentFilter filterUndo = new IntentFilter(
+ VolumeDialog.ACTION_VOLUME_UNDO);
+ mBroadcastDispatcher.registerReceiver(mReceiverUndo,
+ filterUndo,
+ /* executor = default */ null,
+ /* user = default */ null,
+ Context.RECEIVER_NOT_EXPORTED,
+ /* permission = default */ null);
+
+ // Register receiver to learn if notification has been dismissed.
+ // This is required to unregister receivers to prevent leak.
+ Intent dismissIntent = new Intent(DISMISS_CSD_NOTIFICATION)
+ .setPackage(mContext.getPackageName());
+ PendingIntent pendingDismissIntent = PendingIntent.getBroadcast(mContext,
+ 0, dismissIntent, FLAG_IMMUTABLE);
+ mBroadcastDispatcher.registerReceiver(mReceiverDismissNotification,
+ new IntentFilter(DISMISS_CSD_NOTIFICATION),
+ /* executor = default */ null,
+ /* user = default */ null,
+ Context.RECEIVER_NOT_EXPORTED,
+ /* permission = default */ null);
+ builder.setDeleteIntent(pendingDismissIntent);
+ }
+ }
+ }
+ }
+
mNotificationManager.notify(SystemMessageProto.SystemMessage.NOTE_CSD_LOWER_AUDIO,
builder.build());
}
+
+ /**
+ * Unregister the Undo action receiver when the notification is dismissed.
+ * Unregister cannot happen when CsdWarning dialog is dismissed
+ * as the notification lifecycle would be longer.
+ */
+ @VisibleForTesting
+ public void destroy() {
+ if (Flags.sounddoseCustomization()
+ && mActionIntents.isPresent()
+ && !mActionIntents.get().isEmpty()) {
+ mBroadcastDispatcher.unregisterReceiver(mReceiverUndo);
+ mBroadcastDispatcher.unregisterReceiver(mReceiverDismissNotification);
+ }
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java
index c45f98e5f4f5..066bfc5c588d 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogControllerImpl.java
@@ -18,6 +18,8 @@ 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;
@@ -59,6 +61,8 @@ import android.view.accessibility.AccessibilityManager;
import android.view.accessibility.CaptioningManager;
import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.annotation.VisibleForTesting;
import androidx.lifecycle.Observer;
import com.android.internal.annotations.GuardedBy;
@@ -76,6 +80,8 @@ import com.android.systemui.statusbar.VibratorHelper;
import com.android.systemui.util.RingerModeLiveData;
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 dalvik.annotation.optimization.NeverCompile;
@@ -102,7 +108,13 @@ public class VolumeDialogControllerImpl implements VolumeDialogController, Dumpa
private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
private static final int TOUCH_FEEDBACK_TIMEOUT_MS = 1000;
- private static final int DYNAMIC_STREAM_START_INDEX = 100;
+ // We only need one dynamic stream for broadcast because at most two headsets are allowed
+ // to join local broadcast in current stage.
+ // It is safe to use 99 as the broadcast stream now. There are only 10+ default audio
+ // streams defined in AudioSystem for now and audio team is in the middle of restructure,
+ // no new default stream is preferred.
+ @VisibleForTesting static final int DYNAMIC_STREAM_BROADCAST = 99;
+ private static final int DYNAMIC_STREAM_REMOTE_START_INDEX = 100;
private static final AudioAttributes SONIFICIATION_VIBRATION_ATTRIBUTES =
new AudioAttributes.Builder()
.setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
@@ -145,6 +157,8 @@ public class VolumeDialogControllerImpl implements VolumeDialogController, Dumpa
private final State mState = new State();
protected final MediaSessionsCallbacks mMediaSessionsCallbacksW;
private final VibratorHelper mVibrator;
+ private final AudioSharingInteractor mAudioSharingInteractor;
+ private final JavaAdapter mJavaAdapter;
private final boolean mHasVibrator;
private boolean mShowA11yStream;
private boolean mShowVolumeDialog;
@@ -188,7 +202,9 @@ public class VolumeDialogControllerImpl implements VolumeDialogController, Dumpa
KeyguardManager keyguardManager,
ActivityManager activityManager,
UserTracker userTracker,
- DumpManager dumpManager
+ DumpManager dumpManager,
+ AudioSharingInteractor audioSharingInteractor,
+ JavaAdapter javaAdapter
) {
mContext = context.getApplicationContext();
mPackageManager = packageManager;
@@ -200,6 +216,8 @@ public class VolumeDialogControllerImpl implements VolumeDialogController, Dumpa
mRouter2Manager = MediaRouter2Manager.getInstance(mContext);
mMediaSessionsCallbacksW = new MediaSessionsCallbacks(mContext);
mMediaSessions = createMediaSessions(mContext, mWorkerLooper, mMediaSessionsCallbacksW);
+ mAudioSharingInteractor = audioSharingInteractor;
+ mJavaAdapter = javaAdapter;
mAudio = audioManager;
mNoMan = notificationManager;
mObserver = new SettingObserver(mWorker);
@@ -272,6 +290,12 @@ 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);
+ }
}
public void setVolumePolicy(VolumePolicy policy) {
@@ -545,7 +569,13 @@ 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 < DYNAMIC_STREAM_START_INDEX ? activeStream : -1;
+ 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);
return true;
@@ -726,7 +756,12 @@ public class VolumeDialogControllerImpl implements VolumeDialogController, Dumpa
private void onSetStreamVolumeW(int stream, int level) {
if (D.BUG) Log.d(TAG, "onSetStreamVolume " + stream + " level=" + level);
- if (stream >= DYNAMIC_STREAM_START_INDEX) {
+ if (volumeDialogAudioSharingFix() && stream == DYNAMIC_STREAM_BROADCAST) {
+ Slog.d(TAG, "onSetStreamVolumeW set broadcast stream level = " + level);
+ mAudioSharingInteractor.setStreamVolume(level);
+ return;
+ }
+ if (stream >= DYNAMIC_STREAM_REMOTE_START_INDEX) {
mMediaSessionsCallbacksW.setStreamVolume(stream, level);
return;
}
@@ -758,6 +793,40 @@ public class VolumeDialogControllerImpl implements VolumeDialogController, Dumpa
DndTile.setVisible(mContext, true);
}
+ void handleAudioSharingStreamVolumeChanges(@Nullable Integer volume) {
+ if (volume == null) {
+ if (mState.states.contains(DYNAMIC_STREAM_BROADCAST)) {
+ mState.states.remove(DYNAMIC_STREAM_BROADCAST);
+ Slog.d(TAG, "Remove audio sharing stream");
+ mCallbacks.onStateChanged(mState);
+ }
+ } else {
+ if (mState.states.contains(DYNAMIC_STREAM_BROADCAST)) {
+ StreamState ss = mState.states.get(DYNAMIC_STREAM_BROADCAST);
+ if (ss.level != volume) {
+ ss.level = volume;
+ Slog.d(TAG, "updateState, audio sharing stream volume = " + volume);
+ mCallbacks.onStateChanged(mState);
+ }
+ } else {
+ StreamState ss = streamStateW(DYNAMIC_STREAM_BROADCAST);
+ ss.dynamic = true;
+ ss.levelMin = mAudioSharingInteractor.getVolumeMin();
+ ss.levelMax = mAudioSharingInteractor.getVolumeMax();
+ if (ss.level != volume) {
+ ss.level = volume;
+ }
+ String label = mContext.getString(R.string.audio_sharing_description);
+ if (!Objects.equals(ss.remoteLabel, label)) {
+ ss.name = -1;
+ ss.remoteLabel = label;
+ }
+ Slog.d(TAG, "updateState, new audio sharing stream volume = " + volume);
+ mCallbacks.onStateChanged(mState);
+ }
+ }
+ }
+
private final class VC extends IVolumeController.Stub {
private final String TAG = VolumeDialogControllerImpl.TAG + ".VC";
@@ -1256,7 +1325,7 @@ public class VolumeDialogControllerImpl implements VolumeDialogController, Dumpa
protected final class MediaSessionsCallbacks implements MediaSessions.Callbacks {
private final HashMap<Token, Integer> mRemoteStreams = new HashMap<>();
- private int mNextStream = DYNAMIC_STREAM_START_INDEX;
+ private int mNextStream = DYNAMIC_STREAM_REMOTE_START_INDEX;
private final boolean mVolumeAdjustmentForRemoteGroupSessions;
public MediaSessionsCallbacks(Context context) {
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java
index 795d427b43bf..0770d8926389 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.volumeDialogAudioSharingFix;
import static com.android.systemui.Flags.hapticVolumeSlider;
import static com.android.systemui.volume.Events.DISMISS_REASON_POSTURE_CHANGED;
import static com.android.systemui.volume.Events.DISMISS_REASON_SETTINGS_CLICKED;
@@ -50,6 +51,7 @@ import android.app.KeyguardManager;
import android.content.ContentResolver;
import android.content.Context;
import android.content.DialogInterface;
+import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.res.ColorStateList;
import android.content.res.Configuration;
@@ -77,6 +79,7 @@ import android.provider.Settings;
import android.provider.Settings.Global;
import android.text.InputFilter;
import android.util.Log;
+import android.util.Pair;
import android.util.Slog;
import android.util.SparseBooleanArray;
import android.view.ContextThemeWrapper;
@@ -140,11 +143,14 @@ import com.android.systemui.volume.domain.interactor.VolumePanelNavigationIntera
import com.android.systemui.volume.panel.shared.flag.VolumePanelFlag;
import com.android.systemui.volume.ui.navigation.VolumeNavigator;
+import com.google.common.collect.ImmutableList;
+
import dagger.Lazy;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
+import java.util.Optional;
import java.util.function.Consumer;
/**
@@ -315,6 +321,9 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable,
private final com.android.systemui.util.time.SystemClock mSystemClock;
private final VolumePanelFlag mVolumePanelFlag;
private final VolumeDialogInteractor mInteractor;
+ // Optional actions for soundDose
+ private Optional<ImmutableList<Pair<String, Intent>>> mCsdWarningNotificationActions =
+ Optional.of(ImmutableList.of());
public VolumeDialogImpl(
Context context,
@@ -1670,6 +1679,14 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable,
return true;
}
+ // Always show the stream for audio sharing if it exists.
+ if (volumeDialogAudioSharingFix()
+ && row.ss != null
+ && mContext.getString(R.string.audio_sharing_description)
+ .equals(row.ss.remoteLabel)) {
+ return true;
+ }
+
if (row.defaultStream) {
return activeRow.stream == STREAM_RING
|| activeRow.stream == STREAM_ALARM
@@ -1872,10 +1889,25 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable,
if (!ss.dynamic) continue;
mDynamic.put(stream, true);
if (findRow(stream) == null) {
- addRow(stream,
- com.android.settingslib.R.drawable.ic_volume_remote,
- com.android.settingslib.R.drawable.ic_volume_remote_mute,
- true, false, true);
+ if (volumeDialogAudioSharingFix()
+ && mContext.getString(R.string.audio_sharing_description)
+ .equals(ss.remoteLabel)) {
+ addRow(
+ stream,
+ R.drawable.ic_volume_media,
+ R.drawable.ic_volume_media_mute,
+ true,
+ false,
+ true);
+ } else {
+ addRow(
+ stream,
+ com.android.settingslib.R.drawable.ic_volume_remote,
+ com.android.settingslib.R.drawable.ic_volume_remote_mute,
+ true,
+ false,
+ true);
+ }
}
}
@@ -2198,6 +2230,11 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable,
rescheduleTimeoutH();
}
+ public void setCsdWarningNotificationActionIntents(
+ ImmutableList<Pair<String, Intent>> actionIntent) {
+ mCsdWarningNotificationActions = Optional.of(actionIntent);
+ }
+
@VisibleForTesting void showCsdWarningH(int csdWarning, int durationMs) {
synchronized (mSafetyWarningLock) {
@@ -2212,7 +2249,8 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable,
recheckH(null);
};
- mCsdDialog = mCsdWarningDialogFactory.create(csdWarning, cleanUp);
+ mCsdDialog = mCsdWarningDialogFactory.create(
+ csdWarning, cleanUp, mCsdWarningNotificationActions);
mCsdDialog.show();
}
recheckH(null);
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 de8b9b1e7e3c..eb2f71a1cd7d 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/dagger/AudioModule.kt
+++ b/packages/SystemUI/src/com/android/systemui/volume/dagger/AudioModule.kt
@@ -73,10 +73,19 @@ interface AudioModule {
@Provides
@SysUISingleton
fun provideAudioSharingRepository(
+ @Application context: Context,
+ contentResolver: ContentResolver,
localBluetoothManager: LocalBluetoothManager?,
+ @Application coroutineScope: CoroutineScope,
@Background coroutineContext: CoroutineContext,
): AudioSharingRepository =
- AudioSharingRepositoryImpl(localBluetoothManager, coroutineContext)
+ AudioSharingRepositoryImpl(
+ context,
+ contentResolver,
+ localBluetoothManager,
+ coroutineScope,
+ coroutineContext
+ )
@Provides
@SysUISingleton
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/data/repository/HeadsUpNotificationsRepositoryExt.kt b/packages/SystemUI/src/com/android/systemui/volume/dagger/AudioSharingEmptyImplModule.kt
index 9be7dfe9a1a9..cf80263b4d14 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/data/repository/HeadsUpNotificationsRepositoryExt.kt
+++ b/packages/SystemUI/src/com/android/systemui/volume/dagger/AudioSharingEmptyImplModule.kt
@@ -14,14 +14,17 @@
* limitations under the License.
*/
-package com.android.systemui.statusbar.notification.stack.data.repository
+package com.android.systemui.volume.dagger
-import com.android.systemui.statusbar.notification.data.repository.HeadsUpRowRepository
+import com.android.systemui.volume.domain.interactor.AudioSharingInteractor
+import com.android.systemui.volume.domain.interactor.AudioSharingInteractorEmptyImpl
+import dagger.Binds
+import dagger.Module
-fun FakeHeadsUpNotificationRepository.setNotifications(notifications: List<HeadsUpRowRepository>) {
- setNotifications(*notifications.toTypedArray())
-}
+/** Dagger module for empty audio sharing impl for unnecessary volume overlay */
+@Module
+interface AudioSharingEmptyImplModule {
-fun FakeHeadsUpNotificationRepository.setNotifications(vararg notifications: HeadsUpRowRepository) {
- this.activeHeadsUpRows.value = notifications.toSet()
+ @Binds
+ fun bindsAudioSharingInteractor(impl: AudioSharingInteractorEmptyImpl): AudioSharingInteractor
}
diff --git a/packages/SystemUI/src/com/android/systemui/volume/dagger/AudioSharingModule.kt b/packages/SystemUI/src/com/android/systemui/volume/dagger/AudioSharingModule.kt
new file mode 100644
index 000000000000..9f1e60e855e2
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/volume/dagger/AudioSharingModule.kt
@@ -0,0 +1,40 @@
+/*
+ * 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.dagger
+
+import com.android.settingslib.volume.data.repository.AudioSharingRepository
+import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.dagger.qualifiers.Application
+import com.android.systemui.volume.domain.interactor.AudioSharingInteractor
+import com.android.systemui.volume.domain.interactor.AudioSharingInteractorImpl
+import dagger.Module
+import dagger.Provides
+import kotlinx.coroutines.CoroutineScope
+
+/** Dagger module for audio sharing code in the volume package */
+@Module
+interface AudioSharingModule {
+
+ companion object {
+ @Provides
+ @SysUISingleton
+ fun provideAudioSharingInteractor(
+ @Application coroutineScope: CoroutineScope,
+ repository: AudioSharingRepository
+ ): AudioSharingInteractor = AudioSharingInteractorImpl(coroutineScope, repository)
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/volume/dagger/VolumeModule.java b/packages/SystemUI/src/com/android/systemui/volume/dagger/VolumeModule.java
index 5420988b8faf..ebb9ce9909bd 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/dagger/VolumeModule.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/dagger/VolumeModule.java
@@ -59,6 +59,7 @@ import dagger.multibindings.IntoSet;
@Module(
includes = {
AudioModule.class,
+ AudioSharingModule.class,
AncModule.class,
CaptioningModule.class,
MediaDevicesModule.class,
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
new file mode 100644
index 000000000000..aba3015a6b7d
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/volume/domain/interactor/AudioSharingInteractor.kt
@@ -0,0 +1,90 @@
+/*
+ * 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.bluetooth.BluetoothCsipSetCoordinator
+import androidx.annotation.IntRange
+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
+import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.dagger.qualifiers.Application
+import javax.inject.Inject
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.combine
+import kotlinx.coroutines.flow.emptyFlow
+import kotlinx.coroutines.launch
+
+interface AudioSharingInteractor {
+ /** Audio sharing secondary headset volume changes. */
+ val volume: Flow<Int?>
+
+ /** Audio sharing secondary headset min volume. */
+ val volumeMin: Int
+
+ /** Audio sharing secondary headset max volume. */
+ val volumeMax: Int
+
+ /** 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())
+ level: Int
+ )
+}
+
+@SysUISingleton
+class AudioSharingInteractorImpl
+@Inject
+constructor(
+ @Application private val coroutineScope: CoroutineScope,
+ private val audioSharingRepository: AudioSharingRepository
+) : AudioSharingInteractor {
+
+ override val volume: Flow<Int?> =
+ combine(audioSharingRepository.secondaryGroupId, audioSharingRepository.volumeMap) {
+ secondaryGroupId,
+ volumeMap ->
+ if (secondaryGroupId == BluetoothCsipSetCoordinator.GROUP_ID_INVALID) null
+ else volumeMap.getOrDefault(secondaryGroupId, DEFAULT_VOLUME)
+ }
+
+ override val volumeMin: Int = AUDIO_SHARING_VOLUME_MIN
+
+ override val volumeMax: Int = AUDIO_SHARING_VOLUME_MAX
+
+ override fun setStreamVolume(level: Int) {
+ coroutineScope.launch { audioSharingRepository.setSecondaryVolume(level) }
+ }
+
+ private companion object {
+ const val DEFAULT_VOLUME = 20
+ }
+}
+
+@SysUISingleton
+class AudioSharingInteractorEmptyImpl @Inject constructor() : AudioSharingInteractor {
+ override val volume: Flow<Int?> = emptyFlow()
+ override val volumeMin: Int = EMPTY_VOLUME
+ override val volumeMax: Int = EMPTY_VOLUME
+
+ override fun setStreamVolume(level: Int) {}
+
+ private companion object {
+ const val EMPTY_VOLUME = 0
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/wmshell/WMShell.java b/packages/SystemUI/src/com/android/systemui/wmshell/WMShell.java
index 3f1ec85ae99a..14cd202b7ce6 100644
--- a/packages/SystemUI/src/com/android/systemui/wmshell/WMShell.java
+++ b/packages/SystemUI/src/com/android/systemui/wmshell/WMShell.java
@@ -283,6 +283,11 @@ public final class WMShell implements
public void onFinishedWakingUp() {
splitScreen.onFinishedWakingUp();
}
+
+ @Override
+ public void onStartedGoingToSleep() {
+ splitScreen.onStartedGoingToSleep();
+ }
});
mCommandQueue.addCallback(new CommandQueue.Callbacks() {
@Override
diff --git a/packages/SystemUI/tests/src/com/android/keyguard/ClockEventControllerTest.kt b/packages/SystemUI/tests/src/com/android/keyguard/ClockEventControllerTest.kt
index 79933ee3b018..a94ef36bda29 100644
--- a/packages/SystemUI/tests/src/com/android/keyguard/ClockEventControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/keyguard/ClockEventControllerTest.kt
@@ -16,6 +16,7 @@
package com.android.keyguard
import android.content.BroadcastReceiver
+import android.platform.test.annotations.DisableFlags
import android.view.View
import android.view.ViewTreeObserver
import android.widget.FrameLayout
@@ -263,9 +264,9 @@ class ClockEventControllerTest : SysuiTestCase() {
}
@Test
+ @DisableFlags(AConfigFlags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
fun keyguardCallback_visibilityChanged_clockDozeCalled() =
runBlocking(IMMEDIATE) {
- mSetFlagsRule.disableFlags(AConfigFlags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
val captor = argumentCaptor<KeyguardUpdateMonitorCallback>()
verify(keyguardUpdateMonitor).registerCallback(capture(captor))
diff --git a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardClockSwitchControllerTest.java b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardClockSwitchControllerTest.java
index 1d7816848cd0..892375d002c1 100644
--- a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardClockSwitchControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardClockSwitchControllerTest.java
@@ -29,6 +29,7 @@ import static org.mockito.Mockito.when;
import android.database.ContentObserver;
import android.os.UserHandle;
+import android.platform.test.annotations.DisableFlags;
import android.provider.Settings;
import android.view.View;
@@ -48,11 +49,10 @@ import org.mockito.verification.VerificationMode;
@SmallTest
@RunWith(AndroidJUnit4.class)
+@DisableFlags(Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public class KeyguardClockSwitchControllerTest extends KeyguardClockSwitchControllerBaseTest {
@Test
public void testInit_viewAlreadyAttached() {
- mSetFlagsRule.disableFlags(Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT);
-
mController.init();
verifyAttachment(times(1));
@@ -60,8 +60,6 @@ public class KeyguardClockSwitchControllerTest extends KeyguardClockSwitchContro
@Test
public void testInit_viewNotYetAttached() {
- mSetFlagsRule.disableFlags(Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT);
-
ArgumentCaptor<View.OnAttachStateChangeListener> listenerArgumentCaptor =
ArgumentCaptor.forClass(View.OnAttachStateChangeListener.class);
@@ -78,16 +76,12 @@ public class KeyguardClockSwitchControllerTest extends KeyguardClockSwitchContro
@Test
public void testInitSubControllers() {
- mSetFlagsRule.disableFlags(Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT);
-
mController.init();
verify(mKeyguardSliceViewController).init();
}
@Test
public void testInit_viewDetached() {
- mSetFlagsRule.disableFlags(Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT);
-
ArgumentCaptor<View.OnAttachStateChangeListener> listenerArgumentCaptor =
ArgumentCaptor.forClass(View.OnAttachStateChangeListener.class);
mController.init();
@@ -101,8 +95,6 @@ public class KeyguardClockSwitchControllerTest extends KeyguardClockSwitchContro
@Test
public void testPluginPassesStatusBarState() {
- mSetFlagsRule.disableFlags(Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT);
-
ArgumentCaptor<ClockRegistry.ClockChangeListener> listenerArgumentCaptor =
ArgumentCaptor.forClass(ClockRegistry.ClockChangeListener.class);
@@ -116,8 +108,6 @@ public class KeyguardClockSwitchControllerTest extends KeyguardClockSwitchContro
@Test
public void testSmartspaceEnabledRemovesKeyguardStatusArea() {
- mSetFlagsRule.disableFlags(Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT);
-
when(mSmartspaceController.isEnabled()).thenReturn(true);
mController.init();
@@ -126,8 +116,6 @@ public class KeyguardClockSwitchControllerTest extends KeyguardClockSwitchContro
@Test
public void onLocaleListChangedRebuildsSmartspaceView() {
- mSetFlagsRule.disableFlags(Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT);
-
when(mSmartspaceController.isEnabled()).thenReturn(true);
mController.init();
@@ -138,8 +126,6 @@ public class KeyguardClockSwitchControllerTest extends KeyguardClockSwitchContro
@Test
public void onLocaleListChanged_rebuildsSmartspaceViews_whenDecouplingEnabled() {
- mSetFlagsRule.disableFlags(Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT);
-
when(mSmartspaceController.isEnabled()).thenReturn(true);
when(mSmartspaceController.isDateWeatherDecoupled()).thenReturn(true);
mController.init();
@@ -153,8 +139,6 @@ public class KeyguardClockSwitchControllerTest extends KeyguardClockSwitchContro
@Test
public void testSmartspaceDisabledShowsKeyguardStatusArea() {
- mSetFlagsRule.disableFlags(Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT);
-
when(mSmartspaceController.isEnabled()).thenReturn(false);
mController.init();
@@ -163,8 +147,6 @@ public class KeyguardClockSwitchControllerTest extends KeyguardClockSwitchContro
@Test
public void testRefresh() {
- mSetFlagsRule.disableFlags(Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT);
-
mController.refresh();
verify(mSmartspaceController).requestSmartspaceUpdate();
@@ -172,8 +154,6 @@ public class KeyguardClockSwitchControllerTest extends KeyguardClockSwitchContro
@Test
public void testChangeToDoubleLineClockSetsSmallClock() {
- mSetFlagsRule.disableFlags(Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT);
-
when(mSecureSettings.getIntForUser(Settings.Secure.LOCKSCREEN_USE_DOUBLE_LINE_CLOCK, 1,
UserHandle.USER_CURRENT))
.thenReturn(0);
@@ -197,15 +177,11 @@ public class KeyguardClockSwitchControllerTest extends KeyguardClockSwitchContro
@Test
public void testGetClock_ForwardsToClock() {
- mSetFlagsRule.disableFlags(Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT);
-
assertEquals(mClockController, mController.getClock());
}
@Test
public void testGetLargeClockBottom_returnsExpectedValue() {
- mSetFlagsRule.disableFlags(Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT);
-
when(mLargeClockFrame.getVisibility()).thenReturn(View.VISIBLE);
when(mLargeClockFrame.getHeight()).thenReturn(100);
when(mSmallClockFrame.getHeight()).thenReturn(50);
@@ -218,8 +194,6 @@ public class KeyguardClockSwitchControllerTest extends KeyguardClockSwitchContro
@Test
public void testGetSmallLargeClockBottom_returnsExpectedValue() {
- mSetFlagsRule.disableFlags(Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT);
-
when(mLargeClockFrame.getVisibility()).thenReturn(View.GONE);
when(mLargeClockFrame.getHeight()).thenReturn(100);
when(mSmallClockFrame.getHeight()).thenReturn(50);
@@ -232,16 +206,12 @@ public class KeyguardClockSwitchControllerTest extends KeyguardClockSwitchContro
@Test
public void testGetClockBottom_nullClock_returnsZero() {
- mSetFlagsRule.disableFlags(Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT);
-
when(mClockEventController.getClock()).thenReturn(null);
assertEquals(0, mController.getClockBottom(10));
}
@Test
public void testChangeLockscreenWeatherEnabledSetsWeatherViewVisible() {
- mSetFlagsRule.disableFlags(Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT);
-
when(mSmartspaceController.isWeatherEnabled()).thenReturn(true);
ArgumentCaptor<ContentObserver> observerCaptor =
ArgumentCaptor.forClass(ContentObserver.class);
@@ -260,8 +230,6 @@ public class KeyguardClockSwitchControllerTest extends KeyguardClockSwitchContro
@Test
public void testChangeClockDateWeatherEnabled_SetsDateWeatherViewVisibility() {
- mSetFlagsRule.disableFlags(Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT);
-
ArgumentCaptor<ClockRegistry.ClockChangeListener> listenerArgumentCaptor =
ArgumentCaptor.forClass(ClockRegistry.ClockChangeListener.class);
when(mSmartspaceController.isEnabled()).thenReturn(true);
@@ -284,15 +252,11 @@ public class KeyguardClockSwitchControllerTest extends KeyguardClockSwitchContro
@Test
public void testGetClock_nullClock_returnsNull() {
- mSetFlagsRule.disableFlags(Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT);
-
when(mClockEventController.getClock()).thenReturn(null);
assertNull(mController.getClock());
}
private void verifyAttachment(VerificationMode times) {
- mSetFlagsRule.disableFlags(Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT);
-
verify(mClockRegistry, times).registerClockChangeListener(
any(ClockRegistry.ClockChangeListener.class));
verify(mClockEventController, times).registerListeners(mView);
@@ -300,8 +264,6 @@ public class KeyguardClockSwitchControllerTest extends KeyguardClockSwitchContro
@Test
public void testSplitShadeEnabledSetToSmartspaceController() {
- mSetFlagsRule.disableFlags(Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT);
-
mController.setSplitShadeEnabled(true);
verify(mSmartspaceController, times(1)).setSplitShadeEnabled(true);
verify(mSmartspaceController, times(0)).setSplitShadeEnabled(false);
@@ -309,8 +271,6 @@ public class KeyguardClockSwitchControllerTest extends KeyguardClockSwitchContro
@Test
public void testSplitShadeDisabledSetToSmartspaceController() {
- mSetFlagsRule.disableFlags(Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT);
-
mController.setSplitShadeEnabled(false);
verify(mSmartspaceController, times(1)).setSplitShadeEnabled(false);
verify(mSmartspaceController, times(0)).setSplitShadeEnabled(true);
diff --git a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardClockSwitchTest.java b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardClockSwitchTest.java
index 83443bee744e..0bf9d12a09d5 100644
--- a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardClockSwitchTest.java
+++ b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardClockSwitchTest.java
@@ -30,6 +30,7 @@ import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import android.content.Context;
+import android.platform.test.annotations.DisableFlags;
import android.testing.TestableLooper.RunWithLooper;
import android.util.AttributeSet;
import android.view.LayoutInflater;
@@ -60,6 +61,7 @@ import org.mockito.MockitoAnnotations;
// the main thread before acquiring a wake lock. This class is constructed when
// the keyguard_clock_switch layout is inflated.
@RunWithLooper(setAsMainLooper = true)
+@DisableFlags(Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public class KeyguardClockSwitchTest extends SysuiTestCase {
@Mock
ViewGroup mMockKeyguardSliceView;
@@ -81,8 +83,6 @@ public class KeyguardClockSwitchTest extends SysuiTestCase {
@Before
public void setUp() {
- mSetFlagsRule.disableFlags(Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT);
-
MockitoAnnotations.initMocks(this);
when(mMockKeyguardSliceView.getContext()).thenReturn(mContext);
when(mMockKeyguardSliceView.findViewById(R.id.keyguard_status_area))
diff --git a/packages/SystemUI/tests/src/com/android/keyguard/LegacyLockIconViewControllerBaseTest.java b/packages/SystemUI/tests/src/com/android/keyguard/LegacyLockIconViewControllerBaseTest.java
index b09357f853b9..c51aa04fc7b6 100644
--- a/packages/SystemUI/tests/src/com/android/keyguard/LegacyLockIconViewControllerBaseTest.java
+++ b/packages/SystemUI/tests/src/com/android/keyguard/LegacyLockIconViewControllerBaseTest.java
@@ -151,6 +151,7 @@ public class LegacyLockIconViewControllerBaseTest extends SysuiTestCase {
if (!SceneContainerFlag.isEnabled()) {
mSetFlagsRule.disableFlags(Flags.FLAG_KEYGUARD_BOTTOM_AREA_REFACTOR);
+ //TODO move this to use @DisableFlags annotation if needed
mSetFlagsRule.disableFlags(Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT);
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/accessibility/MagnificationTest.java b/packages/SystemUI/tests/src/com/android/systemui/accessibility/MagnificationTest.java
index 41a41164b2a5..038b81b34d77 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/accessibility/MagnificationTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/accessibility/MagnificationTest.java
@@ -216,6 +216,16 @@ public class MagnificationTest extends SysuiTestCase {
}
@Test
+ public void onRestoreWindowSize_updateSettingsButtonStatusOnRestore() {
+ mMagnification.mWindowMagnifierCallback
+ .onWindowMagnifierBoundsRestored(TEST_DISPLAY, MagnificationSize.SMALL);
+ waitForIdleSync();
+
+ verify(mMagnificationSettingsController)
+ .updateSettingsButtonStatusOnRestore(MagnificationSize.SMALL);
+ }
+
+ @Test
public void onSetMagnifierSize_delegateToMagnifier() {
final @MagnificationSize int index = MagnificationSize.SMALL;
mMagnification.mMagnificationSettingsControllerCallback.onSetMagnifierSize(
diff --git a/packages/SystemUI/tests/src/com/android/systemui/accessibility/TestableWindowManager.java b/packages/SystemUI/tests/src/com/android/systemui/accessibility/TestableWindowManager.java
index b23dfdc68a87..859517839388 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/accessibility/TestableWindowManager.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/accessibility/TestableWindowManager.java
@@ -21,6 +21,7 @@ import android.graphics.Rect;
import android.graphics.Region;
import android.os.IBinder;
import android.view.Display;
+import android.view.KeyboardShortcutGroup;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowInsets;
@@ -55,6 +56,11 @@ public class TestableWindowManager implements WindowManager {
}
@Override
+ public KeyboardShortcutGroup getApplicationLaunchKeyboardShortcuts(int deviceId) {
+ return mWindowManager.getApplicationLaunchKeyboardShortcuts(deviceId);
+ }
+
+ @Override
public Region getCurrentImeTouchRegion() {
return mWindowManager.getCurrentImeTouchRegion();
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/accessibility/WindowMagnificationControllerWindowlessMagnifierTest.java b/packages/SystemUI/tests/src/com/android/systemui/accessibility/WindowMagnificationControllerWindowlessMagnifierTest.java
index e27268292763..e01366a9e594 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/accessibility/WindowMagnificationControllerWindowlessMagnifierTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/accessibility/WindowMagnificationControllerWindowlessMagnifierTest.java
@@ -67,9 +67,8 @@ import android.graphics.Rect;
import android.os.Handler;
import android.os.RemoteException;
import android.os.SystemClock;
-import android.platform.test.annotations.RequiresFlagsEnabled;
-import android.platform.test.flag.junit.CheckFlagsRule;
-import android.platform.test.flag.junit.DeviceFlagsValueProvider;
+import android.platform.test.annotations.DisableFlags;
+import android.platform.test.annotations.EnableFlags;
import android.provider.Settings;
import android.testing.TestableLooper;
import android.testing.TestableResources;
@@ -130,14 +129,12 @@ import java.util.function.Supplier;
@LargeTest
@TestableLooper.RunWithLooper
@RunWith(AndroidJUnit4.class)
-@RequiresFlagsEnabled(Flags.FLAG_CREATE_WINDOWLESS_WINDOW_MAGNIFIER)
+@EnableFlags(Flags.FLAG_CREATE_WINDOWLESS_WINDOW_MAGNIFIER)
public class WindowMagnificationControllerWindowlessMagnifierTest extends SysuiTestCase {
@Rule
// NOTE: pass 'null' to allow this test advances time on the main thread.
public final AnimatorTestRule mAnimatorTestRule = new AnimatorTestRule(/* test= */ null);
- @Rule
- public final CheckFlagsRule mCheckFlagsRule = DeviceFlagsValueProvider.createCheckFlagsRule();
private static final int LAYOUT_CHANGE_TIMEOUT_MS = 5000;
@Mock
@@ -625,6 +622,7 @@ public class WindowMagnificationControllerWindowlessMagnifierTest extends SysuiT
0);
}
+ @DisableFlags(Flags.FLAG_SAVE_AND_RESTORE_MAGNIFICATION_SETTINGS_BUTTONS)
@Test
public void onScreenSizeAndDensityChanged_enabled_restoreSavedMagnifierWindow() {
int newSmallestScreenWidthDp =
@@ -663,6 +661,50 @@ public class WindowMagnificationControllerWindowlessMagnifierTest extends SysuiT
assertTrue(params.height == (windowFrameSize + 2 * mirrorSurfaceMargin));
}
+ @EnableFlags(Flags.FLAG_SAVE_AND_RESTORE_MAGNIFICATION_SETTINGS_BUTTONS)
+ @Test
+ public void onScreenSizeAndDensityChanged_enabled_restoreSavedMagnifierIndexAndWindow() {
+ int newSmallestScreenWidthDp =
+ mContext.getResources().getConfiguration().smallestScreenWidthDp * 2;
+ int windowFrameSize = mResources.getDimensionPixelSize(
+ com.android.internal.R.dimen.accessibility_window_magnifier_min_size);
+ Size preferredWindowSize = new Size(windowFrameSize, windowFrameSize);
+ mSharedPreferences
+ .edit()
+ .putString(String.valueOf(newSmallestScreenWidthDp),
+ WindowMagnificationFrameSpec.serialize(
+ WindowMagnificationSettings.MagnificationSize.CUSTOM,
+ preferredWindowSize))
+ .commit();
+ mInstrumentation.runOnMainSync(() -> {
+ mWindowMagnificationController.updateWindowMagnificationInternal(Float.NaN, Float.NaN,
+ Float.NaN);
+ });
+
+ // Screen density and size change
+ mContext.getResources().getConfiguration().smallestScreenWidthDp = newSmallestScreenWidthDp;
+ final Rect testWindowBounds = new Rect(
+ mWindowManager.getCurrentWindowMetrics().getBounds());
+ testWindowBounds.set(testWindowBounds.left, testWindowBounds.top,
+ testWindowBounds.right + 100, testWindowBounds.bottom + 100);
+ mWindowManager.setWindowBounds(testWindowBounds);
+ mInstrumentation.runOnMainSync(() -> {
+ mWindowMagnificationController.onConfigurationChanged(ActivityInfo.CONFIG_SCREEN_SIZE);
+ });
+
+ // wait for rect update
+ waitForIdleSync();
+ verify(mWindowMagnifierCallback).onWindowMagnifierBoundsRestored(
+ eq(mContext.getDisplayId()),
+ eq(WindowMagnificationSettings.MagnificationSize.CUSTOM));
+ ViewGroup.LayoutParams params = mSurfaceControlViewHost.getView().getLayoutParams();
+ final int mirrorSurfaceMargin = mResources.getDimensionPixelSize(
+ R.dimen.magnification_mirror_surface_margin);
+ // The width and height of the view include the magnification frame and the margins.
+ assertTrue(params.width == (windowFrameSize + 2 * mirrorSurfaceMargin));
+ assertTrue(params.height == (windowFrameSize + 2 * mirrorSurfaceMargin));
+ }
+
@Test
public void screenSizeIsChangedToLarge_enabled_defaultWindowSize() {
mInstrumentation.runOnMainSync(() -> {
diff --git a/packages/SystemUI/tests/src/com/android/systemui/accessibility/WindowMagnificationFrameSizePrefsTest.java b/packages/SystemUI/tests/src/com/android/systemui/accessibility/WindowMagnificationFrameSizePrefsTest.java
index ad9053a7edda..944066fa4954 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/accessibility/WindowMagnificationFrameSizePrefsTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/accessibility/WindowMagnificationFrameSizePrefsTest.java
@@ -16,6 +16,8 @@
package com.android.systemui.accessibility;
+import static com.android.systemui.accessibility.WindowMagnificationSettings.MagnificationSize;
+
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.ArgumentMatchers.anyInt;
@@ -23,12 +25,15 @@ import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.when;
+import android.platform.test.annotations.DisableFlags;
+import android.platform.test.annotations.EnableFlags;
import android.testing.TestableLooper;
import android.util.Size;
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.util.FakeSharedPreferences;
@@ -54,19 +59,59 @@ public class WindowMagnificationFrameSizePrefsTest extends SysuiTestCase {
mWindowMagnificationFrameSizePrefs = new WindowMagnificationFrameSizePrefs(mContext);
}
+ @DisableFlags(Flags.FLAG_SAVE_AND_RESTORE_MAGNIFICATION_SETTINGS_BUTTONS)
@Test
public void saveSizeForCurrentDensity_getExpectedSize() {
Size testSize = new Size(500, 500);
- mWindowMagnificationFrameSizePrefs.saveSizeForCurrentDensity(testSize);
+ mWindowMagnificationFrameSizePrefs
+ .saveIndexAndSizeForCurrentDensity(MagnificationSize.CUSTOM, testSize);
assertThat(mWindowMagnificationFrameSizePrefs.getSizeForCurrentDensity())
.isEqualTo(testSize);
}
+ @EnableFlags(Flags.FLAG_SAVE_AND_RESTORE_MAGNIFICATION_SETTINGS_BUTTONS)
+ @Test
+ public void saveSizeForCurrentDensity_validPreference_getExpectedSize() {
+ int testIndex = MagnificationSize.MEDIUM;
+ Size testSize = new Size(500, 500);
+ mWindowMagnificationFrameSizePrefs.saveIndexAndSizeForCurrentDensity(testIndex, testSize);
+
+ assertThat(mWindowMagnificationFrameSizePrefs.getSizeForCurrentDensity())
+ .isEqualTo(testSize);
+ }
+
+ @EnableFlags(Flags.FLAG_SAVE_AND_RESTORE_MAGNIFICATION_SETTINGS_BUTTONS)
+ @Test
+ public void saveSizeForCurrentDensity_validPreference_getExpectedIndex() {
+ int testIndex = MagnificationSize.MEDIUM;
+ Size testSize = new Size(500, 500);
+ mWindowMagnificationFrameSizePrefs.saveIndexAndSizeForCurrentDensity(testIndex, testSize);
+
+ assertThat(mWindowMagnificationFrameSizePrefs.getIndexForCurrentDensity())
+ .isEqualTo(testIndex);
+ }
+
+ @EnableFlags(Flags.FLAG_SAVE_AND_RESTORE_MAGNIFICATION_SETTINGS_BUTTONS)
+ @Test
+ public void saveSizeForCurrentDensity_invalidPreference_getDefaultIndex() {
+ mSharedPreferences
+ .edit()
+ .putString(
+ String.valueOf(
+ mContext.getResources().getConfiguration().smallestScreenWidthDp),
+ "100x200")
+ .commit();
+
+ assertThat(mWindowMagnificationFrameSizePrefs.getIndexForCurrentDensity())
+ .isEqualTo(MagnificationSize.DEFAULT);
+ }
+
@Test
public void saveSizeForCurrentDensity_containsPreferenceForCurrentDensity() {
+ int testIndex = MagnificationSize.MEDIUM;
Size testSize = new Size(500, 500);
- mWindowMagnificationFrameSizePrefs.saveSizeForCurrentDensity(testSize);
+ mWindowMagnificationFrameSizePrefs.saveIndexAndSizeForCurrentDensity(testIndex, testSize);
assertThat(mWindowMagnificationFrameSizePrefs.isPreferenceSavedForCurrentDensity())
.isTrue();
diff --git a/packages/SystemUI/tests/src/com/android/systemui/accessibility/WindowMagnificationFrameSpecTest.kt b/packages/SystemUI/tests/src/com/android/systemui/accessibility/WindowMagnificationFrameSpecTest.kt
new file mode 100644
index 000000000000..791a26ed761d
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/accessibility/WindowMagnificationFrameSpecTest.kt
@@ -0,0 +1,51 @@
+/*
+ * 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.accessibility
+
+import android.testing.AndroidTestingRunner
+import android.util.Size
+import androidx.test.filters.SmallTest
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.accessibility.WindowMagnificationSettings.MagnificationSize
+import com.google.common.truth.Truth.assertThat
+import org.junit.Test
+import org.junit.runner.RunWith
+
+@SmallTest
+@RunWith(AndroidTestingRunner::class)
+class WindowMagnificationFrameSpecTest : SysuiTestCase() {
+
+ @Test
+ fun deserializeSpec_validSpec_expectedIndex() {
+ val targetIndex = MagnificationSize.LARGE
+ val targetSize = Size(100, 200)
+ val targetPreference = WindowMagnificationFrameSpec.serialize(targetIndex, targetSize)
+
+ assertThat(WindowMagnificationFrameSpec.deserialize(targetPreference).index)
+ .isEqualTo(targetIndex)
+ }
+
+ @Test
+ fun deserializeSpec_validSpec_expectedSize() {
+ val targetIndex = MagnificationSize.LARGE
+ val targetSize = Size(100, 200)
+ val targetPreference = WindowMagnificationFrameSpec.serialize(targetIndex, targetSize)
+
+ assertThat(WindowMagnificationFrameSpec.deserialize(targetPreference).size)
+ .isEqualTo(targetSize)
+ }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/accessibility/floatingmenu/MenuViewLayerTest.java b/packages/SystemUI/tests/src/com/android/systemui/accessibility/floatingmenu/MenuViewLayerTest.java
index c30bedde557d..12140b58936b 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/accessibility/floatingmenu/MenuViewLayerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/accessibility/floatingmenu/MenuViewLayerTest.java
@@ -288,7 +288,7 @@ public class MenuViewLayerTest extends SysuiTestCase {
mockActivityQuery(true);
mMenuViewLayer.dispatchAccessibilityAction(R.id.action_edit);
ArgumentCaptor<Intent> intentCaptor = ArgumentCaptor.forClass(Intent.class);
- verify(mSpyContext).startActivity(intentCaptor.capture());
+ verify(mSpyContext).startActivityAsUser(intentCaptor.capture(), eq(UserHandle.CURRENT));
assertThat(intentCaptor.getValue().getAction()).isEqualTo(
mMenuViewLayer.getIntentForEditScreen().getAction());
}
@@ -299,6 +299,7 @@ public class MenuViewLayerTest extends SysuiTestCase {
mockActivityQuery(false);
mMenuViewLayer.dispatchAccessibilityAction(R.id.action_edit);
verify(mSpyContext, never()).startActivity(any());
+ verify(mSpyContext, never()).startActivityAsUser(any(), any());
}
@Test
diff --git a/packages/SystemUI/tests/src/com/android/systemui/accessibility/hearingaid/HearingDevicesDialogDelegateTest.java b/packages/SystemUI/tests/src/com/android/systemui/accessibility/hearingaid/HearingDevicesDialogDelegateTest.java
index 8f7dc7cf109b..5ea5c2189560 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/accessibility/hearingaid/HearingDevicesDialogDelegateTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/accessibility/hearingaid/HearingDevicesDialogDelegateTest.java
@@ -16,8 +16,9 @@
package com.android.systemui.accessibility.hearingaid;
+import static android.bluetooth.BluetoothHapClient.PRESET_INDEX_UNAVAILABLE;
+
import static com.android.systemui.accessibility.hearingaid.HearingDevicesDialogDelegate.LIVE_CAPTION_INTENT;
-import static com.android.systemui.statusbar.phone.SystemUIDialog.DEFAULT_DISMISS_ON_DEVICE_LOCK;
import static com.google.common.truth.Truth.assertThat;
@@ -26,9 +27,13 @@ import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.ArgumentMatchers.anyLong;
import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
+import android.bluetooth.BluetoothDevice;
+import android.bluetooth.BluetoothHapPresetInfo;
+import android.bluetooth.BluetoothProfile;
import android.content.ComponentName;
import android.content.Intent;
import android.content.pm.ActivityInfo;
@@ -42,6 +47,7 @@ import android.provider.Settings;
import android.testing.TestableLooper;
import android.view.View;
import android.widget.LinearLayout;
+import android.widget.Spinner;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
@@ -86,14 +92,15 @@ public class HearingDevicesDialogDelegateTest extends SysuiTestCase {
public MockitoRule mockito = MockitoJUnit.rule();
private static final String DEVICE_ADDRESS = "AA:BB:CC:DD:EE:FF";
+ private static final String DEVICE_NAME = "test_name";
private static final String TEST_PKG = "pkg";
private static final String TEST_CLS = "cls";
private static final ComponentName TEST_COMPONENT = new ComponentName(TEST_PKG, TEST_CLS);
private static final String TEST_LABEL = "label";
+ private static final int TEST_PRESET_INDEX = 1;
+ private static final String TEST_PRESET_NAME = "test_preset";
@Mock
- private SystemUIDialog.Factory mSystemUIDialogFactory;
- @Mock
private SystemUIDialogManager mSystemUIDialogManager;
@Mock
private SysUiState mSysUiState;
@@ -118,6 +125,8 @@ public class HearingDevicesDialogDelegateTest extends SysuiTestCase {
@Mock
private CachedBluetoothDevice mCachedDevice;
@Mock
+ private BluetoothDevice mDevice;
+ @Mock
private DeviceItem mHearingDeviceItem;
@Mock
private PackageManager mPackageManager;
@@ -125,7 +134,10 @@ public class HearingDevicesDialogDelegateTest extends SysuiTestCase {
private ActivityInfo mActivityInfo;
@Mock
private Drawable mDrawable;
+ @Mock
+ private HearingDevicesPresetsController mPresetsController;
private SystemUIDialog mDialog;
+ private SystemUIDialog.Factory mDialogFactory;
private HearingDevicesDialogDelegate mDialogDelegate;
private TestableLooper mTestableLooper;
private final List<CachedBluetoothDevice> mDevices = new ArrayList<>();
@@ -141,23 +153,23 @@ public class HearingDevicesDialogDelegateTest extends SysuiTestCase {
when(mCachedDeviceManager.getCachedDevicesCopy()).thenReturn(mDevices);
when(mLocalBluetoothManager.getEventManager()).thenReturn(mBluetoothEventManager);
when(mSysUiState.setFlag(anyLong(), anyBoolean())).thenReturn(mSysUiState);
+ when(mDevice.getBondState()).thenReturn(BluetoothDevice.BOND_BONDED);
+ when(mDevice.isConnected()).thenReturn(true);
+ when(mCachedDevice.getDevice()).thenReturn(mDevice);
when(mCachedDevice.getAddress()).thenReturn(DEVICE_ADDRESS);
+ when(mCachedDevice.getName()).thenReturn(DEVICE_NAME);
+ when(mCachedDevice.isActiveDevice(BluetoothProfile.HEARING_AID)).thenReturn(true);
+ when(mCachedDevice.isConnectedHearingAidDevice()).thenReturn(true);
+ when(mCachedDevice.isConnectedHapClientDevice()).thenReturn(true);
when(mHearingDeviceItem.getCachedBluetoothDevice()).thenReturn(mCachedDevice);
- mContext.setMockPackageManager(mPackageManager);
-
- setUpPairNewDeviceDialog();
- when(mSystemUIDialogFactory.create(any(SystemUIDialog.Delegate.class)))
- .thenReturn(mDialog);
- }
-
- @Test
- public void createDialog_dialogShown() {
- assertThat(mDialogDelegate.createDialog()).isEqualTo(mDialog);
+ mContext.setMockPackageManager(mPackageManager);
+ mDevices.add(mCachedDevice);
}
@Test
public void clickPairNewDeviceButton_intentActionMatch() {
+ setUpPairNewDeviceDialog();
mDialog.show();
getPairNewDeviceButton(mDialog).performClick();
@@ -185,6 +197,7 @@ public class HearingDevicesDialogDelegateTest extends SysuiTestCase {
@Test
public void onDeviceItemOnClicked_connectedDevice_disconnect() {
+ setUpDeviceListDialog();
when(mHearingDeviceItem.getType()).thenReturn(DeviceItemType.CONNECTED_BLUETOOTH_DEVICE);
mDialogDelegate.onDeviceItemOnClicked(mHearingDeviceItem, new View(mContext));
@@ -231,50 +244,100 @@ public class HearingDevicesDialogDelegateTest extends SysuiTestCase {
assertThat(relatedToolsView.getChildCount()).isEqualTo(2);
}
+ @Test
+ public void showDialog_noPreset_presetGone() {
+ when(mPresetsController.getAllPresetInfo()).thenReturn(new ArrayList<>());
+ when(mPresetsController.getActivePresetIndex()).thenReturn(PRESET_INDEX_UNAVAILABLE);
+
+ setUpDeviceListDialog();
+ mDialog.show();
+
+ Spinner spinner = (Spinner) getPresetSpinner(mDialog);
+ assertThat(spinner.getVisibility()).isEqualTo(View.GONE);
+ }
+
+ @Test
+ public void showDialog_presetExist_presetSelected() {
+ BluetoothHapPresetInfo info = getTestPresetInfo();
+ when(mPresetsController.getAllPresetInfo()).thenReturn(List.of(info));
+ when(mPresetsController.getActivePresetIndex()).thenReturn(TEST_PRESET_INDEX);
+
+ setUpDeviceListDialog();
+ mDialog.show();
+
+ Spinner spinner = (Spinner) getPresetSpinner(mDialog);
+ assertThat(spinner.getVisibility()).isEqualTo(View.VISIBLE);
+ assertThat(spinner.getSelectedItemPosition()).isEqualTo(0);
+ }
+
+ @Test
+ public void onActiveDeviceChanged_presetExist_presetSelected() {
+ setUpDeviceListDialog();
+ mDialog.show();
+ BluetoothHapPresetInfo info = getTestPresetInfo();
+ when(mPresetsController.getAllPresetInfo()).thenReturn(List.of(info));
+ when(mPresetsController.getActivePresetIndex()).thenReturn(TEST_PRESET_INDEX);
+
+ mDialogDelegate.onActiveDeviceChanged(mCachedDevice, BluetoothProfile.LE_AUDIO);
+ mTestableLooper.processAllMessages();
+
+ Spinner spinner = (Spinner) getPresetSpinner(mDialog);
+ assertThat(spinner.getVisibility()).isEqualTo(View.VISIBLE);
+ assertThat(spinner.getSelectedItemPosition()).isEqualTo(0);
+ }
+
+
+
private void setUpPairNewDeviceDialog() {
+ mDialogFactory = new SystemUIDialog.Factory(
+ mContext,
+ mSystemUIDialogManager,
+ mSysUiState,
+ getFakeBroadcastDispatcher(),
+ mDialogTransitionAnimator
+ );
mDialogDelegate = new HearingDevicesDialogDelegate(
mContext,
true,
- mSystemUIDialogFactory,
+ mDialogFactory,
mActivityStarter,
mDialogTransitionAnimator,
mLocalBluetoothManager,
new Handler(mTestableLooper.getLooper()),
mAudioManager
);
- mDialog = new SystemUIDialog(
+
+ mDialog = mDialogDelegate.createDialog();
+ }
+
+ private void setUpDeviceListDialog() {
+ mDialogFactory = new SystemUIDialog.Factory(
mContext,
- 0,
- DEFAULT_DISMISS_ON_DEVICE_LOCK,
mSystemUIDialogManager,
mSysUiState,
getFakeBroadcastDispatcher(),
- mDialogTransitionAnimator,
- mDialogDelegate
+ mDialogTransitionAnimator
);
- }
-
- private void setUpDeviceListDialog() {
mDialogDelegate = new HearingDevicesDialogDelegate(
mContext,
false,
- mSystemUIDialogFactory,
+ mDialogFactory,
mActivityStarter,
mDialogTransitionAnimator,
mLocalBluetoothManager,
new Handler(mTestableLooper.getLooper()),
mAudioManager
);
- mDialog = new SystemUIDialog(
- mContext,
- 0,
- DEFAULT_DISMISS_ON_DEVICE_LOCK,
- mSystemUIDialogManager,
- mSysUiState,
- getFakeBroadcastDispatcher(),
- mDialogTransitionAnimator,
- mDialogDelegate
- );
+
+ mDialog = mDialogDelegate.createDialog();
+ mDialogDelegate.setHearingDevicesPresetsController(mPresetsController);
+ }
+
+ private BluetoothHapPresetInfo getTestPresetInfo() {
+ BluetoothHapPresetInfo info = mock(BluetoothHapPresetInfo.class);
+ when(info.getName()).thenReturn(TEST_PRESET_NAME);
+ when(info.getIndex()).thenReturn(TEST_PRESET_INDEX);
+ return info;
}
private View getPairNewDeviceButton(SystemUIDialog dialog) {
@@ -285,6 +348,10 @@ public class HearingDevicesDialogDelegateTest extends SysuiTestCase {
return dialog.requireViewById(R.id.related_tools_container);
}
+ private View getPresetSpinner(SystemUIDialog dialog) {
+ return dialog.requireViewById(R.id.preset_spinner);
+ }
+
@After
public void reset() {
if (mDialogDelegate != null) {
diff --git a/packages/SystemUI/tests/src/com/android/systemui/ambient/touch/TouchMonitorTest.java b/packages/SystemUI/tests/src/com/android/systemui/ambient/touch/TouchMonitorTest.java
index 639b53bfb95b..5600b87280ad 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/ambient/touch/TouchMonitorTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/ambient/touch/TouchMonitorTest.java
@@ -710,6 +710,35 @@ public class TouchMonitorTest extends SysuiTestCase {
environment.verifyLifecycleObserversUnregistered();
}
+ @Test
+ public void testLastSessionPop_createsNewInputSession() {
+ final TouchHandler touchHandler = createTouchHandler();
+
+ final TouchHandler.TouchSession.Callback callback =
+ Mockito.mock(TouchHandler.TouchSession.Callback.class);
+
+ final Environment environment = new Environment(Stream.of(touchHandler)
+ .collect(Collectors.toCollection(HashSet::new)), mKosmos);
+
+ final InputEvent initialEvent = Mockito.mock(InputEvent.class);
+ environment.publishInputEvent(initialEvent);
+
+ final TouchHandler.TouchSession session = captureSession(touchHandler);
+ session.registerCallback(callback);
+
+ // Clear invocations on input session and factory.
+ clearInvocations(environment.mInputFactory);
+ clearInvocations(environment.mInputSession);
+
+ // Pop only active touch session.
+ session.pop();
+ environment.executeAll();
+
+ // Verify that input session disposed and new session requested from factory.
+ verify(environment.mInputSession).dispose();
+ verify(environment.mInputFactory).create(any(), any(), any(), anyBoolean());
+ }
+
private GestureDetector.OnGestureListener registerGestureListener(TouchHandler handler) {
final GestureDetector.OnGestureListener gestureListener = Mockito.mock(
GestureDetector.OnGestureListener.class);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/battery/BatteryMeterViewControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/battery/BatteryMeterViewControllerTest.java
index d940fc938c4b..7a4bbfe9a580 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/battery/BatteryMeterViewControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/battery/BatteryMeterViewControllerTest.java
@@ -36,7 +36,6 @@ import androidx.test.filters.SmallTest;
import com.android.systemui.SysuiTestCase;
import com.android.systemui.flags.FakeFeatureFlags;
-import com.android.systemui.res.R;
import com.android.systemui.settings.UserTracker;
import com.android.systemui.statusbar.phone.StatusBarLocation;
import com.android.systemui.statusbar.policy.BatteryController;
@@ -77,9 +76,6 @@ public class BatteryMeterViewControllerTest extends SysuiTestCase {
when(mBatteryMeterView.getContext()).thenReturn(mContext);
when(mBatteryMeterView.getResources()).thenReturn(mContext.getResources());
-
- mContext.getOrCreateTestableResources().addOverride(
- R.bool.flag_battery_shield_icon, false);
}
@Test
@@ -136,26 +132,6 @@ public class BatteryMeterViewControllerTest extends SysuiTestCase {
verify(mTunerService, never()).addTunable(any(), any());
}
- @Test
- public void shieldFlagDisabled_viewNotified() {
- mContext.getOrCreateTestableResources().addOverride(
- R.bool.flag_battery_shield_icon, false);
-
- initController();
-
- verify(mBatteryMeterView).setDisplayShieldEnabled(false);
- }
-
- @Test
- public void shieldFlagEnabled_viewNotified() {
- mContext.getOrCreateTestableResources().addOverride(
- R.bool.flag_battery_shield_icon, true);
-
- initController();
-
- verify(mBatteryMeterView).setDisplayShieldEnabled(true);
- }
-
private void initController() {
mController = new BatteryMeterViewController(
mBatteryMeterView,
diff --git a/packages/SystemUI/tests/src/com/android/systemui/battery/BatteryMeterViewTest.kt b/packages/SystemUI/tests/src/com/android/systemui/battery/BatteryMeterViewTest.kt
index 2bd0976f30dc..2aa33a176ac9 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/battery/BatteryMeterViewTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/battery/BatteryMeterViewTest.kt
@@ -22,9 +22,9 @@ import android.widget.ImageView
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.settingslib.flags.Flags.FLAG_NEW_STATUS_BAR_ICONS
-import com.android.systemui.res.R
import com.android.systemui.SysuiTestCase
import com.android.systemui.battery.BatteryMeterView.BatteryEstimateFetcher
+import com.android.systemui.res.R
import com.android.systemui.statusbar.policy.BatteryController.EstimateFetchCompletion
import com.google.common.truth.Truth.assertThat
import org.junit.Before
@@ -67,9 +67,8 @@ class BatteryMeterViewTest : SysuiTestCase() {
fun contentDescription_unknown() {
mBatteryMeterView.onBatteryUnknownStateChanged(true)
- assertThat(mBatteryMeterView.contentDescription).isEqualTo(
- context.getString(R.string.accessibility_battery_unknown)
- )
+ assertThat(mBatteryMeterView.contentDescription)
+ .isEqualTo(context.getString(R.string.accessibility_battery_unknown))
}
@Test
@@ -80,11 +79,10 @@ class BatteryMeterViewTest : SysuiTestCase() {
mBatteryMeterView.updatePercentText()
- assertThat(mBatteryMeterView.contentDescription).isEqualTo(
- context.getString(
- R.string.accessibility_battery_level_with_estimate, 15, ESTIMATE
- )
- )
+ assertThat(mBatteryMeterView.contentDescription)
+ .isEqualTo(
+ context.getString(R.string.accessibility_battery_level_with_estimate, 15, ESTIMATE)
+ )
}
@Test
@@ -96,13 +94,14 @@ class BatteryMeterViewTest : SysuiTestCase() {
mBatteryMeterView.updatePercentText()
- assertThat(mBatteryMeterView.contentDescription).isEqualTo(
+ assertThat(mBatteryMeterView.contentDescription)
+ .isEqualTo(
context.getString(
- R.string.accessibility_battery_level_charging_paused_with_estimate,
- 17,
- ESTIMATE,
+ R.string.accessibility_battery_level_charging_paused_with_estimate,
+ 17,
+ ESTIMATE,
)
- )
+ )
}
@Test
@@ -110,27 +109,24 @@ class BatteryMeterViewTest : SysuiTestCase() {
mBatteryMeterView.onBatteryLevelChanged(90, false)
mBatteryMeterView.onIsBatteryDefenderChanged(true)
- assertThat(mBatteryMeterView.contentDescription).isEqualTo(
- context.getString(R.string.accessibility_battery_level_charging_paused, 90)
- )
+ assertThat(mBatteryMeterView.contentDescription)
+ .isEqualTo(context.getString(R.string.accessibility_battery_level_charging_paused, 90))
}
@Test
fun contentDescription_charging() {
mBatteryMeterView.onBatteryLevelChanged(45, true)
- assertThat(mBatteryMeterView.contentDescription).isEqualTo(
- context.getString(R.string.accessibility_battery_level_charging, 45)
- )
+ assertThat(mBatteryMeterView.contentDescription)
+ .isEqualTo(context.getString(R.string.accessibility_battery_level_charging, 45))
}
@Test
fun contentDescription_notCharging() {
mBatteryMeterView.onBatteryLevelChanged(45, false)
- assertThat(mBatteryMeterView.contentDescription).isEqualTo(
- context.getString(R.string.accessibility_battery_level, 45)
- )
+ assertThat(mBatteryMeterView.contentDescription)
+ .isEqualTo(context.getString(R.string.accessibility_battery_level, 45))
}
@Test
@@ -138,9 +134,8 @@ class BatteryMeterViewTest : SysuiTestCase() {
mBatteryMeterView.onBatteryLevelChanged(45, true)
mBatteryMeterView.onIsIncompatibleChargingChanged(true)
- assertThat(mBatteryMeterView.contentDescription).isEqualTo(
- context.getString(R.string.accessibility_battery_level, 45)
- )
+ assertThat(mBatteryMeterView.contentDescription)
+ .isEqualTo(context.getString(R.string.accessibility_battery_level, 45))
}
@Test
@@ -152,19 +147,17 @@ class BatteryMeterViewTest : SysuiTestCase() {
mBatteryMeterView.updatePercentText()
- assertThat(mBatteryMeterView.contentDescription).isEqualTo(
- context.getString(
- R.string.accessibility_battery_level_with_estimate, 15, ESTIMATE
- )
- )
+ assertThat(mBatteryMeterView.contentDescription)
+ .isEqualTo(
+ context.getString(R.string.accessibility_battery_level_with_estimate, 15, ESTIMATE)
+ )
// Update the show mode from estimate to percent
mBatteryMeterView.setPercentShowMode(BatteryMeterView.MODE_ON)
assertThat(mBatteryMeterView.batteryPercentViewText).isEqualTo("15%")
- assertThat(mBatteryMeterView.contentDescription).isEqualTo(
- context.getString(R.string.accessibility_battery_level, 15)
- )
+ assertThat(mBatteryMeterView.contentDescription)
+ .isEqualTo(context.getString(R.string.accessibility_battery_level, 15))
}
@Test
@@ -176,19 +169,17 @@ class BatteryMeterViewTest : SysuiTestCase() {
mBatteryMeterView.updatePercentText()
- assertThat(mBatteryMeterView.contentDescription).isEqualTo(
- context.getString(
- R.string.accessibility_battery_level_with_estimate, 15, ESTIMATE
+ assertThat(mBatteryMeterView.contentDescription)
+ .isEqualTo(
+ context.getString(R.string.accessibility_battery_level_with_estimate, 15, ESTIMATE)
)
- )
// Update the show mode from estimate to percent
mBatteryMeterView.setPercentShowMode(BatteryMeterView.MODE_ON)
assertThat(mBatteryMeterView.batteryPercentView).isNull()
- assertThat(mBatteryMeterView.contentDescription).isEqualTo(
- context.getString(R.string.accessibility_battery_level, 15)
- )
+ assertThat(mBatteryMeterView.contentDescription)
+ .isEqualTo(context.getString(R.string.accessibility_battery_level, 15))
assertThat(mBatteryMeterView.unifiedBatteryState.showPercent).isTrue()
}
@@ -225,49 +216,47 @@ class BatteryMeterViewTest : SysuiTestCase() {
// BatteryDefender
mBatteryMeterView.onBatteryLevelChanged(90, false)
mBatteryMeterView.onIsBatteryDefenderChanged(true)
- assertThat(mBatteryMeterView.contentDescription).isEqualTo(
- context.getString(R.string.accessibility_battery_level_charging_paused, 90)
- )
+ assertThat(mBatteryMeterView.contentDescription)
+ .isEqualTo(context.getString(R.string.accessibility_battery_level_charging_paused, 90))
// BatteryDefender & estimate
mBatteryMeterView.setPercentShowMode(BatteryMeterView.MODE_ESTIMATE)
mBatteryMeterView.setBatteryEstimateFetcher(Fetcher())
mBatteryMeterView.updatePercentText()
- assertThat(mBatteryMeterView.contentDescription).isEqualTo(
+ assertThat(mBatteryMeterView.contentDescription)
+ .isEqualTo(
context.getString(
- R.string.accessibility_battery_level_charging_paused_with_estimate,
- 90,
- ESTIMATE,
+ R.string.accessibility_battery_level_charging_paused_with_estimate,
+ 90,
+ ESTIMATE,
)
- )
+ )
// Just estimate
mBatteryMeterView.onIsBatteryDefenderChanged(false)
- assertThat(mBatteryMeterView.contentDescription).isEqualTo(
+ assertThat(mBatteryMeterView.contentDescription)
+ .isEqualTo(
context.getString(
- R.string.accessibility_battery_level_with_estimate,
- 90,
- ESTIMATE,
+ R.string.accessibility_battery_level_with_estimate,
+ 90,
+ ESTIMATE,
)
- )
+ )
// Just percent
mBatteryMeterView.setPercentShowMode(BatteryMeterView.MODE_ON)
- assertThat(mBatteryMeterView.contentDescription).isEqualTo(
- context.getString(R.string.accessibility_battery_level, 90)
- )
+ assertThat(mBatteryMeterView.contentDescription)
+ .isEqualTo(context.getString(R.string.accessibility_battery_level, 90))
// Charging
mBatteryMeterView.onBatteryLevelChanged(90, true)
- assertThat(mBatteryMeterView.contentDescription).isEqualTo(
- context.getString(R.string.accessibility_battery_level_charging, 90)
- )
+ assertThat(mBatteryMeterView.contentDescription)
+ .isEqualTo(context.getString(R.string.accessibility_battery_level_charging, 90))
}
@Test
@DisableFlags(FLAG_NEW_STATUS_BAR_ICONS)
fun isBatteryDefenderChanged_true_drawableGetsTrue_flagOff() {
- mBatteryMeterView.setDisplayShieldEnabled(true)
val drawable = getBatteryDrawable()
mBatteryMeterView.onIsBatteryDefenderChanged(true)
@@ -278,8 +267,6 @@ class BatteryMeterViewTest : SysuiTestCase() {
@Test
@EnableFlags(FLAG_NEW_STATUS_BAR_ICONS)
fun isBatteryDefenderChanged_true_drawableGetsTrue_flagOn() {
- mBatteryMeterView.setDisplayShieldEnabled(true)
-
mBatteryMeterView.onIsBatteryDefenderChanged(true)
assertThat(mBatteryMeterView.unifiedBatteryState.attribution).isNotNull()
@@ -288,7 +275,6 @@ class BatteryMeterViewTest : SysuiTestCase() {
@Test
@DisableFlags(FLAG_NEW_STATUS_BAR_ICONS)
fun isBatteryDefenderChanged_false_drawableGetsFalse_flagOff() {
- mBatteryMeterView.setDisplayShieldEnabled(true)
val drawable = getBatteryDrawable()
// Start as true
@@ -303,8 +289,6 @@ class BatteryMeterViewTest : SysuiTestCase() {
@Test
@EnableFlags(FLAG_NEW_STATUS_BAR_ICONS)
fun isBatteryDefenderChanged_false_drawableGetsFalse_flagOn() {
- mBatteryMeterView.setDisplayShieldEnabled(true)
-
// Start as true
mBatteryMeterView.onIsBatteryDefenderChanged(true)
@@ -316,27 +300,6 @@ class BatteryMeterViewTest : SysuiTestCase() {
@Test
@DisableFlags(FLAG_NEW_STATUS_BAR_ICONS)
- fun isBatteryDefenderChanged_true_featureflagOff_drawableGetsFalse_flagOff() {
- mBatteryMeterView.setDisplayShieldEnabled(false)
- val drawable = getBatteryDrawable()
-
- mBatteryMeterView.onIsBatteryDefenderChanged(true)
-
- assertThat(drawable.displayShield).isFalse()
- }
-
- @Test
- @EnableFlags(FLAG_NEW_STATUS_BAR_ICONS)
- fun isBatteryDefenderChanged_true_featureflagOff_drawableGetsFalse_flagOn() {
- mBatteryMeterView.setDisplayShieldEnabled(false)
-
- mBatteryMeterView.onIsBatteryDefenderChanged(true)
-
- assertThat(mBatteryMeterView.unifiedBatteryState.attribution).isNull()
- }
-
- @Test
- @DisableFlags(FLAG_NEW_STATUS_BAR_ICONS)
fun isIncompatibleChargingChanged_true_drawableGetsChargingFalse_flagOff() {
mBatteryMeterView.onBatteryLevelChanged(45, true)
val drawable = getBatteryDrawable()
@@ -381,8 +344,8 @@ class BatteryMeterViewTest : SysuiTestCase() {
}
private fun getBatteryDrawable(): AccessorizedBatteryDrawable {
- return (mBatteryMeterView.getChildAt(0) as ImageView)
- .drawable as AccessorizedBatteryDrawable
+ return (mBatteryMeterView.getChildAt(0) as ImageView).drawable
+ as AccessorizedBatteryDrawable
}
private class Fetcher : BatteryEstimateFetcher {
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthRippleControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthRippleControllerTest.kt
index 6dc4b10a57da..bbff5392f59c 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthRippleControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthRippleControllerTest.kt
@@ -18,6 +18,10 @@ package com.android.systemui.biometrics
import android.graphics.Point
import android.hardware.biometrics.BiometricSourceType
+import android.hardware.biometrics.ComponentInfoInternal
+import android.hardware.biometrics.SensorLocationInternal
+import android.hardware.biometrics.SensorProperties
+import android.hardware.fingerprint.FingerprintSensorProperties
import android.hardware.fingerprint.FingerprintSensorPropertiesInternal
import android.testing.TestableLooper.RunWithLooper
import android.util.DisplayMetrics
@@ -43,6 +47,7 @@ import com.android.systemui.statusbar.policy.ConfigurationController
import com.android.systemui.statusbar.policy.KeyguardStateController
import com.android.systemui.util.leak.RotationUtils
import com.android.systemui.util.mockito.any
+import javax.inject.Provider
import kotlinx.coroutines.ExperimentalCoroutinesApi
import org.junit.After
import org.junit.Assert.assertFalse
@@ -62,8 +67,6 @@ import org.mockito.Mockito.`when`
import org.mockito.MockitoAnnotations
import org.mockito.MockitoSession
import org.mockito.quality.Strictness
-import javax.inject.Provider
-
@ExperimentalCoroutinesApi
@SmallTest
@@ -79,35 +82,28 @@ class AuthRippleControllerTest : SysuiTestCase() {
@Mock private lateinit var authController: AuthController
@Mock private lateinit var authRippleInteractor: AuthRippleInteractor
@Mock private lateinit var keyguardStateController: KeyguardStateController
- @Mock
- private lateinit var wakefulnessLifecycle: WakefulnessLifecycle
- @Mock
- private lateinit var notificationShadeWindowController: NotificationShadeWindowController
- @Mock
- private lateinit var biometricUnlockController: BiometricUnlockController
- @Mock
- private lateinit var udfpsControllerProvider: Provider<UdfpsController>
- @Mock
- private lateinit var udfpsController: UdfpsController
- @Mock
- private lateinit var statusBarStateController: StatusBarStateController
- @Mock
- private lateinit var lightRevealScrim: LightRevealScrim
- @Mock
- private lateinit var fpSensorProp: FingerprintSensorPropertiesInternal
+ @Mock private lateinit var wakefulnessLifecycle: WakefulnessLifecycle
+ @Mock private lateinit var notificationShadeWindowController: NotificationShadeWindowController
+ @Mock private lateinit var biometricUnlockController: BiometricUnlockController
+ @Mock private lateinit var udfpsControllerProvider: Provider<UdfpsController>
+ @Mock private lateinit var udfpsController: UdfpsController
+ @Mock private lateinit var statusBarStateController: StatusBarStateController
+ @Mock private lateinit var lightRevealScrim: LightRevealScrim
+ @Mock private lateinit var fpSensorProp: FingerprintSensorPropertiesInternal
private val facePropertyRepository = FakeFacePropertyRepository()
private val displayMetrics = DisplayMetrics()
@Captor
private lateinit var biometricUnlockListener:
- ArgumentCaptor<BiometricUnlockController.BiometricUnlockEventsListener>
+ ArgumentCaptor<BiometricUnlockController.BiometricUnlockEventsListener>
@Before
fun setUp() {
mSetFlagsRule.disableFlags(Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR)
MockitoAnnotations.initMocks(this)
- staticMockSession = mockitoSession()
+ staticMockSession =
+ mockitoSession()
.mockStatic(RotationUtils::class.java)
.strictness(Strictness.LENIENT)
.startMocking()
@@ -116,25 +112,26 @@ class AuthRippleControllerTest : SysuiTestCase() {
`when`(authController.udfpsProps).thenReturn(listOf(fpSensorProp))
`when`(udfpsControllerProvider.get()).thenReturn(udfpsController)
- controller = AuthRippleController(
- context,
- authController,
- configurationController,
- keyguardUpdateMonitor,
- keyguardStateController,
- wakefulnessLifecycle,
- commandRegistry,
- notificationShadeWindowController,
- udfpsControllerProvider,
- statusBarStateController,
- displayMetrics,
- KeyguardLogger(logcatLogBuffer(AuthRippleController.TAG)),
- biometricUnlockController,
- lightRevealScrim,
- authRippleInteractor,
- facePropertyRepository,
- rippleView,
- )
+ controller =
+ AuthRippleController(
+ context,
+ authController,
+ configurationController,
+ keyguardUpdateMonitor,
+ keyguardStateController,
+ wakefulnessLifecycle,
+ commandRegistry,
+ notificationShadeWindowController,
+ udfpsControllerProvider,
+ statusBarStateController,
+ displayMetrics,
+ KeyguardLogger(logcatLogBuffer(AuthRippleController.TAG)),
+ biometricUnlockController,
+ lightRevealScrim,
+ authRippleInteractor,
+ facePropertyRepository,
+ rippleView,
+ )
controller.init()
}
@@ -150,13 +147,18 @@ class AuthRippleControllerTest : SysuiTestCase() {
`when`(authController.fingerprintSensorLocation).thenReturn(fpsLocation)
controller.onViewAttached()
`when`(keyguardStateController.isShowing).thenReturn(true)
- `when`(keyguardUpdateMonitor.isUnlockingWithBiometricAllowed(
- eq(BiometricSourceType.FINGERPRINT))).thenReturn(true)
+ `when`(
+ keyguardUpdateMonitor.isUnlockingWithBiometricAllowed(
+ eq(BiometricSourceType.FINGERPRINT)
+ )
+ )
+ .thenReturn(true)
// WHEN fingerprint authenticated
verify(biometricUnlockController).addListener(biometricUnlockListener.capture())
- biometricUnlockListener.value
- .onBiometricUnlockedWithKeyguardDismissal(BiometricSourceType.FINGERPRINT)
+ biometricUnlockListener.value.onBiometricUnlockedWithKeyguardDismissal(
+ BiometricSourceType.FINGERPRINT
+ )
// THEN update sensor location and show ripple
verify(rippleView).setFingerprintSensorLocation(fpsLocation, 0f)
@@ -169,8 +171,12 @@ class AuthRippleControllerTest : SysuiTestCase() {
val fpsLocation = Point(5, 5)
`when`(authController.udfpsLocation).thenReturn(fpsLocation)
controller.onViewAttached()
- `when`(keyguardUpdateMonitor.isUnlockingWithBiometricAllowed(
- eq(BiometricSourceType.FINGERPRINT))).thenReturn(true)
+ `when`(
+ keyguardUpdateMonitor.isUnlockingWithBiometricAllowed(
+ eq(BiometricSourceType.FINGERPRINT)
+ )
+ )
+ .thenReturn(true)
// WHEN keyguard is NOT showing & fingerprint authenticated
`when`(keyguardStateController.isShowing).thenReturn(false)
@@ -179,7 +185,8 @@ class AuthRippleControllerTest : SysuiTestCase() {
captor.value.onBiometricAuthenticated(
0 /* userId */,
BiometricSourceType.FINGERPRINT /* type */,
- false /* isStrongBiometric */)
+ false /* isStrongBiometric */
+ )
// THEN no ripple
verify(rippleView, never()).startUnlockedRipple(any())
@@ -194,14 +201,19 @@ class AuthRippleControllerTest : SysuiTestCase() {
`when`(keyguardStateController.isShowing).thenReturn(true)
// WHEN unlocking with fingerprint is NOT allowed & fingerprint authenticated
- `when`(keyguardUpdateMonitor.isUnlockingWithBiometricAllowed(
- eq(BiometricSourceType.FINGERPRINT))).thenReturn(false)
+ `when`(
+ keyguardUpdateMonitor.isUnlockingWithBiometricAllowed(
+ eq(BiometricSourceType.FINGERPRINT)
+ )
+ )
+ .thenReturn(false)
val captor = ArgumentCaptor.forClass(KeyguardUpdateMonitorCallback::class.java)
verify(keyguardUpdateMonitor).registerCallback(captor.capture())
captor.value.onBiometricAuthenticated(
0 /* userId */,
BiometricSourceType.FINGERPRINT /* type */,
- false /* isStrongBiometric */)
+ false /* isStrongBiometric */
+ )
// THEN no ripple
verify(rippleView, never()).startUnlockedRipple(any())
@@ -218,7 +230,8 @@ class AuthRippleControllerTest : SysuiTestCase() {
captor.value.onBiometricAuthenticated(
0 /* userId */,
BiometricSourceType.FACE /* type */,
- false /* isStrongBiometric */)
+ false /* isStrongBiometric */
+ )
verify(rippleView, never()).startUnlockedRipple(any())
}
@@ -233,18 +246,17 @@ class AuthRippleControllerTest : SysuiTestCase() {
captor.value.onBiometricAuthenticated(
0 /* userId */,
BiometricSourceType.FINGERPRINT /* type */,
- false /* isStrongBiometric */)
+ false /* isStrongBiometric */
+ )
verify(rippleView, never()).startUnlockedRipple(any())
}
@Test
fun registersAndDeregisters() {
controller.onViewAttached()
- val captor = ArgumentCaptor
- .forClass(KeyguardStateController.Callback::class.java)
+ val captor = ArgumentCaptor.forClass(KeyguardStateController.Callback::class.java)
verify(keyguardStateController).addCallback(captor.capture())
- val captor2 = ArgumentCaptor
- .forClass(WakefulnessLifecycle.Observer::class.java)
+ val captor2 = ArgumentCaptor.forClass(WakefulnessLifecycle.Observer::class.java)
verify(wakefulnessLifecycle).addObserver(captor2.capture())
controller.onViewDetached()
verify(keyguardStateController).removeCallback(any())
@@ -259,17 +271,25 @@ class AuthRippleControllerTest : SysuiTestCase() {
`when`(authController.fingerprintSensorLocation).thenReturn(fpsLocation)
controller.onViewAttached()
`when`(keyguardStateController.isShowing).thenReturn(true)
- `when`(keyguardUpdateMonitor.isUnlockingWithBiometricAllowed(
- BiometricSourceType.FINGERPRINT)).thenReturn(true)
+ `when`(
+ keyguardUpdateMonitor.isUnlockingWithBiometricAllowed(
+ BiometricSourceType.FINGERPRINT
+ )
+ )
+ .thenReturn(true)
`when`(biometricUnlockController.isWakeAndUnlock).thenReturn(true)
controller.showUnlockRipple(BiometricSourceType.FINGERPRINT)
- assertTrue("reveal didn't start on keyguardFadingAway",
- controller.startLightRevealScrimOnKeyguardFadingAway)
+ assertTrue(
+ "reveal didn't start on keyguardFadingAway",
+ controller.startLightRevealScrimOnKeyguardFadingAway
+ )
`when`(keyguardStateController.isKeyguardFadingAway).thenReturn(true)
controller.onKeyguardFadingAwayChanged()
- assertFalse("reveal triggers multiple times",
- controller.startLightRevealScrimOnKeyguardFadingAway)
+ assertFalse(
+ "reveal triggers multiple times",
+ controller.startLightRevealScrimOnKeyguardFadingAway
+ )
}
@Test
@@ -282,23 +302,27 @@ class AuthRippleControllerTest : SysuiTestCase() {
`when`(keyguardStateController.isShowing).thenReturn(true)
`when`(biometricUnlockController.isWakeAndUnlock).thenReturn(true)
`when`(authController.isUdfpsFingerDown).thenReturn(true)
- `when`(keyguardUpdateMonitor.isUnlockingWithBiometricAllowed(
- eq(BiometricSourceType.FACE))).thenReturn(true)
+ `when`(keyguardUpdateMonitor.isUnlockingWithBiometricAllowed(eq(BiometricSourceType.FACE)))
+ .thenReturn(true)
controller.showUnlockRipple(BiometricSourceType.FACE)
- assertTrue("reveal didn't start on keyguardFadingAway",
- controller.startLightRevealScrimOnKeyguardFadingAway)
+ assertTrue(
+ "reveal didn't start on keyguardFadingAway",
+ controller.startLightRevealScrimOnKeyguardFadingAway
+ )
`when`(keyguardStateController.isKeyguardFadingAway).thenReturn(true)
controller.onKeyguardFadingAwayChanged()
- assertFalse("reveal triggers multiple times",
- controller.startLightRevealScrimOnKeyguardFadingAway)
+ assertFalse(
+ "reveal triggers multiple times",
+ controller.startLightRevealScrimOnKeyguardFadingAway
+ )
}
@Test
fun testUpdateRippleColor() {
controller.onViewAttached()
- val captor = ArgumentCaptor
- .forClass(ConfigurationController.ConfigurationListener::class.java)
+ val captor =
+ ArgumentCaptor.forClass(ConfigurationController.ConfigurationListener::class.java)
verify(configurationController).addCallback(captor.capture())
reset(rippleView)
@@ -333,6 +357,40 @@ class AuthRippleControllerTest : SysuiTestCase() {
}
@Test
+ fun testUltrasonicUdfps_onFingerDown_runningForDeviceEntry_doNotShowDwellRipple() {
+ // GIVEN UDFPS is ultrasonic
+ `when`(authController.udfpsProps)
+ .thenReturn(
+ listOf(
+ FingerprintSensorPropertiesInternal(
+ 0 /* sensorId */,
+ SensorProperties.STRENGTH_STRONG,
+ 5 /* maxEnrollmentsPerUser */,
+ listOf<ComponentInfoInternal>(),
+ FingerprintSensorProperties.TYPE_UDFPS_ULTRASONIC,
+ false /* halControlsIllumination */,
+ true /* resetLockoutRequiresHardwareAuthToken */,
+ listOf<SensorLocationInternal>(SensorLocationInternal.DEFAULT),
+ )
+ )
+ )
+
+ // GIVEN fingerprint detection is running on keyguard
+ `when`(keyguardUpdateMonitor.isFingerprintDetectionRunning).thenReturn(true)
+
+ // GIVEN view is already attached
+ controller.onViewAttached()
+ val captor = ArgumentCaptor.forClass(UdfpsController.Callback::class.java)
+ verify(udfpsController).addCallback(captor.capture())
+
+ // WHEN finger is down
+ captor.value.onFingerDown()
+
+ // THEN never show dwell ripple
+ verify(rippleView, never()).startDwellRipple(false)
+ }
+
+ @Test
fun testUdfps_onFingerDown_notDeviceEntry_doesNotShowDwellRipple() {
// GIVEN fingerprint detection is NOT running on keyguard
`when`(keyguardUpdateMonitor.isFingerprintDetectionRunning).thenReturn(false)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/FaceHelpMessageDebouncerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/FaceHelpMessageDebouncerTest.kt
new file mode 100644
index 000000000000..baef620ad556
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/FaceHelpMessageDebouncerTest.kt
@@ -0,0 +1,221 @@
+/*
+ * 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.biometrics
+
+import android.hardware.biometrics.BiometricFaceConstants
+import android.testing.TestableLooper
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.SmallTest
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.deviceentry.shared.model.HelpFaceAuthenticationStatus
+import com.google.common.truth.Truth.assertThat
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+
+@RunWith(AndroidJUnit4::class)
+@SmallTest
+@TestableLooper.RunWithLooper
+class FaceHelpMessageDebouncerTest : SysuiTestCase() {
+ private lateinit var underTest: FaceHelpMessageDebouncer
+ private val window = 9L
+ private val startWindow = 4L
+ private val shownFaceMessageFrequencyBoost = 2
+
+ @Before
+ fun setUp() {
+ underTest =
+ FaceHelpMessageDebouncer(
+ window = window,
+ startWindow = startWindow,
+ shownFaceMessageFrequencyBoost = shownFaceMessageFrequencyBoost,
+ )
+ }
+
+ @Test
+ fun getMessageBeforeStartWindow_null() {
+ underTest.addMessage(
+ HelpFaceAuthenticationStatus(
+ BiometricFaceConstants.FACE_ACQUIRED_TOO_CLOSE,
+ "testTooClose",
+ 0
+ )
+ )
+ assertThat(underTest.getMessageToShow(0)).isNull()
+ }
+
+ @Test
+ fun getMessageAfterStartWindow() {
+ underTest.addMessage(
+ HelpFaceAuthenticationStatus(
+ BiometricFaceConstants.FACE_ACQUIRED_TOO_CLOSE,
+ "tooClose",
+ 0
+ )
+ )
+
+ assertThat(underTest.getMessageToShow(startWindow)?.msgId)
+ .isEqualTo(BiometricFaceConstants.FACE_ACQUIRED_TOO_CLOSE)
+ assertThat(underTest.getMessageToShow(startWindow)?.msg).isEqualTo("tooClose")
+ }
+
+ @Test
+ fun getMessageAfterMessagesCleared_null() {
+ underTest.addMessage(
+ HelpFaceAuthenticationStatus(
+ BiometricFaceConstants.FACE_ACQUIRED_TOO_CLOSE,
+ "tooClose",
+ 0
+ )
+ )
+ underTest.startNewFaceAuthSession(0)
+
+ assertThat(underTest.getMessageToShow(startWindow)).isNull()
+ }
+
+ @Test
+ fun messagesBeforeWindowRemoved() {
+ underTest.addMessage(
+ HelpFaceAuthenticationStatus(
+ BiometricFaceConstants.FACE_ACQUIRED_TOO_CLOSE,
+ "tooClose",
+ 0
+ )
+ )
+ underTest.addMessage(
+ HelpFaceAuthenticationStatus(
+ BiometricFaceConstants.FACE_ACQUIRED_TOO_CLOSE,
+ "tooClose",
+ 0
+ )
+ )
+ underTest.addMessage(
+ HelpFaceAuthenticationStatus(
+ BiometricFaceConstants.FACE_ACQUIRED_TOO_CLOSE,
+ "tooClose",
+ window - 1
+ )
+ )
+ val lastMessage =
+ HelpFaceAuthenticationStatus(
+ BiometricFaceConstants.FACE_ACQUIRED_TOO_BRIGHT,
+ "tooBright",
+ window
+ )
+ underTest.addMessage(lastMessage)
+
+ assertThat(underTest.getMessageToShow(window + 1)).isEqualTo(lastMessage)
+ }
+
+ @Test
+ fun getMessageTieGoesToMostRecent() {
+ for (i in 1..window step 2) {
+ underTest.addMessage(
+ HelpFaceAuthenticationStatus(
+ BiometricFaceConstants.FACE_ACQUIRED_TOO_CLOSE,
+ "tooClose",
+ i
+ )
+ )
+ underTest.addMessage(
+ HelpFaceAuthenticationStatus(
+ BiometricFaceConstants.FACE_ACQUIRED_TOO_BRIGHT,
+ "tooBright",
+ i + 1
+ )
+ )
+ }
+
+ assertThat(underTest.getMessageToShow(window)?.msgId)
+ .isEqualTo(BiometricFaceConstants.FACE_ACQUIRED_TOO_BRIGHT)
+ assertThat(underTest.getMessageToShow(window)?.msg).isEqualTo("tooBright")
+ }
+
+ @Test
+ fun boostCurrentlyShowingMessage() {
+ underTest.addMessage(
+ HelpFaceAuthenticationStatus(
+ BiometricFaceConstants.FACE_ACQUIRED_TOO_BRIGHT,
+ "tooBright",
+ 0
+ )
+ )
+
+ val lastMessageShown = underTest.getMessageToShow(startWindow)
+ assertThat(lastMessageShown?.msgId)
+ .isEqualTo(BiometricFaceConstants.FACE_ACQUIRED_TOO_BRIGHT)
+
+ for (i in 1..<shownFaceMessageFrequencyBoost) {
+ underTest.addMessage(
+ HelpFaceAuthenticationStatus(
+ BiometricFaceConstants.FACE_ACQUIRED_TOO_CLOSE,
+ "tooClose",
+ startWindow
+ )
+ )
+ }
+
+ // although technically there's a different msgId with a higher frequency count now, the
+ // shownFaceMessageFrequencyBoost causes the last message shown to get a "boost"
+ // to keep showing
+ assertThat(underTest.getMessageToShow(startWindow)).isEqualTo(lastMessageShown)
+ }
+
+ @Test
+ fun overcomeBoostedCurrentlyShowingMessage() {
+ // Comments are assuming shownFaceMessageFrequencyBoost = 2
+ // [B], weights: B=1
+ underTest.addMessage(
+ HelpFaceAuthenticationStatus(
+ BiometricFaceConstants.FACE_ACQUIRED_TOO_BRIGHT,
+ "tooBright",
+ 0
+ )
+ )
+
+ // [B], showing messageB, weights: B=3
+ val messageB = underTest.getMessageToShow(startWindow)
+
+ // [B, C, C], showing messageB, weights: B=3, C=2
+ for (i in 1..shownFaceMessageFrequencyBoost) {
+ underTest.addMessage(
+ HelpFaceAuthenticationStatus(
+ BiometricFaceConstants.FACE_ACQUIRED_TOO_CLOSE,
+ "tooClose",
+ startWindow
+ )
+ )
+ }
+ // messageB is getting boosted to continue to show
+ assertThat(underTest.getMessageToShow(startWindow)).isEqualTo(messageB)
+
+ // receive one more FACE_ACQUIRED_TOO_CLOSE acquired info to pass the boost
+ // [C, C, C], showing messageB, weights: B=2, C=3
+ underTest.addMessage(
+ HelpFaceAuthenticationStatus(
+ BiometricFaceConstants.FACE_ACQUIRED_TOO_CLOSE,
+ "tooClose",
+ startWindow
+ )
+ )
+
+ // Now FACE_ACQUIRED_TOO_CLOSE has surpassed the boosted messageB frequency
+ // [C, C, C], showing messageC, weights: C=5
+ assertThat(underTest.getMessageToShow(startWindow)?.msgId)
+ .isEqualTo(BiometricFaceConstants.FACE_ACQUIRED_TOO_CLOSE)
+ }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/ui/viewmodel/PromptViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/ui/viewmodel/PromptViewModelTest.kt
index 97f5efcf4c5f..6dcea144f2a3 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/ui/viewmodel/PromptViewModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/ui/viewmodel/PromptViewModelTest.kt
@@ -449,150 +449,214 @@ internal class PromptViewModelTest(private val testCase: TestCase) : SysuiTestCa
}
@Test
- fun shows_authenticated_no_errors_no_confirmation_required() = runGenericTest {
- if (!testCase.confirmationRequested) {
- val iconAsset by collectLastValue(kosmos.promptViewModel.iconViewModel.iconAsset)
- val iconOverlayAsset by
- collectLastValue(kosmos.promptViewModel.iconViewModel.iconOverlayAsset)
- val iconContentDescriptionId by
- collectLastValue(kosmos.promptViewModel.iconViewModel.contentDescriptionId)
- val shouldAnimateIconView by
- collectLastValue(kosmos.promptViewModel.iconViewModel.shouldAnimateIconView)
- val shouldAnimateIconOverlay by
- collectLastValue(kosmos.promptViewModel.iconViewModel.shouldAnimateIconOverlay)
- verifyIconSize()
+ fun shows_error_to_unlock_or_success() {
+ // Face-only auth does not use error -> unlock or error -> success assets
+ if (testCase.isFingerprintOnly || testCase.isCoex) {
+ runGenericTest {
+ // Distinct asset for error -> success only applicable for fingerprint-only /
+ // explicit co-ex auth
+ val iconAsset by collectLastValue(kosmos.promptViewModel.iconViewModel.iconAsset)
+ val iconContentDescriptionId by
+ collectLastValue(kosmos.promptViewModel.iconViewModel.contentDescriptionId)
+ val shouldAnimateIconView by
+ collectLastValue(kosmos.promptViewModel.iconViewModel.shouldAnimateIconView)
+
+ var forceExplicitFlow =
+ testCase.isCoex && testCase.confirmationRequested ||
+ testCase.authenticatedByFingerprint
+ if (forceExplicitFlow) {
+ kosmos.promptViewModel.ensureFingerprintHasStarted(isDelayed = true)
+ }
+ verifyIconSize(forceExplicitFlow)
- kosmos.promptViewModel.showAuthenticated(
- modality = testCase.authenticatedModality,
- dismissAfterDelay = DELAY
- )
+ kosmos.promptViewModel.ensureFingerprintHasStarted(isDelayed = true)
+ kosmos.promptViewModel.iconViewModel.setPreviousIconWasError(true)
- if (testCase.isFingerprintOnly) {
- // Fingerprint icon asset assertions
- if (testCase.sensorType == FingerprintSensorProperties.TYPE_POWER_BUTTON) {
- assertThat(iconAsset).isEqualTo(getSfpsBaseIconAsset())
- assertThat(iconOverlayAsset)
- .isEqualTo(R.raw.biometricprompt_symbol_fingerprint_to_success_landscape)
- assertThat(iconContentDescriptionId)
- .isEqualTo(R.string.security_settings_sfps_enroll_find_sensor_message)
- assertThat(shouldAnimateIconView).isEqualTo(true)
- assertThat(shouldAnimateIconOverlay).isEqualTo(true)
- } else {
- assertThat(iconAsset)
- .isEqualTo(R.raw.fingerprint_dialogue_fingerprint_to_success_lottie)
+ kosmos.promptViewModel.showAuthenticated(
+ modality = testCase.authenticatedModality,
+ dismissAfterDelay = DELAY
+ )
+
+ // TODO(b/350121748): SFPS test cases to be added after SFPS assets update
+ if (testCase.sensorType != FingerprintSensorProperties.TYPE_POWER_BUTTON) {
+ // Non-SFPS (UDFPS / rear-FPS) test cases
+ // Covers (1) fingerprint-only (2) co-ex, authenticated by fingerprint
+ if (testCase.authenticatedByFingerprint) {
+ assertThat(iconAsset)
+ .isEqualTo(R.raw.fingerprint_dialogue_error_to_success_lottie)
+ assertThat(iconContentDescriptionId)
+ .isEqualTo(R.string.fingerprint_dialog_touch_sensor)
+ assertThat(shouldAnimateIconView).isEqualTo(true)
+ } else { // co-ex, authenticated by face
+ assertThat(iconAsset)
+ .isEqualTo(R.raw.fingerprint_dialogue_error_to_unlock_lottie)
+ assertThat(iconContentDescriptionId)
+ .isEqualTo(R.string.fingerprint_dialog_authenticated_confirmation)
+ assertThat(shouldAnimateIconView).isEqualTo(true)
+
+ // Confirm authentication
+ kosmos.promptViewModel.confirmAuthenticated()
+
+ assertThat(iconAsset)
+ .isEqualTo(
+ R.raw.fingerprint_dialogue_unlocked_to_checkmark_success_lottie
+ )
+ assertThat(iconContentDescriptionId)
+ .isEqualTo(R.string.fingerprint_dialog_touch_sensor)
+ assertThat(shouldAnimateIconView).isEqualTo(true)
+ }
+ }
+ }
+ }
+ }
+
+ @Test
+ fun shows_authenticated_no_errors_no_confirmation_required() {
+ if (!testCase.confirmationRequested) {
+ runGenericTest {
+ val iconAsset by collectLastValue(kosmos.promptViewModel.iconViewModel.iconAsset)
+ val iconOverlayAsset by
+ collectLastValue(kosmos.promptViewModel.iconViewModel.iconOverlayAsset)
+ val iconContentDescriptionId by
+ collectLastValue(kosmos.promptViewModel.iconViewModel.contentDescriptionId)
+ val shouldAnimateIconView by
+ collectLastValue(kosmos.promptViewModel.iconViewModel.shouldAnimateIconView)
+ val shouldAnimateIconOverlay by
+ collectLastValue(kosmos.promptViewModel.iconViewModel.shouldAnimateIconOverlay)
+ verifyIconSize()
+
+ kosmos.promptViewModel.showAuthenticated(
+ modality = testCase.authenticatedModality,
+ dismissAfterDelay = DELAY
+ )
+
+ if (testCase.isFingerprintOnly) {
+ // Fingerprint icon asset assertions
+ if (testCase.sensorType == FingerprintSensorProperties.TYPE_POWER_BUTTON) {
+ assertThat(iconAsset).isEqualTo(getSfpsBaseIconAsset())
+ assertThat(iconOverlayAsset)
+ .isEqualTo(
+ R.raw.biometricprompt_symbol_fingerprint_to_success_landscape
+ )
+ assertThat(iconContentDescriptionId)
+ .isEqualTo(R.string.security_settings_sfps_enroll_find_sensor_message)
+ assertThat(shouldAnimateIconView).isEqualTo(true)
+ assertThat(shouldAnimateIconOverlay).isEqualTo(true)
+ } else {
+ assertThat(iconAsset)
+ .isEqualTo(R.raw.fingerprint_dialogue_fingerprint_to_success_lottie)
+ assertThat(iconOverlayAsset).isEqualTo(-1)
+ assertThat(iconContentDescriptionId)
+ .isEqualTo(R.string.fingerprint_dialog_touch_sensor)
+ assertThat(shouldAnimateIconView).isEqualTo(true)
+ assertThat(shouldAnimateIconOverlay).isEqualTo(false)
+ }
+ } else if (testCase.isFaceOnly || testCase.isCoex) {
+ // Face icon asset assertions
+ // If co-ex, use implicit flow (explicit flow always requires confirmation)
+ assertThat(iconAsset).isEqualTo(R.raw.face_dialog_dark_to_checkmark)
assertThat(iconOverlayAsset).isEqualTo(-1)
assertThat(iconContentDescriptionId)
- .isEqualTo(R.string.fingerprint_dialog_touch_sensor)
+ .isEqualTo(R.string.biometric_dialog_face_icon_description_authenticated)
assertThat(shouldAnimateIconView).isEqualTo(true)
assertThat(shouldAnimateIconOverlay).isEqualTo(false)
}
- } else if (testCase.isFaceOnly || testCase.isCoex) {
- // Face icon asset assertions
- // If co-ex, use implicit flow (explicit flow always requires confirmation)
- assertThat(iconAsset).isEqualTo(R.raw.face_dialog_dark_to_checkmark)
- assertThat(iconOverlayAsset).isEqualTo(-1)
- assertThat(iconContentDescriptionId)
- .isEqualTo(R.string.biometric_dialog_face_icon_description_authenticated)
- assertThat(shouldAnimateIconView).isEqualTo(true)
- assertThat(shouldAnimateIconOverlay).isEqualTo(false)
}
}
}
@Test
- fun shows_pending_confirmation() = runGenericTest {
- if (
- (testCase.isFaceOnly || testCase.isCoex) &&
- testCase.authenticatedByFace &&
- testCase.confirmationRequested
- ) {
- val iconAsset by collectLastValue(kosmos.promptViewModel.iconViewModel.iconAsset)
- val iconOverlayAsset by
- collectLastValue(kosmos.promptViewModel.iconViewModel.iconOverlayAsset)
- val iconContentDescriptionId by
- collectLastValue(kosmos.promptViewModel.iconViewModel.contentDescriptionId)
- val shouldAnimateIconView by
- collectLastValue(kosmos.promptViewModel.iconViewModel.shouldAnimateIconView)
- val shouldAnimateIconOverlay by
- collectLastValue(kosmos.promptViewModel.iconViewModel.shouldAnimateIconOverlay)
-
- val forceExplicitFlow = testCase.isCoex && testCase.confirmationRequested
- verifyIconSize(forceExplicitFlow = forceExplicitFlow)
-
- kosmos.promptViewModel.showAuthenticated(
- modality = testCase.authenticatedModality,
- dismissAfterDelay = DELAY
- )
+ fun shows_pending_confirmation() {
+ if (testCase.authenticatedByFace && testCase.confirmationRequested) {
+ runGenericTest {
+ val iconAsset by collectLastValue(kosmos.promptViewModel.iconViewModel.iconAsset)
+ val iconOverlayAsset by
+ collectLastValue(kosmos.promptViewModel.iconViewModel.iconOverlayAsset)
+ val iconContentDescriptionId by
+ collectLastValue(kosmos.promptViewModel.iconViewModel.contentDescriptionId)
+ val shouldAnimateIconView by
+ collectLastValue(kosmos.promptViewModel.iconViewModel.shouldAnimateIconView)
+ val shouldAnimateIconOverlay by
+ collectLastValue(kosmos.promptViewModel.iconViewModel.shouldAnimateIconOverlay)
+
+ val forceExplicitFlow = testCase.isCoex && testCase.confirmationRequested
+ verifyIconSize(forceExplicitFlow = forceExplicitFlow)
+
+ kosmos.promptViewModel.showAuthenticated(
+ modality = testCase.authenticatedModality,
+ dismissAfterDelay = DELAY
+ )
- if (testCase.isFaceOnly) {
- assertThat(iconAsset).isEqualTo(R.raw.face_dialog_wink_from_dark)
- assertThat(iconOverlayAsset).isEqualTo(-1)
- assertThat(iconContentDescriptionId)
- .isEqualTo(R.string.biometric_dialog_face_icon_description_authenticated)
- assertThat(shouldAnimateIconView).isEqualTo(true)
- assertThat(shouldAnimateIconOverlay).isEqualTo(false)
- } else if (testCase.isCoex) { // explicit flow, confirmation requested
- // TODO: Update when SFPS co-ex is implemented
- if (testCase.sensorType != FingerprintSensorProperties.TYPE_POWER_BUTTON) {
- assertThat(iconAsset)
- .isEqualTo(R.raw.fingerprint_dialogue_fingerprint_to_unlock_lottie)
+ if (testCase.isFaceOnly) {
+ assertThat(iconAsset).isEqualTo(R.raw.face_dialog_wink_from_dark)
assertThat(iconOverlayAsset).isEqualTo(-1)
assertThat(iconContentDescriptionId)
- .isEqualTo(R.string.fingerprint_dialog_authenticated_confirmation)
+ .isEqualTo(R.string.biometric_dialog_face_icon_description_authenticated)
assertThat(shouldAnimateIconView).isEqualTo(true)
assertThat(shouldAnimateIconOverlay).isEqualTo(false)
+ } else if (testCase.isCoex) { // explicit flow, confirmation requested
+ // TODO: Update when SFPS co-ex is implemented
+ if (testCase.sensorType != FingerprintSensorProperties.TYPE_POWER_BUTTON) {
+ assertThat(iconAsset)
+ .isEqualTo(R.raw.fingerprint_dialogue_fingerprint_to_unlock_lottie)
+ assertThat(iconOverlayAsset).isEqualTo(-1)
+ assertThat(iconContentDescriptionId)
+ .isEqualTo(R.string.fingerprint_dialog_authenticated_confirmation)
+ assertThat(shouldAnimateIconView).isEqualTo(true)
+ assertThat(shouldAnimateIconOverlay).isEqualTo(false)
+ }
}
}
}
}
@Test
- fun shows_authenticated_explicitly_confirmed_iconUpdate() = runGenericTest {
- if (
- (testCase.isFaceOnly || testCase.isCoex) &&
- testCase.authenticatedByFace &&
- testCase.confirmationRequested
- ) {
- val iconAsset by collectLastValue(kosmos.promptViewModel.iconViewModel.iconAsset)
- val iconOverlayAsset by
- collectLastValue(kosmos.promptViewModel.iconViewModel.iconOverlayAsset)
- val iconContentDescriptionId by
- collectLastValue(kosmos.promptViewModel.iconViewModel.contentDescriptionId)
- val shouldAnimateIconView by
- collectLastValue(kosmos.promptViewModel.iconViewModel.shouldAnimateIconView)
- val shouldAnimateIconOverlay by
- collectLastValue(kosmos.promptViewModel.iconViewModel.shouldAnimateIconOverlay)
- val forceExplicitFlow = testCase.isCoex && testCase.confirmationRequested
- verifyIconSize(forceExplicitFlow = forceExplicitFlow)
-
- kosmos.promptViewModel.showAuthenticated(
- modality = testCase.authenticatedModality,
- dismissAfterDelay = DELAY
- )
-
- kosmos.promptViewModel.confirmAuthenticated()
+ fun shows_authenticated_explicitly_confirmed() {
+ if (testCase.authenticatedByFace && testCase.confirmationRequested) {
+ runGenericTest {
+ val iconAsset by collectLastValue(kosmos.promptViewModel.iconViewModel.iconAsset)
+ val iconOverlayAsset by
+ collectLastValue(kosmos.promptViewModel.iconViewModel.iconOverlayAsset)
+ val iconContentDescriptionId by
+ collectLastValue(kosmos.promptViewModel.iconViewModel.contentDescriptionId)
+ val shouldAnimateIconView by
+ collectLastValue(kosmos.promptViewModel.iconViewModel.shouldAnimateIconView)
+ val shouldAnimateIconOverlay by
+ collectLastValue(kosmos.promptViewModel.iconViewModel.shouldAnimateIconOverlay)
+ val forceExplicitFlow = testCase.isCoex && testCase.confirmationRequested
+ verifyIconSize(forceExplicitFlow = forceExplicitFlow)
+
+ kosmos.promptViewModel.showAuthenticated(
+ modality = testCase.authenticatedModality,
+ dismissAfterDelay = DELAY
+ )
- if (testCase.isFaceOnly) {
- assertThat(iconAsset).isEqualTo(R.raw.face_dialog_dark_to_checkmark)
- assertThat(iconOverlayAsset).isEqualTo(-1)
- assertThat(iconContentDescriptionId)
- .isEqualTo(R.string.biometric_dialog_face_icon_description_confirmed)
- assertThat(shouldAnimateIconView).isEqualTo(true)
- assertThat(shouldAnimateIconOverlay).isEqualTo(false)
- }
+ kosmos.promptViewModel.confirmAuthenticated()
- // explicit flow because confirmation requested
- if (testCase.isCoex) {
- // TODO: Update when SFPS co-ex is implemented
- if (testCase.sensorType != FingerprintSensorProperties.TYPE_POWER_BUTTON) {
- assertThat(iconAsset)
- .isEqualTo(R.raw.fingerprint_dialogue_unlocked_to_checkmark_success_lottie)
+ if (testCase.isFaceOnly) {
+ assertThat(iconAsset).isEqualTo(R.raw.face_dialog_dark_to_checkmark)
assertThat(iconOverlayAsset).isEqualTo(-1)
assertThat(iconContentDescriptionId)
- .isEqualTo(R.string.fingerprint_dialog_touch_sensor)
+ .isEqualTo(R.string.biometric_dialog_face_icon_description_confirmed)
assertThat(shouldAnimateIconView).isEqualTo(true)
assertThat(shouldAnimateIconOverlay).isEqualTo(false)
}
+
+ // explicit flow because confirmation requested
+ if (testCase.isCoex) {
+ // TODO: Update when SFPS co-ex is implemented
+ if (testCase.sensorType != FingerprintSensorProperties.TYPE_POWER_BUTTON) {
+ assertThat(iconAsset)
+ .isEqualTo(
+ R.raw.fingerprint_dialogue_unlocked_to_checkmark_success_lottie
+ )
+ assertThat(iconOverlayAsset).isEqualTo(-1)
+ assertThat(iconContentDescriptionId)
+ .isEqualTo(R.string.fingerprint_dialog_touch_sensor)
+ assertThat(shouldAnimateIconView).isEqualTo(true)
+ assertThat(shouldAnimateIconOverlay).isEqualTo(false)
+ }
+ }
}
}
}
@@ -700,58 +764,68 @@ internal class PromptViewModelTest(private val testCase: TestCase) : SysuiTestCa
}
@Test
- fun sfpsIconUpdates_onFoldConfigurationChanged() = runGenericTest {
+ fun sfpsIconUpdates_onFoldConfigurationChanged() {
if (
testCase.sensorType == FingerprintSensorProperties.TYPE_POWER_BUTTON &&
!testCase.isInRearDisplayMode
) {
- val currentIcon by collectLastValue(kosmos.promptViewModel.iconViewModel.iconAsset)
+ runGenericTest {
+ val currentIcon by collectLastValue(kosmos.promptViewModel.iconViewModel.iconAsset)
- kosmos.promptViewModel.iconViewModel.onConfigurationChanged(getFoldedConfiguration())
- val foldedIcon = currentIcon
+ kosmos.promptViewModel.iconViewModel.onConfigurationChanged(
+ getFoldedConfiguration()
+ )
+ val foldedIcon = currentIcon
- kosmos.promptViewModel.iconViewModel.onConfigurationChanged(getUnfoldedConfiguration())
- val unfoldedIcon = currentIcon
+ kosmos.promptViewModel.iconViewModel.onConfigurationChanged(
+ getUnfoldedConfiguration()
+ )
+ val unfoldedIcon = currentIcon
- assertThat(foldedIcon).isNotEqualTo(unfoldedIcon)
+ assertThat(foldedIcon).isNotEqualTo(unfoldedIcon)
+ }
}
}
@Test
- fun sfpsIconUpdates_onRotation() = runGenericTest {
+ fun sfpsIconUpdates_onRotation() {
if (testCase.sensorType == FingerprintSensorProperties.TYPE_POWER_BUTTON) {
- val currentIcon by collectLastValue(kosmos.promptViewModel.iconViewModel.iconAsset)
+ runGenericTest {
+ val currentIcon by collectLastValue(kosmos.promptViewModel.iconViewModel.iconAsset)
- kosmos.displayStateRepository.setCurrentRotation(DisplayRotation.ROTATION_0)
- val iconRotation0 = currentIcon
+ kosmos.displayStateRepository.setCurrentRotation(DisplayRotation.ROTATION_0)
+ val iconRotation0 = currentIcon
- kosmos.displayStateRepository.setCurrentRotation(DisplayRotation.ROTATION_90)
- val iconRotation90 = currentIcon
+ kosmos.displayStateRepository.setCurrentRotation(DisplayRotation.ROTATION_90)
+ val iconRotation90 = currentIcon
- kosmos.displayStateRepository.setCurrentRotation(DisplayRotation.ROTATION_180)
- val iconRotation180 = currentIcon
+ kosmos.displayStateRepository.setCurrentRotation(DisplayRotation.ROTATION_180)
+ val iconRotation180 = currentIcon
- kosmos.displayStateRepository.setCurrentRotation(DisplayRotation.ROTATION_270)
- val iconRotation270 = currentIcon
+ kosmos.displayStateRepository.setCurrentRotation(DisplayRotation.ROTATION_270)
+ val iconRotation270 = currentIcon
- assertThat(iconRotation0).isEqualTo(iconRotation180)
- assertThat(iconRotation0).isNotEqualTo(iconRotation90)
- assertThat(iconRotation0).isNotEqualTo(iconRotation270)
+ assertThat(iconRotation0).isEqualTo(iconRotation180)
+ assertThat(iconRotation0).isNotEqualTo(iconRotation90)
+ assertThat(iconRotation0).isNotEqualTo(iconRotation270)
+ }
}
}
@Test
- fun sfpsIconUpdates_onRearDisplayMode() = runGenericTest {
+ fun sfpsIconUpdates_onRearDisplayMode() {
if (testCase.sensorType == FingerprintSensorProperties.TYPE_POWER_BUTTON) {
- val currentIcon by collectLastValue(kosmos.promptViewModel.iconViewModel.iconAsset)
+ runGenericTest {
+ val currentIcon by collectLastValue(kosmos.promptViewModel.iconViewModel.iconAsset)
- kosmos.displayStateRepository.setIsInRearDisplayMode(false)
- val iconNotRearDisplayMode = currentIcon
+ kosmos.displayStateRepository.setIsInRearDisplayMode(false)
+ val iconNotRearDisplayMode = currentIcon
- kosmos.displayStateRepository.setIsInRearDisplayMode(true)
- val iconRearDisplayMode = currentIcon
+ kosmos.displayStateRepository.setIsInRearDisplayMode(true)
+ val iconRearDisplayMode = currentIcon
- assertThat(iconNotRearDisplayMode).isNotEqualTo(iconRearDisplayMode)
+ assertThat(iconNotRearDisplayMode).isNotEqualTo(iconRearDisplayMode)
+ }
}
}
@@ -1799,8 +1873,10 @@ internal data class TestCase(
when {
fingerprint != null && face != null -> "coex"
fingerprint != null && fingerprint.isAnySidefpsType -> "fingerprint only, sideFps"
- fingerprint != null && !fingerprint.isAnySidefpsType ->
- "fingerprint only, non-sideFps"
+ fingerprint != null && fingerprint.isAnyUdfpsType -> "fingerprint only, udfps"
+ fingerprint != null &&
+ fingerprint.sensorType == FingerprintSensorProperties.TYPE_REAR ->
+ "fingerprint only, rearFps"
face != null -> "face only"
else -> "?"
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/communal/data/backup/CommunalBackupHelperTest.kt b/packages/SystemUI/tests/src/com/android/systemui/communal/data/backup/CommunalBackupHelperTest.kt
index 7094848e3127..e60848bb6bc3 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/communal/data/backup/CommunalBackupHelperTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/communal/data/backup/CommunalBackupHelperTest.kt
@@ -120,11 +120,26 @@ class CommunalBackupHelperTest : SysuiTestCase() {
private fun setUpDatabase(): List<FakeWidgetMetadata> {
return listOf(
- FakeWidgetMetadata(11, "com.android.fakePackage1/fakeWidget1", 3),
- FakeWidgetMetadata(12, "com.android.fakePackage2/fakeWidget2", 2),
- FakeWidgetMetadata(13, "com.android.fakePackage3/fakeWidget3", 1),
+ FakeWidgetMetadata(
+ widgetId = 11,
+ componentName = "com.android.fakePackage1/fakeWidget1",
+ rank = 3,
+ userSerialNumber = 0,
+ ),
+ FakeWidgetMetadata(
+ widgetId = 12,
+ componentName = "com.android.fakePackage2/fakeWidget2",
+ rank = 2,
+ userSerialNumber = 0,
+ ),
+ FakeWidgetMetadata(
+ widgetId = 13,
+ componentName = "com.android.fakePackage3/fakeWidget3",
+ rank = 1,
+ userSerialNumber = 10,
+ ),
)
- .onEach { dao.addWidget(it.widgetId, it.componentName, it.rank) }
+ .onEach { dao.addWidget(it.widgetId, it.componentName, it.rank, it.userSerialNumber) }
}
private fun getBackupDataInputStream(): BackupDataInputStream {
diff --git a/packages/SystemUI/tests/src/com/android/systemui/communal/data/backup/CommunalBackupUtilsTest.kt b/packages/SystemUI/tests/src/com/android/systemui/communal/data/backup/CommunalBackupUtilsTest.kt
index cde7a0ed1bd4..983a43561590 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/communal/data/backup/CommunalBackupUtilsTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/communal/data/backup/CommunalBackupUtilsTest.kt
@@ -66,11 +66,28 @@ class CommunalBackupUtilsTest : SysuiTestCase() {
// Set up database
val expectedWidgets =
listOf(
- FakeWidgetMetadata(11, "com.android.fakePackage1/fakeWidget1", 3),
- FakeWidgetMetadata(12, "com.android.fakePackage2/fakeWidget2", 2),
- FakeWidgetMetadata(13, "com.android.fakePackage3/fakeWidget3", 1),
+ FakeWidgetMetadata(
+ widgetId = 11,
+ componentName = "com.android.fakePackage1/fakeWidget1",
+ rank = 3,
+ userSerialNumber = 0,
+ ),
+ FakeWidgetMetadata(
+ widgetId = 12,
+ componentName = "com.android.fakePackage2/fakeWidget2",
+ rank = 2,
+ userSerialNumber = 0,
+ ),
+ FakeWidgetMetadata(
+ widgetId = 13,
+ componentName = "com.android.fakePackage3/fakeWidget3",
+ rank = 1,
+ userSerialNumber = 10,
+ ),
)
- expectedWidgets.forEach { dao.addWidget(it.widgetId, it.componentName, it.rank) }
+ expectedWidgets.forEach {
+ dao.addWidget(it.widgetId, it.componentName, it.rank, it.userSerialNumber)
+ }
// Get communal hub state
val state = underTest.getCommunalHubState()
@@ -128,7 +145,12 @@ class CommunalBackupUtilsTest : SysuiTestCase() {
assertThat(underTest.fileExists()).isFalse()
}
- data class FakeWidgetMetadata(val widgetId: Int, val componentName: String, val rank: Int)
+ data class FakeWidgetMetadata(
+ val widgetId: Int,
+ val componentName: String,
+ val rank: Int,
+ val userSerialNumber: Int,
+ )
companion object {
/**
@@ -140,7 +162,8 @@ class CommunalBackupUtilsTest : SysuiTestCase() {
{ actual, expected ->
actual?.widgetId == expected?.widgetId &&
actual?.componentName == expected?.componentName &&
- actual?.rank == expected?.rank
+ actual?.rank == expected?.rank &&
+ actual?.userSerialNumber == expected?.userSerialNumber
},
"represents",
)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/communal/data/db/CommunalDatabaseMigrationsTest.kt b/packages/SystemUI/tests/src/com/android/systemui/communal/data/db/CommunalDatabaseMigrationsTest.kt
new file mode 100644
index 000000000000..eb0ab782ae3f
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/communal/data/db/CommunalDatabaseMigrationsTest.kt
@@ -0,0 +1,149 @@
+/*
+ * 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.communal.data.db
+
+import androidx.room.testing.MigrationTestHelper
+import androidx.sqlite.db.SupportSQLiteDatabase
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.SmallTest
+import androidx.test.platform.app.InstrumentationRegistry
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.lifecycle.InstantTaskExecutorRule
+import com.google.common.truth.Truth.assertThat
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+
+@SmallTest
+@RunWith(AndroidJUnit4::class)
+class CommunalDatabaseMigrationsTest : SysuiTestCase() {
+
+ @JvmField @Rule val instantTaskExecutor = InstantTaskExecutorRule()
+
+ @get:Rule
+ val migrationTestHelper =
+ MigrationTestHelper(
+ InstrumentationRegistry.getInstrumentation(),
+ CommunalDatabase::class.java.canonicalName,
+ )
+
+ @Test
+ fun migrate1To2() {
+ // Create a communal database in version 1
+ val databaseV1 = migrationTestHelper.createDatabase(DATABASE_NAME, version = 1)
+
+ // Populate some fake data
+ val fakeWidgetsV1 =
+ listOf(
+ FakeCommunalWidgetItemV1(1, "test_widget_1", 11),
+ FakeCommunalWidgetItemV1(2, "test_widget_2", 12),
+ FakeCommunalWidgetItemV1(3, "test_widget_3", 13),
+ )
+ databaseV1.insertWidgetsV1(fakeWidgetsV1)
+
+ // Verify fake widgets populated
+ databaseV1.verifyWidgetsV1(fakeWidgetsV1)
+
+ // Run migration and get database V2, the migration test helper verifies that the schema is
+ // updated correctly
+ val databaseV2 =
+ migrationTestHelper.runMigrationsAndValidate(
+ name = DATABASE_NAME,
+ version = 2,
+ validateDroppedTables = false,
+ CommunalDatabase.MIGRATION_1_2,
+ )
+
+ // Verify data is migrated correctly
+ databaseV2.verifyWidgetsV2(fakeWidgetsV1.map { it.getV2() })
+ }
+
+ private fun SupportSQLiteDatabase.insertWidgetsV1(widgets: List<FakeCommunalWidgetItemV1>) {
+ widgets.forEach { widget ->
+ execSQL(
+ "INSERT INTO communal_widget_table(widget_id, component_name, item_id) " +
+ "VALUES(${widget.widgetId}, '${widget.componentName}', ${widget.itemId})"
+ )
+ }
+ }
+
+ private fun SupportSQLiteDatabase.verifyWidgetsV1(widgets: List<FakeCommunalWidgetItemV1>) {
+ val cursor = query("SELECT * FROM communal_widget_table")
+ assertThat(cursor.moveToFirst()).isTrue()
+
+ widgets.forEach { widget ->
+ assertThat(cursor.getInt(cursor.getColumnIndex("widget_id"))).isEqualTo(widget.widgetId)
+ assertThat(cursor.getString(cursor.getColumnIndex("component_name")))
+ .isEqualTo(widget.componentName)
+ assertThat(cursor.getInt(cursor.getColumnIndex("item_id"))).isEqualTo(widget.itemId)
+
+ cursor.moveToNext()
+ }
+
+ // Verify there is no more columns
+ assertThat(cursor.isAfterLast).isTrue()
+ }
+
+ private fun SupportSQLiteDatabase.verifyWidgetsV2(widgets: List<FakeCommunalWidgetItemV2>) {
+ val cursor = query("SELECT * FROM communal_widget_table")
+ assertThat(cursor.moveToFirst()).isTrue()
+
+ widgets.forEach { widget ->
+ assertThat(cursor.getInt(cursor.getColumnIndex("widget_id"))).isEqualTo(widget.widgetId)
+ assertThat(cursor.getString(cursor.getColumnIndex("component_name")))
+ .isEqualTo(widget.componentName)
+ assertThat(cursor.getInt(cursor.getColumnIndex("item_id"))).isEqualTo(widget.itemId)
+ assertThat(cursor.getInt(cursor.getColumnIndex("user_serial_number")))
+ .isEqualTo(widget.userSerialNumber)
+
+ cursor.moveToNext()
+ }
+
+ // Verify there is no more columns
+ assertThat(cursor.isAfterLast).isTrue()
+ }
+
+ /**
+ * Returns the expected data after migration from V1 to V2, which is simply that the new user
+ * serial number field is now set to [CommunalWidgetItem.USER_SERIAL_NUMBER_UNDEFINED].
+ */
+ private fun FakeCommunalWidgetItemV1.getV2(): FakeCommunalWidgetItemV2 {
+ return FakeCommunalWidgetItemV2(
+ widgetId,
+ componentName,
+ itemId,
+ CommunalWidgetItem.USER_SERIAL_NUMBER_UNDEFINED,
+ )
+ }
+
+ private data class FakeCommunalWidgetItemV1(
+ val widgetId: Int,
+ val componentName: String,
+ val itemId: Int,
+ )
+
+ private data class FakeCommunalWidgetItemV2(
+ val widgetId: Int,
+ val componentName: String,
+ val itemId: Int,
+ val userSerialNumber: Int,
+ )
+
+ companion object {
+ private const val DATABASE_NAME = "communal_db"
+ }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/communal/data/db/CommunalWidgetDaoTest.kt b/packages/SystemUI/tests/src/com/android/systemui/communal/data/db/CommunalWidgetDaoTest.kt
index f77c7a672ae3..d6705085eafd 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/communal/data/db/CommunalWidgetDaoTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/communal/data/db/CommunalWidgetDaoTest.kt
@@ -67,11 +67,12 @@ class CommunalWidgetDaoTest : SysuiTestCase() {
@Test
fun addWidget_readValueInDb() =
testScope.runTest {
- val (widgetId, provider, priority) = widgetInfo1
+ val (widgetId, provider, priority, userSerialNumber) = widgetInfo1
communalWidgetDao.addWidget(
widgetId = widgetId,
provider = provider,
priority = priority,
+ userSerialNumber = userSerialNumber,
)
val entry = communalWidgetDao.getWidgetByIdNow(id = 1)
assertThat(entry).isEqualTo(communalWidgetItemEntry1)
@@ -80,11 +81,12 @@ class CommunalWidgetDaoTest : SysuiTestCase() {
@Test
fun deleteWidget_notInDb_returnsFalse() =
testScope.runTest {
- val (widgetId, provider, priority) = widgetInfo1
+ val (widgetId, provider, priority, userSerialNumber) = widgetInfo1
communalWidgetDao.addWidget(
widgetId = widgetId,
provider = provider,
priority = priority,
+ userSerialNumber = userSerialNumber,
)
assertThat(communalWidgetDao.deleteWidgetById(widgetId = 123)).isFalse()
}
@@ -95,11 +97,12 @@ class CommunalWidgetDaoTest : SysuiTestCase() {
val widgetsToAdd = listOf(widgetInfo1, widgetInfo2)
val widgets = collectLastValue(communalWidgetDao.getWidgets())
widgetsToAdd.forEach {
- val (widgetId, provider, priority) = it
+ val (widgetId, provider, priority, userSerialNumber) = it
communalWidgetDao.addWidget(
widgetId = widgetId,
provider = provider,
priority = priority,
+ userSerialNumber = userSerialNumber
)
}
assertThat(widgets())
@@ -118,11 +121,12 @@ class CommunalWidgetDaoTest : SysuiTestCase() {
val widgets = collectLastValue(communalWidgetDao.getWidgets())
widgetsToAdd.forEach {
- val (widgetId, provider, priority) = it
+ val (widgetId, provider, priority, userSerialNumber) = it
communalWidgetDao.addWidget(
widgetId = widgetId,
provider = provider,
priority = priority,
+ userSerialNumber = userSerialNumber,
)
}
assertThat(widgets())
@@ -144,11 +148,12 @@ class CommunalWidgetDaoTest : SysuiTestCase() {
val widgets = collectLastValue(communalWidgetDao.getWidgets())
widgetsToAdd.forEach {
- val (widgetId, provider, priority) = it
+ val (widgetId, provider, priority, userSerialNumber) = it
communalWidgetDao.addWidget(
widgetId = widgetId,
provider = provider,
priority = priority,
+ userSerialNumber = userSerialNumber,
)
}
assertThat(widgets())
@@ -180,11 +185,12 @@ class CommunalWidgetDaoTest : SysuiTestCase() {
val widgets = collectLastValue(communalWidgetDao.getWidgets())
existingWidgets.forEach {
- val (widgetId, provider, priority) = it
+ val (widgetId, provider, priority, userSerialNumber) = it
communalWidgetDao.addWidget(
widgetId = widgetId,
provider = provider,
priority = priority,
+ userSerialNumber = userSerialNumber,
)
}
assertThat(widgets())
@@ -212,6 +218,7 @@ class CommunalWidgetDaoTest : SysuiTestCase() {
widgetId = widgetInfo3.widgetId,
provider = widgetInfo3.provider,
priority = 2,
+ userSerialNumber = widgetInfo3.userSerialNumber,
)
assertThat(widgets())
.containsExactly(
@@ -246,6 +253,7 @@ class CommunalWidgetDaoTest : SysuiTestCase() {
widgetId = fakeWidget.widgetId,
componentName = fakeWidget.componentName,
itemId = rank.uid,
+ userSerialNumber = fakeWidget.userSerialNumber,
)
expected[rank] = widget
}
@@ -258,13 +266,15 @@ class CommunalWidgetDaoTest : SysuiTestCase() {
widgetId = metadata.widgetId,
provider = metadata.provider,
priority = priority ?: metadata.priority,
+ userSerialNumber = metadata.userSerialNumber,
)
}
data class FakeWidgetMetadata(
val widgetId: Int,
val provider: ComponentName,
- val priority: Int
+ val priority: Int,
+ val userSerialNumber: Int,
)
companion object {
@@ -272,19 +282,22 @@ class CommunalWidgetDaoTest : SysuiTestCase() {
FakeWidgetMetadata(
widgetId = 1,
provider = ComponentName("pk_name", "cls_name_1"),
- priority = 1
+ priority = 1,
+ userSerialNumber = 0,
)
val widgetInfo2 =
FakeWidgetMetadata(
widgetId = 2,
provider = ComponentName("pk_name", "cls_name_2"),
- priority = 2
+ priority = 2,
+ userSerialNumber = 0,
)
val widgetInfo3 =
FakeWidgetMetadata(
widgetId = 3,
provider = ComponentName("pk_name", "cls_name_3"),
- priority = 3
+ priority = 3,
+ userSerialNumber = 10,
)
val communalItemRankEntry1 = CommunalItemRank(uid = 1L, rank = widgetInfo1.priority)
val communalItemRankEntry2 = CommunalItemRank(uid = 2L, rank = widgetInfo2.priority)
@@ -295,6 +308,7 @@ class CommunalWidgetDaoTest : SysuiTestCase() {
widgetId = widgetInfo1.widgetId,
componentName = widgetInfo1.provider.flattenToString(),
itemId = communalItemRankEntry1.uid,
+ userSerialNumber = widgetInfo1.userSerialNumber,
)
val communalWidgetItemEntry2 =
CommunalWidgetItem(
@@ -302,6 +316,7 @@ class CommunalWidgetDaoTest : SysuiTestCase() {
widgetId = widgetInfo2.widgetId,
componentName = widgetInfo2.provider.flattenToString(),
itemId = communalItemRankEntry2.uid,
+ userSerialNumber = widgetInfo2.userSerialNumber,
)
val communalWidgetItemEntry3 =
CommunalWidgetItem(
@@ -309,6 +324,7 @@ class CommunalWidgetDaoTest : SysuiTestCase() {
widgetId = widgetInfo3.widgetId,
componentName = widgetInfo3.provider.flattenToString(),
itemId = communalItemRankEntry3.uid,
+ userSerialNumber = widgetInfo3.userSerialNumber,
)
val fakeState =
CommunalHubState().apply {
@@ -318,11 +334,13 @@ class CommunalWidgetDaoTest : SysuiTestCase() {
widgetId = 1
componentName = "pk_name/fake_widget_1"
rank = 1
+ userSerialNumber = 0
},
CommunalHubState.CommunalWidgetItem().apply {
widgetId = 2
componentName = "pk_name/fake_widget_2"
rank = 2
+ userSerialNumber = 10
},
)
.toTypedArray()
diff --git a/packages/SystemUI/tests/src/com/android/systemui/controls/ui/DetailDialogTest.kt b/packages/SystemUI/tests/src/com/android/systemui/controls/ui/DetailDialogTest.kt
index 10b3ce31a895..0489d815b074 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/controls/ui/DetailDialogTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/controls/ui/DetailDialogTest.kt
@@ -89,7 +89,8 @@ class DetailDialogTest : SysuiTestCase() {
verify(taskView).startActivity(any(), any(), capture(optionsCaptor), any())
assertThat(optionsCaptor.value.pendingIntentBackgroundActivityStartMode)
- .isEqualTo(ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED)
+ .isAnyOf(ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED,
+ ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS)
assertThat(optionsCaptor.value.isPendingIntentBackgroundActivityLaunchAllowedByPermission)
.isTrue()
assertThat(optionsCaptor.value.taskAlwaysOnTop).isTrue()
diff --git a/packages/SystemUI/tests/src/com/android/systemui/deviceentry/domain/interactor/BiometricMessageInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/deviceentry/domain/interactor/BiometricMessageInteractorTest.kt
index 431fef65e95b..6fd866066879 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/deviceentry/domain/interactor/BiometricMessageInteractorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/deviceentry/domain/interactor/BiometricMessageInteractorTest.kt
@@ -24,6 +24,7 @@ import android.hardware.fingerprint.FingerprintManager
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
+import com.android.systemui.biometrics.FaceHelpMessageDebouncer
import com.android.systemui.biometrics.data.repository.fingerprintPropertyRepository
import com.android.systemui.biometrics.domain.faceHelpMessageDeferral
import com.android.systemui.biometrics.shared.model.FingerprintSensorType
@@ -45,6 +46,7 @@ import com.android.systemui.testKosmos
import com.android.systemui.util.mockito.whenever
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.test.runCurrent
import kotlinx.coroutines.test.runTest
import org.junit.Test
import org.junit.runner.RunWith
@@ -264,11 +266,20 @@ class BiometricMessageInteractorTest : SysuiTestCase() {
biometricSettingsRepository.setIsFaceAuthEnrolledAndEnabled(true)
biometricSettingsRepository.setIsFingerprintAuthEnrolledAndEnabled(false)
- // WHEN authentication status help
+ // WHEN authentication status help past debouncer
+ faceAuthRepository.setAuthenticationStatus(
+ HelpFaceAuthenticationStatus(
+ msg = "Move left",
+ msgId = FACE_ACQUIRED_TOO_RIGHT,
+ createdAt = 0L,
+ )
+ )
+ runCurrent()
faceAuthRepository.setAuthenticationStatus(
HelpFaceAuthenticationStatus(
msg = "Move left",
msgId = FACE_ACQUIRED_TOO_RIGHT,
+ createdAt = FaceHelpMessageDebouncer.DEFAULT_WINDOW_MS,
)
)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryFaceAuthInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryFaceAuthInteractorTest.kt
index 529cd6ea8ddc..0b7a3ed3a7c2 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryFaceAuthInteractorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryFaceAuthInteractorTest.kt
@@ -90,6 +90,7 @@ class DeviceEntryFaceAuthInteractorTest : SysuiTestCase() {
private val keyguardUpdateMonitor = kosmos.keyguardUpdateMonitor
private val faceWakeUpTriggersConfig = kosmos.fakeFaceWakeUpTriggersConfig
private val trustManager = kosmos.trustManager
+ private val deviceEntryFaceAuthStatusInteractor = kosmos.deviceEntryFaceAuthStatusInteractor
@Before
fun setup() {
@@ -112,6 +113,7 @@ class DeviceEntryFaceAuthInteractorTest : SysuiTestCase() {
powerInteractor,
fakeBiometricSettingsRepository,
trustManager,
+ deviceEntryFaceAuthStatusInteractor,
)
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryFaceAuthStatusInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryFaceAuthStatusInteractorTest.kt
new file mode 100644
index 000000000000..6022d9cfcbfd
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryFaceAuthStatusInteractorTest.kt
@@ -0,0 +1,160 @@
+/*
+ * 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.deviceentry.domain.interactor
+
+import android.hardware.biometrics.BiometricFaceConstants
+import android.hardware.face.FaceManager
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.SmallTest
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.biometrics.FaceHelpMessageDebouncer.Companion.DEFAULT_WINDOW_MS
+import com.android.systemui.coroutines.collectLastValue
+import com.android.systemui.deviceentry.shared.model.AcquiredFaceAuthenticationStatus
+import com.android.systemui.deviceentry.shared.model.ErrorFaceAuthenticationStatus
+import com.android.systemui.deviceentry.shared.model.FailedFaceAuthenticationStatus
+import com.android.systemui.deviceentry.shared.model.HelpFaceAuthenticationStatus
+import com.android.systemui.deviceentry.shared.model.SuccessFaceAuthenticationStatus
+import com.android.systemui.keyguard.data.repository.fakeDeviceEntryFaceAuthRepository
+import com.android.systemui.kosmos.testScope
+import com.android.systemui.res.R
+import com.android.systemui.testKosmos
+import com.google.common.truth.Truth.assertThat
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.test.TestScope
+import kotlinx.coroutines.test.runCurrent
+import kotlinx.coroutines.test.runTest
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.Mockito.mock
+
+@OptIn(ExperimentalCoroutinesApi::class)
+@SmallTest
+@RunWith(AndroidJUnit4::class)
+class DeviceEntryFaceAuthStatusInteractorTest : SysuiTestCase() {
+ private val kosmos = testKosmos()
+ private val testScope: TestScope = kosmos.testScope
+ private lateinit var underTest: DeviceEntryFaceAuthStatusInteractor
+ private val ignoreHelpMessageId = 1
+
+ @Before
+ fun setup() {
+ overrideResource(
+ R.array.config_face_acquire_device_entry_ignorelist,
+ intArrayOf(ignoreHelpMessageId)
+ )
+ underTest = kosmos.deviceEntryFaceAuthStatusInteractor
+ }
+
+ @Test
+ fun successAuthenticationStatus() =
+ testScope.runTest {
+ val authenticationStatus by collectLastValue(underTest.authenticationStatus)
+ val successStatus =
+ SuccessFaceAuthenticationStatus(
+ successResult = mock(FaceManager.AuthenticationResult::class.java)
+ )
+ kosmos.fakeDeviceEntryFaceAuthRepository.setAuthenticationStatus(successStatus)
+ assertThat(authenticationStatus).isEqualTo(successStatus)
+ }
+
+ @Test
+ fun acquiredFaceAuthenticationStatus() =
+ testScope.runTest {
+ val authenticationStatus by collectLastValue(underTest.authenticationStatus)
+ val acquiredStatus = AcquiredFaceAuthenticationStatus(acquiredInfo = 0)
+ kosmos.fakeDeviceEntryFaceAuthRepository.setAuthenticationStatus(acquiredStatus)
+ assertThat(authenticationStatus).isEqualTo(acquiredStatus)
+ }
+
+ @Test
+ fun failedFaceAuthenticationStatus() =
+ testScope.runTest {
+ val authenticationStatus by collectLastValue(underTest.authenticationStatus)
+ val failedStatus = FailedFaceAuthenticationStatus()
+ kosmos.fakeDeviceEntryFaceAuthRepository.setAuthenticationStatus(failedStatus)
+ assertThat(authenticationStatus).isEqualTo(failedStatus)
+ }
+
+ @Test
+ fun errorFaceAuthenticationStatus() =
+ testScope.runTest {
+ val authenticationStatus by collectLastValue(underTest.authenticationStatus)
+ val errorStatus = ErrorFaceAuthenticationStatus(0, "test")
+ kosmos.fakeDeviceEntryFaceAuthRepository.setAuthenticationStatus(errorStatus)
+ assertThat(authenticationStatus).isEqualTo(errorStatus)
+ }
+
+ @Test
+ fun firstHelpFaceAuthenticationStatus_noUpdate() =
+ testScope.runTest {
+ val authenticationStatus by collectLastValue(underTest.authenticationStatus)
+ kosmos.fakeDeviceEntryFaceAuthRepository.setAuthenticationStatus(
+ AcquiredFaceAuthenticationStatus(
+ BiometricFaceConstants.FACE_ACQUIRED_START,
+ createdAt = 0
+ )
+ )
+ val helpMessage = HelpFaceAuthenticationStatus(0, "test", 1)
+ kosmos.fakeDeviceEntryFaceAuthRepository.setAuthenticationStatus(helpMessage)
+ assertThat(authenticationStatus).isNull()
+ }
+
+ @Test
+ fun helpFaceAuthenticationStatus_afterWindow() =
+ testScope.runTest {
+ val authenticationStatus by collectLastValue(underTest.authenticationStatus)
+ kosmos.fakeDeviceEntryFaceAuthRepository.setAuthenticationStatus(
+ HelpFaceAuthenticationStatus(0, "test1", 0)
+ )
+ runCurrent()
+ val helpMessage = HelpFaceAuthenticationStatus(0, "test2", DEFAULT_WINDOW_MS)
+ kosmos.fakeDeviceEntryFaceAuthRepository.setAuthenticationStatus(helpMessage)
+ runCurrent()
+ assertThat(authenticationStatus).isEqualTo(helpMessage)
+ }
+
+ @Test
+ fun helpFaceAuthenticationStatus_onlyIgnoredHelpMessages_afterWindow() =
+ testScope.runTest {
+ val authenticationStatus by collectLastValue(underTest.authenticationStatus)
+ kosmos.fakeDeviceEntryFaceAuthRepository.setAuthenticationStatus(
+ HelpFaceAuthenticationStatus(ignoreHelpMessageId, "ignoredMsg", 0)
+ )
+ runCurrent()
+ kosmos.fakeDeviceEntryFaceAuthRepository.setAuthenticationStatus(
+ HelpFaceAuthenticationStatus(ignoreHelpMessageId, "ignoredMsg", DEFAULT_WINDOW_MS)
+ )
+ runCurrent()
+ assertThat(authenticationStatus).isNull()
+ }
+
+ @Test
+ fun helpFaceAuthenticationStatus_afterWindow_onIgnoredMessage_showsOtherMessageInstead() =
+ testScope.runTest {
+ val authenticationStatus by collectLastValue(underTest.authenticationStatus)
+ val validHelpMessage = HelpFaceAuthenticationStatus(0, "validHelpMsg", 0)
+ kosmos.fakeDeviceEntryFaceAuthRepository.setAuthenticationStatus(validHelpMessage)
+ runCurrent()
+ // help message that should be ignored
+ kosmos.fakeDeviceEntryFaceAuthRepository.setAuthenticationStatus(
+ HelpFaceAuthenticationStatus(ignoreHelpMessageId, "ignoredMsg", DEFAULT_WINDOW_MS)
+ )
+ runCurrent()
+ assertThat(authenticationStatus).isEqualTo(validHelpMessage)
+ }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/display/data/repository/DisplayRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/display/data/repository/DisplayRepositoryTest.kt
index f34058b2a684..20cb1e129f49 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/display/data/repository/DisplayRepositoryTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/display/data/repository/DisplayRepositoryTest.kt
@@ -59,12 +59,14 @@ class DisplayRepositoryTest : SysuiTestCase() {
private val testHandler = FakeHandler(Looper.getMainLooper())
private val testScope = TestScope(UnconfinedTestDispatcher())
+ private val defaultDisplay =
+ display(type = TYPE_INTERNAL, id = DEFAULT_DISPLAY, state = Display.STATE_ON)
private lateinit var displayRepository: DisplayRepositoryImpl
@Before
fun setup() {
- setDisplays(DEFAULT_DISPLAY)
+ setDisplays(listOf(defaultDisplay))
setAllDisplaysIncludingDisabled(DEFAULT_DISPLAY)
displayRepository =
DisplayRepositoryImpl(
@@ -434,19 +436,12 @@ class DisplayRepositoryTest : SysuiTestCase() {
fun defaultDisplayOff_changes() =
testScope.runTest {
val defaultDisplayOff by latestDefaultDisplayOffFlowValue()
- setDisplays(
- listOf(
- display(type = TYPE_INTERNAL, id = DEFAULT_DISPLAY, state = Display.STATE_OFF)
- )
- )
+
+ whenever(defaultDisplay.state).thenReturn(Display.STATE_OFF)
displayListener.value.onDisplayChanged(DEFAULT_DISPLAY)
assertThat(defaultDisplayOff).isTrue()
- setDisplays(
- listOf(
- display(type = TYPE_INTERNAL, id = DEFAULT_DISPLAY, state = Display.STATE_ON)
- )
- )
+ whenever(defaultDisplay.state).thenReturn(Display.STATE_ON)
displayListener.value.onDisplayChanged(DEFAULT_DISPLAY)
assertThat(defaultDisplayOff).isFalse()
}
@@ -545,7 +540,10 @@ class DisplayRepositoryTest : SysuiTestCase() {
}
private fun setAllDisplaysIncludingDisabled(vararg ids: Int) {
- val displays = ids.map { display(type = TYPE_EXTERNAL, id = it) }.toTypedArray()
+ val displays =
+ (ids.toSet() - DEFAULT_DISPLAY) // Default display always added.
+ .map { display(type = TYPE_EXTERNAL, id = it) }
+ .toTypedArray() + defaultDisplay
whenever(
displayManager.getDisplays(
eq(DisplayManager.DISPLAY_CATEGORY_ALL_INCLUDING_DISABLED)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/globalactions/GlobalActionsDialogLiteTest.java b/packages/SystemUI/tests/src/com/android/systemui/globalactions/GlobalActionsDialogLiteTest.java
index e2cca3873bf7..ae635b8cbfd4 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/globalactions/GlobalActionsDialogLiteTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/globalactions/GlobalActionsDialogLiteTest.java
@@ -41,7 +41,6 @@ import android.media.AudioManager;
import android.os.Handler;
import android.os.UserManager;
import android.provider.Settings;
-import android.service.dreams.IDreamManager;
import android.testing.TestableLooper;
import android.view.GestureDetector;
import android.view.IWindowManager;
@@ -106,7 +105,6 @@ public class GlobalActionsDialogLiteTest extends SysuiTestCase {
@Mock private GlobalActions.GlobalActionsManager mWindowManagerFuncs;
@Mock private AudioManager mAudioManager;
- @Mock private IDreamManager mDreamManager;
@Mock private DevicePolicyManager mDevicePolicyManager;
@Mock private LockPatternUtils mLockPatternUtils;
@Mock private BroadcastDispatcher mBroadcastDispatcher;
@@ -165,7 +163,6 @@ public class GlobalActionsDialogLiteTest extends SysuiTestCase {
mGlobalActionsDialogLite = new GlobalActionsDialogLite(mContext,
mWindowManagerFuncs,
mAudioManager,
- mDreamManager,
mDevicePolicyManager,
mLockPatternUtils,
mBroadcastDispatcher,
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyboard/data/repository/KeyboardRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyboard/data/repository/KeyboardRepositoryTest.kt
index 53bcf865b829..361e768a5b51 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyboard/data/repository/KeyboardRepositoryTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyboard/data/repository/KeyboardRepositoryTest.kt
@@ -20,6 +20,7 @@ package com.android.systemui.keyboard.data.repository
import android.hardware.input.InputManager
import android.hardware.input.InputManager.KeyboardBacklightListener
import android.hardware.input.KeyboardBacklightState
+import android.testing.TestableLooper
import android.view.InputDevice
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
@@ -27,11 +28,13 @@ import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.FlowValue
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.coroutines.collectValues
+import com.android.systemui.inputdevice.data.repository.InputDeviceRepository
import com.android.systemui.keyboard.data.model.Keyboard
import com.android.systemui.util.mockito.any
import com.android.systemui.util.mockito.mock
import com.android.systemui.util.mockito.nullable
import com.android.systemui.util.mockito.whenever
+import com.android.systemui.utils.os.FakeHandler
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.ExperimentalCoroutinesApi
@@ -53,6 +56,7 @@ import org.mockito.MockitoAnnotations
@OptIn(ExperimentalCoroutinesApi::class)
@SmallTest
+@TestableLooper.RunWithLooper
@RunWith(AndroidJUnit4::class)
class KeyboardRepositoryTest : SysuiTestCase() {
@@ -63,6 +67,7 @@ class KeyboardRepositoryTest : SysuiTestCase() {
private lateinit var underTest: KeyboardRepository
private lateinit var dispatcher: CoroutineDispatcher
+ private lateinit var inputDeviceRepo: InputDeviceRepository
private lateinit var testScope: TestScope
@Before
@@ -75,7 +80,9 @@ class KeyboardRepositoryTest : SysuiTestCase() {
}
dispatcher = StandardTestDispatcher()
testScope = TestScope(dispatcher)
- underTest = KeyboardRepositoryImpl(testScope.backgroundScope, dispatcher, inputManager)
+ val handler = FakeHandler(TestableLooper.get(this).looper)
+ inputDeviceRepo = InputDeviceRepository(handler, testScope.backgroundScope, inputManager)
+ underTest = KeyboardRepositoryImpl(dispatcher, inputManager, inputDeviceRepo)
}
@Test
@@ -363,6 +370,7 @@ class KeyboardRepositoryTest : SysuiTestCase() {
private val maxBrightnessLevel: Int
) : KeyboardBacklightState() {
override fun getBrightnessLevel() = brightnessLevel
+
override fun getMaxBrightnessLevel() = maxBrightnessLevel
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/data/repository/ShortcutHelperCategoriesRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/data/repository/ShortcutHelperCategoriesRepositoryTest.kt
new file mode 100644
index 000000000000..14837f219862
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/data/repository/ShortcutHelperCategoriesRepositoryTest.kt
@@ -0,0 +1,90 @@
+/*
+ * 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.data.repository
+
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.SmallTest
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.coroutines.collectLastValue
+import com.android.systemui.keyboard.shortcut.data.source.FakeKeyboardShortcutGroupsSource
+import com.android.systemui.keyboard.shortcut.data.source.TestShortcuts
+import com.android.systemui.keyboard.shortcut.shortcutHelperAppCategoriesShortcutsSource
+import com.android.systemui.keyboard.shortcut.shortcutHelperCategoriesRepository
+import com.android.systemui.keyboard.shortcut.shortcutHelperCurrentAppShortcutsSource
+import com.android.systemui.keyboard.shortcut.shortcutHelperInputShortcutsSource
+import com.android.systemui.keyboard.shortcut.shortcutHelperMultiTaskingShortcutsSource
+import com.android.systemui.keyboard.shortcut.shortcutHelperSystemShortcutsSource
+import com.android.systemui.keyboard.shortcut.shortcutHelperTestHelper
+import com.android.systemui.kosmos.testDispatcher
+import com.android.systemui.kosmos.testScope
+import com.android.systemui.testKosmos
+import com.google.common.truth.Truth.assertThat
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.test.UnconfinedTestDispatcher
+import kotlinx.coroutines.test.runTest
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+
+@OptIn(ExperimentalCoroutinesApi::class)
+@SmallTest
+@RunWith(AndroidJUnit4::class)
+class ShortcutHelperCategoriesRepositoryTest : SysuiTestCase() {
+
+ private val fakeSystemSource = FakeKeyboardShortcutGroupsSource()
+ private val fakeMultiTaskingSource = FakeKeyboardShortcutGroupsSource()
+
+ private val kosmos =
+ testKosmos().also {
+ it.testDispatcher = UnconfinedTestDispatcher()
+ it.shortcutHelperSystemShortcutsSource = fakeSystemSource
+ it.shortcutHelperMultiTaskingShortcutsSource = fakeMultiTaskingSource
+ it.shortcutHelperAppCategoriesShortcutsSource = FakeKeyboardShortcutGroupsSource()
+ it.shortcutHelperInputShortcutsSource = FakeKeyboardShortcutGroupsSource()
+ it.shortcutHelperCurrentAppShortcutsSource = FakeKeyboardShortcutGroupsSource()
+ }
+
+ private val repo = kosmos.shortcutHelperCategoriesRepository
+ private val helper = kosmos.shortcutHelperTestHelper
+ private val testScope = kosmos.testScope
+
+ @Before
+ fun setUp() {
+ fakeSystemSource.setGroups(TestShortcuts.systemGroups)
+ fakeMultiTaskingSource.setGroups(TestShortcuts.multitaskingGroups)
+ }
+
+ @Test
+ fun categories_multipleSubscribers_replaysExistingValueToNewSubscribers() =
+ testScope.runTest {
+ fakeSystemSource.setGroups(TestShortcuts.systemGroups)
+ fakeMultiTaskingSource.setGroups(TestShortcuts.multitaskingGroups)
+ helper.showFromActivity()
+ val firstCategories by collectLastValue(repo.categories)
+
+ // Intentionally change shortcuts now. This simulates "current app" shortcuts changing
+ // when our helper is shown.
+ // We still want to return the shortcuts that were returned before our helper was
+ // showing.
+ fakeSystemSource.setGroups(emptyList())
+
+ val secondCategories by collectLastValue(repo.categories)
+ // Make sure the second subscriber receives the same value as the first subscriber, even
+ // though fetching shortcuts again would have returned a new result.
+ assertThat(secondCategories).isEqualTo(firstCategories)
+ }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/data/source/AppCategoriesShortcutsSourceTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/data/source/AppCategoriesShortcutsSourceTest.kt
new file mode 100644
index 000000000000..5d592087527c
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/data/source/AppCategoriesShortcutsSourceTest.kt
@@ -0,0 +1,81 @@
+/*
+ * 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.data.source
+
+import android.view.KeyEvent
+import android.view.KeyboardShortcutGroup
+import android.view.KeyboardShortcutInfo
+import android.view.mockWindowManager
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.SmallTest
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.kosmos.testDispatcher
+import com.android.systemui.kosmos.testScope
+import com.android.systemui.testKosmos
+import com.android.systemui.util.mockito.whenever
+import com.google.common.truth.Truth.assertThat
+import kotlinx.coroutines.test.runTest
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+
+@SmallTest
+@RunWith(AndroidJUnit4::class)
+class AppCategoriesShortcutsSourceTest : SysuiTestCase() {
+
+ private val kosmos = testKosmos()
+ private val testScope = kosmos.testScope
+ private val mockWindowManager = kosmos.mockWindowManager
+ private val source =
+ AppCategoriesShortcutsSource(kosmos.mockWindowManager, kosmos.testDispatcher)
+
+ private var appCategoriesGroup: KeyboardShortcutGroup? = null
+
+ @Before
+ fun setUp() {
+ whenever(mockWindowManager.getApplicationLaunchKeyboardShortcuts(TEST_DEVICE_ID))
+ .thenAnswer { appCategoriesGroup }
+ }
+
+ @Test
+ fun shortcutGroups_nullResult_returnsEmptyList() =
+ testScope.runTest {
+ appCategoriesGroup = null
+
+ assertThat(source.shortcutGroups(TEST_DEVICE_ID)).isEmpty()
+ }
+
+ @Test
+ fun shortcutGroups_returnsSortedList() =
+ testScope.runTest {
+ val testItems =
+ listOf(
+ KeyboardShortcutInfo("Info 2", KeyEvent.KEYCODE_E, KeyEvent.META_META_ON),
+ KeyboardShortcutInfo("Info 1", KeyEvent.KEYCODE_E, KeyEvent.META_META_ON),
+ KeyboardShortcutInfo("Info 3", KeyEvent.KEYCODE_E, KeyEvent.META_META_ON),
+ )
+ appCategoriesGroup = KeyboardShortcutGroup("Test Group", testItems)
+
+ val shortcuts = source.shortcutGroups(TEST_DEVICE_ID).first().items
+ val shortcutLabels = shortcuts.map { it.label.toString() }
+ assertThat(shortcutLabels).containsExactly("Info 1", "Info 2", "Info 3").inOrder()
+ }
+
+ companion object {
+ private const val TEST_DEVICE_ID = 123
+ }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/data/source/CurrentAppShortcutsSourceTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/data/source/CurrentAppShortcutsSourceTest.kt
new file mode 100644
index 000000000000..4d112e93013a
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/data/source/CurrentAppShortcutsSourceTest.kt
@@ -0,0 +1,93 @@
+/*
+ * 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.data.source
+
+import android.view.KeyboardShortcutGroup
+import android.view.WindowManager
+import android.view.mockWindowManager
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.SmallTest
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.kosmos.testScope
+import com.android.systemui.testKosmos
+import com.android.systemui.util.mockito.any
+import com.android.systemui.util.mockito.whenever
+import com.google.common.truth.Truth.assertThat
+import kotlinx.coroutines.test.runTest
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+
+@SmallTest
+@RunWith(AndroidJUnit4::class)
+class CurrentAppShortcutsSourceTest : SysuiTestCase() {
+
+ private val kosmos = testKosmos()
+ private val testScope = kosmos.testScope
+
+ private val mockWindowManager = kosmos.mockWindowManager
+ private val source = CurrentAppShortcutsSource(mockWindowManager)
+
+ private var shortcutGroups: List<KeyboardShortcutGroup>? = null
+
+ @Before
+ fun setUp() {
+ whenever(mockWindowManager.requestAppKeyboardShortcuts(any(), any())).thenAnswer {
+ val receiver = it.arguments[0] as WindowManager.KeyboardShortcutsReceiver
+ receiver.onKeyboardShortcutsReceived(shortcutGroups)
+ }
+ }
+
+ @Test
+ fun shortcutGroups_wmReturnsNullList_returnsEmptyList() =
+ testScope.runTest {
+ shortcutGroups = null
+
+ val groups = source.shortcutGroups(TEST_DEVICE_ID)
+
+ assertThat(groups).isEmpty()
+ }
+
+ @Test
+ fun shortcutGroups_wmReturnsEmptyList_returnsEmptyList() =
+ testScope.runTest {
+ shortcutGroups = emptyList()
+
+ val groups = source.shortcutGroups(TEST_DEVICE_ID)
+
+ assertThat(groups).isEmpty()
+ }
+
+ @Test
+ fun shortcutGroups_wmReturnsGroups_returnsWmGroups() =
+ testScope.runTest {
+ shortcutGroups =
+ listOf(
+ KeyboardShortcutGroup("wm ime group 1"),
+ KeyboardShortcutGroup("wm ime group 2"),
+ KeyboardShortcutGroup("wm ime group 3"),
+ )
+
+ val groups = source.shortcutGroups(TEST_DEVICE_ID)
+
+ assertThat(groups).hasSize(3)
+ }
+
+ companion object {
+ private const val TEST_DEVICE_ID = 9876
+ }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/data/source/InputShortcutsSourceTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/data/source/InputShortcutsSourceTest.kt
new file mode 100644
index 000000000000..715d907b7372
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/data/source/InputShortcutsSourceTest.kt
@@ -0,0 +1,94 @@
+/*
+ * 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.data.source
+
+import android.content.res.mainResources
+import android.view.KeyboardShortcutGroup
+import android.view.WindowManager.KeyboardShortcutsReceiver
+import android.view.mockWindowManager
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.SmallTest
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.kosmos.testScope
+import com.android.systemui.testKosmos
+import com.android.systemui.util.mockito.any
+import com.android.systemui.util.mockito.whenever
+import com.google.common.truth.Truth.assertThat
+import kotlinx.coroutines.test.runTest
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+
+@SmallTest
+@RunWith(AndroidJUnit4::class)
+class InputShortcutsSourceTest : SysuiTestCase() {
+
+ private val kosmos = testKosmos()
+ private val testScope = kosmos.testScope
+
+ private val mockWindowManager = kosmos.mockWindowManager
+ private val source = InputShortcutsSource(kosmos.mainResources, mockWindowManager)
+
+ private var wmImeShortcutGroups: List<KeyboardShortcutGroup>? = null
+
+ @Before
+ fun setUp() {
+ whenever(mockWindowManager.requestImeKeyboardShortcuts(any(), any())).thenAnswer {
+ val receiver = it.arguments[0] as KeyboardShortcutsReceiver
+ receiver.onKeyboardShortcutsReceived(wmImeShortcutGroups)
+ }
+ }
+
+ @Test
+ fun shortcutGroups_wmReturnsNullList_returnsSingleGroup() =
+ testScope.runTest {
+ wmImeShortcutGroups = null
+
+ val groups = source.shortcutGroups(TEST_DEVICE_ID)
+
+ assertThat(groups).hasSize(1)
+ }
+
+ @Test
+ fun shortcutGroups_wmReturnsEmptyList_returnsSingleGroup() =
+ testScope.runTest {
+ wmImeShortcutGroups = emptyList()
+
+ val groups = source.shortcutGroups(TEST_DEVICE_ID)
+
+ assertThat(groups).hasSize(1)
+ }
+
+ @Test
+ fun shortcutGroups_wmReturnsGroups_returnsWmGroupsPlusOne() =
+ testScope.runTest {
+ wmImeShortcutGroups =
+ listOf(
+ KeyboardShortcutGroup("wm ime group 1"),
+ KeyboardShortcutGroup("wm ime group 2"),
+ KeyboardShortcutGroup("wm ime group 3"),
+ )
+
+ val groups = source.shortcutGroups(TEST_DEVICE_ID)
+
+ assertThat(groups).hasSize(4)
+ }
+
+ companion object {
+ private const val TEST_DEVICE_ID = 1234
+ }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/data/source/TestShortcuts.kt b/packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/data/source/TestShortcuts.kt
index 765cd014864c..c9c39b3ebf66 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/data/source/TestShortcuts.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/data/source/TestShortcuts.kt
@@ -189,6 +189,15 @@ object TestShortcuts {
listOf(standardShortcutInfo1, standardShortcutInfo2, standardShortcutInfo3)
)
+ private val standardPackageName1 = "standard.app.group1"
+
+ private val standardAppGroup1 =
+ KeyboardShortcutGroup(
+ "Standard app group 1",
+ listOf(standardShortcutInfo1, standardShortcutInfo2, standardShortcutInfo3)
+ )
+ .apply { packageName = standardPackageName1 }
+
private val standardSubCategory1 =
ShortcutSubCategory(
standardGroup1.label!!.toString(),
@@ -220,7 +229,7 @@ object TestShortcuts {
val imeGroups = listOf(standardGroup1, standardGroup2, standardGroup3)
val imeCategory =
ShortcutCategory(
- type = ShortcutCategoryType.IME,
+ type = ShortcutCategoryType.InputMethodEditor,
subCategories =
listOf(
subCategoryForInputLanguageSwitchShortcuts,
@@ -230,17 +239,20 @@ object TestShortcuts {
)
)
+ val currentAppGroups = listOf(standardAppGroup1)
+ val currentAppPackageName = standardPackageName1
+
val systemGroups = listOf(standardGroup3, standardGroup2, standardGroup1)
val systemCategory =
ShortcutCategory(
- type = ShortcutCategoryType.SYSTEM,
+ type = ShortcutCategoryType.System,
subCategories = listOf(standardSubCategory3, standardSubCategory2, standardSubCategory1)
)
val multitaskingGroups = listOf(standardGroup2, standardGroup1)
val multitaskingCategory =
ShortcutCategory(
- type = ShortcutCategoryType.MULTI_TASKING,
+ type = ShortcutCategoryType.MultiTasking,
subCategories = listOf(standardSubCategory2, standardSubCategory1)
)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/domain/interactor/ShortcutHelperCategoriesInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/domain/interactor/ShortcutHelperCategoriesInteractorTest.kt
index a5f1f8c0896a..57c8b444b922 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/domain/interactor/ShortcutHelperCategoriesInteractorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/domain/interactor/ShortcutHelperCategoriesInteractorTest.kt
@@ -23,10 +23,12 @@ 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.shared.model.ShortcutCategory
-import com.android.systemui.keyboard.shortcut.shared.model.ShortcutCategoryType.IME
-import com.android.systemui.keyboard.shortcut.shared.model.ShortcutCategoryType.MULTI_TASKING
-import com.android.systemui.keyboard.shortcut.shared.model.ShortcutCategoryType.SYSTEM
+import com.android.systemui.keyboard.shortcut.shared.model.ShortcutCategoryType.InputMethodEditor
+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.shortcutHelperAppCategoriesShortcutsSource
import com.android.systemui.keyboard.shortcut.shortcutHelperCategoriesInteractor
+import com.android.systemui.keyboard.shortcut.shortcutHelperCurrentAppShortcutsSource
import com.android.systemui.keyboard.shortcut.shortcutHelperMultiTaskingShortcutsSource
import com.android.systemui.keyboard.shortcut.shortcutHelperSystemShortcutsSource
import com.android.systemui.keyboard.shortcut.shortcutHelperTestHelper
@@ -53,6 +55,8 @@ class ShortcutHelperCategoriesInteractorTest : SysuiTestCase() {
it.testDispatcher = UnconfinedTestDispatcher()
it.shortcutHelperSystemShortcutsSource = systemShortcutsSource
it.shortcutHelperMultiTaskingShortcutsSource = multitaskingShortcutsSource
+ it.shortcutHelperAppCategoriesShortcutsSource = FakeKeyboardShortcutGroupsSource()
+ it.shortcutHelperCurrentAppShortcutsSource = FakeKeyboardShortcutGroupsSource()
}
private val testScope = kosmos.testScope
@@ -114,7 +118,7 @@ class ShortcutHelperCategoriesInteractorTest : SysuiTestCase() {
TestShortcuts.systemCategory,
TestShortcuts.multitaskingCategory,
ShortcutCategory(
- type = IME,
+ type = InputMethodEditor,
subCategories =
TestShortcuts.imeSubCategoriesWithGroupedDuplicatedShortcutLabels
),
@@ -134,7 +138,7 @@ class ShortcutHelperCategoriesInteractorTest : SysuiTestCase() {
assertThat(categories)
.containsExactly(
ShortcutCategory(
- type = SYSTEM,
+ type = System,
subCategories =
TestShortcuts.subCategoriesWithGroupedDuplicatedShortcutLabels
),
@@ -157,7 +161,7 @@ class ShortcutHelperCategoriesInteractorTest : SysuiTestCase() {
.containsExactly(
TestShortcuts.systemCategory,
ShortcutCategory(
- type = MULTI_TASKING,
+ type = MultiTasking,
subCategories =
TestShortcuts.subCategoriesWithGroupedDuplicatedShortcutLabels
),
@@ -179,7 +183,7 @@ class ShortcutHelperCategoriesInteractorTest : SysuiTestCase() {
TestShortcuts.systemCategory,
TestShortcuts.multitaskingCategory,
ShortcutCategory(
- type = IME,
+ type = InputMethodEditor,
subCategories =
TestShortcuts.imeSubCategoriesWithUnsupportedModifiersRemoved
),
@@ -198,7 +202,7 @@ class ShortcutHelperCategoriesInteractorTest : SysuiTestCase() {
assertThat(categories)
.containsExactly(
ShortcutCategory(
- type = SYSTEM,
+ type = System,
subCategories = TestShortcuts.subCategoriesWithUnsupportedModifiersRemoved
),
TestShortcuts.multitaskingCategory,
@@ -219,7 +223,7 @@ class ShortcutHelperCategoriesInteractorTest : SysuiTestCase() {
.containsExactly(
TestShortcuts.systemCategory,
ShortcutCategory(
- type = MULTI_TASKING,
+ type = MultiTasking,
subCategories = TestShortcuts.subCategoriesWithUnsupportedModifiersRemoved
),
TestShortcuts.imeCategory,
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/ui/ShortcutHelperActivityStarterTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/ui/ShortcutHelperActivityStarterTest.kt
index 0757ea156bbf..f8e2f47f939a 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/ui/ShortcutHelperActivityStarterTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyboard/shortcut/ui/ShortcutHelperActivityStarterTest.kt
@@ -20,8 +20,15 @@ import android.content.Intent
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
+import com.android.systemui.keyboard.shortcut.data.source.FakeKeyboardShortcutGroupsSource
+import com.android.systemui.keyboard.shortcut.data.source.TestShortcuts
import com.android.systemui.keyboard.shortcut.fakeShortcutHelperStartActivity
import com.android.systemui.keyboard.shortcut.shortcutHelperActivityStarter
+import com.android.systemui.keyboard.shortcut.shortcutHelperAppCategoriesShortcutsSource
+import com.android.systemui.keyboard.shortcut.shortcutHelperCurrentAppShortcutsSource
+import com.android.systemui.keyboard.shortcut.shortcutHelperInputShortcutsSource
+import com.android.systemui.keyboard.shortcut.shortcutHelperMultiTaskingShortcutsSource
+import com.android.systemui.keyboard.shortcut.shortcutHelperSystemShortcutsSource
import com.android.systemui.keyboard.shortcut.shortcutHelperTestHelper
import com.android.systemui.keyboard.shortcut.ui.view.ShortcutHelperActivity
import com.android.systemui.kosmos.Kosmos
@@ -32,6 +39,7 @@ import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.UnconfinedTestDispatcher
import kotlinx.coroutines.test.runTest
+import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
@@ -40,10 +48,18 @@ import org.junit.runner.RunWith
@RunWith(AndroidJUnit4::class)
class ShortcutHelperActivityStarterTest : SysuiTestCase() {
+ private val fakeSystemSource = FakeKeyboardShortcutGroupsSource()
+ private val fakeMultiTaskingSource = FakeKeyboardShortcutGroupsSource()
+
private val kosmos =
Kosmos().also {
it.testCase = this
it.testDispatcher = UnconfinedTestDispatcher()
+ it.shortcutHelperSystemShortcutsSource = fakeSystemSource
+ it.shortcutHelperMultiTaskingShortcutsSource = fakeMultiTaskingSource
+ it.shortcutHelperAppCategoriesShortcutsSource = FakeKeyboardShortcutGroupsSource()
+ it.shortcutHelperInputShortcutsSource = FakeKeyboardShortcutGroupsSource()
+ it.shortcutHelperCurrentAppShortcutsSource = FakeKeyboardShortcutGroupsSource()
}
private val testScope = kosmos.testScope
@@ -51,6 +67,12 @@ class ShortcutHelperActivityStarterTest : SysuiTestCase() {
private val fakeStartActivity = kosmos.fakeShortcutHelperStartActivity
private val starter = kosmos.shortcutHelperActivityStarter
+ @Before
+ fun setUp() {
+ fakeSystemSource.setGroups(TestShortcuts.systemGroups)
+ fakeMultiTaskingSource.setGroups(TestShortcuts.multitaskingGroups)
+ }
+
@Test
fun start_doesNotStartByDefault() =
testScope.runTest {
@@ -70,13 +92,30 @@ class ShortcutHelperActivityStarterTest : SysuiTestCase() {
}
@Test
+ fun start_onToggle_noShortcuts_doesNotStartActivity() =
+ testScope.runTest {
+ fakeSystemSource.setGroups(emptyList())
+ fakeMultiTaskingSource.setGroups(emptyList())
+
+ starter.start()
+
+ testHelper.toggle(deviceId = 456)
+
+ assertThat(fakeStartActivity.startIntents).isEmpty()
+ }
+
+ @Test
fun start_onToggle_multipleTimesStartsActivityOnlyWhenNotStarted() =
testScope.runTest {
starter.start()
+ // Starts
testHelper.toggle(deviceId = 456)
+ // Stops
testHelper.toggle(deviceId = 456)
+ // Starts again
testHelper.toggle(deviceId = 456)
+ // Stops
testHelper.toggle(deviceId = 456)
verifyShortcutHelperActivityStarted(numTimes = 2)
@@ -93,6 +132,18 @@ class ShortcutHelperActivityStarterTest : SysuiTestCase() {
}
@Test
+ fun start_onRequestShowShortcuts_noShortcuts_doesNotStartActivity() =
+ testScope.runTest {
+ fakeSystemSource.setGroups(emptyList())
+ fakeMultiTaskingSource.setGroups(emptyList())
+ starter.start()
+
+ testHelper.showFromActivity()
+
+ assertThat(fakeStartActivity.startIntents).isEmpty()
+ }
+
+ @Test
fun start_onRequestShowShortcuts_multipleTimes_startsActivityOnlyOnce() =
testScope.runTest {
starter.start()
@@ -109,13 +160,21 @@ class ShortcutHelperActivityStarterTest : SysuiTestCase() {
testScope.runTest {
starter.start()
+ // No-op. Already hidden.
testHelper.hideFromActivity()
+ // No-op. Already hidden.
testHelper.hideForSystem()
+ // Show 1st time.
testHelper.toggle(deviceId = 987)
+ // No-op. Already shown.
testHelper.showFromActivity()
+ // Hidden.
testHelper.hideFromActivity()
+ // No-op. Already hidden.
testHelper.hideForSystem()
+ // Show 2nd time.
testHelper.toggle(deviceId = 456)
+ // No-op. Already shown.
testHelper.showFromActivity()
verifyShortcutHelperActivityStarted(numTimes = 2)
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 80d487cab50d..69fc463a576a 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
@@ -21,6 +21,14 @@ import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.coroutines.collectValues
+import com.android.systemui.keyboard.shortcut.data.source.FakeKeyboardShortcutGroupsSource
+import com.android.systemui.keyboard.shortcut.data.source.TestShortcuts
+import com.android.systemui.keyboard.shortcut.shared.model.ShortcutCategoryType.CurrentApp
+import com.android.systemui.keyboard.shortcut.shortcutHelperAppCategoriesShortcutsSource
+import com.android.systemui.keyboard.shortcut.shortcutHelperCurrentAppShortcutsSource
+import com.android.systemui.keyboard.shortcut.shortcutHelperInputShortcutsSource
+import com.android.systemui.keyboard.shortcut.shortcutHelperMultiTaskingShortcutsSource
+import com.android.systemui.keyboard.shortcut.shortcutHelperSystemShortcutsSource
import com.android.systemui.keyboard.shortcut.shortcutHelperTestHelper
import com.android.systemui.keyboard.shortcut.shortcutHelperViewModel
import com.android.systemui.keyboard.shortcut.ui.model.ShortcutsUiState
@@ -34,6 +42,7 @@ import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.UnconfinedTestDispatcher
import kotlinx.coroutines.test.runTest
+import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
@@ -42,10 +51,19 @@ import org.junit.runner.RunWith
@RunWith(AndroidJUnit4::class)
class ShortcutHelperViewModelTest : SysuiTestCase() {
+ private val fakeSystemSource = FakeKeyboardShortcutGroupsSource()
+ private val fakeMultiTaskingSource = FakeKeyboardShortcutGroupsSource()
+ private val fakeCurrentAppsSource = FakeKeyboardShortcutGroupsSource()
+
private val kosmos =
Kosmos().also {
it.testCase = this
it.testDispatcher = UnconfinedTestDispatcher()
+ it.shortcutHelperSystemShortcutsSource = fakeSystemSource
+ it.shortcutHelperMultiTaskingShortcutsSource = fakeMultiTaskingSource
+ it.shortcutHelperAppCategoriesShortcutsSource = FakeKeyboardShortcutGroupsSource()
+ it.shortcutHelperInputShortcutsSource = FakeKeyboardShortcutGroupsSource()
+ it.shortcutHelperCurrentAppShortcutsSource = fakeCurrentAppsSource
}
private val testScope = kosmos.testScope
@@ -53,6 +71,12 @@ class ShortcutHelperViewModelTest : SysuiTestCase() {
private val sysUiState = kosmos.sysUiState
private val viewModel = kosmos.shortcutHelperViewModel
+ @Before
+ fun setUp() {
+ fakeSystemSource.setGroups(TestShortcuts.systemGroups)
+ fakeMultiTaskingSource.setGroups(TestShortcuts.multitaskingGroups)
+ }
+
@Test
fun shouldShow_falseByDefault() =
testScope.runTest {
@@ -194,4 +218,17 @@ class ShortcutHelperViewModelTest : SysuiTestCase() {
assertThat(activeUiState.defaultSelectedCategory)
.isEqualTo(activeUiState.shortcutCategories.first().type)
}
+
+ @Test
+ fun shortcutsUiState_featureActive_emitsActiveWithCurrentAppsCategorySelectedWhenPresent() =
+ testScope.runTest {
+ fakeCurrentAppsSource.setGroups(TestShortcuts.currentAppGroups)
+ val uiState by collectLastValue(viewModel.shortcutsUiState)
+
+ testHelper.showFromActivity()
+
+ val activeUiState = uiState as ShortcutsUiState.Active
+ assertThat(activeUiState.defaultSelectedCategory)
+ .isEqualTo(CurrentApp(TestShortcuts.currentAppPackageName))
+ }
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java b/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java
index 03afcb77d88f..e68a4a57de75 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java
@@ -77,6 +77,7 @@ import androidx.test.filters.SmallTest;
import com.android.internal.foldables.FoldGracePeriodProvider;
import com.android.internal.logging.InstanceId;
import com.android.internal.logging.UiEventLogger;
+import com.android.internal.statusbar.IStatusBarService;
import com.android.internal.widget.LockPatternUtils;
import com.android.keyguard.KeyguardDisplayManager;
import com.android.keyguard.KeyguardSecurityView;
@@ -101,6 +102,7 @@ import com.android.systemui.keyguard.domain.interactor.KeyguardInteractor;
import com.android.systemui.kosmos.KosmosJavaAdapter;
import com.android.systemui.log.SessionTracker;
import com.android.systemui.navigationbar.NavigationModeController;
+import com.android.systemui.process.ProcessWrapper;
import com.android.systemui.scene.FakeWindowRootViewComponent;
import com.android.systemui.scene.ui.view.WindowRootView;
import com.android.systemui.settings.UserTracker;
@@ -188,6 +190,7 @@ public class KeyguardViewMediatorTest extends SysuiTestCase {
private @Mock ActivityTransitionAnimator mActivityTransitionAnimator;
private @Mock ScrimController mScrimController;
private @Mock IActivityTaskManager mActivityTaskManagerService;
+ private @Mock IStatusBarService mStatusBarService;
private @Mock SysuiColorExtractor mColorExtractor;
private @Mock AuthController mAuthController;
private @Mock ShadeExpansionStateManager mShadeExpansionStateManager;
@@ -211,6 +214,7 @@ public class KeyguardViewMediatorTest extends SysuiTestCase {
private @Mock SystemSettings mSystemSettings;
private @Mock SecureSettings mSecureSettings;
private @Mock AlarmManager mAlarmManager;
+ private @Mock ProcessWrapper mProcessWrapper;
private FakeSystemClock mSystemClock;
private final FakeWallpaperRepository mWallpaperRepository = new FakeWallpaperRepository();
@@ -247,6 +251,7 @@ public class KeyguardViewMediatorTest extends SysuiTestCase {
.thenReturn(mock(Flow.class));
when(mSelectedUserInteractor.getSelectedUserId()).thenReturn(mDefaultUserId);
when(mSelectedUserInteractor.getSelectedUserId(anyBoolean())).thenReturn(mDefaultUserId);
+ when(mProcessWrapper.isSystemUser()).thenReturn(true);
mNotificationShadeWindowController = new NotificationShadeWindowControllerImpl(
mContext,
new FakeWindowRootViewComponent.Factory(mock(WindowRootView.class)),
@@ -1225,10 +1230,12 @@ public class KeyguardViewMediatorTest extends SysuiTestCase {
() -> mActivityTransitionAnimator,
() -> mScrimController,
mActivityTaskManagerService,
+ mStatusBarService,
mFeatureFlags,
mSecureSettings,
mSystemSettings,
mSystemClock,
+ mProcessWrapper,
mDispatcher,
() -> mDreamViewModel,
() -> mCommunalTransitionViewModel,
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ResourceTrimmerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ResourceTrimmerTest.kt
index 144e634ae519..23fd997c02e1 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ResourceTrimmerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ResourceTrimmerTest.kt
@@ -18,7 +18,6 @@ import com.android.systemui.power.domain.interactor.PowerInteractor.Companion.se
import com.android.systemui.power.domain.interactor.powerInteractor
import com.android.systemui.scene.data.repository.Idle
import com.android.systemui.scene.data.repository.setSceneTransition
-import com.android.systemui.scene.domain.interactor.sceneInteractor
import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.testKosmos
import com.android.systemui.utils.GlobalWindowManager
@@ -64,7 +63,6 @@ class ResourceTrimmerTest : SysuiTestCase() {
globalWindowManager = globalWindowManager,
applicationScope = testScope.backgroundScope,
bgDispatcher = kosmos.testDispatcher,
- sceneInteractor = kosmos.sceneInteractor,
)
resourceTrimmer.start()
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/FromDreamingTransitionInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/FromDreamingTransitionInteractorTest.kt
index 42ab25fcd9bd..032794c43f08 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/FromDreamingTransitionInteractorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/FromDreamingTransitionInteractorTest.kt
@@ -56,6 +56,7 @@ import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.test.runCurrent
import kotlinx.coroutines.test.runTest
import org.junit.Before
+import org.junit.Ignore
import org.junit.runner.RunWith
import org.mockito.Mockito.reset
import org.mockito.Mockito.spy
@@ -97,6 +98,7 @@ class FromDreamingTransitionInteractorTest : SysuiTestCase() {
@Test
@EnableFlags(Flags.FLAG_KEYGUARD_WM_STATE_REFACTOR)
+ @Ignore("Until b/349837588 is fixed")
fun testTransitionToOccluded_ifDreamEnds_occludingActivityOnTop() =
testScope.runTest {
kosmos.fakeKeyguardRepository.setDreaming(true)
@@ -156,6 +158,7 @@ class FromDreamingTransitionInteractorTest : SysuiTestCase() {
reset(transitionRepository)
kosmos.keyguardOcclusionRepository.setShowWhenLockedActivityInfo(onTop = false)
+ kosmos.fakeKeyguardRepository.setDreaming(false)
runCurrent()
assertThat(transitionRepository)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/InWindowLauncherUnlockAnimationInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/InWindowLauncherUnlockAnimationInteractorTest.kt
index 459e41d7dbc0..ea5a41f6fd5c 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/InWindowLauncherUnlockAnimationInteractorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/InWindowLauncherUnlockAnimationInteractorTest.kt
@@ -18,25 +18,22 @@ package com.android.systemui.keyguard.domain.interactor
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
-import com.android.systemui.SysUITestModule
import com.android.systemui.SysuiTestCase
-import com.android.systemui.TestMocksModule
-import com.android.systemui.biometrics.domain.BiometricsDomainLayerModule
import com.android.systemui.coroutines.collectValues
-import com.android.systemui.dagger.SysUISingleton
-import com.android.systemui.keyguard.data.repository.FakeKeyguardSurfaceBehindRepository
import com.android.systemui.keyguard.data.repository.FakeKeyguardTransitionRepository
-import com.android.systemui.keyguard.data.repository.InWindowLauncherUnlockAnimationRepository
+import com.android.systemui.keyguard.data.repository.fakeKeyguardTransitionRepository
+import com.android.systemui.keyguard.data.repository.inWindowLauncherUnlockAnimationRepository
+import com.android.systemui.keyguard.data.repository.keyguardSurfaceBehindRepository
import com.android.systemui.keyguard.shared.model.KeyguardState
import com.android.systemui.keyguard.shared.model.TransitionState
import com.android.systemui.keyguard.shared.model.TransitionStep
import com.android.systemui.keyguard.util.mockTopActivityClassName
+import com.android.systemui.kosmos.applicationCoroutineScope
+import com.android.systemui.kosmos.testScope
import com.android.systemui.shared.system.ActivityManagerWrapper
-import com.android.systemui.user.domain.UserDomainLayerModule
-import dagger.BindsInstance
-import dagger.Component
+import com.android.systemui.shared.system.activityManagerWrapper
+import com.android.systemui.testKosmos
import junit.framework.Assert.assertEquals
-import kotlinx.coroutines.test.TestScope
import kotlinx.coroutines.test.runCurrent
import kotlinx.coroutines.test.runTest
import org.junit.Before
@@ -49,10 +46,16 @@ import org.mockito.MockitoAnnotations
@RunWith(AndroidJUnit4::class)
@kotlinx.coroutines.ExperimentalCoroutinesApi
class InWindowLauncherUnlockAnimationInteractorTest : SysuiTestCase() {
- private lateinit var underTest: InWindowLauncherUnlockAnimationInteractor
-
- private lateinit var testComponent: TestComponent
- private lateinit var testScope: TestScope
+ private val kosmos = testKosmos()
+ private val underTest =
+ InWindowLauncherUnlockAnimationInteractor(
+ kosmos.inWindowLauncherUnlockAnimationRepository,
+ kosmos.applicationCoroutineScope,
+ kosmos.keyguardTransitionInteractor,
+ { kosmos.keyguardSurfaceBehindRepository },
+ kosmos.activityManagerWrapper,
+ )
+ private val testScope = kosmos.testScope
private lateinit var transitionRepository: FakeKeyguardTransitionRepository
@Mock private lateinit var activityManagerWrapper: ActivityManagerWrapper
@@ -62,19 +65,9 @@ class InWindowLauncherUnlockAnimationInteractorTest : SysuiTestCase() {
fun setUp() {
MockitoAnnotations.initMocks(this)
- testComponent =
- DaggerInWindowLauncherUnlockAnimationInteractorTest_TestComponent.factory()
- .create(
- test = this,
- mocks =
- TestMocksModule(
- activityManagerWrapper = activityManagerWrapper,
- ),
- )
- underTest = testComponent.underTest
- testScope = testComponent.testScope
- transitionRepository = testComponent.transitionRepository
+ transitionRepository = kosmos.fakeKeyguardTransitionRepository
+ activityManagerWrapper = kosmos.activityManagerWrapper
activityManagerWrapper.mockTopActivityClassName(launcherClassName)
}
@@ -92,7 +85,7 @@ class InWindowLauncherUnlockAnimationInteractorTest : SysuiTestCase() {
)
// Put launcher on top
- testComponent.inWindowLauncherUnlockAnimationRepository.setLauncherActivityClass(
+ kosmos.inWindowLauncherUnlockAnimationRepository.setLauncherActivityClass(
launcherClassName
)
activityManagerWrapper.mockTopActivityClassName(launcherClassName)
@@ -175,7 +168,7 @@ class InWindowLauncherUnlockAnimationInteractorTest : SysuiTestCase() {
)
// Put not launcher on top
- testComponent.inWindowLauncherUnlockAnimationRepository.setLauncherActivityClass(
+ kosmos.inWindowLauncherUnlockAnimationRepository.setLauncherActivityClass(
launcherClassName
)
activityManagerWrapper.mockTopActivityClassName("not_launcher")
@@ -252,7 +245,7 @@ class InWindowLauncherUnlockAnimationInteractorTest : SysuiTestCase() {
)
// Put launcher on top
- testComponent.inWindowLauncherUnlockAnimationRepository.setLauncherActivityClass(
+ kosmos.inWindowLauncherUnlockAnimationRepository.setLauncherActivityClass(
launcherClassName
)
activityManagerWrapper.mockTopActivityClassName(launcherClassName)
@@ -296,7 +289,7 @@ class InWindowLauncherUnlockAnimationInteractorTest : SysuiTestCase() {
)
// Put Launcher on top and begin transitioning to GONE.
- testComponent.inWindowLauncherUnlockAnimationRepository.setLauncherActivityClass(
+ kosmos.inWindowLauncherUnlockAnimationRepository.setLauncherActivityClass(
launcherClassName
)
activityManagerWrapper.mockTopActivityClassName(launcherClassName)
@@ -316,7 +309,7 @@ class InWindowLauncherUnlockAnimationInteractorTest : SysuiTestCase() {
values
)
- testComponent.surfaceBehindRepository.setSurfaceRemoteAnimationTargetAvailable(true)
+ kosmos.keyguardSurfaceBehindRepository.setSurfaceRemoteAnimationTargetAvailable(true)
runCurrent()
assertEquals(
@@ -360,7 +353,7 @@ class InWindowLauncherUnlockAnimationInteractorTest : SysuiTestCase() {
)
// Put Launcher on top and begin transitioning to GONE.
- testComponent.inWindowLauncherUnlockAnimationRepository.setLauncherActivityClass(
+ kosmos.inWindowLauncherUnlockAnimationRepository.setLauncherActivityClass(
launcherClassName
)
activityManagerWrapper.mockTopActivityClassName(launcherClassName)
@@ -402,7 +395,7 @@ class InWindowLauncherUnlockAnimationInteractorTest : SysuiTestCase() {
)
// Put Launcher on top and begin transitioning to GONE.
- testComponent.inWindowLauncherUnlockAnimationRepository.setLauncherActivityClass(
+ kosmos.inWindowLauncherUnlockAnimationRepository.setLauncherActivityClass(
launcherClassName
)
activityManagerWrapper.mockTopActivityClassName(launcherClassName)
@@ -427,7 +420,7 @@ class InWindowLauncherUnlockAnimationInteractorTest : SysuiTestCase() {
to = KeyguardState.AOD,
)
)
- testComponent.surfaceBehindRepository.setSurfaceRemoteAnimationTargetAvailable(true)
+ kosmos.keyguardSurfaceBehindRepository.setSurfaceRemoteAnimationTargetAvailable(true)
runCurrent()
assertEquals(
@@ -437,29 +430,4 @@ class InWindowLauncherUnlockAnimationInteractorTest : SysuiTestCase() {
values
)
}
-
- @SysUISingleton
- @Component(
- modules =
- [
- SysUITestModule::class,
- BiometricsDomainLayerModule::class,
- UserDomainLayerModule::class,
- ]
- )
- interface TestComponent {
- val underTest: InWindowLauncherUnlockAnimationInteractor
- val testScope: TestScope
- val transitionRepository: FakeKeyguardTransitionRepository
- val surfaceBehindRepository: FakeKeyguardSurfaceBehindRepository
- val inWindowLauncherUnlockAnimationRepository: InWindowLauncherUnlockAnimationRepository
-
- @Component.Factory
- interface Factory {
- fun create(
- @BindsInstance test: SysuiTestCase,
- mocks: TestMocksModule,
- ): TestComponent
- }
- }
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardBlueprintInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardBlueprintInteractorTest.kt
index f0ad5103e9a6..59f16d70fab5 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardBlueprintInteractorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardBlueprintInteractorTest.kt
@@ -36,7 +36,6 @@ import com.android.systemui.kosmos.testScope
import com.android.systemui.plugins.clocks.ClockConfig
import com.android.systemui.plugins.clocks.ClockController
import com.android.systemui.shade.data.repository.shadeRepository
-import com.android.systemui.shade.shared.model.ShadeMode
import com.android.systemui.testKosmos
import com.android.systemui.util.mockito.any
import com.android.systemui.util.mockito.whenever
@@ -84,7 +83,7 @@ class KeyguardBlueprintInteractorTest : SysuiTestCase() {
fun testAppliesDefaultBlueprint() {
testScope.runTest {
val blueprintId by collectLastValue(underTest.blueprintId)
- kosmos.shadeRepository.setShadeMode(ShadeMode.Single)
+ kosmos.shadeRepository.setShadeLayoutWide(false)
configurationRepository.onConfigurationChange()
runCurrent()
@@ -98,7 +97,7 @@ class KeyguardBlueprintInteractorTest : SysuiTestCase() {
fun testAppliesSplitShadeBlueprint() {
testScope.runTest {
val blueprintId by collectLastValue(underTest.blueprintId)
- kosmos.shadeRepository.setShadeMode(ShadeMode.Split)
+ kosmos.shadeRepository.setShadeLayoutWide(true)
configurationRepository.onConfigurationChange()
runCurrent()
@@ -112,7 +111,7 @@ class KeyguardBlueprintInteractorTest : SysuiTestCase() {
fun testDoesNotApplySplitShadeBlueprint() {
testScope.runTest {
val blueprintId by collectLastValue(underTest.blueprintId)
- kosmos.shadeRepository.setShadeMode(ShadeMode.Split)
+ kosmos.shadeRepository.setShadeLayoutWide(true)
clockRepository.setCurrentClock(clockController)
configurationRepository.onConfigurationChange()
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissActionInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissActionInteractorTest.kt
index 974e3bb133d8..8bc0a6040e12 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissActionInteractorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissActionInteractorTest.kt
@@ -31,7 +31,6 @@ import com.android.systemui.keyguard.shared.model.KeyguardState
import com.android.systemui.kosmos.testScope
import com.android.systemui.scene.data.repository.Idle
import com.android.systemui.scene.data.repository.setSceneTransition
-import com.android.systemui.scene.domain.interactor.sceneInteractor
import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.testKosmos
import com.google.common.truth.Truth.assertThat
@@ -75,7 +74,6 @@ class KeyguardDismissActionInteractorTest : SysuiTestCase() {
transitionInteractor = kosmos.keyguardTransitionInteractor,
dismissInteractor = dismissInteractorWithDependencies.interactor,
applicationScope = testScope.backgroundScope,
- sceneInteractor = kosmos.sceneInteractor,
)
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardWakeDirectlyToGoneInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardWakeDirectlyToGoneInteractorTest.kt
new file mode 100644
index 000000000000..7e249e8c179d
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardWakeDirectlyToGoneInteractorTest.kt
@@ -0,0 +1,378 @@
+/*
+ * 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.keyguard.domain.interactor
+
+import android.app.AlarmManager
+import android.app.admin.alarmManager
+import android.app.admin.devicePolicyManager
+import android.content.BroadcastReceiver
+import android.content.Intent
+import android.content.mockedContext
+import android.os.PowerManager
+import android.os.UserHandle
+import android.platform.test.annotations.EnableFlags
+import android.provider.Settings
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.SmallTest
+import com.android.internal.widget.lockPatternUtils
+import com.android.systemui.Flags
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.coroutines.collectValues
+import com.android.systemui.keyguard.data.repository.fakeKeyguardRepository
+import com.android.systemui.keyguard.data.repository.fakeKeyguardTransitionRepository
+import com.android.systemui.keyguard.shared.model.BiometricUnlockMode
+import com.android.systemui.keyguard.shared.model.KeyguardState
+import com.android.systemui.kosmos.testScope
+import com.android.systemui.power.domain.interactor.PowerInteractor.Companion.setAsleepForTest
+import com.android.systemui.power.domain.interactor.PowerInteractor.Companion.setAwakeForTest
+import com.android.systemui.power.domain.interactor.powerInteractor
+import com.android.systemui.testKosmos
+import com.android.systemui.util.settings.fakeSettings
+import junit.framework.Assert.assertEquals
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.test.runCurrent
+import kotlinx.coroutines.test.runTest
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.ArgumentMatchers.anyInt
+import org.mockito.ArgumentMatchers.anyLong
+import org.mockito.kotlin.any
+import org.mockito.kotlin.doAnswer
+import org.mockito.kotlin.eq
+import org.mockito.kotlin.mock
+import org.mockito.kotlin.verify
+import org.mockito.kotlin.whenever
+
+@OptIn(ExperimentalCoroutinesApi::class)
+@SmallTest
+@RunWith(AndroidJUnit4::class)
+class KeyguardWakeDirectlyToGoneInteractorTest : SysuiTestCase() {
+
+ private var lastRegisteredBroadcastReceiver: BroadcastReceiver? = null
+ private val kosmos =
+ testKosmos().apply {
+ whenever(mockedContext.user).thenReturn(mock<UserHandle>())
+ doAnswer { invocation ->
+ lastRegisteredBroadcastReceiver = invocation.arguments[0] as BroadcastReceiver
+ }
+ .whenever(mockedContext)
+ .registerReceiver(any(), any(), any(), any(), any())
+ }
+
+ private val testScope = kosmos.testScope
+ private val underTest = kosmos.keyguardWakeDirectlyToGoneInteractor
+ private val lockPatternUtils = kosmos.lockPatternUtils
+ private val repository = kosmos.fakeKeyguardRepository
+ private val transitionRepository = kosmos.fakeKeyguardTransitionRepository
+
+ @Test
+ @EnableFlags(Flags.FLAG_KEYGUARD_WM_STATE_REFACTOR)
+ fun testCanWakeDirectlyToGone_keyguardServiceEnabledThenDisabled() =
+ testScope.runTest {
+ val canWake by collectValues(underTest.canWakeDirectlyToGone)
+
+ assertEquals(
+ listOf(
+ false, // Defaults to false.
+ ),
+ canWake
+ )
+
+ repository.setKeyguardEnabled(false)
+ runCurrent()
+
+ assertEquals(
+ listOf(
+ false, // Default to false.
+ true, // True now that keyguard service is disabled
+ ),
+ canWake
+ )
+
+ repository.setKeyguardEnabled(true)
+ runCurrent()
+
+ assertEquals(
+ listOf(
+ false,
+ true,
+ false,
+ ),
+ canWake
+ )
+ }
+
+ @Test
+ @EnableFlags(Flags.FLAG_KEYGUARD_WM_STATE_REFACTOR)
+ fun testCanWakeDirectlyToGone_lockscreenDisabledThenEnabled() =
+ testScope.runTest {
+ val canWake by collectValues(underTest.canWakeDirectlyToGone)
+
+ assertEquals(
+ listOf(
+ false, // Defaults to false.
+ ),
+ canWake
+ )
+
+ whenever(lockPatternUtils.isLockScreenDisabled(anyInt())).thenReturn(true)
+ runCurrent()
+
+ assertEquals(
+ listOf(
+ // Still false - isLockScreenDisabled only causes canWakeDirectlyToGone to
+ // update on the next wake/sleep event.
+ false,
+ ),
+ canWake
+ )
+
+ kosmos.powerInteractor.setAsleepForTest()
+ runCurrent()
+
+ assertEquals(
+ listOf(
+ false,
+ // True since we slept after setting isLockScreenDisabled=true
+ true,
+ ),
+ canWake
+ )
+
+ kosmos.powerInteractor.setAwakeForTest()
+ runCurrent()
+
+ kosmos.powerInteractor.setAsleepForTest()
+ runCurrent()
+
+ assertEquals(
+ listOf(
+ false,
+ true,
+ ),
+ canWake
+ )
+
+ whenever(lockPatternUtils.isLockScreenDisabled(anyInt())).thenReturn(false)
+ kosmos.powerInteractor.setAwakeForTest()
+ runCurrent()
+
+ assertEquals(
+ listOf(
+ false,
+ true,
+ false,
+ ),
+ canWake
+ )
+ }
+
+ @Test
+ @EnableFlags(Flags.FLAG_KEYGUARD_WM_STATE_REFACTOR)
+ fun testCanWakeDirectlyToGone_wakeAndUnlock() =
+ testScope.runTest {
+ val canWake by collectValues(underTest.canWakeDirectlyToGone)
+
+ assertEquals(
+ listOf(
+ false, // Defaults to false.
+ ),
+ canWake
+ )
+
+ repository.setBiometricUnlockState(BiometricUnlockMode.WAKE_AND_UNLOCK)
+ runCurrent()
+
+ assertEquals(listOf(false, true), canWake)
+
+ repository.setBiometricUnlockState(BiometricUnlockMode.NONE)
+ runCurrent()
+
+ assertEquals(listOf(false, true, false), canWake)
+ }
+
+ @Test
+ @EnableFlags(Flags.FLAG_KEYGUARD_WM_STATE_REFACTOR)
+ fun testCanWakeDirectlyToGone_andSetsAlarm_ifPowerButtonDoesNotLockImmediately() =
+ testScope.runTest {
+ val canWake by collectValues(underTest.canWakeDirectlyToGone)
+
+ assertEquals(
+ listOf(
+ false, // Defaults to false.
+ ),
+ canWake
+ )
+
+ repository.setCanIgnoreAuthAndReturnToGone(true)
+ runCurrent()
+
+ assertEquals(listOf(false, true), canWake)
+
+ repository.setCanIgnoreAuthAndReturnToGone(false)
+ runCurrent()
+
+ assertEquals(listOf(false, true, false), canWake)
+ }
+
+ @Test
+ @EnableFlags(Flags.FLAG_KEYGUARD_WM_STATE_REFACTOR)
+ fun testSetsCanIgnoreAuth_andSetsAlarm_whenTimingOut() =
+ testScope.runTest {
+ val canWake by collectValues(underTest.canWakeDirectlyToGone)
+
+ assertEquals(
+ listOf(
+ false, // Defaults to false.
+ ),
+ canWake
+ )
+
+ whenever(kosmos.devicePolicyManager.getMaximumTimeToLock(eq(null), anyInt()))
+ .thenReturn(-1)
+ kosmos.fakeSettings.putInt(Settings.Secure.LOCK_SCREEN_LOCK_AFTER_TIMEOUT, 500)
+
+ transitionRepository.sendTransitionSteps(
+ from = KeyguardState.LOCKSCREEN,
+ to = KeyguardState.GONE,
+ testScope,
+ )
+
+ kosmos.powerInteractor.setAsleepForTest(
+ sleepReason = PowerManager.GO_TO_SLEEP_REASON_TIMEOUT
+ )
+ runCurrent()
+
+ assertEquals(
+ listOf(
+ false,
+ true,
+ ),
+ canWake
+ )
+
+ verify(kosmos.alarmManager)
+ .setExactAndAllowWhileIdle(
+ eq(AlarmManager.ELAPSED_REALTIME_WAKEUP),
+ anyLong(),
+ any(),
+ )
+ }
+
+ @Test
+ @EnableFlags(Flags.FLAG_KEYGUARD_WM_STATE_REFACTOR)
+ fun testCancelsFirstAlarm_onWake_withSecondAlarmSet() =
+ testScope.runTest {
+ val canWake by collectValues(underTest.canWakeDirectlyToGone)
+
+ assertEquals(
+ listOf(
+ false, // Defaults to false.
+ ),
+ canWake
+ )
+
+ whenever(kosmos.devicePolicyManager.getMaximumTimeToLock(eq(null), anyInt()))
+ .thenReturn(-1)
+ kosmos.fakeSettings.putInt(Settings.Secure.LOCK_SCREEN_LOCK_AFTER_TIMEOUT, 500)
+
+ transitionRepository.sendTransitionSteps(
+ from = KeyguardState.LOCKSCREEN,
+ to = KeyguardState.GONE,
+ testScope,
+ )
+
+ kosmos.powerInteractor.setAsleepForTest(
+ sleepReason = PowerManager.GO_TO_SLEEP_REASON_TIMEOUT
+ )
+ transitionRepository.sendTransitionSteps(
+ from = KeyguardState.LOCKSCREEN,
+ to = KeyguardState.AOD,
+ testScope = testScope,
+ )
+ runCurrent()
+
+ assertEquals(
+ listOf(
+ false,
+ // Timed out, so we can ignore auth/return to GONE.
+ true,
+ ),
+ canWake
+ )
+
+ verify(kosmos.alarmManager)
+ .setExactAndAllowWhileIdle(
+ eq(AlarmManager.ELAPSED_REALTIME_WAKEUP),
+ anyLong(),
+ any(),
+ )
+
+ kosmos.powerInteractor.setAwakeForTest()
+ transitionRepository.sendTransitionSteps(
+ from = KeyguardState.AOD,
+ to = KeyguardState.GONE,
+ testScope = testScope,
+ )
+ runCurrent()
+
+ assertEquals(
+ listOf(
+ false,
+ true,
+ // Should be canceled by the wakeup, but there would still be an
+ // alarm in flight that should be canceled.
+ false,
+ ),
+ canWake
+ )
+
+ kosmos.powerInteractor.setAsleepForTest(
+ sleepReason = PowerManager.GO_TO_SLEEP_REASON_TIMEOUT
+ )
+ runCurrent()
+
+ assertEquals(
+ listOf(
+ false,
+ true,
+ false,
+ // Back to sleep.
+ true,
+ ),
+ canWake
+ )
+
+ // Simulate the first sleep's alarm coming in.
+ lastRegisteredBroadcastReceiver?.onReceive(
+ kosmos.mockedContext,
+ Intent("com.android.internal.policy.impl.PhoneWindowManager.DELAYED_KEYGUARD")
+ )
+ runCurrent()
+
+ // It should not have any effect.
+ assertEquals(
+ listOf(
+ false,
+ true,
+ false,
+ true,
+ ),
+ canWake
+ )
+ }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/binder/InWindowLauncherUnlockAnimationManagerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/binder/InWindowLauncherUnlockAnimationManagerTest.kt
index c7f44164e582..0cfc20d7bbd8 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/binder/InWindowLauncherUnlockAnimationManagerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/binder/InWindowLauncherUnlockAnimationManagerTest.kt
@@ -18,17 +18,15 @@ package com.android.systemui.keyguard.ui.binder
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
-import com.android.systemui.SysUITestModule
import com.android.systemui.SysuiTestCase
-import com.android.systemui.biometrics.domain.BiometricsDomainLayerModule
-import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.keyguard.domain.interactor.inWindowLauncherUnlockAnimationInteractor
import com.android.systemui.keyguard.ui.view.InWindowLauncherUnlockAnimationManager
+import com.android.systemui.keyguard.ui.viewmodel.InWindowLauncherAnimationViewModel
+import com.android.systemui.kosmos.applicationCoroutineScope
+import com.android.systemui.kosmos.testScope
import com.android.systemui.shared.system.smartspace.ILauncherUnlockAnimationController
-import com.android.systemui.user.domain.UserDomainLayerModule
+import com.android.systemui.testKosmos
import com.android.systemui.util.mockito.any
-import dagger.BindsInstance
-import dagger.Component
-import kotlinx.coroutines.test.TestScope
import kotlinx.coroutines.test.runTest
import org.junit.Before
import org.junit.Test
@@ -45,10 +43,9 @@ import org.mockito.MockitoAnnotations
@RunWith(AndroidJUnit4::class)
@kotlinx.coroutines.ExperimentalCoroutinesApi
class InWindowLauncherUnlockAnimationManagerTest : SysuiTestCase() {
+ private val kosmos = testKosmos()
private lateinit var underTest: InWindowLauncherUnlockAnimationManager
-
- private lateinit var testComponent: TestComponent
- private lateinit var testScope: TestScope
+ private val testScope = kosmos.testScope
@Mock private lateinit var launcherUnlockAnimationController: ILauncherUnlockAnimationController
@@ -56,14 +53,14 @@ class InWindowLauncherUnlockAnimationManagerTest : SysuiTestCase() {
fun setUp() {
MockitoAnnotations.initMocks(this)
- testComponent =
- DaggerInWindowLauncherUnlockAnimationManagerTest_TestComponent.factory()
- .create(
- test = this,
- )
- underTest = testComponent.underTest
- testScope = testComponent.testScope
-
+ underTest =
+ InWindowLauncherUnlockAnimationManager(
+ kosmos.inWindowLauncherUnlockAnimationInteractor,
+ InWindowLauncherAnimationViewModel(
+ kosmos.inWindowLauncherUnlockAnimationInteractor
+ ),
+ kosmos.applicationCoroutineScope
+ )
underTest.setLauncherUnlockController("launcherClass", launcherUnlockAnimationController)
}
@@ -114,25 +111,4 @@ class InWindowLauncherUnlockAnimationManagerTest : SysuiTestCase() {
verifyNoMoreInteractions(launcherUnlockAnimationController)
}
-
- @SysUISingleton
- @Component(
- modules =
- [
- SysUITestModule::class,
- BiometricsDomainLayerModule::class,
- UserDomainLayerModule::class,
- ]
- )
- interface TestComponent {
- val underTest: InWindowLauncherUnlockAnimationManager
- val testScope: TestScope
-
- @Component.Factory
- interface Factory {
- fun create(
- @BindsInstance test: SysuiTestCase,
- ): TestComponent
- }
- }
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/view/layout/sections/ClockSectionTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/view/layout/sections/ClockSectionTest.kt
index 4a39a9b2e801..6e381caf5124 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/view/layout/sections/ClockSectionTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/view/layout/sections/ClockSectionTest.kt
@@ -39,7 +39,6 @@ import com.android.systemui.kosmos.Kosmos
import com.android.systemui.kosmos.testScope
import com.android.systemui.res.R
import com.android.systemui.shade.data.repository.shadeRepository
-import com.android.systemui.shade.shared.model.ShadeMode
import com.android.systemui.statusbar.notification.stack.domain.interactor.notificationsKeyguardInteractor
import com.android.systemui.statusbar.policy.fakeConfigurationController
import com.android.systemui.statusbar.ui.fakeSystemBarUtilsProxy
@@ -48,6 +47,7 @@ import com.android.systemui.util.mockito.eq
import com.android.systemui.util.mockito.mock
import com.android.systemui.util.mockito.whenever
import com.google.common.truth.Truth.assertThat
+import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.advanceUntilIdle
import kotlinx.coroutines.test.runTest
import org.junit.Before
@@ -57,6 +57,7 @@ import org.mockito.ArgumentMatchers.anyInt
import org.mockito.ArgumentMatchers.anyString
import org.mockito.MockitoAnnotations
+@OptIn(ExperimentalCoroutinesApi::class)
@RunWith(AndroidJUnit4::class)
@SmallTest
class ClockSectionTest : SysuiTestCase() {
@@ -127,7 +128,7 @@ class ClockSectionTest : SysuiTestCase() {
fun testApplyDefaultConstraints_LargeClock_SplitShade() =
kosmos.testScope.runTest {
with(kosmos) {
- shadeRepository.setShadeMode(ShadeMode.Split)
+ shadeRepository.setShadeLayoutWide(true)
keyguardClockInteractor.setClockSize(ClockSize.LARGE)
advanceUntilIdle()
}
@@ -143,11 +144,11 @@ class ClockSectionTest : SysuiTestCase() {
fun testApplyDefaultConstraints_LargeClock_NonSplitShade() =
kosmos.testScope.runTest {
with(kosmos) {
- val collectedShadeMode by collectLastValue(shadeRepository.shadeMode)
+ val isShadeLayoutWide by collectLastValue(shadeRepository.isShadeLayoutWide)
val isLargeClockVisible by
collectLastValue(keyguardClockViewModel.isLargeClockVisible)
- shadeRepository.setShadeMode(ShadeMode.Single)
+ shadeRepository.setShadeLayoutWide(false)
keyguardClockInteractor.setClockSize(ClockSize.LARGE)
fakeKeyguardRepository.setClockShouldBeCentered(true)
notificationsKeyguardInteractor.setNotificationsFullyHidden(true)
@@ -168,11 +169,11 @@ class ClockSectionTest : SysuiTestCase() {
kosmos.testScope.runTest {
with(kosmos) {
DIMENSION_BY_IDENTIFIER = listOf() // Remove Smartspace from mock
- val collectedShadeMode by collectLastValue(shadeRepository.shadeMode)
+ val isShadeLayoutWide by collectLastValue(shadeRepository.isShadeLayoutWide)
val isLargeClockVisible by
collectLastValue(keyguardClockViewModel.isLargeClockVisible)
- shadeRepository.setShadeMode(ShadeMode.Split)
+ shadeRepository.setShadeLayoutWide(true)
keyguardClockInteractor.setClockSize(ClockSize.LARGE)
fakeKeyguardRepository.setClockShouldBeCentered(true)
notificationsKeyguardInteractor.setNotificationsFullyHidden(true)
@@ -193,11 +194,11 @@ class ClockSectionTest : SysuiTestCase() {
kosmos.testScope.runTest {
with(kosmos) {
DIMENSION_BY_IDENTIFIER = listOf() // Remove Smartspace from mock
- val collectedShadeMode by collectLastValue(shadeRepository.shadeMode)
+ val isShadeLayoutWide by collectLastValue(shadeRepository.isShadeLayoutWide)
val isLargeClockVisible by
collectLastValue(keyguardClockViewModel.isLargeClockVisible)
- shadeRepository.setShadeMode(ShadeMode.Single)
+ shadeRepository.setShadeLayoutWide(false)
keyguardClockInteractor.setClockSize(ClockSize.LARGE)
fakeKeyguardRepository.setClockShouldBeCentered(true)
notificationsKeyguardInteractor.setNotificationsFullyHidden(true)
@@ -217,11 +218,11 @@ class ClockSectionTest : SysuiTestCase() {
fun testApplyDefaultConstraints_SmallClock_SplitShade() =
kosmos.testScope.runTest {
with(kosmos) {
- val collectedShadeMode by collectLastValue(shadeRepository.shadeMode)
+ val isShadeLayoutWide by collectLastValue(shadeRepository.isShadeLayoutWide)
val isLargeClockVisible by
collectLastValue(keyguardClockViewModel.isLargeClockVisible)
- shadeRepository.setShadeMode(ShadeMode.Split)
+ shadeRepository.setShadeLayoutWide(true)
keyguardClockInteractor.setClockSize(ClockSize.SMALL)
fakeKeyguardRepository.setClockShouldBeCentered(true)
notificationsKeyguardInteractor.setNotificationsFullyHidden(true)
@@ -241,11 +242,11 @@ class ClockSectionTest : SysuiTestCase() {
fun testApplyDefaultConstraints_SmallClock_NonSplitShade() =
kosmos.testScope.runTest {
with(kosmos) {
- val collectedShadeMode by collectLastValue(shadeRepository.shadeMode)
+ val isShadeLayoutWide by collectLastValue(shadeRepository.isShadeLayoutWide)
val isLargeClockVisible by
collectLastValue(keyguardClockViewModel.isLargeClockVisible)
- shadeRepository.setShadeMode(ShadeMode.Single)
+ shadeRepository.setShadeLayoutWide(false)
keyguardClockInteractor.setClockSize(ClockSize.SMALL)
fakeKeyguardRepository.setClockShouldBeCentered(true)
notificationsKeyguardInteractor.setNotificationsFullyHidden(true)
@@ -334,7 +335,7 @@ class ClockSectionTest : SysuiTestCase() {
}
companion object {
- private val SMART_SPACE_DATE_WEATHER_HEIGHT = 10
- private val ENHANCED_SMART_SPACE_HEIGHT = 11
+ private const val SMART_SPACE_DATE_WEATHER_HEIGHT = 10
+ private const val ENHANCED_SMART_SPACE_HEIGHT = 11
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultDeviceEntrySectionTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultDeviceEntrySectionTest.kt
index 693a87761b27..7cc91853a749 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultDeviceEntrySectionTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultDeviceEntrySectionTest.kt
@@ -18,6 +18,7 @@
package com.android.systemui.keyguard.ui.view.layout.sections
import android.graphics.Point
+import android.platform.test.annotations.DisableFlags
import android.view.WindowManager
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.constraintlayout.widget.ConstraintSet
@@ -106,8 +107,8 @@ class DefaultDeviceEntrySectionTest : SysuiTestCase() {
}
@Test
+ @DisableFlags(AConfigFlags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
fun addViewsConditionally_migrateFlagOff() {
- mSetFlagsRule.disableFlags(AConfigFlags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
mSetFlagsRule.disableFlags(AConfigFlags.FLAG_KEYGUARD_BOTTOM_AREA_REFACTOR)
mSetFlagsRule.disableFlags(AConfigFlags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR)
val constraintLayout = ConstraintLayout(context, null)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/view/layout/sections/SmartspaceSectionTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/view/layout/sections/SmartspaceSectionTest.kt
index 201ee88cdd80..1c99eff0d328 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/view/layout/sections/SmartspaceSectionTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/view/layout/sections/SmartspaceSectionTest.kt
@@ -17,6 +17,7 @@
package com.android.systemui.keyguard.ui.view.layout.sections
+import android.platform.test.annotations.EnableFlags
import android.view.View
import android.widget.LinearLayout
import androidx.constraintlayout.widget.ConstraintLayout
@@ -48,6 +49,7 @@ import org.mockito.MockitoAnnotations
@RunWith(AndroidJUnit4::class)
@SmallTest
+@EnableFlags(Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
class SmartspaceSectionTest : SysuiTestCase() {
private lateinit var underTest: SmartspaceSection
@Mock private lateinit var keyguardClockViewModel: KeyguardClockViewModel
@@ -70,7 +72,6 @@ class SmartspaceSectionTest : SysuiTestCase() {
@Before
fun setup() {
MockitoAnnotations.initMocks(this)
- mSetFlagsRule.enableFlags(Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
underTest =
SmartspaceSection(
mContext,
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardBottomAreaViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardBottomAreaViewModelTest.kt
index 4f4aac454912..3b96be48b2cc 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardBottomAreaViewModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardBottomAreaViewModelTest.kt
@@ -152,7 +152,6 @@ class KeyguardBottomAreaViewModelTest(flags: FlagsParameterization) : SysuiTestC
val featureFlags =
FakeFeatureFlags().apply {
set(Flags.LOCK_SCREEN_LONG_PRESS_ENABLED, false)
- set(Flags.LOCK_SCREEN_LONG_PRESS_DIRECT_TO_WPP, false)
}
val withDeps = KeyguardInteractorFactory.create(featureFlags = featureFlags)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardClockViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardClockViewModelTest.kt
index 40663ceb2ad2..17e1b53a3ba9 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardClockViewModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardClockViewModelTest.kt
@@ -38,7 +38,6 @@ import com.android.systemui.plugins.clocks.ClockFaceConfig
import com.android.systemui.plugins.clocks.ClockFaceController
import com.android.systemui.res.R
import com.android.systemui.shade.data.repository.shadeRepository
-import com.android.systemui.shade.shared.model.ShadeMode
import com.android.systemui.statusbar.ui.fakeSystemBarUtilsProxy
import com.android.systemui.testKosmos
import com.android.systemui.util.mockito.whenever
@@ -88,7 +87,7 @@ class KeyguardClockViewModelTest(flags: FlagsParameterization) : SysuiTestCase()
val currentClockLayout by collectLastValue(underTest.currentClockLayout)
with(kosmos) {
- shadeRepository.setShadeMode(ShadeMode.Split)
+ shadeRepository.setShadeLayoutWide(true)
keyguardRepository.setClockShouldBeCentered(true)
keyguardClockRepository.setClockSize(ClockSize.LARGE)
}
@@ -103,7 +102,7 @@ class KeyguardClockViewModelTest(flags: FlagsParameterization) : SysuiTestCase()
val currentClockLayout by collectLastValue(underTest.currentClockLayout)
with(kosmos) {
- shadeRepository.setShadeMode(ShadeMode.Split)
+ shadeRepository.setShadeLayoutWide(true)
keyguardRepository.setClockShouldBeCentered(false)
keyguardClockRepository.setClockSize(ClockSize.LARGE)
}
@@ -118,7 +117,7 @@ class KeyguardClockViewModelTest(flags: FlagsParameterization) : SysuiTestCase()
val currentClockLayout by collectLastValue(underTest.currentClockLayout)
with(kosmos) {
- shadeRepository.setShadeMode(ShadeMode.Split)
+ shadeRepository.setShadeLayoutWide(true)
keyguardRepository.setClockShouldBeCentered(false)
keyguardClockRepository.setClockSize(ClockSize.SMALL)
}
@@ -133,7 +132,7 @@ class KeyguardClockViewModelTest(flags: FlagsParameterization) : SysuiTestCase()
val currentClockLayout by collectLastValue(underTest.currentClockLayout)
with(kosmos) {
- shadeRepository.setShadeMode(ShadeMode.Single)
+ shadeRepository.setShadeLayoutWide(false)
keyguardClockRepository.setClockSize(ClockSize.SMALL)
}
@@ -146,7 +145,7 @@ class KeyguardClockViewModelTest(flags: FlagsParameterization) : SysuiTestCase()
val currentClockLayout by collectLastValue(underTest.currentClockLayout)
with(kosmos) {
- shadeRepository.setShadeMode(ShadeMode.Single)
+ shadeRepository.setShadeLayoutWide(false)
keyguardClockRepository.setClockSize(ClockSize.LARGE)
}
@@ -234,7 +233,7 @@ class KeyguardClockViewModelTest(flags: FlagsParameterization) : SysuiTestCase()
fun testSmallClockTop_splitShade_composeLockscreenOn() =
testScope.runTest {
with(kosmos) {
- shadeRepository.setShadeMode(ShadeMode.Split)
+ shadeRepository.setShadeLayoutWide(true)
fakeSystemBarUtilsProxy.fakeKeyguardStatusBarHeight = KEYGUARD_STATUS_BAR_HEIGHT
}
@@ -249,7 +248,7 @@ class KeyguardClockViewModelTest(flags: FlagsParameterization) : SysuiTestCase()
fun testSmallClockTop_splitShade_composeLockscreenOff() =
testScope.runTest {
with(kosmos) {
- shadeRepository.setShadeMode(ShadeMode.Split)
+ shadeRepository.setShadeLayoutWide(true)
fakeSystemBarUtilsProxy.fakeKeyguardStatusBarHeight = KEYGUARD_STATUS_BAR_HEIGHT
}
@@ -262,7 +261,7 @@ class KeyguardClockViewModelTest(flags: FlagsParameterization) : SysuiTestCase()
fun testSmallClockTop_nonSplitShade_composeLockscreenOn() =
testScope.runTest {
with(kosmos) {
- shadeRepository.setShadeMode(ShadeMode.Single)
+ shadeRepository.setShadeLayoutWide(false)
fakeSystemBarUtilsProxy.fakeKeyguardStatusBarHeight = KEYGUARD_STATUS_BAR_HEIGHT
}
@@ -275,7 +274,7 @@ class KeyguardClockViewModelTest(flags: FlagsParameterization) : SysuiTestCase()
fun testSmallClockTop_nonSplitShade_composeLockscreenOff() =
testScope.runTest {
with(kosmos) {
- shadeRepository.setShadeMode(ShadeMode.Single)
+ shadeRepository.setShadeLayoutWide(false)
fakeSystemBarUtilsProxy.fakeKeyguardStatusBarHeight = KEYGUARD_STATUS_BAR_HEIGHT
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardQuickAffordancesCombinedViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardQuickAffordancesCombinedViewModelTest.kt
index 9fb1aa795c3c..e89abf6fc5a1 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardQuickAffordancesCombinedViewModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardQuickAffordancesCombinedViewModelTest.kt
@@ -195,7 +195,6 @@ class KeyguardQuickAffordancesCombinedViewModelTest : SysuiTestCase() {
val featureFlags =
FakeFeatureFlags().apply {
set(Flags.LOCK_SCREEN_LONG_PRESS_ENABLED, false)
- set(Flags.LOCK_SCREEN_LONG_PRESS_DIRECT_TO_WPP, false)
}
val withDeps = KeyguardInteractorFactory.create(featureFlags = featureFlags)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/log/SessionTrackerTest.java b/packages/SystemUI/tests/src/com/android/systemui/log/SessionTrackerTest.java
index fbeb6d8d0a6f..732bef1f9803 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/log/SessionTrackerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/log/SessionTrackerTest.java
@@ -44,6 +44,7 @@ import com.android.keyguard.KeyguardUpdateMonitor;
import com.android.keyguard.KeyguardUpdateMonitorCallback;
import com.android.systemui.SysuiTestCase;
import com.android.systemui.biometrics.AuthController;
+import com.android.systemui.process.ProcessWrapper;
import com.android.systemui.statusbar.policy.KeyguardStateController;
import org.junit.Before;
@@ -68,6 +69,8 @@ public class SessionTrackerTest extends SysuiTestCase {
private KeyguardStateController mKeyguardStateController;
@Mock
private UiEventLogger mUiEventLogger;
+ @Mock
+ private ProcessWrapper mProcessWrapper;
@Captor
ArgumentCaptor<KeyguardUpdateMonitorCallback> mKeyguardUpdateMonitorCallbackCaptor;
@@ -86,13 +89,15 @@ public class SessionTrackerTest extends SysuiTestCase {
@Before
public void setup() throws RemoteException {
MockitoAnnotations.initMocks(this);
+ when(mProcessWrapper.isSystemUser()).thenReturn(true);
mSessionTracker = new SessionTracker(
mStatusBarService,
mAuthController,
mKeyguardUpdateMonitor,
mKeyguardStateController,
- mUiEventLogger
+ mUiEventLogger,
+ mProcessWrapper
);
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/media/controls/domain/pipeline/MediaDataFilterImplTest.kt b/packages/SystemUI/tests/src/com/android/systemui/media/controls/domain/pipeline/MediaDataFilterImplTest.kt
index 850e2e014c57..3705909cbc2b 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/media/controls/domain/pipeline/MediaDataFilterImplTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/media/controls/domain/pipeline/MediaDataFilterImplTest.kt
@@ -31,6 +31,7 @@ import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.media.controls.MediaTestUtils
import com.android.systemui.media.controls.data.repository.MediaFilterRepository
import com.android.systemui.media.controls.data.repository.mediaFilterRepository
+import com.android.systemui.media.controls.shared.mockMediaLogger
import com.android.systemui.media.controls.shared.model.EXTRA_KEY_TRIGGER_RESUME
import com.android.systemui.media.controls.shared.model.MediaCommonModel
import com.android.systemui.media.controls.shared.model.MediaData
@@ -114,7 +115,7 @@ class MediaDataFilterImplTest : SysuiTestCase() {
mediaSmartspaceLogger = mockMediaSmartspaceLogger
mediaFilterRepository
}
- private val mediaLoadingLogger = kosmos.mockMediaLoadingLogger
+ private val mediaLogger = kosmos.mockMediaLogger
@Before
fun setup() {
@@ -133,7 +134,7 @@ class MediaDataFilterImplTest : SysuiTestCase() {
logger,
mediaFlags,
repository,
- mediaLoadingLogger,
+ mediaLogger,
)
mediaDataFilter.mediaDataProcessor = mediaDataProcessor
mediaDataFilter.addListener(listener)
@@ -194,7 +195,7 @@ class MediaDataFilterImplTest : SysuiTestCase() {
verify(listener)
.onMediaDataLoaded(eq(KEY), eq(null), eq(dataMain), eq(true), eq(0), eq(false))
- verify(mediaLoadingLogger)
+ verify(mediaLogger)
.logMediaLoaded(eq(dataMain.instanceId), eq(dataMain.active), anyString())
assertThat(currentMedia).containsExactly(mediaCommonModel)
}
@@ -210,7 +211,7 @@ class MediaDataFilterImplTest : SysuiTestCase() {
verify(listener, never())
.onMediaDataLoaded(any(), any(), any(), anyBoolean(), anyInt(), anyBoolean())
- verify(mediaLoadingLogger, never()).logMediaLoaded(any(), anyBoolean(), anyString())
+ verify(mediaLogger, never()).logMediaLoaded(any(), anyBoolean(), anyString())
assertThat(currentMedia).doesNotContain(mediaCommonModel)
}
@@ -224,14 +225,14 @@ class MediaDataFilterImplTest : SysuiTestCase() {
// GIVEN a media was removed for main user
mediaDataFilter.onMediaDataLoaded(KEY, null, dataMain)
- verify(mediaLoadingLogger)
+ verify(mediaLogger)
.logMediaLoaded(eq(dataMain.instanceId), eq(dataMain.active), anyString())
assertThat(currentMedia).containsExactly(mediaCommonModel)
mediaDataFilter.onMediaDataRemoved(KEY, false)
verify(listener).onMediaDataRemoved(eq(KEY), eq(false))
- verify(mediaLoadingLogger).logMediaRemoved(eq(dataMain.instanceId), anyString())
+ verify(mediaLogger).logMediaRemoved(eq(dataMain.instanceId), anyString())
assertThat(currentMedia).doesNotContain(mediaCommonModel)
}
@@ -245,8 +246,7 @@ class MediaDataFilterImplTest : SysuiTestCase() {
mediaDataFilter.onMediaDataRemoved(KEY, false)
verify(listener, never()).onMediaDataRemoved(eq(KEY), eq(false))
- verify(mediaLoadingLogger, never())
- .logMediaRemoved(eq(dataGuest.instanceId), anyString())
+ verify(mediaLogger, never()).logMediaRemoved(eq(dataGuest.instanceId), anyString())
assertThat(currentMedia).isEmpty()
}
@@ -259,7 +259,7 @@ class MediaDataFilterImplTest : SysuiTestCase() {
// GIVEN that we have a media loaded for main user
mediaDataFilter.onMediaDataLoaded(KEY, null, dataMain)
- verify(mediaLoadingLogger)
+ verify(mediaLogger)
.logMediaLoaded(eq(dataMain.instanceId), eq(dataMain.active), anyString())
assertThat(currentMedia).containsExactly(MediaCommonModel.MediaControl(mediaLoaded))
@@ -268,7 +268,7 @@ class MediaDataFilterImplTest : SysuiTestCase() {
// THEN we should remove the main user's media
verify(listener).onMediaDataRemoved(eq(KEY), eq(false))
- verify(mediaLoadingLogger).logMediaRemoved(eq(dataMain.instanceId), anyString())
+ verify(mediaLogger).logMediaRemoved(eq(dataMain.instanceId), anyString())
assertThat(currentMedia).isEmpty()
}
@@ -289,10 +289,10 @@ class MediaDataFilterImplTest : SysuiTestCase() {
// THEN we should add back the guest user media
verify(listener)
.onMediaDataLoaded(eq(KEY_ALT), eq(null), eq(dataGuest), eq(true), eq(0), eq(false))
- verify(mediaLoadingLogger)
+ verify(mediaLogger)
.logMediaLoaded(eq(dataGuest.instanceId), eq(dataGuest.active), anyString())
- reset(mediaLoadingLogger)
+ reset(mediaLogger)
// but not the main user's
verify(listener, never())
@@ -304,7 +304,7 @@ class MediaDataFilterImplTest : SysuiTestCase() {
anyInt(),
anyBoolean()
)
- verify(mediaLoadingLogger, never())
+ verify(mediaLogger, never())
.logMediaLoaded(eq(dataMain.instanceId), anyBoolean(), anyString())
assertThat(currentMedia)
.containsExactly(MediaCommonModel.MediaControl(guestLoadedStatesModel))
@@ -327,7 +327,7 @@ class MediaDataFilterImplTest : SysuiTestCase() {
val mediaLoadedStatesModel = MediaDataLoadingModel.Loaded(dataMain.instanceId)
// THEN we should remove the private profile media
verify(listener).onMediaDataRemoved(eq(KEY_ALT), eq(false))
- verify(mediaLoadingLogger).logMediaRemoved(eq(dataGuest.instanceId), anyString())
+ verify(mediaLogger).logMediaRemoved(eq(dataGuest.instanceId), anyString())
assertThat(currentMedia)
.containsExactly(MediaCommonModel.MediaControl(mediaLoadedStatesModel))
}
@@ -591,8 +591,7 @@ class MediaDataFilterImplTest : SysuiTestCase() {
assertThat(hasActiveMedia(selectedUserEntries)).isFalse()
verify(listener)
.onSmartspaceMediaDataLoaded(eq(SMARTSPACE_KEY), eq(smartspaceData), eq(true))
- verify(mediaLoadingLogger)
- .logRecommendationLoaded(eq(SMARTSPACE_KEY), eq(true), anyString())
+ verify(mediaLogger).logRecommendationLoaded(eq(SMARTSPACE_KEY), eq(true), anyString())
verify(logger).logRecommendationAdded(SMARTSPACE_PACKAGE, SMARTSPACE_INSTANCE_ID)
verify(logger, never()).logRecommendationActivated(any(), any(), any())
}
@@ -622,9 +621,8 @@ class MediaDataFilterImplTest : SysuiTestCase() {
verify(listener, never())
.onMediaDataLoaded(any(), any(), any(), anyBoolean(), anyInt(), anyBoolean())
verify(listener, never()).onSmartspaceMediaDataLoaded(any(), any(), anyBoolean())
- verify(mediaLoadingLogger, never()).logMediaLoaded(any(), anyBoolean(), anyString())
- verify(mediaLoadingLogger, never())
- .logRecommendationLoaded(any(), anyBoolean(), anyString())
+ verify(mediaLogger, never()).logMediaLoaded(any(), anyBoolean(), anyString())
+ verify(mediaLogger, never()).logRecommendationLoaded(any(), anyBoolean(), anyString())
verify(logger, never()).logRecommendationAdded(any(), any())
verify(logger, never()).logRecommendationActivated(any(), any(), any())
}
@@ -662,8 +660,7 @@ class MediaDataFilterImplTest : SysuiTestCase() {
assertThat(hasActiveMedia(selectedUserEntries)).isFalse()
verify(listener)
.onSmartspaceMediaDataLoaded(eq(SMARTSPACE_KEY), eq(smartspaceData), eq(true))
- verify(mediaLoadingLogger)
- .logRecommendationLoaded(eq(SMARTSPACE_KEY), eq(true), anyString())
+ verify(mediaLogger).logRecommendationLoaded(eq(SMARTSPACE_KEY), eq(true), anyString())
verify(logger).logRecommendationAdded(SMARTSPACE_PACKAGE, SMARTSPACE_INSTANCE_ID)
verify(logger, never()).logRecommendationActivated(any(), any(), any())
}
@@ -698,8 +695,7 @@ class MediaDataFilterImplTest : SysuiTestCase() {
.isFalse()
assertThat(hasActiveMedia(selectedUserEntries)).isFalse()
verify(listener, never()).onSmartspaceMediaDataLoaded(any(), any(), anyBoolean())
- verify(mediaLoadingLogger, never())
- .logRecommendationLoaded(any(), anyBoolean(), anyString())
+ verify(mediaLogger, never()).logRecommendationLoaded(any(), anyBoolean(), anyString())
verify(logger, never()).logRecommendationAdded(any(), any())
verify(logger, never()).logRecommendationActivated(any(), any(), any())
}
@@ -727,10 +723,10 @@ class MediaDataFilterImplTest : SysuiTestCase() {
assertThat(currentMedia).containsExactly(controlCommonModel)
verify(listener)
.onMediaDataLoaded(eq(KEY), eq(null), eq(dataCurrent), eq(true), eq(0), eq(false))
- verify(mediaLoadingLogger)
+ verify(mediaLogger)
.logMediaLoaded(eq(dataCurrent.instanceId), eq(dataCurrent.active), anyString())
- reset(mediaLoadingLogger)
+ reset(mediaLogger)
// AND we get a smartspace signal
mediaDataFilter.onSmartspaceMediaDataLoaded(SMARTSPACE_KEY, smartspaceData)
@@ -749,10 +745,9 @@ class MediaDataFilterImplTest : SysuiTestCase() {
verify(listener, never())
.onMediaDataLoaded(eq(KEY), eq(KEY), any(), anyBoolean(), anyInt(), anyBoolean())
verify(listener, never()).onSmartspaceMediaDataLoaded(any(), any(), anyBoolean())
- verify(mediaLoadingLogger, never())
+ verify(mediaLogger, never())
.logMediaLoaded(eq(dataCurrent.instanceId), anyBoolean(), anyString())
- verify(mediaLoadingLogger, never())
- .logRecommendationLoaded(any(), anyBoolean(), anyString())
+ verify(mediaLogger, never()).logRecommendationLoaded(any(), anyBoolean(), anyString())
verify(logger, never()).logRecommendationAdded(any(), any())
verify(logger, never()).logRecommendationActivated(any(), any(), any())
}
@@ -775,7 +770,7 @@ class MediaDataFilterImplTest : SysuiTestCase() {
assertThat(currentMedia).containsExactly(controlCommonModel)
verify(listener)
.onMediaDataLoaded(eq(KEY), eq(null), eq(dataCurrent), eq(true), eq(0), eq(false))
- verify(mediaLoadingLogger)
+ verify(mediaLogger)
.logMediaLoaded(eq(dataCurrent.instanceId), eq(dataCurrent.active), anyString())
// AND we get a smartspace signal
@@ -810,7 +805,7 @@ class MediaDataFilterImplTest : SysuiTestCase() {
eq(100),
eq(true)
)
- verify(mediaLoadingLogger)
+ verify(mediaLogger)
.logMediaLoaded(
eq(dataCurrentAndActive.instanceId),
eq(dataCurrentAndActive.active),
@@ -818,8 +813,7 @@ class MediaDataFilterImplTest : SysuiTestCase() {
)
// Smartspace update shouldn't be propagated for the empty rec list.
verify(listener, never()).onSmartspaceMediaDataLoaded(any(), any(), anyBoolean())
- verify(mediaLoadingLogger, never())
- .logRecommendationLoaded(any(), anyBoolean(), anyString())
+ verify(mediaLogger, never()).logRecommendationLoaded(any(), anyBoolean(), anyString())
verify(logger, never()).logRecommendationAdded(any(), any())
verify(logger).logRecommendationActivated(eq(APP_UID), eq(PACKAGE), eq(INSTANCE_ID))
}
@@ -846,7 +840,7 @@ class MediaDataFilterImplTest : SysuiTestCase() {
assertThat(currentMedia).containsExactly(controlCommonModel)
verify(listener)
.onMediaDataLoaded(eq(KEY), eq(null), eq(dataCurrent), eq(true), eq(0), eq(false))
- verify(mediaLoadingLogger)
+ verify(mediaLogger)
.logMediaLoaded(eq(dataCurrent.instanceId), eq(dataCurrent.active), anyString())
// AND we get a smartspace signal
@@ -865,7 +859,7 @@ class MediaDataFilterImplTest : SysuiTestCase() {
eq(100),
eq(true)
)
- verify(mediaLoadingLogger)
+ verify(mediaLogger)
.logMediaLoaded(
eq(dataCurrentAndActive.instanceId),
eq(dataCurrentAndActive.active),
@@ -890,8 +884,7 @@ class MediaDataFilterImplTest : SysuiTestCase() {
assertThat(currentMedia).containsExactly(controlCommonModel, recsCommonModel)
verify(listener)
.onSmartspaceMediaDataLoaded(eq(SMARTSPACE_KEY), eq(smartspaceData), eq(false))
- verify(mediaLoadingLogger)
- .logRecommendationLoaded(eq(SMARTSPACE_KEY), eq(true), anyString())
+ verify(mediaLogger).logRecommendationLoaded(eq(SMARTSPACE_KEY), eq(true), anyString())
verify(logger).logRecommendationAdded(SMARTSPACE_PACKAGE, SMARTSPACE_INSTANCE_ID)
verify(logger).logRecommendationActivated(eq(APP_UID), eq(PACKAGE), eq(INSTANCE_ID))
}
@@ -908,8 +901,7 @@ class MediaDataFilterImplTest : SysuiTestCase() {
mediaDataFilter.onSmartspaceMediaDataRemoved(SMARTSPACE_KEY)
verify(listener).onSmartspaceMediaDataRemoved(SMARTSPACE_KEY)
- verify(mediaLoadingLogger)
- .logRecommendationRemoved(eq(SMARTSPACE_KEY), eq(true), anyString())
+ verify(mediaLogger).logRecommendationRemoved(eq(SMARTSPACE_KEY), eq(true), anyString())
assertThat(currentMedia).isEmpty()
assertThat(
hasActiveMediaOrRecommendation(
@@ -941,7 +933,7 @@ class MediaDataFilterImplTest : SysuiTestCase() {
assertThat(currentMedia).containsExactly(controlCommonModel)
verify(listener)
.onMediaDataLoaded(eq(KEY), eq(null), eq(dataCurrent), eq(true), eq(0), eq(false))
- verify(mediaLoadingLogger)
+ verify(mediaLogger)
.logMediaLoaded(eq(dataCurrent.instanceId), eq(dataCurrent.active), anyString())
runCurrent()
@@ -958,7 +950,7 @@ class MediaDataFilterImplTest : SysuiTestCase() {
eq(100),
eq(true)
)
- verify(mediaLoadingLogger)
+ verify(mediaLogger)
.logMediaLoaded(
eq(dataCurrentAndActive.instanceId),
eq(dataCurrentAndActive.active),
@@ -968,8 +960,7 @@ class MediaDataFilterImplTest : SysuiTestCase() {
mediaDataFilter.onSmartspaceMediaDataRemoved(SMARTSPACE_KEY)
verify(listener).onSmartspaceMediaDataRemoved(SMARTSPACE_KEY)
- verify(mediaLoadingLogger)
- .logRecommendationRemoved(eq(SMARTSPACE_KEY), eq(true), anyString())
+ verify(mediaLogger).logRecommendationRemoved(eq(SMARTSPACE_KEY), eq(true), anyString())
assertThat(currentMedia).containsExactly(controlCommonModel)
assertThat(
hasActiveMediaOrRecommendation(
@@ -1000,8 +991,7 @@ class MediaDataFilterImplTest : SysuiTestCase() {
verify(listener)
.onSmartspaceMediaDataLoaded(eq(SMARTSPACE_KEY), eq(smartspaceData), eq(false))
- verify(mediaLoadingLogger)
- .logRecommendationLoaded(eq(SMARTSPACE_KEY), eq(false), anyString())
+ verify(mediaLogger).logRecommendationLoaded(eq(SMARTSPACE_KEY), eq(false), anyString())
assertThat(currentMedia).containsExactly(recsCommonModel)
assertThat(
hasActiveMediaOrRecommendation(
@@ -1042,11 +1032,11 @@ class MediaDataFilterImplTest : SysuiTestCase() {
verify(listener)
.onMediaDataLoaded(eq(KEY), eq(null), eq(dataCurrent), eq(true), eq(0), eq(false))
- verify(mediaLoadingLogger)
+ verify(mediaLogger)
.logMediaLoaded(eq(dataCurrent.instanceId), eq(dataCurrent.active), anyString())
assertThat(currentMedia).containsExactly(controlCommonModel)
- reset(mediaLoadingLogger)
+ reset(mediaLogger)
// And an inactive recommendation is loaded
mediaDataFilter.onSmartspaceMediaDataLoaded(SMARTSPACE_KEY, smartspaceData)
@@ -1054,11 +1044,10 @@ class MediaDataFilterImplTest : SysuiTestCase() {
// Smartspace is loaded but the media stays inactive
verify(listener)
.onSmartspaceMediaDataLoaded(eq(SMARTSPACE_KEY), eq(smartspaceData), eq(false))
- verify(mediaLoadingLogger)
- .logRecommendationLoaded(eq(SMARTSPACE_KEY), eq(false), anyString())
+ verify(mediaLogger).logRecommendationLoaded(eq(SMARTSPACE_KEY), eq(false), anyString())
verify(listener, never())
.onMediaDataLoaded(any(), any(), any(), anyBoolean(), anyInt(), anyBoolean())
- verify(mediaLoadingLogger, never()).logMediaLoaded(any(), anyBoolean(), anyString())
+ verify(mediaLogger, never()).logMediaLoaded(any(), anyBoolean(), anyString())
assertThat(currentMedia).containsExactly(controlCommonModel, recsCommonModel)
assertThat(
hasActiveMediaOrRecommendation(
@@ -1127,7 +1116,7 @@ class MediaDataFilterImplTest : SysuiTestCase() {
verify(listener)
.onMediaDataLoaded(eq(KEY), eq(null), eq(dataCurrent), eq(true), eq(0), eq(false))
- verify(mediaLoadingLogger)
+ verify(mediaLogger)
.logMediaLoaded(eq(dataCurrent.instanceId), eq(dataCurrent.active), anyString())
assertThat(currentMedia).containsExactly(controlCommonModel)
@@ -1156,7 +1145,7 @@ class MediaDataFilterImplTest : SysuiTestCase() {
eq(100),
eq(true)
)
- verify(mediaLoadingLogger)
+ verify(mediaLogger)
.logMediaLoaded(
eq(dataCurrentAndActive.instanceId),
eq(dataCurrentAndActive.active),
@@ -1174,8 +1163,7 @@ class MediaDataFilterImplTest : SysuiTestCase() {
// And update the smartspace data state, but not prioritized
verify(listener)
.onSmartspaceMediaDataLoaded(eq(SMARTSPACE_KEY), eq(smartspaceData), eq(false))
- verify(mediaLoadingLogger)
- .logRecommendationLoaded(eq(SMARTSPACE_KEY), eq(true), anyString())
+ verify(mediaLogger).logRecommendationLoaded(eq(SMARTSPACE_KEY), eq(true), anyString())
}
@Test
@@ -1199,11 +1187,11 @@ class MediaDataFilterImplTest : SysuiTestCase() {
verify(listener)
.onMediaDataLoaded(eq(KEY), eq(null), eq(dataCurrent), eq(true), eq(0), eq(false))
- verify(mediaLoadingLogger)
+ verify(mediaLogger)
.logMediaLoaded(eq(dataCurrent.instanceId), eq(dataCurrent.active), anyString())
assertThat(currentMedia).containsExactly(controlCommonModel)
- reset(mediaLoadingLogger)
+ reset(mediaLogger)
// AND we get a smartspace signal with extra to not trigger resume
val extras = Bundle().apply { putBoolean(EXTRA_KEY_TRIGGER_RESUME, false) }
@@ -1213,13 +1201,12 @@ class MediaDataFilterImplTest : SysuiTestCase() {
// THEN listeners are not updated to show media
verify(listener, never())
.onMediaDataLoaded(eq(KEY), eq(KEY), any(), eq(true), eq(100), eq(true))
- verify(mediaLoadingLogger, never())
+ verify(mediaLogger, never())
.logMediaLoaded(eq(dataCurrent.instanceId), anyBoolean(), anyString())
// But the smartspace update is still propagated
verify(listener)
.onSmartspaceMediaDataLoaded(eq(SMARTSPACE_KEY), eq(smartspaceData), eq(false))
- verify(mediaLoadingLogger)
- .logRecommendationLoaded(eq(SMARTSPACE_KEY), eq(true), anyString())
+ verify(mediaLogger).logRecommendationLoaded(eq(SMARTSPACE_KEY), eq(true), anyString())
assertThat(currentMedia).containsExactly(controlCommonModel, recsCommonModel)
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/data/repository/MediaProjectionManagerRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/data/repository/MediaProjectionManagerRepositoryTest.kt
index c0d411b12496..785d5a8e6184 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/data/repository/MediaProjectionManagerRepositoryTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/data/repository/MediaProjectionManagerRepositoryTest.kt
@@ -16,19 +16,26 @@
package com.android.systemui.mediaprojection.data.repository
+import android.hardware.display.displayManager
import android.media.projection.MediaProjectionInfo
import android.os.Binder
+import android.os.Handler
import android.os.UserHandle
import android.view.ContentRecordingSession
+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.coroutines.collectLastValue
+import com.android.systemui.kosmos.applicationCoroutineScope
+import com.android.systemui.kosmos.testDispatcher
import com.android.systemui.kosmos.testScope
+import com.android.systemui.log.logcatLogBuffer
import com.android.systemui.mediaprojection.data.model.MediaProjectionState
import com.android.systemui.mediaprojection.taskswitcher.FakeActivityTaskManager.Companion.createTask
import com.android.systemui.mediaprojection.taskswitcher.FakeActivityTaskManager.Companion.createToken
import com.android.systemui.mediaprojection.taskswitcher.FakeMediaProjectionManager.Companion.createDisplaySession
+import com.android.systemui.mediaprojection.taskswitcher.data.repository.FakeTasksRepository
import com.android.systemui.mediaprojection.taskswitcher.fakeActivityTaskManager
import com.android.systemui.mediaprojection.taskswitcher.fakeMediaProjectionManager
import com.android.systemui.mediaprojection.taskswitcher.taskSwitcherKosmos
@@ -36,7 +43,9 @@ import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.test.runTest
import org.junit.Test
import org.junit.runner.RunWith
+import org.mockito.kotlin.mock
import org.mockito.kotlin.verify
+import org.mockito.kotlin.whenever
@RunWith(AndroidJUnit4::class)
@SmallTest
@@ -47,6 +56,7 @@ class MediaProjectionManagerRepositoryTest : SysuiTestCase() {
private val fakeMediaProjectionManager = kosmos.fakeMediaProjectionManager
private val fakeActivityTaskManager = kosmos.fakeActivityTaskManager
+ private val displayManager = kosmos.displayManager
private val repo = kosmos.realMediaProjectionRepository
@@ -139,6 +149,37 @@ class MediaProjectionManagerRepositoryTest : SysuiTestCase() {
}
@Test
+ fun mediaProjectionState_entireScreen_validVirtualDisplayId_hasHostDeviceName() =
+ testScope.runTest {
+ val state by collectLastValue(repo.mediaProjectionState)
+
+ val session = ContentRecordingSession.createDisplaySession(/* displayToMirror= */ 123)
+ session.virtualDisplayId = 45
+ val displayInfo = mock<Display>().apply { whenever(this.name).thenReturn("Test Name") }
+ whenever(displayManager.getDisplay(45)).thenReturn(displayInfo)
+
+ fakeMediaProjectionManager.dispatchOnSessionSet(session = session)
+
+ assertThat((state as MediaProjectionState.Projecting.EntireScreen).hostDeviceName)
+ .isEqualTo("Test Name")
+ }
+
+ @Test
+ fun mediaProjectionState_entireScreen_invalidVirtualDisplayId_nullHostDeviceName() =
+ testScope.runTest {
+ val state by collectLastValue(repo.mediaProjectionState)
+
+ val session = ContentRecordingSession.createDisplaySession(/* displayToMirror= */ 123)
+ session.virtualDisplayId = 45
+ whenever(displayManager.getDisplay(45)).thenReturn(null)
+
+ fakeMediaProjectionManager.dispatchOnSessionSet(session = session)
+
+ assertThat((state as MediaProjectionState.Projecting.EntireScreen).hostDeviceName)
+ .isNull()
+ }
+
+ @Test
fun mediaProjectionState_sessionSet_taskWithToken_matchingRunningTask_emitsSingleTask() =
testScope.runTest {
val token = createToken()
@@ -179,6 +220,90 @@ class MediaProjectionManagerRepositoryTest : SysuiTestCase() {
}
@Test
+ fun mediaProjectionState_singleTask_validVirtualDisplayId_hasHostDeviceName() =
+ testScope.runTest {
+ val state by collectLastValue(repo.mediaProjectionState)
+
+ val token = createToken()
+ val task = createTask(taskId = 1, token = token)
+ fakeActivityTaskManager.addRunningTasks(task)
+
+ val session = ContentRecordingSession.createTaskSession(token.asBinder())
+ session.virtualDisplayId = 45
+ val displayInfo = mock<Display>().apply { whenever(this.name).thenReturn("Test Name") }
+ whenever(displayManager.getDisplay(45)).thenReturn(displayInfo)
+
+ fakeMediaProjectionManager.dispatchOnSessionSet(session = session)
+
+ assertThat((state as MediaProjectionState.Projecting.SingleTask).hostDeviceName)
+ .isEqualTo("Test Name")
+ }
+
+ @Test
+ fun mediaProjectionState_singleTask_invalidVirtualDisplayId_nullHostDeviceName() =
+ testScope.runTest {
+ val state by collectLastValue(repo.mediaProjectionState)
+
+ val token = createToken()
+ val task = createTask(taskId = 1, token = token)
+ fakeActivityTaskManager.addRunningTasks(task)
+
+ val session = ContentRecordingSession.createTaskSession(token.asBinder())
+ session.virtualDisplayId = 45
+ whenever(displayManager.getDisplay(45)).thenReturn(null)
+
+ fakeMediaProjectionManager.dispatchOnSessionSet(session = session)
+
+ assertThat((state as MediaProjectionState.Projecting.SingleTask).hostDeviceName)
+ .isNull()
+ }
+
+ /** Regression test for b/352483752. */
+ @Test
+ fun mediaProjectionState_sessionStartedThenImmediatelyStopped_emitsOnlyNotProjecting() =
+ testScope.runTest {
+ val fakeTasksRepo = FakeTasksRepository()
+ val repoWithTimingControl =
+ MediaProjectionManagerRepository(
+ // fakeTasksRepo lets us have control over when the background dispatcher
+ // finishes fetching the tasks info.
+ tasksRepository = fakeTasksRepo,
+ mediaProjectionManager = fakeMediaProjectionManager.mediaProjectionManager,
+ displayManager = displayManager,
+ handler = Handler.getMain(),
+ applicationScope = kosmos.applicationCoroutineScope,
+ backgroundDispatcher = kosmos.testDispatcher,
+ mediaProjectionServiceHelper = fakeMediaProjectionManager.helper,
+ logger = logcatLogBuffer("TestMediaProjection"),
+ )
+
+ val state by collectLastValue(repoWithTimingControl.mediaProjectionState)
+
+ val token = createToken()
+ val task = createTask(taskId = 1, token = token)
+
+ // Dispatch a session using a task session so that MediaProjectionManagerRepository
+ // has to ask TasksRepository for the tasks info.
+ fakeMediaProjectionManager.dispatchOnSessionSet(
+ session = ContentRecordingSession.createTaskSession(token.asBinder())
+ )
+ // FakeTasksRepository is set up to not return the tasks info until the test manually
+ // calls [FakeTasksRepository#setRunningTaskResult]. At this point,
+ // MediaProjectionManagerRepository is waiting for the tasks info and hasn't emitted
+ // anything yet.
+
+ // Before the tasks info comes back, dispatch a stop event.
+ fakeMediaProjectionManager.dispatchOnStop()
+
+ // Then let the tasks info come back.
+ fakeTasksRepo.setRunningTaskResult(task)
+
+ // Verify that MediaProjectionManagerRepository threw away the tasks info because
+ // a newer callback event (#onStop) occurred.
+ assertThat(state).isEqualTo(MediaProjectionState.NotProjecting)
+ }
+
+ @Test
fun stopProjecting_invokesManager() =
testScope.runTest {
repo.stopProjecting()
diff --git a/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/permission/MediaProjectionPermissionDialogDelegateTest.kt b/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/permission/MediaProjectionPermissionDialogDelegateTest.kt
index 548366e3fc38..7dd802878674 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/permission/MediaProjectionPermissionDialogDelegateTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/permission/MediaProjectionPermissionDialogDelegateTest.kt
@@ -47,13 +47,7 @@ class MediaProjectionPermissionDialogDelegateTest : SysuiTestCase() {
private lateinit var dialog: AlertDialog
private val flags = mock<FeatureFlagsClassic>()
- private val onStartRecordingClicked = mock<Runnable>()
- private val mediaProjectionMetricsLogger = mock<MediaProjectionMetricsLogger>()
-
- private val mediaProjectionConfig: MediaProjectionConfig =
- MediaProjectionConfig.createConfigForDefaultDisplay()
- private val appName: String = "testApp"
- private val hostUid: Int = 12345
+ private val appName = "Test App"
private val resIdSingleApp = R.string.screen_share_permission_dialog_option_single_app
private val resIdFullScreen = R.string.screen_share_permission_dialog_option_entire_screen
@@ -73,16 +67,33 @@ class MediaProjectionPermissionDialogDelegateTest : SysuiTestCase() {
}
@Test
- fun showDialog_forceShowPartialScreenShareFalse() {
- // Set up dialog with MediaProjectionConfig.createConfigForDefaultDisplay() and
- // overrideDisableSingleAppOption = false
- val overrideDisableSingleAppOption = false
- setUpAndShowDialog(overrideDisableSingleAppOption)
+ fun showDefaultDialog() {
+ setUpAndShowDialog()
- val spinner = dialog.requireViewById<Spinner>(R.id.screen_share_mode_spinner)
+ val spinner = dialog.requireViewById<Spinner>(R.id.screen_share_mode_options)
val secondOptionText =
spinner.adapter
.getDropDownView(1, null, spinner)
+ .findViewById<TextView>(android.R.id.text1)
+ ?.text
+
+ // check that the first option is single app and enabled
+ assertEquals(context.getString(resIdSingleApp), spinner.selectedItem)
+
+ // check that the second option is full screen and enabled
+ assertEquals(context.getString(resIdFullScreen), secondOptionText)
+ }
+
+ @Test
+ fun showDialog_disableSingleApp() {
+ setUpAndShowDialog(
+ mediaProjectionConfig = MediaProjectionConfig.createConfigForDefaultDisplay()
+ )
+
+ val spinner = dialog.requireViewById<Spinner>(R.id.screen_share_mode_options)
+ val secondOptionWarningText =
+ spinner.adapter
+ .getDropDownView(1, null, spinner)
.findViewById<TextView>(android.R.id.text2)
?.text
@@ -90,17 +101,17 @@ class MediaProjectionPermissionDialogDelegateTest : SysuiTestCase() {
assertEquals(context.getString(resIdFullScreen), spinner.selectedItem)
// check that the second option is single app and disabled
- assertEquals(context.getString(resIdSingleAppDisabled, appName), secondOptionText)
+ assertEquals(context.getString(resIdSingleAppDisabled, appName), secondOptionWarningText)
}
@Test
- fun showDialog_forceShowPartialScreenShareTrue() {
- // Set up dialog with MediaProjectionConfig.createConfigForDefaultDisplay() and
- // overrideDisableSingleAppOption = true
- val overrideDisableSingleAppOption = true
- setUpAndShowDialog(overrideDisableSingleAppOption)
+ fun showDialog_disableSingleApp_forceShowPartialScreenShareTrue() {
+ setUpAndShowDialog(
+ mediaProjectionConfig = MediaProjectionConfig.createConfigForDefaultDisplay(),
+ overrideDisableSingleAppOption = true
+ )
- val spinner = dialog.requireViewById<Spinner>(R.id.screen_share_mode_spinner)
+ val spinner = dialog.requireViewById<Spinner>(R.id.screen_share_mode_options)
val secondOptionText =
spinner.adapter
.getDropDownView(1, null, spinner)
@@ -114,17 +125,43 @@ class MediaProjectionPermissionDialogDelegateTest : SysuiTestCase() {
assertEquals(context.getString(resIdFullScreen), secondOptionText)
}
- private fun setUpAndShowDialog(overrideDisableSingleAppOption: Boolean) {
+ @Test
+ fun showDialog_disableSingleApp_hasCastingCapabilities() {
+ setUpAndShowDialog(
+ mediaProjectionConfig = MediaProjectionConfig.createConfigForDefaultDisplay(),
+ hasCastingCapabilities = true
+ )
+
+ val spinner = dialog.requireViewById<Spinner>(R.id.screen_share_mode_options)
+ val secondOptionWarningText =
+ spinner.adapter
+ .getDropDownView(1, null, spinner)
+ .findViewById<TextView>(android.R.id.text2)
+ ?.text
+
+ // check that the first option is full screen and enabled
+ assertEquals(context.getString(resIdFullScreen), spinner.selectedItem)
+
+ // check that the second option is single app and disabled
+ assertEquals(context.getString(resIdSingleAppDisabled, appName), secondOptionWarningText)
+ }
+
+ private fun setUpAndShowDialog(
+ mediaProjectionConfig: MediaProjectionConfig? = null,
+ overrideDisableSingleAppOption: Boolean = false,
+ hasCastingCapabilities: Boolean = false,
+ ) {
val delegate =
MediaProjectionPermissionDialogDelegate(
context,
mediaProjectionConfig,
- {},
- onStartRecordingClicked,
+ onStartRecordingClicked = {},
+ onCancelClicked = {},
+ hasCastingCapabilities,
appName,
overrideDisableSingleAppOption,
- hostUid,
- mediaProjectionMetricsLogger
+ hostUid = 12345,
+ mediaProjectionMetricsLogger = mock<MediaProjectionMetricsLogger>()
)
dialog = AlertDialogWithDelegate(context, R.style.Theme_SystemUI_Dialog, delegate)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/taskswitcher/data/repository/FakeTasksRepository.kt b/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/taskswitcher/data/repository/FakeTasksRepository.kt
new file mode 100644
index 000000000000..ce2b9830951b
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/taskswitcher/data/repository/FakeTasksRepository.kt
@@ -0,0 +1,46 @@
+/*
+ * 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.mediaprojection.taskswitcher.data.repository
+
+import android.app.ActivityManager
+import android.os.IBinder
+import kotlinx.coroutines.CompletableDeferred
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.emptyFlow
+
+/**
+ * Fake tasks repository that gives us fine-grained control over when the result of
+ * [findRunningTaskFromWindowContainerToken] gets emitted.
+ */
+class FakeTasksRepository : TasksRepository {
+ override suspend fun launchRecentTask(taskInfo: ActivityManager.RunningTaskInfo) {}
+
+ private val findRunningTaskResult: CompletableDeferred<ActivityManager.RunningTaskInfo?> =
+ CompletableDeferred()
+
+ override suspend fun findRunningTaskFromWindowContainerToken(
+ windowContainerToken: IBinder
+ ): ActivityManager.RunningTaskInfo? {
+ return findRunningTaskResult.await()
+ }
+
+ fun setRunningTaskResult(task: ActivityManager.RunningTaskInfo?) {
+ findRunningTaskResult.complete(task)
+ }
+
+ override val foregroundTask: Flow<ActivityManager.RunningTaskInfo> = emptyFlow()
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/navigationbar/gestural/BackPanelControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/navigationbar/gestural/BackPanelControllerTest.kt
index b169cc12f08a..b4db6da2000a 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/navigationbar/gestural/BackPanelControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/navigationbar/gestural/BackPanelControllerTest.kt
@@ -27,6 +27,7 @@ import android.view.ViewConfiguration
import android.view.WindowManager
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.app.viewcapture.ViewCaptureAwareWindowManager
import com.android.internal.jank.Cuj
import com.android.internal.util.LatencyTracker
import com.android.systemui.SysuiTestCase
@@ -63,7 +64,7 @@ class BackPanelControllerTest : SysuiTestCase() {
private var triggerThreshold: Float = 0.0f
private val touchSlop = ViewConfiguration.get(context).scaledEdgeSlop
@Mock private lateinit var vibratorHelper: VibratorHelper
- @Mock private lateinit var windowManager: WindowManager
+ @Mock private lateinit var viewCaptureAwareWindowManager: ViewCaptureAwareWindowManager
@Mock private lateinit var configurationController: ConfigurationController
@Mock private lateinit var latencyTracker: LatencyTracker
private val interactionJankMonitor by lazy { kosmos.interactionJankMonitor }
@@ -78,7 +79,7 @@ class BackPanelControllerTest : SysuiTestCase() {
mBackPanelController =
BackPanelController(
context,
- windowManager,
+ viewCaptureAwareWindowManager,
ViewConfiguration.get(context),
Handler.createAsync(testableLooper.looper),
systemClock,
diff --git a/packages/SystemUI/tests/src/com/android/systemui/navigationbar/views/NavigationBarTest.java b/packages/SystemUI/tests/src/com/android/systemui/navigationbar/views/NavigationBarTest.java
index 98ff6c90b4b2..45d77f6d76cd 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/navigationbar/views/NavigationBarTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/navigationbar/views/NavigationBarTest.java
@@ -29,6 +29,8 @@ import static android.view.WindowInsets.Type.ime;
import static com.android.internal.config.sysui.SystemUiDeviceConfigFlags.HOME_BUTTON_LONG_PRESS_DURATION_MS;
import static com.android.systemui.assist.AssistManager.INVOCATION_TYPE_HOME_BUTTON_LONG_PRESS;
import static com.android.systemui.navigationbar.views.NavigationBar.NavBarActionEvent.NAVBAR_ASSIST_LONGPRESS;
+import static com.android.systemui.navigationbar.views.buttons.KeyButtonView.NavBarButtonEvent.NAVBAR_IME_SWITCHER_BUTTON_LONGPRESS;
+import static com.android.systemui.navigationbar.views.buttons.KeyButtonView.NavBarButtonEvent.NAVBAR_IME_SWITCHER_BUTTON_TAP;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_SCREEN_PINNING;
import static com.google.common.truth.Truth.assertThat;
@@ -38,6 +40,7 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyBoolean;
+import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.ArgumentMatchers.anyLong;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.doNothing;
@@ -70,6 +73,7 @@ import android.view.WindowInsets;
import android.view.WindowManager;
import android.view.WindowMetrics;
import android.view.accessibility.AccessibilityManager;
+import android.view.inputmethod.Flags;
import android.view.inputmethod.InputMethodManager;
import androidx.test.ext.junit.runners.AndroidJUnit4;
@@ -162,6 +166,8 @@ public class NavigationBarTest extends SysuiTestCase {
@Mock
ButtonDispatcher mImeSwitchButton;
@Mock
+ KeyButtonView mImeSwitchButtonView;
+ @Mock
ButtonDispatcher mBackButton;
@Mock
NavigationBarTransitions mNavigationBarTransitions;
@@ -433,6 +439,45 @@ public class NavigationBarTest extends SysuiTestCase {
}
@Test
+ public void testImeSwitcherClick() {
+ mNavigationBar.init();
+ mNavigationBar.onViewAttached();
+ mNavigationBar.onImeSwitcherClick(mImeSwitchButtonView);
+
+ verify(mUiEventLogger).log(NAVBAR_IME_SWITCHER_BUTTON_TAP);
+ verify(mUiEventLogger, never()).log(NAVBAR_IME_SWITCHER_BUTTON_LONGPRESS);
+ if (Flags.imeSwitcherRevamp()) {
+ verify(mInputMethodManager)
+ .onImeSwitchButtonClickFromSystem(mNavigationBar.mDisplayId);
+ verify(mInputMethodManager, never()).showInputMethodPickerFromSystem(
+ anyBoolean() /* showAuxiliarySubtypes */, anyInt() /* displayId */);
+ } else {
+ verify(mInputMethodManager, never())
+ .onImeSwitchButtonClickFromSystem(anyInt() /* displayId */);
+ verify(mInputMethodManager).showInputMethodPickerFromSystem(
+ true /* showAuxiliarySubtypes */, mNavigationBar.mDisplayId);
+ }
+ }
+
+ @Test
+ public void testImeSwitcherLongClick() {
+ mNavigationBar.init();
+ mNavigationBar.onViewAttached();
+ mNavigationBar.onImeSwitcherLongClick(mImeSwitchButtonView);
+
+ verify(mUiEventLogger, never()).log(NAVBAR_IME_SWITCHER_BUTTON_TAP);
+ if (Flags.imeSwitcherRevamp()) {
+ verify(mUiEventLogger).log(NAVBAR_IME_SWITCHER_BUTTON_LONGPRESS);
+ verify(mInputMethodManager).showInputMethodPickerFromSystem(
+ true /* showAuxiliarySubtypes */, mNavigationBar.mDisplayId);
+ } else {
+ verify(mUiEventLogger, never()).log(NAVBAR_IME_SWITCHER_BUTTON_LONGPRESS);
+ verify(mInputMethodManager, never()).showInputMethodPickerFromSystem(
+ anyBoolean() /* showAuxiliarySubtypes */, anyInt() /* displayId */);
+ }
+ }
+
+ @Test
public void testRegisteredWithUserTracker() {
mNavigationBar.init();
mNavigationBar.onViewAttached();
diff --git a/packages/SystemUI/tests/src/com/android/systemui/people/widget/PeopleSpaceWidgetManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/people/widget/PeopleSpaceWidgetManagerTest.java
index 16a022f720ae..8681123d0c2b 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/people/widget/PeopleSpaceWidgetManagerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/people/widget/PeopleSpaceWidgetManagerTest.java
@@ -276,8 +276,8 @@ public class PeopleSpaceWidgetManagerTest extends SysuiTestCase {
public void setUp() throws Exception {
MockitoAnnotations.initMocks(this);
mLauncherApps = mock(LauncherApps.class);
- mManager = new PeopleSpaceWidgetManager(mContext, mAppWidgetManager, mIPeopleManager,
- mPeopleManager, mLauncherApps, mNotifCollection, mPackageManager,
+ mManager = new PeopleSpaceWidgetManager(mContext, Optional.of(mAppWidgetManager),
+ mIPeopleManager, mPeopleManager, mLauncherApps, mNotifCollection, mPackageManager,
Optional.of(mBubbles), mUserManager, mBackupManager, mINotificationManager,
mNotificationManager, mFakeExecutor, mUserTracker);
mManager.attach(mListenerService);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/tileimpl/QSTileImplTest.java b/packages/SystemUI/tests/src/com/android/systemui/qs/tileimpl/QSTileImplTest.java
index e46416c1b321..ebab04989590 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/tileimpl/QSTileImplTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/tileimpl/QSTileImplTest.java
@@ -75,6 +75,7 @@ import com.android.systemui.qs.QsEventLoggerFake;
import com.android.systemui.qs.logging.QSLogger;
import com.android.systemui.statusbar.StatusBarState;
+import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -146,6 +147,12 @@ public class QSTileImplTest extends SysuiTestCase {
mTile.setTileSpec(SPEC);
}
+ @After
+ public void destroyTile() {
+ mTile.destroy();
+ mTestableLooper.processAllMessages();
+ }
+
@Test
public void testClick_Metrics() {
mTile.click(null /* expandable */);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/tileimpl/QSTileViewImplTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/tileimpl/QSTileViewImplTest.kt
index 415cc7c99b2c..988769fe6660 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/tileimpl/QSTileViewImplTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/tileimpl/QSTileViewImplTest.kt
@@ -471,7 +471,7 @@ class QSTileViewImplTest : SysuiTestCase() {
}
@Test
- fun onPrepareForLaunch_paddingForLaunchAnimationIsConfigured() {
+ fun getPaddingForLaunchAnimation_onLongClickedState_paddingForLaunchAnimationIsConfigured() {
val startingWidth = 100
val startingHeight = 50
val deltaWidth = (QSTileViewImpl.LONG_PRESS_EFFECT_WIDTH_SCALE - 1f) * startingWidth
@@ -480,8 +480,8 @@ class QSTileViewImplTest : SysuiTestCase() {
// GIVEN that long-press effect properties are initialized
tileView.initializeLongPressProperties(startingHeight, startingWidth)
- // WHEN the tile is preparing for the launch animation
- tileView.prepareForLaunch()
+ // WHEN the long-press effect has ended in the long-click state
+ kosmos.qsLongPressEffect.setState(QSLongPressEffect.State.LONG_CLICKED)
// THE animation padding corresponds to the tile's growth due to the effect
val padding = tileView.getPaddingForLaunchAnimation()
@@ -497,6 +497,22 @@ class QSTileViewImplTest : SysuiTestCase() {
}
@Test
+ fun getPaddingForLaunchAnimation_notInLongClickState_paddingForLaunchAnimationIsEmpty() {
+ val startingWidth = 100
+ val startingHeight = 50
+
+ // GIVEN that long-press effect properties are initialized
+ tileView.initializeLongPressProperties(startingHeight, startingWidth)
+
+ // WHEN the long-press effect has ended in the click state
+ kosmos.qsLongPressEffect.setState(QSLongPressEffect.State.CLICKED)
+
+ // THE animation padding is empty
+ val padding = tileView.getPaddingForLaunchAnimation()
+ assertThat(padding.isEmpty).isTrue()
+ }
+
+ @Test
fun onActivityLaunchAnimationEnd_onFreshTile_longPressPropertiesAreReset() {
// WHEN an activity launch animation ends on a fresh tile
tileView.onActivityLaunchAnimationEnd()
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/ModesTileTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/ModesTileTest.kt
new file mode 100644
index 000000000000..27b6ea61a922
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/ModesTileTest.kt
@@ -0,0 +1,180 @@
+/*
+ * 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.qs.tiles
+
+import android.graphics.drawable.TestStubDrawable
+import android.os.Handler
+import android.platform.test.annotations.EnableFlags
+import android.service.quicksettings.Tile
+import android.testing.TestableLooper
+import android.testing.TestableLooper.RunWithLooper
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import androidx.test.filters.SmallTest
+import com.android.internal.logging.MetricsLogger
+import com.android.settingslib.notification.data.repository.FakeZenModeRepository
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.animation.DialogTransitionAnimator
+import com.android.systemui.classifier.FalsingManagerFake
+import com.android.systemui.plugins.ActivityStarter
+import com.android.systemui.plugins.statusbar.StatusBarStateController
+import com.android.systemui.qs.QSHost
+import com.android.systemui.qs.QsEventLogger
+import com.android.systemui.qs.logging.QSLogger
+import com.android.systemui.qs.tiles.base.actions.FakeQSTileIntentUserInputHandler
+import com.android.systemui.qs.tiles.impl.modes.domain.interactor.ModesTileDataInteractor
+import com.android.systemui.qs.tiles.impl.modes.domain.interactor.ModesTileUserActionInteractor
+import com.android.systemui.qs.tiles.impl.modes.ui.ModesTileMapper
+import com.android.systemui.qs.tiles.viewmodel.QSTileConfigProvider
+import com.android.systemui.qs.tiles.viewmodel.QSTileConfigTestBuilder
+import com.android.systemui.qs.tiles.viewmodel.QSTileUIConfig
+import com.android.systemui.res.R
+import com.android.systemui.statusbar.policy.ui.dialog.ModesDialogDelegate
+import com.android.systemui.util.mockito.any
+import com.android.systemui.util.settings.FakeSettings
+import com.android.systemui.util.settings.SecureSettings
+import com.google.common.truth.Truth.assertThat
+import kotlin.coroutines.EmptyCoroutineContext
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.test.StandardTestDispatcher
+import kotlinx.coroutines.test.TestScope
+import kotlinx.coroutines.test.runCurrent
+import kotlinx.coroutines.test.runTest
+import org.junit.After
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.mockito.Mock
+import org.mockito.MockitoAnnotations
+import org.mockito.kotlin.whenever
+
+@OptIn(ExperimentalCoroutinesApi::class)
+@EnableFlags(android.app.Flags.FLAG_MODES_UI)
+@SmallTest
+@RunWith(AndroidJUnit4::class)
+@RunWithLooper(setAsMainLooper = true)
+class ModesTileTest : SysuiTestCase() {
+
+ @Mock private lateinit var qsHost: QSHost
+
+ @Mock private lateinit var metricsLogger: MetricsLogger
+
+ @Mock private lateinit var statusBarStateController: StatusBarStateController
+
+ @Mock private lateinit var activityStarter: ActivityStarter
+
+ @Mock private lateinit var qsLogger: QSLogger
+
+ @Mock private lateinit var uiEventLogger: QsEventLogger
+
+ @Mock private lateinit var qsTileConfigProvider: QSTileConfigProvider
+
+ @Mock private lateinit var dialogTransitionAnimator: DialogTransitionAnimator
+
+ @Mock private lateinit var dialogDelegate: ModesDialogDelegate
+
+ private val inputHandler = FakeQSTileIntentUserInputHandler()
+ private val zenModeRepository = FakeZenModeRepository()
+ private val tileDataInteractor = ModesTileDataInteractor(zenModeRepository)
+ private val mapper =
+ ModesTileMapper(
+ context.orCreateTestableResources
+ .apply {
+ addOverride(R.drawable.qs_dnd_icon_on, TestStubDrawable())
+ addOverride(R.drawable.qs_dnd_icon_off, TestStubDrawable())
+ }
+ .resources,
+ context.theme,
+ )
+
+ private val testDispatcher = StandardTestDispatcher()
+ private val testScope = TestScope(testDispatcher)
+
+ private lateinit var userActionInteractor: ModesTileUserActionInteractor
+ private lateinit var secureSettings: SecureSettings
+ private lateinit var testableLooper: TestableLooper
+ private lateinit var underTest: ModesTile
+
+ @Before
+ fun setUp() {
+ MockitoAnnotations.initMocks(this)
+ testableLooper = TestableLooper.get(this)
+ secureSettings = FakeSettings()
+
+ // Allow the tile to load resources
+ whenever(qsHost.context).thenReturn(context)
+ whenever(qsHost.userContext).thenReturn(context)
+
+ whenever(qsTileConfigProvider.getConfig(any()))
+ .thenReturn(
+ QSTileConfigTestBuilder.build {
+ uiConfig =
+ QSTileUIConfig.Resource(
+ iconRes = R.drawable.qs_dnd_icon_off,
+ labelRes = R.string.quick_settings_modes_label,
+ )
+ }
+ )
+
+ userActionInteractor =
+ ModesTileUserActionInteractor(
+ EmptyCoroutineContext,
+ inputHandler,
+ dialogTransitionAnimator,
+ dialogDelegate,
+ )
+
+ underTest =
+ ModesTile(
+ qsHost,
+ uiEventLogger,
+ testableLooper.looper,
+ Handler(testableLooper.looper),
+ FalsingManagerFake(),
+ metricsLogger,
+ statusBarStateController,
+ activityStarter,
+ qsLogger,
+ qsTileConfigProvider,
+ tileDataInteractor,
+ mapper,
+ userActionInteractor,
+ )
+
+ underTest.initialize()
+ underTest.setListening(Object(), true)
+
+ testableLooper.processAllMessages()
+ }
+
+ @After
+ fun tearDown() {
+ underTest.destroy()
+ testableLooper.processAllMessages()
+ }
+
+ @Test
+ fun stateUpdatesOnChange() =
+ testScope.runTest {
+ assertThat(underTest.state.state).isEqualTo(Tile.STATE_INACTIVE)
+
+ zenModeRepository.addMode(id = "Test", active = true)
+ runCurrent()
+ testableLooper.processAllMessages()
+
+ assertThat(underTest.state.state).isEqualTo(Tile.STATE_ACTIVE)
+ }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/ReduceBrightColorsTileTest.java b/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/ReduceBrightColorsTileTest.java
index 798e9fb208b7..d6bde27dfb62 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/ReduceBrightColorsTileTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/ReduceBrightColorsTileTest.java
@@ -24,6 +24,7 @@ import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import android.os.Handler;
+import android.platform.test.annotations.RequiresFlagsDisabled;
import android.service.quicksettings.Tile;
import android.testing.TestableLooper;
@@ -32,6 +33,7 @@ import androidx.test.filters.SmallTest;
import com.android.internal.R;
import com.android.internal.logging.MetricsLogger;
+import com.android.server.display.feature.flags.Flags;
import com.android.systemui.SysuiTestCase;
import com.android.systemui.classifier.FalsingManagerFake;
import com.android.systemui.plugins.ActivityStarter;
@@ -131,6 +133,7 @@ public class ReduceBrightColorsTileTest extends SysuiTestCase {
}
@Test
+ @RequiresFlagsDisabled(Flags.FLAG_EVEN_DIMMER)
public void testActive_clicked_featureIsActivated() {
when(mReduceBrightColorsController.isReduceBrightColorsActivated()).thenReturn(false);
mTile.refreshState();
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/dialog/InternetDialogDelegateControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/dialog/InternetDialogDelegateControllerTest.java
index 5273495bec2f..eea02eec7099 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/dialog/InternetDialogDelegateControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/dialog/InternetDialogDelegateControllerTest.java
@@ -61,6 +61,7 @@ import android.view.WindowManager;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
+import com.android.app.viewcapture.ViewCaptureAwareWindowManager;
import com.android.internal.logging.UiEventLogger;
import com.android.keyguard.KeyguardUpdateMonitor;
import com.android.settingslib.wifi.WifiUtils;
@@ -160,7 +161,7 @@ public class InternetDialogDelegateControllerTest extends SysuiTestCase {
@Mock
InternetDialogController.InternetDialogCallback mInternetDialogCallback;
@Mock
- private WindowManager mWindowManager;
+ private ViewCaptureAwareWindowManager mWindowManager;
@Mock
private ToastFactory mToastFactory;
@Mock
@@ -232,8 +233,9 @@ public class InternetDialogDelegateControllerTest extends SysuiTestCase {
mSubscriptionManager, mTelephonyManager, mWifiManager,
mConnectivityManager, mHandler, mExecutor, mBroadcastDispatcher,
mock(KeyguardUpdateMonitor.class), mGlobalSettings, mKeyguardStateController,
- mWindowManager, mToastFactory, mWorkerHandler, mCarrierConfigTracker,
- mLocationController, mDialogTransitionAnimator, mWifiStateWorker, mFlags);
+ mWindowManager, mToastFactory, mWorkerHandler,
+ mCarrierConfigTracker, mLocationController, mDialogTransitionAnimator,
+ mWifiStateWorker, mFlags);
mSubscriptionManager.addOnSubscriptionsChangedListener(mExecutor,
mInternetDialogController.mOnSubscriptionsChangedListener);
mInternetDialogController.onStart(mInternetDialogCallback, true);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/screenrecord/RecordingControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/screenrecord/RecordingControllerTest.java
index 2444af7204e7..477c50b58519 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/screenrecord/RecordingControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/screenrecord/RecordingControllerTest.java
@@ -18,6 +18,8 @@ package com.android.systemui.screenrecord;
import static android.os.Process.myUid;
+import static com.android.systemui.log.LogBufferHelperKt.logcatLogBuffer;
+
import static com.google.common.truth.Truth.assertThat;
import static junit.framework.Assert.assertFalse;
@@ -69,10 +71,6 @@ import org.mockito.MockitoAnnotations;
@SmallTest
@RunWith(AndroidTestingRunner.class)
@TestableLooper.RunWithLooper(setAsMainLooper = true)
-/**
- * Tests for exception handling and bitmap configuration in adding smart actions to Screenshot
- * Notification.
- */
public class RecordingControllerTest extends SysuiTestCase {
private static final int TEST_USER_ID = 12345;
@@ -146,6 +144,7 @@ public class RecordingControllerTest extends SysuiTestCase {
mFeatureFlags,
() -> mDevicePolicyResolver,
mUserTracker,
+ new RecordingControllerLogger(logcatLogBuffer("RecordingControllerTest")),
mMediaProjectionMetricsLogger,
mScreenCaptureDisabledDialogDelegate,
mScreenRecordDialogFactory,
diff --git a/packages/SystemUI/tests/src/com/android/systemui/screenrecord/ScreenRecordPermissionDialogDelegateTest.kt b/packages/SystemUI/tests/src/com/android/systemui/screenrecord/ScreenRecordPermissionDialogDelegateTest.kt
index db607fd56643..cc8d7d532bda 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/screenrecord/ScreenRecordPermissionDialogDelegateTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/screenrecord/ScreenRecordPermissionDialogDelegateTest.kt
@@ -109,7 +109,7 @@ class ScreenRecordPermissionDialogDelegateTest : SysuiTestCase() {
fun testShowDialog_partialScreenSharingEnabled_optionsSpinnerIsVisible() {
showDialog()
- val visibility = dialog.requireViewById<Spinner>(R.id.screen_share_mode_spinner).visibility
+ val visibility = dialog.requireViewById<Spinner>(R.id.screen_share_mode_options).visibility
assertThat(visibility).isEqualTo(View.VISIBLE)
}
@@ -155,7 +155,7 @@ class ScreenRecordPermissionDialogDelegateTest : SysuiTestCase() {
fun showDialog_singleAppIsDefault() {
showDialog()
- val spinner = dialog.requireViewById<Spinner>(R.id.screen_share_mode_spinner)
+ val spinner = dialog.requireViewById<Spinner>(R.id.screen_share_mode_options)
val singleApp = context.getString(R.string.screen_share_permission_dialog_option_single_app)
assertEquals(spinner.adapter.getItem(0), singleApp)
}
@@ -217,7 +217,7 @@ class ScreenRecordPermissionDialogDelegateTest : SysuiTestCase() {
}
private fun onSpinnerItemSelected(position: Int) {
- val spinner = dialog.requireViewById<Spinner>(R.id.screen_share_mode_spinner)
+ val spinner = dialog.requireViewById<Spinner>(R.id.screen_share_mode_options)
checkNotNull(spinner.onItemSelectedListener)
.onItemSelected(spinner, mock(), position, /* id= */ 0)
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/screenshot/SaveImageInBackgroundTaskTest.kt b/packages/SystemUI/tests/src/com/android/systemui/screenshot/SaveImageInBackgroundTaskTest.kt
index 25dd9fedba7c..24e8b1886438 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/screenshot/SaveImageInBackgroundTaskTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/screenshot/SaveImageInBackgroundTaskTest.kt
@@ -27,7 +27,6 @@ import android.os.UserHandle
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.flags.FakeFeatureFlags
-import com.android.systemui.screenshot.ScreenshotController.SaveImageInBackgroundData
import com.android.systemui.screenshot.ScreenshotNotificationSmartActionsProvider.ScreenshotSmartActionType
import com.android.systemui.util.mockito.any
import com.android.systemui.util.mockito.eq
@@ -44,7 +43,7 @@ class SaveImageInBackgroundTaskTest : SysuiTestCase() {
private val imageExporter = mock<ImageExporter>()
private val smartActions = mock<ScreenshotSmartActions>()
private val smartActionsProvider = mock<ScreenshotNotificationSmartActionsProvider>()
- private val saveImageData = SaveImageInBackgroundData()
+ private val saveImageData = SaveImageInBackgroundTask.SaveImageInBackgroundData()
private val testScreenshotId: String = "testScreenshotId"
private val testBitmap = mock<Bitmap>()
private val testUser = UserHandle.getUserHandleForUid(0)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/screenshot/TakeScreenshotExecutorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/screenshot/TakeScreenshotExecutorTest.kt
index 0b81b5e6de35..8d3a29ac7278 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/screenshot/TakeScreenshotExecutorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/screenshot/TakeScreenshotExecutorTest.kt
@@ -69,7 +69,7 @@ class TakeScreenshotExecutorTest : SysuiTestCase() {
@Before
fun setUp() {
- whenever(controllerFactory.create(any(), any())).thenReturn(controller)
+ whenever(controllerFactory.create(any())).thenReturn(controller)
whenever(notificationControllerFactory.create(eq(0))).thenReturn(notificationsController0)
whenever(notificationControllerFactory.create(eq(1))).thenReturn(notificationsController1)
}
@@ -83,8 +83,8 @@ class TakeScreenshotExecutorTest : SysuiTestCase() {
val onSaved = { _: Uri? -> }
screenshotExecutor.executeScreenshots(createScreenshotRequest(), onSaved, callback)
- verify(controllerFactory).create(eq(internalDisplay), any())
- verify(controllerFactory, never()).create(eq(externalDisplay), any())
+ verify(controllerFactory).create(eq(internalDisplay))
+ verify(controllerFactory, never()).create(eq(externalDisplay))
val capturer = ArgumentCaptor<ScreenshotData>()
@@ -118,8 +118,8 @@ class TakeScreenshotExecutorTest : SysuiTestCase() {
callback
)
- verify(controllerFactory).create(eq(internalDisplay), any())
- verify(controllerFactory, never()).create(eq(externalDisplay), any())
+ verify(controllerFactory).create(eq(internalDisplay))
+ verify(controllerFactory, never()).create(eq(externalDisplay))
val capturer = ArgumentCaptor<ScreenshotData>()
@@ -151,7 +151,7 @@ class TakeScreenshotExecutorTest : SysuiTestCase() {
@Test
fun executeScreenshots_allowedTypes_allCaptured() =
testScope.runTest {
- whenever(controllerFactory.create(any(), any())).thenReturn(controller)
+ whenever(controllerFactory.create(any())).thenReturn(controller)
setDisplays(
display(TYPE_INTERNAL, id = 0),
diff --git a/packages/SystemUI/tests/src/com/android/systemui/screenshot/appclips/AppClipsViewModelTest.java b/packages/SystemUI/tests/src/com/android/systemui/screenshot/appclips/AppClipsViewModelTest.java
index baf1357a1ae0..193d29c1d550 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/screenshot/appclips/AppClipsViewModelTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/screenshot/appclips/AppClipsViewModelTest.java
@@ -334,13 +334,17 @@ public final class AppClipsViewModelTest extends SysuiTestCase {
}
private void resetPackageManagerMockingForUsingFallbackBacklinks() {
+ ResolveInfo backlinksTaskResolveInfo = createBacklinksTaskResolveInfo();
reset(mPackageManager);
when(mPackageManager.loadItemIcon(any(), any())).thenReturn(FAKE_DRAWABLE);
when(mPackageManager.resolveActivity(any(Intent.class), anyInt()))
- // First the logic queries whether a package has a launcher activity, this should
+ // Firstly, the logic queries whether a package has a launcher activity, this should
// resolve otherwise the logic filters out the task.
- .thenReturn(createBacklinksTaskResolveInfo())
- // Then logic queries with the backlinks intent, this should not resolve for the
+ .thenReturn(backlinksTaskResolveInfo)
+ // Secondly, the logic builds a fallback main launcher intent, this should also
+ // resolve for the fallback intent to build correctly.
+ .thenReturn(backlinksTaskResolveInfo)
+ // Lastly, logic queries with the backlinks intent, this should not resolve for the
// logic to use the fallback intent.
.thenReturn(null);
}
@@ -360,6 +364,8 @@ public final class AppClipsViewModelTest extends SysuiTestCase {
assertThat(actualBacklinksIntent.getPackage()).isEqualTo(BACKLINKS_TASK_PACKAGE_NAME);
assertThat(actualBacklinksIntent.getAction()).isEqualTo(ACTION_MAIN);
assertThat(actualBacklinksIntent.getCategories()).containsExactly(CATEGORY_LAUNCHER);
+ assertThat(actualBacklinksIntent.getComponent()).isEqualTo(
+ new ComponentName(BACKLINKS_TASK_PACKAGE_NAME, BACKLINKS_TASK_APP_NAME));
}
private static ResolveInfo createBacklinksTaskResolveInfo() {
diff --git a/packages/SystemUI/tests/src/com/android/systemui/screenshot/policy/PolicyRequestProcessorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/screenshot/policy/PolicyRequestProcessorTest.kt
index 3b0e194ce223..bab9bbbfde4f 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/screenshot/policy/PolicyRequestProcessorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/screenshot/policy/PolicyRequestProcessorTest.kt
@@ -16,13 +16,13 @@
package com.android.systemui.screenshot.policy
import android.content.ComponentName
-import androidx.test.ext.junit.runners.AndroidJUnit4
import android.graphics.Insets
import android.graphics.Rect
import android.os.UserHandle
import android.view.Display.DEFAULT_DISPLAY
import android.view.WindowManager.ScreenshotSource.SCREENSHOT_KEY_CHORD
import android.view.WindowManager.TAKE_SCREENSHOT_FULLSCREEN
+import androidx.test.ext.junit.runners.AndroidJUnit4
import com.android.systemui.screenshot.ImageCapture
import com.android.systemui.screenshot.ScreenshotData
import com.android.systemui.screenshot.data.model.DisplayContentScenarios.ActivityNames.FILES
@@ -40,20 +40,23 @@ import org.junit.runner.RunWith
@RunWith(AndroidJUnit4::class)
class PolicyRequestProcessorTest {
- val imageCapture = object : ImageCapture {
- override fun captureDisplay(displayId: Int, crop: Rect?) = null
- override suspend fun captureTask(taskId: Int) = null
- }
+ val imageCapture =
+ object : ImageCapture {
+ override fun captureDisplay(displayId: Int, crop: Rect?) = null
+
+ override suspend fun captureTask(taskId: Int) = null
+ }
/** Tests behavior when no policies are applied */
@Test
fun testProcess_defaultOwner_whenNoPolicyApplied() {
val fullScreenWork = DisplayContentRepository {
- singleFullScreen(TaskSpec(taskId = 1001, name = FILES, userId = WORK))
+ singleFullScreen(TaskSpec(taskId = TASK_ID, name = FILES, userId = WORK))
}
val request =
- ScreenshotData(TAKE_SCREENSHOT_FULLSCREEN,
+ ScreenshotData(
+ TAKE_SCREENSHOT_FULLSCREEN,
SCREENSHOT_KEY_CHORD,
null,
topComponent = null,
@@ -61,24 +64,34 @@ class PolicyRequestProcessorTest {
taskId = -1,
insets = Insets.NONE,
bitmap = null,
- displayId = DEFAULT_DISPLAY)
+ displayId = DEFAULT_DISPLAY
+ )
/* Create a policy request processor with no capture policies */
val requestProcessor =
- PolicyRequestProcessor(Dispatchers.Unconfined,
+ PolicyRequestProcessor(
+ Dispatchers.Unconfined,
imageCapture,
policies = emptyList(),
defaultOwner = UserHandle.of(PERSONAL),
defaultComponent = ComponentName("default", "Component"),
- displayTasks = fullScreenWork)
+ displayTasks = fullScreenWork
+ )
val result = runBlocking { requestProcessor.process(request) }
- assertWithMessage(
- "With no policy, the screenshot should be assigned to the default user"
- ).that(result.userHandle).isEqualTo(UserHandle.of(PERSONAL))
+ assertWithMessage("With no policy, the screenshot should be assigned to the default user")
+ .that(result.userHandle)
+ .isEqualTo(UserHandle.of(PERSONAL))
+
+ assertWithMessage("The topComponent of the screenshot")
+ .that(result.topComponent)
+ .isEqualTo(ComponentName.unflattenFromString(FILES))
+
+ assertWithMessage("Task ID").that(result.taskId).isEqualTo(TASK_ID)
+ }
- assertWithMessage("The topComponent of the screenshot").that(result.topComponent)
- .isEqualTo(ComponentName.unflattenFromString(FILES))
+ companion object {
+ const val TASK_ID = 1001
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/GlanceableHubContainerControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/shade/GlanceableHubContainerControllerTest.kt
index 169511f827ef..967df39c9269 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shade/GlanceableHubContainerControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/shade/GlanceableHubContainerControllerTest.kt
@@ -48,7 +48,12 @@ import com.android.systemui.communal.ui.compose.CommunalContent
import com.android.systemui.communal.ui.viewmodel.CommunalViewModel
import com.android.systemui.communal.util.CommunalColors
import com.android.systemui.coroutines.collectLastValue
+import com.android.systemui.keyguard.data.repository.fakeKeyguardTransitionRepository
import com.android.systemui.keyguard.domain.interactor.keyguardInteractor
+import com.android.systemui.keyguard.domain.interactor.keyguardTransitionInteractor
+import com.android.systemui.keyguard.shared.model.KeyguardState
+import com.android.systemui.keyguard.shared.model.TransitionState
+import com.android.systemui.keyguard.shared.model.TransitionStep
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.kosmos.testDispatcher
import com.android.systemui.kosmos.testScope
@@ -67,13 +72,13 @@ import org.junit.Assert.assertThrows
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
-import org.mockito.ArgumentMatchers.anyFloat
-import org.mockito.Mock
-import org.mockito.Mockito.`when`
-import org.mockito.MockitoAnnotations
+import org.mockito.kotlin.any
import org.mockito.kotlin.doReturn
import org.mockito.kotlin.mock
+import org.mockito.kotlin.never
import org.mockito.kotlin.spy
+import org.mockito.kotlin.verify
+import org.mockito.kotlin.whenever
@ExperimentalCoroutinesApi
@RunWith(AndroidTestingRunner::class)
@@ -87,11 +92,11 @@ class GlanceableHubContainerControllerTest : SysuiTestCase() {
testDispatcher = UnconfinedTestDispatcher()
}
- @Mock private lateinit var communalViewModel: CommunalViewModel
- @Mock private lateinit var powerManager: PowerManager
- @Mock private lateinit var touchMonitor: TouchMonitor
- @Mock private lateinit var communalColors: CommunalColors
- @Mock private lateinit var communalContent: CommunalContent
+ private var communalViewModel = mock<CommunalViewModel>()
+ private var powerManager = mock<PowerManager>()
+ private var touchMonitor = mock<TouchMonitor>()
+ private var communalColors = mock<CommunalColors>()
+ private var communalContent = mock<CommunalContent>()
private lateinit var ambientTouchComponentFactory: AmbientTouchComponent.Factory
private lateinit var parentView: FrameLayout
@@ -103,8 +108,6 @@ class GlanceableHubContainerControllerTest : SysuiTestCase() {
@Before
fun setUp() {
- MockitoAnnotations.initMocks(this)
-
communalRepository = kosmos.fakeCommunalSceneRepository
ambientTouchComponentFactory =
@@ -124,6 +127,7 @@ class GlanceableHubContainerControllerTest : SysuiTestCase() {
communalInteractor,
communalViewModel,
keyguardInteractor,
+ kosmos.keyguardTransitionInteractor,
shadeInteractor,
powerManager,
communalColors,
@@ -167,6 +171,7 @@ class GlanceableHubContainerControllerTest : SysuiTestCase() {
communalInteractor,
communalViewModel,
keyguardInteractor,
+ kosmos.keyguardTransitionInteractor,
shadeInteractor,
powerManager,
communalColors,
@@ -192,6 +197,7 @@ class GlanceableHubContainerControllerTest : SysuiTestCase() {
communalInteractor,
communalViewModel,
keyguardInteractor,
+ kosmos.keyguardTransitionInteractor,
shadeInteractor,
powerManager,
communalColors,
@@ -212,6 +218,7 @@ class GlanceableHubContainerControllerTest : SysuiTestCase() {
communalInteractor,
communalViewModel,
keyguardInteractor,
+ kosmos.keyguardTransitionInteractor,
shadeInteractor,
powerManager,
communalColors,
@@ -235,12 +242,15 @@ class GlanceableHubContainerControllerTest : SysuiTestCase() {
}
@Test
- fun lifecycle_resumedAfterCommunalShows() {
- // Communal is open.
- goToScene(CommunalScenes.Communal)
+ fun lifecycle_resumedAfterCommunalShows() =
+ with(kosmos) {
+ testScope.runTest {
+ // Communal is open.
+ goToScene(CommunalScenes.Communal)
- assertThat(underTest.lifecycle.currentState).isEqualTo(Lifecycle.State.RESUMED)
- }
+ assertThat(underTest.lifecycle.currentState).isEqualTo(Lifecycle.State.RESUMED)
+ }
+ }
@Test
fun lifecycle_startedAfterCommunalCloses() =
@@ -289,6 +299,43 @@ class GlanceableHubContainerControllerTest : SysuiTestCase() {
}
@Test
+ fun lifecycle_startedWhenEditActivityShowing() =
+ with(kosmos) {
+ testScope.runTest {
+ // Communal is open.
+ goToScene(CommunalScenes.Communal)
+
+ // Edit activity is showing.
+ communalInteractor.setEditActivityShowing(true)
+ testableLooper.processAllMessages()
+
+ assertThat(underTest.lifecycle.currentState).isEqualTo(Lifecycle.State.STARTED)
+ }
+ }
+
+ @Test
+ fun lifecycle_startedWhenEditModeTransitionStarted() =
+ with(kosmos) {
+ testScope.runTest {
+ // Communal is open.
+ goToScene(CommunalScenes.Communal)
+
+ // Leaving edit mode to return to the hub.
+ fakeKeyguardTransitionRepository.sendTransitionStep(
+ TransitionStep(
+ from = KeyguardState.GONE,
+ to = KeyguardState.GLANCEABLE_HUB,
+ value = 1.0f,
+ transitionState = TransitionState.RUNNING
+ )
+ )
+ testableLooper.processAllMessages()
+
+ assertThat(underTest.lifecycle.currentState).isEqualTo(Lifecycle.State.STARTED)
+ }
+ }
+
+ @Test
fun lifecycle_createdAfterDisposeView() {
// Container view disposed.
underTest.disposeView()
@@ -312,6 +359,59 @@ class GlanceableHubContainerControllerTest : SysuiTestCase() {
}
@Test
+ fun lifecycle_doesNotResumeOnUserInteractivityOnceExpanded() =
+ with(kosmos) {
+ testScope.runTest {
+ // Communal is open.
+ goToScene(CommunalScenes.Communal)
+
+ // Shade shows up.
+ shadeTestUtil.setShadeExpansion(1.0f)
+ testableLooper.processAllMessages()
+ underTest.onTouchEvent(DOWN_EVENT)
+ testableLooper.processAllMessages()
+
+ assertThat(underTest.lifecycle.currentState).isEqualTo(Lifecycle.State.STARTED)
+
+ // Shade starts collapsing.
+ shadeTestUtil.setShadeExpansion(.5f)
+ testableLooper.processAllMessages()
+ underTest.onTouchEvent(DOWN_EVENT)
+ testableLooper.processAllMessages()
+
+ assertThat(underTest.lifecycle.currentState).isEqualTo(Lifecycle.State.STARTED)
+
+ // Shade fully collpase, and then expand should with touch interaction should now
+ // be resumed.
+ shadeTestUtil.setShadeExpansion(0f)
+ testableLooper.processAllMessages()
+ shadeTestUtil.setShadeExpansion(.5f)
+ testableLooper.processAllMessages()
+ underTest.onTouchEvent(DOWN_EVENT)
+ testableLooper.processAllMessages()
+
+ assertThat(underTest.lifecycle.currentState).isEqualTo(Lifecycle.State.RESUMED)
+ }
+ }
+
+ @Test
+ fun touchHandling_moveEventProcessedAfterCancel() =
+ with(kosmos) {
+ testScope.runTest {
+ // Communal is open.
+ goToScene(CommunalScenes.Communal)
+
+ // Shade shows up.
+ shadeTestUtil.setQsExpansion(0.5f)
+ testableLooper.processAllMessages()
+ assertThat(underTest.onTouchEvent(DOWN_EVENT)).isTrue()
+ assertThat(underTest.onTouchEvent(CANCEL_EVENT)).isTrue()
+ assertThat(underTest.onTouchEvent(UP_EVENT)).isFalse()
+ assertThat(underTest.onTouchEvent(MOVE_EVENT)).isTrue()
+ }
+ }
+
+ @Test
fun editMode_communalAvailable() =
with(kosmos) {
testScope.runTest {
@@ -433,10 +533,10 @@ class GlanceableHubContainerControllerTest : SysuiTestCase() {
testScope.runTest {
// Communal is closed.
goToScene(CommunalScenes.Blank)
- `when`(
+ whenever(
notificationStackScrollLayoutController.isBelowLastNotification(
- anyFloat(),
- anyFloat()
+ any(),
+ any()
)
)
.thenReturn(false)
@@ -444,6 +544,62 @@ class GlanceableHubContainerControllerTest : SysuiTestCase() {
}
}
+ @Test
+ fun onTouchEvent_hubOpen_touchesDispatched() =
+ with(kosmos) {
+ testScope.runTest {
+ // Communal is open.
+ goToScene(CommunalScenes.Communal)
+
+ // Touch event is sent to the container view.
+ assertThat(underTest.onTouchEvent(DOWN_EVENT)).isTrue()
+ verify(containerView).onTouchEvent(any())
+ }
+ }
+
+ @Test
+ fun onTouchEvent_editActivityShowing_touchesConsumedButNotDispatched() =
+ with(kosmos) {
+ testScope.runTest {
+ // Communal is open.
+ goToScene(CommunalScenes.Communal)
+
+ // Transitioning to or from edit mode.
+ communalInteractor.setEditActivityShowing(true)
+ testableLooper.processAllMessages()
+
+ // onTouchEvent returns true to consume the touch, but it is not sent to the
+ // container view.
+ assertThat(underTest.onTouchEvent(DOWN_EVENT)).isTrue()
+ verify(containerView, never()).onTouchEvent(any())
+ }
+ }
+
+ @Test
+ fun onTouchEvent_editModeTransitionStarted_touchesConsumedButNotDispatched() =
+ with(kosmos) {
+ testScope.runTest {
+ // Communal is open.
+ goToScene(CommunalScenes.Communal)
+
+ // Leaving edit mode to return to the hub.
+ fakeKeyguardTransitionRepository.sendTransitionStep(
+ TransitionStep(
+ from = KeyguardState.GONE,
+ to = KeyguardState.GLANCEABLE_HUB,
+ value = 1.0f,
+ transitionState = TransitionState.RUNNING
+ )
+ )
+ testableLooper.processAllMessages()
+
+ // onTouchEvent returns true to consume the touch, but it is not sent to the
+ // container view.
+ assertThat(underTest.onTouchEvent(DOWN_EVENT)).isTrue()
+ verify(containerView, never()).onTouchEvent(any())
+ }
+ }
+
private fun initAndAttachContainerView() {
val mockInsets =
mock<WindowInsets> {
@@ -462,8 +618,21 @@ class GlanceableHubContainerControllerTest : SysuiTestCase() {
testableLooper.processAllMessages()
}
- private fun goToScene(scene: SceneKey) {
+ private suspend fun goToScene(scene: SceneKey) {
communalRepository.changeScene(scene)
+ if (scene == CommunalScenes.Communal) {
+ kosmos.fakeKeyguardTransitionRepository.sendTransitionSteps(
+ from = KeyguardState.LOCKSCREEN,
+ to = KeyguardState.GLANCEABLE_HUB,
+ kosmos.testScope
+ )
+ } else {
+ kosmos.fakeKeyguardTransitionRepository.sendTransitionSteps(
+ from = KeyguardState.GLANCEABLE_HUB,
+ to = KeyguardState.LOCKSCREEN,
+ kosmos.testScope
+ )
+ }
testableLooper.processAllMessages()
}
@@ -488,5 +657,35 @@ class GlanceableHubContainerControllerTest : SysuiTestCase() {
CONTAINER_HEIGHT.toFloat() / 2,
0
)
+
+ private val CANCEL_EVENT =
+ MotionEvent.obtain(
+ 0L,
+ 0L,
+ MotionEvent.ACTION_CANCEL,
+ CONTAINER_WIDTH.toFloat() / 2,
+ CONTAINER_HEIGHT.toFloat() / 2,
+ 0
+ )
+
+ private val MOVE_EVENT =
+ MotionEvent.obtain(
+ 0L,
+ 0L,
+ MotionEvent.ACTION_MOVE,
+ CONTAINER_WIDTH.toFloat() / 2,
+ CONTAINER_HEIGHT.toFloat() / 2,
+ 0
+ )
+
+ private val UP_EVENT =
+ MotionEvent.obtain(
+ 0L,
+ 0L,
+ MotionEvent.ACTION_UP,
+ CONTAINER_WIDTH.toFloat() / 2,
+ CONTAINER_HEIGHT.toFloat() / 2,
+ 0
+ )
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerBaseTest.java b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerBaseTest.java
index b80d1a472a72..a5c4bcd46a1f 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerBaseTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerBaseTest.java
@@ -18,7 +18,6 @@ package com.android.systemui.shade;
import static android.content.res.Configuration.ORIENTATION_PORTRAIT;
-import static com.android.keyguard.KeyguardClockSwitch.LARGE;
import static com.android.systemui.log.LogBufferHelperKt.logcatLogBuffer;
import static com.google.common.truth.Truth.assertThat;
@@ -404,7 +403,6 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase {
mFeatureFlags.set(Flags.QS_USER_DETAIL_SHORTCUT, false);
mSetFlagsRule.disableFlags(com.android.systemui.Flags.FLAG_KEYGUARD_BOTTOM_AREA_REFACTOR);
- mSetFlagsRule.disableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT);
mSetFlagsRule.disableFlags(com.android.systemui.Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR);
mMainDispatcher = getMainDispatcher();
@@ -677,8 +675,14 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase {
mMainHandler = new Handler(Looper.getMainLooper());
+ LongPressHandlingView longPressHandlingView = mock(LongPressHandlingView.class);
when(mView.requireViewById(R.id.keyguard_long_press))
- .thenReturn(mock(LongPressHandlingView.class));
+ .thenReturn(longPressHandlingView);
+
+ Resources longPressHandlingViewRes = mock(Resources.class);
+ when(longPressHandlingView.getResources()).thenReturn(longPressHandlingViewRes);
+ when(longPressHandlingViewRes.getString(anyInt())).thenReturn("");
+
mHeadsUpNotificationInteractor =
new HeadsUpNotificationInteractor(mFakeHeadsUpNotificationRepository,
@@ -801,7 +805,6 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase {
.setHeadsUpAppearanceController(mock(HeadsUpAppearanceController.class));
verify(mNotificationStackScrollLayoutController)
.setOnEmptySpaceClickListener(mEmptySpaceClickListenerCaptor.capture());
- verify(mKeyguardStatusViewController).displayClock(LARGE, /* animate */ true);
reset(mKeyguardStatusViewController);
when(mNotificationPanelViewControllerLazy.get())
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerTest.java
index 90e8ea5f34c4..905cc4cd13b2 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerTest.java
@@ -92,6 +92,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
* When the Back gesture starts (progress 0%), the scrim will stay at 100% scale (1.0f).
*/
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void testBackGesture_min_scrimAtMaxScale() {
mNotificationPanelViewController.onBackProgressed(0.0f);
verify(mScrimController).applyBackScaling(1.0f);
@@ -101,6 +102,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
* When the Back gesture is at max (progress 100%), the scrim will be scaled to its minimum.
*/
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void testBackGesture_max_scrimAtMinScale() {
mNotificationPanelViewController.onBackProgressed(1.0f);
verify(mScrimController).applyBackScaling(
@@ -108,6 +110,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void onNotificationHeightChangeWhileOnKeyguardWillComputeMaxKeyguardNotifications() {
mStatusBarStateController.setState(KEYGUARD);
ArgumentCaptor<OnHeightChangedListener> captor =
@@ -124,6 +127,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void onNotificationHeightChangeWhileInShadeWillNotComputeMaxKeyguardNotifications() {
mStatusBarStateController.setState(SHADE);
ArgumentCaptor<OnHeightChangedListener> captor =
@@ -140,6 +144,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void computeMaxKeyguardNotifications_lockscreenToShade_returnsExistingMax() {
when(mAmbientState.getFractionToShade()).thenReturn(0.5f);
mNotificationPanelViewController.setMaxDisplayedNotifications(-1);
@@ -150,6 +155,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void computeMaxKeyguardNotifications_noTransition_updatesMax() {
when(mAmbientState.getFractionToShade()).thenReturn(0f);
mNotificationPanelViewController.setMaxDisplayedNotifications(-1);
@@ -196,6 +202,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void getVerticalSpaceForLockscreenShelf_useLockIconBottomPadding_returnsShelfHeight() {
enableSplitShade(/* enabled= */ false);
setBottomPadding(/* stackScrollLayoutBottom= */ 100,
@@ -213,6 +220,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void getVerticalSpaceForLockscreenShelf_useIndicationBottomPadding_returnsZero() {
enableSplitShade(/* enabled= */ false);
setBottomPadding(/* stackScrollLayoutBottom= */ 100,
@@ -230,6 +238,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void getVerticalSpaceForLockscreenShelf_useAmbientBottomPadding_returnsZero() {
enableSplitShade(/* enabled= */ false);
setBottomPadding(/* stackScrollLayoutBottom= */ 100,
@@ -247,6 +256,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void getVerticalSpaceForLockscreenShelf_useLockIconPadding_returnsLessThanShelfHeight() {
enableSplitShade(/* enabled= */ false);
setBottomPadding(/* stackScrollLayoutBottom= */ 100,
@@ -264,6 +274,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void getVerticalSpaceForLockscreenShelf_splitShade() {
enableSplitShade(/* enabled= */ true);
setBottomPadding(/* stackScrollLayoutBottom= */ 100,
@@ -281,6 +292,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void testSetPanelScrimMinFractionWhenHeadsUpIsDragged() {
mNotificationPanelViewController.setHeadsUpDraggingStartingHeight(
mNotificationPanelViewController.getMaxPanelHeight() / 2);
@@ -288,6 +300,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void testSetDozing_notifiesNsslAndStateController() {
mNotificationPanelViewController.setDozing(true /* dozing */, false /* animate */);
verify(mNotificationStackScrollLayoutController).setDozing(eq(true), eq(false));
@@ -295,6 +308,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void testOnDozeAmountChanged_positionClockAndNotificationsUsesUdfpsLocation() {
// GIVEN UDFPS is enrolled and we're on the keyguard
final Point udfpsLocationCenter = new Point(0, 100);
@@ -332,12 +346,14 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void testSetExpandedHeight() {
mNotificationPanelViewController.setExpandedHeight(200);
assertThat((int) mNotificationPanelViewController.getExpandedHeight()).isEqualTo(200);
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void testOnTouchEvent_expansionCanBeBlocked() {
onTouchEvent(MotionEvent.obtain(0L, 0L, MotionEvent.ACTION_DOWN, 0f, 0f, 0));
onTouchEvent(MotionEvent.obtain(0L, 0L, MotionEvent.ACTION_MOVE, 0f, 200f, 0));
@@ -350,6 +366,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void test_pulsing_onTouchEvent_noTracking() {
// GIVEN device is pulsing
mNotificationPanelViewController.setPulsing(true);
@@ -367,6 +384,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void alternateBouncerVisible_onTouchEvent_notHandled() {
mSetFlagsRule.enableFlags(com.android.systemui.Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR);
// GIVEN alternate bouncer is visible
@@ -385,6 +403,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void test_onTouchEvent_startTracking() {
// GIVEN device is NOT pulsing
mNotificationPanelViewController.setPulsing(false);
@@ -402,9 +421,8 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void onInterceptTouchEvent_nsslMigrationOff_userActivity() {
- mSetFlagsRule.disableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT);
-
mTouchHandler.onInterceptTouchEvent(MotionEvent.obtain(0L /* downTime */,
0L /* eventTime */, MotionEvent.ACTION_DOWN, 0f /* x */, 0f /* y */,
0 /* metaState */));
@@ -413,9 +431,8 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @EnableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void onInterceptTouchEvent_nsslMigrationOn_userActivity_not_called() {
- mSetFlagsRule.enableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT);
-
mTouchHandler.onInterceptTouchEvent(MotionEvent.obtain(0L /* downTime */,
0L /* eventTime */, MotionEvent.ACTION_DOWN, 0f /* x */, 0f /* y */,
0 /* metaState */));
@@ -424,6 +441,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void testOnTouchEvent_expansionResumesAfterBriefTouch() {
mFalsingManager.setIsClassifierEnabled(true);
mFalsingManager.setIsFalseTouch(false);
@@ -460,6 +478,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void testA11y_initializeNode() {
AccessibilityNodeInfo nodeInfo = new AccessibilityNodeInfo();
mAccessibilityDelegate.onInitializeAccessibilityNodeInfo(mView, nodeInfo);
@@ -473,6 +492,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void testA11y_scrollForward() {
mAccessibilityDelegate.performAccessibilityAction(
mView,
@@ -483,6 +503,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void testA11y_scrollUp() {
mAccessibilityDelegate.performAccessibilityAction(
mView,
@@ -493,6 +514,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void testKeyguardStatusViewInSplitShade_changesConstraintsDependingOnNotifications() {
mStatusBarStateController.setState(KEYGUARD);
enableSplitShade(/* enabled= */ true);
@@ -511,6 +533,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void keyguardStatusView_splitShade_dozing_alwaysDozingOn_isCentered() {
when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(2);
when(mActiveNotificationsInteractor.getAreAnyNotificationsPresentValue()).thenReturn(true);
@@ -523,6 +546,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void keyguardStatusView_splitShade_dozing_alwaysDozingOff_isNotCentered() {
when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(2);
when(mActiveNotificationsInteractor.getAreAnyNotificationsPresentValue()).thenReturn(true);
@@ -535,6 +559,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void keyguardStatusView_splitShade_notDozing_alwaysDozingOn_isNotCentered() {
when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(2);
when(mActiveNotificationsInteractor.getAreAnyNotificationsPresentValue()).thenReturn(true);
@@ -547,6 +572,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void keyguardStatusView_splitShade_pulsing_isNotCentered() {
when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(2);
when(mActiveNotificationsInteractor.getAreAnyNotificationsPresentValue()).thenReturn(true);
@@ -560,6 +586,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void keyguardStatusView_splitShade_notPulsing_isNotCentered() {
when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(2);
when(mActiveNotificationsInteractor.getAreAnyNotificationsPresentValue()).thenReturn(true);
@@ -573,6 +600,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void keyguardStatusView_singleShade_isCentered() {
enableSplitShade(/* enabled= */ false);
// The conditions below would make the clock NOT be centered on split shade.
@@ -587,6 +615,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void keyguardStatusView_willPlayDelayedDoze_isCentered_thenNot() {
when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(2);
when(mActiveNotificationsInteractor.getAreAnyNotificationsPresentValue()).thenReturn(true);
@@ -602,6 +631,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void keyguardStatusView_willPlayDelayedDoze_notifiesKeyguardMediaController() {
when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(2);
when(mActiveNotificationsInteractor.getAreAnyNotificationsPresentValue()).thenReturn(true);
@@ -614,6 +644,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void keyguardStatusView_willPlayDelayedDoze_isCentered_thenStillCenteredIfNoNotifs() {
when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(0);
when(mActiveNotificationsInteractor.getAreAnyNotificationsPresentValue()).thenReturn(false);
@@ -629,6 +660,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void onKeyguardStatusViewHeightChange_animatesNextTopPaddingChangeForNSSL() {
ArgumentCaptor<View.OnLayoutChangeListener> captor =
ArgumentCaptor.forClass(View.OnLayoutChangeListener.class);
@@ -646,6 +678,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void testCanCollapsePanelOnTouch_trueForKeyGuard() {
mStatusBarStateController.setState(KEYGUARD);
@@ -653,6 +686,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void testCanCollapsePanelOnTouch_trueWhenScrolledToBottom() {
mStatusBarStateController.setState(SHADE);
when(mNotificationStackScrollLayoutController.isScrolledToBottom()).thenReturn(true);
@@ -661,6 +695,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void testCanCollapsePanelOnTouch_trueWhenInSettings() {
mStatusBarStateController.setState(SHADE);
when(mQsController.getExpanded()).thenReturn(true);
@@ -669,6 +704,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void testCanCollapsePanelOnTouch_falseInDualPaneShade() {
mStatusBarStateController.setState(SHADE);
enableSplitShade(/* enabled= */ true);
@@ -695,6 +731,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void testCancelSwipeWhileLocked_notifiesKeyguardState() {
mStatusBarStateController.setState(KEYGUARD);
@@ -707,6 +744,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void testSwipe_exactlyToTarget_notifiesNssl() {
// No over-expansion
mNotificationPanelViewController.setOverExpansion(0f);
@@ -722,6 +760,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void testRotatingToSplitShadeWithQsExpanded_transitionsToShadeLocked() {
mStatusBarStateController.setState(KEYGUARD);
when(mQsController.getExpanded()).thenReturn(true);
@@ -732,6 +771,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void testUnlockedSplitShadeTransitioningToKeyguard_closesQS() {
enableSplitShade(true);
mStatusBarStateController.setState(SHADE);
@@ -741,6 +781,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void testLockedSplitShadeTransitioningToKeyguard_closesQS() {
enableSplitShade(true);
mStatusBarStateController.setState(SHADE_LOCKED);
@@ -750,6 +791,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void testSwitchesToCorrectClockInSinglePaneShade() {
mStatusBarStateController.setState(KEYGUARD);
@@ -765,6 +807,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void testSwitchesToCorrectClockInSplitShade() {
mStatusBarStateController.setState(KEYGUARD);
enableSplitShade(/* enabled= */ true);
@@ -785,6 +828,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void testHasNotifications_switchesToLargeClockWhenEnteringSplitShade() {
mStatusBarStateController.setState(KEYGUARD);
when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(1);
@@ -796,6 +840,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void testNoNotifications_switchesToLargeClockWhenEnteringSplitShade() {
mStatusBarStateController.setState(KEYGUARD);
when(mNotificationStackScrollLayoutController.getVisibleNotificationCount()).thenReturn(0);
@@ -807,6 +852,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void testHasNotifications_switchesToSmallClockWhenExitingSplitShade() {
mStatusBarStateController.setState(KEYGUARD);
enableSplitShade(/* enabled= */ true);
@@ -820,6 +866,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void testNoNotifications_switchesToLargeClockWhenExitingSplitShade() {
mStatusBarStateController.setState(KEYGUARD);
enableSplitShade(/* enabled= */ true);
@@ -833,6 +880,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void clockSize_mediaShowing_inSplitShade_onAod_isLarge() {
when(mDozeParameters.getAlwaysOn()).thenReturn(true);
mStatusBarStateController.setState(KEYGUARD);
@@ -848,6 +896,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void clockSize_mediaShowing_inSplitShade_screenOff_notAod_isSmall() {
when(mDozeParameters.getAlwaysOn()).thenReturn(false);
mStatusBarStateController.setState(KEYGUARD);
@@ -863,6 +912,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void onQsSetExpansionHeightCalled_qsFullyExpandedOnKeyguard_showNSSL() {
// GIVEN
mStatusBarStateController.setState(KEYGUARD);
@@ -883,6 +933,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void onQsSetExpansionHeightCalled_qsFullyExpandedOnKeyguard_hideNSSL() {
// GIVEN
mStatusBarStateController.setState(KEYGUARD);
@@ -904,6 +955,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void testSwitchesToBigClockInSplitShadeOnAodAnimateDisabled() {
when(mScreenOffAnimationController.shouldAnimateClockChange()).thenReturn(false);
mStatusBarStateController.setState(KEYGUARD);
@@ -919,6 +971,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void switchesToBigClockInSplitShadeOn_landFlagOn_ForceSmallClock() {
when(mScreenOffAnimationController.shouldAnimateClockChange()).thenReturn(false);
mStatusBarStateController.setState(KEYGUARD);
@@ -938,6 +991,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void switchesToBigClockInSplitShadeOn_landFlagOff_DontForceSmallClock() {
when(mScreenOffAnimationController.shouldAnimateClockChange()).thenReturn(false);
mStatusBarStateController.setState(KEYGUARD);
@@ -957,6 +1011,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void testDisplaysSmallClockOnLockscreenInSplitShadeWhenMediaIsPlaying() {
mStatusBarStateController.setState(KEYGUARD);
enableSplitShade(/* enabled= */ true);
@@ -978,6 +1033,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void testFoldToAodAnimationCleansupInAnimationEnd() {
ArgumentCaptor<Animator.AnimatorListener> animCaptor =
ArgumentCaptor.forClass(Animator.AnimatorListener.class);
@@ -997,6 +1053,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void testExpandWithQsMethodIsUsingLockscreenTransitionController() {
enableSplitShade(/* enabled= */ true);
mStatusBarStateController.setState(KEYGUARD);
@@ -1008,6 +1065,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void setKeyguardStatusBarAlpha_setsAlphaOnKeyguardStatusBarController() {
float statusBarAlpha = 0.5f;
@@ -1017,6 +1075,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void testQsToBeImmediatelyExpandedWhenOpeningPanelInSplitShade() {
enableSplitShade(/* enabled= */ true);
mShadeExpansionStateManager.updateState(STATE_OPEN);
@@ -1030,6 +1089,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void testQsNotToBeImmediatelyExpandedWhenGoingFromUnlockedToLocked() {
enableSplitShade(/* enabled= */ true);
mShadeExpansionStateManager.updateState(STATE_CLOSED);
@@ -1042,6 +1102,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void testQsImmediateResetsWhenPanelOpensOrCloses() {
mShadeExpansionStateManager.updateState(STATE_OPEN);
mShadeExpansionStateManager.updateState(STATE_CLOSED);
@@ -1049,6 +1110,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void testQsExpansionChangedToDefaultWhenRotatingFromOrToSplitShade() {
when(mCommandQueue.panelsEnabled()).thenReturn(true);
@@ -1065,6 +1127,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void testPanelClosedWhenClosingQsInSplitShade() {
mShadeExpansionStateManager.onPanelExpansionChanged(/* fraction= */ 1,
/* expanded= */ true, /* tracking= */ false);
@@ -1078,6 +1141,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void getMaxPanelTransitionDistance_expanding_inSplitShade_returnsSplitShadeFullTransitionDistance() {
enableSplitShade(true);
mNotificationPanelViewController.expandToQs();
@@ -1088,6 +1152,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void isExpandingOrCollapsing_returnsTrue_whenQsLockscreenDragInProgress() {
when(mQsController.getLockscreenShadeDragProgress()).thenReturn(0.5f);
assertThat(mNotificationPanelViewController.isExpandingOrCollapsing()).isTrue();
@@ -1095,6 +1160,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void getMaxPanelTransitionDistance_inSplitShade_withHeadsUp_returnsBiggerValue() {
enableSplitShade(true);
mNotificationPanelViewController.expandToQs();
@@ -1111,6 +1177,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void getMaxPanelTransitionDistance_expandingSplitShade_keyguard_returnsNonSplitShadeValue() {
mStatusBarStateController.setState(KEYGUARD);
enableSplitShade(true);
@@ -1122,6 +1189,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void getMaxPanelTransitionDistance_expanding_notSplitShade_returnsNonSplitShadeValue() {
enableSplitShade(false);
mNotificationPanelViewController.expandToQs();
@@ -1132,6 +1200,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void onLayoutChange_fullWidth_updatesQSWithFullWithTrue() {
setIsFullWidth(true);
@@ -1139,6 +1208,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void onLayoutChange_notFullWidth_updatesQSWithFullWithFalse() {
setIsFullWidth(false);
@@ -1146,6 +1216,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void onLayoutChange_qsNotSet_doesNotCrash() {
mQuickSettingsController.setQs(null);
@@ -1153,6 +1224,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void onEmptySpaceClicked_notDozingAndOnKeyguard_requestsFaceAuth() {
StatusBarStateController.StateListener statusBarStateListener =
mNotificationPanelViewController.getStatusBarStateListener();
@@ -1167,8 +1239,8 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @EnableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void nsslFlagEnabled_allowOnlyExternalTouches() {
- mSetFlagsRule.enableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT);
// This sets the dozing state that is read when onMiddleClicked is eventually invoked.
mTouchHandler.onTouch(mock(View.class), mDownMotionEvent);
@@ -1179,6 +1251,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void onSplitShadeChanged_duringShadeExpansion_resetsOverScrollState() {
// There was a bug where there was left-over overscroll state after going from split shade
// to single shade.
@@ -1200,6 +1273,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void onSplitShadeChanged_alwaysResetsOverScrollState() {
enableSplitShade(true);
enableSplitShade(false);
@@ -1217,6 +1291,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
* to ensure scrollY can be correctly set to be 0
*/
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void onShadeFlingClosingEnd_mAmbientStateSetClose_thenOnExpansionStopped() {
// Given: Shade is expanded
mNotificationPanelViewController.notifyExpandingFinished();
@@ -1237,6 +1312,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void onShadeFlingEnd_mExpandImmediateShouldBeReset() {
mNotificationPanelViewController.onFlingEnd(false);
@@ -1244,6 +1320,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void inUnlockedSplitShade_transitioningMaxTransitionDistance_makesShadeFullyExpanded() {
mStatusBarStateController.setState(SHADE);
enableSplitShade(true);
@@ -1253,6 +1330,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void shadeFullyExpanded_inShadeState() {
mStatusBarStateController.setState(SHADE);
@@ -1265,6 +1343,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void shadeFullyExpanded_onKeyguard() {
mStatusBarStateController.setState(KEYGUARD);
@@ -1274,12 +1353,14 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void shadeFullyExpanded_onShadeLocked() {
mStatusBarStateController.setState(SHADE_LOCKED);
assertThat(mNotificationPanelViewController.isShadeFullyExpanded()).isTrue();
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void shadeExpanded_whenHasHeight() {
int transitionDistance = mNotificationPanelViewController.getMaxPanelTransitionDistance();
mNotificationPanelViewController.setExpandedHeight(transitionDistance);
@@ -1287,6 +1368,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void shadeExpanded_whenInstantExpanding() {
mNotificationPanelViewController.expand(true);
assertThat(mNotificationPanelViewController.isExpanded()).isTrue();
@@ -1300,12 +1382,14 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void shadeExpanded_whenUnlockedOffscreenAnimationRunning() {
when(mUnlockedScreenOffAnimationController.isAnimationPlaying()).thenReturn(true);
assertThat(mNotificationPanelViewController.isExpanded()).isTrue();
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void shadeExpanded_whenInputFocusTransferStarted() {
when(mCommandQueue.panelsEnabled()).thenReturn(true);
@@ -1315,6 +1399,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void shadeNotExpanded_whenInputFocusTransferStartedButPanelsDisabled() {
when(mCommandQueue.panelsEnabled()).thenReturn(false);
@@ -1324,6 +1409,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void cancelInputFocusTransfer_shadeCollapsed() {
when(mCommandQueue.panelsEnabled()).thenReturn(true);
mNotificationPanelViewController.startInputFocusTransfer();
@@ -1334,6 +1420,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void finishInputFocusTransfer_shadeFlingingOpen() {
when(mCommandQueue.panelsEnabled()).thenReturn(true);
mNotificationPanelViewController.startInputFocusTransfer();
@@ -1344,6 +1431,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void getFalsingThreshold_deviceNotInteractive_isQsThreshold() {
PowerInteractor.Companion.setAsleepForTest(
mPowerInteractor, PowerManager.GO_TO_SLEEP_REASON_POWER_BUTTON);
@@ -1353,6 +1441,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void getFalsingThreshold_lastWakeNotDueToTouch_isQsThreshold() {
PowerInteractor.Companion.setAwakeForTest(
mPowerInteractor, PowerManager.WAKE_REASON_POWER_BUTTON);
@@ -1362,6 +1451,7 @@ public class NotificationPanelViewControllerTest extends NotificationPanelViewCo
}
@Test
+ @DisableFlags(com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void getFalsingThreshold_lastWakeDueToTouch_greaterThanQsThreshold() {
PowerInteractor.Companion.setAwakeForTest(mPowerInteractor, PowerManager.WAKE_REASON_TAP);
when(mQsController.getFalsingThreshold()).thenReturn(14);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerWithCoroutinesTest.kt b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerWithCoroutinesTest.kt
index e1d92e780c2a..64eadb7db1e3 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerWithCoroutinesTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerWithCoroutinesTest.kt
@@ -18,6 +18,7 @@
package com.android.systemui.shade
+import android.platform.test.annotations.DisableFlags
import android.platform.test.annotations.EnableFlags
import android.testing.TestableLooper
import android.view.HapticFeedbackConstants
@@ -27,6 +28,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.internal.util.CollectionUtils
import com.android.keyguard.KeyguardClockSwitch.LARGE
+import com.android.systemui.Flags
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.res.R
import com.android.systemui.statusbar.StatusBarState.KEYGUARD
@@ -34,7 +36,6 @@ import com.android.systemui.statusbar.StatusBarState.SHADE
import com.android.systemui.statusbar.StatusBarState.SHADE_LOCKED
import com.android.systemui.statusbar.notification.data.repository.FakeHeadsUpRowRepository
import com.android.systemui.statusbar.notification.shared.NotificationsHeadsUpRefactor
-import com.android.systemui.statusbar.notification.stack.data.repository.setNotifications
import com.android.systemui.util.mockito.eq
import com.android.systemui.util.mockito.whenever
import com.google.common.truth.Truth.assertThat
@@ -58,6 +59,7 @@ import org.mockito.Mockito.verify
@RunWith(AndroidJUnit4::class)
@TestableLooper.RunWithLooper(setAsMainLooper = true)
@SmallTest
+@DisableFlags(Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
class NotificationPanelViewControllerWithCoroutinesTest :
NotificationPanelViewControllerBaseTest() {
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowViewControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowViewControllerTest.kt
index 74a299910b18..6f2302a22d7b 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowViewControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowViewControllerTest.kt
@@ -17,6 +17,8 @@
package com.android.systemui.shade
import android.content.Context
+import android.platform.test.annotations.DisableFlags
+import android.platform.test.annotations.EnableFlags
import android.platform.test.annotations.RequiresFlagsDisabled
import android.platform.test.flag.junit.FlagsParameterization
import android.testing.TestableLooper
@@ -31,6 +33,7 @@ import com.android.keyguard.KeyguardSecurityContainerController
import com.android.keyguard.LegacyLockIconViewController
import com.android.keyguard.dagger.KeyguardBouncerComponent
import com.android.systemui.Flags
+import com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT
import com.android.systemui.SysuiTestCase
import com.android.systemui.bouncer.domain.interactor.AlternateBouncerInteractor
import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor
@@ -398,8 +401,8 @@ class NotificationShadeWindowViewControllerTest(flags: FlagsParameterization) :
@Test
@DisableSceneContainer
+ @DisableFlags(FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
fun handleDispatchTouchEvent_nsslMigrationOff_userActivity_not_called() {
- mSetFlagsRule.disableFlags(Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
underTest.setStatusBarViewController(phoneStatusBarViewController)
interactionEventHandler.handleDispatchTouchEvent(DOWN_EVENT)
@@ -408,8 +411,8 @@ class NotificationShadeWindowViewControllerTest(flags: FlagsParameterization) :
}
@Test
+ @EnableFlags(FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
fun handleDispatchTouchEvent_nsslMigrationOn_userActivity() {
- enableMigrateClocksFlag()
underTest.setStatusBarViewController(phoneStatusBarViewController)
interactionEventHandler.handleDispatchTouchEvent(DOWN_EVENT)
@@ -440,6 +443,7 @@ class NotificationShadeWindowViewControllerTest(flags: FlagsParameterization) :
}
@Test
+ @EnableFlags(FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
fun shouldInterceptTouchEvent_dozing_touchInLockIconArea_touchNotIntercepted() {
// GIVEN dozing
whenever(sysuiStatusBarStateController.isDozing).thenReturn(true)
@@ -452,13 +456,12 @@ class NotificationShadeWindowViewControllerTest(flags: FlagsParameterization) :
// AND the lock icon wants the touch
whenever(lockIconViewController.willHandleTouchWhileDozing(DOWN_EVENT)).thenReturn(true)
- enableMigrateClocksFlag()
-
// THEN touch should NOT be intercepted by NotificationShade
assertThat(interactionEventHandler.shouldInterceptTouchEvent(DOWN_EVENT)).isFalse()
}
@Test
+ @EnableFlags(FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
fun shouldInterceptTouchEvent_dozing_touchNotInLockIconArea_touchIntercepted() {
// GIVEN dozing
whenever(sysuiStatusBarStateController.isDozing).thenReturn(true)
@@ -471,13 +474,12 @@ class NotificationShadeWindowViewControllerTest(flags: FlagsParameterization) :
whenever(quickSettingsController.shouldQuickSettingsIntercept(any(), any(), any()))
.thenReturn(false)
- enableMigrateClocksFlag()
-
// THEN touch should be intercepted by NotificationShade
assertThat(interactionEventHandler.shouldInterceptTouchEvent(DOWN_EVENT)).isTrue()
}
@Test
+ @EnableFlags(FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
fun shouldInterceptTouchEvent_dozing_touchInStatusBar_touchIntercepted() {
// GIVEN dozing
whenever(sysuiStatusBarStateController.isDozing).thenReturn(true)
@@ -490,13 +492,12 @@ class NotificationShadeWindowViewControllerTest(flags: FlagsParameterization) :
whenever(quickSettingsController.shouldQuickSettingsIntercept(any(), any(), any()))
.thenReturn(true)
- enableMigrateClocksFlag()
-
// THEN touch should be intercepted by NotificationShade
assertThat(interactionEventHandler.shouldInterceptTouchEvent(DOWN_EVENT)).isTrue()
}
@Test
+ @EnableFlags(FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
fun shouldInterceptTouchEvent_dozingAndPulsing_touchIntercepted() {
// GIVEN dozing
whenever(sysuiStatusBarStateController.isDozing).thenReturn(true)
@@ -517,8 +518,6 @@ class NotificationShadeWindowViewControllerTest(flags: FlagsParameterization) :
whenever(shadeViewController.handleExternalInterceptTouch(DOWN_EVENT))
.thenReturn(true)
- enableMigrateClocksFlag()
-
// THEN touch should be intercepted by NotificationShade
assertThat(interactionEventHandler.shouldInterceptTouchEvent(DOWN_EVENT)).isTrue()
}
@@ -652,19 +651,13 @@ class NotificationShadeWindowViewControllerTest(flags: FlagsParameterization) :
}
@Test
+ @EnableFlags(FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
fun cancelCurrentTouch_callsDragDownHelper() {
- enableMigrateClocksFlag()
underTest.cancelCurrentTouch()
verify(dragDownHelper).stopDragging()
}
- private fun enableMigrateClocksFlag() {
- if (!Flags.migrateClocksToBlueprint()) {
- mSetFlagsRule.enableFlags(Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
- }
- }
-
companion object {
private val DOWN_EVENT = MotionEvent.obtain(0L, 0L, MotionEvent.ACTION_DOWN, 0f, 0f, 0)
private val MOVE_EVENT = MotionEvent.obtain(0L, 0L, MotionEvent.ACTION_MOVE, 0f, 0f, 0)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowViewTest.kt b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowViewTest.kt
index fec7424ac006..ca29dd98a637 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowViewTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowViewTest.kt
@@ -16,6 +16,7 @@
package com.android.systemui.shade
import android.os.SystemClock
+import android.platform.test.annotations.DisableFlags
import android.testing.TestableLooper.RunWithLooper
import android.view.MotionEvent
import android.widget.FrameLayout
@@ -208,9 +209,9 @@ class NotificationShadeWindowViewTest : SysuiTestCase() {
}
@Test
+ @DisableFlags(AConfigFlags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
fun testDragDownHelperCalledWhenDraggingDown() =
testScope.runTest {
- mSetFlagsRule.disableFlags(AConfigFlags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
whenever(dragDownHelper.isDraggingDown).thenReturn(true)
val now = SystemClock.elapsedRealtime()
val ev = MotionEvent.obtain(now, now, MotionEvent.ACTION_UP, 0f, 0f, 0 /* meta */)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/data/repository/ShadeRepositoryImplTest.kt b/packages/SystemUI/tests/src/com/android/systemui/shade/data/repository/ShadeRepositoryImplTest.kt
index 97acc6e53cdf..7d4918a30d9c 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shade/data/repository/ShadeRepositoryImplTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/shade/data/repository/ShadeRepositoryImplTest.kt
@@ -19,8 +19,8 @@ package com.android.systemui.shade.data.repository
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
+import com.android.systemui.coroutines.collectLastValue
import com.google.common.truth.Truth.assertThat
-import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.StandardTestDispatcher
import kotlinx.coroutines.test.TestScope
import kotlinx.coroutines.test.runTest
@@ -28,7 +28,6 @@ import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
-@OptIn(ExperimentalCoroutinesApi::class)
@SmallTest
@RunWith(AndroidJUnit4::class)
class ShadeRepositoryImplTest : SysuiTestCase() {
@@ -91,37 +90,37 @@ class ShadeRepositoryImplTest : SysuiTestCase() {
@Test
fun updateLegacyShadeTracking() =
testScope.runTest {
- assertThat(underTest.legacyShadeTracking.value).isEqualTo(false)
+ assertThat(underTest.legacyShadeTracking.value).isFalse()
underTest.setLegacyShadeTracking(true)
- assertThat(underTest.legacyShadeTracking.value).isEqualTo(true)
+ assertThat(underTest.legacyShadeTracking.value).isTrue()
}
@Test
fun updateLegacyLockscreenShadeTracking() =
testScope.runTest {
- assertThat(underTest.legacyLockscreenShadeTracking.value).isEqualTo(false)
+ assertThat(underTest.legacyLockscreenShadeTracking.value).isFalse()
underTest.setLegacyLockscreenShadeTracking(true)
- assertThat(underTest.legacyLockscreenShadeTracking.value).isEqualTo(true)
+ assertThat(underTest.legacyLockscreenShadeTracking.value).isTrue()
}
@Test
fun updateLegacyQsTracking() =
testScope.runTest {
- assertThat(underTest.legacyQsTracking.value).isEqualTo(false)
+ assertThat(underTest.legacyQsTracking.value).isFalse()
underTest.setLegacyQsTracking(true)
- assertThat(underTest.legacyQsTracking.value).isEqualTo(true)
+ assertThat(underTest.legacyQsTracking.value).isTrue()
}
@Test
fun updateLegacyExpandedOrAwaitingInputTransfer() =
testScope.runTest {
- assertThat(underTest.legacyExpandedOrAwaitingInputTransfer.value).isEqualTo(false)
+ assertThat(underTest.legacyExpandedOrAwaitingInputTransfer.value).isFalse()
underTest.setLegacyExpandedOrAwaitingInputTransfer(true)
- assertThat(underTest.legacyExpandedOrAwaitingInputTransfer.value).isEqualTo(true)
+ assertThat(underTest.legacyExpandedOrAwaitingInputTransfer.value).isTrue()
}
@Test
@@ -142,36 +141,46 @@ class ShadeRepositoryImplTest : SysuiTestCase() {
@Test
fun updateLegacyIsQsExpanded() =
testScope.runTest {
- assertThat(underTest.legacyIsQsExpanded.value).isEqualTo(false)
+ assertThat(underTest.legacyIsQsExpanded.value).isFalse()
underTest.setLegacyIsQsExpanded(true)
- assertThat(underTest.legacyIsQsExpanded.value).isEqualTo(true)
+ assertThat(underTest.legacyIsQsExpanded.value).isTrue()
}
@Test
fun updateLegacyExpandImmediate() =
testScope.runTest {
- assertThat(underTest.legacyExpandImmediate.value).isEqualTo(false)
+ assertThat(underTest.legacyExpandImmediate.value).isFalse()
underTest.setLegacyExpandImmediate(true)
- assertThat(underTest.legacyExpandImmediate.value).isEqualTo(true)
+ assertThat(underTest.legacyExpandImmediate.value).isTrue()
}
@Test
fun updateLegacyQsFullscreen() =
testScope.runTest {
- assertThat(underTest.legacyQsFullscreen.value).isEqualTo(false)
+ assertThat(underTest.legacyQsFullscreen.value).isFalse()
underTest.setLegacyQsFullscreen(true)
- assertThat(underTest.legacyQsFullscreen.value).isEqualTo(true)
+ assertThat(underTest.legacyQsFullscreen.value).isTrue()
}
@Test
fun updateLegacyIsClosing() =
testScope.runTest {
- assertThat(underTest.legacyIsClosing.value).isEqualTo(false)
+ assertThat(underTest.legacyIsClosing.value).isFalse()
underTest.setLegacyIsClosing(true)
- assertThat(underTest.legacyIsClosing.value).isEqualTo(true)
+ assertThat(underTest.legacyIsClosing.value).isTrue()
+ }
+
+ @Test
+ fun isShadeLayoutWide() =
+ testScope.runTest {
+ val isShadeLayoutWide by collectLastValue(underTest.isShadeLayoutWide)
+ assertThat(isShadeLayoutWide).isFalse()
+
+ underTest.setShadeLayoutWide(true)
+ assertThat(isShadeLayoutWide).isTrue()
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shared/clocks/ClockRegistryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/shared/clocks/ClockRegistryTest.kt
index 2f52248dab6f..150f53d4ad25 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shared/clocks/ClockRegistryTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/shared/clocks/ClockRegistryTest.kt
@@ -28,6 +28,7 @@ import com.android.systemui.plugins.clocks.ClockController
import com.android.systemui.plugins.clocks.ClockId
import com.android.systemui.plugins.clocks.ClockMessageBuffers
import com.android.systemui.plugins.clocks.ClockMetadata
+import com.android.systemui.plugins.clocks.ClockPickerConfig
import com.android.systemui.plugins.clocks.ClockProviderPlugin
import com.android.systemui.plugins.clocks.ClockSettings
import com.android.systemui.plugins.PluginLifecycleManager
@@ -74,6 +75,7 @@ class ClockRegistryTest : SysuiTestCase() {
private lateinit var fakeDefaultProvider: FakeClockPlugin
private lateinit var pluginListener: PluginListener<ClockProviderPlugin>
private lateinit var registry: ClockRegistry
+ private lateinit var pickerConfig: ClockPickerConfig
private val featureFlags = FakeFeatureFlags()
companion object {
@@ -82,9 +84,9 @@ class ClockRegistryTest : SysuiTestCase() {
return null!!
}
- private fun failThumbnail(clockId: ClockId): Drawable? {
- fail("Unexpected call to getThumbnail: $clockId")
- return null
+ private fun failPickerConfig(clockId: ClockId): ClockPickerConfig {
+ fail("Unexpected call to getClockPickerConfig: $clockId")
+ return null!!
}
}
@@ -123,22 +125,31 @@ class ClockRegistryTest : SysuiTestCase() {
private class FakeClockPlugin : ClockProviderPlugin {
private val metadata = mutableListOf<ClockMetadata>()
private val createCallbacks = mutableMapOf<ClockId, (ClockId) -> ClockController>()
- private val thumbnailCallbacks = mutableMapOf<ClockId, (ClockId) -> Drawable?>()
+ private val pickerConfigs = mutableMapOf<ClockId, (ClockId) -> ClockPickerConfig>()
override fun getClocks() = metadata
- override fun createClock(settings: ClockSettings): ClockController =
- createCallbacks[settings.clockId!!]!!(settings.clockId!!)
- override fun getClockThumbnail(id: ClockId): Drawable? = thumbnailCallbacks[id]!!(id)
+
+ override fun createClock(settings: ClockSettings): ClockController {
+ val clockId = settings.clockId ?: throw IllegalArgumentException("No clockId specified")
+ return createCallbacks[clockId]?.invoke(clockId)
+ ?: throw NotImplementedError("No callback for '$clockId'")
+ }
+
+ override fun getClockPickerConfig(clockId: ClockId): ClockPickerConfig {
+ return pickerConfigs[clockId]?.invoke(clockId)
+ ?: throw NotImplementedError("No picker config for '$clockId'")
+ }
+
override fun initialize(buffers: ClockMessageBuffers?) { }
fun addClock(
id: ClockId,
create: (ClockId) -> ClockController = ::failFactory,
- getThumbnail: (ClockId) -> Drawable? = ::failThumbnail
+ getPickerConfig: (ClockId) -> ClockPickerConfig = ::failPickerConfig
): FakeClockPlugin {
metadata.add(ClockMetadata(id))
createCallbacks[id] = create
- thumbnailCallbacks[id] = getThumbnail
+ pickerConfigs[id] = getPickerConfig
return this
}
}
@@ -148,9 +159,10 @@ class ClockRegistryTest : SysuiTestCase() {
scheduler = TestCoroutineScheduler()
dispatcher = StandardTestDispatcher(scheduler)
scope = TestScope(dispatcher)
+ pickerConfig = ClockPickerConfig("CLOCK_ID", "NAME", "DESC", mockThumbnail)
fakeDefaultProvider = FakeClockPlugin()
- .addClock(DEFAULT_CLOCK_ID, { mockDefaultClock }, { mockThumbnail })
+ .addClock(DEFAULT_CLOCK_ID, { mockDefaultClock }, { pickerConfig })
whenever(mockContext.contentResolver).thenReturn(mockContentResolver)
val captor = argumentCaptor<PluginListener<ClockProviderPlugin>>()
@@ -215,8 +227,8 @@ class ClockRegistryTest : SysuiTestCase() {
@Test
fun clockIdConflict_ErrorWithoutCrash_unloadDuplicate() {
val plugin1 = FakeClockPlugin()
- .addClock("clock_1", { mockClock }, { mockThumbnail })
- .addClock("clock_2", { mockClock }, { mockThumbnail })
+ .addClock("clock_1", { mockClock }, { pickerConfig })
+ .addClock("clock_2", { mockClock }, { pickerConfig })
val lifecycle1 = spy(FakeLifecycle("1", plugin1))
val plugin2 = FakeClockPlugin()
@@ -238,8 +250,8 @@ class ClockRegistryTest : SysuiTestCase() {
assertEquals(registry.createExampleClock("clock_1"), mockClock)
assertEquals(registry.createExampleClock("clock_2"), mockClock)
- assertEquals(registry.getClockThumbnail("clock_1"), mockThumbnail)
- assertEquals(registry.getClockThumbnail("clock_2"), mockThumbnail)
+ assertEquals(registry.getClockPickerConfig("clock_1"), pickerConfig)
+ assertEquals(registry.getClockPickerConfig("clock_2"), pickerConfig)
verify(lifecycle1, never()).unloadPlugin()
verify(lifecycle2, times(2)).unloadPlugin()
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shared/clocks/DefaultClockProviderTest.kt b/packages/SystemUI/tests/src/com/android/systemui/shared/clocks/DefaultClockProviderTest.kt
index 2522ed7f9a3c..bbe03f001b03 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shared/clocks/DefaultClockProviderTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/shared/clocks/DefaultClockProviderTest.kt
@@ -72,6 +72,10 @@ class DefaultClockProviderTest : SysuiTestCase() {
.thenReturn(mockSmallClockView)
whenever(layoutInflater.inflate(eq(R.layout.clock_default_large), any(), anyBoolean()))
.thenReturn(mockLargeClockView)
+ whenever(resources.getString(R.string.clock_default_name))
+ .thenReturn("DEFAULT_CLOCK_NAME")
+ whenever(resources.getString(R.string.clock_default_description))
+ .thenReturn("DEFAULT_CLOCK_DESC")
whenever(resources.getDrawable(R.drawable.clock_default_thumbnail, null))
.thenReturn(mockClockThumbnail)
whenever(mockSmallClockView.getLayoutParams()).thenReturn(FrameLayout.LayoutParams(10, 10))
@@ -85,7 +89,7 @@ class DefaultClockProviderTest : SysuiTestCase() {
// All providers need to provide clocks & thumbnails for exposed clocks
for (metadata in provider.getClocks()) {
assertNotNull(provider.createClock(metadata.clockId))
- assertNotNull(provider.getClockThumbnail(metadata.clockId))
+ assertNotNull(provider.getClockPickerConfig(metadata.clockId))
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyboardShortcutListSearchTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyboardShortcutListSearchTest.java
index 6985a27a59c8..63e56eeb730f 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyboardShortcutListSearchTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyboardShortcutListSearchTest.java
@@ -66,7 +66,9 @@ public class KeyboardShortcutListSearchTest extends SysuiTestCase {
@Before
public void setUp() {
- mKeyboardShortcutListSearch = new KeyboardShortcutListSearch(mContext, mWindowManager);
+ when(mWindowManager.getApplicationLaunchKeyboardShortcuts(anyInt())).thenReturn(
+ new KeyboardShortcutGroup("", Collections.emptyList()));
+ mKeyboardShortcutListSearch = new KeyboardShortcutListSearch(mContext, mWindowManager, -1);
mKeyboardShortcutListSearch.sInstance = mKeyboardShortcutListSearch;
mKeyboardShortcutListSearch.mKeyboardShortcutsBottomSheetDialog = mBottomSheetDialog;
mKeyboardShortcutListSearch.mContext = mContext;
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyboardShortcutsTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyboardShortcutsTest.java
index 6ad8b8bc3637..105cf168995c 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyboardShortcutsTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyboardShortcutsTest.java
@@ -54,6 +54,7 @@ import org.mockito.junit.MockitoRule;
import org.mockito.stubbing.Answer;
import java.util.Arrays;
+import java.util.Collections;
import java.util.List;
@SmallTest
@@ -71,6 +72,8 @@ public class KeyboardShortcutsTest extends SysuiTestCase {
@Before
public void setUp() {
+ when(mWindowManager.getApplicationLaunchKeyboardShortcuts(anyInt())).thenReturn(
+ new KeyboardShortcutGroup("", Collections.emptyList()));
mKeyboardShortcuts = new KeyboardShortcuts(mContext, mWindowManager);
KeyboardShortcuts.sInstance = mKeyboardShortcuts;
mKeyboardShortcuts.mKeyboardShortcutsDialog = mDialog;
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeTransitionControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeTransitionControllerTest.kt
index 69e8f4737a5a..9e6a498b325a 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeTransitionControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeTransitionControllerTest.kt
@@ -6,26 +6,23 @@ import android.testing.TestableLooper.RunWithLooper
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.systemui.ExpandHelper
-import com.android.systemui.SysUITestModule
import com.android.systemui.SysuiTestCase
-import com.android.systemui.TestMocksModule
-import com.android.systemui.biometrics.domain.BiometricsDomainLayerModule
import com.android.systemui.classifier.FalsingCollectorFake
import com.android.systemui.classifier.FalsingManagerFake
-import com.android.systemui.dagger.SysUISingleton
-import com.android.systemui.flags.FakeFeatureFlagsClassicModule
import com.android.systemui.flags.Flags
+import com.android.systemui.flags.fakeFeatureFlagsClassic
import com.android.systemui.keyguard.domain.interactor.NaturalScrollingSettingObserver
+import com.android.systemui.kosmos.testScope
import com.android.systemui.media.controls.ui.controller.MediaHierarchyManager
import com.android.systemui.plugins.qs.QS
-import com.android.systemui.power.domain.interactor.PowerInteractor
import com.android.systemui.qs.ui.adapter.FakeQSSceneAdapter
import com.android.systemui.res.R
+import com.android.systemui.shade.data.repository.shadeRepository
import com.android.systemui.shade.domain.interactor.ShadeLockscreenInteractor
-import com.android.systemui.shade.data.repository.FakeShadeRepository
-import com.android.systemui.shade.domain.interactor.ShadeInteractor
+import com.android.systemui.shade.domain.interactor.shadeInteractor
import com.android.systemui.statusbar.disableflags.data.model.DisableFlagsModel
-import com.android.systemui.statusbar.disableflags.data.repository.FakeDisableFlagsRepository
+import com.android.systemui.statusbar.disableflags.data.repository.disableFlagsRepository
+import com.android.systemui.statusbar.disableflags.data.repository.fakeDisableFlagsRepository
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow
import com.android.systemui.statusbar.notification.row.NotificationTestHelper
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout
@@ -33,17 +30,16 @@ import com.android.systemui.statusbar.notification.stack.NotificationStackScroll
import com.android.systemui.statusbar.phone.CentralSurfaces
import com.android.systemui.statusbar.phone.KeyguardBypassController
import com.android.systemui.statusbar.phone.ScrimController
-import com.android.systemui.statusbar.policy.FakeConfigurationController
import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController
-import com.android.systemui.user.domain.UserDomainLayerModule
+import com.android.systemui.statusbar.policy.configurationController
+import com.android.systemui.statusbar.policy.fakeConfigurationController
+import com.android.systemui.testKosmos
import com.android.systemui.util.mockito.any
import com.android.systemui.util.mockito.argumentCaptor
import com.android.systemui.util.mockito.mock
-import dagger.BindsInstance
-import dagger.Component
import kotlinx.coroutines.ExperimentalCoroutinesApi
-import kotlinx.coroutines.test.TestScope
import kotlinx.coroutines.test.runCurrent
+import kotlinx.coroutines.test.runTest
import org.junit.After
import org.junit.Assert.assertFalse
import org.junit.Assert.assertNotNull
@@ -65,8 +61,8 @@ import org.mockito.Mockito.clearInvocations
import org.mockito.Mockito.never
import org.mockito.Mockito.verify
import org.mockito.Mockito.verifyZeroInteractions
-import org.mockito.junit.MockitoJUnit
import org.mockito.Mockito.`when` as whenever
+import org.mockito.junit.MockitoJUnit
private fun <T> anyObject(): T {
return Mockito.anyObject<T>()
@@ -77,15 +73,14 @@ private fun <T> anyObject(): T {
@RunWith(AndroidJUnit4::class)
@OptIn(ExperimentalCoroutinesApi::class)
class LockscreenShadeTransitionControllerTest : SysuiTestCase() {
-
+ private val kosmos =
+ testKosmos().apply {
+ fakeFeatureFlagsClassic.apply { set(Flags.FULL_SCREEN_USER_SWITCHER, false) }
+ }
private lateinit var transitionController: LockscreenShadeTransitionController
- private lateinit var testComponent: TestComponent
- private val configurationController
- get() = testComponent.configurationController
- private val disableFlagsRepository
- get() = testComponent.disableFlagsRepository
- private val testScope
- get() = testComponent.testScope
+ private val configurationController = kosmos.fakeConfigurationController
+ private val disableFlagsRepository = kosmos.fakeDisableFlagsRepository
+ private val testScope = kosmos.testScope
private val qsSceneAdapter = FakeQSSceneAdapter({ mock() })
@@ -134,26 +129,6 @@ class LockscreenShadeTransitionControllerTest : SysuiTestCase() {
whenever(keyguardBypassController.bypassEnabled).thenReturn(false)
whenever(naturalScrollingSettingObserver.isNaturalScrollingEnabled).thenReturn(true)
- testComponent =
- DaggerLockscreenShadeTransitionControllerTest_TestComponent.factory()
- .create(
- test = this,
- featureFlags =
- FakeFeatureFlagsClassicModule {
- set(Flags.FULL_SCREEN_USER_SWITCHER, false)
- },
- mocks =
- TestMocksModule(
- notificationShadeDepthController = depthController,
- keyguardBypassController = keyguardBypassController,
- mediaHierarchyManager = mediaHierarchyManager,
- notificationLockscreenUserManager = lockScreenUserManager,
- notificationStackScrollLayoutController = nsslController,
- scrimController = scrimController,
- statusBarStateController = statusbarStateController,
- )
- )
-
transitionController =
LockscreenShadeTransitionController(
statusBarStateController = statusbarStateController,
@@ -191,10 +166,10 @@ class LockscreenShadeTransitionControllerTest : SysuiTestCase() {
falsingManager = FalsingManagerFake(),
dumpManager = mock(),
qsTransitionControllerFactory = { qsTransitionController },
- shadeRepository = testComponent.shadeRepository,
- shadeInteractor = testComponent.shadeInteractor,
+ shadeRepository = kosmos.shadeRepository,
+ shadeInteractor = kosmos.shadeInteractor,
splitShadeStateController = ResourcesSplitShadeStateController(),
- shadeLockscreenInteractorLazy = {shadeLockscreenInteractor},
+ shadeLockscreenInteractorLazy = { shadeLockscreenInteractor },
naturalScrollingSettingObserver = naturalScrollingSettingObserver,
lazyQSSceneAdapter = { qsSceneAdapter }
)
@@ -214,387 +189,424 @@ class LockscreenShadeTransitionControllerTest : SysuiTestCase() {
}
@Test
- fun testCantDragDownWhenQSExpanded() {
- assertTrue("Can't drag down on keyguard", transitionController.canDragDown())
- whenever(qS.isFullyCollapsed).thenReturn(false)
- assertFalse("Can drag down when QS is expanded", transitionController.canDragDown())
- }
+ fun testCantDragDownWhenQSExpanded() =
+ testScope.runTest {
+ assertTrue("Can't drag down on keyguard", transitionController.canDragDown())
+ whenever(qS.isFullyCollapsed).thenReturn(false)
+ assertFalse("Can drag down when QS is expanded", transitionController.canDragDown())
+ }
@Test
- fun testCanDragDownInLockedDownShade() {
- whenever(statusbarStateController.state).thenReturn(StatusBarState.SHADE_LOCKED)
- assertFalse("Can drag down in shade locked", transitionController.canDragDown())
- whenever(nsslController.isInLockedDownShade).thenReturn(true)
- assertTrue("Can't drag down in locked down shade", transitionController.canDragDown())
- }
+ fun testCanDragDownInLockedDownShade() =
+ testScope.runTest {
+ whenever(statusbarStateController.state).thenReturn(StatusBarState.SHADE_LOCKED)
+ assertFalse("Can drag down in shade locked", transitionController.canDragDown())
+ whenever(nsslController.isInLockedDownShade).thenReturn(true)
+ assertTrue("Can't drag down in locked down shade", transitionController.canDragDown())
+ }
@Test
- fun testGoingToLockedShade() {
- transitionController.goToLockedShade(null)
- verify(statusbarStateController).setState(StatusBarState.SHADE_LOCKED)
- }
+ fun testGoingToLockedShade() =
+ testScope.runTest {
+ transitionController.goToLockedShade(null)
+ verify(statusbarStateController).setState(StatusBarState.SHADE_LOCKED)
+ }
@Test
- fun testWakingToShadeLockedWhenDozing() {
- whenever(statusbarStateController.isDozing).thenReturn(true)
- transitionController.goToLockedShade(null)
- verify(statusbarStateController).setState(StatusBarState.SHADE_LOCKED)
- assertTrue("Not waking to shade locked", transitionController.isWakingToShadeLocked)
- }
+ fun testWakingToShadeLockedWhenDozing() =
+ testScope.runTest {
+ whenever(statusbarStateController.isDozing).thenReturn(true)
+ transitionController.goToLockedShade(null)
+ verify(statusbarStateController).setState(StatusBarState.SHADE_LOCKED)
+ assertTrue("Not waking to shade locked", transitionController.isWakingToShadeLocked)
+ }
@Test
- fun testNotWakingToShadeLockedWhenNotDozing() {
- whenever(statusbarStateController.isDozing).thenReturn(false)
- transitionController.goToLockedShade(null)
- verify(statusbarStateController).setState(StatusBarState.SHADE_LOCKED)
- assertFalse(
- "Waking to shade locked when not dozing",
- transitionController.isWakingToShadeLocked
- )
- }
+ fun testNotWakingToShadeLockedWhenNotDozing() =
+ testScope.runTest {
+ whenever(statusbarStateController.isDozing).thenReturn(false)
+ transitionController.goToLockedShade(null)
+ verify(statusbarStateController).setState(StatusBarState.SHADE_LOCKED)
+ assertFalse(
+ "Waking to shade locked when not dozing",
+ transitionController.isWakingToShadeLocked
+ )
+ }
@Test
- fun testGoToLockedShadeOnlyOnKeyguard() {
- whenever(statusbarStateController.state).thenReturn(StatusBarState.SHADE_LOCKED)
- transitionController.goToLockedShade(null)
- whenever(statusbarStateController.state).thenReturn(StatusBarState.SHADE)
- transitionController.goToLockedShade(null)
- verify(statusbarStateController, never()).setState(anyInt())
- }
+ fun testGoToLockedShadeOnlyOnKeyguard() =
+ testScope.runTest {
+ whenever(statusbarStateController.state).thenReturn(StatusBarState.SHADE_LOCKED)
+ transitionController.goToLockedShade(null)
+ whenever(statusbarStateController.state).thenReturn(StatusBarState.SHADE)
+ transitionController.goToLockedShade(null)
+ verify(statusbarStateController, never()).setState(anyInt())
+ }
@Test
- fun testDontGoWhenShadeDisabled() {
- disableFlagsRepository.disableFlags.value =
- DisableFlagsModel(
- disable2 = DISABLE2_NOTIFICATION_SHADE,
- )
- testScope.runCurrent()
- transitionController.goToLockedShade(null)
- verify(statusbarStateController, never()).setState(anyInt())
- }
+ fun testDontGoWhenShadeDisabled() =
+ testScope.runTest {
+ disableFlagsRepository.disableFlags.value =
+ DisableFlagsModel(
+ disable2 = DISABLE2_NOTIFICATION_SHADE,
+ )
+ testScope.runCurrent()
+ transitionController.goToLockedShade(null)
+ verify(statusbarStateController, never()).setState(anyInt())
+ }
@Test
- fun testUserExpandsViewOnGoingToFullShade() {
- assertFalse("Row shouldn't be user expanded yet", row.isUserExpanded)
- transitionController.goToLockedShade(row)
- assertTrue("Row wasn't user expanded on drag down", row.isUserExpanded)
- }
+ fun testUserExpandsViewOnGoingToFullShade() =
+ testScope.runTest {
+ assertFalse("Row shouldn't be user expanded yet", row.isUserExpanded)
+ transitionController.goToLockedShade(row)
+ assertTrue("Row wasn't user expanded on drag down", row.isUserExpanded)
+ }
@Test
- fun testTriggeringBouncerNoNotificationsOnLockscreen() {
- whenever(lockScreenUserManager.shouldShowLockscreenNotifications()).thenReturn(false)
- transitionController.goToLockedShade(null)
- verify(statusbarStateController, never()).setState(anyInt())
- verify(statusbarStateController).setLeaveOpenOnKeyguardHide(true)
- verify(centralSurfaces).showBouncerWithDimissAndCancelIfKeyguard(anyObject(), anyObject())
- }
+ fun testTriggeringBouncerNoNotificationsOnLockscreen() =
+ testScope.runTest {
+ whenever(lockScreenUserManager.shouldShowLockscreenNotifications()).thenReturn(false)
+ transitionController.goToLockedShade(null)
+ verify(statusbarStateController, never()).setState(anyInt())
+ verify(statusbarStateController).setLeaveOpenOnKeyguardHide(true)
+ verify(centralSurfaces)
+ .showBouncerWithDimissAndCancelIfKeyguard(anyObject(), anyObject())
+ }
@Test
- fun testGoToLockedShadeCreatesQSAnimation() {
- transitionController.goToLockedShade(null)
- verify(statusbarStateController).setState(StatusBarState.SHADE_LOCKED)
- verify(shadeLockscreenInteractor).transitionToExpandedShade(anyLong())
- assertNotNull(transitionController.dragDownAnimator)
- }
+ fun testGoToLockedShadeCreatesQSAnimation() =
+ testScope.runTest {
+ transitionController.goToLockedShade(null)
+ verify(statusbarStateController).setState(StatusBarState.SHADE_LOCKED)
+ verify(shadeLockscreenInteractor).transitionToExpandedShade(anyLong())
+ assertNotNull(transitionController.dragDownAnimator)
+ }
@Test
- fun testGoToLockedShadeDoesntCreateQSAnimation() {
- transitionController.goToLockedShade(null, needsQSAnimation = false)
- verify(statusbarStateController).setState(StatusBarState.SHADE_LOCKED)
- verify(shadeLockscreenInteractor).transitionToExpandedShade(anyLong())
- assertNull(transitionController.dragDownAnimator)
- }
+ fun testGoToLockedShadeDoesntCreateQSAnimation() =
+ testScope.runTest {
+ transitionController.goToLockedShade(null, needsQSAnimation = false)
+ verify(statusbarStateController).setState(StatusBarState.SHADE_LOCKED)
+ verify(shadeLockscreenInteractor).transitionToExpandedShade(anyLong())
+ assertNull(transitionController.dragDownAnimator)
+ }
@Test
- fun testGoToLockedShadeAlwaysCreatesQSAnimationInSplitShade() {
- enableSplitShade()
- transitionController.goToLockedShade(null, needsQSAnimation = true)
- verify(shadeLockscreenInteractor).transitionToExpandedShade(anyLong())
- assertNotNull(transitionController.dragDownAnimator)
- }
+ fun testGoToLockedShadeAlwaysCreatesQSAnimationInSplitShade() =
+ testScope.runTest {
+ enableSplitShade()
+ transitionController.goToLockedShade(null, needsQSAnimation = true)
+ verify(shadeLockscreenInteractor).transitionToExpandedShade(anyLong())
+ assertNotNull(transitionController.dragDownAnimator)
+ }
@Test
- fun testGoToLockedShadeCancelDoesntLeaveShadeOpenOnKeyguardHide() {
- whenever(lockScreenUserManager.shouldShowLockscreenNotifications()).thenReturn(false)
- whenever(lockScreenUserManager.isLockscreenPublicMode(any())).thenReturn(true)
- transitionController.goToLockedShade(null)
- val captor = argumentCaptor<Runnable>()
- verify(centralSurfaces).showBouncerWithDimissAndCancelIfKeyguard(isNull(), captor.capture())
- captor.value.run()
- verify(statusbarStateController).setLeaveOpenOnKeyguardHide(false)
- }
+ fun testGoToLockedShadeCancelDoesntLeaveShadeOpenOnKeyguardHide() =
+ testScope.runTest {
+ whenever(lockScreenUserManager.shouldShowLockscreenNotifications()).thenReturn(false)
+ whenever(lockScreenUserManager.isLockscreenPublicMode(any())).thenReturn(true)
+ transitionController.goToLockedShade(null)
+ val captor = argumentCaptor<Runnable>()
+ verify(centralSurfaces)
+ .showBouncerWithDimissAndCancelIfKeyguard(isNull(), captor.capture())
+ captor.value.run()
+ verify(statusbarStateController).setLeaveOpenOnKeyguardHide(false)
+ }
@Test
- fun testDragDownAmountDoesntCallOutInLockedDownShade() {
- whenever(nsslController.isInLockedDownShade).thenReturn(true)
- transitionController.dragDownAmount = 10f
- verify(nsslController, never()).setTransitionToFullShadeAmount(anyFloat())
- verify(mediaHierarchyManager, never()).setTransitionToFullShadeAmount(anyFloat())
- verify(scrimController, never()).setTransitionToFullShadeProgress(anyFloat(), anyFloat())
- verify(transitionControllerCallback, never())
- .setTransitionToFullShadeAmount(anyFloat(), anyBoolean(), anyLong())
- verify(qsTransitionController, never()).dragDownAmount = anyFloat()
- }
+ fun testDragDownAmountDoesntCallOutInLockedDownShade() =
+ testScope.runTest {
+ whenever(nsslController.isInLockedDownShade).thenReturn(true)
+ transitionController.dragDownAmount = 10f
+ verify(nsslController, never()).setTransitionToFullShadeAmount(anyFloat())
+ verify(mediaHierarchyManager, never()).setTransitionToFullShadeAmount(anyFloat())
+ verify(scrimController, never())
+ .setTransitionToFullShadeProgress(anyFloat(), anyFloat())
+ verify(transitionControllerCallback, never())
+ .setTransitionToFullShadeAmount(anyFloat(), anyBoolean(), anyLong())
+ verify(qsTransitionController, never()).dragDownAmount = anyFloat()
+ }
@Test
- fun testDragDownAmountCallsOut() {
- transitionController.dragDownAmount = 10f
- verify(nsslController).setTransitionToFullShadeAmount(anyFloat())
- verify(mediaHierarchyManager).setTransitionToFullShadeAmount(anyFloat())
- verify(scrimController).setTransitionToFullShadeProgress(anyFloat(), anyFloat())
- verify(transitionControllerCallback)
- .setTransitionToFullShadeAmount(anyFloat(), anyBoolean(), anyLong())
- verify(qsTransitionController).dragDownAmount = 10f
- verify(depthController).transitionToFullShadeProgress = anyFloat()
- }
+ fun testDragDownAmountCallsOut() =
+ testScope.runTest {
+ transitionController.dragDownAmount = 10f
+ verify(nsslController).setTransitionToFullShadeAmount(anyFloat())
+ verify(mediaHierarchyManager).setTransitionToFullShadeAmount(anyFloat())
+ verify(scrimController).setTransitionToFullShadeProgress(anyFloat(), anyFloat())
+ verify(transitionControllerCallback)
+ .setTransitionToFullShadeAmount(anyFloat(), anyBoolean(), anyLong())
+ verify(qsTransitionController).dragDownAmount = 10f
+ verify(depthController).transitionToFullShadeProgress = anyFloat()
+ }
@Test
- fun testDragDownAmount_depthDistanceIsZero_setsProgressToZero() {
- context
- .getOrCreateTestableResources()
- .addOverride(R.dimen.lockscreen_shade_depth_controller_transition_distance, 0)
- configurationController.notifyConfigurationChanged()
+ fun testDragDownAmount_depthDistanceIsZero_setsProgressToZero() =
+ testScope.runTest {
+ context
+ .getOrCreateTestableResources()
+ .addOverride(R.dimen.lockscreen_shade_depth_controller_transition_distance, 0)
+ configurationController.notifyConfigurationChanged()
- transitionController.dragDownAmount = 10f
+ transitionController.dragDownAmount = 10f
- verify(depthController).transitionToFullShadeProgress = 0f
- }
+ verify(depthController).transitionToFullShadeProgress = 0f
+ }
@Test
- fun testDragDownAmount_depthDistanceNonZero_setsProgressBasedOnDistance() {
- context
- .getOrCreateTestableResources()
- .addOverride(R.dimen.lockscreen_shade_depth_controller_transition_distance, 100)
- configurationController.notifyConfigurationChanged()
+ fun testDragDownAmount_depthDistanceNonZero_setsProgressBasedOnDistance() =
+ testScope.runTest {
+ context
+ .getOrCreateTestableResources()
+ .addOverride(R.dimen.lockscreen_shade_depth_controller_transition_distance, 100)
+ configurationController.notifyConfigurationChanged()
- transitionController.dragDownAmount = 10f
+ transitionController.dragDownAmount = 10f
- verify(depthController).transitionToFullShadeProgress = 0.1f
- }
+ verify(depthController).transitionToFullShadeProgress = 0.1f
+ }
@Test
- fun setDragAmount_setsKeyguardTransitionProgress() {
- transitionController.dragDownAmount = 10f
+ fun setDragAmount_setsKeyguardTransitionProgress() =
+ testScope.runTest {
+ transitionController.dragDownAmount = 10f
- verify(shadeLockscreenInteractor).setKeyguardTransitionProgress(anyFloat(), anyInt())
- }
+ verify(shadeLockscreenInteractor).setKeyguardTransitionProgress(anyFloat(), anyInt())
+ }
@Test
- fun setDragAmount_setsKeyguardAlphaBasedOnDistance() {
- val alphaDistance =
- context.resources.getDimensionPixelSize(
- R.dimen.lockscreen_shade_npvc_keyguard_content_alpha_transition_distance
- )
- transitionController.dragDownAmount = 10f
+ fun setDragAmount_setsKeyguardAlphaBasedOnDistance() =
+ testScope.runTest {
+ val alphaDistance =
+ context.resources.getDimensionPixelSize(
+ R.dimen.lockscreen_shade_npvc_keyguard_content_alpha_transition_distance
+ )
+ transitionController.dragDownAmount = 10f
- val expectedAlpha = 1 - 10f / alphaDistance
- verify(shadeLockscreenInteractor).setKeyguardTransitionProgress(eq(expectedAlpha), anyInt())
- }
+ val expectedAlpha = 1 - 10f / alphaDistance
+ verify(shadeLockscreenInteractor)
+ .setKeyguardTransitionProgress(eq(expectedAlpha), anyInt())
+ }
@Test
- fun setDragAmount_notInSplitShade_setsKeyguardTranslationToZero() {
- val mediaTranslationY = 123
- disableSplitShade()
- whenever(mediaHierarchyManager.isCurrentlyInGuidedTransformation()).thenReturn(true)
- whenever(mediaHierarchyManager.getGuidedTransformationTranslationY())
- .thenReturn(mediaTranslationY)
+ fun setDragAmount_notInSplitShade_setsKeyguardTranslationToZero() =
+ testScope.runTest {
+ val mediaTranslationY = 123
+ disableSplitShade()
+ whenever(mediaHierarchyManager.isCurrentlyInGuidedTransformation()).thenReturn(true)
+ whenever(mediaHierarchyManager.getGuidedTransformationTranslationY())
+ .thenReturn(mediaTranslationY)
- transitionController.dragDownAmount = 10f
+ transitionController.dragDownAmount = 10f
- verify(shadeLockscreenInteractor).setKeyguardTransitionProgress(anyFloat(), eq(0))
- }
+ verify(shadeLockscreenInteractor).setKeyguardTransitionProgress(anyFloat(), eq(0))
+ }
@Test
- fun setDragAmount_inSplitShade_setsKeyguardTranslationBasedOnMediaTranslation() {
- val mediaTranslationY = 123
- enableSplitShade()
- whenever(mediaHierarchyManager.isCurrentlyInGuidedTransformation()).thenReturn(true)
- whenever(mediaHierarchyManager.getGuidedTransformationTranslationY())
- .thenReturn(mediaTranslationY)
+ fun setDragAmount_inSplitShade_setsKeyguardTranslationBasedOnMediaTranslation() =
+ testScope.runTest {
+ val mediaTranslationY = 123
+ enableSplitShade()
+ whenever(mediaHierarchyManager.isCurrentlyInGuidedTransformation()).thenReturn(true)
+ whenever(mediaHierarchyManager.getGuidedTransformationTranslationY())
+ .thenReturn(mediaTranslationY)
- transitionController.dragDownAmount = 10f
+ transitionController.dragDownAmount = 10f
- verify(shadeLockscreenInteractor)
+ verify(shadeLockscreenInteractor)
.setKeyguardTransitionProgress(anyFloat(), eq(mediaTranslationY))
- }
+ }
@Test
- fun setDragAmount_inSplitShade_mediaNotShowing_setsKeyguardTranslationBasedOnDistance() {
- enableSplitShade()
- whenever(mediaHierarchyManager.isCurrentlyInGuidedTransformation()).thenReturn(false)
- whenever(mediaHierarchyManager.getGuidedTransformationTranslationY()).thenReturn(123)
+ fun setDragAmount_inSplitShade_mediaNotShowing_setsKeyguardTranslationBasedOnDistance() =
+ testScope.runTest {
+ enableSplitShade()
+ whenever(mediaHierarchyManager.isCurrentlyInGuidedTransformation()).thenReturn(false)
+ whenever(mediaHierarchyManager.getGuidedTransformationTranslationY()).thenReturn(123)
- transitionController.dragDownAmount = 10f
+ transitionController.dragDownAmount = 10f
- val distance =
- context.resources.getDimensionPixelSize(
- R.dimen.lockscreen_shade_keyguard_transition_distance
- )
- val offset =
- context.resources.getDimensionPixelSize(
- R.dimen.lockscreen_shade_keyguard_transition_vertical_offset
- )
- val expectedTranslation = 10f / distance * offset
- verify(shadeLockscreenInteractor)
- .setKeyguardTransitionProgress(anyFloat(), eq(expectedTranslation.toInt()))
- }
+ val distance =
+ context.resources.getDimensionPixelSize(
+ R.dimen.lockscreen_shade_keyguard_transition_distance
+ )
+ val offset =
+ context.resources.getDimensionPixelSize(
+ R.dimen.lockscreen_shade_keyguard_transition_vertical_offset
+ )
+ val expectedTranslation = 10f / distance * offset
+ verify(shadeLockscreenInteractor)
+ .setKeyguardTransitionProgress(anyFloat(), eq(expectedTranslation.toInt()))
+ }
@Test
- fun setDragDownAmount_setsValueOnMediaHierarchyManager() {
- transitionController.dragDownAmount = 10f
+ fun setDragDownAmount_setsValueOnMediaHierarchyManager() =
+ testScope.runTest {
+ transitionController.dragDownAmount = 10f
- verify(mediaHierarchyManager).setTransitionToFullShadeAmount(10f)
- }
+ verify(mediaHierarchyManager).setTransitionToFullShadeAmount(10f)
+ }
@Test
- fun setDragAmount_setsScrimProgressBasedOnScrimDistance() {
- val distance = 10
- context.orCreateTestableResources.addOverride(
- R.dimen.lockscreen_shade_scrim_transition_distance,
- distance
- )
- configurationController.notifyConfigurationChanged()
+ fun setDragAmount_setsScrimProgressBasedOnScrimDistance() =
+ testScope.runTest {
+ val distance = 10
+ context.orCreateTestableResources.addOverride(
+ R.dimen.lockscreen_shade_scrim_transition_distance,
+ distance
+ )
+ configurationController.notifyConfigurationChanged()
- transitionController.dragDownAmount = 5f
+ transitionController.dragDownAmount = 5f
- verify(scrimController)
- .transitionToFullShadeProgress(
- progress = eq(0.5f),
- lockScreenNotificationsProgress = anyFloat()
- )
- }
+ verify(scrimController)
+ .transitionToFullShadeProgress(
+ progress = eq(0.5f),
+ lockScreenNotificationsProgress = anyFloat()
+ )
+ }
@Test
- fun setDragAmount_setsNotificationsScrimProgressBasedOnNotificationsScrimDistanceAndDelay() {
- val distance = 100
- val delay = 10
- context.orCreateTestableResources.addOverride(
- R.dimen.lockscreen_shade_notifications_scrim_transition_distance,
- distance
- )
- context.orCreateTestableResources.addOverride(
- R.dimen.lockscreen_shade_notifications_scrim_transition_delay,
- delay
- )
- configurationController.notifyConfigurationChanged()
+ fun setDragAmount_setsNotificationsScrimProgressBasedOnNotificationsScrimDistanceAndDelay() =
+ testScope.runTest {
+ val distance = 100
+ val delay = 10
+ context.orCreateTestableResources.addOverride(
+ R.dimen.lockscreen_shade_notifications_scrim_transition_distance,
+ distance
+ )
+ context.orCreateTestableResources.addOverride(
+ R.dimen.lockscreen_shade_notifications_scrim_transition_delay,
+ delay
+ )
+ configurationController.notifyConfigurationChanged()
- transitionController.dragDownAmount = 20f
+ transitionController.dragDownAmount = 20f
- verify(scrimController)
- .transitionToFullShadeProgress(
- progress = anyFloat(),
- lockScreenNotificationsProgress = eq(0.1f)
- )
- }
+ verify(scrimController)
+ .transitionToFullShadeProgress(
+ progress = anyFloat(),
+ lockScreenNotificationsProgress = eq(0.1f)
+ )
+ }
@Test
- fun setDragAmount_dragAmountLessThanNotifDelayDistance_setsNotificationsScrimProgressToZero() {
- val distance = 100
- val delay = 50
- context.orCreateTestableResources.addOverride(
- R.dimen.lockscreen_shade_notifications_scrim_transition_distance,
- distance
- )
- context.orCreateTestableResources.addOverride(
- R.dimen.lockscreen_shade_notifications_scrim_transition_delay,
- delay
- )
- configurationController.notifyConfigurationChanged()
+ fun setDragAmount_dragAmountLessThanNotifDelayDistance_setsNotificationsScrimProgressToZero() =
+ testScope.runTest {
+ val distance = 100
+ val delay = 50
+ context.orCreateTestableResources.addOverride(
+ R.dimen.lockscreen_shade_notifications_scrim_transition_distance,
+ distance
+ )
+ context.orCreateTestableResources.addOverride(
+ R.dimen.lockscreen_shade_notifications_scrim_transition_delay,
+ delay
+ )
+ configurationController.notifyConfigurationChanged()
- transitionController.dragDownAmount = 20f
+ transitionController.dragDownAmount = 20f
- verify(scrimController)
- .transitionToFullShadeProgress(
- progress = anyFloat(),
- lockScreenNotificationsProgress = eq(0f)
- )
- }
+ verify(scrimController)
+ .transitionToFullShadeProgress(
+ progress = anyFloat(),
+ lockScreenNotificationsProgress = eq(0f)
+ )
+ }
@Test
- fun setDragAmount_dragAmountMoreThanTotalDistance_setsNotificationsScrimProgressToOne() {
- val distance = 100
- val delay = 50
- context.orCreateTestableResources.addOverride(
- R.dimen.lockscreen_shade_notifications_scrim_transition_distance,
- distance
- )
- context.orCreateTestableResources.addOverride(
- R.dimen.lockscreen_shade_notifications_scrim_transition_delay,
- delay
- )
- configurationController.notifyConfigurationChanged()
+ fun setDragAmount_dragAmountMoreThanTotalDistance_setsNotificationsScrimProgressToOne() =
+ testScope.runTest {
+ val distance = 100
+ val delay = 50
+ context.orCreateTestableResources.addOverride(
+ R.dimen.lockscreen_shade_notifications_scrim_transition_distance,
+ distance
+ )
+ context.orCreateTestableResources.addOverride(
+ R.dimen.lockscreen_shade_notifications_scrim_transition_delay,
+ delay
+ )
+ configurationController.notifyConfigurationChanged()
- transitionController.dragDownAmount = 999999f
+ transitionController.dragDownAmount = 999999f
- verify(scrimController)
- .transitionToFullShadeProgress(
- progress = anyFloat(),
- lockScreenNotificationsProgress = eq(1f)
- )
- }
+ verify(scrimController)
+ .transitionToFullShadeProgress(
+ progress = anyFloat(),
+ lockScreenNotificationsProgress = eq(1f)
+ )
+ }
@Test
- fun setDragDownAmount_inSplitShade_setsValueOnMediaHierarchyManager() {
- enableSplitShade()
+ fun setDragDownAmount_inSplitShade_setsValueOnMediaHierarchyManager() =
+ testScope.runTest {
+ enableSplitShade()
- transitionController.dragDownAmount = 10f
+ transitionController.dragDownAmount = 10f
- verify(mediaHierarchyManager).setTransitionToFullShadeAmount(10f)
- }
+ verify(mediaHierarchyManager).setTransitionToFullShadeAmount(10f)
+ }
@Test
- fun setDragAmount_notInSplitShade_forwardsToSingleShadeOverScroller() {
- disableSplitShade()
+ fun setDragAmount_notInSplitShade_forwardsToSingleShadeOverScroller() =
+ testScope.runTest {
+ disableSplitShade()
- transitionController.dragDownAmount = 10f
+ transitionController.dragDownAmount = 10f
- verify(singleShadeOverScroller).expansionDragDownAmount = 10f
- verifyZeroInteractions(splitShadeOverScroller)
- }
+ verify(singleShadeOverScroller).expansionDragDownAmount = 10f
+ verifyZeroInteractions(splitShadeOverScroller)
+ }
@Test
- fun setDragAmount_inSplitShade_forwardsToSplitShadeOverScroller() {
- enableSplitShade()
+ fun setDragAmount_inSplitShade_forwardsToSplitShadeOverScroller() =
+ testScope.runTest {
+ enableSplitShade()
- transitionController.dragDownAmount = 10f
+ transitionController.dragDownAmount = 10f
- verify(splitShadeOverScroller).expansionDragDownAmount = 10f
- verifyZeroInteractions(singleShadeOverScroller)
- }
+ verify(splitShadeOverScroller).expansionDragDownAmount = 10f
+ verifyZeroInteractions(singleShadeOverScroller)
+ }
@Test
- fun setDragDownAmount_inSplitShade_setsKeyguardStatusBarAlphaBasedOnDistance() {
- val alphaDistance =
- context.resources.getDimensionPixelSize(
- R.dimen.lockscreen_shade_npvc_keyguard_content_alpha_transition_distance
- )
- val dragDownAmount = 10f
- enableSplitShade()
+ fun setDragDownAmount_inSplitShade_setsKeyguardStatusBarAlphaBasedOnDistance() =
+ testScope.runTest {
+ val alphaDistance =
+ context.resources.getDimensionPixelSize(
+ R.dimen.lockscreen_shade_npvc_keyguard_content_alpha_transition_distance
+ )
+ val dragDownAmount = 10f
+ enableSplitShade()
- transitionController.dragDownAmount = dragDownAmount
+ transitionController.dragDownAmount = dragDownAmount
- val expectedAlpha = 1 - dragDownAmount / alphaDistance
- verify(shadeLockscreenInteractor).setKeyguardStatusBarAlpha(expectedAlpha)
- }
+ val expectedAlpha = 1 - dragDownAmount / alphaDistance
+ verify(shadeLockscreenInteractor).setKeyguardStatusBarAlpha(expectedAlpha)
+ }
@Test
- fun setDragDownAmount_notInSplitShade_setsKeyguardStatusBarAlphaToMinusOne() {
- disableSplitShade()
+ fun setDragDownAmount_notInSplitShade_setsKeyguardStatusBarAlphaToMinusOne() =
+ testScope.runTest {
+ disableSplitShade()
- transitionController.dragDownAmount = 10f
+ transitionController.dragDownAmount = 10f
- verify(shadeLockscreenInteractor).setKeyguardStatusBarAlpha(-1f)
- }
+ verify(shadeLockscreenInteractor).setKeyguardStatusBarAlpha(-1f)
+ }
@Test
- fun nullQs_canDragDownFromAdapter() {
- transitionController.qS = null
+ fun nullQs_canDragDownFromAdapter() =
+ testScope.runTest {
+ transitionController.qS = null
- qsSceneAdapter.isQsFullyCollapsed = true
- assertTrue("Can't drag down on keyguard", transitionController.canDragDown())
- qsSceneAdapter.isQsFullyCollapsed = false
- assertFalse("Can drag down when QS is expanded", transitionController.canDragDown())
- }
+ qsSceneAdapter.isQsFullyCollapsed = true
+ assertTrue("Can't drag down on keyguard", transitionController.canDragDown())
+ qsSceneAdapter.isQsFullyCollapsed = false
+ assertFalse("Can drag down when QS is expanded", transitionController.canDragDown())
+ }
private fun enableSplitShade() {
setSplitShadeEnabled(true)
@@ -619,32 +631,4 @@ class LockscreenShadeTransitionControllerTest : SysuiTestCase() {
) {
setTransitionToFullShadeProgress(progress, lockScreenNotificationsProgress)
}
-
- @SysUISingleton
- @Component(
- modules =
- [
- SysUITestModule::class,
- UserDomainLayerModule::class,
- BiometricsDomainLayerModule::class,
- ]
- )
- interface TestComponent {
-
- val configurationController: FakeConfigurationController
- val disableFlagsRepository: FakeDisableFlagsRepository
- val powerInteractor: PowerInteractor
- val shadeInteractor: ShadeInteractor
- val shadeRepository: FakeShadeRepository
- val testScope: TestScope
-
- @Component.Factory
- interface Factory {
- fun create(
- @BindsInstance test: SysuiTestCase,
- featureFlags: FakeFeatureFlagsClassicModule,
- mocks: TestMocksModule,
- ): TestComponent
- }
- }
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/casttootherdevice/domian/interactor/MediaRouterChipInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/casttootherdevice/domian/interactor/MediaRouterChipInteractorTest.kt
index 8a6a50dd13fc..ecb1a6d44b22 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/casttootherdevice/domian/interactor/MediaRouterChipInteractorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/casttootherdevice/domian/interactor/MediaRouterChipInteractorTest.kt
@@ -70,7 +70,7 @@ class MediaRouterChipInteractorTest : SysuiTestCase() {
}
@Test
- fun mediaRouterCastingState_connectingDevice_casting() =
+ fun mediaRouterCastingState_connectingDevice_casting_withName() =
testScope.runTest {
val latest by collectLastValue(underTest.mediaRouterCastingState)
@@ -79,17 +79,18 @@ class MediaRouterChipInteractorTest : SysuiTestCase() {
CastDevice(
state = CastDevice.CastState.Connecting,
id = "id",
- name = "name",
+ name = "My Favorite Device",
description = "desc",
origin = CastDevice.CastOrigin.MediaRouter,
)
)
- assertThat(latest).isEqualTo(MediaRouterCastModel.Casting)
+ assertThat(latest)
+ .isEqualTo(MediaRouterCastModel.Casting(deviceName = "My Favorite Device"))
}
@Test
- fun mediaRouterCastingState_connectedDevice_casting() =
+ fun mediaRouterCastingState_connectedDevice_casting_withName() =
testScope.runTest {
val latest by collectLastValue(underTest.mediaRouterCastingState)
@@ -98,13 +99,14 @@ class MediaRouterChipInteractorTest : SysuiTestCase() {
CastDevice(
state = CastDevice.CastState.Connected,
id = "id",
- name = "name",
+ name = "My Second Favorite Device",
description = "desc",
origin = CastDevice.CastOrigin.MediaRouter,
)
)
- assertThat(latest).isEqualTo(MediaRouterCastModel.Casting)
+ assertThat(latest)
+ .isEqualTo(MediaRouterCastModel.Casting(deviceName = "My Second Favorite Device"))
}
@Test
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/casttootherdevice/ui/view/EndCastScreenToOtherDeviceDialogDelegateTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/casttootherdevice/ui/view/EndCastScreenToOtherDeviceDialogDelegateTest.kt
index e9d6f0e5537a..5005d1609113 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/casttootherdevice/ui/view/EndCastScreenToOtherDeviceDialogDelegateTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/casttootherdevice/ui/view/EndCastScreenToOtherDeviceDialogDelegateTest.kt
@@ -19,8 +19,10 @@ package com.android.systemui.statusbar.chips.casttootherdevice.ui.view
import android.content.ComponentName
import android.content.DialogInterface
import android.content.Intent
+import android.content.applicationContext
import android.content.packageManager
import android.content.pm.ApplicationInfo
+import android.content.pm.PackageManager
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.kosmos.Kosmos
@@ -68,21 +70,94 @@ class EndCastScreenToOtherDeviceDialogDelegateTest : SysuiTestCase() {
underTest.beforeCreate(sysuiDialog, /* savedInstanceState= */ null)
- verify(sysuiDialog).setTitle(R.string.cast_screen_to_other_device_stop_dialog_title)
+ verify(sysuiDialog).setTitle(R.string.cast_to_other_device_stop_dialog_title)
}
@Test
- fun message_entireScreen() {
- createAndSetDelegate(ENTIRE_SCREEN)
+ fun message_entireScreen_unknownDevice() {
+ createAndSetDelegate(
+ MediaProjectionState.Projecting.EntireScreen(HOST_PACKAGE, hostDeviceName = null)
+ )
+
+ underTest.beforeCreate(sysuiDialog, /* savedInstanceState= */ null)
+
+ verify(sysuiDialog)
+ .setMessage(
+ context.getString(R.string.cast_to_other_device_stop_dialog_message_entire_screen)
+ )
+ }
+
+ @Test
+ fun message_entireScreen_hasDevice() {
+ createAndSetDelegate(
+ MediaProjectionState.Projecting.EntireScreen(
+ HOST_PACKAGE,
+ hostDeviceName = "My Favorite Device"
+ )
+ )
underTest.beforeCreate(sysuiDialog, /* savedInstanceState= */ null)
verify(sysuiDialog)
- .setMessage(context.getString(R.string.cast_screen_to_other_device_stop_dialog_message))
+ .setMessage(
+ context.getString(
+ R.string.cast_to_other_device_stop_dialog_message_entire_screen_with_device,
+ "My Favorite Device",
+ )
+ )
}
@Test
- fun message_singleTask() {
+ fun message_singleTask_unknownAppName_unknownDevice() {
+ val baseIntent =
+ Intent().apply { this.component = ComponentName("fake.task.package", "cls") }
+ whenever(kosmos.packageManager.getApplicationInfo(eq("fake.task.package"), any<Int>()))
+ .thenThrow(PackageManager.NameNotFoundException())
+
+ createAndSetDelegate(
+ MediaProjectionState.Projecting.SingleTask(
+ HOST_PACKAGE,
+ hostDeviceName = null,
+ createTask(taskId = 1, baseIntent = baseIntent)
+ ),
+ )
+
+ underTest.beforeCreate(sysuiDialog, /* savedInstanceState= */ null)
+
+ verify(sysuiDialog)
+ .setMessage(
+ context.getString(R.string.cast_to_other_device_stop_dialog_message_generic)
+ )
+ }
+
+ @Test
+ fun message_singleTask_unknownAppName_hasDevice() {
+ val baseIntent =
+ Intent().apply { this.component = ComponentName("fake.task.package", "cls") }
+ whenever(kosmos.packageManager.getApplicationInfo(eq("fake.task.package"), any<Int>()))
+ .thenThrow(PackageManager.NameNotFoundException())
+
+ createAndSetDelegate(
+ MediaProjectionState.Projecting.SingleTask(
+ HOST_PACKAGE,
+ hostDeviceName = "My Favorite Device",
+ createTask(taskId = 1, baseIntent = baseIntent)
+ ),
+ )
+
+ underTest.beforeCreate(sysuiDialog, /* savedInstanceState= */ null)
+
+ verify(sysuiDialog)
+ .setMessage(
+ context.getString(
+ R.string.cast_to_other_device_stop_dialog_message_generic_with_device,
+ "My Favorite Device",
+ )
+ )
+ }
+
+ @Test
+ fun message_singleTask_hasAppName_unknownDevice() {
val baseIntent =
Intent().apply { this.component = ComponentName("fake.task.package", "cls") }
val appInfo = mock<ApplicationInfo>()
@@ -93,17 +168,49 @@ class EndCastScreenToOtherDeviceDialogDelegateTest : SysuiTestCase() {
createAndSetDelegate(
MediaProjectionState.Projecting.SingleTask(
HOST_PACKAGE,
+ hostDeviceName = null,
createTask(taskId = 1, baseIntent = baseIntent)
+ ),
+ )
+
+ underTest.beforeCreate(sysuiDialog, /* savedInstanceState= */ null)
+
+ verify(sysuiDialog)
+ .setMessage(
+ context.getString(
+ R.string.cast_to_other_device_stop_dialog_message_specific_app,
+ "Fake Package",
+ )
)
+ }
+
+ @Test
+ fun message_singleTask_hasAppName_hasDevice() {
+ val baseIntent =
+ Intent().apply { this.component = ComponentName("fake.task.package", "cls") }
+ val appInfo = mock<ApplicationInfo>()
+ whenever(appInfo.loadLabel(kosmos.packageManager)).thenReturn("Fake Package")
+ whenever(kosmos.packageManager.getApplicationInfo(eq("fake.task.package"), any<Int>()))
+ .thenReturn(appInfo)
+
+ createAndSetDelegate(
+ MediaProjectionState.Projecting.SingleTask(
+ HOST_PACKAGE,
+ hostDeviceName = "My Favorite Device",
+ createTask(taskId = 1, baseIntent = baseIntent),
+ ),
)
underTest.beforeCreate(sysuiDialog, /* savedInstanceState= */ null)
- // It'd be nice to use R.string.cast_screen_to_other_device_stop_dialog_message_specific_app
- // directly, but it includes the <b> tags which aren't in the returned string.
- val result = argumentCaptor<CharSequence>()
- verify(sysuiDialog).setMessage(result.capture())
- assertThat(result.firstValue.toString()).isEqualTo("You will stop casting Fake Package")
+ verify(sysuiDialog)
+ .setMessage(
+ context.getString(
+ R.string.cast_to_other_device_stop_dialog_message_specific_app_with_device,
+ "Fake Package",
+ "My Favorite Device",
+ )
+ )
}
@Test
@@ -144,6 +251,7 @@ class EndCastScreenToOtherDeviceDialogDelegateTest : SysuiTestCase() {
underTest =
EndCastScreenToOtherDeviceDialogDelegate(
kosmos.endMediaProjectionDialogHelper,
+ kosmos.applicationContext,
stopAction = kosmos.mediaProjectionChipInteractor::stopProjecting,
ProjectionChipModel.Projecting(
ProjectionChipModel.Type.CAST_TO_OTHER_DEVICE,
@@ -154,8 +262,13 @@ class EndCastScreenToOtherDeviceDialogDelegateTest : SysuiTestCase() {
companion object {
private const val HOST_PACKAGE = "fake.host.package"
- private val ENTIRE_SCREEN = MediaProjectionState.Projecting.EntireScreen(HOST_PACKAGE)
+ private val ENTIRE_SCREEN =
+ MediaProjectionState.Projecting.EntireScreen(HOST_PACKAGE, hostDeviceName = null)
private val SINGLE_TASK =
- MediaProjectionState.Projecting.SingleTask(HOST_PACKAGE, createTask(taskId = 1))
+ MediaProjectionState.Projecting.SingleTask(
+ HOST_PACKAGE,
+ hostDeviceName = null,
+ createTask(taskId = 1)
+ )
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/casttootherdevice/ui/view/EndGenericCastToOtherDeviceDialogDelegateTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/casttootherdevice/ui/view/EndGenericCastToOtherDeviceDialogDelegateTest.kt
index 0af423db7db4..e6101f500ad1 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/casttootherdevice/ui/view/EndGenericCastToOtherDeviceDialogDelegateTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/casttootherdevice/ui/view/EndGenericCastToOtherDeviceDialogDelegateTest.kt
@@ -17,6 +17,7 @@
package com.android.systemui.statusbar.chips.casttootherdevice.ui.view
import android.content.DialogInterface
+import android.content.applicationContext
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.collectLastValue
@@ -65,12 +66,30 @@ class EndGenericCastToOtherDeviceDialogDelegateTest : SysuiTestCase() {
}
@Test
- fun message() {
- createAndSetDelegate()
+ fun message_unknownDevice() {
+ createAndSetDelegate(deviceName = null)
+
+ underTest.beforeCreate(sysuiDialog, /* savedInstanceState= */ null)
+
+ verify(sysuiDialog)
+ .setMessage(
+ context.getString(R.string.cast_to_other_device_stop_dialog_message_generic)
+ )
+ }
+
+ @Test
+ fun message_hasDevice() {
+ createAndSetDelegate(deviceName = "My Favorite Device")
underTest.beforeCreate(sysuiDialog, /* savedInstanceState= */ null)
- verify(sysuiDialog).setMessage(R.string.cast_to_other_device_stop_dialog_message)
+ verify(sysuiDialog)
+ .setMessage(
+ context.getString(
+ R.string.cast_to_other_device_stop_dialog_message_generic_with_device,
+ "My Favorite Device",
+ )
+ )
}
@Test
@@ -122,10 +141,12 @@ class EndGenericCastToOtherDeviceDialogDelegateTest : SysuiTestCase() {
assertThat(kosmos.fakeMediaRouterRepository.lastStoppedDevice).isEqualTo(device)
}
- private fun createAndSetDelegate() {
+ private fun createAndSetDelegate(deviceName: String? = null) {
underTest =
EndGenericCastToOtherDeviceDialogDelegate(
kosmos.endMediaProjectionDialogHelper,
+ kosmos.applicationContext,
+ deviceName,
stopAction = kosmos.mediaRouterChipInteractor::stopCasting,
)
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/casttootherdevice/ui/viewmodel/CastToOtherDeviceChipViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/casttootherdevice/ui/viewmodel/CastToOtherDeviceChipViewModelTest.kt
index fe29140143f9..02764f8a15fd 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/casttootherdevice/ui/viewmodel/CastToOtherDeviceChipViewModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/casttootherdevice/ui/viewmodel/CastToOtherDeviceChipViewModelTest.kt
@@ -16,9 +16,12 @@
package com.android.systemui.statusbar.chips.casttootherdevice.ui.viewmodel
+import android.content.DialogInterface
import android.view.View
import androidx.test.filters.SmallTest
+import com.android.internal.jank.Cuj
import com.android.systemui.SysuiTestCase
+import com.android.systemui.animation.DialogCuj
import com.android.systemui.animation.mockDialogTransitionAnimator
import com.android.systemui.common.shared.model.ContentDescription
import com.android.systemui.common.shared.model.Icon
@@ -39,6 +42,7 @@ import com.android.systemui.statusbar.chips.mediaprojection.domain.interactor.Me
import com.android.systemui.statusbar.chips.ui.model.ColorsModel
import com.android.systemui.statusbar.chips.ui.model.OngoingActivityChipModel
import com.android.systemui.statusbar.chips.ui.view.ChipBackgroundContainer
+import com.android.systemui.statusbar.chips.ui.viewmodel.OngoingActivityChipsViewModelTest.Companion.getStopActionFromDialog
import com.android.systemui.statusbar.phone.SystemUIDialog
import com.android.systemui.statusbar.phone.mockSystemUIDialogFactory
import com.android.systemui.statusbar.policy.CastDevice
@@ -47,8 +51,9 @@ import com.google.common.truth.Truth.assertThat
import kotlin.test.Test
import kotlinx.coroutines.test.runTest
import org.junit.Before
-import org.mockito.ArgumentMatchers
+import org.mockito.ArgumentMatchers.anyBoolean
import org.mockito.kotlin.any
+import org.mockito.kotlin.argumentCaptor
import org.mockito.kotlin.eq
import org.mockito.kotlin.mock
import org.mockito.kotlin.verify
@@ -64,7 +69,6 @@ class CastToOtherDeviceChipViewModelTest : SysuiTestCase() {
private val mockScreenCastDialog = mock<SystemUIDialog>()
private val mockGenericCastDialog = mock<SystemUIDialog>()
-
private val chipBackgroundView = mock<ChipBackgroundContainer>()
private val chipView =
mock<View>().apply {
@@ -116,6 +120,7 @@ class CastToOtherDeviceChipViewModelTest : SysuiTestCase() {
mediaProjectionRepo.mediaProjectionState.value =
MediaProjectionState.Projecting.SingleTask(
CAST_TO_OTHER_DEVICES_PACKAGE,
+ hostDeviceName = null,
createTask(taskId = 1),
)
@@ -207,6 +212,63 @@ class CastToOtherDeviceChipViewModelTest : SysuiTestCase() {
}
@Test
+ fun chip_projectionStoppedFromDialog_chipImmediatelyHidden() =
+ testScope.runTest {
+ val latest by collectLastValue(underTest.chip)
+
+ mediaProjectionRepo.mediaProjectionState.value =
+ MediaProjectionState.Projecting.EntireScreen(CAST_TO_OTHER_DEVICES_PACKAGE)
+
+ assertThat(latest).isInstanceOf(OngoingActivityChipModel.Shown::class.java)
+
+ // WHEN the stop action on the dialog is clicked
+ val dialogStopAction =
+ getStopActionFromDialog(latest, chipView, mockScreenCastDialog, kosmos)
+ dialogStopAction.onClick(mock<DialogInterface>(), 0)
+
+ // THEN the chip is immediately hidden...
+ assertThat(latest).isInstanceOf(OngoingActivityChipModel.Hidden::class.java)
+ // ...even though the repo still says it's projecting
+ assertThat(mediaProjectionRepo.mediaProjectionState.value)
+ .isInstanceOf(MediaProjectionState.Projecting::class.java)
+
+ // AND we specify no animation
+ assertThat((latest as OngoingActivityChipModel.Hidden).shouldAnimate).isFalse()
+ }
+
+ @Test
+ fun chip_routeStoppedFromDialog_chipImmediatelyHidden() =
+ testScope.runTest {
+ val latest by collectLastValue(underTest.chip)
+
+ mediaRouterRepo.castDevices.value =
+ listOf(
+ CastDevice(
+ state = CastDevice.CastState.Connected,
+ id = "id",
+ name = "name",
+ description = "desc",
+ origin = CastDevice.CastOrigin.MediaRouter,
+ )
+ )
+
+ assertThat(latest).isInstanceOf(OngoingActivityChipModel.Shown::class.java)
+
+ // WHEN the stop action on the dialog is clicked
+ val dialogStopAction =
+ getStopActionFromDialog(latest, chipView, mockGenericCastDialog, kosmos)
+ dialogStopAction.onClick(mock<DialogInterface>(), 0)
+
+ // THEN the chip is immediately hidden...
+ assertThat(latest).isInstanceOf(OngoingActivityChipModel.Hidden::class.java)
+ // ...even though the repo still says it's projecting
+ assertThat(mediaRouterRepo.castDevices.value).isNotEmpty()
+
+ // AND we specify no animation
+ assertThat((latest as OngoingActivityChipModel.Hidden).shouldAnimate).isFalse()
+ }
+
+ @Test
fun chip_colorsAreRed() =
testScope.runTest {
val latest by collectLastValue(underTest.chip)
@@ -223,7 +285,11 @@ class CastToOtherDeviceChipViewModelTest : SysuiTestCase() {
val latest by collectLastValue(underTest.chip)
mediaProjectionRepo.mediaProjectionState.value =
- MediaProjectionState.Projecting.SingleTask(NORMAL_PACKAGE, createTask(taskId = 1))
+ MediaProjectionState.Projecting.SingleTask(
+ NORMAL_PACKAGE,
+ hostDeviceName = null,
+ createTask(taskId = 1),
+ )
assertThat(latest).isInstanceOf(OngoingActivityChipModel.Hidden::class.java)
}
@@ -258,6 +324,7 @@ class CastToOtherDeviceChipViewModelTest : SysuiTestCase() {
mediaProjectionRepo.mediaProjectionState.value =
MediaProjectionState.Projecting.SingleTask(
CAST_TO_OTHER_DEVICES_PACKAGE,
+ hostDeviceName = null,
createTask(taskId = 1),
)
@@ -311,8 +378,8 @@ class CastToOtherDeviceChipViewModelTest : SysuiTestCase() {
.showFromView(
eq(mockScreenCastDialog),
eq(chipBackgroundView),
- eq(null),
- ArgumentMatchers.anyBoolean(),
+ any(),
+ anyBoolean(),
)
}
@@ -324,6 +391,7 @@ class CastToOtherDeviceChipViewModelTest : SysuiTestCase() {
mediaProjectionRepo.mediaProjectionState.value =
MediaProjectionState.Projecting.SingleTask(
CAST_TO_OTHER_DEVICES_PACKAGE,
+ hostDeviceName = null,
createTask(taskId = 1),
)
@@ -335,8 +403,8 @@ class CastToOtherDeviceChipViewModelTest : SysuiTestCase() {
.showFromView(
eq(mockScreenCastDialog),
eq(chipBackgroundView),
- eq(null),
- ArgumentMatchers.anyBoolean(),
+ any(),
+ anyBoolean(),
)
}
@@ -364,8 +432,65 @@ class CastToOtherDeviceChipViewModelTest : SysuiTestCase() {
.showFromView(
eq(mockGenericCastDialog),
eq(chipBackgroundView),
- eq(null),
- ArgumentMatchers.anyBoolean(),
+ any(),
+ anyBoolean(),
)
}
+
+ @Test
+ fun chip_projectionStateCasting_clickListenerHasCuj() =
+ testScope.runTest {
+ val latest by collectLastValue(underTest.chip)
+ mediaProjectionRepo.mediaProjectionState.value =
+ MediaProjectionState.Projecting.EntireScreen(CAST_TO_OTHER_DEVICES_PACKAGE)
+
+ val clickListener = ((latest as OngoingActivityChipModel.Shown).onClickListener)
+ clickListener!!.onClick(chipView)
+
+ val cujCaptor = argumentCaptor<DialogCuj>()
+ verify(kosmos.mockDialogTransitionAnimator)
+ .showFromView(
+ any(),
+ any(),
+ cujCaptor.capture(),
+ anyBoolean(),
+ )
+
+ assertThat(cujCaptor.firstValue.cujType)
+ .isEqualTo(Cuj.CUJ_STATUS_BAR_LAUNCH_DIALOG_FROM_CHIP)
+ assertThat(cujCaptor.firstValue.tag).contains("Cast")
+ }
+
+ @Test
+ fun chip_routerStateCasting_clickListenerHasCuj() =
+ testScope.runTest {
+ val latest by collectLastValue(underTest.chip)
+
+ mediaRouterRepo.castDevices.value =
+ listOf(
+ CastDevice(
+ state = CastDevice.CastState.Connected,
+ id = "id",
+ name = "name",
+ description = "desc",
+ origin = CastDevice.CastOrigin.MediaRouter,
+ )
+ )
+
+ val clickListener = ((latest as OngoingActivityChipModel.Shown).onClickListener)
+ clickListener!!.onClick(chipView)
+
+ val cujCaptor = argumentCaptor<DialogCuj>()
+ verify(kosmos.mockDialogTransitionAnimator)
+ .showFromView(
+ any(),
+ any(),
+ cujCaptor.capture(),
+ anyBoolean(),
+ )
+
+ assertThat(cujCaptor.firstValue.cujType)
+ .isEqualTo(Cuj.CUJ_STATUS_BAR_LAUNCH_DIALOG_FROM_CHIP)
+ assertThat(cujCaptor.firstValue.tag).contains("Cast")
+ }
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/mediaprojection/domain/interactor/MediaProjectionChipInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/mediaprojection/domain/interactor/MediaProjectionChipInteractorTest.kt
index 7eb4ca06b80d..d0c5e7a102e0 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/mediaprojection/domain/interactor/MediaProjectionChipInteractorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/mediaprojection/domain/interactor/MediaProjectionChipInteractorTest.kt
@@ -72,6 +72,7 @@ class MediaProjectionChipInteractorTest : SysuiTestCase() {
mediaProjectionRepo.mediaProjectionState.value =
MediaProjectionState.Projecting.SingleTask(
CAST_TO_OTHER_DEVICES_PACKAGE,
+ hostDeviceName = null,
createTask(taskId = 1)
)
@@ -101,7 +102,11 @@ class MediaProjectionChipInteractorTest : SysuiTestCase() {
val latest by collectLastValue(underTest.projection)
mediaProjectionRepo.mediaProjectionState.value =
- MediaProjectionState.Projecting.SingleTask(NORMAL_PACKAGE, createTask(taskId = 1))
+ MediaProjectionState.Projecting.SingleTask(
+ NORMAL_PACKAGE,
+ hostDeviceName = null,
+ createTask(taskId = 1),
+ )
assertThat(latest).isInstanceOf(ProjectionChipModel.Projecting::class.java)
assertThat((latest as ProjectionChipModel.Projecting).type)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/mediaprojection/ui/view/EndMediaProjectionDialogHelperTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/mediaprojection/ui/view/EndMediaProjectionDialogHelperTest.kt
index f9ad5ac46b6c..c62e40414121 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/mediaprojection/ui/view/EndMediaProjectionDialogHelperTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/mediaprojection/ui/view/EndMediaProjectionDialogHelperTest.kt
@@ -27,7 +27,6 @@ import com.android.systemui.kosmos.Kosmos
import com.android.systemui.kosmos.testCase
import com.android.systemui.mediaprojection.data.model.MediaProjectionState
import com.android.systemui.mediaprojection.taskswitcher.FakeActivityTaskManager.Companion.createTask
-import com.android.systemui.res.R
import com.android.systemui.statusbar.phone.SystemUIDialog
import com.android.systemui.statusbar.phone.mockSystemUIDialogFactory
import com.google.common.truth.Truth.assertThat
@@ -56,19 +55,15 @@ class EndMediaProjectionDialogHelperTest : SysuiTestCase() {
}
@Test
- fun getDialogMessage_entireScreen_isGenericMessage() {
+ fun getAppName_stateVersion_entireScreen_returnsNull() {
val result =
- underTest.getDialogMessage(
- MediaProjectionState.Projecting.EntireScreen("host.package"),
- R.string.accessibility_home,
- R.string.cast_screen_to_other_device_stop_dialog_message_specific_app,
- )
+ underTest.getAppName(MediaProjectionState.Projecting.EntireScreen("host.package"))
- assertThat(result).isEqualTo(context.getString(R.string.accessibility_home))
+ assertThat(result).isNull()
}
@Test
- fun getDialogMessage_singleTask_cannotFindPackage_isGenericMessage() {
+ fun getAppName_stateVersion_singleTask_cannotFindPackage_returnsNull() {
val baseIntent =
Intent().apply { this.component = ComponentName("fake.task.package", "cls") }
whenever(kosmos.packageManager.getApplicationInfo(eq("fake.task.package"), any<Int>()))
@@ -77,21 +72,17 @@ class EndMediaProjectionDialogHelperTest : SysuiTestCase() {
val projectionState =
MediaProjectionState.Projecting.SingleTask(
"host.package",
- createTask(taskId = 1, baseIntent = baseIntent)
+ hostDeviceName = null,
+ createTask(taskId = 1, baseIntent = baseIntent),
)
- val result =
- underTest.getDialogMessage(
- projectionState,
- R.string.accessibility_home,
- R.string.cast_screen_to_other_device_stop_dialog_message_specific_app,
- )
+ val result = underTest.getAppName(projectionState)
- assertThat(result).isEqualTo(context.getString(R.string.accessibility_home))
+ assertThat(result).isNull()
}
@Test
- fun getDialogMessage_singleTask_findsPackage_isSpecificMessageWithAppLabel() {
+ fun getAppName_stateVersion_singleTask_findsPackage_returnsName() {
val baseIntent =
Intent().apply { this.component = ComponentName("fake.task.package", "cls") }
val appInfo = mock<ApplicationInfo>()
@@ -102,93 +93,67 @@ class EndMediaProjectionDialogHelperTest : SysuiTestCase() {
val projectionState =
MediaProjectionState.Projecting.SingleTask(
"host.package",
- createTask(taskId = 1, baseIntent = baseIntent)
+ hostDeviceName = null,
+ createTask(taskId = 1, baseIntent = baseIntent),
)
- val result =
- underTest.getDialogMessage(
- projectionState,
- R.string.accessibility_home,
- R.string.cast_screen_to_other_device_stop_dialog_message_specific_app,
- )
+ val result = underTest.getAppName(projectionState)
- // It'd be nice to use the R.string resources directly, but they include the <b> tags which
- // aren't in the returned string.
- assertThat(result.toString()).isEqualTo("You will stop casting Fake Package")
+ assertThat(result).isEqualTo("Fake Package")
}
@Test
- fun getDialogMessage_nullTask_isGenericMessage() {
- val result =
- underTest.getDialogMessage(
- specificTaskInfo = null,
- R.string.accessibility_home,
- R.string.cast_screen_to_other_device_stop_dialog_message_specific_app,
- )
+ fun getAppName_taskInfoVersion_null_returnsNull() {
+ val result = underTest.getAppName(specificTaskInfo = null)
- assertThat(result).isEqualTo(context.getString(R.string.accessibility_home))
+ assertThat(result).isNull()
}
@Test
- fun getDialogMessage_withTask_cannotFindPackage_isGenericMessage() {
+ fun getAppName_taskInfoVersion_cannotFindPackage_returnsNull() {
val baseIntent =
Intent().apply { this.component = ComponentName("fake.task.package", "cls") }
whenever(kosmos.packageManager.getApplicationInfo(eq("fake.task.package"), any<Int>()))
.thenThrow(PackageManager.NameNotFoundException())
- val task = createTask(taskId = 1, baseIntent = baseIntent)
- val result =
- underTest.getDialogMessage(
- task,
- R.string.accessibility_home,
- R.string.cast_screen_to_other_device_stop_dialog_message_specific_app,
- )
+ val result = underTest.getAppName(createTask(taskId = 1, baseIntent = baseIntent))
- assertThat(result).isEqualTo(context.getString(R.string.accessibility_home))
+ assertThat(result).isNull()
}
@Test
- fun getDialogMessage_withTask_findsPackage_isSpecificMessageWithAppLabel() {
+ fun getAppName_taskInfoVersion_findsPackage_returnsName() {
val baseIntent =
Intent().apply { this.component = ComponentName("fake.task.package", "cls") }
val appInfo = mock<ApplicationInfo>()
whenever(appInfo.loadLabel(kosmos.packageManager)).thenReturn("Fake Package")
whenever(kosmos.packageManager.getApplicationInfo(eq("fake.task.package"), any<Int>()))
.thenReturn(appInfo)
- val task = createTask(taskId = 1, baseIntent = baseIntent)
- val result =
- underTest.getDialogMessage(
- task,
- R.string.accessibility_home,
- R.string.cast_screen_to_other_device_stop_dialog_message_specific_app,
- )
+ val result = underTest.getAppName(createTask(taskId = 1, baseIntent = baseIntent))
- assertThat(result.toString()).isEqualTo("You will stop casting Fake Package")
+ assertThat(result).isEqualTo("Fake Package")
}
@Test
- fun getDialogMessage_appLabelHasSpecialCharacters_isEscaped() {
- val baseIntent =
- Intent().apply { this.component = ComponentName("fake.task.package", "cls") }
+ fun getAppName_packageNameVersion_cannotFindPackage_returnsNull() {
+ whenever(kosmos.packageManager.getApplicationInfo(eq("fake.task.package"), any<Int>()))
+ .thenThrow(PackageManager.NameNotFoundException())
+
+ val result = underTest.getAppName("fake.task.package")
+
+ assertThat(result).isNull()
+ }
+
+ @Test
+ fun getAppName_packageNameVersion_findsPackage_returnsName() {
val appInfo = mock<ApplicationInfo>()
- whenever(appInfo.loadLabel(kosmos.packageManager)).thenReturn("Fake & Package <Here>")
+ whenever(appInfo.loadLabel(kosmos.packageManager)).thenReturn("Fake Package")
whenever(kosmos.packageManager.getApplicationInfo(eq("fake.task.package"), any<Int>()))
.thenReturn(appInfo)
- val projectionState =
- MediaProjectionState.Projecting.SingleTask(
- "host.package",
- createTask(taskId = 1, baseIntent = baseIntent)
- )
-
- val result =
- underTest.getDialogMessage(
- projectionState,
- R.string.accessibility_home,
- R.string.cast_screen_to_other_device_stop_dialog_message_specific_app,
- )
+ val result = underTest.getAppName("fake.task.package")
- assertThat(result.toString()).isEqualTo("You will stop casting Fake & Package <Here>")
+ assertThat(result).isEqualTo("Fake Package")
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/screenrecord/domain/interactor/ScreenRecordChipInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/screenrecord/domain/interactor/ScreenRecordChipInteractorTest.kt
index 83b31c2a7b94..6bfb40fa17c5 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/screenrecord/domain/interactor/ScreenRecordChipInteractorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/screenrecord/domain/interactor/ScreenRecordChipInteractorTest.kt
@@ -103,7 +103,11 @@ class ScreenRecordChipInteractorTest : SysuiTestCase() {
screenRecordRepo.screenRecordState.value = ScreenRecordModel.Recording
val task = createTask(taskId = 1)
mediaProjectionRepo.mediaProjectionState.value =
- MediaProjectionState.Projecting.SingleTask("host.package", task)
+ MediaProjectionState.Projecting.SingleTask(
+ "host.package",
+ hostDeviceName = null,
+ task,
+ )
assertThat(latest).isEqualTo(ScreenRecordChipModel.Recording(recordedTask = task))
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/screenrecord/ui/view/EndScreenRecordingDialogDelegateTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/screenrecord/ui/view/EndScreenRecordingDialogDelegateTest.kt
index 7e667de3619c..bfb63ac66d3d 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/screenrecord/ui/view/EndScreenRecordingDialogDelegateTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/screenrecord/ui/view/EndScreenRecordingDialogDelegateTest.kt
@@ -20,6 +20,7 @@ import android.app.ActivityManager
import android.content.ComponentName
import android.content.DialogInterface
import android.content.Intent
+import android.content.applicationContext
import android.content.packageManager
import android.content.pm.ApplicationInfo
import androidx.test.filters.SmallTest
@@ -95,11 +96,13 @@ class EndScreenRecordingDialogDelegateTest : SysuiTestCase() {
underTest.beforeCreate(sysuiDialog, /* savedInstanceState= */ null)
- // It'd be nice to use R.string.screenrecord_stop_dialog_message_specific_app directly, but
- // it includes the <b> tags which aren't in the returned string.
- val result = argumentCaptor<CharSequence>()
- verify(sysuiDialog).setMessage(result.capture())
- assertThat(result.firstValue.toString()).isEqualTo("You will stop recording Fake Package")
+ verify(sysuiDialog)
+ .setMessage(
+ context.getString(
+ R.string.screenrecord_stop_dialog_message_specific_app,
+ "Fake Package",
+ )
+ )
}
@Test
@@ -140,6 +143,7 @@ class EndScreenRecordingDialogDelegateTest : SysuiTestCase() {
underTest =
EndScreenRecordingDialogDelegate(
kosmos.endMediaProjectionDialogHelper,
+ kosmos.applicationContext,
stopAction = kosmos.screenRecordChipInteractor::stopRecording,
recordedTask,
)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/screenrecord/ui/viewmodel/ScreenRecordChipViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/screenrecord/ui/viewmodel/ScreenRecordChipViewModelTest.kt
index 0a06cc773727..b4a37ee1a55e 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/screenrecord/ui/viewmodel/ScreenRecordChipViewModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/screenrecord/ui/viewmodel/ScreenRecordChipViewModelTest.kt
@@ -16,9 +16,12 @@
package com.android.systemui.statusbar.chips.screenrecord.ui.viewmodel
+import android.content.DialogInterface
import android.view.View
import androidx.test.filters.SmallTest
+import com.android.internal.jank.Cuj
import com.android.systemui.SysuiTestCase
+import com.android.systemui.animation.DialogCuj
import com.android.systemui.animation.mockDialogTransitionAnimator
import com.android.systemui.common.shared.model.Icon
import com.android.systemui.coroutines.collectLastValue
@@ -31,10 +34,13 @@ import com.android.systemui.mediaprojection.taskswitcher.FakeActivityTaskManager
import com.android.systemui.res.R
import com.android.systemui.screenrecord.data.model.ScreenRecordModel
import com.android.systemui.screenrecord.data.repository.screenRecordRepository
+import com.android.systemui.statusbar.chips.mediaprojection.domain.interactor.MediaProjectionChipInteractorTest.Companion.setUpPackageManagerForMediaProjection
import com.android.systemui.statusbar.chips.screenrecord.ui.view.EndScreenRecordingDialogDelegate
+import com.android.systemui.statusbar.chips.sharetoapp.ui.viewmodel.shareToAppChipViewModel
import com.android.systemui.statusbar.chips.ui.model.ColorsModel
import com.android.systemui.statusbar.chips.ui.model.OngoingActivityChipModel
import com.android.systemui.statusbar.chips.ui.view.ChipBackgroundContainer
+import com.android.systemui.statusbar.chips.ui.viewmodel.OngoingActivityChipsViewModelTest.Companion.getStopActionFromDialog
import com.android.systemui.statusbar.phone.SystemUIDialog
import com.android.systemui.statusbar.phone.mockSystemUIDialogFactory
import com.android.systemui.util.time.fakeSystemClock
@@ -42,8 +48,9 @@ import com.google.common.truth.Truth.assertThat
import kotlin.test.Test
import kotlinx.coroutines.test.runTest
import org.junit.Before
-import org.mockito.ArgumentMatchers
+import org.mockito.ArgumentMatchers.anyBoolean
import org.mockito.kotlin.any
+import org.mockito.kotlin.argumentCaptor
import org.mockito.kotlin.eq
import org.mockito.kotlin.mock
import org.mockito.kotlin.verify
@@ -57,7 +64,6 @@ class ScreenRecordChipViewModelTest : SysuiTestCase() {
private val mediaProjectionRepo = kosmos.fakeMediaProjectionRepository
private val systemClock = kosmos.fakeSystemClock
private val mockSystemUIDialog = mock<SystemUIDialog>()
-
private val chipBackgroundView = mock<ChipBackgroundContainer>()
private val chipView =
mock<View>().apply {
@@ -73,6 +79,7 @@ class ScreenRecordChipViewModelTest : SysuiTestCase() {
@Before
fun setUp() {
+ setUpPackageManagerForMediaProjection(kosmos)
whenever(kosmos.mockSystemUIDialogFactory.create(any<EndScreenRecordingDialogDelegate>()))
.thenReturn(mockSystemUIDialog)
}
@@ -147,6 +154,40 @@ class ScreenRecordChipViewModelTest : SysuiTestCase() {
}
@Test
+ fun chip_recordingStoppedFromDialog_screenRecordAndShareToAppChipImmediatelyHidden() =
+ testScope.runTest {
+ val latest by collectLastValue(underTest.chip)
+ val latestShareToApp by collectLastValue(kosmos.shareToAppChipViewModel.chip)
+
+ // On real devices, when screen recording is active then share-to-app is also active
+ // because screen record is just a special case of share-to-app where the app receiving
+ // the share is SysUI
+ screenRecordRepo.screenRecordState.value = ScreenRecordModel.Recording
+ mediaProjectionRepo.mediaProjectionState.value =
+ MediaProjectionState.Projecting.EntireScreen("fake.package")
+
+ assertThat(latest).isInstanceOf(OngoingActivityChipModel.Shown::class.java)
+ assertThat(latestShareToApp).isInstanceOf(OngoingActivityChipModel.Shown::class.java)
+
+ // WHEN the stop action on the dialog is clicked
+ val dialogStopAction =
+ getStopActionFromDialog(latest, chipView, mockSystemUIDialog, kosmos)
+ dialogStopAction.onClick(mock<DialogInterface>(), 0)
+
+ // THEN both the screen record chip and the share-to-app chip are immediately hidden...
+ assertThat(latest).isInstanceOf(OngoingActivityChipModel.Hidden::class.java)
+ assertThat(latestShareToApp).isInstanceOf(OngoingActivityChipModel.Hidden::class.java)
+ // ...even though the repos still say it's recording
+ assertThat(screenRecordRepo.screenRecordState.value)
+ .isEqualTo(ScreenRecordModel.Recording)
+ assertThat(mediaProjectionRepo.mediaProjectionState.value)
+ .isInstanceOf(MediaProjectionState.Projecting::class.java)
+
+ // AND we specify no animation
+ assertThat((latest as OngoingActivityChipModel.Hidden).shouldAnimate).isFalse()
+ }
+
+ @Test
fun chip_startingState_colorsAreRed() =
testScope.runTest {
val latest by collectLastValue(underTest.chip)
@@ -203,8 +244,8 @@ class ScreenRecordChipViewModelTest : SysuiTestCase() {
.showFromView(
eq(mockSystemUIDialog),
eq(chipBackgroundView),
- eq(null),
- ArgumentMatchers.anyBoolean(),
+ any(),
+ anyBoolean(),
)
}
@@ -225,8 +266,8 @@ class ScreenRecordChipViewModelTest : SysuiTestCase() {
.showFromView(
eq(mockSystemUIDialog),
eq(chipBackgroundView),
- eq(null),
- ArgumentMatchers.anyBoolean(),
+ any(),
+ anyBoolean(),
)
}
@@ -238,6 +279,7 @@ class ScreenRecordChipViewModelTest : SysuiTestCase() {
mediaProjectionRepo.mediaProjectionState.value =
MediaProjectionState.Projecting.SingleTask(
"host.package",
+ hostDeviceName = null,
FakeActivityTaskManager.createTask(taskId = 1)
)
@@ -250,8 +292,33 @@ class ScreenRecordChipViewModelTest : SysuiTestCase() {
.showFromView(
eq(mockSystemUIDialog),
eq(chipBackgroundView),
- eq(null),
- ArgumentMatchers.anyBoolean(),
+ any(),
+ anyBoolean(),
+ )
+ }
+
+ @Test
+ fun chip_clickListenerHasCuj() =
+ testScope.runTest {
+ val latest by collectLastValue(underTest.chip)
+ screenRecordRepo.screenRecordState.value = ScreenRecordModel.Recording
+ mediaProjectionRepo.mediaProjectionState.value =
+ MediaProjectionState.Projecting.EntireScreen("host.package")
+
+ val clickListener = ((latest as OngoingActivityChipModel.Shown).onClickListener)
+ clickListener!!.onClick(chipView)
+
+ val cujCaptor = argumentCaptor<DialogCuj>()
+ verify(kosmos.mockDialogTransitionAnimator)
+ .showFromView(
+ any(),
+ any(),
+ cujCaptor.capture(),
+ anyBoolean(),
)
+
+ assertThat(cujCaptor.firstValue.cujType)
+ .isEqualTo(Cuj.CUJ_STATUS_BAR_LAUNCH_DIALOG_FROM_CHIP)
+ assertThat(cujCaptor.firstValue.tag).contains("Screen record")
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/sharetoapp/ui/view/EndShareToAppDialogDelegateTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/sharetoapp/ui/view/EndShareToAppDialogDelegateTest.kt
index 63c29ac81b34..325a42bca7d1 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/sharetoapp/ui/view/EndShareToAppDialogDelegateTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/sharetoapp/ui/view/EndShareToAppDialogDelegateTest.kt
@@ -19,8 +19,10 @@ package com.android.systemui.statusbar.chips.sharetoapp.ui.view
import android.content.ComponentName
import android.content.DialogInterface
import android.content.Intent
+import android.content.applicationContext
import android.content.packageManager
import android.content.pm.ApplicationInfo
+import android.content.pm.PackageManager
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.kosmos.Kosmos
@@ -65,6 +67,8 @@ class EndShareToAppDialogDelegateTest : SysuiTestCase() {
@Test
fun title() {
createAndSetDelegate(ENTIRE_SCREEN)
+ whenever(kosmos.packageManager.getApplicationInfo(eq(HOST_PACKAGE), any<Int>()))
+ .thenThrow(PackageManager.NameNotFoundException())
underTest.beforeCreate(sysuiDialog, /* savedInstanceState= */ null)
@@ -72,16 +76,61 @@ class EndShareToAppDialogDelegateTest : SysuiTestCase() {
}
@Test
- fun message_entireScreen() {
+ fun message_entireScreen_unknownHostPackage() {
createAndSetDelegate(ENTIRE_SCREEN)
+ whenever(kosmos.packageManager.getApplicationInfo(eq(HOST_PACKAGE), any<Int>()))
+ .thenThrow(PackageManager.NameNotFoundException())
underTest.beforeCreate(sysuiDialog, /* savedInstanceState= */ null)
- verify(sysuiDialog).setMessage(context.getString(R.string.share_to_app_stop_dialog_message))
+ verify(sysuiDialog)
+ .setMessage(context.getString(R.string.share_to_app_stop_dialog_message_entire_screen))
}
@Test
- fun message_singleTask() {
+ fun message_entireScreen_hasHostPackage() {
+ createAndSetDelegate(ENTIRE_SCREEN)
+ val hostAppInfo = mock<ApplicationInfo>()
+ whenever(hostAppInfo.loadLabel(kosmos.packageManager)).thenReturn("Host Package")
+ whenever(kosmos.packageManager.getApplicationInfo(eq(HOST_PACKAGE), any<Int>()))
+ .thenReturn(hostAppInfo)
+
+ underTest.beforeCreate(sysuiDialog, /* savedInstanceState= */ null)
+
+ verify(sysuiDialog)
+ .setMessage(
+ context.getString(
+ R.string.share_to_app_stop_dialog_message_entire_screen_with_host_app,
+ "Host Package",
+ )
+ )
+ }
+
+ @Test
+ fun message_singleTask_unknownAppName() {
+ val baseIntent =
+ Intent().apply { this.component = ComponentName("fake.task.package", "cls") }
+ whenever(kosmos.packageManager.getApplicationInfo(eq("fake.task.package"), any<Int>()))
+ .thenThrow(PackageManager.NameNotFoundException())
+
+ createAndSetDelegate(
+ MediaProjectionState.Projecting.SingleTask(
+ HOST_PACKAGE,
+ hostDeviceName = null,
+ createTask(taskId = 1, baseIntent = baseIntent)
+ )
+ )
+
+ underTest.beforeCreate(sysuiDialog, /* savedInstanceState= */ null)
+
+ verify(sysuiDialog)
+ .setMessage(
+ context.getString(R.string.share_to_app_stop_dialog_message_single_app_generic)
+ )
+ }
+
+ @Test
+ fun message_singleTask_hasAppName() {
val baseIntent =
Intent().apply { this.component = ComponentName("fake.task.package", "cls") }
val appInfo = mock<ApplicationInfo>()
@@ -92,17 +141,20 @@ class EndShareToAppDialogDelegateTest : SysuiTestCase() {
createAndSetDelegate(
MediaProjectionState.Projecting.SingleTask(
HOST_PACKAGE,
+ hostDeviceName = null,
createTask(taskId = 1, baseIntent = baseIntent)
)
)
underTest.beforeCreate(sysuiDialog, /* savedInstanceState= */ null)
- // It'd be nice to use R.string.share_to_app_stop_dialog_message_specific_app directly, but
- // it includes the <b> tags which aren't in the returned string.
- val result = argumentCaptor<CharSequence>()
- verify(sysuiDialog).setMessage(result.capture())
- assertThat(result.firstValue.toString()).isEqualTo("You will stop sharing Fake Package")
+ verify(sysuiDialog)
+ .setMessage(
+ context.getString(
+ R.string.share_to_app_stop_dialog_message_single_app_specific,
+ "Fake Package",
+ )
+ )
}
@Test
@@ -118,6 +170,8 @@ class EndShareToAppDialogDelegateTest : SysuiTestCase() {
fun positiveButton() =
kosmos.testScope.runTest {
createAndSetDelegate(ENTIRE_SCREEN)
+ whenever(kosmos.packageManager.getApplicationInfo(eq(HOST_PACKAGE), any<Int>()))
+ .thenThrow(PackageManager.NameNotFoundException())
underTest.beforeCreate(sysuiDialog, /* savedInstanceState= */ null)
@@ -143,8 +197,12 @@ class EndShareToAppDialogDelegateTest : SysuiTestCase() {
underTest =
EndShareToAppDialogDelegate(
kosmos.endMediaProjectionDialogHelper,
+ kosmos.applicationContext,
stopAction = kosmos.mediaProjectionChipInteractor::stopProjecting,
- ProjectionChipModel.Projecting(ProjectionChipModel.Type.SHARE_TO_APP, state),
+ ProjectionChipModel.Projecting(
+ ProjectionChipModel.Type.SHARE_TO_APP,
+ state,
+ ),
)
}
@@ -152,6 +210,10 @@ class EndShareToAppDialogDelegateTest : SysuiTestCase() {
private const val HOST_PACKAGE = "fake.host.package"
private val ENTIRE_SCREEN = MediaProjectionState.Projecting.EntireScreen(HOST_PACKAGE)
private val SINGLE_TASK =
- MediaProjectionState.Projecting.SingleTask(HOST_PACKAGE, createTask(taskId = 1))
+ MediaProjectionState.Projecting.SingleTask(
+ HOST_PACKAGE,
+ hostDeviceName = null,
+ createTask(taskId = 1)
+ )
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/sharetoapp/ui/viewmodel/ShareToAppChipViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/sharetoapp/ui/viewmodel/ShareToAppChipViewModelTest.kt
index 3028d008f01d..2658679dee08 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/sharetoapp/ui/viewmodel/ShareToAppChipViewModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/sharetoapp/ui/viewmodel/ShareToAppChipViewModelTest.kt
@@ -16,9 +16,12 @@
package com.android.systemui.statusbar.chips.sharetoapp.ui.viewmodel
+import android.content.DialogInterface
import android.view.View
import androidx.test.filters.SmallTest
+import com.android.internal.jank.Cuj
import com.android.systemui.SysuiTestCase
+import com.android.systemui.animation.DialogCuj
import com.android.systemui.animation.mockDialogTransitionAnimator
import com.android.systemui.common.shared.model.Icon
import com.android.systemui.coroutines.collectLastValue
@@ -36,6 +39,7 @@ import com.android.systemui.statusbar.chips.sharetoapp.ui.view.EndShareToAppDial
import com.android.systemui.statusbar.chips.ui.model.ColorsModel
import com.android.systemui.statusbar.chips.ui.model.OngoingActivityChipModel
import com.android.systemui.statusbar.chips.ui.view.ChipBackgroundContainer
+import com.android.systemui.statusbar.chips.ui.viewmodel.OngoingActivityChipsViewModelTest.Companion.getStopActionFromDialog
import com.android.systemui.statusbar.phone.SystemUIDialog
import com.android.systemui.statusbar.phone.mockSystemUIDialogFactory
import com.android.systemui.util.time.fakeSystemClock
@@ -43,8 +47,9 @@ import com.google.common.truth.Truth.assertThat
import kotlin.test.Test
import kotlinx.coroutines.test.runTest
import org.junit.Before
-import org.mockito.ArgumentMatchers
+import org.mockito.ArgumentMatchers.anyBoolean
import org.mockito.kotlin.any
+import org.mockito.kotlin.argumentCaptor
import org.mockito.kotlin.eq
import org.mockito.kotlin.mock
import org.mockito.kotlin.verify
@@ -58,7 +63,6 @@ class ShareToAppChipViewModelTest : SysuiTestCase() {
private val systemClock = kosmos.fakeSystemClock
private val mockShareDialog = mock<SystemUIDialog>()
-
private val chipBackgroundView = mock<ChipBackgroundContainer>()
private val chipView =
mock<View>().apply {
@@ -98,6 +102,7 @@ class ShareToAppChipViewModelTest : SysuiTestCase() {
mediaProjectionRepo.mediaProjectionState.value =
MediaProjectionState.Projecting.SingleTask(
CAST_TO_OTHER_DEVICES_PACKAGE,
+ hostDeviceName = null,
createTask(taskId = 1),
)
@@ -123,6 +128,7 @@ class ShareToAppChipViewModelTest : SysuiTestCase() {
mediaProjectionRepo.mediaProjectionState.value =
MediaProjectionState.Projecting.SingleTask(
NORMAL_PACKAGE,
+ hostDeviceName = null,
createTask(taskId = 1),
)
@@ -147,6 +153,31 @@ class ShareToAppChipViewModelTest : SysuiTestCase() {
}
@Test
+ fun chip_shareStoppedFromDialog_chipImmediatelyHidden() =
+ testScope.runTest {
+ val latest by collectLastValue(underTest.chip)
+
+ mediaProjectionRepo.mediaProjectionState.value =
+ MediaProjectionState.Projecting.EntireScreen(NORMAL_PACKAGE)
+
+ assertThat(latest).isInstanceOf(OngoingActivityChipModel.Shown::class.java)
+
+ // WHEN the stop action on the dialog is clicked
+ val dialogStopAction =
+ getStopActionFromDialog(latest, chipView, mockShareDialog, kosmos)
+ dialogStopAction.onClick(mock<DialogInterface>(), 0)
+
+ // THEN the chip is immediately hidden...
+ assertThat(latest).isInstanceOf(OngoingActivityChipModel.Hidden::class.java)
+ // ...even though the repo still says it's projecting
+ assertThat(mediaProjectionRepo.mediaProjectionState.value)
+ .isInstanceOf(MediaProjectionState.Projecting::class.java)
+
+ // AND we specify no animation
+ assertThat((latest as OngoingActivityChipModel.Hidden).shouldAnimate).isFalse()
+ }
+
+ @Test
fun chip_colorsAreRed() =
testScope.runTest {
val latest by collectLastValue(underTest.chip)
@@ -176,6 +207,7 @@ class ShareToAppChipViewModelTest : SysuiTestCase() {
mediaProjectionRepo.mediaProjectionState.value =
MediaProjectionState.Projecting.SingleTask(
NORMAL_PACKAGE,
+ hostDeviceName = null,
createTask(taskId = 1),
)
@@ -198,8 +230,8 @@ class ShareToAppChipViewModelTest : SysuiTestCase() {
.showFromView(
eq(mockShareDialog),
eq(chipBackgroundView),
- eq(null),
- ArgumentMatchers.anyBoolean(),
+ any(),
+ anyBoolean(),
)
}
@@ -210,6 +242,7 @@ class ShareToAppChipViewModelTest : SysuiTestCase() {
mediaProjectionRepo.mediaProjectionState.value =
MediaProjectionState.Projecting.SingleTask(
NORMAL_PACKAGE,
+ hostDeviceName = null,
createTask(taskId = 1),
)
@@ -221,8 +254,36 @@ class ShareToAppChipViewModelTest : SysuiTestCase() {
.showFromView(
eq(mockShareDialog),
eq(chipBackgroundView),
- eq(null),
- ArgumentMatchers.anyBoolean(),
+ any(),
+ anyBoolean(),
)
}
+
+ @Test
+ fun chip_clickListenerHasCuj() =
+ testScope.runTest {
+ val latest by collectLastValue(underTest.chip)
+ mediaProjectionRepo.mediaProjectionState.value =
+ MediaProjectionState.Projecting.SingleTask(
+ NORMAL_PACKAGE,
+ hostDeviceName = null,
+ createTask(taskId = 1),
+ )
+
+ val clickListener = ((latest as OngoingActivityChipModel.Shown).onClickListener)
+ clickListener!!.onClick(chipView)
+
+ val cujCaptor = argumentCaptor<DialogCuj>()
+ verify(kosmos.mockDialogTransitionAnimator)
+ .showFromView(
+ any(),
+ any(),
+ cujCaptor.capture(),
+ anyBoolean(),
+ )
+
+ assertThat(cujCaptor.firstValue.cujType)
+ .isEqualTo(Cuj.CUJ_STATUS_BAR_LAUNCH_DIALOG_FROM_CHIP)
+ assertThat(cujCaptor.firstValue.tag).contains("Share")
+ }
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/ui/viewmodel/ChipTransitionHelperTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/ui/viewmodel/ChipTransitionHelperTest.kt
new file mode 100644
index 000000000000..b9049e8f76b6
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/ui/viewmodel/ChipTransitionHelperTest.kt
@@ -0,0 +1,154 @@
+/*
+ * 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.chips.ui.viewmodel
+
+import androidx.test.filters.SmallTest
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.common.shared.model.Icon
+import com.android.systemui.coroutines.collectLastValue
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.applicationCoroutineScope
+import com.android.systemui.kosmos.testScope
+import com.android.systemui.res.R
+import com.android.systemui.statusbar.chips.ui.model.ColorsModel
+import com.android.systemui.statusbar.chips.ui.model.OngoingActivityChipModel
+import com.google.common.truth.Truth.assertThat
+import kotlin.test.Test
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.flow.MutableStateFlow
+import kotlinx.coroutines.test.advanceTimeBy
+import kotlinx.coroutines.test.runCurrent
+import kotlinx.coroutines.test.runTest
+
+@SmallTest
+@OptIn(ExperimentalCoroutinesApi::class)
+class ChipTransitionHelperTest : SysuiTestCase() {
+ private val kosmos = Kosmos()
+ private val testScope = kosmos.testScope
+
+ @Test
+ fun createChipFlow_typicallyFollowsInputFlow() =
+ testScope.runTest {
+ val underTest = ChipTransitionHelper(kosmos.applicationCoroutineScope)
+ val inputChipFlow =
+ MutableStateFlow<OngoingActivityChipModel>(OngoingActivityChipModel.Hidden())
+ val latest by collectLastValue(underTest.createChipFlow(inputChipFlow))
+
+ val newChip =
+ OngoingActivityChipModel.Shown.Timer(
+ icon = Icon.Resource(R.drawable.ic_cake, contentDescription = null),
+ colors = ColorsModel.Themed,
+ startTimeMs = 100L,
+ onClickListener = null,
+ )
+
+ inputChipFlow.value = newChip
+
+ assertThat(latest).isEqualTo(newChip)
+
+ val newerChip =
+ OngoingActivityChipModel.Shown.IconOnly(
+ icon = Icon.Resource(R.drawable.ic_hotspot, contentDescription = null),
+ colors = ColorsModel.Themed,
+ onClickListener = null,
+ )
+
+ inputChipFlow.value = newerChip
+
+ assertThat(latest).isEqualTo(newerChip)
+ }
+
+ @Test
+ fun activityStopped_chipHiddenWithoutAnimationFor500ms() =
+ testScope.runTest {
+ val underTest = ChipTransitionHelper(kosmos.applicationCoroutineScope)
+ val inputChipFlow =
+ MutableStateFlow<OngoingActivityChipModel>(OngoingActivityChipModel.Hidden())
+ val latest by collectLastValue(underTest.createChipFlow(inputChipFlow))
+
+ val shownChip =
+ OngoingActivityChipModel.Shown.Timer(
+ icon = Icon.Resource(R.drawable.ic_cake, contentDescription = null),
+ colors = ColorsModel.Themed,
+ startTimeMs = 100L,
+ onClickListener = null,
+ )
+
+ inputChipFlow.value = shownChip
+
+ assertThat(latest).isEqualTo(shownChip)
+
+ // WHEN #onActivityStopped is invoked
+ underTest.onActivityStoppedFromDialog()
+ runCurrent()
+
+ // THEN the chip is hidden and has no animation
+ assertThat(latest).isEqualTo(OngoingActivityChipModel.Hidden(shouldAnimate = false))
+
+ // WHEN only 250ms have elapsed
+ advanceTimeBy(250)
+
+ // THEN the chip is still hidden
+ assertThat(latest).isEqualTo(OngoingActivityChipModel.Hidden(shouldAnimate = false))
+
+ // WHEN over 500ms have elapsed
+ advanceTimeBy(251)
+
+ // THEN the chip returns to the original input flow value
+ assertThat(latest).isEqualTo(shownChip)
+ }
+
+ @Test
+ fun activityStopped_stoppedAgainBefore500ms_chipReshownAfterSecond500ms() =
+ testScope.runTest {
+ val underTest = ChipTransitionHelper(kosmos.applicationCoroutineScope)
+ val inputChipFlow =
+ MutableStateFlow<OngoingActivityChipModel>(OngoingActivityChipModel.Hidden())
+ val latest by collectLastValue(underTest.createChipFlow(inputChipFlow))
+
+ val shownChip =
+ OngoingActivityChipModel.Shown.Timer(
+ icon = Icon.Resource(R.drawable.ic_cake, contentDescription = null),
+ colors = ColorsModel.Themed,
+ startTimeMs = 100L,
+ onClickListener = null,
+ )
+
+ inputChipFlow.value = shownChip
+
+ assertThat(latest).isEqualTo(shownChip)
+
+ // WHEN #onActivityStopped is invoked
+ underTest.onActivityStoppedFromDialog()
+ runCurrent()
+
+ // THEN the chip is hidden and has no animation
+ assertThat(latest).isEqualTo(OngoingActivityChipModel.Hidden(shouldAnimate = false))
+
+ // WHEN 250ms have elapsed, get another stop event
+ advanceTimeBy(250)
+ underTest.onActivityStoppedFromDialog()
+ runCurrent()
+
+ // THEN the chip is still hidden for another 500ms afterwards
+ assertThat(latest).isEqualTo(OngoingActivityChipModel.Hidden(shouldAnimate = false))
+ advanceTimeBy(499)
+ assertThat(latest).isEqualTo(OngoingActivityChipModel.Hidden(shouldAnimate = false))
+ advanceTimeBy(2)
+ assertThat(latest).isEqualTo(shownChip)
+ }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipViewModelTest.kt
index c9c7359a89eb..6e4d8863fee2 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipViewModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipViewModelTest.kt
@@ -18,8 +18,11 @@ package com.android.systemui.statusbar.chips.ui.viewmodel
import android.view.View
import androidx.test.filters.SmallTest
+import com.android.internal.jank.Cuj
import com.android.systemui.SysuiTestCase
+import com.android.systemui.animation.DialogCuj
import com.android.systemui.animation.DialogTransitionAnimator
+import com.android.systemui.log.logcatLogBuffer
import com.android.systemui.res.R
import com.android.systemui.statusbar.chips.ui.view.ChipBackgroundContainer
import com.android.systemui.statusbar.chips.ui.viewmodel.OngoingActivityChipViewModel.Companion.createDialogLaunchOnClickListener
@@ -50,19 +53,23 @@ class OngoingActivityChipViewModelTest : SysuiTestCase() {
@Test
fun createDialogLaunchOnClickListener_showsDialogOnClick() {
+ val cuj = DialogCuj(Cuj.CUJ_STATUS_BAR_LAUNCH_DIALOG_FROM_CHIP, tag = "Test")
val clickListener =
- createDialogLaunchOnClickListener(dialogDelegate, dialogTransitionAnimator)
+ createDialogLaunchOnClickListener(
+ dialogDelegate,
+ dialogTransitionAnimator,
+ cuj,
+ logcatLogBuffer("OngoingActivityChipViewModelTest"),
+ "tag",
+ )
- // Dialogs must be created on the main thread
- context.mainExecutor.execute {
- clickListener.onClick(chipView)
- verify(dialogTransitionAnimator)
- .showFromView(
- eq(mockSystemUIDialog),
- eq(chipBackgroundView),
- eq(null),
- anyBoolean(),
- )
- }
+ clickListener.onClick(chipView)
+ verify(dialogTransitionAnimator)
+ .showFromView(
+ eq(mockSystemUIDialog),
+ eq(chipBackgroundView),
+ eq(cuj),
+ anyBoolean(),
+ )
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipsViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipsViewModelTest.kt
index 8bc83cf2f3c2..ee249f0f8a2c 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipsViewModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipsViewModelTest.kt
@@ -16,6 +16,10 @@
package com.android.systemui.statusbar.chips.ui.viewmodel
+import android.content.DialogInterface
+import android.content.packageManager
+import android.content.pm.PackageManager
+import android.view.View
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
@@ -33,10 +37,14 @@ import com.android.systemui.screenrecord.data.repository.screenRecordRepository
import com.android.systemui.statusbar.chips.mediaprojection.domain.interactor.MediaProjectionChipInteractorTest.Companion.NORMAL_PACKAGE
import com.android.systemui.statusbar.chips.mediaprojection.domain.interactor.MediaProjectionChipInteractorTest.Companion.setUpPackageManagerForMediaProjection
import com.android.systemui.statusbar.chips.ui.model.OngoingActivityChipModel
+import com.android.systemui.statusbar.chips.ui.view.ChipBackgroundContainer
+import com.android.systemui.statusbar.phone.SystemUIDialog
+import com.android.systemui.statusbar.phone.mockSystemUIDialogFactory
import com.android.systemui.statusbar.phone.ongoingcall.data.repository.ongoingCallRepository
import com.android.systemui.statusbar.phone.ongoingcall.shared.model.OngoingCallModel
import com.android.systemui.util.time.fakeSystemClock
import com.google.common.truth.Truth.assertThat
+import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.test.runCurrent
@@ -44,9 +52,17 @@ import kotlinx.coroutines.test.runTest
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
+import org.mockito.Mockito
+import org.mockito.kotlin.any
+import org.mockito.kotlin.argumentCaptor
+import org.mockito.kotlin.eq
+import org.mockito.kotlin.mock
+import org.mockito.kotlin.verify
+import org.mockito.kotlin.whenever
@SmallTest
@RunWith(AndroidJUnit4::class)
+@OptIn(ExperimentalCoroutinesApi::class)
class OngoingActivityChipsViewModelTest : SysuiTestCase() {
private val kosmos = Kosmos().also { it.testCase = this }
private val testScope = kosmos.testScope
@@ -56,6 +72,18 @@ class OngoingActivityChipsViewModelTest : SysuiTestCase() {
private val mediaProjectionState = kosmos.fakeMediaProjectionRepository.mediaProjectionState
private val callRepo = kosmos.ongoingCallRepository
+ private val mockSystemUIDialog = mock<SystemUIDialog>()
+ private val chipBackgroundView = mock<ChipBackgroundContainer>()
+ private val chipView =
+ mock<View>().apply {
+ whenever(
+ this.requireViewById<ChipBackgroundContainer>(
+ R.id.ongoing_activity_chip_background
+ )
+ )
+ .thenReturn(chipBackgroundView)
+ }
+
private val underTest = kosmos.ongoingActivityChipsViewModel
@Before
@@ -72,7 +100,7 @@ class OngoingActivityChipsViewModelTest : SysuiTestCase() {
val latest by collectLastValue(underTest.chip)
- assertThat(latest).isEqualTo(OngoingActivityChipModel.Hidden)
+ assertThat(latest).isInstanceOf(OngoingActivityChipModel.Hidden::class.java)
}
@Test
@@ -155,6 +183,7 @@ class OngoingActivityChipsViewModelTest : SysuiTestCase() {
mediaProjectionState.value =
MediaProjectionState.Projecting.SingleTask(
NORMAL_PACKAGE,
+ hostDeviceName = null,
createTask(taskId = 1),
)
@@ -229,7 +258,81 @@ class OngoingActivityChipsViewModelTest : SysuiTestCase() {
job2.cancel()
}
+ @Test
+ fun chip_screenRecordStoppedViaDialog_chipHiddenWithoutAnimation() =
+ testScope.runTest {
+ screenRecordState.value = ScreenRecordModel.Recording
+ mediaProjectionState.value = MediaProjectionState.NotProjecting
+ callRepo.setOngoingCallState(OngoingCallModel.NoCall)
+
+ val latest by collectLastValue(underTest.chip)
+
+ assertIsScreenRecordChip(latest)
+
+ // WHEN screen record gets stopped via dialog
+ val dialogStopAction =
+ getStopActionFromDialog(latest, chipView, mockSystemUIDialog, kosmos)
+ dialogStopAction.onClick(mock<DialogInterface>(), 0)
+
+ // THEN the chip is immediately hidden with no animation
+ assertThat(latest).isEqualTo(OngoingActivityChipModel.Hidden(shouldAnimate = false))
+ }
+
+ @Test
+ fun chip_projectionStoppedViaDialog_chipHiddenWithoutAnimation() =
+ testScope.runTest {
+ mediaProjectionState.value =
+ MediaProjectionState.Projecting.EntireScreen(NORMAL_PACKAGE)
+ screenRecordState.value = ScreenRecordModel.DoingNothing
+ callRepo.setOngoingCallState(OngoingCallModel.NoCall)
+
+ val latest by collectLastValue(underTest.chip)
+
+ assertIsShareToAppChip(latest)
+
+ // WHEN media projection gets stopped via dialog
+ val dialogStopAction =
+ getStopActionFromDialog(latest, chipView, mockSystemUIDialog, kosmos)
+ dialogStopAction.onClick(mock<DialogInterface>(), 0)
+
+ // THEN the chip is immediately hidden with no animation
+ assertThat(latest).isEqualTo(OngoingActivityChipModel.Hidden(shouldAnimate = false))
+ }
+
companion object {
+ /**
+ * Assuming that the click listener in [latest] opens a dialog, this fetches the action
+ * associated with the positive button, which we assume is the "Stop sharing" action.
+ */
+ fun getStopActionFromDialog(
+ latest: OngoingActivityChipModel?,
+ chipView: View,
+ dialog: SystemUIDialog,
+ kosmos: Kosmos
+ ): DialogInterface.OnClickListener {
+ // Capture the action that would get invoked when the user clicks "Stop" on the dialog
+ lateinit var dialogStopAction: DialogInterface.OnClickListener
+ Mockito.doAnswer {
+ val delegate = it.arguments[0] as SystemUIDialog.Delegate
+ delegate.beforeCreate(dialog, /* savedInstanceState= */ null)
+
+ val stopActionCaptor = argumentCaptor<DialogInterface.OnClickListener>()
+ verify(dialog).setPositiveButton(any(), stopActionCaptor.capture())
+ dialogStopAction = stopActionCaptor.firstValue
+
+ return@doAnswer dialog
+ }
+ .whenever(kosmos.mockSystemUIDialogFactory)
+ .create(any<SystemUIDialog.Delegate>())
+ whenever(kosmos.packageManager.getApplicationInfo(eq(NORMAL_PACKAGE), any<Int>()))
+ .thenThrow(PackageManager.NameNotFoundException())
+ // Click the chip so that we open the dialog and we fill in [dialogStopAction]
+ val clickListener = ((latest as OngoingActivityChipModel.Shown).onClickListener)
+ clickListener!!.onClick(chipView)
+
+ return dialogStopAction
+ }
+
fun assertIsScreenRecordChip(latest: OngoingActivityChipModel?) {
assertThat(latest).isInstanceOf(OngoingActivityChipModel.Shown::class.java)
val icon = (latest as OngoingActivityChipModel.Shown).icon
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationSectionsFeatureManagerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationSectionsFeatureManagerTest.kt
index acb005f6e72f..0407fc14d35a 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationSectionsFeatureManagerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationSectionsFeatureManagerTest.kt
@@ -42,7 +42,7 @@ import org.mockito.quality.Strictness
@RunWith(AndroidJUnit4::class)
@SmallTest
// this class has no testable logic with either of these flags enabled
-@DisableFlags(PriorityPeopleSection.FLAG_NAME, NotificationMinimalismPrototype.V2.FLAG_NAME)
+@DisableFlags(PriorityPeopleSection.FLAG_NAME, NotificationMinimalismPrototype.FLAG_NAME)
class NotificationSectionsFeatureManagerTest : SysuiTestCase() {
lateinit var manager: NotificationSectionsFeatureManager
private val proxyFake = DeviceConfigProxyFake()
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/coordinator/KeyguardCoordinatorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/coordinator/KeyguardCoordinatorTest.kt
index d87b3e23b471..4218be26c58e 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/coordinator/KeyguardCoordinatorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/coordinator/KeyguardCoordinatorTest.kt
@@ -13,88 +13,57 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-@file:OptIn(ExperimentalCoroutinesApi::class)
package com.android.systemui.statusbar.notification.collection.coordinator
-import android.app.Notification
-import android.os.UserHandle
-import android.platform.test.flag.junit.FlagsParameterization
-import android.provider.Settings
+import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
-import com.android.systemui.dump.DumpManager
-import com.android.systemui.flags.andSceneContainer
-import com.android.systemui.keyguard.data.repository.FakeKeyguardRepository
-import com.android.systemui.keyguard.data.repository.fakeKeyguardTransitionRepository
-import com.android.systemui.keyguard.domain.interactor.keyguardTransitionInteractor
-import com.android.systemui.keyguard.shared.model.KeyguardState
-import com.android.systemui.keyguard.shared.model.TransitionStep
-import com.android.systemui.kosmos.Kosmos
-import com.android.systemui.log.logcatLogBuffer
import com.android.systemui.plugins.statusbar.StatusBarStateController
-import com.android.systemui.scene.data.repository.Idle
-import com.android.systemui.scene.data.repository.setTransition
-import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.statusbar.StatusBarState
-import com.android.systemui.statusbar.notification.collection.GroupEntryBuilder
import com.android.systemui.statusbar.notification.collection.NotifPipeline
-import com.android.systemui.statusbar.notification.collection.NotificationEntryBuilder
-import com.android.systemui.statusbar.notification.collection.listbuilder.pluggable.NotifFilter
-import com.android.systemui.statusbar.notification.collection.listbuilder.pluggable.Pluggable
-import com.android.systemui.statusbar.notification.collection.notifcollection.NotifCollectionListener
import com.android.systemui.statusbar.notification.collection.provider.SectionHeaderVisibilityProvider
-import com.android.systemui.statusbar.notification.data.repository.ActiveNotificationListRepository
-import com.android.systemui.statusbar.notification.domain.interactor.SeenNotificationsInteractor
import com.android.systemui.statusbar.notification.interruption.KeyguardNotificationVisibilityProvider
-import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow
-import com.android.systemui.statusbar.policy.HeadsUpManager
-import com.android.systemui.statusbar.policy.OnHeadsUpChangedListener
-import com.android.systemui.util.mockito.any
-import com.android.systemui.util.mockito.eq
-import com.android.systemui.util.mockito.mock
-import com.android.systemui.util.mockito.withArgCaptor
-import com.android.systemui.util.settings.FakeSettings
-import com.google.common.truth.Truth.assertThat
import java.util.function.Consumer
-import kotlin.time.Duration.Companion.seconds
-import kotlinx.coroutines.CoroutineScope
-import kotlinx.coroutines.ExperimentalCoroutinesApi
-import kotlinx.coroutines.test.TestCoroutineScheduler
-import kotlinx.coroutines.test.TestScope
-import kotlinx.coroutines.test.UnconfinedTestDispatcher
-import kotlinx.coroutines.test.runTest
+import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
-import org.mockito.ArgumentMatchers.same
-import org.mockito.Mockito.anyString
import org.mockito.Mockito.clearInvocations
-import org.mockito.Mockito.never
import org.mockito.Mockito.verify
-import org.mockito.Mockito.`when` as whenever
-import platform.test.runner.parameterized.ParameterizedAndroidJunit4
-import platform.test.runner.parameterized.Parameters
+import org.mockito.kotlin.argumentCaptor
+import org.mockito.kotlin.eq
+import org.mockito.kotlin.mock
+import org.mockito.kotlin.whenever
@SmallTest
-@RunWith(ParameterizedAndroidJunit4::class)
-class KeyguardCoordinatorTest(flags: FlagsParameterization) : SysuiTestCase() {
+@RunWith(AndroidJUnit4::class)
+class KeyguardCoordinatorTest : SysuiTestCase() {
- private val kosmos = Kosmos()
-
- private val headsUpManager: HeadsUpManager = mock()
private val keyguardNotifVisibilityProvider: KeyguardNotificationVisibilityProvider = mock()
- private val keyguardRepository = FakeKeyguardRepository()
- private val keyguardTransitionRepository = kosmos.fakeKeyguardTransitionRepository
private val notifPipeline: NotifPipeline = mock()
private val sectionHeaderVisibilityProvider: SectionHeaderVisibilityProvider = mock()
private val statusBarStateController: StatusBarStateController = mock()
- init {
- mSetFlagsRule.setFlagsParameterization(flags)
+ private lateinit var onStateChangeListener: Consumer<String>
+
+ @Before
+ fun setup() {
+ val keyguardCoordinator =
+ KeyguardCoordinator(
+ keyguardNotifVisibilityProvider,
+ sectionHeaderVisibilityProvider,
+ statusBarStateController,
+ )
+ keyguardCoordinator.attach(notifPipeline)
+ onStateChangeListener =
+ argumentCaptor {
+ verify(keyguardNotifVisibilityProvider).addOnStateChangedListener(capture())
+ }
+ .lastValue
}
@Test
- fun testSetSectionHeadersVisibleInShade() = runKeyguardCoordinatorTest {
+ fun testSetSectionHeadersVisibleInShade() {
clearInvocations(sectionHeaderVisibilityProvider)
whenever(statusBarStateController.state).thenReturn(StatusBarState.SHADE)
onStateChangeListener.accept("state change")
@@ -102,617 +71,10 @@ class KeyguardCoordinatorTest(flags: FlagsParameterization) : SysuiTestCase() {
}
@Test
- fun testSetSectionHeadersNotVisibleOnKeyguard() = runKeyguardCoordinatorTest {
+ fun testSetSectionHeadersNotVisibleOnKeyguard() {
clearInvocations(sectionHeaderVisibilityProvider)
whenever(statusBarStateController.state).thenReturn(StatusBarState.KEYGUARD)
onStateChangeListener.accept("state change")
verify(sectionHeaderVisibilityProvider).sectionHeadersVisible = eq(false)
}
-
- @Test
- fun unseenFilterSuppressesSeenNotifWhileKeyguardShowing() {
- // GIVEN: Keyguard is not showing, shade is expanded, and a notification is present
- keyguardRepository.setKeyguardShowing(false)
- whenever(statusBarStateController.isExpanded).thenReturn(true)
- runKeyguardCoordinatorTest {
- val fakeEntry = NotificationEntryBuilder().build()
- collectionListener.onEntryAdded(fakeEntry)
-
- // WHEN: The keyguard is now showing
- keyguardRepository.setKeyguardShowing(true)
- testScheduler.runCurrent()
-
- // THEN: The notification is recognized as "seen" and is filtered out.
- assertThat(unseenFilter.shouldFilterOut(fakeEntry, 0L)).isTrue()
-
- // WHEN: The keyguard goes away
- keyguardRepository.setKeyguardShowing(false)
- testScheduler.runCurrent()
-
- // THEN: The notification is shown regardless
- assertThat(unseenFilter.shouldFilterOut(fakeEntry, 0L)).isFalse()
- }
- }
-
- @Test
- fun unseenFilterStopsMarkingSeenNotifWhenTransitionToAod() {
- // GIVEN: Keyguard is not showing, shade is not expanded, and a notification is present
- keyguardRepository.setKeyguardShowing(false)
- whenever(statusBarStateController.isExpanded).thenReturn(false)
- runKeyguardCoordinatorTest {
- val fakeEntry = NotificationEntryBuilder().build()
- collectionListener.onEntryAdded(fakeEntry)
-
- // WHEN: The device transitions to AOD
- keyguardTransitionRepository.sendTransitionSteps(
- from = KeyguardState.GONE,
- to = KeyguardState.AOD,
- this.testScheduler,
- )
- testScheduler.runCurrent()
-
- // THEN: We are no longer listening for shade expansions
- verify(statusBarStateController, never()).addCallback(any())
- }
- }
-
- @Test
- fun unseenFilter_headsUpMarkedAsSeen() {
- // GIVEN: Keyguard is not showing, shade is not expanded
- keyguardRepository.setKeyguardShowing(false)
- whenever(statusBarStateController.isExpanded).thenReturn(false)
- runKeyguardCoordinatorTest {
- kosmos.setTransition(
- sceneTransition = Idle(Scenes.Gone),
- stateTransition = TransitionStep(KeyguardState.LOCKSCREEN, KeyguardState.GONE)
- )
-
- // WHEN: A notification is posted
- val fakeEntry = NotificationEntryBuilder().build()
- collectionListener.onEntryAdded(fakeEntry)
-
- // WHEN: That notification is heads up
- onHeadsUpChangedListener.onHeadsUpStateChanged(fakeEntry, /* isHeadsUp= */ true)
- testScheduler.runCurrent()
-
- // WHEN: The keyguard is now showing
- keyguardRepository.setKeyguardShowing(true)
- kosmos.setTransition(
- sceneTransition = Idle(Scenes.Lockscreen),
- stateTransition = TransitionStep(KeyguardState.GONE, KeyguardState.AOD)
- )
-
- // THEN: The notification is recognized as "seen" and is filtered out.
- assertThat(unseenFilter.shouldFilterOut(fakeEntry, 0L)).isTrue()
-
- // WHEN: The keyguard goes away
- keyguardRepository.setKeyguardShowing(false)
- kosmos.setTransition(
- sceneTransition = Idle(Scenes.Gone),
- stateTransition = TransitionStep(KeyguardState.AOD, KeyguardState.GONE)
- )
-
- // THEN: The notification is shown regardless
- assertThat(unseenFilter.shouldFilterOut(fakeEntry, 0L)).isFalse()
- }
- }
-
- @Test
- fun unseenFilterDoesNotSuppressSeenOngoingNotifWhileKeyguardShowing() {
- // GIVEN: Keyguard is not showing, shade is expanded, and an ongoing notification is present
- keyguardRepository.setKeyguardShowing(false)
- whenever(statusBarStateController.isExpanded).thenReturn(true)
- runKeyguardCoordinatorTest {
- val fakeEntry =
- NotificationEntryBuilder()
- .setNotification(Notification.Builder(mContext, "id").setOngoing(true).build())
- .build()
- collectionListener.onEntryAdded(fakeEntry)
-
- // WHEN: The keyguard is now showing
- keyguardRepository.setKeyguardShowing(true)
- testScheduler.runCurrent()
-
- // THEN: The notification is recognized as "ongoing" and is not filtered out.
- assertThat(unseenFilter.shouldFilterOut(fakeEntry, 0L)).isFalse()
- }
- }
-
- @Test
- fun unseenFilterDoesNotSuppressSeenMediaNotifWhileKeyguardShowing() {
- // GIVEN: Keyguard is not showing, shade is expanded, and a media notification is present
- keyguardRepository.setKeyguardShowing(false)
- whenever(statusBarStateController.isExpanded).thenReturn(true)
- runKeyguardCoordinatorTest {
- val fakeEntry =
- NotificationEntryBuilder().build().apply {
- row =
- mock<ExpandableNotificationRow>().apply {
- whenever(isMediaRow).thenReturn(true)
- }
- }
- collectionListener.onEntryAdded(fakeEntry)
-
- // WHEN: The keyguard is now showing
- keyguardRepository.setKeyguardShowing(true)
- testScheduler.runCurrent()
-
- // THEN: The notification is recognized as "media" and is not filtered out.
- assertThat(unseenFilter.shouldFilterOut(fakeEntry, 0L)).isFalse()
- }
- }
-
- @Test
- fun unseenFilterUpdatesSeenProviderWhenSuppressing() {
- // GIVEN: Keyguard is not showing, shade is expanded, and a notification is present
- keyguardRepository.setKeyguardShowing(false)
- whenever(statusBarStateController.isExpanded).thenReturn(true)
- runKeyguardCoordinatorTest {
- val fakeEntry = NotificationEntryBuilder().build()
- collectionListener.onEntryAdded(fakeEntry)
-
- // WHEN: The keyguard is now showing
- keyguardRepository.setKeyguardShowing(true)
- testScheduler.runCurrent()
-
- // THEN: The notification is recognized as "seen" and is filtered out.
- assertThat(unseenFilter.shouldFilterOut(fakeEntry, 0L)).isTrue()
-
- // WHEN: The filter is cleaned up
- unseenFilter.onCleanup()
-
- // THEN: The SeenNotificationProvider has been updated to reflect the suppression
- assertThat(seenNotificationsInteractor.hasFilteredOutSeenNotifications.value).isTrue()
- }
- }
-
- @Test
- fun unseenFilterInvalidatesWhenSettingChanges() {
- // GIVEN: Keyguard is not showing, and shade is expanded
- keyguardRepository.setKeyguardShowing(false)
- whenever(statusBarStateController.isExpanded).thenReturn(true)
- runKeyguardCoordinatorTest {
- // GIVEN: A notification is present
- val fakeEntry = NotificationEntryBuilder().build()
- collectionListener.onEntryAdded(fakeEntry)
-
- // GIVEN: The setting for filtering unseen notifications is disabled
- showOnlyUnseenNotifsOnKeyguardSetting = false
-
- // GIVEN: The pipeline has registered the unseen filter for invalidation
- val invalidationListener: Pluggable.PluggableListener<NotifFilter> = mock()
- unseenFilter.setInvalidationListener(invalidationListener)
-
- // WHEN: The keyguard is now showing
- keyguardRepository.setKeyguardShowing(true)
- testScheduler.runCurrent()
-
- // THEN: The notification is not filtered out
- assertThat(unseenFilter.shouldFilterOut(fakeEntry, 0L)).isFalse()
-
- // WHEN: The secure setting is changed
- showOnlyUnseenNotifsOnKeyguardSetting = true
-
- // THEN: The pipeline is invalidated
- verify(invalidationListener).onPluggableInvalidated(same(unseenFilter), anyString())
-
- // THEN: The notification is recognized as "seen" and is filtered out.
- assertThat(unseenFilter.shouldFilterOut(fakeEntry, 0L)).isTrue()
- }
- }
-
- @Test
- fun unseenFilterAllowsNewNotif() {
- // GIVEN: Keyguard is showing, no notifications present
- keyguardRepository.setKeyguardShowing(true)
- runKeyguardCoordinatorTest {
- // WHEN: A new notification is posted
- val fakeEntry = NotificationEntryBuilder().build()
- collectionListener.onEntryAdded(fakeEntry)
-
- // THEN: The notification is recognized as "unseen" and is not filtered out.
- assertThat(unseenFilter.shouldFilterOut(fakeEntry, 0L)).isFalse()
- }
- }
-
- @Test
- fun unseenFilterSeenGroupSummaryWithUnseenChild() {
- // GIVEN: Keyguard is not showing, shade is expanded, and a notification is present
- keyguardRepository.setKeyguardShowing(false)
- whenever(statusBarStateController.isExpanded).thenReturn(true)
- runKeyguardCoordinatorTest {
- // WHEN: A new notification is posted
- val fakeSummary = NotificationEntryBuilder().build()
- val fakeChild =
- NotificationEntryBuilder()
- .setGroup(context, "group")
- .setGroupSummary(context, false)
- .build()
- GroupEntryBuilder().setSummary(fakeSummary).addChild(fakeChild).build()
-
- collectionListener.onEntryAdded(fakeSummary)
- collectionListener.onEntryAdded(fakeChild)
-
- // WHEN: Keyguard is now showing, both notifications are marked as seen
- keyguardRepository.setKeyguardShowing(true)
- testScheduler.runCurrent()
-
- // WHEN: The child notification is now unseen
- collectionListener.onEntryUpdated(fakeChild)
-
- // THEN: The summary is not filtered out, because the child is unseen
- assertThat(unseenFilter.shouldFilterOut(fakeSummary, 0L)).isFalse()
- }
- }
-
- @Test
- fun unseenNotificationIsMarkedAsSeenWhenKeyguardGoesAway() {
- // GIVEN: Keyguard is showing, not dozing, unseen notification is present
- keyguardRepository.setKeyguardShowing(true)
- keyguardRepository.setIsDozing(false)
- runKeyguardCoordinatorTest {
- val fakeEntry = NotificationEntryBuilder().build()
- collectionListener.onEntryAdded(fakeEntry)
- keyguardTransitionRepository.sendTransitionSteps(
- from = KeyguardState.AOD,
- to = KeyguardState.LOCKSCREEN,
- this.testScheduler,
- )
- testScheduler.runCurrent()
-
- // WHEN: five seconds have passed
- testScheduler.advanceTimeBy(5.seconds)
- testScheduler.runCurrent()
-
- // WHEN: Keyguard is no longer showing
- keyguardRepository.setKeyguardShowing(false)
- kosmos.setTransition(
- sceneTransition = Idle(Scenes.Gone),
- stateTransition = TransitionStep(KeyguardState.LOCKSCREEN, KeyguardState.GONE)
- )
-
- // WHEN: Keyguard is shown again
- keyguardRepository.setKeyguardShowing(true)
- kosmos.setTransition(
- sceneTransition = Idle(Scenes.Lockscreen),
- stateTransition = TransitionStep(KeyguardState.GONE, KeyguardState.AOD)
- )
-
- // THEN: The notification is now recognized as "seen" and is filtered out.
- assertThat(unseenFilter.shouldFilterOut(fakeEntry, 0L)).isTrue()
- }
- }
-
- @Test
- fun unseenNotificationIsNotMarkedAsSeenIfShadeNotExpanded() {
- // GIVEN: Keyguard is showing, unseen notification is present
- keyguardRepository.setKeyguardShowing(true)
- runKeyguardCoordinatorTest {
- keyguardTransitionRepository.sendTransitionSteps(
- from = KeyguardState.GONE,
- to = KeyguardState.LOCKSCREEN,
- this.testScheduler,
- )
- val fakeEntry = NotificationEntryBuilder().build()
- collectionListener.onEntryAdded(fakeEntry)
-
- // WHEN: Keyguard is no longer showing
- keyguardRepository.setKeyguardShowing(false)
- keyguardTransitionRepository.sendTransitionSteps(
- from = KeyguardState.LOCKSCREEN,
- to = KeyguardState.GONE,
- this.testScheduler,
- )
-
- // WHEN: Keyguard is shown again
- keyguardRepository.setKeyguardShowing(true)
- testScheduler.runCurrent()
-
- // THEN: The notification is not recognized as "seen" and is not filtered out.
- assertThat(unseenFilter.shouldFilterOut(fakeEntry, 0L)).isFalse()
- }
- }
-
- @Test
- fun unseenNotificationIsNotMarkedAsSeenIfNotOnKeyguardLongEnough() {
- // GIVEN: Keyguard is showing, not dozing, unseen notification is present
- keyguardRepository.setKeyguardShowing(true)
- keyguardRepository.setIsDozing(false)
- runKeyguardCoordinatorTest {
- kosmos.setTransition(
- sceneTransition = Idle(Scenes.Lockscreen),
- stateTransition = TransitionStep(KeyguardState.GONE, KeyguardState.LOCKSCREEN)
- )
- val firstEntry = NotificationEntryBuilder().setId(1).build()
- collectionListener.onEntryAdded(firstEntry)
- testScheduler.runCurrent()
-
- // WHEN: one second has passed
- testScheduler.advanceTimeBy(1.seconds)
- testScheduler.runCurrent()
-
- // WHEN: another unseen notification is posted
- val secondEntry = NotificationEntryBuilder().setId(2).build()
- collectionListener.onEntryAdded(secondEntry)
- testScheduler.runCurrent()
-
- // WHEN: four more seconds have passed
- testScheduler.advanceTimeBy(4.seconds)
- testScheduler.runCurrent()
-
- // WHEN: the keyguard is no longer showing
- keyguardRepository.setKeyguardShowing(false)
- kosmos.setTransition(
- sceneTransition = Idle(Scenes.Gone),
- stateTransition = TransitionStep(KeyguardState.LOCKSCREEN, KeyguardState.GONE)
- )
-
- // WHEN: Keyguard is shown again
- keyguardRepository.setKeyguardShowing(true)
- kosmos.setTransition(
- sceneTransition = Idle(Scenes.Lockscreen),
- stateTransition = TransitionStep(KeyguardState.GONE, KeyguardState.LOCKSCREEN)
- )
-
- // THEN: The first notification is considered seen and is filtered out.
- assertThat(unseenFilter.shouldFilterOut(firstEntry, 0L)).isTrue()
-
- // THEN: The second notification is still considered unseen and is not filtered out
- assertThat(unseenFilter.shouldFilterOut(secondEntry, 0L)).isFalse()
- }
- }
-
- @Test
- fun unseenNotificationOnKeyguardNotMarkedAsSeenIfRemovedAfterThreshold() {
- // GIVEN: Keyguard is showing, not dozing
- keyguardRepository.setKeyguardShowing(true)
- keyguardRepository.setIsDozing(false)
- runKeyguardCoordinatorTest {
- keyguardTransitionRepository.sendTransitionSteps(
- from = KeyguardState.GONE,
- to = KeyguardState.LOCKSCREEN,
- this.testScheduler,
- )
- testScheduler.runCurrent()
-
- // WHEN: a new notification is posted
- val entry = NotificationEntryBuilder().setId(1).build()
- collectionListener.onEntryAdded(entry)
- testScheduler.runCurrent()
-
- // WHEN: five more seconds have passed
- testScheduler.advanceTimeBy(5.seconds)
- testScheduler.runCurrent()
-
- // WHEN: the notification is removed
- collectionListener.onEntryRemoved(entry, 0)
- testScheduler.runCurrent()
-
- // WHEN: the notification is re-posted
- collectionListener.onEntryAdded(entry)
- testScheduler.runCurrent()
-
- // WHEN: one more second has passed
- testScheduler.advanceTimeBy(1.seconds)
- testScheduler.runCurrent()
-
- // WHEN: the keyguard is no longer showing
- keyguardRepository.setKeyguardShowing(false)
- keyguardTransitionRepository.sendTransitionSteps(
- from = KeyguardState.LOCKSCREEN,
- to = KeyguardState.GONE,
- this.testScheduler,
- )
- testScheduler.runCurrent()
-
- // WHEN: Keyguard is shown again
- keyguardRepository.setKeyguardShowing(true)
- keyguardTransitionRepository.sendTransitionSteps(
- from = KeyguardState.GONE,
- to = KeyguardState.LOCKSCREEN,
- this.testScheduler,
- )
- testScheduler.runCurrent()
-
- // THEN: The notification is considered unseen and is not filtered out.
- assertThat(unseenFilter.shouldFilterOut(entry, 0L)).isFalse()
- }
- }
-
- @Test
- fun unseenNotificationOnKeyguardNotMarkedAsSeenIfRemovedBeforeThreshold() {
- // GIVEN: Keyguard is showing, not dozing
- keyguardRepository.setKeyguardShowing(true)
- keyguardRepository.setIsDozing(false)
- runKeyguardCoordinatorTest {
- keyguardTransitionRepository.sendTransitionSteps(
- from = KeyguardState.GONE,
- to = KeyguardState.LOCKSCREEN,
- this.testScheduler,
- )
- testScheduler.runCurrent()
-
- // WHEN: a new notification is posted
- val entry = NotificationEntryBuilder().setId(1).build()
- collectionListener.onEntryAdded(entry)
- testScheduler.runCurrent()
-
- // WHEN: one second has passed
- testScheduler.advanceTimeBy(1.seconds)
- testScheduler.runCurrent()
-
- // WHEN: the notification is removed
- collectionListener.onEntryRemoved(entry, 0)
- testScheduler.runCurrent()
-
- // WHEN: the notification is re-posted
- collectionListener.onEntryAdded(entry)
- testScheduler.runCurrent()
-
- // WHEN: one more second has passed
- testScheduler.advanceTimeBy(1.seconds)
- testScheduler.runCurrent()
-
- // WHEN: the keyguard is no longer showing
- keyguardRepository.setKeyguardShowing(false)
- keyguardTransitionRepository.sendTransitionSteps(
- from = KeyguardState.LOCKSCREEN,
- to = KeyguardState.GONE,
- this.testScheduler,
- )
- testScheduler.runCurrent()
-
- // WHEN: Keyguard is shown again
- keyguardRepository.setKeyguardShowing(true)
- keyguardTransitionRepository.sendTransitionSteps(
- from = KeyguardState.GONE,
- to = KeyguardState.LOCKSCREEN,
- this.testScheduler,
- )
- testScheduler.runCurrent()
-
- // THEN: The notification is considered unseen and is not filtered out.
- assertThat(unseenFilter.shouldFilterOut(entry, 0L)).isFalse()
- }
- }
-
- @Test
- fun unseenNotificationOnKeyguardNotMarkedAsSeenIfUpdatedBeforeThreshold() {
- // GIVEN: Keyguard is showing, not dozing
- keyguardRepository.setKeyguardShowing(true)
- keyguardRepository.setIsDozing(false)
- runKeyguardCoordinatorTest {
- keyguardTransitionRepository.sendTransitionSteps(
- from = KeyguardState.GONE,
- to = KeyguardState.LOCKSCREEN,
- this.testScheduler,
- )
- testScheduler.runCurrent()
-
- // WHEN: a new notification is posted
- val entry = NotificationEntryBuilder().setId(1).build()
- collectionListener.onEntryAdded(entry)
- testScheduler.runCurrent()
-
- // WHEN: one second has passed
- testScheduler.advanceTimeBy(1.seconds)
- testScheduler.runCurrent()
-
- // WHEN: the notification is updated
- collectionListener.onEntryUpdated(entry)
- testScheduler.runCurrent()
-
- // WHEN: four more seconds have passed
- testScheduler.advanceTimeBy(4.seconds)
- testScheduler.runCurrent()
-
- // WHEN: the keyguard is no longer showing
- keyguardRepository.setKeyguardShowing(false)
- keyguardTransitionRepository.sendTransitionSteps(
- from = KeyguardState.LOCKSCREEN,
- to = KeyguardState.GONE,
- this.testScheduler,
- )
- testScheduler.runCurrent()
-
- // WHEN: Keyguard is shown again
- keyguardRepository.setKeyguardShowing(true)
- keyguardTransitionRepository.sendTransitionSteps(
- from = KeyguardState.GONE,
- to = KeyguardState.LOCKSCREEN,
- this.testScheduler,
- )
- testScheduler.runCurrent()
-
- // THEN: The notification is considered unseen and is not filtered out.
- assertThat(unseenFilter.shouldFilterOut(entry, 0L)).isFalse()
- }
- }
-
- private fun runKeyguardCoordinatorTest(
- testBlock: suspend KeyguardCoordinatorTestScope.() -> Unit
- ) {
- val testDispatcher = UnconfinedTestDispatcher()
- val testScope = TestScope(testDispatcher)
- val fakeSettings =
- FakeSettings().apply {
- putInt(Settings.Secure.LOCK_SCREEN_SHOW_ONLY_UNSEEN_NOTIFICATIONS, 1)
- }
- val seenNotificationsInteractor =
- SeenNotificationsInteractor(ActiveNotificationListRepository())
- val keyguardCoordinator =
- KeyguardCoordinator(
- testDispatcher,
- mock<DumpManager>(),
- headsUpManager,
- keyguardNotifVisibilityProvider,
- keyguardRepository,
- kosmos.keyguardTransitionInteractor,
- KeyguardCoordinatorLogger(logcatLogBuffer()),
- testScope.backgroundScope,
- sectionHeaderVisibilityProvider,
- fakeSettings,
- seenNotificationsInteractor,
- statusBarStateController,
- )
- keyguardCoordinator.attach(notifPipeline)
- testScope.runTest(dispatchTimeoutMs = 1.seconds.inWholeMilliseconds) {
- KeyguardCoordinatorTestScope(
- keyguardCoordinator,
- testScope,
- seenNotificationsInteractor,
- fakeSettings,
- )
- .testBlock()
- }
- }
-
- private inner class KeyguardCoordinatorTestScope(
- private val keyguardCoordinator: KeyguardCoordinator,
- private val scope: TestScope,
- val seenNotificationsInteractor: SeenNotificationsInteractor,
- private val fakeSettings: FakeSettings,
- ) : CoroutineScope by scope {
- val testScheduler: TestCoroutineScheduler
- get() = scope.testScheduler
-
- val onStateChangeListener: Consumer<String> = withArgCaptor {
- verify(keyguardNotifVisibilityProvider).addOnStateChangedListener(capture())
- }
-
- val unseenFilter: NotifFilter
- get() = keyguardCoordinator.unseenNotifFilter
-
- val collectionListener: NotifCollectionListener = withArgCaptor {
- verify(notifPipeline).addCollectionListener(capture())
- }
-
- val onHeadsUpChangedListener: OnHeadsUpChangedListener
- get() = withArgCaptor { verify(headsUpManager).addListener(capture()) }
-
- val statusBarStateListener: StatusBarStateController.StateListener
- get() = withArgCaptor { verify(statusBarStateController).addCallback(capture()) }
-
- var showOnlyUnseenNotifsOnKeyguardSetting: Boolean
- get() =
- fakeSettings.getIntForUser(
- Settings.Secure.LOCK_SCREEN_SHOW_ONLY_UNSEEN_NOTIFICATIONS,
- UserHandle.USER_CURRENT,
- ) == 1
- set(value) {
- fakeSettings.putIntForUser(
- Settings.Secure.LOCK_SCREEN_SHOW_ONLY_UNSEEN_NOTIFICATIONS,
- if (value) 1 else 2,
- UserHandle.USER_CURRENT,
- )
- }
- }
-
- companion object {
- @JvmStatic
- @Parameters(name = "{0}")
- fun getParams(): List<FlagsParameterization> {
- return FlagsParameterization.allCombinationsOf().andSceneContainer()
- }
- }
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/icon/domain/interactor/NotificationIconsInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/icon/domain/interactor/NotificationIconsInteractorTest.kt
index 26f53707aba1..f07303ed32e3 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/icon/domain/interactor/NotificationIconsInteractorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/icon/domain/interactor/NotificationIconsInteractorTest.kt
@@ -17,21 +17,19 @@ package com.android.systemui.statusbar.notification.icon.domain.interactor
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
-import com.android.systemui.SysUITestComponent
-import com.android.systemui.SysUITestModule
import com.android.systemui.SysuiTestCase
-import com.android.systemui.TestMocksModule
-import com.android.systemui.biometrics.domain.BiometricsDomainLayerModule
-import com.android.systemui.collectLastValue
-import com.android.systemui.dagger.SysUISingleton
-import com.android.systemui.deviceentry.data.repository.FakeDeviceEntryRepository
-import com.android.systemui.runTest
-import com.android.systemui.statusbar.data.repository.NotificationListenerSettingsRepository
+import com.android.systemui.coroutines.collectLastValue
+import com.android.systemui.deviceentry.data.repository.fakeDeviceEntryRepository
+import com.android.systemui.deviceentry.domain.interactor.deviceEntryInteractor
+import com.android.systemui.kosmos.testDispatcher
+import com.android.systemui.kosmos.testScope
+import com.android.systemui.statusbar.data.repository.notificationListenerSettingsRepository
import com.android.systemui.statusbar.notification.data.model.activeNotificationModel
-import com.android.systemui.statusbar.notification.data.repository.ActiveNotificationListRepository
import com.android.systemui.statusbar.notification.data.repository.ActiveNotificationsStore
-import com.android.systemui.statusbar.notification.domain.interactor.HeadsUpNotificationIconInteractor
-import com.android.systemui.statusbar.notification.domain.interactor.NotificationsKeyguardInteractor
+import com.android.systemui.statusbar.notification.data.repository.activeNotificationListRepository
+import com.android.systemui.statusbar.notification.data.repository.notificationsKeyguardViewStateRepository
+import com.android.systemui.statusbar.notification.domain.interactor.activeNotificationsInteractor
+import com.android.systemui.statusbar.notification.domain.interactor.headsUpNotificationIconInteractor
import com.android.systemui.statusbar.notification.shared.byIsAmbient
import com.android.systemui.statusbar.notification.shared.byIsLastMessageFromReply
import com.android.systemui.statusbar.notification.shared.byIsPulsing
@@ -39,15 +37,15 @@ import com.android.systemui.statusbar.notification.shared.byIsRowDismissed
import com.android.systemui.statusbar.notification.shared.byIsSilent
import com.android.systemui.statusbar.notification.shared.byIsSuppressedFromStatusBar
import com.android.systemui.statusbar.notification.shared.byKey
-import com.android.systemui.user.domain.UserDomainLayerModule
+import com.android.systemui.statusbar.notification.stack.domain.interactor.notificationsKeyguardInteractor
+import com.android.systemui.testKosmos
import com.android.systemui.util.mockito.eq
-import com.android.systemui.util.mockito.mock
import com.android.systemui.util.mockito.whenever
-import com.android.wm.shell.bubbles.Bubbles
+import com.android.wm.shell.bubbles.bubbles
+import com.android.wm.shell.bubbles.bubblesOptional
import com.google.common.truth.Truth.assertThat
-import dagger.BindsInstance
-import dagger.Component
-import java.util.Optional
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.test.runTest
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
@@ -55,29 +53,22 @@ import org.junit.runner.RunWith
@SmallTest
@RunWith(AndroidJUnit4::class)
class NotificationIconsInteractorTest : SysuiTestCase() {
-
- private val bubbles: Bubbles = mock()
-
- @Component(modules = [SysUITestModule::class])
- @SysUISingleton
- interface TestComponent : SysUITestComponent<NotificationIconsInteractor> {
-
- val activeNotificationListRepository: ActiveNotificationListRepository
- val notificationsKeyguardInteractor: NotificationsKeyguardInteractor
-
- @Component.Factory
- interface Factory {
- fun create(@BindsInstance test: SysuiTestCase, mocks: TestMocksModule): TestComponent
- }
- }
-
- val testComponent: TestComponent =
- DaggerNotificationIconsInteractorTest_TestComponent.factory()
- .create(test = this, mocks = TestMocksModule(bubbles = Optional.of(bubbles)))
+ private val kosmos = testKosmos()
+ private val testScope = kosmos.testScope
+ private val activeNotificationListRepository = kosmos.activeNotificationListRepository
+ private val notificationsKeyguardInteractor = kosmos.notificationsKeyguardInteractor
+
+ private val underTest =
+ NotificationIconsInteractor(
+ kosmos.activeNotificationsInteractor,
+ kosmos.bubblesOptional,
+ kosmos.headsUpNotificationIconInteractor,
+ kosmos.notificationsKeyguardViewStateRepository
+ )
@Before
fun setup() {
- testComponent.apply {
+ testScope.apply {
activeNotificationListRepository.activeNotifications.value =
ActiveNotificationsStore.Builder()
.apply { testIcons.forEach(::addIndividualNotif) }
@@ -87,22 +78,22 @@ class NotificationIconsInteractorTest : SysuiTestCase() {
@Test
fun filteredEntrySet() =
- testComponent.runTest {
+ testScope.runTest {
val filteredSet by collectLastValue(underTest.filteredNotifSet())
assertThat(filteredSet).containsExactlyElementsIn(testIcons)
}
@Test
fun filteredEntrySet_noExpandedBubbles() =
- testComponent.runTest {
- whenever(bubbles.isBubbleExpanded(eq("notif1"))).thenReturn(true)
+ testScope.runTest {
+ whenever(kosmos.bubbles.isBubbleExpanded(eq("notif1"))).thenReturn(true)
val filteredSet by collectLastValue(underTest.filteredNotifSet())
assertThat(filteredSet).comparingElementsUsing(byKey).doesNotContain("notif1")
}
@Test
fun filteredEntrySet_noAmbient() =
- testComponent.runTest {
+ testScope.runTest {
val filteredSet by collectLastValue(underTest.filteredNotifSet(showAmbient = false))
assertThat(filteredSet).comparingElementsUsing(byIsAmbient).doesNotContain(true)
assertThat(filteredSet)
@@ -112,21 +103,21 @@ class NotificationIconsInteractorTest : SysuiTestCase() {
@Test
fun filteredEntrySet_noLowPriority() =
- testComponent.runTest {
+ testScope.runTest {
val filteredSet by collectLastValue(underTest.filteredNotifSet(showLowPriority = false))
assertThat(filteredSet).comparingElementsUsing(byIsSilent).doesNotContain(true)
}
@Test
fun filteredEntrySet_noDismissed() =
- testComponent.runTest {
+ testScope.runTest {
val filteredSet by collectLastValue(underTest.filteredNotifSet(showDismissed = false))
assertThat(filteredSet).comparingElementsUsing(byIsRowDismissed).doesNotContain(true)
}
@Test
fun filteredEntrySet_noRepliedMessages() =
- testComponent.runTest {
+ testScope.runTest {
val filteredSet by
collectLastValue(underTest.filteredNotifSet(showRepliedMessages = false))
assertThat(filteredSet)
@@ -136,7 +127,7 @@ class NotificationIconsInteractorTest : SysuiTestCase() {
@Test
fun filteredEntrySet_noPulsing_notifsNotFullyHidden() =
- testComponent.runTest {
+ testScope.runTest {
val filteredSet by collectLastValue(underTest.filteredNotifSet(showPulsing = false))
notificationsKeyguardInteractor.setNotificationsFullyHidden(false)
assertThat(filteredSet).comparingElementsUsing(byIsPulsing).doesNotContain(true)
@@ -144,65 +135,46 @@ class NotificationIconsInteractorTest : SysuiTestCase() {
@Test
fun filteredEntrySet_noPulsing_notifsFullyHidden() =
- testComponent.runTest {
+ testScope.runTest {
val filteredSet by collectLastValue(underTest.filteredNotifSet(showPulsing = false))
notificationsKeyguardInteractor.setNotificationsFullyHidden(true)
assertThat(filteredSet).comparingElementsUsing(byIsPulsing).contains(true)
}
}
+@OptIn(ExperimentalCoroutinesApi::class)
@SmallTest
@RunWith(AndroidJUnit4::class)
class AlwaysOnDisplayNotificationIconsInteractorTest : SysuiTestCase() {
+ private val kosmos = testKosmos()
+ private val testScope = kosmos.testScope
- private val bubbles: Bubbles = mock()
-
- @Component(
- modules =
- [
- SysUITestModule::class,
- BiometricsDomainLayerModule::class,
- UserDomainLayerModule::class,
- ]
- )
- @SysUISingleton
- interface TestComponent : SysUITestComponent<AlwaysOnDisplayNotificationIconsInteractor> {
-
- val activeNotificationListRepository: ActiveNotificationListRepository
- val deviceEntryRepository: FakeDeviceEntryRepository
- val notificationsKeyguardInteractor: NotificationsKeyguardInteractor
-
- @Component.Factory
- interface Factory {
- fun create(@BindsInstance test: SysuiTestCase, mocks: TestMocksModule): TestComponent
- }
- }
-
- private val testComponent: TestComponent =
- DaggerAlwaysOnDisplayNotificationIconsInteractorTest_TestComponent.factory()
- .create(test = this, mocks = TestMocksModule(bubbles = Optional.of(bubbles)))
+ private val underTest =
+ AlwaysOnDisplayNotificationIconsInteractor(
+ kosmos.testDispatcher,
+ kosmos.deviceEntryInteractor,
+ kosmos.notificationIconsInteractor,
+ )
@Before
fun setup() {
- testComponent.apply {
- activeNotificationListRepository.activeNotifications.value =
- ActiveNotificationsStore.Builder()
- .apply { testIcons.forEach(::addIndividualNotif) }
- .build()
- }
+ kosmos.activeNotificationListRepository.activeNotifications.value =
+ ActiveNotificationsStore.Builder()
+ .apply { testIcons.forEach(::addIndividualNotif) }
+ .build()
}
@Test
fun filteredEntrySet_noExpandedBubbles() =
- testComponent.runTest {
- whenever(bubbles.isBubbleExpanded(eq("notif1"))).thenReturn(true)
+ testScope.runTest {
+ whenever(kosmos.bubbles.isBubbleExpanded(eq("notif1"))).thenReturn(true)
val filteredSet by collectLastValue(underTest.aodNotifs)
assertThat(filteredSet).comparingElementsUsing(byKey).doesNotContain("notif1")
}
@Test
fun filteredEntrySet_noAmbient() =
- testComponent.runTest {
+ testScope.runTest {
val filteredSet by collectLastValue(underTest.aodNotifs)
assertThat(filteredSet).comparingElementsUsing(byIsAmbient).doesNotContain(true)
assertThat(filteredSet)
@@ -212,14 +184,14 @@ class AlwaysOnDisplayNotificationIconsInteractorTest : SysuiTestCase() {
@Test
fun filteredEntrySet_noDismissed() =
- testComponent.runTest {
+ testScope.runTest {
val filteredSet by collectLastValue(underTest.aodNotifs)
assertThat(filteredSet).comparingElementsUsing(byIsRowDismissed).doesNotContain(true)
}
@Test
fun filteredEntrySet_noRepliedMessages() =
- testComponent.runTest {
+ testScope.runTest {
val filteredSet by collectLastValue(underTest.aodNotifs)
assertThat(filteredSet)
.comparingElementsUsing(byIsLastMessageFromReply)
@@ -228,37 +200,37 @@ class AlwaysOnDisplayNotificationIconsInteractorTest : SysuiTestCase() {
@Test
fun filteredEntrySet_showPulsing_notifsNotFullyHidden_bypassDisabled() =
- testComponent.runTest {
+ testScope.runTest {
val filteredSet by collectLastValue(underTest.aodNotifs)
- deviceEntryRepository.setBypassEnabled(false)
- notificationsKeyguardInteractor.setNotificationsFullyHidden(false)
+ kosmos.fakeDeviceEntryRepository.setBypassEnabled(false)
+ kosmos.notificationsKeyguardInteractor.setNotificationsFullyHidden(false)
assertThat(filteredSet).comparingElementsUsing(byIsPulsing).contains(true)
}
@Test
fun filteredEntrySet_showPulsing_notifsFullyHidden_bypassDisabled() =
- testComponent.runTest {
+ testScope.runTest {
val filteredSet by collectLastValue(underTest.aodNotifs)
- deviceEntryRepository.setBypassEnabled(false)
- notificationsKeyguardInteractor.setNotificationsFullyHidden(true)
+ kosmos.fakeDeviceEntryRepository.setBypassEnabled(false)
+ kosmos.notificationsKeyguardInteractor.setNotificationsFullyHidden(true)
assertThat(filteredSet).comparingElementsUsing(byIsPulsing).contains(true)
}
@Test
fun filteredEntrySet_noPulsing_notifsNotFullyHidden_bypassEnabled() =
- testComponent.runTest {
+ testScope.runTest {
val filteredSet by collectLastValue(underTest.aodNotifs)
- deviceEntryRepository.setBypassEnabled(true)
- notificationsKeyguardInteractor.setNotificationsFullyHidden(false)
+ kosmos.fakeDeviceEntryRepository.setBypassEnabled(true)
+ kosmos.notificationsKeyguardInteractor.setNotificationsFullyHidden(false)
assertThat(filteredSet).comparingElementsUsing(byIsPulsing).doesNotContain(true)
}
@Test
fun filteredEntrySet_showPulsing_notifsFullyHidden_bypassEnabled() =
- testComponent.runTest {
+ testScope.runTest {
val filteredSet by collectLastValue(underTest.aodNotifs)
- deviceEntryRepository.setBypassEnabled(true)
- notificationsKeyguardInteractor.setNotificationsFullyHidden(true)
+ kosmos.fakeDeviceEntryRepository.setBypassEnabled(true)
+ kosmos.notificationsKeyguardInteractor.setNotificationsFullyHidden(true)
assertThat(filteredSet).comparingElementsUsing(byIsPulsing).contains(true)
}
}
@@ -266,32 +238,19 @@ class AlwaysOnDisplayNotificationIconsInteractorTest : SysuiTestCase() {
@SmallTest
@RunWith(AndroidJUnit4::class)
class StatusBarNotificationIconsInteractorTest : SysuiTestCase() {
-
- private val bubbles: Bubbles = mock()
-
- @Component(modules = [SysUITestModule::class])
- @SysUISingleton
- interface TestComponent : SysUITestComponent<StatusBarNotificationIconsInteractor> {
-
- val activeNotificationListRepository: ActiveNotificationListRepository
- val headsUpIconsInteractor: HeadsUpNotificationIconInteractor
- val notificationsKeyguardInteractor: NotificationsKeyguardInteractor
- val notificationListenerSettingsRepository: NotificationListenerSettingsRepository
-
- @Component.Factory
- interface Factory {
- fun create(@BindsInstance test: SysuiTestCase, mocks: TestMocksModule): TestComponent
- }
- }
-
- val testComponent: TestComponent =
- DaggerStatusBarNotificationIconsInteractorTest_TestComponent.factory()
- .create(test = this, mocks = TestMocksModule(bubbles = Optional.of(bubbles)))
+ private val kosmos = testKosmos()
+ private val testScope = kosmos.testScope
+ private val underTest =
+ StatusBarNotificationIconsInteractor(
+ kosmos.testDispatcher,
+ kosmos.notificationIconsInteractor,
+ kosmos.notificationListenerSettingsRepository,
+ )
@Before
fun setup() {
- testComponent.apply {
- activeNotificationListRepository.activeNotifications.value =
+ testScope.apply {
+ kosmos.activeNotificationListRepository.activeNotifications.value =
ActiveNotificationsStore.Builder()
.apply { testIcons.forEach(::addIndividualNotif) }
.build()
@@ -300,15 +259,15 @@ class StatusBarNotificationIconsInteractorTest : SysuiTestCase() {
@Test
fun filteredEntrySet_noExpandedBubbles() =
- testComponent.runTest {
- whenever(bubbles.isBubbleExpanded(eq("notif1"))).thenReturn(true)
+ testScope.runTest {
+ whenever(kosmos.bubbles.isBubbleExpanded(eq("notif1"))).thenReturn(true)
val filteredSet by collectLastValue(underTest.statusBarNotifs)
assertThat(filteredSet).comparingElementsUsing(byKey).doesNotContain("notif1")
}
@Test
fun filteredEntrySet_noAmbient() =
- testComponent.runTest {
+ testScope.runTest {
val filteredSet by collectLastValue(underTest.statusBarNotifs)
assertThat(filteredSet).comparingElementsUsing(byIsAmbient).doesNotContain(true)
assertThat(filteredSet)
@@ -318,30 +277,30 @@ class StatusBarNotificationIconsInteractorTest : SysuiTestCase() {
@Test
fun filteredEntrySet_noLowPriority_whenDontShowSilentIcons() =
- testComponent.runTest {
+ testScope.runTest {
val filteredSet by collectLastValue(underTest.statusBarNotifs)
- notificationListenerSettingsRepository.showSilentStatusIcons.value = false
+ kosmos.notificationListenerSettingsRepository.showSilentStatusIcons.value = false
assertThat(filteredSet).comparingElementsUsing(byIsSilent).doesNotContain(true)
}
@Test
fun filteredEntrySet_showLowPriority_whenShowSilentIcons() =
- testComponent.runTest {
+ testScope.runTest {
val filteredSet by collectLastValue(underTest.statusBarNotifs)
- notificationListenerSettingsRepository.showSilentStatusIcons.value = true
+ kosmos.notificationListenerSettingsRepository.showSilentStatusIcons.value = true
assertThat(filteredSet).comparingElementsUsing(byIsSilent).contains(true)
}
@Test
fun filteredEntrySet_noDismissed() =
- testComponent.runTest {
+ testScope.runTest {
val filteredSet by collectLastValue(underTest.statusBarNotifs)
assertThat(filteredSet).comparingElementsUsing(byIsRowDismissed).doesNotContain(true)
}
@Test
fun filteredEntrySet_noRepliedMessages() =
- testComponent.runTest {
+ testScope.runTest {
val filteredSet by collectLastValue(underTest.statusBarNotifs)
assertThat(filteredSet)
.comparingElementsUsing(byIsLastMessageFromReply)
@@ -350,9 +309,9 @@ class StatusBarNotificationIconsInteractorTest : SysuiTestCase() {
@Test
fun filteredEntrySet_includesIsolatedIcon() =
- testComponent.runTest {
+ testScope.runTest {
val filteredSet by collectLastValue(underTest.statusBarNotifs)
- headsUpIconsInteractor.setIsolatedIconNotificationKey("notif5")
+ kosmos.headsUpNotificationIconInteractor.setIsolatedIconNotificationKey("notif5")
assertThat(filteredSet).comparingElementsUsing(byKey).contains("notif5")
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/icon/ui/viewmodel/NotificationIconContainerAlwaysOnDisplayViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/icon/ui/viewmodel/NotificationIconContainerAlwaysOnDisplayViewModelTest.kt
index 894e02e80997..1f4e80e48bb7 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/icon/ui/viewmodel/NotificationIconContainerAlwaysOnDisplayViewModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/icon/ui/viewmodel/NotificationIconContainerAlwaysOnDisplayViewModelTest.kt
@@ -16,111 +16,81 @@
package com.android.systemui.statusbar.notification.icon.ui.viewmodel
+import android.content.res.mainResources
import android.platform.test.annotations.DisableFlags
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.systemui.Flags.FLAG_KEYGUARD_WM_STATE_REFACTOR
import com.android.systemui.Flags.FLAG_NEW_AOD_TRANSITION
-import com.android.systemui.SysUITestComponent
-import com.android.systemui.SysUITestModule
import com.android.systemui.SysuiTestCase
-import com.android.systemui.TestMocksModule
-import com.android.systemui.biometrics.domain.BiometricsDomainLayerModule
-import com.android.systemui.collectLastValue
-import com.android.systemui.dagger.SysUISingleton
-import com.android.systemui.flags.FakeFeatureFlagsClassicModule
+import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.flags.Flags
-import com.android.systemui.keyguard.data.repository.FakeKeyguardRepository
-import com.android.systemui.keyguard.data.repository.FakeKeyguardTransitionRepository
+import com.android.systemui.flags.fakeFeatureFlagsClassic
+import com.android.systemui.keyguard.data.repository.fakeKeyguardRepository
+import com.android.systemui.keyguard.data.repository.fakeKeyguardTransitionRepository
+import com.android.systemui.keyguard.domain.interactor.keyguardInteractor
+import com.android.systemui.keyguard.domain.interactor.keyguardTransitionInteractor
import com.android.systemui.keyguard.shared.model.DozeStateModel
import com.android.systemui.keyguard.shared.model.DozeTransitionModel
import com.android.systemui.keyguard.shared.model.KeyguardState
import com.android.systemui.keyguard.shared.model.TransitionState
import com.android.systemui.keyguard.shared.model.TransitionStep
-import com.android.systemui.power.data.repository.FakePowerRepository
+import com.android.systemui.kosmos.testDispatcher
+import com.android.systemui.kosmos.testScope
+import com.android.systemui.power.data.repository.fakePowerRepository
import com.android.systemui.power.shared.model.WakeSleepReason
import com.android.systemui.power.shared.model.WakefulnessState
-import com.android.systemui.runCurrent
-import com.android.systemui.runTest
-import com.android.systemui.statusbar.phone.DozeParameters
-import com.android.systemui.statusbar.phone.ScreenOffAnimationController
-import com.android.systemui.statusbar.policy.data.repository.FakeDeviceProvisioningRepository
-import com.android.systemui.user.domain.UserDomainLayerModule
-import com.android.systemui.util.mockito.mock
+import com.android.systemui.shade.domain.interactor.shadeInteractor
+import com.android.systemui.statusbar.notification.icon.domain.interactor.alwaysOnDisplayNotificationIconsInteractor
+import com.android.systemui.statusbar.phone.dozeParameters
+import com.android.systemui.testKosmos
import com.android.systemui.util.mockito.whenever
import com.google.common.truth.Truth.assertThat
-import dagger.BindsInstance
-import dagger.Component
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.test.runCurrent
+import kotlinx.coroutines.test.runTest
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
+@OptIn(ExperimentalCoroutinesApi::class)
@SmallTest
@RunWith(AndroidJUnit4::class)
class NotificationIconContainerAlwaysOnDisplayViewModelTest : SysuiTestCase() {
-
- @SysUISingleton
- @Component(
- modules =
- [
- SysUITestModule::class,
- BiometricsDomainLayerModule::class,
- UserDomainLayerModule::class,
- ]
- )
- interface TestComponent :
- SysUITestComponent<NotificationIconContainerAlwaysOnDisplayViewModel> {
-
- val deviceProvisioningRepository: FakeDeviceProvisioningRepository
- val keyguardRepository: FakeKeyguardRepository
- val keyguardTransitionRepository: FakeKeyguardTransitionRepository
- val powerRepository: FakePowerRepository
-
- @Component.Factory
- interface Factory {
- fun create(
- @BindsInstance test: SysuiTestCase,
- mocks: TestMocksModule,
- featureFlags: FakeFeatureFlagsClassicModule,
- ): TestComponent
+ private val kosmos =
+ testKosmos().apply {
+ fakeFeatureFlagsClassic.apply { set(Flags.FULL_SCREEN_USER_SWITCHER, value = false) }
}
- }
- private val dozeParams: DozeParameters = mock()
- private val screenOffAnimController: ScreenOffAnimationController = mock()
-
- private val testComponent: TestComponent =
- DaggerNotificationIconContainerAlwaysOnDisplayViewModelTest_TestComponent.factory()
- .create(
- test = this,
- featureFlags =
- FakeFeatureFlagsClassicModule {
- set(Flags.FULL_SCREEN_USER_SWITCHER, value = false)
- },
- mocks =
- TestMocksModule(
- dozeParameters = dozeParams,
- screenOffAnimationController = screenOffAnimController,
- ),
- )
+ val underTest =
+ NotificationIconContainerAlwaysOnDisplayViewModel(
+ kosmos.testDispatcher,
+ kosmos.alwaysOnDisplayNotificationIconsInteractor,
+ kosmos.keyguardInteractor,
+ kosmos.keyguardTransitionInteractor,
+ kosmos.mainResources,
+ kosmos.shadeInteractor,
+ )
+ val testScope = kosmos.testScope
+ val keyguardRepository = kosmos.fakeKeyguardRepository
+ val keyguardTransitionRepository = kosmos.fakeKeyguardTransitionRepository
+ val powerRepository = kosmos.fakePowerRepository
@Before
fun setup() {
- testComponent.apply {
- keyguardRepository.setKeyguardShowing(true)
- keyguardRepository.setKeyguardOccluded(false)
- powerRepository.updateWakefulness(
- rawState = WakefulnessState.AWAKE,
- lastWakeReason = WakeSleepReason.OTHER,
- lastSleepReason = WakeSleepReason.OTHER,
- )
- }
+ keyguardRepository.setKeyguardShowing(true)
+ keyguardRepository.setKeyguardOccluded(false)
+ kosmos.fakePowerRepository.updateWakefulness(
+ rawState = WakefulnessState.AWAKE,
+ lastWakeReason = WakeSleepReason.OTHER,
+ lastSleepReason = WakeSleepReason.OTHER,
+ )
mSetFlagsRule.enableFlags(FLAG_NEW_AOD_TRANSITION)
}
@Test
fun animationsEnabled_isFalse_whenDeviceAsleepAndNotPulsing() =
- testComponent.runTest {
+ testScope.runTest {
powerRepository.updateWakefulness(
rawState = WakefulnessState.ASLEEP,
lastWakeReason = WakeSleepReason.POWER_BUTTON,
@@ -143,7 +113,7 @@ class NotificationIconContainerAlwaysOnDisplayViewModelTest : SysuiTestCase() {
@Test
fun animationsEnabled_isTrue_whenDeviceAsleepAndPulsing() =
- testComponent.runTest {
+ testScope.runTest {
powerRepository.updateWakefulness(
rawState = WakefulnessState.ASLEEP,
lastWakeReason = WakeSleepReason.POWER_BUTTON,
@@ -166,7 +136,7 @@ class NotificationIconContainerAlwaysOnDisplayViewModelTest : SysuiTestCase() {
@Test
fun animationsEnabled_isFalse_whenStartingToSleepAndNotControlScreenOff() =
- testComponent.runTest {
+ testScope.runTest {
powerRepository.updateWakefulness(
rawState = WakefulnessState.STARTING_TO_SLEEP,
lastWakeReason = WakeSleepReason.POWER_BUTTON,
@@ -179,7 +149,7 @@ class NotificationIconContainerAlwaysOnDisplayViewModelTest : SysuiTestCase() {
transitionState = TransitionState.STARTED,
)
)
- whenever(dozeParams.shouldControlScreenOff()).thenReturn(false)
+ whenever(kosmos.dozeParameters.shouldControlScreenOff()).thenReturn(false)
val animationsEnabled by collectLastValue(underTest.areContainerChangesAnimated)
runCurrent()
assertThat(animationsEnabled).isFalse()
@@ -187,7 +157,7 @@ class NotificationIconContainerAlwaysOnDisplayViewModelTest : SysuiTestCase() {
@Test
fun animationsEnabled_isTrue_whenStartingToSleepAndControlScreenOff() =
- testComponent.runTest {
+ testScope.runTest {
val animationsEnabled by collectLastValue(underTest.areContainerChangesAnimated)
assertThat(animationsEnabled).isTrue()
@@ -203,13 +173,13 @@ class NotificationIconContainerAlwaysOnDisplayViewModelTest : SysuiTestCase() {
transitionState = TransitionState.STARTED,
)
)
- whenever(dozeParams.shouldControlScreenOff()).thenReturn(true)
+ whenever(kosmos.dozeParameters.shouldControlScreenOff()).thenReturn(true)
assertThat(animationsEnabled).isTrue()
}
@Test
fun animationsEnabled_isTrue_whenNotAsleep() =
- testComponent.runTest {
+ testScope.runTest {
powerRepository.updateWakefulness(
rawState = WakefulnessState.AWAKE,
lastWakeReason = WakeSleepReason.POWER_BUTTON,
@@ -228,7 +198,7 @@ class NotificationIconContainerAlwaysOnDisplayViewModelTest : SysuiTestCase() {
@Test
@DisableFlags(FLAG_KEYGUARD_WM_STATE_REFACTOR)
fun animationsEnabled_isTrue_whenKeyguardIsShowing() =
- testComponent.runTest {
+ testScope.runTest {
keyguardTransitionRepository.sendTransitionStep(
TransitionStep(
transitionState = TransitionState.STARTED,
@@ -257,7 +227,7 @@ class NotificationIconContainerAlwaysOnDisplayViewModelTest : SysuiTestCase() {
@Test
fun tintAlpha_isZero_whenNotOnAodOrDozing() =
- testComponent.runTest {
+ testScope.runTest {
val tintAlpha by collectLastValue(underTest.tintAlpha)
runCurrent()
keyguardTransitionRepository.sendTransitionSteps(
@@ -271,7 +241,7 @@ class NotificationIconContainerAlwaysOnDisplayViewModelTest : SysuiTestCase() {
@Test
fun tintAlpha_isOne_whenOnAod() =
- testComponent.runTest {
+ testScope.runTest {
val tintAlpha by collectLastValue(underTest.tintAlpha)
runCurrent()
keyguardTransitionRepository.sendTransitionSteps(
@@ -285,7 +255,7 @@ class NotificationIconContainerAlwaysOnDisplayViewModelTest : SysuiTestCase() {
@Test
fun tintAlpha_isOne_whenDozing() =
- testComponent.runTest {
+ testScope.runTest {
val tintAlpha by collectLastValue(underTest.tintAlpha)
runCurrent()
keyguardTransitionRepository.sendTransitionSteps(
@@ -298,7 +268,7 @@ class NotificationIconContainerAlwaysOnDisplayViewModelTest : SysuiTestCase() {
@Test
fun tintAlpha_isOne_whenTransitionFromAodToDoze() =
- testComponent.runTest {
+ testScope.runTest {
keyguardTransitionRepository.sendTransitionSteps(
from = KeyguardState.GONE,
to = KeyguardState.AOD,
@@ -332,7 +302,7 @@ class NotificationIconContainerAlwaysOnDisplayViewModelTest : SysuiTestCase() {
@Test
fun tintAlpha_isFraction_midTransitionToAod() =
- testComponent.runTest {
+ testScope.runTest {
val tintAlpha by collectLastValue(underTest.tintAlpha)
runCurrent()
@@ -361,7 +331,7 @@ class NotificationIconContainerAlwaysOnDisplayViewModelTest : SysuiTestCase() {
@Test
fun iconAnimationsEnabled_whenOnLockScreen() =
- testComponent.runTest {
+ testScope.runTest {
val iconAnimationsEnabled by collectLastValue(underTest.areIconAnimationsEnabled)
runCurrent()
@@ -376,7 +346,7 @@ class NotificationIconContainerAlwaysOnDisplayViewModelTest : SysuiTestCase() {
@Test
fun iconAnimationsDisabled_whenOnAod() =
- testComponent.runTest {
+ testScope.runTest {
val iconAnimationsEnabled by collectLastValue(underTest.areIconAnimationsEnabled)
runCurrent()
@@ -391,7 +361,7 @@ class NotificationIconContainerAlwaysOnDisplayViewModelTest : SysuiTestCase() {
@Test
fun iconAnimationsDisabled_whenDozing() =
- testComponent.runTest {
+ testScope.runTest {
val iconAnimationsEnabled by collectLastValue(underTest.areIconAnimationsEnabled)
runCurrent()
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowTest.java
index e8349b0978e0..ed7383cacd29 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowTest.java
@@ -1003,21 +1003,6 @@ public class ExpandableNotificationRowTest extends SysuiTestCase {
// THEN
assertThat(row.isExpanded()).isFalse();
}
-
- @Test
- @EnableFlags(ExpandHeadsUpOnInlineReply.FLAG_NAME)
- public void hasUserChangedExpansion_expandPinned_returnTrue() throws Exception {
- // GIVEN
- final ExpandableNotificationRow row = mNotificationTestHelper.createRow();
- row.setPinned(true);
-
- // WHEN
- row.expandNotification();
-
- // THEN
- assertThat(row.hasUserChangedExpansion()).isTrue();
- }
-
@Test
public void onDisappearAnimationFinished_shouldSetFalse_headsUpAnimatingAway()
throws Exception {
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java
index a925ccfe174b..b7995953b327 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java
@@ -91,6 +91,7 @@ import com.android.systemui.statusbar.notification.footer.shared.FooterViewRefac
import com.android.systemui.statusbar.notification.footer.ui.view.FooterView;
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;
import com.android.systemui.statusbar.notification.row.ExpandableView;
+import com.android.systemui.statusbar.notification.shared.NotificationThrottleHun;
import com.android.systemui.statusbar.notification.shared.NotificationsHeadsUpRefactor;
import com.android.systemui.statusbar.phone.KeyguardBypassController;
import com.android.systemui.statusbar.phone.ScreenOffAnimationController;
@@ -1196,6 +1197,26 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase {
}
@Test
+ @EnableFlags(NotificationThrottleHun.FLAG_NAME)
+ public void testGenerateHeadsUpAnimation_isSeenInShade_noAnimation() {
+ // GIVEN NSSL is ready for HUN animations
+ Consumer<Boolean> headsUpAnimatingAwayListener = mock(BooleanConsumer.class);
+ prepareStackScrollerForHunAnimations(headsUpAnimatingAwayListener);
+
+ // Entry was seen in shade
+ NotificationEntry entry = mock(NotificationEntry.class);
+ when(entry.isSeenInShade()).thenReturn(true);
+ ExpandableNotificationRow row = mock(ExpandableNotificationRow.class);
+ when(row.getEntry()).thenReturn(entry);
+
+ // WHEN we generate an add event
+ mStackScroller.generateHeadsUpAnimation(row, /* isHeadsUp = */ true);
+
+ // THEN nothing happens
+ assertThat(mStackScroller.isAddOrRemoveAnimationPending()).isFalse();
+ }
+
+ @Test
@EnableFlags(NotificationsHeadsUpRefactor.FLAG_NAME)
public void testOnChildAnimationsFinished_resetsheadsUpAnimatingAway() {
// GIVEN NSSL is ready for HUN animations
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithmTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithmTest.kt
index c2a7b52d9f19..b7ebebec7ca7 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithmTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithmTest.kt
@@ -126,6 +126,19 @@ class StackScrollAlgorithmTest : SysuiTestCase() {
}
@Test
+ @EnableSceneContainer
+ fun resetViewStates_defaultHun_yTranslationIsHeadsUpTop() {
+ val headsUpTop = 200f
+ ambientState.headsUpTop = headsUpTop
+
+ whenever(notificationRow.isPinned).thenReturn(true)
+ whenever(notificationRow.isHeadsUp).thenReturn(true)
+
+ resetViewStates_hunYTranslationIs(headsUpTop)
+ }
+
+ @Test
+ @DisableSceneContainer
fun resetViewStates_defaultHun_yTranslationIsInset() {
whenever(notificationRow.isPinned).thenReturn(true)
whenever(notificationRow.isHeadsUp).thenReturn(true)
@@ -133,6 +146,7 @@ class StackScrollAlgorithmTest : SysuiTestCase() {
}
@Test
+ @DisableSceneContainer
fun resetViewStates_defaultHunWithStackMargin_changesHunYTranslation() {
whenever(notificationRow.isPinned).thenReturn(true)
whenever(notificationRow.isHeadsUp).thenReturn(true)
@@ -140,7 +154,7 @@ class StackScrollAlgorithmTest : SysuiTestCase() {
}
@Test
- @DisableSceneContainer // TODO(b/332574413) cover hun bounds integration with tests
+ @DisableSceneContainer
fun resetViewStates_defaultHunWhenShadeIsOpening_yTranslationIsInset() {
whenever(notificationRow.isPinned).thenReturn(true)
whenever(notificationRow.isHeadsUp).thenReturn(true)
@@ -153,6 +167,7 @@ class StackScrollAlgorithmTest : SysuiTestCase() {
}
@Test
+ @DisableSceneContainer
@DisableFlags(NotificationsImprovedHunAnimation.FLAG_NAME)
fun resetViewStates_hunAnimatingAway_yTranslationIsInset() {
whenever(notificationRow.isHeadsUpAnimatingAway).thenReturn(true)
@@ -160,6 +175,7 @@ class StackScrollAlgorithmTest : SysuiTestCase() {
}
@Test
+ @DisableSceneContainer
@DisableFlags(NotificationsImprovedHunAnimation.FLAG_NAME)
fun resetViewStates_hunAnimatingAway_StackMarginChangesHunYTranslation() {
whenever(notificationRow.isHeadsUpAnimatingAway).thenReturn(true)
@@ -167,6 +183,7 @@ class StackScrollAlgorithmTest : SysuiTestCase() {
}
@Test
+ @DisableSceneContainer
@EnableFlags(NotificationsImprovedHunAnimation.FLAG_NAME)
fun resetViewStates_defaultHun_newHeadsUpAnim_yTranslationIsInset() {
whenever(notificationRow.isPinned).thenReturn(true)
@@ -175,6 +192,7 @@ class StackScrollAlgorithmTest : SysuiTestCase() {
}
@Test
+ @DisableSceneContainer
@EnableFlags(NotificationsImprovedHunAnimation.FLAG_NAME)
fun resetViewStates_defaultHunWithStackMargin_newHeadsUpAnim_changesHunYTranslation() {
whenever(notificationRow.isPinned).thenReturn(true)
@@ -183,7 +201,98 @@ class StackScrollAlgorithmTest : SysuiTestCase() {
}
@Test
- @DisableSceneContainer // TODO(b/332574413) cover hun bounds integration with tests
+ @EnableSceneContainer
+ fun resetViewStates_defaultHunInShade_stackTopEqualsHunTop_hunHasFullHeight() {
+ // Given: headsUpTop == stackTop -> haven't scrolled the stack yet
+ val headsUpTop = 150f
+ val collapsedHeight = 100
+ val intrinsicHeight = 300
+ fakeHunInShade(
+ headsUpTop = headsUpTop,
+ stackTop = headsUpTop,
+ collapsedHeight = collapsedHeight,
+ intrinsicHeight = intrinsicHeight,
+ )
+
+ // When
+ stackScrollAlgorithm.resetViewStates(ambientState, 0)
+
+ // Then: HUN is at the headsUpTop
+ assertThat(notificationRow.viewState.yTranslation).isEqualTo(headsUpTop)
+ // And: HUN has its full height
+ assertThat(notificationRow.viewState.height).isEqualTo(intrinsicHeight)
+ }
+
+ @Test
+ @EnableSceneContainer
+ fun resetViewStates_defaultHunInShade_stackTopGreaterThanHeadsUpTop_hunClampedToHeadsUpTop() {
+ // Given: headsUpTop < stackTop -> scrolled the stack a little bit
+ val stackTop = -25f
+ val headsUpTop = 150f
+ val collapsedHeight = 100
+ val intrinsicHeight = 300
+ fakeHunInShade(
+ headsUpTop = headsUpTop,
+ stackTop = stackTop,
+ collapsedHeight = collapsedHeight,
+ intrinsicHeight = intrinsicHeight
+ )
+
+ // When
+ stackScrollAlgorithm.resetViewStates(ambientState, 0)
+
+ // Then: HUN is translated to the headsUpTop
+ assertThat(notificationRow.viewState.yTranslation).isEqualTo(headsUpTop)
+ // And: HUN is clipped to the available space
+ // newTranslation = max(150, -25)
+ // distToReal = 150 - (-25)
+ // height = max(300 - 175, 100)
+ assertThat(notificationRow.viewState.height).isEqualTo(125)
+ }
+
+ @Test
+ @EnableSceneContainer
+ fun resetViewStates_defaultHunInShade_stackOverscrolledHun_hunClampedToHeadsUpTop() {
+ // Given: headsUpTop << stackTop -> stack has fully overscrolled the HUN
+ val stackTop = -500f
+ val headsUpTop = 150f
+ val collapsedHeight = 100
+ val intrinsicHeight = 300
+ fakeHunInShade(
+ headsUpTop = headsUpTop,
+ stackTop = stackTop,
+ collapsedHeight = collapsedHeight,
+ intrinsicHeight = intrinsicHeight
+ )
+
+ // When
+ stackScrollAlgorithm.resetViewStates(ambientState, 0)
+
+ // Then: HUN is translated to the headsUpTop
+ assertThat(notificationRow.viewState.yTranslation).isEqualTo(headsUpTop)
+ // And: HUN is clipped to its collapsed height
+ assertThat(notificationRow.viewState.height).isEqualTo(collapsedHeight)
+ }
+
+ @Test
+ @EnableSceneContainer
+ fun resetViewStates_defaultHun_showingQS_hunTranslatedToHeadsUpTop() {
+ // Given: the shade is open and scrolled to the bottom to show the QuickSettings
+ val headsUpTop = 2000f
+ fakeHunInShade(
+ headsUpTop = headsUpTop,
+ stackTop = 2600f, // stack scrolled below the screen
+ stackCutoff = 4000f,
+ collapsedHeight = 100,
+ intrinsicHeight = 300
+ )
+ whenever(notificationRow.isAboveShelf).thenReturn(true)
+
+ resetViewStates_hunYTranslationIs(headsUpTop)
+ }
+
+ @Test
+ @DisableSceneContainer
@EnableFlags(NotificationsImprovedHunAnimation.FLAG_NAME)
fun resetViewStates_defaultHun_showingQS_newHeadsUpAnim_hunTranslatedToMax() {
// Given: the shade is open and scrolled to the bottom to show the QuickSettings
@@ -200,7 +309,7 @@ class StackScrollAlgorithmTest : SysuiTestCase() {
}
@Test
- @DisableSceneContainer // TODO(b/332574413) cover hun bounds integration with tests
+ @DisableSceneContainer
@EnableFlags(NotificationsImprovedHunAnimation.FLAG_NAME)
fun resetViewStates_hunAnimatingAway_showingQS_newHeadsUpAnim_hunTranslatedToBottomOfScreen() {
// Given: the shade is open and scrolled to the bottom to show the QuickSettings
@@ -245,6 +354,7 @@ class StackScrollAlgorithmTest : SysuiTestCase() {
}
@Test
+ @DisableSceneContainer
@EnableFlags(NotificationsImprovedHunAnimation.FLAG_NAME)
fun resetViewStates_hunAnimatingAwayWhileDozing_yTranslationIsInset() {
whenever(notificationRow.isHeadsUpAnimatingAway).thenReturn(true)
@@ -255,6 +365,7 @@ class StackScrollAlgorithmTest : SysuiTestCase() {
}
@Test
+ @DisableSceneContainer
@EnableFlags(NotificationsImprovedHunAnimation.FLAG_NAME)
fun resetViewStates_hunAnimatingAwayWhileDozing_hasStackMargin_changesHunYTranslation() {
whenever(notificationRow.isHeadsUpAnimatingAway).thenReturn(true)
@@ -744,8 +855,7 @@ class StackScrollAlgorithmTest : SysuiTestCase() {
expandableViewState.yTranslation = 50f
stackScrollAlgorithm.clampHunToTop(
- /* quickQsOffsetHeight= */ 10f,
- /* stackTranslation= */ 0f,
+ /* headsUpTop= */ 10f,
/* collapsedHeight= */ 1f,
expandableViewState
)
@@ -760,8 +870,7 @@ class StackScrollAlgorithmTest : SysuiTestCase() {
expandableViewState.yTranslation = -10f
stackScrollAlgorithm.clampHunToTop(
- /* quickQsOffsetHeight= */ 10f,
- /* stackTranslation= */ 0f,
+ /* headsUpTop= */ 10f,
/* collapsedHeight= */ 1f,
expandableViewState
)
@@ -777,8 +886,7 @@ class StackScrollAlgorithmTest : SysuiTestCase() {
expandableViewState.yTranslation = -100f
stackScrollAlgorithm.clampHunToTop(
- /* quickQsOffsetHeight= */ 10f,
- /* stackTranslation= */ 0f,
+ /* headsUpTop= */ 10f,
/* collapsedHeight= */ 10f,
expandableViewState
)
@@ -796,8 +904,7 @@ class StackScrollAlgorithmTest : SysuiTestCase() {
expandableViewState.yTranslation = 5f
stackScrollAlgorithm.clampHunToTop(
- /* quickQsOffsetHeight= */ 10f,
- /* stackTranslation= */ 0f,
+ /* headsUpTop= */ 10f,
/* collapsedHeight= */ 10f,
expandableViewState
)
@@ -1309,6 +1416,33 @@ class StackScrollAlgorithmTest : SysuiTestCase() {
expect.that(notificationRow.viewState.alpha).isEqualTo(expectedAlpha)
}
+
+ /** fakes the notification row under test, to be a HUN in a fully opened shade */
+ private fun fakeHunInShade(
+ headsUpTop: Float,
+ collapsedHeight: Int,
+ intrinsicHeight: Int,
+ stackTop: Float,
+ stackCutoff: Float = 2000f,
+ fullStackHeight: Float = 3000f
+ ) {
+ ambientState.headsUpTop = headsUpTop
+ ambientState.stackTop = stackTop
+ ambientState.stackCutoff = stackCutoff
+
+ // shade is fully open
+ ambientState.expansionFraction = 1.0f
+ with(fullStackHeight) {
+ ambientState.stackHeight = this
+ ambientState.stackEndHeight = this
+ }
+ stackScrollAlgorithm.setIsExpanded(true)
+
+ whenever(notificationRow.mustStayOnScreen()).thenReturn(true)
+ whenever(notificationRow.isHeadsUp).thenReturn(true)
+ whenever(notificationRow.collapsedHeight).thenReturn(collapsedHeight)
+ whenever(notificationRow.intrinsicHeight).thenReturn(intrinsicHeight)
+ }
}
private fun mockExpandableNotificationRow(): ExpandableNotificationRow {
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/BiometricsUnlockControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/BiometricsUnlockControllerTest.java
index 285949a41fcd..9eafcdbadfa5 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/BiometricsUnlockControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/BiometricsUnlockControllerTest.java
@@ -495,18 +495,18 @@ public class BiometricsUnlockControllerTest extends SysuiTestCase {
}
@Test
- public void biometricUnlockStateResetOnTransitionFromGone() {
- mBiometricUnlockController.consumeTransitionStepOnStartedKeyguardState(
+ public void biometricUnlockStateResetOnStartedTransition() {
+ mBiometricUnlockController.consumeFromGoneTransitions(
new TransitionStep(
- KeyguardState.AOD,
KeyguardState.GONE,
+ KeyguardState.AOD,
.1f /* value */,
- TransitionState.STARTED
+ TransitionState.RUNNING
)
);
verify(mBiometricUnlockInteractor, never()).setBiometricUnlockState(anyInt(), any());
- mBiometricUnlockController.consumeTransitionStepOnStartedKeyguardState(
+ mBiometricUnlockController.consumeFromGoneTransitions(
new TransitionStep(
KeyguardState.GONE,
KeyguardState.AOD,
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/DozeParametersTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/DozeParametersTest.java
index 7cb41f119c9a..5052a008af68 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/DozeParametersTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/DozeParametersTest.java
@@ -52,6 +52,8 @@ import com.android.systemui.statusbar.policy.ConfigurationController;
import com.android.systemui.tuner.TunerService;
import com.android.systemui.unfold.FoldAodAnimationController;
import com.android.systemui.unfold.SysUIUnfoldComponent;
+import com.android.systemui.util.settings.FakeSettings;
+import com.android.systemui.util.settings.SecureSettings;
import org.junit.Assert;
import org.junit.Before;
@@ -113,6 +115,7 @@ public class DozeParametersTest extends SysuiTestCase {
.thenReturn(mFoldAodAnimationController);
when(mUserTracker.getUserId()).thenReturn(ActivityManager.getCurrentUser());
+ SecureSettings secureSettings = new FakeSettings();
mDozeParameters = new DozeParameters(
mContext,
mHandler,
@@ -130,7 +133,8 @@ public class DozeParametersTest extends SysuiTestCase {
mConfigurationController,
mStatusBarStateController,
mUserTracker,
- mDozeInteractor
+ mDozeInteractor,
+ secureSettings
);
verify(mBatteryController).addCallback(mBatteryStateChangeCallback.capture());
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/LegacyNotificationIconAreaControllerImplTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/LegacyNotificationIconAreaControllerImplTest.java
index fea0e72fe577..8dfbb37f8189 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/LegacyNotificationIconAreaControllerImplTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/LegacyNotificationIconAreaControllerImplTest.java
@@ -118,8 +118,8 @@ public class LegacyNotificationIconAreaControllerImplTest extends SysuiTestCase
}
@Test
+ @DisableFlags(Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT)
public void testAppearResetsTranslation() {
- mSetFlagsRule.disableFlags(Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT);
mController.setupAodIcons(mAodIcons);
when(mDozeParameters.shouldControlScreenOff()).thenReturn(false);
mController.appearAodIcons();
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java
index 3ca4c594cede..31f93b402a75 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java
@@ -37,6 +37,8 @@ import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
+import android.platform.test.annotations.DisableFlags;
+import android.platform.test.annotations.EnableFlags;
import android.platform.test.annotations.RequiresFlagsEnabled;
import android.platform.test.flag.junit.CheckFlagsRule;
import android.platform.test.flag.junit.DeviceFlagsValueProvider;
@@ -66,6 +68,7 @@ import com.android.keyguard.KeyguardUpdateMonitor;
import com.android.keyguard.KeyguardUpdateMonitorCallback;
import com.android.keyguard.TrustGrantFlags;
import com.android.keyguard.ViewMediatorCallback;
+import com.android.systemui.Flags;
import com.android.systemui.SysuiTestCase;
import com.android.systemui.biometrics.domain.interactor.UdfpsOverlayInteractor;
import com.android.systemui.bouncer.domain.interactor.AlternateBouncerInteractor;
@@ -74,8 +77,11 @@ import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerCallbackInte
import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor;
import com.android.systemui.bouncer.ui.BouncerView;
import com.android.systemui.bouncer.ui.BouncerViewDelegate;
+import com.android.systemui.deviceentry.domain.interactor.DeviceEntryInteractor;
import com.android.systemui.dock.DockManager;
import com.android.systemui.dreams.DreamOverlayStateController;
+import com.android.systemui.flags.DisableSceneContainer;
+import com.android.systemui.flags.EnableSceneContainer;
import com.android.systemui.keyguard.domain.interactor.KeyguardDismissActionInteractor;
import com.android.systemui.keyguard.domain.interactor.KeyguardSurfaceBehindInteractor;
import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor;
@@ -110,6 +116,7 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
+import org.mockito.Answers;
import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
import org.mockito.Mock;
@@ -158,6 +165,7 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
@Mock private TaskbarDelegate mTaskbarDelegate;
@Mock private StatusBarKeyguardViewManager.KeyguardViewManagerCallback mCallback;
@Mock private SelectedUserInteractor mSelectedUserInteractor;
+ @Mock private DeviceEntryInteractor mDeviceEntryInteractor;
private StatusBarKeyguardViewManager mStatusBarKeyguardViewManager;
private PrimaryBouncerCallbackInteractor.PrimaryBouncerExpansionCallback
@@ -169,6 +177,8 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
private ViewRootImpl mViewRootImpl;
@Mock
private WindowOnBackInvokedDispatcher mOnBackInvokedDispatcher;
+ @Mock(answer = Answers.RETURNS_DEEP_STUBS)
+ private KeyguardTransitionInteractor mKeyguardTransitionInteractor;
@Captor
private ArgumentCaptor<OnBackInvokedCallback> mBackCallbackCaptor;
@Captor
@@ -178,6 +188,7 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
public final CheckFlagsRule mCheckFlagsRule = DeviceFlagsValueProvider.createCheckFlagsRule();
@Before
+ @DisableFlags(com.android.systemui.Flags.FLAG_KEYGUARD_WM_STATE_REFACTOR)
public void setUp() {
MockitoAnnotations.initMocks(this);
when(mContainer.findViewById(anyInt())).thenReturn(mKeyguardMessageArea);
@@ -185,10 +196,6 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
.thenReturn(mKeyguardMessageAreaController);
when(mBouncerView.getDelegate()).thenReturn(mBouncerViewDelegate);
when(mBouncerViewDelegate.getBackCallback()).thenReturn(mBouncerViewDelegateBackCallback);
- mSetFlagsRule.disableFlags(
- com.android.systemui.Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR,
- com.android.systemui.Flags.FLAG_KEYGUARD_WM_STATE_REFACTOR
- );
when(mNotificationShadeWindowController.getWindowRootView())
.thenReturn(mNotificationShadeWindowView);
@@ -219,7 +226,7 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
mAlternateBouncerInteractor,
mUdfpsOverlayInteractor,
mActivityStarter,
- mock(KeyguardTransitionInteractor.class),
+ mKeyguardTransitionInteractor,
StandardTestDispatcher(null, null),
() -> mock(WindowManagerLockscreenVisibilityInteractor.class),
() -> mock(KeyguardDismissActionInteractor.class),
@@ -227,7 +234,8 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
() -> mock(KeyguardSurfaceBehindInteractor.class),
mock(JavaAdapter.class),
() -> mock(SceneInteractor.class),
- mock(StatusBarKeyguardViewManagerInteractor.class)) {
+ mock(StatusBarKeyguardViewManagerInteractor.class),
+ () -> mDeviceEntryInteractor) {
@Override
public ViewRootImpl getViewRootImpl() {
return mViewRootImpl;
@@ -250,6 +258,7 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
}
@Test
+ @DisableSceneContainer
public void dismissWithAction_AfterKeyguardGoneSetToFalse() {
OnDismissAction action = () -> false;
Runnable cancelAction = () -> {
@@ -265,6 +274,7 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
mStatusBarKeyguardViewManager.hide(0 /* startTime */, 0 /* fadeoutDuration */);
mStatusBarKeyguardViewManager.showPrimaryBouncer(true /* scrimmed */);
verify(mPrimaryBouncerInteractor, never()).show(anyBoolean());
+ verify(mDeviceEntryInteractor, never()).attemptDeviceEntry();
}
@Test
@@ -274,9 +284,11 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
KeyguardSecurityModel.SecurityMode.Password);
mStatusBarKeyguardViewManager.showPrimaryBouncer(true /* scrimmed */);
verify(mPrimaryBouncerInteractor, never()).show(anyBoolean());
+ verify(mDeviceEntryInteractor, never()).attemptDeviceEntry();
}
@Test
+ @DisableSceneContainer
public void showBouncer_showsTheBouncer() {
mStatusBarKeyguardViewManager.showPrimaryBouncer(true /* scrimmed */);
verify(mPrimaryBouncerInteractor).show(eq(true));
@@ -320,6 +332,7 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
}
@Test
+ @DisableSceneContainer
public void onPanelExpansionChanged_showsBouncerWhenSwiping() {
mKeyguardStateController.setCanDismissLockScreen(false);
mStatusBarKeyguardViewManager.onPanelExpansionChanged(EXPANSION_EVENT);
@@ -456,6 +469,7 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
}
@Test
+ @DisableSceneContainer
public void testHiding_cancelsGoneRunnable() {
OnDismissAction action = mock(OnDismissAction.class);
Runnable cancelAction = mock(Runnable.class);
@@ -470,6 +484,7 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
}
@Test
+ @DisableSceneContainer
public void testHidingBouncer_cancelsGoneRunnable() {
OnDismissAction action = mock(OnDismissAction.class);
Runnable cancelAction = mock(Runnable.class);
@@ -484,6 +499,7 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
}
@Test
+ @DisableSceneContainer
public void testHiding_doesntCancelWhenShowing() {
OnDismissAction action = mock(OnDismissAction.class);
Runnable cancelAction = mock(Runnable.class);
@@ -539,6 +555,7 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
}
@Test
+ @DisableSceneContainer
public void testShowAltAuth_unlockingWithBiometricNotAllowed() {
// GIVEN cannot use alternate bouncer
when(mPrimaryBouncerInteractor.isFullyShowing()).thenReturn(false);
@@ -553,6 +570,8 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
}
@Test
+ @DisableSceneContainer
+ @DisableFlags(com.android.systemui.Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR)
public void testShowAlternateBouncer_unlockingWithBiometricAllowed() {
// GIVEN will show alternate bouncer
when(mPrimaryBouncerInteractor.isFullyShowing()).thenReturn(false);
@@ -735,7 +754,8 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
() -> mock(KeyguardSurfaceBehindInteractor.class),
mock(JavaAdapter.class),
() -> mock(SceneInteractor.class),
- mock(StatusBarKeyguardViewManagerInteractor.class)) {
+ mock(StatusBarKeyguardViewManagerInteractor.class),
+ () -> mDeviceEntryInteractor) {
@Override
public ViewRootImpl getViewRootImpl() {
return mViewRootImpl;
@@ -783,11 +803,11 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
}
@Test
+ @EnableFlags(com.android.systemui.Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR)
public void handleDispatchTouchEvent_alternateBouncerViewFlagEnabled() {
mStatusBarKeyguardViewManager.addCallback(mCallback);
// GIVEN alternate bouncer view flag enabled & the alternate bouncer is visible
- mSetFlagsRule.enableFlags(com.android.systemui.Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR);
when(mAlternateBouncerInteractor.isVisibleState()).thenReturn(true);
// THEN the touch is not acted upon
@@ -795,9 +815,9 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
}
@Test
+ @EnableFlags(com.android.systemui.Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR)
public void onInterceptTouch_alternateBouncerViewFlagEnabled() {
// GIVEN alternate bouncer view flag enabled & the alternate bouncer is visible
- mSetFlagsRule.enableFlags(com.android.systemui.Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR);
when(mAlternateBouncerInteractor.isVisibleState()).thenReturn(true);
// THEN the touch is not intercepted
@@ -829,6 +849,8 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
}
@Test
+ @DisableSceneContainer
+ @DisableFlags(Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR)
public void handleDispatchTouchEvent_shouldInterceptTouchAndHandleTouch() {
mStatusBarKeyguardViewManager.addCallback(mCallback);
@@ -855,6 +877,8 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
}
@Test
+ @DisableSceneContainer
+ @DisableFlags(Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR)
public void handleDispatchTouchEvent_shouldInterceptTouchButNotHandleTouch() {
mStatusBarKeyguardViewManager.addCallback(mCallback);
@@ -881,6 +905,7 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
}
@Test
+ @DisableSceneContainer
public void shouldInterceptTouch_alternateBouncerNotVisible() {
// GIVEN the alternate bouncer is not visible
when(mAlternateBouncerInteractor.isVisibleState()).thenReturn(false);
@@ -898,6 +923,8 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
}
@Test
+ @DisableSceneContainer
+ @DisableFlags(Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR)
public void shouldInterceptTouch_alternateBouncerVisible() {
// GIVEN the alternate bouncer is visible
when(mAlternateBouncerInteractor.isVisibleState()).thenReturn(true);
@@ -931,6 +958,8 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
}
@Test
+ @DisableSceneContainer
+ @DisableFlags(Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR)
public void alternateBouncerOnTouch_actionDownThenUp_noMinTimeShown_noHideAltBouncer() {
reset(mAlternateBouncerInteractor);
@@ -955,6 +984,8 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
}
@Test
+ @DisableSceneContainer
+ @DisableFlags(Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR)
public void alternateBouncerOnTouch_actionDownThenUp_handlesTouch_hidesAltBouncer() {
reset(mAlternateBouncerInteractor);
@@ -979,6 +1010,7 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
}
@Test
+ @DisableSceneContainer
public void alternateBouncerOnTouch_actionUp_doesNotHideAlternateBouncer() {
reset(mAlternateBouncerInteractor);
@@ -996,6 +1028,8 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
}
@Test
+ @DisableSceneContainer
+ @DisableFlags(Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR)
public void onTrustChanged_hideAlternateBouncerAndClearMessageArea() {
// GIVEN keyguard update monitor callback is registered
verify(mKeyguardUpdateMonitor).registerCallback(mKeyguardUpdateMonitorCallback.capture());
@@ -1024,6 +1058,8 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
}
@Test
+ @DisableSceneContainer
+ @DisableFlags(Flags.FLAG_SIM_PIN_RACE_CONDITION_ON_RESTART)
public void testShowBouncerOrKeyguard_needsFullScreen() {
when(mKeyguardSecurityModel.getSecurityMode(anyInt())).thenReturn(
KeyguardSecurityModel.SecurityMode.SimPin);
@@ -1033,6 +1069,23 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
}
@Test
+ @DisableSceneContainer
+ @EnableFlags(Flags.FLAG_SIM_PIN_RACE_CONDITION_ON_RESTART)
+ public void testShowBouncerOrKeyguard_showsKeyguardIfShowBouncerReturnsFalse() {
+ when(mKeyguardSecurityModel.getSecurityMode(anyInt())).thenReturn(
+ KeyguardSecurityModel.SecurityMode.SimPin);
+ when(mPrimaryBouncerInteractor.show(true)).thenReturn(false);
+ when(mKeyguardTransitionInteractor.getTransitionState().getValue().getTo())
+ .thenReturn(KeyguardState.LOCKSCREEN);
+
+ reset(mCentralSurfaces);
+ mStatusBarKeyguardViewManager.showBouncerOrKeyguard(false);
+ verify(mPrimaryBouncerInteractor).show(true);
+ verify(mCentralSurfaces).showKeyguard();
+ }
+
+ @Test
+ @DisableSceneContainer
public void testShowBouncerOrKeyguard_needsFullScreen_bouncerAlreadyShowing() {
when(mKeyguardSecurityModel.getSecurityMode(anyInt())).thenReturn(
KeyguardSecurityModel.SecurityMode.SimPin);
@@ -1043,6 +1096,20 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
}
@Test
+ @EnableSceneContainer
+ public void showBouncer_attemptDeviceEntry() {
+ mStatusBarKeyguardViewManager.showBouncer(false);
+ verify(mDeviceEntryInteractor).attemptDeviceEntry();
+ }
+
+ @Test
+ @EnableSceneContainer
+ public void showPrimaryBouncer_attemptDeviceEntry() {
+ mStatusBarKeyguardViewManager.showPrimaryBouncer(false);
+ verify(mDeviceEntryInteractor).attemptDeviceEntry();
+ }
+
+ @Test
public void altBouncerNotVisible_keyguardAuthenticatedBiometricsHandled() {
clearInvocations(mAlternateBouncerInteractor);
when(mAlternateBouncerInteractor.isVisibleState()).thenReturn(false);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragmentTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragmentTest.java
index 01540e7584a3..58ad83546e01 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragmentTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/fragment/CollapsedStatusBarFragmentTest.java
@@ -536,7 +536,7 @@ public class CollapsedStatusBarFragmentTest extends SysuiBaseFragmentTest {
// WHEN there's *no* ongoing activity via new callback
mCollapsedStatusBarViewBinder.getListener().onOngoingActivityStatusChanged(
- /* hasOngoingActivity= */ false);
+ /* hasOngoingActivity= */ false, /* shouldAnimate= */ false);
// THEN the old callback value is used, so the view is shown
assertEquals(View.VISIBLE,
@@ -548,7 +548,7 @@ public class CollapsedStatusBarFragmentTest extends SysuiBaseFragmentTest {
// WHEN there *is* an ongoing activity via new callback
mCollapsedStatusBarViewBinder.getListener().onOngoingActivityStatusChanged(
- /* hasOngoingActivity= */ true);
+ /* hasOngoingActivity= */ true, /* shouldAnimate= */ false);
// THEN the old callback value is used, so the view is hidden
assertEquals(View.GONE,
@@ -565,7 +565,7 @@ public class CollapsedStatusBarFragmentTest extends SysuiBaseFragmentTest {
// listener, but I'm unable to get the fragment to get attached so that the binder starts
// listening to flows.
mCollapsedStatusBarViewBinder.getListener().onOngoingActivityStatusChanged(
- /* hasOngoingActivity= */ false);
+ /* hasOngoingActivity= */ false, /* shouldAnimate= */ false);
assertEquals(View.GONE,
mFragment.getView().findViewById(R.id.ongoing_activity_chip).getVisibility());
@@ -577,7 +577,7 @@ public class CollapsedStatusBarFragmentTest extends SysuiBaseFragmentTest {
resumeAndGetFragment();
mCollapsedStatusBarViewBinder.getListener().onOngoingActivityStatusChanged(
- /* hasOngoingActivity= */ true);
+ /* hasOngoingActivity= */ true, /* shouldAnimate= */ false);
assertEquals(View.VISIBLE,
mFragment.getView().findViewById(R.id.ongoing_activity_chip).getVisibility());
@@ -590,7 +590,7 @@ public class CollapsedStatusBarFragmentTest extends SysuiBaseFragmentTest {
CollapsedStatusBarFragment fragment = resumeAndGetFragment();
mCollapsedStatusBarViewBinder.getListener().onOngoingActivityStatusChanged(
- /* hasOngoingActivity= */ true);
+ /* hasOngoingActivity= */ true, /* shouldAnimate= */ false);
fragment.disable(DEFAULT_DISPLAY,
StatusBarManager.DISABLE_NOTIFICATION_ICONS, 0, false);
@@ -605,7 +605,7 @@ public class CollapsedStatusBarFragmentTest extends SysuiBaseFragmentTest {
CollapsedStatusBarFragment fragment = resumeAndGetFragment();
mCollapsedStatusBarViewBinder.getListener().onOngoingActivityStatusChanged(
- /* hasOngoingActivity= */ true);
+ /* hasOngoingActivity= */ true, /* shouldAnimate= */ false);
when(mHeadsUpAppearanceController.shouldBeVisible()).thenReturn(true);
fragment.disable(DEFAULT_DISPLAY, 0, 0, false);
@@ -621,14 +621,14 @@ public class CollapsedStatusBarFragmentTest extends SysuiBaseFragmentTest {
// Ongoing activity started
mCollapsedStatusBarViewBinder.getListener().onOngoingActivityStatusChanged(
- /* hasOngoingActivity= */ true);
+ /* hasOngoingActivity= */ true, /* shouldAnimate= */ false);
assertEquals(View.VISIBLE,
mFragment.getView().findViewById(R.id.ongoing_activity_chip).getVisibility());
// Ongoing activity ended
mCollapsedStatusBarViewBinder.getListener().onOngoingActivityStatusChanged(
- /* hasOngoingActivity= */ false);
+ /* hasOngoingActivity= */ false, /* shouldAnimate= */ false);
assertEquals(View.GONE,
mFragment.getView().findViewById(R.id.ongoing_activity_chip).getVisibility());
@@ -643,7 +643,7 @@ public class CollapsedStatusBarFragmentTest extends SysuiBaseFragmentTest {
// Ongoing call started
mCollapsedStatusBarViewBinder.getListener().onOngoingActivityStatusChanged(
- /* hasOngoingActivity= */ true);
+ /* hasOngoingActivity= */ true, /* shouldAnimate= */ false);
// Notification area is hidden without delay
assertEquals(0f, getNotificationAreaView().getAlpha(), 0.01);
@@ -661,7 +661,7 @@ public class CollapsedStatusBarFragmentTest extends SysuiBaseFragmentTest {
// WHEN there's *no* ongoing activity via new callback
mCollapsedStatusBarViewBinder.getListener().onOngoingActivityStatusChanged(
- /* hasOngoingActivity= */ false);
+ /* hasOngoingActivity= */ false, /* shouldAnimate= */ false);
// THEN the new callback value is used, so the view is hidden
assertEquals(View.GONE,
@@ -673,7 +673,7 @@ public class CollapsedStatusBarFragmentTest extends SysuiBaseFragmentTest {
// WHEN there *is* an ongoing activity via new callback
mCollapsedStatusBarViewBinder.getListener().onOngoingActivityStatusChanged(
- /* hasOngoingActivity= */ true);
+ /* hasOngoingActivity= */ true, /* shouldAnimate= */ false);
// THEN the new callback value is used, so the view is shown
assertEquals(View.VISIBLE,
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconInteractorTest.kt
index 30e96f10918d..e439aff423b0 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconInteractorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconInteractorTest.kt
@@ -738,6 +738,28 @@ class MobileIconInteractorTest : SysuiTestCase() {
assertThat(latest).isInstanceOf(SignalIconModel.Satellite::class.java)
}
+ @EnableFlags(com.android.internal.telephony.flags.Flags.FLAG_CARRIER_ENABLED_SATELLITE_FLAG)
+ @Test
+ // See b/346904529 for more context
+ fun satBasedIcon_doesNotInflateSignalStrength() =
+ testScope.runTest {
+ val latest by collectLastValue(underTest.signalLevelIcon)
+
+ // GIVEN a satellite connection
+ connectionRepository.isNonTerrestrial.value = true
+ // GIVEN this carrier has set INFLATE_SIGNAL_STRENGTH
+ connectionRepository.inflateSignalStrength.value = true
+
+ connectionRepository.primaryLevel.value = 4
+ assertThat(latest!!.level).isEqualTo(4)
+
+ connectionRepository.inflateSignalStrength.value = true
+ connectionRepository.primaryLevel.value = 4
+
+ // Icon level is unaffected
+ assertThat(latest!!.level).isEqualTo(4)
+ }
+
private fun createInteractor(
overrides: MobileIconCarrierIdOverrides = MobileIconCarrierIdOverridesImpl()
) =
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/ui/viewmodel/MobileIconViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/ui/viewmodel/MobileIconViewModelTest.kt
index cec41557f344..e51092429cd6 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/ui/viewmodel/MobileIconViewModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/ui/viewmodel/MobileIconViewModelTest.kt
@@ -862,6 +862,38 @@ class MobileIconViewModelTest : SysuiTestCase() {
assertThat(latest!!.icon.res).isEqualTo(R.drawable.ic_satellite_connected_2)
}
+ @EnableFlags(com.android.internal.telephony.flags.Flags.FLAG_CARRIER_ENABLED_SATELLITE_FLAG)
+ @Test
+ fun satelliteIcon_ignoresInflateSignalStrength() =
+ testScope.runTest {
+ // Note that this is the exact same test as above, but with inflateSignalStrength set to
+ // true we note that the level is unaffected by inflation
+ repository.inflateSignalStrength.value = true
+ repository.isNonTerrestrial.value = true
+ repository.setAllLevels(0)
+
+ val latest by
+ collectLastValue(underTest.icon.filterIsInstance(SignalIconModel.Satellite::class))
+
+ // Level 0 -> no connection
+ assertThat(latest).isNotNull()
+ assertThat(latest!!.icon.res).isEqualTo(R.drawable.ic_satellite_connected_0)
+
+ // 1-2 -> 1 bar
+ repository.setAllLevels(1)
+ assertThat(latest!!.icon.res).isEqualTo(R.drawable.ic_satellite_connected_1)
+
+ repository.setAllLevels(2)
+ assertThat(latest!!.icon.res).isEqualTo(R.drawable.ic_satellite_connected_1)
+
+ // 3-4 -> 2 bars
+ repository.setAllLevels(3)
+ assertThat(latest!!.icon.res).isEqualTo(R.drawable.ic_satellite_connected_2)
+
+ repository.setAllLevels(4)
+ assertThat(latest!!.icon.res).isEqualTo(R.drawable.ic_satellite_connected_2)
+ }
+
private fun createAndSetViewModel() {
underTest =
MobileIconViewModel(
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/shared/ui/viewmodel/CollapsedStatusBarViewModelImplTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/shared/ui/viewmodel/CollapsedStatusBarViewModelImplTest.kt
index 94159bcebf47..60750cf96e67 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/shared/ui/viewmodel/CollapsedStatusBarViewModelImplTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/shared/ui/viewmodel/CollapsedStatusBarViewModelImplTest.kt
@@ -425,7 +425,7 @@ class CollapsedStatusBarViewModelImplTest : SysuiTestCase() {
kosmos.screenRecordRepository.screenRecordState.value = ScreenRecordModel.DoingNothing
- assertThat(latest).isEqualTo(OngoingActivityChipModel.Hidden)
+ assertThat(latest).isInstanceOf(OngoingActivityChipModel.Hidden::class.java)
kosmos.fakeMediaProjectionRepository.mediaProjectionState.value =
MediaProjectionState.Projecting.EntireScreen(NORMAL_PACKAGE)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/shared/ui/viewmodel/FakeCollapsedStatusBarViewModel.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/shared/ui/viewmodel/FakeCollapsedStatusBarViewModel.kt
index d3f11253fc09..cefdf7e43fae 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/shared/ui/viewmodel/FakeCollapsedStatusBarViewModel.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/shared/ui/viewmodel/FakeCollapsedStatusBarViewModel.kt
@@ -29,7 +29,7 @@ class FakeCollapsedStatusBarViewModel : CollapsedStatusBarViewModel {
override val transitionFromLockscreenToDreamStartedEvent = MutableSharedFlow<Unit>()
override val ongoingActivityChip: MutableStateFlow<OngoingActivityChipModel> =
- MutableStateFlow(OngoingActivityChipModel.Hidden)
+ MutableStateFlow(OngoingActivityChipModel.Hidden())
override val isHomeStatusBarAllowedByScene = MutableStateFlow(false)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/CastControllerImplTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/CastControllerImplTest.java
index 59b20c824739..627463b45982 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/CastControllerImplTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/CastControllerImplTest.java
@@ -1,6 +1,8 @@
package com.android.systemui.statusbar.policy;
+import static com.android.systemui.log.LogBufferHelperKt.logcatLogBuffer;
+
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.mockito.Mockito.mock;
@@ -58,7 +60,8 @@ public class CastControllerImplTest extends SysuiTestCase {
mController = new CastControllerImpl(
mContext,
mock(PackageManager.class),
- mock(DumpManager.class));
+ mock(DumpManager.class),
+ new CastControllerLogger(logcatLogBuffer("CastControllerImplTest")));
}
@Test
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/CastDeviceTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/CastDeviceTest.kt
index 03ad66cd4cce..16061df1fa89 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/CastDeviceTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/CastDeviceTest.kt
@@ -25,6 +25,7 @@ import android.media.MediaRouter
import android.media.projection.MediaProjectionInfo
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
+import com.android.systemui.log.logcatLogBuffer
import com.android.systemui.res.R
import com.android.systemui.statusbar.policy.CastDevice.Companion.toCastDevice
import com.google.common.truth.Truth.assertThat
@@ -40,6 +41,7 @@ import org.mockito.kotlin.whenever
class CastDeviceTest : SysuiTestCase() {
private val mockAppInfo =
mock<ApplicationInfo>().apply { whenever(this.loadLabel(any())).thenReturn("") }
+ private val logger = CastControllerLogger(logcatLogBuffer("CastDeviceTest"))
private val packageManager =
mock<PackageManager>().apply {
@@ -322,7 +324,7 @@ class CastDeviceTest : SysuiTestCase() {
whenever(this.packageName).thenReturn("fake.package")
}
- val device = projection.toCastDevice(context, packageManager)
+ val device = projection.toCastDevice(context, packageManager, logger)
assertThat(device.id).isEqualTo("fake.package")
}
@@ -334,7 +336,7 @@ class CastDeviceTest : SysuiTestCase() {
whenever(this.packageName).thenReturn(HEADLESS_REMOTE_PACKAGE)
}
- val device = projection.toCastDevice(context, packageManager)
+ val device = projection.toCastDevice(context, packageManager, logger)
assertThat(device.name).isEmpty()
}
@@ -349,7 +351,7 @@ class CastDeviceTest : SysuiTestCase() {
whenever(packageManager.getApplicationInfo(eq(NORMAL_PACKAGE), any<Int>()))
.thenThrow(PackageManager.NameNotFoundException())
- val device = projection.toCastDevice(context, packageManager)
+ val device = projection.toCastDevice(context, packageManager, logger)
assertThat(device.name).isEqualTo(NORMAL_PACKAGE)
}
@@ -366,7 +368,7 @@ class CastDeviceTest : SysuiTestCase() {
whenever(packageManager.getApplicationInfo(eq(NORMAL_PACKAGE), any<Int>()))
.thenReturn(appInfo)
- val device = projection.toCastDevice(context, packageManager)
+ val device = projection.toCastDevice(context, packageManager, logger)
assertThat(device.name).isEqualTo(NORMAL_PACKAGE)
}
@@ -383,7 +385,7 @@ class CastDeviceTest : SysuiTestCase() {
whenever(packageManager.getApplicationInfo(eq(NORMAL_PACKAGE), any<Int>()))
.thenReturn(appInfo)
- val device = projection.toCastDevice(context, packageManager)
+ val device = projection.toCastDevice(context, packageManager, logger)
assertThat(device.name).isEqualTo("Valid App Name")
}
@@ -392,7 +394,7 @@ class CastDeviceTest : SysuiTestCase() {
fun projectionToCastDevice_descriptionIsCasting() {
val projection = mockProjectionInfo()
- val device = projection.toCastDevice(context, packageManager)
+ val device = projection.toCastDevice(context, packageManager, logger)
assertThat(device.description).isEqualTo(context.getString(R.string.quick_settings_casting))
}
@@ -401,7 +403,7 @@ class CastDeviceTest : SysuiTestCase() {
fun projectionToCastDevice_stateIsConnected() {
val projection = mockProjectionInfo()
- val device = projection.toCastDevice(context, packageManager)
+ val device = projection.toCastDevice(context, packageManager, logger)
assertThat(device.state).isEqualTo(CastDevice.CastState.Connected)
}
@@ -410,7 +412,7 @@ class CastDeviceTest : SysuiTestCase() {
fun projectionToCastDevice_tagIsProjection() {
val projection = mockProjectionInfo()
- val device = projection.toCastDevice(context, packageManager)
+ val device = projection.toCastDevice(context, packageManager, logger)
assertThat(device.tag).isEqualTo(projection)
}
@@ -419,7 +421,7 @@ class CastDeviceTest : SysuiTestCase() {
fun projectionToCastDevice_originIsMediaProjection() {
val projection = mockProjectionInfo()
- val device = projection.toCastDevice(context, packageManager)
+ val device = projection.toCastDevice(context, packageManager, logger)
assertThat(device.origin).isEqualTo(CastDevice.CastOrigin.MediaProjection)
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/ui/viewmodel/KeyguardStatusBarViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/ui/viewmodel/KeyguardStatusBarViewModelTest.kt
index ef4e7341db74..12cfdcfa8df5 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/ui/viewmodel/KeyguardStatusBarViewModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/ui/viewmodel/KeyguardStatusBarViewModelTest.kt
@@ -16,6 +16,7 @@
package com.android.systemui.statusbar.ui.viewmodel
+import android.platform.test.annotations.EnableFlags
import android.platform.test.flag.junit.FlagsParameterization
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
@@ -32,8 +33,8 @@ import com.android.systemui.scene.domain.interactor.sceneInteractor
import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.statusbar.domain.interactor.keyguardStatusBarInteractor
import com.android.systemui.statusbar.notification.data.repository.FakeHeadsUpRowRepository
+import com.android.systemui.statusbar.notification.shared.NotificationsHeadsUpRefactor
import com.android.systemui.statusbar.notification.stack.data.repository.headsUpNotificationRepository
-import com.android.systemui.statusbar.notification.stack.data.repository.setNotifications
import com.android.systemui.statusbar.notification.stack.domain.interactor.headsUpNotificationInteractor
import com.android.systemui.statusbar.policy.BatteryController
import com.android.systemui.statusbar.policy.batteryController
@@ -126,6 +127,7 @@ class KeyguardStatusBarViewModelTest(flags: FlagsParameterization) : SysuiTestCa
}
@Test
+ @EnableFlags(NotificationsHeadsUpRefactor.FLAG_NAME)
fun isVisible_headsUpStatusBarShown_false() =
testScope.runTest {
val latest by collectLastValue(underTest.isVisible)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/touchpad/tutorial/ui/gesture/FakeMotionEvent.kt b/packages/SystemUI/tests/src/com/android/systemui/touchpad/tutorial/ui/gesture/FakeMotionEvent.kt
index e632e3474b96..a8271fec0963 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/touchpad/tutorial/ui/gesture/FakeMotionEvent.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/touchpad/tutorial/ui/gesture/FakeMotionEvent.kt
@@ -21,8 +21,10 @@ import android.view.InputDevice.SOURCE_MOUSE
import android.view.MotionEvent
import android.view.MotionEvent.CLASSIFICATION_NONE
import android.view.MotionEvent.TOOL_TYPE_FINGER
+import org.mockito.AdditionalAnswers
+import org.mockito.Mockito.mock
import org.mockito.kotlin.doReturn
-import org.mockito.kotlin.spy
+import org.mockito.kotlin.whenever
fun motionEvent(
action: Int,
@@ -37,12 +39,18 @@ fun motionEvent(
val event =
MotionEvent.obtain(/* downTime= */ 0, /* eventTime= */ 0, action, x, y, /* metaState= */ 0)
event.source = source
- return spy<MotionEvent>(event) {
- on { getToolType(0) } doReturn toolType
- on { getPointerCount() } doReturn pointerCount
- axisValues.forEach { (key, value) -> on { getAxisValue(key) } doReturn value }
- on { getClassification() } doReturn classification
- }
+ // we need to use mock with delegation instead of spy because:
+ // 1. Spy will try to deallocate the same memory again when finalize() is called as it keep the
+ // same memory pointer to native MotionEvent
+ // 2. Even after workaround for issue above there still remains problem with destructor of
+ // native event trying to free the same chunk of native memory. I'm not sure why it happens but
+ // mock seems to fix the issue and because it delegates all calls seems safer overall
+ val delegate = mock(MotionEvent::class.java, AdditionalAnswers.delegatesTo<MotionEvent>(event))
+ doReturn(toolType).whenever(delegate).getToolType(0)
+ doReturn(pointerCount).whenever(delegate).pointerCount
+ doReturn(classification).whenever(delegate).classification
+ axisValues.forEach { (key, value) -> doReturn(value).whenever(delegate).getAxisValue(key) }
+ return delegate
}
fun touchpadEvent(
diff --git a/packages/SystemUI/tests/src/com/android/systemui/touchpad/tutorial/ui/TouchpadTutorialViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/touchpad/tutorial/ui/viewmodel/TouchpadTutorialViewModelTest.kt
index 2300a1f6b21e..c705cea2beff 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/touchpad/tutorial/ui/TouchpadTutorialViewModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/touchpad/tutorial/ui/viewmodel/TouchpadTutorialViewModelTest.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.systemui.touchpad.tutorial.ui
+package com.android.systemui.touchpad.tutorial.ui.viewmodel
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
diff --git a/packages/SystemUI/tests/src/com/android/systemui/tuner/TunablePaddingTest.java b/packages/SystemUI/tests/src/com/android/systemui/tuner/TunablePaddingTest.java
deleted file mode 100644
index bb7b31b95f5e..000000000000
--- a/packages/SystemUI/tests/src/com/android/systemui/tuner/TunablePaddingTest.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the
- * License is distributed on an "AS IS" BASIS, WITHOUT 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.tuner;
-
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.doAnswer;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import android.testing.LeakCheck.Tracker;
-import android.util.DisplayMetrics;
-import android.view.View;
-import android.view.WindowManager;
-
-import androidx.test.ext.junit.runners.AndroidJUnit4;
-import androidx.test.filters.SmallTest;
-
-import com.android.systemui.utils.leaks.LeakCheckedTest;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-@SmallTest
-@RunWith(AndroidJUnit4.class)
-public class TunablePaddingTest extends LeakCheckedTest {
-
- private static final String KEY = "KEY";
- private static final int DEFAULT = 42;
- private View mView;
- private TunablePadding mTunablePadding;
- private TunerService mTunerService;
-
- @Before
- public void setup() {
- injectLeakCheckedDependencies(ALL_SUPPORTED_CLASSES);
- mView = mock(View.class);
- when(mView.getContext()).thenReturn(mContext);
-
- mTunerService = mock(TunerService.class);
- mDependency.injectTestDependency(TunablePadding.TunablePaddingService.class,
- new TunablePadding.TunablePaddingService(mTunerService));
- Tracker tracker = mLeakCheck.getTracker("tuner");
- doAnswer(invocation -> {
- tracker.getLeakInfo(invocation.getArguments()[0]).addAllocation(new Throwable());
- return null;
- }).when(mTunerService).addTunable(any(), any());
- doAnswer(invocation -> {
- tracker.getLeakInfo(invocation.getArguments()[0]).clearAllocations();
- return null;
- }).when(mTunerService).removeTunable(any());
- }
-
- @Test
- public void testFlags() {
- mTunablePadding = TunablePadding.addTunablePadding(mView, KEY, DEFAULT,
- TunablePadding.FLAG_START);
- mTunablePadding.onTuningChanged(null, null);
- verify(mView).setPadding(eq(DEFAULT), eq(0), eq(0), eq(0));
- mTunablePadding.destroy();
-
- mTunablePadding = TunablePadding.addTunablePadding(mView, KEY, DEFAULT,
- TunablePadding.FLAG_TOP);
- mTunablePadding.onTuningChanged(null, null);
- verify(mView).setPadding(eq(0), eq(DEFAULT), eq(0), eq(0));
- mTunablePadding.destroy();
-
- mTunablePadding = TunablePadding.addTunablePadding(mView, KEY, DEFAULT,
- TunablePadding.FLAG_END);
- mTunablePadding.onTuningChanged(null, null);
- verify(mView).setPadding(eq(0), eq(0), eq(DEFAULT), eq(0));
- mTunablePadding.destroy();
-
- mTunablePadding = TunablePadding.addTunablePadding(mView, KEY, DEFAULT,
- TunablePadding.FLAG_BOTTOM);
- mTunablePadding.onTuningChanged(null, null);
- verify(mView).setPadding(eq(0), eq(0), eq(0), eq(DEFAULT));
- mTunablePadding.destroy();
- }
-
- @Test
- public void testRtl() {
- when(mView.isLayoutRtl()).thenReturn(true);
-
- mTunablePadding = TunablePadding.addTunablePadding(mView, KEY, DEFAULT,
- TunablePadding.FLAG_END);
- mTunablePadding.onTuningChanged(null, null);
- verify(mView).setPadding(eq(DEFAULT), eq(0), eq(0), eq(0));
- mTunablePadding.destroy();
-
- mTunablePadding = TunablePadding.addTunablePadding(mView, KEY, DEFAULT,
- TunablePadding.FLAG_START);
- mTunablePadding.onTuningChanged(null, null);
- verify(mView).setPadding(eq(0), eq(0), eq(DEFAULT), eq(0));
- mTunablePadding.destroy();
- }
-
- @Test
- public void testTuning() {
- int value = 3;
- mTunablePadding = TunablePadding.addTunablePadding(mView, KEY, DEFAULT,
- TunablePadding.FLAG_START);
- mTunablePadding.onTuningChanged(KEY, String.valueOf(value));
-
- DisplayMetrics metrics = new DisplayMetrics();
- mContext.getSystemService(WindowManager.class).getDefaultDisplay().getMetrics(metrics);
- int output = (int) (metrics.density * value);
- verify(mView).setPadding(eq(output), eq(0), eq(0), eq(0));
-
- mTunablePadding.destroy();
- }
-}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/util/service/PersistentConnectionManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/util/service/PersistentConnectionManagerTest.java
deleted file mode 100644
index ef10fdf63741..000000000000
--- a/packages/SystemUI/tests/src/com/android/systemui/util/service/PersistentConnectionManagerTest.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.systemui.util.service;
-
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.verify;
-
-import androidx.test.ext.junit.runners.AndroidJUnit4;
-import androidx.test.filters.SmallTest;
-
-import com.android.systemui.SysuiTestCase;
-import com.android.systemui.dump.DumpManager;
-import com.android.systemui.util.concurrency.FakeExecutor;
-import com.android.systemui.util.time.FakeSystemClock;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mock;
-import org.mockito.Mockito;
-import org.mockito.MockitoAnnotations;
-
-@SmallTest
-@RunWith(AndroidJUnit4.class)
-public class PersistentConnectionManagerTest extends SysuiTestCase {
- private static final int MAX_RETRIES = 5;
- private static final int RETRY_DELAY_MS = 1000;
- private static final int CONNECTION_MIN_DURATION_MS = 5000;
- private static final String DUMPSYS_NAME = "dumpsys_name";
-
- private FakeSystemClock mFakeClock = new FakeSystemClock();
- private FakeExecutor mFakeExecutor = new FakeExecutor(mFakeClock);
-
- @Mock
- private ObservableServiceConnection<Proxy> mConnection;
-
- @Mock
- private ObservableServiceConnection.Callback<Proxy> mConnectionCallback;
-
- @Mock
- private Observer mObserver;
-
- @Mock
- private DumpManager mDumpManager;
-
- private static class Proxy {
- }
-
- private PersistentConnectionManager<Proxy> mConnectionManager;
-
- @Before
- public void setup() {
- MockitoAnnotations.initMocks(this);
-
- mConnectionManager = new PersistentConnectionManager<>(
- mFakeClock,
- mFakeExecutor,
- mDumpManager,
- DUMPSYS_NAME,
- mConnection,
- MAX_RETRIES,
- RETRY_DELAY_MS,
- CONNECTION_MIN_DURATION_MS,
- mObserver);
- }
-
- private ObservableServiceConnection.Callback<Proxy> captureCallbackAndSend(
- ObservableServiceConnection<Proxy> mConnection, Proxy proxy) {
- ArgumentCaptor<ObservableServiceConnection.Callback<Proxy>> connectionCallbackCaptor =
- ArgumentCaptor.forClass(ObservableServiceConnection.Callback.class);
-
- verify(mConnection).addCallback(connectionCallbackCaptor.capture());
- verify(mConnection).bind();
- Mockito.clearInvocations(mConnection);
-
- final ObservableServiceConnection.Callback callback = connectionCallbackCaptor.getValue();
- if (proxy != null) {
- callback.onConnected(mConnection, proxy);
- } else {
- callback.onDisconnected(mConnection, 0);
- }
-
- return callback;
- }
-
- /**
- * Validates initial connection.
- */
- @Test
- public void testConnect() {
- mConnectionManager.start();
- captureCallbackAndSend(mConnection, Mockito.mock(Proxy.class));
- }
-
- /**
- * Ensures reconnection on disconnect.
- */
- @Test
- public void testRetryOnBindFailure() {
- mConnectionManager.start();
- ArgumentCaptor<ObservableServiceConnection.Callback<Proxy>> connectionCallbackCaptor =
- ArgumentCaptor.forClass(ObservableServiceConnection.Callback.class);
-
- verify(mConnection).addCallback(connectionCallbackCaptor.capture());
-
- // Verify attempts happen. Note that we account for the retries plus initial attempt, which
- // is not scheduled.
- for (int attemptCount = 0; attemptCount < MAX_RETRIES + 1; attemptCount++) {
- verify(mConnection).bind();
- Mockito.clearInvocations(mConnection);
- connectionCallbackCaptor.getValue().onDisconnected(mConnection, 0);
- mFakeExecutor.advanceClockToNext();
- mFakeExecutor.runAllReady();
- }
- }
-
- /**
- * Ensures manual unbind does not reconnect.
- */
- @Test
- public void testStopDoesNotReconnect() {
- mConnectionManager.start();
- ArgumentCaptor<ObservableServiceConnection.Callback<Proxy>> connectionCallbackCaptor =
- ArgumentCaptor.forClass(ObservableServiceConnection.Callback.class);
-
- verify(mConnection).addCallback(connectionCallbackCaptor.capture());
- verify(mConnection).bind();
- Mockito.clearInvocations(mConnection);
- mConnectionManager.stop();
- mFakeExecutor.advanceClockToNext();
- mFakeExecutor.runAllReady();
- verify(mConnection, never()).bind();
- }
-
- /**
- * Ensures rebind on package change.
- */
- @Test
- public void testAttemptOnPackageChange() {
- mConnectionManager.start();
- verify(mConnection).bind();
- ArgumentCaptor<Observer.Callback> callbackCaptor =
- ArgumentCaptor.forClass(Observer.Callback.class);
- captureCallbackAndSend(mConnection, Mockito.mock(Proxy.class));
-
- verify(mObserver).addCallback(callbackCaptor.capture());
-
- callbackCaptor.getValue().onSourceChanged();
- verify(mConnection).bind();
- }
-
- @Test
- public void testAddConnectionCallback() {
- mConnectionManager.addConnectionCallback(mConnectionCallback);
- verify(mConnection).addCallback(mConnectionCallback);
- }
-
- @Test
- public void testRemoveConnectionCallback() {
- mConnectionManager.removeConnectionCallback(mConnectionCallback);
- verify(mConnection).removeCallback(mConnectionCallback);
- }
-}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/util/settings/SettingsProxyTest.kt b/packages/SystemUI/tests/src/com/android/systemui/util/settings/SettingsProxyTest.kt
index dd791e764e01..5ac61102fa99 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/util/settings/SettingsProxyTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/util/settings/SettingsProxyTest.kt
@@ -28,9 +28,10 @@ import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.CoroutineDispatcher
-import kotlinx.coroutines.launch
+import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.StandardTestDispatcher
import kotlinx.coroutines.test.TestScope
+import kotlinx.coroutines.test.advanceUntilIdle
import kotlinx.coroutines.test.runTest
import org.junit.Assert.assertThrows
import org.junit.Before
@@ -44,6 +45,7 @@ import org.mockito.kotlin.eq
@RunWith(AndroidJUnit4::class)
@SmallTest
@TestableLooper.RunWithLooper
+@OptIn(ExperimentalCoroutinesApi::class)
class SettingsProxyTest : SysuiTestCase() {
private val testDispatcher = StandardTestDispatcher()
@@ -60,11 +62,12 @@ class SettingsProxyTest : SysuiTestCase() {
}
@Test
- fun registerContentObserver_inputString_success() {
- mSettings.registerContentObserverSync(TEST_SETTING, mContentObserver)
- verify(mSettings.getContentResolver())
- .registerContentObserver(eq(TEST_SETTING_URI), eq(false), eq(mContentObserver))
- }
+ fun registerContentObserver_inputString_success() =
+ testScope.runTest {
+ mSettings.registerContentObserverSync(TEST_SETTING, mContentObserver)
+ verify(mSettings.getContentResolver())
+ .registerContentObserver(eq(TEST_SETTING_URI), eq(false), eq(mContentObserver))
+ }
@Test
fun registerContentObserverSuspend_inputString_success() =
@@ -75,24 +78,25 @@ class SettingsProxyTest : SysuiTestCase() {
}
@Test
- fun registerContentObserverAsync_inputString_success() {
- mSettings.registerContentObserverAsync(TEST_SETTING, mContentObserver)
- testScope.launch {
+ fun registerContentObserverAsync_inputString_success() =
+ testScope.runTest {
+ mSettings.registerContentObserverAsync(TEST_SETTING, mContentObserver)
+ testScope.advanceUntilIdle()
verify(mSettings.getContentResolver())
.registerContentObserver(eq(TEST_SETTING_URI), eq(false), eq(mContentObserver))
}
- }
@Test
- fun registerContentObserver_inputString_notifyForDescendants_true() {
- mSettings.registerContentObserverSync(
- TEST_SETTING,
- notifyForDescendants = true,
- mContentObserver
- )
- verify(mSettings.getContentResolver())
- .registerContentObserver(eq(TEST_SETTING_URI), eq(true), eq(mContentObserver))
- }
+ fun registerContentObserver_inputString_notifyForDescendants_true() =
+ testScope.runTest {
+ mSettings.registerContentObserverSync(
+ TEST_SETTING,
+ notifyForDescendants = true,
+ mContentObserver
+ )
+ verify(mSettings.getContentResolver())
+ .registerContentObserver(eq(TEST_SETTING_URI), eq(true), eq(mContentObserver))
+ }
@Test
fun registerContentObserverSuspend_inputString_notifyForDescendants_true() =
@@ -107,24 +111,25 @@ class SettingsProxyTest : SysuiTestCase() {
}
@Test
- fun registerContentObserverAsync_inputString_notifyForDescendants_true() {
- mSettings.registerContentObserverAsync(
- TEST_SETTING,
- notifyForDescendants = true,
- mContentObserver
- )
- testScope.launch {
+ fun registerContentObserverAsync_inputString_notifyForDescendants_true() =
+ testScope.runTest {
+ mSettings.registerContentObserverAsync(
+ TEST_SETTING,
+ notifyForDescendants = true,
+ mContentObserver
+ )
+ testScope.advanceUntilIdle()
verify(mSettings.getContentResolver())
.registerContentObserver(eq(TEST_SETTING_URI), eq(true), eq(mContentObserver))
}
- }
@Test
- fun registerContentObserver_inputUri_success() {
- mSettings.registerContentObserverSync(TEST_SETTING_URI, mContentObserver)
- verify(mSettings.getContentResolver())
- .registerContentObserver(eq(TEST_SETTING_URI), eq(false), eq(mContentObserver))
- }
+ fun registerContentObserver_inputUri_success() =
+ testScope.runTest {
+ mSettings.registerContentObserverSync(TEST_SETTING_URI, mContentObserver)
+ verify(mSettings.getContentResolver())
+ .registerContentObserver(eq(TEST_SETTING_URI), eq(false), eq(mContentObserver))
+ }
@Test
fun registerContentObserverSuspend_inputUri_success() =
@@ -135,24 +140,25 @@ class SettingsProxyTest : SysuiTestCase() {
}
@Test
- fun registerContentObserverAsync_inputUri_success() {
- mSettings.registerContentObserverAsync(TEST_SETTING_URI, mContentObserver)
- testScope.launch {
+ fun registerContentObserverAsync_inputUri_success() =
+ testScope.runTest {
+ mSettings.registerContentObserverAsync(TEST_SETTING_URI, mContentObserver)
+ testScope.advanceUntilIdle()
verify(mSettings.getContentResolver())
.registerContentObserver(eq(TEST_SETTING_URI), eq(false), eq(mContentObserver))
}
- }
@Test
- fun registerContentObserver_inputUri_notifyForDescendants_true() {
- mSettings.registerContentObserverSync(
- TEST_SETTING_URI,
- notifyForDescendants = true,
- mContentObserver
- )
- verify(mSettings.getContentResolver())
- .registerContentObserver(eq(TEST_SETTING_URI), eq(true), eq(mContentObserver))
- }
+ fun registerContentObserver_inputUri_notifyForDescendants_true() =
+ testScope.runTest {
+ mSettings.registerContentObserverSync(
+ TEST_SETTING_URI,
+ notifyForDescendants = true,
+ mContentObserver
+ )
+ verify(mSettings.getContentResolver())
+ .registerContentObserver(eq(TEST_SETTING_URI), eq(true), eq(mContentObserver))
+ }
@Test
fun registerContentObserverSuspend_inputUri_notifyForDescendants_true() =
@@ -167,25 +173,58 @@ class SettingsProxyTest : SysuiTestCase() {
}
@Test
- fun registerContentObserverAsync_inputUri_notifyForDescendants_true() {
- mSettings.registerContentObserverAsync(
- TEST_SETTING_URI,
- notifyForDescendants = true,
- mContentObserver
- )
- testScope.launch {
+ fun registerContentObserverAsync_inputUri_notifyForDescendants_true() =
+ testScope.runTest {
+ mSettings.registerContentObserverAsync(
+ TEST_SETTING_URI,
+ notifyForDescendants = true,
+ mContentObserver
+ )
+ testScope.advanceUntilIdle()
verify(mSettings.getContentResolver())
.registerContentObserver(eq(TEST_SETTING_URI), eq(true), eq(mContentObserver))
}
- }
@Test
- fun unregisterContentObserverSync() {
- mSettings.unregisterContentObserverSync(mContentObserver)
- verify(mSettings.getContentResolver()).unregisterContentObserver(eq(mContentObserver))
+ fun registerContentObserverAsync_registeredLambdaPassed_callsCallback() =
+ testScope.runTest {
+ verifyRegisteredCallbackForRegistration {
+ mSettings.registerContentObserverAsync(TEST_SETTING, mContentObserver, it)
+ }
+ verifyRegisteredCallbackForRegistration {
+ mSettings.registerContentObserverAsync(TEST_SETTING_URI, mContentObserver, it)
+ }
+ verifyRegisteredCallbackForRegistration {
+ mSettings.registerContentObserverAsync(TEST_SETTING, false, mContentObserver, it)
+ }
+ verifyRegisteredCallbackForRegistration {
+ mSettings.registerContentObserverAsync(
+ TEST_SETTING_URI,
+ false,
+ mContentObserver,
+ it
+ )
+ }
+ }
+
+ private fun verifyRegisteredCallbackForRegistration(
+ call: (registeredRunnable: Runnable) -> Unit
+ ) {
+ var callbackCalled = false
+ val runnable = { callbackCalled = true }
+ call(runnable)
+ testScope.advanceUntilIdle()
+ assertThat(callbackCalled).isTrue()
}
@Test
+ fun unregisterContentObserverSync() =
+ testScope.runTest {
+ mSettings.unregisterContentObserverSync(mContentObserver)
+ verify(mSettings.getContentResolver()).unregisterContentObserver(eq(mContentObserver))
+ }
+
+ @Test
fun unregisterContentObserverSuspend_inputString_success() =
testScope.runTest {
mSettings.unregisterContentObserver(mContentObserver)
@@ -193,12 +232,12 @@ class SettingsProxyTest : SysuiTestCase() {
}
@Test
- fun unregisterContentObserverAsync_inputString_success() {
- mSettings.unregisterContentObserverAsync(mContentObserver)
- testScope.launch {
+ fun unregisterContentObserverAsync_inputString_success() =
+ testScope.runTest {
+ mSettings.unregisterContentObserverAsync(mContentObserver)
+ testScope.advanceUntilIdle()
verify(mSettings.getContentResolver()).unregisterContentObserver(eq(mContentObserver))
}
- }
@Test
fun getString_keyPresent_returnValidValue() {
diff --git a/packages/SystemUI/tests/src/com/android/systemui/util/settings/UserSettingsProxyTest.kt b/packages/SystemUI/tests/src/com/android/systemui/util/settings/UserSettingsProxyTest.kt
index e3e20c8ed501..5f7420d5a16b 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/util/settings/UserSettingsProxyTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/util/settings/UserSettingsProxyTest.kt
@@ -31,9 +31,11 @@ import com.android.systemui.settings.FakeUserTracker
import com.android.systemui.settings.UserTracker
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.CoroutineDispatcher
+import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.launch
import kotlinx.coroutines.test.StandardTestDispatcher
import kotlinx.coroutines.test.TestScope
+import kotlinx.coroutines.test.advanceUntilIdle
import kotlinx.coroutines.test.runTest
import org.junit.Assert.assertThrows
import org.junit.Before
@@ -65,20 +67,21 @@ class UserSettingsProxyTest : SysuiTestCase() {
}
@Test
- fun registerContentObserverForUser_inputString_success() {
- mSettings.registerContentObserverForUserSync(
- TEST_SETTING,
- mContentObserver,
- mUserTracker.userId
- )
- verify(mSettings.getContentResolver())
- .registerContentObserver(
- eq(TEST_SETTING_URI),
- eq(false),
- eq(mContentObserver),
- eq(MAIN_USER_ID)
+ fun registerContentObserverForUser_inputString_success() =
+ testScope.runTest {
+ mSettings.registerContentObserverForUserSync(
+ TEST_SETTING,
+ mContentObserver,
+ mUserTracker.userId
)
- }
+ verify(mSettings.getContentResolver())
+ .registerContentObserver(
+ eq(TEST_SETTING_URI),
+ eq(false),
+ eq(mContentObserver),
+ eq(MAIN_USER_ID)
+ )
+ }
@Test
fun registerContentObserverForUserSuspend_inputString_success() =
@@ -98,13 +101,14 @@ class UserSettingsProxyTest : SysuiTestCase() {
}
@Test
- fun registerContentObserverForUserAsync_inputString_success() {
- mSettings.registerContentObserverForUserAsync(
- TEST_SETTING,
- mContentObserver,
- mUserTracker.userId
- )
- testScope.launch {
+ fun registerContentObserverForUserAsync_inputString_success() =
+ testScope.runTest {
+ mSettings.registerContentObserverForUserAsync(
+ TEST_SETTING,
+ mContentObserver,
+ mUserTracker.userId
+ )
+ testScope.advanceUntilIdle()
verify(mSettings.getContentResolver())
.registerContentObserver(
eq(TEST_SETTING_URI),
@@ -113,24 +117,24 @@ class UserSettingsProxyTest : SysuiTestCase() {
eq(MAIN_USER_ID)
)
}
- }
@Test
- fun registerContentObserverForUser_inputString_notifyForDescendants_true() {
- mSettings.registerContentObserverForUserSync(
- TEST_SETTING,
- notifyForDescendants = true,
- mContentObserver,
- mUserTracker.userId
- )
- verify(mSettings.getContentResolver())
- .registerContentObserver(
- eq(TEST_SETTING_URI),
- eq(true),
- eq(mContentObserver),
- eq(MAIN_USER_ID)
+ fun registerContentObserverForUser_inputString_notifyForDescendants_true() =
+ testScope.runTest {
+ mSettings.registerContentObserverForUserSync(
+ TEST_SETTING,
+ notifyForDescendants = true,
+ mContentObserver,
+ mUserTracker.userId
)
- }
+ verify(mSettings.getContentResolver())
+ .registerContentObserver(
+ eq(TEST_SETTING_URI),
+ eq(true),
+ eq(mContentObserver),
+ eq(MAIN_USER_ID)
+ )
+ }
@Test
fun registerContentObserverForUserSuspend_inputString_notifyForDescendants_true() =
@@ -153,14 +157,15 @@ class UserSettingsProxyTest : SysuiTestCase() {
}
@Test
- fun registerContentObserverForUserAsync_inputString_notifyForDescendants_true() {
- mSettings.registerContentObserverForUserAsync(
- TEST_SETTING,
- notifyForDescendants = true,
- mContentObserver,
- mUserTracker.userId
- )
- testScope.launch {
+ fun registerContentObserverForUserAsync_inputString_notifyForDescendants_true() =
+ testScope.runTest {
+ mSettings.registerContentObserverForUserAsync(
+ TEST_SETTING,
+ notifyForDescendants = true,
+ mContentObserver,
+ mUserTracker.userId
+ )
+ testScope.advanceUntilIdle()
verify(mSettings.getContentResolver())
.registerContentObserver(
eq(TEST_SETTING_URI),
@@ -169,23 +174,23 @@ class UserSettingsProxyTest : SysuiTestCase() {
eq(MAIN_USER_ID)
)
}
- }
@Test
- fun registerContentObserverForUser_inputUri_success() {
- mSettings.registerContentObserverForUserSync(
- TEST_SETTING_URI,
- mContentObserver,
- mUserTracker.userId
- )
- verify(mSettings.getContentResolver())
- .registerContentObserver(
- eq(TEST_SETTING_URI),
- eq(false),
- eq(mContentObserver),
- eq(MAIN_USER_ID)
+ fun registerContentObserverForUser_inputUri_success() =
+ testScope.runTest {
+ mSettings.registerContentObserverForUserSync(
+ TEST_SETTING_URI,
+ mContentObserver,
+ mUserTracker.userId
)
- }
+ verify(mSettings.getContentResolver())
+ .registerContentObserver(
+ eq(TEST_SETTING_URI),
+ eq(false),
+ eq(mContentObserver),
+ eq(MAIN_USER_ID)
+ )
+ }
@Test
fun registerContentObserverForUserSuspend_inputUri_success() =
@@ -205,13 +210,15 @@ class UserSettingsProxyTest : SysuiTestCase() {
}
@Test
- fun registerContentObserverForUserAsync_inputUri_success() {
- mSettings.registerContentObserverForUserAsync(
- TEST_SETTING_URI,
- mContentObserver,
- mUserTracker.userId
- )
- testScope.launch {
+ fun registerContentObserverForUserAsync_inputUri_success() =
+ testScope.runTest {
+ mSettings.registerContentObserverForUserAsync(
+ TEST_SETTING_URI,
+ mContentObserver,
+ mUserTracker.userId
+ )
+ testScope.advanceUntilIdle()
+
verify(mSettings.getContentResolver())
.registerContentObserver(
eq(TEST_SETTING_URI),
@@ -220,24 +227,41 @@ class UserSettingsProxyTest : SysuiTestCase() {
eq(MAIN_USER_ID)
)
}
- }
+ @OptIn(ExperimentalCoroutinesApi::class)
@Test
- fun registerContentObserverForUser_inputUri_notifyForDescendants_true() {
- mSettings.registerContentObserverForUserSync(
- TEST_SETTING_URI,
- notifyForDescendants = true,
- mContentObserver,
- mUserTracker.userId
- )
- verify(mSettings.getContentResolver())
- .registerContentObserver(
- eq(TEST_SETTING_URI),
- eq(true),
- eq(mContentObserver),
- eq(MAIN_USER_ID)
+ fun registerContentObserverForUserAsync_callbackAfterRegister() =
+ testScope.runTest {
+ var callbackCalled = false
+ val runnable = { callbackCalled = true }
+
+ mSettings.registerContentObserverForUserAsync(
+ TEST_SETTING_URI,
+ mContentObserver,
+ mUserTracker.userId,
+ runnable
)
- }
+ testScope.advanceUntilIdle()
+ assertThat(callbackCalled).isTrue()
+ }
+
+ @Test
+ fun registerContentObserverForUser_inputUri_notifyForDescendants_true() =
+ testScope.runTest {
+ mSettings.registerContentObserverForUserSync(
+ TEST_SETTING_URI,
+ notifyForDescendants = true,
+ mContentObserver,
+ mUserTracker.userId
+ )
+ verify(mSettings.getContentResolver())
+ .registerContentObserver(
+ eq(TEST_SETTING_URI),
+ eq(true),
+ eq(mContentObserver),
+ eq(MAIN_USER_ID)
+ )
+ }
@Test
fun registerContentObserverForUserSuspend_inputUri_notifyForDescendants_true() =
@@ -260,14 +284,15 @@ class UserSettingsProxyTest : SysuiTestCase() {
}
@Test
- fun registerContentObserverForUserAsync_inputUri_notifyForDescendants_true() {
- mSettings.registerContentObserverForUserAsync(
- TEST_SETTING_URI,
- notifyForDescendants = true,
- mContentObserver,
- mUserTracker.userId
- )
- testScope.launch {
+ fun registerContentObserverForUserAsync_inputUri_notifyForDescendants_true() =
+ testScope.runTest {
+ mSettings.registerContentObserverForUserAsync(
+ TEST_SETTING_URI,
+ notifyForDescendants = true,
+ mContentObserver,
+ mUserTracker.userId
+ )
+ testScope.advanceUntilIdle()
verify(mSettings.getContentResolver())
.registerContentObserver(
eq(TEST_SETTING_URI),
@@ -276,14 +301,19 @@ class UserSettingsProxyTest : SysuiTestCase() {
eq(MAIN_USER_ID)
)
}
- }
@Test
- fun registerContentObserver_inputUri_success() {
- mSettings.registerContentObserverSync(TEST_SETTING_URI, mContentObserver)
- verify(mSettings.getContentResolver())
- .registerContentObserver(eq(TEST_SETTING_URI), eq(false), eq(mContentObserver), eq(0))
- }
+ fun registerContentObserver_inputUri_success() =
+ testScope.runTest {
+ mSettings.registerContentObserverSync(TEST_SETTING_URI, mContentObserver)
+ verify(mSettings.getContentResolver())
+ .registerContentObserver(
+ eq(TEST_SETTING_URI),
+ eq(false),
+ eq(mContentObserver),
+ eq(0)
+ )
+ }
@Test
fun registerContentObserverSuspend_inputUri_success() =
@@ -313,33 +343,26 @@ class UserSettingsProxyTest : SysuiTestCase() {
}
@Test
- fun registerContentObserver_inputUri_notifyForDescendants_true() {
- mSettings.registerContentObserverSync(
- TEST_SETTING_URI,
- notifyForDescendants = true,
- mContentObserver
- )
- verify(mSettings.getContentResolver())
- .registerContentObserver(eq(TEST_SETTING_URI), eq(true), eq(mContentObserver), eq(0))
- }
-
- @Test
- fun registerContentObserverSuspend_inputUri_notifyForDescendants_true() =
+ fun registerContentObserver_inputUri_notifyForDescendants_true() =
testScope.runTest {
- mSettings.registerContentObserver(TEST_SETTING_URI, mContentObserver)
+ mSettings.registerContentObserverSync(
+ TEST_SETTING_URI,
+ notifyForDescendants = true,
+ mContentObserver
+ )
verify(mSettings.getContentResolver())
.registerContentObserver(
eq(TEST_SETTING_URI),
- eq(false),
+ eq(true),
eq(mContentObserver),
eq(0)
)
}
@Test
- fun registerContentObserverAsync_inputUri_notifyForDescendants_true() {
- mSettings.registerContentObserverAsync(TEST_SETTING_URI, mContentObserver)
- testScope.launch {
+ fun registerContentObserverSuspend_inputUri_notifyForDescendants_true() =
+ testScope.runTest {
+ mSettings.registerContentObserver(TEST_SETTING_URI, mContentObserver)
verify(mSettings.getContentResolver())
.registerContentObserver(
eq(TEST_SETTING_URI),
@@ -348,7 +371,21 @@ class UserSettingsProxyTest : SysuiTestCase() {
eq(0)
)
}
- }
+
+ @Test
+ fun registerContentObserverAsync_inputUri_notifyForDescendants_true() =
+ testScope.runTest {
+ mSettings.registerContentObserverAsync(TEST_SETTING_URI, mContentObserver)
+ testScope.launch {
+ verify(mSettings.getContentResolver())
+ .registerContentObserver(
+ eq(TEST_SETTING_URI),
+ eq(false),
+ eq(mContentObserver),
+ eq(0)
+ )
+ }
+ }
@Test
fun getString_keyPresent_returnValidValue() {
diff --git a/packages/SystemUI/tests/src/com/android/systemui/volume/CsdWarningDialogTest.java b/packages/SystemUI/tests/src/com/android/systemui/volume/CsdWarningDialogTest.java
index c81623e627ae..49aedccde258 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/volume/CsdWarningDialogTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/volume/CsdWarningDialogTest.java
@@ -19,28 +19,46 @@ package com.android.systemui.volume;
import static android.media.AudioManager.CSD_WARNING_DOSE_REACHED_1X;
import static android.media.AudioManager.CSD_WARNING_DOSE_REPEATED_5X;
+import static com.google.common.truth.Truth.assertThat;
+
import static org.mockito.Mockito.any;
import static org.mockito.Mockito.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
import android.app.Notification;
import android.app.NotificationManager;
+import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
import android.media.AudioManager;
+import android.platform.test.annotations.EnableFlags;
import android.testing.TestableLooper;
+import android.util.Pair;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
import com.android.internal.messages.nano.SystemMessageProto;
+import com.android.systemui.Flags;
import com.android.systemui.SysuiTestCase;
+import com.android.systemui.broadcast.BroadcastDispatcher;
+import com.android.systemui.plugins.VolumeDialog;
import com.android.systemui.util.concurrency.FakeExecutor;
import com.android.systemui.util.time.FakeSystemClock;
+import com.google.common.collect.ImmutableList;
+
+import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
+import java.util.List;
+import java.util.Optional;
+
@SmallTest
@RunWith(AndroidJUnit4.class)
@TestableLooper.RunWithLooper
@@ -48,41 +66,109 @@ public class CsdWarningDialogTest extends SysuiTestCase {
private NotificationManager mNotificationManager;
private AudioManager mAudioManager;
+ private BroadcastDispatcher mFakeBroadcastDispatcher;
+ private CsdWarningDialog mDialog;
+ private static final String DISMISS_CSD_NOTIFICATION =
+ "com.android.systemui.volume.DISMISS_CSD_NOTIFICATION";
@Before
public void setup() {
mNotificationManager = mock(NotificationManager.class);
- getContext().addMockSystemService(NotificationManager.class, mNotificationManager);
+ mContext.addMockSystemService(NotificationManager.class, mNotificationManager);
mAudioManager = mock(AudioManager.class);
- getContext().addMockSystemService(AudioManager.class, mAudioManager);
+ mContext.addMockSystemService(AudioManager.class, mAudioManager);
+ mFakeBroadcastDispatcher = getFakeBroadcastDispatcher();
}
@Test
public void create1XCsdDialogAndWait_sendsNotification() {
FakeExecutor executor = new FakeExecutor(new FakeSystemClock());
// instantiate directly instead of via factory; we don't want executor to be @Background
- CsdWarningDialog dialog = new CsdWarningDialog(CSD_WARNING_DOSE_REACHED_1X, mContext,
- mAudioManager, mNotificationManager, executor, null);
+ mDialog = new CsdWarningDialog(CSD_WARNING_DOSE_REACHED_1X, mContext,
+ mAudioManager, mNotificationManager, executor, null,
+ Optional.of(ImmutableList.of(new Pair("", new Intent()))),
+ mFakeBroadcastDispatcher);
- dialog.show();
+ mDialog.show();
executor.advanceClockToLast();
executor.runAllReady();
- dialog.dismiss();
+ mDialog.dismiss();
verify(mNotificationManager).notify(
eq(SystemMessageProto.SystemMessage.NOTE_CSD_LOWER_AUDIO), any(Notification.class));
}
@Test
- public void create5XCsdDiSalogAndWait_willSendNotification() {
+ public void create5XCsdDialogAndWait_willSendNotification() {
FakeExecutor executor = new FakeExecutor(new FakeSystemClock());
- CsdWarningDialog dialog = new CsdWarningDialog(CSD_WARNING_DOSE_REPEATED_5X, mContext,
- mAudioManager, mNotificationManager, executor, null);
+ mDialog = new CsdWarningDialog(CSD_WARNING_DOSE_REPEATED_5X, mContext,
+ mAudioManager, mNotificationManager, executor, null,
+ Optional.of(ImmutableList.of(new Pair("", new Intent()))),
+ mFakeBroadcastDispatcher);
- dialog.show();
+ mDialog.show();
verify(mNotificationManager).notify(
eq(SystemMessageProto.SystemMessage.NOTE_CSD_LOWER_AUDIO), any(Notification.class));
}
+
+ @Test
+ @EnableFlags(Flags.FLAG_SOUNDDOSE_CUSTOMIZATION)
+ public void create1XCsdDialogWithActionsAndUndoIntent_willRegisterReceiverAndUndoVolume() {
+ FakeExecutor executor = new FakeExecutor(new FakeSystemClock());
+ Intent undoIntent = new Intent(VolumeDialog.ACTION_VOLUME_UNDO)
+ .setPackage(mContext.getPackageName());
+ mDialog = new CsdWarningDialog(CSD_WARNING_DOSE_REPEATED_5X, mContext,
+ mAudioManager, mNotificationManager, executor, null,
+ Optional.of(ImmutableList.of(new Pair("Undo", undoIntent))),
+ mFakeBroadcastDispatcher);
+
+ when(mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC)).thenReturn(25);
+ mDialog.show();
+ executor.advanceClockToLast();
+ executor.runAllReady();
+ mDialog.dismiss();
+ mDialog.mReceiverUndo.onReceive(mContext, undoIntent);
+
+ verify(mNotificationManager).notify(
+ eq(SystemMessageProto.SystemMessage.NOTE_CSD_LOWER_AUDIO),
+ any(Notification.class));
+ verify(mAudioManager).setStreamVolume(
+ eq(AudioManager.STREAM_MUSIC),
+ eq(25),
+ eq(AudioManager.FLAG_SHOW_UI));
+ }
+
+ @Test
+ @EnableFlags(Flags.FLAG_SOUNDDOSE_CUSTOMIZATION)
+ public void deleteNotificationIntent_willUnregisterAllReceivers() {
+ FakeExecutor executor = new FakeExecutor(new FakeSystemClock());
+ Intent undoIntent = new Intent(VolumeDialog.ACTION_VOLUME_UNDO)
+ .setPackage(mContext.getPackageName());
+ mDialog = new CsdWarningDialog(CSD_WARNING_DOSE_REPEATED_5X, mContext,
+ mAudioManager, mNotificationManager, executor, null,
+ Optional.of(ImmutableList.of(new Pair("Undo", undoIntent))),
+ mFakeBroadcastDispatcher);
+ Intent dismissIntent = new Intent(DISMISS_CSD_NOTIFICATION)
+ .setPackage(mContext.getPackageName());
+
+ mDialog.mReceiverDismissNotification.onReceive(mContext, dismissIntent);
+ mDialog.show();
+ executor.advanceClockToLast();
+ executor.runAllReady();
+ mDialog.dismiss();
+
+ List<ResolveInfo> resolveInfoListDismiss = mContext.getPackageManager()
+ .queryBroadcastReceivers(dismissIntent, PackageManager.GET_RESOLVED_FILTER);
+ assertThat(resolveInfoListDismiss).hasSize(0);
+ List<ResolveInfo> resolveInfoListUndo = mContext.getPackageManager()
+ .queryBroadcastReceivers(undoIntent, PackageManager.GET_RESOLVED_FILTER);
+ assertThat(resolveInfoListUndo).hasSize(0);
+ }
+
+ @After
+ public void tearDown() {
+ mDialog.destroy();
+ }
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/volume/VolumeDialogControllerImplTest.java b/packages/SystemUI/tests/src/com/android/systemui/volume/VolumeDialogControllerImplTest.java
index f7371487a7c5..3f5dc82ec5cb 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/volume/VolumeDialogControllerImplTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/volume/VolumeDialogControllerImplTest.java
@@ -18,6 +18,8 @@ package com.android.systemui.volume;
import static android.app.ActivityManager.LOCK_TASK_MODE_NONE;
+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;
@@ -37,16 +39,19 @@ 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.systemui.SysuiTestCase;
import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.dump.DumpManager;
import com.android.systemui.keyguard.WakefulnessLifecycle;
+import com.android.systemui.plugins.VolumeDialogController;
import com.android.systemui.settings.UserTracker;
import com.android.systemui.statusbar.VibratorHelper;
import com.android.systemui.util.RingerModeLiveData;
@@ -54,7 +59,9 @@ import com.android.systemui.util.RingerModeTracker;
import com.android.systemui.util.concurrency.FakeExecutor;
import com.android.systemui.util.concurrency.FakeThreadFactory;
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 org.junit.Before;
import org.junit.Test;
@@ -63,6 +70,7 @@ import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
+import java.util.Objects;
import java.util.concurrent.Executor;
@RunWith(AndroidJUnit4.class)
@@ -104,6 +112,10 @@ public class VolumeDialogControllerImplTest extends SysuiTestCase {
private UserTracker mUserTracker;
@Mock
private DumpManager mDumpManager;
+ @Mock
+ private AudioSharingInteractor mAudioSharingInteractor;
+ @Mock
+ private JavaAdapter mJavaAdapter;
@Before
@@ -124,11 +136,26 @@ public class VolumeDialogControllerImplTest extends SysuiTestCase {
mCallback = mock(VolumeDialogControllerImpl.C.class);
mThreadFactory.setLooper(TestableLooper.get(this).getLooper());
- mVolumeController = new TestableVolumeDialogControllerImpl(mContext,
- mBroadcastDispatcher, mRingerModeTracker, mThreadFactory, mAudioManager,
- mNotificationManager, mVibrator, mIAudioService, mAccessibilityManager,
- mPackageManager, mWakefullnessLifcycle, mKeyguardManager,
- mActivityManager, mUserTracker, mDumpManager, mCallback);
+ mVolumeController =
+ new TestableVolumeDialogControllerImpl(
+ mContext,
+ mBroadcastDispatcher,
+ mRingerModeTracker,
+ mThreadFactory,
+ mAudioManager,
+ mNotificationManager,
+ mVibrator,
+ mIAudioService,
+ mAccessibilityManager,
+ mPackageManager,
+ mWakefullnessLifcycle,
+ mKeyguardManager,
+ mActivityManager,
+ mUserTracker,
+ mDumpManager,
+ mCallback,
+ mAudioSharingInteractor,
+ mJavaAdapter);
mVolumeController.setEnableDialogs(true, true);
}
@@ -224,6 +251,41 @@ public class VolumeDialogControllerImplTest extends SysuiTestCase {
verify(mUserTracker).addCallback(any(UserTracker.Callback.class), any(Executor.class));
}
+ @Test
+ @EnableFlags(Flags.FLAG_VOLUME_DIALOG_AUDIO_SHARING_FIX)
+ public void handleAudioSharingStreamVolumeChanges_updateState() {
+ ArgumentCaptor<VolumeDialogController.State> stateCaptor =
+ ArgumentCaptor.forClass(VolumeDialogController.State.class);
+ int broadcastStream = VolumeDialogControllerImpl.DYNAMIC_STREAM_BROADCAST;
+
+ mVolumeController.handleAudioSharingStreamVolumeChanges(100);
+
+ verify(mCallback).onStateChanged(stateCaptor.capture());
+ assertThat(stateCaptor.getValue().states.contains(broadcastStream)).isTrue();
+ assertThat(stateCaptor.getValue().states.get(broadcastStream).level).isEqualTo(100);
+
+ mVolumeController.handleAudioSharingStreamVolumeChanges(200);
+
+ verify(mCallback, times(2)).onStateChanged(stateCaptor.capture());
+ assertThat(stateCaptor.getValue().states.contains(broadcastStream)).isTrue();
+ assertThat(stateCaptor.getValue().states.get(broadcastStream).level).isEqualTo(200);
+
+ mVolumeController.handleAudioSharingStreamVolumeChanges(null);
+
+ verify(mCallback, times(3)).onStateChanged(stateCaptor.capture());
+ assertThat(stateCaptor.getValue().states.contains(broadcastStream)).isFalse();
+ }
+
+ @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();
+
+ verify(mAudioSharingInteractor).setStreamVolume(100);
+ }
+
static class TestableVolumeDialogControllerImpl extends VolumeDialogControllerImpl {
private final WakefulnessLifecycle.Observer mWakefullessLifecycleObserver;
@@ -243,11 +305,27 @@ public class VolumeDialogControllerImplTest extends SysuiTestCase {
ActivityManager activityManager,
UserTracker userTracker,
DumpManager dumpManager,
- C callback) {
- super(context, broadcastDispatcher, ringerModeTracker, theadFactory, audioManager,
- notificationManager, optionalVibrator, iAudioService, accessibilityManager,
- packageManager, wakefulnessLifecycle, keyguardManager,
- activityManager, userTracker, dumpManager);
+ C callback,
+ AudioSharingInteractor audioSharingInteractor,
+ JavaAdapter javaAdapter) {
+ super(
+ context,
+ broadcastDispatcher,
+ ringerModeTracker,
+ theadFactory,
+ audioManager,
+ notificationManager,
+ optionalVibrator,
+ iAudioService,
+ accessibilityManager,
+ packageManager,
+ wakefulnessLifecycle,
+ keyguardManager,
+ activityManager,
+ userTracker,
+ dumpManager,
+ audioSharingInteractor,
+ javaAdapter);
mCallbacks = callback;
ArgumentCaptor<WakefulnessLifecycle.Observer> observerCaptor =
diff --git a/packages/SystemUI/tests/src/com/android/systemui/volume/VolumeDialogImplTest.java b/packages/SystemUI/tests/src/com/android/systemui/volume/VolumeDialogImplTest.java
index 6efb7d8fc3bb..b5cbf598bd05 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/volume/VolumeDialogImplTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/volume/VolumeDialogImplTest.java
@@ -23,6 +23,7 @@ import static android.media.AudioManager.RINGER_MODE_VIBRATE;
import static com.android.systemui.Flags.FLAG_HAPTIC_VOLUME_SLIDER;
import static com.android.systemui.volume.Events.DISMISS_REASON_UNKNOWN;
import static com.android.systemui.volume.Events.SHOW_REASON_UNKNOWN;
+import static com.android.systemui.volume.VolumeDialogControllerImpl.DYNAMIC_STREAM_BROADCAST;
import static com.android.systemui.volume.VolumeDialogControllerImpl.STREAMS;
import static junit.framework.Assert.assertEquals;
@@ -43,6 +44,7 @@ import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import android.app.KeyguardManager;
+import android.content.Intent;
import android.content.res.Configuration;
import android.graphics.Bitmap;
import android.graphics.Canvas;
@@ -55,6 +57,7 @@ import android.platform.test.annotations.EnableFlags;
import android.provider.Settings;
import android.testing.TestableLooper;
import android.util.Log;
+import android.util.Pair;
import android.view.Gravity;
import android.view.InputDevice;
import android.view.MotionEvent;
@@ -70,6 +73,7 @@ import androidx.test.filters.SmallTest;
import com.android.internal.jank.InteractionJankMonitor;
import com.android.internal.logging.testing.UiEventLoggerFake;
+import com.android.settingslib.flags.Flags;
import com.android.systemui.Prefs;
import com.android.systemui.SysuiTestCase;
import com.android.systemui.animation.AnimatorTestRule;
@@ -92,6 +96,8 @@ import com.android.systemui.volume.domain.interactor.VolumePanelNavigationIntera
import com.android.systemui.volume.panel.shared.flag.VolumePanelFlag;
import com.android.systemui.volume.ui.navigation.VolumeNavigator;
+import com.google.common.collect.ImmutableList;
+
import dagger.Lazy;
import junit.framework.Assert;
@@ -107,6 +113,7 @@ import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
import java.util.Arrays;
+import java.util.Optional;
import java.util.function.Predicate;
@SmallTest
@@ -157,11 +164,12 @@ public class VolumeDialogImplTest extends SysuiTestCase {
private final CsdWarningDialog.Factory mCsdWarningDialogFactory =
new CsdWarningDialog.Factory() {
- @Override
- public CsdWarningDialog create(int warningType, Runnable onCleanup) {
- return mCsdWarningDialog;
- }
- };
+ @Override
+ public CsdWarningDialog create(int warningType, Runnable onCleanup,
+ Optional<ImmutableList<Pair<String, Intent>>> actionIntents) {
+ return mCsdWarningDialog;
+ }
+ };
@Mock
private VibratorHelper mVibratorHelper;
@@ -788,6 +796,38 @@ public class VolumeDialogImplTest extends SysuiTestCase {
verify(mVolumeDialogInteractor, atLeastOnce()).onDialogDismissed(); // dismiss by timeout
}
+ @Test
+ @EnableFlags(Flags.FLAG_VOLUME_DIALOG_AUDIO_SHARING_FIX)
+ public void testDynamicStreamForBroadcast_createRow() {
+ State state = createShellState();
+ VolumeDialogController.StreamState ss = new VolumeDialogController.StreamState();
+ ss.dynamic = true;
+ ss.levelMin = 0;
+ ss.levelMax = 255;
+ ss.level = 20;
+ ss.name = -1;
+ ss.remoteLabel = mContext.getString(R.string.audio_sharing_description);
+ state.states.append(DYNAMIC_STREAM_BROADCAST, ss);
+
+ mDialog.onStateChangedH(state);
+ mTestableLooper.processAllMessages();
+
+ ViewGroup volumeDialogRows = mDialog.getDialogView().findViewById(R.id.volume_dialog_rows);
+ assumeNotNull(volumeDialogRows);
+ View broadcastRow = null;
+ final int rowCount = volumeDialogRows.getChildCount();
+ // we don't make assumptions about the position of the dnd row
+ for (int i = 0; i < rowCount; i++) {
+ View volumeRow = volumeDialogRows.getChildAt(i);
+ if (volumeRow.getId() == DYNAMIC_STREAM_BROADCAST) {
+ broadcastRow = volumeRow;
+ break;
+ }
+ }
+ assertNotNull(broadcastRow);
+ assertEquals(broadcastRow.getVisibility(), View.VISIBLE);
+ }
+
/**
* @return true if at least one volume row has the DND icon
*/
diff --git a/packages/SystemUI/tests/src/com/android/systemui/wmshell/BubblesTest.java b/packages/SystemUI/tests/src/com/android/systemui/wmshell/BubblesTest.java
index dc7a2c320855..60b5b5d39b9b 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/wmshell/BubblesTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/wmshell/BubblesTest.java
@@ -86,6 +86,7 @@ import android.service.dreams.IDreamManager;
import android.service.notification.NotificationListenerService;
import android.service.notification.ZenModeConfig;
import android.testing.TestableLooper;
+import android.util.Log;
import android.util.Pair;
import android.util.SparseArray;
import android.view.Display;
@@ -183,6 +184,7 @@ import com.android.wm.shell.common.bubbles.BubbleBarLocation;
import com.android.wm.shell.common.bubbles.BubbleBarUpdate;
import com.android.wm.shell.draganddrop.DragAndDropController;
import com.android.wm.shell.onehanded.OneHandedController;
+import com.android.wm.shell.shared.animation.PhysicsAnimatorTestUtils;
import com.android.wm.shell.sysui.ShellCommandHandler;
import com.android.wm.shell.sysui.ShellController;
import com.android.wm.shell.sysui.ShellInit;
@@ -215,6 +217,9 @@ import platform.test.runner.parameterized.Parameters;
@RunWith(ParameterizedAndroidJunit4.class)
@TestableLooper.RunWithLooper(setAsMainLooper = true)
public class BubblesTest extends SysuiTestCase {
+
+ private static final String TAG = "BubblesTest";
+
@Mock
private CommonNotifCollection mCommonNotifCollection;
@Mock
@@ -240,8 +245,6 @@ public class BubblesTest extends SysuiTestCase {
@Mock
private KeyguardBypassController mKeyguardBypassController;
@Mock
- private FloatingContentCoordinator mFloatingContentCoordinator;
- @Mock
private BubbleDataRepository mDataRepository;
@Mock
private NotificationShadeWindowView mNotificationShadeWindowView;
@@ -371,6 +374,7 @@ public class BubblesTest extends SysuiTestCase {
@Before
public void setUp() throws Exception {
MockitoAnnotations.initMocks(this);
+ PhysicsAnimatorTestUtils.prepareForTest();
if (Transitions.ENABLE_SHELL_TRANSITIONS) {
doReturn(true).when(mTransitions).isRegistered();
@@ -493,7 +497,7 @@ public class BubblesTest extends SysuiTestCase {
mShellCommandHandler,
mShellController,
mBubbleData,
- mFloatingContentCoordinator,
+ new FloatingContentCoordinator(),
mDataRepository,
mStatusBarService,
mWindowManager,
@@ -570,12 +574,32 @@ public class BubblesTest extends SysuiTestCase {
}
@After
- public void tearDown() {
+ public void tearDown() throws Exception {
ArrayList<Bubble> bubbles = new ArrayList<>(mBubbleData.getBubbles());
for (int i = 0; i < bubbles.size(); i++) {
mBubbleController.removeBubble(bubbles.get(i).getKey(),
Bubbles.DISMISS_NO_LONGER_BUBBLE);
}
+ mTestableLooper.processAllMessages();
+
+ // check that no animations are running before finishing the test to make sure that the
+ // state gets cleaned up correctly between tests.
+ int retryCount = 0;
+ while (PhysicsAnimatorTestUtils.isAnyAnimationRunning() && retryCount <= 10) {
+ Log.d(
+ TAG,
+ String.format("waiting for animations to complete. attempt %d", retryCount));
+ // post a message to the looper and wait for it to be processed
+ mTestableLooper.runWithLooper(() -> {});
+ retryCount++;
+ }
+ mTestableLooper.processAllMessages();
+ if (PhysicsAnimatorTestUtils.isAnyAnimationRunning()) {
+ Log.d(TAG, "finished waiting for animations to complete but animations are still "
+ + "running");
+ } else {
+ Log.d(TAG, "no animations are running");
+ }
}
@Test
@@ -2278,7 +2302,7 @@ public class BubblesTest extends SysuiTestCase {
mBubbleController.expandStackAndSelectBubbleFromLauncher(mBubbleEntry.getKey(), 0);
// Drag first bubble to dismiss
mBubbleController.startBubbleDrag(mBubbleEntry.getKey());
- mBubbleController.dragBubbleToDismiss(mBubbleEntry.getKey());
+ mBubbleController.dragBubbleToDismiss(mBubbleEntry.getKey(), System.currentTimeMillis());
// Second bubble is selected and expanded
assertThat(mBubbleData.getSelectedBubbleKey()).isEqualTo(mBubbleEntry2.getKey());
assertThat(mBubbleController.getLayerView().isExpanded()).isTrue();
@@ -2302,7 +2326,7 @@ public class BubblesTest extends SysuiTestCase {
mBubbleController.expandStackAndSelectBubbleFromLauncher(mBubbleEntry.getKey(), 0);
// Drag second bubble to dismiss
mBubbleController.startBubbleDrag(mBubbleEntry2.getKey());
- mBubbleController.dragBubbleToDismiss(mBubbleEntry2.getKey());
+ mBubbleController.dragBubbleToDismiss(mBubbleEntry2.getKey(), System.currentTimeMillis());
// First bubble remains selected and expanded
assertThat(mBubbleData.getSelectedBubbleKey()).isEqualTo(mBubbleEntry.getKey());
assertThat(mBubbleController.getLayerView().isExpanded()).isTrue();
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/smartspace/data/repository/SmartspaceRepositoryKosmos.kt b/packages/SystemUI/tests/utils/src/android/app/admin/AlarmManagerKosmos.kt
index 0e4c923a3078..a7b5873a4798 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/smartspace/data/repository/SmartspaceRepositoryKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/android/app/admin/AlarmManagerKosmos.kt
@@ -14,11 +14,10 @@
* limitations under the License.
*/
-package com.android.systemui.smartspace.data.repository
+package android.app.admin
+import android.app.AlarmManager
import com.android.systemui.kosmos.Kosmos
-import com.android.systemui.kosmos.Kosmos.Fixture
+import com.android.systemui.util.mockito.mock
-val Kosmos.fakeSmartspaceRepository by Fixture { FakeSmartspaceRepository() }
-
-val Kosmos.smartspaceRepository by Fixture<SmartspaceRepository> { fakeSmartspaceRepository }
+var Kosmos.alarmManager by Kosmos.Fixture { mock<AlarmManager>() }
diff --git a/packages/SystemUI/tests/utils/src/android/hardware/display/DisplayManagerKosmos.kt b/packages/SystemUI/tests/utils/src/android/hardware/display/DisplayManagerKosmos.kt
new file mode 100644
index 000000000000..796ec9400249
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/android/hardware/display/DisplayManagerKosmos.kt
@@ -0,0 +1,22 @@
+/*
+ * 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.hardware.display
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.util.mockito.mock
+
+val Kosmos.displayManager by Kosmos.Fixture { mock<DisplayManager>() }
diff --git a/packages/SystemUI/tests/utils/src/android/view/WindowManagerKosmos.kt b/packages/SystemUI/tests/utils/src/android/view/WindowManagerKosmos.kt
index 2a0559869c86..d5451ee8eb10 100644
--- a/packages/SystemUI/tests/utils/src/android/view/WindowManagerKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/android/view/WindowManagerKosmos.kt
@@ -19,4 +19,6 @@ package android.view
import com.android.systemui.kosmos.Kosmos
import org.mockito.Mockito.mock
-val Kosmos.windowManager by Kosmos.Fixture<WindowManager> { mock(WindowManager::class.java) }
+val Kosmos.mockWindowManager: WindowManager by Kosmos.Fixture { mock(WindowManager::class.java) }
+
+var Kosmos.windowManager: WindowManager by Kosmos.Fixture { mockWindowManager }
diff --git a/packages/SystemUI/tests/utils/src/com/android/app/admin/DevicePolicyManagerKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/app/admin/DevicePolicyManagerKosmos.kt
new file mode 100644
index 000000000000..f51e122be214
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/app/admin/DevicePolicyManagerKosmos.kt
@@ -0,0 +1,22 @@
+/*
+ * 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.app.admin
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.util.mockito.mock
+
+val Kosmos.devicePolicyManager by Kosmos.Fixture { mock<android.app.admin.DevicePolicyManager>() }
diff --git a/packages/SystemUI/tests/utils/src/com/android/internal/widget/LockPatternUtilsKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/internal/widget/LockPatternUtilsKosmos.kt
index d9ea5e92710c..b511270cdf09 100644
--- a/packages/SystemUI/tests/utils/src/com/android/internal/widget/LockPatternUtilsKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/internal/widget/LockPatternUtilsKosmos.kt
@@ -16,7 +16,14 @@
package com.android.internal.widget
+import android.app.admin.devicePolicyManager
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.util.mockito.mock
+import com.android.systemui.util.mockito.whenever
-var Kosmos.lockPatternUtils by Kosmos.Fixture { mock<LockPatternUtils>() }
+var Kosmos.lockPatternUtils by
+ Kosmos.Fixture {
+ mock<LockPatternUtils>().apply {
+ whenever(this.devicePolicyManager).thenReturn(this@Fixture.devicePolicyManager)
+ }
+ }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/TestMocksModule.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/TestMocksModule.kt
index 7c53639a85a6..0b6b816e589f 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/TestMocksModule.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/TestMocksModule.kt
@@ -16,6 +16,7 @@
package com.android.systemui
import android.app.ActivityManager
+import android.app.DreamManager
import android.app.admin.DevicePolicyManager
import android.app.trust.TrustManager
import android.hardware.fingerprint.FingerprintManager
@@ -33,6 +34,8 @@ import com.android.systemui.animation.DialogTransitionAnimator
import com.android.systemui.biometrics.AuthController
import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor
import com.android.systemui.communal.domain.interactor.CommunalInteractor
+import com.android.systemui.communal.domain.interactor.CommunalSceneInteractor
+import com.android.systemui.communal.domain.interactor.CommunalSettingsInteractor
import com.android.systemui.demomode.DemoModeController
import com.android.systemui.dump.DumpManager
import com.android.systemui.keyguard.ScreenLifecycle
@@ -94,6 +97,7 @@ data class TestMocksModule(
@get:Provides val demoModeController: DemoModeController = mock(),
@get:Provides val deviceProvisionedController: DeviceProvisionedController = mock(),
@get:Provides val dozeParameters: DozeParameters = mock(),
+ @get:Provides val dreamManager: DreamManager = mock(),
@get:Provides val dumpManager: DumpManager = mock(),
@get:Provides val fingerprintManager: FingerprintManager = mock(),
@get:Provides val headsUpManager: HeadsUpManager = mock(),
@@ -132,6 +136,8 @@ data class TestMocksModule(
@get:Provides val systemUIDialogManager: SystemUIDialogManager = mock(),
@get:Provides val deviceEntryIconTransitions: Set<DeviceEntryIconTransition> = emptySet(),
@get:Provides val communalInteractor: CommunalInteractor = mock(),
+ @get:Provides val communalSceneInteractor: CommunalSceneInteractor = mock(),
+ @get:Provides val communalSettingsInteractor: CommunalSettingsInteractor = mock(),
@get:Provides val sceneLogger: SceneLogger = mock(),
@get:Provides val trustManager: TrustManager = mock(),
@get:Provides val primaryBouncerInteractor: PrimaryBouncerInteractor = mock(),
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/accessibility/FakeReduceBrightColorsController.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/accessibility/FakeReduceBrightColorsController.kt
index 8b0affe2d99d..e02042d26d45 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/accessibility/FakeReduceBrightColorsController.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/accessibility/FakeReduceBrightColorsController.kt
@@ -16,6 +16,8 @@
package com.android.systemui.accessibility
+import android.content.res.Resources
+import com.android.server.display.feature.flags.Flags
import com.android.systemui.qs.ReduceBrightColorsController
class FakeReduceBrightColorsController : ReduceBrightColorsController {
@@ -44,4 +46,20 @@ class FakeReduceBrightColorsController : ReduceBrightColorsController {
}
}
}
+
+ override fun setReduceBrightColorsFeatureAvailable(enabled: Boolean) {
+ // do nothing
+ }
+
+ override fun isReduceBrightColorsFeatureAvailable(): Boolean {
+ return true
+ }
+
+ override fun isInUpgradeMode(resources: Resources?): Boolean {
+ if (resources != null) {
+ return Flags.evenDimmer() &&
+ resources.getBoolean(com.android.internal.R.bool.config_evenDimmerEnabled)
+ }
+ return false
+ }
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/bouncer/ui/viewmodel/BouncerMessageViewModelKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/bouncer/ui/viewmodel/BouncerMessageViewModelKosmos.kt
index 4b6441628500..de5f0f3734c6 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/bouncer/ui/viewmodel/BouncerMessageViewModelKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/bouncer/ui/viewmodel/BouncerMessageViewModelKosmos.kt
@@ -24,7 +24,7 @@ import com.android.systemui.bouncer.shared.flag.composeBouncerFlags
import com.android.systemui.deviceentry.domain.interactor.biometricMessageInteractor
import com.android.systemui.deviceentry.domain.interactor.deviceEntryFaceAuthInteractor
import com.android.systemui.deviceentry.domain.interactor.deviceEntryFingerprintAuthInteractor
-import com.android.systemui.deviceentry.domain.interactor.deviceEntryInteractor
+import com.android.systemui.deviceentry.domain.interactor.deviceUnlockedInteractor
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.kosmos.testScope
import com.android.systemui.user.ui.viewmodel.userSwitcherViewModel
@@ -44,7 +44,7 @@ val Kosmos.bouncerMessageViewModel by
clock = systemClock,
biometricMessageInteractor = biometricMessageInteractor,
faceAuthInteractor = deviceEntryFaceAuthInteractor,
- deviceEntryInteractor = deviceEntryInteractor,
+ deviceUnlockedInteractor = deviceUnlockedInteractor,
fingerprintInteractor = deviceEntryFingerprintAuthInteractor,
flags = composeBouncerFlags,
)
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/communal/data/db/DefaultWidgetPopulationKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/communal/data/db/DefaultWidgetPopulationKosmos.kt
new file mode 100644
index 000000000000..8d01fcd9fea3
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/communal/data/db/DefaultWidgetPopulationKosmos.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.communal.data.db
+
+import com.android.systemui.kosmos.Kosmos
+import org.mockito.Mockito.mock
+
+val Kosmos.defaultWidgetPopulation by
+ Kosmos.Fixture<DefaultWidgetPopulation> { mock(DefaultWidgetPopulation::class.java) }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/communal/data/repository/CommunalSceneTransitionRepositoryKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/communal/data/repository/CommunalSceneTransitionRepositoryKosmos.kt
new file mode 100644
index 000000000000..2050437da38a
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/communal/data/repository/CommunalSceneTransitionRepositoryKosmos.kt
@@ -0,0 +1,22 @@
+/*
+ * 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.communal.data.repository
+
+import com.android.systemui.kosmos.Kosmos
+
+val Kosmos.communalSceneTransitionRepository: CommunalSceneTransitionRepository by
+ Kosmos.Fixture { CommunalSceneTransitionRepository() }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/communal/data/repository/CommunalSmartspaceRepositoryKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/communal/data/repository/CommunalSmartspaceRepositoryKosmos.kt
new file mode 100644
index 000000000000..559a6eeb814a
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/communal/data/repository/CommunalSmartspaceRepositoryKosmos.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.communal.data.repository
+
+import com.android.systemui.kosmos.Kosmos
+
+val Kosmos.fakeCommunalSmartspaceRepository by Kosmos.Fixture { FakeCommunalSmartspaceRepository() }
+
+val Kosmos.communalSmartspaceRepository by
+ Kosmos.Fixture<CommunalSmartspaceRepository> { fakeCommunalSmartspaceRepository }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/communal/data/repository/FakeCommunalMediaRepository.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/communal/data/repository/FakeCommunalMediaRepository.kt
index 1884a3264ed6..14b1984f2374 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/communal/data/repository/FakeCommunalMediaRepository.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/communal/data/repository/FakeCommunalMediaRepository.kt
@@ -36,4 +36,18 @@ class FakeCommunalMediaRepository : CommunalMediaRepository {
fun mediaInactive() {
_mediaModel.value = CommunalMediaModel.INACTIVE
}
+
+ private var isListening = false
+
+ override fun startListening() {
+ isListening = true
+ }
+
+ override fun stopListening() {
+ isListening = false
+ }
+
+ fun isListening(): Boolean {
+ return isListening
+ }
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/communal/data/repository/FakeCommunalPrefsRepository.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/communal/data/repository/FakeCommunalPrefsRepository.kt
index 1da1fb2ee52f..5e870b19681b 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/communal/data/repository/FakeCommunalPrefsRepository.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/communal/data/repository/FakeCommunalPrefsRepository.kt
@@ -25,20 +25,11 @@ import kotlinx.coroutines.flow.map
/** Fake implementation of [CommunalPrefsRepository] */
class FakeCommunalPrefsRepository : CommunalPrefsRepository {
private val _isCtaDismissed = MutableStateFlow<Set<UserInfo>>(emptySet())
- private val _isDisclaimerDismissed = MutableStateFlow<Set<UserInfo>>(emptySet())
override fun isCtaDismissed(user: UserInfo): Flow<Boolean> =
_isCtaDismissed.map { it.contains(user) }
- override fun isDisclaimerDismissed(user: UserInfo): Flow<Boolean> =
- _isDisclaimerDismissed.map { it.contains(user) }
-
override suspend fun setCtaDismissed(user: UserInfo) {
_isCtaDismissed.value = _isCtaDismissed.value.toMutableSet().apply { add(user) }
}
-
- override suspend fun setDisclaimerDismissed(user: UserInfo) {
- _isDisclaimerDismissed.value =
- _isDisclaimerDismissed.value.toMutableSet().apply { add(user) }
- }
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/communal/data/repository/FakeCommunalSceneRepository.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/communal/data/repository/FakeCommunalSceneRepository.kt
index d280be216f5e..82454817ecbb 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/communal/data/repository/FakeCommunalSceneRepository.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/communal/data/repository/FakeCommunalSceneRepository.kt
@@ -6,7 +6,6 @@ import com.android.compose.animation.scene.TransitionKey
import com.android.systemui.communal.shared.model.CommunalScenes
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.ExperimentalCoroutinesApi
-import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.SharingStarted
@@ -25,11 +24,10 @@ class FakeCommunalSceneRepository(
) : CommunalSceneRepository {
override fun changeScene(toScene: SceneKey, transitionKey: TransitionKey?) =
- snapToScene(toScene, 0)
+ snapToScene(toScene)
- override fun snapToScene(toScene: SceneKey, delayMillis: Long) {
+ override fun snapToScene(toScene: SceneKey) {
applicationScope.launch {
- delay(delayMillis)
currentScene.value = toScene
_transitionState.value = flowOf(ObservableTransitionState.Idle(toScene))
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/communal/data/repository/FakeCommunalSmartspaceRepository.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/communal/data/repository/FakeCommunalSmartspaceRepository.kt
new file mode 100644
index 000000000000..904ab4bc3f85
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/communal/data/repository/FakeCommunalSmartspaceRepository.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.systemui.communal.data.repository
+
+import com.android.systemui.communal.data.model.CommunalSmartspaceTimer
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.MutableStateFlow
+
+class FakeCommunalSmartspaceRepository : CommunalSmartspaceRepository {
+
+ private val _timers = MutableStateFlow<List<CommunalSmartspaceTimer>>(emptyList())
+ override val timers: Flow<List<CommunalSmartspaceTimer>> = _timers
+
+ fun setTimers(timers: List<CommunalSmartspaceTimer>) {
+ _timers.value = timers
+ }
+
+ private var isListening = false
+
+ override fun startListening() {
+ isListening = true
+ }
+
+ override fun stopListening() {
+ isListening = false
+ }
+
+ fun isListening(): Boolean {
+ return isListening
+ }
+}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/communal/domain/interactor/CommunalInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/communal/domain/interactor/CommunalInteractorKosmos.kt
index b58861b1104e..4ad046cc095e 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/communal/domain/interactor/CommunalInteractorKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/communal/domain/interactor/CommunalInteractorKosmos.kt
@@ -19,6 +19,7 @@ package com.android.systemui.communal.domain.interactor
import android.os.userManager
import com.android.systemui.broadcast.broadcastDispatcher
import com.android.systemui.communal.data.repository.communalMediaRepository
+import com.android.systemui.communal.data.repository.communalSmartspaceRepository
import com.android.systemui.communal.data.repository.communalWidgetRepository
import com.android.systemui.communal.widgets.EditWidgetsActivityStarter
import com.android.systemui.flags.Flags
@@ -30,11 +31,11 @@ import com.android.systemui.kosmos.Kosmos
import com.android.systemui.kosmos.Kosmos.Fixture
import com.android.systemui.kosmos.applicationCoroutineScope
import com.android.systemui.kosmos.testDispatcher
+import com.android.systemui.kosmos.testScope
import com.android.systemui.log.logcatLogBuffer
import com.android.systemui.plugins.activityStarter
import com.android.systemui.scene.domain.interactor.sceneInteractor
import com.android.systemui.settings.userTracker
-import com.android.systemui.smartspace.data.repository.smartspaceRepository
import com.android.systemui.user.data.repository.fakeUserRepository
import com.android.systemui.util.mockito.mock
@@ -42,12 +43,13 @@ val Kosmos.communalInteractor by Fixture {
CommunalInteractor(
applicationScope = applicationCoroutineScope,
bgDispatcher = testDispatcher,
+ bgScope = testScope.backgroundScope,
broadcastDispatcher = broadcastDispatcher,
communalSceneInteractor = communalSceneInteractor,
widgetRepository = communalWidgetRepository,
communalPrefsInteractor = communalPrefsInteractor,
mediaRepository = communalMediaRepository,
- smartspaceRepository = smartspaceRepository,
+ smartspaceRepository = communalSmartspaceRepository,
keyguardInteractor = keyguardInteractor,
keyguardTransitionInteractor = keyguardTransitionInteractor,
communalSettingsInteractor = communalSettingsInteractor,
@@ -64,13 +66,17 @@ val Kosmos.communalInteractor by Fixture {
val Kosmos.editWidgetsActivityStarter by Fixture<EditWidgetsActivityStarter> { mock() }
-suspend fun Kosmos.setCommunalAvailable(available: Boolean) {
- fakeFeatureFlagsClassic.set(Flags.COMMUNAL_SERVICE_ENABLED, available)
- if (available) {
+suspend fun Kosmos.setCommunalEnabled(enabled: Boolean) {
+ fakeFeatureFlagsClassic.set(Flags.COMMUNAL_SERVICE_ENABLED, enabled)
+ if (enabled) {
fakeUserRepository.asMainUser()
} else {
fakeUserRepository.asDefaultUser()
}
+}
+
+suspend fun Kosmos.setCommunalAvailable(available: Boolean) {
+ setCommunalEnabled(available)
with(fakeKeyguardRepository) {
setIsEncryptedOrLockdown(!available)
setKeyguardShowing(available)
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/communal/domain/interactor/CommunalSceneTransitionInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/communal/domain/interactor/CommunalSceneTransitionInteractorKosmos.kt
new file mode 100644
index 000000000000..e6e59e1a523e
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/communal/domain/interactor/CommunalSceneTransitionInteractorKosmos.kt
@@ -0,0 +1,37 @@
+/*
+ * 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.communal.domain.interactor
+
+import com.android.systemui.communal.data.repository.communalSceneTransitionRepository
+import com.android.systemui.keyguard.domain.interactor.internalKeyguardTransitionInteractor
+import com.android.systemui.keyguard.domain.interactor.keyguardInteractor
+import com.android.systemui.keyguard.domain.interactor.keyguardTransitionInteractor
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.applicationCoroutineScope
+
+val Kosmos.communalSceneTransitionInteractor: CommunalSceneTransitionInteractor by
+ Kosmos.Fixture {
+ CommunalSceneTransitionInteractor(
+ applicationScope = applicationCoroutineScope,
+ transitionInteractor = keyguardTransitionInteractor,
+ internalTransitionInteractor = internalKeyguardTransitionInteractor,
+ settingsInteractor = communalSettingsInteractor,
+ sceneInteractor = communalSceneInteractor,
+ repository = communalSceneTransitionRepository,
+ keyguardInteractor = keyguardInteractor,
+ )
+ }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/deviceentry/data/repository/FakeDeviceEntryRepository.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/deviceentry/data/repository/FakeDeviceEntryRepository.kt
index 25e7729e0eb3..2dcd275f0103 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/deviceentry/data/repository/FakeDeviceEntryRepository.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/deviceentry/data/repository/FakeDeviceEntryRepository.kt
@@ -21,27 +21,32 @@ import dagger.Module
import javax.inject.Inject
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
+import kotlinx.coroutines.flow.asStateFlow
/** Fake implementation of [DeviceEntryRepository] */
@SysUISingleton
class FakeDeviceEntryRepository @Inject constructor() : DeviceEntryRepository {
- private var isLockscreenEnabled = true
+
+ private val _isLockscreenEnabled = MutableStateFlow(true)
+ override val isLockscreenEnabled: StateFlow<Boolean> = _isLockscreenEnabled.asStateFlow()
private val _isBypassEnabled = MutableStateFlow(false)
override val isBypassEnabled: StateFlow<Boolean> = _isBypassEnabled
- var userPresentCount = 0
+ private var pendingLockscreenEnabled = _isLockscreenEnabled.value
override suspend fun isLockscreenEnabled(): Boolean {
- return isLockscreenEnabled
+ _isLockscreenEnabled.value = pendingLockscreenEnabled
+ return isLockscreenEnabled.value
}
- override suspend fun reportUserPresent() {
- userPresentCount++
+ fun setLockscreenEnabled(isLockscreenEnabled: Boolean) {
+ _isLockscreenEnabled.value = isLockscreenEnabled
+ pendingLockscreenEnabled = _isLockscreenEnabled.value
}
- fun setLockscreenEnabled(isLockscreenEnabled: Boolean) {
- this.isLockscreenEnabled = isLockscreenEnabled
+ fun setPendingLockscreenEnabled(isLockscreenEnabled: Boolean) {
+ pendingLockscreenEnabled = isLockscreenEnabled
}
fun setBypassEnabled(isBypassEnabled: Boolean) {
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryFaceAuthInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryFaceAuthInteractorKosmos.kt
index a8fc27a7da4e..b9be04dc0a32 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryFaceAuthInteractorKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryFaceAuthInteractorKosmos.kt
@@ -57,5 +57,6 @@ val Kosmos.deviceEntryFaceAuthInteractor by
powerInteractor = powerInteractor,
biometricSettingsRepository = biometricSettingsRepository,
trustManager = trustManager,
+ deviceEntryFaceAuthStatusInteractor = deviceEntryFaceAuthStatusInteractor,
)
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryFaceAuthStatusInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryFaceAuthStatusInteractorKosmos.kt
new file mode 100644
index 000000000000..66d3709d14dc
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryFaceAuthStatusInteractorKosmos.kt
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+
+@file:OptIn(ExperimentalCoroutinesApi::class)
+
+package com.android.systemui.deviceentry.domain.interactor
+
+import android.content.res.mainResources
+import com.android.systemui.keyguard.data.repository.deviceEntryFaceAuthRepository
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.applicationCoroutineScope
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+
+val Kosmos.deviceEntryFaceAuthStatusInteractor by
+ Kosmos.Fixture {
+ DeviceEntryFaceAuthStatusInteractor(
+ repository = deviceEntryFaceAuthRepository,
+ resources = mainResources,
+ applicationScope = applicationCoroutineScope,
+ )
+ }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryInteractorKosmos.kt
index 120086686282..caa6e99d58cb 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryInteractorKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryInteractorKosmos.kt
@@ -19,8 +19,6 @@ package com.android.systemui.deviceentry.domain.interactor
import com.android.systemui.authentication.domain.interactor.authenticationInteractor
import com.android.systemui.bouncer.domain.interactor.alternateBouncerInteractor
import com.android.systemui.deviceentry.data.repository.deviceEntryRepository
-import com.android.systemui.flags.fakeSystemPropertiesHelper
-import com.android.systemui.keyguard.domain.interactor.trustInteractor
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.kosmos.applicationCoroutineScope
import com.android.systemui.scene.domain.interactor.sceneInteractor
@@ -34,12 +32,7 @@ val Kosmos.deviceEntryInteractor by
repository = deviceEntryRepository,
authenticationInteractor = authenticationInteractor,
sceneInteractor = sceneInteractor,
- faceAuthInteractor = deviceEntryFaceAuthInteractor,
- fingerprintAuthInteractor = deviceEntryFingerprintAuthInteractor,
- biometricSettingsInteractor = deviceEntryBiometricSettingsInteractor,
- trustInteractor = trustInteractor,
deviceUnlockedInteractor = deviceUnlockedInteractor,
- systemPropertiesHelper = fakeSystemPropertiesHelper,
alternateBouncerInteractor = alternateBouncerInteractor,
)
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/deviceentry/domain/interactor/DeviceUnlockedInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/deviceentry/domain/interactor/DeviceUnlockedInteractorKosmos.kt
index 14210bc8d15c..1ed10fbe94c3 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/deviceentry/domain/interactor/DeviceUnlockedInteractorKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/deviceentry/domain/interactor/DeviceUnlockedInteractorKosmos.kt
@@ -18,6 +18,8 @@ package com.android.systemui.deviceentry.domain.interactor
import com.android.systemui.authentication.domain.interactor.authenticationInteractor
import com.android.systemui.deviceentry.data.repository.deviceEntryRepository
+import com.android.systemui.flags.fakeSystemPropertiesHelper
+import com.android.systemui.flags.systemPropertiesHelper
import com.android.systemui.keyguard.domain.interactor.trustInteractor
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.kosmos.Kosmos.Fixture
@@ -33,5 +35,7 @@ val Kosmos.deviceUnlockedInteractor by Fixture {
faceAuthInteractor = deviceEntryFaceAuthInteractor,
fingerprintAuthInteractor = deviceEntryFingerprintAuthInteractor,
powerInteractor = powerInteractor,
+ biometricSettingsInteractor = deviceEntryBiometricSettingsInteractor,
+ systemPropertiesHelper = fakeSystemPropertiesHelper,
)
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/education/data/repository/ContextualEducationRepositoryKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/education/data/repository/ContextualEducationRepositoryKosmos.kt
new file mode 100644
index 000000000000..edf4bcc238c0
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/education/data/repository/ContextualEducationRepositoryKosmos.kt
@@ -0,0 +1,26 @@
+/*
+ * 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.systemui.education.data.repository
+
+import com.android.systemui.kosmos.Kosmos
+import java.time.Clock
+import java.time.Instant
+
+var Kosmos.contextualEducationRepository: ContextualEducationRepository by
+ Kosmos.Fixture { FakeContextualEducationRepository(fakeEduClock) }
+
+var Kosmos.fakeEduClock: Clock by Kosmos.Fixture { FakeEduClock(Instant.MIN) }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/education/data/repository/FakeContextualEducationRepository.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/education/data/repository/FakeContextualEducationRepository.kt
new file mode 100644
index 000000000000..5410882c9283
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/education/data/repository/FakeContextualEducationRepository.kt
@@ -0,0 +1,53 @@
+/*
+ * 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.systemui.education.data.repository
+
+import com.android.systemui.education.data.model.GestureEduModel
+import com.android.systemui.shared.education.GestureType
+import java.time.Clock
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.MutableStateFlow
+import kotlinx.coroutines.flow.asStateFlow
+
+class FakeContextualEducationRepository(private val clock: Clock) : ContextualEducationRepository {
+
+ private val userGestureMap = mutableMapOf<Int, GestureEduModel>()
+ private val _gestureEduModels = MutableStateFlow(GestureEduModel())
+ private val gestureEduModelsFlow = _gestureEduModels.asStateFlow()
+
+ override fun setUser(userId: Int) {
+ if (!userGestureMap.contains(userId)) {
+ userGestureMap[userId] = GestureEduModel()
+ }
+ _gestureEduModels.value = userGestureMap[userId]!!
+ }
+
+ override fun readGestureEduModelFlow(gestureType: GestureType): Flow<GestureEduModel> {
+ return gestureEduModelsFlow
+ }
+
+ override suspend fun incrementSignalCount(gestureType: GestureType) {
+ _gestureEduModels.value =
+ GestureEduModel(
+ signalCount = _gestureEduModels.value.signalCount + 1,
+ )
+ }
+
+ override suspend fun updateShortcutTriggerTime(gestureType: GestureType) {
+ _gestureEduModels.value = GestureEduModel(lastShortcutTriggeredTime = clock.instant())
+ }
+}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/education/data/repository/FakeEduClock.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/education/data/repository/FakeEduClock.kt
new file mode 100644
index 000000000000..513c14381997
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/education/data/repository/FakeEduClock.kt
@@ -0,0 +1,37 @@
+/*
+ * 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.systemui.education.data.repository
+
+import java.time.Clock
+import java.time.Instant
+import java.time.ZoneId
+
+class FakeEduClock(private val base: Instant) : Clock() {
+ private val zone: ZoneId = ZoneId.of("UTC")
+
+ override fun instant(): Instant {
+ return base
+ }
+
+ override fun withZone(zoneId: ZoneId?): Clock {
+ return FakeEduClock(base)
+ }
+
+ override fun getZone(): ZoneId {
+ return zone
+ }
+}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/education/domain/interactor/ContextualEducationInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/education/domain/interactor/ContextualEducationInteractorKosmos.kt
new file mode 100644
index 000000000000..5b2dc2b39e27
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/education/domain/interactor/ContextualEducationInteractorKosmos.kt
@@ -0,0 +1,31 @@
+/*
+ * 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.systemui.education.domain.interactor
+
+import com.android.systemui.education.data.repository.contextualEducationRepository
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.testScope
+import com.android.systemui.user.domain.interactor.selectedUserInteractor
+
+val Kosmos.contextualEducationInteractor by
+ Kosmos.Fixture {
+ ContextualEducationInteractor(
+ backgroundScope = testScope.backgroundScope,
+ repository = contextualEducationRepository,
+ selectedUserInteractor = selectedUserInteractor
+ )
+ }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/education/domain/interactor/KeyboardTouchpadEduInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/education/domain/interactor/KeyboardTouchpadEduInteractorKosmos.kt
new file mode 100644
index 000000000000..8f84e0482b83
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/education/domain/interactor/KeyboardTouchpadEduInteractorKosmos.kt
@@ -0,0 +1,28 @@
+/*
+ * 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.systemui.education.domain.interactor
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.testScope
+
+var Kosmos.keyboardTouchpadEduStatsInteractor by
+ Kosmos.Fixture {
+ KeyboardTouchpadEduStatsInteractorImpl(
+ backgroundScope = testScope.backgroundScope,
+ contextualEducationInteractor = contextualEducationInteractor
+ )
+ }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/flags/FeatureFlagsClassicKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/flags/FeatureFlagsClassicKosmos.kt
index 45ea36464194..d9235cc56c00 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/flags/FeatureFlagsClassicKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/flags/FeatureFlagsClassicKosmos.kt
@@ -37,6 +37,7 @@ val Kosmos.fakeFeatureFlagsClassic by
set(Flags.LOCK_SCREEN_LONG_PRESS_ENABLED, false)
set(Flags.LOCKSCREEN_ENABLE_LANDSCAPE, false)
set(Flags.NSSL_DEBUG_LINES, false)
+ set(Flags.COMMUNAL_SERVICE_ENABLED, false)
}
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/haptics/qs/QSLongPressEffectKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/haptics/qs/QSLongPressEffectKosmos.kt
index eff99e047f45..28355e1c3efa 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/haptics/qs/QSLongPressEffectKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/haptics/qs/QSLongPressEffectKosmos.kt
@@ -16,9 +16,10 @@
package com.android.systemui.haptics.qs
+import com.android.systemui.classifier.falsingManager
import com.android.systemui.haptics.vibratorHelper
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.statusbar.policy.keyguardStateController
val Kosmos.qsLongPressEffect by
- Kosmos.Fixture { QSLongPressEffect(vibratorHelper, keyguardStateController) }
+ Kosmos.Fixture { QSLongPressEffect(vibratorHelper, keyguardStateController, falsingManager) }
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 a1021f65bd5a..c423b626b3a7 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
@@ -24,6 +24,8 @@ import com.android.systemui.broadcast.broadcastDispatcher
import com.android.systemui.keyboard.shortcut.data.repository.ShortcutHelperCategoriesRepository
import com.android.systemui.keyboard.shortcut.data.repository.ShortcutHelperStateRepository
import com.android.systemui.keyboard.shortcut.data.repository.ShortcutHelperTestHelper
+import com.android.systemui.keyboard.shortcut.data.source.AppCategoriesShortcutsSource
+import com.android.systemui.keyboard.shortcut.data.source.CurrentAppShortcutsSource
import com.android.systemui.keyboard.shortcut.data.source.InputShortcutsSource
import com.android.systemui.keyboard.shortcut.data.source.KeyboardShortcutGroupsSource
import com.android.systemui.keyboard.shortcut.data.source.MultitaskingShortcutsSource
@@ -40,6 +42,14 @@ import com.android.systemui.kosmos.testScope
import com.android.systemui.model.sysUiState
import com.android.systemui.settings.displayTracker
+var Kosmos.shortcutHelperAppCategoriesShortcutsSource: KeyboardShortcutGroupsSource by
+ Kosmos.Fixture {
+ AppCategoriesShortcutsSource(
+ windowManager,
+ testDispatcher,
+ )
+ }
+
var Kosmos.shortcutHelperSystemShortcutsSource: KeyboardShortcutGroupsSource by
Kosmos.Fixture { SystemShortcutsSource(mainResources) }
@@ -57,17 +67,23 @@ val Kosmos.shortcutHelperStateRepository by
)
}
-val Kosmos.shortcutHelperInputShortcutsSource by
+var Kosmos.shortcutHelperInputShortcutsSource: KeyboardShortcutGroupsSource by
Kosmos.Fixture { InputShortcutsSource(mainResources, windowManager) }
+var Kosmos.shortcutHelperCurrentAppShortcutsSource: KeyboardShortcutGroupsSource by
+ Kosmos.Fixture { CurrentAppShortcutsSource(windowManager) }
+
val Kosmos.shortcutHelperCategoriesRepository by
Kosmos.Fixture {
ShortcutHelperCategoriesRepository(
applicationContext,
+ applicationCoroutineScope,
testDispatcher,
shortcutHelperSystemShortcutsSource,
shortcutHelperMultiTaskingShortcutsSource,
+ shortcutHelperAppCategoriesShortcutsSource,
shortcutHelperInputShortcutsSource,
+ shortcutHelperCurrentAppShortcutsSource,
fakeInputManager.inputManager,
shortcutHelperStateRepository,
)
@@ -80,7 +96,8 @@ val Kosmos.shortcutHelperTestHelper by
applicationContext,
broadcastDispatcher,
fakeCommandQueue,
- windowManager
+ fakeInputManager,
+ windowManager,
)
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/keyboard/shortcut/data/repository/ShortcutHelperTestHelper.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/keyboard/shortcut/data/repository/ShortcutHelperTestHelper.kt
index 40510db24f47..6ca5cd81b665 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/keyboard/shortcut/data/repository/ShortcutHelperTestHelper.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/keyboard/shortcut/data/repository/ShortcutHelperTestHelper.kt
@@ -18,6 +18,7 @@ package com.android.systemui.keyboard.shortcut.data.repository
import android.content.Context
import android.content.Intent
+import android.hardware.input.FakeInputManager
import android.view.KeyboardShortcutGroup
import android.view.WindowManager
import android.view.WindowManager.KeyboardShortcutsReceiver
@@ -31,6 +32,7 @@ class ShortcutHelperTestHelper(
private val context: Context,
private val fakeBroadcastDispatcher: FakeBroadcastDispatcher,
private val fakeCommandQueue: FakeCommandQueue,
+ private val fakeInputManager: FakeInputManager,
windowManager: WindowManager
) {
@@ -39,6 +41,7 @@ class ShortcutHelperTestHelper(
}
private var imeShortcuts: List<KeyboardShortcutGroup> = emptyList()
+ private var currentAppsShortcuts: List<KeyboardShortcutGroup> = emptyList()
init {
whenever(windowManager.requestImeKeyboardShortcuts(any(), any())).thenAnswer {
@@ -46,6 +49,11 @@ class ShortcutHelperTestHelper(
keyboardShortcutReceiver.onKeyboardShortcutsReceived(imeShortcuts)
return@thenAnswer Unit
}
+ whenever(windowManager.requestAppKeyboardShortcuts(any(), any())).thenAnswer {
+ val keyboardShortcutReceiver = it.getArgument<KeyboardShortcutsReceiver>(0)
+ keyboardShortcutReceiver.onKeyboardShortcutsReceived(currentAppsShortcuts)
+ return@thenAnswer Unit
+ }
repo.start()
}
@@ -57,6 +65,14 @@ class ShortcutHelperTestHelper(
this.imeShortcuts = imeShortcuts
}
+ /**
+ * Use this method to set what current app shortcuts should be returned from windowManager in
+ * tests. By default [WindowManager.requestAppKeyboardShortcuts] will return emptyList.
+ */
+ fun setCurrentAppsShortcuts(currentAppShortcuts: List<KeyboardShortcutGroup>) {
+ this.currentAppsShortcuts = currentAppShortcuts
+ }
+
fun hideThroughCloseSystemDialogs() {
fakeBroadcastDispatcher.sendIntentToMatchingReceiversOnly(
context,
@@ -79,6 +95,7 @@ class ShortcutHelperTestHelper(
}
fun toggle(deviceId: Int) {
+ fakeInputManager.addPhysicalKeyboard(deviceId)
fakeCommandQueue.doForEachCallback { it.toggleKeyboardShortcutsMenu(deviceId) }
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/FakeKeyguardRepository.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/FakeKeyguardRepository.kt
index 5bae6ec89b65..87143efb7f3c 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/FakeKeyguardRepository.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/FakeKeyguardRepository.kt
@@ -135,6 +135,9 @@ class FakeKeyguardRepository @Inject constructor() : KeyguardRepository {
private var isShowKeyguardWhenReenabled: Boolean = false
+ private val _canIgnoreAuthAndReturnToGone = MutableStateFlow(false)
+ override val canIgnoreAuthAndReturnToGone = _canIgnoreAuthAndReturnToGone.asStateFlow()
+
override fun setQuickSettingsVisible(isVisible: Boolean) {
_isQuickSettingsVisible.value = isVisible
}
@@ -278,6 +281,10 @@ class FakeKeyguardRepository @Inject constructor() : KeyguardRepository {
override fun isShowKeyguardWhenReenabled(): Boolean {
return isShowKeyguardWhenReenabled
}
+
+ override fun setCanIgnoreAuthAndReturnToGone(canWake: Boolean) {
+ _canIgnoreAuthAndReturnToGone.value = canWake
+ }
}
@Module
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/FromAodTransitionInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/FromAodTransitionInteractorKosmos.kt
index ae138c8f930b..ef789d1b29ff 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/FromAodTransitionInteractorKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/FromAodTransitionInteractorKosmos.kt
@@ -37,5 +37,6 @@ val Kosmos.fromAodTransitionInteractor by
powerInteractor = powerInteractor,
keyguardOcclusionInteractor = keyguardOcclusionInteractor,
deviceEntryRepository = deviceEntryRepository,
+ wakeToGoneInteractor = keyguardWakeDirectlyToGoneInteractor,
)
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/FromDozingTransitionInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/FromDozingTransitionInteractorKosmos.kt
index e7e007fd79fa..4634a7fd009f 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/FromDozingTransitionInteractorKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/FromDozingTransitionInteractorKosmos.kt
@@ -16,8 +16,10 @@
package com.android.systemui.keyguard.domain.interactor
+import android.service.dream.dreamManager
import com.android.systemui.communal.domain.interactor.communalInteractor
-import com.android.systemui.deviceentry.data.repository.deviceEntryRepository
+import com.android.systemui.communal.domain.interactor.communalSceneInteractor
+import com.android.systemui.deviceentry.domain.interactor.deviceEntryInteractor
import com.android.systemui.keyguard.data.repository.keyguardTransitionRepository
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.kosmos.applicationCoroutineScope
@@ -36,8 +38,11 @@ var Kosmos.fromDozingTransitionInteractor by
mainDispatcher = testDispatcher,
keyguardInteractor = keyguardInteractor,
communalInteractor = communalInteractor,
+ communalSceneInteractor = communalSceneInteractor,
powerInteractor = powerInteractor,
keyguardOcclusionInteractor = keyguardOcclusionInteractor,
- deviceEntryRepository = deviceEntryRepository,
+ deviceEntryInteractor = deviceEntryInteractor,
+ wakeToGoneInteractor = keyguardWakeDirectlyToGoneInteractor,
+ dreamManager = dreamManager
)
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/FromDreamingTransitionInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/FromDreamingTransitionInteractorKosmos.kt
index a9be06d6387f..f1625948880f 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/FromDreamingTransitionInteractorKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/FromDreamingTransitionInteractorKosmos.kt
@@ -16,13 +16,17 @@
package com.android.systemui.keyguard.domain.interactor
+import com.android.systemui.communal.domain.interactor.communalSettingsInteractor
+import com.android.systemui.deviceentry.domain.interactor.deviceEntryInteractor
import com.android.systemui.keyguard.data.repository.keyguardTransitionRepository
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.kosmos.applicationCoroutineScope
import com.android.systemui.kosmos.testDispatcher
import com.android.systemui.power.domain.interactor.powerInteractor
import com.android.systemui.statusbar.domain.interactor.keyguardOcclusionInteractor
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+@OptIn(ExperimentalCoroutinesApi::class)
var Kosmos.fromDreamingTransitionInteractor by
Kosmos.Fixture {
FromDreamingTransitionInteractor(
@@ -34,7 +38,9 @@ var Kosmos.fromDreamingTransitionInteractor by
mainDispatcher = testDispatcher,
keyguardInteractor = keyguardInteractor,
glanceableHubTransitions = glanceableHubTransitions,
+ communalSettingsInteractor = communalSettingsInteractor,
powerInteractor = powerInteractor,
keyguardOcclusionInteractor = keyguardOcclusionInteractor,
+ deviceEntryInteractor = deviceEntryInteractor,
)
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/FromGlanceableHubTransitionInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/FromGlanceableHubTransitionInteractorKosmos.kt
index 67846589cb89..494f08b88345 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/FromGlanceableHubTransitionInteractorKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/FromGlanceableHubTransitionInteractorKosmos.kt
@@ -16,6 +16,8 @@
package com.android.systemui.keyguard.domain.interactor
+import com.android.systemui.communal.domain.interactor.communalSceneInteractor
+import com.android.systemui.communal.domain.interactor.communalSettingsInteractor
import com.android.systemui.keyguard.data.repository.keyguardTransitionRepository
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.kosmos.applicationCoroutineScope
@@ -26,15 +28,17 @@ import com.android.systemui.statusbar.domain.interactor.keyguardOcclusionInterac
var Kosmos.fromGlanceableHubTransitionInteractor by
Kosmos.Fixture {
FromGlanceableHubTransitionInteractor(
- transitionRepository = keyguardTransitionRepository,
- transitionInteractor = keyguardTransitionInteractor,
- internalTransitionInteractor = internalKeyguardTransitionInteractor,
scope = applicationCoroutineScope,
- bgDispatcher = testDispatcher,
mainDispatcher = testDispatcher,
+ bgDispatcher = testDispatcher,
+ glanceableHubTransitions = glanceableHubTransitions,
+ communalSettingsInteractor = communalSettingsInteractor,
keyguardInteractor = keyguardInteractor,
+ transitionRepository = keyguardTransitionRepository,
+ internalTransitionInteractor = internalKeyguardTransitionInteractor,
+ transitionInteractor = keyguardTransitionInteractor,
powerInteractor = powerInteractor,
keyguardOcclusionInteractor = keyguardOcclusionInteractor,
- glanceableHubTransitions = glanceableHubTransitions,
+ communalSceneInteractor = communalSceneInteractor,
)
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/FromLockscreenTransitionInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/FromLockscreenTransitionInteractorKosmos.kt
index 4131145857e0..b07de16be567 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/FromLockscreenTransitionInteractorKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/FromLockscreenTransitionInteractorKosmos.kt
@@ -16,6 +16,7 @@
package com.android.systemui.keyguard.domain.interactor
+import com.android.systemui.communal.domain.interactor.communalSettingsInteractor
import com.android.systemui.keyguard.data.repository.keyguardTransitionRepository
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.kosmos.applicationCoroutineScope
@@ -37,6 +38,7 @@ var Kosmos.fromLockscreenTransitionInteractor by
shadeRepository = shadeRepository,
powerInteractor = powerInteractor,
glanceableHubTransitions = glanceableHubTransitions,
+ communalSettingsInteractor = communalSettingsInteractor,
swipeToDismissInteractor = swipeToDismissInteractor,
keyguardOcclusionInteractor = keyguardOcclusionInteractor,
)
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/FromOccludedTransitionInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/FromOccludedTransitionInteractorKosmos.kt
index c2169456eac5..7827655806d8 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/FromOccludedTransitionInteractorKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/FromOccludedTransitionInteractorKosmos.kt
@@ -17,6 +17,7 @@
package com.android.systemui.keyguard.domain.interactor
import com.android.systemui.communal.domain.interactor.communalInteractor
+import com.android.systemui.communal.domain.interactor.communalSceneInteractor
import com.android.systemui.keyguard.data.repository.keyguardTransitionRepository
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.kosmos.applicationCoroutineScope
@@ -37,5 +38,6 @@ val Kosmos.fromOccludedTransitionInteractor by
powerInteractor = powerInteractor,
communalInteractor = communalInteractor,
keyguardOcclusionInteractor = keyguardOcclusionInteractor,
+ communalSceneInteractor = communalSceneInteractor,
)
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/KeyguardBlueprintInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/KeyguardBlueprintInteractorKosmos.kt
index 4328ca153374..406b5cb11bb4 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/KeyguardBlueprintInteractorKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/KeyguardBlueprintInteractorKosmos.kt
@@ -16,11 +16,9 @@
package com.android.systemui.keyguard.domain.interactor
-import android.content.applicationContext
import com.android.systemui.biometrics.domain.interactor.fingerprintPropertyInteractor
import com.android.systemui.common.ui.domain.interactor.configurationInteractor
import com.android.systemui.keyguard.data.repository.keyguardBlueprintRepository
-import com.android.systemui.keyguard.data.repository.keyguardClockSection
import com.android.systemui.keyguard.data.repository.keyguardSmartspaceSection
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.kosmos.applicationCoroutineScope
@@ -31,12 +29,9 @@ val Kosmos.keyguardBlueprintInteractor by
KeyguardBlueprintInteractor(
keyguardBlueprintRepository = keyguardBlueprintRepository,
applicationScope = applicationCoroutineScope,
- context = applicationContext,
shadeInteractor = shadeInteractor,
- clockInteractor = keyguardClockInteractor,
configurationInteractor = configurationInteractor,
fingerprintPropertyInteractor = fingerprintPropertyInteractor,
- clockSection = keyguardClockSection,
smartspaceSection = keyguardSmartspaceSection,
)
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissActionInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissActionInteractorKosmos.kt
index 03e5a90c9f7d..2c6d44f10152 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissActionInteractorKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissActionInteractorKosmos.kt
@@ -19,7 +19,6 @@ package com.android.systemui.keyguard.domain.interactor
import com.android.systemui.keyguard.data.repository.keyguardRepository
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.kosmos.testScope
-import com.android.systemui.scene.domain.interactor.sceneInteractor
import kotlinx.coroutines.ExperimentalCoroutinesApi
@ExperimentalCoroutinesApi
@@ -30,6 +29,5 @@ val Kosmos.keyguardDismissActionInteractor by
transitionInteractor = keyguardTransitionInteractor,
dismissInteractor = keyguardDismissInteractor,
applicationScope = testScope.backgroundScope,
- sceneInteractor = sceneInteractor,
)
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/KeyguardWakeDirectlyToGoneInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/KeyguardWakeDirectlyToGoneInteractorKosmos.kt
new file mode 100644
index 000000000000..63e168d018bf
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/KeyguardWakeDirectlyToGoneInteractorKosmos.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.systemui.keyguard.domain.interactor
+
+import android.app.admin.alarmManager
+import android.content.mockedContext
+import com.android.internal.widget.lockPatternUtils
+import com.android.systemui.keyguard.data.repository.fakeKeyguardRepository
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.applicationCoroutineScope
+import com.android.systemui.power.domain.interactor.powerInteractor
+import com.android.systemui.user.domain.interactor.selectedUserInteractor
+import com.android.systemui.util.settings.fakeSettings
+import com.android.systemui.util.time.systemClock
+
+val Kosmos.keyguardWakeDirectlyToGoneInteractor by
+ Kosmos.Fixture {
+ KeyguardWakeDirectlyToGoneInteractor(
+ applicationCoroutineScope,
+ mockedContext,
+ fakeKeyguardRepository,
+ systemClock,
+ alarmManager,
+ keyguardTransitionInteractor,
+ powerInteractor,
+ fakeSettings,
+ lockPatternUtils,
+ fakeSettings,
+ selectedUserInteractor,
+ )
+ }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/WindowManagerLockscreenVisibilityInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/WindowManagerLockscreenVisibilityInteractorKosmos.kt
index bd9c0be6b0b7..8bb2fcecca58 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/WindowManagerLockscreenVisibilityInteractorKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/WindowManagerLockscreenVisibilityInteractorKosmos.kt
@@ -17,6 +17,7 @@
package com.android.systemui.keyguard.domain.interactor
import com.android.systemui.deviceentry.domain.interactor.deviceEntryInteractor
+import com.android.systemui.keyguard.data.repository.keyguardTransitionRepository
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.scene.domain.interactor.sceneInteractor
import com.android.systemui.statusbar.notification.domain.interactor.notificationLaunchAnimationInteractor
@@ -25,6 +26,7 @@ val Kosmos.windowManagerLockscreenVisibilityInteractor by
Kosmos.Fixture {
WindowManagerLockscreenVisibilityInteractor(
keyguardInteractor = keyguardInteractor,
+ transitionRepository = keyguardTransitionRepository,
transitionInteractor = keyguardTransitionInteractor,
surfaceBehindInteractor = keyguardSurfaceBehindInteractor,
fromLockscreenInteractor = fromLockscreenTransitionInteractor,
@@ -33,5 +35,6 @@ val Kosmos.windowManagerLockscreenVisibilityInteractor by
notificationLaunchAnimationInteractor = notificationLaunchAnimationInteractor,
sceneInteractor = { sceneInteractor },
deviceEntryInteractor = { deviceEntryInteractor },
+ wakeToGoneInteractor = keyguardWakeDirectlyToGoneInteractor,
)
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/ui/viewmodel/DreamingToAodTransitionViewModelKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/ui/viewmodel/DreamingToAodTransitionViewModelKosmos.kt
new file mode 100644
index 000000000000..b5f0b897deba
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/ui/viewmodel/DreamingToAodTransitionViewModelKosmos.kt
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+@file:OptIn(ExperimentalCoroutinesApi::class)
+
+package com.android.systemui.keyguard.ui.viewmodel
+
+import com.android.systemui.deviceentry.domain.interactor.deviceEntryUdfpsInteractor
+import com.android.systemui.keyguard.ui.keyguardTransitionAnimationFlow
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.Kosmos.Fixture
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+
+var Kosmos.dreamingToAodTransitionViewModel by Fixture {
+ DreamingToAodTransitionViewModel(
+ deviceEntryUdfpsInteractor = deviceEntryUdfpsInteractor,
+ animationFlow = keyguardTransitionAnimationFlow,
+ )
+}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModelKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModelKosmos.kt
index 2567ffee9be8..3c5baa557513 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModelKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModelKosmos.kt
@@ -46,6 +46,7 @@ val Kosmos.keyguardRootViewModel by Fixture {
dozingToGoneTransitionViewModel = dozingToGoneTransitionViewModel,
dozingToLockscreenTransitionViewModel = dozingToLockscreenTransitionViewModel,
dozingToOccludedTransitionViewModel = dozingToOccludedTransitionViewModel,
+ dreamingToAodTransitionViewModel = dreamingToAodTransitionViewModel,
dreamingToGoneTransitionViewModel = dreamingToGoneTransitionViewModel,
dreamingToLockscreenTransitionViewModel = dreamingToLockscreenTransitionViewModel,
glanceableHubToLockscreenTransitionViewModel = glanceableHubToLockscreenTransitionViewModel,
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenContentViewModelKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenContentViewModelKosmos.kt
index 24e47b0af3fa..550ecb3ea7af 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenContentViewModelKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenContentViewModelKosmos.kt
@@ -21,6 +21,7 @@ import com.android.systemui.keyguard.domain.interactor.keyguardBlueprintInteract
import com.android.systemui.keyguard.domain.interactor.keyguardClockInteractor
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.kosmos.applicationCoroutineScope
+import com.android.systemui.scene.domain.interactor.sceneContainerOcclusionInteractor
import com.android.systemui.shade.domain.interactor.shadeInteractor
import com.android.systemui.unfold.domain.interactor.unfoldTransitionInteractor
@@ -34,5 +35,6 @@ val Kosmos.lockscreenContentViewModel by
shadeInteractor = shadeInteractor,
applicationScope = applicationCoroutineScope,
unfoldTransitionInteractor = unfoldTransitionInteractor,
+ occlusionInteractor = sceneContainerOcclusionInteractor,
)
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/domain/pipeline/MediaDataFilterKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/domain/pipeline/MediaDataFilterKosmos.kt
index b8b006098c6f..147318473998 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/domain/pipeline/MediaDataFilterKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/domain/pipeline/MediaDataFilterKosmos.kt
@@ -21,6 +21,7 @@ import com.android.systemui.broadcast.BroadcastSender
import com.android.systemui.concurrency.fakeExecutor
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.media.controls.data.repository.mediaFilterRepository
+import com.android.systemui.media.controls.shared.mediaLogger
import com.android.systemui.media.controls.util.mediaFlags
import com.android.systemui.media.controls.util.mediaUiEventLogger
import com.android.systemui.settings.userTracker
@@ -45,6 +46,6 @@ val Kosmos.mediaDataFilter by
logger = mediaUiEventLogger,
mediaFlags = mediaFlags,
mediaFilterRepository = mediaFilterRepository,
- mediaLoadingLogger = mediaLoadingLogger,
+ mediaLogger = mediaLogger,
)
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/domain/pipeline/MediaLoadingLoggerKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/shared/MediaLoggerKosmos.kt
index 96886f738dbd..55c419e8ade1 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/domain/pipeline/MediaLoadingLoggerKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/shared/MediaLoggerKosmos.kt
@@ -14,12 +14,11 @@
* limitations under the License.
*/
-package com.android.systemui.media.controls.domain.pipeline
+package com.android.systemui.media.controls.shared
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.log.logcatLogBuffer
import org.mockito.Mockito.mock
-val Kosmos.mediaLoadingLogger by
- Kosmos.Fixture { MediaLoadingLogger(logcatLogBuffer("MediaLoadingLogBuffer")) }
-val Kosmos.mockMediaLoadingLogger by Kosmos.Fixture { mock(MediaLoadingLogger::class.java) }
+var Kosmos.mediaLogger by Kosmos.Fixture { MediaLogger(logcatLogBuffer("MediaLogBuffer")) }
+val Kosmos.mockMediaLogger by Kosmos.Fixture { mock(MediaLogger::class.java) }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/ui/viewmodel/MediaCarouselViewModelKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/ui/viewmodel/MediaCarouselViewModelKosmos.kt
index 069995aa3fec..054ac2e39993 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/ui/viewmodel/MediaCarouselViewModelKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/ui/viewmodel/MediaCarouselViewModelKosmos.kt
@@ -23,6 +23,7 @@ import com.android.systemui.kosmos.applicationCoroutineScope
import com.android.systemui.kosmos.testDispatcher
import com.android.systemui.media.controls.domain.pipeline.interactor.factory.mediaControlInteractorFactory
import com.android.systemui.media.controls.domain.pipeline.interactor.mediaCarouselInteractor
+import com.android.systemui.media.controls.shared.mediaLogger
import com.android.systemui.media.controls.util.mediaFlags
import com.android.systemui.media.controls.util.mediaUiEventLogger
import com.android.systemui.statusbar.notification.collection.provider.visualStabilityProvider
@@ -40,5 +41,6 @@ val Kosmos.mediaCarouselViewModel by
recommendationsViewModel = mediaRecommendationsViewModel,
logger = mediaUiEventLogger,
mediaFlags = mediaFlags,
+ mediaLogger = mediaLogger,
)
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/mediaprojection/data/repository/MediaProjectionRepositoryKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/mediaprojection/data/repository/MediaProjectionRepositoryKosmos.kt
index f253e949375e..04122742bb0d 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/mediaprojection/data/repository/MediaProjectionRepositoryKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/mediaprojection/data/repository/MediaProjectionRepositoryKosmos.kt
@@ -16,10 +16,12 @@
package com.android.systemui.mediaprojection.data.repository
+import android.hardware.display.displayManager
import android.os.Handler
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.kosmos.applicationCoroutineScope
import com.android.systemui.kosmos.testDispatcher
+import com.android.systemui.log.logcatLogBuffer
import com.android.systemui.mediaprojection.taskswitcher.activityTaskManagerTasksRepository
import com.android.systemui.mediaprojection.taskswitcher.fakeMediaProjectionManager
@@ -30,10 +32,12 @@ val Kosmos.realMediaProjectionRepository by
Kosmos.Fixture {
MediaProjectionManagerRepository(
mediaProjectionManager = fakeMediaProjectionManager.mediaProjectionManager,
+ displayManager = displayManager,
handler = Handler.getMain(),
applicationScope = applicationCoroutineScope,
tasksRepository = activityTaskManagerTasksRepository,
backgroundDispatcher = testDispatcher,
mediaProjectionServiceHelper = fakeMediaProjectionManager.helper,
+ logger = logcatLogBuffer("TestMediaProjection"),
)
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/mediarouter/data/repository/MediaRouterRepositoryKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/mediarouter/data/repository/MediaRouterRepositoryKosmos.kt
index eec99207446a..e1ecc517ec9f 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/mediarouter/data/repository/MediaRouterRepositoryKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/mediarouter/data/repository/MediaRouterRepositoryKosmos.kt
@@ -18,6 +18,7 @@ package com.android.systemui.mediarouter.data.repository
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.kosmos.applicationCoroutineScope
+import com.android.systemui.log.logcatLogBuffer
import com.android.systemui.statusbar.policy.fakeCastController
val Kosmos.realMediaRouterRepository by
@@ -25,6 +26,7 @@ val Kosmos.realMediaRouterRepository by
MediaRouterRepositoryImpl(
scope = applicationCoroutineScope,
castController = fakeCastController,
+ logger = logcatLogBuffer("MediaRouter"),
)
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/qs/panels/data/repository/IconTilesRepositoryKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/qs/panels/data/repository/DefaultLargeTilesRepositoryKosmos.kt
index e40152aa588f..92ac08949add 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/qs/panels/data/repository/IconTilesRepositoryKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/qs/panels/data/repository/DefaultLargeTilesRepositoryKosmos.kt
@@ -18,4 +18,5 @@ package com.android.systemui.qs.panels.data.repository
import com.android.systemui.kosmos.Kosmos
-var Kosmos.iconTilesRepository: IconTilesRepository by Kosmos.Fixture { IconTilesRepositoryImpl() }
+var Kosmos.defaultLargeTilesRepository: DefaultLargeTilesRepository by
+ Kosmos.Fixture { DefaultLargeTilesRepositoryImpl() }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/qs/panels/data/repository/QSPreferencesRepositoryKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/qs/panels/data/repository/QSPreferencesRepositoryKosmos.kt
index 39ae5eb44c65..513d4e418a41 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/qs/panels/data/repository/QSPreferencesRepositoryKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/qs/panels/data/repository/QSPreferencesRepositoryKosmos.kt
@@ -22,4 +22,11 @@ import com.android.systemui.settings.userFileManager
import com.android.systemui.user.data.repository.userRepository
val Kosmos.qsPreferencesRepository by
- Kosmos.Fixture { QSPreferencesRepository(userFileManager, userRepository, testDispatcher) }
+ Kosmos.Fixture {
+ QSPreferencesRepository(
+ userFileManager,
+ userRepository,
+ defaultLargeTilesRepository,
+ testDispatcher
+ )
+ }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/qs/panels/domain/interactor/IconTilesInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/qs/panels/domain/interactor/IconTilesInteractorKosmos.kt
index eaa702f9f6da..76dccdb95637 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/qs/panels/domain/interactor/IconTilesInteractorKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/qs/panels/domain/interactor/IconTilesInteractorKosmos.kt
@@ -17,6 +17,16 @@
package com.android.systemui.qs.panels.domain.interactor
import com.android.systemui.kosmos.Kosmos
-import com.android.systemui.qs.panels.data.repository.iconTilesRepository
+import com.android.systemui.kosmos.applicationCoroutineScope
+import com.android.systemui.log.core.FakeLogBuffer
+import com.android.systemui.qs.panels.data.repository.defaultLargeTilesRepository
-val Kosmos.iconTilesInteractor by Kosmos.Fixture { IconTilesInteractor(iconTilesRepository) }
+val Kosmos.iconTilesInteractor by
+ Kosmos.Fixture {
+ IconTilesInteractor(
+ defaultLargeTilesRepository,
+ qsPreferencesInteractor,
+ FakeLogBuffer.Factory.create(),
+ applicationCoroutineScope
+ )
+ }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/shade/data/repository/FakeShadeRepository.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/shade/data/repository/FakeShadeRepository.kt
index b9918f1e46d8..4660337c0d4b 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/shade/data/repository/FakeShadeRepository.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/shade/data/repository/FakeShadeRepository.kt
@@ -18,7 +18,6 @@
package com.android.systemui.shade.data.repository
import com.android.systemui.dagger.SysUISingleton
-import com.android.systemui.shade.shared.model.ShadeMode
import dagger.Binds
import dagger.Module
import javax.inject.Inject
@@ -30,53 +29,65 @@ import kotlinx.coroutines.flow.asStateFlow
@SysUISingleton
class FakeShadeRepository @Inject constructor() : ShadeRepository {
private val _qsExpansion = MutableStateFlow(0f)
- @Deprecated("Use ShadeInteractor.qsExpansion instead") override val qsExpansion = _qsExpansion
+
+ @Deprecated("Use ShadeInteractor.qsExpansion instead")
+ override val qsExpansion = _qsExpansion.asStateFlow()
private val _udfpsTransitionToFullShadeProgress = MutableStateFlow(0f)
- override val udfpsTransitionToFullShadeProgress = _udfpsTransitionToFullShadeProgress
+ override val udfpsTransitionToFullShadeProgress =
+ _udfpsTransitionToFullShadeProgress.asStateFlow()
private val _currentFling: MutableStateFlow<FlingInfo?> = MutableStateFlow(null)
- override val currentFling: StateFlow<FlingInfo?> = _currentFling
+ override val currentFling: StateFlow<FlingInfo?> = _currentFling.asStateFlow()
private val _lockscreenShadeExpansion = MutableStateFlow(0f)
- override val lockscreenShadeExpansion = _lockscreenShadeExpansion
+ override val lockscreenShadeExpansion = _lockscreenShadeExpansion.asStateFlow()
private val _legacyShadeExpansion = MutableStateFlow(0f)
+
@Deprecated("Use ShadeInteractor instead")
- override val legacyShadeExpansion = _legacyShadeExpansion
+ override val legacyShadeExpansion = _legacyShadeExpansion.asStateFlow()
private val _legacyShadeTracking = MutableStateFlow(false)
+
@Deprecated("Use ShadeInteractor instead")
- override val legacyShadeTracking = _legacyShadeTracking
+ override val legacyShadeTracking = _legacyShadeTracking.asStateFlow()
private val _legacyQsTracking = MutableStateFlow(false)
- @Deprecated("Use ShadeInteractor instead") override val legacyQsTracking = _legacyQsTracking
+
+ @Deprecated("Use ShadeInteractor instead")
+ override val legacyQsTracking = _legacyQsTracking.asStateFlow()
private val _legacyExpandedOrAwaitingInputTransfer = MutableStateFlow(false)
+
@Deprecated("Use ShadeInteractor instead")
- override val legacyExpandedOrAwaitingInputTransfer = _legacyExpandedOrAwaitingInputTransfer
+ override val legacyExpandedOrAwaitingInputTransfer =
+ _legacyExpandedOrAwaitingInputTransfer.asStateFlow()
private val _legacyIsQsExpanded = MutableStateFlow(false)
- @Deprecated("Use ShadeInteractor instead") override val legacyIsQsExpanded = _legacyIsQsExpanded
+
+ @Deprecated("Use ShadeInteractor instead")
+ override val legacyIsQsExpanded = _legacyIsQsExpanded.asStateFlow()
@Deprecated("Use ShadeInteractor.isUserInteractingWithShade instead")
override val legacyLockscreenShadeTracking = MutableStateFlow(false)
- private val _shadeMode = MutableStateFlow<ShadeMode>(ShadeMode.Single)
- override val shadeMode: StateFlow<ShadeMode> = _shadeMode.asStateFlow()
-
private var _isDualShadeAlignedToBottom = false
override val isDualShadeAlignedToBottom
get() = _isDualShadeAlignedToBottom
+ private var _isShadeLayoutWide = MutableStateFlow(false)
+ override val isShadeLayoutWide: StateFlow<Boolean> = _isShadeLayoutWide.asStateFlow()
+
@Deprecated("Use ShadeInteractor instead")
override fun setLegacyIsQsExpanded(legacyIsQsExpanded: Boolean) {
_legacyIsQsExpanded.value = legacyIsQsExpanded
}
private val _legacyExpandImmediate = MutableStateFlow(false)
+
@Deprecated("Use ShadeInteractor instead")
- override val legacyExpandImmediate = _legacyExpandImmediate
+ override val legacyExpandImmediate = _legacyExpandImmediate.asStateFlow()
@Deprecated("Use ShadeInteractor instead")
override fun setLegacyExpandImmediate(legacyExpandImmediate: Boolean) {
@@ -106,6 +117,7 @@ class FakeShadeRepository @Inject constructor() : ShadeRepository {
}
private val _legacyQsFullscreen = MutableStateFlow(false)
+
@Deprecated("Use ShadeInteractor instead") override val legacyQsFullscreen = _legacyQsFullscreen
@Deprecated("Use ShadeInteractor instead")
@@ -114,6 +126,7 @@ class FakeShadeRepository @Inject constructor() : ShadeRepository {
}
private val _legacyIsClosing = MutableStateFlow(false)
+
@Deprecated("Use ShadeInteractor instead") override val legacyIsClosing = _legacyIsClosing
@Deprecated("Use ShadeInteractor instead")
@@ -142,13 +155,13 @@ class FakeShadeRepository @Inject constructor() : ShadeRepository {
_legacyShadeExpansion.value = expandedFraction
}
- override fun setShadeMode(mode: ShadeMode) {
- _shadeMode.value = mode
- }
-
fun setDualShadeAlignedToBottom(isAlignedToBottom: Boolean) {
_isDualShadeAlignedToBottom = isAlignedToBottom
}
+
+ override fun setShadeLayoutWide(isShadeLayoutWide: Boolean) {
+ _isShadeLayoutWide.value = isShadeLayoutWide
+ }
}
@Module
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/shade/domain/interactor/ShadeInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/shade/domain/interactor/ShadeInteractorKosmos.kt
index a00d2f4fc517..bfd6614a2272 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/shade/domain/interactor/ShadeInteractorKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/shade/domain/interactor/ShadeInteractorKosmos.kt
@@ -45,7 +45,6 @@ val Kosmos.shadeInteractorSceneContainerImpl by
scope = applicationCoroutineScope,
sceneInteractor = sceneInteractor,
sharedNotificationContainerInteractor = sharedNotificationContainerInteractor,
- shadeRepository = shadeRepository,
)
}
val Kosmos.shadeInteractorLegacyImpl by
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/smartspace/data/repository/FakeSmartspaceRepository.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/smartspace/data/repository/FakeSmartspaceRepository.kt
deleted file mode 100644
index 862e52d7703f..000000000000
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/smartspace/data/repository/FakeSmartspaceRepository.kt
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.android.systemui.smartspace.data.repository
-
-import android.app.smartspace.SmartspaceTarget
-import kotlinx.coroutines.flow.Flow
-import kotlinx.coroutines.flow.MutableStateFlow
-
-class FakeSmartspaceRepository(
- smartspaceRemoteViewsEnabled: Boolean = true,
-) : SmartspaceRepository {
-
- override val isSmartspaceRemoteViewsEnabled = smartspaceRemoteViewsEnabled
-
- private val _communalSmartspaceTargets: MutableStateFlow<List<SmartspaceTarget>> =
- MutableStateFlow(emptyList())
- override val communalSmartspaceTargets: Flow<List<SmartspaceTarget>> =
- _communalSmartspaceTargets
-
- fun setCommunalSmartspaceTargets(targets: List<SmartspaceTarget>) {
- _communalSmartspaceTargets.value = targets
- }
-}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/StatusBarChipsLogKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/StatusBarChipsLogKosmos.kt
new file mode 100644
index 000000000000..e904cd27a297
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/StatusBarChipsLogKosmos.kt
@@ -0,0 +1,22 @@
+/*
+ * 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.chips
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.log.logcatLogBuffer
+
+val Kosmos.statusBarChipsLogger by Kosmos.Fixture { logcatLogBuffer("StatusBarChips") }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/call/domain/interactor/CallChipInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/call/domain/interactor/CallChipInteractorKosmos.kt
index 064e57bada28..fcd14d8512fb 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/call/domain/interactor/CallChipInteractorKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/call/domain/interactor/CallChipInteractorKosmos.kt
@@ -17,7 +17,15 @@
package com.android.systemui.statusbar.chips.call.domain.interactor
import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.applicationCoroutineScope
+import com.android.systemui.statusbar.chips.statusBarChipsLogger
import com.android.systemui.statusbar.phone.ongoingcall.data.repository.ongoingCallRepository
val Kosmos.callChipInteractor: CallChipInteractor by
- Kosmos.Fixture { CallChipInteractor(repository = ongoingCallRepository) }
+ Kosmos.Fixture {
+ CallChipInteractor(
+ scope = applicationCoroutineScope,
+ repository = ongoingCallRepository,
+ logger = statusBarChipsLogger,
+ )
+ }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/call/ui/viewmodel/CallChipViewModelKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/call/ui/viewmodel/CallChipViewModelKosmos.kt
index ab71b5e2d6b9..1e304d979e03 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/call/ui/viewmodel/CallChipViewModelKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/call/ui/viewmodel/CallChipViewModelKosmos.kt
@@ -20,6 +20,7 @@ import com.android.systemui.kosmos.Kosmos
import com.android.systemui.kosmos.applicationCoroutineScope
import com.android.systemui.plugins.activityStarter
import com.android.systemui.statusbar.chips.call.domain.interactor.callChipInteractor
+import com.android.systemui.statusbar.chips.statusBarChipsLogger
import com.android.systemui.util.time.fakeSystemClock
val Kosmos.callChipViewModel: CallChipViewModel by
@@ -29,5 +30,6 @@ val Kosmos.callChipViewModel: CallChipViewModel by
interactor = callChipInteractor,
systemClock = fakeSystemClock,
activityStarter = activityStarter,
+ logger = statusBarChipsLogger,
)
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/casttootherdevice/domain/interactor/MediaRouterChipInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/casttootherdevice/domain/interactor/MediaRouterChipInteractorKosmos.kt
index cb18b687d5ed..1737bc4c7dfb 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/casttootherdevice/domain/interactor/MediaRouterChipInteractorKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/casttootherdevice/domain/interactor/MediaRouterChipInteractorKosmos.kt
@@ -19,11 +19,13 @@ package com.android.systemui.statusbar.chips.casttootherdevice.domain.interactor
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.kosmos.applicationCoroutineScope
import com.android.systemui.mediarouter.data.repository.fakeMediaRouterRepository
+import com.android.systemui.statusbar.chips.statusBarChipsLogger
val Kosmos.mediaRouterChipInteractor by
Kosmos.Fixture {
MediaRouterChipInteractor(
scope = applicationCoroutineScope,
mediaRouterRepository = fakeMediaRouterRepository,
+ logger = statusBarChipsLogger,
)
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/casttootherdevice/ui/viewmodel/CastToOtherDeviceChipViewModelKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/casttootherdevice/ui/viewmodel/CastToOtherDeviceChipViewModelKosmos.kt
index a8de4607e4a2..c7dfd5cc93b9 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/casttootherdevice/ui/viewmodel/CastToOtherDeviceChipViewModelKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/casttootherdevice/ui/viewmodel/CastToOtherDeviceChipViewModelKosmos.kt
@@ -16,22 +16,27 @@
package com.android.systemui.statusbar.chips.casttootherdevice.ui.viewmodel
+import android.content.applicationContext
+import com.android.systemui.animation.dialogTransitionAnimator
import com.android.systemui.animation.mockDialogTransitionAnimator
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.kosmos.applicationCoroutineScope
import com.android.systemui.statusbar.chips.casttootherdevice.domain.interactor.mediaRouterChipInteractor
import com.android.systemui.statusbar.chips.mediaprojection.domain.interactor.mediaProjectionChipInteractor
import com.android.systemui.statusbar.chips.mediaprojection.ui.view.endMediaProjectionDialogHelper
+import com.android.systemui.statusbar.chips.statusBarChipsLogger
import com.android.systemui.util.time.fakeSystemClock
val Kosmos.castToOtherDeviceChipViewModel: CastToOtherDeviceChipViewModel by
Kosmos.Fixture {
CastToOtherDeviceChipViewModel(
scope = applicationCoroutineScope,
+ context = applicationContext,
mediaProjectionChipInteractor = mediaProjectionChipInteractor,
mediaRouterChipInteractor = mediaRouterChipInteractor,
systemClock = fakeSystemClock,
endMediaProjectionDialogHelper = endMediaProjectionDialogHelper,
dialogTransitionAnimator = mockDialogTransitionAnimator,
+ logger = statusBarChipsLogger,
)
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/mediaprojection/domain/interactor/MediaProjectionChipInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/mediaprojection/domain/interactor/MediaProjectionChipInteractorKosmos.kt
index 6812a9df8973..0bfd88fc2cfc 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/mediaprojection/domain/interactor/MediaProjectionChipInteractorKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/mediaprojection/domain/interactor/MediaProjectionChipInteractorKosmos.kt
@@ -20,6 +20,7 @@ import android.content.packageManager
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.kosmos.applicationCoroutineScope
import com.android.systemui.mediaprojection.data.repository.fakeMediaProjectionRepository
+import com.android.systemui.statusbar.chips.statusBarChipsLogger
val Kosmos.mediaProjectionChipInteractor: MediaProjectionChipInteractor by
Kosmos.Fixture {
@@ -27,5 +28,6 @@ val Kosmos.mediaProjectionChipInteractor: MediaProjectionChipInteractor by
scope = applicationCoroutineScope,
mediaProjectionRepository = fakeMediaProjectionRepository,
packageManager = packageManager,
+ logger = statusBarChipsLogger,
)
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/mediaprojection/ui/view/EndMediaProjectionDialogHelperKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/mediaprojection/ui/view/EndMediaProjectionDialogHelperKosmos.kt
index 4f82662fa673..651a0f7639d8 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/mediaprojection/ui/view/EndMediaProjectionDialogHelperKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/mediaprojection/ui/view/EndMediaProjectionDialogHelperKosmos.kt
@@ -16,8 +16,8 @@
package com.android.systemui.statusbar.chips.mediaprojection.ui.view
-import android.content.applicationContext
import android.content.packageManager
+import com.android.systemui.animation.mockDialogTransitionAnimator
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.statusbar.phone.mockSystemUIDialogFactory
@@ -25,7 +25,7 @@ val Kosmos.endMediaProjectionDialogHelper: EndMediaProjectionDialogHelper by
Kosmos.Fixture {
EndMediaProjectionDialogHelper(
dialogFactory = mockSystemUIDialogFactory,
+ dialogTransitionAnimator = mockDialogTransitionAnimator,
packageManager = packageManager,
- context = applicationContext,
)
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/screenrecord/domain/interactor/ScreenRecordChipInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/screenrecord/domain/interactor/ScreenRecordChipInteractorKosmos.kt
index b4e9c146acbe..557d3e22d3b3 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/screenrecord/domain/interactor/ScreenRecordChipInteractorKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/screenrecord/domain/interactor/ScreenRecordChipInteractorKosmos.kt
@@ -20,6 +20,7 @@ import com.android.systemui.kosmos.Kosmos
import com.android.systemui.kosmos.applicationCoroutineScope
import com.android.systemui.mediaprojection.data.repository.fakeMediaProjectionRepository
import com.android.systemui.screenrecord.data.repository.screenRecordRepository
+import com.android.systemui.statusbar.chips.statusBarChipsLogger
val Kosmos.screenRecordChipInteractor: ScreenRecordChipInteractor by
Kosmos.Fixture {
@@ -27,5 +28,6 @@ val Kosmos.screenRecordChipInteractor: ScreenRecordChipInteractor by
scope = applicationCoroutineScope,
screenRecordRepository = screenRecordRepository,
mediaProjectionRepository = fakeMediaProjectionRepository,
+ logger = statusBarChipsLogger,
)
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/screenrecord/ui/viewmodel/ScreenRecordChipViewModelKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/screenrecord/ui/viewmodel/ScreenRecordChipViewModelKosmos.kt
index 99b7ec9c9f1a..c2a6f7d91eb0 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/screenrecord/ui/viewmodel/ScreenRecordChipViewModelKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/screenrecord/ui/viewmodel/ScreenRecordChipViewModelKosmos.kt
@@ -16,20 +16,26 @@
package com.android.systemui.statusbar.chips.screenrecord.ui.viewmodel
+import android.content.applicationContext
import com.android.systemui.animation.mockDialogTransitionAnimator
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.kosmos.applicationCoroutineScope
import com.android.systemui.statusbar.chips.mediaprojection.ui.view.endMediaProjectionDialogHelper
import com.android.systemui.statusbar.chips.screenrecord.domain.interactor.screenRecordChipInteractor
+import com.android.systemui.statusbar.chips.sharetoapp.ui.viewmodel.shareToAppChipViewModel
+import com.android.systemui.statusbar.chips.statusBarChipsLogger
import com.android.systemui.util.time.fakeSystemClock
val Kosmos.screenRecordChipViewModel: ScreenRecordChipViewModel by
Kosmos.Fixture {
ScreenRecordChipViewModel(
scope = applicationCoroutineScope,
+ context = applicationContext,
interactor = screenRecordChipInteractor,
+ shareToAppChipViewModel = shareToAppChipViewModel,
endMediaProjectionDialogHelper = endMediaProjectionDialogHelper,
dialogTransitionAnimator = mockDialogTransitionAnimator,
systemClock = fakeSystemClock,
+ logger = statusBarChipsLogger,
)
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/sharetoapp/ui/viewmodel/ShareToAppChipViewModelKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/sharetoapp/ui/viewmodel/ShareToAppChipViewModelKosmos.kt
index 535f81a7d63e..0770009f9998 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/sharetoapp/ui/viewmodel/ShareToAppChipViewModelKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/sharetoapp/ui/viewmodel/ShareToAppChipViewModelKosmos.kt
@@ -16,20 +16,24 @@
package com.android.systemui.statusbar.chips.sharetoapp.ui.viewmodel
+import android.content.applicationContext
import com.android.systemui.animation.mockDialogTransitionAnimator
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.kosmos.applicationCoroutineScope
import com.android.systemui.statusbar.chips.mediaprojection.domain.interactor.mediaProjectionChipInteractor
import com.android.systemui.statusbar.chips.mediaprojection.ui.view.endMediaProjectionDialogHelper
+import com.android.systemui.statusbar.chips.statusBarChipsLogger
import com.android.systemui.util.time.fakeSystemClock
val Kosmos.shareToAppChipViewModel: ShareToAppChipViewModel by
Kosmos.Fixture {
ShareToAppChipViewModel(
scope = applicationCoroutineScope,
+ context = applicationContext,
mediaProjectionChipInteractor = mediaProjectionChipInteractor,
systemClock = fakeSystemClock,
endMediaProjectionDialogHelper = endMediaProjectionDialogHelper,
dialogTransitionAnimator = mockDialogTransitionAnimator,
+ logger = statusBarChipsLogger,
)
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipsViewModelKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipsViewModelKosmos.kt
index 078e84521d5e..16e288fcf113 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipsViewModelKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipsViewModelKosmos.kt
@@ -22,6 +22,7 @@ import com.android.systemui.statusbar.chips.call.ui.viewmodel.callChipViewModel
import com.android.systemui.statusbar.chips.casttootherdevice.ui.viewmodel.castToOtherDeviceChipViewModel
import com.android.systemui.statusbar.chips.screenrecord.ui.viewmodel.screenRecordChipViewModel
import com.android.systemui.statusbar.chips.sharetoapp.ui.viewmodel.shareToAppChipViewModel
+import com.android.systemui.statusbar.chips.statusBarChipsLogger
val Kosmos.ongoingActivityChipsViewModel: OngoingActivityChipsViewModel by
Kosmos.Fixture {
@@ -31,5 +32,6 @@ val Kosmos.ongoingActivityChipsViewModel: OngoingActivityChipsViewModel by
shareToAppChipViewModel = shareToAppChipViewModel,
castToOtherDeviceChipViewModel = castToOtherDeviceChipViewModel,
callChipViewModel = callChipViewModel,
+ logger = statusBarChipsLogger,
)
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/collection/EntryUtil.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/collection/EntryUtil.kt
index da956ec67696..8b4de2bcc26f 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/collection/EntryUtil.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/collection/EntryUtil.kt
@@ -22,13 +22,12 @@ package com.android.systemui.statusbar.notification.collection
* The [modifier] function will be passed an instance of a NotificationEntryBuilder. Any
* modifications made to the builder will be applied to the [entry].
*/
-inline fun modifyEntry(
- entry: NotificationEntry,
+inline fun NotificationEntry.modifyEntry(
crossinline modifier: NotificationEntryBuilder.() -> Unit
) {
- val builder = NotificationEntryBuilder(entry)
+ val builder = NotificationEntryBuilder(this)
modifier(builder)
- builder.apply(entry)
+ builder.apply(this)
}
fun getAttachState(entry: ListEntry): ListAttachState {
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/collection/coordinator/LockScreenMinimalismCoordinatorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/collection/coordinator/LockScreenMinimalismCoordinatorKosmos.kt
new file mode 100644
index 000000000000..77d97bb7cbe9
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/collection/coordinator/LockScreenMinimalismCoordinatorKosmos.kt
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar.notification.collection.coordinator
+
+import com.android.systemui.dump.dumpManager
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.testDispatcher
+import com.android.systemui.kosmos.testScope
+import com.android.systemui.plugins.statusbar.statusBarStateController
+import com.android.systemui.shade.domain.interactor.shadeInteractor
+import com.android.systemui.statusbar.notification.domain.interactor.seenNotificationsInteractor
+import com.android.systemui.statusbar.notification.stack.domain.interactor.headsUpNotificationInteractor
+import com.android.systemui.util.settings.fakeSettings
+
+var Kosmos.lockScreenMinimalismCoordinator by
+ Kosmos.Fixture {
+ LockScreenMinimalismCoordinator(
+ bgDispatcher = testDispatcher,
+ dumpManager = dumpManager,
+ headsUpInteractor = headsUpNotificationInteractor,
+ logger = lockScreenMinimalismCoordinatorLogger,
+ scope = testScope.backgroundScope,
+ secureSettings = fakeSettings,
+ seenNotificationsInteractor = seenNotificationsInteractor,
+ statusBarStateController = statusBarStateController,
+ shadeInteractor = shadeInteractor,
+ )
+ }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/collection/coordinator/LockScreenMinimalismCoordinatorLoggerKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/collection/coordinator/LockScreenMinimalismCoordinatorLoggerKosmos.kt
new file mode 100644
index 000000000000..77aeb44e15eb
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/collection/coordinator/LockScreenMinimalismCoordinatorLoggerKosmos.kt
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar.notification.collection.coordinator
+
+import com.android.systemui.kosmos.Kosmos
+import com.android.systemui.log.logcatLogBuffer
+
+val Kosmos.lockScreenMinimalismCoordinatorLogger by
+ Kosmos.Fixture { LockScreenMinimalismCoordinatorLogger(logcatLogBuffer()) }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/data/repository/HeadsUpNotificationRepositoryKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/data/repository/HeadsUpNotificationRepositoryKosmos.kt
index 492e87bbcac4..7e8f1a9115ea 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/data/repository/HeadsUpNotificationRepositoryKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/data/repository/HeadsUpNotificationRepositoryKosmos.kt
@@ -22,14 +22,19 @@ import com.android.systemui.statusbar.notification.data.repository.HeadsUpReposi
import com.android.systemui.statusbar.notification.data.repository.HeadsUpRowRepository
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableStateFlow
+import kotlinx.coroutines.flow.distinctUntilChanged
+import kotlinx.coroutines.flow.map
val Kosmos.headsUpNotificationRepository by Fixture { FakeHeadsUpNotificationRepository() }
class FakeHeadsUpNotificationRepository : HeadsUpRepository {
override val isHeadsUpAnimatingAway: MutableStateFlow<Boolean> = MutableStateFlow(false)
- override val topHeadsUpRow: Flow<HeadsUpRowRepository?> = MutableStateFlow(null)
- override val activeHeadsUpRows: MutableStateFlow<Set<HeadsUpRowRepository>> =
- MutableStateFlow(emptySet())
+
+ val orderedHeadsUpRows = MutableStateFlow(emptyList<HeadsUpRowRepository>())
+ override val topHeadsUpRow: Flow<HeadsUpRowRepository?> =
+ orderedHeadsUpRows.map { it.firstOrNull() }.distinctUntilChanged()
+ override val activeHeadsUpRows: Flow<Set<HeadsUpRowRepository>> =
+ orderedHeadsUpRows.map { it.toSet() }.distinctUntilChanged()
override fun setHeadsUpAnimatingAway(animatingAway: Boolean) {
isHeadsUpAnimatingAway.value = animatingAway
@@ -38,4 +43,12 @@ class FakeHeadsUpNotificationRepository : HeadsUpRepository {
override fun snooze() {
// do nothing
}
+
+ fun setNotifications(notifications: List<HeadsUpRowRepository>) {
+ this.orderedHeadsUpRows.value = notifications.toList()
+ }
+
+ fun setNotifications(vararg notifications: HeadsUpRowRepository) {
+ this.orderedHeadsUpRows.value = notifications.toList()
+ }
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/policy/data/repository/FakeDeviceProvisioningRepository.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/policy/data/repository/FakeDeviceProvisioningRepository.kt
index 9247e889f8f9..e3176f1783e3 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/policy/data/repository/FakeDeviceProvisioningRepository.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/policy/data/repository/FakeDeviceProvisioningRepository.kt
@@ -26,9 +26,14 @@ import kotlinx.coroutines.flow.MutableStateFlow
class FakeDeviceProvisioningRepository @Inject constructor() : DeviceProvisioningRepository {
private val _isDeviceProvisioned = MutableStateFlow(true)
override val isDeviceProvisioned: Flow<Boolean> = _isDeviceProvisioned
+
fun setDeviceProvisioned(isProvisioned: Boolean) {
_isDeviceProvisioned.value = isProvisioned
}
+
+ override fun isDeviceProvisioned(): Boolean {
+ return _isDeviceProvisioned.value
+ }
}
@Module
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/volume/data/repository/FakeAudioSharingRepository.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/volume/data/repository/FakeAudioSharingRepository.kt
index 327e1b5df2ac..d391750a2612 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/volume/data/repository/FakeAudioSharingRepository.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/volume/data/repository/FakeAudioSharingRepository.kt
@@ -16,16 +16,40 @@
package com.android.systemui.volume.data.repository
+import androidx.annotation.IntRange
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
+import com.android.settingslib.volume.data.repository.GroupIdToVolumes
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableStateFlow
+import kotlinx.coroutines.flow.StateFlow
class FakeAudioSharingRepository : AudioSharingRepository {
private val mutableInAudioSharing: MutableStateFlow<Boolean> = MutableStateFlow(false)
+ private val mutableSecondaryGroupId: MutableStateFlow<Int> =
+ MutableStateFlow(TEST_GROUP_ID_INVALID)
+ private val mutableVolumeMap: MutableStateFlow<GroupIdToVolumes> = MutableStateFlow(emptyMap())
override val inAudioSharing: Flow<Boolean> = mutableInAudioSharing
+ override val secondaryGroupId: StateFlow<Int> = mutableSecondaryGroupId
+ override val volumeMap: StateFlow<GroupIdToVolumes> = mutableVolumeMap
+
+ override suspend fun setSecondaryVolume(volume: Int) {}
fun setInAudioSharing(state: Boolean) {
mutableInAudioSharing.value = state
}
+
+ fun setSecondaryGroupId(groupId: Int) {
+ mutableSecondaryGroupId.value = groupId
+ }
+
+ fun setVolumeMap(volumeMap: GroupIdToVolumes) {
+ mutableVolumeMap.value = volumeMap
+ }
+
+ private companion object {
+ const val TEST_GROUP_ID_INVALID = -1
+ }
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/volume/domain/interactor/AudioSharingInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/volume/domain/interactor/AudioSharingInteractorKosmos.kt
new file mode 100644
index 000000000000..03981bbef444
--- /dev/null
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/volume/domain/interactor/AudioSharingInteractorKosmos.kt
@@ -0,0 +1,29 @@
+/*
+ * 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 com.android.systemui.kosmos.Kosmos
+import com.android.systemui.kosmos.applicationCoroutineScope
+import com.android.systemui.volume.data.repository.audioSharingRepository
+
+val Kosmos.audioSharingInteractor by
+ Kosmos.Fixture {
+ AudioSharingInteractorImpl(
+ applicationCoroutineScope,
+ audioSharingRepository,
+ )
+ }
diff --git a/packages/VpnDialogs/res/values-fr-rCA/strings.xml b/packages/VpnDialogs/res/values-fr-rCA/strings.xml
index ad450b4c5f39..9ae0cb24246e 100644
--- a/packages/VpnDialogs/res/values-fr-rCA/strings.xml
+++ b/packages/VpnDialogs/res/values-fr-rCA/strings.xml
@@ -32,7 +32,7 @@
<string name="always_on_disconnected_message_settings_link" msgid="6172280302829992412">"Modifier les paramètres RPV"</string>
<string name="configure" msgid="4905518375574791375">"Configurer"</string>
<string name="disconnect" msgid="971412338304200056">"Déconnecter"</string>
- <string name="open_app" msgid="3717639178595958667">"Ouvrir l\'application"</string>
+ <string name="open_app" msgid="3717639178595958667">"Ouvrir l\'appli"</string>
<string name="dismiss" msgid="6192859333764711227">"Ignorer"</string>
<string name="sanitized_vpn_label_with_ellipsis" msgid="7014327474633422235">"<xliff:g id="SANITIZED_VPN_LABEL_WITH_ELLIPSIS_0">%1$s</xliff:g>… ( <xliff:g id="SANITIZED_VPN_LABEL_WITH_ELLIPSIS_1">%2$s</xliff:g>)"</string>
<string name="sanitized_vpn_label" msgid="1877415015009794766">"<xliff:g id="SANITIZED_VPN_LABEL_0">%1$s</xliff:g> ( <xliff:g id="SANITIZED_VPN_LABEL_1">%2$s</xliff:g>)"</string>
diff --git a/packages/overlays/AvoidAppsInCutoutOverlay/res/values-fr-rCA/strings.xml b/packages/overlays/AvoidAppsInCutoutOverlay/res/values-fr-rCA/strings.xml
index ea0a27b069da..4f922a57d4ad 100644
--- a/packages/overlays/AvoidAppsInCutoutOverlay/res/values-fr-rCA/strings.xml
+++ b/packages/overlays/AvoidAppsInCutoutOverlay/res/values-fr-rCA/strings.xml
@@ -17,5 +17,5 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="display_cutout_emulation_overlay" msgid="3814493834951357513">"Rendre les applications sous la zone de découpe"</string>
+ <string name="display_cutout_emulation_overlay" msgid="3814493834951357513">"Rendre les applis sous la zone de découpe"</string>
</resources>
diff --git a/ravenwood/coretest/test/com/android/ravenwoodtest/coretest/methodvalidation/RavenwoodTestMethodValidation_Fail01_Test.java b/ravenwood/coretest/test/com/android/ravenwoodtest/coretest/methodvalidation/RavenwoodTestMethodValidation_Fail01_Test.java
new file mode 100644
index 000000000000..db95fad2a3ad
--- /dev/null
+++ b/ravenwood/coretest/test/com/android/ravenwoodtest/coretest/methodvalidation/RavenwoodTestMethodValidation_Fail01_Test.java
@@ -0,0 +1,51 @@
+/*
+ * 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.ravenwoodtest.coretest.methodvalidation;
+
+import android.platform.test.ravenwood.RavenwoodRule;
+
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.junit.rules.RuleChain;
+import org.junit.runner.RunWith;
+
+/**
+ * RavenwoodRule has a validator to ensure "test-looking" methods have valid JUnit annotations.
+ * This class contains tests for this validator.
+ */
+@RunWith(AndroidJUnit4.class)
+public class RavenwoodTestMethodValidation_Fail01_Test {
+ private ExpectedException mThrown = ExpectedException.none();
+ private final RavenwoodRule mRavenwood = new RavenwoodRule();
+
+ @Rule
+ public final RuleChain chain = RuleChain.outerRule(mThrown).around(mRavenwood);
+
+ public RavenwoodTestMethodValidation_Fail01_Test() {
+ mThrown.expectMessage("Method setUp() doesn't have @Before");
+ }
+
+ @SuppressWarnings("JUnit4SetUpNotRun")
+ public void setUp() {
+ }
+
+ @Test
+ public void testEmpty() {
+ }
+}
diff --git a/ravenwood/coretest/test/com/android/ravenwoodtest/coretest/methodvalidation/RavenwoodTestMethodValidation_Fail02_Test.java b/ravenwood/coretest/test/com/android/ravenwoodtest/coretest/methodvalidation/RavenwoodTestMethodValidation_Fail02_Test.java
new file mode 100644
index 000000000000..ddc66c73a7c0
--- /dev/null
+++ b/ravenwood/coretest/test/com/android/ravenwoodtest/coretest/methodvalidation/RavenwoodTestMethodValidation_Fail02_Test.java
@@ -0,0 +1,51 @@
+/*
+ * 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.ravenwoodtest.coretest.methodvalidation;
+
+import android.platform.test.ravenwood.RavenwoodRule;
+
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.junit.rules.RuleChain;
+import org.junit.runner.RunWith;
+
+/**
+ * RavenwoodRule has a validator to ensure "test-looking" methods have valid JUnit annotations.
+ * This class contains tests for this validator.
+ */
+@RunWith(AndroidJUnit4.class)
+public class RavenwoodTestMethodValidation_Fail02_Test {
+ private ExpectedException mThrown = ExpectedException.none();
+ private final RavenwoodRule mRavenwood = new RavenwoodRule();
+
+ @Rule
+ public final RuleChain chain = RuleChain.outerRule(mThrown).around(mRavenwood);
+
+ public RavenwoodTestMethodValidation_Fail02_Test() {
+ mThrown.expectMessage("Method tearDown() doesn't have @After");
+ }
+
+ @SuppressWarnings("JUnit4TearDownNotRun")
+ public void tearDown() {
+ }
+
+ @Test
+ public void testEmpty() {
+ }
+}
diff --git a/ravenwood/coretest/test/com/android/ravenwoodtest/coretest/methodvalidation/RavenwoodTestMethodValidation_Fail03_Test.java b/ravenwood/coretest/test/com/android/ravenwoodtest/coretest/methodvalidation/RavenwoodTestMethodValidation_Fail03_Test.java
new file mode 100644
index 000000000000..ec8e907dcdb3
--- /dev/null
+++ b/ravenwood/coretest/test/com/android/ravenwoodtest/coretest/methodvalidation/RavenwoodTestMethodValidation_Fail03_Test.java
@@ -0,0 +1,51 @@
+/*
+ * 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.ravenwoodtest.coretest.methodvalidation;
+
+import android.platform.test.ravenwood.RavenwoodRule;
+
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.junit.rules.RuleChain;
+import org.junit.runner.RunWith;
+
+/**
+ * RavenwoodRule has a validator to ensure "test-looking" methods have valid JUnit annotations.
+ * This class contains tests for this validator.
+ */
+@RunWith(AndroidJUnit4.class)
+public class RavenwoodTestMethodValidation_Fail03_Test {
+ private ExpectedException mThrown = ExpectedException.none();
+ private final RavenwoodRule mRavenwood = new RavenwoodRule();
+
+ @Rule
+ public final RuleChain chain = RuleChain.outerRule(mThrown).around(mRavenwood);
+
+ public RavenwoodTestMethodValidation_Fail03_Test() {
+ mThrown.expectMessage("Method testFoo() doesn't have @Test");
+ }
+
+ @SuppressWarnings("JUnit4TestNotRun")
+ public void testFoo() {
+ }
+
+ @Test
+ public void testEmpty() {
+ }
+}
diff --git a/ravenwood/coretest/test/com/android/ravenwoodtest/coretest/methodvalidation/RavenwoodTestMethodValidation_OkTest.java b/ravenwood/coretest/test/com/android/ravenwoodtest/coretest/methodvalidation/RavenwoodTestMethodValidation_OkTest.java
new file mode 100644
index 000000000000..d952d07b3817
--- /dev/null
+++ b/ravenwood/coretest/test/com/android/ravenwoodtest/coretest/methodvalidation/RavenwoodTestMethodValidation_OkTest.java
@@ -0,0 +1,56 @@
+/*
+ * 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.ravenwoodtest.coretest.methodvalidation;
+
+import android.platform.test.ravenwood.RavenwoodRule;
+
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * RavenwoodRule has a validator to ensure "test-looking" methods have valid JUnit annotations.
+ * This class contains tests for this validator.
+ */
+@RunWith(AndroidJUnit4.class)
+public class RavenwoodTestMethodValidation_OkTest {
+ @Rule
+ public final RavenwoodRule mRavenwood = new RavenwoodRule();
+
+ @Before
+ public void setUp() {
+ }
+
+ @Before
+ public void testSetUp() {
+ }
+
+ @After
+ public void tearDown() {
+ }
+
+ @After
+ public void testTearDown() {
+ }
+
+ @Test
+ public void testEmpty() {
+ }
+}
diff --git a/ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodRuleImpl.java b/ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodRuleImpl.java
index 49e793fcbddf..4357f2b8660a 100644
--- a/ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodRuleImpl.java
+++ b/ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodRuleImpl.java
@@ -33,14 +33,17 @@ import com.android.internal.os.RuntimeInit;
import com.android.server.LocalServices;
import org.junit.After;
+import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.Before;
+import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.Description;
import org.junit.runner.RunWith;
import org.junit.runners.model.Statement;
import java.io.PrintStream;
+import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
@@ -230,6 +233,18 @@ public class RavenwoodRuleImpl {
}
}
+ /**
+ * @return if a method has any of annotations.
+ */
+ private static boolean hasAnyAnnotations(Method m, Class<? extends Annotation>... annotations) {
+ for (var anno : annotations) {
+ if (m.getAnnotation(anno) != null) {
+ return true;
+ }
+ }
+ return false;
+ }
+
private static void validateTestAnnotations(Statement base, Description description,
boolean enableOptionalValidation) {
final var testClass = description.getTestClass();
@@ -239,13 +254,14 @@ public class RavenwoodRuleImpl {
boolean hasErrors = false;
for (Method m : collectMethods(testClass)) {
if (Modifier.isPublic(m.getModifiers()) && m.getName().startsWith("test")) {
- if (m.getAnnotation(Test.class) == null) {
+ if (!hasAnyAnnotations(m, Test.class, Before.class, After.class,
+ BeforeClass.class, AfterClass.class)) {
message.append("\nMethod " + m.getName() + "() doesn't have @Test");
hasErrors = true;
}
}
if ("setUp".equals(m.getName())) {
- if (m.getAnnotation(Before.class) == null) {
+ if (!hasAnyAnnotations(m, Before.class)) {
message.append("\nMethod " + m.getName() + "() doesn't have @Before");
hasErrors = true;
}
@@ -255,7 +271,7 @@ public class RavenwoodRuleImpl {
}
}
if ("tearDown".equals(m.getName())) {
- if (m.getAnnotation(After.class) == null) {
+ if (!hasAnyAnnotations(m, After.class)) {
message.append("\nMethod " + m.getName() + "() doesn't have @After");
hasErrors = true;
}
diff --git a/ravenwood/runtime-helper-src/libcore-fake/android/system/Os.java b/ravenwood/runtime-helper-src/libcore-fake/android/system/Os.java
index e031eb27513b..8a1fe62db4e1 100644
--- a/ravenwood/runtime-helper-src/libcore-fake/android/system/Os.java
+++ b/ravenwood/runtime-helper-src/libcore-fake/android/system/Os.java
@@ -30,7 +30,6 @@ public final class Os {
return RavenwoodRuntimeNative.lseek(fd, offset, whence);
}
-
public static FileDescriptor[] pipe2(int flags) throws ErrnoException {
return RavenwoodRuntimeNative.pipe2(flags);
}
@@ -42,4 +41,16 @@ public final class Os {
public static int fcntlInt(FileDescriptor fd, int cmd, int arg) throws ErrnoException {
return RavenwoodRuntimeNative.fcntlInt(fd, cmd, arg);
}
+
+ public static StructStat fstat(FileDescriptor fd) throws ErrnoException {
+ return RavenwoodRuntimeNative.fstat(fd);
+ }
+
+ public static StructStat lstat(String path) throws ErrnoException {
+ return RavenwoodRuntimeNative.lstat(path);
+ }
+
+ public static StructStat stat(String path) throws ErrnoException {
+ return RavenwoodRuntimeNative.stat(path);
+ }
}
diff --git a/ravenwood/runtime-helper-src/libcore-fake/android/system/StructStat.java b/ravenwood/runtime-helper-src/libcore-fake/android/system/StructStat.java
new file mode 100644
index 000000000000..a8b1fca464dd
--- /dev/null
+++ b/ravenwood/runtime-helper-src/libcore-fake/android/system/StructStat.java
@@ -0,0 +1,121 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.system;
+
+import libcore.util.Objects;
+
+/**
+ * File information returned by {@link Os#fstat}, {@link Os#lstat}, and {@link Os#stat}.
+ * Corresponds to C's {@code struct stat} from {@code <stat.h>}.
+ */
+public final class StructStat {
+ /** Device ID of device containing file. */
+ public final long st_dev; /*dev_t*/
+
+ /** File serial number (inode). */
+ public final long st_ino; /*ino_t*/
+
+ /** Mode (permissions) of file. */
+ public final int st_mode; /*mode_t*/
+
+ /** Number of hard links to the file. */
+ public final long st_nlink; /*nlink_t*/
+
+ /** User ID of file. */
+ public final int st_uid; /*uid_t*/
+
+ /** Group ID of file. */
+ public final int st_gid; /*gid_t*/
+
+ /** Device ID (if file is character or block special). */
+ public final long st_rdev; /*dev_t*/
+
+ /**
+ * For regular files, the file size in bytes.
+ * For symbolic links, the length in bytes of the pathname contained in the symbolic link.
+ * For a shared memory object, the length in bytes.
+ * For a typed memory object, the length in bytes.
+ * For other file types, the use of this field is unspecified.
+ */
+ public final long st_size; /*off_t*/
+
+ /** Seconds part of time of last access. */
+ public final long st_atime; /*time_t*/
+
+ /** StructTimespec with time of last access. */
+ public final StructTimespec st_atim;
+
+ /** Seconds part of time of last data modification. */
+ public final long st_mtime; /*time_t*/
+
+ /** StructTimespec with time of last modification. */
+ public final StructTimespec st_mtim;
+
+ /** Seconds part of time of last status change */
+ public final long st_ctime; /*time_t*/
+
+ /** StructTimespec with time of last status change. */
+ public final StructTimespec st_ctim;
+
+ /**
+ * A file system-specific preferred I/O block size for this object.
+ * For some file system types, this may vary from file to file.
+ */
+ public final long st_blksize; /*blksize_t*/
+
+ /** Number of blocks allocated for this object. */
+ public final long st_blocks; /*blkcnt_t*/
+
+ /**
+ * Constructs an instance with the given field values.
+ */
+ public StructStat(long st_dev, long st_ino, int st_mode, long st_nlink, int st_uid, int st_gid,
+ long st_rdev, long st_size, long st_atime, long st_mtime, long st_ctime,
+ long st_blksize, long st_blocks) {
+ this(st_dev, st_ino, st_mode, st_nlink, st_uid, st_gid,
+ st_rdev, st_size, new StructTimespec(st_atime, 0L), new StructTimespec(st_mtime, 0L),
+ new StructTimespec(st_ctime, 0L), st_blksize, st_blocks);
+ }
+
+ /**
+ * Constructs an instance with the given field values.
+ */
+ public StructStat(long st_dev, long st_ino, int st_mode, long st_nlink, int st_uid, int st_gid,
+ long st_rdev, long st_size, StructTimespec st_atim, StructTimespec st_mtim,
+ StructTimespec st_ctim, long st_blksize, long st_blocks) {
+ this.st_dev = st_dev;
+ this.st_ino = st_ino;
+ this.st_mode = st_mode;
+ this.st_nlink = st_nlink;
+ this.st_uid = st_uid;
+ this.st_gid = st_gid;
+ this.st_rdev = st_rdev;
+ this.st_size = st_size;
+ this.st_atime = st_atim.tv_sec;
+ this.st_mtime = st_mtim.tv_sec;
+ this.st_ctime = st_ctim.tv_sec;
+ this.st_atim = st_atim;
+ this.st_mtim = st_mtim;
+ this.st_ctim = st_ctim;
+ this.st_blksize = st_blksize;
+ this.st_blocks = st_blocks;
+ }
+
+ @Override public String toString() {
+ return Objects.toString(this);
+ }
+}
diff --git a/ravenwood/runtime-helper-src/libcore-fake/android/system/StructTimespec.java b/ravenwood/runtime-helper-src/libcore-fake/android/system/StructTimespec.java
new file mode 100644
index 000000000000..c10678057eeb
--- /dev/null
+++ b/ravenwood/runtime-helper-src/libcore-fake/android/system/StructTimespec.java
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.system;
+
+import libcore.util.Objects;;
+
+/**
+ * Corresponds to C's {@code struct timespec} from {@code <time.h>}.
+ */
+public final class StructTimespec implements Comparable<StructTimespec> {
+ /** Seconds part of time of last data modification. */
+ public final long tv_sec; /*time_t*/
+
+ /** Nanoseconds (values are [0, 999999999]). */
+ public final long tv_nsec;
+
+ public StructTimespec(long tv_sec, long tv_nsec) {
+ this.tv_sec = tv_sec;
+ this.tv_nsec = tv_nsec;
+ if (tv_nsec < 0 || tv_nsec > 999_999_999) {
+ throw new IllegalArgumentException(
+ "tv_nsec value " + tv_nsec + " is not in [0, 999999999]");
+ }
+ }
+
+ @Override
+ public int compareTo(StructTimespec other) {
+ if (tv_sec > other.tv_sec) {
+ return 1;
+ }
+ if (tv_sec < other.tv_sec) {
+ return -1;
+ }
+ if (tv_nsec > other.tv_nsec) {
+ return 1;
+ }
+ if (tv_nsec < other.tv_nsec) {
+ return -1;
+ }
+ return 0;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ StructTimespec that = (StructTimespec) o;
+
+ if (tv_sec != that.tv_sec) return false;
+ return tv_nsec == that.tv_nsec;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = (int) (tv_sec ^ (tv_sec >>> 32));
+ result = 31 * result + (int) (tv_nsec ^ (tv_nsec >>> 32));
+ return result;
+ }
+
+ @Override
+ public String toString() {
+ return Objects.toString(this);
+ }
+}
diff --git a/ravenwood/runtime-common-src/com/android/ravenwood/common/RavenwoodRuntimeNative.java b/ravenwood/runtime-helper-src/libcore-fake/com/android/ravenwood/common/RavenwoodRuntimeNative.java
index 65402219ebee..e9b305e5d789 100644
--- a/ravenwood/runtime-common-src/com/android/ravenwood/common/RavenwoodRuntimeNative.java
+++ b/ravenwood/runtime-helper-src/libcore-fake/com/android/ravenwood/common/RavenwoodRuntimeNative.java
@@ -15,6 +15,9 @@
*/
package com.android.ravenwood.common;
+import android.system.ErrnoException;
+import android.system.StructStat;
+
import java.io.FileDescriptor;
/**
@@ -31,19 +34,25 @@ public class RavenwoodRuntimeNative {
public static native void applyFreeFunction(long freeFunction, long nativePtr);
- public static native long nLseek(int fd, long offset, int whence);
+ private static native long nLseek(int fd, long offset, int whence) throws ErrnoException;
+
+ private static native int[] nPipe2(int flags) throws ErrnoException;
+
+ private static native int nDup(int oldfd) throws ErrnoException;
+
+ private static native int nFcntlInt(int fd, int cmd, int arg) throws ErrnoException;
- public static native int[] nPipe2(int flags);
+ private static native StructStat nFstat(int fd) throws ErrnoException;
- public static native int nDup(int oldfd);
+ public static native StructStat lstat(String path) throws ErrnoException;
- public static native int nFcntlInt(int fd, int cmd, int arg);
+ public static native StructStat stat(String path) throws ErrnoException;
- public static long lseek(FileDescriptor fd, long offset, int whence) {
+ public static long lseek(FileDescriptor fd, long offset, int whence) throws ErrnoException {
return nLseek(JvmWorkaround.getInstance().getFdInt(fd), offset, whence);
}
- public static FileDescriptor[] pipe2(int flags) {
+ public static FileDescriptor[] pipe2(int flags) throws ErrnoException {
var fds = nPipe2(flags);
var ret = new FileDescriptor[] {
new FileDescriptor(),
@@ -55,7 +64,7 @@ public class RavenwoodRuntimeNative {
return ret;
}
- public static FileDescriptor dup(FileDescriptor fd) {
+ public static FileDescriptor dup(FileDescriptor fd) throws ErrnoException {
var fdInt = nDup(JvmWorkaround.getInstance().getFdInt(fd));
var retFd = new java.io.FileDescriptor();
@@ -63,9 +72,15 @@ public class RavenwoodRuntimeNative {
return retFd;
}
- public static int fcntlInt(FileDescriptor fd, int cmd, int arg) {
+ public static int fcntlInt(FileDescriptor fd, int cmd, int arg) throws ErrnoException {
var fdInt = JvmWorkaround.getInstance().getFdInt(fd);
return nFcntlInt(fdInt, cmd, arg);
}
+
+ public static StructStat fstat(FileDescriptor fd) throws ErrnoException {
+ var fdInt = JvmWorkaround.getInstance().getFdInt(fd);
+
+ return nFstat(fdInt);
+ }
}
diff --git a/ravenwood/runtime-helper-src/libcore-fake/libcore/util/Objects.java b/ravenwood/runtime-helper-src/libcore-fake/libcore/util/Objects.java
new file mode 100644
index 000000000000..3781fcf4e891
--- /dev/null
+++ b/ravenwood/runtime-helper-src/libcore-fake/libcore/util/Objects.java
@@ -0,0 +1,85 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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 libcore.util;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.util.Arrays;
+
+public final class Objects {
+ private Objects() {}
+
+ /**
+ * Returns a string reporting the value of each declared field, via reflection.
+ * Static and transient fields are automatically skipped. Produces output like
+ * "SimpleClassName[integer=1234,string="hello",character='c',intArray=[1,2,3]]".
+ */
+ public static String toString(Object o) {
+ Class<?> c = o.getClass();
+ StringBuilder sb = new StringBuilder();
+ sb.append(c.getSimpleName()).append('[');
+ int i = 0;
+ for (Field f : c.getDeclaredFields()) {
+ if ((f.getModifiers() & (Modifier.STATIC | Modifier.TRANSIENT)) != 0) {
+ continue;
+ }
+ f.setAccessible(true);
+ try {
+ Object value = f.get(o);
+
+ if (i++ > 0) {
+ sb.append(',');
+ }
+
+ sb.append(f.getName());
+ sb.append('=');
+
+ if (value.getClass().isArray()) {
+ if (value.getClass() == boolean[].class) {
+ sb.append(Arrays.toString((boolean[]) value));
+ } else if (value.getClass() == byte[].class) {
+ sb.append(Arrays.toString((byte[]) value));
+ } else if (value.getClass() == char[].class) {
+ sb.append(Arrays.toString((char[]) value));
+ } else if (value.getClass() == double[].class) {
+ sb.append(Arrays.toString((double[]) value));
+ } else if (value.getClass() == float[].class) {
+ sb.append(Arrays.toString((float[]) value));
+ } else if (value.getClass() == int[].class) {
+ sb.append(Arrays.toString((int[]) value));
+ } else if (value.getClass() == long[].class) {
+ sb.append(Arrays.toString((long[]) value));
+ } else if (value.getClass() == short[].class) {
+ sb.append(Arrays.toString((short[]) value));
+ } else {
+ sb.append(Arrays.toString((Object[]) value));
+ }
+ } else if (value.getClass() == Character.class) {
+ sb.append('\'').append(value).append('\'');
+ } else if (value.getClass() == String.class) {
+ sb.append('"').append(value).append('"');
+ } else {
+ sb.append(value);
+ }
+ } catch (IllegalAccessException unexpected) {
+ throw new AssertionError(unexpected);
+ }
+ }
+ sb.append("]");
+ return sb.toString();
+ }
+}
diff --git a/ravenwood/runtime-jni/ravenwood_runtime.cpp b/ravenwood/runtime-jni/ravenwood_runtime.cpp
index 34cf9f915677..e0a3e1c9edf6 100644
--- a/ravenwood/runtime-jni/ravenwood_runtime.cpp
+++ b/ravenwood/runtime-jni/ravenwood_runtime.cpp
@@ -19,6 +19,9 @@
#include <string.h>
#include <unistd.h>
#include <nativehelper/JNIHelp.h>
+#include <nativehelper/ScopedLocalRef.h>
+#include <nativehelper/ScopedUtfChars.h>
+
#include "jni.h"
#include "utils/Log.h"
#include "utils/misc.h"
@@ -41,6 +44,75 @@ static rc_t throwIfMinusOne(JNIEnv* env, const char* name, rc_t rc) {
return rc;
}
+// ---- Helper functions ---
+
+static jclass g_StructStat;
+static jclass g_StructTimespecClass;
+
+static jclass findClass(JNIEnv* env, const char* name) {
+ ScopedLocalRef<jclass> localClass(env, env->FindClass(name));
+ jclass result = reinterpret_cast<jclass>(env->NewGlobalRef(localClass.get()));
+ if (result == NULL) {
+ ALOGE("failed to find class '%s'", name);
+ abort();
+ }
+ return result;
+}
+
+static jobject makeStructTimespec(JNIEnv* env, const struct timespec& ts) {
+ static jmethodID ctor = env->GetMethodID(g_StructTimespecClass, "<init>",
+ "(JJ)V");
+ if (ctor == NULL) {
+ return NULL;
+ }
+ return env->NewObject(g_StructTimespecClass, ctor,
+ static_cast<jlong>(ts.tv_sec), static_cast<jlong>(ts.tv_nsec));
+}
+
+static jobject makeStructStat(JNIEnv* env, const struct stat64& sb) {
+ static jmethodID ctor = env->GetMethodID(g_StructStat, "<init>",
+ "(JJIJIIJJLandroid/system/StructTimespec;Landroid/system/StructTimespec;Landroid/system/StructTimespec;JJ)V");
+ if (ctor == NULL) {
+ return NULL;
+ }
+
+ jobject atim_timespec = makeStructTimespec(env, sb.st_atim);
+ if (atim_timespec == NULL) {
+ return NULL;
+ }
+ jobject mtim_timespec = makeStructTimespec(env, sb.st_mtim);
+ if (mtim_timespec == NULL) {
+ return NULL;
+ }
+ jobject ctim_timespec = makeStructTimespec(env, sb.st_ctim);
+ if (ctim_timespec == NULL) {
+ return NULL;
+ }
+
+ return env->NewObject(g_StructStat, ctor,
+ static_cast<jlong>(sb.st_dev), static_cast<jlong>(sb.st_ino),
+ static_cast<jint>(sb.st_mode), static_cast<jlong>(sb.st_nlink),
+ static_cast<jint>(sb.st_uid), static_cast<jint>(sb.st_gid),
+ static_cast<jlong>(sb.st_rdev), static_cast<jlong>(sb.st_size),
+ atim_timespec, mtim_timespec, ctim_timespec,
+ static_cast<jlong>(sb.st_blksize), static_cast<jlong>(sb.st_blocks));
+}
+
+static jobject doStat(JNIEnv* env, jstring javaPath, bool isLstat) {
+ ScopedUtfChars path(env, javaPath);
+ if (path.c_str() == NULL) {
+ return NULL;
+ }
+ struct stat64 sb;
+ int rc = isLstat ? TEMP_FAILURE_RETRY(lstat64(path.c_str(), &sb))
+ : TEMP_FAILURE_RETRY(stat64(path.c_str(), &sb));
+ if (rc == -1) {
+ throwErrnoException(env, isLstat ? "lstat" : "stat");
+ return NULL;
+ }
+ return makeStructStat(env, sb);
+}
+
// ---- JNI methods ----
typedef void (*FreeFunction)(void*);
@@ -77,6 +149,24 @@ static jlong nDup(JNIEnv* env, jclass, jint fd) {
return throwIfMinusOne(env, "fcntl", TEMP_FAILURE_RETRY(fcntl(fd, F_DUPFD_CLOEXEC, 0)));
}
+static jobject nFstat(JNIEnv* env, jobject, jint fd) {
+ struct stat64 sb;
+ int rc = TEMP_FAILURE_RETRY(fstat64(fd, &sb));
+ if (rc == -1) {
+ throwErrnoException(env, "fstat");
+ return NULL;
+ }
+ return makeStructStat(env, sb);
+}
+
+static jobject Linux_lstat(JNIEnv* env, jobject, jstring javaPath) {
+ return doStat(env, javaPath, true);
+}
+
+static jobject Linux_stat(JNIEnv* env, jobject, jstring javaPath) {
+ return doStat(env, javaPath, false);
+}
+
// ---- Registration ----
static const JNINativeMethod sMethods[] =
@@ -86,6 +176,9 @@ static const JNINativeMethod sMethods[] =
{ "nLseek", "(IJI)J", (void*)nLseek },
{ "nPipe2", "(I)[I", (void*)nPipe2 },
{ "nDup", "(I)I", (void*)nDup },
+ { "nFstat", "(I)Landroid/system/StructStat;", (void*)nFstat },
+ { "lstat", "(Ljava/lang/String;)Landroid/system/StructStat;", (void*)Linux_lstat },
+ { "stat", "(Ljava/lang/String;)Landroid/system/StructStat;", (void*)Linux_stat },
};
extern "C" jint JNI_OnLoad(JavaVM* vm, void* /* reserved */)
@@ -101,6 +194,9 @@ extern "C" jint JNI_OnLoad(JavaVM* vm, void* /* reserved */)
ALOGI("%s: JNI_OnLoad", __FILE__);
+ g_StructStat = findClass(env, "android/system/StructStat");
+ g_StructTimespecClass = findClass(env, "android/system/StructTimespec");
+
jint res = jniRegisterNativeMethods(env, "com/android/ravenwood/common/RavenwoodRuntimeNative",
sMethods, NELEM(sMethods));
if (res < 0) {
diff --git a/ravenwood/runtime-test/test/com/android/ravenwood/runtimetest/OsTest.java b/ravenwood/runtime-test/test/com/android/ravenwood/runtimetest/OsTest.java
index b5038e68516d..05275b29e48b 100644
--- a/ravenwood/runtime-test/test/com/android/ravenwood/runtimetest/OsTest.java
+++ b/ravenwood/runtime-test/test/com/android/ravenwood/runtimetest/OsTest.java
@@ -15,15 +15,26 @@
*/
package com.android.ravenwood.runtimetest;
+import static android.system.OsConstants.S_ISBLK;
+import static android.system.OsConstants.S_ISCHR;
+import static android.system.OsConstants.S_ISDIR;
+import static android.system.OsConstants.S_ISFIFO;
+import static android.system.OsConstants.S_ISLNK;
+import static android.system.OsConstants.S_ISREG;
+import static android.system.OsConstants.S_ISSOCK;
+
import static org.junit.Assert.assertEquals;
+import static java.nio.file.LinkOption.NOFOLLOW_LINKS;
+
import android.system.Os;
import android.system.OsConstants;
+import android.system.StructStat;
+import android.system.StructTimespec;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import com.android.ravenwood.common.JvmWorkaround;
-import com.android.ravenwood.common.RavenwoodRuntimeNative;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -32,8 +43,15 @@ import java.io.File;
import java.io.FileDescriptor;
import java.io.FileInputStream;
import java.io.FileOutputStream;
-import java.io.IOException;
import java.io.RandomAccessFile;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.attribute.FileTime;
+import java.nio.file.attribute.PosixFileAttributes;
+import java.nio.file.attribute.PosixFilePermission;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.concurrent.TimeUnit;
@RunWith(AndroidJUnit4.class)
public class OsTest {
@@ -41,7 +59,7 @@ public class OsTest {
void accept(T var1) throws Exception;
}
- private void withTestFile(ConsumerWithThrow<FileDescriptor> consumer) throws Exception {
+ private void withTestFileFD(ConsumerWithThrow<FileDescriptor> consumer) throws Exception {
File file = File.createTempFile("osTest", "bin");
try (var raf = new RandomAccessFile(file, "rw")) {
var fd = raf.getFD();
@@ -57,9 +75,20 @@ public class OsTest {
}
}
+ private void withTestFile(ConsumerWithThrow<Path> consumer) throws Exception {
+ var path = Files.createTempFile("osTest", "bin");
+ try (var os = Files.newOutputStream(path)) {
+ os.write(1);
+ os.write(2);
+ os.write(3);
+ os.write(4);
+ }
+ consumer.accept(path);
+ }
+
@Test
public void testLseek() throws Exception {
- withTestFile((fd) -> {
+ withTestFileFD((fd) -> {
assertEquals(4, Os.lseek(fd, 4, OsConstants.SEEK_SET));
assertEquals(4, Os.lseek(fd, 0, OsConstants.SEEK_CUR));
assertEquals(6, Os.lseek(fd, 2, OsConstants.SEEK_CUR));
@@ -68,7 +97,7 @@ public class OsTest {
@Test
public void testDup() throws Exception {
- withTestFile((fd) -> {
+ withTestFileFD((fd) -> {
var dup = Os.dup(fd);
checkAreDup(fd, dup);
@@ -85,7 +114,7 @@ public class OsTest {
@Test
public void testFcntlInt() throws Exception {
- withTestFile((fd) -> {
+ withTestFileFD((fd) -> {
var dupInt = Os.fcntlInt(fd, 0, 0);
var dup = new FileDescriptor();
@@ -95,16 +124,90 @@ public class OsTest {
});
}
- private static void write(FileDescriptor fd, int oneByte) throws IOException {
+ @Test
+ public void testStat() throws Exception {
+ withTestFile(path -> {
+ var attr = Files.readAttributes(path, PosixFileAttributes.class);
+ var stat = Os.stat(path.toAbsolutePath().toString());
+ assertAttributesEqual(attr, stat);
+ });
+ }
+
+ @Test
+ public void testLstat() throws Exception {
+ withTestFile(path -> {
+ // Create a symbolic link
+ var lnk = Files.createTempFile("osTest", "lnk");
+ Files.delete(lnk);
+ Files.createSymbolicLink(lnk, path);
+
+ // Test lstat
+ var attr = Files.readAttributes(lnk, PosixFileAttributes.class, NOFOLLOW_LINKS);
+ var stat = Os.lstat(lnk.toAbsolutePath().toString());
+ assertAttributesEqual(attr, stat);
+
+ // Test stat
+ var followAttr = Files.readAttributes(lnk, PosixFileAttributes.class);
+ var followStat = Os.stat(lnk.toAbsolutePath().toString());
+ assertAttributesEqual(followAttr, followStat);
+ });
+ }
+
+ @Test
+ public void testFstat() throws Exception {
+ withTestFile(path -> {
+ var attr = Files.readAttributes(path, PosixFileAttributes.class);
+ try (var raf = new RandomAccessFile(path.toFile(), "r")) {
+ var fd = raf.getFD();
+ var stat = Os.fstat(fd);
+ assertAttributesEqual(attr, stat);
+ }
+ });
+ }
+
+ // Verify StructStat values from libcore against native JVM PosixFileAttributes
+ private static void assertAttributesEqual(PosixFileAttributes attr, StructStat stat) {
+ assertEquals(attr.lastModifiedTime(), convertTimespecToFileTime(stat.st_mtim));
+ assertEquals(attr.size(), stat.st_size);
+ assertEquals(attr.isDirectory(), S_ISDIR(stat.st_mode));
+ assertEquals(attr.isRegularFile(), S_ISREG(stat.st_mode));
+ assertEquals(attr.isSymbolicLink(), S_ISLNK(stat.st_mode));
+ assertEquals(attr.isOther(), S_ISCHR(stat.st_mode)
+ || S_ISBLK(stat.st_mode) || S_ISFIFO(stat.st_mode) || S_ISSOCK(stat.st_mode));
+ assertEquals(attr.permissions(), convertModeToPosixPerms(stat.st_mode));
+
+ }
+
+ private static FileTime convertTimespecToFileTime(StructTimespec ts) {
+ var nanos = TimeUnit.SECONDS.toNanos(ts.tv_sec);
+ nanos += ts.tv_nsec;
+ return FileTime.from(nanos, TimeUnit.NANOSECONDS);
+ }
+
+ private static Set<PosixFilePermission> convertModeToPosixPerms(int mode) {
+ var set = new HashSet<PosixFilePermission>();
+ if ((mode & OsConstants.S_IRUSR) != 0) set.add(PosixFilePermission.OWNER_READ);
+ if ((mode & OsConstants.S_IWUSR) != 0) set.add(PosixFilePermission.OWNER_WRITE);
+ if ((mode & OsConstants.S_IXUSR) != 0) set.add(PosixFilePermission.OWNER_EXECUTE);
+ if ((mode & OsConstants.S_IRGRP) != 0) set.add(PosixFilePermission.GROUP_READ);
+ if ((mode & OsConstants.S_IWGRP) != 0) set.add(PosixFilePermission.GROUP_WRITE);
+ if ((mode & OsConstants.S_IXGRP) != 0) set.add(PosixFilePermission.GROUP_EXECUTE);
+ if ((mode & OsConstants.S_IROTH) != 0) set.add(PosixFilePermission.OTHERS_READ);
+ if ((mode & OsConstants.S_IWOTH) != 0) set.add(PosixFilePermission.OTHERS_WRITE);
+ if ((mode & OsConstants.S_IXOTH) != 0) set.add(PosixFilePermission.OTHERS_EXECUTE);
+ return set;
+ }
+
+ private static void write(FileDescriptor fd, int oneByte) throws Exception {
// Create a dup to avoid closing the FD.
- try (var dup = new FileOutputStream(RavenwoodRuntimeNative.dup(fd))) {
+ try (var dup = new FileOutputStream(Os.dup(fd))) {
dup.write(oneByte);
}
}
- private static int read(FileDescriptor fd) throws IOException {
+ private static int read(FileDescriptor fd) throws Exception {
// Create a dup to avoid closing the FD.
- try (var dup = new FileInputStream(RavenwoodRuntimeNative.dup(fd))) {
+ try (var dup = new FileInputStream(Os.dup(fd))) {
return dup.read();
}
}
diff --git a/services/Android.bp b/services/Android.bp
index cd974c5f562d..dce6aa71daea 100644
--- a/services/Android.bp
+++ b/services/Android.bp
@@ -186,7 +186,15 @@ art_profile_java_defaults {
// merge all required services into one jar
// ============================================================
-java_library {
+soong_config_module_type {
+ name: "system_java_library",
+ module_type: "java_library",
+ config_namespace: "system_services",
+ bool_variables: ["without_vibrator"],
+ properties: ["vintf_fragments"],
+}
+
+system_java_library {
name: "services",
defaults: [
"services_java_defaults",
@@ -248,9 +256,19 @@ java_library {
"service-sdksandbox.stubs.system_server",
],
- vintf_fragments: [
- "manifest_services.xml",
- ],
+ soong_config_variables: {
+ without_vibrator: {
+ vintf_fragments: [
+ "manifest_services.xml",
+ ],
+ conditions_default: {
+ vintf_fragments: [
+ "manifest_services.xml",
+ "manifest_services_android.frameworks.vibrator.xml",
+ ],
+ },
+ },
+ },
required: [
"libukey2_jni_shared",
diff --git a/services/accessibility/Android.bp b/services/accessibility/Android.bp
index 7a99b605c4fb..311addb90298 100644
--- a/services/accessibility/Android.bp
+++ b/services/accessibility/Android.bp
@@ -29,10 +29,12 @@ java_library_static {
"//frameworks/base/packages/SettingsLib/RestrictedLockUtils:SettingsLibRestrictedLockUtilsSrc",
],
libs: [
+ "aatf",
"services.core",
"androidx.annotation_annotation",
],
static_libs: [
+ "a11ychecker-protos-java-proto-lite",
"com_android_server_accessibility_flags_lib",
"//frameworks/base/packages/SystemUI/aconfig:com_android_systemui_flags_lib",
@@ -68,3 +70,14 @@ java_aconfig_library {
name: "com_android_server_accessibility_flags_lib",
aconfig_declarations: "com_android_server_accessibility_flags",
}
+
+java_library_static {
+ name: "a11ychecker-protos-java-proto-lite",
+ proto: {
+ type: "lite",
+ canonical_path_from_root: false,
+ },
+ srcs: [
+ "java/**/a11ychecker/proto/*.proto",
+ ],
+}
diff --git a/services/accessibility/accessibility.aconfig b/services/accessibility/accessibility.aconfig
index b4efae3a05e4..8e2e0ad76d15 100644
--- a/services/accessibility/accessibility.aconfig
+++ b/services/accessibility/accessibility.aconfig
@@ -114,6 +114,13 @@ flag {
}
flag {
+ name: "enable_magnification_follows_mouse"
+ namespace: "accessibility"
+ description: "Whether to enable mouse following for fullscreen magnification"
+ bug: "335494097"
+}
+
+flag {
name: "fix_drag_pointer_when_ending_drag"
namespace: "accessibility"
description: "Send the correct pointer id when transitioning from dragging to delegating states."
diff --git a/services/accessibility/java/com/android/server/accessibility/AccessibilityInputFilter.java b/services/accessibility/java/com/android/server/accessibility/AccessibilityInputFilter.java
index d3efa21a2311..099cb2894515 100644
--- a/services/accessibility/java/com/android/server/accessibility/AccessibilityInputFilter.java
+++ b/services/accessibility/java/com/android/server/accessibility/AccessibilityInputFilter.java
@@ -26,6 +26,7 @@ import android.annotation.MainThread;
import android.annotation.NonNull;
import android.content.Context;
import android.graphics.Region;
+import android.os.Looper;
import android.os.PowerManager;
import android.os.SystemClock;
import android.provider.Settings;
@@ -158,6 +159,13 @@ class AccessibilityInputFilter extends InputFilter implements EventStreamTransfo
*/
static final int FLAG_FEATURE_MAGNIFICATION_TWO_FINGER_TRIPLE_TAP = 0x00001000;
+ /**
+ * Flag for enabling the Accessibility mouse key events feature.
+ *
+ * @see #setUserAndEnabledFeatures(int, int)
+ */
+ static final int FLAG_FEATURE_MOUSE_KEYS = 0x00002000;
+
static final int FEATURES_AFFECTING_MOTION_EVENTS =
FLAG_FEATURE_INJECT_MOTION_EVENTS
| FLAG_FEATURE_AUTOCLICK
@@ -189,6 +197,8 @@ class AccessibilityInputFilter extends InputFilter implements EventStreamTransfo
private KeyboardInterceptor mKeyboardInterceptor;
+ private MouseKeysInterceptor mMouseKeysInterceptor;
+
private boolean mInstalled;
private int mUserId;
@@ -733,6 +743,13 @@ class AccessibilityInputFilter extends InputFilter implements EventStreamTransfo
// default display.
addFirstEventHandler(Display.DEFAULT_DISPLAY, mKeyboardInterceptor);
}
+
+ if ((mEnabledFeatures & FLAG_FEATURE_MOUSE_KEYS) != 0) {
+ mMouseKeysInterceptor = new MouseKeysInterceptor(mAms,
+ Looper.myLooper(),
+ Display.DEFAULT_DISPLAY);
+ addFirstEventHandler(Display.DEFAULT_DISPLAY, mMouseKeysInterceptor);
+ }
}
/**
@@ -816,6 +833,11 @@ class AccessibilityInputFilter extends InputFilter implements EventStreamTransfo
mKeyboardInterceptor.onDestroy();
mKeyboardInterceptor = null;
}
+
+ if (mMouseKeysInterceptor != null) {
+ mMouseKeysInterceptor.onDestroy();
+ mMouseKeysInterceptor = null;
+ }
}
private MagnificationGestureHandler createMagnificationGestureHandler(
diff --git a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
index 32491b7eb0e0..30c743e508b6 100644
--- a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
+++ b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
@@ -57,6 +57,7 @@ import static com.android.internal.accessibility.util.AccessibilityStatsLogUtils
import static com.android.internal.util.FunctionalUtils.ignoreRemoteException;
import static com.android.internal.util.function.pooled.PooledLambda.obtainMessage;
import static com.android.server.accessibility.AccessibilityUserState.doesShortcutTargetsStringContain;
+import static com.android.hardware.input.Flags.keyboardA11yMouseKeys;
import static com.android.settingslib.RestrictedLockUtils.EnforcedAdmin;
import android.accessibilityservice.AccessibilityGestureEvent;
@@ -160,6 +161,7 @@ import android.view.inputmethod.EditorInfo;
import com.android.internal.R;
import com.android.internal.accessibility.AccessibilityShortcutController;
+import com.android.internal.accessibility.AccessibilityShortcutController.ExtraDimFrameworkFeatureInfo;
import com.android.internal.accessibility.AccessibilityShortcutController.FrameworkFeatureInfo;
import com.android.internal.accessibility.AccessibilityShortcutController.LaunchableFrameworkFeatureInfo;
import com.android.internal.accessibility.common.ShortcutConstants;
@@ -2936,6 +2938,9 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub
if (combinedGenericMotionEventSources != 0) {
flags |= AccessibilityInputFilter.FLAG_FEATURE_INTERCEPT_GENERIC_MOTION_EVENTS;
}
+ if (userState.isMouseKeysEnabled()) {
+ flags |= AccessibilityInputFilter.FLAG_FEATURE_MOUSE_KEYS;
+ }
if (flags != 0) {
if (!mHasInputFilter) {
mHasInputFilter = true;
@@ -3216,6 +3221,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub
somethingChanged |= readMagnificationCapabilitiesLocked(userState);
somethingChanged |= readMagnificationFollowTypingLocked(userState);
somethingChanged |= readAlwaysOnMagnificationLocked(userState);
+ somethingChanged |= readMouseKeysEnabledLocked(userState);
return somethingChanged;
}
@@ -3905,6 +3911,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub
Slog.d(LOG_TAG, "Perform shortcut failed, invalid target name:" + targetName);
return;
}
+
// In case user assigned an accessibility framework feature to the given shortcut.
if (performAccessibilityFrameworkFeature(displayId, targetComponentName, shortcutType)) {
return;
@@ -3928,6 +3935,10 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub
if (!frameworkFeatureMap.containsKey(assignedTarget)) {
return false;
}
+ final int userId;
+ synchronized (mLock) {
+ userId = mCurrentUserId;
+ }
final FrameworkFeatureInfo featureInfo = frameworkFeatureMap.get(assignedTarget);
final SettingStringHelper setting = new SettingStringHelper(mContext.getContentResolver(),
featureInfo.getSettingKey(), mCurrentUserId);
@@ -3939,6 +3950,15 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub
return true;
}
+ if (featureInfo instanceof ExtraDimFrameworkFeatureInfo) {
+ boolean serviceEnabled =
+ ((ExtraDimFrameworkFeatureInfo) featureInfo)
+ .activateShortcut(mContext, userId);
+ logAccessibilityShortcutActivated(mContext, assignedTarget, shortcutType,
+ serviceEnabled);
+ return true;
+ }
+
// Assuming that the default state will be to have the feature off
if (!TextUtils.equals(featureInfo.getSettingOnValue(), setting.read())) {
logAccessibilityShortcutActivated(mContext, assignedTarget, shortcutType,
@@ -5476,6 +5496,9 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub
private final Uri mAlwaysOnMagnificationUri = Settings.Secure.getUriFor(
Settings.Secure.ACCESSIBILITY_MAGNIFICATION_ALWAYS_ON_ENABLED);
+ private final Uri mMouseKeysUri = Settings.Secure.getUriFor(
+ Settings.Secure.ACCESSIBILITY_MOUSE_KEYS_ENABLED);
+
public AccessibilityContentObserver(Handler handler) {
super(handler);
}
@@ -5524,6 +5547,8 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub
mMagnificationFollowTypingUri, false, this, UserHandle.USER_ALL);
contentResolver.registerContentObserver(
mAlwaysOnMagnificationUri, false, this, UserHandle.USER_ALL);
+ contentResolver.registerContentObserver(
+ mMouseKeysUri, false, this, UserHandle.USER_ALL);
}
@Override
@@ -5604,6 +5629,10 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub
readMagnificationFollowTypingLocked(userState);
} else if (mAlwaysOnMagnificationUri.equals(uri)) {
readAlwaysOnMagnificationLocked(userState);
+ } else if (mMouseKeysUri.equals(uri)) {
+ if (readMouseKeysEnabledLocked(userState)) {
+ onUserStateChangedLocked(userState);
+ }
}
}
}
@@ -5742,6 +5771,20 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub
return false;
}
+ boolean readMouseKeysEnabledLocked(AccessibilityUserState userState) {
+ if (!keyboardA11yMouseKeys()) {
+ return false;
+ }
+ final boolean isMouseKeysEnabled =
+ Settings.Secure.getIntForUser(mContext.getContentResolver(),
+ Settings.Secure.ACCESSIBILITY_MOUSE_KEYS_ENABLED, 0, userState.mUserId) == 1;
+ if (isMouseKeysEnabled != userState.isMouseKeysEnabled()) {
+ userState.setMouseKeysEnabled(isMouseKeysEnabled);
+ return true;
+ }
+ return false;
+ }
+
@Override
public void setGestureDetectionPassthroughRegion(int displayId, Region region) {
mMainHandler.sendMessage(
diff --git a/services/accessibility/java/com/android/server/accessibility/AccessibilityUserState.java b/services/accessibility/java/com/android/server/accessibility/AccessibilityUserState.java
index 7bcbc2768a16..3706dccbb717 100644
--- a/services/accessibility/java/com/android/server/accessibility/AccessibilityUserState.java
+++ b/services/accessibility/java/com/android/server/accessibility/AccessibilityUserState.java
@@ -169,6 +169,8 @@ class AccessibilityUserState {
private final int mFocusStrokeWidthDefaultValue;
// The default value of the focus color.
private final int mFocusColorDefaultValue;
+ /** Whether mouse keys feature is enabled. */
+ private boolean mMouseKeysEnabled = false;
private final Map<ComponentName, ComponentName> mA11yServiceToTileService = new ArrayMap<>();
private final Map<ComponentName, ComponentName> mA11yActivityToTileService = new ArrayMap<>();
@@ -232,6 +234,8 @@ class AccessibilityUserState {
mAccessibilityShortcutKeyTargets.clear();
mAccessibilityButtonTargets.clear();
mAccessibilityGestureTargets.clear();
+ mAccessibilityQsTargets.clear();
+ mA11yTilesInQsPanel.clear();
mTargetAssignedToAccessibilityButton = null;
mIsTouchExplorationEnabled = false;
mServiceHandlesDoubleTap = false;
@@ -674,6 +678,14 @@ class AccessibilityUserState {
mIsFilterKeyEventsEnabled = enabled;
}
+ public void setMouseKeysEnabled(boolean enabled) {
+ mMouseKeysEnabled = enabled;
+ }
+
+ public boolean isMouseKeysEnabled() {
+ return mMouseKeysEnabled;
+ }
+
public int getInteractiveUiTimeoutLocked() {
return mInteractiveUiTimeout;
}
diff --git a/services/accessibility/java/com/android/server/accessibility/FlashNotificationsController.java b/services/accessibility/java/com/android/server/accessibility/FlashNotificationsController.java
index e6055148867d..2009cd3d4527 100644
--- a/services/accessibility/java/com/android/server/accessibility/FlashNotificationsController.java
+++ b/services/accessibility/java/com/android/server/accessibility/FlashNotificationsController.java
@@ -659,6 +659,8 @@ class FlashNotificationsController {
mIsTorchTouched = on;
} catch (CameraAccessException e) {
Log.e(LOG_TAG, "Failed to setTorchMode: " + e);
+ } catch (IllegalArgumentException e) {
+ Log.e(LOG_TAG, "Failed to setTorchMode: " + e);
}
} else {
Log.e(LOG_TAG, "Can not use camera flash notification, please check CameraManager!");
diff --git a/services/accessibility/java/com/android/server/accessibility/MouseKeysInterceptor.java b/services/accessibility/java/com/android/server/accessibility/MouseKeysInterceptor.java
new file mode 100644
index 000000000000..56da231ad31a
--- /dev/null
+++ b/services/accessibility/java/com/android/server/accessibility/MouseKeysInterceptor.java
@@ -0,0 +1,499 @@
+/*
+ * 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.server.accessibility;
+
+import static android.accessibilityservice.AccessibilityTrace.FLAGS_INPUT_FILTER;
+import static android.util.MathUtils.sqrt;
+
+import android.annotation.Nullable;
+import android.annotation.RequiresPermission;
+import android.companion.virtual.VirtualDeviceManager;
+import android.companion.virtual.VirtualDeviceParams;
+import android.hardware.input.VirtualMouse;
+import android.hardware.input.VirtualMouseButtonEvent;
+import android.hardware.input.VirtualMouseConfig;
+import android.hardware.input.VirtualMouseRelativeEvent;
+import android.hardware.input.VirtualMouseScrollEvent;
+import android.os.Handler;
+import android.os.Looper;
+import android.os.Message;
+import android.util.Log;
+import android.util.Slog;
+import android.util.SparseArray;
+import android.view.KeyEvent;
+
+import com.android.server.LocalServices;
+import com.android.server.companion.virtual.VirtualDeviceManagerInternal;
+
+/**
+ * Implements the "mouse keys" accessibility feature for physical keyboards.
+ *
+ * If enabled, mouse keys will allow users to use a physical keyboard to
+ * control the mouse on the display.
+ * The following mouse functionality is supported by the mouse keys:
+ * <ul>
+ * <li> Move the mouse pointer in different directions (up, down, left, right and diagonally).
+ * <li> Click the mouse button (left, right and middle click).
+ * <li> Press and hold the mouse button.
+ * <li> Release the mouse button.
+ * <li> Scroll (up and down).
+ * </ul>
+ *
+ * The keys that are mapped to mouse keys are consumed by {@link AccessibilityInputFilter}.
+ * Non-mouse key {@link KeyEvent} will be passed to the parent handler to be handled as usual.
+ * A new {@link VirtualMouse} is created whenever the mouse keys feature is turned on in Settings.
+ * In case multiple physical keyboard are connected to a device,
+ * mouse keys of each physical keyboard will control a single (global) mouse pointer.
+ */
+public class MouseKeysInterceptor extends BaseEventStreamTransformation
+ implements Handler.Callback {
+ private static final String LOG_TAG = "MouseKeysInterceptor";
+
+ // To enable these logs, run: 'adb shell setprop log.tag.MouseKeysInterceptor DEBUG'
+ // (requires restart)
+ private static final boolean DEBUG = Log.isLoggable(LOG_TAG, Log.DEBUG);
+
+ private static final int MESSAGE_MOVE_MOUSE_POINTER = 1;
+ private static final int MESSAGE_SCROLL_MOUSE_POINTER = 2;
+ private static final float MOUSE_POINTER_MOVEMENT_STEP = 1.8f;
+ private static final int KEY_NOT_SET = -1;
+
+ /** Time interval after which mouse action will be repeated */
+ private static final int INTERVAL_MILLIS = 10;
+
+ private final AccessibilityManagerService mAms;
+ private final Handler mHandler;
+
+ VirtualDeviceManager.VirtualDevice mVirtualDevice = null;
+
+ private VirtualMouse mVirtualMouse = null;
+
+ /**
+ * State of the active directional mouse key.
+ * Multiple mouse keys will not be allowed to be used simultaneously i.e.,
+ * once a mouse key is pressed, other mouse key presses will be disregarded
+ * (except for when the "HOLD" key is pressed).
+ */
+ private int mActiveMoveKey = KEY_NOT_SET;
+
+ /** State of the active scroll mouse key. */
+ private int mActiveScrollKey = KEY_NOT_SET;
+
+ /** Last time the key action was performed */
+ private long mLastTimeKeyActionPerformed = 0;
+
+ /** Whether scroll toggle is on */
+ private boolean mScrollToggleOn = false;
+
+ public enum MouseKeyEvent {
+ DIAGONAL_UP_LEFT_MOVE(KeyEvent.KEYCODE_7),
+ UP_MOVE_OR_SCROLL(KeyEvent.KEYCODE_8),
+ DIAGONAL_UP_RIGHT_MOVE(KeyEvent.KEYCODE_9),
+ LEFT_MOVE(KeyEvent.KEYCODE_U),
+ RIGHT_MOVE(KeyEvent.KEYCODE_O),
+ DIAGONAL_DOWN_LEFT_MOVE(KeyEvent.KEYCODE_J),
+ DOWN_MOVE_OR_SCROLL(KeyEvent.KEYCODE_K),
+ DIAGONAL_DOWN_RIGHT_MOVE(KeyEvent.KEYCODE_L),
+ LEFT_CLICK(KeyEvent.KEYCODE_I),
+ RIGHT_CLICK(KeyEvent.KEYCODE_SLASH),
+ HOLD(KeyEvent.KEYCODE_M),
+ RELEASE(KeyEvent.KEYCODE_COMMA),
+ SCROLL_TOGGLE(KeyEvent.KEYCODE_PERIOD);
+
+ private final int mKeyCode;
+ MouseKeyEvent(int enumValue) {
+ mKeyCode = enumValue;
+ }
+
+ private static final SparseArray<MouseKeyEvent> VALUE_TO_ENUM_MAP = new SparseArray<>();
+
+ static {
+ for (MouseKeyEvent type : MouseKeyEvent.values()) {
+ VALUE_TO_ENUM_MAP.put(type.mKeyCode, type);
+ }
+ }
+
+ public final int getKeyCodeValue() {
+ return mKeyCode;
+ }
+
+ /**
+ * Convert int value of the key code to corresponding MouseEvent enum. If no matching
+ * value is found, this will return {@code null}.
+ */
+ @Nullable
+ public static MouseKeyEvent from(int value) {
+ return VALUE_TO_ENUM_MAP.get(value);
+ }
+ }
+
+ /**
+ * Construct a new MouseKeysInterceptor.
+ *
+ * @param service The service to notify of key events
+ * @param looper Looper to use for callbacks and messages
+ * @param displayId Display ID to send mouse events to
+ */
+ @RequiresPermission(android.Manifest.permission.CREATE_VIRTUAL_DEVICE)
+ public MouseKeysInterceptor(AccessibilityManagerService service, Looper looper, int displayId) {
+ mAms = service;
+ mHandler = new Handler(looper, this);
+ // Create the virtual mouse on a separate thread since virtual device creation
+ // should happen on an auxiliary thread, and not from the handler's thread.
+ // This is because virtual device creation is a blocking operation and can cause a
+ // deadlock if it is called from the handler's thread.
+ new Thread(() -> {
+ mVirtualMouse = createVirtualMouse(displayId);
+ }).start();
+
+ }
+
+ @RequiresPermission(android.Manifest.permission.CREATE_VIRTUAL_DEVICE)
+ private void sendVirtualMouseRelativeEvent(float x, float y) {
+ if (mVirtualMouse != null) {
+ mVirtualMouse.sendRelativeEvent(new VirtualMouseRelativeEvent.Builder()
+ .setRelativeX(x)
+ .setRelativeY(y)
+ .build()
+ );
+ }
+ }
+
+ @RequiresPermission(android.Manifest.permission.CREATE_VIRTUAL_DEVICE)
+ private void sendVirtualMouseButtonEvent(int buttonCode, int actionCode) {
+ if (mVirtualMouse != null) {
+ mVirtualMouse.sendButtonEvent(new VirtualMouseButtonEvent.Builder()
+ .setAction(actionCode)
+ .setButtonCode(buttonCode)
+ .build()
+ );
+ }
+ }
+
+ /**
+ * Performs a mouse scroll action based on the provided key code.
+ * The scroll action will only be performed if the scroll toggle is on.
+ * This method interprets the key code as a mouse scroll and sends
+ * the corresponding {@code VirtualMouseScrollEvent#mYAxisMovement}.
+
+ * @param keyCode The key code representing the mouse scroll action.
+ * Supported keys are:
+ * <ul>
+ * <li>{@link MouseKeysInterceptor.MouseKeyEvent#UP_MOVE_OR_SCROLL}
+ * <li>{@link MouseKeysInterceptor.MouseKeyEvent#DOWN_MOVE_OR_SCROLL}
+ * </ul>
+ */
+ @RequiresPermission(android.Manifest.permission.CREATE_VIRTUAL_DEVICE)
+ private void performMouseScrollAction(int keyCode) {
+ MouseKeyEvent mouseKeyEvent = MouseKeyEvent.from(keyCode);
+ float y = switch (mouseKeyEvent) {
+ case UP_MOVE_OR_SCROLL -> 1.0f;
+ case DOWN_MOVE_OR_SCROLL -> -1.0f;
+ default -> 0.0f;
+ };
+ if (mVirtualMouse != null) {
+ mVirtualMouse.sendScrollEvent(new VirtualMouseScrollEvent.Builder()
+ .setYAxisMovement(y)
+ .build()
+ );
+ }
+ if (DEBUG) {
+ Slog.d(LOG_TAG, "Performed mouse key event: " + mouseKeyEvent.name()
+ + " for scroll action with axis movement (y=" + y + ")");
+ }
+ }
+
+ /**
+ * Performs a mouse button action based on the provided key code.
+ * This method interprets the key code as a mouse button press and sends
+ * the corresponding press and release events to the virtual mouse.
+
+ * @param keyCode The key code representing the mouse button action.
+ * Supported keys are:
+ * <ul>
+ * <li>{@link MouseKeysInterceptor.MouseKeyEvent#LEFT_CLICK} (Primary Button)
+ * <li>{@link MouseKeysInterceptor.MouseKeyEvent#RIGHT_CLICK} (Secondary
+ * Button)
+ * </ul>
+ */
+ @RequiresPermission(android.Manifest.permission.CREATE_VIRTUAL_DEVICE)
+ private void performMouseButtonAction(int keyCode) {
+ MouseKeyEvent mouseKeyEvent = MouseKeyEvent.from(keyCode);
+ int buttonCode = switch (mouseKeyEvent) {
+ case LEFT_CLICK -> VirtualMouseButtonEvent.BUTTON_PRIMARY;
+ case RIGHT_CLICK -> VirtualMouseButtonEvent.BUTTON_SECONDARY;
+ default -> VirtualMouseButtonEvent.BUTTON_UNKNOWN;
+ };
+ if (buttonCode != VirtualMouseButtonEvent.BUTTON_UNKNOWN) {
+ sendVirtualMouseButtonEvent(buttonCode, VirtualMouseButtonEvent.ACTION_BUTTON_PRESS);
+ sendVirtualMouseButtonEvent(buttonCode, VirtualMouseButtonEvent.ACTION_BUTTON_RELEASE);
+ }
+ if (DEBUG) {
+ if (buttonCode == VirtualMouseButtonEvent.BUTTON_UNKNOWN) {
+ Slog.d(LOG_TAG, "Button code is unknown for mouse key event: "
+ + mouseKeyEvent.name());
+ } else {
+ Slog.d(LOG_TAG, "Performed mouse key event: " + mouseKeyEvent.name()
+ + " for button action");
+ }
+ }
+ }
+
+ /**
+ * Performs a mouse pointer action based on the provided key code.
+ * The method calculates the relative movement of the mouse pointer
+ * and sends the corresponding event to the virtual mouse.
+ *
+ * The UP and DOWN pointer actions will only take place for their respective keys
+ * if the scroll toggle is off.
+ *
+ * @param keyCode The key code representing the direction or button press.
+ * Supported keys are:
+ * <ul>
+ * <li>{@link MouseKeysInterceptor.MouseKeyEvent#DIAGONAL_DOWN_LEFT_MOVE}
+ * <li>{@link MouseKeysInterceptor.MouseKeyEvent#DOWN_MOVE_OR_SCROLL}
+ * <li>{@link MouseKeysInterceptor.MouseKeyEvent#DIAGONAL_DOWN_RIGHT_MOVE}
+ * <li>{@link MouseKeysInterceptor.MouseKeyEvent#LEFT_MOVE}
+ * <li>{@link MouseKeysInterceptor.MouseKeyEvent#RIGHT_MOVE}
+ * <li>{@link MouseKeysInterceptor.MouseKeyEvent#DIAGONAL_UP_LEFT_MOVE}
+ * <li>{@link MouseKeysInterceptor.MouseKeyEvent#UP_MOVE_OR_SCROLL}
+ * <li>{@link MouseKeysInterceptor.MouseKeyEvent#DIAGONAL_UP_RIGHT_MOVE}
+ * </ul>
+ */
+ @RequiresPermission(android.Manifest.permission.CREATE_VIRTUAL_DEVICE)
+ private void performMousePointerAction(int keyCode) {
+ float x = 0f;
+ float y = 0f;
+ MouseKeyEvent mouseKeyEvent = MouseKeyEvent.from(keyCode);
+ switch (mouseKeyEvent) {
+ case DIAGONAL_DOWN_LEFT_MOVE -> {
+ x = -MOUSE_POINTER_MOVEMENT_STEP / sqrt(2);
+ y = MOUSE_POINTER_MOVEMENT_STEP / sqrt(2);
+ }
+ case DOWN_MOVE_OR_SCROLL -> {
+ if (!mScrollToggleOn) {
+ y = MOUSE_POINTER_MOVEMENT_STEP;
+ }
+ }
+ case DIAGONAL_DOWN_RIGHT_MOVE -> {
+ x = MOUSE_POINTER_MOVEMENT_STEP / sqrt(2);
+ y = MOUSE_POINTER_MOVEMENT_STEP / sqrt(2);
+ }
+ case LEFT_MOVE -> {
+ x = -MOUSE_POINTER_MOVEMENT_STEP;
+ }
+ case RIGHT_MOVE -> {
+ x = MOUSE_POINTER_MOVEMENT_STEP;
+ }
+ case DIAGONAL_UP_LEFT_MOVE -> {
+ x = -MOUSE_POINTER_MOVEMENT_STEP / sqrt(2);
+ y = -MOUSE_POINTER_MOVEMENT_STEP / sqrt(2);
+ }
+ case UP_MOVE_OR_SCROLL -> {
+ if (!mScrollToggleOn) {
+ y = -MOUSE_POINTER_MOVEMENT_STEP;
+ }
+ }
+ case DIAGONAL_UP_RIGHT_MOVE -> {
+ x = MOUSE_POINTER_MOVEMENT_STEP / sqrt(2);
+ y = -MOUSE_POINTER_MOVEMENT_STEP / sqrt(2);
+ }
+ default -> {
+ x = 0.0f;
+ y = 0.0f;
+ }
+ }
+ sendVirtualMouseRelativeEvent(x, y);
+ if (DEBUG) {
+ Slog.d(LOG_TAG, "Performed mouse key event: " + mouseKeyEvent.name()
+ + " for relative pointer movement (x=" + x + ", y=" + y + ")");
+ }
+ }
+
+ private boolean isMouseKey(int keyCode) {
+ return MouseKeyEvent.VALUE_TO_ENUM_MAP.contains(keyCode);
+ }
+
+ private boolean isMouseButtonKey(int keyCode) {
+ return keyCode == MouseKeyEvent.LEFT_CLICK.getKeyCodeValue()
+ || keyCode == MouseKeyEvent.RIGHT_CLICK.getKeyCodeValue();
+ }
+
+ private boolean isMouseScrollKey(int keyCode) {
+ return keyCode == MouseKeyEvent.UP_MOVE_OR_SCROLL.getKeyCodeValue()
+ || keyCode == MouseKeyEvent.DOWN_MOVE_OR_SCROLL.getKeyCodeValue();
+ }
+
+ /**
+ * Create a virtual mouse using the VirtualDeviceManagerInternal.
+ *
+ * @return The created VirtualMouse.
+ */
+ @RequiresPermission(android.Manifest.permission.CREATE_VIRTUAL_DEVICE)
+ private VirtualMouse createVirtualMouse(int displayId) {
+ final VirtualDeviceManagerInternal localVdm =
+ LocalServices.getService(VirtualDeviceManagerInternal.class);
+ mVirtualDevice = localVdm.createVirtualDevice(
+ new VirtualDeviceParams.Builder().setName("Mouse Keys Virtual Device").build());
+ VirtualMouse virtualMouse = mVirtualDevice.createVirtualMouse(
+ new VirtualMouseConfig.Builder()
+ .setInputDeviceName("Mouse Keys Virtual Mouse")
+ .setAssociatedDisplayId(displayId)
+ .build());
+ return virtualMouse;
+ }
+
+ /**
+ * Handles key events and forwards mouse key events to the virtual mouse.
+ *
+ * @param event The key event to handle.
+ * @param policyFlags The policy flags associated with the key event.
+ */
+ @RequiresPermission(android.Manifest.permission.CREATE_VIRTUAL_DEVICE)
+ @Override
+ public void onKeyEvent(KeyEvent event, int policyFlags) {
+ if (mAms.getTraceManager().isA11yTracingEnabledForTypes(FLAGS_INPUT_FILTER)) {
+ mAms.getTraceManager().logTrace(LOG_TAG + ".onKeyEvent",
+ FLAGS_INPUT_FILTER, "event=" + event + ";policyFlags=" + policyFlags);
+ }
+ boolean isDown = event.getAction() == KeyEvent.ACTION_DOWN;
+ int keyCode = event.getKeyCode();
+
+ if (!isMouseKey(keyCode)) {
+ // Pass non-mouse key events to the next handler
+ super.onKeyEvent(event, policyFlags);
+ } else if (isDown) {
+ if (keyCode == MouseKeyEvent.SCROLL_TOGGLE.getKeyCodeValue()) {
+ mScrollToggleOn = !mScrollToggleOn;
+ if (DEBUG) {
+ Slog.d(LOG_TAG, "Scroll toggle " + (mScrollToggleOn ? "ON" : "OFF"));
+ }
+ } else if (keyCode == MouseKeyEvent.HOLD.getKeyCodeValue()) {
+ sendVirtualMouseButtonEvent(
+ VirtualMouseButtonEvent.BUTTON_PRIMARY,
+ VirtualMouseButtonEvent.ACTION_BUTTON_PRESS
+ );
+ } else if (keyCode == MouseKeyEvent.RELEASE.getKeyCodeValue()) {
+ sendVirtualMouseButtonEvent(
+ VirtualMouseButtonEvent.BUTTON_PRIMARY,
+ VirtualMouseButtonEvent.ACTION_BUTTON_RELEASE
+ );
+ } else if (isMouseButtonKey(keyCode)) {
+ performMouseButtonAction(keyCode);
+ } else if (mScrollToggleOn && isMouseScrollKey(keyCode)) {
+ // If the scroll key is pressed down and no other key is active,
+ // set it as the active key and send a message to scroll the pointer
+ if (mActiveScrollKey == KEY_NOT_SET) {
+ mActiveScrollKey = keyCode;
+ mLastTimeKeyActionPerformed = event.getDownTime();
+ mHandler.sendEmptyMessage(MESSAGE_SCROLL_MOUSE_POINTER);
+ }
+ } else {
+ // This is a directional key.
+ // If the key is pressed down and no other key is active,
+ // set it as the active key and send a message to move the pointer
+ if (mActiveMoveKey == KEY_NOT_SET) {
+ mActiveMoveKey = keyCode;
+ mLastTimeKeyActionPerformed = event.getDownTime();
+ mHandler.sendEmptyMessage(MESSAGE_MOVE_MOUSE_POINTER);
+ }
+ }
+ } else {
+ // Up event received
+ if (mActiveMoveKey == keyCode) {
+ // If the key is released, and it is the active key, stop moving the pointer
+ mActiveMoveKey = KEY_NOT_SET;
+ mHandler.removeMessages(MESSAGE_MOVE_MOUSE_POINTER);
+ } else if (mActiveScrollKey == keyCode) {
+ // If the key is released, and it is the active key, stop scrolling the pointer
+ mActiveScrollKey = KEY_NOT_SET;
+ mHandler.removeMessages(MESSAGE_SCROLL_MOUSE_POINTER);
+ } else {
+ Slog.i(LOG_TAG, "Dropping event with key code: '" + keyCode
+ + "', with no matching down event from deviceId = " + event.getDeviceId());
+ }
+ }
+ }
+
+ /**
+ * Handle messages for moving or scrolling the mouse pointer.
+ *
+ * @param msg The message to handle.
+ * @return True if the message was handled, false otherwise.
+ */
+ @RequiresPermission(android.Manifest.permission.CREATE_VIRTUAL_DEVICE)
+ @Override
+ public boolean handleMessage(Message msg) {
+ switch (msg.what) {
+ case MESSAGE_MOVE_MOUSE_POINTER ->
+ handleMouseMessage(msg.getWhen(), mActiveMoveKey, MESSAGE_MOVE_MOUSE_POINTER);
+ case MESSAGE_SCROLL_MOUSE_POINTER ->
+ handleMouseMessage(msg.getWhen(), mActiveScrollKey,
+ MESSAGE_SCROLL_MOUSE_POINTER);
+ default -> {
+ Slog.e(LOG_TAG, "Unexpected message type");
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Handles mouse-related messages for moving or scrolling the mouse pointer.
+ * This method checks if the specified time interval {@code INTERVAL_MILLIS} has passed since
+ * the last movement or scroll action and performs the corresponding action if necessary.
+ * If there is an active key, the message is rescheduled to be handled again
+ * after the specified {@code INTERVAL_MILLIS}.
+ *
+ * @param currentTime The current time when the message is being handled.
+ * @param activeKey The key code representing the active key. This determines
+ * the direction or type of action to be performed.
+ * @param messageType The type of message to be handled. It can be one of the
+ * following:
+ * <ul>
+ * <li>{@link #MESSAGE_MOVE_MOUSE_POINTER} - for moving the mouse pointer.
+ * <li>{@link #MESSAGE_SCROLL_MOUSE_POINTER} - for scrolling mouse pointer.
+ * </ul>
+ */
+ @RequiresPermission(android.Manifest.permission.CREATE_VIRTUAL_DEVICE)
+ public void handleMouseMessage(long currentTime, int activeKey, int messageType) {
+ if (currentTime - mLastTimeKeyActionPerformed >= INTERVAL_MILLIS) {
+ if (messageType == MESSAGE_MOVE_MOUSE_POINTER) {
+ performMousePointerAction(activeKey);
+ } else if (messageType == MESSAGE_SCROLL_MOUSE_POINTER) {
+ performMouseScrollAction(activeKey);
+ }
+ mLastTimeKeyActionPerformed = currentTime;
+ }
+ if (activeKey != KEY_NOT_SET) {
+ // Reschedule the message if the key is still active
+ mHandler.sendEmptyMessageDelayed(messageType, INTERVAL_MILLIS);
+ }
+ }
+
+ @RequiresPermission(android.Manifest.permission.CREATE_VIRTUAL_DEVICE)
+ @Override
+ public void onDestroy() {
+ // Clear mouse state
+ mActiveMoveKey = KEY_NOT_SET;
+ mActiveScrollKey = KEY_NOT_SET;
+ mLastTimeKeyActionPerformed = 0;
+
+ mHandler.removeCallbacksAndMessages(null);
+ mVirtualDevice.close();
+ }
+}
diff --git a/services/accessibility/java/com/android/server/accessibility/a11ychecker/AccessibilityCheckerUtils.java b/services/accessibility/java/com/android/server/accessibility/a11ychecker/AccessibilityCheckerUtils.java
new file mode 100644
index 000000000000..55af9a0cfd24
--- /dev/null
+++ b/services/accessibility/java/com/android/server/accessibility/a11ychecker/AccessibilityCheckerUtils.java
@@ -0,0 +1,218 @@
+/*
+ * 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.server.accessibility.a11ychecker;
+
+
+import android.annotation.Nullable;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.pm.PackageInfo;
+import android.content.pm.PackageManager;
+import android.util.Slog;
+import android.view.accessibility.AccessibilityEvent;
+import android.view.accessibility.AccessibilityNodeInfo;
+
+import com.android.internal.annotations.VisibleForTesting;
+import com.android.server.accessibility.a11ychecker.A11yCheckerProto.AccessibilityCheckClass;
+import com.android.server.accessibility.a11ychecker.A11yCheckerProto.AccessibilityCheckResultReported;
+import com.android.server.accessibility.a11ychecker.A11yCheckerProto.AccessibilityCheckResultType;
+
+import com.google.android.apps.common.testing.accessibility.framework.AccessibilityCheckResult;
+import com.google.android.apps.common.testing.accessibility.framework.AccessibilityHierarchyCheck;
+import com.google.android.apps.common.testing.accessibility.framework.AccessibilityHierarchyCheckResult;
+import com.google.android.apps.common.testing.accessibility.framework.checks.ClassNameCheck;
+import com.google.android.apps.common.testing.accessibility.framework.checks.ClickableSpanCheck;
+import com.google.android.apps.common.testing.accessibility.framework.checks.DuplicateClickableBoundsCheck;
+import com.google.android.apps.common.testing.accessibility.framework.checks.DuplicateSpeakableTextCheck;
+import com.google.android.apps.common.testing.accessibility.framework.checks.EditableContentDescCheck;
+import com.google.android.apps.common.testing.accessibility.framework.checks.ImageContrastCheck;
+import com.google.android.apps.common.testing.accessibility.framework.checks.LinkPurposeUnclearCheck;
+import com.google.android.apps.common.testing.accessibility.framework.checks.RedundantDescriptionCheck;
+import com.google.android.apps.common.testing.accessibility.framework.checks.SpeakableTextPresentCheck;
+import com.google.android.apps.common.testing.accessibility.framework.checks.TextContrastCheck;
+import com.google.android.apps.common.testing.accessibility.framework.checks.TextSizeCheck;
+import com.google.android.apps.common.testing.accessibility.framework.checks.TouchTargetSizeCheck;
+import com.google.android.apps.common.testing.accessibility.framework.checks.TraversalOrderCheck;
+
+import java.util.AbstractMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+/**
+ * Util class to process a11y checker results for logging.
+ *
+ * @hide
+ */
+public class AccessibilityCheckerUtils {
+
+ private static final String LOG_TAG = "AccessibilityCheckerUtils";
+ @VisibleForTesting
+ // LINT.IfChange
+ static final Map<Class<? extends AccessibilityHierarchyCheck>, AccessibilityCheckClass>
+ CHECK_CLASS_TO_ENUM_MAP =
+ Map.ofEntries(
+ classMapEntry(ClassNameCheck.class, AccessibilityCheckClass.CLASS_NAME_CHECK),
+ classMapEntry(ClickableSpanCheck.class,
+ AccessibilityCheckClass.CLICKABLE_SPAN_CHECK),
+ classMapEntry(DuplicateClickableBoundsCheck.class,
+ AccessibilityCheckClass.DUPLICATE_CLICKABLE_BOUNDS_CHECK),
+ classMapEntry(DuplicateSpeakableTextCheck.class,
+ AccessibilityCheckClass.DUPLICATE_SPEAKABLE_TEXT_CHECK),
+ classMapEntry(EditableContentDescCheck.class,
+ AccessibilityCheckClass.EDITABLE_CONTENT_DESC_CHECK),
+ classMapEntry(ImageContrastCheck.class,
+ AccessibilityCheckClass.IMAGE_CONTRAST_CHECK),
+ classMapEntry(LinkPurposeUnclearCheck.class,
+ AccessibilityCheckClass.LINK_PURPOSE_UNCLEAR_CHECK),
+ classMapEntry(RedundantDescriptionCheck.class,
+ AccessibilityCheckClass.REDUNDANT_DESCRIPTION_CHECK),
+ classMapEntry(SpeakableTextPresentCheck.class,
+ AccessibilityCheckClass.SPEAKABLE_TEXT_PRESENT_CHECK),
+ classMapEntry(TextContrastCheck.class,
+ AccessibilityCheckClass.TEXT_CONTRAST_CHECK),
+ classMapEntry(TextSizeCheck.class, AccessibilityCheckClass.TEXT_SIZE_CHECK),
+ classMapEntry(TouchTargetSizeCheck.class,
+ AccessibilityCheckClass.TOUCH_TARGET_SIZE_CHECK),
+ classMapEntry(TraversalOrderCheck.class,
+ AccessibilityCheckClass.TRAVERSAL_ORDER_CHECK));
+ // LINT.ThenChange(/services/accessibility/java/com/android/server/accessibility/a11ychecker/proto/a11ychecker.proto)
+
+ static Set<AccessibilityCheckResultReported> processResults(
+ Context context,
+ AccessibilityNodeInfo nodeInfo,
+ List<AccessibilityHierarchyCheckResult> checkResults,
+ @Nullable AccessibilityEvent accessibilityEvent,
+ ComponentName a11yServiceComponentName) {
+ return processResults(nodeInfo, checkResults, accessibilityEvent,
+ context.getPackageManager(), a11yServiceComponentName);
+ }
+
+ @VisibleForTesting
+ static Set<AccessibilityCheckResultReported> processResults(
+ AccessibilityNodeInfo nodeInfo,
+ List<AccessibilityHierarchyCheckResult> checkResults,
+ @Nullable AccessibilityEvent accessibilityEvent,
+ PackageManager packageManager,
+ ComponentName a11yServiceComponentName) {
+ String appPackageName = nodeInfo.getPackageName().toString();
+ AccessibilityCheckResultReported.Builder builder;
+ try {
+ builder = AccessibilityCheckResultReported.newBuilder()
+ .setPackageName(appPackageName)
+ .setAppVersionCode(getAppVersionCode(packageManager, appPackageName))
+ .setUiElementPath(AccessibilityNodePathBuilder.createNodePath(nodeInfo))
+ .setActivityName(getActivityName(packageManager, accessibilityEvent))
+ .setWindowTitle(getWindowTitle(nodeInfo))
+ .setSourceComponentName(a11yServiceComponentName.flattenToString())
+ .setSourceVersionCode(
+ getAppVersionCode(packageManager,
+ a11yServiceComponentName.getPackageName()));
+ } catch (PackageManager.NameNotFoundException e) {
+ Slog.e(LOG_TAG, "Unknown package name", e);
+ return Set.of();
+ }
+
+ return checkResults.stream()
+ .filter(checkResult -> checkResult.getType()
+ == AccessibilityCheckResult.AccessibilityCheckResultType.ERROR
+ || checkResult.getType()
+ == AccessibilityCheckResult.AccessibilityCheckResultType.WARNING)
+ .map(checkResult -> builder.setResultCheckClass(
+ getCheckClass(checkResult)).setResultType(
+ getCheckResultType(checkResult)).setResultId(
+ checkResult.getResultId()).build())
+ .collect(Collectors.toUnmodifiableSet());
+ }
+
+ private static long getAppVersionCode(PackageManager packageManager, String packageName) throws
+ PackageManager.NameNotFoundException {
+ PackageInfo packageInfo = packageManager.getPackageInfo(packageName, 0);
+ return packageInfo.getLongVersionCode();
+ }
+
+ /**
+ * Returns the simple class name of the Activity providing the cache update, if available,
+ * or an empty String if not.
+ */
+ @VisibleForTesting
+ static String getActivityName(
+ PackageManager packageManager, @Nullable AccessibilityEvent accessibilityEvent) {
+ if (accessibilityEvent == null) {
+ return "";
+ }
+ CharSequence activityName = accessibilityEvent.getClassName();
+ if (accessibilityEvent.getEventType() == AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED
+ && accessibilityEvent.getPackageName() != null
+ && activityName != null) {
+ try {
+ // Check class is for a valid Activity.
+ packageManager
+ .getActivityInfo(
+ new ComponentName(accessibilityEvent.getPackageName().toString(),
+ activityName.toString()), 0);
+ int qualifierEnd = activityName.toString().lastIndexOf('.');
+ return activityName.toString().substring(qualifierEnd + 1);
+ } catch (PackageManager.NameNotFoundException e) {
+ // No need to spam the logs. This is very frequent when the class doesn't match
+ // an activity.
+ }
+ }
+ return "";
+ }
+
+ /**
+ * Returns the title of the window containing the a11y node.
+ */
+ private static String getWindowTitle(AccessibilityNodeInfo nodeInfo) {
+ if (nodeInfo.getWindow() == null) {
+ return "";
+ }
+ CharSequence windowTitle = nodeInfo.getWindow().getTitle();
+ return windowTitle == null ? "" : windowTitle.toString();
+ }
+
+ /**
+ * Maps the {@link AccessibilityHierarchyCheck} class that produced the given result, with the
+ * corresponding {@link AccessibilityCheckClass} enum. This enumeration is to avoid relying on
+ * String class names in the logging, which can be proguarded. It also reduces the logging size.
+ */
+ private static AccessibilityCheckClass getCheckClass(
+ AccessibilityHierarchyCheckResult checkResult) {
+ if (CHECK_CLASS_TO_ENUM_MAP.containsKey(checkResult.getSourceCheckClass())) {
+ return CHECK_CLASS_TO_ENUM_MAP.get(checkResult.getSourceCheckClass());
+ }
+ return AccessibilityCheckClass.UNKNOWN_CHECK;
+ }
+
+ private static AccessibilityCheckResultType getCheckResultType(
+ AccessibilityHierarchyCheckResult checkResult) {
+ return switch (checkResult.getType()) {
+ case ERROR -> AccessibilityCheckResultType.ERROR;
+ case WARNING -> AccessibilityCheckResultType.WARNING;
+ default -> AccessibilityCheckResultType.UNKNOWN_RESULT_TYPE;
+ };
+ }
+
+ private static Map.Entry<Class<? extends AccessibilityHierarchyCheck>,
+ AccessibilityCheckClass> classMapEntry(
+ Class<? extends AccessibilityHierarchyCheck> checkClass,
+ AccessibilityCheckClass checkClassEnum) {
+ return new AbstractMap.SimpleImmutableEntry<>(checkClass, checkClassEnum);
+ }
+}
diff --git a/core/java/android/view/accessibility/a11ychecker/AccessibilityNodePathBuilder.java b/services/accessibility/java/com/android/server/accessibility/a11ychecker/AccessibilityNodePathBuilder.java
index 2996ddef6f64..bbfb217d925e 100644
--- a/core/java/android/view/accessibility/a11ychecker/AccessibilityNodePathBuilder.java
+++ b/services/accessibility/java/com/android/server/accessibility/a11ychecker/AccessibilityNodePathBuilder.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.view.accessibility.a11ychecker;
+package com.android.server.accessibility.a11ychecker;
import android.annotation.NonNull;
import android.annotation.Nullable;
diff --git a/core/java/android/view/accessibility/a11ychecker/OWNERS b/services/accessibility/java/com/android/server/accessibility/a11ychecker/OWNERS
index d1e7986cc209..d1e7986cc209 100644
--- a/core/java/android/view/accessibility/a11ychecker/OWNERS
+++ b/services/accessibility/java/com/android/server/accessibility/a11ychecker/OWNERS
diff --git a/services/accessibility/java/com/android/server/accessibility/a11ychecker/proto/a11ychecker.proto b/services/accessibility/java/com/android/server/accessibility/a11ychecker/proto/a11ychecker.proto
new file mode 100644
index 000000000000..8beed4afa9cb
--- /dev/null
+++ b/services/accessibility/java/com/android/server/accessibility/a11ychecker/proto/a11ychecker.proto
@@ -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.
+ */
+syntax = "proto2";
+package android.accessibility;
+
+option java_package = "com.android.server.accessibility.a11ychecker";
+option java_outer_classname = "A11yCheckerProto";
+
+// TODO(b/326385939): remove and replace usage with the atom extension proto, when submitted.
+/** Logs the result of an AccessibilityCheck. */
+message AccessibilityCheckResultReported {
+ // Package name of the app containing the checked View.
+ optional string package_name = 1;
+ // Version code of the app containing the checked View.
+ optional int64 app_version_code = 2;
+ // The path of the View starting from the root element in the window. Each element is
+ // represented by the View's resource id, when available, or the View's class name.
+ optional string ui_element_path = 3;
+ // Class name of the activity containing the checked View.
+ optional string activity_name = 4;
+ // Title of the window containing the checked View.
+ optional string window_title = 5;
+ // The flattened component name of the app running the AccessibilityService which provided the a11y node.
+ optional string source_component_name = 6;
+ // Version code of the app running the AccessibilityService that provided the a11y node.
+ optional int64 source_version_code = 7;
+ // Class Name of the AccessibilityCheck that produced the result.
+ optional AccessibilityCheckClass result_check_class = 8;
+ // Result type of the AccessibilityCheckResult.
+ optional AccessibilityCheckResultType result_type = 9;
+ // Result ID of the AccessibilityCheckResult.
+ optional int32 result_id = 10;
+}
+
+/** The AccessibilityCheck class. */
+// LINT.IfChange
+enum AccessibilityCheckClass {
+ UNKNOWN_CHECK = 0;
+ CLASS_NAME_CHECK = 1;
+ CLICKABLE_SPAN_CHECK = 2;
+ DUPLICATE_CLICKABLE_BOUNDS_CHECK = 3;
+ DUPLICATE_SPEAKABLE_TEXT_CHECK = 4;
+ EDITABLE_CONTENT_DESC_CHECK = 5;
+ IMAGE_CONTRAST_CHECK = 6;
+ LINK_PURPOSE_UNCLEAR_CHECK = 7;
+ REDUNDANT_DESCRIPTION_CHECK = 8;
+ SPEAKABLE_TEXT_PRESENT_CHECK = 9;
+ TEXT_CONTRAST_CHECK = 10;
+ TEXT_SIZE_CHECK = 11;
+ TOUCH_TARGET_SIZE_CHECK = 12;
+ TRAVERSAL_ORDER_CHECK = 13;
+}
+// LINT.ThenChange(/services/accessibility/java/com/android/server/accessibility/a11ychecker/AccessibilityCheckerUtils.java)
+
+/** The type of AccessibilityCheckResult */
+enum AccessibilityCheckResultType {
+ UNKNOWN_RESULT_TYPE = 0;
+ ERROR = 1;
+ WARNING = 2;
+}
diff --git a/services/autofill/java/com/android/server/autofill/Helper.java b/services/autofill/java/com/android/server/autofill/Helper.java
index ad8f5e1481e1..668852b46ea2 100644
--- a/services/autofill/java/com/android/server/autofill/Helper.java
+++ b/services/autofill/java/com/android/server/autofill/Helper.java
@@ -31,12 +31,14 @@ import android.hardware.display.DisplayManager;
import android.metrics.LogMaker;
import android.os.UserManager;
import android.service.autofill.Dataset;
+import android.service.autofill.FillResponse;
import android.service.autofill.InternalSanitizer;
import android.service.autofill.SaveInfo;
import android.text.TextUtils;
import android.util.ArrayMap;
import android.util.ArraySet;
import android.util.Slog;
+import android.util.SparseArray;
import android.view.Display;
import android.view.View;
import android.view.WindowManager;
@@ -374,4 +376,50 @@ public final class Helper {
private interface ViewNodeFilter {
boolean matches(ViewNode node);
}
+
+ public static class SaveInfoStats {
+ public int saveInfoCount;
+ public int saveDataTypeCount;
+
+ public SaveInfoStats(int saveInfoCount, int saveDataTypeCount) {
+ this.saveInfoCount = saveInfoCount;
+ this.saveDataTypeCount = saveDataTypeCount;
+ }
+ }
+
+ /**
+ * Get statistic information of save info given a sparse array of fill responses.
+ *
+ * Specifically the statistic includes
+ * 1. how many save info the current session has.
+ * 2. How many distinct save data types current session has.
+ *
+ * @return SaveInfoStats returns the above two number in a SaveInfoStats object
+ */
+ public static SaveInfoStats getSaveInfoStatsFromFillResponses(
+ SparseArray<FillResponse> fillResponses) {
+ if (fillResponses == null) {
+ if (sVerbose) {
+ Slog.v(TAG, "getSaveInfoStatsFromFillResponses(): fillResponse sparse array is "
+ + "null");
+ }
+ return new SaveInfoStats(-1, -1);
+ }
+ int numSaveInfos = 0;
+ int numSaveDataTypes = 0;
+ ArraySet<Integer> saveDataTypeSeen = new ArraySet<>();
+ final int numResponses = fillResponses.size();
+ for (int responseNum = 0; responseNum < numResponses; responseNum++) {
+ final FillResponse response = fillResponses.valueAt(responseNum);
+ if (response != null && response.getSaveInfo() != null) {
+ numSaveInfos += 1;
+ int saveDataType = response.getSaveInfo().getType();
+ if (!saveDataTypeSeen.contains(saveDataType)) {
+ saveDataTypeSeen.add(saveDataType);
+ numSaveDataTypes += 1;
+ }
+ }
+ }
+ return new SaveInfoStats(numSaveInfos, numSaveDataTypes);
+ }
}
diff --git a/services/autofill/java/com/android/server/autofill/PresentationStatsEventLogger.java b/services/autofill/java/com/android/server/autofill/PresentationStatsEventLogger.java
index d7da2f0052d3..49ca29745b11 100644
--- a/services/autofill/java/com/android/server/autofill/PresentationStatsEventLogger.java
+++ b/services/autofill/java/com/android/server/autofill/PresentationStatsEventLogger.java
@@ -804,7 +804,15 @@ public final class PresentationStatsEventLogger {
+ event.mSuggestionPresentedLastTimestampMs
+ " event.mFocusedVirtualAutofillId=" + event.mFocusedVirtualAutofillId
+ " event.mFieldFirstLength=" + event.mFieldFirstLength
- + " event.mFieldLastLength=" + event.mFieldLastLength);
+ + " event.mFieldLastLength=" + event.mFieldLastLength
+ + " event.mViewFailedPriorToRefillCount=" + event.mViewFailedPriorToRefillCount
+ + " event.mViewFilledSuccessfullyOnRefillCount="
+ + event.mViewFilledSuccessfullyOnRefillCount
+ + " event.mViewFailedOnRefillCount=" + event.mViewFailedOnRefillCount
+ + " event.notExpiringResponseDuringAuthCount="
+ + event.mFixExpireResponseDuringAuthCount
+ + " event.notifyViewEnteredIgnoredDuringAuthCount="
+ + event.mNotifyViewEnteredIgnoredDuringAuthCount);
}
// TODO(b/234185326): Distinguish empty responses from other no presentation reasons.
@@ -846,7 +854,6 @@ public final class PresentationStatsEventLogger {
mCallingAppUid,
event.mIsCredentialRequest,
event.mWebviewRequestedCredential,
- event.mFilteredFillabaleViewCount,
event.mViewFillableTotalCount,
event.mViewFillFailureCount,
event.mFocusedId,
@@ -859,7 +866,13 @@ public final class PresentationStatsEventLogger {
event.mSuggestionPresentedLastTimestampMs,
event.mFocusedVirtualAutofillId,
event.mFieldFirstLength,
- event.mFieldLastLength);
+ event.mFieldLastLength,
+ event.mFilteredFillabaleViewCount,
+ event.mViewFailedPriorToRefillCount,
+ event.mViewFilledSuccessfullyOnRefillCount,
+ event.mViewFailedOnRefillCount,
+ event.mFixExpireResponseDuringAuthCount,
+ event.mNotifyViewEnteredIgnoredDuringAuthCount);
mEventInternal = Optional.empty();
}
@@ -912,6 +925,12 @@ public final class PresentationStatsEventLogger {
// uninitialized doesn't help much, as this would be non-zero only if callback is received.
int mViewFillSuccessCount = 0;
int mViewFilledButUnexpectedCount = 0;
+ int mViewFailedPriorToRefillCount = 0;
+ int mViewFailedOnRefillCount = 0;
+ int mViewFilledSuccessfullyOnRefillCount = 0;
+
+ int mFixExpireResponseDuringAuthCount = 0;
+ int mNotifyViewEnteredIgnoredDuringAuthCount = 0;
ArraySet<AutofillId> mAutofillIdsAttemptedAutofill;
ArraySet<AutofillId> mAlreadyFilledAutofillIds = new ArraySet<>();
diff --git a/services/autofill/java/com/android/server/autofill/Session.java b/services/autofill/java/com/android/server/autofill/Session.java
index c6ddc16211bc..21df7a5487ef 100644
--- a/services/autofill/java/com/android/server/autofill/Session.java
+++ b/services/autofill/java/com/android/server/autofill/Session.java
@@ -70,6 +70,7 @@ import static com.android.server.autofill.FillResponseEventLogger.RESPONSE_STATU
import static com.android.server.autofill.Helper.containsCharsInOrder;
import static com.android.server.autofill.Helper.createSanitizers;
import static com.android.server.autofill.Helper.getNumericValue;
+import static com.android.server.autofill.Helper.SaveInfoStats;
import static com.android.server.autofill.Helper.sDebug;
import static com.android.server.autofill.Helper.sVerbose;
import static com.android.server.autofill.Helper.toArray;
@@ -3203,11 +3204,6 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
return saveInfo == null ? 0 : saveInfo.getFlags();
}
- static class SaveInfoStats {
- public int saveInfoCount;
- public int saveDataTypeCount;
- }
-
/**
* Get statistic information of save info in current session. Specifically
* 1. how many save info the current session has.
@@ -3217,42 +3213,13 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
*/
@GuardedBy("mLock")
private SaveInfoStats getSaveInfoStatsLocked() {
- SaveInfoStats retSaveInfoStats = new SaveInfoStats();
- retSaveInfoStats.saveInfoCount = -1;
- retSaveInfoStats.saveDataTypeCount = -1;
-
if (mContexts == null) {
if (sVerbose) {
Slog.v(TAG, "getSaveInfoStatsLocked(): mContexts is null");
}
- } else if (mResponses == null) {
- // Happens when the activity / session was finished before the service replied, or
- // when the service cannot autofill it (and returned a null response).
- if (sVerbose) {
- Slog.v(TAG, "getSaveInfoStatsLocked(): mResponses is null");
- }
- return retSaveInfoStats;
- } else {
- int numSaveInfos = 0;
- int numSaveDataTypes = 0;
- ArraySet<Integer> saveDataTypeSeen = new ArraySet<>();
- final int numResponses = mResponses.size();
- for (int responseNum = 0; responseNum < numResponses; responseNum++) {
- final FillResponse response = mResponses.valueAt(responseNum);
- if (response != null && response.getSaveInfo() != null) {
- numSaveInfos += 1;
- int saveDataType = response.getSaveInfo().getType();
- if (!saveDataTypeSeen.contains(saveDataType)) {
- saveDataTypeSeen.add(saveDataType);
- numSaveDataTypes += 1;
- }
- }
- }
- retSaveInfoStats.saveInfoCount = numSaveInfos;
- retSaveInfoStats.saveDataTypeCount = numSaveDataTypes;
+ return new SaveInfoStats(-1, -1);
}
-
- return retSaveInfoStats;
+ return Helper.getSaveInfoStatsFromFillResponses(mResponses);
}
/**
diff --git a/services/autofill/java/com/android/server/autofill/ui/AutoFillUI.java b/services/autofill/java/com/android/server/autofill/ui/AutoFillUI.java
index 2e9a4dcb45aa..a10039f9bf6c 100644
--- a/services/autofill/java/com/android/server/autofill/ui/AutoFillUI.java
+++ b/services/autofill/java/com/android/server/autofill/ui/AutoFillUI.java
@@ -462,7 +462,9 @@ public final class AutoFillUI {
@Override
public void onShown() {
- mCallback.onShown(UI_TYPE_DIALOG, response.getDatasets().size());
+ if (mCallback != null) {
+ mCallback.onShown(UI_TYPE_DIALOG, response.getDatasets().size());
+ }
}
@Override
@@ -511,7 +513,9 @@ public final class AutoFillUI {
@Override
public void startIntentSender(IntentSender intentSender) {
- mCallback.startIntentSenderAndFinishSession(intentSender);
+ if (mCallback != null) {
+ mCallback.startIntentSenderAndFinishSession(intentSender);
+ }
}
private void log(int type) {
diff --git a/services/companion/java/com/android/server/companion/CompanionDeviceShellCommand.java b/services/companion/java/com/android/server/companion/CompanionDeviceShellCommand.java
index 3d53deb8d2bb..4fc9d55d3e17 100644
--- a/services/companion/java/com/android/server/companion/CompanionDeviceShellCommand.java
+++ b/services/companion/java/com/android/server/companion/CompanionDeviceShellCommand.java
@@ -103,9 +103,10 @@ class CompanionDeviceShellCommand extends ShellCommand {
String packageName = getNextArgRequired();
String address = getNextArgRequired();
String deviceProfile = getNextArg();
+ boolean selfManaged = getNextBooleanArg();
final MacAddress macAddress = MacAddress.fromString(address);
mAssociationRequestsProcessor.createAssociation(userId, packageName, macAddress,
- deviceProfile, deviceProfile, /* associatedDevice */ null, false,
+ deviceProfile, deviceProfile, /* associatedDevice */ null, selfManaged,
/* callback */ null, /* resultReceiver */ null);
}
break;
@@ -462,6 +463,17 @@ class CompanionDeviceShellCommand extends ShellCommand {
}
}
+ private boolean getNextBooleanArg() {
+ String arg = getNextArg();
+ if (arg == null || "false".equalsIgnoreCase(arg)) {
+ return false;
+ } else if ("true".equalsIgnoreCase(arg)) {
+ return Boolean.parseBoolean(arg);
+ } else {
+ throw new IllegalArgumentException("Expected a boolean argument but was: " + arg);
+ }
+ }
+
@Override
public void onHelp() {
PrintWriter pw = getOutPrintWriter();
@@ -470,7 +482,7 @@ class CompanionDeviceShellCommand extends ShellCommand {
pw.println(" Print this help text.");
pw.println(" list USER_ID");
pw.println(" List all Associations for a user.");
- pw.println(" associate USER_ID PACKAGE MAC_ADDRESS [DEVICE_PROFILE]");
+ pw.println(" associate USER_ID PACKAGE MAC_ADDRESS [DEVICE_PROFILE] [SELF_MANAGED]");
pw.println(" Create a new Association.");
pw.println(" disassociate USER_ID PACKAGE MAC_ADDRESS");
pw.println(" Remove an existing Association.");
diff --git a/services/companion/java/com/android/server/companion/virtual/VirtualDeviceImpl.java b/services/companion/java/com/android/server/companion/virtual/VirtualDeviceImpl.java
index 7d9d660af536..ee7d0aef2189 100644
--- a/services/companion/java/com/android/server/companion/virtual/VirtualDeviceImpl.java
+++ b/services/companion/java/com/android/server/companion/virtual/VirtualDeviceImpl.java
@@ -28,9 +28,9 @@ import static android.companion.virtual.VirtualDeviceParams.POLICY_TYPE_BLOCKED_
import static android.companion.virtual.VirtualDeviceParams.POLICY_TYPE_CAMERA;
import static android.companion.virtual.VirtualDeviceParams.POLICY_TYPE_CLIPBOARD;
import static android.companion.virtual.VirtualDeviceParams.POLICY_TYPE_RECENTS;
-import static android.content.pm.PackageManager.ACTION_REQUEST_PERMISSIONS;
import static android.companion.virtualdevice.flags.Flags.virtualCameraServiceDiscovery;
import static android.companion.virtualdevice.flags.Flags.intentInterceptionActionMatchingFix;
+import static android.content.pm.PackageManager.ACTION_REQUEST_PERMISSIONS;
import android.annotation.EnforcePermission;
import android.annotation.NonNull;
@@ -561,8 +561,8 @@ final class VirtualDeviceImpl extends IVirtualDevice.Stub
private void sendPendingIntent(int displayId, PendingIntent pendingIntent)
throws PendingIntent.CanceledException {
final ActivityOptions options = ActivityOptions.makeBasic().setLaunchDisplayId(displayId);
- options.setPendingIntentBackgroundActivityLaunchAllowed(true);
- options.setPendingIntentBackgroundActivityLaunchAllowedByPermission(true);
+ options.setPendingIntentBackgroundActivityStartMode(
+ ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOW_ALWAYS);
pendingIntent.send(
mContext,
/* code= */ 0,
diff --git a/services/core/Android.bp b/services/core/Android.bp
index 1cd20ed0f7cd..9d4310c21cf9 100644
--- a/services/core/Android.bp
+++ b/services/core/Android.bp
@@ -215,6 +215,7 @@ java_library_static {
"power_hint_flags_lib",
"biometrics_flags_lib",
"am_flags_lib",
+ "updates_flags_lib",
"com_android_server_accessibility_flags_lib",
"//frameworks/libs/systemui:com_android_systemui_shared_flags_lib",
"com_android_wm_shell_flags_lib",
diff --git a/services/core/java/android/app/usage/UsageStatsManagerInternal.java b/services/core/java/android/app/usage/UsageStatsManagerInternal.java
index 23c008eb7f67..fc00987dc38a 100644
--- a/services/core/java/android/app/usage/UsageStatsManagerInternal.java
+++ b/services/core/java/android/app/usage/UsageStatsManagerInternal.java
@@ -74,6 +74,18 @@ public abstract class UsageStatsManagerInternal {
public abstract void reportEvent(String packageName, @UserIdInt int userId, int eventType);
/**
+ * Reports an event to the UsageStatsManager for all users. <br/>
+ * <em>Note: Starting from {@link android.os.Build.VERSION_CODES#R Android R}, if the user's
+ * device is not in an unlocked state (as defined by {@link UserManager#isUserUnlocked()}),
+ * then this event will be added to a queue and processed once the device is unlocked.</em>
+ *
+ * @param packageName The package for which this event occurred.
+ * @param eventType The event that occurred. Valid values can be found at
+ * {@link UsageEvents}
+ */
+ public abstract void reportEventForAllUsers(String packageName, int eventType);
+
+ /**
* Reports a configuration change to the UsageStatsManager. <br/>
* <em>Note: Starting from {@link android.os.Build.VERSION_CODES#R Android R}, if the user's
* device is not in an unlocked state (as defined by {@link UserManager#isUserUnlocked()}),
diff --git a/services/core/java/com/android/server/CertBlacklister.java b/services/core/java/com/android/server/CertBlocklister.java
index e726c6abfac3..9e23f884f4ba 100644
--- a/services/core/java/com/android/server/CertBlacklister.java
+++ b/services/core/java/com/android/server/CertBlocklister.java
@@ -16,37 +16,39 @@
package com.android.server;
-import android.content.Context;
import android.content.ContentResolver;
+import android.content.Context;
import android.database.ContentObserver;
import android.os.Binder;
import android.os.FileUtils;
import android.provider.Settings;
import android.util.Slog;
+import libcore.io.IoUtils;
+
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
-import libcore.io.IoUtils;
-
/**
- * <p>CertBlacklister provides a simple mechanism for updating the platform denylists for SSL
+ * <p>CertBlocklister provides a simple mechanism for updating the platform denylists for SSL
* certificate public keys and serial numbers.
*/
-public class CertBlacklister extends Binder {
+public class CertBlocklister extends Binder {
- private static final String TAG = "CertBlacklister";
+ private static final String TAG = "CertBlocklister";
private static final String DENYLIST_ROOT = System.getenv("ANDROID_DATA") + "/misc/keychain/";
+ /* For compatibility reasons, the name of these paths cannot be changed */
public static final String PUBKEY_PATH = DENYLIST_ROOT + "pubkey_blacklist.txt";
public static final String SERIAL_PATH = DENYLIST_ROOT + "serial_blacklist.txt";
- public static final String PUBKEY_BLACKLIST_KEY = "pubkey_blacklist";
- public static final String SERIAL_BLACKLIST_KEY = "serial_blacklist";
+ /* For compatibility reasons, the name of these keys cannot be changed */
+ public static final String PUBKEY_BLOCKLIST_KEY = "pubkey_blacklist";
+ public static final String SERIAL_BLOCKLIST_KEY = "serial_blacklist";
- private static class BlacklistObserver extends ContentObserver {
+ private static class BlocklistObserver extends ContentObserver {
private final String mKey;
private final String mName;
@@ -54,7 +56,7 @@ public class CertBlacklister extends Binder {
private final File mTmpDir;
private final ContentResolver mContentResolver;
- public BlacklistObserver(String key, String name, String path, ContentResolver cr) {
+ BlocklistObserver(String key, String name, String path, ContentResolver cr) {
super(null);
mKey = key;
mName = name;
@@ -66,59 +68,61 @@ public class CertBlacklister extends Binder {
@Override
public void onChange(boolean selfChange) {
super.onChange(selfChange);
- writeDenylist();
+ new Thread("BlocklistUpdater") {
+ public void run() {
+ writeDenylist();
+ }
+ }.start();
}
public String getValue() {
- return Settings.Secure.getString(mContentResolver, mKey);
+ return Settings.Secure.getStringForUser(
+ mContentResolver, mKey, mContentResolver.getUserId());
}
private void writeDenylist() {
- new Thread("BlacklistUpdater") {
- public void run() {
- synchronized(mTmpDir) {
- String blacklist = getValue();
- if (blacklist != null) {
- Slog.i(TAG, "Certificate blacklist changed, updating...");
- FileOutputStream out = null;
- try {
- // create a temporary file
- File tmp = File.createTempFile("journal", "", mTmpDir);
- // mark it -rw-r--r--
- tmp.setReadable(true, false);
- // write to it
- out = new FileOutputStream(tmp);
- out.write(blacklist.getBytes());
- // sync to disk
- FileUtils.sync(out);
- // atomic rename
- tmp.renameTo(new File(mPath));
- Slog.i(TAG, "Certificate blacklist updated");
- } catch (IOException e) {
- Slog.e(TAG, "Failed to write blacklist", e);
- } finally {
- IoUtils.closeQuietly(out);
- }
- }
- }
+ synchronized (mTmpDir) {
+ String blocklist = getValue();
+ if (blocklist == null) {
+ return;
}
- }.start();
+ if (mPath.equals(SERIAL_PATH)) {
+ Slog.w(TAG, "The certificate blocklist based on serials is deprecated. "
+ + "Please use the pubkey blocklist instead.");
+ }
+ Slog.i(TAG, "Certificate blocklist changed, updating...");
+ FileOutputStream out = null;
+ try {
+ // Create a temporary file and rename it atomically.
+ File tmp = File.createTempFile("journal", "", mTmpDir);
+ tmp.setReadable(true /* readable */, false /* ownerOnly */);
+ out = new FileOutputStream(tmp);
+ out.write(blocklist.getBytes());
+ FileUtils.sync(out);
+ tmp.renameTo(new File(mPath));
+ Slog.i(TAG, "Certificate blocklist updated");
+ } catch (IOException e) {
+ Slog.e(TAG, "Failed to write blocklist", e);
+ } finally {
+ IoUtils.closeQuietly(out);
+ }
+ }
}
}
- public CertBlacklister(Context context) {
+ public CertBlocklister(Context context) {
registerObservers(context.getContentResolver());
}
- private BlacklistObserver buildPubkeyObserver(ContentResolver cr) {
- return new BlacklistObserver(PUBKEY_BLACKLIST_KEY,
+ private BlocklistObserver buildPubkeyObserver(ContentResolver cr) {
+ return new BlocklistObserver(PUBKEY_BLOCKLIST_KEY,
"pubkey",
PUBKEY_PATH,
cr);
}
- private BlacklistObserver buildSerialObserver(ContentResolver cr) {
- return new BlacklistObserver(SERIAL_BLACKLIST_KEY,
+ private BlocklistObserver buildSerialObserver(ContentResolver cr) {
+ return new BlocklistObserver(SERIAL_BLOCKLIST_KEY,
"serial",
SERIAL_PATH,
cr);
@@ -127,16 +131,16 @@ public class CertBlacklister extends Binder {
private void registerObservers(ContentResolver cr) {
// set up the public key denylist observer
cr.registerContentObserver(
- Settings.Secure.getUriFor(PUBKEY_BLACKLIST_KEY),
- true,
- buildPubkeyObserver(cr)
+ Settings.Secure.getUriFor(PUBKEY_BLOCKLIST_KEY),
+ true,
+ buildPubkeyObserver(cr)
);
// set up the serial number denylist observer
cr.registerContentObserver(
- Settings.Secure.getUriFor(SERIAL_BLACKLIST_KEY),
- true,
- buildSerialObserver(cr)
+ Settings.Secure.getUriFor(SERIAL_BLOCKLIST_KEY),
+ true,
+ buildSerialObserver(cr)
);
}
}
diff --git a/services/core/java/com/android/server/ExplicitHealthCheckController.java b/services/core/java/com/android/server/ExplicitHealthCheckController.java
index 3d610d3747c9..6a6aea49f6f2 100644
--- a/services/core/java/com/android/server/ExplicitHealthCheckController.java
+++ b/services/core/java/com/android/server/ExplicitHealthCheckController.java
@@ -15,6 +15,7 @@
*/
package com.android.server;
+import static android.crashrecovery.flags.Flags.refactorCrashrecovery;
import static android.service.watchdog.ExplicitHealthCheckService.EXTRA_HEALTH_CHECK_PASSED_PACKAGE;
import static android.service.watchdog.ExplicitHealthCheckService.EXTRA_REQUESTED_PACKAGES;
import static android.service.watchdog.ExplicitHealthCheckService.EXTRA_SUPPORTED_PACKAGES;
@@ -41,7 +42,6 @@ import android.util.ArraySet;
import android.util.Slog;
import com.android.internal.annotations.GuardedBy;
-import com.android.internal.util.Preconditions;
import java.util.Collection;
import java.util.Collections;
@@ -363,22 +363,34 @@ class ExplicitHealthCheckController {
@GuardedBy("mLock")
@Nullable
private ServiceInfo getServiceInfoLocked() {
- final String packageName =
- mContext.getPackageManager().getServicesSystemSharedLibraryPackageName();
- if (packageName == null) {
- Slog.w(TAG, "no external services package!");
- return null;
- }
+ if (refactorCrashrecovery()) {
+ final Intent intent = new Intent(ExplicitHealthCheckService.SERVICE_INTERFACE);
+ final ResolveInfo resolveInfo = mContext.getPackageManager().resolveService(intent,
+ PackageManager.GET_SERVICES | PackageManager.GET_META_DATA
+ | PackageManager.MATCH_SYSTEM_ONLY);
+ if (resolveInfo == null || resolveInfo.serviceInfo == null) {
+ Slog.w(TAG, "No valid components found.");
+ return null;
+ }
+ return resolveInfo.serviceInfo;
+ } else {
+ final String packageName =
+ mContext.getPackageManager().getServicesSystemSharedLibraryPackageName();
+ if (packageName == null) {
+ Slog.w(TAG, "no external services package!");
+ return null;
+ }
- final Intent intent = new Intent(ExplicitHealthCheckService.SERVICE_INTERFACE);
- intent.setPackage(packageName);
- final ResolveInfo resolveInfo = mContext.getPackageManager().resolveService(intent,
- PackageManager.GET_SERVICES | PackageManager.GET_META_DATA);
- if (resolveInfo == null || resolveInfo.serviceInfo == null) {
- Slog.w(TAG, "No valid components found.");
- return null;
+ final Intent intent = new Intent(ExplicitHealthCheckService.SERVICE_INTERFACE);
+ intent.setPackage(packageName);
+ final ResolveInfo resolveInfo = mContext.getPackageManager().resolveService(intent,
+ PackageManager.GET_SERVICES | PackageManager.GET_META_DATA);
+ if (resolveInfo == null || resolveInfo.serviceInfo == null) {
+ Slog.w(TAG, "No valid components found.");
+ return null;
+ }
+ return resolveInfo.serviceInfo;
}
- return resolveInfo.serviceInfo;
}
@GuardedBy("mLock")
diff --git a/services/core/java/com/android/server/PackageWatchdog.java b/services/core/java/com/android/server/PackageWatchdog.java
index eb037095c6c9..d42a3dc9b6b3 100644
--- a/services/core/java/com/android/server/PackageWatchdog.java
+++ b/services/core/java/com/android/server/PackageWatchdog.java
@@ -16,13 +16,18 @@
package com.android.server;
+import static android.content.Intent.ACTION_REBOOT;
+import static android.content.Intent.ACTION_SHUTDOWN;
import static android.service.watchdog.ExplicitHealthCheckService.PackageConfig;
import static java.lang.annotation.RetentionPolicy.SOURCE;
import android.annotation.IntDef;
import android.annotation.Nullable;
+import android.content.BroadcastReceiver;
import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.VersionedPackage;
@@ -2001,6 +2006,31 @@ public class PackageWatchdog {
}
}
}
+ }
+
+ /**
+ * Register broadcast receiver for shutdown.
+ * We would save the observer state to persist across boots.
+ *
+ * @hide
+ */
+ public void registerShutdownBroadcastReceiver() {
+ BroadcastReceiver shutdownEventReceiver = new BroadcastReceiver() {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ // Only write if intent is relevant to device reboot or shutdown.
+ String intentAction = intent.getAction();
+ if (ACTION_REBOOT.equals(intentAction)
+ || ACTION_SHUTDOWN.equals(intentAction)) {
+ writeNow();
+ }
+ }
+ };
+ // Setup receiver for device reboots or shutdowns.
+ IntentFilter filter = new IntentFilter(ACTION_REBOOT);
+ filter.addAction(ACTION_SHUTDOWN);
+ mContext.registerReceiverForAllUsers(shutdownEventReceiver, filter, null,
+ /* run on main thread */ null);
}
}
diff --git a/services/core/java/com/android/server/TelephonyRegistry.java b/services/core/java/com/android/server/TelephonyRegistry.java
index bc83a0edd918..3633d0f9dd6f 100644
--- a/services/core/java/com/android/server/TelephonyRegistry.java
+++ b/services/core/java/com/android/server/TelephonyRegistry.java
@@ -921,8 +921,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
//helper function to determine if limit on num listeners applies to callingUid
private boolean doesLimitApplyForListeners(int callingUid, int exemptUid) {
- return (callingUid != Process.SYSTEM_UID
- && callingUid != Process.PHONE_UID
+ return (!TelephonyPermissions.isSystemOrPhone(callingUid)
&& callingUid != exemptUid);
}
@@ -2990,7 +2989,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
// Always redact location info from PhysicalChannelConfig if the registrant is from neither
// PHONE nor SYSTEM process. There is no user case that the registrant needs the location
// info (e.g. physicalCellId). This also remove the need for the location permissions check.
- return record.callerUid != Process.PHONE_UID && record.callerUid != Process.SYSTEM_UID;
+ return !TelephonyPermissions.isSystemOrPhone(record.callerUid);
}
/**
diff --git a/services/core/java/com/android/server/Watchdog.java b/services/core/java/com/android/server/Watchdog.java
index 21947bac137b..95dbaae2c43b 100644
--- a/services/core/java/com/android/server/Watchdog.java
+++ b/services/core/java/com/android/server/Watchdog.java
@@ -1016,6 +1016,7 @@ public class Watchdog implements Dumpable {
// Trigger the kernel to dump all blocked threads, and backtraces on all CPUs to the
// kernel log
doSysRq('w');
+ doSysRq('m');
doSysRq('l');
}
diff --git a/services/core/java/com/android/server/accounts/AccountManagerService.java b/services/core/java/com/android/server/accounts/AccountManagerService.java
index ac9ed0da95a5..458749d93e0a 100644
--- a/services/core/java/com/android/server/accounts/AccountManagerService.java
+++ b/services/core/java/com/android/server/accounts/AccountManagerService.java
@@ -1233,6 +1233,10 @@ public class AccountManagerService
obsoleteAuthType.add(type);
// And delete it from the TABLE_META
accountsDb.deleteMetaByAuthTypeAndUid(type, uid);
+ } else if (knownUid != null && knownUid != uid) {
+ Slog.w(TAG, "authenticator no longer exist for type " + type);
+ obsoleteAuthType.add(type);
+ accountsDb.deleteMetaByAuthTypeAndUid(type, uid);
}
}
}
@@ -5048,6 +5052,9 @@ public class AccountManagerService
if (resolveInfo == null) {
return false;
}
+ if ("content".equals(intent.getScheme())) {
+ return false;
+ }
ActivityInfo targetActivityInfo = resolveInfo.activityInfo;
int targetUid = targetActivityInfo.applicationInfo.uid;
PackageManagerInternal pmi = LocalServices.getService(PackageManagerInternal.class);
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index 25fb729e7e7c..cf0befaab98d 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -72,6 +72,7 @@ import static android.content.pm.PackageManager.MATCH_SYSTEM_ONLY;
import static android.content.pm.PackageManager.MATCH_UNINSTALLED_PACKAGES;
import static android.content.pm.PackageManager.PERMISSION_GRANTED;
import static android.content.pm.PackageManager.SIGNATURE_NO_MATCH;
+import static android.crashrecovery.flags.Flags.refactorCrashrecovery;
import static android.net.ConnectivityManager.BLOCKED_REASON_NONE;
import static android.os.FactoryTest.FACTORY_TEST_OFF;
import static android.os.IServiceManager.DUMP_FLAG_PRIORITY_CRITICAL;
@@ -2075,7 +2076,8 @@ public class ActivityManagerService extends IActivityManager.Stub
app.setPersistent(true);
app.setPid(MY_PID);
app.mState.setMaxAdj(ProcessList.SYSTEM_ADJ);
- app.makeActive(mSystemThread.getApplicationThread(), mProcessStats);
+ app.makeActive(new ApplicationThreadDeferred(mSystemThread.getApplicationThread()),
+ mProcessStats);
app.mProfile.addHostingComponentType(HOSTING_COMPONENT_TYPE_SYSTEM);
addPidLocked(app);
updateLruProcessLocked(app, false, null);
@@ -2322,7 +2324,9 @@ public class ActivityManagerService extends IActivityManager.Stub
} else if (phase == PHASE_ACTIVITY_MANAGER_READY) {
mService.startBroadcastObservers();
} else if (phase == PHASE_THIRD_PARTY_APPS_CAN_START) {
- mService.mPackageWatchdog.onPackagesReady();
+ if (!refactorCrashrecovery()) {
+ mService.mPackageWatchdog.onPackagesReady();
+ }
mService.scheduleHomeTimeout();
}
}
@@ -4871,7 +4875,7 @@ public class ActivityManagerService extends IActivityManager.Stub
// Make app active after binding application or client may be running requests (e.g
// starting activities) before it is ready.
synchronized (mProcLock) {
- app.makeActive(thread, mProcessStats);
+ app.makeActive(new ApplicationThreadDeferred(thread), mProcessStats);
checkTime(startTime, "attachApplicationLocked: immediately after bindApplication");
}
app.setPendingFinishAttach(true);
@@ -16957,16 +16961,24 @@ public class ActivityManagerService extends IActivityManager.Stub
int userId = UserHandle.getCallingUserId();
- if (UserManager.isVisibleBackgroundUsersEnabled() && userId != getCurrentUserId()) {
- // The check is added mainly for auto devices. On auto devices, it is possible that
- // multiple users are visible simultaneously using visible background users.
- // In such cases, it is desired that only the current user (not the visible background
- // user) can change the locale and other persistent settings of the device.
- Slog.w(TAG, "Only current user is allowed to update persistent configuration if "
- + "visible background users are enabled. Current User" + getCurrentUserId()
- + ". Calling User: " + userId);
- throw new SecurityException("Only current user is allowed to update persistent "
- + "configuration.");
+ if (UserManager.isVisibleBackgroundUsersEnabled()) {
+ final long origId = Binder.clearCallingIdentity();
+ try {
+ if (userId != getCurrentUserId()) {
+ // The check is added mainly for auto devices. On auto devices, it is
+ // possible that multiple users are visible simultaneously using visible
+ // background users. In such cases, it is desired that only the current user
+ // (not the visible background user) can change the locale and other persistent
+ // settings of the device.
+ Slog.w(TAG, "Only current user is allowed to update persistent configuration "
+ + "if visible background users are enabled. Current User"
+ + getCurrentUserId() + ". Calling User: " + userId);
+ throw new SecurityException("Only current user is allowed to update persistent "
+ + "configuration.");
+ }
+ } finally {
+ Binder.restoreCallingIdentity(origId);
+ }
}
mActivityTaskManager.updatePersistentConfiguration(values, userId);
diff --git a/services/core/java/com/android/server/am/AppErrors.java b/services/core/java/com/android/server/am/AppErrors.java
index 061bcd740f6b..ee7033e4a437 100644
--- a/services/core/java/com/android/server/am/AppErrors.java
+++ b/services/core/java/com/android/server/am/AppErrors.java
@@ -47,6 +47,7 @@ import android.os.Message;
import android.os.Process;
import android.os.SystemClock;
import android.os.UserHandle;
+import android.os.UserManager;
import android.provider.Settings;
import android.util.ArrayMap;
import android.util.ArraySet;
@@ -63,6 +64,8 @@ import com.android.internal.logging.MetricsLogger;
import com.android.internal.logging.nano.MetricsProto;
import com.android.server.LocalServices;
import com.android.server.PackageWatchdog;
+import com.android.server.pm.UserManagerInternal;
+import com.android.server.pm.UserManagerService;
import com.android.server.usage.AppStandbyInternal;
import com.android.server.wm.WindowProcessController;
@@ -868,9 +871,6 @@ class AppErrors {
private boolean handleAppCrashLSPB(ProcessRecord app, String reason,
String shortMsg, String longMsg, String stackTrace, AppErrorDialog.Data data) {
final long now = SystemClock.uptimeMillis();
- final boolean showBackground = Settings.Secure.getIntForUser(mContext.getContentResolver(),
- Settings.Secure.ANR_SHOW_BACKGROUND, 0,
- mService.mUserController.getCurrentUserId()) != 0;
Long crashTime;
Long crashTimePersistent;
@@ -881,6 +881,8 @@ class AppErrors {
final boolean persistent = app.isPersistent();
final WindowProcessController proc = app.getWindowProcessController();
final ProcessErrorStateRecord errState = app.mErrorState;
+ final boolean showBackground = Settings.Secure.getIntForUser(mContext.getContentResolver(),
+ Settings.Secure.ANR_SHOW_BACKGROUND, 0, getVisibleUserId(userId)) != 0;
if (!app.isolated) {
crashTime = mProcessCrashTimes.get(processName, uid);
@@ -1000,9 +1002,6 @@ class AppErrors {
void handleShowAppErrorUi(Message msg) {
AppErrorDialog.Data data = (AppErrorDialog.Data) msg.obj;
- boolean showBackground = Settings.Secure.getIntForUser(mContext.getContentResolver(),
- Settings.Secure.ANR_SHOW_BACKGROUND, 0,
- mService.mUserController.getCurrentUserId()) != 0;
final int userId;
synchronized (mProcLock) {
@@ -1027,7 +1026,11 @@ class AppErrors {
for (int profileId : mService.mUserController.getCurrentProfileIds()) {
isBackground &= (userId != profileId);
}
- if (isBackground && !showBackground) {
+ int visibleUserId = getVisibleUserId(userId);
+ boolean isVisibleUser = isVisibleBackgroundUser(visibleUserId);
+ boolean showBackground = Settings.Secure.getIntForUser(mContext.getContentResolver(),
+ Settings.Secure.ANR_SHOW_BACKGROUND, 0, visibleUserId) != 0;
+ if (isBackground && !showBackground && !isVisibleUser) {
Slog.w(TAG, "Skipping crash dialog of " + proc + ": background");
if (res != null) {
res.set(AppErrorDialog.BACKGROUND_USER);
@@ -1054,7 +1057,7 @@ class AppErrors {
final long now = SystemClock.uptimeMillis();
final boolean shouldThottle = crashShowErrorTime != null
&& now < crashShowErrorTime + ActivityManagerConstants.MIN_CRASH_INTERVAL;
- if ((mService.mAtmInternal.canShowErrorDialogs() || showBackground)
+ if ((mService.mAtmInternal.canShowErrorDialogs(visibleUserId) || showBackground)
&& !crashSilenced && !shouldThottle
&& (showFirstCrash || showFirstCrashDevOption || data.repeating)) {
Slog.i(TAG, "Showing crash dialog for package " + packageName + " u" + userId);
@@ -1103,10 +1106,10 @@ class AppErrors {
return;
}
+ int visibleUserId = getVisibleUserId(proc.userId);
boolean showBackground = Settings.Secure.getIntForUser(mContext.getContentResolver(),
- Settings.Secure.ANR_SHOW_BACKGROUND, 0,
- mService.mUserController.getCurrentUserId()) != 0;
- if (mService.mAtmInternal.canShowErrorDialogs() || showBackground) {
+ Settings.Secure.ANR_SHOW_BACKGROUND, 0, visibleUserId) != 0;
+ if (mService.mAtmInternal.canShowErrorDialogs(visibleUserId) || showBackground) {
AnrController anrController = errState.getDialogController().getAnrController();
if (anrController == null) {
errState.getDialogController().showAnrDialogs(data);
@@ -1163,6 +1166,43 @@ class AppErrors {
}
/**
+ * Returns the user ID of the visible user associated with the error occurrence.
+ *
+ * <p>For most cases it will return the current foreground user ID, but on devices that
+ * {@link UserManager#isVisibleBackgroundUsersEnabled() support visible background users},
+ * it will return the given app user ID passed as parameter.
+ *
+ * @param appUserId The user ID of the app where the error occurred.
+ * @return The ID of the visible user associated with the error.
+ */
+ private int getVisibleUserId(int appUserId) {
+ if (!UserManager.isVisibleBackgroundUsersEnabled()) {
+ return mService.mUserController.getCurrentUserId();
+ }
+ return appUserId;
+ }
+
+ /**
+ * Checks if the given user is a visible background user, which is a full, background user
+ * assigned to secondary displays on the devices that have
+ * {@link UserManager#isVisibleBackgroundUsersEnabled()
+ * config_multiuserVisibleBackgroundUsers enabled} (for example, passenger users on
+ * automotive builds, using the display associated with their seats).
+ *
+ * @see UserManager#isUserVisible()
+ */
+ private boolean isVisibleBackgroundUser(int userId) {
+ if (!UserManager.isVisibleBackgroundUsersEnabled()) {
+ return false;
+ }
+ boolean isForeground = mService.mUserController.getCurrentUserId() == userId;
+ boolean isProfile = UserManagerService.getInstance().isProfile(userId);
+ boolean isVisible = LocalServices.getService(UserManagerInternal.class)
+ .isUserVisible(userId);
+ return isVisible && !isForeground && !isProfile;
+ }
+
+ /**
* Information about a process that is currently marked as bad.
*/
static final class BadProcessInfo {
diff --git a/services/core/java/com/android/server/am/ApplicationThreadDeferred.java b/services/core/java/com/android/server/am/ApplicationThreadDeferred.java
new file mode 100644
index 000000000000..193edd2c66e2
--- /dev/null
+++ b/services/core/java/com/android/server/am/ApplicationThreadDeferred.java
@@ -0,0 +1,186 @@
+/*
+ * 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.server.am;
+
+import static com.android.server.am.ActivityManagerDebugConfig.TAG_AM;
+import static com.android.server.am.ActivityManagerDebugConfig.TAG_WITH_CLASS_NAME;
+
+import android.annotation.IntDef;
+import android.app.IApplicationThread;
+import android.os.RemoteException;
+
+import com.android.internal.annotations.GuardedBy;
+import com.android.internal.annotations.VisibleForTesting;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.util.Arrays;
+
+/**
+ * A subclass of {@link IApplicationThread} that defers certain binder calls while the process is
+ * paused (frozen). Any deferred calls are executed when the process is unpaused. In some cases,
+ * multiple instances of deferred calls are collapsed into a single call when the process is
+ * unpaused.
+ *
+ * {@hide}
+ */
+final class ApplicationThreadDeferred extends IApplicationThread.Delegator {
+
+ static final String TAG = TAG_WITH_CLASS_NAME ? "ApplicationThreadDeferred" : TAG_AM;
+
+ // The flag that enables the deferral behavior of this class. If the flag is disabled then
+ // the class behaves exactly like an ApplicationThreadFilter.
+ private static boolean deferBindersWhenPaused() {
+ return Flags.deferBindersWhenPaused();
+ }
+
+ // The list of notifications that may be deferred.
+ private static final int CLEAR_DNS_CACHE = 0;
+ private static final int UPDATE_TIME_ZONE = 1;
+ private static final int SCHEDULE_LOW_MEMORY = 2;
+ private static final int UPDATE_HTTP_PROXY = 3;
+ private static final int NOTIFICATION_COUNT = 4;
+
+ @IntDef(value = {
+ CLEAR_DNS_CACHE,
+ UPDATE_TIME_ZONE,
+ SCHEDULE_LOW_MEMORY,
+ UPDATE_HTTP_PROXY
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ private @interface NotificationType {};
+
+ private final Object mLock = new Object();
+
+ // If this is true, notifications should be queued for later delivery. If this is false,
+ // notifications should be delivered immediately.
+ @GuardedBy("mLock")
+ private boolean mPaused = false;
+
+ // An operation is a lambda that throws an exception.
+ private interface Operation {
+ void run() throws RemoteException;
+ }
+
+ // The array of operations.
+ @GuardedBy("mLock")
+ private final Operation[] mOperations = new Operation[NOTIFICATION_COUNT];
+
+ // The array of operations that actually pending right now.
+ @GuardedBy("mLock")
+ private final boolean[] mPending = new boolean[NOTIFICATION_COUNT];
+
+ // When true, binder calls to paused processes will be deferred until the process is unpaused.
+ private final boolean mDefer;
+
+ // The base thread, because Delegator does not expose it.
+ private final IApplicationThread mBase;
+
+ /** Create an instance with a base thread and a deferral enable flag. */
+ @VisibleForTesting
+ public ApplicationThreadDeferred(IApplicationThread thread, boolean defer) {
+ super(thread);
+
+ mBase = thread;
+ mDefer = defer;
+
+ mOperations[CLEAR_DNS_CACHE] = () -> { super.clearDnsCache(); };
+ mOperations[UPDATE_TIME_ZONE] = () -> { super.updateTimeZone(); };
+ mOperations[SCHEDULE_LOW_MEMORY] = () -> { super.scheduleLowMemory(); };
+ mOperations[UPDATE_HTTP_PROXY] = () -> { super.updateHttpProxy(); };
+ }
+
+ /** Create an instance with a base flag, using the system deferral enable flag. */
+ public ApplicationThreadDeferred(IApplicationThread thread) {
+ this(thread, deferBindersWhenPaused());
+ }
+
+ /**
+ * Return the implementation's value of asBinder(). super.asBinder() is not a real Binder
+ * object.
+ */
+ @Override
+ public android.os.IBinder asBinder() {
+ return mBase.asBinder();
+ }
+
+ /** The process is being paused. Start deferring calls. */
+ void onProcessPaused() {
+ synchronized (mLock) {
+ mPaused = true;
+ }
+ }
+
+ /** The process is no longer paused. Drain any deferred calls. */
+ void onProcessUnpaused() {
+ synchronized (mLock) {
+ mPaused = false;
+ try {
+ for (int i = 0; i < mOperations.length; i++) {
+ if (mPending[i]) {
+ mOperations[i].run();
+ }
+ }
+ } catch (RemoteException e) {
+ // Swallow the exception. The caller is not expecting it. Remote exceptions
+ // happen if a has process died; there is no need to report it here.
+ } finally {
+ Arrays.fill(mPending, false);
+ }
+ }
+ }
+
+ /** The pause operation has been canceled. Drain any deferred calls. */
+ void onProcessPausedCancelled() {
+ onProcessUnpaused();
+ }
+
+ /**
+ * If the thread is not paused, execute the operation. Otherwise, save it to the pending
+ * list.
+ */
+ private void execute(@NotificationType int tag) throws RemoteException {
+ synchronized (mLock) {
+ if (mPaused && mDefer) {
+ mPending[tag] = true;
+ return;
+ }
+ }
+ // Outside the synchronization block to avoid contention.
+ mOperations[tag].run();
+ }
+
+ @Override
+ public void clearDnsCache() throws RemoteException {
+ execute(CLEAR_DNS_CACHE);
+ }
+
+ @Override
+ public void updateTimeZone() throws RemoteException {
+ execute(UPDATE_TIME_ZONE);
+ }
+
+ @Override
+ public void scheduleLowMemory() throws RemoteException {
+ execute(SCHEDULE_LOW_MEMORY);
+ }
+
+ @Override
+ public void updateHttpProxy() throws RemoteException {
+ execute(UPDATE_HTTP_PROXY);
+ }
+}
diff --git a/services/core/java/com/android/server/am/BatteryStatsService.java b/services/core/java/com/android/server/am/BatteryStatsService.java
index 00183ac0350b..8df4e7702be8 100644
--- a/services/core/java/com/android/server/am/BatteryStatsService.java
+++ b/services/core/java/com/android/server/am/BatteryStatsService.java
@@ -76,6 +76,7 @@ import android.os.ResultReceiver;
import android.os.ServiceManager;
import android.os.SystemClock;
import android.os.Trace;
+import android.os.UidBatteryConsumer;
import android.os.UserHandle;
import android.os.WakeLockStats;
import android.os.WorkSource;
@@ -101,6 +102,7 @@ import android.util.StatsEvent;
import com.android.internal.R;
import com.android.internal.annotations.GuardedBy;
+import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.app.IBatteryStats;
import com.android.internal.os.BinderCallsStats;
import com.android.internal.os.Clock;
@@ -158,6 +160,7 @@ import java.nio.charset.CodingErrorAction;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import java.util.Collection;
+import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -669,6 +672,12 @@ public final class BatteryStatsService extends IBatteryStats.Stub
BatteryConsumer.POWER_COMPONENT_FLASHLIGHT,
Flags.streamlinedMiscBatteryStats());
+ mStats.setPowerStatsCollectorEnabled(BatteryConsumer.POWER_COMPONENT_GNSS,
+ Flags.streamlinedMiscBatteryStats());
+ mBatteryUsageStatsProvider.setPowerStatsExporterEnabled(
+ BatteryConsumer.POWER_COMPONENT_GNSS,
+ Flags.streamlinedMiscBatteryStats());
+
mStats.setPowerStatsCollectorEnabled(BatteryConsumer.POWER_COMPONENT_CAMERA,
Flags.streamlinedMiscBatteryStats());
mBatteryUsageStatsProvider.setPowerStatsExporterEnabled(
@@ -1095,18 +1104,27 @@ public final class BatteryStatsService extends IBatteryStats.Stub
final StatsManager statsManager = mContext.getSystemService(StatsManager.class);
final StatsPullAtomCallbackImpl pullAtomCallback = new StatsPullAtomCallbackImpl();
- statsManager.setPullAtomCallback(
- FrameworkStatsLog.BATTERY_USAGE_STATS_SINCE_RESET,
- null, // use default PullAtomMetadata values
- DIRECT_EXECUTOR, pullAtomCallback);
- statsManager.setPullAtomCallback(
- FrameworkStatsLog.BATTERY_USAGE_STATS_SINCE_RESET_USING_POWER_PROFILE_MODEL,
- null, // use default PullAtomMetadata values
- DIRECT_EXECUTOR, pullAtomCallback);
- statsManager.setPullAtomCallback(
- FrameworkStatsLog.BATTERY_USAGE_STATS_BEFORE_RESET,
- null, // use default PullAtomMetadata values
- DIRECT_EXECUTOR, pullAtomCallback);
+ if (!Flags.disableCompositeBatteryUsageStatsAtoms()) {
+ statsManager.setPullAtomCallback(
+ FrameworkStatsLog.BATTERY_USAGE_STATS_SINCE_RESET,
+ null, // use default PullAtomMetadata values
+ DIRECT_EXECUTOR, pullAtomCallback);
+ statsManager.setPullAtomCallback(
+ FrameworkStatsLog.BATTERY_USAGE_STATS_SINCE_RESET_USING_POWER_PROFILE_MODEL,
+ null, // use default PullAtomMetadata values
+ DIRECT_EXECUTOR, pullAtomCallback);
+ statsManager.setPullAtomCallback(
+ FrameworkStatsLog.BATTERY_USAGE_STATS_BEFORE_RESET,
+ null, // use default PullAtomMetadata values
+ DIRECT_EXECUTOR, pullAtomCallback);
+ }
+ if (Flags.addBatteryUsageStatsSliceAtom()) {
+ statsManager.setPullAtomCallback(
+ FrameworkStatsLog.BATTERY_USAGE_STATS_PER_UID,
+ null, // use default PullAtomMetadata values
+ DIRECT_EXECUTOR,
+ pullAtomCallback);
+ }
}
/** StatsPullAtomCallback for pulling BatteryUsageStats data. */
@@ -1115,7 +1133,11 @@ public final class BatteryStatsService extends IBatteryStats.Stub
public int onPullAtom(int atomTag, List<StatsEvent> data) {
final BatteryUsageStats bus;
switch (atomTag) {
- case FrameworkStatsLog.BATTERY_USAGE_STATS_SINCE_RESET:
+ case FrameworkStatsLog.BATTERY_USAGE_STATS_SINCE_RESET: {
+ if (Flags.disableCompositeBatteryUsageStatsAtoms()) {
+ return StatsManager.PULL_SKIP;
+ }
+
@SuppressLint("MissingPermission")
final double minConsumedPowerThreshold =
DeviceConfig.getFloat(DEVICE_CONFIG_NAMESPACE,
@@ -1130,7 +1152,12 @@ public final class BatteryStatsService extends IBatteryStats.Stub
.build();
bus = getBatteryUsageStats(List.of(querySinceReset)).get(0);
break;
+ }
case FrameworkStatsLog.BATTERY_USAGE_STATS_SINCE_RESET_USING_POWER_PROFILE_MODEL:
+ if (Flags.disableCompositeBatteryUsageStatsAtoms()) {
+ return StatsManager.PULL_SKIP;
+ }
+
final BatteryUsageStatsQuery queryPowerProfile =
new BatteryUsageStatsQuery.Builder()
.setMaxStatsAgeMs(0)
@@ -1141,7 +1168,11 @@ public final class BatteryStatsService extends IBatteryStats.Stub
.build();
bus = getBatteryUsageStats(List.of(queryPowerProfile)).get(0);
break;
- case FrameworkStatsLog.BATTERY_USAGE_STATS_BEFORE_RESET:
+ case FrameworkStatsLog.BATTERY_USAGE_STATS_BEFORE_RESET: {
+ if (Flags.disableCompositeBatteryUsageStatsAtoms()) {
+ return StatsManager.PULL_SKIP;
+ }
+
final long sessionStart =
getLastBatteryUsageStatsBeforeResetAtomPullTimestamp();
final long sessionEnd;
@@ -1158,6 +1189,31 @@ public final class BatteryStatsService extends IBatteryStats.Stub
bus = getBatteryUsageStats(List.of(queryBeforeReset)).get(0);
setLastBatteryUsageStatsBeforeResetAtomPullTimestamp(sessionEnd);
break;
+ }
+ case FrameworkStatsLog.BATTERY_USAGE_STATS_PER_UID: {
+ if (!Flags.addBatteryUsageStatsSliceAtom()) {
+ return StatsManager.PULL_SKIP;
+ }
+
+ @SuppressLint("MissingPermission")
+ final double minConsumedPowerThreshold =
+ DeviceConfig.getFloat(
+ DEVICE_CONFIG_NAMESPACE,
+ MIN_CONSUMED_POWER_THRESHOLD_KEY,
+ 0);
+ final long sessionStart = 0;
+ final long sessionEnd = System.currentTimeMillis();
+ final BatteryUsageStatsQuery query =
+ new BatteryUsageStatsQuery.Builder()
+ .setMaxStatsAgeMs(0)
+ .includeProcessStateData()
+ .includeVirtualUids()
+ .aggregateSnapshots(sessionStart, sessionEnd)
+ .setMinConsumedPowerThreshold(minConsumedPowerThreshold)
+ .build();
+ bus = getBatteryUsageStats(List.of(query)).get(0);
+ return new StatsPerUidLogger(new FrameworkStatsLogger()).logStats(bus, data);
+ }
default:
throw new UnsupportedOperationException("Unknown tagId=" + atomTag);
}
@@ -1169,6 +1225,299 @@ public final class BatteryStatsService extends IBatteryStats.Stub
}
}
+ public static class FrameworkStatsLogger {
+ /**
+ * Wrapper for the FrameworkStatsLog.buildStatsEvent method that makes it easier
+ * for mocking.
+ */
+ @VisibleForTesting
+ public StatsEvent buildStatsEvent(long sessionStartTs, long sessionEndTs,
+ long sessionDuration, int sessionDischargePercentage, long sessionDischargeDuration,
+ int uid, @BatteryConsumer.ProcessState int processState, long timeInStateMillis,
+ String powerComponentName, float totalConsumedPowerMah, float powerComponentMah,
+ long powerComponentDurationMillis) {
+ return FrameworkStatsLog.buildStatsEvent(
+ FrameworkStatsLog.BATTERY_USAGE_STATS_PER_UID,
+ sessionStartTs,
+ sessionEndTs,
+ sessionDuration,
+ sessionDischargePercentage,
+ sessionDischargeDuration,
+ uid,
+ processState,
+ timeInStateMillis,
+ powerComponentName,
+ totalConsumedPowerMah,
+ powerComponentMah,
+ powerComponentDurationMillis);
+ }
+ }
+
+ public static class StatsPerUidLogger {
+
+ private static final int STATSD_METRIC_MAX_DIMENSIONS_COUNT = 3000;
+
+ private static final int[] UID_PROCESS_STATES = {
+ BatteryConsumer.PROCESS_STATE_UNSPECIFIED,
+ BatteryConsumer.PROCESS_STATE_FOREGROUND,
+ BatteryConsumer.PROCESS_STATE_BACKGROUND,
+ BatteryConsumer.PROCESS_STATE_FOREGROUND_SERVICE,
+ BatteryConsumer.PROCESS_STATE_CACHED
+ };
+
+ public record SessionInfo(
+ long startTs,
+ long endTs,
+ long duration,
+ int dischargePercentage,
+ long dischargeDuration) {}
+ ;
+
+ private final FrameworkStatsLogger mFrameworkStatsLogger;
+
+ public StatsPerUidLogger(FrameworkStatsLogger frameworkStatsLogger) {
+ mFrameworkStatsLogger = frameworkStatsLogger;
+ }
+
+ /**
+ * Generates StatsEvents for the supplied battery usage stats and adds them to
+ * the supplied list.
+ */
+ @VisibleForTesting
+ public int logStats(BatteryUsageStats bus, List<StatsEvent> data) {
+ final SessionInfo sessionInfo =
+ new SessionInfo(
+ bus.getStatsStartTimestamp(),
+ bus.getStatsEndTimestamp(),
+ bus.getStatsDuration(),
+ bus.getDischargePercentage(),
+ bus.getDischargeDurationMs());
+
+ if (DBG) {
+ Slog.d(TAG, "BatteryUsageStats dump = " + bus);
+ }
+ final BatteryConsumer deviceConsumer =
+ bus.getAggregateBatteryConsumer(
+ BatteryUsageStats.AGGREGATE_BATTERY_CONSUMER_SCOPE_DEVICE);
+
+ final float totalDeviceConsumedPowerMah = (float) deviceConsumer.getConsumedPower();
+
+ for (@BatteryConsumer.PowerComponent int componentId = 0;
+ componentId < BatteryConsumer.POWER_COMPONENT_COUNT;
+ componentId++) {
+
+ for (@BatteryConsumer.ProcessState int processState : UID_PROCESS_STATES) {
+
+ if (!addStatsForPredefinedComponent(
+ data,
+ sessionInfo,
+ Process.INVALID_UID,
+ processState,
+ totalDeviceConsumedPowerMah,
+ deviceConsumer,
+ componentId)) {
+ return StatsManager.PULL_SUCCESS;
+ }
+ }
+ }
+
+ final int customPowerComponentCount = deviceConsumer.getCustomPowerComponentCount();
+ for (int componentId = BatteryConsumer.FIRST_CUSTOM_POWER_COMPONENT_ID;
+ componentId
+ < BatteryConsumer.FIRST_CUSTOM_POWER_COMPONENT_ID
+ + customPowerComponentCount;
+ componentId++) {
+
+ if (!addStatsForCustomComponent(
+ data,
+ sessionInfo,
+ Process.INVALID_UID,
+ BatteryConsumer.PROCESS_STATE_UNSPECIFIED,
+ 0,
+ totalDeviceConsumedPowerMah,
+ deviceConsumer,
+ componentId)) {
+ return StatsManager.PULL_SUCCESS;
+ }
+ }
+
+ final List<UidBatteryConsumer> uidConsumers = bus.getUidBatteryConsumers();
+ uidConsumers.sort(
+ Comparator.<BatteryConsumer>comparingDouble(BatteryConsumer::getConsumedPower)
+ .reversed());
+
+ // Log single atom for BatteryUsageStats per uid/process_state/component/etc.
+ for (UidBatteryConsumer uidConsumer : uidConsumers) {
+ final int uid = uidConsumer.getUid();
+ final float totalConsumedPowerMah = (float) uidConsumer.getConsumedPower();
+
+ for (@BatteryConsumer.PowerComponent int componentId = 0;
+ componentId < BatteryConsumer.POWER_COMPONENT_COUNT;
+ componentId++) {
+
+ for (@BatteryConsumer.ProcessState int processState : UID_PROCESS_STATES) {
+
+ if (!addStatsForPredefinedComponent(
+ data,
+ sessionInfo,
+ uid,
+ processState,
+ totalConsumedPowerMah,
+ uidConsumer,
+ componentId)) {
+ return StatsManager.PULL_SUCCESS;
+ }
+ }
+ }
+
+ // looping over custom components
+ for (int componentId = BatteryConsumer.FIRST_CUSTOM_POWER_COMPONENT_ID;
+ componentId
+ < BatteryConsumer.FIRST_CUSTOM_POWER_COMPONENT_ID
+ + customPowerComponentCount;
+ componentId++) {
+ for (@BatteryConsumer.ProcessState int processState : UID_PROCESS_STATES) {
+ final long timeInStateMillis =
+ uidConsumer.getTimeInProcessStateMs(processState);
+ if (timeInStateMillis <= 0) {
+ continue;
+ }
+
+ if (!addStatsForCustomComponent(
+ data,
+ sessionInfo,
+ uid,
+ processState,
+ timeInStateMillis,
+ totalConsumedPowerMah,
+ uidConsumer,
+ componentId)) {
+ return StatsManager.PULL_SUCCESS;
+ }
+ }
+ }
+ }
+ return StatsManager.PULL_SUCCESS;
+ }
+
+ private boolean addStatsForPredefinedComponent(
+ List<StatsEvent> data,
+ SessionInfo sessionInfo,
+ int uid,
+ @BatteryConsumer.ProcessState int processState,
+ float totalConsumedPowerMah,
+ BatteryConsumer batteryConsumer,
+ @BatteryConsumer.PowerComponent int componentId) {
+ final BatteryConsumer.Key key = batteryConsumer.getKey(componentId, processState);
+ if (key == null) {
+ return true;
+ }
+
+ final String powerComponentName = BatteryConsumer.powerComponentIdToString(componentId);
+ final float powerMah = (float) batteryConsumer.getConsumedPower(key);
+ final long powerComponentDurationMillis = batteryConsumer.getUsageDurationMillis(key);
+
+ if (powerMah == 0 && powerComponentDurationMillis == 0) {
+ return true;
+ }
+
+ long timeInState = 0;
+ if (batteryConsumer instanceof UidBatteryConsumer) {
+ timeInState =
+ ((UidBatteryConsumer) batteryConsumer)
+ .getTimeInProcessStateMs(processState);
+ }
+
+ return addStatsAtom(
+ data,
+ sessionInfo,
+ uid,
+ processState,
+ timeInState,
+ powerComponentName,
+ totalConsumedPowerMah,
+ powerMah,
+ powerComponentDurationMillis);
+ }
+
+ private boolean addStatsForCustomComponent(
+ List<StatsEvent> data,
+ SessionInfo sessionInfo,
+ int uid,
+ @BatteryConsumer.ProcessState int processState,
+ long timeInStateMillis,
+ float totalConsumedPowerMah,
+ BatteryConsumer batteryConsumer,
+ int componentId) {
+
+ if (componentId < BatteryConsumer.FIRST_CUSTOM_POWER_COMPONENT_ID) {
+ throw new IllegalArgumentException("Invalid custom component id: " + componentId);
+ }
+
+ final float powerMah =
+ (float) batteryConsumer.getConsumedPowerForCustomComponent(componentId);
+ if (powerMah == 0) {
+ return true;
+ }
+
+ final String powerComponentName =
+ batteryConsumer.getCustomPowerComponentName(componentId);
+
+ final long powerComponentDurationMillis =
+ batteryConsumer.getUsageDurationForCustomComponentMillis(componentId);
+
+ return addStatsAtom(
+ data,
+ sessionInfo,
+ uid,
+ processState,
+ timeInStateMillis,
+ powerComponentName,
+ totalConsumedPowerMah,
+ powerMah,
+ powerComponentDurationMillis);
+ }
+
+ /**
+ * Returns true on success and false if reached max atoms capacity and no more atoms should
+ * be added
+ */
+ private boolean addStatsAtom(
+ List<StatsEvent> data,
+ SessionInfo sessionInfo,
+ int uid,
+ int processState,
+ long timeInStateMillis,
+ String powerComponentName,
+ float totalConsumedPowerMah,
+ float powerComponentMah,
+ long powerComponentDurationMillis) {
+ data.add(mFrameworkStatsLogger.buildStatsEvent(
+ sessionInfo.startTs(),
+ sessionInfo.endTs(),
+ sessionInfo.duration(),
+ sessionInfo.dischargePercentage(),
+ sessionInfo.dischargeDuration(),
+ uid,
+ processState,
+ timeInStateMillis,
+ powerComponentName,
+ totalConsumedPowerMah,
+ powerComponentMah,
+ powerComponentDurationMillis));
+
+ // Early termination due to statsd dimensions guardrail
+ if (data.size() == STATSD_METRIC_MAX_DIMENSIONS_COUNT) {
+ Slog.w(
+ TAG,
+ "BATTERY_USAGE_STATS_PER_UID is complete reaching"
+ + " dimension guardrail");
+ return false;
+ }
+ return true;
+ }
+ }
+
@Override
@RequiresNoPermission
public boolean isCharging() {
@@ -2824,9 +3173,11 @@ public final class BatteryStatsService extends IBatteryStats.Stub
pw.println(" --checkin: generate output for a checkin report; will write (and clear) the");
pw.println(" last old completed stats when they had been reset.");
pw.println(" -c: write the current stats in checkin format.");
- pw.println(" --proto: write the current aggregate stats (without history) in proto format.");
+ pw.println(
+ " --proto: write the current aggregate stats (without history) in proto format.");
pw.println(" --history: show only history data.");
- pw.println(" --history-start <num>: show only history data starting at given time offset.");
+ pw.println(
+ " --history-start <num>: show only history data starting at given time offset.");
pw.println(" --history-create-events <num>: create <num> of battery history events.");
pw.println(" --charged: only output data since last charged.");
pw.println(" --daily: only output full daily data.");
@@ -2850,12 +3201,15 @@ public final class BatteryStatsService extends IBatteryStats.Stub
pw.println(" -h: print this help text.");
pw.println("Battery stats (batterystats) commands:");
pw.println(" enable|disable <option>");
- pw.println(" Enable or disable a running option. Option state is not saved across boots.");
+ pw.println(
+ " Enable or disable a running option. Option state is not saved across boots.");
pw.println(" Options are:");
pw.println(" full-history: include additional detailed events in battery history:");
pw.println(" wake_lock_in, alarms and proc events");
pw.println(" no-auto-reset: don't automatically reset stats when unplugged");
- pw.println(" pretend-screen-off: pretend the screen is off, even if screen state changes");
+ pw.println(
+ " pretend-screen-off: pretend the screen is off, even if screen state"
+ + " changes");
}
private void dumpSettings(PrintWriter pw) {
@@ -2918,6 +3272,9 @@ public final class BatteryStatsService extends IBatteryStats.Stub
.setMaxStatsAgeMs(0)
.includeProcessStateData()
.includePowerModels();
+ if (Flags.batteryUsageStatsByPowerAndScreenState()) {
+ builder.includeScreenStateData().includePowerStateData();
+ }
if (model == BatteryConsumer.POWER_MODEL_POWER_PROFILE) {
builder.powerProfileModeledOnly();
}
@@ -2936,7 +3293,7 @@ public final class BatteryStatsService extends IBatteryStats.Stub
if (proto) {
batteryUsageStats.dumpToProto(fd);
} else {
- batteryUsageStats.dump(pw, "");
+ batteryUsageStats.dump(pw, " ");
}
}
diff --git a/services/core/java/com/android/server/am/BroadcastQueueModernImpl.java b/services/core/java/com/android/server/am/BroadcastQueueModernImpl.java
index aeebae43d1ef..a7b2eb155558 100644
--- a/services/core/java/com/android/server/am/BroadcastQueueModernImpl.java
+++ b/services/core/java/com/android/server/am/BroadcastQueueModernImpl.java
@@ -2135,8 +2135,13 @@ class BroadcastQueueModernImpl extends BroadcastQueue {
final boolean targetedBroadcast = r.intent.getComponent() != null;
final boolean targetedSelf = Objects.equals(r.callerPackage, receiverPackageName);
if (targetedBroadcast && !targetedSelf) {
- mService.mUsageStatsService.reportEvent(receiverPackageName,
- r.userId, Event.APP_COMPONENT_USED);
+ if (r.userId == UserHandle.USER_ALL) {
+ mService.mUsageStatsService.reportEventForAllUsers(
+ receiverPackageName, Event.APP_COMPONENT_USED);
+ } else {
+ mService.mUsageStatsService.reportEvent(receiverPackageName,
+ r.userId, Event.APP_COMPONENT_USED);
+ }
}
mService.notifyPackageUse(receiverPackageName,
diff --git a/services/core/java/com/android/server/am/CachedAppOptimizer.java b/services/core/java/com/android/server/am/CachedAppOptimizer.java
index 6433f2c1c25d..1c4ffbb812a4 100644
--- a/services/core/java/com/android/server/am/CachedAppOptimizer.java
+++ b/services/core/java/com/android/server/am/CachedAppOptimizer.java
@@ -2656,6 +2656,7 @@ public final class CachedAppOptimizer {
// PIDs that run out of async binder buffer when being frozen
ArraySet<Integer> pidsAsync = (mFreezerBinderAsyncThreshold < 0) ? null : new ArraySet<>();
+ Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "binderErrorSync");
for (int i = 0; i < pids.size(); i++) {
int current = pids.get(i);
try {
@@ -2684,6 +2685,7 @@ public final class CachedAppOptimizer {
Slog.w(TAG_AM, "Unable to query binder frozen stats for pid " + current);
}
}
+ Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER);
// TODO: when kernel binder driver supports, poll the binder status directly.
// Binderfs stats, like other debugfs files, is not a reliable interface. But it's the
@@ -2693,6 +2695,8 @@ public final class CachedAppOptimizer {
if (pidsAsync == null || pidsAsync.size() == 0) {
return;
}
+
+ Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "binderErrorAsync");
new BinderfsStatsReader().handleFreeAsyncSpace(
// Check if the frozen process has pending async calls
pidsAsync::contains,
@@ -2710,5 +2714,6 @@ public final class CachedAppOptimizer {
// Log the error if binderfs stats can't be accesses or correctly parsed
exception -> Slog.e(TAG_AM, "Unable to parse binderfs stats"));
+ Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER);
}
}
diff --git a/services/core/java/com/android/server/am/OomAdjuster.java b/services/core/java/com/android/server/am/OomAdjuster.java
index b058bd8eb3d6..504c54aefc44 100644
--- a/services/core/java/com/android/server/am/OomAdjuster.java
+++ b/services/core/java/com/android/server/am/OomAdjuster.java
@@ -1708,6 +1708,11 @@ public class OomAdjuster {
// priority for this non-top split.
schedGroup = SCHED_GROUP_TOP_APP;
mAdjType = "resumed-split-screen-activity";
+ } else if ((flags
+ & WindowProcessController.ACTIVITY_STATE_FLAG_PERCEPTIBLE_FREEFORM) != 0) {
+ // The recently used non-top visible freeform app.
+ schedGroup = SCHED_GROUP_TOP_APP;
+ mAdjType = "perceptible-freeform-activity";
}
foregroundActivities = true;
mHasVisibleActivities = true;
diff --git a/services/core/java/com/android/server/am/ProcessRecord.java b/services/core/java/com/android/server/am/ProcessRecord.java
index a74c4896dd8c..3e71d003f455 100644
--- a/services/core/java/com/android/server/am/ProcessRecord.java
+++ b/services/core/java/com/android/server/am/ProcessRecord.java
@@ -151,7 +151,7 @@ class ProcessRecord implements WindowProcessListener {
* (in which case we are in the process of launching the app).
*/
@CompositeRWLock({"mService", "mProcLock"})
- private IApplicationThread mThread;
+ private ApplicationThreadDeferred mThread;
/**
* Instance of {@link #mThread} that will always meet the {@code oneway}
@@ -737,15 +737,15 @@ class ProcessRecord implements WindowProcessListener {
}
@GuardedBy({"mService", "mProcLock"})
- public void makeActive(IApplicationThread thread, ProcessStatsService tracker) {
+ public void makeActive(ApplicationThreadDeferred thread, ProcessStatsService tracker) {
mProfile.onProcessActive(thread, tracker);
mThread = thread;
if (mPid == Process.myPid()) {
- mOnewayThread = new SameProcessApplicationThread(thread, FgThread.getHandler());
+ mOnewayThread = new SameProcessApplicationThread(mThread, FgThread.getHandler());
} else {
- mOnewayThread = thread;
+ mOnewayThread = mThread;
}
- mWindowProcessController.setThread(thread);
+ mWindowProcessController.setThread(mThread);
if (mWindowProcessController.useFifoUiScheduling()) {
mService.mSpecifiedFifoProcesses.add(this);
}
@@ -1436,14 +1436,17 @@ class ProcessRecord implements WindowProcessListener {
void onProcessFrozen() {
mProfile.onProcessFrozen();
+ if (mThread != null) mThread.onProcessPaused();
}
void onProcessUnfrozen() {
+ if (mThread != null) mThread.onProcessUnpaused();
mProfile.onProcessUnfrozen();
mServices.onProcessUnfrozen();
}
void onProcessFrozenCancelled() {
+ if (mThread != null) mThread.onProcessPausedCancelled();
mServices.onProcessFrozenCancelled();
}
diff --git a/services/core/java/com/android/server/am/SettingsToPropertiesMapper.java b/services/core/java/com/android/server/am/SettingsToPropertiesMapper.java
index 932b9c0324fa..7f43fae72d60 100644
--- a/services/core/java/com/android/server/am/SettingsToPropertiesMapper.java
+++ b/services/core/java/com/android/server/am/SettingsToPropertiesMapper.java
@@ -210,6 +210,7 @@ public class SettingsToPropertiesMapper {
"safety_center",
"sensors",
"spoon",
+ "stability",
"statsd",
"system_performance",
"system_sw_touch",
diff --git a/services/core/java/com/android/server/am/flags.aconfig b/services/core/java/com/android/server/am/flags.aconfig
index 9b380ff12e2d..5315167b46eb 100644
--- a/services/core/java/com/android/server/am/flags.aconfig
+++ b/services/core/java/com/android/server/am/flags.aconfig
@@ -163,7 +163,7 @@ flag {
flag {
name: "collect_logcat_on_run_synchronously"
- namespace: "dropbox"
+ namespace: "stability"
description: "Allow logcat collection on synchronous dropbox collection"
bug: "324222683"
is_fixed_read_only: true
@@ -171,8 +171,16 @@ flag {
flag {
name: "enable_dropbox_watchdog_headers"
- namespace: "dropbox"
+ namespace: "stability"
description: "Add watchdog-specific dropbox headers"
bug: "330682397"
is_fixed_read_only: true
}
+
+flag {
+ name: "defer_binders_when_paused"
+ namespace: "system_performance"
+ is_fixed_read_only: true
+ description: "Defer submitting binder calls to paused processes."
+ bug: "327038797"
+}
diff --git a/services/core/java/com/android/server/app/GameManagerService.java b/services/core/java/com/android/server/app/GameManagerService.java
index f6df60f736e8..e4c65bd2147d 100644
--- a/services/core/java/com/android/server/app/GameManagerService.java
+++ b/services/core/java/com/android/server/app/GameManagerService.java
@@ -269,7 +269,8 @@ public final class GameManagerService extends IGameManagerService.Stub {
@Override
public void onShellCommand(FileDescriptor in, FileDescriptor out, FileDescriptor err,
String[] args, ShellCallback callback, ResultReceiver result) {
- new GameManagerShellCommand().exec(this, in, out, err, args, callback, result);
+ new GameManagerShellCommand(mPackageManager).exec(this, in, out, err, args, callback,
+ result);
}
@Override
diff --git a/services/core/java/com/android/server/app/GameManagerShellCommand.java b/services/core/java/com/android/server/app/GameManagerShellCommand.java
index ab57c4fe837e..d3b4312bf4a3 100644
--- a/services/core/java/com/android/server/app/GameManagerShellCommand.java
+++ b/services/core/java/com/android/server/app/GameManagerShellCommand.java
@@ -16,10 +16,13 @@
package com.android.server.app;
+import android.annotation.NonNull;
import android.app.ActivityManager;
import android.app.GameManager;
import android.app.IGameManagerService;
import android.content.Context;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.ServiceManager.ServiceNotFoundException;
@@ -47,7 +50,10 @@ public class GameManagerShellCommand extends ShellCommand {
private static final String UNSUPPORTED_MODE_NUM = String.valueOf(
GameManager.GAME_MODE_UNSUPPORTED);
- public GameManagerShellCommand() {
+ private PackageManager mPackageManager;
+
+ public GameManagerShellCommand(@NonNull PackageManager packageManager) {
+ mPackageManager = packageManager;
}
@Override
@@ -91,9 +97,29 @@ public class GameManagerShellCommand extends ShellCommand {
return -1;
}
+ private boolean isPackageGame(String packageName, int userId, PrintWriter pw) {
+ try {
+ final ApplicationInfo applicationInfo = mPackageManager
+ .getApplicationInfoAsUser(packageName, PackageManager.MATCH_ALL, userId);
+ boolean isGame = applicationInfo.category == ApplicationInfo.CATEGORY_GAME;
+ if (!isGame) {
+ pw.println("Package " + packageName + " is not of game type, to use the game "
+ + "mode commands, it must specify game category in the manifest as "
+ + "android:appCategory=\"game\"");
+ }
+ return isGame;
+ } catch (PackageManager.NameNotFoundException e) {
+ pw.println("Package " + packageName + " is not found for user " + userId);
+ return false;
+ }
+ }
+
private int runListGameModes(PrintWriter pw) throws ServiceNotFoundException, RemoteException {
final String packageName = getNextArgRequired();
final int userId = ActivityManager.getCurrentUser();
+ if (!isPackageGame(packageName, userId, pw)) {
+ return -1;
+ }
final GameManagerService gameManagerService = (GameManagerService)
ServiceManager.getService(Context.GAME_SERVICE);
final String currentMode = gameModeIntToString(
@@ -110,12 +136,15 @@ public class GameManagerShellCommand extends ShellCommand {
private int runListGameModeConfigs(PrintWriter pw)
throws ServiceNotFoundException, RemoteException {
final String packageName = getNextArgRequired();
-
+ final int userId = ActivityManager.getCurrentUser();
+ if (!isPackageGame(packageName, userId, pw)) {
+ return -1;
+ }
final GameManagerService gameManagerService = (GameManagerService)
ServiceManager.getService(Context.GAME_SERVICE);
final String listStr = gameManagerService.getInterventionList(packageName,
- ActivityManager.getCurrentUser());
+ userId);
if (listStr == null) {
pw.println("No interventions found for " + packageName);
@@ -131,15 +160,17 @@ public class GameManagerShellCommand extends ShellCommand {
if (option != null && option.equals("--user")) {
userIdStr = getNextArgRequired();
}
-
final String gameMode = getNextArgRequired();
final String packageName = getNextArgRequired();
+ int userId = userIdStr != null ? Integer.parseInt(userIdStr)
+ : ActivityManager.getCurrentUser();
+ if (!isPackageGame(packageName, userId, pw)) {
+ return -1;
+ }
final IGameManagerService service = IGameManagerService.Stub.asInterface(
ServiceManager.getServiceOrThrow(Context.GAME_SERVICE));
boolean batteryModeSupported = false;
boolean perfModeSupported = false;
- int userId = userIdStr != null ? Integer.parseInt(userIdStr)
- : ActivityManager.getCurrentUser();
int[] modes = service.getAvailableGameModes(packageName, userId);
for (int mode : modes) {
if (mode == GameManager.GAME_MODE_PERFORMANCE) {
@@ -262,6 +293,9 @@ public class GameManagerShellCommand extends ShellCommand {
int userId = userIdStr != null ? Integer.parseInt(userIdStr)
: ActivityManager.getCurrentUser();
+ if (!isPackageGame(packageName, userId, pw)) {
+ return -1;
+ }
final GameManagerService gameManagerService = (GameManagerService)
ServiceManager.getService(Context.GAME_SERVICE);
@@ -308,13 +342,14 @@ public class GameManagerShellCommand extends ShellCommand {
}
final String packageName = getNextArgRequired();
-
- final GameManagerService gameManagerService = (GameManagerService)
- ServiceManager.getService(Context.GAME_SERVICE);
-
int userId = userIdStr != null ? Integer.parseInt(userIdStr)
: ActivityManager.getCurrentUser();
+ if (!isPackageGame(packageName, userId, pw)) {
+ return -1;
+ }
+ final GameManagerService gameManagerService = (GameManagerService)
+ ServiceManager.getService(Context.GAME_SERVICE);
if (gameMode == null) {
gameManagerService.resetGameModeConfigOverride(packageName, userId, -1);
return 0;
diff --git a/services/core/java/com/android/server/audio/AudioDeviceBroker.java b/services/core/java/com/android/server/audio/AudioDeviceBroker.java
index 8de1552a7f60..25b9228d3b37 100644
--- a/services/core/java/com/android/server/audio/AudioDeviceBroker.java
+++ b/services/core/java/com/android/server/audio/AudioDeviceBroker.java
@@ -834,6 +834,14 @@ public class AudioDeviceBroker {
return isDeviceActiveForCommunication(AudioDeviceInfo.TYPE_BLUETOOTH_SCO);
}
+ /*package*/ boolean isBluetoothBleHeadsetActive() {
+ return isDeviceActiveForCommunication(AudioDeviceInfo.TYPE_BLE_HEADSET);
+ }
+
+ /*package*/ boolean isBluetoothBleSpeakerActive() {
+ return isDeviceActiveForCommunication(AudioDeviceInfo.TYPE_BLE_SPEAKER);
+ }
+
/*package*/ boolean isDeviceConnected(@NonNull AudioDeviceAttributes device) {
synchronized (mDeviceStateLock) {
return mDeviceInventory.isDeviceConnected(device);
@@ -1863,7 +1871,10 @@ public class AudioDeviceBroker {
synchronized (mBluetoothAudioStateLock) {
reapplyAudioHalBluetoothState();
}
- mBtHelper.onAudioServerDiedRestoreA2dp();
+ final int forceForMedia = getBluetoothA2dpEnabled()
+ ? AudioSystem.FORCE_NONE : AudioSystem.FORCE_NO_BT_A2DP;
+ setForceUse_Async(
+ AudioSystem.FOR_MEDIA, forceForMedia, "MSG_RESTORE_DEVICES");
updateCommunicationRoute("MSG_RESTORE_DEVICES");
}
}
diff --git a/services/core/java/com/android/server/audio/AudioDeviceInventory.java b/services/core/java/com/android/server/audio/AudioDeviceInventory.java
index 02aa6f52ba8a..ca69f31adb35 100644
--- a/services/core/java/com/android/server/audio/AudioDeviceInventory.java
+++ b/services/core/java/com/android/server/audio/AudioDeviceInventory.java
@@ -1757,6 +1757,15 @@ public class AudioDeviceInventory {
if (AudioService.DEBUG_DEVICES) {
Slog.i(TAG, "deviceInfo:" + di + " is(already)Connected:" + isConnected);
}
+ // Do not report an error in case of redundant connect or disconnect request
+ // as this can cause a state mismatch between BtHelper and AudioDeviceInventory
+ if (connect == isConnected) {
+ Log.i(TAG, "handleDeviceConnection() deviceInfo=" + di + " is already "
+ + (connect ? "" : "dis") + "connected");
+ mmi.set(MediaMetrics.Property.STATE, connect
+ ? MediaMetrics.Value.CONNECT : MediaMetrics.Value.DISCONNECT).record();
+ return true;
+ }
if (connect && !isConnected) {
final int res;
if (isForTesting) {
diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java
index 6d9b4f547be6..fe3bbb094284 100644
--- a/services/core/java/com/android/server/audio/AudioService.java
+++ b/services/core/java/com/android/server/audio/AudioService.java
@@ -739,6 +739,8 @@ public class AudioService extends IAudioService.Stub
// Broadcast receiver for device connections intent broadcasts
private final BroadcastReceiver mReceiver = new AudioServiceBroadcastReceiver();
+ private final Executor mAudioServerLifecycleExecutor;
+
private IMediaProjectionManager mProjectionService; // to validate projection token
/** Interface for UserManagerService. */
@@ -977,7 +979,7 @@ public class AudioService extends IAudioService.Stub
private NotificationManager mNm;
private AudioManagerInternal.RingerModeDelegate mRingerModeDelegate;
- private VolumePolicy mVolumePolicy = VolumePolicy.DEFAULT;
+ private volatile VolumePolicy mVolumePolicy = VolumePolicy.DEFAULT;
private long mLoweredFromNormalToVibrateTime;
// Array of Uids of valid assistant services to check if caller is one of them
@@ -1059,7 +1061,8 @@ public class AudioService extends IAudioService.Stub
audioserverPermissions() ?
initializeAudioServerPermissionProvider(
context, audioPolicyFacade, audioserverLifecycleExecutor) :
- null
+ null,
+ audioserverLifecycleExecutor
);
}
@@ -1145,13 +1148,16 @@ public class AudioService extends IAudioService.Stub
* {@link AudioSystemThread} is created as the messaging thread instead.
* @param appOps {@link AppOpsManager} system service
* @param enforcer Used for permission enforcing
+ * @param permissionProvider Used to push permissions to audioserver
+ * @param audioserverLifecycleExecutor Used for tasks managing audioserver lifecycle
*/
@RequiresPermission(Manifest.permission.READ_DEVICE_CONFIG)
public AudioService(Context context, AudioSystemAdapter audioSystem,
SystemServerAdapter systemServer, SettingsAdapter settings,
AudioVolumeGroupHelperBase audioVolumeGroupHelper, AudioPolicyFacade audioPolicy,
@Nullable Looper looper, AppOpsManager appOps, @NonNull PermissionEnforcer enforcer,
- /* @NonNull */ AudioServerPermissionProvider permissionProvider) {
+ /* @NonNull */ AudioServerPermissionProvider permissionProvider,
+ Executor audioserverLifecycleExecutor) {
super(enforcer);
sLifecycleLogger.enqueue(new EventLogger.StringEvent("AudioService()"));
mContext = context;
@@ -1159,6 +1165,7 @@ public class AudioService extends IAudioService.Stub
mAppOps = appOps;
mPermissionProvider = permissionProvider;
+ mAudioServerLifecycleExecutor = audioserverLifecycleExecutor;
mAudioSystem = audioSystem;
mSystemServer = systemServer;
@@ -1170,6 +1177,34 @@ public class AudioService extends IAudioService.Stub
mBroadcastHandlerThread = new HandlerThread("AudioService Broadcast");
mBroadcastHandlerThread.start();
+ // Listen to permission invalidations for the PermissionProvider
+ if (audioserverPermissions()) {
+ final Handler broadcastHandler = mBroadcastHandlerThread.getThreadHandler();
+ mAudioSystem.listenForSystemPropertyChange(PermissionManager.CACHE_KEY_PACKAGE_INFO,
+ new Runnable() {
+ // Roughly chosen to be long enough to suppress the autocork behavior
+ // of the permission cache (50ms), and longer than the task could reasonably
+ // take, even with many packages and users, while not introducing visible
+ // permission leaks - since the app needs to restart, and trigger an action
+ // which requires permissions from audioserver before this delay.
+ // For RECORD_AUDIO, we are additionally protected by appops.
+ final long UPDATE_DELAY_MS = 110;
+ final AtomicLong scheduledUpdateTimestamp = new AtomicLong(0);
+ @Override
+ public void run() {
+ var currentTime = SystemClock.uptimeMillis();
+ if (currentTime > scheduledUpdateTimestamp.get()) {
+ scheduledUpdateTimestamp.set(currentTime + UPDATE_DELAY_MS);
+ broadcastHandler.postAtTime( () ->
+ mAudioServerLifecycleExecutor.execute(mPermissionProvider
+ ::onPermissionStateChanged),
+ currentTime + UPDATE_DELAY_MS
+ );
+ }
+ }
+ });
+ }
+
mDeviceBroker = new AudioDeviceBroker(mContext, this, mAudioSystem);
mIsSingleVolume = AudioSystem.isSingleVolume(context);
@@ -5719,16 +5754,25 @@ public class AudioService extends IAudioService.Stub
|| ringerMode == AudioManager.RINGER_MODE_SILENT;
final boolean shouldRingSco = ringerMode == AudioManager.RINGER_MODE_VIBRATE
&& mDeviceBroker.isBluetoothScoActive();
- // Ask audio policy engine to force use Bluetooth SCO channel if needed
+ final boolean shouldRingBle = ringerMode == AudioManager.RINGER_MODE_VIBRATE
+ && (mDeviceBroker.isBluetoothBleHeadsetActive()
+ || mDeviceBroker.isBluetoothBleSpeakerActive());
+ // Ask audio policy engine to force use Bluetooth SCO/BLE channel if needed
final String eventSource = "muteRingerModeStreams() from u/pid:" + Binder.getCallingUid()
+ "/" + Binder.getCallingPid();
+ int forceUse = AudioSystem.FORCE_NONE;
+ if (shouldRingSco) {
+ forceUse = AudioSystem.FORCE_BT_SCO;
+ } else if (shouldRingBle) {
+ forceUse = AudioSystem.FORCE_BT_BLE;
+ }
sendMsg(mAudioHandler, MSG_SET_FORCE_USE, SENDMSG_QUEUE, AudioSystem.FOR_VIBRATE_RINGING,
- shouldRingSco ? AudioSystem.FORCE_BT_SCO : AudioSystem.FORCE_NONE, eventSource, 0);
+ forceUse, eventSource, 0);
for (int streamType = numStreamTypes - 1; streamType >= 0; streamType--) {
final boolean isMuted = isStreamMutedByRingerOrZenMode(streamType);
final boolean muteAllowedBySco =
- !(shouldRingSco && streamType == AudioSystem.STREAM_RING);
+ !((shouldRingSco || shouldRingBle) && streamType == AudioSystem.STREAM_RING);
final boolean shouldZenMute = isStreamAffectedByCurrentZen(streamType);
final boolean shouldMute = shouldZenMute || (ringerModeMute
&& isStreamAffectedByRingerMode(streamType) && muteAllowedBySco);
@@ -9909,9 +9953,9 @@ public class AudioService extends IAudioService.Stub
int a2dpDev = AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP;
synchronized (mCachedAbsVolDrivingStreamsLock) {
mCachedAbsVolDrivingStreams.compute(a2dpDev, (dev, stream) -> {
- if (stream != null && !mAvrcpAbsVolSupported) {
+ if (!mAvrcpAbsVolSupported) {
mAudioSystem.setDeviceAbsoluteVolumeEnabled(a2dpDev, /*address=*/
- "", /*enabled*/false, AudioSystem.DEVICE_NONE);
+ "", /*enabled*/false, AudioSystem.STREAM_DEFAULT);
return null;
}
// For A2DP and AVRCP we need to set the driving stream based on the
@@ -11965,29 +12009,6 @@ public class AudioService extends IAudioService.Stub
provider.onServiceStart(audioPolicy.getPermissionController());
});
- // Set up event listeners
- // Must be kept in sync with PermissionManager
- Runnable cacheSysPropHandler = new Runnable() {
- private AtomicReference<SystemProperties.Handle> mHandle = new AtomicReference();
- private AtomicLong mNonce = new AtomicLong();
- @Override
- public void run() {
- if (mHandle.get() == null) {
- // Cache the handle
- mHandle.compareAndSet(null, SystemProperties.find(
- PermissionManager.CACHE_KEY_PACKAGE_INFO));
- }
- long nonce;
- SystemProperties.Handle ref;
- if ((ref = mHandle.get()) != null && (nonce = ref.getLong(0)) != 0 &&
- mNonce.getAndSet(nonce) != nonce) {
- audioserverExecutor.execute(() -> provider.onPermissionStateChanged());
- }
- }
- };
-
- SystemProperties.addChangeCallback(cacheSysPropHandler);
-
IntentFilter packageUpdateFilter = new IntentFilter();
packageUpdateFilter.addAction(ACTION_PACKAGE_ADDED);
packageUpdateFilter.addAction(ACTION_PACKAGE_REMOVED);
@@ -12101,6 +12122,11 @@ public class AudioService extends IAudioService.Stub
}
}
+ @Override
+ public VolumePolicy getVolumePolicy() {
+ return mVolumePolicy;
+ }
+
/** Interface used for enforcing the safe hearing standard. */
public interface ISafeHearingVolumeController {
/** Displays an instructional safeguard as required by the safe hearing standard. */
diff --git a/services/core/java/com/android/server/audio/AudioSystemAdapter.java b/services/core/java/com/android/server/audio/AudioSystemAdapter.java
index 7f4bc74bd59e..d083c68c4c2c 100644
--- a/services/core/java/com/android/server/audio/AudioSystemAdapter.java
+++ b/services/core/java/com/android/server/audio/AudioSystemAdapter.java
@@ -748,6 +748,10 @@ public class AudioSystemAdapter implements AudioSystem.RoutingUpdateCallback,
return AudioSystem.setMasterMute(mute);
}
+ public void listenForSystemPropertyChange(String systemPropertyName, Runnable callback) {
+ AudioSystem.listenForSystemPropertyChange(systemPropertyName, callback);
+ }
+
/**
* Part of AudioService dump
* @param pw
diff --git a/services/core/java/com/android/server/audio/BtHelper.java b/services/core/java/com/android/server/audio/BtHelper.java
index 0de342807df3..ce92dfbcc1c8 100644
--- a/services/core/java/com/android/server/audio/BtHelper.java
+++ b/services/core/java/com/android/server/audio/BtHelper.java
@@ -83,39 +83,53 @@ public class BtHelper {
}
// BluetoothHeadset API to control SCO connection
+ @GuardedBy("BtHelper.this")
private @Nullable BluetoothHeadset mBluetoothHeadset;
// Bluetooth headset device
+ @GuardedBy("mDeviceBroker.mDeviceStateLock")
private @Nullable BluetoothDevice mBluetoothHeadsetDevice;
+
+ @GuardedBy("mDeviceBroker.mDeviceStateLock")
private final Map<BluetoothDevice, AudioDeviceAttributes> mResolvedScoAudioDevices =
new HashMap<>();
+ @GuardedBy("BtHelper.this")
private @Nullable BluetoothHearingAid mHearingAid = null;
+ @GuardedBy("BtHelper.this")
private @Nullable BluetoothLeAudio mLeAudio = null;
+ @GuardedBy("BtHelper.this")
private @Nullable BluetoothLeAudioCodecConfig mLeAudioCodecConfig;
// Reference to BluetoothA2dp to query for AbsoluteVolume.
+ @GuardedBy("BtHelper.this")
private @Nullable BluetoothA2dp mA2dp = null;
+ @GuardedBy("BtHelper.this")
private @Nullable BluetoothCodecConfig mA2dpCodecConfig;
+ @GuardedBy("BtHelper.this")
private @AudioSystem.AudioFormatNativeEnumForBtCodec
int mLeAudioBroadcastCodec = AudioSystem.AUDIO_FORMAT_DEFAULT;
// If absolute volume is supported in AVRCP device
+ @GuardedBy("mDeviceBroker.mDeviceStateLock")
private boolean mAvrcpAbsVolSupported = false;
// Current connection state indicated by bluetooth headset
+ @GuardedBy("mDeviceBroker.mDeviceStateLock")
private int mScoConnectionState;
// Indicate if SCO audio connection is currently active and if the initiator is
// audio service (internal) or bluetooth headset (external)
+ @GuardedBy("mDeviceBroker.mDeviceStateLock")
private int mScoAudioState;
// Indicates the mode used for SCO audio connection. The mode is virtual call if the request
// originated from an app targeting an API version before JB MR2 and raw audio after that.
+ @GuardedBy("mDeviceBroker.mDeviceStateLock")
private int mScoAudioMode;
// SCO audio state is not active
@@ -210,7 +224,7 @@ public class BtHelper {
//----------------------------------------------------------------------
// Interface for AudioDeviceBroker
- // Called locked by ADeviceBroker.mSetModeLock -> AudioDeviceBroker.mDeviceStateLock
+ @GuardedBy("mDeviceBroker.mDeviceStateLock")
/*package*/ synchronized void onSystemReady() {
mScoConnectionState = android.media.AudioManager.SCO_AUDIO_STATE_ERROR;
resetBluetoothSco();
@@ -238,17 +252,13 @@ public class BtHelper {
}
}
- /*package*/ synchronized void onAudioServerDiedRestoreA2dp() {
- final int forMed = mDeviceBroker.getBluetoothA2dpEnabled()
- ? AudioSystem.FORCE_NONE : AudioSystem.FORCE_NO_BT_A2DP;
- mDeviceBroker.setForceUse_Async(AudioSystem.FOR_MEDIA, forMed, "onAudioServerDied()");
- }
-
- /*package*/ synchronized void setAvrcpAbsoluteVolumeSupported(boolean supported) {
+ @GuardedBy("mDeviceBroker.mDeviceStateLock")
+ /*package*/ void setAvrcpAbsoluteVolumeSupported(boolean supported) {
mAvrcpAbsVolSupported = supported;
Log.i(TAG, "setAvrcpAbsoluteVolumeSupported supported=" + supported);
}
+ @GuardedBy("mDeviceBroker.mDeviceStateLock")
/*package*/ synchronized void setAvrcpAbsoluteVolumeIndex(int index) {
if (mA2dp == null) {
if (AudioService.DEBUG_VOL) {
@@ -371,7 +381,7 @@ public class BtHelper {
return codecAndChanged;
}
- // Called locked by ADeviceBroker.mSetModeLock -> AudioDeviceBroker.mDeviceStateLock
+ @GuardedBy("mDeviceBroker.mDeviceStateLock")
/*package*/ synchronized void onReceiveBtEvent(Intent intent) {
final String action = intent.getAction();
@@ -393,12 +403,12 @@ public class BtHelper {
}
/**
- * Exclusively called from AudioDeviceBroker (with mSetModeLock held)
+ * Exclusively called from AudioDeviceBroker (with mDeviceStateLock held)
* when handling MSG_L_RECEIVED_BT_EVENT in {@link #onReceiveBtEvent(Intent)}
* as part of the serialization of the communication route selection
*/
- @GuardedBy("BtHelper.this")
- private void onScoAudioStateChanged(int state) {
+ @GuardedBy("mDeviceBroker.mDeviceStateLock")
+ private synchronized void onScoAudioStateChanged(int state) {
boolean broadcast = false;
int scoAudioState = AudioManager.SCO_AUDIO_STATE_ERROR;
Log.i(TAG, "onScoAudioStateChanged state: " + state
@@ -414,12 +424,14 @@ public class BtHelper {
broadcast = true;
}
if (!mDeviceBroker.isScoManagedByAudio()) {
- mDeviceBroker.setBluetoothScoOn(true, "BtHelper.onScoAudioStateChanged");
+ mDeviceBroker.setBluetoothScoOn(
+ true, "BtHelper.onScoAudioStateChanged, state: " + state);
}
break;
case BluetoothHeadset.STATE_AUDIO_DISCONNECTED:
if (!mDeviceBroker.isScoManagedByAudio()) {
- mDeviceBroker.setBluetoothScoOn(false, "BtHelper.onScoAudioStateChanged");
+ mDeviceBroker.setBluetoothScoOn(
+ false, "BtHelper.onScoAudioStateChanged, state: " + state);
}
scoAudioState = AudioManager.SCO_AUDIO_STATE_DISCONNECTED;
// There are two cases where we want to immediately reconnect audio:
@@ -466,27 +478,34 @@ public class BtHelper {
*
* @return false if SCO isn't connected
*/
+ @GuardedBy("mDeviceBroker.mDeviceStateLock")
/*package*/ synchronized boolean isBluetoothScoOn() {
if (mBluetoothHeadset == null || mBluetoothHeadsetDevice == null) {
return false;
}
- return mBluetoothHeadset.getAudioState(mBluetoothHeadsetDevice)
- == BluetoothHeadset.STATE_AUDIO_CONNECTED;
+ try {
+ return mBluetoothHeadset.getAudioState(mBluetoothHeadsetDevice)
+ == BluetoothHeadset.STATE_AUDIO_CONNECTED;
+ } catch (Exception e) {
+ Log.e(TAG, "Exception while getting audio state of " + mBluetoothHeadsetDevice, e);
+ }
+ return false;
}
- /*package*/ synchronized boolean isBluetoothScoRequestedInternally() {
+ @GuardedBy("mDeviceBroker.mDeviceStateLock")
+ /*package*/ boolean isBluetoothScoRequestedInternally() {
return mScoAudioState == SCO_STATE_ACTIVE_INTERNAL
|| mScoAudioState == SCO_STATE_ACTIVATE_REQ;
}
- // Called locked by ADeviceBroker.mSetModeLock -> AudioDeviceBroker.mDeviceStateLock
+ @GuardedBy("mDeviceBroker.mDeviceStateLock")
/*package*/ synchronized boolean startBluetoothSco(int scoAudioMode,
@NonNull String eventSource) {
AudioService.sDeviceLogger.enqueue(new EventLogger.StringEvent(eventSource));
return requestScoState(BluetoothHeadset.STATE_AUDIO_CONNECTED, scoAudioMode);
}
- // Called locked by ADeviceBroker.mSetModeLock -> AudioDeviceBroker.mDeviceStateLock
+ @GuardedBy("mDeviceBroker.mDeviceStateLock")
/*package*/ synchronized boolean stopBluetoothSco(@NonNull String eventSource) {
AudioService.sDeviceLogger.enqueue(new EventLogger.StringEvent(eventSource));
return requestScoState(BluetoothHeadset.STATE_AUDIO_DISCONNECTED, SCO_MODE_VIRTUAL_CALL);
@@ -546,7 +565,8 @@ public class BtHelper {
}
}
- /*package*/ synchronized void onBroadcastScoConnectionState(int state) {
+ @GuardedBy("mDeviceBroker.mDeviceStateLock")
+ /*package*/ void onBroadcastScoConnectionState(int state) {
if (state == mScoConnectionState) {
return;
}
@@ -558,8 +578,8 @@ public class BtHelper {
mScoConnectionState = state;
}
- // Called locked by ADeviceBroker.mSetModeLock -> AudioDeviceBroker.mDeviceStateLock
- /*package*/ synchronized void resetBluetoothSco() {
+ @GuardedBy("mDeviceBroker.mDeviceStateLock")
+ /*package*/ void resetBluetoothSco() {
mScoAudioState = SCO_STATE_INACTIVE;
broadcastScoConnectionState(AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
mDeviceBroker.clearA2dpSuspended(false /* internalOnly */);
@@ -567,7 +587,7 @@ public class BtHelper {
mDeviceBroker.setBluetoothScoOn(false, "resetBluetoothSco");
}
- // Called locked by ADeviceBroker.mSetModeLock -> AudioDeviceBroker.mDeviceStateLock
+ @GuardedBy("mDeviceBroker.mDeviceStateLock")
/*package*/ synchronized void onBtProfileDisconnected(int profile) {
AudioService.sDeviceLogger.enqueue(new EventLogger.StringEvent(
"BT profile " + BluetoothProfile.getProfileName(profile)
@@ -629,9 +649,10 @@ public class BtHelper {
}
}
+ @GuardedBy("BtHelper.this")
MyLeAudioCallback mLeAudioCallback = null;
- // Called locked by ADeviceBroker.mSetModeLock -> AudioDeviceBroker.mDeviceStateLock
+ @GuardedBy("mDeviceBroker.mDeviceStateLock")
/*package*/ synchronized void onBtProfileConnected(int profile, BluetoothProfile proxy) {
AudioService.sDeviceLogger.enqueue(new EventLogger.StringEvent(
"BT profile " + BluetoothProfile.getProfileName(profile) + " connected to proxy "
@@ -768,8 +789,8 @@ public class BtHelper {
}
}
- // Called locked by ADeviceBroker.mSetModeLock -> AudioDeviceBroker.mDeviceStateLock
- private void onHeadsetProfileConnected(@NonNull BluetoothHeadset headset) {
+ @GuardedBy("mDeviceBroker.mDeviceStateLock")
+ private synchronized void onHeadsetProfileConnected(@NonNull BluetoothHeadset headset) {
// Discard timeout message
mDeviceBroker.handleCancelFailureToConnectToBtHeadsetService();
mBluetoothHeadset = headset;
@@ -825,6 +846,7 @@ public class BtHelper {
mDeviceBroker.postBroadcastScoConnectionState(state);
}
+ @GuardedBy("mDeviceBroker.mDeviceStateLock")
@Nullable AudioDeviceAttributes getHeadsetAudioDevice() {
if (mBluetoothHeadsetDevice == null) {
return null;
@@ -832,6 +854,7 @@ public class BtHelper {
return getHeadsetAudioDevice(mBluetoothHeadsetDevice);
}
+ @GuardedBy("mDeviceBroker.mDeviceStateLock")
private @NonNull AudioDeviceAttributes getHeadsetAudioDevice(BluetoothDevice btDevice) {
AudioDeviceAttributes deviceAttr = mResolvedScoAudioDevices.get(btDevice);
if (deviceAttr != null) {
@@ -871,30 +894,44 @@ public class BtHelper {
return new AudioDeviceAttributes(nativeType, address, name);
}
+ @GuardedBy("mDeviceBroker.mDeviceStateLock")
private boolean handleBtScoActiveDeviceChange(BluetoothDevice btDevice, boolean isActive) {
if (btDevice == null) {
return true;
}
- int inDevice = AudioSystem.DEVICE_IN_BLUETOOTH_SCO_HEADSET;
- AudioDeviceAttributes audioDevice = btHeadsetDeviceToAudioDevice(btDevice);
boolean result = false;
+ AudioDeviceAttributes audioDevice = null; // Only used if isActive is true
+ String address = btDevice.getAddress();
+ String name = getName(btDevice);
+ // Handle output device
if (isActive) {
- result |= mDeviceBroker.handleDeviceConnection(audioDevice, isActive, btDevice);
+ audioDevice = btHeadsetDeviceToAudioDevice(btDevice);
+ result = mDeviceBroker.handleDeviceConnection(
+ audioDevice, true /*connect*/, btDevice);
} else {
- int[] outDeviceTypes = {
+ AudioDeviceAttributes ada = mResolvedScoAudioDevices.get(btDevice);
+ if (ada != null) {
+ result = mDeviceBroker.handleDeviceConnection(
+ ada, false /*connect*/, btDevice);
+ } else {
+ // Disconnect all possible audio device types if the disconnected device type is
+ // unknown
+ int[] outDeviceTypes = {
AudioSystem.DEVICE_OUT_BLUETOOTH_SCO,
AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_HEADSET,
AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_CARKIT
- };
- for (int outDeviceType : outDeviceTypes) {
- result |= mDeviceBroker.handleDeviceConnection(new AudioDeviceAttributes(
- outDeviceType, audioDevice.getAddress(), audioDevice.getName()),
- isActive, btDevice);
+ };
+ for (int outDeviceType : outDeviceTypes) {
+ result |= mDeviceBroker.handleDeviceConnection(new AudioDeviceAttributes(
+ outDeviceType, address, name), false /*connect*/, btDevice);
+ }
}
}
+ // Handle input device
+ int inDevice = AudioSystem.DEVICE_IN_BLUETOOTH_SCO_HEADSET;
// handleDeviceConnection() && result to make sure the method get executed
result = mDeviceBroker.handleDeviceConnection(new AudioDeviceAttributes(
- inDevice, audioDevice.getAddress(), audioDevice.getName()),
+ inDevice, address, name),
isActive, btDevice) && result;
if (result) {
if (isActive) {
@@ -911,8 +948,8 @@ public class BtHelper {
return btDevice == null ? "(null)" : btDevice.getAnonymizedAddress();
}
- // Called locked by ADeviceBroker.mSetModeLock -> AudioDeviceBroker.mDeviceStateLock
- /*package */ synchronized void onSetBtScoActiveDevice(BluetoothDevice btDevice) {
+ @GuardedBy("mDeviceBroker.mDeviceStateLock")
+ /*package */ void onSetBtScoActiveDevice(BluetoothDevice btDevice) {
Log.i(TAG, "onSetBtScoActiveDevice: " + getAnonymizedAddress(mBluetoothHeadsetDevice)
+ " -> " + getAnonymizedAddress(btDevice));
final BluetoothDevice previousActiveDevice = mBluetoothHeadsetDevice;
@@ -982,10 +1019,8 @@ public class BtHelper {
//----------------------------------------------------------------------
- // @GuardedBy("mDeviceBroker.mSetModeLock")
- // @GuardedBy("AudioDeviceBroker.this.mDeviceStateLock")
- @GuardedBy("BtHelper.this")
- private boolean requestScoState(int state, int scoAudioMode) {
+ @GuardedBy("mDeviceBroker.mDeviceStateLock")
+ private synchronized boolean requestScoState(int state, int scoAudioMode) {
checkScoAudioState();
if (state == BluetoothHeadset.STATE_AUDIO_CONNECTED) {
// Make sure that the state transitions to CONNECTING even if we cannot initiate
@@ -1149,13 +1184,18 @@ public class BtHelper {
}
}
- private void checkScoAudioState() {
- if (mBluetoothHeadset != null
- && mBluetoothHeadsetDevice != null
- && mScoAudioState == SCO_STATE_INACTIVE
- && mBluetoothHeadset.getAudioState(mBluetoothHeadsetDevice)
- != BluetoothHeadset.STATE_AUDIO_DISCONNECTED) {
- mScoAudioState = SCO_STATE_ACTIVE_EXTERNAL;
+ @GuardedBy("mDeviceBroker.mDeviceStateLock")
+ private synchronized void checkScoAudioState() {
+ try {
+ if (mBluetoothHeadset != null
+ && mBluetoothHeadsetDevice != null
+ && mScoAudioState == SCO_STATE_INACTIVE
+ && mBluetoothHeadset.getAudioState(mBluetoothHeadsetDevice)
+ != BluetoothHeadset.STATE_AUDIO_DISCONNECTED) {
+ mScoAudioState = SCO_STATE_ACTIVE_EXTERNAL;
+ }
+ } catch (Exception e) {
+ Log.e(TAG, "Exception while getting audio state of " + mBluetoothHeadsetDevice, e);
}
}
@@ -1175,7 +1215,7 @@ public class BtHelper {
return result;
}
- /*package*/ int getLeAudioDeviceGroupId(BluetoothDevice device) {
+ /*package*/ synchronized int getLeAudioDeviceGroupId(BluetoothDevice device) {
if (mLeAudio == null || device == null) {
return BluetoothLeAudio.GROUP_ID_INVALID;
}
@@ -1188,7 +1228,7 @@ public class BtHelper {
* @return A List of Pair(String main_address, String identity_address). Note that the
* addresses returned by BluetoothDevice can be null.
*/
- /*package*/ List<Pair<String, String>> getLeAudioGroupAddresses(int groupId) {
+ /*package*/ synchronized List<Pair<String, String>> getLeAudioGroupAddresses(int groupId) {
List<Pair<String, String>> addresses = new ArrayList<>();
BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
if (adapter == null || mLeAudio == null) {
diff --git a/services/core/java/com/android/server/biometrics/BiometricService.java b/services/core/java/com/android/server/biometrics/BiometricService.java
index 8e8a0378c111..8ec835bae0bf 100644
--- a/services/core/java/com/android/server/biometrics/BiometricService.java
+++ b/services/core/java/com/android/server/biometrics/BiometricService.java
@@ -21,6 +21,7 @@ import static android.hardware.biometrics.BiometricAuthenticator.TYPE_FACE;
import static android.hardware.biometrics.BiometricAuthenticator.TYPE_FINGERPRINT;
import static android.hardware.biometrics.BiometricManager.Authenticators;
import static android.hardware.biometrics.BiometricManager.BIOMETRIC_NO_AUTHENTICATION;
+import static android.hardware.biometrics.SensorProperties.STRENGTH_STRONG;
import static com.android.server.biometrics.BiometricServiceStateProto.STATE_AUTH_IDLE;
@@ -41,6 +42,7 @@ import android.hardware.SensorPrivacyManager;
import android.hardware.biometrics.BiometricAuthenticator;
import android.hardware.biometrics.BiometricConstants;
import android.hardware.biometrics.BiometricPrompt;
+import android.hardware.biometrics.BiometricStateListener;
import android.hardware.biometrics.Flags;
import android.hardware.biometrics.IBiometricAuthenticator;
import android.hardware.biometrics.IBiometricEnabledOnKeyguardCallback;
@@ -54,8 +56,12 @@ import android.hardware.biometrics.ITestSessionCallback;
import android.hardware.biometrics.PromptInfo;
import android.hardware.biometrics.SensorPropertiesInternal;
import android.hardware.camera2.CameraManager;
+import android.hardware.face.FaceManager;
+import android.hardware.face.FaceSensorPropertiesInternal;
+import android.hardware.face.IFaceAuthenticatorsRegisteredCallback;
import android.hardware.fingerprint.FingerprintManager;
import android.hardware.fingerprint.FingerprintSensorPropertiesInternal;
+import android.hardware.fingerprint.IFingerprintAuthenticatorsRegisteredCallback;
import android.hardware.security.keymint.HardwareAuthenticatorType;
import android.net.Uri;
import android.os.Binder;
@@ -234,6 +240,8 @@ public class BiometricService extends SystemService {
private static final boolean DEFAULT_APP_ENABLED = true;
private static final boolean DEFAULT_ALWAYS_REQUIRE_CONFIRMATION = false;
private static final boolean DEFAULT_MANDATORY_BIOMETRICS_STATUS = false;
+ private static final boolean DEFAULT_MANDATORY_BIOMETRICS_REQUIREMENTS_SATISFIED_STATUS =
+ true;
// Some devices that shipped before S already have face-specific settings. Instead of
// migrating, which is complicated, let's just keep using the existing settings.
@@ -256,6 +264,8 @@ public class BiometricService extends SystemService {
Settings.Secure.getUriFor(Settings.Secure.BIOMETRIC_APP_ENABLED);
private final Uri MANDATORY_BIOMETRICS_ENABLED =
Settings.Secure.getUriFor(Settings.Secure.MANDATORY_BIOMETRICS);
+ private final Uri MANDATORY_BIOMETRICS_REQUIREMENTS_SATISFIED = Settings.Secure.getUriFor(
+ Settings.Secure.MANDATORY_BIOMETRICS_REQUIREMENTS_SATISFIED);
private final ContentResolver mContentResolver;
private final List<BiometricService.EnabledOnKeyguardCallback> mCallbacks;
@@ -264,6 +274,12 @@ public class BiometricService extends SystemService {
private final Map<Integer, Boolean> mBiometricEnabledForApps = new HashMap<>();
private final Map<Integer, Boolean> mFaceAlwaysRequireConfirmation = new HashMap<>();
private final Map<Integer, Boolean> mMandatoryBiometricsEnabled = new HashMap<>();
+ private final Map<Integer, Boolean> mMandatoryBiometricsRequirementsSatisfied =
+ new HashMap<>();
+ private final Map<Integer, Boolean> mFingerprintEnrolledForUser =
+ new HashMap<>();
+ private final Map<Integer, Boolean> mFaceEnrolledForUser =
+ new HashMap<>();
/**
* Creates a content observer.
@@ -288,7 +304,13 @@ public class BiometricService extends SystemService {
mMandatoryBiometricsEnabled.put(context.getUserId(), Settings.Secure.getIntForUser(
mContentResolver, Settings.Secure.MANDATORY_BIOMETRICS,
DEFAULT_MANDATORY_BIOMETRICS_STATUS ? 1 : 0, context.getUserId()) != 0);
+ mMandatoryBiometricsRequirementsSatisfied.put(context.getUserId(),
+ Settings.Secure.getIntForUser(mContentResolver,
+ Settings.Secure.MANDATORY_BIOMETRICS_REQUIREMENTS_SATISFIED,
+ DEFAULT_MANDATORY_BIOMETRICS_REQUIREMENTS_SATISFIED_STATUS ? 1 : 0,
+ context.getUserId()) != 0);
+ addBiometricListenersForMandatoryBiometrics(context);
updateContentObserver();
}
@@ -322,6 +344,10 @@ public class BiometricService extends SystemService {
false /* notifyForDescendants */,
this /* observer */,
UserHandle.USER_ALL);
+ mContentResolver.registerContentObserver(MANDATORY_BIOMETRICS_REQUIREMENTS_SATISFIED,
+ false /* notifyForDescendants */,
+ this /* observer */,
+ UserHandle.USER_ALL);
}
@Override
@@ -370,6 +396,13 @@ public class BiometricService extends SystemService {
Settings.Secure.MANDATORY_BIOMETRICS,
DEFAULT_MANDATORY_BIOMETRICS_STATUS ? 1 : 0 /* default */,
userId) != 0);
+ } else if (MANDATORY_BIOMETRICS_REQUIREMENTS_SATISFIED.equals(uri)) {
+ mMandatoryBiometricsRequirementsSatisfied.put(userId, Settings.Secure.getIntForUser(
+ mContentResolver,
+ Settings.Secure.MANDATORY_BIOMETRICS_REQUIREMENTS_SATISFIED,
+ DEFAULT_MANDATORY_BIOMETRICS_REQUIREMENTS_SATISFIED_STATUS
+ ? 1 : 0 /* default */,
+ userId) != 0);
}
}
@@ -411,9 +444,15 @@ public class BiometricService extends SystemService {
}
}
- public boolean getMandatoryBiometricsEnabledForUser(int userId) {
+ public boolean getMandatoryBiometricsEnabledAndRequirementsSatisfiedForUser(int userId) {
return mMandatoryBiometricsEnabled.getOrDefault(userId,
- DEFAULT_MANDATORY_BIOMETRICS_STATUS);
+ DEFAULT_MANDATORY_BIOMETRICS_STATUS)
+ && mMandatoryBiometricsRequirementsSatisfied.getOrDefault(userId,
+ DEFAULT_MANDATORY_BIOMETRICS_REQUIREMENTS_SATISFIED_STATUS)
+ && mBiometricEnabledForApps.getOrDefault(userId, DEFAULT_APP_ENABLED)
+ && getEnabledForApps(userId)
+ && (mFingerprintEnrolledForUser.getOrDefault(userId, false /* default */)
+ || mFaceEnrolledForUser.getOrDefault(userId, false /* default */));
}
void notifyEnabledOnKeyguardCallbacks(int userId) {
@@ -424,6 +463,79 @@ public class BiometricService extends SystemService {
userId);
}
}
+
+ private void addBiometricListenersForMandatoryBiometrics(Context context) {
+ final FingerprintManager fingerprintManager = context.getSystemService(
+ FingerprintManager.class);
+ final FaceManager faceManager = context.getSystemService(FaceManager.class);
+ if (fingerprintManager != null) {
+ fingerprintManager.addAuthenticatorsRegisteredCallback(
+ new IFingerprintAuthenticatorsRegisteredCallback.Stub() {
+ @Override
+ public void onAllAuthenticatorsRegistered(
+ List<FingerprintSensorPropertiesInternal> list) {
+ if (list == null || list.isEmpty()) {
+ Slog.d(TAG, "No fingerprint authenticators registered.");
+ return;
+ }
+ final FingerprintSensorPropertiesInternal
+ fingerprintSensorProperties = list.get(0);
+ if (fingerprintSensorProperties.sensorStrength
+ == STRENGTH_STRONG) {
+ fingerprintManager.registerBiometricStateListener(
+ new BiometricStateListener() {
+ @Override
+ public void onEnrollmentsChanged(
+ int userId,
+ int sensorId,
+ boolean hasEnrollments
+ ) {
+ if (sensorId == fingerprintSensorProperties
+ .sensorId) {
+ mFingerprintEnrolledForUser.put(userId,
+ hasEnrollments);
+ }
+ }
+ });
+ }
+ }
+ });
+ }
+ if (faceManager != null) {
+ faceManager.addAuthenticatorsRegisteredCallback(
+ new IFaceAuthenticatorsRegisteredCallback.Stub() {
+ @Override
+ public void onAllAuthenticatorsRegistered(
+ List<FaceSensorPropertiesInternal> list) {
+ if (list == null || list.isEmpty()) {
+ Slog.d(TAG, "No face authenticators registered.");
+ return;
+ }
+ final FaceSensorPropertiesInternal
+ faceSensorPropertiesInternal = list.get(0);
+ if (faceSensorPropertiesInternal.sensorStrength
+ == STRENGTH_STRONG) {
+ faceManager.registerBiometricStateListener(
+ new BiometricStateListener() {
+ @Override
+ public void onEnrollmentsChanged(
+ int userId,
+ int sensorId,
+ boolean hasEnrollments
+ ) {
+ if (sensorId
+ == faceSensorPropertiesInternal
+ .sensorId) {
+ mFaceEnrolledForUser.put(userId,
+ hasEnrollments);
+ }
+ }
+ });
+ }
+ }
+ });
+ }
+ }
}
final class EnabledOnKeyguardCallback implements IBinder.DeathRecipient {
diff --git a/services/core/java/com/android/server/biometrics/PreAuthInfo.java b/services/core/java/com/android/server/biometrics/PreAuthInfo.java
index b9e6563a7d6a..0bd22f3da67f 100644
--- a/services/core/java/com/android/server/biometrics/PreAuthInfo.java
+++ b/services/core/java/com/android/server/biometrics/PreAuthInfo.java
@@ -112,8 +112,8 @@ class PreAuthInfo {
== BiometricManager.Authenticators.MANDATORY_BIOMETRICS;
if (dropCredentialFallback(promptInfo.getAuthenticators(),
- settingObserver.getMandatoryBiometricsEnabledForUser(userId),
- trustManager)) {
+ settingObserver.getMandatoryBiometricsEnabledAndRequirementsSatisfiedForUser(
+ userId), trustManager)) {
promptInfo.setAuthenticators(BiometricManager.Authenticators.BIOMETRIC_STRONG);
promptInfo.setNegativeButtonText(context.getString(R.string.cancel));
}
diff --git a/services/core/java/com/android/server/biometrics/sensors/BiometricSchedulerOperation.java b/services/core/java/com/android/server/biometrics/sensors/BiometricSchedulerOperation.java
index eb78fe620c0b..a1184156f86e 100644
--- a/services/core/java/com/android/server/biometrics/sensors/BiometricSchedulerOperation.java
+++ b/services/core/java/com/android/server/biometrics/sensors/BiometricSchedulerOperation.java
@@ -20,7 +20,6 @@ import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.hardware.biometrics.BiometricConstants;
-import android.os.Build;
import android.os.Handler;
import android.os.IBinder;
import android.os.RemoteException;
@@ -28,11 +27,12 @@ import android.util.Slog;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.util.ArrayUtils;
+import com.android.modules.expresslog.Counter;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.Arrays;
-import java.util.function.BooleanSupplier;
+
/**
* Contains all the necessary information for a HAL operation.
@@ -89,8 +89,6 @@ public class BiometricSchedulerOperation {
private final BaseClientMonitor mClientMonitor;
@Nullable
private final ClientMonitorCallback mClientCallback;
- @NonNull
- private final BooleanSupplier mIsDebuggable;
@Nullable
private ClientMonitorCallback mOnStartCallback;
@OperationState
@@ -99,6 +97,7 @@ public class BiometricSchedulerOperation {
@NonNull
final Runnable mCancelWatchdog;
+ @VisibleForTesting
BiometricSchedulerOperation(
@NonNull BaseClientMonitor clientMonitor,
@Nullable ClientMonitorCallback callback
@@ -106,33 +105,14 @@ public class BiometricSchedulerOperation {
this(clientMonitor, callback, STATE_WAITING_IN_QUEUE);
}
- @VisibleForTesting
- BiometricSchedulerOperation(
- @NonNull BaseClientMonitor clientMonitor,
- @Nullable ClientMonitorCallback callback,
- @NonNull BooleanSupplier isDebuggable
- ) {
- this(clientMonitor, callback, STATE_WAITING_IN_QUEUE, isDebuggable);
- }
-
protected BiometricSchedulerOperation(
@NonNull BaseClientMonitor clientMonitor,
@Nullable ClientMonitorCallback callback,
@OperationState int state
) {
- this(clientMonitor, callback, state, Build::isDebuggable);
- }
-
- private BiometricSchedulerOperation(
- @NonNull BaseClientMonitor clientMonitor,
- @Nullable ClientMonitorCallback callback,
- @OperationState int state,
- @NonNull BooleanSupplier isDebuggable
- ) {
mClientMonitor = clientMonitor;
mClientCallback = callback;
mState = state;
- mIsDebuggable = isDebuggable;
mCancelWatchdog = () -> {
if (!isFinished()) {
Slog.e(TAG, "[Watchdog Triggered]: " + this);
@@ -187,9 +167,7 @@ public class BiometricSchedulerOperation {
if (mClientMonitor.getCookie() != 0) {
String err = "operation requires cookie";
- if (mIsDebuggable.getAsBoolean()) {
- throw new IllegalStateException(err);
- }
+ Counter.logIncrement("biometric.value_biometric_scheduler_operation_state_error_count");
Slog.e(TAG, err);
}
@@ -456,10 +434,9 @@ public class BiometricSchedulerOperation {
private boolean errorWhenOneOf(String op, @OperationState int... states) {
final boolean isError = ArrayUtils.contains(states, mState);
if (isError) {
- String err = op + ": mState must not be " + mState;
- if (mIsDebuggable.getAsBoolean()) {
- throw new IllegalStateException(err);
- }
+ Counter.logIncrement(
+ "biometric.value_biometric_scheduler_operation_state_error_count");
+ final String err = op + ": mState must not be " + mState;
Slog.e(TAG, err);
}
return isError;
@@ -468,10 +445,10 @@ public class BiometricSchedulerOperation {
private boolean errorWhenNoneOf(String op, @OperationState int... states) {
final boolean isError = !ArrayUtils.contains(states, mState);
if (isError) {
- String err = op + ": mState=" + mState + " must be one of " + Arrays.toString(states);
- if (mIsDebuggable.getAsBoolean()) {
- throw new IllegalStateException(err);
- }
+ Counter.logIncrement(
+ "biometric.value_biometric_scheduler_operation_state_error_count");
+ final String err = op + ": mState=" + mState + " must be one of "
+ + Arrays.toString(states);
Slog.e(TAG, err);
}
return isError;
diff --git a/services/core/java/com/android/server/clipboard/ClipboardService.java b/services/core/java/com/android/server/clipboard/ClipboardService.java
index 73aa14ba016f..78f71877afed 100644
--- a/services/core/java/com/android/server/clipboard/ClipboardService.java
+++ b/services/core/java/com/android/server/clipboard/ClipboardService.java
@@ -684,7 +684,8 @@ public class ClipboardService extends SystemService {
if (clipboard == null) {
return null;
}
- showAccessNotificationLocked(pkg, intendingUid, intendingUserId, clipboard);
+ showAccessNotificationLocked(
+ pkg, intendingUid, intendingUserId, clipboard, deviceId);
notifyTextClassifierLocked(clipboard, pkg, intendingUid);
if (clipboard.primaryClip != null) {
scheduleAutoClear(userId, intendingUid, intendingDeviceId);
@@ -1438,7 +1439,7 @@ public class ClipboardService extends SystemService {
*/
@GuardedBy("mLock")
private void showAccessNotificationLocked(String callingPackage, int uid, @UserIdInt int userId,
- Clipboard clipboard) {
+ Clipboard clipboard, int accessDeviceId) {
if (clipboard.primaryClip == null) {
return;
}
@@ -1477,7 +1478,7 @@ public class ClipboardService extends SystemService {
return;
}
- final ArraySet<Context> toastContexts = getToastContexts(clipboard);
+ final ArraySet<Context> toastContexts = getToastContexts(clipboard, accessDeviceId);
Binder.withCleanCallingIdentity(() -> {
try {
CharSequence callingAppLabel = mPm.getApplicationLabel(
@@ -1516,40 +1517,55 @@ public class ClipboardService extends SystemService {
* If the clipboard is for a VirtualDevice, we attempt to return the single DisplayContext for
* the focused VirtualDisplay for that device, but might need to return the contexts for
* multiple displays if the VirtualDevice has several but none of them were focused.
+ *
+ * If the clipboard is NOT for a VirtualDevice, but it's being accessed from a VirtualDevice,
+ * this means that the clipboard is shared between the default and that device. In this case we
+ * need to show a toast in both places.
*/
- private ArraySet<Context> getToastContexts(Clipboard clipboard) throws IllegalStateException {
+ private ArraySet<Context> getToastContexts(Clipboard clipboard, int accessDeviceId)
+ throws IllegalStateException {
ArraySet<Context> contexts = new ArraySet<>();
+ if (clipboard.deviceId == DEVICE_ID_DEFAULT || accessDeviceId == DEVICE_ID_DEFAULT) {
+ // Always show the toast on the default display when the default clipboard is accessed -
+ // also when the clipboard is shared with a virtual device and accessed from there.
+ // Same when any clipboard is accessed from the default device.
+ contexts.add(getContext());
+ }
- if (mVdmInternal != null && clipboard.deviceId != DEVICE_ID_DEFAULT) {
- DisplayManager displayManager = getContext().getSystemService(DisplayManager.class);
+ if ((accessDeviceId == DEVICE_ID_DEFAULT && clipboard.deviceId == DEVICE_ID_DEFAULT)
+ || mVdmInternal == null) {
+ // No virtual devices involved.
+ return contexts;
+ }
- int topFocusedDisplayId = mWm.getTopFocusedDisplayId();
- ArraySet<Integer> displayIds = mVdmInternal.getDisplayIdsForDevice(clipboard.deviceId);
+ // At this point the clipboard is either accessed from a virtual device, or it is a virtual
+ // device clipboard, so show a toast on the relevant virtual display(s).
+ DisplayManager displayManager = getContext().getSystemService(DisplayManager.class);
+ ArraySet<Integer> displayIds = mVdmInternal.getDisplayIdsForDevice(accessDeviceId);
+ int topFocusedDisplayId = mWm.getTopFocusedDisplayId();
- if (displayIds.contains(topFocusedDisplayId)) {
- Display display = displayManager.getDisplay(topFocusedDisplayId);
- if (display != null) {
- contexts.add(getContext().createDisplayContext(display));
- return contexts;
- }
+ if (displayIds.contains(topFocusedDisplayId)) {
+ Display display = displayManager.getDisplay(topFocusedDisplayId);
+ if (display != null) {
+ contexts.add(getContext().createDisplayContext(display));
+ return contexts;
}
+ }
- for (int i = 0; i < displayIds.size(); i++) {
- Display display = displayManager.getDisplay(displayIds.valueAt(i));
- if (display != null) {
- contexts.add(getContext().createDisplayContext(display));
- }
- }
- if (!contexts.isEmpty()) {
- return contexts;
+ for (int i = 0; i < displayIds.size(); i++) {
+ Display display = displayManager.getDisplay(displayIds.valueAt(i));
+ if (display != null) {
+ contexts.add(getContext().createDisplayContext(display));
}
+ }
+ if (contexts.isEmpty()) {
Slog.e(TAG, "getToastContexts Couldn't find any VirtualDisplays for VirtualDevice "
- + clipboard.deviceId);
+ + accessDeviceId);
// Since we couldn't find any VirtualDisplays to use at all, just fall through to using
// the default display below.
+ contexts.add(getContext());
}
- contexts.add(getContext());
return contexts;
}
diff --git a/services/core/java/com/android/server/compat/PlatformCompat.java b/services/core/java/com/android/server/compat/PlatformCompat.java
index 22b85d45d15e..a9fe8cb01b3a 100644
--- a/services/core/java/com/android/server/compat/PlatformCompat.java
+++ b/services/core/java/com/android/server/compat/PlatformCompat.java
@@ -248,6 +248,25 @@ public class PlatformCompat extends IPlatformCompat.Stub {
return enabled;
}
+ /**
+ * Internal version of {@link #isChangeEnabledByUid(long, int)}.
+ *
+ * <p>Does not perform costly permission check and logging.
+ */
+ public boolean isChangeEnabledByUidInternalNoLogging(long changeId, int uid) {
+ String[] packages = mContext.getPackageManager().getPackagesForUid(uid);
+ if (packages == null || packages.length == 0) {
+ return mCompatConfig.defaultChangeIdValue(changeId);
+ }
+ boolean enabled = true;
+ final int userId = UserHandle.getUserId(uid);
+ for (String packageName : packages) {
+ final var appInfo = getApplicationInfo(packageName, userId);
+ enabled &= isChangeEnabledInternalNoLogging(changeId, appInfo);
+ }
+ return enabled;
+ }
+
@Override
@EnforcePermission(OVERRIDE_COMPAT_CHANGE_CONFIG)
public void setOverrides(CompatibilityChangeConfig overrides, String packageName) {
diff --git a/services/core/java/com/android/server/crashrecovery/CrashRecoveryHelper.java b/services/core/java/com/android/server/crashrecovery/CrashRecoveryHelper.java
index 133c79f81bb5..8e725465ddd6 100644
--- a/services/core/java/com/android/server/crashrecovery/CrashRecoveryHelper.java
+++ b/services/core/java/com/android/server/crashrecovery/CrashRecoveryHelper.java
@@ -24,6 +24,7 @@ import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.VersionedPackage;
import android.net.ConnectivityModuleConnector;
+import android.sysprop.CrashRecoveryProperties;
import android.text.TextUtils;
import android.util.Slog;
@@ -35,7 +36,7 @@ import java.util.List;
/**
* Provides helper methods for the CrashRecovery APEX
- *
+ * TODO: b/354112511 Add tests for this class when it is finalized.
* @hide
*/
public final class CrashRecoveryHelper {
@@ -76,11 +77,13 @@ public final class CrashRecoveryHelper {
}
/**
- * Register health listeners for explicit package failures.
- * Currently only registering for Connectivity Module health.
- * @hide
+ * Register health listeners for Connectivity packages health.
+ *
+ * TODO: b/354112511 Have an internal method to trigger a rollback by reporting high severity errors,
+ * and rely on ActivityManager to inform the watchdog of severe network stack crashes
+ * instead of having this listener in parallel.
*/
- public void registerConnectivityModuleHealthListener(@NonNull int failureReason) {
+ public void registerConnectivityModuleHealthListener() {
// register listener for ConnectivityModule
mConnectivityModuleConnector.registerHealthListener(
packageName -> {
@@ -90,7 +93,7 @@ public final class CrashRecoveryHelper {
return;
}
final List<VersionedPackage> pkgList = Collections.singletonList(pkg);
- PackageWatchdog.getInstance(mContext).onPackageFailure(pkgList, failureReason);
+ PackageWatchdog.getInstance(mContext).onPackageFailure(pkgList, PackageWatchdog.FAILURE_REASON_EXPLICIT_HEALTH_CHECK);
});
}
@@ -126,4 +129,21 @@ public final class CrashRecoveryHelper {
return pm.getPackageInfo(packageName, PackageManager.MATCH_APEX);
}
}
+
+ /**
+ * Check if we're currently attempting to reboot for a factory reset. This method must
+ * return true if RescueParty tries to reboot early during a boot loop, since the device
+ * will not be fully booted at this time.
+ */
+ public static boolean isRecoveryTriggeredReboot() {
+ return isFactoryResetPropertySet() || isRebootPropertySet();
+ }
+
+ static boolean isFactoryResetPropertySet() {
+ return CrashRecoveryProperties.attemptingFactoryReset().orElse(false);
+ }
+
+ static boolean isRebootPropertySet() {
+ return CrashRecoveryProperties.attemptingReboot().orElse(false);
+ }
}
diff --git a/services/core/java/com/android/server/crashrecovery/CrashRecoveryModule.java b/services/core/java/com/android/server/crashrecovery/CrashRecoveryModule.java
new file mode 100644
index 000000000000..5f2fbcedce88
--- /dev/null
+++ b/services/core/java/com/android/server/crashrecovery/CrashRecoveryModule.java
@@ -0,0 +1,55 @@
+/*
+ * 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.server.crashrecovery;
+
+import android.content.Context;
+
+import com.android.server.PackageWatchdog;
+import com.android.server.RescueParty;
+import com.android.server.SystemService;
+
+
+/** This class encapsulate the lifecycle methods of CrashRecovery module. */
+public class CrashRecoveryModule {
+ private static final String TAG = "CrashRecoveryModule";
+
+ /** Lifecycle definition for CrashRecovery module. */
+ public static class Lifecycle extends SystemService {
+ private Context mSystemContext;
+ private PackageWatchdog mPackageWatchdog;
+
+ public Lifecycle(Context context) {
+ super(context);
+ mSystemContext = context;
+ mPackageWatchdog = PackageWatchdog.getInstance(context);
+ }
+
+ @Override
+ public void onStart() {
+ RescueParty.registerHealthObserver(mSystemContext);
+ mPackageWatchdog.registerShutdownBroadcastReceiver();
+ mPackageWatchdog.noteBoot();
+ }
+
+ @Override
+ public void onBootPhase(int phase) {
+ if (phase == PHASE_THIRD_PARTY_APPS_CAN_START) {
+ mPackageWatchdog.onPackagesReady();
+ }
+ }
+ }
+}
diff --git a/services/core/java/com/android/server/crashrecovery/TEST_MAPPING b/services/core/java/com/android/server/crashrecovery/TEST_MAPPING
index 4a66bac2e4ec..615db345635c 100644
--- a/services/core/java/com/android/server/crashrecovery/TEST_MAPPING
+++ b/services/core/java/com/android/server/crashrecovery/TEST_MAPPING
@@ -7,6 +7,9 @@
"include-filter": "com.android.server.RescuePartyTest"
}
]
+ },
+ {
+ "name": "CrashRecoveryModuleTests"
}
]
} \ No newline at end of file
diff --git a/services/core/java/com/android/server/display/BrightnessRangeController.java b/services/core/java/com/android/server/display/BrightnessRangeController.java
index 9b37418bb6fe..515e70495f9e 100644
--- a/services/core/java/com/android/server/display/BrightnessRangeController.java
+++ b/services/core/java/com/android/server/display/BrightnessRangeController.java
@@ -22,6 +22,7 @@ import android.os.IBinder;
import com.android.internal.annotations.VisibleForTesting;
import com.android.server.display.brightness.clamper.HdrClamper;
+import com.android.server.display.config.HighBrightnessModeData;
import com.android.server.display.feature.DisplayManagerFlags;
import java.io.PrintWriter;
@@ -157,7 +158,7 @@ class BrightnessRangeController {
private void updateHdrClamper(DisplayDeviceInfo info, IBinder token,
DisplayDeviceConfig displayDeviceConfig) {
if (mUseHdrClamper) {
- DisplayDeviceConfig.HighBrightnessModeData hbmData =
+ HighBrightnessModeData hbmData =
displayDeviceConfig.getHighBrightnessModeData();
float minimumHdrPercentOfScreen =
hbmData == null ? -1f : hbmData.minimumHdrPercentOfScreen;
diff --git a/services/core/java/com/android/server/display/DisplayBrightnessState.java b/services/core/java/com/android/server/display/DisplayBrightnessState.java
index 184ae41fe045..222c5a83a551 100644
--- a/services/core/java/com/android/server/display/DisplayBrightnessState.java
+++ b/services/core/java/com/android/server/display/DisplayBrightnessState.java
@@ -29,9 +29,10 @@ import java.util.Objects;
*/
public final class DisplayBrightnessState {
public static final float CUSTOM_ANIMATION_RATE_NOT_SET = -1f;
+ public static final float BRIGHTNESS_NOT_SET = -1f;
private final float mBrightness;
- private final float mSdrBrightness;
+ private final float mHdrBrightness;
private final float mMaxBrightness;
private final float mMinBrightness;
@@ -51,7 +52,7 @@ public final class DisplayBrightnessState {
private DisplayBrightnessState(Builder builder) {
mBrightness = builder.getBrightness();
- mSdrBrightness = builder.getSdrBrightness();
+ mHdrBrightness = builder.getHdrBrightness();
mBrightnessReason = builder.getBrightnessReason();
mDisplayBrightnessStrategyName = builder.getDisplayBrightnessStrategyName();
mShouldUseAutoBrightness = builder.getShouldUseAutoBrightness();
@@ -73,10 +74,10 @@ public final class DisplayBrightnessState {
}
/**
- * Gets the sdr brightness
+ * Gets the hdr brightness
*/
- public float getSdrBrightness() {
- return mSdrBrightness;
+ public float getHdrBrightness() {
+ return mHdrBrightness;
}
/**
@@ -163,8 +164,8 @@ public final class DisplayBrightnessState {
StringBuilder stringBuilder = new StringBuilder("DisplayBrightnessState:");
stringBuilder.append("\n brightness:");
stringBuilder.append(getBrightness());
- stringBuilder.append("\n sdrBrightness:");
- stringBuilder.append(getSdrBrightness());
+ stringBuilder.append("\n hdrBrightness:");
+ stringBuilder.append(getHdrBrightness());
stringBuilder.append("\n brightnessReason:");
stringBuilder.append(getBrightnessReason());
stringBuilder.append("\n shouldUseAutoBrightness:");
@@ -198,7 +199,7 @@ public final class DisplayBrightnessState {
DisplayBrightnessState otherState = (DisplayBrightnessState) other;
return mBrightness == otherState.getBrightness()
- && mSdrBrightness == otherState.getSdrBrightness()
+ && mHdrBrightness == otherState.getHdrBrightness()
&& mBrightnessReason.equals(otherState.getBrightnessReason())
&& TextUtils.equals(mDisplayBrightnessStrategyName,
otherState.getDisplayBrightnessStrategyName())
@@ -216,7 +217,7 @@ public final class DisplayBrightnessState {
@Override
public int hashCode() {
- return Objects.hash(mBrightness, mSdrBrightness, mBrightnessReason,
+ return Objects.hash(mBrightness, mHdrBrightness, mBrightnessReason,
mShouldUseAutoBrightness, mIsSlowChange, mMaxBrightness, mMinBrightness,
mCustomAnimationRate,
mShouldUpdateScreenBrightnessSetting, mBrightnessEvent, mBrightnessAdjustmentFlag,
@@ -235,7 +236,7 @@ public final class DisplayBrightnessState {
*/
public static class Builder {
private float mBrightness;
- private float mSdrBrightness;
+ private float mHdrBrightness = BRIGHTNESS_NOT_SET;
private BrightnessReason mBrightnessReason = new BrightnessReason();
private String mDisplayBrightnessStrategyName;
private boolean mShouldUseAutoBrightness;
@@ -260,7 +261,7 @@ public final class DisplayBrightnessState {
public static Builder from(DisplayBrightnessState state) {
Builder builder = new Builder();
builder.setBrightness(state.getBrightness());
- builder.setSdrBrightness(state.getSdrBrightness());
+ builder.setHdrBrightness(state.getHdrBrightness());
builder.setBrightnessReason(state.getBrightnessReason());
builder.setDisplayBrightnessStrategyName(state.getDisplayBrightnessStrategyName());
builder.setShouldUseAutoBrightness(state.getShouldUseAutoBrightness());
@@ -295,20 +296,20 @@ public final class DisplayBrightnessState {
}
/**
- * Gets the sdr brightness
+ * Gets the hdr brightness
*/
- public float getSdrBrightness() {
- return mSdrBrightness;
+ public float getHdrBrightness() {
+ return mHdrBrightness;
}
/**
- * Sets the sdr brightness
+ * Sets the hdr brightness
*
- * @param sdrBrightness The sdr brightness to be associated with DisplayBrightnessState's
+ * @param hdrBrightness The hdr brightness to be associated with DisplayBrightnessState's
* builder
*/
- public Builder setSdrBrightness(float sdrBrightness) {
- this.mSdrBrightness = sdrBrightness;
+ public Builder setHdrBrightness(float hdrBrightness) {
+ this.mHdrBrightness = hdrBrightness;
return this;
}
diff --git a/services/core/java/com/android/server/display/DisplayDeviceConfig.java b/services/core/java/com/android/server/display/DisplayDeviceConfig.java
index e4db634c0e26..ed6ed60a6806 100644
--- a/services/core/java/com/android/server/display/DisplayDeviceConfig.java
+++ b/services/core/java/com/android/server/display/DisplayDeviceConfig.java
@@ -53,9 +53,9 @@ import com.android.server.display.config.DisplayBrightnessPoint;
import com.android.server.display.config.DisplayConfiguration;
import com.android.server.display.config.DisplayQuirks;
import com.android.server.display.config.EvenDimmerBrightnessData;
-import com.android.server.display.config.HbmTiming;
import com.android.server.display.config.HdrBrightnessData;
import com.android.server.display.config.HighBrightnessMode;
+import com.android.server.display.config.HighBrightnessModeData;
import com.android.server.display.config.HysteresisLevels;
import com.android.server.display.config.IdleScreenRefreshRateTimeout;
import com.android.server.display.config.IdleScreenRefreshRateTimeoutLuxThresholdPoint;
@@ -75,8 +75,6 @@ import com.android.server.display.config.RefreshRateRange;
import com.android.server.display.config.RefreshRateThrottlingMap;
import com.android.server.display.config.RefreshRateThrottlingPoint;
import com.android.server.display.config.RefreshRateZone;
-import com.android.server.display.config.SdrHdrRatioMap;
-import com.android.server.display.config.SdrHdrRatioPoint;
import com.android.server.display.config.SensorData;
import com.android.server.display.config.ThermalStatus;
import com.android.server.display.config.ThermalThrottling;
@@ -101,6 +99,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
+import java.util.function.Function;
import javax.xml.datatype.DatatypeConfigurationException;
@@ -302,6 +301,19 @@ import javax.xml.datatype.DatatypeConfigurationException;
* <brightnessIncreaseDurationMillis>10000</brightnessIncreaseDurationMillis>
* <brightnessDecreaseDebounceMillis>13000</brightnessDecreaseDebounceMillis>
* <brightnessDecreaseDurationMillis>10000</brightnessDecreaseDurationMillis>
+ * <minimumHdrPercentOfScreenForNbm>0.2</minimumHdrPercentOfScreenForNbm>
+ * <minimumHdrPercentOfScreenForHbm>0.5</minimumHdrPercentOfScreenForHbm>
+ * <allowInLowPowerMode>true</allowInLowPowerMode>
+ * <sdrHdrRatioMap>
+ * <point>
+ * <first>2.0</first>
+ * <second>4.0</second>
+ * </point>
+ * <point>
+ * <first>100</first>
+ * <second>8.0</second>
+ * </point>
+ * </sdrHdrRatioMap>
* </hdrBrightnessConfig>
* <luxThrottling>
* <brightnessLimitMap>
@@ -608,6 +620,15 @@ import javax.xml.datatype.DatatypeConfigurationException;
* </idleScreenRefreshRateTimeout>
* <supportsVrr>true</supportsVrr>
*
+ * <dozeBrightnessSensorValueToBrightness>
+ * <item>-1</item> <!-- 0: OFF -->
+ * <item>0.003937008</item> <!-- 1: NIGHT -->
+ * <item>0.015748031</item> <!-- 2: LOW -->
+ * <item>0.102362205</item> <!-- 3: HIGH -->
+ * <item>0.106299213</item> <!-- 4: SUN -->
+ * </dozeBrightnessSensorValueToBrightness>
+ * <defaultDozeBrightness>0.235</defaultDozeBrightness>
+ *
* </displayConfiguration>
* }
* </pre>
@@ -627,6 +648,10 @@ public class DisplayDeviceConfig {
public static final int DEFAULT_LOW_REFRESH_RATE = 60;
+ // Float.NaN (used as invalid for brightness) cannot be stored in config.xml
+ // so -2 is used instead
+ public static final float INVALID_BRIGHTNESS_IN_CONFIG = -2f;
+
@VisibleForTesting
static final float BRIGHTNESS_DEFAULT = 0.5f;
private static final String ETC_DIR = "etc";
@@ -645,10 +670,6 @@ public class DisplayDeviceConfig {
private static final int INTERPOLATION_DEFAULT = 0;
private static final int INTERPOLATION_LINEAR = 1;
- // Float.NaN (used as invalid for brightness) cannot be stored in config.xml
- // so -2 is used instead
- private static final float INVALID_BRIGHTNESS_IN_CONFIG = -2f;
-
// Length of the ambient light horizon used to calculate the long term estimate of ambient
// light.
private static final int AMBIENT_LIGHT_LONG_HORIZON_MILLIS = 10000;
@@ -662,6 +683,8 @@ public class DisplayDeviceConfig {
@VisibleForTesting
static final float HDR_PERCENT_OF_SCREEN_REQUIRED_DEFAULT = 0.5f;
+ private static final int KEEP_CURRENT_BRIGHTNESS = -1;
+
private final Context mContext;
// The details of the ambient light sensor associated with this display.
@@ -743,13 +766,13 @@ public class DisplayDeviceConfig {
private Spline mNitsToBacklightSpline;
private List<String> mQuirks;
- private boolean mIsHighBrightnessModeEnabled = false;
+ @Nullable
private HighBrightnessModeData mHbmData;
@Nullable
private PowerThrottlingConfigData mPowerThrottlingConfigData;
private DensityMapping mDensityMapping;
private String mLoadedFrom = null;
- private Spline mSdrToHdrRatioSpline;
+
// Represents the auto-brightness brightening light debounce.
private long mAutoBrightnessBrighteningLightDebounce =
@@ -869,10 +892,14 @@ public class DisplayDeviceConfig {
private boolean mVrrSupportEnabled;
+ @Nullable
+ private float[] mDozeBrightnessSensorValueToBrightness;
+ private float mDefaultDozeBrightness;
+
private final DisplayManagerFlags mFlags;
@VisibleForTesting
- DisplayDeviceConfig(Context context, DisplayManagerFlags flags) {
+ public DisplayDeviceConfig(Context context, DisplayManagerFlags flags) {
mContext = context;
mFlags = flags;
}
@@ -1155,7 +1182,7 @@ public class DisplayDeviceConfig {
* @return true if there is sdrHdrRatioMap, false otherwise.
*/
public boolean hasSdrToHdrRatioSpline() {
- return mSdrToHdrRatioSpline != null;
+ return mHbmData != null && mHbmData.sdrToHdrRatioSpline != null;
}
/**
@@ -1165,7 +1192,20 @@ public class DisplayDeviceConfig {
* @return the HDR brightness or BRIGHTNESS_INVALID when no mapping exists.
*/
public float getHdrBrightnessFromSdr(float brightness, float maxDesiredHdrSdrRatio) {
- if (mSdrToHdrRatioSpline == null) {
+ Spline sdrToHdrSpline = mHbmData != null ? mHbmData.sdrToHdrRatioSpline : null;
+ return getHdrBrightnessFromSdr(brightness, maxDesiredHdrSdrRatio, sdrToHdrSpline);
+ }
+
+ /**
+ * Calculate the HDR brightness for the specified SDR brightenss, restricted by the
+ * maxDesiredHdrSdrRatio (the ratio between the HDR luminance and SDR luminance) and specific
+ * sdrToHdrSpline
+ *
+ * @return the HDR brightness or BRIGHTNESS_INVALID when no mapping exists.
+ */
+ public float getHdrBrightnessFromSdr(float brightness, float maxDesiredHdrSdrRatio,
+ @Nullable Spline sdrToHdrSpline) {
+ if (sdrToHdrSpline == null) {
return PowerManager.BRIGHTNESS_INVALID;
}
@@ -1175,7 +1215,7 @@ public class DisplayDeviceConfig {
return PowerManager.BRIGHTNESS_INVALID;
}
- float ratio = Math.min(mSdrToHdrRatioSpline.interpolate(nits), maxDesiredHdrSdrRatio);
+ float ratio = Math.min(sdrToHdrSpline.interpolate(nits), maxDesiredHdrSdrRatio);
float hdrNits = nits * ratio;
if (getNitsToBacklightSpline() == null) {
return PowerManager.BRIGHTNESS_INVALID;
@@ -1321,13 +1361,11 @@ public class DisplayDeviceConfig {
* @return high brightness mode configuration data for the display.
*/
public HighBrightnessModeData getHighBrightnessModeData() {
- if (!mIsHighBrightnessModeEnabled || mHbmData == null) {
+ if (mHbmData == null || !mHbmData.isHighBrightnessModeEnabled) {
return null;
}
- HighBrightnessModeData hbmData = new HighBrightnessModeData();
- mHbmData.copyTo(hbmData);
- return hbmData;
+ return mHbmData;
}
/**
@@ -1585,6 +1623,24 @@ public class DisplayDeviceConfig {
return mVrrSupportEnabled;
}
+ /**
+ * While the device is dozing, a designated light sensor is used to determine the brightness.
+ * @return The mapping between doze brightness sensor values and brightness values. The value
+ * -1 means that the current brightness should be kept.
+ */
+ @Nullable
+ public float[] getDozeBrightnessSensorValueToBrightness() {
+ return mDozeBrightnessSensorValueToBrightness;
+ }
+
+ /**
+ * @return The default doze brightness to use while no other doze brightness is available. Can
+ * be {@link PowerManager#BRIGHTNESS_INVALID_FLOAT} if undefined.
+ */
+ public float getDefaultDozeBrightness() {
+ return mDefaultDozeBrightness;
+ }
+
@Override
public String toString() {
return "DisplayDeviceConfig{"
@@ -1604,11 +1660,10 @@ public class DisplayDeviceConfig {
+ ", mBacklightMaximum=" + mBacklightMaximum
+ ", mBrightnessDefault=" + mBrightnessDefault
+ ", mQuirks=" + mQuirks
- + ", mIsHighBrightnessModeEnabled=" + mIsHighBrightnessModeEnabled
+ "\n"
+ "mLuxThrottlingData=" + mLuxThrottlingData
+ ", mHbmData=" + mHbmData
- + ", mSdrToHdrRatioSpline=" + mSdrToHdrRatioSpline
+
+ ", mThermalBrightnessThrottlingDataMapByThrottlingId="
+ mThermalBrightnessThrottlingDataMapByThrottlingId
+ "\n"
@@ -1683,6 +1738,9 @@ public class DisplayDeviceConfig {
? mEvenDimmerBrightnessData.toString() : "null")
+ "\n"
+ "mVrrSupported= " + mVrrSupportEnabled + "\n"
+ + "mDozeBrightnessSensorValueToBrightness= "
+ + Arrays.toString(mDozeBrightnessSensorValueToBrightness) + "\n"
+ + "mDefaultDozeBrightness= " + mDefaultDozeBrightness + "\n"
+ "}";
}
@@ -1715,7 +1773,7 @@ public class DisplayDeviceConfig {
}
@VisibleForTesting
- boolean initFromFile(File configFile) {
+ public boolean initFromFile(File configFile) {
if (!configFile.exists()) {
// Display configuration files aren't required to exist.
return false;
@@ -1740,7 +1798,25 @@ public class DisplayDeviceConfig {
loadBrightnessMap(config);
loadThermalThrottlingConfig(config);
loadPowerThrottlingConfigData(config);
- loadHighBrightnessModeData(config);
+ // Backlight and evenDimmer data should be loaded for HbmData
+ Function<HighBrightnessMode, Float> transitionPointProvider = (hbm) -> {
+ float transitionPointBacklightScale = hbm.getTransitionPoint_all().floatValue();
+ if (transitionPointBacklightScale >= mBacklightMaximum) {
+ throw new IllegalArgumentException("HBM transition point invalid. "
+ + transitionPointBacklightScale + " is not less than "
+ + mBacklightMaximum);
+ }
+ return getBrightnessFromBacklight(transitionPointBacklightScale);
+ };
+ mHbmData = HighBrightnessModeData.loadHighBrightnessModeData(config,
+ transitionPointProvider);
+ if (mHbmData.isHighBrightnessModeEnabled && mHbmData.refreshRateLimit != null) {
+ // TODO(b/331650248): cleanup, DMD can use mHbmData.refreshRateLimit
+ mRefreshRateLimitations.add(new RefreshRateLimitation(
+ DisplayManagerInternal.REFRESH_RATE_LIMIT_HIGH_BRIGHTNESS_MODE,
+ mHbmData.refreshRateLimit));
+ }
+
loadLuxThrottling(config);
loadQuirks(config);
loadBrightnessRamps(config);
@@ -1757,10 +1833,11 @@ public class DisplayDeviceConfig {
loadRefreshRateSetting(config);
loadScreenOffBrightnessSensorValueToLuxFromDdc(config);
loadUsiVersion(config);
- mHdrBrightnessData = HdrBrightnessData.loadConfig(config);
+ mHdrBrightnessData = HdrBrightnessData.loadConfig(config, transitionPointProvider);
loadBrightnessCapForWearBedtimeMode(config);
loadIdleScreenRefreshRateTimeoutConfigs(config);
mVrrSupportEnabled = config.getSupportsVrr();
+ loadDozeBrightness(config);
} else {
Slog.w(TAG, "DisplayDeviceConfig file is null");
}
@@ -1789,6 +1866,7 @@ public class DisplayDeviceConfig {
loadRefreshRateSetting(null);
loadBrightnessCapForWearBedtimeModeFromConfigXml();
loadIdleScreenRefreshRateTimeoutConfigs(null);
+ loadDozeBrightness(null);
mLoadedFrom = "<config.xml>";
}
@@ -1938,40 +2016,6 @@ public class DisplayDeviceConfig {
constrainNitsAndBacklightArrays();
}
- private Spline loadSdrHdrRatioMap(HighBrightnessMode hbmConfig) {
- final SdrHdrRatioMap sdrHdrRatioMap = hbmConfig.getSdrHdrRatioMap_all();
-
- if (sdrHdrRatioMap == null) {
- return null;
- }
-
- final List<SdrHdrRatioPoint> points = sdrHdrRatioMap.getPoint();
- final int size = points.size();
- if (size == 0) {
- return null;
- }
-
- float[] nits = new float[size];
- float[] ratios = new float[size];
-
- int i = 0;
- for (SdrHdrRatioPoint point : points) {
- nits[i] = point.getSdrNits().floatValue();
- if (i > 0) {
- if (nits[i] < nits[i - 1]) {
- Slog.e(TAG, "sdrHdrRatioMap must be non-decreasing, ignoring rest "
- + " of configuration. nits: " + nits[i] + " < "
- + nits[i - 1]);
- return null;
- }
- }
- ratios[i] = point.getHdrRatio().floatValue();
- ++i;
- }
-
- return Spline.createSpline(nits, ratios);
- }
-
private void loadThermalThrottlingConfig(DisplayConfiguration config) {
final ThermalThrottling throttlingConfig = config.getThermalThrottling();
if (throttlingConfig == null) {
@@ -2525,49 +2569,6 @@ public class DisplayDeviceConfig {
}
}
- private void loadHighBrightnessModeData(DisplayConfiguration config) {
- final HighBrightnessMode hbm = config.getHighBrightnessMode();
- if (hbm != null) {
- mIsHighBrightnessModeEnabled = hbm.getEnabled();
- mHbmData = new HighBrightnessModeData();
- mHbmData.minimumLux = hbm.getMinimumLux_all().floatValue();
- float transitionPointBacklightScale = hbm.getTransitionPoint_all().floatValue();
- if (transitionPointBacklightScale >= mBacklightMaximum) {
- throw new IllegalArgumentException("HBM transition point invalid. "
- + mHbmData.transitionPoint + " is not less than "
- + mBacklightMaximum);
- }
- mHbmData.transitionPoint =
- getBrightnessFromBacklight(transitionPointBacklightScale);
- final HbmTiming hbmTiming = hbm.getTiming_all();
- mHbmData.timeWindowMillis = hbmTiming.getTimeWindowSecs_all().longValue() * 1000;
- mHbmData.timeMaxMillis = hbmTiming.getTimeMaxSecs_all().longValue() * 1000;
- mHbmData.timeMinMillis = hbmTiming.getTimeMinSecs_all().longValue() * 1000;
- mHbmData.allowInLowPowerMode = hbm.getAllowInLowPowerMode_all();
- final RefreshRateRange rr = hbm.getRefreshRate_all();
- if (rr != null) {
- final float min = rr.getMinimum().floatValue();
- final float max = rr.getMaximum().floatValue();
- mRefreshRateLimitations.add(new RefreshRateLimitation(
- DisplayManagerInternal.REFRESH_RATE_LIMIT_HIGH_BRIGHTNESS_MODE, min, max));
- }
- BigDecimal minHdrPctOfScreen = hbm.getMinimumHdrPercentOfScreen_all();
- if (minHdrPctOfScreen != null) {
- mHbmData.minimumHdrPercentOfScreen = minHdrPctOfScreen.floatValue();
- if (mHbmData.minimumHdrPercentOfScreen > 1
- || mHbmData.minimumHdrPercentOfScreen < 0) {
- Slog.w(TAG, "Invalid minimum HDR percent of screen: "
- + String.valueOf(mHbmData.minimumHdrPercentOfScreen));
- mHbmData.minimumHdrPercentOfScreen = HDR_PERCENT_OF_SCREEN_REQUIRED_DEFAULT;
- }
- } else {
- mHbmData.minimumHdrPercentOfScreen = HDR_PERCENT_OF_SCREEN_REQUIRED_DEFAULT;
- }
-
- mSdrToHdrRatioSpline = loadSdrHdrRatioMap(hbm);
- }
- }
-
private void loadLuxThrottling(DisplayConfiguration config) {
LuxThrottling cfg = config.getLuxThrottling();
if (cfg != null) {
@@ -2800,6 +2801,37 @@ public class DisplayDeviceConfig {
}
}
+ private void loadDozeBrightness(DisplayConfiguration config) {
+ if (mFlags.isDozeBrightnessFloatEnabled() && config != null
+ && config.getDozeBrightnessSensorValueToBrightness() != null) {
+ List<BigDecimal> values = config.getDozeBrightnessSensorValueToBrightness().getItem();
+ mDozeBrightnessSensorValueToBrightness = new float[values.size()];
+ for (int i = 0; i < values.size(); i++) {
+ float backlight = values.get(i).floatValue();
+ if (backlight != KEEP_CURRENT_BRIGHTNESS) {
+ mDozeBrightnessSensorValueToBrightness[i] =
+ getBrightnessFromBacklight(backlight);
+ } else {
+ mDozeBrightnessSensorValueToBrightness[i] = KEEP_CURRENT_BRIGHTNESS;
+ }
+ }
+ }
+
+ if (mFlags.isDozeBrightnessFloatEnabled() && config != null
+ && config.getDefaultDozeBrightness() != null) {
+ float backlight = config.getDefaultDozeBrightness().floatValue();
+ mDefaultDozeBrightness = getBrightnessFromBacklight(backlight);
+ } else {
+ mDefaultDozeBrightness = mContext.getResources().getFloat(
+ com.android.internal.R.dimen.config_screenBrightnessDozeFloat);
+ if (mDefaultDozeBrightness == INVALID_BRIGHTNESS_IN_CONFIG) {
+ mDefaultDozeBrightness = BrightnessSynchronizer.brightnessIntToFloat(
+ mContext.getResources().getInteger(
+ com.android.internal.R.integer.config_screenBrightnessDoze));
+ }
+ }
+ }
+
private void validateIdleScreenRefreshRateTimeoutConfig(
IdleScreenRefreshRateTimeout idleScreenRefreshRateTimeoutConfig) {
IdleScreenRefreshRateTimeoutLuxThresholds idleScreenRefreshRateTimeoutLuxThresholds =
@@ -2921,73 +2953,6 @@ public class DisplayDeviceConfig {
}
/**
- * Container for high brightness mode configuration data.
- */
- static class HighBrightnessModeData {
- /** Minimum lux needed to enter high brightness mode */
- public float minimumLux;
-
- /** Brightness level at which we transition from normal to high-brightness. */
- public float transitionPoint;
-
- /** Whether HBM is allowed when {@code Settings.Global.LOW_POWER_MODE} is active. */
- public boolean allowInLowPowerMode;
-
- /** Time window for HBM. */
- public long timeWindowMillis;
-
- /** Maximum time HBM is allowed to be during in a {@code timeWindowMillis}. */
- public long timeMaxMillis;
-
- /** Minimum time that HBM can be on before being enabled. */
- public long timeMinMillis;
-
- /** Minimum HDR video size to enter high brightness mode */
- public float minimumHdrPercentOfScreen;
-
- HighBrightnessModeData() {}
-
- HighBrightnessModeData(float minimumLux, float transitionPoint, long timeWindowMillis,
- long timeMaxMillis, long timeMinMillis, boolean allowInLowPowerMode,
- float minimumHdrPercentOfScreen) {
- this.minimumLux = minimumLux;
- this.transitionPoint = transitionPoint;
- this.timeWindowMillis = timeWindowMillis;
- this.timeMaxMillis = timeMaxMillis;
- this.timeMinMillis = timeMinMillis;
- this.allowInLowPowerMode = allowInLowPowerMode;
- this.minimumHdrPercentOfScreen = minimumHdrPercentOfScreen;
- }
-
- /**
- * Copies the HBM data to the specified parameter instance.
- * @param other the instance to copy data to.
- */
- public void copyTo(@NonNull HighBrightnessModeData other) {
- other.minimumLux = minimumLux;
- other.timeWindowMillis = timeWindowMillis;
- other.timeMaxMillis = timeMaxMillis;
- other.timeMinMillis = timeMinMillis;
- other.transitionPoint = transitionPoint;
- other.allowInLowPowerMode = allowInLowPowerMode;
- other.minimumHdrPercentOfScreen = minimumHdrPercentOfScreen;
- }
-
- @Override
- public String toString() {
- return "HBM{"
- + "minLux: " + minimumLux
- + ", transition: " + transitionPoint
- + ", timeWindow: " + timeWindowMillis + "ms"
- + ", timeMax: " + timeMaxMillis + "ms"
- + ", timeMin: " + timeMinMillis + "ms"
- + ", allowInLowPowerMode: " + allowInLowPowerMode
- + ", minimumHdrPercentOfScreen: " + minimumHdrPercentOfScreen
- + "} ";
- }
- }
-
- /**
* Container for Power throttling configuration data.
* TODO(b/302814899): extract to separate class.
*/
diff --git a/services/core/java/com/android/server/display/DisplayManagerService.java b/services/core/java/com/android/server/display/DisplayManagerService.java
index 6928b33c63ae..2cec869c290e 100644
--- a/services/core/java/com/android/server/display/DisplayManagerService.java
+++ b/services/core/java/com/android/server/display/DisplayManagerService.java
@@ -3849,9 +3849,10 @@ public final class DisplayManagerService extends SystemService {
// Ignore redundant events. Further optimization is possible by merging adjacent events.
Pair<Integer, Integer> last = mDisplayEvents.get(mDisplayEvents.size() - 1);
if (last.first == displayId && last.second == event) {
- Slog.d(TAG,
- "Ignore redundant display event " + displayId + "/" + event + " to "
- + mCallbackRecord.mUid + "/" + mCallbackRecord.mPid);
+ if (DEBUG) {
+ Slog.d(TAG, "Ignore redundant display event " + displayId + "/" + event + " to "
+ + mCallbackRecord.mUid + "/" + mCallbackRecord.mPid);
+ }
return;
}
@@ -4726,6 +4727,32 @@ public final class DisplayManagerService extends SystemService {
DisplayManagerService.this.mDisplayModeDirector.requestDisplayModes(
token, displayId, modeIds);
}
+
+ @EnforcePermission(android.Manifest.permission.CONTROL_DISPLAY_BRIGHTNESS)
+ @Override // Binder call
+ public float[] getDozeBrightnessSensorValueToBrightness(int displayId) {
+ getDozeBrightnessSensorValueToBrightness_enforcePermission();
+ DisplayDeviceConfig ddc =
+ mDisplayDeviceConfigProvider.getDisplayDeviceConfig(displayId);
+ if (ddc == null) {
+ throw new IllegalArgumentException(
+ "Display ID does not have a config: " + displayId);
+ }
+ return ddc.getDozeBrightnessSensorValueToBrightness();
+ }
+
+ @EnforcePermission(android.Manifest.permission.CONTROL_DISPLAY_BRIGHTNESS)
+ @Override // Binder call
+ public float getDefaultDozeBrightness(int displayId) {
+ getDefaultDozeBrightness_enforcePermission();
+ DisplayDeviceConfig ddc =
+ mDisplayDeviceConfigProvider.getDisplayDeviceConfig(displayId);
+ if (ddc == null) {
+ throw new IllegalArgumentException(
+ "Display ID does not have a config for doze-default: " + displayId);
+ }
+ return ddc.getDefaultDozeBrightness();
+ }
}
private static boolean isValidBrightness(float brightness) {
@@ -4841,6 +4868,8 @@ public final class DisplayManagerService extends SystemService {
}
final int[] supportedStates =
mDeviceStateManager.getSupportedStateIdentifiers();
+ // TODO(b/352019542): remove the log once b/345960547 is fixed.
+ Slog.d(TAG, "supportedStates=" + Arrays.toString(supportedStates));
DisplayInfo displayInfo;
for (int state : supportedStates) {
displayInfo = mLogicalDisplayMapper.getDisplayInfoForStateLocked(state,
@@ -4849,6 +4878,8 @@ public final class DisplayManagerService extends SystemService {
possibleInfo.add(displayInfo);
}
}
+ // TODO(b/352019542): remove the log once b/345960547 is fixed.
+ Slog.d(TAG, "possibleInfos=" + possibleInfo);
return possibleInfo;
}
}
@@ -5236,7 +5267,7 @@ public final class DisplayManagerService extends SystemService {
mHandler.sendMessage(msg);
mLogicalDisplayMapper
- .setDeviceStateLocked(deviceState.getIdentifier());
+ .setDeviceStateLocked(deviceState);
}
}
};
diff --git a/services/core/java/com/android/server/display/DisplayManagerShellCommand.java b/services/core/java/com/android/server/display/DisplayManagerShellCommand.java
index 9eef6579d2df..e46397bc8ab7 100644
--- a/services/core/java/com/android/server/display/DisplayManagerShellCommand.java
+++ b/services/core/java/com/android/server/display/DisplayManagerShellCommand.java
@@ -62,6 +62,8 @@ class DisplayManagerShellCommand extends ShellCommand {
return showNotification();
case "cancel-notifications":
return cancelNotifications();
+ case "get-brightness":
+ return getBrightness();
case "set-brightness":
return setBrightness();
case "reset-brightness-configuration":
@@ -313,6 +315,25 @@ class DisplayManagerShellCommand extends ShellCommand {
return 0;
}
+ private int getBrightness() {
+ String displayIdString = getNextArg();
+ if (displayIdString == null) {
+ getErrPrintWriter().println("Error: no display id specified");
+ return 1;
+ }
+ int displayId;
+ try {
+ displayId = Integer.parseInt(displayIdString);
+ } catch (NumberFormatException e) {
+ getErrPrintWriter().println("Error: invalid displayId=" + displayIdString + " not int");
+ return 1;
+ }
+ final Context context = mService.getContext();
+ final DisplayManager dm = context.getSystemService(DisplayManager.class);
+ getOutPrintWriter().println(dm.getBrightness(displayId));
+ return 0;
+ }
+
private int setBrightness() {
String brightnessText = getNextArg();
if (brightnessText == null) {
diff --git a/services/core/java/com/android/server/display/DisplayPowerController.java b/services/core/java/com/android/server/display/DisplayPowerController.java
index 6694ebbe461a..1177be212222 100644
--- a/services/core/java/com/android/server/display/DisplayPowerController.java
+++ b/services/core/java/com/android/server/display/DisplayPowerController.java
@@ -87,6 +87,7 @@ import com.android.server.display.brightness.strategy.AutomaticBrightnessStrateg
import com.android.server.display.brightness.strategy.DisplayBrightnessStrategyConstants;
import com.android.server.display.color.ColorDisplayService.ColorDisplayServiceInternal;
import com.android.server.display.color.ColorDisplayService.ReduceBrightColorsListener;
+import com.android.server.display.config.HighBrightnessModeData;
import com.android.server.display.config.HysteresisLevels;
import com.android.server.display.feature.DisplayManagerFlags;
import com.android.server.display.layout.Layout;
@@ -128,9 +129,9 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
private static final String SCREEN_ON_BLOCKED_TRACE_NAME = "Screen on blocked";
private static final String SCREEN_OFF_BLOCKED_TRACE_NAME = "Screen off blocked";
- private static final String TAG = "DisplayPowerController2";
+ private static final String TAG = "DisplayPowerController";
// To enable these logs, run:
- // 'adb shell setprop persist.log.tag.DisplayPowerController2 DEBUG && adb reboot'
+ // 'adb shell setprop persist.log.tag.DisplayPowerController DEBUG && adb reboot'
private static final boolean DEBUG = DebugUtils.isDebuggable(TAG);
private static final String SCREEN_ON_BLOCKED_BY_DISPLAYOFFLOAD_TRACE_NAME =
"Screen on blocked by displayoffload";
@@ -262,6 +263,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
// The unique ID of the primary display device currently tied to this logical display
private String mUniqueDisplayId;
+ private String mPhysicalDisplayName;
// Tracker for brightness changes.
@Nullable
@@ -271,7 +273,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
private final SettingsObserver mSettingsObserver;
// The doze screen brightness.
- private final float mScreenBrightnessDozeConfig;
+ private float mScreenBrightnessDozeConfig;
// True if auto-brightness should be used.
private boolean mUseSoftwareAutoBrightnessConfig;
@@ -370,10 +372,6 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
// If the last recorded screen state was dozing or not.
private boolean mDozing;
- private boolean mAppliedDimming;
-
- private boolean mAppliedThrottling;
-
// Reason for which the brightness was last changed. See {@link BrightnessReason} for more
// information.
// At the time of this writing, this value is changed within updatePowerState() only, which is
@@ -482,7 +480,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
// DPCs following the brightness of this DPC. This is used in concurrent displays mode - there
// is one lead display, the additional displays follow the brightness value of the lead display.
@GuardedBy("mLock")
- private SparseArray<DisplayPowerControllerInterface> mDisplayBrightnessFollowers =
+ private final SparseArray<DisplayPowerControllerInterface> mDisplayBrightnessFollowers =
new SparseArray();
private boolean mBootCompleted;
@@ -507,14 +505,15 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
mClock = mInjector.getClock();
mLogicalDisplay = logicalDisplay;
mDisplayId = mLogicalDisplay.getDisplayIdLocked();
+ mDisplayDevice = mLogicalDisplay.getPrimaryDisplayDeviceLocked();
+ IBinder displayToken = mDisplayDevice.getDisplayTokenLocked();
+ DisplayDeviceInfo displayDeviceInfo = mDisplayDevice.getDisplayDeviceInfoLocked();
mSensorManager = sensorManager;
mHandler = new DisplayControllerHandler(handler.getLooper());
- mDisplayDeviceConfig = logicalDisplay.getPrimaryDisplayDeviceLocked()
- .getDisplayDeviceConfig();
+ mDisplayDeviceConfig = mDisplayDevice.getDisplayDeviceConfig();
mIsEnabled = logicalDisplay.isEnabledLocked();
mIsInTransition = logicalDisplay.isInTransitionLocked();
- mIsDisplayInternal = logicalDisplay.getPrimaryDisplayDeviceLocked()
- .getDisplayDeviceInfoLocked().type == Display.TYPE_INTERNAL;
+ mIsDisplayInternal = displayDeviceInfo.type == Display.TYPE_INTERNAL;
mWakelockController = mInjector.getWakelockController(mDisplayId, callbacks);
mDisplayPowerProximityStateController = mInjector.getDisplayPowerProximityStateController(
mWakelockController, mDisplayDeviceConfig, mHandler.getLooper(),
@@ -523,9 +522,10 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
mTag = TAG + "[" + mDisplayId + "]";
mThermalBrightnessThrottlingDataId =
logicalDisplay.getDisplayInfoLocked().thermalBrightnessThrottlingDataId;
- mDisplayDevice = mLogicalDisplay.getPrimaryDisplayDeviceLocked();
- mUniqueDisplayId = logicalDisplay.getPrimaryDisplayDeviceLocked().getUniqueId();
+
+ mUniqueDisplayId = mDisplayDevice.getUniqueId();
mDisplayStatsId = mUniqueDisplayId.hashCode();
+ mPhysicalDisplayName = mDisplayDevice.getNameLocked();
mLastBrightnessEvent = new BrightnessEvent(mDisplayId);
mTempBrightnessEvent = new BrightnessEvent(mDisplayId);
@@ -543,13 +543,11 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
mBrightnessTracker = brightnessTracker;
mOnBrightnessChangeRunnable = onBrightnessChangeRunnable;
- PowerManager pm = context.getSystemService(PowerManager.class);
-
final Resources resources = context.getResources();
// DOZE AND DIM SETTINGS
mScreenBrightnessDozeConfig = BrightnessUtils.clampAbsoluteBrightness(
- pm.getBrightnessConstraint(PowerManager.BRIGHTNESS_CONSTRAINT_TYPE_DOZE));
+ mDisplayDeviceConfig.getDefaultDozeBrightness());
loadBrightnessRampRates();
mSkipScreenOnBrightnessRamp = resources.getBoolean(
R.bool.config_skipScreenOnBrightnessRamp);
@@ -572,8 +570,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
mBrightnessRangeController = mInjector.getBrightnessRangeController(hbmController,
modeChangeCallback, mDisplayDeviceConfig, mHandler, flags,
- mDisplayDevice.getDisplayTokenLocked(),
- mDisplayDevice.getDisplayDeviceInfoLocked());
+ displayToken, displayDeviceInfo);
mDisplayBrightnessController =
new DisplayBrightnessController(context, null,
@@ -587,8 +584,8 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
mUniqueDisplayId,
mThermalBrightnessThrottlingDataId,
logicalDisplay.getPowerThrottlingDataIdLocked(),
- mDisplayDeviceConfig,
- mDisplayId), mContext, flags, mSensorManager);
+ mDisplayDeviceConfig, displayDeviceInfo.width, displayDeviceInfo.height,
+ displayToken, mDisplayId), mContext, flags, mSensorManager);
// Seed the cached brightness
saveBrightnessInfo(getScreenBrightnessSetting());
mAutomaticBrightnessStrategy =
@@ -839,6 +836,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
}
final String uniqueId = device.getUniqueId();
+ final String displayName = device.getNameLocked();
final DisplayDeviceConfig config = device.getDisplayDeviceConfig();
final IBinder token = device.getDisplayTokenLocked();
final DisplayDeviceInfo info = device.getDisplayDeviceInfoLocked();
@@ -865,6 +863,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
changed = true;
mDisplayDevice = device;
mUniqueDisplayId = uniqueId;
+ mPhysicalDisplayName = displayName;
mDisplayStatsId = mUniqueDisplayId.hashCode();
mDisplayDeviceConfig = config;
mThermalBrightnessThrottlingDataId = thermalBrightnessThrottlingDataId;
@@ -894,7 +893,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
mBrightnessClamperController.onDisplayChanged(
new BrightnessClamperController.DisplayDeviceData(uniqueId,
thermalBrightnessThrottlingDataId, powerThrottlingDataId,
- config, mDisplayId));
+ config, info.width, info.height, token, mDisplayId));
if (changed) {
updatePowerState();
@@ -931,6 +930,8 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
HighBrightnessModeMetadata hbmMetadata) {
// All properties that depend on the associated DisplayDevice and the DDC must be
// updated here.
+ mScreenBrightnessDozeConfig = BrightnessUtils.clampAbsoluteBrightness(
+ mDisplayDeviceConfig.getDefaultDozeBrightness());
loadBrightnessRampRates();
loadNitsRange(mContext.getResources());
setUpAutoBrightness(mContext, mHandler);
@@ -1549,10 +1550,9 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
// unthrottled (unclamped/ideal) and throttled brightness levels for subsequent operations.
// Note throttling effectively changes the allowed brightness range, so, similarly to HBM,
// we broadcast this change through setting.
- final float unthrottledBrightnessState = brightnessState;
+ final float unthrottledBrightnessState = rawBrightnessState;
DisplayBrightnessState clampedState = mBrightnessClamperController.clamp(mPowerRequest,
brightnessState, slowChange, /* displayState= */ state);
-
brightnessState = clampedState.getBrightness();
slowChange = clampedState.isSlowChange();
// faster rate wins, at this point customAnimationRate == -1, strategy does not control
@@ -1633,9 +1633,13 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
// use instead. We still preserve the calculated brightness for Standard Dynamic Range
// (SDR) layers, but the main brightness value will be the one for HDR.
float sdrAnimateValue = animateValue;
- // TODO(b/216365040): The decision to prevent HBM for HDR in low power mode should be
- // done in HighBrightnessModeController.
- if (mBrightnessRangeController.getHighBrightnessMode()
+
+ if (clampedState.getHdrBrightness() != DisplayBrightnessState.BRIGHTNESS_NOT_SET) {
+ // TODO(b/343792639): The decision to prevent HBM for HDR in low power mode will be
+ // done in HdrBrightnessModifier.
+ // customAnimationRate and reason also handled by HdrBrightnessModifier
+ animateValue = clampedState.getHdrBrightness();
+ } else if (mBrightnessRangeController.getHighBrightnessMode()
== BrightnessInfo.HIGH_BRIGHTNESS_MODE_HDR
&& (mBrightnessReasonTemp.getModifier() & BrightnessReason.MODIFIER_DIMMED) == 0
&& (mBrightnessReasonTemp.getModifier() & BrightnessReason.MODIFIER_LOW_POWER)
@@ -1737,11 +1741,23 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
// brightness cap, RBC state, etc.
mTempBrightnessEvent.setTime(System.currentTimeMillis());
mTempBrightnessEvent.setBrightness(brightnessState);
+ mTempBrightnessEvent.setNits(
+ mDisplayBrightnessController.convertToAdjustedNits(brightnessState));
+ final float hbmMax = mBrightnessRangeController.getCurrentBrightnessMax();
+ final float clampedMax = Math.min(clampedState.getMaxBrightness(), hbmMax);
+ final float brightnessOnAvailableScale = MathUtils.constrainedMap(0.0f, 1.0f,
+ clampedState.getMinBrightness(), clampedMax,
+ brightnessState);
+ mTempBrightnessEvent.setPercent(Math.round(
+ 1000.0f * com.android.internal.display.BrightnessUtils.convertLinearToGamma(
+ brightnessOnAvailableScale) / 10)); // rounded to one dp
+ mTempBrightnessEvent.setUnclampedBrightness(unthrottledBrightnessState);
mTempBrightnessEvent.setPhysicalDisplayId(mUniqueDisplayId);
+ mTempBrightnessEvent.setPhysicalDisplayName(mPhysicalDisplayName);
mTempBrightnessEvent.setDisplayState(state);
mTempBrightnessEvent.setDisplayPolicy(mPowerRequest.policy);
mTempBrightnessEvent.setReason(mBrightnessReason);
- mTempBrightnessEvent.setHbmMax(mBrightnessRangeController.getCurrentBrightnessMax());
+ mTempBrightnessEvent.setHbmMax(hbmMax);
mTempBrightnessEvent.setHbmMode(mBrightnessRangeController.getHighBrightnessMode());
mTempBrightnessEvent.setFlags(mTempBrightnessEvent.getFlags()
| (mIsRbcActive ? BrightnessEvent.FLAG_RBC : 0)
@@ -2013,7 +2029,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
final DisplayDeviceConfig ddConfig = mDisplayDevice.getDisplayDeviceConfig();
final IBinder displayToken = mDisplayDevice.getDisplayTokenLocked();
final String displayUniqueId = mDisplayDevice.getUniqueId();
- final DisplayDeviceConfig.HighBrightnessModeData hbmData =
+ final HighBrightnessModeData hbmData =
ddConfig != null ? ddConfig.getHighBrightnessModeData() : null;
final DisplayDeviceInfo info = mDisplayDevice.getDisplayDeviceInfoLocked();
return mInjector.getHighBrightnessModeController(mHandler, info.width, info.height,
@@ -2641,8 +2657,6 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
pw.println("Display Power Controller Thread State:");
pw.println(" mPowerRequest=" + mPowerRequest);
pw.println(" mBrightnessReason=" + mBrightnessReason);
- pw.println(" mAppliedDimming=" + mAppliedDimming);
- pw.println(" mAppliedThrottling=" + mAppliedThrottling);
pw.println(" mDozing=" + mDozing);
pw.println(" mSkipRampState=" + skipRampStateToString(mSkipRampState));
pw.println(" mScreenOnBlockStartRealTime=" + mScreenOnBlockStartRealTime);
@@ -3247,7 +3261,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
HighBrightnessModeController getHighBrightnessModeController(Handler handler, int width,
int height, IBinder displayToken, String displayUniqueId, float brightnessMin,
- float brightnessMax, DisplayDeviceConfig.HighBrightnessModeData hbmData,
+ float brightnessMax, HighBrightnessModeData hbmData,
HighBrightnessModeController.HdrBrightnessDeviceConfig hdrBrightnessCfg,
Runnable hbmChangeCallback, HighBrightnessModeMetadata hbmMetadata,
Context context) {
diff --git a/services/core/java/com/android/server/display/HighBrightnessModeController.java b/services/core/java/com/android/server/display/HighBrightnessModeController.java
index 47176fe331bf..da9eef2d7459 100644
--- a/services/core/java/com/android/server/display/HighBrightnessModeController.java
+++ b/services/core/java/com/android/server/display/HighBrightnessModeController.java
@@ -36,8 +36,8 @@ import android.view.SurfaceControlHdrLayerInfoListener;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.display.BrightnessSynchronizer;
import com.android.internal.util.FrameworkStatsLog;
-import com.android.server.display.DisplayDeviceConfig.HighBrightnessModeData;
import com.android.server.display.DisplayManagerService.Clock;
+import com.android.server.display.config.HighBrightnessModeData;
import com.android.server.display.utils.DebugUtils;
import java.io.PrintWriter;
diff --git a/services/core/java/com/android/server/display/LogicalDisplayMapper.java b/services/core/java/com/android/server/display/LogicalDisplayMapper.java
index e645e98c215c..e9ecfc67b7db 100644
--- a/services/core/java/com/android/server/display/LogicalDisplayMapper.java
+++ b/services/core/java/com/android/server/display/LogicalDisplayMapper.java
@@ -16,12 +16,18 @@
package com.android.server.display;
+import static android.hardware.devicestate.DeviceState.PROPERTY_POWER_CONFIGURATION_TRIGGER_SLEEP;
+import static android.hardware.devicestate.DeviceState.PROPERTY_POWER_CONFIGURATION_TRIGGER_WAKE;
+import static android.hardware.devicestate.DeviceStateManager.INVALID_DEVICE_STATE;
import static android.view.Display.DEFAULT_DISPLAY;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.content.Context;
+import android.hardware.devicestate.DeviceState;
import android.hardware.devicestate.DeviceStateManager;
+import android.hardware.devicestate.feature.flags.FeatureFlags;
+import android.hardware.devicestate.feature.flags.FeatureFlagsImpl;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
@@ -198,14 +204,14 @@ class LogicalDisplayMapper implements DisplayDeviceRepository.Listener {
private final DisplayIdProducer mIdProducer = (isDefault) ->
isDefault ? DEFAULT_DISPLAY : sNextNonDefaultDisplayId++;
private Layout mCurrentLayout = null;
- private int mDeviceState = DeviceStateManager.INVALID_DEVICE_STATE_IDENTIFIER;
- private int mPendingDeviceState = DeviceStateManager.INVALID_DEVICE_STATE_IDENTIFIER;
- private int mDeviceStateToBeAppliedAfterBoot =
- DeviceStateManager.INVALID_DEVICE_STATE_IDENTIFIER;
+ private DeviceState mDeviceState = INVALID_DEVICE_STATE;
+ private DeviceState mPendingDeviceState = INVALID_DEVICE_STATE;
+ private DeviceState mDeviceStateToBeAppliedAfterBoot = INVALID_DEVICE_STATE;
private boolean mBootCompleted = false;
private boolean mInteractive;
private final DisplayManagerFlags mFlags;
private final SyntheticModeManager mSyntheticModeManager;
+ private final FeatureFlags mDeviceStateManagerFlags;
LogicalDisplayMapper(@NonNull Context context, FoldSettingProvider foldSettingProvider,
FoldGracePeriodProvider foldGracePeriodProvider,
@@ -245,6 +251,7 @@ class LogicalDisplayMapper implements DisplayDeviceRepository.Listener {
mDeviceStateToLayoutMap = deviceStateToLayoutMap;
mFlags = flags;
mSyntheticModeManager = syntheticModeManager;
+ mDeviceStateManagerFlags = new FeatureFlagsImpl();
}
@Override
@@ -389,18 +396,22 @@ class LogicalDisplayMapper implements DisplayDeviceRepository.Listener {
// Retrieve the layout for this particular state.
final Layout layout = mDeviceStateToLayoutMap.get(deviceState);
if (layout == null) {
+ // TODO(b/352019542): remove the log once b/345960547 is fixed.
+ Slog.d(TAG, "Cannot get layout for given state:" + deviceState);
return null;
}
// Retrieve the details of the given display within this layout.
Layout.Display display = layout.getById(displayId);
if (display == null) {
+ // TODO(b/352019542): remove the log once b/345960547 is fixed.
+ Slog.d(TAG, "Cannot get display for given layout:" + layout);
return null;
}
// Retrieve the display info for the display that matches the display id.
final DisplayDevice device = mDisplayDeviceRepo.getByAddressLocked(display.getAddress());
if (device == null) {
- Slog.w(TAG, "The display device (" + display.getAddress() + "), is not available"
- + " for the display state " + mDeviceState);
+ Slog.w(TAG, "The display device (" + display.getAddress()
+ + "), is not available for the display state " + mDeviceState.getIdentifier());
return null;
}
LogicalDisplay logicalDisplay = getDisplayLocked(device, /* includeDisabled= */ true);
@@ -427,9 +438,11 @@ class LogicalDisplayMapper implements DisplayDeviceRepository.Listener {
ipw.println("mBootCompleted=" + mBootCompleted);
ipw.println();
- ipw.println("mDeviceState=" + mDeviceState);
- ipw.println("mPendingDeviceState=" + mPendingDeviceState);
- ipw.println("mDeviceStateToBeAppliedAfterBoot=" + mDeviceStateToBeAppliedAfterBoot);
+
+ ipw.println("mDeviceState=" + mDeviceState.getIdentifier());
+ ipw.println("mPendingDeviceState=" + mPendingDeviceState.getIdentifier());
+ ipw.println("mDeviceStateToBeAppliedAfterBoot="
+ + mDeviceStateToBeAppliedAfterBoot.getIdentifier());
final int logicalDisplayCount = mLogicalDisplays.size();
ipw.println();
@@ -459,7 +472,7 @@ class LogicalDisplayMapper implements DisplayDeviceRepository.Listener {
mVirtualDeviceDisplayMapping.put(displayDevice.getUniqueId(), virtualDeviceUniqueId);
}
- void setDeviceStateLocked(int state) {
+ void setDeviceStateLocked(DeviceState state) {
if (!mBootCompleted) {
// The boot animation might still be in progress, we do not want to switch states now
// as the boot animation would end up with an incorrect size.
@@ -471,15 +484,17 @@ class LogicalDisplayMapper implements DisplayDeviceRepository.Listener {
return;
}
- Slog.i(TAG, "Requesting Transition to state: " + state + ", from state=" + mDeviceState
- + ", interactive=" + mInteractive + ", mBootCompleted=" + mBootCompleted);
+ Slog.i(TAG, "Requesting Transition to state: " + state + ", from state="
+ + mDeviceState.getIdentifier() + ", interactive=" + mInteractive
+ + ", mBootCompleted=" + mBootCompleted);
// As part of a state transition, we may need to turn off some displays temporarily so that
// the transition is smooth. Plus, on some devices, only one internal displays can be
// on at a time. We use LogicalDisplay.setIsInTransition to mark a display that needs to be
// temporarily turned off.
- resetLayoutLocked(mDeviceState, state, /* transitionValue= */ true);
+ resetLayoutLocked(mDeviceState.getIdentifier(),
+ state.getIdentifier(), /* transitionValue= */ true);
mPendingDeviceState = state;
- mDeviceStateToBeAppliedAfterBoot = DeviceStateManager.INVALID_DEVICE_STATE_IDENTIFIER;
+ mDeviceStateToBeAppliedAfterBoot = INVALID_DEVICE_STATE;
final boolean wakeDevice = shouldDeviceBeWoken(mPendingDeviceState, mDeviceState,
mInteractive, mBootCompleted);
final boolean sleepDevice = shouldDeviceBePutToSleep(mPendingDeviceState, mDeviceState,
@@ -494,7 +509,7 @@ class LogicalDisplayMapper implements DisplayDeviceRepository.Listener {
}
if (DEBUG) {
- Slog.d(TAG, "Postponing transition to state: " + mPendingDeviceState);
+ Slog.d(TAG, "Postponing transition to state: " + mPendingDeviceState.getIdentifier());
}
// Send the transitioning phase updates to DisplayManager so that the displays can
// start turning OFF in preparation for the new layout.
@@ -529,8 +544,7 @@ class LogicalDisplayMapper implements DisplayDeviceRepository.Listener {
void onBootCompleted() {
synchronized (mSyncRoot) {
mBootCompleted = true;
- if (mDeviceStateToBeAppliedAfterBoot
- != DeviceStateManager.INVALID_DEVICE_STATE_IDENTIFIER) {
+ if (!mDeviceStateToBeAppliedAfterBoot.equals(INVALID_DEVICE_STATE)) {
setDeviceStateLocked(mDeviceStateToBeAppliedAfterBoot);
}
}
@@ -559,11 +573,18 @@ class LogicalDisplayMapper implements DisplayDeviceRepository.Listener {
* @see #setDeviceStateLocked
*/
@VisibleForTesting
- boolean shouldDeviceBeWoken(int pendingState, int currentState, boolean isInteractive,
- boolean isBootCompleted) {
- return mDeviceStatesOnWhichToWakeUp.get(pendingState)
- && !mDeviceStatesOnWhichToWakeUp.get(currentState)
- && !isInteractive && isBootCompleted;
+ boolean shouldDeviceBeWoken(DeviceState pendingState, DeviceState currentState,
+ boolean isInteractive, boolean isBootCompleted) {
+ if (mDeviceStateManagerFlags.deviceStatePropertyMigration()) {
+ return pendingState.hasProperty(PROPERTY_POWER_CONFIGURATION_TRIGGER_WAKE)
+ && !currentState.equals(INVALID_DEVICE_STATE)
+ && !currentState.hasProperty(PROPERTY_POWER_CONFIGURATION_TRIGGER_WAKE)
+ && !isInteractive && isBootCompleted;
+ } else {
+ return mDeviceStatesOnWhichToWakeUp.get(pendingState.getIdentifier())
+ && !mDeviceStatesOnWhichToWakeUp.get(currentState.getIdentifier())
+ && !isInteractive && isBootCompleted;
+ }
}
/**
@@ -584,14 +605,26 @@ class LogicalDisplayMapper implements DisplayDeviceRepository.Listener {
* @see #setDeviceStateLocked
*/
@VisibleForTesting
- boolean shouldDeviceBePutToSleep(int pendingState, int currentState, boolean isInteractive,
- boolean isBootCompleted) {
- return currentState != DeviceStateManager.INVALID_DEVICE_STATE_IDENTIFIER
- && mDeviceStatesOnWhichToSelectiveSleep.get(pendingState)
- && !mDeviceStatesOnWhichToSelectiveSleep.get(currentState)
- && isInteractive
- && isBootCompleted
- && !mFoldSettingProvider.shouldStayAwakeOnFold();
+ boolean shouldDeviceBePutToSleep(DeviceState pendingState, DeviceState currentState,
+ boolean isInteractive, boolean isBootCompleted) {
+ if (mDeviceStateManagerFlags.deviceStatePropertyMigration()) {
+ return pendingState.hasProperty(PROPERTY_POWER_CONFIGURATION_TRIGGER_SLEEP)
+ && !currentState.equals(INVALID_DEVICE_STATE)
+ && !currentState.hasProperty(PROPERTY_POWER_CONFIGURATION_TRIGGER_SLEEP)
+ && isInteractive
+ && isBootCompleted
+ && !mFoldSettingProvider.shouldStayAwakeOnFold();
+ } else {
+ return currentState.getIdentifier()
+ != DeviceStateManager.INVALID_DEVICE_STATE_IDENTIFIER
+ && pendingState.getIdentifier()
+ != DeviceStateManager.INVALID_DEVICE_STATE_IDENTIFIER
+ && mDeviceStatesOnWhichToSelectiveSleep.get(pendingState.getIdentifier())
+ && !mDeviceStatesOnWhichToSelectiveSleep.get(currentState.getIdentifier())
+ && isInteractive
+ && isBootCompleted
+ && !mFoldSettingProvider.shouldStayAwakeOnFold();
+ }
}
private boolean areAllTransitioningDisplaysOffLocked() {
@@ -614,27 +647,25 @@ class LogicalDisplayMapper implements DisplayDeviceRepository.Listener {
}
private void transitionToPendingStateLocked() {
- resetLayoutLocked(mDeviceState, mPendingDeviceState, /* transitionValue= */ false);
+ resetLayoutLocked(mDeviceState.getIdentifier(),
+ mPendingDeviceState.getIdentifier(), /* transitionValue= */ false);
mDeviceState = mPendingDeviceState;
- mPendingDeviceState = DeviceStateManager.INVALID_DEVICE_STATE_IDENTIFIER;
+ mPendingDeviceState = INVALID_DEVICE_STATE;
applyLayoutLocked();
updateLogicalDisplaysLocked();
}
private void finishStateTransitionLocked(boolean force) {
- if (mPendingDeviceState == DeviceStateManager.INVALID_DEVICE_STATE_IDENTIFIER) {
+ if (mPendingDeviceState.equals(INVALID_DEVICE_STATE)) {
return;
}
- final boolean waitingToWakeDevice = mDeviceStatesOnWhichToWakeUp.get(mPendingDeviceState)
- && !mDeviceStatesOnWhichToWakeUp.get(mDeviceState)
- && !mInteractive && mBootCompleted;
+ final boolean waitingToWakeDevice = shouldDeviceBeWoken(mPendingDeviceState, mDeviceState,
+ mInteractive, mBootCompleted);
// The device should only wait for sleep if #shouldStayAwakeOnFold method returns false.
// If not, device should be marked ready for transition immediately.
- final boolean waitingToSleepDevice = mDeviceStatesOnWhichToSelectiveSleep.get(
- mPendingDeviceState)
- && !mDeviceStatesOnWhichToSelectiveSleep.get(mDeviceState)
- && mInteractive && mBootCompleted && !shouldStayAwakeOnFold();
+ final boolean waitingToSleepDevice = shouldDeviceBePutToSleep(mPendingDeviceState,
+ mDeviceState, mInteractive, mBootCompleted) && !shouldStayAwakeOnFold();
final boolean displaysOff = areAllTransitioningDisplaysOffLocked();
final boolean isReadyToTransition = displaysOff && !waitingToWakeDevice
@@ -1100,7 +1131,7 @@ class LogicalDisplayMapper implements DisplayDeviceRepository.Listener {
*/
private void applyLayoutLocked() {
final Layout oldLayout = mCurrentLayout;
- mCurrentLayout = mDeviceStateToLayoutMap.get(mDeviceState);
+ mCurrentLayout = mDeviceStateToLayoutMap.get(mDeviceState.getIdentifier());
Slog.i(TAG, "Applying layout: " + mCurrentLayout + ", Previous layout: " + oldLayout);
// Go through each of the displays in the current layout set.
@@ -1116,7 +1147,7 @@ class LogicalDisplayMapper implements DisplayDeviceRepository.Listener {
final DisplayDevice device = mDisplayDeviceRepo.getByAddressLocked(address);
if (device == null) {
Slog.w(TAG, "applyLayoutLocked: The display device (" + address + "), is not "
- + "available for the display state " + mDeviceState);
+ + "available for the display state " + mDeviceState.getIdentifier());
continue;
}
diff --git a/services/core/java/com/android/server/display/brightness/BrightnessEvent.java b/services/core/java/com/android/server/display/brightness/BrightnessEvent.java
index 82b401a7cc83..5cc603c5018c 100644
--- a/services/core/java/com/android/server/display/brightness/BrightnessEvent.java
+++ b/services/core/java/com/android/server/display/brightness/BrightnessEvent.java
@@ -20,6 +20,8 @@ import static android.hardware.display.DisplayManagerInternal.DisplayPowerReques
import static android.hardware.display.DisplayManagerInternal.DisplayPowerRequest.policyToString;
import static com.android.server.display.AutomaticBrightnessController.AUTO_BRIGHTNESS_MODE_DEFAULT;
+import static com.android.server.display.BrightnessMappingStrategy.INVALID_LUX;
+import static com.android.server.display.BrightnessMappingStrategy.INVALID_NITS;
import static com.android.server.display.config.DisplayBrightnessMappingConfig.autoBrightnessModeToString;
import android.hardware.display.BrightnessInfo;
@@ -48,13 +50,17 @@ public final class BrightnessEvent {
private BrightnessReason mReason = new BrightnessReason();
private int mDisplayId;
private String mPhysicalDisplayId;
+ private String mPhysicalDisplayName;
private int mDisplayState;
private int mDisplayPolicy;
private long mTime;
private float mLux;
+ private float mNits;
+ private float mPercent;
private float mPreThresholdLux;
private float mInitialBrightness;
private float mBrightness;
+ private float mUnclampedBrightness;
private float mRecommendedBrightness;
private float mPreThresholdBrightness;
private int mHbmMode;
@@ -88,15 +94,19 @@ public final class BrightnessEvent {
mReason.set(that.getReason());
mDisplayId = that.getDisplayId();
mPhysicalDisplayId = that.getPhysicalDisplayId();
+ mPhysicalDisplayName = that.getPhysicalDisplayName();
mDisplayState = that.mDisplayState;
mDisplayPolicy = that.mDisplayPolicy;
mTime = that.getTime();
// Lux values
mLux = that.getLux();
mPreThresholdLux = that.getPreThresholdLux();
+ mNits = that.getNits();
+ mPercent = that.getPercent();
// Brightness values
mInitialBrightness = that.getInitialBrightness();
mBrightness = that.getBrightness();
+ mUnclampedBrightness = that.getUnclampedBrightness();
mRecommendedBrightness = that.getRecommendedBrightness();
mPreThresholdBrightness = that.getPreThresholdBrightness();
// Different brightness modulations
@@ -121,14 +131,18 @@ public final class BrightnessEvent {
mReason = new BrightnessReason();
mTime = SystemClock.uptimeMillis();
mPhysicalDisplayId = "";
+ mPhysicalDisplayName = "";
mDisplayState = Display.STATE_UNKNOWN;
mDisplayPolicy = POLICY_OFF;
// Lux values
- mLux = 0;
+ mLux = INVALID_LUX;
mPreThresholdLux = 0;
+ mNits = INVALID_NITS;
+ mPercent = -1f;
// Brightness values
mInitialBrightness = PowerManager.BRIGHTNESS_INVALID_FLOAT;
mBrightness = PowerManager.BRIGHTNESS_INVALID_FLOAT;
+ mUnclampedBrightness = PowerManager.BRIGHTNESS_INVALID_FLOAT;
mRecommendedBrightness = PowerManager.BRIGHTNESS_INVALID_FLOAT;
mPreThresholdBrightness = PowerManager.BRIGHTNESS_INVALID_FLOAT;
// Different brightness modulations
@@ -160,13 +174,18 @@ public final class BrightnessEvent {
return mReason.equals(that.mReason)
&& mDisplayId == that.mDisplayId
&& mPhysicalDisplayId.equals(that.mPhysicalDisplayId)
+ && mPhysicalDisplayName.equals(that.mPhysicalDisplayName)
&& mDisplayState == that.mDisplayState
&& mDisplayPolicy == that.mDisplayPolicy
&& Float.floatToRawIntBits(mLux) == Float.floatToRawIntBits(that.mLux)
&& Float.floatToRawIntBits(mPreThresholdLux)
== Float.floatToRawIntBits(that.mPreThresholdLux)
+ && Float.floatToRawIntBits(mNits) == Float.floatToRawIntBits(that.mNits)
+ && Float.floatToRawIntBits(mPercent) == Float.floatToRawIntBits(that.mPercent)
&& Float.floatToRawIntBits(mBrightness)
== Float.floatToRawIntBits(that.mBrightness)
+ && Float.floatToRawIntBits(mUnclampedBrightness)
+ == Float.floatToRawIntBits(that.mUnclampedBrightness)
&& Float.floatToRawIntBits(mRecommendedBrightness)
== Float.floatToRawIntBits(that.mRecommendedBrightness)
&& Float.floatToRawIntBits(mPreThresholdBrightness)
@@ -195,27 +214,34 @@ public final class BrightnessEvent {
public String toString(boolean includeTime) {
return (includeTime ? FORMAT.format(new Date(mTime)) + " - " : "")
+ "BrightnessEvent: "
- + "disp=" + mDisplayId
- + ", physDisp=" + mPhysicalDisplayId
- + ", displayState=" + Display.stateToString(mDisplayState)
- + ", displayPolicy=" + policyToString(mDisplayPolicy)
- + ", brt=" + mBrightness + ((mFlags & FLAG_USER_SET) != 0 ? "(user_set)" : "")
+ + "brt=" + mBrightness + ((mFlags & FLAG_USER_SET) != 0 ? "(user_set)" : "") + " ("
+ + mPercent + "%)"
+ + ", nits= " + mNits
+ + ", lux=" + mLux
+ + ", reason=" + mReason.toString(mAdjustmentFlags)
+ + ", strat=" + mDisplayBrightnessStrategyName
+ + ", state=" + Display.stateToString(mDisplayState)
+ + ", policy=" + policyToString(mDisplayPolicy)
+ + ", flags=" + flagsToString()
+ // Autobrightness
+ ", initBrt=" + mInitialBrightness
+ ", rcmdBrt=" + mRecommendedBrightness
+ ", preBrt=" + mPreThresholdBrightness
- + ", lux=" + mLux
+ ", preLux=" + mPreThresholdLux
+ + ", wasShortTermModelActive=" + mWasShortTermModelActive
+ + ", autoBrightness=" + mAutomaticBrightnessEnabled + " ("
+ + autoBrightnessModeToString(mAutoBrightnessMode) + ")"
+ // Throttling info
+ + ", unclampedBrt=" + mUnclampedBrightness
+ ", hbmMax=" + mHbmMax
+ ", hbmMode=" + BrightnessInfo.hbmToString(mHbmMode)
- + ", rbcStrength=" + mRbcStrength
+ ", thrmMax=" + mThermalMax
+ // Modifiers
+ + ", rbcStrength=" + mRbcStrength
+ ", powerFactor=" + mPowerFactor
- + ", wasShortTermModelActive=" + mWasShortTermModelActive
- + ", flags=" + flagsToString()
- + ", reason=" + mReason.toString(mAdjustmentFlags)
- + ", autoBrightness=" + mAutomaticBrightnessEnabled
- + ", strategy=" + mDisplayBrightnessStrategyName
- + ", autoBrightnessMode=" + autoBrightnessModeToString(mAutoBrightnessMode);
+ // Meta
+ + ", physDisp=" + mPhysicalDisplayName + "(" + mPhysicalDisplayId + ")"
+ + ", logicalId=" + mDisplayId;
}
@Override
@@ -255,6 +281,14 @@ public final class BrightnessEvent {
this.mPhysicalDisplayId = mPhysicalDisplayId;
}
+ public String getPhysicalDisplayName() {
+ return mPhysicalDisplayName;
+ }
+
+ public void setPhysicalDisplayName(String mPhysicalDisplayName) {
+ this.mPhysicalDisplayName = mPhysicalDisplayName;
+ }
+
public void setDisplayState(int state) {
mDisplayState = state;
}
@@ -295,6 +329,29 @@ public final class BrightnessEvent {
this.mBrightness = brightness;
}
+ public float getUnclampedBrightness() {
+ return mUnclampedBrightness;
+ }
+
+ public void setUnclampedBrightness(float unclampedBrightness) {
+ this.mUnclampedBrightness = unclampedBrightness;
+ }
+
+ public void setPercent(float percent) {
+ this.mPercent = percent;
+ }
+ public float getPercent() {
+ return mPercent;
+ }
+
+ public void setNits(float nits) {
+ this.mNits = nits;
+ }
+
+ public float getNits() {
+ return mNits;
+ }
+
public float getRecommendedBrightness() {
return mRecommendedBrightness;
}
diff --git a/services/core/java/com/android/server/display/brightness/BrightnessUtils.java b/services/core/java/com/android/server/display/brightness/BrightnessUtils.java
index 8bf675cb33b1..d009e614d5b5 100644
--- a/services/core/java/com/android/server/display/brightness/BrightnessUtils.java
+++ b/services/core/java/com/android/server/display/brightness/BrightnessUtils.java
@@ -52,9 +52,8 @@ public final class BrightnessUtils {
* A utility to construct the DisplayBrightnessState
*/
public static DisplayBrightnessState constructDisplayBrightnessState(
- int brightnessChangeReason, float brightness, float sdrBrightness,
- String displayBrightnessStrategyName) {
- return constructDisplayBrightnessState(brightnessChangeReason, brightness, sdrBrightness,
+ int brightnessChangeReason, float brightness, String displayBrightnessStrategyName) {
+ return constructDisplayBrightnessState(brightnessChangeReason, brightness,
displayBrightnessStrategyName, /* slowChange= */ false);
}
@@ -62,13 +61,12 @@ public final class BrightnessUtils {
* A utility to construct the DisplayBrightnessState
*/
public static DisplayBrightnessState constructDisplayBrightnessState(
- int brightnessChangeReason, float brightness, float sdrBrightness,
+ int brightnessChangeReason, float brightness,
String displayBrightnessStrategyName, boolean slowChange) {
BrightnessReason brightnessReason = new BrightnessReason();
brightnessReason.setReason(brightnessChangeReason);
return new DisplayBrightnessState.Builder()
.setBrightness(brightness)
- .setSdrBrightness(sdrBrightness)
.setBrightnessReason(brightnessReason)
.setDisplayBrightnessStrategyName(displayBrightnessStrategyName)
.setIsSlowChange(slowChange)
diff --git a/services/core/java/com/android/server/display/brightness/clamper/BrightnessClamperController.java b/services/core/java/com/android/server/display/brightness/clamper/BrightnessClamperController.java
index 220640270e02..9324fc1c4e06 100644
--- a/services/core/java/com/android/server/display/brightness/clamper/BrightnessClamperController.java
+++ b/services/core/java/com/android/server/display/brightness/clamper/BrightnessClamperController.java
@@ -28,13 +28,16 @@ import android.hardware.display.BrightnessInfo;
import android.hardware.display.DisplayManagerInternal;
import android.os.Handler;
import android.os.HandlerExecutor;
+import android.os.IBinder;
import android.os.PowerManager;
import android.provider.DeviceConfig;
import android.provider.DeviceConfigInterface;
import android.util.IndentingPrintWriter;
import android.util.Slog;
+import android.util.Spline;
import com.android.internal.annotations.VisibleForTesting;
+import com.android.internal.display.BrightnessSynchronizer;
import com.android.server.display.DisplayBrightnessState;
import com.android.server.display.DisplayDeviceConfig;
import com.android.server.display.DisplayDeviceConfig.PowerThrottlingConfigData;
@@ -65,6 +68,11 @@ public class BrightnessClamperController {
private final List<BrightnessClamper<? super DisplayDeviceData>> mClampers;
private final List<BrightnessStateModifier> mModifiers;
+
+ private final List<DisplayDeviceDataListener> mDisplayDeviceDataListeners = new ArrayList<>();
+ private final List<StatefulModifier> mStatefulModifiers = new ArrayList<>();
+ private ModifiersAggregatedState mModifiersAggregatedState = new ModifiersAggregatedState();
+
private final DeviceConfig.OnPropertiesChangedListener mOnPropertiesChangedListener;
private float mBrightnessCap = PowerManager.BRIGHTNESS_MAX;
@@ -110,7 +118,16 @@ public class BrightnessClamperController {
mClampers = injector.getClampers(handler, clamperChangeListenerInternal, data, flags,
context);
mModifiers = injector.getModifiers(flags, context, handler, clamperChangeListener,
- data.mDisplayDeviceConfig);
+ data);
+
+ mModifiers.forEach(m -> {
+ if (m instanceof DisplayDeviceDataListener l) {
+ mDisplayDeviceDataListeners.add(l);
+ }
+ if (m instanceof StatefulModifier s) {
+ mStatefulModifiers.add(s);
+ }
+ });
mOnPropertiesChangedListener =
properties -> mClampers.forEach(BrightnessClamper::onDeviceConfigChanged);
mLightSensorController.configure(data.getAmbientLightSensor(), data.getDisplayId());
@@ -123,6 +140,7 @@ public class BrightnessClamperController {
public void onDisplayChanged(DisplayDeviceData data) {
mLightSensorController.configure(data.getAmbientLightSensor(), data.getDisplayId());
mClampers.forEach(clamper -> clamper.onDisplayChanged(data));
+ mDisplayDeviceDataListeners.forEach(l -> l.onDisplayChanged(data));
adjustLightSensorSubscription();
}
@@ -234,14 +252,28 @@ public class BrightnessClamperController {
customAnimationRate = minClamper.getCustomAnimationRate();
}
+ ModifiersAggregatedState newAggregatedState = new ModifiersAggregatedState();
+ mStatefulModifiers.forEach((clamper) -> clamper.applyStateChange(newAggregatedState));
+
if (mBrightnessCap != brightnessCap
|| mClamperType != clamperType
- || mCustomAnimationRate != customAnimationRate) {
+ || mCustomAnimationRate != customAnimationRate
+ || needToNotifyExternalListener(mModifiersAggregatedState, newAggregatedState)) {
mBrightnessCap = brightnessCap;
mClamperType = clamperType;
mCustomAnimationRate = customAnimationRate;
mClamperChangeListenerExternal.onChanged();
}
+ mModifiersAggregatedState = newAggregatedState;
+ }
+
+ private boolean needToNotifyExternalListener(ModifiersAggregatedState state1,
+ ModifiersAggregatedState state2) {
+ return !BrightnessSynchronizer.floatEquals(state1.mMaxDesiredHdrRatio,
+ state2.mMaxDesiredHdrRatio)
+ || !BrightnessSynchronizer.floatEquals(state1.mMaxHdrBrightness,
+ state2.mMaxHdrBrightness)
+ || state1.mSdrHdrRatioSpline != state2.mSdrHdrRatioSpline;
}
private void start() {
@@ -295,14 +327,16 @@ public class BrightnessClamperController {
List<BrightnessStateModifier> getModifiers(DisplayManagerFlags flags, Context context,
Handler handler, ClamperChangeListener listener,
- DisplayDeviceConfig displayDeviceConfig) {
+ DisplayDeviceData data) {
List<BrightnessStateModifier> modifiers = new ArrayList<>();
modifiers.add(new DisplayDimModifier(context));
modifiers.add(new BrightnessLowPowerModeModifier());
- if (flags.isEvenDimmerEnabled() && displayDeviceConfig != null
- && displayDeviceConfig.isEvenDimmerAvailable()) {
+ if (flags.isEvenDimmerEnabled() && data.mDisplayDeviceConfig.isEvenDimmerAvailable()) {
modifiers.add(new BrightnessLowLuxModifier(handler, listener, context,
- displayDeviceConfig));
+ data.mDisplayDeviceConfig));
+ }
+ if (flags.useNewHdrBrightnessModifier()) {
+ modifiers.add(new HdrBrightnessModifier(handler, listener, data));
}
return modifiers;
}
@@ -316,7 +350,14 @@ public class BrightnessClamperController {
}
/**
- * Config Data for clampers
+ * Modifier should implement this interface in order to receive display change updates
+ */
+ interface DisplayDeviceDataListener {
+ void onDisplayChanged(DisplayDeviceData displayData);
+ }
+
+ /**
+ * Config Data for clampers/modifiers
*/
public static class DisplayDeviceData implements BrightnessThermalClamper.ThermalData,
BrightnessPowerClamper.PowerData,
@@ -328,23 +369,34 @@ public class BrightnessClamperController {
@NonNull
private final String mPowerThrottlingDataId;
@NonNull
- private final DisplayDeviceConfig mDisplayDeviceConfig;
+ final DisplayDeviceConfig mDisplayDeviceConfig;
- private final int mDisplayId;
+ final int mWidth;
+
+ final int mHeight;
+
+ final IBinder mDisplayToken;
+
+ final int mDisplayId;
public DisplayDeviceData(@NonNull String uniqueDisplayId,
@NonNull String thermalThrottlingDataId,
@NonNull String powerThrottlingDataId,
@NonNull DisplayDeviceConfig displayDeviceConfig,
+ int width,
+ int height,
+ IBinder displayToken,
int displayId) {
mUniqueDisplayId = uniqueDisplayId;
mThermalThrottlingDataId = thermalThrottlingDataId;
mPowerThrottlingDataId = powerThrottlingDataId;
mDisplayDeviceConfig = displayDeviceConfig;
+ mWidth = width;
+ mHeight = height;
+ mDisplayToken = displayToken;
mDisplayId = displayId;
}
-
@NonNull
@Override
public String getUniqueDisplayId() {
@@ -403,4 +455,24 @@ public class BrightnessClamperController {
return mDisplayId;
}
}
+
+ /**
+ * Stateful modifier should implement this interface and modify aggregatedState.
+ * AggregatedState is used by Controller to determine if updatePowerState call is needed
+ * to correctly adjust brightness
+ */
+ interface StatefulModifier {
+ void applyStateChange(ModifiersAggregatedState aggregatedState);
+ }
+
+ /**
+ * StatefulModifiers contribute to AggregatedState, that is used to decide if brightness
+ * adjustement is needed
+ */
+ public static class ModifiersAggregatedState {
+ float mMaxDesiredHdrRatio = HdrBrightnessModifier.DEFAULT_MAX_HDR_SDR_RATIO;
+ float mMaxHdrBrightness = PowerManager.BRIGHTNESS_MAX;
+ @Nullable
+ Spline mSdrHdrRatioSpline = null;
+ }
}
diff --git a/services/core/java/com/android/server/display/brightness/clamper/HdrBrightnessModifier.java b/services/core/java/com/android/server/display/brightness/clamper/HdrBrightnessModifier.java
new file mode 100644
index 000000000000..5e44cc357b28
--- /dev/null
+++ b/services/core/java/com/android/server/display/brightness/clamper/HdrBrightnessModifier.java
@@ -0,0 +1,340 @@
+/*
+ * 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.server.display.brightness.clamper;
+
+import static com.android.server.display.DisplayBrightnessState.CUSTOM_ANIMATION_RATE_NOT_SET;
+import static com.android.server.display.brightness.clamper.LightSensorController.INVALID_LUX;
+
+import android.annotation.Nullable;
+import android.annotation.SuppressLint;
+import android.hardware.display.DisplayManagerInternal;
+import android.os.Handler;
+import android.os.IBinder;
+import android.os.PowerManager;
+import android.view.SurfaceControlHdrLayerInfoListener;
+
+import com.android.internal.annotations.VisibleForTesting;
+import com.android.internal.display.BrightnessSynchronizer;
+import com.android.server.display.DisplayBrightnessState;
+import com.android.server.display.DisplayDeviceConfig;
+import com.android.server.display.config.HdrBrightnessData;
+
+import java.io.PrintWriter;
+import java.util.Map;
+
+public class HdrBrightnessModifier implements BrightnessStateModifier,
+ BrightnessClamperController.DisplayDeviceDataListener,
+ BrightnessClamperController.StatefulModifier {
+
+ static final float DEFAULT_MAX_HDR_SDR_RATIO = 1.0f;
+ private static final float DEFAULT_HDR_LAYER_SIZE = -1.0f;
+
+ private final SurfaceControlHdrLayerInfoListener mHdrListener =
+ new SurfaceControlHdrLayerInfoListener() {
+ @Override
+ public void onHdrInfoChanged(IBinder displayToken, int numberOfHdrLayers, int maxW,
+ int maxH, int flags, float maxDesiredHdrSdrRatio) {
+ boolean hdrLayerPresent = numberOfHdrLayers > 0;
+ mHandler.post(() -> HdrBrightnessModifier.this.onHdrInfoChanged(
+ hdrLayerPresent ? (float) (maxW * maxH) : DEFAULT_HDR_LAYER_SIZE,
+ hdrLayerPresent ? maxDesiredHdrSdrRatio : DEFAULT_MAX_HDR_SDR_RATIO));
+ }
+ };
+
+ private final Handler mHandler;
+ private final BrightnessClamperController.ClamperChangeListener mClamperChangeListener;
+ private final Injector mInjector;
+ private final Runnable mDebouncer;
+
+ private IBinder mRegisteredDisplayToken;
+
+ private DisplayDeviceConfig mDisplayDeviceConfig;
+ @Nullable
+ private HdrBrightnessData mHdrBrightnessData;
+ private float mScreenSize;
+
+ private float mMaxDesiredHdrRatio = DEFAULT_MAX_HDR_SDR_RATIO;
+ private float mHdrLayerSize = DEFAULT_HDR_LAYER_SIZE;
+
+ private float mAmbientLux = INVALID_LUX;
+
+ private Mode mMode = Mode.NO_HDR;
+ // The maximum brightness allowed for current lux
+ private float mMaxBrightness = PowerManager.BRIGHTNESS_MAX;
+ private float mPendingMaxBrightness = PowerManager.BRIGHTNESS_MAX;
+ // brightness change speed, in units per seconds. Applied only on ambient lux changes
+ private float mTransitionRate = CUSTOM_ANIMATION_RATE_NOT_SET;
+ private float mPendingTransitionRate = CUSTOM_ANIMATION_RATE_NOT_SET;
+
+ HdrBrightnessModifier(Handler handler,
+ BrightnessClamperController.ClamperChangeListener clamperChangeListener,
+ BrightnessClamperController.DisplayDeviceData displayData) {
+ this(new Handler(handler.getLooper()), clamperChangeListener, new Injector(), displayData);
+ }
+
+ @VisibleForTesting
+ HdrBrightnessModifier(Handler handler,
+ BrightnessClamperController.ClamperChangeListener clamperChangeListener,
+ Injector injector,
+ BrightnessClamperController.DisplayDeviceData displayData) {
+ mHandler = handler;
+ mClamperChangeListener = clamperChangeListener;
+ mInjector = injector;
+ mDebouncer = () -> {
+ mTransitionRate = mPendingTransitionRate;
+ mMaxBrightness = mPendingMaxBrightness;
+ mClamperChangeListener.onChanged();
+ };
+ onDisplayChanged(displayData);
+ }
+
+ // Called in DisplayControllerHandler
+ @Override
+ public void apply(DisplayManagerInternal.DisplayPowerRequest request,
+ DisplayBrightnessState.Builder stateBuilder) {
+ if (mHdrBrightnessData == null) { // no hdr data
+ return;
+ }
+ if (mMode == Mode.NO_HDR) {
+ return;
+ }
+ float hdrBrightness = mDisplayDeviceConfig.getHdrBrightnessFromSdr(
+ stateBuilder.getBrightness(), mMaxDesiredHdrRatio,
+ mHdrBrightnessData.sdrToHdrRatioSpline);
+ float maxBrightness = getMaxBrightness(mMode, mMaxBrightness, mHdrBrightnessData);
+ hdrBrightness = Math.min(hdrBrightness, maxBrightness);
+
+ stateBuilder.setHdrBrightness(hdrBrightness);
+ stateBuilder.setCustomAnimationRate(mTransitionRate);
+ // transition rate applied, reset
+ mTransitionRate = CUSTOM_ANIMATION_RATE_NOT_SET;
+ }
+
+ @Override
+ public void dump(PrintWriter pw) {
+ pw.println("HdrBrightnessModifier:");
+ pw.println(" mHdrBrightnessData=" + mHdrBrightnessData);
+ pw.println(" mScreenSize=" + mScreenSize);
+ pw.println(" mMaxDesiredHdrRatio=" + mMaxDesiredHdrRatio);
+ pw.println(" mHdrLayerSize=" + mHdrLayerSize);
+ pw.println(" mAmbientLux=" + mAmbientLux);
+ pw.println(" mMode=" + mMode);
+ pw.println(" mMaxBrightness=" + mMaxBrightness);
+ pw.println(" mPendingMaxBrightness=" + mPendingMaxBrightness);
+ pw.println(" mTransitionRate=" + mTransitionRate);
+ pw.println(" mPendingTransitionRate=" + mPendingTransitionRate);
+ pw.println(" mHdrListener registered=" + (mRegisteredDisplayToken != null));
+ }
+
+ // Called in DisplayControllerHandler
+ @Override
+ public void stop() {
+ unregisterHdrListener();
+ mHandler.removeCallbacksAndMessages(null);
+ }
+
+ // Called in DisplayControllerHandler
+ @Override
+ public boolean shouldListenToLightSensor() {
+ return hasBrightnessLimits();
+ }
+
+ // Called in DisplayControllerHandler
+ @Override
+ public void setAmbientLux(float lux) {
+ mAmbientLux = lux;
+ if (!hasBrightnessLimits()) {
+ return;
+ }
+ float desiredMaxBrightness = findBrightnessLimit(mHdrBrightnessData, lux);
+ if (mMode == Mode.NO_HDR) {
+ mMaxBrightness = desiredMaxBrightness;
+ } else {
+ scheduleMaxBrightnessUpdate(desiredMaxBrightness, mHdrBrightnessData);
+ }
+ }
+
+ @Override
+ public void onDisplayChanged(BrightnessClamperController.DisplayDeviceData displayData) {
+ mHandler.post(() -> onDisplayChanged(displayData.mDisplayToken, displayData.mWidth,
+ displayData.mHeight, displayData.mDisplayDeviceConfig));
+ }
+
+ // Called in DisplayControllerHandler, when any modifier state changes
+ @Override
+ public void applyStateChange(
+ BrightnessClamperController.ModifiersAggregatedState aggregatedState) {
+ if (mMode != Mode.NO_HDR && mHdrBrightnessData != null) {
+ aggregatedState.mMaxDesiredHdrRatio = mMaxDesiredHdrRatio;
+ aggregatedState.mSdrHdrRatioSpline = mHdrBrightnessData.sdrToHdrRatioSpline;
+ aggregatedState.mMaxHdrBrightness = getMaxBrightness(
+ mMode, mMaxBrightness, mHdrBrightnessData);
+ }
+ }
+
+ private boolean hasBrightnessLimits() {
+ return mHdrBrightnessData != null && !mHdrBrightnessData.maxBrightnessLimits.isEmpty();
+ }
+
+ private void scheduleMaxBrightnessUpdate(float desiredMaxBrightness, HdrBrightnessData data) {
+ if (mMaxBrightness == desiredMaxBrightness) {
+ mPendingMaxBrightness = mMaxBrightness;
+ mPendingTransitionRate = -1f;
+ mTransitionRate = -1f;
+ mHandler.removeCallbacks(mDebouncer);
+ } else if (mPendingMaxBrightness != desiredMaxBrightness) {
+ mPendingMaxBrightness = desiredMaxBrightness;
+ long debounceTime;
+ if (mPendingMaxBrightness > mMaxBrightness) {
+ debounceTime = data.brightnessIncreaseDebounceMillis;
+ mPendingTransitionRate = data.screenBrightnessRampIncrease;
+ } else {
+ debounceTime = data.brightnessDecreaseDebounceMillis;
+ mPendingTransitionRate = data.screenBrightnessRampDecrease;
+ }
+
+ mHandler.removeCallbacks(mDebouncer);
+ mHandler.postDelayed(mDebouncer, debounceTime);
+ }
+ // do nothing if expectedMaxBrightness == mDesiredMaxBrightness
+ // && expectedMaxBrightness != mMaxBrightness
+ }
+
+ // Called in DisplayControllerHandler
+ private void onDisplayChanged(IBinder displayToken, int width, int height,
+ DisplayDeviceConfig config) {
+ mDisplayDeviceConfig = config;
+ mScreenSize = (float) width * height;
+ HdrBrightnessData data = config.getHdrBrightnessData();
+ if (data == null) {
+ unregisterHdrListener();
+ } else {
+ registerHdrListener(displayToken);
+ }
+ recalculate(data, mMaxDesiredHdrRatio);
+ }
+
+ // Called in DisplayControllerHandler
+ private void recalculate(@Nullable HdrBrightnessData data, float maxDesiredHdrRatio) {
+ Mode newMode = recalculateMode(data);
+ // if HDR mode changed, notify changed
+ boolean needToNotifyChange = mMode != newMode;
+ // If HDR mode is active, we need to check if other HDR params are changed
+ if (mMode != HdrBrightnessModifier.Mode.NO_HDR) {
+ if (!BrightnessSynchronizer.floatEquals(mMaxDesiredHdrRatio, maxDesiredHdrRatio)
+ || data != mHdrBrightnessData) {
+ needToNotifyChange = true;
+ }
+ }
+
+ mMode = newMode;
+ mHdrBrightnessData = data;
+ mMaxDesiredHdrRatio = maxDesiredHdrRatio;
+
+ if (needToNotifyChange) {
+ // data or hdr layer changed, reset custom transition rate
+ mTransitionRate = CUSTOM_ANIMATION_RATE_NOT_SET;
+ mClamperChangeListener.onChanged();
+ }
+ }
+
+ // Called in DisplayControllerHandler
+ private Mode recalculateMode(@Nullable HdrBrightnessData data) {
+ // no config
+ if (data == null) {
+ return Mode.NO_HDR;
+ }
+ // HDR layer < minHdr % for Nbm
+ if (mHdrLayerSize < mScreenSize * data.minimumHdrPercentOfScreenForNbm) {
+ return Mode.NO_HDR;
+ }
+ // HDR layer < minHdr % for Hbm, and HDR layer >= that minHdr % for Nbm
+ if (mHdrLayerSize < mScreenSize * data.minimumHdrPercentOfScreenForHbm) {
+ return Mode.NBM_HDR;
+ }
+ // HDR layer > that minHdr % for Hbm
+ return Mode.HBM_HDR;
+ }
+
+ private float getMaxBrightness(Mode mode, float maxBrightness, HdrBrightnessData data) {
+ if (mode == Mode.NBM_HDR) {
+ return Math.min(data.hbmTransitionPoint, maxBrightness);
+ } else if (mode == Mode.HBM_HDR) {
+ return maxBrightness;
+ } else {
+ return PowerManager.BRIGHTNESS_MAX;
+ }
+ }
+
+ // Called in DisplayControllerHandler
+ private float findBrightnessLimit(HdrBrightnessData data, float ambientLux) {
+ float foundAmbientBoundary = Float.MAX_VALUE;
+ float foundMaxBrightness = PowerManager.BRIGHTNESS_MAX;
+ for (Map.Entry<Float, Float> brightnessPoint :
+ data.maxBrightnessLimits.entrySet()) {
+ float ambientBoundary = brightnessPoint.getKey();
+ // find ambient lux upper boundary closest to current ambient lux
+ if (ambientBoundary > ambientLux && ambientBoundary < foundAmbientBoundary) {
+ foundMaxBrightness = brightnessPoint.getValue();
+ foundAmbientBoundary = ambientBoundary;
+ }
+ }
+ return foundMaxBrightness;
+ }
+
+ // Called in DisplayControllerHandler
+ private void onHdrInfoChanged(float hdrLayerSize, float maxDesiredHdrSdrRatio) {
+ mHdrLayerSize = hdrLayerSize;
+ recalculate(mHdrBrightnessData, maxDesiredHdrSdrRatio);
+ }
+
+ // Called in DisplayControllerHandler
+ private void registerHdrListener(IBinder displayToken) {
+ if (mRegisteredDisplayToken == displayToken) {
+ return;
+ }
+ unregisterHdrListener();
+ if (displayToken != null) {
+ mInjector.registerHdrListener(mHdrListener, displayToken);
+ mRegisteredDisplayToken = displayToken;
+ }
+ }
+
+ // Called in DisplayControllerHandler
+ private void unregisterHdrListener() {
+ if (mRegisteredDisplayToken != null) {
+ mInjector.unregisterHdrListener(mHdrListener, mRegisteredDisplayToken);
+ mRegisteredDisplayToken = null;
+ mHdrLayerSize = DEFAULT_HDR_LAYER_SIZE;
+ }
+ }
+
+ private enum Mode {
+ NO_HDR, NBM_HDR, HBM_HDR
+ }
+
+ @SuppressLint("MissingPermission")
+ static class Injector {
+ void registerHdrListener(SurfaceControlHdrLayerInfoListener listener, IBinder token) {
+ listener.register(token);
+ }
+
+ void unregisterHdrListener(SurfaceControlHdrLayerInfoListener listener, IBinder token) {
+ listener.unregister(token);
+ }
+ }
+}
diff --git a/services/core/java/com/android/server/display/brightness/clamper/HdrClamper.java b/services/core/java/com/android/server/display/brightness/clamper/HdrClamper.java
index 902daa4b7ce2..5c2db35717c5 100644
--- a/services/core/java/com/android/server/display/brightness/clamper/HdrClamper.java
+++ b/services/core/java/com/android/server/display/brightness/clamper/HdrClamper.java
@@ -133,7 +133,7 @@ public class HdrClamper {
// new token not null and hdr min % of the screen is set, subscribe.
// e.g. for virtual display, HBM data will be missing and HdrListener
// should not be registered
- if (displayToken != null && mHdrListener.mHdrMinPixels >= 0) {
+ if (displayToken != null && mHdrListener.mHdrMinPixels >= 0 && hasBrightnessLimits()) {
mHdrListener.register(displayToken);
mRegisteredDisplayToken = displayToken;
}
@@ -179,6 +179,10 @@ public class HdrClamper {
pw.println(" mAutoBrightnessEnabled=" + mAutoBrightnessEnabled);
}
+ private boolean hasBrightnessLimits() {
+ return mHdrBrightnessData != null && !mHdrBrightnessData.maxBrightnessLimits.isEmpty();
+ }
+
private void reset() {
if (mMaxBrightness == PowerManager.BRIGHTNESS_MAX
&& mDesiredMaxBrightness == PowerManager.BRIGHTNESS_MAX && mTransitionRate == -1f
@@ -214,11 +218,11 @@ public class HdrClamper {
mDesiredMaxBrightness = expectedMaxBrightness;
long debounceTime;
if (mDesiredMaxBrightness > mMaxBrightness) {
- debounceTime = mHdrBrightnessData.mBrightnessIncreaseDebounceMillis;
- mDesiredTransitionRate = mHdrBrightnessData.mScreenBrightnessRampIncrease;
+ debounceTime = mHdrBrightnessData.brightnessIncreaseDebounceMillis;
+ mDesiredTransitionRate = mHdrBrightnessData.screenBrightnessRampIncrease;
} else {
- debounceTime = mHdrBrightnessData.mBrightnessDecreaseDebounceMillis;
- mDesiredTransitionRate = mHdrBrightnessData.mScreenBrightnessRampDecrease;
+ debounceTime = mHdrBrightnessData.brightnessDecreaseDebounceMillis;
+ mDesiredTransitionRate = mHdrBrightnessData.screenBrightnessRampDecrease;
}
mHandler.removeCallbacks(mDebouncer);
@@ -232,7 +236,7 @@ public class HdrClamper {
float foundAmbientBoundary = Float.MAX_VALUE;
float foundMaxBrightness = PowerManager.BRIGHTNESS_MAX;
for (Map.Entry<Float, Float> brightnessPoint :
- data.mMaxBrightnessLimits.entrySet()) {
+ data.maxBrightnessLimits.entrySet()) {
float ambientBoundary = brightnessPoint.getKey();
// find ambient lux upper boundary closest to current ambient lux
if (ambientBoundary > ambientLux && ambientBoundary < foundAmbientBoundary) {
diff --git a/services/core/java/com/android/server/display/brightness/strategy/AutoBrightnessFallbackStrategy.java b/services/core/java/com/android/server/display/brightness/strategy/AutoBrightnessFallbackStrategy.java
index 16bf177f191b..d8b95ec3b5c9 100644
--- a/services/core/java/com/android/server/display/brightness/strategy/AutoBrightnessFallbackStrategy.java
+++ b/services/core/java/com/android/server/display/brightness/strategy/AutoBrightnessFallbackStrategy.java
@@ -75,7 +75,6 @@ public final class AutoBrightnessFallbackStrategy implements DisplayBrightnessSt
brightnessReason.setReason(BrightnessReason.REASON_SCREEN_OFF_BRIGHTNESS_SENSOR);
return new DisplayBrightnessState.Builder()
.setBrightness(brightness)
- .setSdrBrightness(brightness)
.setBrightnessReason(brightnessReason)
.setDisplayBrightnessStrategyName(getName())
.setShouldUpdateScreenBrightnessSetting(brightness
diff --git a/services/core/java/com/android/server/display/brightness/strategy/AutomaticBrightnessStrategy.java b/services/core/java/com/android/server/display/brightness/strategy/AutomaticBrightnessStrategy.java
index ddb091dd170d..706b4a63f31b 100644
--- a/services/core/java/com/android/server/display/brightness/strategy/AutomaticBrightnessStrategy.java
+++ b/services/core/java/com/android/server/display/brightness/strategy/AutomaticBrightnessStrategy.java
@@ -297,7 +297,6 @@ public class AutomaticBrightnessStrategy extends AutomaticBrightnessStrategy2
/* isAutomaticBrightnessAdjusted = */ true);
return new DisplayBrightnessState.Builder()
.setBrightness(brightness)
- .setSdrBrightness(brightness)
.setBrightnessReason(brightnessReason)
.setDisplayBrightnessStrategyName(getName())
.setIsSlowChange(mIsSlowChange)
diff --git a/services/core/java/com/android/server/display/brightness/strategy/BoostBrightnessStrategy.java b/services/core/java/com/android/server/display/brightness/strategy/BoostBrightnessStrategy.java
index 009a47ad8ade..2ef7ea925fdf 100644
--- a/services/core/java/com/android/server/display/brightness/strategy/BoostBrightnessStrategy.java
+++ b/services/core/java/com/android/server/display/brightness/strategy/BoostBrightnessStrategy.java
@@ -42,7 +42,6 @@ public class BoostBrightnessStrategy implements DisplayBrightnessStrategy {
// the brightness
DisplayBrightnessState displayBrightnessState =
BrightnessUtils.constructDisplayBrightnessState(BrightnessReason.REASON_BOOST,
- PowerManager.BRIGHTNESS_MAX,
PowerManager.BRIGHTNESS_MAX, getName());
return displayBrightnessState;
}
diff --git a/services/core/java/com/android/server/display/brightness/strategy/DozeBrightnessStrategy.java b/services/core/java/com/android/server/display/brightness/strategy/DozeBrightnessStrategy.java
index 2b493f3a181f..0855c9e098c4 100644
--- a/services/core/java/com/android/server/display/brightness/strategy/DozeBrightnessStrategy.java
+++ b/services/core/java/com/android/server/display/brightness/strategy/DozeBrightnessStrategy.java
@@ -36,7 +36,6 @@ public class DozeBrightnessStrategy implements DisplayBrightnessStrategy {
// the brightness
return BrightnessUtils.constructDisplayBrightnessState(BrightnessReason.REASON_DOZE,
strategyExecutionRequest.getDisplayPowerRequest().dozeScreenBrightness,
- strategyExecutionRequest.getDisplayPowerRequest().dozeScreenBrightness,
getName());
}
diff --git a/services/core/java/com/android/server/display/brightness/strategy/FallbackBrightnessStrategy.java b/services/core/java/com/android/server/display/brightness/strategy/FallbackBrightnessStrategy.java
index 0b92317a61cb..7c0c9312888e 100644
--- a/services/core/java/com/android/server/display/brightness/strategy/FallbackBrightnessStrategy.java
+++ b/services/core/java/com/android/server/display/brightness/strategy/FallbackBrightnessStrategy.java
@@ -39,7 +39,6 @@ public class FallbackBrightnessStrategy implements DisplayBrightnessStrategy{
brightnessReason.setReason(BrightnessReason.REASON_MANUAL);
return new DisplayBrightnessState.Builder()
.setBrightness(strategyExecutionRequest.getCurrentScreenBrightness())
- .setSdrBrightness(strategyExecutionRequest.getCurrentScreenBrightness())
.setBrightnessReason(brightnessReason)
.setDisplayBrightnessStrategyName(getName())
// The fallback brightness might change due to clamping. Make sure we tell the rest
diff --git a/services/core/java/com/android/server/display/brightness/strategy/FollowerBrightnessStrategy.java b/services/core/java/com/android/server/display/brightness/strategy/FollowerBrightnessStrategy.java
index 5a07ce2a719d..7ab92d101fc6 100644
--- a/services/core/java/com/android/server/display/brightness/strategy/FollowerBrightnessStrategy.java
+++ b/services/core/java/com/android/server/display/brightness/strategy/FollowerBrightnessStrategy.java
@@ -53,7 +53,7 @@ public class FollowerBrightnessStrategy implements DisplayBrightnessStrategy {
// Todo(b/241308599): Introduce a validator class and add validations before setting
// the brightness
return BrightnessUtils.constructDisplayBrightnessState(BrightnessReason.REASON_FOLLOWER,
- mBrightnessToFollow, mBrightnessToFollow, getName(), mBrightnessToFollowSlowChange);
+ mBrightnessToFollow, getName(), mBrightnessToFollowSlowChange);
}
@Override
diff --git a/services/core/java/com/android/server/display/brightness/strategy/InvalidBrightnessStrategy.java b/services/core/java/com/android/server/display/brightness/strategy/InvalidBrightnessStrategy.java
index 9dc6cffe5c1e..f9e56bbe47d1 100644
--- a/services/core/java/com/android/server/display/brightness/strategy/InvalidBrightnessStrategy.java
+++ b/services/core/java/com/android/server/display/brightness/strategy/InvalidBrightnessStrategy.java
@@ -34,8 +34,7 @@ public class InvalidBrightnessStrategy implements DisplayBrightnessStrategy {
public DisplayBrightnessState updateBrightness(
StrategyExecutionRequest strategyExecutionRequest) {
return BrightnessUtils.constructDisplayBrightnessState(BrightnessReason.REASON_UNKNOWN,
- PowerManager.BRIGHTNESS_INVALID_FLOAT, PowerManager.BRIGHTNESS_INVALID_FLOAT,
- getName());
+ PowerManager.BRIGHTNESS_INVALID_FLOAT, getName());
}
@Override
diff --git a/services/core/java/com/android/server/display/brightness/strategy/OffloadBrightnessStrategy.java b/services/core/java/com/android/server/display/brightness/strategy/OffloadBrightnessStrategy.java
index b46873aec814..1d7d3a6fa3ef 100644
--- a/services/core/java/com/android/server/display/brightness/strategy/OffloadBrightnessStrategy.java
+++ b/services/core/java/com/android/server/display/brightness/strategy/OffloadBrightnessStrategy.java
@@ -55,7 +55,6 @@ public class OffloadBrightnessStrategy implements DisplayBrightnessStrategy {
brightnessReason.setReason(BrightnessReason.REASON_OFFLOAD);
return new DisplayBrightnessState.Builder()
.setBrightness(offloadBrightness)
- .setSdrBrightness(offloadBrightness)
.setBrightnessReason(brightnessReason)
.setDisplayBrightnessStrategyName(getName())
.setIsSlowChange(false)
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 a2982b16454f..40a495c85467 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
@@ -35,8 +35,7 @@ public class OverrideBrightnessStrategy implements DisplayBrightnessStrategy {
// the brightness
return BrightnessUtils.constructDisplayBrightnessState(BrightnessReason.REASON_OVERRIDE,
strategyExecutionRequest.getDisplayPowerRequest().screenBrightnessOverride,
- strategyExecutionRequest.getDisplayPowerRequest()
- .screenBrightnessOverride, getName());
+ getName());
}
@Override
diff --git a/services/core/java/com/android/server/display/brightness/strategy/ScreenOffBrightnessStrategy.java b/services/core/java/com/android/server/display/brightness/strategy/ScreenOffBrightnessStrategy.java
index 6a3162c75dc5..fe7a6b754cbc 100644
--- a/services/core/java/com/android/server/display/brightness/strategy/ScreenOffBrightnessStrategy.java
+++ b/services/core/java/com/android/server/display/brightness/strategy/ScreenOffBrightnessStrategy.java
@@ -36,7 +36,6 @@ public class ScreenOffBrightnessStrategy implements DisplayBrightnessStrategy {
// Todo(b/241308599): Introduce a validator class and add validations before setting
// the brightness
return BrightnessUtils.constructDisplayBrightnessState(BrightnessReason.REASON_SCREEN_OFF,
- PowerManager.BRIGHTNESS_OFF_FLOAT,
PowerManager.BRIGHTNESS_OFF_FLOAT, getName());
}
diff --git a/services/core/java/com/android/server/display/brightness/strategy/TemporaryBrightnessStrategy.java b/services/core/java/com/android/server/display/brightness/strategy/TemporaryBrightnessStrategy.java
index 6b8817a3b62a..ca0beefd86fd 100644
--- a/services/core/java/com/android/server/display/brightness/strategy/TemporaryBrightnessStrategy.java
+++ b/services/core/java/com/android/server/display/brightness/strategy/TemporaryBrightnessStrategy.java
@@ -48,7 +48,6 @@ public class TemporaryBrightnessStrategy implements DisplayBrightnessStrategy {
// the brightness
DisplayBrightnessState displayBrightnessState =
BrightnessUtils.constructDisplayBrightnessState(BrightnessReason.REASON_TEMPORARY,
- mTemporaryScreenBrightness,
mTemporaryScreenBrightness, getName());
return displayBrightnessState;
}
diff --git a/services/core/java/com/android/server/display/config/DisplayDeviceConfigUtils.java b/services/core/java/com/android/server/display/config/DisplayDeviceConfigUtils.java
new file mode 100644
index 000000000000..5b4e8d51a168
--- /dev/null
+++ b/services/core/java/com/android/server/display/config/DisplayDeviceConfigUtils.java
@@ -0,0 +1,63 @@
+/*
+ * 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.server.display.config;
+
+import android.annotation.Nullable;
+import android.util.Slog;
+import android.util.Spline;
+
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.function.Function;
+
+public class DisplayDeviceConfigUtils {
+ private static final String TAG = "DisplayDeviceConfigUtils";
+
+ /**
+ * Create Spline from generic data
+ * @param points - points for Spline in format (x0, y0), (x1, y1) etc
+ * @param xExtractor - extract X component from generic data
+ * @param yExtractor - extract Y component from generic data
+ */
+ @Nullable
+ public static <T> Spline createSpline(List<T> points, Function<T, BigDecimal> xExtractor,
+ Function<T, BigDecimal> yExtractor) {
+ int size = points.size();
+ if (size == 0) {
+ return null;
+ }
+
+ float[] x = new float[size];
+ float[] y = new float[size];
+
+ int i = 0;
+ for (T point : points) {
+ x[i] = xExtractor.apply(point).floatValue();
+ if (i > 0) {
+ if (x[i] <= x[i - 1]) {
+ Slog.e(TAG, "spline control points must be strictly increasing, ignoring "
+ + "configuration. x: " + x[i] + " <= " + x[i - 1]);
+ return null;
+ }
+ }
+ y[i] = yExtractor.apply(point).floatValue();
+ ++i;
+ }
+
+ return Spline.createSpline(x, y);
+ }
+}
diff --git a/services/core/java/com/android/server/display/config/HdrBrightnessData.java b/services/core/java/com/android/server/display/config/HdrBrightnessData.java
index 837fbf7ca17c..ef4a7984755d 100644
--- a/services/core/java/com/android/server/display/config/HdrBrightnessData.java
+++ b/services/core/java/com/android/server/display/config/HdrBrightnessData.java
@@ -16,63 +16,148 @@
package com.android.server.display.config;
+import static com.android.server.display.config.HighBrightnessModeData.HDR_PERCENT_OF_SCREEN_REQUIRED_DEFAULT;
+
import android.annotation.Nullable;
+import android.os.PowerManager;
+import android.util.Spline;
import com.android.internal.annotations.VisibleForTesting;
+import com.android.server.display.DisplayBrightnessState;
+import java.math.BigDecimal;
+import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.function.Function;
/**
* Brightness config for HDR content
+ * <pre>
+ * {@code
+ * <displayConfiguration>
+ * ...
+ * <hdrBrightnessConfig>
+ * <brightnessMap>
+ * <point>
+ * <first>500</first>
+ * <second>0.3</second>
+ * </point>
+ * <point>
+ * <first>1200</first>
+ * <second>0.6</second>
+ * </point>
+ * </brightnessMap>
+ * <brightnessIncreaseDebounceMillis>1000</brightnessIncreaseDebounceMillis>
+ * <screenBrightnessRampIncrease>0.04</brightnessIncreaseDurationMillis>
+ * <brightnessDecreaseDebounceMillis>13000</brightnessDecreaseDebounceMillis>
+ * <screenBrightnessRampDecrease>0.03</brightnessDecreaseDurationMillis>
+ * <minimumHdrPercentOfScreenForNbm>0.2</minimumHdrPercentOfScreenForNbm>
+ * <minimumHdrPercentOfScreenForHbm>0.5</minimumHdrPercentOfScreenForHbm>
+ * <allowInLowPowerMode>true</allowInLowPowerMode>
+ * <sdrHdrRatioMap>
+ * <point>
+ * <first>2.0</first>
+ * <second>4.0</second>
+ * </point>
+ * <point>
+ * <first>100</first>
+ * <second>8.0</second>
+ * </point>
+ * </sdrHdrRatioMap>
+ * </hdrBrightnessConfig>
+ * ...
+ * </displayConfiguration>
+ * }
+ * </pre>
*/
public class HdrBrightnessData {
+ private static final String TAG = "HdrBrightnessData";
/**
* Lux to brightness map
*/
- public final Map<Float, Float> mMaxBrightnessLimits;
+ public final Map<Float, Float> maxBrightnessLimits;
/**
* Debounce time for brightness increase
*/
- public final long mBrightnessIncreaseDebounceMillis;
+ public final long brightnessIncreaseDebounceMillis;
/**
* Brightness increase animation speed
*/
- public final float mScreenBrightnessRampIncrease;
+ public final float screenBrightnessRampIncrease;
/**
* Debounce time for brightness decrease
*/
- public final long mBrightnessDecreaseDebounceMillis;
+ public final long brightnessDecreaseDebounceMillis;
/**
* Brightness decrease animation speed
*/
- public final float mScreenBrightnessRampDecrease;
+ public final float screenBrightnessRampDecrease;
+
+ /**
+ * Brightness level at which we transition from normal to high-brightness
+ */
+ public final float hbmTransitionPoint;
+
+ /**
+ * Min Hdr layer size to start hdr brightness boost up to high brightness mode transition point
+ */
+ public final float minimumHdrPercentOfScreenForNbm;
+
+ /**
+ * Min Hdr layer size to start hdr brightness boost above high brightness mode transition point
+ */
+ public final float minimumHdrPercentOfScreenForHbm;
+
+ /**
+ * If Hdr brightness boost allowed in low power mode
+ */
+ public final boolean allowInLowPowerMode;
+
+ /**
+ * brightness to boost ratio spline
+ */
+ @Nullable
+ public final Spline sdrToHdrRatioSpline;
@VisibleForTesting
public HdrBrightnessData(Map<Float, Float> maxBrightnessLimits,
long brightnessIncreaseDebounceMillis, float screenBrightnessRampIncrease,
- long brightnessDecreaseDebounceMillis, float screenBrightnessRampDecrease) {
- mMaxBrightnessLimits = maxBrightnessLimits;
- mBrightnessIncreaseDebounceMillis = brightnessIncreaseDebounceMillis;
- mScreenBrightnessRampIncrease = screenBrightnessRampIncrease;
- mBrightnessDecreaseDebounceMillis = brightnessDecreaseDebounceMillis;
- mScreenBrightnessRampDecrease = screenBrightnessRampDecrease;
+ long brightnessDecreaseDebounceMillis, float screenBrightnessRampDecrease,
+ float hbmTransitionPoint,
+ float minimumHdrPercentOfScreenForNbm, float minimumHdrPercentOfScreenForHbm,
+ boolean allowInLowPowerMode, @Nullable Spline sdrToHdrRatioSpline) {
+ this.maxBrightnessLimits = maxBrightnessLimits;
+ this.brightnessIncreaseDebounceMillis = brightnessIncreaseDebounceMillis;
+ this.screenBrightnessRampIncrease = screenBrightnessRampIncrease;
+ this.brightnessDecreaseDebounceMillis = brightnessDecreaseDebounceMillis;
+ this.screenBrightnessRampDecrease = screenBrightnessRampDecrease;
+ this.hbmTransitionPoint = hbmTransitionPoint;
+ this.minimumHdrPercentOfScreenForNbm = minimumHdrPercentOfScreenForNbm;
+ this.minimumHdrPercentOfScreenForHbm = minimumHdrPercentOfScreenForHbm;
+ this.allowInLowPowerMode = allowInLowPowerMode;
+ this.sdrToHdrRatioSpline = sdrToHdrRatioSpline;
}
@Override
public String toString() {
return "HdrBrightnessData {"
- + "mMaxBrightnessLimits: " + mMaxBrightnessLimits
- + ", mBrightnessIncreaseDebounceMillis: " + mBrightnessIncreaseDebounceMillis
- + ", mScreenBrightnessRampIncrease: " + mScreenBrightnessRampIncrease
- + ", mBrightnessDecreaseDebounceMillis: " + mBrightnessDecreaseDebounceMillis
- + ", mScreenBrightnessRampDecrease: " + mScreenBrightnessRampDecrease
+ + "mMaxBrightnessLimits: " + maxBrightnessLimits
+ + ", mBrightnessIncreaseDebounceMillis: " + brightnessIncreaseDebounceMillis
+ + ", mScreenBrightnessRampIncrease: " + screenBrightnessRampIncrease
+ + ", mBrightnessDecreaseDebounceMillis: " + brightnessDecreaseDebounceMillis
+ + ", mScreenBrightnessRampDecrease: " + screenBrightnessRampDecrease
+ + ", transitionPoint: " + hbmTransitionPoint
+ + ", minimumHdrPercentOfScreenForNbm: " + minimumHdrPercentOfScreenForNbm
+ + ", minimumHdrPercentOfScreenForHbm: " + minimumHdrPercentOfScreenForHbm
+ + ", allowInLowPowerMode: " + allowInLowPowerMode
+ + ", sdrToHdrRatioSpline: " + sdrToHdrRatioSpline
+ "} ";
}
@@ -80,10 +165,12 @@ public class HdrBrightnessData {
* Loads HdrBrightnessData from DisplayConfiguration
*/
@Nullable
- public static HdrBrightnessData loadConfig(DisplayConfiguration config) {
+ public static HdrBrightnessData loadConfig(DisplayConfiguration config,
+ Function<HighBrightnessMode, Float> transitionPointProvider) {
+ HighBrightnessMode hbmConfig = config.getHighBrightnessMode();
HdrBrightnessConfig hdrConfig = config.getHdrBrightnessConfig();
if (hdrConfig == null) {
- return null;
+ return getFallbackData(hbmConfig, transitionPointProvider);
}
List<NonNegativeFloatToFloatPoint> points = hdrConfig.getBrightnessMap().getPoint();
@@ -92,10 +179,76 @@ public class HdrBrightnessData {
brightnessLimits.put(point.getFirst().floatValue(), point.getSecond().floatValue());
}
+ float minHdrPercentForHbm = hdrConfig.getMinimumHdrPercentOfScreenForHbm() != null
+ ? hdrConfig.getMinimumHdrPercentOfScreenForHbm().floatValue()
+ : getFallbackHdrPercent(hbmConfig);
+
+ float minHdrPercentForNbm = hdrConfig.getMinimumHdrPercentOfScreenForNbm() != null
+ ? hdrConfig.getMinimumHdrPercentOfScreenForNbm().floatValue() : minHdrPercentForHbm;
+
+ if (minHdrPercentForNbm > minHdrPercentForHbm) {
+ throw new IllegalArgumentException(
+ "minHdrPercentForHbm should be >= minHdrPercentForNbm");
+ }
+
return new HdrBrightnessData(brightnessLimits,
hdrConfig.getBrightnessIncreaseDebounceMillis().longValue(),
hdrConfig.getScreenBrightnessRampIncrease().floatValue(),
hdrConfig.getBrightnessDecreaseDebounceMillis().longValue(),
- hdrConfig.getScreenBrightnessRampDecrease().floatValue());
+ hdrConfig.getScreenBrightnessRampDecrease().floatValue(),
+ getTransitionPoint(hbmConfig, transitionPointProvider),
+ minHdrPercentForNbm, minHdrPercentForHbm, hdrConfig.getAllowInLowPowerMode(),
+ getSdrHdrRatioSpline(hdrConfig, config.getHighBrightnessMode()));
+ }
+
+ private static float getTransitionPoint(@Nullable HighBrightnessMode hbm,
+ Function<HighBrightnessMode, Float> transitionPointProvider) {
+ if (hbm == null) {
+ return PowerManager.BRIGHTNESS_MAX;
+ } else {
+ return transitionPointProvider.apply(hbm);
+ }
+ }
+
+ @Nullable
+ private static HdrBrightnessData getFallbackData(@Nullable HighBrightnessMode hbm,
+ Function<HighBrightnessMode, Float> transitionPointProvider) {
+ if (hbm == null) {
+ return null;
+ }
+ float fallbackPercent = getFallbackHdrPercent(hbm);
+ Spline fallbackSpline = getFallbackSdrHdrRatioSpline(hbm);
+ return new HdrBrightnessData(Collections.emptyMap(),
+ 0, DisplayBrightnessState.CUSTOM_ANIMATION_RATE_NOT_SET,
+ 0, DisplayBrightnessState.CUSTOM_ANIMATION_RATE_NOT_SET,
+ getTransitionPoint(hbm, transitionPointProvider),
+ fallbackPercent, fallbackPercent, false, fallbackSpline);
+ }
+
+ private static float getFallbackHdrPercent(HighBrightnessMode hbm) {
+ BigDecimal minHdrPctOfScreen = hbm != null ? hbm.getMinimumHdrPercentOfScreen_all() : null;
+ return minHdrPctOfScreen != null ? minHdrPctOfScreen.floatValue()
+ : HDR_PERCENT_OF_SCREEN_REQUIRED_DEFAULT;
+ }
+
+ @Nullable
+ private static Spline getSdrHdrRatioSpline(HdrBrightnessConfig hdrConfig,
+ HighBrightnessMode hbm) {
+ NonNegativeFloatToFloatMap sdrHdrRatioMap = hdrConfig.getSdrHdrRatioMap();
+ if (sdrHdrRatioMap == null) {
+ return getFallbackSdrHdrRatioSpline(hbm);
+ }
+ return DisplayDeviceConfigUtils.createSpline(sdrHdrRatioMap.getPoint(),
+ NonNegativeFloatToFloatPoint::getFirst, NonNegativeFloatToFloatPoint::getSecond);
+ }
+
+ @Nullable
+ private static Spline getFallbackSdrHdrRatioSpline(HighBrightnessMode hbm) {
+ SdrHdrRatioMap fallbackMap = hbm != null ? hbm.getSdrHdrRatioMap_all() : null;
+ if (fallbackMap == null) {
+ return null;
+ }
+ return DisplayDeviceConfigUtils.createSpline(fallbackMap.getPoint(),
+ SdrHdrRatioPoint::getSdrNits, SdrHdrRatioPoint::getHdrRatio);
}
}
diff --git a/services/core/java/com/android/server/display/config/HighBrightnessModeData.java b/services/core/java/com/android/server/display/config/HighBrightnessModeData.java
new file mode 100644
index 000000000000..dc2f976748e6
--- /dev/null
+++ b/services/core/java/com/android/server/display/config/HighBrightnessModeData.java
@@ -0,0 +1,157 @@
+/*
+ * 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.server.display.config;
+
+import android.annotation.Nullable;
+import android.util.Slog;
+import android.util.Spline;
+import android.view.SurfaceControl;
+
+import com.android.internal.annotations.VisibleForTesting;
+
+import java.math.BigDecimal;
+import java.util.function.Function;
+
+/**
+ * Container for high brightness mode configuration data.
+ */
+public class HighBrightnessModeData {
+ private static final String TAG = "HighBrightnessModeData";
+
+ static final float HDR_PERCENT_OF_SCREEN_REQUIRED_DEFAULT = 0.5f;
+
+ /** Minimum lux needed to enter high brightness mode */
+ public final float minimumLux;
+
+ /** Brightness level at which we transition from normal to high-brightness. */
+ public final float transitionPoint;
+
+ /** Whether HBM is allowed when {@code Settings.Global.LOW_POWER_MODE} is active. */
+ public final boolean allowInLowPowerMode;
+
+ /** Time window for HBM. */
+ public final long timeWindowMillis;
+
+ /** Maximum time HBM is allowed to be during in a {@code timeWindowMillis}. */
+ public final long timeMaxMillis;
+
+ /** Minimum time that HBM can be on before being enabled. */
+ public final long timeMinMillis;
+
+ /** Minimum HDR video size to enter high brightness mode */
+ public final float minimumHdrPercentOfScreen;
+
+ @Nullable
+ public final Spline sdrToHdrRatioSpline;
+
+ @Nullable
+ public final SurfaceControl.RefreshRateRange refreshRateLimit;
+
+ public final boolean isHighBrightnessModeEnabled;
+
+ @VisibleForTesting
+ public HighBrightnessModeData(float minimumLux, float transitionPoint, long timeWindowMillis,
+ long timeMaxMillis, long timeMinMillis, boolean allowInLowPowerMode,
+ float minimumHdrPercentOfScreen, @Nullable Spline sdrToHdrRatioSpline,
+ @Nullable SurfaceControl.RefreshRateRange refreshRateLimit,
+ boolean isHighBrightnessModeEnabled) {
+ this.minimumLux = minimumLux;
+ this.transitionPoint = transitionPoint;
+ this.timeWindowMillis = timeWindowMillis;
+ this.timeMaxMillis = timeMaxMillis;
+ this.timeMinMillis = timeMinMillis;
+ this.allowInLowPowerMode = allowInLowPowerMode;
+ this.minimumHdrPercentOfScreen = minimumHdrPercentOfScreen;
+ this.sdrToHdrRatioSpline = sdrToHdrRatioSpline;
+ this.refreshRateLimit = refreshRateLimit;
+ this.isHighBrightnessModeEnabled = isHighBrightnessModeEnabled;
+ }
+
+ @Override
+ public String toString() {
+ return "HBM{"
+ + "minLux: " + minimumLux
+ + ", transition: " + transitionPoint
+ + ", timeWindow: " + timeWindowMillis + "ms"
+ + ", timeMax: " + timeMaxMillis + "ms"
+ + ", timeMin: " + timeMinMillis + "ms"
+ + ", allowInLowPowerMode: " + allowInLowPowerMode
+ + ", minimumHdrPercentOfScreen: " + minimumHdrPercentOfScreen
+ + ", mSdrToHdrRatioSpline=" + sdrToHdrRatioSpline
+ + ", refreshRateLimit=" + refreshRateLimit
+ + ", isHighBrightnessModeEnabled=" + isHighBrightnessModeEnabled
+ + "} ";
+ }
+
+ /**
+ * Loads HighBrightnessModeData from DisplayConfiguration
+ */
+ public static HighBrightnessModeData loadHighBrightnessModeData(DisplayConfiguration config,
+ Function<HighBrightnessMode, Float> transitionPointProvider) {
+ final HighBrightnessMode hbm = config.getHighBrightnessMode();
+ float minimumLux = 0f;
+ float transitionPoint = 0f;
+ long timeWindowMillis = 0L;
+ long timeMaxMillis = 0L;
+ long timeMinMillis = 0L;
+ boolean allowInLowPowerMode = false;
+ float minimumHdrPercentOfScreen = HDR_PERCENT_OF_SCREEN_REQUIRED_DEFAULT;
+ Spline sdrToHdrRatioSpline = null;
+ SurfaceControl.RefreshRateRange refreshRateLimit = null;
+ boolean isEnabled = false;
+
+ if (hbm != null) {
+ minimumLux = hbm.getMinimumLux_all().floatValue();
+ transitionPoint = transitionPointProvider.apply(hbm);
+ HbmTiming hbmTiming = hbm.getTiming_all();
+ timeWindowMillis = hbmTiming.getTimeWindowSecs_all().longValue() * 1000;
+ timeMaxMillis = hbmTiming.getTimeMaxSecs_all().longValue() * 1000;
+ timeMinMillis = hbmTiming.getTimeMinSecs_all().longValue() * 1000;
+ allowInLowPowerMode = hbm.getAllowInLowPowerMode_all();
+ BigDecimal minHdrPctOfScreen = hbm.getMinimumHdrPercentOfScreen_all();
+ if (minHdrPctOfScreen != null) {
+ minimumHdrPercentOfScreen = minHdrPctOfScreen.floatValue();
+ if (minimumHdrPercentOfScreen > 1 || minimumHdrPercentOfScreen < 0) {
+ Slog.w(TAG, "Invalid minimum HDR percent of screen: "
+ + minimumHdrPercentOfScreen);
+ minimumHdrPercentOfScreen = HDR_PERCENT_OF_SCREEN_REQUIRED_DEFAULT;
+ }
+ }
+
+ sdrToHdrRatioSpline = loadSdrHdrRatioMap(hbm);
+ RefreshRateRange rr = hbm.getRefreshRate_all();
+ if (rr != null) {
+ refreshRateLimit = new SurfaceControl.RefreshRateRange(
+ rr.getMinimum().floatValue(), rr.getMaximum().floatValue());
+ }
+ isEnabled = hbm.getEnabled();
+ }
+ return new HighBrightnessModeData(minimumLux, transitionPoint,
+ timeWindowMillis, timeMaxMillis, timeMinMillis, allowInLowPowerMode,
+ minimumHdrPercentOfScreen, sdrToHdrRatioSpline, refreshRateLimit, isEnabled);
+
+ }
+
+ private static Spline loadSdrHdrRatioMap(HighBrightnessMode hbmConfig) {
+ final SdrHdrRatioMap sdrHdrRatioMap = hbmConfig.getSdrHdrRatioMap_all();
+ if (sdrHdrRatioMap == null) {
+ return null;
+ }
+ return DisplayDeviceConfigUtils.createSpline(sdrHdrRatioMap.getPoint(),
+ SdrHdrRatioPoint::getSdrNits, SdrHdrRatioPoint::getHdrRatio);
+ }
+}
diff --git a/services/core/java/com/android/server/display/config/SensorData.java b/services/core/java/com/android/server/display/config/SensorData.java
index 8bfc4a3ad77a..1437c8dba0cd 100644
--- a/services/core/java/com/android/server/display/config/SensorData.java
+++ b/services/core/java/com/android/server/display/config/SensorData.java
@@ -34,6 +34,8 @@ public class SensorData {
public static final String TEMPERATURE_TYPE_DISPLAY = "DISPLAY";
public static final String TEMPERATURE_TYPE_SKIN = "SKIN";
+ private static final SensorData UNSPECIFIED_SENSOR_DATA = new SensorData(
+ /* type= */null, /* name= */ null);
@Nullable
public final String type;
@@ -43,24 +45,14 @@ public class SensorData {
public final float maxRefreshRate;
public final List<SupportedModeData> supportedModes;
- @VisibleForTesting
- public SensorData() {
- this(/* type= */ null, /* name= */ null);
- }
-
- @VisibleForTesting
- public SensorData(String type, String name) {
- this(type, name, /* minRefreshRate= */ 0f, /* maxRefreshRate= */ Float.POSITIVE_INFINITY);
- }
-
- @VisibleForTesting
- public SensorData(String type, String name, float minRefreshRate, float maxRefreshRate) {
- this(type, name, minRefreshRate, maxRefreshRate, /* supportedModes= */ List.of());
+ private SensorData(@Nullable String type, @Nullable String name) {
+ this(type, name, /* minRefreshRate= */ 0f, /* maxRefreshRate= */ Float.POSITIVE_INFINITY,
+ /* supportedModes= */ List.of());
}
@VisibleForTesting
- public SensorData(String type, String name, float minRefreshRate, float maxRefreshRate,
- List<SupportedModeData> supportedModes) {
+ SensorData(@Nullable String type, @Nullable String name,
+ float minRefreshRate, float maxRefreshRate, List<SupportedModeData> supportedModes) {
this.type = type;
this.name = name;
this.minRefreshRate = minRefreshRate;
@@ -72,7 +64,7 @@ public class SensorData {
* @return True if the sensor matches both the specified name and type, or one if only one
* is specified (not-empty). Always returns false if both parameters are null or empty.
*/
- public boolean matches(String sensorName, String sensorType) {
+ public boolean matches(@Nullable String sensorName, @Nullable String sensorType) {
final boolean isNameSpecified = !TextUtils.isEmpty(sensorName);
final boolean isTypeSpecified = !TextUtils.isEmpty(sensorType);
return (isNameSpecified || isTypeSpecified)
@@ -120,7 +112,7 @@ public class SensorData {
if (sensorDetails != null) {
return loadSensorData(sensorDetails);
} else {
- return new SensorData();
+ return UNSPECIFIED_SENSOR_DATA;
}
}
@@ -130,13 +122,12 @@ public class SensorData {
@Nullable
public static SensorData loadProxSensorConfig(
DisplayManagerFlags flags, DisplayConfiguration config) {
- SensorData DEFAULT_SENSOR = new SensorData();
List<SensorDetails> sensorDetailsList = config.getProxSensor();
if (sensorDetailsList.isEmpty()) {
- return DEFAULT_SENSOR;
+ return UNSPECIFIED_SENSOR_DATA;
}
- SensorData selectedSensor = DEFAULT_SENSOR;
+ SensorData selectedSensor = UNSPECIFIED_SENSOR_DATA;
// Prioritize flagged sensors.
for (SensorDetails sensorDetails : sensorDetailsList) {
String flagStr = sensorDetails.getFeatureFlag();
@@ -148,7 +139,7 @@ public class SensorData {
}
// Check for normal un-flagged sensor if a flagged one wasn't found.
- if (DEFAULT_SENSOR == selectedSensor) {
+ if (UNSPECIFIED_SENSOR_DATA == selectedSensor) {
for (SensorDetails sensorDetails : sensorDetailsList) {
if (sensorDetails.getFeatureFlag() != null) {
continue;
@@ -159,7 +150,7 @@ public class SensorData {
}
// Check if we shouldn't use a sensor at all.
- if (DEFAULT_SENSOR != selectedSensor) {
+ if (UNSPECIFIED_SENSOR_DATA != selectedSensor) {
if ("".equals(selectedSensor.name) && "".equals(selectedSensor.type)) {
// <proxSensor> with empty values to the config means no sensor should be used.
// See also {@link com.android.server.display.utils.SensorUtils}
@@ -174,7 +165,7 @@ public class SensorData {
* Loads temperature sensor data for no config case. (Type: SKIN, Name: null)
*/
public static SensorData loadTempSensorUnspecifiedConfig() {
- return new SensorData(TEMPERATURE_TYPE_SKIN, null);
+ return new SensorData(TEMPERATURE_TYPE_SKIN, /* name= */ null);
}
/**
@@ -185,7 +176,7 @@ public class SensorData {
DisplayConfiguration config) {
SensorDetails sensorDetails = config.getTempSensor();
if (!flags.isSensorBasedBrightnessThrottlingEnabled() || sensorDetails == null) {
- return new SensorData(TEMPERATURE_TYPE_SKIN, null);
+ return loadTempSensorUnspecifiedConfig();
}
String name = sensorDetails.getName();
String type = sensorDetails.getType();
@@ -202,7 +193,7 @@ public class SensorData {
*/
@NonNull
public static SensorData loadSensorUnspecifiedConfig() {
- return new SensorData();
+ return UNSPECIFIED_SENSOR_DATA;
}
private static SensorData loadSensorData(@NonNull SensorDetails sensorDetails) {
diff --git a/services/core/java/com/android/server/display/feature/DisplayManagerFlags.java b/services/core/java/com/android/server/display/feature/DisplayManagerFlags.java
index 41d18cd6bf12..e1934b0df3f1 100644
--- a/services/core/java/com/android/server/display/feature/DisplayManagerFlags.java
+++ b/services/core/java/com/android/server/display/feature/DisplayManagerFlags.java
@@ -154,6 +154,10 @@ public class DisplayManagerFlags {
Flags::useFusionProxSensor
);
+ private final FlagState mDozeBrightnessFloat = new FlagState(
+ Flags.FLAG_DOZE_BRIGHTNESS_FLOAT,
+ Flags::dozeBrightnessFloat);
+
private final FlagState mOffloadControlsDozeAutoBrightness = new FlagState(
Flags.FLAG_OFFLOAD_CONTROLS_DOZE_AUTO_BRIGHTNESS,
Flags::offloadControlsDozeAutoBrightness
@@ -184,6 +188,11 @@ public class DisplayManagerFlags {
Flags.FLAG_OFFLOAD_SESSION_CANCEL_BLOCK_SCREEN_ON,
Flags::offloadSessionCancelBlockScreenOn);
+ private final FlagState mNewHdrBrightnessModifier =
+ new FlagState(
+ Flags.FLAG_NEW_HDR_BRIGHTNESS_MODIFIER,
+ Flags::newHdrBrightnessModifier);
+
/**
* @return {@code true} if 'port' is allowed in display layout configuration file.
*/
@@ -342,6 +351,10 @@ public class DisplayManagerFlags {
return mUseFusionProxSensor.getName();
}
+ public boolean isDozeBrightnessFloatEnabled() {
+ return mDozeBrightnessFloat.isEnabled();
+ }
+
/**
* @return Whether DisplayOffload should control auto-brightness in doze
*/
@@ -373,6 +386,13 @@ public class DisplayManagerFlags {
}
/**
+ * @return Whether to use new HDR brightness modifier or not
+ */
+ public boolean useNewHdrBrightnessModifier() {
+ return mNewHdrBrightnessModifier.isEnabled();
+ }
+
+ /**
* dumps all flagstates
* @param pw printWriter
*/
@@ -403,12 +423,14 @@ public class DisplayManagerFlags {
pw.println(" " + mRefactorDisplayPowerController);
pw.println(" " + mResolutionBackupRestore);
pw.println(" " + mUseFusionProxSensor);
+ pw.println(" " + mDozeBrightnessFloat);
pw.println(" " + mOffloadControlsDozeAutoBrightness);
pw.println(" " + mPeakRefreshRatePhysicalLimit);
pw.println(" " + mIgnoreAppPreferredRefreshRate);
pw.println(" " + mSynthetic60hzModes);
pw.println(" " + mOffloadDozeOverrideHoldsWakelock);
pw.println(" " + mOffloadSessionCancelBlockScreenOn);
+ pw.println(" " + mNewHdrBrightnessModifier);
}
private static class FlagState {
diff --git a/services/core/java/com/android/server/display/feature/display_flags.aconfig b/services/core/java/com/android/server/display/feature/display_flags.aconfig
index 1ea5c0b23be1..ac5f97fc3661 100644
--- a/services/core/java/com/android/server/display/feature/display_flags.aconfig
+++ b/services/core/java/com/android/server/display/feature/display_flags.aconfig
@@ -246,6 +246,14 @@ flag {
}
flag {
+ name: "doze_brightness_float"
+ namespace: "display_manager"
+ description: "Define doze brightness in the float scale [0, 1]."
+ bug: "343796384"
+ is_fixed_read_only: true
+}
+
+flag {
name: "offload_controls_doze_auto_brightness"
namespace: "display_manager"
description: "Allows the registered DisplayOffloader to control if auto-brightness is used in doze"
@@ -307,3 +315,11 @@ flag {
bug: "331725519"
is_fixed_read_only: true
}
+
+flag {
+ name: "new_hdr_brightness_modifier"
+ namespace: "display_manager"
+ description: "Flag for new HDR brightness clamper."
+ bug: "331275392"
+ is_fixed_read_only: true
+}
diff --git a/services/core/java/com/android/server/flags/services.aconfig b/services/core/java/com/android/server/flags/services.aconfig
index d387828872e9..c361aee24916 100644
--- a/services/core/java/com/android/server/flags/services.aconfig
+++ b/services/core/java/com/android/server/flags/services.aconfig
@@ -35,3 +35,13 @@ flag {
description: "Enable BackgroundInstallControl based on system feature to prevent it from starting on form factors."
bug: "340928990"
}
+
+flag {
+ namespace: "input"
+ name: "modifier_shortcut_manager_multiuser"
+ description: "Update Modifier Shortcut Manager to work correctly with multiple users, including HSUM"
+ bug: "351963350"
+ metadata {
+ purpose: PURPOSE_BUGFIX
+ }
+}
diff --git a/services/core/java/com/android/server/hdmi/HdmiCecNetwork.java b/services/core/java/com/android/server/hdmi/HdmiCecNetwork.java
index 88da6fb94754..550f68fbc94c 100644
--- a/services/core/java/com/android/server/hdmi/HdmiCecNetwork.java
+++ b/services/core/java/com/android/server/hdmi/HdmiCecNetwork.java
@@ -660,7 +660,11 @@ public class HdmiCecNetwork {
.setPortId(physicalAddressToPortId(physicalAddress))
.setDeviceType(type)
.build();
- updateCecDevice(updatedDeviceInfo);
+ if (deviceInfo.getPhysicalAddress() != physicalAddress) {
+ addCecDevice(updatedDeviceInfo);
+ } else {
+ updateCecDevice(updatedDeviceInfo);
+ }
}
}
diff --git a/services/core/java/com/android/server/input/InputManagerService.java b/services/core/java/com/android/server/input/InputManagerService.java
index 1f46af8b741d..bb2efa166800 100644
--- a/services/core/java/com/android/server/input/InputManagerService.java
+++ b/services/core/java/com/android/server/input/InputManagerService.java
@@ -2224,12 +2224,6 @@ public class InputManagerService extends IInputManager.Stub
// Native callback.
@SuppressWarnings("unused")
- private void notifyConfigurationChanged(long whenNanos) {
- mWindowManagerCallbacks.notifyConfigurationChanged();
- }
-
- // Native callback.
- @SuppressWarnings("unused")
private void notifyInputDevicesChanged(InputDevice[] inputDevices) {
synchronized (mInputDevicesLock) {
if (!mInputDevicesChangedPending) {
@@ -2240,6 +2234,9 @@ public class InputManagerService extends IInputManager.Stub
mInputDevices = inputDevices;
}
+ // Input device change can possibly change configuration, so notify window manager to update
+ // its configuration.
+ mWindowManagerCallbacks.notifyConfigurationChanged();
}
// Native callback.
diff --git a/services/core/java/com/android/server/inputmethod/AdditionalSubtypeMapRepository.java b/services/core/java/com/android/server/inputmethod/AdditionalSubtypeMapRepository.java
index 82ecb4acb197..99f4747227ae 100644
--- a/services/core/java/com/android/server/inputmethod/AdditionalSubtypeMapRepository.java
+++ b/services/core/java/com/android/server/inputmethod/AdditionalSubtypeMapRepository.java
@@ -18,20 +18,14 @@ package com.android.server.inputmethod;
import android.annotation.AnyThread;
import android.annotation.NonNull;
-import android.annotation.Nullable;
import android.annotation.UserIdInt;
import android.annotation.WorkerThread;
-import android.content.Context;
-import android.content.pm.UserInfo;
-import android.os.Handler;
import android.os.Process;
import android.util.IntArray;
+import android.util.Slog;
import android.util.SparseArray;
import com.android.internal.annotations.GuardedBy;
-import com.android.internal.inputmethod.DirectBootAwareness;
-import com.android.server.LocalServices;
-import com.android.server.pm.UserManagerInternal;
import java.util.ArrayList;
import java.util.concurrent.locks.Condition;
@@ -42,7 +36,10 @@ import java.util.concurrent.locks.ReentrantLock;
* persistent storages.
*/
final class AdditionalSubtypeMapRepository {
- @GuardedBy("ImfLock.class")
+ private static final String TAG = "AdditionalSubtypeMapRepository";
+
+ // TODO(b/352594784): Should we user other lock primitives?
+ @GuardedBy("sPerUserMap")
@NonNull
private static final SparseArray<AdditionalSubtypeMap> sPerUserMap = new SparseArray<>();
@@ -198,77 +195,91 @@ final class AdditionalSubtypeMapRepository {
private AdditionalSubtypeMapRepository() {
}
+ /**
+ * Returns {@link AdditionalSubtypeMap} for the given user.
+ *
+ * <p>This method is expected be called after {@link #ensureInitializedAndGet(int)}. Otherwise
+ * {@link AdditionalSubtypeMap#EMPTY_MAP} will be returned.</p>
+ *
+ * @param userId the user to be queried about
+ * @return {@link AdditionalSubtypeMap} for the given user
+ */
+ @AnyThread
@NonNull
- @GuardedBy("ImfLock.class")
static AdditionalSubtypeMap get(@UserIdInt int userId) {
- final AdditionalSubtypeMap map = sPerUserMap.get(userId);
- if (map != null) {
- return map;
+ final AdditionalSubtypeMap map;
+ synchronized (sPerUserMap) {
+ map = sPerUserMap.get(userId);
+ }
+ if (map == null) {
+ Slog.e(TAG, "get(userId=" + userId + ") is called before loadInitialDataAndGet()."
+ + " Returning an empty map");
+ return AdditionalSubtypeMap.EMPTY_MAP;
+ }
+ return map;
+ }
+
+ /**
+ * Ensures that {@link AdditionalSubtypeMap} is initialized for the given user. Load it from
+ * the persistent storage if {@link #putAndSave(int, AdditionalSubtypeMap, InputMethodMap)} has
+ * not been called yet.
+ *
+ * @param userId the user to be initialized
+ * @return {@link AdditionalSubtypeMap} that is associated with the given user. If
+ * {@link #putAndSave(int, AdditionalSubtypeMap, InputMethodMap)} is already called
+ * then the given {@link AdditionalSubtypeMap}.
+ */
+ @AnyThread
+ @NonNull
+ static AdditionalSubtypeMap ensureInitializedAndGet(@UserIdInt int userId) {
+ final var map = AdditionalSubtypeUtils.load(userId);
+ synchronized (sPerUserMap) {
+ final AdditionalSubtypeMap previous = sPerUserMap.get(userId);
+ // If putAndSave() has already been called, then use it.
+ if (previous != null) {
+ return previous;
+ }
+ sPerUserMap.put(userId, map);
}
- final AdditionalSubtypeMap newMap = AdditionalSubtypeUtils.load(userId);
- sPerUserMap.put(userId, newMap);
- return newMap;
+ return map;
}
- @GuardedBy("ImfLock.class")
+ /**
+ * Puts {@link AdditionalSubtypeMap} for the given user then schedule an I/O task to save it
+ * to the storage.
+ *
+ * @param userId the user for the given {@link AdditionalSubtypeMap} is to be saved
+ * @param map {@link AdditionalSubtypeMap} to be saved
+ * @param inputMethodMap {@link InputMethodMap} to be used while saving the data
+ */
+ @AnyThread
static void putAndSave(@UserIdInt int userId, @NonNull AdditionalSubtypeMap map,
@NonNull InputMethodMap inputMethodMap) {
- final AdditionalSubtypeMap previous = sPerUserMap.get(userId);
- if (previous == map) {
- return;
+ synchronized (sPerUserMap) {
+ final AdditionalSubtypeMap previous = sPerUserMap.get(userId);
+ if (previous == map) {
+ return;
+ }
+ sPerUserMap.put(userId, map);
+ sWriter.scheduleWriteTask(userId, map, inputMethodMap);
}
- sPerUserMap.put(userId, map);
- sWriter.scheduleWriteTask(userId, map, inputMethodMap);
}
+ @AnyThread
static void startWriterThread() {
sWriter.startThread();
}
- static void initialize(@NonNull Handler handler, @NonNull Context context) {
- final UserManagerInternal userManagerInternal =
- LocalServices.getService(UserManagerInternal.class);
- handler.post(() -> {
- userManagerInternal.addUserLifecycleListener(
- new UserManagerInternal.UserLifecycleListener() {
- @Override
- public void onUserCreated(UserInfo user, @Nullable Object token) {
- final int userId = user.id;
- sWriter.onUserCreated(userId);
- handler.post(() -> {
- synchronized (ImfLock.class) {
- if (!sPerUserMap.contains(userId)) {
- final AdditionalSubtypeMap additionalSubtypeMap =
- AdditionalSubtypeUtils.load(userId);
- sPerUserMap.put(userId, additionalSubtypeMap);
- final InputMethodSettings settings =
- InputMethodManagerService
- .queryInputMethodServicesInternal(context,
- userId,
- additionalSubtypeMap,
- DirectBootAwareness.AUTO);
- InputMethodSettingsRepository.put(userId, settings);
- }
- }
- });
- }
+ @AnyThread
+ static void onUserCreated(@UserIdInt int userId) {
+ sWriter.onUserCreated(userId);
+ }
- @Override
- public void onUserRemoved(UserInfo user) {
- final int userId = user.id;
- sWriter.onUserRemoved(userId);
- handler.post(() -> {
- synchronized (ImfLock.class) {
- sPerUserMap.remove(userId);
- }
- });
- }
- });
- synchronized (ImfLock.class) {
- for (int userId : userManagerInternal.getUserIds()) {
- sPerUserMap.put(userId, AdditionalSubtypeUtils.load(userId));
- }
- }
- });
+ @AnyThread
+ static void remove(@UserIdInt int userId) {
+ synchronized (sPerUserMap) {
+ sWriter.onUserRemoved(userId);
+ sPerUserMap.remove(userId);
+ }
}
}
diff --git a/services/core/java/com/android/server/inputmethod/DefaultImeVisibilityApplier.java b/services/core/java/com/android/server/inputmethod/DefaultImeVisibilityApplier.java
index 5ff421a40e18..7c93c8b80897 100644
--- a/services/core/java/com/android/server/inputmethod/DefaultImeVisibilityApplier.java
+++ b/services/core/java/com/android/server/inputmethod/DefaultImeVisibilityApplier.java
@@ -89,8 +89,8 @@ final class DefaultImeVisibilityApplier {
void performShowIme(IBinder showInputToken, @NonNull ImeTracker.Token statsToken,
@InputMethod.ShowFlags int showFlags, ResultReceiver resultReceiver,
@SoftInputShowHideReason int reason, @UserIdInt int userId) {
- final var bindingController = mService.getInputMethodBindingController(userId);
final var userData = mService.getUserData(userId);
+ final var bindingController = userData.mBindingController;
final IInputMethodInvoker curMethod = bindingController.getCurMethod();
if (curMethod != null) {
if (DEBUG) {
@@ -128,9 +128,9 @@ final class DefaultImeVisibilityApplier {
void performHideIme(IBinder hideInputToken, @NonNull ImeTracker.Token statsToken,
ResultReceiver resultReceiver, @SoftInputShowHideReason int reason,
@UserIdInt int userId) {
- final var bindingController = mService.getInputMethodBindingController(userId);
- final IInputMethodInvoker curMethod = bindingController.getCurMethod();
final var userData = mService.getUserData(userId);
+ final var bindingController = userData.mBindingController;
+ final IInputMethodInvoker curMethod = bindingController.getCurMethod();
if (curMethod != null) {
// The IME will report its visible state again after the following message finally
// delivered to the IME process as an IPC. Hence the inconsistency between
@@ -171,8 +171,8 @@ final class DefaultImeVisibilityApplier {
void applyImeVisibility(IBinder windowToken, @Nullable ImeTracker.Token statsToken,
@ImeVisibilityStateComputer.VisibilityState int state,
@SoftInputShowHideReason int reason, @UserIdInt int userId) {
- final var bindingController = mService.getInputMethodBindingController(userId);
final var userData = mService.getUserData(userId);
+ final var bindingController = userData.mBindingController;
final int displayIdToShowIme = bindingController.getDisplayIdToShowIme();
switch (state) {
case STATE_SHOW_IME:
diff --git a/services/core/java/com/android/server/inputmethod/IInputMethodManagerImpl.java b/services/core/java/com/android/server/inputmethod/IInputMethodManagerImpl.java
index 3f28c47a430b..a7280e6e99b4 100644
--- a/services/core/java/com/android/server/inputmethod/IInputMethodManagerImpl.java
+++ b/services/core/java/com/android/server/inputmethod/IInputMethodManagerImpl.java
@@ -138,6 +138,9 @@ final class IInputMethodManagerImpl extends IInputMethodManager.Stub {
@PermissionVerified(Manifest.permission.TEST_INPUT_METHOD)
boolean isInputMethodPickerShownForTest();
+ @PermissionVerified(Manifest.permission.WRITE_SECURE_SETTINGS)
+ void onImeSwitchButtonClickFromSystem(int displayId);
+
InputMethodSubtype getCurrentInputMethodSubtype(@UserIdInt int userId);
void setAdditionalInputMethodSubtypes(String imiId, InputMethodSubtype[] subtypes,
@@ -344,6 +347,14 @@ final class IInputMethodManagerImpl extends IInputMethodManager.Stub {
return mCallback.isInputMethodPickerShownForTest();
}
+ @EnforcePermission(Manifest.permission.WRITE_SECURE_SETTINGS)
+ @Override
+ public void onImeSwitchButtonClickFromSystem(int displayId) {
+ super.onImeSwitchButtonClickFromSystem_enforcePermission();
+
+ mCallback.onImeSwitchButtonClickFromSystem(displayId);
+ }
+
@Override
public InputMethodSubtype getCurrentInputMethodSubtype(@UserIdInt int userId) {
return mCallback.getCurrentInputMethodSubtype(userId);
diff --git a/services/core/java/com/android/server/inputmethod/InputMethodBindingController.java b/services/core/java/com/android/server/inputmethod/InputMethodBindingController.java
index 5ab493b25859..9837ab16a310 100644
--- a/services/core/java/com/android/server/inputmethod/InputMethodBindingController.java
+++ b/services/core/java/com/android/server/inputmethod/InputMethodBindingController.java
@@ -408,7 +408,8 @@ final class InputMethodBindingController {
InputMethodManager
.invalidateLocalConnectionlessStylusHandwritingAvailabilityCaches();
}
- mService.initializeImeLocked(mCurMethod, mCurToken, mUserId);
+ mService.initializeImeLocked(mCurMethod, mCurToken,
+ InputMethodBindingController.this);
mService.scheduleNotifyImeUidToAudioService(mCurMethodUid);
mService.reRequestCurrentClientSessionLocked(mUserId);
mAutofillController.performOnCreateInlineSuggestionsRequest();
diff --git a/services/core/java/com/android/server/inputmethod/InputMethodDrawsNavBarResourceMonitor.java b/services/core/java/com/android/server/inputmethod/InputMethodDrawsNavBarResourceMonitor.java
new file mode 100644
index 000000000000..b835d058f00f
--- /dev/null
+++ b/services/core/java/com/android/server/inputmethod/InputMethodDrawsNavBarResourceMonitor.java
@@ -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.server.inputmethod;
+
+import static android.content.Intent.ACTION_OVERLAY_CHANGED;
+
+import android.annotation.AnyThread;
+import android.annotation.NonNull;
+import android.annotation.SuppressLint;
+import android.annotation.UserIdInt;
+import android.annotation.WorkerThread;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.content.pm.PackageManager;
+import android.os.Handler;
+import android.os.PatternMatcher;
+import android.os.UserHandle;
+import android.util.Slog;
+
+final class InputMethodDrawsNavBarResourceMonitor {
+ private static final String TAG = "InputMethodDrawsNavBarResourceMonitor";
+
+ private static final String SYSTEM_PACKAGE_NAME = "android";
+
+ /**
+ * Not intended to be instantiated.
+ */
+ private InputMethodDrawsNavBarResourceMonitor() {
+ }
+
+ @WorkerThread
+ static boolean evaluate(@NonNull Context context, @UserIdInt int userId) {
+ final Context userAwareContext;
+ if (context.getUserId() == userId) {
+ userAwareContext = context;
+ } else {
+ userAwareContext = context.createContextAsUser(UserHandle.of(userId), 0 /* flags */);
+ }
+ try {
+ return userAwareContext.getPackageManager()
+ .getResourcesForApplication(SYSTEM_PACKAGE_NAME)
+ .getBoolean(com.android.internal.R.bool.config_imeDrawsImeNavBar);
+ } catch (PackageManager.NameNotFoundException e) {
+ Slog.e(TAG, "getResourcesForApplication(\"" + SYSTEM_PACKAGE_NAME + "\") failed",
+ e);
+ return false;
+ }
+ }
+
+ @FunctionalInterface
+ interface OnUpdateCallback {
+ void onUpdate(@UserIdInt int userId);
+ }
+
+ @SuppressLint("MissingPermission")
+ @AnyThread
+ static void registerCallback(@NonNull Context context, @NonNull Handler ioHandler,
+ @NonNull OnUpdateCallback callback) {
+ final IntentFilter intentFilter = new IntentFilter(ACTION_OVERLAY_CHANGED);
+ intentFilter.addDataScheme(IntentFilter.SCHEME_PACKAGE);
+ intentFilter.addDataSchemeSpecificPart(SYSTEM_PACKAGE_NAME, PatternMatcher.PATTERN_LITERAL);
+
+ final BroadcastReceiver broadcastReceiver = new BroadcastReceiver() {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ final int userId = getSendingUserId();
+ callback.onUpdate(userId);
+ }
+ };
+ context.registerReceiverAsUser(broadcastReceiver, UserHandle.ALL, intentFilter,
+ null /* broadcastPermission */, ioHandler, Context.RECEIVER_NOT_EXPORTED);
+ }
+}
diff --git a/services/core/java/com/android/server/inputmethod/InputMethodManagerInternal.java b/services/core/java/com/android/server/inputmethod/InputMethodManagerInternal.java
index f61ca61c1e04..cc9f63048843 100644
--- a/services/core/java/com/android/server/inputmethod/InputMethodManagerInternal.java
+++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerInternal.java
@@ -16,6 +16,8 @@
package com.android.server.inputmethod;
+import static com.android.server.inputmethod.InputMethodUtils.NOT_A_SUBTYPE_ID;
+
import static java.lang.annotation.RetentionPolicy.SOURCE;
import android.annotation.NonNull;
@@ -25,6 +27,7 @@ import android.inputmethodservice.InputMethodService;
import android.os.IBinder;
import android.view.inputmethod.InlineSuggestionsRequest;
import android.view.inputmethod.InputMethodInfo;
+import android.view.inputmethod.InputMethodSubtype;
import com.android.internal.inputmethod.IAccessibilityInputMethodSession;
import com.android.internal.inputmethod.InlineSuggestionsRequestCallback;
@@ -98,6 +101,18 @@ public abstract class InputMethodManagerInternal {
public abstract List<InputMethodInfo> getEnabledInputMethodListAsUser(@UserIdInt int userId);
/**
+ * Returns the list of installed input methods that are enabled for the specified user.
+ *
+ * @param imiId IME ID to be queried about
+ * @param allowsImplicitlyEnabledSubtypes {@code true} to return the implicitly enabled subtypes
+ * @param userId the user ID to be queried about
+ * @return a list of {@link InputMethodSubtype} that are enabled for {@code userId}
+ */
+ @NonNull
+ public abstract List<InputMethodSubtype> getEnabledInputMethodSubtypeListAsUser(
+ String imiId, boolean allowsImplicitlyEnabledSubtypes, @UserIdInt int userId);
+
+ /**
* Called by the Autofill Frameworks to request an {@link InlineSuggestionsRequest} from
* the input method.
*
@@ -110,7 +125,7 @@ public abstract class InputMethodManagerInternal {
InlineSuggestionsRequestInfo requestInfo, InlineSuggestionsRequestCallback cb);
/**
- * Force switch to the enabled input method by {@code imeId} for current user. If the input
+ * Force switch to the enabled input method by {@code imeId} for the current user. If the input
* method with {@code imeId} is not enabled or not installed, do nothing.
*
* @param imeId the input method ID to be switched to
@@ -119,7 +134,25 @@ public abstract class InputMethodManagerInternal {
* method by {@code imeId}; {@code false} the input method with {@code imeId} is not available
* to be switched.
*/
- public abstract boolean switchToInputMethod(String imeId, @UserIdInt int userId);
+ public boolean switchToInputMethod(@NonNull String imeId, @UserIdInt int userId) {
+ return switchToInputMethod(imeId, NOT_A_SUBTYPE_ID, userId);
+ }
+
+ /**
+ * Force switch to the enabled input method by {@code imeId} for the current user. If the input
+ * method with {@code imeId} is not enabled or not installed, do nothing. If {@code subtypeId}
+ * is also supplied (not {@link InputMethodUtils#NOT_A_SUBTYPE_ID}) and valid, also switches to
+ * it, otherwise the system decides the most sensible default subtype to use.
+ *
+ * @param imeId the input method ID to be switched to
+ * @param subtypeId the input method subtype ID to be switched to
+ * @param userId the user ID to be queried
+ * @return {@code true} if the current input method was successfully switched to the input
+ * method by {@code imeId}; {@code false} the input method with {@code imeId} is not available
+ * to be switched.
+ */
+ public abstract boolean switchToInputMethod(@NonNull String imeId, int subtypeId,
+ @UserIdInt int userId);
/**
* Force enable or disable the input method associated with {@code imeId} for given user. If
@@ -211,6 +244,15 @@ public abstract class InputMethodManagerInternal {
public abstract void updateImeWindowStatus(boolean disableImeIcon, int displayId);
/**
+ * Updates and reports whether the IME switcher button should be shown, regardless whether
+ * SystemUI or the IME is responsible for drawing it and the corresponding navigation bar.
+ *
+ * @param displayId the display for which to update the IME switcher button visibility.
+ * @param userId the user for which to update the IME switcher button visibility.
+ */
+ public abstract void updateShouldShowImeSwitcher(int displayId, @UserIdInt int userId);
+
+ /**
* Finish stylus handwriting by calling {@link InputMethodService#finishStylusHandwriting()} if
* there is an ongoing handwriting session.
*/
@@ -283,6 +325,13 @@ public abstract class InputMethodManagerInternal {
return Collections.emptyList();
}
+ @NonNull
+ @Override
+ public List<InputMethodSubtype> getEnabledInputMethodSubtypeListAsUser(String imiId,
+ boolean allowsImplicitlyEnabledSubtypes, int userId) {
+ return Collections.emptyList();
+ }
+
@Override
public void onCreateInlineSuggestionsRequest(@UserIdInt int userId,
InlineSuggestionsRequestInfo requestInfo,
@@ -290,7 +339,8 @@ public abstract class InputMethodManagerInternal {
}
@Override
- public boolean switchToInputMethod(String imeId, @UserIdInt int userId) {
+ public boolean switchToInputMethod(@NonNull String imeId, int subtypeId,
+ @UserIdInt int userId) {
return false;
}
@@ -335,6 +385,10 @@ public abstract class InputMethodManagerInternal {
}
@Override
+ public void updateShouldShowImeSwitcher(int displayId, @UserIdInt int userId) {
+ }
+
+ @Override
public void onSessionForAccessibilityCreated(int accessibilityConnectionId,
IAccessibilityInputMethodSession session, @UserIdInt int userId) {
}
diff --git a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
index b0d734df37b4..e8c15987751a 100644
--- a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
+++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
@@ -22,10 +22,9 @@ import static android.os.IServiceManager.DUMP_FLAG_PRIORITY_NORMAL;
import static android.os.IServiceManager.DUMP_FLAG_PROTO;
import static android.os.Trace.TRACE_TAG_WINDOW_MANAGER;
import static android.os.UserManager.USER_TYPE_SYSTEM_HEADLESS;
-import static android.provider.Settings.Secure.STYLUS_HANDWRITING_DEFAULT_VALUE;
-import static android.provider.Settings.Secure.STYLUS_HANDWRITING_ENABLED;
import static android.server.inputmethod.InputMethodManagerServiceProto.BACK_DISPOSITION;
import static android.server.inputmethod.InputMethodManagerServiceProto.BOUND_TO_METHOD;
+import static android.server.inputmethod.InputMethodManagerServiceProto.CONCURRENT_MULTI_USER_MODE_ENABLED;
import static android.server.inputmethod.InputMethodManagerServiceProto.CUR_ATTRIBUTE;
import static android.server.inputmethod.InputMethodManagerServiceProto.CUR_CLIENT;
import static android.server.inputmethod.InputMethodManagerServiceProto.CUR_FOCUSED_WINDOW_SOFT_INPUT_MODE;
@@ -50,8 +49,10 @@ import static android.view.inputmethod.ConnectionlessHandwritingCallback.CONNECT
import static com.android.server.inputmethod.ImeVisibilityStateComputer.ImeTargetWindowState;
import static com.android.server.inputmethod.ImeVisibilityStateComputer.ImeVisibilityResult;
+import static com.android.server.inputmethod.ImeVisibilityStateComputer.STATE_SHOW_IME;
import static com.android.server.inputmethod.ImeVisibilityStateComputer.STATE_HIDE_IME;
import static com.android.server.inputmethod.InputMethodBindingController.TIME_TO_RECONNECT;
+import static com.android.server.inputmethod.InputMethodSubtypeSwitchingController.MODE_AUTO;
import static com.android.server.inputmethod.InputMethodUtils.isSoftInputModeStateVisibleAllowed;
import static java.lang.annotation.RetentionPolicy.SOURCE;
@@ -66,6 +67,7 @@ import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.UiThread;
import android.annotation.UserIdInt;
+import android.annotation.WorkerThread;
import android.app.ActivityManagerInternal;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
@@ -78,6 +80,7 @@ import android.content.pm.PackageManager;
import android.content.pm.PackageManagerInternal;
import android.content.pm.ResolveInfo;
import android.content.pm.ServiceInfo;
+import android.content.pm.UserInfo;
import android.content.res.Resources;
import android.hardware.input.InputManager;
import android.inputmethodservice.InputMethodService;
@@ -88,6 +91,7 @@ import android.os.Debug;
import android.os.Handler;
import android.os.IBinder;
import android.os.LocaleList;
+import android.os.Looper;
import android.os.Message;
import android.os.Process;
import android.os.RemoteException;
@@ -166,18 +170,17 @@ import com.android.internal.inputmethod.StartInputReason;
import com.android.internal.inputmethod.UnbindReason;
import com.android.internal.os.TransferPipe;
import com.android.internal.util.ArrayUtils;
-import com.android.internal.util.ConcurrentUtils;
import com.android.internal.util.DumpUtils;
import com.android.internal.util.Preconditions;
import com.android.server.AccessibilityManagerInternal;
import com.android.server.EventLogTags;
import com.android.server.LocalServices;
import com.android.server.ServiceThread;
-import com.android.server.SystemServerInitThreadPool;
import com.android.server.SystemService;
import com.android.server.companion.virtual.VirtualDeviceManagerInternal;
import com.android.server.input.InputManagerInternal;
import com.android.server.inputmethod.InputMethodManagerInternal.InputMethodListListener;
+import com.android.server.inputmethod.InputMethodMenuControllerNew.MenuItem;
import com.android.server.inputmethod.InputMethodSubtypeSwitchingController.ImeSubtypeListItem;
import com.android.server.pm.UserManagerInternal;
import com.android.server.statusbar.StatusBarManagerInternal;
@@ -199,7 +202,6 @@ import java.util.Objects;
import java.util.OptionalInt;
import java.util.WeakHashMap;
import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.function.Consumer;
import java.util.function.IntFunction;
@@ -216,6 +218,13 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
static final String TAG = "InputMethodManagerService";
public static final String PROTO_ARG = "--proto";
+ /**
+ * Timeout in milliseconds in {@link #systemRunning()} to make sure that users are initialized
+ * in {@link Lifecycle#initializeUsersAsync(int[])}.
+ */
+ @DurationMillisLong
+ private static final long SYSTEM_READY_USER_INIT_TIMEOUT = 3000;
+
@Retention(SOURCE)
@IntDef({ShellCommandResult.SUCCESS, ShellCommandResult.FAILURE})
private @interface ShellCommandResult {
@@ -334,6 +343,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
final Resources mRes;
private final Handler mHandler;
+ private final InputMethodManagerInternal mInputMethodManagerInternal;
@NonNull
private final Handler mIoHandler;
@@ -343,8 +353,8 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
private int mCurrentUserId;
/** Holds all user related data */
- @GuardedBy("ImfLock.class")
- private UserDataRepository mUserDataRepository;
+ @SharedByAllUsersField
+ private final UserDataRepository mUserDataRepository;
final WindowManagerInternal mWindowManagerInternal;
private final ActivityManagerInternal mActivityManagerInternal;
@@ -357,6 +367,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
private final UserManagerInternal mUserManagerInternal;
@MultiUserUnawareField
private final InputMethodMenuController mMenuController;
+ private final InputMethodMenuControllerNew mMenuControllerNew;
@GuardedBy("ImfLock.class")
@MultiUserUnawareField
@@ -395,15 +406,6 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
@SharedByAllUsersField
private IntArray mStylusIds;
- @GuardedBy("ImfLock.class")
- @Nullable
- @MultiUserUnawareField
- private OverlayableSystemBooleanResourceWrapper mImeDrawsImeNavBarRes;
- @GuardedBy("ImfLock.class")
- @Nullable
- @MultiUserUnawareField
- Future<?> mImeDrawsImeNavBarResLazyInitFuture;
-
private final ImeTracing.ServiceDumper mDumper = new ImeTracing.ServiceDumper() {
/**
* {@inheritDoc}
@@ -480,13 +482,13 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
@SharedByAllUsersField
boolean mSystemReady;
- @GuardedBy("ImfLock.class")
+ @AnyThread
@NonNull
- UserDataRepository.UserData getUserData(@UserIdInt int userId) {
+ UserData getUserData(@UserIdInt int userId) {
return mUserDataRepository.getOrCreate(userId);
}
- @GuardedBy("ImfLock.class")
+ @AnyThread
@NonNull
InputMethodBindingController getInputMethodBindingController(@UserIdInt int userId) {
return getUserData(userId).mBindingController;
@@ -572,7 +574,9 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
}
switch (key) {
case Settings.Secure.SHOW_IME_WITH_HARD_KEYBOARD: {
- mMenuController.updateKeyboardFromSettingsLocked();
+ if (!Flags.imeSwitcherRevamp()) {
+ mMenuController.updateKeyboardFromSettingsLocked();
+ }
break;
}
case Settings.Secure.ACCESSIBILITY_SOFT_KEYBOARD_MODE: {
@@ -592,7 +596,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
}
break;
}
- case STYLUS_HANDWRITING_ENABLED: {
+ case Settings.Secure.STYLUS_HANDWRITING_ENABLED: {
InputMethodManager.invalidateLocalStylusHandwritingAvailabilityCaches();
InputMethodManager
.invalidateLocalConnectionlessStylusHandwritingAvailabilityCaches();
@@ -637,7 +641,15 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
}
}
}
- mMenuController.hideInputMethodMenu();
+ if (Flags.imeSwitcherRevamp()) {
+ synchronized (ImfLock.class) {
+ final var bindingController = getInputMethodBindingController(senderUserId);
+ mMenuControllerNew.hide(bindingController.getCurTokenDisplayId(),
+ senderUserId);
+ }
+ } else {
+ mMenuController.hideInputMethodMenu();
+ }
} else {
Slog.w(TAG, "Unexpected intent " + intent);
}
@@ -648,7 +660,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
* Handles {@link Intent#ACTION_LOCALE_CHANGED}.
*
* <p>Note: For historical reasons, {@link Intent#ACTION_LOCALE_CHANGED} has been sent to all
- * the users. We should ignore this event if this is about any background user's locale.</p>
+ * the users.</p>
*/
void onActionLocaleChanged(@NonNull LocaleList prevLocales, @NonNull LocaleList newLocales) {
if (DEBUG) {
@@ -665,13 +677,14 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
AdditionalSubtypeMapRepository.get(userId),
DirectBootAwareness.AUTO);
InputMethodSettingsRepository.put(userId, settings);
+
+ if (mConcurrentMultiUserModeEnabled || userId == mCurrentUserId) {
+ postInputMethodSettingUpdatedLocked(true /* resetDefaultEnabledIme */, userId);
+ // If the locale is changed, needs to reset the default ime
+ resetDefaultImeLocked(mContext, userId);
+ updateFromSettingsLocked(true, userId);
+ }
}
- // TODO(b/305849394): Dispatch this to non-current users.
- final int userId = mCurrentUserId;
- postInputMethodSettingUpdatedLocked(true /* resetDefaultEnabledIme */, userId);
- // If the locale is changed, needs to reset the default ime
- resetDefaultImeLocked(mContext, userId);
- updateFromSettingsLocked(true, userId);
}
}
@@ -688,24 +701,9 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
super(true);
}
- @GuardedBy("ImfLock.class")
- private boolean isChangingPackagesOfCurrentUserLocked() {
- final int userId = getChangingUserId();
- final boolean retval = userId == mCurrentUserId;
- if (DEBUG) {
- if (!retval) {
- Slog.d(TAG, "--- ignore this call back from a background user: " + userId);
- }
- }
- return retval;
- }
-
@Override
public boolean onHandleForceStop(Intent intent, String[] packages, int uid, boolean doit) {
synchronized (ImfLock.class) {
- if (!isChangingPackagesOfCurrentUserLocked()) {
- return false;
- }
final int userId = getChangingUserId();
final InputMethodSettings settings = InputMethodSettingsRepository.get(userId);
String curInputMethodId = settings.getSelectedInputMethod();
@@ -919,21 +917,62 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
* {@link SystemService} used to publish and manage the lifecycle of
* {@link InputMethodManagerService}.
*/
- public static final class Lifecycle extends SystemService {
+ public static final class Lifecycle extends SystemService
+ implements UserManagerInternal.UserLifecycleListener {
private final InputMethodManagerService mService;
-
public Lifecycle(Context context) {
- this(context, new InputMethodManagerService(context,
- shouldEnableConcurrentMultiUserMode(context)));
+ this(context, createServiceForProduction(context));
+
+ // For production code, hook up user lifecycle
+ mService.mUserManagerInternal.addUserLifecycleListener(this);
+
+ // Hook up resource change first before initializeUsersAsync() starts reading the
+ // seemingly initial data so that we can eliminate the race condition.
+ InputMethodDrawsNavBarResourceMonitor.registerCallback(context, mService.mIoHandler,
+ mService::onUpdateResourceOverlay);
+
+ // Also schedule user init tasks onto an I/O thread.
+ initializeUsersAsync(mService.mUserManagerInternal.getUserIds());
}
- public Lifecycle(
- Context context, @NonNull InputMethodManagerService inputMethodManagerService) {
+ @VisibleForTesting
+ Lifecycle(Context context, @NonNull InputMethodManagerService inputMethodManagerService) {
super(context);
mService = inputMethodManagerService;
}
+ /**
+ * Does initialization then instantiate {@link InputMethodManagerService} for production
+ * configurations.
+ *
+ * <p>We have this abstraction just because several unit tests directly initialize
+ * {@link InputMethodManagerService} with some mocked/emulated dependencies.</p>
+ *
+ * @param context {@link Context} to be used to set up
+ * @return {@link InputMethodManagerService} object to be used
+ */
+ @NonNull
+ private static InputMethodManagerService createServiceForProduction(
+ @NonNull Context context) {
+ // TODO(b/196206770): Disallow I/O on this thread. Currently it's needed for loading
+ // additional subtypes in switchUserOnHandlerLocked().
+ final ServiceThread thread = new ServiceThread(HANDLER_THREAD_NAME,
+ Process.THREAD_PRIORITY_FOREGROUND, true /* allowIo */);
+ thread.start();
+
+ final ServiceThread ioThread = new ServiceThread(PACKAGE_MONITOR_THREAD_NAME,
+ Process.THREAD_PRIORITY_FOREGROUND, true /* allowIo */);
+ ioThread.start();
+
+ SecureSettingsWrapper.setContentResolver(context.getContentResolver());
+
+ return new InputMethodManagerService(context,
+ shouldEnableConcurrentMultiUserMode(context), thread.getLooper(),
+ Handler.createAsync(ioThread.getLooper()),
+ null /* bindingControllerForTesting */);
+ }
+
@Override
public void onStart() {
mService.publishLocalService();
@@ -975,6 +1014,24 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
}
@Override
+ public void onUserCreated(UserInfo user, @Nullable Object token) {
+ // Called directly from UserManagerService. Do not block the calling thread.
+ final int userId = user.id;
+ AdditionalSubtypeMapRepository.onUserCreated(userId);
+ initializeUsersAsync(new int[]{ userId });
+ }
+
+ @Override
+ public void onUserRemoved(UserInfo user) {
+ // Called directly from UserManagerService. Do not block the calling thread.
+ final int userId = user.id;
+ SecureSettingsWrapper.onUserRemoved(userId);
+ AdditionalSubtypeMapRepository.remove(userId);
+ InputMethodSettingsRepository.remove(userId);
+ mService.mUserDataRepository.remove(userId);
+ }
+
+ @Override
public void onUserUnlocking(@NonNull TargetUser user) {
// Called on ActivityManager thread.
SecureSettingsWrapper.onUserUnlocking(user.getUserIdentifier());
@@ -987,16 +1044,47 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
// Called on ActivityManager thread.
final int userId = user.getUserIdentifier();
SecureSettingsWrapper.onUserStarting(userId);
- synchronized (ImfLock.class) {
- mService.getUserData(userId);
- if (mService.mConcurrentMultiUserModeEnabled) {
- if (mService.mCurrentUserId != userId && mService.mSystemReady) {
- mService.initializeVisibleBackgroundUserLocked(userId);
+ mService.mIoHandler.post(() -> {
+ synchronized (ImfLock.class) {
+ if (mService.mConcurrentMultiUserModeEnabled) {
+ if (mService.mCurrentUserId != userId && mService.mSystemReady) {
+ mService.initializeVisibleBackgroundUserLocked(userId);
+ }
}
}
- }
+ });
}
+ @AnyThread
+ private void initializeUsersAsync(@UserIdInt int[] userIds) {
+ Slog.d(TAG, "Schedule initialization for users=" + Arrays.toString(userIds));
+ mService.mIoHandler.post(() -> {
+ final var service = mService;
+ final var context = service.mContext;
+ final var userManagerInternal = service.mUserManagerInternal;
+
+ for (int userId : userIds) {
+ Slog.d(TAG, "Start initialization for user=" + userId);
+ final var additionalSubtypeMap =
+ AdditionalSubtypeMapRepository.ensureInitializedAndGet(userId);
+ final var settings = InputMethodManagerService.queryInputMethodServicesInternal(
+ context, userId, additionalSubtypeMap,
+ DirectBootAwareness.AUTO).getMethodMap();
+ InputMethodSettingsRepository.put(userId,
+ InputMethodSettings.create(settings, userId));
+
+ final int profileParentId = userManagerInternal.getProfileParentId(userId);
+ final boolean value =
+ InputMethodDrawsNavBarResourceMonitor.evaluate(context,
+ profileParentId);
+ final var userData = mService.getUserData(userId);
+ userData.mImeDrawsNavBar.set(value);
+
+ userData.mBackgroundLoadLatch.countDown();
+ Slog.d(TAG, "Complete initialization for user=" + userId);
+ }
+ });
+ }
}
void onUnlockUser(@UserIdInt int userId) {
@@ -1010,13 +1098,9 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
final InputMethodSettings newSettings = queryInputMethodServicesInternal(mContext,
userId, AdditionalSubtypeMapRepository.get(userId), DirectBootAwareness.AUTO);
InputMethodSettingsRepository.put(userId, newSettings);
- if (mCurrentUserId == userId) {
- // We need to rebuild IMEs.
- postInputMethodSettingUpdatedLocked(false /* resetDefaultEnabledIme */, userId);
- updateInputMethodsFromSettingsLocked(true /* enabledChanged */, userId);
- } else if (mConcurrentMultiUserModeEnabled) {
- initializeVisibleBackgroundUserLocked(userId);
- }
+ // We need to rebuild IMEs.
+ postInputMethodSettingUpdatedLocked(false /* resetDefaultEnabledIme */, userId);
+ updateInputMethodsFromSettingsLocked(true /* enabledChanged */, userId);
}
}
@@ -1041,46 +1125,20 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
mHandler.post(task);
}
- public InputMethodManagerService(Context context,
- boolean concurrentMultiUserModeEnabled) {
- this(context, concurrentMultiUserModeEnabled, null, null, null);
- }
-
@VisibleForTesting
InputMethodManagerService(
Context context,
boolean concurrentMultiUserModeEnabled,
- @Nullable ServiceThread serviceThreadForTesting,
- @Nullable ServiceThread ioThreadForTesting,
+ @NonNull Looper uiLooper,
+ @NonNull Handler ioHandler,
@Nullable IntFunction<InputMethodBindingController> bindingControllerForTesting) {
synchronized (ImfLock.class) {
mConcurrentMultiUserModeEnabled = concurrentMultiUserModeEnabled;
mContext = context;
mRes = context.getResources();
- SecureSettingsWrapper.onStart(mContext);
- // TODO(b/196206770): Disallow I/O on this thread. Currently it's needed for loading
- // additional subtypes in switchUserOnHandlerLocked().
- final ServiceThread thread =
- serviceThreadForTesting != null
- ? serviceThreadForTesting
- : new ServiceThread(
- HANDLER_THREAD_NAME,
- Process.THREAD_PRIORITY_FOREGROUND,
- true /* allowIo */);
- thread.start();
- mHandler = Handler.createAsync(thread.getLooper(), this);
- {
- final ServiceThread ioThread =
- ioThreadForTesting != null
- ? ioThreadForTesting
- : new ServiceThread(
- PACKAGE_MONITOR_THREAD_NAME,
- Process.THREAD_PRIORITY_FOREGROUND,
- true /* allowIo */);
- ioThread.start();
- mIoHandler = Handler.createAsync(ioThread.getLooper());
- }
+ mHandler = Handler.createAsync(uiLooper, this);
+ mIoHandler = ioHandler;
SystemLocaleWrapper.onStart(context, this::onActionLocaleChanged, mHandler);
mImeTrackerService = new ImeTrackerService(mHandler);
mWindowManagerInternal = LocalServices.getService(WindowManagerInternal.class);
@@ -1095,28 +1153,17 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
mShowOngoingImeSwitcherForPhones = false;
- // Executing InputMethodSettingsRepository.initialize() does not mean that it
- // immediately becomes ready to return the up-to-date InputMethodSettings for each
- // running user, because we want to return from the constructor as early as possible so
- // as not to delay the system boot process.
- // Search for InputMethodSettingsRepository.put() to find where and when it's actually
- // being updated. In general IMMS should refrain from exposing the existence of IMEs
- // until systemReady().
- InputMethodSettingsRepository.initialize(mHandler, mContext);
- AdditionalSubtypeMapRepository.initialize(mHandler, mContext);
-
mCurrentUserId = mActivityManagerInternal.getCurrentUserId();
@SuppressWarnings("GuardedBy") final IntFunction<InputMethodBindingController>
bindingControllerFactory = userId -> new InputMethodBindingController(userId,
InputMethodManagerService.this);
- mUserDataRepository = new UserDataRepository(mHandler, mUserManagerInternal,
+ mUserDataRepository = new UserDataRepository(
bindingControllerForTesting != null ? bindingControllerForTesting
: bindingControllerFactory);
- for (int id : mUserManagerInternal.getUserIds()) {
- getUserData(id);
- }
mMenuController = new InputMethodMenuController(this);
+ mMenuControllerNew = Flags.imeSwitcherRevamp()
+ ? new InputMethodMenuControllerNew() : null;
mVisibilityStateComputer = new ImeVisibilityStateComputer(this);
mVisibilityApplier = new DefaultImeVisibilityApplier(this);
@@ -1128,9 +1175,10 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
mNonPreemptibleInputMethods = mRes.getStringArray(
com.android.internal.R.array.config_nonPreemptibleInputMethods);
Runnable discardDelegationTextRunnable = () -> discardHandwritingDelegationText();
- mHwController = new HandwritingModeController(mContext, thread.getLooper(),
+ mHwController = new HandwritingModeController(mContext, uiLooper,
new InkWindowInitializer(), discardDelegationTextRunnable);
registerDeviceListenerAndCheckStylusSupport();
+ mInputMethodManagerInternal = new LocalServiceImpl();
}
}
@@ -1192,36 +1240,6 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
setSelectedInputMethodAndSubtypeLocked(defIm, NOT_A_SUBTYPE_ID, false, userId);
}
- @GuardedBy("ImfLock.class")
- private void maybeInitImeNavbarConfigLocked(@UserIdInt int targetUserId) {
- // Currently, com.android.internal.R.bool.config_imeDrawsImeNavBar is overlaid only for the
- // profile parent user.
- // TODO(b/221443458): See if we can make OverlayManager be aware of profile groups.
- final int profileParentUserId = mUserManagerInternal.getProfileParentId(targetUserId);
- if (mImeDrawsImeNavBarRes != null
- && mImeDrawsImeNavBarRes.getUserId() != profileParentUserId) {
- mImeDrawsImeNavBarRes.close();
- mImeDrawsImeNavBarRes = null;
- }
- if (mImeDrawsImeNavBarRes == null) {
- final Context userContext;
- if (mContext.getUserId() == profileParentUserId) {
- userContext = mContext;
- } else {
- userContext = mContext.createContextAsUser(UserHandle.of(profileParentUserId),
- 0 /* flags */);
- }
- mImeDrawsImeNavBarRes = OverlayableSystemBooleanResourceWrapper.create(userContext,
- com.android.internal.R.bool.config_imeDrawsImeNavBar, mHandler, resource -> {
- synchronized (ImfLock.class) {
- if (resource == mImeDrawsImeNavBarRes) {
- sendOnNavButtonFlagsChangedLocked();
- }
- }
- });
- }
- }
-
@NonNull
private static PackageManager getPackageManagerForUser(@NonNull Context context,
@UserIdInt int userId) {
@@ -1254,8 +1272,6 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
// Hereafter we start initializing things for "newUserId".
- maybeInitImeNavbarConfigLocked(newUserId);
-
final var newUserData = getUserData(newUserId);
// TODO(b/342027196): Double check if we need to always reset upon user switching.
@@ -1308,10 +1324,42 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
}
}
+ private void waitForUserInitialization() {
+ final int[] userIds = mUserManagerInternal.getUserIds();
+ final long deadlineNanos = SystemClock.elapsedRealtimeNanos()
+ + TimeUnit.MILLISECONDS.toNanos(SYSTEM_READY_USER_INIT_TIMEOUT);
+ boolean interrupted = false;
+ try {
+ for (int userId : userIds) {
+ final var latch = getUserData(userId).mBackgroundLoadLatch;
+ boolean awaitResult;
+ while (true) {
+ try {
+ final long remainingNanos =
+ Math.max(deadlineNanos - SystemClock.elapsedRealtimeNanos(), 0);
+ awaitResult = latch.await(remainingNanos, TimeUnit.NANOSECONDS);
+ break;
+ } catch (InterruptedException ignored) {
+ interrupted = true;
+ }
+ }
+ if (!awaitResult) {
+ Slog.w(TAG, "Timed out for user#" + userId + " to be initialized");
+ }
+ }
+ } finally {
+ if (interrupted) {
+ Thread.currentThread().interrupt();
+ }
+ }
+ }
+
/**
* TODO(b/32343335): The entire systemRunning() method needs to be revisited.
*/
public void systemRunning() {
+ waitForUserInitialization();
+
synchronized (ImfLock.class) {
if (DEBUG) {
Slog.d(TAG, "--- systemReady");
@@ -1334,23 +1382,6 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
});
}
- // TODO(b/32343335): The entire systemRunning() method needs to be revisited.
- mImeDrawsImeNavBarResLazyInitFuture = SystemServerInitThreadPool.submit(() -> {
- // Note that the synchronization block below guarantees that the task
- // can never be completed before the returned Future<?> object is assigned to
- // the "mImeDrawsImeNavBarResLazyInitFuture" field.
- synchronized (ImfLock.class) {
- mImeDrawsImeNavBarResLazyInitFuture = null;
- if (currentUserId != mCurrentUserId) {
- // This means that the current user is already switched to other user
- // before the background task is executed. In this scenario the relevant
- // field should already be initialized.
- return;
- }
- maybeInitImeNavbarConfigLocked(currentUserId);
- }
- }, "Lazily initialize IMMS#mImeDrawsImeNavBarRes");
-
mMyPackageMonitor.register(mContext, UserHandle.ALL, mIoHandler);
SecureSettingsChangeCallback.register(mHandler, mContext.getContentResolver(),
new String[] {
@@ -1375,20 +1406,15 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
final String defaultImiId = SecureSettingsWrapper.getString(
Settings.Secure.DEFAULT_INPUT_METHOD, null, currentUserId);
final boolean imeSelectedOnBoot = !TextUtils.isEmpty(defaultImiId);
- final InputMethodSettings newSettings = queryInputMethodServicesInternal(mContext,
- currentUserId, AdditionalSubtypeMapRepository.get(currentUserId),
- DirectBootAwareness.AUTO);
- InputMethodSettingsRepository.put(currentUserId, newSettings);
+ final var settings = InputMethodSettingsRepository.get(currentUserId);
postInputMethodSettingUpdatedLocked(
!imeSelectedOnBoot /* resetDefaultEnabledIme */, currentUserId);
updateFromSettingsLocked(true, currentUserId);
InputMethodUtils.setNonSelectedSystemImesDisabledUntilUsed(
getPackageManagerForUser(mContext, currentUserId),
- newSettings.getEnabledInputMethodList());
+ settings.getEnabledInputMethodList());
- final var unused = SystemServerInitThreadPool.submit(
- AdditionalSubtypeMapRepository::startWriterThread,
- "Start AdditionalSubtypeMapRepository's writer thread");
+ AdditionalSubtypeMapRepository.startWriterThread();
if (mConcurrentMultiUserModeEnabled) {
for (int userId : mUserManagerInternal.getUserIds()) {
@@ -1406,9 +1432,9 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
(windowToken, imeVisible) -> {
if (Flags.refactorInsetsController()) {
if (imeVisible) {
- showSoftInputInternal(windowToken);
+ showCurrentInputInternal(windowToken);
} else {
- hideSoftInputInternal(windowToken);
+ hideCurrentInputInternal(windowToken);
}
}
});
@@ -1418,15 +1444,15 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
* Returns true iff the caller is identified to be the current input method with the token.
*
* @param token the window token given to the input method when it was started
- * @param userId userId of the calling IME process
+ * @param userData {@link UserData} of the calling IME process
* @return true if and only if non-null valid token is specified
*/
@GuardedBy("ImfLock.class")
- private boolean calledWithValidTokenLocked(@NonNull IBinder token, @UserIdInt int userId) {
+ private boolean calledWithValidTokenLocked(@NonNull IBinder token, @NonNull UserData userData) {
if (token == null) {
throw new InvalidParameterException("token must not be null.");
}
- final var bindingController = getInputMethodBindingController(userId);
+ final var bindingController = userData.mBindingController;
if (token != bindingController.getCurToken()) {
Slog.e(TAG, "Ignoring " + Debug.getCaller() + " due to an invalid token."
+ " uid:" + Binder.getCallingUid() + " token:" + token);
@@ -1457,17 +1483,15 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
mContext.enforceCallingOrSelfPermission(
Manifest.permission.INTERACT_ACROSS_USERS_FULL, null);
}
+ if (!mUserManagerInternal.exists(userId)) {
+ return InputMethodInfoSafeList.empty();
+ }
synchronized (ImfLock.class) {
- final int[] resolvedUserIds = InputMethodUtils.resolveUserId(userId,
- mCurrentUserId, null);
- if (resolvedUserIds.length != 1) {
- return InputMethodInfoSafeList.empty();
- }
final int callingUid = Binder.getCallingUid();
final long ident = Binder.clearCallingIdentity();
try {
return InputMethodInfoSafeList.create(getInputMethodListLocked(
- resolvedUserIds[0], directBootAwareness, callingUid));
+ userId, directBootAwareness, callingUid));
} finally {
Binder.restoreCallingIdentity(ident);
}
@@ -1482,17 +1506,15 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
mContext.enforceCallingOrSelfPermission(
Manifest.permission.INTERACT_ACROSS_USERS_FULL, null);
}
+ if (!mUserManagerInternal.exists(userId)) {
+ return InputMethodInfoSafeList.empty();
+ }
synchronized (ImfLock.class) {
- final int[] resolvedUserIds = InputMethodUtils.resolveUserId(userId,
- mCurrentUserId, null);
- if (resolvedUserIds.length != 1) {
- return InputMethodInfoSafeList.empty();
- }
final int callingUid = Binder.getCallingUid();
final long ident = Binder.clearCallingIdentity();
try {
return InputMethodInfoSafeList.create(
- getEnabledInputMethodListLocked(resolvedUserIds[0], callingUid));
+ getEnabledInputMethodListLocked(userId, callingUid));
} finally {
Binder.restoreCallingIdentity(ident);
}
@@ -1508,17 +1530,14 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
mContext.enforceCallingOrSelfPermission(
Manifest.permission.INTERACT_ACROSS_USERS_FULL, null);
}
+ if (!mUserManagerInternal.exists(userId)) {
+ return Collections.emptyList();
+ }
synchronized (ImfLock.class) {
- final int[] resolvedUserIds = InputMethodUtils.resolveUserId(userId,
- mCurrentUserId, null);
- if (resolvedUserIds.length != 1) {
- return Collections.emptyList();
- }
final int callingUid = Binder.getCallingUid();
final long ident = Binder.clearCallingIdentity();
try {
- return getInputMethodListLocked(
- resolvedUserIds[0], directBootAwareness, callingUid);
+ return getInputMethodListLocked(userId, directBootAwareness, callingUid);
} finally {
Binder.restoreCallingIdentity(ident);
}
@@ -1533,16 +1552,14 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
mContext.enforceCallingOrSelfPermission(
Manifest.permission.INTERACT_ACROSS_USERS_FULL, null);
}
+ if (!mUserManagerInternal.exists(userId)) {
+ return Collections.emptyList();
+ }
synchronized (ImfLock.class) {
- final int[] resolvedUserIds = InputMethodUtils.resolveUserId(userId,
- mCurrentUserId, null);
- if (resolvedUserIds.length != 1) {
- return Collections.emptyList();
- }
final int callingUid = Binder.getCallingUid();
final long ident = Binder.clearCallingIdentity();
try {
- return getEnabledInputMethodListLocked(resolvedUserIds[0], callingUid);
+ return getEnabledInputMethodListLocked(userId, callingUid);
} finally {
Binder.restoreCallingIdentity(ident);
}
@@ -1582,8 +1599,8 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
// If user is a profile, use preference of it`s parent profile.
final int profileParentUserId = mUserManagerInternal.getProfileParentId(userId);
if (Settings.Secure.getIntForUser(context.getContentResolver(),
- STYLUS_HANDWRITING_ENABLED, STYLUS_HANDWRITING_DEFAULT_VALUE,
- profileParentUserId) == 0) {
+ Settings.Secure.STYLUS_HANDWRITING_ENABLED,
+ Settings.Secure.STYLUS_HANDWRITING_DEFAULT_VALUE, profileParentUserId) == 0) {
return false;
}
return true;
@@ -1705,7 +1722,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
clearClientSessionLocked(client);
clearClientSessionForAccessibilityLocked(client);
// TODO(b/324907325): Remove the suppress warnings once b/324907325 is fixed.
- @SuppressWarnings("GuardedBy") Consumer<UserDataRepository.UserData> clientRemovedForUser =
+ @SuppressWarnings("GuardedBy") Consumer<UserData> clientRemovedForUser =
userData -> onClientRemovedInternalLocked(client, userData);
mUserDataRepository.forAllUserData(clientRemovedForUser);
}
@@ -1715,15 +1732,14 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
*/
// TODO(b/325515685): Move this method to InputMethodBindingController
@GuardedBy("ImfLock.class")
- private void onClientRemovedInternalLocked(ClientState client,
- @NonNull UserDataRepository.UserData userData) {
+ private void onClientRemovedInternalLocked(ClientState client, @NonNull UserData userData) {
final int userId = userData.mUserId;
if (userData.mCurClient == client) {
hideCurrentInputLocked(userData.mImeBindingState.mFocusedWindow, 0 /* flags */,
SoftInputShowHideReason.HIDE_REMOVE_CLIENT, userId);
if (userData.mBoundToMethod) {
userData.mBoundToMethod = false;
- final var userBindingController = getInputMethodBindingController(userId);
+ final var userBindingController = userData.mBindingController;
IInputMethodInvoker curMethod = userBindingController.getCurMethod();
if (curMethod != null) {
// When we unbind input, we are unbinding the client, so we always
@@ -1755,7 +1771,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
Slog.v(TAG, "unbindCurrentInputLocked: client="
+ userData.mCurClient.mClient.asBinder());
}
- final var bindingController = getInputMethodBindingController(userId);
+ final var bindingController = userData.mBindingController;
if (userData.mBoundToMethod) {
userData.mBoundToMethod = false;
IInputMethodInvoker curMethod = bindingController.getCurMethod();
@@ -1779,7 +1795,11 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
ImeTracker.PHASE_SERVER_WAIT_IME);
userData.mCurStatsToken = null;
// TODO: Make mMenuController multi-user aware
- mMenuController.hideInputMethodMenuLocked();
+ if (Flags.imeSwitcherRevamp()) {
+ mMenuControllerNew.hide(bindingController.getCurTokenDisplayId(), userId);
+ } else {
+ mMenuController.hideInputMethodMenuLocked();
+ }
}
}
@@ -1841,8 +1861,8 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
@NonNull
InputBindResult attachNewInputLocked(@StartInputReason int startInputReason, boolean initial,
@UserIdInt int userId) {
- final var bindingController = getInputMethodBindingController(userId);
final var userData = getUserData(userId);
+ final var bindingController = userData.mBindingController;
if (!userData.mBoundToMethod) {
bindingController.getCurMethod().bindInput(userData.mCurClient.mBinding);
userData.mBoundToMethod = true;
@@ -1872,7 +1892,8 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
userData.mCurClient.mUid, true /* direct */);
}
- @InputMethodNavButtonFlags final int navButtonFlags = getInputMethodNavButtonFlagsLocked();
+ @InputMethodNavButtonFlags final int navButtonFlags =
+ getInputMethodNavButtonFlagsLocked(userData);
final SessionState session = userData.mCurClient.mCurSession;
setEnabledSessionLocked(session, userData);
session.mMethod.startInput(startInputToken, userData.mCurInputConnection,
@@ -1880,7 +1901,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
if (Flags.refactorInsetsController()) {
if (isShowRequestedForCurrentWindow(userId) && userData.mImeBindingState != null
&& userData.mImeBindingState.mFocusedWindow != null) {
- showSoftInputInternal(userData.mImeBindingState.mFocusedWindow);
+ showCurrentInputInternal(userData.mImeBindingState.mFocusedWindow);
}
} else {
if (isShowRequestedForCurrentWindow(userId)) {
@@ -2264,15 +2285,16 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
@GuardedBy("ImfLock.class")
void initializeImeLocked(@NonNull IInputMethodInvoker inputMethod, @NonNull IBinder token,
- @UserIdInt int userId) {
+ @NonNull InputMethodBindingController bindingController) {
if (DEBUG) {
Slog.v(TAG, "Sending attach of token: " + token + " for display: "
- + getInputMethodBindingController(userId).getCurTokenDisplayId());
+ + bindingController.getCurTokenDisplayId());
}
+ final int userId = bindingController.getUserId();
+ final var userData = getUserData(userId);
inputMethod.initializeInternal(token,
- new InputMethodPrivilegedOperationsImpl(this, token, userId),
- // TODO(b/345519864): Make getInputMethodNavButtonFlagsLocked() multi-user aware
- getInputMethodNavButtonFlagsLocked());
+ new InputMethodPrivilegedOperationsImpl(this, token, userData),
+ getInputMethodNavButtonFlagsLocked(userData));
}
@AnyThread
@@ -2312,8 +2334,8 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
channel.dispose();
return;
}
- final var bindingController = getInputMethodBindingController(userId);
final var userData = getUserData(userId);
+ final var bindingController = userData.mBindingController;
IInputMethodInvoker curMethod = bindingController.getCurMethod();
if (curMethod != null && method != null
&& curMethod.asBinder() == method.asBinder()) {
@@ -2521,13 +2543,15 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
hideStatusBarIconLocked();
getUserData(userId).mInFullscreenMode = false;
mWindowManagerInternal.setDismissImeOnBackKeyPressed(false);
+ scheduleResetStylusHandwriting();
}
@BinderThread
private void updateStatusIcon(@NonNull IBinder token, String packageName,
- @DrawableRes int iconId, @UserIdInt int userId) {
+ @DrawableRes int iconId, @NonNull UserData userData) {
+ final int userId = userData.mUserId;
synchronized (ImfLock.class) {
- if (!calledWithValidTokenLocked(token, userId)) {
+ if (!calledWithValidTokenLocked(token, userData)) {
return;
}
final long ident = Binder.clearCallingIdentity();
@@ -2570,23 +2594,16 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
@GuardedBy("ImfLock.class")
@InputMethodNavButtonFlags
- private int getInputMethodNavButtonFlagsLocked() {
- // TODO(b/345519864): Make mImeDrawsImeNavBarRes multi-user aware.
- final int userId = mCurrentUserId;
- final var bindingController = getInputMethodBindingController(userId);
- if (mImeDrawsImeNavBarResLazyInitFuture != null) {
- // TODO(b/225366708): Avoid Future.get(), which is internally used here.
- ConcurrentUtils.waitForFutureNoInterrupt(mImeDrawsImeNavBarResLazyInitFuture,
- "Waiting for the lazy init of mImeDrawsImeNavBarRes");
- }
+ private int getInputMethodNavButtonFlagsLocked(@NonNull UserData userData) {
+ final int userId = userData.mUserId;
+ final var bindingController = userData.mBindingController;
// Whether the current display has a navigation bar. When this is false (e.g. emulator),
// the IME should not draw the IME navigation bar.
final int tokenDisplayId = bindingController.getCurTokenDisplayId();
final boolean hasNavigationBar = mWindowManagerInternal
.hasNavigationBar(tokenDisplayId != INVALID_DISPLAY
? tokenDisplayId : DEFAULT_DISPLAY);
- final boolean canImeDrawsImeNavBar =
- mImeDrawsImeNavBarRes != null && mImeDrawsImeNavBarRes.get() && hasNavigationBar;
+ final boolean canImeDrawsImeNavBar = userData.mImeDrawsNavBar.get() && hasNavigationBar;
final boolean shouldShowImeSwitcherWhenImeIsShown = shouldShowImeSwitcherLocked(
InputMethodService.IME_ACTIVE | InputMethodService.IME_VISIBLE, userId);
return (canImeDrawsImeNavBar ? InputMethodNavButtonFlags.IME_DRAWS_IME_NAV_BAR : 0)
@@ -2599,7 +2616,12 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
if (!mShowOngoingImeSwitcherForPhones) return false;
// When the IME switcher dialog is shown, the IME switcher button should be hidden.
// TODO(b/305849394): Make mMenuController multi-user aware.
- if (mMenuController.getSwitchingDialogLocked() != null) return false;
+ final boolean switcherMenuShowing = Flags.imeSwitcherRevamp()
+ ? mMenuControllerNew.isShowing()
+ : mMenuController.getSwitchingDialogLocked() != null;
+ if (switcherMenuShowing) {
+ return false;
+ }
// When we are switching IMEs, the IME switcher button should be hidden.
final var bindingController = getInputMethodBindingController(userId);
if (!Objects.equals(bindingController.getCurId(),
@@ -2614,7 +2636,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
|| (visibility & InputMethodService.IME_INVISIBLE) != 0) {
return false;
}
- if (mWindowManagerInternal.isHardKeyboardAvailable()) {
+ if (mWindowManagerInternal.isHardKeyboardAvailable() && !Flags.imeSwitcherRevamp()) {
// When physical keyboard is attached, we show the ime switcher (or notification if
// NavBar is not available) because SHOW_IME_WITH_HARD_KEYBOARD settings currently
// exists in the IME switcher dialog. Might be OK to remove this condition once
@@ -2625,6 +2647,27 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
}
final InputMethodSettings settings = InputMethodSettingsRepository.get(userId);
+ if (Flags.imeSwitcherRevamp()) {
+ // The IME switcher button should be shown when the current IME specified a
+ // language settings activity.
+ final var curImi = settings.getMethodMap().get(settings.getSelectedInputMethod());
+ if (curImi != null && curImi.createImeLanguageSettingsActivityIntent() != null) {
+ return true;
+ }
+ }
+
+ return hasMultipleSubtypesForSwitcher(false /* nonAuxOnly */, settings);
+ }
+
+ /**
+ * Checks whether there at least two subtypes that should be shown for the IME switcher menu,
+ * across all enabled IMEs for the given user.
+ *
+ * @param nonAuxOnly whether to check only for non auxiliary subtypes.
+ * @param settings the input method settings under the given user ID.
+ */
+ private static boolean hasMultipleSubtypesForSwitcher(boolean nonAuxOnly,
+ @NonNull InputMethodSettings settings) {
List<InputMethodInfo> imes = settings.getEnabledInputMethodListWithFilter(
InputMethodInfo::shouldShowInInputMethodPicker);
final int numImes = imes.size();
@@ -2654,7 +2697,9 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
}
}
}
- if (nonAuxCount > 1 || auxCount > 1) {
+ if (Flags.imeSwitcherRevamp() && nonAuxOnly) {
+ return nonAuxCount > 1;
+ } else if (nonAuxCount > 1 || auxCount > 1) {
return true;
} else if (nonAuxCount == 1 && auxCount == 1) {
if (nonAuxSubtype != null && auxSubtype != null
@@ -2672,14 +2717,15 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
@BinderThread
@SuppressWarnings("deprecation")
private void setImeWindowStatus(@NonNull IBinder token, int vis, int backDisposition,
- @UserIdInt int userId) {
+ @NonNull UserData userData) {
final int topFocusedDisplayId = mWindowManagerInternal.getTopFocusedDisplayId();
+ final int userId = userData.mUserId;
synchronized (ImfLock.class) {
- if (!calledWithValidTokenLocked(token, userId)) {
+ if (!calledWithValidTokenLocked(token, userData)) {
return;
}
- final var bindingController = getInputMethodBindingController(userId);
+ final var bindingController = userData.mBindingController;
// Skip update IME status when current token display is not same as focused display.
// Note that we still need to update IME status when focusing external display
// that does not support system decoration and fallback to show IME on default
@@ -2711,9 +2757,9 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
@BinderThread
private void reportStartInput(@NonNull IBinder token, IBinder startInputToken,
- @UserIdInt int userId) {
+ @NonNull UserData userData) {
synchronized (ImfLock.class) {
- if (!calledWithValidTokenLocked(token, userId)) {
+ if (!calledWithValidTokenLocked(token, userData)) {
return;
}
final IBinder targetWindow = mImeTargetWindowMap.get(startInputToken);
@@ -2747,8 +2793,8 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
@GuardedBy("ImfLock.class")
private void updateSystemUiLocked(int vis, int backDisposition, @UserIdInt int userId) {
- final var bindingController = getInputMethodBindingController(userId);
final var userData = getUserData(userId);
+ final var bindingController = userData.mBindingController;
final var curToken = bindingController.getCurToken();
if (curToken == null) {
return;
@@ -2779,7 +2825,10 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
}
final var curId = bindingController.getCurId();
// TODO(b/305849394): Make mMenuController multi-user aware.
- if (mMenuController.getSwitchingDialogLocked() != null
+ final boolean switcherMenuShowing = Flags.imeSwitcherRevamp()
+ ? mMenuControllerNew.isShowing()
+ : mMenuController.getSwitchingDialogLocked() != null;
+ if (switcherMenuShowing
|| !Objects.equals(curId, bindingController.getSelectedMethodId())) {
// When the IME switcher dialog is shown, or we are switching IMEs,
// the back button should be in the default state (as if the IME is not shown).
@@ -2798,7 +2847,9 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
@GuardedBy("ImfLock.class")
void updateFromSettingsLocked(boolean enabledMayChange, @UserIdInt int userId) {
updateInputMethodsFromSettingsLocked(enabledMayChange, userId);
- mMenuController.updateKeyboardFromSettingsLocked();
+ if (!Flags.imeSwitcherRevamp()) {
+ mMenuController.updateKeyboardFromSettingsLocked();
+ }
}
/**
@@ -2846,11 +2897,11 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
settings.putSelectedInputMethod(id);
}
}
- final var bindingController = getInputMethodBindingController(userId);
+ final var userData = getUserData(userId);
+ final var bindingController = userData.mBindingController;
bindingController.setSelectedMethodId(id);
// Also re-initialize controllers.
- final var userData = getUserData(userId);
userData.mSwitchingController.resetCircularListLocked(mContext, settings);
userData.mHardwareKeyboardShortcutController.update(settings);
}
@@ -2887,7 +2938,8 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
}
}
- final var bindingController = getInputMethodBindingController(userId);
+ final var userData = getUserData(userId);
+ final var bindingController = userData.mBindingController;
if (bindingController.getDeviceIdToShowIme() == DEVICE_ID_DEFAULT) {
String ime = SecureSettingsWrapper.getString(
Settings.Secure.DEFAULT_INPUT_METHOD, null, userId);
@@ -2927,10 +2979,9 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
resetCurrentMethodAndClientLocked(UnbindReason.NO_IME, userId);
}
- final var userData = getUserData(userId);
userData.mSwitchingController.resetCircularListLocked(mContext, settings);
userData.mHardwareKeyboardShortcutController.update(settings);
- sendOnNavButtonFlagsChangedLocked();
+ sendOnNavButtonFlagsChangedLocked(userData);
}
@GuardedBy("ImfLock.class")
@@ -3082,8 +3133,8 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
}
}
- boolean showSoftInputInternal(IBinder windowToken) {
- Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "IMMS.showSoftInputInternal");
+ boolean showCurrentInputInternal(IBinder windowToken) {
+ Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "IMMS.showCurrentInputInternal");
ImeTracing.getInstance().triggerManagerServiceDump(
"InputMethodManagerService#showSoftInput", mDumper);
synchronized (ImfLock.class) {
@@ -3102,8 +3153,8 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
}
}
- boolean hideSoftInputInternal(IBinder windowToken) {
- Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "IMMS.hideSoftInputInternal");
+ boolean hideCurrentInputInternal(IBinder windowToken) {
+ Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "IMMS.hideCurrentInputInternal");
ImeTracing.getInstance().triggerManagerServiceDump(
"InputMethodManagerService#hideSoftInput", mDumper);
synchronized (ImfLock.class) {
@@ -3409,8 +3460,8 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
mVisibilityStateComputer.requestImeVisibility(windowToken, true);
// Ensure binding the connection when IME is going to show.
- final var bindingController = getInputMethodBindingController(userId);
final var userData = getUserData(userId);
+ final var bindingController = userData.mBindingController;
bindingController.setCurrentMethodVisible();
final IInputMethodInvoker curMethod = bindingController.getCurMethod();
ImeTracker.forLogging().onCancelled(userData.mCurStatsToken,
@@ -3543,7 +3594,8 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
boolean hideCurrentInputLocked(IBinder windowToken, @NonNull ImeTracker.Token statsToken,
@InputMethodManager.HideFlags int flags, @Nullable ResultReceiver resultReceiver,
@SoftInputShowHideReason int reason, @UserIdInt int userId) {
- final var bindingController = getInputMethodBindingController(userId);
+ final var userData = getUserData(userId);
+ final var bindingController = userData.mBindingController;
if (!mVisibilityStateComputer.canHideIme(statsToken, flags)) {
return false;
}
@@ -3556,7 +3608,6 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
// since Android Eclair. That's why we need to accept IMM#hideSoftInput() even when only
// IMMS#InputShown indicates that the software keyboard is shown.
// TODO(b/246309664): Clean up IMMS#mImeWindowVis
- final var userData = getUserData(userId);
IInputMethodInvoker curMethod = bindingController.getCurMethod();
final boolean shouldHideSoftInput = curMethod != null
&& (isInputShownLocked()
@@ -3636,6 +3687,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
Slog.w(TAG, "User #" + userId + " is not running.");
return InputBindResult.INVALID_USER;
}
+ final var userData = getUserData(userId);
try {
Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER,
"IMMS.startInputOrWindowGainedFocus");
@@ -3643,7 +3695,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
"InputMethodManagerService#startInputOrWindowGainedFocus", mDumper);
final InputBindResult result;
synchronized (ImfLock.class) {
- final var bindingController = getInputMethodBindingController(userId);
+ final var bindingController = userData.mBindingController;
// If the system is not yet ready, we shouldn't be running third party code.
if (!mSystemReady) {
return new InputBindResult(
@@ -3708,7 +3760,6 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
final boolean shouldClearFlag =
mImePlatformCompatUtils.shouldClearShowForcedFlag(cs.mUid);
final boolean showForced = mVisibilityStateComputer.mShowForced;
- final var userData = getUserData(userId);
if (userData.mImeBindingState.mFocusedWindow != windowToken
&& showForced && shouldClearFlag) {
mVisibilityStateComputer.mShowForced = false;
@@ -3964,7 +4015,115 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
@IInputMethodManagerImpl.PermissionVerified(Manifest.permission.TEST_INPUT_METHOD)
public boolean isInputMethodPickerShownForTest() {
synchronized (ImfLock.class) {
- return mMenuController.isisInputMethodPickerShownForTestLocked();
+ return Flags.imeSwitcherRevamp()
+ ? mMenuControllerNew.isShowing()
+ : mMenuController.isisInputMethodPickerShownForTestLocked();
+ }
+ }
+
+ /**
+ * Gets the list of Input Method Switcher Menu items and the index of the selected item.
+ *
+ * @param items the list of input method and subtype items.
+ * @param selectedImeId the ID of the selected input method.
+ * @param selectedSubtypeId the ID of the selected input method subtype,
+ * or {@link #NOT_A_SUBTYPE_ID} if no subtype is selected.
+ * @param userId the ID of the user for which to get the menu items.
+ * @return the list of menu items, and the index of the selected item,
+ * or {@code -1} if no item is selected.
+ */
+ @GuardedBy("ImfLock.class")
+ @NonNull
+ private Pair<List<MenuItem>, Integer> getInputMethodPickerItems(
+ @NonNull List<ImeSubtypeListItem> items, @Nullable String selectedImeId,
+ int selectedSubtypeId, @UserIdInt int userId) {
+ final var bindingController = getInputMethodBindingController(userId);
+ final var settings = InputMethodSettingsRepository.get(userId);
+
+ if (selectedSubtypeId == NOT_A_SUBTYPE_ID) {
+ // TODO(b/351124299): Check if this fallback logic is still necessary.
+ final var curSubtype = bindingController.getCurrentInputMethodSubtype();
+ if (curSubtype != null) {
+ final var curMethodId = bindingController.getSelectedMethodId();
+ final var curImi = settings.getMethodMap().get(curMethodId);
+ selectedSubtypeId = SubtypeUtils.getSubtypeIdFromHashCode(
+ curImi, curSubtype.hashCode());
+ }
+ }
+
+ // No item is selected by default. When we have a list of explicitly enabled
+ // subtypes, the implicit subtype is no longer listed. If the implicit one
+ // is still selected, no items will be shown as selected.
+ int selectedIndex = -1;
+ String prevImeId = null;
+ final var menuItems = new ArrayList<MenuItem>();
+ for (int i = 0; i < items.size(); i++) {
+ final var item = items.get(i);
+ final var imeId = item.mImi.getId();
+ if (imeId.equals(selectedImeId)) {
+ final int subtypeId = item.mSubtypeId;
+ // Check if this is the selected IME-subtype pair.
+ if ((subtypeId == 0 && selectedSubtypeId == NOT_A_SUBTYPE_ID)
+ || subtypeId == NOT_A_SUBTYPE_ID
+ || subtypeId == selectedSubtypeId) {
+ selectedIndex = i;
+ }
+ }
+ final boolean hasHeader = !imeId.equals(prevImeId);
+ final boolean hasDivider = hasHeader && prevImeId != null;
+ prevImeId = imeId;
+ menuItems.add(new MenuItem(item.mImeName, item.mSubtypeName, item.mImi, item.mSubtypeId,
+ hasHeader, hasDivider));
+ }
+
+ return new Pair<>(menuItems, selectedIndex);
+ }
+
+ @BinderThread
+ private void onImeSwitchButtonClickFromClient(@NonNull IBinder token, int displayId,
+ @NonNull UserData userData) {
+ synchronized (ImfLock.class) {
+ if (!calledWithValidTokenLocked(token, userData)) {
+ return;
+ }
+ onImeSwitchButtonClickLocked(token, displayId, userData);
+ }
+ }
+
+ @IInputMethodManagerImpl.PermissionVerified(Manifest.permission.WRITE_SECURE_SETTINGS)
+ @Override
+ public void onImeSwitchButtonClickFromSystem(int displayId) {
+ synchronized (ImfLock.class) {
+ final int userId = mCurrentUserId;
+ final var userData = getUserData(userId);
+ final var bindingController = userData.mBindingController;
+ final var curToken = bindingController.getCurToken();
+ if (curToken == null) {
+ return;
+ }
+
+ onImeSwitchButtonClickLocked(curToken, displayId, userData);
+ }
+ }
+
+ /**
+ * Handles a click on the IME switch button. Depending on the number of enabled IME subtypes,
+ * this will either switch to the next IME/subtype, or show the input method picker dialog.
+ *
+ * @param token The token identifying the input method that triggered this.
+ * @param displayId The ID of the display where the input method picker dialog should be shown.
+ * @param userData The data of the user for which to switch IMEs or show the picker dialog.
+ */
+ @GuardedBy("ImfLock.class")
+ private void onImeSwitchButtonClickLocked(@NonNull IBinder token, int displayId,
+ @NonNull UserData userData) {
+ final int userId = userData.mUserId;
+ final var settings = InputMethodSettingsRepository.get(userId);
+ if (hasMultipleSubtypesForSwitcher(true /* nonAuxOnly */, settings)) {
+ switchToNextInputMethodLocked(token, false /* onlyCurrentIme */, userData);
+ } else {
+ showInputMethodPickerFromSystem(
+ InputMethodManager.SHOW_IM_PICKER_MODE_INCLUDE_AUXILIARY_SUBTYPES, displayId);
}
}
@@ -3975,10 +4134,11 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
}
@BinderThread
- private void setInputMethod(@NonNull IBinder token, String id, @UserIdInt int userId) {
+ private void setInputMethod(@NonNull IBinder token, String id, @NonNull UserData userData) {
final int callingUid = Binder.getCallingUid();
+ final int userId = userData.mUserId;
synchronized (ImfLock.class) {
- if (!calledWithValidTokenLocked(token, userId)) {
+ if (!calledWithValidTokenLocked(token, userData)) {
return;
}
final InputMethodSettings settings = InputMethodSettingsRepository.get(userId);
@@ -3993,10 +4153,11 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
@BinderThread
private void setInputMethodAndSubtype(@NonNull IBinder token, String id,
- InputMethodSubtype subtype, @UserIdInt int userId) {
+ InputMethodSubtype subtype, @NonNull UserData userData) {
final int callingUid = Binder.getCallingUid();
+ final int userId = userData.mUserId;
synchronized (ImfLock.class) {
- if (!calledWithValidTokenLocked(token, userId)) {
+ if (!calledWithValidTokenLocked(token, userData)) {
return;
}
final InputMethodSettings settings = InputMethodSettingsRepository.get(userId);
@@ -4009,18 +4170,20 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
setInputMethodWithSubtypeIdLocked(token, id,
SubtypeUtils.getSubtypeIdFromHashCode(imi, subtype.hashCode()), userId);
} else {
- setInputMethod(token, id, userId);
+ setInputMethod(token, id, userData);
}
}
}
@BinderThread
- private boolean switchToPreviousInputMethod(@NonNull IBinder token, @UserIdInt int userId) {
+ private boolean switchToPreviousInputMethod(@NonNull IBinder token,
+ @NonNull UserData userData) {
+ final int userId = userData.mUserId;
synchronized (ImfLock.class) {
- if (!calledWithValidTokenLocked(token, userId)) {
+ if (!calledWithValidTokenLocked(token, userData)) {
return false;
}
- final var bindingController = getInputMethodBindingController(userId);
+ final var bindingController = userData.mBindingController;
final InputMethodSettings settings = InputMethodSettingsRepository.get(userId);
final Pair<String, String> lastIme = settings.getLastInputMethodAndSubtype();
final InputMethodInfo lastImi;
@@ -4097,43 +4260,45 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
@BinderThread
private boolean switchToNextInputMethod(@NonNull IBinder token, boolean onlyCurrentIme,
- @UserIdInt int userId) {
+ @NonNull UserData userData) {
synchronized (ImfLock.class) {
- if (!calledWithValidTokenLocked(token, userId)) {
+ if (!calledWithValidTokenLocked(token, userData)) {
return false;
}
- return switchToNextInputMethodLocked(token, onlyCurrentIme, userId);
+ return switchToNextInputMethodLocked(token, onlyCurrentIme, userData);
}
}
@GuardedBy("ImfLock.class")
private boolean switchToNextInputMethodLocked(@Nullable IBinder token, boolean onlyCurrentIme,
- @UserIdInt int userId) {
- final var bindingController = getInputMethodBindingController(userId);
+ @NonNull UserData userData) {
+ final var bindingController = userData.mBindingController;
final var currentImi = bindingController.getSelectedMethod();
- final ImeSubtypeListItem nextSubtype = getUserData(userId).mSwitchingController
+ final ImeSubtypeListItem nextSubtype = userData.mSwitchingController
.getNextInputMethodLocked(onlyCurrentIme, currentImi,
- bindingController.getCurrentSubtype());
+ bindingController.getCurrentSubtype(),
+ MODE_AUTO, true /* forward */);
if (nextSubtype == null) {
return false;
}
setInputMethodWithSubtypeIdLocked(token, nextSubtype.mImi.getId(),
- nextSubtype.mSubtypeId, userId);
+ nextSubtype.mSubtypeId, userData.mUserId);
return true;
}
@BinderThread
private boolean shouldOfferSwitchingToNextInputMethod(@NonNull IBinder token,
- @UserIdInt int userId) {
+ @NonNull UserData userData) {
synchronized (ImfLock.class) {
- if (!calledWithValidTokenLocked(token, userId)) {
+ if (!calledWithValidTokenLocked(token, userData)) {
return false;
}
- final var bindingController = getInputMethodBindingController(userId);
+ final var bindingController = userData.mBindingController;
final var currentImi = bindingController.getSelectedMethod();
- final ImeSubtypeListItem nextSubtype = getUserData(userId).mSwitchingController
+ final ImeSubtypeListItem nextSubtype = userData.mSwitchingController
.getNextInputMethodLocked(false /* onlyCurrentIme */, currentImi,
- bindingController.getCurrentSubtype());
+ bindingController.getCurrentSubtype(),
+ MODE_AUTO, true /* forward */);
return nextSubtype != null;
}
}
@@ -4531,8 +4696,8 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
private void dumpDebug(ProtoOutputStream proto, long fieldId) {
synchronized (ImfLock.class) {
final int userId = mCurrentUserId;
- final var bindingController = getInputMethodBindingController(userId);
final var userData = getUserData(userId);
+ final var bindingController = userData.mBindingController;
final long token = proto.start(fieldId);
proto.write(CUR_METHOD_ID, bindingController.getSelectedMethodId());
proto.write(CUR_SEQ, bindingController.getSequenceNumber());
@@ -4556,18 +4721,22 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
proto.write(IS_INTERACTIVE, mIsInteractive);
proto.write(BACK_DISPOSITION, bindingController.getBackDisposition());
proto.write(IME_WINDOW_VISIBILITY, bindingController.getImeWindowVis());
- proto.write(SHOW_IME_WITH_HARD_KEYBOARD, mMenuController.getShowImeWithHardKeyboard());
+ if (!Flags.imeSwitcherRevamp()) {
+ proto.write(SHOW_IME_WITH_HARD_KEYBOARD,
+ mMenuController.getShowImeWithHardKeyboard());
+ }
+ proto.write(CONCURRENT_MULTI_USER_MODE_ENABLED, mConcurrentMultiUserModeEnabled);
proto.end(token);
}
}
@BinderThread
- private void notifyUserAction(@NonNull IBinder token, @UserIdInt int userId) {
+ private void notifyUserAction(@NonNull IBinder token, @NonNull UserData userData) {
if (DEBUG) {
Slog.d(TAG, "Got the notification of a user action.");
}
synchronized (ImfLock.class) {
- final var bindingController = getInputMethodBindingController(userId);
+ final var bindingController = userData.mBindingController;
if (bindingController.getCurToken() != token) {
if (DEBUG) {
Slog.d(TAG, "Ignoring the user action notification from IMEs that are no longer"
@@ -4577,7 +4746,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
}
final InputMethodInfo imi = bindingController.getSelectedMethod();
if (imi != null) {
- getUserData(userId).mSwitchingController.onUserActionLocked(imi,
+ userData.mSwitchingController.onUserActionLocked(imi,
bindingController.getCurrentSubtype());
}
}
@@ -4585,11 +4754,12 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
@BinderThread
private void applyImeVisibility(IBinder token, IBinder windowToken, boolean setVisible,
- @NonNull ImeTracker.Token statsToken, @UserIdInt int userId) {
+ @NonNull ImeTracker.Token statsToken, @NonNull UserData userData) {
try {
Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "IMMS.applyImeVisibility");
+ final int userId = userData.mUserId;
synchronized (ImfLock.class) {
- if (!calledWithValidTokenLocked(token, userId)) {
+ if (!calledWithValidTokenLocked(token, userData)) {
ImeTracker.forLogging().onFailed(statsToken,
ImeTracker.PHASE_SERVER_CURRENT_ACTIVE_IME);
return;
@@ -4599,8 +4769,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
final IBinder requestToken = mVisibilityStateComputer.getWindowTokenFrom(
windowToken, userId);
mVisibilityApplier.applyImeVisibility(requestToken, statsToken,
- setVisible ? ImeVisibilityStateComputer.STATE_SHOW_IME
- : ImeVisibilityStateComputer.STATE_HIDE_IME,
+ setVisible ? STATE_SHOW_IME : STATE_HIDE_IME,
SoftInputShowHideReason.NOT_SET /* ignore reason */, userId);
}
} finally {
@@ -4664,8 +4833,8 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
@UserIdInt int userId) {
final IBinder requestToken = mVisibilityStateComputer.getWindowTokenFrom(requestImeToken,
userId);
- final var bindingController = getInputMethodBindingController(userId);
final var userData = getUserData(userId);
+ final var bindingController = userData.mBindingController;
final WindowManagerInternal.ImeTargetInfo info =
mWindowManagerInternal.onToggleImeRequested(
show, userData.mImeBindingState.mFocusedWindow, requestToken,
@@ -4685,16 +4854,16 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
@BinderThread
private void hideMySoftInput(@NonNull IBinder token, @NonNull ImeTracker.Token statsToken,
@InputMethodManager.HideFlags int flags, @SoftInputShowHideReason int reason,
- @UserIdInt int userId) {
+ @NonNull UserData userData) {
try {
Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "IMMS.hideMySoftInput");
+ final int userId = userData.mUserId;
synchronized (ImfLock.class) {
- if (!calledWithValidTokenLocked(token, userId)) {
+ if (!calledWithValidTokenLocked(token, userData)) {
ImeTracker.forLogging().onFailed(statsToken,
ImeTracker.PHASE_SERVER_CURRENT_ACTIVE_IME);
return;
}
- final var userData = getUserData(userId);
ImeTracker.forLogging().onProgress(statsToken,
ImeTracker.PHASE_SERVER_CURRENT_ACTIVE_IME);
final long ident = Binder.clearCallingIdentity();
@@ -4724,16 +4893,16 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
@BinderThread
private void showMySoftInput(@NonNull IBinder token, @NonNull ImeTracker.Token statsToken,
@InputMethodManager.ShowFlags int flags, @SoftInputShowHideReason int reason,
- @UserIdInt int userId) {
+ @NonNull UserData userData) {
try {
Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "IMMS.showMySoftInput");
+ final int userId = userData.mUserId;
synchronized (ImfLock.class) {
- if (!calledWithValidTokenLocked(token, userId)) {
+ if (!calledWithValidTokenLocked(token, userData)) {
ImeTracker.forLogging().onFailed(statsToken,
ImeTracker.PHASE_SERVER_CURRENT_ACTIVE_IME);
return;
}
- final var userData = getUserData(userId);
ImeTracker.forLogging().onProgress(statsToken,
ImeTracker.PHASE_SERVER_CURRENT_ACTIVE_IME);
final long ident = Binder.clearCallingIdentity();
@@ -4778,8 +4947,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
}
@GuardedBy("ImfLock.class")
- void setEnabledSessionLocked(SessionState session,
- @NonNull UserDataRepository.UserData userData) {
+ void setEnabledSessionLocked(SessionState session, @NonNull UserData userData) {
if (userData.mEnabledSession != session) {
if (userData.mEnabledSession != null && userData.mEnabledSession.mSession != null) {
if (DEBUG) Slog.v(TAG, "Disabling: " + userData.mEnabledSession);
@@ -4798,7 +4966,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
@GuardedBy("ImfLock.class")
void setEnabledSessionForAccessibilityLocked(
SparseArray<AccessibilitySessionState> accessibilitySessions,
- @NonNull UserDataRepository.UserData userData) {
+ @NonNull UserData userData) {
// mEnabledAccessibilitySessions could the same object as accessibilitySessions.
SparseArray<IAccessibilityInputMethodSession> disabledSessions = new SparseArray<>();
for (int i = 0; i < userData.mEnabledAccessibilitySessions.size(); i++) {
@@ -4861,8 +5029,9 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
synchronized (ImfLock.class) {
final InputMethodSettings settings =
InputMethodSettingsRepository.get(mCurrentUserId);
+ final int userId = settings.getUserId();
final boolean isScreenLocked = mWindowManagerInternal.isKeyguardLocked()
- && mWindowManagerInternal.isKeyguardSecure(settings.getUserId());
+ && mWindowManagerInternal.isKeyguardSecure(userId);
final String lastInputMethodId = settings.getSelectedInputMethod();
int lastInputMethodSubtypeId =
settings.getSelectedInputMethodSubtypeId(lastInputMethodId);
@@ -4875,12 +5044,35 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
Slog.w(TAG, "Show switching menu failed, imList is empty,"
+ " showAuxSubtypes: " + showAuxSubtypes
+ " isScreenLocked: " + isScreenLocked
- + " userId: " + settings.getUserId());
+ + " userId: " + userId);
return false;
}
- mMenuController.showInputMethodMenuLocked(showAuxSubtypes, displayId,
- lastInputMethodId, lastInputMethodSubtypeId, imList);
+ if (Flags.imeSwitcherRevamp()) {
+ if (DEBUG) {
+ Slog.v(TAG, "Show IME switcher menu,"
+ + " showAuxSubtypes=" + showAuxSubtypes
+ + " displayId=" + displayId
+ + " preferredInputMethodId=" + lastInputMethodId
+ + " preferredInputMethodSubtypeId=" + lastInputMethodSubtypeId);
+ }
+
+ final var itemsAndIndex = getInputMethodPickerItems(imList,
+ lastInputMethodId, lastInputMethodSubtypeId, userId);
+ final var menuItems = itemsAndIndex.first;
+ final int selectedIndex = itemsAndIndex.second;
+
+ if (selectedIndex == -1) {
+ Slog.w(TAG, "Switching menu shown with no item selected"
+ + ", IME id: " + lastInputMethodId
+ + ", subtype index: " + lastInputMethodSubtypeId);
+ }
+
+ mMenuControllerNew.show(menuItems, selectedIndex, displayId, userId);
+ } else {
+ mMenuController.showInputMethodMenuLocked(showAuxSubtypes, displayId,
+ lastInputMethodId, lastInputMethodSubtypeId, imList);
+ }
}
return true;
@@ -4951,9 +5143,11 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
// --------------------------------------------------------------
case MSG_HARD_KEYBOARD_SWITCH_CHANGED:
- mMenuController.handleHardKeyboardStatusChange(msg.arg1 == 1);
+ if (!Flags.imeSwitcherRevamp()) {
+ mMenuController.handleHardKeyboardStatusChange(msg.arg1 == 1);
+ }
synchronized (ImfLock.class) {
- sendOnNavButtonFlagsChangedLocked();
+ sendOnNavButtonFlagsChangedToAllImesLocked();
}
return true;
case MSG_SYSTEM_UNLOCK_USER: {
@@ -5007,9 +5201,8 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
case MSG_START_HANDWRITING:
final var handwritingRequest = (HandwritingRequest) msg.obj;
synchronized (ImfLock.class) {
- final int userId = handwritingRequest.userId;
- final var bindingController = getInputMethodBindingController(userId);
- final var userData = getUserData(userId);
+ final var userData = handwritingRequest.userData;
+ final var bindingController = userData.mBindingController;
IInputMethodInvoker curMethod = bindingController.getCurMethod();
if (curMethod == null || userData.mImeBindingState.mFocusedWindow == null) {
return true;
@@ -5054,24 +5247,24 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
return false;
}
- private record HandwritingRequest(int requestId, int pid, @UserIdInt int userId) { }
+ private record HandwritingRequest(int requestId, int pid, @NonNull UserData userData) { }
@BinderThread
- private void onStylusHandwritingReady(int requestId, int pid, @UserIdInt int userId) {
+ private void onStylusHandwritingReady(int requestId, int pid, @NonNull UserData userData) {
mHandler.obtainMessage(MSG_START_HANDWRITING,
- new HandwritingRequest(requestId, pid, userId)).sendToTarget();
+ new HandwritingRequest(requestId, pid, userData)).sendToTarget();
}
private void handleSetInteractive(final boolean interactive) {
synchronized (ImfLock.class) {
// TODO(b/305849394): Support multiple IMEs.
final int userId = mCurrentUserId;
- final var bindingController = getInputMethodBindingController(userId);
+ final var userData = getUserData(userId);
+ final var bindingController = userData.mBindingController;
mIsInteractive = interactive;
updateSystemUiLocked(
interactive ? bindingController.getImeWindowVis() : 0,
bindingController.getBackDisposition(), userId);
- final var userData = getUserData(userId);
// Inform the current client of the change in active status
if (userData.mCurClient == null || userData.mCurClient.mClient == null) {
return;
@@ -5287,7 +5480,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
userData.mSwitchingController.resetCircularListLocked(mContext, settings);
userData.mHardwareKeyboardShortcutController.update(settings);
- sendOnNavButtonFlagsChangedLocked();
+ sendOnNavButtonFlagsChangedLocked(userData);
// Notify InputMethodListListeners of the new installed InputMethods.
final List<InputMethodInfo> inputMethodList = settings.getMethodList();
@@ -5296,14 +5489,38 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
}
@GuardedBy("ImfLock.class")
- void sendOnNavButtonFlagsChangedLocked() {
- final var bindingController = getInputMethodBindingController(mCurrentUserId);
+ void sendOnNavButtonFlagsChangedToAllImesLocked() {
+ for (int userId : mUserManagerInternal.getUserIds()) {
+ sendOnNavButtonFlagsChangedLocked(getUserData(userId));
+ }
+ }
+
+ @GuardedBy("ImfLock.class")
+ void sendOnNavButtonFlagsChangedLocked(@NonNull UserData userData) {
+ final var bindingController = userData.mBindingController;
final IInputMethodInvoker curMethod = bindingController.getCurMethod();
if (curMethod == null) {
// No need to send the data if the IME is not yet bound.
return;
}
- curMethod.onNavButtonFlagsChanged(getInputMethodNavButtonFlagsLocked());
+ curMethod.onNavButtonFlagsChanged(getInputMethodNavButtonFlagsLocked(userData));
+ }
+
+ @WorkerThread
+ private void onUpdateResourceOverlay(@UserIdInt int userId) {
+ final int profileParentId = mUserManagerInternal.getProfileParentId(userId);
+ final boolean value =
+ InputMethodDrawsNavBarResourceMonitor.evaluate(mContext, profileParentId);
+ final var profileUserIds = mUserManagerInternal.getProfileIds(profileParentId, false);
+ final ArrayList<UserData> updatedUsers = new ArrayList<>();
+ for (int profileUserId : profileUserIds) {
+ final var userData = getUserData(profileUserId);
+ userData.mImeDrawsNavBar.set(value);
+ updatedUsers.add(userData);
+ }
+ synchronized (ImfLock.class) {
+ updatedUsers.forEach(this::sendOnNavButtonFlagsChangedLocked);
+ }
}
@GuardedBy("ImfLock.class")
@@ -5433,6 +5650,10 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
// Set InputMethod here
settings.putSelectedInputMethod(imi != null ? imi.getId() : "");
}
+
+ if (Flags.imeSwitcherRevamp()) {
+ getUserData(userId).mSwitchingController.onInputMethodSubtypeChanged();
+ }
}
@GuardedBy("ImfLock.class")
@@ -5494,7 +5715,8 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
}
@GuardedBy("ImfLock.class")
- private boolean switchToInputMethodLocked(String imeId, @UserIdInt int userId) {
+ private boolean switchToInputMethodLocked(@NonNull String imeId, int subtypeId,
+ @UserIdInt int userId) {
final InputMethodSettings settings = InputMethodSettingsRepository.get(userId);
if (mConcurrentMultiUserModeEnabled || userId == mCurrentUserId) {
if (!settings.getMethodMap().containsKey(imeId)
@@ -5502,7 +5724,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
.contains(settings.getMethodMap().get(imeId))) {
return false; // IME is not found or not enabled.
}
- setInputMethodLocked(imeId, NOT_A_SUBTYPE_ID, userId);
+ setInputMethodLocked(imeId, subtypeId, userId);
return true;
}
if (!settings.getMethodMap().containsKey(imeId)
@@ -5511,6 +5733,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
return false; // IME is not found or not enabled.
}
settings.putSelectedInputMethod(imeId);
+ // For non-current user, only reset subtypeId (instead of setting the given one).
settings.putSelectedSubtype(NOT_A_SUBTYPE_ID);
return true;
}
@@ -5544,20 +5767,38 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
}
@GuardedBy("ImfLock.class")
- private void switchKeyboardLayoutLocked(int direction, @UserIdInt int userId) {
+ private void switchKeyboardLayoutLocked(int direction, @NonNull UserData userData) {
+ final int userId = userData.mUserId;
final InputMethodSettings settings = InputMethodSettingsRepository.get(userId);
- final var bindingController = getInputMethodBindingController(userId);
+ final var bindingController = userData.mBindingController;
final InputMethodInfo currentImi = settings.getMethodMap().get(
bindingController.getSelectedMethodId());
if (currentImi == null) {
return;
}
- final InputMethodSubtypeHandle currentSubtypeHandle =
- InputMethodSubtypeHandle.of(currentImi, bindingController.getCurrentSubtype());
- final InputMethodSubtypeHandle nextSubtypeHandle =
- getUserData(userId).mHardwareKeyboardShortcutController.onSubtypeSwitch(
+ final var currentSubtype = bindingController.getCurrentSubtype();
+ final InputMethodSubtypeHandle nextSubtypeHandle;
+ if (Flags.imeSwitcherRevamp()) {
+ final var nextItem = userData.mSwitchingController
+ .getNextInputMethodForHardware(
+ false /* onlyCurrentIme */, currentImi, currentSubtype, MODE_AUTO,
+ direction > 0 /* forward */);
+ if (nextItem == null) {
+ Slog.i(TAG, "Hardware keyboard switching shortcut,"
+ + " next input method and subtype not found");
+ return;
+ }
+
+ final var nextSubtype = nextItem.mSubtypeId > NOT_A_SUBTYPE_ID
+ ? nextItem.mImi.getSubtypeAt(nextItem.mSubtypeId) : null;
+ nextSubtypeHandle = InputMethodSubtypeHandle.of(nextItem.mImi, nextSubtype);
+ } else {
+ final InputMethodSubtypeHandle currentSubtypeHandle =
+ InputMethodSubtypeHandle.of(currentImi, currentSubtype);
+ nextSubtypeHandle = userData.mHardwareKeyboardShortcutController.onSubtypeSwitch(
currentSubtypeHandle, direction > 0);
+ }
if (nextSubtypeHandle == null) {
return;
}
@@ -5584,7 +5825,12 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
}
private void publishLocalService() {
- LocalServices.addService(InputMethodManagerInternal.class, new LocalServiceImpl());
+ LocalServices.addService(InputMethodManagerInternal.class, mInputMethodManagerInternal);
+ }
+
+ // TODO(b/352228316): Remove it once IMMIProxy is removed.
+ InputMethodManagerInternal getLocalService(){
+ return mInputMethodManagerInternal;
}
private final class LocalServiceImpl extends InputMethodManagerInternal {
@@ -5619,6 +5865,17 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
}
}
+ @NonNull
+ @Override
+ public List<InputMethodSubtype> getEnabledInputMethodSubtypeListAsUser(
+ String imiId, boolean allowsImplicitlyEnabledSubtypes, @UserIdInt int userId) {
+ synchronized (ImfLock.class) {
+ return getEnabledInputMethodSubtypeListLocked(imiId,
+ allowsImplicitlyEnabledSubtypes,
+ userId, Process.SYSTEM_UID);
+ }
+ }
+
@Override
public void onCreateInlineSuggestionsRequest(@UserIdInt int userId,
InlineSuggestionsRequestInfo requestInfo, InlineSuggestionsRequestCallback cb) {
@@ -5633,9 +5890,10 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
}
@Override
- public boolean switchToInputMethod(String imeId, @UserIdInt int userId) {
+ public boolean switchToInputMethod(@NonNull String imeId, int subtypeId,
+ @UserIdInt int userId) {
synchronized (ImfLock.class) {
- return switchToInputMethodLocked(imeId, userId);
+ return switchToInputMethodLocked(imeId, subtypeId, userId);
}
}
@@ -5698,7 +5956,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
if (displayId != bindingController.getCurTokenDisplayId()) {
return false;
}
- curHostInputToken = getInputMethodBindingController(userId).getCurHostInputToken();
+ curHostInputToken = bindingController.getCurHostInputToken();
if (curHostInputToken == null) {
return false;
}
@@ -5732,7 +5990,12 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
// input target changed, in case seeing the dialog dismiss flickering during
// the next focused window starting the input connection.
if (mLastImeTargetWindow != userData.mImeBindingState.mFocusedWindow) {
- mMenuController.hideInputMethodMenuLocked();
+ if (Flags.imeSwitcherRevamp()) {
+ final var bindingController = getInputMethodBindingController(userId);
+ mMenuControllerNew.hide(bindingController.getCurTokenDisplayId(), userId);
+ } else {
+ mMenuController.hideInputMethodMenuLocked();
+ }
}
}
}
@@ -5751,11 +6014,20 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
}
@Override
+ public void updateShouldShowImeSwitcher(int displayId, @UserIdInt int userId) {
+ synchronized (ImfLock.class) {
+ updateSystemUiLocked(userId);
+ final var userData = getUserData(userId);
+ sendOnNavButtonFlagsChangedLocked(userData);
+ }
+ }
+
+ @Override
public void onSessionForAccessibilityCreated(int accessibilityConnectionId,
IAccessibilityInputMethodSession session, @UserIdInt int userId) {
synchronized (ImfLock.class) {
- final var bindingController = getInputMethodBindingController(userId);
final var userData = getUserData(userId);
+ final var bindingController = userData.mBindingController;
// TODO(b/305829876): Implement user ID verification
if (userData.mCurClient != null) {
clearClientSessionForAccessibilityLocked(userData.mCurClient,
@@ -5792,8 +6064,8 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
public void unbindAccessibilityFromCurrentClient(int accessibilityConnectionId,
@UserIdInt int userId) {
synchronized (ImfLock.class) {
- final var bindingController = getInputMethodBindingController(userId);
final var userData = getUserData(userId);
+ final var bindingController = userData.mBindingController;
// TODO(b/305829876): Implement user ID verification
if (userData.mCurClient != null) {
if (DEBUG) {
@@ -5837,14 +6109,14 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
IBinder targetWindowToken) {
synchronized (ImfLock.class) {
// TODO(b/305849394): Infer userId from displayId
- switchKeyboardLayoutLocked(direction, mCurrentUserId);
+ switchKeyboardLayoutLocked(direction, getUserData(mCurrentUserId));
}
}
}
@BinderThread
private IInputContentUriToken createInputContentUriToken(@Nullable IBinder token,
- @Nullable Uri contentUri, @Nullable String packageName, @UserIdInt int imeUserId) {
+ @Nullable Uri contentUri, @Nullable String packageName, @NonNull UserData userData) {
if (token == null) {
throw new NullPointerException("token");
}
@@ -5861,7 +6133,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
synchronized (ImfLock.class) {
final int uid = Binder.getCallingUid();
- final var bindingController = getInputMethodBindingController(imeUserId);
+ final var bindingController = userData.mBindingController;
if (bindingController.getSelectedMethodId() == null) {
return null;
}
@@ -5873,7 +6145,6 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
// We cannot simply distinguish a bad IME that reports an arbitrary package name from
// an unfortunate IME whose internal state is already obsolete due to the asynchronous
// nature of our system. Let's compare it with our internal record.
- final var userData = getUserData(imeUserId);
final var curPackageName = userData.mCurEditorInfo != null
? userData.mCurEditorInfo.packageName : null;
if (!TextUtils.equals(curPackageName, packageName)) {
@@ -5885,7 +6156,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
final int appUserId = UserHandle.getUserId(userData.mCurClient.mUid);
// This user ID may be invalid if "contentUri" embedded an invalid user ID.
final int contentUriOwnerUserId = ContentProvider.getUserIdFromUri(contentUri,
- imeUserId);
+ userData.mUserId);
final Uri contentUriWithoutUserId = ContentProvider.getUriWithoutUserId(contentUri);
// Note: InputContentUriTokenHandler.take() checks whether the IME (specified by "uid")
// actually has the right to grant a read permission for "contentUriWithoutUserId" that
@@ -5900,12 +6171,11 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
@BinderThread
private void reportFullscreenMode(@NonNull IBinder token, boolean fullscreen,
- @UserIdInt int userId) {
+ @NonNull UserData userData) {
synchronized (ImfLock.class) {
- if (!calledWithValidTokenLocked(token, userId)) {
+ if (!calledWithValidTokenLocked(token, userData)) {
return;
}
- final var userData = getUserData(userId);
if (userData.mCurClient != null && userData.mCurClient.mClient != null) {
userData.mInFullscreenMode = fullscreen;
userData.mCurClient.mClient.reportFullscreenMode(fullscreen);
@@ -5996,7 +6266,6 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
boolean isCritical) {
IInputMethodInvoker method;
ClientState client;
- ClientState focusedWindowClient;
final Printer p = new PrintWriterPrinter(pw);
@@ -6005,6 +6274,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
final InputMethodSettings settings = InputMethodSettingsRepository.get(userId);
final var userData = getUserData(userId);
p.println("Current Input Method Manager state:");
+ p.println(" concurrentMultiUserModeEnabled" + mConcurrentMultiUserModeEnabled);
final List<InputMethodInfo> methodList = settings.getMethodList();
int numImes = methodList.size();
p.println(" Input Methods:");
@@ -6031,8 +6301,8 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
p.println(" pid=" + c.mPid);
};
mClientController.forAllClients(clientControllerDump);
- final var bindingController = getInputMethodBindingController(mCurrentUserId);
- p.println(" mCurrentUserId=" + mCurrentUserId);
+ final var bindingController = userData.mBindingController;
+ p.println(" mCurrentUserId=" + userData.mUserId);
p.println(" mCurMethodId=" + bindingController.getSelectedMethodId());
client = userData.mCurClient;
p.println(" mCurClient=" + client + " mCurSeq="
@@ -6047,7 +6317,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
p.println(" mUserDataRepository=");
// TODO(b/324907325): Remove the suppress warnings once b/324907325 is fixed.
- @SuppressWarnings("GuardedBy") Consumer<UserDataRepository.UserData> userDataDump =
+ @SuppressWarnings("GuardedBy") Consumer<UserData> userDataDump =
u -> {
p.println(" mUserId=" + u.mUserId);
p.println(" hasMainConnection="
@@ -6065,6 +6335,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
u.mImeBindingState.dump(" ", p);
p.println(" enabledSession=" + u.mEnabledSession);
p.println(" inFullscreenMode=" + u.mInFullscreenMode);
+ p.println(" imeDrawsNavBar=" + u.mImeDrawsNavBar.get());
p.println(" switchingController:");
u.mSwitchingController.dump(p, " ");
p.println(" mLastEnabledInputMethodsStr="
@@ -6072,6 +6343,10 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
};
mUserDataRepository.forAllUserData(userDataDump);
+ if (Flags.imeSwitcherRevamp()) {
+ p.println(" menuControllerNew:");
+ mMenuControllerNew.dump(p, " ");
+ }
p.println(" mCurToken=" + bindingController.getCurToken());
p.println(" mCurTokenDisplayId=" + bindingController.getCurTokenDisplayId());
p.println(" mCurHostInputToken=" + bindingController.getCurHostInputToken());
@@ -6518,7 +6793,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
continue;
}
boolean failedToSelectUnknownIme = !switchToInputMethodLocked(imeId,
- userId);
+ NOT_A_SUBTYPE_ID, userId);
if (failedToSelectUnknownIme) {
error.print("Unknown input method ");
error.print(imeId);
@@ -6583,7 +6858,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
0 /* flags */,
SoftInputShowHideReason.HIDE_RESET_SHELL_COMMAND, userId);
}
- final var bindingController = getInputMethodBindingController(userId);
+ final var bindingController = userData.mBindingController;
bindingController.unbindCurrentMethod();
// Enable default IMEs, disable others
@@ -6731,26 +7006,26 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
private final InputMethodManagerService mImms;
@NonNull
private final IBinder mToken;
- @UserIdInt
- private final int mUserId;
+ @NonNull
+ private final UserData mUserData;
InputMethodPrivilegedOperationsImpl(InputMethodManagerService imms,
- @NonNull IBinder token, @UserIdInt int userId) {
+ @NonNull IBinder token, @NonNull UserData userData) {
mImms = imms;
mToken = token;
- mUserId = userId;
+ mUserData = userData;
}
@BinderThread
@Override
public void setImeWindowStatusAsync(int vis, int backDisposition) {
- mImms.setImeWindowStatus(mToken, vis, backDisposition, mUserId);
+ mImms.setImeWindowStatus(mToken, vis, backDisposition, mUserData);
}
@BinderThread
@Override
public void reportStartInputAsync(IBinder startInputToken) {
- mImms.reportStartInput(mToken, startInputToken, mUserId);
+ mImms.reportStartInput(mToken, startInputToken, mUserData);
}
@BinderThread
@@ -6766,7 +7041,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
@SuppressWarnings("unchecked") final AndroidFuture<IBinder> typedFuture = future;
try {
typedFuture.complete(mImms.createInputContentUriToken(
- mToken, contentUri, packageName, mUserId).asBinder());
+ mToken, contentUri, packageName, mUserData).asBinder());
} catch (Throwable e) {
typedFuture.completeExceptionally(e);
}
@@ -6775,7 +7050,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
@BinderThread
@Override
public void reportFullscreenModeAsync(boolean fullscreen) {
- mImms.reportFullscreenMode(mToken, fullscreen, mUserId);
+ mImms.reportFullscreenMode(mToken, fullscreen, mUserData);
}
@BinderThread
@@ -6783,7 +7058,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
public void setInputMethod(String id, AndroidFuture future /* T=Void */) {
@SuppressWarnings("unchecked") final AndroidFuture<Void> typedFuture = future;
try {
- mImms.setInputMethod(mToken, id, mUserId);
+ mImms.setInputMethod(mToken, id, mUserData);
typedFuture.complete(null);
} catch (Throwable e) {
typedFuture.completeExceptionally(e);
@@ -6796,7 +7071,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
AndroidFuture future /* T=Void */) {
@SuppressWarnings("unchecked") final AndroidFuture<Void> typedFuture = future;
try {
- mImms.setInputMethodAndSubtype(mToken, id, subtype, mUserId);
+ mImms.setInputMethodAndSubtype(mToken, id, subtype, mUserData);
typedFuture.complete(null);
} catch (Throwable e) {
typedFuture.completeExceptionally(e);
@@ -6810,7 +7085,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
AndroidFuture future /* T=Void */) {
@SuppressWarnings("unchecked") final AndroidFuture<Void> typedFuture = future;
try {
- mImms.hideMySoftInput(mToken, statsToken, flags, reason, mUserId);
+ mImms.hideMySoftInput(mToken, statsToken, flags, reason, mUserData);
typedFuture.complete(null);
} catch (Throwable e) {
typedFuture.completeExceptionally(e);
@@ -6824,7 +7099,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
AndroidFuture future /* T=Void */) {
@SuppressWarnings("unchecked") final AndroidFuture<Void> typedFuture = future;
try {
- mImms.showMySoftInput(mToken, statsToken, flags, reason, mUserId);
+ mImms.showMySoftInput(mToken, statsToken, flags, reason, mUserData);
typedFuture.complete(null);
} catch (Throwable e) {
typedFuture.completeExceptionally(e);
@@ -6834,7 +7109,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
@BinderThread
@Override
public void updateStatusIconAsync(String packageName, @DrawableRes int iconId) {
- mImms.updateStatusIcon(mToken, packageName, iconId, mUserId);
+ mImms.updateStatusIcon(mToken, packageName, iconId, mUserData);
}
@BinderThread
@@ -6842,7 +7117,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
public void switchToPreviousInputMethod(AndroidFuture future /* T=Boolean */) {
@SuppressWarnings("unchecked") final AndroidFuture<Boolean> typedFuture = future;
try {
- typedFuture.complete(mImms.switchToPreviousInputMethod(mToken, mUserId));
+ typedFuture.complete(mImms.switchToPreviousInputMethod(mToken, mUserData));
} catch (Throwable e) {
typedFuture.completeExceptionally(e);
}
@@ -6855,7 +7130,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
@SuppressWarnings("unchecked") final AndroidFuture<Boolean> typedFuture = future;
try {
typedFuture.complete(mImms.switchToNextInputMethod(mToken, onlyCurrentIme,
- mUserId));
+ mUserData));
} catch (Throwable e) {
typedFuture.completeExceptionally(e);
}
@@ -6866,7 +7141,8 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
public void shouldOfferSwitchingToNextInputMethod(AndroidFuture future /* T=Boolean */) {
@SuppressWarnings("unchecked") final AndroidFuture<Boolean> typedFuture = future;
try {
- typedFuture.complete(mImms.shouldOfferSwitchingToNextInputMethod(mToken, mUserId));
+ typedFuture.complete(mImms.shouldOfferSwitchingToNextInputMethod(mToken,
+ mUserData));
} catch (Throwable e) {
typedFuture.completeExceptionally(e);
}
@@ -6874,21 +7150,27 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
@BinderThread
@Override
+ public void onImeSwitchButtonClickFromClient(int displayId) {
+ mImms.onImeSwitchButtonClickFromClient(mToken, displayId, mUserData);
+ }
+
+ @BinderThread
+ @Override
public void notifyUserActionAsync() {
- mImms.notifyUserAction(mToken, mUserId);
+ mImms.notifyUserAction(mToken, mUserData);
}
@BinderThread
@Override
public void applyImeVisibilityAsync(IBinder windowToken, boolean setVisible,
@NonNull ImeTracker.Token statsToken) {
- mImms.applyImeVisibility(mToken, windowToken, setVisible, statsToken, mUserId);
+ mImms.applyImeVisibility(mToken, windowToken, setVisible, statsToken, mUserData);
}
@BinderThread
@Override
public void onStylusHandwritingReady(int requestId, int pid) {
- mImms.onStylusHandwritingReady(requestId, pid, mUserId);
+ mImms.onStylusHandwritingReady(requestId, pid, mUserData);
}
@BinderThread
@@ -6901,12 +7183,12 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
@Override
public void switchKeyboardLayoutAsync(int direction) {
synchronized (ImfLock.class) {
- if (!mImms.calledWithValidTokenLocked(mToken, mUserId)) {
+ if (!mImms.calledWithValidTokenLocked(mToken, mUserData)) {
return;
}
final long ident = Binder.clearCallingIdentity();
try {
- mImms.switchKeyboardLayoutLocked(direction, mUserId);
+ mImms.switchKeyboardLayoutLocked(direction, mUserData);
} finally {
Binder.restoreCallingIdentity(ident);
}
diff --git a/services/core/java/com/android/server/inputmethod/InputMethodMenuController.java b/services/core/java/com/android/server/inputmethod/InputMethodMenuController.java
index 656c87deac6b..06f73f34e427 100644
--- a/services/core/java/com/android/server/inputmethod/InputMethodMenuController.java
+++ b/services/core/java/com/android/server/inputmethod/InputMethodMenuController.java
@@ -202,7 +202,7 @@ final class InputMethodMenuController {
attrs.setTitle("Select input method");
w.setAttributes(attrs);
mService.updateSystemUiLocked(userId);
- mService.sendOnNavButtonFlagsChangedLocked();
+ mService.sendOnNavButtonFlagsChangedLocked(mService.getUserData(userId));
mSwitchingDialog.show();
}
@@ -242,7 +242,7 @@ final class InputMethodMenuController {
// TODO(b/305849394): Make InputMethodMenuController multi-user aware
final int userId = mService.getCurrentImeUserIdLocked();
mService.updateSystemUiLocked(userId);
- mService.sendOnNavButtonFlagsChangedLocked();
+ mService.sendOnNavButtonFlagsChangedToAllImesLocked();
mDialogBuilder = null;
mIms = null;
}
diff --git a/services/core/java/com/android/server/inputmethod/InputMethodMenuControllerNew.java b/services/core/java/com/android/server/inputmethod/InputMethodMenuControllerNew.java
new file mode 100644
index 000000000000..045414bde82e
--- /dev/null
+++ b/services/core/java/com/android/server/inputmethod/InputMethodMenuControllerNew.java
@@ -0,0 +1,356 @@
+/*
+ * 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.server.inputmethod;
+
+
+import static android.Manifest.permission.HIDE_OVERLAY_WINDOWS;
+import static android.Manifest.permission.INTERACT_ACROSS_USERS;
+
+import static com.android.server.inputmethod.InputMethodManagerService.DEBUG;
+import static com.android.server.inputmethod.InputMethodUtils.NOT_A_SUBTYPE_ID;
+
+import android.annotation.IntRange;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.annotation.RequiresPermission;
+import android.annotation.UserIdInt;
+import android.app.AlertDialog;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.os.UserHandle;
+import android.text.TextUtils;
+import android.util.Printer;
+import android.util.Slog;
+import android.view.Gravity;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.Window;
+import android.view.WindowManager;
+import android.view.inputmethod.InputMethodInfo;
+import android.widget.Button;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.android.internal.widget.RecyclerView;
+
+import java.util.List;
+
+/**
+ * Controller for showing and hiding the Input Method Switcher Menu.
+ */
+final class InputMethodMenuControllerNew {
+
+ private static final String TAG = InputMethodMenuControllerNew.class.getSimpleName();
+
+ /**
+ * The horizontal offset from the menu to the edge of the screen corresponding
+ * to {@link Gravity#END}.
+ */
+ private static final int HORIZONTAL_OFFSET = 16;
+
+ /** The title of the window, used for debugging. */
+ private static final String WINDOW_TITLE = "IME Switcher Menu";
+
+ private final InputMethodDialogWindowContext mDialogWindowContext =
+ new InputMethodDialogWindowContext();
+
+ @Nullable
+ private AlertDialog mDialog;
+
+ @Nullable
+ private List<MenuItem> mMenuItems;
+
+ /**
+ * Shows the Input Method Switcher Menu, with a list of IMEs and their subtypes.
+ *
+ * @param items the list of menu items.
+ * @param selectedIndex the index of the menu item that is selected.
+ * If no other IMEs are enabled, this index will be out of reach.
+ * @param displayId the ID of the display where the menu was requested.
+ * @param userId the ID of the user that requested the menu.
+ */
+ @RequiresPermission(allOf = {INTERACT_ACROSS_USERS, HIDE_OVERLAY_WINDOWS})
+ void show(@NonNull List<MenuItem> items, int selectedIndex, int displayId,
+ @UserIdInt int userId) {
+ // Hide the menu in case it was already showing.
+ hide(displayId, userId);
+
+ final Context dialogWindowContext = mDialogWindowContext.get(displayId);
+ final var builder = new AlertDialog.Builder(dialogWindowContext,
+ com.android.internal.R.style.Theme_DeviceDefault_InputMethodSwitcherDialog);
+ final var inflater = LayoutInflater.from(builder.getContext());
+
+ // Create the content view.
+ final View contentView = inflater
+ .inflate(com.android.internal.R.layout.input_method_switch_dialog_new, null);
+ contentView.setAccessibilityPaneTitle(
+ dialogWindowContext.getText(com.android.internal.R.string.select_input_method));
+ builder.setView(contentView);
+
+ final DialogInterface.OnClickListener onClickListener = (dialog, which) -> {
+ if (which != selectedIndex) {
+ final var item = items.get(which);
+ InputMethodManagerInternal.get()
+ .switchToInputMethod(item.mImi.getId(), item.mSubtypeId, userId);
+ }
+ hide(displayId, userId);
+ };
+
+ final var selectedImi = selectedIndex >= 0 ? items.get(selectedIndex).mImi : null;
+ final var languageSettingsIntent = selectedImi != null
+ ? selectedImi.createImeLanguageSettingsActivityIntent() : null;
+ final boolean hasLanguageSettingsButton = languageSettingsIntent != null;
+ if (hasLanguageSettingsButton) {
+ final View buttonBar = contentView
+ .requireViewById(com.android.internal.R.id.button_bar);
+ buttonBar.setVisibility(View.VISIBLE);
+
+ languageSettingsIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ final Button languageSettingsButton = contentView
+ .requireViewById(com.android.internal.R.id.button1);
+ languageSettingsButton.setVisibility(View.VISIBLE);
+ languageSettingsButton.setOnClickListener(v -> {
+ v.getContext().startActivityAsUser(languageSettingsIntent, UserHandle.of(userId));
+ hide(displayId, userId);
+ });
+ }
+
+ // Create the current IME subtypes list.
+ final RecyclerView recyclerView = contentView
+ .requireViewById(com.android.internal.R.id.list);
+ recyclerView.setAdapter(new Adapter(items, selectedIndex, inflater, onClickListener));
+ // Scroll to the currently selected IME.
+ recyclerView.scrollToPosition(selectedIndex);
+ // Indicate that the list can be scrolled.
+ recyclerView.setScrollIndicators(
+ hasLanguageSettingsButton ? View.SCROLL_INDICATOR_BOTTOM : 0);
+
+ builder.setOnCancelListener(dialog -> hide(displayId, userId));
+ mMenuItems = items;
+ mDialog = builder.create();
+ mDialog.setCanceledOnTouchOutside(true);
+ final Window w = mDialog.getWindow();
+ w.setHideOverlayWindows(true);
+ final WindowManager.LayoutParams attrs = w.getAttributes();
+ // Use an alternate token for the dialog for that window manager can group the token
+ // with other IME windows based on type vs. grouping based on whichever token happens
+ // to get selected by the system later on.
+ attrs.token = dialogWindowContext.getWindowContextToken();
+ attrs.gravity = Gravity.getAbsoluteGravity(Gravity.BOTTOM | Gravity.END,
+ dialogWindowContext.getResources().getConfiguration().getLayoutDirection());
+ attrs.x = HORIZONTAL_OFFSET;
+ attrs.privateFlags |= WindowManager.LayoutParams.SYSTEM_FLAG_SHOW_FOR_ALL_USERS;
+ attrs.type = WindowManager.LayoutParams.TYPE_INPUT_METHOD_DIALOG;
+ // Used for debugging only, not user visible.
+ attrs.setTitle(WINDOW_TITLE);
+ w.setAttributes(attrs);
+
+ mDialog.show();
+ InputMethodManagerInternal.get().updateShouldShowImeSwitcher(displayId, userId);
+ }
+
+ /**
+ * Hides the Input Method Switcher Menu.
+ *
+ * @param displayId the ID of the display from where the menu should be hidden.
+ * @param userId the ID of the user for which the menu should be hidden.
+ */
+ void hide(int displayId, @UserIdInt int userId) {
+ if (DEBUG) Slog.v(TAG, "Hide IME switcher menu.");
+
+ mMenuItems = null;
+ // Cannot use dialog.isShowing() here, as the cancel listener flow already resets mShowing.
+ if (mDialog != null) {
+ mDialog.dismiss();
+ mDialog = null;
+
+ InputMethodManagerInternal.get().updateShouldShowImeSwitcher(displayId, userId);
+ }
+ }
+
+ /**
+ * Returns whether the Input Method Switcher Menu is showing.
+ */
+ boolean isShowing() {
+ return mDialog != null && mDialog.isShowing();
+ }
+
+ void dump(@NonNull Printer pw, @NonNull String prefix) {
+ final boolean showing = isShowing();
+ pw.println(prefix + " isShowing: " + showing);
+
+ if (showing) {
+ pw.println(prefix + " menuItems: " + mMenuItems);
+ }
+ }
+
+ /**
+ * Item to be shown in the Input Method Switcher Menu, containing an input method and
+ * optionally an input method subtype.
+ */
+ static class MenuItem {
+
+ /** The name of the input method. */
+ @NonNull
+ private final CharSequence mImeName;
+
+ /**
+ * The name of the input method subtype, or {@code null} if this item doesn't have a
+ * subtype.
+ */
+ @Nullable
+ private final CharSequence mSubtypeName;
+
+ /** The info of the input method. */
+ @NonNull
+ private final InputMethodInfo mImi;
+
+ /**
+ * The index of the subtype in the input method's array of subtypes,
+ * or {@link InputMethodUtils#NOT_A_SUBTYPE_ID} if this item doesn't have a subtype.
+ */
+ @IntRange(from = NOT_A_SUBTYPE_ID)
+ private final int mSubtypeId;
+
+ /** Whether this item has a group header (only the first item of each input method). */
+ private final boolean mHasHeader;
+
+ /**
+ * Whether this item should has a group divider (same as {@link #mHasHeader},
+ * excluding the first IME).
+ */
+ private final boolean mHasDivider;
+
+ MenuItem(@NonNull CharSequence imeName, @Nullable CharSequence subtypeName,
+ @NonNull InputMethodInfo imi, @IntRange(from = NOT_A_SUBTYPE_ID) int subtypeId,
+ boolean hasHeader, boolean hasDivider) {
+ mImeName = imeName;
+ mSubtypeName = subtypeName;
+ mImi = imi;
+ mSubtypeId = subtypeId;
+ mHasHeader = hasHeader;
+ mHasDivider = hasDivider;
+ }
+
+ @Override
+ public String toString() {
+ return "MenuItem{"
+ + "mImeName=" + mImeName
+ + " mSubtypeName=" + mSubtypeName
+ + " mSubtypeId=" + mSubtypeId
+ + " mHasHeader=" + mHasHeader
+ + " mHasDivider=" + mHasDivider
+ + "}";
+ }
+ }
+
+ private static class Adapter extends RecyclerView.Adapter<Adapter.ViewHolder> {
+
+ /** The list of items to show. */
+ @NonNull
+ private final List<MenuItem> mItems;
+ /** The index of the selected item. */
+ private final int mSelectedIndex;
+ @NonNull
+ private final LayoutInflater mInflater;
+ @NonNull
+ private final DialogInterface.OnClickListener mOnClickListener;
+
+ Adapter(@NonNull List<MenuItem> items, int selectedIndex,
+ @NonNull LayoutInflater inflater,
+ @NonNull DialogInterface.OnClickListener onClickListener) {
+ mItems = items;
+ mSelectedIndex = selectedIndex;
+ mInflater = inflater;
+ mOnClickListener = onClickListener;
+ }
+
+ @Override
+ public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
+ final View view = mInflater.inflate(
+ com.android.internal.R.layout.input_method_switch_item_new, parent, false);
+
+ return new ViewHolder(view, mOnClickListener);
+ }
+
+ @Override
+ public void onBindViewHolder(ViewHolder holder, int position) {
+ holder.bind(mItems.get(position), position == mSelectedIndex /* isSelected */);
+ }
+
+ @Override
+ public int getItemCount() {
+ return mItems.size();
+ }
+
+ private static class ViewHolder extends RecyclerView.ViewHolder {
+
+ /** The container of the item. */
+ @NonNull
+ private final View mContainer;
+ /** The name of the item. */
+ @NonNull
+ private final TextView mName;
+ /** Indicator for the selected status of the item. */
+ @NonNull
+ private final ImageView mCheckmark;
+ /** The group header optionally drawn above the item. */
+ @NonNull
+ private final TextView mHeader;
+ /** The group divider optionally drawn above the item. */
+ @NonNull
+ private final View mDivider;
+
+ private ViewHolder(@NonNull View itemView,
+ @NonNull DialogInterface.OnClickListener onClickListener) {
+ super(itemView);
+
+ mContainer = itemView.requireViewById(com.android.internal.R.id.list_item);
+ mName = itemView.requireViewById(com.android.internal.R.id.text);
+ mCheckmark = itemView.requireViewById(com.android.internal.R.id.image);
+ mHeader = itemView.requireViewById(com.android.internal.R.id.header_text);
+ mDivider = itemView.requireViewById(com.android.internal.R.id.divider);
+
+ mContainer.setOnClickListener((v) ->
+ onClickListener.onClick(null /* dialog */, getAdapterPosition()));
+ }
+
+ /**
+ * Binds the given item to the current view.
+ *
+ * @param item the item to bind.
+ * @param isSelected whether this is selected.
+ */
+ private void bind(@NonNull MenuItem item, boolean isSelected) {
+ // Use the IME name for subtypes with an empty subtype name.
+ final var name = TextUtils.isEmpty(item.mSubtypeName)
+ ? item.mImeName : item.mSubtypeName;
+ mContainer.setActivated(isSelected);
+ // Activated is the correct state, but we also set selected for accessibility info.
+ mContainer.setSelected(isSelected);
+ mName.setSelected(isSelected);
+ mName.setText(name);
+ mCheckmark.setVisibility(isSelected ? View.VISIBLE : View.GONE);
+ mHeader.setText(item.mImeName);
+ mHeader.setVisibility(item.mHasHeader ? View.VISIBLE : View.GONE);
+ mDivider.setVisibility(item.mHasDivider ? View.VISIBLE : View.GONE);
+ }
+ }
+ }
+}
diff --git a/services/core/java/com/android/server/inputmethod/InputMethodSettingsRepository.java b/services/core/java/com/android/server/inputmethod/InputMethodSettingsRepository.java
index 68924b5f370f..1b840362a8cf 100644
--- a/services/core/java/com/android/server/inputmethod/InputMethodSettingsRepository.java
+++ b/services/core/java/com/android/server/inputmethod/InputMethodSettingsRepository.java
@@ -16,20 +16,16 @@
package com.android.server.inputmethod;
+import android.annotation.AnyThread;
import android.annotation.NonNull;
import android.annotation.UserIdInt;
-import android.content.Context;
-import android.content.pm.UserInfo;
-import android.os.Handler;
import android.util.SparseArray;
import com.android.internal.annotations.GuardedBy;
-import com.android.internal.inputmethod.DirectBootAwareness;
-import com.android.server.LocalServices;
-import com.android.server.pm.UserManagerInternal;
final class InputMethodSettingsRepository {
- @GuardedBy("ImfLock.class")
+ // TODO(b/352594784): Should we user other lock primitives?
+ @GuardedBy("sPerUserMap")
@NonNull
private static final SparseArray<InputMethodSettings> sPerUserMap = new SparseArray<>();
@@ -40,47 +36,29 @@ final class InputMethodSettingsRepository {
}
@NonNull
- @GuardedBy("ImfLock.class")
+ @AnyThread
static InputMethodSettings get(@UserIdInt int userId) {
- final InputMethodSettings obj = sPerUserMap.get(userId);
+ final InputMethodSettings obj;
+ synchronized (sPerUserMap) {
+ obj = sPerUserMap.get(userId);
+ }
if (obj != null) {
return obj;
}
return InputMethodSettings.createEmptyMap(userId);
}
- @GuardedBy("ImfLock.class")
+ @AnyThread
static void put(@UserIdInt int userId, @NonNull InputMethodSettings obj) {
- sPerUserMap.put(userId, obj);
+ synchronized (sPerUserMap) {
+ sPerUserMap.put(userId, obj);
+ }
}
- static void initialize(@NonNull Handler handler, @NonNull Context context) {
- final UserManagerInternal userManagerInternal =
- LocalServices.getService(UserManagerInternal.class);
- handler.post(() -> {
- userManagerInternal.addUserLifecycleListener(
- new UserManagerInternal.UserLifecycleListener() {
- @Override
- public void onUserRemoved(UserInfo user) {
- final int userId = user.id;
- handler.post(() -> {
- synchronized (ImfLock.class) {
- sPerUserMap.remove(userId);
- }
- });
- }
- });
- synchronized (ImfLock.class) {
- for (int userId : userManagerInternal.getUserIds()) {
- final InputMethodSettings settings =
- InputMethodManagerService.queryInputMethodServicesInternal(
- context,
- userId,
- AdditionalSubtypeMapRepository.get(userId),
- DirectBootAwareness.AUTO);
- put(userId, settings);
- }
- }
- });
+ @AnyThread
+ static void remove(@UserIdInt int userId) {
+ synchronized (sPerUserMap) {
+ sPerUserMap.remove(userId);
+ }
}
}
diff --git a/services/core/java/com/android/server/inputmethod/InputMethodSubtypeSwitchingController.java b/services/core/java/com/android/server/inputmethod/InputMethodSubtypeSwitchingController.java
index bb1b9df6cf4c..05cc5985a8cc 100644
--- a/services/core/java/com/android/server/inputmethod/InputMethodSubtypeSwitchingController.java
+++ b/services/core/java/com/android/server/inputmethod/InputMethodSubtypeSwitchingController.java
@@ -16,6 +16,8 @@
package com.android.server.inputmethod;
+import android.annotation.IntDef;
+import android.annotation.IntRange;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.content.Context;
@@ -24,11 +26,14 @@ import android.text.TextUtils;
import android.util.ArraySet;
import android.util.Printer;
import android.util.Slog;
+import android.view.inputmethod.Flags;
import android.view.inputmethod.InputMethodInfo;
import android.view.inputmethod.InputMethodSubtype;
import com.android.internal.annotations.VisibleForTesting;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@@ -45,6 +50,34 @@ final class InputMethodSubtypeSwitchingController {
private static final boolean DEBUG = false;
private static final int NOT_A_SUBTYPE_ID = InputMethodUtils.NOT_A_SUBTYPE_ID;
+ @IntDef(prefix = {"MODE_"}, value = {
+ MODE_STATIC,
+ MODE_RECENT,
+ MODE_AUTO
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface SwitchMode {
+ }
+
+ /**
+ * Switch using the static order (the order of the given list of input methods and subtypes).
+ * This order is only set when given a new list, and never updated.
+ */
+ public static final int MODE_STATIC = 0;
+
+ /**
+ * Switch using the recency based order, going from most recent to least recent,
+ * updated on {@link #onUserActionLocked user action}.
+ */
+ public static final int MODE_RECENT = 1;
+
+ /**
+ * If there was a {@link #onUserActionLocked user action} since the last
+ * {@link #onInputMethodSubtypeChanged() switch}, and direction is forward,
+ * use {@link #MODE_RECENT}, otherwise use {@link #MODE_STATIC}.
+ */
+ public static final int MODE_AUTO = 2;
+
public static class ImeSubtypeListItem implements Comparable<ImeSubtypeListItem> {
@NonNull
@@ -117,20 +150,25 @@ final class InputMethodSubtypeSwitchingController {
if (result != 0) {
return result;
}
- // Subtype that has the same locale of the system's has higher priority.
- result = (mIsSystemLocale ? -1 : 0) - (other.mIsSystemLocale ? -1 : 0);
- if (result != 0) {
- return result;
- }
- // Subtype that has the same language of the system's has higher priority.
- result = (mIsSystemLanguage ? -1 : 0) - (other.mIsSystemLanguage ? -1 : 0);
- if (result != 0) {
- return result;
- }
- result = compareNullableCharSequences(mSubtypeName, other.mSubtypeName);
- if (result != 0) {
- return result;
+ if (!Flags.imeSwitcherRevamp()) {
+ // Subtype that has the same locale of the system's has higher priority.
+ result = (mIsSystemLocale ? -1 : 0) - (other.mIsSystemLocale ? -1 : 0);
+ if (result != 0) {
+ return result;
+ }
+ // Subtype that has the same language of the system's has higher priority.
+ result = (mIsSystemLanguage ? -1 : 0) - (other.mIsSystemLanguage ? -1 : 0);
+ if (result != 0) {
+ return result;
+ }
+ result = compareNullableCharSequences(mSubtypeName, other.mSubtypeName);
+ if (result != 0) {
+ return result;
+ }
}
+ // This will no longer compare by subtype name, however as {@link Collections.sort} is
+ // guaranteed to be a stable sorting, this allows sorting by the IME name (and ID),
+ // while maintaining the order of subtypes (given by each IME) at the IME level.
return mImi.getId().compareTo(other.mImi.getId());
}
@@ -226,6 +264,59 @@ final class InputMethodSubtypeSwitchingController {
return imList;
}
+ @NonNull
+ private static List<ImeSubtypeListItem> getInputMethodAndSubtypeListForHardwareKeyboard(
+ @NonNull Context context, @NonNull InputMethodSettings settings) {
+ if (!Flags.imeSwitcherRevamp()) {
+ return new ArrayList<>();
+ }
+ final int userId = settings.getUserId();
+ final Context userAwareContext = context.getUserId() == userId
+ ? context
+ : context.createContextAsUser(UserHandle.of(userId), 0 /* flags */);
+ final String mSystemLocaleStr = SystemLocaleWrapper.get(userId).get(0).toLanguageTag();
+
+ final ArrayList<InputMethodInfo> imis = settings.getEnabledInputMethodList();
+ if (imis.isEmpty()) {
+ Slog.w(TAG, "Enabled input method list is empty.");
+ return new ArrayList<>();
+ }
+
+ final ArrayList<ImeSubtypeListItem> imList = new ArrayList<>();
+ final int numImes = imis.size();
+ for (int i = 0; i < numImes; ++i) {
+ final InputMethodInfo imi = imis.get(i);
+ if (!imi.shouldShowInInputMethodPicker()) {
+ continue;
+ }
+ final var subtypes = settings.getEnabledInputMethodSubtypeList(imi, true);
+ final ArraySet<InputMethodSubtype> enabledSubtypeSet = new ArraySet<>(subtypes);
+ final CharSequence imeLabel = imi.loadLabel(userAwareContext.getPackageManager());
+ if (!subtypes.isEmpty()) {
+ final int subtypeCount = imi.getSubtypeCount();
+ if (DEBUG) {
+ Slog.v(TAG, "Add subtypes: " + subtypeCount + ", " + imi.getId());
+ }
+ for (int j = 0; j < subtypeCount; j++) {
+ final InputMethodSubtype subtype = imi.getSubtypeAt(j);
+ if (enabledSubtypeSet.contains(subtype)
+ && subtype.isSuitableForPhysicalKeyboardLayoutMapping()) {
+ final CharSequence subtypeLabel =
+ subtype.overridesImplicitlyEnabledSubtype() ? null : subtype
+ .getDisplayName(userAwareContext, imi.getPackageName(),
+ imi.getServiceInfo().applicationInfo);
+ imList.add(new ImeSubtypeListItem(imeLabel,
+ subtypeLabel, imi, j, subtype.getLocale(), mSystemLocaleStr));
+ }
+ }
+ } else {
+ imList.add(new ImeSubtypeListItem(imeLabel, null, imi, NOT_A_SUBTYPE_ID, null,
+ mSystemLocaleStr));
+ }
+ }
+ return imList;
+ }
+
private static int calculateSubtypeId(@NonNull InputMethodInfo imi,
@Nullable InputMethodSubtype subtype) {
return subtype != null ? SubtypeUtils.getSubtypeIdFromHashCode(imi, subtype.hashCode())
@@ -385,6 +476,132 @@ final class InputMethodSubtypeSwitchingController {
}
}
+ /**
+ * List container that allows getting the next item in either forwards or backwards direction,
+ * in either static or recency order, and either in the same IME or not.
+ */
+ private static class RotationList {
+
+ /**
+ * List of items in a static order.
+ */
+ @NonNull
+ private final List<ImeSubtypeListItem> mItems;
+
+ /**
+ * Mapping of recency index to static index (in {@link #mItems}), with lower indices being
+ * more recent.
+ */
+ @NonNull
+ private final int[] mRecencyMap;
+
+ RotationList(@NonNull List<ImeSubtypeListItem> items) {
+ mItems = items;
+ mRecencyMap = new int[items.size()];
+ for (int i = 0; i < mItems.size(); i++) {
+ mRecencyMap[i] = i;
+ }
+ }
+
+ /**
+ * Gets the next input method and subtype from the given ones.
+ *
+ * @param imi the input method to find the next value from.
+ * @param subtype the input method subtype to find the next value from, if any.
+ * @param onlyCurrentIme whether to consider only subtypes of the current input method.
+ * @param useRecency whether to use the recency order, or the static order.
+ * @param forward whether to search forwards to backwards in the list.
+ * @return the next input method and subtype if found, otherwise {@code null}.
+ */
+ @Nullable
+ public ImeSubtypeListItem next(@NonNull InputMethodInfo imi,
+ @Nullable InputMethodSubtype subtype, boolean onlyCurrentIme,
+ boolean useRecency, boolean forward) {
+ final int size = mItems.size();
+ if (size <= 1) {
+ return null;
+ }
+ final int index = getIndex(imi, subtype, useRecency);
+ if (index < 0) {
+ return null;
+ }
+
+ final int incrementSign = (forward ? 1 : -1);
+
+ for (int i = 1; i < size; i++) {
+ final int nextIndex = (index + i * incrementSign + size) % size;
+ final int mappedIndex = useRecency ? mRecencyMap[nextIndex] : nextIndex;
+ final var nextItem = mItems.get(mappedIndex);
+ if (!onlyCurrentIme || nextItem.mImi.equals(imi)) {
+ return nextItem;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Sets the given input method and subtype as the most recent one.
+ *
+ * @param imi the input method to set as the most recent.
+ * @param subtype the input method subtype to set as the most recent, if any.
+ * @return {@code true} if the recency was updated, otherwise {@code false}.
+ */
+ public boolean setMostRecent(@NonNull InputMethodInfo imi,
+ @Nullable InputMethodSubtype subtype) {
+ if (mItems.size() <= 1) {
+ return false;
+ }
+
+ final int recencyIndex = getIndex(imi, subtype, true /* useRecency */);
+ if (recencyIndex <= 0) {
+ // Already most recent or not found.
+ return false;
+ }
+ final int staticIndex = mRecencyMap[recencyIndex];
+ System.arraycopy(mRecencyMap, 0, mRecencyMap, 1, recencyIndex);
+ mRecencyMap[0] = staticIndex;
+ return true;
+ }
+
+ /**
+ * Gets the index of the given input method and subtype, in either recency or static order.
+ *
+ * @param imi the input method to get the index of.
+ * @param subtype the input method subtype to get the index of, if any.
+ * @param useRecency whether to get the index in the recency or static order.
+ * @return an index in either {@link #mItems} or {@link #mRecencyMap}, or {@code -1}
+ * if not found.
+ */
+ @IntRange(from = -1)
+ private int getIndex(@NonNull InputMethodInfo imi, @Nullable InputMethodSubtype subtype,
+ boolean useRecency) {
+ final int subtypeIndex = calculateSubtypeId(imi, subtype);
+ for (int i = 0; i < mItems.size(); i++) {
+ final int mappedIndex = useRecency ? mRecencyMap[i] : i;
+ final var item = mItems.get(mappedIndex);
+ if (item.mImi.equals(imi) && item.mSubtypeId == subtypeIndex) {
+ return i;
+ }
+ }
+ return -1;
+ }
+
+ /** Dumps the state of the list into the given printer. */
+ private void dump(@NonNull Printer pw, @NonNull String prefix) {
+ pw.println(prefix + "Static order:");
+ for (int i = 0; i < mItems.size(); ++i) {
+ final var item = mItems.get(i);
+ pw.println(prefix + "i=" + i + " item=" + item);
+ }
+ pw.println(prefix + "Recency order:");
+ for (int i = 0; i < mRecencyMap.length; ++i) {
+ final int index = mRecencyMap[i];
+ final var item = mItems.get(index);
+ pw.println(prefix + "i=" + i + " item=" + item);
+ }
+ }
+ }
+
@VisibleForTesting
public static class ControllerImpl {
@@ -392,10 +609,23 @@ final class InputMethodSubtypeSwitchingController {
private final DynamicRotationList mSwitchingAwareRotationList;
@NonNull
private final StaticRotationList mSwitchingUnawareRotationList;
+ /** List of input methods and subtypes. */
+ @Nullable
+ private final RotationList mRotationList;
+ /** List of input methods and subtypes suitable for hardware keyboards. */
+ @Nullable
+ private final RotationList mHardwareRotationList;
+
+ /**
+ * Whether there was a user action since the last input method and subtype switch.
+ * Used to determine the switching behaviour for {@link #MODE_AUTO}.
+ */
+ private boolean mUserActionSinceSwitch;
@NonNull
public static ControllerImpl createFrom(@Nullable ControllerImpl currentInstance,
- @NonNull List<ImeSubtypeListItem> sortedEnabledItems) {
+ @NonNull List<ImeSubtypeListItem> sortedEnabledItems,
+ @NonNull List<ImeSubtypeListItem> hardwareKeyboardItems) {
final var switchingAwareImeSubtypes = filterImeSubtypeList(sortedEnabledItems,
true /* supportsSwitchingToNextInputMethod */);
final var switchingUnawareImeSubtypes = filterImeSubtypeList(sortedEnabledItems,
@@ -421,22 +651,55 @@ final class InputMethodSubtypeSwitchingController {
switchingUnawareRotationList = new StaticRotationList(switchingUnawareImeSubtypes);
}
- return new ControllerImpl(switchingAwareRotationList, switchingUnawareRotationList);
+ final RotationList rotationList;
+ if (!Flags.imeSwitcherRevamp()) {
+ rotationList = null;
+ } else if (currentInstance != null && currentInstance.mRotationList != null
+ && Objects.equals(
+ currentInstance.mRotationList.mItems, sortedEnabledItems)) {
+ // Can reuse the current instance.
+ rotationList = currentInstance.mRotationList;
+ } else {
+ rotationList = new RotationList(sortedEnabledItems);
+ }
+
+ final RotationList hardwareRotationList;
+ if (!Flags.imeSwitcherRevamp()) {
+ hardwareRotationList = null;
+ } else if (currentInstance != null && currentInstance.mHardwareRotationList != null
+ && Objects.equals(
+ currentInstance.mHardwareRotationList.mItems, hardwareKeyboardItems)) {
+ // Can reuse the current instance.
+ hardwareRotationList = currentInstance.mHardwareRotationList;
+ } else {
+ hardwareRotationList = new RotationList(hardwareKeyboardItems);
+ }
+
+ return new ControllerImpl(switchingAwareRotationList, switchingUnawareRotationList,
+ rotationList, hardwareRotationList);
}
private ControllerImpl(@NonNull DynamicRotationList switchingAwareRotationList,
- @NonNull StaticRotationList switchingUnawareRotationList) {
+ @NonNull StaticRotationList switchingUnawareRotationList,
+ @Nullable RotationList rotationList,
+ @Nullable RotationList hardwareRotationList) {
mSwitchingAwareRotationList = switchingAwareRotationList;
mSwitchingUnawareRotationList = switchingUnawareRotationList;
+ mRotationList = rotationList;
+ mHardwareRotationList = hardwareRotationList;
}
@Nullable
public ImeSubtypeListItem getNextInputMethod(boolean onlyCurrentIme,
- @Nullable InputMethodInfo imi, @Nullable InputMethodSubtype subtype) {
+ @Nullable InputMethodInfo imi, @Nullable InputMethodSubtype subtype,
+ @SwitchMode int mode, boolean forward) {
if (imi == null) {
return null;
}
- if (imi.supportsSwitchingToNextInputMethod()) {
+ if (Flags.imeSwitcherRevamp() && mRotationList != null) {
+ return mRotationList.next(imi, subtype, onlyCurrentIme,
+ isRecency(mode, forward), forward);
+ } else if (imi.supportsSwitchingToNextInputMethod()) {
return mSwitchingAwareRotationList.getNextInputMethodLocked(onlyCurrentIme, imi,
subtype);
} else {
@@ -445,11 +708,66 @@ final class InputMethodSubtypeSwitchingController {
}
}
- public void onUserActionLocked(@NonNull InputMethodInfo imi,
+ @Nullable
+ public ImeSubtypeListItem getNextInputMethodForHardware(boolean onlyCurrentIme,
+ @NonNull InputMethodInfo imi, @Nullable InputMethodSubtype subtype,
+ @SwitchMode int mode, boolean forward) {
+ if (Flags.imeSwitcherRevamp() && mHardwareRotationList != null) {
+ return mHardwareRotationList.next(imi, subtype, onlyCurrentIme,
+ isRecency(mode, forward), forward);
+ }
+ return null;
+ }
+
+ /**
+ * Called when the user took an action that should update the recency of the current
+ * input method and subtype in the switching list.
+ *
+ * @param imi the currently selected input method.
+ * @param subtype the currently selected input method subtype, if any.
+ * @return {@code true} if the recency was updated, otherwise {@code false}.
+ * @see android.inputmethodservice.InputMethodServiceInternal#notifyUserActionIfNecessary()
+ */
+ public boolean onUserActionLocked(@NonNull InputMethodInfo imi,
@Nullable InputMethodSubtype subtype) {
- if (imi.supportsSwitchingToNextInputMethod()) {
+ boolean recencyUpdated = false;
+ if (Flags.imeSwitcherRevamp()) {
+ if (mRotationList != null) {
+ recencyUpdated |= mRotationList.setMostRecent(imi, subtype);
+ }
+ if (mHardwareRotationList != null) {
+ recencyUpdated |= mHardwareRotationList.setMostRecent(imi, subtype);
+ }
+ if (recencyUpdated) {
+ mUserActionSinceSwitch = true;
+ }
+ } else if (imi.supportsSwitchingToNextInputMethod()) {
mSwitchingAwareRotationList.onUserAction(imi, subtype);
}
+ return recencyUpdated;
+ }
+
+ /** Called when the input method and subtype was changed. */
+ public void onInputMethodSubtypeChanged() {
+ mUserActionSinceSwitch = false;
+ }
+
+ /**
+ * Whether the given mode and direction result in recency or static order.
+ *
+ * <p>{@link #MODE_AUTO} resolves to the recency order for the first forwards switch
+ * after an {@link #onUserActionLocked user action}, and otherwise to the static order.</p>
+ *
+ * @param mode the switching mode.
+ * @param forward the switching direction.
+ * @return {@code true} for the recency order, otherwise {@code false}.
+ */
+ private boolean isRecency(@SwitchMode int mode, boolean forward) {
+ if (mode == MODE_AUTO && mUserActionSinceSwitch && forward) {
+ return true;
+ } else {
+ return mode == MODE_RECENT;
+ }
}
@NonNull
@@ -473,6 +791,17 @@ final class InputMethodSubtypeSwitchingController {
mSwitchingAwareRotationList.dump(pw, prefix + " ");
pw.println(prefix + "mSwitchingUnawareRotationList:");
mSwitchingUnawareRotationList.dump(pw, prefix + " ");
+ if (Flags.imeSwitcherRevamp()) {
+ if (mRotationList != null) {
+ pw.println(prefix + "mRotationList:");
+ mRotationList.dump(pw, prefix + " ");
+ }
+ if (mHardwareRotationList != null) {
+ pw.println(prefix + "mHardwareRotationList:");
+ mHardwareRotationList.dump(pw, prefix + " ");
+ }
+ pw.println("User action since last switch: " + mUserActionSinceSwitch);
+ }
}
}
@@ -480,26 +809,71 @@ final class InputMethodSubtypeSwitchingController {
private ControllerImpl mController;
InputMethodSubtypeSwitchingController() {
- mController = ControllerImpl.createFrom(null, Collections.emptyList());
+ mController = ControllerImpl.createFrom(null, Collections.emptyList(),
+ Collections.emptyList());
}
+ /**
+ * Called when the user took an action that should update the recency of the current
+ * input method and subtype in the switching list.
+ *
+ * @param imi the currently selected input method.
+ * @param subtype the currently selected input method subtype, if any.
+ * @see android.inputmethodservice.InputMethodServiceInternal#notifyUserActionIfNecessary()
+ */
public void onUserActionLocked(@NonNull InputMethodInfo imi,
@Nullable InputMethodSubtype subtype) {
mController.onUserActionLocked(imi, subtype);
}
+ /** Called when the input method and subtype was changed. */
+ public void onInputMethodSubtypeChanged() {
+ mController.onInputMethodSubtypeChanged();
+ }
+
public void resetCircularListLocked(@NonNull Context context,
@NonNull InputMethodSettings settings) {
mController = ControllerImpl.createFrom(mController,
getSortedInputMethodAndSubtypeList(
false /* includeAuxiliarySubtypes */, false /* isScreenLocked */,
- false /* forImeMenu */, context, settings));
+ false /* forImeMenu */, context, settings),
+ getInputMethodAndSubtypeListForHardwareKeyboard(context, settings));
}
+ /**
+ * Gets the next input method and subtype, starting from the given ones, in the given direction.
+ *
+ * @param onlyCurrentIme whether to consider only subtypes of the current input method.
+ * @param imi the input method to find the next value from.
+ * @param subtype the input method subtype to find the next value from, if any.
+ * @param mode the switching mode.
+ * @param forward whether to search search forwards or backwards in the list.
+ * @return the next input method and subtype if found, otherwise {@code null}.
+ */
@Nullable
public ImeSubtypeListItem getNextInputMethodLocked(boolean onlyCurrentIme,
- @Nullable InputMethodInfo imi, @Nullable InputMethodSubtype subtype) {
- return mController.getNextInputMethod(onlyCurrentIme, imi, subtype);
+ @Nullable InputMethodInfo imi, @Nullable InputMethodSubtype subtype,
+ @SwitchMode int mode, boolean forward) {
+ return mController.getNextInputMethod(onlyCurrentIme, imi, subtype, mode, forward);
+ }
+
+ /**
+ * Gets the next input method and subtype suitable for hardware keyboards, starting from the
+ * given ones, in the given direction.
+ *
+ * @param onlyCurrentIme whether to consider only subtypes of the current input method.
+ * @param imi the input method to find the next value from.
+ * @param subtype the input method subtype to find the next value from, if any.
+ * @param mode the switching mode
+ * @param forward whether to search search forwards or backwards in the list.
+ * @return the next input method and subtype if found, otherwise {@code null}.
+ */
+ @Nullable
+ public ImeSubtypeListItem getNextInputMethodForHardware(boolean onlyCurrentIme,
+ @NonNull InputMethodInfo imi, @Nullable InputMethodSubtype subtype,
+ @SwitchMode int mode, boolean forward) {
+ return mController.getNextInputMethodForHardware(onlyCurrentIme, imi, subtype, mode,
+ forward);
}
public void dump(@NonNull Printer pw, @NonNull String prefix) {
diff --git a/services/core/java/com/android/server/inputmethod/OverlayableSystemBooleanResourceWrapper.java b/services/core/java/com/android/server/inputmethod/OverlayableSystemBooleanResourceWrapper.java
deleted file mode 100644
index 33e7a7621340..000000000000
--- a/services/core/java/com/android/server/inputmethod/OverlayableSystemBooleanResourceWrapper.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Copyright (C) 2022 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server.inputmethod;
-
-import static android.content.Intent.ACTION_OVERLAY_CHANGED;
-
-import android.annotation.AnyThread;
-import android.annotation.BoolRes;
-import android.annotation.NonNull;
-import android.annotation.UserHandleAware;
-import android.annotation.UserIdInt;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.content.pm.PackageManager;
-import android.os.Handler;
-import android.os.PatternMatcher;
-import android.util.Slog;
-
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicReference;
-import java.util.function.Consumer;
-
-/**
- * A wrapper object for any boolean resource defined in {@code "android"} package, in a way that is
- * aware of per-user Runtime Resource Overlay (RRO).
- */
-final class OverlayableSystemBooleanResourceWrapper implements AutoCloseable {
- private static final String TAG = "OverlayableSystemBooleanResourceWrapper";
-
- private static final String SYSTEM_PACKAGE_NAME = "android";
-
- @UserIdInt
- private final int mUserId;
- @NonNull
- private final AtomicBoolean mValueRef;
- @NonNull
- private final AtomicReference<Runnable> mCleanerRef;
-
- /**
- * Creates {@link OverlayableSystemBooleanResourceWrapper} for the given boolean resource ID
- * with a value change callback for the user associated with the {@link Context}.
- *
- * @param userContext The {@link Context} to be used to access the resource. This needs to be
- * associated with the right user because the Runtime Resource Overlay (RRO)
- * is per-user configuration.
- * @param boolResId The resource ID to be queried.
- * @param handler {@link Handler} to be used to dispatch {@code callback}.
- * @param callback The callback to be notified when the specified value might be updated.
- * The callback needs to take care of spurious wakeup. The value returned from
- * {@link #get()} may look to be exactly the same as the previously read value
- * e.g. when the value is changed from {@code false} to {@code true} to
- * {@code false} in a very short period of time, because {@link #get()} always
- * does volatile-read.
- * @return New {@link OverlayableSystemBooleanResourceWrapper}.
- */
- @NonNull
- @UserHandleAware
- static OverlayableSystemBooleanResourceWrapper create(@NonNull Context userContext,
- @BoolRes int boolResId, @NonNull Handler handler,
- @NonNull Consumer<OverlayableSystemBooleanResourceWrapper> callback) {
-
- // Note that we cannot fully trust this initial value due to the dead time between obtaining
- // the value here and setting up a broadcast receiver for change callback below.
- // We will refresh the value again later after setting up the change callback anyway.
- final AtomicBoolean valueRef = new AtomicBoolean(evaluate(userContext, boolResId));
-
- final AtomicReference<Runnable> cleanerRef = new AtomicReference<>();
-
- final OverlayableSystemBooleanResourceWrapper object =
- new OverlayableSystemBooleanResourceWrapper(userContext.getUserId(), valueRef,
- cleanerRef);
-
- final IntentFilter intentFilter = new IntentFilter(ACTION_OVERLAY_CHANGED);
- intentFilter.addDataScheme(IntentFilter.SCHEME_PACKAGE);
- intentFilter.addDataSchemeSpecificPart(SYSTEM_PACKAGE_NAME, PatternMatcher.PATTERN_LITERAL);
-
- final BroadcastReceiver broadcastReceiver = new BroadcastReceiver() {
- @Override
- public void onReceive(Context context, Intent intent) {
- final boolean newValue = evaluate(userContext, boolResId);
- if (newValue != valueRef.getAndSet(newValue)) {
- callback.accept(object);
- }
- }
- };
- userContext.registerReceiver(broadcastReceiver, intentFilter,
- null /* broadcastPermission */, handler,
- Context.RECEIVER_NOT_EXPORTED);
- cleanerRef.set(() -> userContext.unregisterReceiver(broadcastReceiver));
-
- // Make sure that the initial observable value is obtained after the change callback is set.
- valueRef.set(evaluate(userContext, boolResId));
- return object;
- }
-
- private OverlayableSystemBooleanResourceWrapper(@UserIdInt int userId,
- @NonNull AtomicBoolean valueRef, @NonNull AtomicReference<Runnable> cleanerRef) {
- mUserId = userId;
- mValueRef = valueRef;
- mCleanerRef = cleanerRef;
- }
-
- /**
- * @return The boolean resource value.
- */
- @AnyThread
- boolean get() {
- return mValueRef.get();
- }
-
- /**
- * @return The user ID associated with this resource reader.
- */
- @AnyThread
- @UserIdInt
- int getUserId() {
- return mUserId;
- }
-
- @AnyThread
- private static boolean evaluate(@NonNull Context context, @BoolRes int boolResId) {
- try {
- return context.getPackageManager()
- .getResourcesForApplication(SYSTEM_PACKAGE_NAME)
- .getBoolean(boolResId);
- } catch (PackageManager.NameNotFoundException e) {
- Slog.e(TAG, "getResourcesForApplication(\"" + SYSTEM_PACKAGE_NAME + "\") failed", e);
- return false;
- }
- }
-
- /**
- * Cleans up the callback.
- */
- @AnyThread
- @Override
- public void close() {
- final Runnable cleaner = mCleanerRef.getAndSet(null);
- if (cleaner != null) {
- cleaner.run();
- }
- }
-}
diff --git a/services/core/java/com/android/server/inputmethod/SecureSettingsWrapper.java b/services/core/java/com/android/server/inputmethod/SecureSettingsWrapper.java
index 4764e4fadd6e..e7cff20ea2cb 100644
--- a/services/core/java/com/android/server/inputmethod/SecureSettingsWrapper.java
+++ b/services/core/java/com/android/server/inputmethod/SecureSettingsWrapper.java
@@ -20,10 +20,7 @@ import android.annotation.AnyThread;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.UserIdInt;
-import android.app.ActivityManagerInternal;
import android.content.ContentResolver;
-import android.content.Context;
-import android.content.pm.UserInfo;
import android.provider.Settings;
import android.util.ArrayMap;
import android.util.ArraySet;
@@ -321,30 +318,13 @@ final class SecureSettingsWrapper {
}
/**
- * Called when {@link InputMethodManagerService} is starting.
+ * Called when the system is starting.
*
- * @param context the {@link Context} to be used.
+ * @param contentResolver the {@link ContentResolver} to be used
*/
@AnyThread
- static void onStart(@NonNull Context context) {
- sContentResolver = context.getContentResolver();
-
- final int userId = LocalServices.getService(ActivityManagerInternal.class)
- .getCurrentUserId();
- final UserManagerInternal userManagerInternal =
- LocalServices.getService(UserManagerInternal.class);
- putOrGet(userId, createImpl(userManagerInternal, userId));
-
- userManagerInternal.addUserLifecycleListener(
- new UserManagerInternal.UserLifecycleListener() {
- @Override
- public void onUserRemoved(UserInfo user) {
- synchronized (sUserMap) {
- sUserMap.remove(userId);
- }
- }
- }
- );
+ static void setContentResolver(@NonNull ContentResolver contentResolver) {
+ sContentResolver = contentResolver;
}
/**
@@ -377,6 +357,18 @@ final class SecureSettingsWrapper {
}
/**
+ * Called when a user is being removed.
+ *
+ * @param userId the ID of the user whose storage is being removed.
+ */
+ @AnyThread
+ static void onUserRemoved(@UserIdInt int userId) {
+ synchronized (sUserMap) {
+ sUserMap.remove(userId);
+ }
+ }
+
+ /**
* Put the given string {@code value} to {@code key}.
*
* @param key a secure settings key.
diff --git a/services/core/java/com/android/server/inputmethod/UserData.java b/services/core/java/com/android/server/inputmethod/UserData.java
new file mode 100644
index 000000000000..be5732174b1d
--- /dev/null
+++ b/services/core/java/com/android/server/inputmethod/UserData.java
@@ -0,0 +1,155 @@
+/*
+ * 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.server.inputmethod;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.annotation.UserIdInt;
+import android.util.SparseArray;
+import android.view.inputmethod.EditorInfo;
+import android.view.inputmethod.ImeTracker;
+import android.window.ImeOnBackInvokedDispatcher;
+
+import com.android.internal.annotations.GuardedBy;
+import com.android.internal.inputmethod.IRemoteAccessibilityInputConnection;
+import com.android.internal.inputmethod.IRemoteInputConnection;
+
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+/** Placeholder for all IMMS user specific fields */
+final class UserData {
+ @UserIdInt
+ final int mUserId;
+
+ /**
+ * Tells whether {@link InputMethodManagerService.Lifecycle#initializeUsersAsync(int[])} is
+ * completed for this user or not.
+ */
+ @NonNull
+ final CountDownLatch mBackgroundLoadLatch = new CountDownLatch(1);
+
+ @NonNull
+ final InputMethodBindingController mBindingController;
+
+ @NonNull
+ final InputMethodSubtypeSwitchingController mSwitchingController =
+ new InputMethodSubtypeSwitchingController();
+
+ @NonNull
+ final HardwareKeyboardShortcutController mHardwareKeyboardShortcutController =
+ new HardwareKeyboardShortcutController();
+
+ /**
+ * Have we called mCurMethod.bindInput()?
+ */
+ @GuardedBy("ImfLock.class")
+ boolean mBoundToMethod = false;
+
+ /**
+ * Have we called bindInput() for accessibility services?
+ */
+ @GuardedBy("ImfLock.class")
+ boolean mBoundToAccessibility;
+
+ @GuardedBy("ImfLock.class")
+ @NonNull
+ ImeBindingState mImeBindingState = ImeBindingState.newEmptyState();
+
+ @GuardedBy("ImfLock.class")
+ @Nullable
+ ClientState mCurClient = null;
+
+ @GuardedBy("ImfLock.class")
+ boolean mInFullscreenMode;
+
+ /**
+ * The {@link IRemoteInputConnection} last provided by the current client.
+ */
+ @GuardedBy("ImfLock.class")
+ @Nullable
+ IRemoteInputConnection mCurInputConnection;
+
+ /**
+ * The {@link ImeOnBackInvokedDispatcher} last provided by the current client to
+ * receive {@link android.window.OnBackInvokedCallback}s forwarded from IME.
+ */
+ @GuardedBy("ImfLock.class")
+ @Nullable
+ ImeOnBackInvokedDispatcher mCurImeDispatcher;
+
+ /**
+ * The {@link IRemoteAccessibilityInputConnection} last provided by the current client.
+ */
+ @GuardedBy("ImfLock.class")
+ @Nullable
+ IRemoteAccessibilityInputConnection mCurRemoteAccessibilityInputConnection;
+
+ /**
+ * The {@link EditorInfo} last provided by the current client.
+ */
+ @GuardedBy("ImfLock.class")
+ @Nullable
+ EditorInfo mCurEditorInfo;
+
+ /**
+ * The token tracking the current IME show request that is waiting for a connection to an
+ * IME, otherwise {@code null}.
+ */
+ @GuardedBy("ImfLock.class")
+ @Nullable
+ ImeTracker.Token mCurStatsToken;
+
+ /**
+ * Currently enabled session.
+ */
+ @GuardedBy("ImfLock.class")
+ @Nullable
+ InputMethodManagerService.SessionState mEnabledSession;
+
+ @GuardedBy("ImfLock.class")
+ @Nullable
+ SparseArray<InputMethodManagerService.AccessibilitySessionState>
+ mEnabledAccessibilitySessions = new SparseArray<>();
+
+ /**
+ * A per-user cache of {@link InputMethodSettings#getEnabledInputMethodsStr()}.
+ */
+ @GuardedBy("ImfLock.class")
+ @NonNull
+ String mLastEnabledInputMethodsStr = "";
+
+ /**
+ * {@code true} when the IME is responsible for drawing the navigation bar and its buttons.
+ */
+ @NonNull
+ final AtomicBoolean mImeDrawsNavBar = new AtomicBoolean();
+
+ /**
+ * Intended to be instantiated only from this file.
+ */
+ UserData(@UserIdInt int userId,
+ @NonNull InputMethodBindingController bindingController) {
+ mUserId = userId;
+ mBindingController = bindingController;
+ }
+
+ @Override
+ public String toString() {
+ return "UserData{" + "mUserId=" + mUserId + '}';
+ }
+}
diff --git a/services/core/java/com/android/server/inputmethod/UserDataRepository.java b/services/core/java/com/android/server/inputmethod/UserDataRepository.java
index 59411ad71bc0..6f831cc29026 100644
--- a/services/core/java/com/android/server/inputmethod/UserDataRepository.java
+++ b/services/core/java/com/android/server/inputmethod/UserDataRepository.java
@@ -16,184 +16,68 @@
package com.android.server.inputmethod;
+import android.annotation.AnyThread;
import android.annotation.NonNull;
-import android.annotation.Nullable;
import android.annotation.UserIdInt;
-import android.content.pm.UserInfo;
-import android.os.Handler;
import android.util.SparseArray;
-import android.view.inputmethod.EditorInfo;
-import android.view.inputmethod.ImeTracker;
-import android.window.ImeOnBackInvokedDispatcher;
import com.android.internal.annotations.GuardedBy;
-import com.android.internal.inputmethod.IRemoteAccessibilityInputConnection;
-import com.android.internal.inputmethod.IRemoteInputConnection;
-import com.android.server.pm.UserManagerInternal;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
import java.util.function.Consumer;
import java.util.function.IntFunction;
final class UserDataRepository {
- @GuardedBy("ImfLock.class")
+ private final ReentrantReadWriteLock mUserDataLock = new ReentrantReadWriteLock();
+
+ @GuardedBy("mUserDataLock")
private final SparseArray<UserData> mUserData = new SparseArray<>();
private final IntFunction<InputMethodBindingController> mBindingControllerFactory;
- @GuardedBy("ImfLock.class")
+ @AnyThread
@NonNull
UserData getOrCreate(@UserIdInt int userId) {
- UserData userData = mUserData.get(userId);
- if (userData == null) {
- userData = new UserData(userId, mBindingControllerFactory.apply(userId));
- mUserData.put(userId, userData);
+ mUserDataLock.writeLock().lock();
+ try {
+ UserData userData = mUserData.get(userId);
+ if (userData == null) {
+ userData = new UserData(userId, mBindingControllerFactory.apply(userId));
+ mUserData.put(userId, userData);
+ }
+ return userData;
+ } finally {
+ mUserDataLock.writeLock().unlock();
}
- return userData;
}
- @GuardedBy("ImfLock.class")
+ @AnyThread
void forAllUserData(Consumer<UserData> consumer) {
- for (int i = 0; i < mUserData.size(); i++) {
- consumer.accept(mUserData.valueAt(i));
+ final SparseArray<UserData> copiedArray;
+ mUserDataLock.readLock().lock();
+ try {
+ copiedArray = mUserData.clone();
+ } finally {
+ mUserDataLock.readLock().unlock();
+ }
+ for (int i = 0; i < copiedArray.size(); i++) {
+ consumer.accept(copiedArray.valueAt(i));
}
}
UserDataRepository(
- @NonNull Handler handler, @NonNull UserManagerInternal userManagerInternal,
@NonNull IntFunction<InputMethodBindingController> bindingControllerFactory) {
mBindingControllerFactory = bindingControllerFactory;
- userManagerInternal.addUserLifecycleListener(
- new UserManagerInternal.UserLifecycleListener() {
- @Override
- public void onUserRemoved(UserInfo user) {
- final int userId = user.id;
- handler.post(() -> {
- synchronized (ImfLock.class) {
- mUserData.remove(userId);
- }
- });
- }
-
- @Override
- public void onUserCreated(UserInfo user, Object unusedToken) {
- final int userId = user.id;
- handler.post(() -> {
- synchronized (ImfLock.class) {
- getOrCreate(userId);
- }
- });
- }
- });
}
- /** Placeholder for all IMMS user specific fields */
- static final class UserData {
- @UserIdInt
- final int mUserId;
-
- @NonNull
- final InputMethodBindingController mBindingController;
-
- @NonNull
- final InputMethodSubtypeSwitchingController mSwitchingController;
-
- @NonNull
- final HardwareKeyboardShortcutController mHardwareKeyboardShortcutController;
-
- /**
- * Have we called mCurMethod.bindInput()?
- */
- @GuardedBy("ImfLock.class")
- boolean mBoundToMethod = false;
-
- /**
- * Have we called bindInput() for accessibility services?
- */
- @GuardedBy("ImfLock.class")
- boolean mBoundToAccessibility;
-
- @GuardedBy("ImfLock.class")
- @NonNull
- ImeBindingState mImeBindingState = ImeBindingState.newEmptyState();
-
- @GuardedBy("ImfLock.class")
- @Nullable
- ClientState mCurClient = null;
-
- @GuardedBy("ImfLock.class")
- boolean mInFullscreenMode;
-
- /**
- * The {@link IRemoteInputConnection} last provided by the current client.
- */
- @GuardedBy("ImfLock.class")
- @Nullable
- IRemoteInputConnection mCurInputConnection;
-
- /**
- * The {@link ImeOnBackInvokedDispatcher} last provided by the current client to
- * receive {@link android.window.OnBackInvokedCallback}s forwarded from IME.
- */
- @GuardedBy("ImfLock.class")
- @Nullable
- ImeOnBackInvokedDispatcher mCurImeDispatcher;
-
- /**
- * The {@link IRemoteAccessibilityInputConnection} last provided by the current client.
- */
- @GuardedBy("ImfLock.class")
- @Nullable
- IRemoteAccessibilityInputConnection mCurRemoteAccessibilityInputConnection;
-
- /**
- * The {@link EditorInfo} last provided by the current client.
- */
- @GuardedBy("ImfLock.class")
- @Nullable
- EditorInfo mCurEditorInfo;
-
- /**
- * The token tracking the current IME show request that is waiting for a connection to an
- * IME, otherwise {@code null}.
- */
- @GuardedBy("ImfLock.class")
- @Nullable
- ImeTracker.Token mCurStatsToken;
-
- /**
- * Currently enabled session.
- */
- @GuardedBy("ImfLock.class")
- @Nullable
- InputMethodManagerService.SessionState mEnabledSession;
-
- @GuardedBy("ImfLock.class")
- @Nullable
- SparseArray<InputMethodManagerService.AccessibilitySessionState>
- mEnabledAccessibilitySessions = new SparseArray<>();
-
- /**
- * A per-user cache of {@link InputMethodSettings#getEnabledInputMethodsStr()}.
- */
- @GuardedBy("ImfLock.class")
- @NonNull
- String mLastEnabledInputMethodsStr = "";
-
- /**
- * Intended to be instantiated only from this file.
- */
- private UserData(@UserIdInt int userId,
- @NonNull InputMethodBindingController bindingController) {
- mUserId = userId;
- mBindingController = bindingController;
- mSwitchingController = new InputMethodSubtypeSwitchingController();
- mHardwareKeyboardShortcutController = new HardwareKeyboardShortcutController();
- }
-
- @Override
- public String toString() {
- return "UserData{" + "mUserId=" + mUserId + '}';
+ @AnyThread
+ void remove(@UserIdInt int userId) {
+ mUserDataLock.writeLock().lock();
+ try {
+ mUserData.remove(userId);
+ } finally {
+ mUserDataLock.writeLock().unlock();
}
}
}
diff --git a/services/core/java/com/android/server/inputmethod/ZeroJankProxy.java b/services/core/java/com/android/server/inputmethod/ZeroJankProxy.java
index 41aac32ad08f..770e12d8e49a 100644
--- a/services/core/java/com/android/server/inputmethod/ZeroJankProxy.java
+++ b/services/core/java/com/android/server/inputmethod/ZeroJankProxy.java
@@ -296,6 +296,12 @@ final class ZeroJankProxy implements IInputMethodManagerImpl.Callback {
return mInner.isInputMethodPickerShownForTest();
}
+ @IInputMethodManagerImpl.PermissionVerified(Manifest.permission.WRITE_SECURE_SETTINGS)
+ @Override
+ public void onImeSwitchButtonClickFromSystem(int displayId) {
+ mInner.onImeSwitchButtonClickFromSystem(displayId);
+ }
+
@Override
public InputMethodSubtype getCurrentInputMethodSubtype(int userId) {
return mInner.getCurrentInputMethodSubtype(userId);
diff --git a/services/core/java/com/android/server/locales/LocaleManagerService.java b/services/core/java/com/android/server/locales/LocaleManagerService.java
index 4851a81d3b69..741513cf3c0b 100644
--- a/services/core/java/com/android/server/locales/LocaleManagerService.java
+++ b/services/core/java/com/android/server/locales/LocaleManagerService.java
@@ -48,6 +48,7 @@ import android.util.AtomicFile;
import android.util.Slog;
import android.util.Xml;
+import com.android.internal.annotations.KeepForWeakReference;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.content.PackageMonitor;
import com.android.internal.util.FrameworkStatsLog;
@@ -100,6 +101,7 @@ public class LocaleManagerService extends SystemService {
private LocaleManagerBackupHelper mBackupHelper;
+ @KeepForWeakReference
private final PackageMonitor mPackageMonitor;
private final Object mWriteLock = new Object();
@@ -614,9 +616,10 @@ public class LocaleManagerService extends SystemService {
LocaleConfig resLocaleConfig = null;
try {
resLocaleConfig = LocaleConfig.fromContextIgnoringOverride(
- mContext.createPackageContext(appPackageName, 0));
+ mContext.createPackageContextAsUser(appPackageName, /* flags= */ 0,
+ UserHandle.of(userId)));
} catch (PackageManager.NameNotFoundException e) {
- Slog.e(TAG, "Unknown package name " + appPackageName);
+ Slog.e(TAG, "Unknown package name " + appPackageName + " for user " + userId);
return;
}
final File file = getXmlFileNameForUser(appPackageName, userId);
diff --git a/services/core/java/com/android/server/location/LocationManagerService.java b/services/core/java/com/android/server/location/LocationManagerService.java
index 6e991b4db2b1..2e167efc4d81 100644
--- a/services/core/java/com/android/server/location/LocationManagerService.java
+++ b/services/core/java/com/android/server/location/LocationManagerService.java
@@ -376,6 +376,11 @@ public class LocationManagerService extends ILocationManager.Stub implements
mContext.getContentResolver(),
Settings.Global.LOCATION_ENABLE_STATIONARY_THROTTLE,
defaultStationaryThrottlingSetting) != 0;
+ if (Flags.disableStationaryThrottling() && !(
+ Flags.keepGnssStationaryThrottling() && enableStationaryThrottling
+ && GPS_PROVIDER.equals(manager.getName()))) {
+ enableStationaryThrottling = false;
+ }
if (enableStationaryThrottling) {
realProvider = new StationaryThrottlingLocationProvider(manager.getName(),
mInjector, realProvider);
diff --git a/services/core/java/com/android/server/location/altitude/AltitudeService.java b/services/core/java/com/android/server/location/altitude/AltitudeService.java
index 289d4a25f208..96540c225e23 100644
--- a/services/core/java/com/android/server/location/altitude/AltitudeService.java
+++ b/services/core/java/com/android/server/location/altitude/AltitudeService.java
@@ -25,6 +25,7 @@ import android.frameworks.location.altitude.IAltitudeService;
import android.location.Location;
import android.location.altitude.AltitudeConverter;
import android.os.RemoteException;
+import android.util.Log;
import com.android.server.SystemService;
@@ -38,6 +39,8 @@ import java.io.IOException;
*/
public class AltitudeService extends IAltitudeService.Stub {
+ private static final String TAG = "AltitudeService";
+
private final AltitudeConverter mAltitudeConverter = new AltitudeConverter();
private final Context mContext;
@@ -59,6 +62,7 @@ public class AltitudeService extends IAltitudeService.Stub {
try {
mAltitudeConverter.addMslAltitudeToLocation(mContext, location);
} catch (IOException e) {
+ Log.e(TAG, "", e);
response.success = false;
return response;
}
@@ -74,6 +78,7 @@ public class AltitudeService extends IAltitudeService.Stub {
try {
return mAltitudeConverter.getGeoidHeight(mContext, request);
} catch (IOException e) {
+ Log.e(TAG, "", e);
GetGeoidHeightResponse response = new GetGeoidHeightResponse();
response.success = false;
return response;
diff --git a/services/core/java/com/android/server/location/contexthub/ContextHubEventLogger.java b/services/core/java/com/android/server/location/contexthub/ContextHubEventLogger.java
index 058c1c8efda5..e1b1416169cd 100644
--- a/services/core/java/com/android/server/location/contexthub/ContextHubEventLogger.java
+++ b/services/core/java/com/android/server/location/contexthub/ContextHubEventLogger.java
@@ -16,10 +16,12 @@
package com.android.server.location.contexthub;
+import android.chre.flags.Flags;
import android.hardware.location.NanoAppMessage;
import android.util.Log;
import java.util.Collection;
+import java.util.Optional;
/**
* A class to log events and useful metrics within the Context Hub service.
@@ -149,10 +151,20 @@ public class ContextHubEventLogger {
*/
public final NanoAppMessage message;
+ /**
+ * the error code for the message
+ */
+ public Optional<Byte> errorCode;
+
public NanoappMessageEvent(long mTimeStampInMs, int mContextHubId,
NanoAppMessage mMessage, boolean mSuccess) {
super(mTimeStampInMs, mContextHubId, 0, mSuccess);
message = mMessage;
+ errorCode = Optional.empty();
+ }
+
+ public void setErrorCode(byte errorCode) {
+ this.errorCode = Optional.of(errorCode);
}
@Override
@@ -165,6 +177,8 @@ public class ContextHubEventLogger {
sb.append(message.toString());
sb.append(", success = ");
sb.append(success ? "true" : "false");
+ sb.append(", errorCode = ");
+ sb.append(errorCode.isPresent() ? errorCode.get() : "null");
sb.append(']');
return sb.toString();
}
@@ -312,6 +326,28 @@ public class ContextHubEventLogger {
}
/**
+ * Logs the status of a reliable message
+ *
+ * @param messageSequenceNumber the message sequence number
+ * @param errorCode the error code
+ */
+ public synchronized void logReliableMessageToNanoappStatus(
+ int messageSequenceNumber, byte errorCode) {
+ if (!Flags.reliableMessage()) {
+ return;
+ }
+
+ for (NanoappMessageEvent event : mMessageToNanoappQueue) {
+ if (event.message.isReliable()
+ && event.message.getMessageSequenceNumber()
+ == messageSequenceNumber) {
+ event.setErrorCode(errorCode);
+ break;
+ }
+ }
+ }
+
+ /**
* Logs a context hub restart event
*
* @param contextHubId the ID of the context hub
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 a0aad5215f00..3f4a9bb4d864 100644
--- a/services/core/java/com/android/server/location/contexthub/ContextHubService.java
+++ b/services/core/java/com/android/server/location/contexthub/ContextHubService.java
@@ -297,7 +297,10 @@ public class ContextHubService extends IContextHubService.Stub {
}
public boolean isExpired() {
- return mTimestamp + ContextHubTransactionManager.RELIABLE_MESSAGE_TIMEOUT.toNanos()
+ return mTimestamp
+ + ContextHubTransactionManager
+ .RELIABLE_MESSAGE_DUPLICATE_DETECTION_TIMEOUT
+ .toNanos()
< SystemClock.elapsedRealtimeNanos();
}
}
@@ -333,8 +336,14 @@ public class ContextHubService extends IContextHubService.Stub {
return new IContextHubClientCallback.Stub() {
private void finishCallback() {
try {
- IContextHubClient client = mDefaultClientMap.get(contextHubId);
- client.callbackFinished();
+ if (mDefaultClientMap != null && mDefaultClientMap.containsKey(contextHubId)) {
+ IContextHubClient client = mDefaultClientMap.get(contextHubId);
+ client.callbackFinished();
+ } else {
+ Log.e(TAG, "Default client not found for hub (ID = " + contextHubId + "): "
+ + mDefaultClientMap == null ? "map was null"
+ : "map did not contain the hub");
+ }
} catch (RemoteException e) {
Log.e(
TAG,
@@ -1087,6 +1096,8 @@ public class ContextHubService extends IContextHubService.Stub {
* @param messageDeliveryStatus The message delivery status to deliver.
*/
private void handleMessageDeliveryStatusCallback(MessageDeliveryStatus messageDeliveryStatus) {
+ ContextHubEventLogger.getInstance().logReliableMessageToNanoappStatus(
+ messageDeliveryStatus.messageSequenceNumber, messageDeliveryStatus.errorCode);
mTransactionManager.onMessageDeliveryResponse(messageDeliveryStatus.messageSequenceNumber,
messageDeliveryStatus.errorCode == ErrorCode.OK);
}
diff --git a/services/core/java/com/android/server/location/contexthub/ContextHubServiceTransaction.java b/services/core/java/com/android/server/location/contexthub/ContextHubServiceTransaction.java
index 2ec9bdb75349..3aea6d533295 100644
--- a/services/core/java/com/android/server/location/contexthub/ContextHubServiceTransaction.java
+++ b/services/core/java/com/android/server/location/contexthub/ContextHubServiceTransaction.java
@@ -33,11 +33,11 @@ abstract class ContextHubServiceTransaction {
@ContextHubTransaction.Type
private final int mTransactionType;
- private final Long mNanoAppId;
+ private final long mNanoAppId;
private final String mPackage;
- private final Integer mMessageSequenceNumber;
+ private final int mMessageSequenceNumber;
private long mNextRetryTime;
@@ -53,9 +53,9 @@ abstract class ContextHubServiceTransaction {
ContextHubServiceTransaction(int id, int type, String packageName) {
mTransactionId = id;
mTransactionType = type;
- mNanoAppId = null;
+ mNanoAppId = Long.MAX_VALUE;
mPackage = packageName;
- mMessageSequenceNumber = null;
+ mMessageSequenceNumber = Integer.MAX_VALUE;
mNextRetryTime = Long.MAX_VALUE;
mTimeoutTime = Long.MAX_VALUE;
mNumCompletedStartCalls = 0;
@@ -68,7 +68,7 @@ abstract class ContextHubServiceTransaction {
mTransactionType = type;
mNanoAppId = nanoAppId;
mPackage = packageName;
- mMessageSequenceNumber = null;
+ mMessageSequenceNumber = Integer.MAX_VALUE;
mNextRetryTime = Long.MAX_VALUE;
mTimeoutTime = Long.MAX_VALUE;
mNumCompletedStartCalls = 0;
@@ -79,7 +79,7 @@ abstract class ContextHubServiceTransaction {
int messageSequenceNumber, short hostEndpointId) {
mTransactionId = id;
mTransactionType = type;
- mNanoAppId = null;
+ mNanoAppId = Long.MAX_VALUE;
mPackage = packageName;
mMessageSequenceNumber = messageSequenceNumber;
mNextRetryTime = Long.MAX_VALUE;
@@ -131,7 +131,7 @@ abstract class ContextHubServiceTransaction {
return mTransactionType;
}
- Integer getMessageSequenceNumber() {
+ int getMessageSequenceNumber() {
return mMessageSequenceNumber;
}
@@ -204,14 +204,14 @@ abstract class ContextHubServiceTransaction {
out.append(ContextHubTransaction.typeToString(mTransactionType,
/* upperCase= */ true));
out.append(" (");
- if (mNanoAppId != null) {
+ if (mNanoAppId != Long.MAX_VALUE) {
out.append("appId = 0x");
out.append(Long.toHexString(mNanoAppId));
out.append(", ");
}
out.append("package = ");
out.append(mPackage);
- if (mMessageSequenceNumber != null) {
+ if (mMessageSequenceNumber != Integer.MAX_VALUE) {
out.append(", messageSequenceNumber = ");
out.append(mMessageSequenceNumber);
}
diff --git a/services/core/java/com/android/server/location/contexthub/ContextHubTestModeManager.java b/services/core/java/com/android/server/location/contexthub/ContextHubTestModeManager.java
index e50324eb7c83..2bb3be6a3332 100644
--- a/services/core/java/com/android/server/location/contexthub/ContextHubTestModeManager.java
+++ b/services/core/java/com/android/server/location/contexthub/ContextHubTestModeManager.java
@@ -17,10 +17,12 @@
package com.android.server.location.contexthub;
import android.chre.flags.Flags;
+import android.hardware.location.ContextHubTransaction;
import android.hardware.location.NanoAppMessage;
import android.util.Log;
-import java.util.Random;
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.concurrent.Callable;
/**
* A class to manage behaviors during test mode. This is used for testing.
@@ -29,30 +31,31 @@ import java.util.Random;
public class ContextHubTestModeManager {
private static final String TAG = "ContextHubTestModeManager";
- /** Probability (in percent) of duplicating a message. */
- private static final int MESSAGE_DROP_PROBABILITY_PERCENT = 20;
+ private static final int DROP_MESSAGE_TO_HOST_EVENT = 0;
+ private static final int DROP_MESSAGE_TO_CONTEXT_HUB_EVENT = 1;
+ private static final int DUPLICATE_MESSAGE_TO_HOST_EVENT = 2;
+ private static final int DUPLICATE_MESSAGE_TO_CONTEXT_HUB_EVENT = 3;
+ private static final int NUMBER_OF_EVENTS = 4;
- /** Probability (in percent) of duplicating a message. */
- private static final int MESSAGE_DUPLICATION_PROBABILITY_PERCENT = 20;
-
- /** The number of total messages to send when the duplicate event happens. */
+ /** The number of total messages to send when the duplication event happens. */
private static final int NUM_MESSAGES_TO_DUPLICATE = 3;
- /** A probability percent for a certain event. */
- private static final int MAX_PROBABILITY_PERCENT = 100;
-
- private final Random mRandom = new Random();
+ /** The counter to track the number of interactions with the test mode manager. */
+ private final AtomicLong mCounter = new AtomicLong(0);
/**
* @return whether the message was handled
* @see ContextHubServiceCallback#handleNanoappMessage
*/
public boolean handleNanoappMessage(Runnable handleMessage, NanoAppMessage message) {
+ if (!message.isReliable()) {
+ return false;
+ }
+
+ long counterValue = mCounter.getAndIncrement();
if (Flags.reliableMessageDuplicateDetectionService()
- && message.isReliable()
- && mRandom.nextInt(MAX_PROBABILITY_PERCENT)
- < MESSAGE_DUPLICATION_PROBABILITY_PERCENT) {
- Log.i(TAG, "[TEST MODE] Duplicating message ("
+ && counterValue % NUMBER_OF_EVENTS == DUPLICATE_MESSAGE_TO_HOST_EVENT) {
+ Log.i(TAG, "[TEST MODE] Duplicating message to host ("
+ NUM_MESSAGES_TO_DUPLICATE
+ " sends) with message sequence number: "
+ message.getMessageSequenceNumber());
@@ -61,6 +64,14 @@ public class ContextHubTestModeManager {
}
return true;
}
+
+ if (counterValue % NUMBER_OF_EVENTS == DROP_MESSAGE_TO_HOST_EVENT) {
+ Log.i(TAG, "[TEST MODE] Dropping message to host with "
+ + "message sequence number: "
+ + message.getMessageSequenceNumber());
+ return true;
+ }
+
return false;
}
@@ -68,15 +79,39 @@ public class ContextHubTestModeManager {
* @return whether the message was handled
* @see IContextHubWrapper#sendMessageToContextHub
*/
- public boolean sendMessageToContextHub(NanoAppMessage message) {
+ public boolean sendMessageToContextHub(Callable<Integer> sendMessage, NanoAppMessage message) {
+ if (!message.isReliable()) {
+ return false;
+ }
+
+ long counterValue = mCounter.getAndIncrement();
+ if (counterValue % NUMBER_OF_EVENTS == DUPLICATE_MESSAGE_TO_CONTEXT_HUB_EVENT) {
+ Log.i(TAG, "[TEST MODE] Duplicating message to the Context Hub ("
+ + NUM_MESSAGES_TO_DUPLICATE
+ + " sends) with message sequence number: "
+ + message.getMessageSequenceNumber());
+ for (int i = 0; i < NUM_MESSAGES_TO_DUPLICATE; ++i) {
+ try {
+ int result = sendMessage.call();
+ if (result != ContextHubTransaction.RESULT_SUCCESS) {
+ Log.e(TAG, "sendMessage returned an error: " + result);
+ }
+ } catch (Exception e) {
+ Log.e(TAG, "Exception in sendMessageToContextHub: "
+ + e.getMessage());
+ }
+ }
+ return true;
+ }
+
if (Flags.reliableMessageRetrySupportService()
- && message.isReliable()
- && mRandom.nextInt(MAX_PROBABILITY_PERCENT)
- < MESSAGE_DROP_PROBABILITY_PERCENT) {
- Log.i(TAG, "[TEST MODE] Dropping message with message sequence number: "
+ && counterValue % NUMBER_OF_EVENTS == DROP_MESSAGE_TO_CONTEXT_HUB_EVENT) {
+ Log.i(TAG, "[TEST MODE] Dropping message to the Context Hub with "
+ + "message sequence number: "
+ message.getMessageSequenceNumber());
return true;
}
+
return false;
}
}
diff --git a/services/core/java/com/android/server/location/contexthub/ContextHubTransactionManager.java b/services/core/java/com/android/server/location/contexthub/ContextHubTransactionManager.java
index 1a449e024ee1..cd69ebaba766 100644
--- a/services/core/java/com/android/server/location/contexthub/ContextHubTransactionManager.java
+++ b/services/core/java/com/android/server/location/contexthub/ContextHubTransactionManager.java
@@ -56,6 +56,9 @@ import java.util.concurrent.atomic.AtomicInteger;
public static final Duration RELIABLE_MESSAGE_TIMEOUT = Duration.ofSeconds(1);
+ public static final Duration RELIABLE_MESSAGE_DUPLICATE_DETECTION_TIMEOUT =
+ RELIABLE_MESSAGE_TIMEOUT.multipliedBy(3);
+
private static final int MAX_PENDING_REQUESTS = 10000;
private static final int RELIABLE_MESSAGE_MAX_NUM_RETRY = 3;
@@ -474,9 +477,8 @@ import java.util.concurrent.atomic.AtomicInteger;
return;
}
- Integer transactionMessageSequenceNumber = transaction.getMessageSequenceNumber();
+ int transactionMessageSequenceNumber = transaction.getMessageSequenceNumber();
if (transaction.getTransactionType() != ContextHubTransaction.TYPE_RELIABLE_MESSAGE
- || transactionMessageSequenceNumber == null
|| transactionMessageSequenceNumber != messageSequenceNumber) {
Log.w(TAG, "Received unexpected message transaction response (expected message "
+ "sequence number = "
@@ -494,7 +496,8 @@ import java.util.concurrent.atomic.AtomicInteger;
ContextHubServiceTransaction transaction =
mReliableMessageTransactionMap.get(messageSequenceNumber);
if (transaction == null) {
- Log.w(TAG, "Could not find reliable message transaction with message sequence number"
+ Log.w(TAG, "Could not find reliable message transaction with "
+ + "message sequence number = "
+ messageSequenceNumber);
return;
}
diff --git a/services/core/java/com/android/server/location/contexthub/IContextHubWrapper.java b/services/core/java/com/android/server/location/contexthub/IContextHubWrapper.java
index 4fc3d8715a88..a8ad41853d34 100644
--- a/services/core/java/com/android/server/location/contexthub/IContextHubWrapper.java
+++ b/services/core/java/com/android/server/location/contexthub/IContextHubWrapper.java
@@ -53,6 +53,7 @@ import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Set;
import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.Callable;
/**
* @hide
@@ -659,32 +660,40 @@ public abstract class IContextHubWrapper {
@ContextHubTransaction.Result
public int sendMessageToContextHub(short hostEndpointId, int contextHubId,
- NanoAppMessage message) throws RemoteException {
+ NanoAppMessage message) {
android.hardware.contexthub.IContextHub hub = getHub();
if (hub == null) {
return ContextHubTransaction.RESULT_FAILED_BAD_PARAMS;
}
- try {
- var msg = ContextHubServiceUtil.createAidlContextHubMessage(
- hostEndpointId, message);
-
- // Only process the message normally if not using test mode manager or if
- // the test mode manager call returned false as this indicates it did not
- // process the message.
- boolean useTestModeManager = Flags.reliableMessageImplementation()
- && Flags.reliableMessageTestModeBehavior()
- && mIsTestModeEnabled.get();
- if (!useTestModeManager || !mTestModeManager.sendMessageToContextHub(message)) {
+ Callable<Integer> sendMessage = () -> {
+ try {
+ var msg = ContextHubServiceUtil.createAidlContextHubMessage(
+ hostEndpointId, message);
hub.sendMessageToHub(contextHubId, msg);
+ return ContextHubTransaction.RESULT_SUCCESS;
+ } catch (RemoteException | ServiceSpecificException e) {
+ return ContextHubTransaction.RESULT_FAILED_UNKNOWN;
+ } catch (IllegalArgumentException e) {
+ return ContextHubTransaction.RESULT_FAILED_BAD_PARAMS;
+ }
+ };
+
+ // Only process the message normally if not using test mode manager or if
+ // the test mode manager call returned false as this indicates it did not
+ // process the message.
+ boolean useTestModeManager = Flags.reliableMessageImplementation()
+ && Flags.reliableMessageTestModeBehavior()
+ && mIsTestModeEnabled.get();
+ if (!useTestModeManager || !mTestModeManager.sendMessageToContextHub(
+ sendMessage, message)) {
+ try {
+ return sendMessage.call();
+ } catch (Exception e) {
+ return ContextHubTransaction.RESULT_FAILED_UNKNOWN;
}
-
- return ContextHubTransaction.RESULT_SUCCESS;
- } catch (RemoteException | ServiceSpecificException e) {
- return ContextHubTransaction.RESULT_FAILED_UNKNOWN;
- } catch (IllegalArgumentException e) {
- return ContextHubTransaction.RESULT_FAILED_BAD_PARAMS;
}
+ return ContextHubTransaction.RESULT_SUCCESS;
}
@ContextHubTransaction.Result
diff --git a/services/core/java/com/android/server/locksettings/LockSettingsShellCommand.java b/services/core/java/com/android/server/locksettings/LockSettingsShellCommand.java
index 17f2fcc5b9d8..bb35b378866b 100644
--- a/services/core/java/com/android/server/locksettings/LockSettingsShellCommand.java
+++ b/services/core/java/com/android/server/locksettings/LockSettingsShellCommand.java
@@ -340,6 +340,11 @@ class LockSettingsShellCommand extends ShellCommand {
getOutPrintWriter().println("Profile uses unified challenge");
return false;
}
+ if (mOld.isEmpty()) {
+ getOutPrintWriter().println(
+ "User has a lock credential, but old credential was not provided");
+ return false;
+ }
try {
final boolean result = mLockPatternUtils.checkCredential(getOldCredential(),
diff --git a/services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java b/services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java
index ba7d3b8c76d2..d9f36223c6dd 100644
--- a/services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java
+++ b/services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java
@@ -251,6 +251,10 @@ class MediaRouter2ServiceImpl {
systemRoutes = providerInfo.getRoutes();
} else {
systemRoutes = Collections.emptyList();
+ Slog.e(
+ TAG,
+ "Returning empty system routes list because "
+ + "system provider has null providerInfo.");
}
} else {
systemRoutes = new ArrayList<>();
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 e3d5c54f1d5e..621c090d37b8 100644
--- a/services/core/java/com/android/server/media/projection/MediaProjectionManagerService.java
+++ b/services/core/java/com/android/server/media/projection/MediaProjectionManagerService.java
@@ -17,6 +17,7 @@
package com.android.server.media.projection;
import static android.Manifest.permission.MANAGE_MEDIA_PROJECTION;
+import static android.Manifest.permission.RECORD_SENSITIVE_CONTENT;
import static android.app.ActivityManagerInternal.MEDIA_PROJECTION_TOKEN_EVENT_CREATED;
import static android.app.ActivityManagerInternal.MEDIA_PROJECTION_TOKEN_EVENT_DESTROYED;
import static android.content.Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS;
@@ -34,10 +35,12 @@ import android.Manifest;
import android.annotation.EnforcePermission;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.RequiresPermission;
import android.app.ActivityManagerInternal;
import android.app.ActivityOptions.LaunchCookie;
import android.app.AppOpsManager;
import android.app.IProcessObserver;
+import android.app.KeyguardManager;
import android.app.compat.CompatChanges;
import android.compat.annotation.ChangeId;
import android.compat.annotation.EnabledSince;
@@ -78,6 +81,7 @@ import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.util.ArrayUtils;
import com.android.internal.util.DumpUtils;
import com.android.server.LocalServices;
+import com.android.server.SystemConfig;
import com.android.server.SystemService;
import com.android.server.Watchdog;
import com.android.server.wm.WindowManagerInternal;
@@ -132,6 +136,7 @@ public final class MediaProjectionManagerService extends SystemService
private final ActivityManagerInternal mActivityManagerInternal;
private final PackageManager mPackageManager;
private final WindowManagerInternal mWmInternal;
+ private final KeyguardManager mKeyguardManager;
private final MediaRouter mMediaRouter;
private final MediaRouterCallback mMediaRouterCallback;
@@ -147,7 +152,9 @@ public final class MediaProjectionManagerService extends SystemService
this(context, new Injector());
}
- @VisibleForTesting MediaProjectionManagerService(Context context, Injector injector) {
+ @RequiresPermission(Manifest.permission.SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE)
+ @VisibleForTesting
+ MediaProjectionManagerService(Context context, Injector injector) {
super(context);
mContext = context;
mInjector = injector;
@@ -163,9 +170,47 @@ public final class MediaProjectionManagerService extends SystemService
mMediaRouter = (MediaRouter) mContext.getSystemService(Context.MEDIA_ROUTER_SERVICE);
mMediaRouterCallback = new MediaRouterCallback();
mMediaProjectionMetricsLogger = injector.mediaProjectionMetricsLogger(context);
+ mKeyguardManager = (KeyguardManager) mContext.getSystemService(Context.KEYGUARD_SERVICE);
+ mKeyguardManager.addKeyguardLockedStateListener(
+ mContext.getMainExecutor(), this::onKeyguardLockedStateChanged);
Watchdog.getInstance().addMonitor(this);
}
+ /**
+ * In order to record the keyguard, the MediaProjection package must be either:
+ * - a holder of RECORD_SENSITIVE_CONTENT permission, or
+ * - be one of the bugreport whitelisted packages
+ */
+ private boolean canCaptureKeyguard() {
+ if (!android.companion.virtualdevice.flags.Flags.mediaProjectionKeyguardRestrictions()) {
+ return true;
+ }
+ synchronized (mLock) {
+ if (mProjectionGrant == null || mProjectionGrant.packageName == null) {
+ return false;
+ }
+ if (mPackageManager.checkPermission(RECORD_SENSITIVE_CONTENT,
+ mProjectionGrant.packageName)
+ == PackageManager.PERMISSION_GRANTED) {
+ return true;
+ }
+ return SystemConfig.getInstance().getBugreportWhitelistedPackages()
+ .contains(mProjectionGrant.packageName);
+ }
+ }
+
+ @VisibleForTesting
+ void onKeyguardLockedStateChanged(boolean isKeyguardLocked) {
+ if (!isKeyguardLocked) return;
+ synchronized (mLock) {
+ if (mProjectionGrant != null && !canCaptureKeyguard()) {
+ Slog.d(TAG, "Content Recording: Stopped MediaProjection"
+ + " due to keyguard lock");
+ mProjectionGrant.stop();
+ }
+ }
+ }
+
/** Functional interface for providing time. */
@VisibleForTesting
interface Clock {
@@ -657,7 +702,7 @@ public final class MediaProjectionManagerService extends SystemService
}
}
- private final class BinderService extends IMediaProjectionManager.Stub {
+ final class BinderService extends IMediaProjectionManager.Stub {
BinderService(Context context) {
super(PermissionEnforcer.fromContext(context));
@@ -846,6 +891,13 @@ public final class MediaProjectionManagerService extends SystemService
@Override
public void requestConsentForInvalidProjection(@NonNull IMediaProjection projection) {
requestConsentForInvalidProjection_enforcePermission();
+
+ if (android.companion.virtualdevice.flags.Flags.mediaProjectionKeyguardRestrictions()
+ && mKeyguardManager.isKeyguardLocked()) {
+ Slog.v(TAG, "Reusing token: Won't request consent while the keyguard is locked");
+ return;
+ }
+
synchronized (mLock) {
if (!isCurrentProjection(projection)) {
Slog.v(TAG, "Reusing token: Won't request consent again for a token that "
@@ -1252,6 +1304,11 @@ public final class MediaProjectionManagerService extends SystemService
@Override
public void notifyVirtualDisplayCreated(int displayId) {
notifyVirtualDisplayCreated_enforcePermission();
+ if (mKeyguardManager.isKeyguardLocked() && !canCaptureKeyguard()) {
+ Slog.w(TAG, "Content Recording: Keyguard locked, aborting MediaProjection");
+ stop();
+ return;
+ }
synchronized (mLock) {
mVirtualDisplayId = displayId;
diff --git a/services/core/java/com/android/server/net/NetworkManagementService.java b/services/core/java/com/android/server/net/NetworkManagementService.java
index 5ea3e70f7957..74f0d9cf3e39 100644
--- a/services/core/java/com/android/server/net/NetworkManagementService.java
+++ b/services/core/java/com/android/server/net/NetworkManagementService.java
@@ -81,8 +81,6 @@ import com.android.internal.annotations.GuardedBy;
import com.android.internal.app.IBatteryStats;
import com.android.internal.util.DumpUtils;
import com.android.internal.util.HexDump;
-import com.android.modules.utils.build.SdkLevel;
-import com.android.net.module.util.NetdUtils;
import com.android.net.module.util.PermissionUtils;
import com.android.server.FgThread;
import com.android.server.LocalServices;
@@ -833,144 +831,6 @@ public class NetworkManagementService extends INetworkManagementService.Stub {
}
@Override
- public boolean getIpForwardingEnabled() throws IllegalStateException{
- PermissionUtils.enforceNetworkStackPermission(mContext);
- if (SdkLevel.isAtLeastV()) {
- throw new UnsupportedOperationException(
- "NMS#getIpForwardingEnabled not supported in V+");
- }
- try {
- return mNetdService.ipfwdEnabled();
- } catch (RemoteException | ServiceSpecificException e) {
- throw new IllegalStateException(e);
- }
- }
-
- @Override
- public void setIpForwardingEnabled(boolean enable) {
- PermissionUtils.enforceNetworkStackPermission(mContext);
- if (SdkLevel.isAtLeastV()) {
- throw new UnsupportedOperationException(
- "NMS#setIpForwardingEnabled not supported in V+");
- } try {
- if (enable) {
- mNetdService.ipfwdEnableForwarding("tethering");
- } else {
- mNetdService.ipfwdDisableForwarding("tethering");
- }
- } catch (RemoteException | ServiceSpecificException e) {
- throw new IllegalStateException(e);
- }
- }
-
- @Override
- public void startTethering(String[] dhcpRange) {
- PermissionUtils.enforceNetworkStackPermission(mContext);
- if (SdkLevel.isAtLeastV()) {
- throw new UnsupportedOperationException("NMS#startTethering not supported in V+");
- }
- try {
- NetdUtils.tetherStart(mNetdService, true /* usingLegacyDnsProxy */, dhcpRange);
- } catch (RemoteException | ServiceSpecificException e) {
- throw new IllegalStateException(e);
- }
- }
-
- @Override
- public void stopTethering() {
- PermissionUtils.enforceNetworkStackPermission(mContext);
- if (SdkLevel.isAtLeastV()) {
- throw new UnsupportedOperationException("NMS#stopTethering not supported in V+");
- }
- try {
- mNetdService.tetherStop();
- } catch (RemoteException | ServiceSpecificException e) {
- throw new IllegalStateException(e);
- }
- }
-
- @Override
- public boolean isTetheringStarted() {
- PermissionUtils.enforceNetworkStackPermission(mContext);
- if (SdkLevel.isAtLeastV()) {
- throw new UnsupportedOperationException("NMS#isTetheringStarted not supported in V+");
- }
- try {
- return mNetdService.tetherIsEnabled();
- } catch (RemoteException | ServiceSpecificException e) {
- throw new IllegalStateException(e);
- }
- }
-
- @Override
- public void tetherInterface(String iface) {
- PermissionUtils.enforceNetworkStackPermission(mContext);
- if (SdkLevel.isAtLeastV()) {
- throw new UnsupportedOperationException("NMS#tetherInterface not supported in V+");
- }
- try {
- final LinkAddress addr = getInterfaceConfig(iface).getLinkAddress();
- final IpPrefix dest = new IpPrefix(addr.getAddress(), addr.getPrefixLength());
- NetdUtils.tetherInterface(mNetdService, iface, dest);
- } catch (RemoteException | ServiceSpecificException e) {
- throw new IllegalStateException(e);
- }
- }
-
- @Override
- public void untetherInterface(String iface) {
- PermissionUtils.enforceNetworkStackPermission(mContext);
- if (SdkLevel.isAtLeastV()) {
- throw new UnsupportedOperationException("NMS#untetherInterface not supported in V+");
- }
- try {
- NetdUtils.untetherInterface(mNetdService, iface);
- } catch (RemoteException | ServiceSpecificException e) {
- throw new IllegalStateException(e);
- }
- }
-
- @Override
- public String[] listTetheredInterfaces() {
- PermissionUtils.enforceNetworkStackPermission(mContext);
- if (SdkLevel.isAtLeastV()) {
- throw new UnsupportedOperationException(
- "NMS#listTetheredInterfaces not supported in V+");
- }
- try {
- return mNetdService.tetherInterfaceList();
- } catch (RemoteException | ServiceSpecificException e) {
- throw new IllegalStateException(e);
- }
- }
-
- @Override
- public void enableNat(String internalInterface, String externalInterface) {
- PermissionUtils.enforceNetworkStackPermission(mContext);
- if (SdkLevel.isAtLeastV()) {
- throw new UnsupportedOperationException("NMS#enableNat not supported in V+");
- }
- try {
- mNetdService.tetherAddForward(internalInterface, externalInterface);
- } catch (RemoteException | ServiceSpecificException e) {
- throw new IllegalStateException(e);
- }
- }
-
- @Override
- public void disableNat(String internalInterface, String externalInterface) {
- PermissionUtils.enforceNetworkStackPermission(mContext);
- if (SdkLevel.isAtLeastV()) {
- throw new UnsupportedOperationException("NMS#disableNat not supported in V+");
- }
- try {
- mNetdService.tetherRemoveForward(internalInterface, externalInterface);
- } catch (RemoteException | ServiceSpecificException e) {
- throw new IllegalStateException(e);
- }
- }
-
- @Override
public void setInterfaceQuota(String iface, long quotaBytes) {
PermissionUtils.enforceNetworkStackPermission(mContext);
@@ -1126,30 +986,19 @@ public class NetworkManagementService extends INetworkManagementService.Stub {
}
Trace.traceBegin(Trace.TRACE_TAG_NETWORK, "setDataSaverModeEnabled");
try {
- if (SdkLevel.isAtLeastV()) {
- // setDataSaverEnabled throws if it fails to set data saver.
- mContext.getSystemService(ConnectivityManager.class)
- .setDataSaverEnabled(enable);
- mDataSaverMode = enable;
- if (mUseMeteredFirewallChains) {
- // Copy mDataSaverMode state to FIREWALL_CHAIN_METERED_ALLOW
- // until ConnectivityService allows manipulation of the data saver mode via
- // FIREWALL_CHAIN_METERED_ALLOW.
- synchronized (mRulesLock) {
- mFirewallChainStates.put(FIREWALL_CHAIN_METERED_ALLOW, enable);
- }
- }
- return true;
- } else {
- final boolean changed = mNetdService.bandwidthEnableDataSaver(enable);
- if (changed) {
- mDataSaverMode = enable;
- } else {
- Log.e(TAG, "setDataSaverMode(" + enable + "): failed to set iptables");
+ // setDataSaverEnabled throws if it fails to set data saver.
+ mContext.getSystemService(ConnectivityManager.class).setDataSaverEnabled(enable);
+ mDataSaverMode = enable;
+ if (mUseMeteredFirewallChains) {
+ // Copy mDataSaverMode state to FIREWALL_CHAIN_METERED_ALLOW
+ // until ConnectivityService allows manipulation of the data saver mode via
+ // FIREWALL_CHAIN_METERED_ALLOW.
+ synchronized (mRulesLock) {
+ mFirewallChainStates.put(FIREWALL_CHAIN_METERED_ALLOW, enable);
}
- return changed;
}
- } catch (RemoteException | IllegalStateException e) {
+ return true;
+ } catch (IllegalStateException e) {
Log.e(TAG, "setDataSaverMode(" + enable + "): failed with exception", e);
return false;
} finally {
diff --git a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
index d9e22c5a270f..53b67969e91a 100644
--- a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
+++ b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
@@ -4118,7 +4118,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
fout.increaseIndent();
for (int i = 0; i < mSubscriptionPlans.size(); i++) {
final int subId = mSubscriptionPlans.keyAt(i);
- fout.println("Subscriber ID " + subId + ":");
+ fout.println("Subscription ID " + subId + ":");
fout.increaseIndent();
final SubscriptionPlan[] plans = mSubscriptionPlans.valueAt(i);
if (!ArrayUtils.isEmpty(plans)) {
diff --git a/services/core/java/com/android/server/notification/NotificationAttentionHelper.java b/services/core/java/com/android/server/notification/NotificationAttentionHelper.java
index 614a0a59c691..5a9cf0326244 100644
--- a/services/core/java/com/android/server/notification/NotificationAttentionHelper.java
+++ b/services/core/java/com/android/server/notification/NotificationAttentionHelper.java
@@ -138,6 +138,7 @@ public final class NotificationAttentionHelper {
private final boolean mUseAttentionLight;
boolean mHasLight;
+ private final boolean mEnableNotificationAccessibilityEvents;
private final SettingsObserver mSettingsObserver;
@@ -190,6 +191,9 @@ public final class NotificationAttentionHelper {
mUseAttentionLight = resources.getBoolean(R.bool.config_useAttentionLight);
mHasLight =
resources.getBoolean(com.android.internal.R.bool.config_intrusiveNotificationLed);
+ mEnableNotificationAccessibilityEvents =
+ resources.getBoolean(
+ com.android.internal.R.bool.config_enableNotificationAccessibilityEvents);
// Don't start allowing notifications until the setup wizard has run once.
// After that, including subsequent boots, init with notifications turned on.
@@ -1030,7 +1034,7 @@ public final class NotificationAttentionHelper {
}
void sendAccessibilityEvent(NotificationRecord record) {
- if (!mAccessibilityManager.isEnabled()) {
+ if (!mAccessibilityManager.isEnabled() || !mEnableNotificationAccessibilityEvents) {
return;
}
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index 1c40f44b7b78..016abff88299 100644
--- a/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -110,8 +110,8 @@ import static android.service.notification.Adjustment.TYPE_PROMOTION;
import static android.service.notification.Adjustment.TYPE_SOCIAL_MEDIA;
import static android.service.notification.Flags.callstyleCallbackApi;
import static android.service.notification.Flags.notificationForceGrouping;
-import static android.service.notification.Flags.redactSensitiveNotificationsFromUntrustedListeners;
import static android.service.notification.Flags.redactSensitiveNotificationsBigTextStyle;
+import static android.service.notification.Flags.redactSensitiveNotificationsFromUntrustedListeners;
import static android.service.notification.NotificationListenerService.FLAG_FILTER_TYPE_ALERTING;
import static android.service.notification.NotificationListenerService.FLAG_FILTER_TYPE_CONVERSATIONS;
import static android.service.notification.NotificationListenerService.FLAG_FILTER_TYPE_ONGOING;
@@ -248,7 +248,6 @@ import android.content.pm.UserInfo;
import android.content.pm.VersionedPackage;
import android.content.res.Resources;
import android.database.ContentObserver;
-import android.graphics.drawable.Icon;
import android.metrics.LogMaker;
import android.net.Uri;
import android.os.Binder;
@@ -373,7 +372,6 @@ import com.android.server.wm.ActivityTaskManagerInternal;
import com.android.server.wm.BackgroundActivityStartCallback;
import com.android.server.wm.WindowManagerInternal;
-import java.util.function.BiPredicate;
import libcore.io.IoUtils;
import org.json.JSONException;
@@ -4634,29 +4632,28 @@ public class NotificationManagerService extends SystemService {
@Override
public List<String> getPackagesBypassingDnd(int userId,
- boolean includeConversationChannels) {
+ boolean includeConversationChannels) {
checkCallerIsSystem();
final ArraySet<String> packageNames = new ArraySet<>();
- for (int user : mUm.getProfileIds(userId, false)) {
- List<PackageInfo> pkgs = mPackageManagerClient.getInstalledPackagesAsUser(0, user);
- for (PackageInfo pi : pkgs) {
- String pkg = pi.packageName;
- // If any NotificationChannel for this package is bypassing, the
- // package is considered bypassing.
- for (NotificationChannel channel : getNotificationChannelsBypassingDnd(pkg,
- pi.applicationInfo.uid).getList()) {
- // Skips non-demoted conversation channels.
- if (!includeConversationChannels
- && !TextUtils.isEmpty(channel.getConversationId())
- && !channel.isDemoted()) {
- continue;
- }
- packageNames.add(pkg);
+ List<PackageInfo> pkgs = mPackageManagerClient.getInstalledPackagesAsUser(0, userId);
+ for (PackageInfo pi : pkgs) {
+ String pkg = pi.packageName;
+ // If any NotificationChannel for this package is bypassing, the
+ // package is considered bypassing.
+ for (NotificationChannel channel : getNotificationChannelsBypassingDnd(pkg,
+ pi.applicationInfo.uid).getList()) {
+ // Skips non-demoted conversation channels.
+ if (!includeConversationChannels
+ && !TextUtils.isEmpty(channel.getConversationId())
+ && !channel.isDemoted()) {
+ continue;
}
+ packageNames.add(pkg);
}
}
+
return new ArrayList<String>(packageNames);
}
@@ -8658,8 +8655,7 @@ public class NotificationManagerService extends SystemService {
mAttentionHelper.updateLightsLocked();
if (mShortcutHelper != null) {
mShortcutHelper.maybeListenForShortcutChangesForBubbles(r,
- true /* isRemoved */,
- mHandler);
+ true /* isRemoved */);
}
} else {
if (notificationForceGrouping()) {
@@ -9116,8 +9112,7 @@ public class NotificationManagerService extends SystemService {
if (mShortcutHelper != null) {
mShortcutHelper.maybeListenForShortcutChangesForBubbles(r,
- false /* isRemoved */,
- mHandler);
+ false /* isRemoved */);
}
maybeRecordInterruptionLocked(r);
diff --git a/services/core/java/com/android/server/notification/ShortcutHelper.java b/services/core/java/com/android/server/notification/ShortcutHelper.java
index 86dcecf9290a..857e3198d55b 100644
--- a/services/core/java/com/android/server/notification/ShortcutHelper.java
+++ b/services/core/java/com/android/server/notification/ShortcutHelper.java
@@ -27,7 +27,6 @@ import android.content.pm.LauncherApps;
import android.content.pm.ShortcutInfo;
import android.content.pm.ShortcutServiceInternal;
import android.os.Binder;
-import android.os.Handler;
import android.os.UserHandle;
import android.os.UserManager;
import android.text.TextUtils;
@@ -65,85 +64,34 @@ public class ShortcutHelper {
void onShortcutRemoved(String key);
}
+ private final ShortcutListener mShortcutListener;
private LauncherApps mLauncherAppsService;
- private ShortcutListener mShortcutListener;
private ShortcutServiceInternal mShortcutServiceInternal;
private UserManager mUserManager;
- // Key: packageName Value: <shortcutId, notifId>
- private HashMap<String, HashMap<String, String>> mActiveShortcutBubbles = new HashMap<>();
- private boolean mLauncherAppsCallbackRegistered;
+ // Key: packageName|userId Value: <shortcutId, notifId>
+ private final HashMap<String, HashMap<String, String>> mActiveShortcutBubbles = new HashMap<>();
+ private boolean mShortcutChangedCallbackRegistered;
// Bubbles can be created based on a shortcut, we need to listen for changes to
// that shortcut so that we may update the bubble appropriately.
- private final LauncherApps.Callback mLauncherAppsCallback = new LauncherApps.Callback() {
- @Override
- public void onPackageRemoved(String packageName, UserHandle user) {
- }
-
- @Override
- public void onPackageAdded(String packageName, UserHandle user) {
- }
-
- @Override
- public void onPackageChanged(String packageName, UserHandle user) {
- }
-
- @Override
- public void onPackagesAvailable(String[] packageNames, UserHandle user,
- boolean replacing) {
- }
-
- @Override
- public void onPackagesUnavailable(String[] packageNames, UserHandle user,
- boolean replacing) {
- }
+ private final LauncherApps.ShortcutChangeCallback mShortcutChangeCallback =
+ new LauncherApps.ShortcutChangeCallback() {
- @Override
- public void onShortcutsChanged(@NonNull String packageName,
- @NonNull List<ShortcutInfo> shortcuts, @NonNull UserHandle user) {
- HashMap<String, String> shortcutBubbles = mActiveShortcutBubbles.get(packageName);
- ArrayList<String> bubbleKeysToRemove = new ArrayList<>();
- if (shortcutBubbles != null) {
- // Copy to avoid a concurrent modification exception when we remove bubbles from
- // shortcutBubbles.
- final Set<String> shortcutIds = new HashSet<>(shortcutBubbles.keySet());
-
- // If we can't find one of our bubbles in the shortcut list, that bubble needs
- // to be removed.
- for (String shortcutId : shortcutIds) {
- boolean foundShortcut = false;
- for (int i = 0; i < shortcuts.size(); i++) {
- if (shortcuts.get(i).getId().equals(shortcutId)) {
- foundShortcut = true;
- break;
- }
- }
- if (!foundShortcut) {
- bubbleKeysToRemove.add(shortcutBubbles.get(shortcutId));
- shortcutBubbles.remove(shortcutId);
- if (shortcutBubbles.isEmpty()) {
- mActiveShortcutBubbles.remove(packageName);
- if (mLauncherAppsCallbackRegistered
- && mActiveShortcutBubbles.isEmpty()) {
- mLauncherAppsService.unregisterCallback(mLauncherAppsCallback);
- mLauncherAppsCallbackRegistered = false;
- }
- }
- }
+ @Override
+ public void onShortcutsAddedOrUpdated(@NonNull String packageName,
+ @NonNull List<ShortcutInfo> shortcuts, @NonNull UserHandle user) {
}
- }
- // Let NoMan know about the updates
- for (int i = 0; i < bubbleKeysToRemove.size(); i++) {
- // update flag bubble
- String bubbleKey = bubbleKeysToRemove.get(i);
- if (mShortcutListener != null) {
- mShortcutListener.onShortcutRemoved(bubbleKey);
+ public void onShortcutsRemoved(@NonNull String packageName,
+ @NonNull List<ShortcutInfo> removedShortcuts, @NonNull UserHandle user) {
+ final String packageUserKey = getPackageUserKey(packageName, user);
+ if (mActiveShortcutBubbles.get(packageUserKey) == null) return;
+ for (ShortcutInfo info : removedShortcuts) {
+ onShortcutRemoved(packageUserKey, info.getId());
+ }
}
- }
- }
- };
+ };
ShortcutHelper(LauncherApps launcherApps, ShortcutListener listener,
ShortcutServiceInternal shortcutServiceInternal, UserManager userManager) {
@@ -172,14 +120,14 @@ public class ShortcutHelper {
* Returns whether the given shortcut info is a conversation shortcut.
*/
public static boolean isConversationShortcut(
- ShortcutInfo shortcutInfo, ShortcutServiceInternal mShortcutServiceInternal,
+ ShortcutInfo shortcutInfo, ShortcutServiceInternal shortcutServiceInternal,
int callingUserId) {
if (shortcutInfo == null || !shortcutInfo.isLongLived() || !shortcutInfo.isEnabled()) {
return false;
}
// TODO (b/155016294) uncomment when sharing shortcuts are required
/*
- mShortcutServiceInternal.isSharingShortcut(callingUserId, "android",
+ shortcutServiceInternal.isSharingShortcut(callingUserId, "android",
shortcutInfo.getPackage(), shortcutInfo.getId(), shortcutInfo.getUserId(),
SHARING_FILTER);
*/
@@ -233,34 +181,30 @@ public class ShortcutHelper {
*
* @param r the notification record to check
* @param removedNotification true if this notification is being removed
- * @param handler handler to register the callback with
*/
void maybeListenForShortcutChangesForBubbles(NotificationRecord r,
- boolean removedNotification,
- Handler handler) {
+ boolean removedNotification) {
final String shortcutId = r.getNotification().getBubbleMetadata() != null
? r.getNotification().getBubbleMetadata().getShortcutId()
: null;
+ final String packageUserKey = getPackageUserKey(r.getSbn().getPackageName(), r.getUser());
if (!removedNotification
&& !TextUtils.isEmpty(shortcutId)
&& r.getShortcutInfo() != null
&& r.getShortcutInfo().getId().equals(shortcutId)) {
// Must track shortcut based bubbles in case the shortcut is removed
HashMap<String, String> packageBubbles = mActiveShortcutBubbles.get(
- r.getSbn().getPackageName());
+ packageUserKey);
if (packageBubbles == null) {
packageBubbles = new HashMap<>();
}
packageBubbles.put(shortcutId, r.getKey());
- mActiveShortcutBubbles.put(r.getSbn().getPackageName(), packageBubbles);
- if (!mLauncherAppsCallbackRegistered) {
- mLauncherAppsService.registerCallback(mLauncherAppsCallback, handler);
- mLauncherAppsCallbackRegistered = true;
- }
+ mActiveShortcutBubbles.put(packageUserKey, packageBubbles);
+ registerCallbackIfNeeded();
} else {
// No longer track shortcut
HashMap<String, String> packageBubbles = mActiveShortcutBubbles.get(
- r.getSbn().getPackageName());
+ packageUserKey);
if (packageBubbles != null) {
if (!TextUtils.isEmpty(shortcutId)) {
packageBubbles.remove(shortcutId);
@@ -278,20 +222,62 @@ public class ShortcutHelper {
}
}
if (packageBubbles.isEmpty()) {
- mActiveShortcutBubbles.remove(r.getSbn().getPackageName());
+ mActiveShortcutBubbles.remove(packageUserKey);
}
}
- if (mLauncherAppsCallbackRegistered && mActiveShortcutBubbles.isEmpty()) {
- mLauncherAppsService.unregisterCallback(mLauncherAppsCallback);
- mLauncherAppsCallbackRegistered = false;
+ unregisterCallbackIfNeeded();
+ }
+ }
+
+ private String getPackageUserKey(String packageName, UserHandle user) {
+ return packageName + "|" + user.getIdentifier();
+ }
+
+ private void onShortcutRemoved(String packageUserKey, String shortcutId) {
+ HashMap<String, String> shortcutBubbles = mActiveShortcutBubbles.get(packageUserKey);
+ ArrayList<String> bubbleKeysToRemove = new ArrayList<>();
+ if (shortcutBubbles != null) {
+ if (shortcutBubbles.containsKey(shortcutId)) {
+ bubbleKeysToRemove.add(shortcutBubbles.get(shortcutId));
+ shortcutBubbles.remove(shortcutId);
+ if (shortcutBubbles.isEmpty()) {
+ mActiveShortcutBubbles.remove(packageUserKey);
+ unregisterCallbackIfNeeded();
+ }
}
+ notifyNoMan(bubbleKeysToRemove);
+ }
+ }
+
+ private void registerCallbackIfNeeded() {
+ if (!mShortcutChangedCallbackRegistered) {
+ mShortcutChangedCallbackRegistered = true;
+ mShortcutServiceInternal.addShortcutChangeCallback(mShortcutChangeCallback);
+ }
+ }
+
+ private void unregisterCallbackIfNeeded() {
+ if (mShortcutChangedCallbackRegistered && mActiveShortcutBubbles.isEmpty()) {
+ mShortcutServiceInternal.removeShortcutChangeCallback(mShortcutChangeCallback);
+ mShortcutChangedCallbackRegistered = false;
}
}
void destroy() {
- if (mLauncherAppsCallbackRegistered) {
- mLauncherAppsService.unregisterCallback(mLauncherAppsCallback);
- mLauncherAppsCallbackRegistered = false;
+ if (mShortcutChangedCallbackRegistered) {
+ mShortcutServiceInternal.removeShortcutChangeCallback(mShortcutChangeCallback);
+ mShortcutChangedCallbackRegistered = false;
+ }
+ }
+
+ private void notifyNoMan(List<String> bubbleKeysToRemove) {
+ // Let NoMan know about the updates
+ for (int i = 0; i < bubbleKeysToRemove.size(); i++) {
+ // update flag bubble
+ String bubbleKey = bubbleKeysToRemove.get(i);
+ if (mShortcutListener != null) {
+ mShortcutListener.onShortcutRemoved(bubbleKey);
+ }
}
}
}
diff --git a/services/core/java/com/android/server/notification/TimeToLiveHelper.java b/services/core/java/com/android/server/notification/TimeToLiveHelper.java
index a4460b23c73d..cabe766289f7 100644
--- a/services/core/java/com/android/server/notification/TimeToLiveHelper.java
+++ b/services/core/java/com/android/server/notification/TimeToLiveHelper.java
@@ -177,13 +177,16 @@ public class TimeToLiveHelper {
if (ACTION.equals(action)) {
String timeoutKey = null;
synchronized (mLock) {
- Pair<Long, String> earliest = mKeys.first();
- String key = intent.getStringExtra(EXTRA_KEY);
- if (!earliest.second.equals(key)) {
- Slog.wtf(TAG, "Alarm triggered but wasn't the earliest we were tracking");
+ if (!mKeys.isEmpty()) {
+ Pair<Long, String> earliest = mKeys.first();
+ String key = intent.getStringExtra(EXTRA_KEY);
+ if (!earliest.second.equals(key)) {
+ Slog.wtf(TAG,
+ "Alarm triggered but wasn't the earliest we were tracking");
+ }
+ removeMatchingEntry(key);
+ timeoutKey = earliest.second;
}
- removeMatchingEntry(key);
- timeoutKey = earliest.second;
}
mNm.timeoutNotification(timeoutKey);
}
diff --git a/services/core/java/com/android/server/notification/ZenModeEventLogger.java b/services/core/java/com/android/server/notification/ZenModeEventLogger.java
index ec5d96df3430..4a82057ed2a2 100644
--- a/services/core/java/com/android/server/notification/ZenModeEventLogger.java
+++ b/services/core/java/com/android/server/notification/ZenModeEventLogger.java
@@ -106,11 +106,11 @@ class ZenModeEventLogger {
/**
* Potentially log a zen mode change if the provided config and policy changes warrant it.
*
- * @param prevInfo ZenModeInfo (zen mode setting, config, policy) prior to this change
- * @param newInfo ZenModeInfo after this change takes effect
- * @param callingUid the calling UID associated with the change; may be used to attribute the
- * change to a particular package or determine if this is a user action
- * @param origin The origin of the Zen change.
+ * @param prevInfo ZenModeInfo (zen mode setting, config, policy) prior to this change
+ * @param newInfo ZenModeInfo after this change takes effect
+ * @param callingUid the calling UID associated with the change; may be used to attribute the
+ * change to a particular package or determine if this is a user action
+ * @param origin The origin of the Zen change.
*/
public final void maybeLogZenChange(ZenModeInfo prevInfo, ZenModeInfo newInfo, int callingUid,
@ConfigChangeOrigin int origin) {
@@ -127,6 +127,9 @@ class ZenModeEventLogger {
/**
* Reassign callingUid in mChangeState if we have more specific information that warrants it
* (for instance, if the change is automatic and due to an automatic rule change).
+ *
+ * <p>When Flags.modesUi() is enabled, we reassign the calling UID to the package UID in all
+ * changes whose source is not system or system UI, as long as there is only one rule changed.
*/
private void maybeReassignCallingUid() {
int userId = Process.INVALID_UID;
@@ -145,12 +148,23 @@ class ZenModeEventLogger {
userId = mChangeState.mNewConfig.user; // mNewConfig must not be null if enabler exists
}
- // The conditions where we should consider reassigning UID for an automatic rule change:
+ // The conditions where we should consider reassigning UID for an automatic rule change
+ // (pre-modes_ui):
// - we've determined it's not a user action
// - our current best guess is that the calling uid is system/sysui
+ // When Flags.modesUi() is true, we get the package UID for the changed rule, as long as:
+ // - the change does not originate from the system based on change origin
+ // - there is only one rule changed
if (mChangeState.getChangedRuleType() == RULE_TYPE_AUTOMATIC) {
- if (mChangeState.getIsUserAction() || !mChangeState.isFromSystemOrSystemUi()) {
- return;
+ if (Flags.modesUi()) {
+ // ignore anything whose origin is system
+ if (mChangeState.isFromSystemOrSystemUi()) {
+ return;
+ }
+ } else {
+ if (mChangeState.getIsUserAction() || !mChangeState.isFromSystemOrSystemUi()) {
+ return;
+ }
}
// Only try to get the package UID if there's exactly one changed automatic rule. If
@@ -202,7 +216,8 @@ class ZenModeEventLogger {
/* int32 package_uid = 7 */ mChangeState.getPackageUid(),
/* DNDPolicyProto current_policy = 8 */ mChangeState.getDNDPolicyProto(),
/* bool are_channels_bypassing = 9 */ mChangeState.getAreChannelsBypassing(),
- /* ActiveRuleType active_rule_types = 10 */ mChangeState.getActiveRuleTypes());
+ /* ActiveRuleType active_rule_types = 10 */ mChangeState.getActiveRuleTypes(),
+ /* ChangeOrigin change_origin = 11 */ mChangeState.getChangeOrigin());
}
/**
@@ -235,7 +250,8 @@ class ZenModeEventLogger {
ZenModeConfig mPrevConfig, mNewConfig;
NotificationManager.Policy mPrevPolicy, mNewPolicy;
int mCallingUid = Process.INVALID_UID;
- @ConfigChangeOrigin int mOrigin = ZenModeConfig.UPDATE_ORIGIN_UNKNOWN;
+ @ConfigChangeOrigin
+ int mOrigin = ZenModeConfig.UPDATE_ORIGIN_UNKNOWN;
private void init(ZenModeInfo prevInfo, ZenModeInfo newInfo, int callingUid,
@ConfigChangeOrigin int origin) {
@@ -388,7 +404,8 @@ class ZenModeEventLogger {
* rules available.
*/
@SuppressLint("WrongConstant") // special case for log-only type on manual rule
- @NonNull List<ZenRule> activeRulesList(ZenModeConfig config) {
+ @NonNull
+ List<ZenRule> activeRulesList(ZenModeConfig config) {
ArrayList<ZenRule> rules = new ArrayList<>();
if (config == null) {
return rules;
@@ -548,6 +565,17 @@ class ZenModeEventLogger {
}
/**
+ * Get the config change origin associated with this change, which is stored in mOrigin.
+ * Only useable if modes_ui is true.
+ */
+ int getChangeOrigin() {
+ if (Flags.modesUi()) {
+ return mOrigin;
+ }
+ return 0;
+ }
+
+ /**
* Convert the new policy to a DNDPolicyProto format for output in logs.
*
* <p>If {@code mNewZenMode} is {@code ZEN_MODE_OFF} (which can mean either no rules
diff --git a/services/core/java/com/android/server/notification/ZenModeHelper.java b/services/core/java/com/android/server/notification/ZenModeHelper.java
index c078409f468c..b12a917eede9 100644
--- a/services/core/java/com/android/server/notification/ZenModeHelper.java
+++ b/services/core/java/com/android/server/notification/ZenModeHelper.java
@@ -1159,11 +1159,18 @@ public class ZenModeHelper {
rule.conditionId = azr.getConditionId();
modified = true;
}
- boolean shouldPreserveCondition = Flags.modesApi() && Flags.modesUi()
- && !isNew && origin == UPDATE_ORIGIN_USER
- && rule.enabled == azr.isEnabled()
- && rule.conditionId != null && rule.condition != null
- && rule.conditionId.equals(rule.condition.id);
+ // This can be removed when {@link Flags#modesUi} is fully ramped up
+ final boolean isWatch =
+ mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_WATCH);
+ boolean shouldPreserveCondition =
+ Flags.modesApi()
+ && (Flags.modesUi() || isWatch)
+ && !isNew
+ && origin == UPDATE_ORIGIN_USER
+ && rule.enabled == azr.isEnabled()
+ && rule.conditionId != null
+ && rule.condition != null
+ && rule.conditionId.equals(rule.condition.id);
if (!shouldPreserveCondition) {
// Do not update 'modified'. If only this changes we treat it as a no-op updateAZR.
rule.condition = null;
diff --git a/services/core/java/com/android/server/om/OverlayManagerService.java b/services/core/java/com/android/server/om/OverlayManagerService.java
index 56e459057bfa..46585a50ea36 100644
--- a/services/core/java/com/android/server/om/OverlayManagerService.java
+++ b/services/core/java/com/android/server/om/OverlayManagerService.java
@@ -80,6 +80,7 @@ import android.util.EventLog;
import android.util.Slog;
import android.util.SparseArray;
+import com.android.internal.annotations.KeepForWeakReference;
import com.android.internal.content.PackageMonitor;
import com.android.internal.content.om.OverlayConfig;
import com.android.internal.util.ArrayUtils;
@@ -261,6 +262,7 @@ public final class OverlayManagerService extends SystemService {
private final OverlayActorEnforcer mActorEnforcer;
+ @KeepForWeakReference
private final PackageMonitor mPackageMonitor = new OverlayManagerPackageMonitor();
private int mPrevStartedUserId = -1;
diff --git a/services/core/java/com/android/server/pdb/PersistentDataBlockService.java b/services/core/java/com/android/server/pdb/PersistentDataBlockService.java
index c5e2bb87afd3..8410cff74265 100644
--- a/services/core/java/com/android/server/pdb/PersistentDataBlockService.java
+++ b/services/core/java/com/android/server/pdb/PersistentDataBlockService.java
@@ -34,6 +34,7 @@ import android.content.pm.PackageManagerInternal;
import android.os.Binder;
import android.os.Build;
import android.os.IBinder;
+import android.os.Process;
import android.os.RemoteException;
import android.os.ResultReceiver;
import android.os.ShellCallback;
@@ -370,8 +371,13 @@ public class PersistentDataBlockService extends SystemService {
}
private void enforceUid(int callingUid) {
- if (callingUid != mAllowedUid && callingUid != UserHandle.AID_ROOT) {
- throw new SecurityException("uid " + callingUid + " not allowed to access PDB");
+ enforceUid(callingUid, /* allowShell= */ false);
+ }
+
+ private void enforceUid(int callingUid, boolean allowShell) {
+ if (callingUid != mAllowedUid && callingUid != UserHandle.AID_ROOT
+ && (callingUid != Process.SHELL_UID || !allowShell)) {
+ throw new SecurityException("Uid " + callingUid + " not allowed to access PDB");
}
}
@@ -864,7 +870,8 @@ public class PersistentDataBlockService extends SystemService {
private final IBinder mService = new IPersistentDataBlockService.Stub() {
private int printFrpStatus(PrintWriter pw, boolean printSecrets) {
- enforceUid(Binder.getCallingUid());
+ // Only allow SHELL_UID to print the status if printing the secrets is disabled
+ enforceUid(Binder.getCallingUid(), /* allowShell= */ !printSecrets);
pw.println("FRP state");
pw.println("=========");
@@ -872,8 +879,14 @@ public class PersistentDataBlockService extends SystemService {
pw.println("FRP state: " + mFrpActive);
printFrpDataFilesContents(pw, printSecrets);
printFrpSecret(pw, printSecrets);
- pw.println("OEM unlock state: " + getOemUnlockEnabled());
- pw.println("Bootloader lock state: " + getFlashLockState());
+
+ // Do not print OEM unlock state and flash lock state if the caller is a non-root
+ // shell - it likely won't have permissions anyways.
+ if (Binder.getCallingUid() != Process.SHELL_UID) {
+ pw.println("OEM unlock state: " + getOemUnlockEnabled());
+ pw.println("Bootloader lock state: " + getFlashLockState());
+ }
+
pw.println("Verified boot state: " + getVerifiedBootState());
pw.println("Has FRP credential handle: " + hasFrpCredentialHandle());
pw.println("FRP challenge block size: " + getDataBlockSize());
diff --git a/services/core/java/com/android/server/pm/BackgroundUserSoundNotifier.java b/services/core/java/com/android/server/pm/BackgroundUserSoundNotifier.java
index 58b14b14fdef..15e758cf6ffd 100644
--- a/services/core/java/com/android/server/pm/BackgroundUserSoundNotifier.java
+++ b/services/core/java/com/android/server/pm/BackgroundUserSoundNotifier.java
@@ -37,7 +37,6 @@ import android.os.Looper;
import android.os.RemoteException;
import android.os.UserHandle;
import android.os.UserManager;
-import android.os.Vibrator;
import android.util.Log;
import com.android.internal.R;
@@ -47,9 +46,9 @@ public class BackgroundUserSoundNotifier {
private static final boolean DEBUG = false;
private static final String LOG_TAG = BackgroundUserSoundNotifier.class.getSimpleName();
- public static final String BUSN_CHANNEL_ID = "bg_user_sound_channel";
- public static final String BUSN_CHANNEL_NAME = "BackgroundUserSound";
- private static final String ACTION_MUTE_SOUND = "com.android.server.ACTION_MUTE_BG_USER";
+ private static final String BUSN_CHANNEL_ID = "bg_user_sound_channel";
+ private static final String BUSN_CHANNEL_NAME = "BackgroundUserSound";
+ public static final String ACTION_MUTE_SOUND = "com.android.server.ACTION_MUTE_BG_USER";
private static final String EXTRA_NOTIFICATION_ID = "com.android.server.EXTRA_CLIENT_UID";
private static final String EXTRA_CURRENT_USER_ID = "com.android.server.EXTRA_CURRENT_USER_ID";
private static final String ACTION_SWITCH_USER = "com.android.server.ACTION_SWITCH_TO_USER";
@@ -144,6 +143,7 @@ public class BackgroundUserSoundNotifier {
-1) + " current user id " + intent.getIntExtra(
EXTRA_CURRENT_USER_ID, -1));
}
+ mUserWithNotification = -1;
mNotificationManager.cancelAsUser(LOG_TAG, notificationId,
UserHandle.of(intent.getIntExtra(EXTRA_CURRENT_USER_ID, -1)));
if (ACTION_MUTE_SOUND.equals(intent.getAction())) {
@@ -159,10 +159,6 @@ public class BackgroundUserSoundNotifier {
}
}
}
- Vibrator vibrator = mSystemUserContext.getSystemService(Vibrator.class);
- if (vibrator != null && vibrator.isVibrating()) {
- vibrator.cancel();
- }
} else if (ACTION_SWITCH_USER.equals(intent.getAction())) {
service.switchUser(intent.getIntExtra(Intent.EXTRA_USER_ID, -1));
}
diff --git a/services/core/java/com/android/server/pm/InstallPackageHelper.java b/services/core/java/com/android/server/pm/InstallPackageHelper.java
index 009e9b862b0f..8d3f07edb687 100644
--- a/services/core/java/com/android/server/pm/InstallPackageHelper.java
+++ b/services/core/java/com/android/server/pm/InstallPackageHelper.java
@@ -801,8 +801,9 @@ final class InstallPackageHelper {
try {
final BroadcastOptions options = BroadcastOptions.makeBasic();
options.setPendingIntentBackgroundActivityLaunchAllowed(false);
- target.sendIntent(context, 0, fillIn, null /* onFinished*/, null /* handler */,
- null /* requiredPermission */, options.toBundle());
+ target.sendIntent(context, 0, fillIn,
+ null /* requiredPermission */, options.toBundle(),
+ null /* executor */, null /* onFinished*/);
} catch (IntentSender.SendIntentException ignored) {
}
}
@@ -2260,6 +2261,12 @@ final class InstallPackageHelper {
installRequest.getNewUsers());
mPm.updateSequenceNumberLP(ps, installRequest.getNewUsers());
mPm.updateInstantAppInstallerLocked(packageName);
+
+ // The installation is success, remove the split info copy stored in package
+ // setting for the downgrade version check of DELETE_KEEP_DATA and archived app
+ // cases.
+ ps.setSplitNames(null);
+ ps.setSplitRevisionCodes(null);
}
installRequest.onCommitFinished();
}
@@ -2628,18 +2635,28 @@ final class InstallPackageHelper {
String packageName = pkgLite.packageName;
synchronized (mPm.mLock) {
- // Package which currently owns the data that the new package will own if installed.
- // If an app is uninstalled while keeping data (e.g. adb uninstall -k), installedPkg
- // will be null whereas dataOwnerPkg will contain information about the package
- // which was uninstalled while keeping its data.
- AndroidPackage dataOwnerPkg = mPm.mPackages.get(packageName);
PackageSetting dataOwnerPs = mPm.mSettings.getPackageLPr(packageName);
- if (dataOwnerPkg == null) {
- if (dataOwnerPs != null) {
- dataOwnerPkg = dataOwnerPs.getPkg();
+ if (dataOwnerPs == null) {
+ if (requiredInstalledVersionCode != PackageManager.VERSION_CODE_HIGHEST) {
+ String errorMsg = "Required installed version code was "
+ + requiredInstalledVersionCode
+ + " but package is not installed";
+ Slog.w(TAG, errorMsg);
+ return Pair.create(
+ PackageManager.INSTALL_FAILED_WRONG_INSTALLED_VERSION, errorMsg);
}
+ // The package doesn't exist in the system, don't need to check the version
+ // replacing.
+ return Pair.create(PackageManager.INSTALL_SUCCEEDED, null);
}
+ // Package which currently owns the data that the new package will own if installed.
+ // If an app is uninstalled while keeping data (e.g. adb uninstall -k), dataOwnerPkg
+ // will be null whereas dataOwnerPs will contain information about the package
+ // which was uninstalled while keeping its data. The AndroidPackage object that the
+ // PackageSetting refers to is the same object that is stored in mPackages.
+ AndroidPackage dataOwnerPkg = dataOwnerPs.getPkg();
+
if (requiredInstalledVersionCode != PackageManager.VERSION_CODE_HIGHEST) {
if (dataOwnerPkg == null) {
String errorMsg = "Required installed version code was "
@@ -2661,7 +2678,27 @@ final class InstallPackageHelper {
}
}
- if (dataOwnerPkg != null && !dataOwnerPkg.isSdkLibrary()) {
+ // If dataOwnerPkg is null but dataOwnerPs is not null, there is always data on
+ // some users. Wwe should do the downgrade check. E.g. DELETE_KEEP_DATA and
+ // archived apps
+ if (dataOwnerPkg == null) {
+ if (!PackageManagerServiceUtils.isDowngradePermitted(installFlags,
+ dataOwnerPs.isDebuggable())) {
+ // The data exists on some users and downgrade is not permitted; a lower
+ // version of the app will not be allowed.
+ try {
+ PackageManagerServiceUtils.checkDowngrade(dataOwnerPs, pkgLite);
+ } catch (PackageManagerException e) {
+ String errorMsg = "Downgrade detected on app uninstalled with"
+ + " DELETE_KEEP_DATA: " + e.getMessage();
+ Slog.w(TAG, errorMsg);
+ return Pair.create(
+ PackageManager.INSTALL_FAILED_VERSION_DOWNGRADE, errorMsg);
+ }
+ }
+ // dataOwnerPs.getPkg() is not null on system apps case. Don't need to consider
+ // system apps case like below.
+ } else if (dataOwnerPkg != null && !dataOwnerPkg.isSdkLibrary()) {
if (!PackageManagerServiceUtils.isDowngradePermitted(installFlags,
dataOwnerPkg.isDebuggable())) {
// Downgrade is not permitted; a lower version of the app will not be allowed
diff --git a/services/core/java/com/android/server/pm/LauncherAppsService.java b/services/core/java/com/android/server/pm/LauncherAppsService.java
index 563cfa4d0ecd..023f7655c7a8 100644
--- a/services/core/java/com/android/server/pm/LauncherAppsService.java
+++ b/services/core/java/com/android/server/pm/LauncherAppsService.java
@@ -71,6 +71,7 @@ import android.content.pm.IPackageInstallerCallback;
import android.content.pm.IPackageManager;
import android.content.pm.IShortcutChangeCallback;
import android.content.pm.IncrementalStatesInfo;
+import android.content.pm.InstallSourceInfo;
import android.content.pm.LauncherActivityInfoInternal;
import android.content.pm.LauncherApps;
import android.content.pm.LauncherApps.ShortcutQuery;
@@ -1856,9 +1857,11 @@ public class LauncherAppsService extends SystemService {
private String getInstallerPackage(@NonNull String packageName, int callingUserId) {
String installerPackageName = null;
try {
- installerPackageName =
- mIPM.getInstallSourceInfo(packageName, callingUserId)
- .getInstallingPackageName();
+ InstallSourceInfo info = mIPM.getInstallSourceInfo(packageName, callingUserId);
+ if (info == null) {
+ return installerPackageName;
+ }
+ installerPackageName = info.getInstallingPackageName();
} catch (RemoteException re) {
Slog.e(TAG, "Couldn't find installer for " + packageName, re);
}
diff --git a/services/core/java/com/android/server/pm/OWNERS b/services/core/java/com/android/server/pm/OWNERS
index c10dfcb5e9bf..e8fc577d9f0f 100644
--- a/services/core/java/com/android/server/pm/OWNERS
+++ b/services/core/java/com/android/server/pm/OWNERS
@@ -27,6 +27,7 @@ per-file CrossProfile* = file:MULTIUSER_AND_ENTERPRISE_OWNERS
per-file RestrictionsSet.java = file:MULTIUSER_AND_ENTERPRISE_OWNERS
per-file UserRestriction* = file:MULTIUSER_AND_ENTERPRISE_OWNERS
per-file User* = file:/MULTIUSER_OWNERS
+per-file BackgroundUser* = file:/MULTIUSER_OWNERS
# security
per-file KeySetHandle.java = cbrubaker@google.com, nnk@google.com
diff --git a/services/core/java/com/android/server/pm/PackageArchiver.java b/services/core/java/com/android/server/pm/PackageArchiver.java
index 0d1095f5656d..6b7b702b9157 100644
--- a/services/core/java/com/android/server/pm/PackageArchiver.java
+++ b/services/core/java/com/android/server/pm/PackageArchiver.java
@@ -1194,8 +1194,9 @@ public class PackageArchiver {
MODE_BACKGROUND_ACTIVITY_START_DENIED);
for (IntentSender intentSender : unarchiveIntentSenders) {
try {
- intentSender.sendIntent(mContext, 0, broadcastIntent, /* onFinished= */ null,
- /* handler= */ null, /* requiredPermission= */ null, options.toBundle());
+ intentSender.sendIntent(mContext, 0, broadcastIntent,
+ /* requiredPermission */ null, options.toBundle(),
+ /* executor */ null, /* onFinished */ null);
} catch (IntentSender.SendIntentException e) {
Slog.e(TAG, TextUtils.formatSimple("Failed to send unarchive intent"), e);
} finally {
@@ -1328,8 +1329,9 @@ public class PackageArchiver {
final BroadcastOptions options = BroadcastOptions.makeBasic();
options.setPendingIntentBackgroundActivityStartMode(
MODE_BACKGROUND_ACTIVITY_START_DENIED);
- statusReceiver.sendIntent(mContext, 0, intent, /* onFinished= */ null,
- /* handler= */ null, /* requiredPermission= */ null, options.toBundle());
+ statusReceiver.sendIntent(mContext, 0, intent,
+ /* requiredPermission */ null, options.toBundle(),
+ /* executor */ null, /* onFinished */ null);
} catch (IntentSender.SendIntentException e) {
Slog.e(
TAG,
diff --git a/services/core/java/com/android/server/pm/PackageInstallerService.java b/services/core/java/com/android/server/pm/PackageInstallerService.java
index b93dcdc93a82..f615ca1da2e2 100644
--- a/services/core/java/com/android/server/pm/PackageInstallerService.java
+++ b/services/core/java/com/android/server/pm/PackageInstallerService.java
@@ -1581,8 +1581,9 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements
try {
final BroadcastOptions options = BroadcastOptions.makeBasic();
options.setPendingIntentBackgroundActivityLaunchAllowed(false);
- callback.sendIntent(mContext, 0, intent, null /* onFinished*/,
- null /* handler */, null /* requiredPermission */, options.toBundle());
+ callback.sendIntent(mContext, 0, intent,
+ null /* requiredPermission */, options.toBundle(),
+ null /* executor */, null /* onFinished*/);
} catch (SendIntentException ignore) {
}
});
@@ -1912,8 +1913,9 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements
try {
final BroadcastOptions options = BroadcastOptions.makeBasic();
options.setPendingIntentBackgroundActivityLaunchAllowed(false);
- mTarget.sendIntent(mContext, 0, fillIn, null /* onFinished*/,
- null /* handler */, null /* requiredPermission */, options.toBundle());
+ mTarget.sendIntent(mContext, 0, fillIn,
+ null /* requiredPermission */, options.toBundle(),
+ null /* executor */, null /* onFinished*/);
} catch (SendIntentException ignored) {
}
}
@@ -1945,8 +1947,9 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements
try {
final BroadcastOptions options = BroadcastOptions.makeBasic();
options.setPendingIntentBackgroundActivityLaunchAllowed(false);
- mTarget.sendIntent(mContext, 0, fillIn, null /* onFinished*/,
- null /* handler */, null /* requiredPermission */, options.toBundle());
+ mTarget.sendIntent(mContext, 0, fillIn,
+ null /* requiredPermission */, options.toBundle(),
+ null /* executor */, null /* onFinished*/);
} catch (SendIntentException ignored) {
}
}
diff --git a/services/core/java/com/android/server/pm/PackageInstallerSession.java b/services/core/java/com/android/server/pm/PackageInstallerSession.java
index 47a79a3c4051..ff8a69de35bc 100644
--- a/services/core/java/com/android/server/pm/PackageInstallerSession.java
+++ b/services/core/java/com/android/server/pm/PackageInstallerSession.java
@@ -5053,8 +5053,9 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
try {
final BroadcastOptions options = BroadcastOptions.makeBasic();
options.setPendingIntentBackgroundActivityLaunchAllowed(false);
- target.sendIntent(mContext, 0 /* code */, intent, null /* onFinished */,
- null /* handler */, null /* requiredPermission */, options.toBundle());
+ target.sendIntent(mContext, 0 /* code */, intent,
+ null /* requiredPermission */, options.toBundle(),
+ null /* executor */, null /* onFinished*/);
} catch (IntentSender.SendIntentException ignored) {
}
}
@@ -5447,8 +5448,9 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
try {
final BroadcastOptions options = BroadcastOptions.makeBasic();
options.setPendingIntentBackgroundActivityLaunchAllowed(false);
- target.sendIntent(context, 0, fillIn, null /* onFinished */,
- null /* handler */, null /* requiredPermission */, options.toBundle());
+ target.sendIntent(context, 0, fillIn,
+ null /* requiredPermission */, options.toBundle(),
+ null /* executor */, null /* onFinished*/);
} catch (IntentSender.SendIntentException ignored) {
}
}
@@ -5496,8 +5498,9 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
try {
final BroadcastOptions options = BroadcastOptions.makeBasic();
options.setPendingIntentBackgroundActivityLaunchAllowed(false);
- target.sendIntent(context, 0, fillIn, null /* onFinished */,
- null /* handler */, null /* requiredPermission */, options.toBundle());
+ target.sendIntent(context, 0, fillIn,
+ null /* requiredPermission */, options.toBundle(),
+ null /* executor */, null /* onFinished*/);
} catch (IntentSender.SendIntentException ignored) {
}
}
@@ -5533,8 +5536,9 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
try {
final BroadcastOptions options = BroadcastOptions.makeBasic();
options.setPendingIntentBackgroundActivityLaunchAllowed(false);
- target.sendIntent(context, 0, intent, null /* onFinished */,
- null /* handler */, null /* requiredPermission */, options.toBundle());
+ target.sendIntent(context, 0, intent,
+ null /* requiredPermission */, options.toBundle(),
+ null /* executor */, null /* onFinished*/);
} catch (IntentSender.SendIntentException ignored) {
}
}
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index c0b8034b9a56..33ca8a8e0f9e 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -31,6 +31,7 @@ import static android.content.pm.PackageManager.MATCH_FACTORY_ONLY;
import static android.content.pm.PackageManager.MATCH_SYSTEM_ONLY;
import static android.content.pm.PackageManager.PERMISSION_GRANTED;
import static android.content.pm.PackageManager.USER_MIN_ASPECT_RATIO_UNSET;
+import static android.crashrecovery.flags.Flags.refactorCrashrecovery;
import static android.os.Process.INVALID_UID;
import static android.os.Trace.TRACE_TAG_PACKAGE_MANAGER;
import static android.os.storage.StorageManager.FLAG_STORAGE_CE;
@@ -3037,7 +3038,9 @@ public class PackageManagerService implements PackageSender, TestUtilityService
mCompilerStats.writeNow();
mDexManager.writePackageDexUsageNow();
mDynamicCodeLogger.writeNow();
- PackageWatchdog.getInstance(mContext).writeNow();
+ if (!refactorCrashrecovery()) {
+ PackageWatchdog.getInstance(mContext).writeNow();
+ }
synchronized (mLock) {
mPackageUsage.writeNow(mSettings.getPackagesLocked());
@@ -4492,8 +4495,7 @@ public class PackageManagerService implements PackageSender, TestUtilityService
void setSystemAppHiddenUntilInstalled(@NonNull Computer snapshot, String packageName,
boolean hidden) {
final int callingUid = Binder.getCallingUid();
- final boolean calledFromSystemOrPhone = callingUid == Process.PHONE_UID
- || callingUid == Process.SYSTEM_UID;
+ final boolean calledFromSystemOrPhone = isSystemOrPhone(callingUid);
if (!calledFromSystemOrPhone) {
mContext.enforceCallingOrSelfPermission(Manifest.permission.SUSPEND_APPS,
"setSystemAppHiddenUntilInstalled");
@@ -4518,8 +4520,7 @@ public class PackageManagerService implements PackageSender, TestUtilityService
boolean setSystemAppInstallState(@NonNull Computer snapshot, String packageName,
boolean installed, int userId) {
final int callingUid = Binder.getCallingUid();
- final boolean calledFromSystemOrPhone = callingUid == Process.PHONE_UID
- || callingUid == Process.SYSTEM_UID;
+ final boolean calledFromSystemOrPhone = isSystemOrPhone(callingUid);
if (!calledFromSystemOrPhone) {
mContext.enforceCallingOrSelfPermission(Manifest.permission.SUSPEND_APPS,
"setSystemAppHiddenUntilInstalled");
@@ -5034,8 +5035,8 @@ public class PackageManagerService implements PackageSender, TestUtilityService
final BroadcastOptions options = BroadcastOptions.makeBasic();
options.setPendingIntentBackgroundActivityLaunchAllowed(false);
pi.sendIntent(null, success ? 1 : 0, null /* intent */,
- null /* onFinished*/, null /* handler */,
- null /* requiredPermission */, options.toBundle());
+ null /* requiredPermission */, options.toBundle(),
+ null /* executor */, null /* onFinished*/);
} catch (SendIntentException e) {
Slog.w(TAG, e);
}
@@ -8123,4 +8124,9 @@ public class PackageManagerService implements PackageSender, TestUtilityService
PackageManager.VERSION_CODE_HIGHEST, UserHandle.USER_SYSTEM,
PackageManager.DELETE_ALL_USERS, true /*removedBySystem*/);
}
+
+ private static boolean isSystemOrPhone(int uid) {
+ return UserHandle.isSameApp(uid, Process.SYSTEM_UID)
+ || UserHandle.isSameApp(uid, Process.PHONE_UID);
+ }
}
diff --git a/services/core/java/com/android/server/pm/PackageManagerServiceUtils.java b/services/core/java/com/android/server/pm/PackageManagerServiceUtils.java
index ff8abf879487..a1dffc6c25be 100644
--- a/services/core/java/com/android/server/pm/PackageManagerServiceUtils.java
+++ b/services/core/java/com/android/server/pm/PackageManagerServiceUtils.java
@@ -92,6 +92,7 @@ import android.util.proto.ProtoOutputStream;
import com.android.internal.content.InstallLocationUtils;
import com.android.internal.content.NativeLibraryHelper;
+import com.android.internal.telephony.TelephonyPermissions;
import com.android.internal.util.ArrayUtils;
import com.android.internal.util.FastPrintWriter;
import com.android.internal.util.HexDump;
@@ -356,7 +357,7 @@ public class PackageManagerServiceUtils {
* If not, throws a {@link SecurityException}.
*/
public static void enforceSystemOrPhoneCaller(String methodName, int callingUid) {
- if (callingUid != Process.PHONE_UID && callingUid != Process.SYSTEM_UID) {
+ if (!TelephonyPermissions.isSystemOrPhone(callingUid)) {
throw new SecurityException(
"Cannot call " + methodName + " from UID " + callingUid);
}
@@ -1418,32 +1419,49 @@ public class PackageManagerServiceUtils {
/**
* Check and throw if the given before/after packages would be considered a
- * downgrade.
+ * downgrade with {@link PackageSetting}.
*/
- public static void checkDowngrade(AndroidPackage before, PackageInfoLite after)
- throws PackageManagerException {
- if (after.getLongVersionCode() < before.getLongVersionCode()) {
+ public static void checkDowngrade(@NonNull PackageSetting before,
+ @NonNull PackageInfoLite after) throws PackageManagerException {
+ checkDowngrade(before.getVersionCode(), before.getBaseRevisionCode(),
+ before.getSplitNames(), before.getSplitRevisionCodes(), after);
+ }
+
+ /**
+ * Check and throw if the given before/after packages would be considered a
+ * downgrade with {@link AndroidPackage}.
+ */
+ public static void checkDowngrade(@NonNull AndroidPackage before,
+ @NonNull PackageInfoLite after) throws PackageManagerException {
+ checkDowngrade(before.getLongVersionCode(), before.getBaseRevisionCode(),
+ before.getSplitNames(), before.getSplitRevisionCodes(), after);
+ }
+
+ private static void checkDowngrade(long beforeVersionCode, int beforeBaseRevisionCode,
+ @NonNull String[] beforeSplitNames, @NonNull int[] beforeSplitRevisionCodes,
+ @NonNull PackageInfoLite after) throws PackageManagerException {
+ if (after.getLongVersionCode() < beforeVersionCode) {
throw new PackageManagerException(INSTALL_FAILED_VERSION_DOWNGRADE,
"Update version code " + after.versionCode + " is older than current "
- + before.getLongVersionCode());
- } else if (after.getLongVersionCode() == before.getLongVersionCode()) {
- if (after.baseRevisionCode < before.getBaseRevisionCode()) {
+ + beforeVersionCode);
+ } else if (after.getLongVersionCode() == beforeVersionCode) {
+ if (after.baseRevisionCode < beforeBaseRevisionCode) {
throw new PackageManagerException(INSTALL_FAILED_VERSION_DOWNGRADE,
"Update base revision code " + after.baseRevisionCode
- + " is older than current " + before.getBaseRevisionCode());
+ + " is older than current " + beforeBaseRevisionCode);
}
if (!ArrayUtils.isEmpty(after.splitNames)) {
for (int i = 0; i < after.splitNames.length; i++) {
final String splitName = after.splitNames[i];
- final int j = ArrayUtils.indexOf(before.getSplitNames(), splitName);
+ final int j = ArrayUtils.indexOf(beforeSplitNames, splitName);
if (j != -1) {
- if (after.splitRevisionCodes[i] < before.getSplitRevisionCodes()[j]) {
+ if (after.splitRevisionCodes[i] < beforeSplitRevisionCodes[j]) {
throw new PackageManagerException(INSTALL_FAILED_VERSION_DOWNGRADE,
"Update split " + splitName + " revision code "
+ after.splitRevisionCodes[i]
+ " is older than current "
- + before.getSplitRevisionCodes()[j]);
+ + beforeSplitRevisionCodes[j]);
}
}
}
diff --git a/services/core/java/com/android/server/pm/PackageSetting.java b/services/core/java/com/android/server/pm/PackageSetting.java
index 7870b1735af4..9f10e0166120 100644
--- a/services/core/java/com/android/server/pm/PackageSetting.java
+++ b/services/core/java/com/android/server/pm/PackageSetting.java
@@ -97,6 +97,7 @@ public class PackageSetting extends SettingBase implements PackageStateInternal
FORCE_QUERYABLE_OVERRIDE,
SCANNED_AS_STOPPED_SYSTEM_APP,
PENDING_RESTORE,
+ DEBUGGABLE,
})
public @interface Flags {
}
@@ -105,6 +106,7 @@ public class PackageSetting extends SettingBase implements PackageStateInternal
private static final int FORCE_QUERYABLE_OVERRIDE = 1 << 2;
private static final int SCANNED_AS_STOPPED_SYSTEM_APP = 1 << 3;
private static final int PENDING_RESTORE = 1 << 4;
+ private static final int DEBUGGABLE = 1 << 5;
}
private int mBooleans;
@@ -232,6 +234,22 @@ public class PackageSetting extends SettingBase implements PackageStateInternal
@Nullable
private byte[] mRestrictUpdateHash;
+ // This is the copy of the same data stored in AndroidPackage. It is not null if the
+ // AndroidPackage is deleted in cases of DELETE_KEEP_DATA. When AndroidPackage is not null,
+ // the field will be null, and the getter method will return the data from AndroidPackage
+ // instead.
+ @Nullable
+ private String[] mSplitNames;
+
+ // This is the copy of the same data stored in AndroidPackage. It is not null if the
+ // AndroidPackage is deleted in cases of DELETE_KEEP_DATA. When AndroidPackage is not null,
+ // the field will be null, and the getter method will return the data from AndroidPackage
+ // instead.
+ @Nullable
+ private int[] mSplitRevisionCodes;
+
+ private int mBaseRevisionCode;
+
/**
* Snapshot support.
*/
@@ -562,6 +580,76 @@ public class PackageSetting extends SettingBase implements PackageStateInternal
return getBoolean(Booleans.PENDING_RESTORE);
}
+ /**
+ * @see PackageState#isDebuggable
+ */
+ public PackageSetting setDebuggable(boolean value) {
+ setBoolean(Booleans.DEBUGGABLE, value);
+ onChanged();
+ return this;
+ }
+
+ @Override
+ public boolean isDebuggable() {
+ return getBoolean(Booleans.DEBUGGABLE);
+ }
+
+ /**
+ * @see AndroidPackage#getBaseRevisionCode
+ */
+ public PackageSetting setBaseRevisionCode(int value) {
+ mBaseRevisionCode = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * @see AndroidPackage#getBaseRevisionCode
+ */
+ public int getBaseRevisionCode() {
+ return mBaseRevisionCode;
+ }
+
+ /**
+ * @see AndroidPackage#getSplitNames
+ */
+ public PackageSetting setSplitNames(String[] value) {
+ mSplitNames = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * @see AndroidPackage#getSplitNames
+ */
+ @NonNull
+ public String[] getSplitNames() {
+ if (pkg != null) {
+ return pkg.getSplitNames();
+ }
+ return mSplitNames == null ? EmptyArray.STRING : mSplitNames;
+ }
+
+ /**
+ * @see AndroidPackage#getSplitRevisionCodes
+ */
+ public PackageSetting setSplitRevisionCodes(int[] value) {
+ mSplitRevisionCodes = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * @see AndroidPackage#getSplitRevisionCodes
+ */
+ @NonNull
+ public int[] getSplitRevisionCodes() {
+ if (pkg != null) {
+ return pkg.getSplitRevisionCodes();
+ }
+ return mSplitRevisionCodes == null ? EmptyArray.INT : mSplitRevisionCodes;
+ }
+
@Override
public String toString() {
return "PackageSetting{"
@@ -723,6 +811,11 @@ public class PackageSetting extends SettingBase implements PackageStateInternal
mTargetSdkVersion = other.mTargetSdkVersion;
mRestrictUpdateHash = other.mRestrictUpdateHash == null
? null : other.mRestrictUpdateHash.clone();
+ mBaseRevisionCode = other.mBaseRevisionCode;
+ mSplitNames = other.mSplitNames != null
+ ? Arrays.copyOf(other.mSplitNames, other.mSplitNames.length) : null;
+ mSplitRevisionCodes = other.mSplitRevisionCodes != null
+ ? Arrays.copyOf(other.mSplitRevisionCodes, other.mSplitRevisionCodes.length) : null;
usesSdkLibraries = other.usesSdkLibraries != null
? Arrays.copyOf(other.usesSdkLibraries,
diff --git a/services/core/java/com/android/server/pm/RemovePackageHelper.java b/services/core/java/com/android/server/pm/RemovePackageHelper.java
index 2f2c451ca7f3..7afc35819aa7 100644
--- a/services/core/java/com/android/server/pm/RemovePackageHelper.java
+++ b/services/core/java/com/android/server/pm/RemovePackageHelper.java
@@ -432,6 +432,13 @@ final class RemovePackageHelper {
}
deletedPs.setInstalled(/* installed= */ false, userId);
}
+
+ // Preserve split apk information for downgrade check with DELETE_KEEP_DATA and archived
+ // app cases
+ if (deletedPkg.getSplitNames() != null) {
+ deletedPs.setSplitNames(deletedPkg.getSplitNames());
+ deletedPs.setSplitRevisionCodes(deletedPkg.getSplitRevisionCodes());
+ }
}
// make sure to preserve per-user installed state if this removal was just
diff --git a/services/core/java/com/android/server/pm/SaferIntentUtils.java b/services/core/java/com/android/server/pm/SaferIntentUtils.java
index 8175321ea293..9a7ba0f082ea 100644
--- a/services/core/java/com/android/server/pm/SaferIntentUtils.java
+++ b/services/core/java/com/android/server/pm/SaferIntentUtils.java
@@ -104,6 +104,7 @@ public class SaferIntentUtils {
@Disabled
private static final long ENFORCE_INTENTS_TO_MATCH_INTENT_FILTERS = 161252188;
+ @Nullable
private static ParsedMainComponent infoToComponent(
ComponentInfo info, ComponentResolverApi resolver, boolean isReceiver) {
if (info instanceof ActivityInfo) {
@@ -186,7 +187,7 @@ public class SaferIntentUtils {
}
boolean isChangeEnabled(long changeId) {
- return platformCompat == null || platformCompat.isChangeEnabledByUidInternal(
+ return platformCompat == null || platformCompat.isChangeEnabledByUidInternalNoLogging(
changeId, callingUid);
}
@@ -233,7 +234,8 @@ public class SaferIntentUtils {
}
final ParsedMainComponent comp = infoToComponent(
resolveInfo.getComponentInfo(), resolver, args.isReceiver);
- if (!comp.getIntents().isEmpty() && args.intent.getAction() == null) {
+ if (comp != null && !comp.getIntents().isEmpty()
+ && args.intent.getAction() == null) {
match = false;
}
} else if (c instanceof IntentFilter) {
diff --git a/services/core/java/com/android/server/pm/ScanPackageUtils.java b/services/core/java/com/android/server/pm/ScanPackageUtils.java
index 9ab6016f3d57..95561f5fe0e3 100644
--- a/services/core/java/com/android/server/pm/ScanPackageUtils.java
+++ b/services/core/java/com/android/server/pm/ScanPackageUtils.java
@@ -437,6 +437,10 @@ final class ScanPackageUtils {
pkgSetting.setIsOrphaned(true);
}
+ // update debuggable and BaseRevisionCode to packageSetting
+ pkgSetting.setDebuggable(parsedPackage.isDebuggable());
+ pkgSetting.setBaseRevisionCode(parsedPackage.getBaseRevisionCode());
+
// Take care of first install / last update times.
final long scanFileTime = getLastModifiedTime(parsedPackage);
final long existingFirstInstallTime = userId == UserHandle.USER_ALL
diff --git a/services/core/java/com/android/server/pm/Settings.java b/services/core/java/com/android/server/pm/Settings.java
index 39565526f33e..9177e2b75891 100644
--- a/services/core/java/com/android/server/pm/Settings.java
+++ b/services/core/java/com/android/server/pm/Settings.java
@@ -325,6 +325,7 @@ public final class Settings implements Watchable, Snappable, ResilientAtomicFile
private static final String TAG_MIME_TYPE = "mime-type";
private static final String TAG_ARCHIVE_STATE = "archive-state";
private static final String TAG_ARCHIVE_ACTIVITY_INFO = "archive-activity-info";
+ private static final String TAG_SPLIT_VERSION = "split-version";
public static final String ATTR_NAME = "name";
public static final String ATTR_PACKAGE = "package";
@@ -3255,9 +3256,15 @@ public final class Settings implements Watchable, Snappable, ResilientAtomicFile
if (pkg.isPendingRestore()) {
serializer.attributeBoolean(null, "pendingRestore", true);
}
+ if (pkg.isDebuggable()) {
+ serializer.attributeBoolean(null, "debuggable", true);
+ }
if (pkg.isLoading()) {
serializer.attributeBoolean(null, "isLoading", true);
}
+ if (pkg.getBaseRevisionCode() != 0) {
+ serializer.attributeInt(null, "baseRevisionCode", pkg.getBaseRevisionCode());
+ }
serializer.attributeFloat(null, "loadingProgress", pkg.getLoadingProgress());
serializer.attributeLongHex(null, "loadingCompletedTime", pkg.getLoadingCompletedTime());
@@ -3269,7 +3276,6 @@ public final class Settings implements Watchable, Snappable, ResilientAtomicFile
serializer.attributeInt(null, "appMetadataSource",
pkg.getAppMetadataSource());
-
writeUsesSdkLibLPw(serializer, pkg.getUsesSdkLibraries(),
pkg.getUsesSdkLibrariesVersionsMajor(), pkg.getUsesSdkLibrariesOptional());
@@ -3287,7 +3293,12 @@ public final class Settings implements Watchable, Snappable, ResilientAtomicFile
writeUpgradeKeySetsLPr(serializer, pkg.getKeySetData());
writeKeySetAliasesLPr(serializer, pkg.getKeySetData());
writeMimeGroupLPr(serializer, pkg.getMimeGroups());
-
+ // If getPkg is not NULL, these values are from the getPkg. And these values are preserved
+ // for the downgrade check for DELETE_KEEP_DATA and archived app cases. If the getPkg is
+ // not NULL, we don't need to preserve it.
+ if (pkg.getPkg() == null) {
+ writeSplitVersionsLPr(serializer, pkg.getSplitNames(), pkg.getSplitRevisionCodes());
+ }
serializer.endTag(null, "package");
}
@@ -4059,6 +4070,7 @@ public final class Settings implements Watchable, Snappable, ResilientAtomicFile
long versionCode = 0;
boolean installedForceQueryable = false;
boolean isPendingRestore = false;
+ boolean isDebuggable = false;
float loadingProgress = 0;
long loadingCompletedTime = 0;
UUID domainSetId;
@@ -4068,6 +4080,7 @@ public final class Settings implements Watchable, Snappable, ResilientAtomicFile
byte[] restrictUpdateHash = null;
boolean isScannedAsStoppedSystemApp = false;
boolean isSdkLibrary = false;
+ int baseRevisionCode = 0;
try {
name = parser.getAttributeValue(null, ATTR_NAME);
realName = parser.getAttributeValue(null, "realName");
@@ -4085,6 +4098,7 @@ public final class Settings implements Watchable, Snappable, ResilientAtomicFile
updateAvailable = parser.getAttributeBoolean(null, "updateAvailable", false);
installedForceQueryable = parser.getAttributeBoolean(null, "forceQueryable", false);
isPendingRestore = parser.getAttributeBoolean(null, "pendingRestore", false);
+ isDebuggable = parser.getAttributeBoolean(null, "debuggable", false);
loadingProgress = parser.getAttributeFloat(null, "loadingProgress", 0);
loadingCompletedTime = parser.getAttributeLongHex(null, "loadingCompletedTime", 0);
@@ -4112,6 +4126,7 @@ public final class Settings implements Watchable, Snappable, ResilientAtomicFile
appMetadataFilePath = parser.getAttributeValue(null, "appMetadataFilePath");
appMetadataSource = parser.getAttributeInt(null, "appMetadataSource",
PackageManager.APP_METADATA_SOURCE_UNKNOWN);
+ baseRevisionCode = parser.getAttributeInt(null, "baseRevisionCode", 0);
isScannedAsStoppedSystemApp = parser.getAttributeBoolean(null,
"scannedAsStoppedSystemApp", false);
@@ -4259,11 +4274,13 @@ public final class Settings implements Watchable, Snappable, ResilientAtomicFile
.setUpdateAvailable(updateAvailable)
.setForceQueryableOverride(installedForceQueryable)
.setPendingRestore(isPendingRestore)
+ .setDebuggable(isDebuggable)
.setLoadingProgress(loadingProgress)
.setLoadingCompletedTime(loadingCompletedTime)
.setAppMetadataFilePath(appMetadataFilePath)
.setAppMetadataSource(appMetadataSource)
.setTargetSdkVersion(targetSdkVersion)
+ .setBaseRevisionCode(baseRevisionCode)
.setRestrictUpdateHash(restrictUpdateHash)
.setScannedAsStoppedSystemApp(isScannedAsStoppedSystemApp);
// Handle legacy string here for single-user mode
@@ -4369,6 +4386,8 @@ public final class Settings implements Watchable, Snappable, ResilientAtomicFile
readUsesStaticLibLPw(parser, packageSetting);
} else if (tagName.equals(TAG_USES_SDK_LIB)) {
readUsesSdkLibLPw(parser, packageSetting);
+ } else if (tagName.equals(TAG_SPLIT_VERSION)) {
+ readSplitVersionsLPw(parser, packageSetting);
} else {
PackageManagerService.reportSettingsProblem(Log.WARN,
"Unknown element under <package>: " + parser.getName());
@@ -4465,6 +4484,37 @@ public final class Settings implements Watchable, Snappable, ResilientAtomicFile
}
}
+ private void readSplitVersionsLPw(TypedXmlPullParser parser, PackageSetting outPs)
+ throws IOException, XmlPullParserException {
+ String splitName = parser.getAttributeValue(null, ATTR_NAME);
+ int splitRevision = parser.getAttributeInt(null, ATTR_VERSION, -1);
+ if (splitName != null && splitRevision >= 0) {
+ outPs.setSplitNames(ArrayUtils.appendElement(String.class,
+ outPs.getSplitNames(), splitName));
+ outPs.setSplitRevisionCodes(ArrayUtils.appendInt(
+ outPs.getSplitRevisionCodes(), splitRevision));
+ }
+
+ XmlUtils.skipCurrentTag(parser);
+ }
+
+ private void writeSplitVersionsLPr(TypedXmlSerializer serializer, String[] splitNames,
+ int[] splitRevisionCodes) throws IOException {
+ if (ArrayUtils.isEmpty(splitNames) || ArrayUtils.isEmpty(splitRevisionCodes)
+ || splitNames.length != splitRevisionCodes.length) {
+ return;
+ }
+ final int libLength = splitNames.length;
+ for (int i = 0; i < libLength; i++) {
+ final String splitName = splitNames[i];
+ final int splitRevision = splitRevisionCodes[i];
+ serializer.startTag(null, TAG_SPLIT_VERSION);
+ serializer.attribute(null, ATTR_NAME, splitName);
+ serializer.attributeInt(null, ATTR_VERSION, splitRevision);
+ serializer.endTag(null, TAG_SPLIT_VERSION);
+ }
+ }
+
private void readDisabledComponentsLPw(PackageSetting packageSetting, TypedXmlPullParser parser,
int userId) throws IOException, XmlPullParserException {
int outerDepth = parser.getDepth();
diff --git a/services/core/java/com/android/server/pm/ShortcutService.java b/services/core/java/com/android/server/pm/ShortcutService.java
index 1cd77ffcedaa..021f7aa9c215 100644
--- a/services/core/java/com/android/server/pm/ShortcutService.java
+++ b/services/core/java/com/android/server/pm/ShortcutService.java
@@ -3443,6 +3443,14 @@ public class ShortcutService extends IShortcutService.Stub {
}
@Override
+ public void removeShortcutChangeCallback(
+ @NonNull LauncherApps.ShortcutChangeCallback callback) {
+ synchronized (mServiceLock) {
+ mShortcutChangeCallbacks.remove(Objects.requireNonNull(callback));
+ }
+ }
+
+ @Override
public int getShortcutIconResId(int launcherUserId, @NonNull String callingPackage,
@NonNull String packageName, @NonNull String shortcutId, int userId) {
Objects.requireNonNull(callingPackage, "callingPackage");
@@ -4482,8 +4490,9 @@ public class ShortcutService extends IShortcutService.Stub {
ActivityOptions options = ActivityOptions.makeBasic()
.setPendingIntentBackgroundActivityStartMode(
MODE_BACKGROUND_ACTIVITY_START_DENIED);
- intentSender.sendIntent(mContext, /* code= */ 0, extras,
- /* onFinished=*/ null, /* handler= */ null, null, options.toBundle());
+ intentSender.sendIntent(mContext, 0 /* code */, extras,
+ null /* requiredPermission */, options.toBundle(),
+ null /* executor */, null /* onFinished*/);
} catch (SendIntentException e) {
Slog.w(TAG, "sendIntent failed().", e);
}
diff --git a/services/core/java/com/android/server/pm/UserManagerService.java b/services/core/java/com/android/server/pm/UserManagerService.java
index b9a9d64fc50e..dde9943ccd7b 100644
--- a/services/core/java/com/android/server/pm/UserManagerService.java
+++ b/services/core/java/com/android/server/pm/UserManagerService.java
@@ -1176,6 +1176,30 @@ public class UserManagerService extends IUserManager.Stub {
}
}
+ /** Marks the user as slated for deletion during boot if necessary. **/
+ @GuardedBy("mUsersLock")
+ private void markUserForRemovalIfNecessaryLU(UserInfo ui) {
+ if (!ui.isEphemeral()) {
+ // User should be ephemeral to be marked for removal.
+ return;
+ }
+ if (ui.preCreated) {
+ // Avoid marking pre-created users for removal.
+ return;
+ }
+ if (ui.lastLoggedInTime == 0 && ui.isGuest() && Resources.getSystem().getBoolean(
+ com.android.internal.R.bool.config_guestUserAutoCreated)) {
+ // Avoid marking auto-created but not-yet-logged-in guest user for removal. Because a
+ // new one will be created anyway, and this one doesn't have any personal data in it yet
+ // due to not being logged in.
+ return;
+ }
+ // Mark the user for removal.
+ addRemovingUserIdLocked(ui.id);
+ ui.partial = true;
+ ui.flags |= UserInfo.FLAG_DISABLED;
+ }
+
/* Prunes out any partially created or partially removed users. */
private void cleanupPartialUsers() {
ArrayList<UserInfo> partials = new ArrayList<>();
@@ -1901,6 +1925,7 @@ public class UserManagerService extends IUserManager.Stub {
Slog.i(LOG_TAG, "Quiet mode is already " + enableQuietMode);
return;
}
+ UserManager.invalidateQuietModeEnabledCache();
profile.flags ^= UserInfo.FLAG_QUIET_MODE;
profileUserData = getUserDataLU(profile.id);
}
@@ -4340,13 +4365,7 @@ public class UserManagerService extends IUserManager.Stub {
|| mNextSerialNumber <= userData.info.id) {
mNextSerialNumber = userData.info.id + 1;
}
- if (userData.info.isEphemeral() && !userData.info.preCreated
- && userData.info.id != UserHandle.USER_SYSTEM) {
- // Mark ephemeral user as slated for deletion.
- addRemovingUserIdLocked(userData.info.id);
- userData.info.partial = true;
- userData.info.flags |= UserInfo.FLAG_DISABLED;
- }
+ markUserForRemovalIfNecessaryLU(userData.info);
}
}
} else if (name.equals(TAG_GUEST_RESTRICTIONS)) {
diff --git a/services/core/java/com/android/server/pm/pkg/PackageState.java b/services/core/java/com/android/server/pm/pkg/PackageState.java
index e0ee199a343d..58761886ecb9 100644
--- a/services/core/java/com/android/server/pm/pkg/PackageState.java
+++ b/services/core/java/com/android/server/pm/pkg/PackageState.java
@@ -274,6 +274,14 @@ public interface PackageState {
boolean isPendingRestore();
/**
+ * @see ApplicationInfo#FLAG_DEBUGGABLE
+ * @see R.styleable#AndroidManifestApplication_debuggable
+ * @see AndroidPackage#isDebuggable
+ * @hide
+ */
+ boolean isDebuggable();
+
+ /**
* Retrieves the shared user app ID. Note that the actual shared user data is not available here
* and must be queried separately.
*
diff --git a/services/core/java/com/android/server/policy/ModifierShortcutManager.java b/services/core/java/com/android/server/policy/ModifierShortcutManager.java
index 3a79d0df4819..9b644880d737 100644
--- a/services/core/java/com/android/server/policy/ModifierShortcutManager.java
+++ b/services/core/java/com/android/server/policy/ModifierShortcutManager.java
@@ -16,14 +16,17 @@
package com.android.server.policy;
+import android.annotation.Nullable;
import android.annotation.SuppressLint;
import android.app.role.RoleManager;
import android.content.ActivityNotFoundException;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
+import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager;
import android.content.res.XmlResourceParser;
+import android.graphics.drawable.Icon;
import android.hardware.input.InputManager;
import android.os.Handler;
import android.os.RemoteException;
@@ -36,7 +39,11 @@ import android.util.SparseArray;
import android.view.InputDevice;
import android.view.KeyCharacterMap;
import android.view.KeyEvent;
+import android.view.KeyboardShortcutGroup;
+import android.view.KeyboardShortcutInfo;
+import com.android.internal.R;
+import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.policy.IShortcutService;
import com.android.internal.util.XmlUtils;
import com.android.server.input.KeyboardMetricsCollector;
@@ -46,7 +53,9 @@ import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import java.io.IOException;
+import java.util.ArrayList;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
/**
@@ -183,8 +192,12 @@ public class ModifierShortcutManager {
String rolePackage = mRoleManager.getDefaultApplication(role);
if (rolePackage != null) {
intent = mPackageManager.getLaunchIntentForPackage(rolePackage);
- intent.putExtra(EXTRA_ROLE, role);
- mRoleIntents.put(role, intent);
+ if (intent != null) {
+ intent.putExtra(EXTRA_ROLE, role);
+ mRoleIntents.put(role, intent);
+ } else {
+ Log.w(TAG, "No launch intent for role " + role);
+ }
} else {
Log.w(TAG, "No default application for role " + role);
}
@@ -198,8 +211,7 @@ public class ModifierShortcutManager {
private void loadShortcuts() {
try {
- XmlResourceParser parser = mContext.getResources().getXml(
- com.android.internal.R.xml.bookmarks);
+ XmlResourceParser parser = mContext.getResources().getXml(R.xml.bookmarks);
XmlUtils.beginDocument(parser, TAG_BOOKMARKS);
while (true) {
@@ -237,31 +249,7 @@ public class ModifierShortcutManager {
+ " className=" + className + " shortcutChar=" + shortcutChar);
continue;
}
- ComponentName componentName = new ComponentName(packageName, className);
- try {
- mPackageManager.getActivityInfo(componentName,
- PackageManager.MATCH_DIRECT_BOOT_AWARE
- | PackageManager.MATCH_DIRECT_BOOT_UNAWARE
- | PackageManager.MATCH_UNINSTALLED_PACKAGES);
- } catch (PackageManager.NameNotFoundException e) {
- String[] packages = mPackageManager.canonicalToCurrentPackageNames(
- new String[] { packageName });
- componentName = new ComponentName(packages[0], className);
- try {
- mPackageManager.getActivityInfo(componentName,
- PackageManager.MATCH_DIRECT_BOOT_AWARE
- | PackageManager.MATCH_DIRECT_BOOT_UNAWARE
- | PackageManager.MATCH_UNINSTALLED_PACKAGES);
- } catch (PackageManager.NameNotFoundException e1) {
- Log.w(TAG, "Unable to add bookmark: " + packageName
- + "/" + className + " not found.");
- continue;
- }
- }
-
- intent = new Intent(Intent.ACTION_MAIN);
- intent.addCategory(Intent.CATEGORY_LAUNCHER);
- intent.setComponent(componentName);
+ intent = resolveComponentNameIntent(packageName, className);
} else if (categoryName != null) {
if (roleName != null) {
Log.w(TAG, "Cannot specify role bookmark when category is present for"
@@ -270,6 +258,9 @@ public class ModifierShortcutManager {
continue;
}
intent = Intent.makeMainSelectorActivity(Intent.ACTION_MAIN, categoryName);
+ if (intent == null) {
+ Log.w(TAG, "Null selector intent for " + categoryName);
+ }
} else if (roleName != null) {
// We can't resolve the role at the time of this file being parsed as the
// device hasn't finished booting, so we will look it up lazily.
@@ -296,6 +287,32 @@ public class ModifierShortcutManager {
}
}
+ @Nullable
+ private Intent resolveComponentNameIntent(String packageName, String className) {
+ int flags = PackageManager.MATCH_DIRECT_BOOT_UNAWARE
+ | PackageManager.MATCH_DIRECT_BOOT_AWARE
+ | PackageManager.MATCH_UNINSTALLED_PACKAGES;
+ ComponentName componentName = new ComponentName(packageName, className);
+ try {
+ mPackageManager.getActivityInfo(componentName, flags);
+ } catch (PackageManager.NameNotFoundException e) {
+ String[] packages = mPackageManager.canonicalToCurrentPackageNames(
+ new String[] { packageName });
+ componentName = new ComponentName(packages[0], className);
+ try {
+ mPackageManager.getActivityInfo(componentName, flags);
+ } catch (PackageManager.NameNotFoundException e1) {
+ Log.w(TAG, "Unable to add bookmark: " + packageName
+ + "/" + className + " not found.");
+ return null;
+ }
+ }
+ Intent intent = new Intent(Intent.ACTION_MAIN);
+ intent.addCategory(Intent.CATEGORY_LAUNCHER);
+ intent.setComponent(componentName);
+ return intent;
+ }
+
void registerShortcutKey(long shortcutCode, IShortcutService shortcutService)
throws RemoteException {
IShortcutService service = mShortcutKeyServices.get(shortcutCode);
@@ -466,4 +483,131 @@ public class ModifierShortcutManager {
return false;
}
+
+ /**
+ * @param deviceId The input device id of the input device that will handle the shortcuts.
+ *
+ * @return a {@link KeyboardShortcutGroup} containing the application launch keyboard
+ * shortcuts parsed at boot time from {@code bookmarks.xml}.
+ */
+ public KeyboardShortcutGroup getApplicationLaunchKeyboardShortcuts(int deviceId) {
+ List<KeyboardShortcutInfo> shortcuts = new ArrayList();
+ for (int i = 0; i < mIntentShortcuts.size(); i++) {
+ KeyboardShortcutInfo info = shortcutInfoFromIntent(
+ (char) (mIntentShortcuts.keyAt(i)), mIntentShortcuts.valueAt(i), false);
+ if (info != null) {
+ shortcuts.add(info);
+ }
+ }
+
+ for (int i = 0; i < mShiftShortcuts.size(); i++) {
+ KeyboardShortcutInfo info = shortcutInfoFromIntent(
+ (char) (mShiftShortcuts.keyAt(i)), mShiftShortcuts.valueAt(i), true);
+ if (info != null) {
+ shortcuts.add(info);
+ }
+ }
+
+ for (int i = 0; i < mRoleShortcuts.size(); i++) {
+ String role = mRoleShortcuts.valueAt(i);
+ KeyboardShortcutInfo info = shortcutInfoFromIntent(
+ (char) (mRoleShortcuts.keyAt(i)), getRoleLaunchIntent(role), false);
+ if (info != null) {
+ shortcuts.add(info);
+ }
+ }
+
+ for (int i = 0; i < mShiftRoleShortcuts.size(); i++) {
+ String role = mShiftRoleShortcuts.valueAt(i);
+ KeyboardShortcutInfo info = shortcutInfoFromIntent(
+ (char) (mShiftRoleShortcuts.keyAt(i)), getRoleLaunchIntent(role), true);
+ if (info != null) {
+ shortcuts.add(info);
+ }
+ }
+
+ return new KeyboardShortcutGroup(
+ mContext.getString(R.string.keyboard_shortcut_group_applications),
+ shortcuts);
+ }
+
+ /**
+ * Given an intent to launch an application and the character and shift state that should
+ * trigger it, return a suitable {@link KeyboardShortcutInfo} that contains the label and
+ * icon for the target application.
+ *
+ * @param baseChar the character that triggers the shortcut
+ * @param intent the application launch intent
+ * @param shift whether the shift key is required to be presed.
+ */
+ @VisibleForTesting
+ KeyboardShortcutInfo shortcutInfoFromIntent(char baseChar, Intent intent, boolean shift) {
+ if (intent == null) {
+ return null;
+ }
+
+ CharSequence label;
+ Icon icon;
+ ActivityInfo resolvedActivity = intent.resolveActivityInfo(
+ mPackageManager, PackageManager.MATCH_DEFAULT_ONLY);
+ if (resolvedActivity == null) {
+ return null;
+ }
+ boolean isResolver = com.android.internal.app.ResolverActivity.class.getName().equals(
+ resolvedActivity.name);
+ if (isResolver) {
+ label = getIntentCategoryLabel(mContext,
+ intent.getSelector().getCategories().iterator().next());
+ if (label == null) {
+ return null;
+ }
+ icon = Icon.createWithResource(mContext, R.drawable.sym_def_app_icon);
+
+ } else {
+ label = resolvedActivity.loadLabel(mPackageManager);
+ icon = Icon.createWithResource(
+ resolvedActivity.packageName, resolvedActivity.getIconResource());
+ }
+ int modifiers = KeyEvent.META_META_ON;
+ if (shift) {
+ modifiers |= KeyEvent.META_SHIFT_ON;
+ }
+ return new KeyboardShortcutInfo(label, icon, baseChar, modifiers);
+ }
+
+ @VisibleForTesting
+ static String getIntentCategoryLabel(Context context, CharSequence category) {
+ int resid;
+ switch (category.toString()) {
+ case Intent.CATEGORY_APP_BROWSER:
+ resid = R.string.keyboard_shortcut_group_applications_browser;
+ break;
+ case Intent.CATEGORY_APP_CONTACTS:
+ resid = R.string.keyboard_shortcut_group_applications_contacts;
+ break;
+ case Intent.CATEGORY_APP_EMAIL:
+ resid = R.string.keyboard_shortcut_group_applications_email;
+ break;
+ case Intent.CATEGORY_APP_CALENDAR:
+ resid = R.string.keyboard_shortcut_group_applications_calendar;
+ break;
+ case Intent.CATEGORY_APP_MAPS:
+ resid = R.string.keyboard_shortcut_group_applications_maps;
+ break;
+ case Intent.CATEGORY_APP_MUSIC:
+ resid = R.string.keyboard_shortcut_group_applications_music;
+ break;
+ case Intent.CATEGORY_APP_MESSAGING:
+ resid = R.string.keyboard_shortcut_group_applications_sms;
+ break;
+ case Intent.CATEGORY_APP_CALCULATOR:
+ resid = R.string.keyboard_shortcut_group_applications_calculator;
+ break;
+ default:
+ Log.e(TAG, ("No label for app category " + category));
+ return null;
+ }
+ return context.getString(resid);
+ };
+
}
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index 0cda30f3affc..df973135f5f0 100644
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -189,6 +189,7 @@ import android.view.InputDevice;
import android.view.KeyCharacterMap;
import android.view.KeyCharacterMap.FallbackAction;
import android.view.KeyEvent;
+import android.view.KeyboardShortcutGroup;
import android.view.MotionEvent;
import android.view.ViewConfiguration;
import android.view.WindowManager;
@@ -932,8 +933,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
public void onWakeUp() {
synchronized (mLock) {
if (shouldEnableWakeGestureLp()) {
- performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY, false,
- "Wake Up");
+ performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY, "Wake Up");
mWindowWakeUpPolicy.wakeUpFromWakeGesture();
}
}
@@ -1402,7 +1402,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
break;
case LONG_PRESS_POWER_GLOBAL_ACTIONS:
mPowerKeyHandled = true;
- performHapticFeedback(HapticFeedbackConstants.LONG_PRESS_POWER_BUTTON, false,
+ performHapticFeedback(HapticFeedbackConstants.LONG_PRESS_POWER_BUTTON,
"Power - Long Press - Global Actions");
showGlobalActions();
break;
@@ -1414,14 +1414,14 @@ public class PhoneWindowManager implements WindowManagerPolicy {
if (ActivityManager.isUserAMonkey()) {
break;
}
- performHapticFeedback(HapticFeedbackConstants.LONG_PRESS_POWER_BUTTON, false,
+ performHapticFeedback(HapticFeedbackConstants.LONG_PRESS_POWER_BUTTON,
"Power - Long Press - Shut Off");
sendCloseSystemWindows(SYSTEM_DIALOG_REASON_GLOBAL_ACTIONS);
mWindowManagerFuncs.shutdown(behavior == LONG_PRESS_POWER_SHUT_OFF);
break;
case LONG_PRESS_POWER_GO_TO_VOICE_ASSIST:
mPowerKeyHandled = true;
- performHapticFeedback(HapticFeedbackConstants.LONG_PRESS_POWER_BUTTON, false,
+ performHapticFeedback(HapticFeedbackConstants.LONG_PRESS_POWER_BUTTON,
"Power - Long Press - Go To Voice Assist");
// Some devices allow the voice assistant intent during setup (and use that intent
// to launch something else, like Settings). So we explicitly allow that via the
@@ -1430,7 +1430,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
break;
case LONG_PRESS_POWER_ASSISTANT:
mPowerKeyHandled = true;
- performHapticFeedback(HapticFeedbackConstants.ASSISTANT_BUTTON, false,
+ performHapticFeedback(HapticFeedbackConstants.ASSISTANT_BUTTON,
"Power - Long Press - Go To Assistant");
final int powerKeyDeviceId = INVALID_INPUT_DEVICE_ID;
launchAssistAction(null, powerKeyDeviceId, eventTime,
@@ -1445,7 +1445,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
break;
case VERY_LONG_PRESS_POWER_GLOBAL_ACTIONS:
mPowerKeyHandled = true;
- performHapticFeedback(HapticFeedbackConstants.LONG_PRESS_POWER_BUTTON, false,
+ performHapticFeedback(HapticFeedbackConstants.LONG_PRESS_POWER_BUTTON,
"Power - Very Long Press - Show Global Actions");
showGlobalActions();
break;
@@ -1598,8 +1598,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
case TRIPLE_PRESS_PRIMARY_TOGGLE_ACCESSIBILITY:
mTalkbackShortcutController.toggleTalkback(mCurrentUserId);
if (mTalkbackShortcutController.isTalkBackShortcutGestureEnabled()) {
- performHapticFeedback(HapticFeedbackConstants.CONFIRM, /* always = */
- false, /* reason = */
+ performHapticFeedback(HapticFeedbackConstants.CONFIRM,
"Stem primary - Triple Press - Toggle Accessibility");
}
break;
@@ -1770,7 +1769,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
@Override
public void run() {
mEndCallKeyHandled = true;
- performHapticFeedback(HapticFeedbackConstants.LONG_PRESS, false,
+ performHapticFeedback(HapticFeedbackConstants.LONG_PRESS,
"End Call - Long Press - Show Global Actions");
showGlobalActionsInternal();
}
@@ -2086,8 +2085,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
return;
}
mHomeConsumed = true;
- performHapticFeedback(HapticFeedbackConstants.LONG_PRESS, false,
- "Home - Long Press");
+ performHapticFeedback(HapticFeedbackConstants.LONG_PRESS, "Home - Long Press");
switch (mLongPressOnHomeBehavior) {
case LONG_PRESS_HOME_ALL_APPS:
if (mHasFeatureLeanback) {
@@ -2404,7 +2402,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
PowerManager.GO_TO_SLEEP_REASON_TIMEOUT);
}
- mWindowManagerInternal.registerAppTransitionListener(new AppTransitionListener() {
+ final var transitionListener = new AppTransitionListener(DEFAULT_DISPLAY) {
@Override
public int onAppTransitionStartingLocked(long statusBarAnimationStartTime,
long statusBarAnimationDuration) {
@@ -2438,7 +2436,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
mLockAfterDreamingTransitionFinished = false;
}
}
- });
+ };
+ mWindowManagerInternal.registerAppTransitionListener(transitionListener);
mKeyguardDrawnTimeout = mContext.getResources().getInteger(
com.android.internal.R.integer.config_keyguardDrawnTimeout);
@@ -2529,7 +2528,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
break;
case POWER_VOLUME_UP_BEHAVIOR_GLOBAL_ACTIONS:
performHapticFeedback(
- HapticFeedbackConstants.LONG_PRESS_POWER_BUTTON, false,
+ HapticFeedbackConstants.LONG_PRESS_POWER_BUTTON,
"Power + Volume Up - Global Actions");
showGlobalActions();
mPowerKeyHandled = true;
@@ -3321,6 +3320,11 @@ public class PhoneWindowManager implements WindowManagerPolicy {
eventToLog).sendToTarget();
}
+ @Override
+ public KeyboardShortcutGroup getApplicationLaunchKeyboardShortcuts(int deviceId) {
+ return mModifierShortcutManager.getApplicationLaunchKeyboardShortcuts(deviceId);
+ }
+
// TODO(b/117479243): handle it in InputPolicy
// TODO (b/283241997): Add the remaining keyboard shortcut logging after refactoring
/** {@inheritDoc} */
@@ -3568,24 +3572,6 @@ public class PhoneWindowManager implements WindowManagerPolicy {
Slog.wtf(TAG, "KEYCODE_VOICE_ASSIST should be handled in"
+ " interceptKeyBeforeQueueing");
return true;
- case KeyEvent.KEYCODE_VIDEO_APP_1:
- case KeyEvent.KEYCODE_VIDEO_APP_2:
- case KeyEvent.KEYCODE_VIDEO_APP_3:
- case KeyEvent.KEYCODE_VIDEO_APP_4:
- case KeyEvent.KEYCODE_VIDEO_APP_5:
- case KeyEvent.KEYCODE_VIDEO_APP_6:
- case KeyEvent.KEYCODE_VIDEO_APP_7:
- case KeyEvent.KEYCODE_VIDEO_APP_8:
- case KeyEvent.KEYCODE_FEATURED_APP_1:
- case KeyEvent.KEYCODE_FEATURED_APP_2:
- case KeyEvent.KEYCODE_FEATURED_APP_3:
- case KeyEvent.KEYCODE_FEATURED_APP_4:
- case KeyEvent.KEYCODE_DEMO_APP_1:
- case KeyEvent.KEYCODE_DEMO_APP_2:
- case KeyEvent.KEYCODE_DEMO_APP_3:
- case KeyEvent.KEYCODE_DEMO_APP_4:
- Slog.wtf(TAG, "KEYCODE_APP_X should be handled in interceptKeyBeforeQueueing");
- return true;
case KeyEvent.KEYCODE_BRIGHTNESS_UP:
case KeyEvent.KEYCODE_BRIGHTNESS_DOWN:
if (down) {
@@ -5090,8 +5076,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
}
if (useHapticFeedback) {
- performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY, false,
- "Virtual Key - Press");
+ performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY, "Virtual Key - Press");
}
if (isWakeKey) {
@@ -5496,9 +5481,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
// In case startedGoingToSleep is called after screenTurnedOff (the source caller is in
// order but the methods run on different threads) and updateScreenOffSleepToken was
// skipped. Then acquire sleep token if screen was off.
- if (!mDefaultDisplayPolicy.isScreenOnFully() && !mDefaultDisplayPolicy.isScreenOnEarly()
- && com.android.window.flags.Flags.skipSleepingWhenSwitchingDisplay()) {
- updateScreenOffSleepToken(true /* acquire */, false /* isSwappingDisplay */);
+ if (!mDefaultDisplayPolicy.isScreenOnFully() && !mDefaultDisplayPolicy.isScreenOnEarly()) {
+ updateScreenOffSleepToken(true /* acquire */);
}
if (mKeyguardDelegate != null) {
@@ -5661,9 +5645,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
if (DEBUG_WAKEUP) Slog.i(TAG, "Display" + displayId + " turned off...");
if (displayId == DEFAULT_DISPLAY) {
- if (!isSwappingDisplay || mIsGoingToSleepDefaultDisplay
- || !com.android.window.flags.Flags.skipSleepingWhenSwitchingDisplay()) {
- updateScreenOffSleepToken(true /* acquire */, isSwappingDisplay);
+ if (!isSwappingDisplay || mIsGoingToSleepDefaultDisplay) {
+ updateScreenOffSleepToken(true /* acquire */);
}
mRequestedOrSleepingDefaultDisplay = false;
mDefaultDisplayPolicy.screenTurnedOff();
@@ -5722,7 +5705,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
if (displayId == DEFAULT_DISPLAY) {
Trace.asyncTraceBegin(Trace.TRACE_TAG_WINDOW_MANAGER, "screenTurningOn",
0 /* cookie */);
- updateScreenOffSleepToken(false /* acquire */, false /* isSwappingDisplay */);
+ updateScreenOffSleepToken(false /* acquire */);
mDefaultDisplayPolicy.screenTurningOn(screenOnListener);
mBootAnimationDismissable = false;
@@ -5985,8 +5968,10 @@ public class PhoneWindowManager implements WindowManagerPolicy {
public void setSafeMode(boolean safeMode) {
mSafeMode = safeMode;
if (safeMode) {
- performHapticFeedback(HapticFeedbackConstants.SAFE_MODE_ENABLED, true,
- "Safe Mode Enabled");
+ performHapticFeedback(Process.myUid(), mContext.getOpPackageName(),
+ HapticFeedbackConstants.SAFE_MODE_ENABLED,
+ "Safe Mode Enabled", HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING,
+ 0 /* privFlags */);
}
}
@@ -6228,9 +6213,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {
}
// TODO (multidisplay): Support multiple displays in WindowManagerPolicy.
- private void updateScreenOffSleepToken(boolean acquire, boolean isSwappingDisplay) {
+ private void updateScreenOffSleepToken(boolean acquire) {
if (acquire) {
- mScreenOffSleepTokenAcquirer.acquire(DEFAULT_DISPLAY, isSwappingDisplay);
+ mScreenOffSleepTokenAcquirer.acquire(DEFAULT_DISPLAY);
} else {
mScreenOffSleepTokenAcquirer.release(DEFAULT_DISPLAY);
}
@@ -6455,9 +6440,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {
Settings.Global.THEATER_MODE_ON, 0) == 1;
}
- private boolean performHapticFeedback(int effectId, boolean always, String reason) {
+ private boolean performHapticFeedback(int effectId, String reason) {
return performHapticFeedback(Process.myUid(), mContext.getOpPackageName(),
- effectId, always, reason, false /* fromIme */);
+ effectId, reason, 0 /* flags */, 0 /* privFlags */);
}
@Override
@@ -6466,8 +6451,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
}
@Override
- public boolean performHapticFeedback(int uid, String packageName, int effectId,
- boolean always, String reason, boolean fromIme) {
+ public boolean performHapticFeedback(int uid, String packageName, int effectId, String reason,
+ int flags, int privFlags) {
if (!mVibrator.hasVibrator()) {
return false;
}
@@ -6478,7 +6463,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
}
VibrationAttributes attrs =
mHapticFeedbackVibrationProvider.getVibrationAttributesForHapticFeedback(
- effectId, /* bypassVibrationIntensitySetting= */ always, fromIme);
+ effectId, flags, privFlags);
VibratorFrameworkStatsLogger.logPerformHapticsFeedbackIfKeyboard(uid, effectId);
mVibrator.vibrate(uid, packageName, effect, reason, attrs);
return true;
diff --git a/services/core/java/com/android/server/policy/WindowManagerPolicy.java b/services/core/java/com/android/server/policy/WindowManagerPolicy.java
index 9ca4e273ac39..1b394f65c5eb 100644
--- a/services/core/java/com/android/server/policy/WindowManagerPolicy.java
+++ b/services/core/java/com/android/server/policy/WindowManagerPolicy.java
@@ -80,8 +80,10 @@ import android.os.RemoteException;
import android.util.Slog;
import android.util.proto.ProtoOutputStream;
import android.view.Display;
+import android.view.HapticFeedbackConstants;
import android.view.IDisplayFoldListener;
import android.view.KeyEvent;
+import android.view.KeyboardShortcutGroup;
import android.view.WindowManager;
import android.view.WindowManagerGlobal;
import android.view.WindowManagerPolicyConstants;
@@ -698,6 +700,15 @@ public interface WindowManagerPolicy extends WindowManagerPolicyConstants {
public int interceptKeyBeforeQueueing(KeyEvent event, int policyFlags);
/**
+ * Return the set of applicaition launch keyboard shortcuts the system supports.
+ *
+ * @param deviceId The id of the {@link InputDevice} that will trigger the shortcut.
+ *
+ * @return {@link KeyboardShortcutGroup} containing the shortcuts.
+ */
+ KeyboardShortcutGroup getApplicationLaunchKeyboardShortcuts(int deviceId);
+
+ /**
* Called from the input reader thread before a motion is enqueued when the device is in a
* non-interactive state.
*
@@ -1069,7 +1080,8 @@ public interface WindowManagerPolicy extends WindowManagerPolicyConstants {
* Call from application to perform haptic feedback on its window.
*/
public boolean performHapticFeedback(int uid, String packageName, int effectId,
- boolean always, String reason, boolean fromIme);
+ String reason, @HapticFeedbackConstants.Flags int flags,
+ @HapticFeedbackConstants.PrivateFlags int privFlags);
/**
* Called when we have started keeping the screen on because a window
diff --git a/services/core/java/com/android/server/power/LowPowerStandbyController.java b/services/core/java/com/android/server/power/LowPowerStandbyController.java
index fa94b43b6d0e..421471e2eeec 100644
--- a/services/core/java/com/android/server/power/LowPowerStandbyController.java
+++ b/services/core/java/com/android/server/power/LowPowerStandbyController.java
@@ -1380,10 +1380,7 @@ public class LowPowerStandbyController {
Slog.d(TAG, "notifyStandbyPortsChanged");
}
- final Intent intent = new Intent(PowerManager.ACTION_LOW_POWER_STANDBY_PORTS_CHANGED);
- intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
- mContext.sendBroadcastAsUser(intent, UserHandle.ALL,
- Manifest.permission.MANAGE_LOW_POWER_STANDBY);
+ sendExplicitBroadcast(PowerManager.ACTION_LOW_POWER_STANDBY_PORTS_CHANGED);
}
/**
diff --git a/services/core/java/com/android/server/power/Notifier.java b/services/core/java/com/android/server/power/Notifier.java
index f85b8cc9c1bb..aa5f5a24f179 100644
--- a/services/core/java/com/android/server/power/Notifier.java
+++ b/services/core/java/com/android/server/power/Notifier.java
@@ -206,7 +206,6 @@ public class Notifier {
mPolicy = policy;
mFaceDownDetector = faceDownDetector;
mScreenUndimDetector = screenUndimDetector;
- mWakefulnessSessionObserver = new WakefulnessSessionObserver(mContext, null);
mActivityManagerInternal = LocalServices.getService(ActivityManagerInternal.class);
mInputManagerInternal = LocalServices.getService(InputManagerInternal.class);
mInputMethodManagerInternal = LocalServices.getService(InputMethodManagerInternal.class);
@@ -214,6 +213,7 @@ public class Notifier {
mDisplayManagerInternal = LocalServices.getService(DisplayManagerInternal.class);
mTrustManager = mContext.getSystemService(TrustManager.class);
mVibrator = mContext.getSystemService(Vibrator.class);
+ mWakefulnessSessionObserver = new WakefulnessSessionObserver(mContext, null);
mHandler = new NotifierHandler(looper);
mBackgroundExecutor = backgroundExecutor;
@@ -813,6 +813,8 @@ public class Notifier {
if (DEBUG) {
Slog.d(TAG, "onScreenPolicyUpdate: newPolicy=" + newPolicy);
}
+ mWakefulnessSessionObserver.onScreenPolicyUpdate(
+ SystemClock.uptimeMillis(), displayGroupId, newPolicy);
synchronized (mLock) {
Message msg = mHandler.obtainMessage(MSG_SCREEN_POLICY);
diff --git a/services/core/java/com/android/server/power/PowerManagerService.java b/services/core/java/com/android/server/power/PowerManagerService.java
index ce0120c245d6..6fe1ccde7a4a 100644
--- a/services/core/java/com/android/server/power/PowerManagerService.java
+++ b/services/core/java/com/android/server/power/PowerManagerService.java
@@ -33,6 +33,7 @@ import static android.os.PowerManagerInternal.wakefulnessToString;
import static com.android.internal.util.LatencyTracker.ACTION_TURN_ON_SCREEN;
import static com.android.server.deviceidle.Flags.disableWakelocksInLightIdle;
+import static com.android.server.display.DisplayDeviceConfig.INVALID_BRIGHTNESS_IN_CONFIG;
import android.annotation.IntDef;
import android.annotation.NonNull;
@@ -239,9 +240,6 @@ public final class PowerManagerService extends SystemService
// This should perhaps be a setting.
private static final int SCREEN_BRIGHTNESS_BOOST_TIMEOUT = 5 * 1000;
- // Float.NaN cannot be stored in config.xml so -2 is used instead
- private static final float INVALID_BRIGHTNESS_IN_CONFIG = -2f;
-
// How long a partial wake lock must be held until we consider it a long wake lock.
static final long MIN_LONG_WAKE_CHECK_INTERVAL = 60*1000;
@@ -619,7 +617,6 @@ public final class PowerManagerService extends SystemService
public final float mScreenBrightnessMinimum;
public final float mScreenBrightnessMaximum;
public final float mScreenBrightnessDefault;
- public final float mScreenBrightnessDoze;
public final float mScreenBrightnessDim;
// Value we store for tracking face down behavior.
@@ -1219,8 +1216,6 @@ public final class PowerManagerService extends SystemService
.config_screenBrightnessSettingMaximumFloat);
final float def = mContext.getResources().getFloat(com.android.internal.R.dimen
.config_screenBrightnessSettingDefaultFloat);
- final float doze = mContext.getResources().getFloat(com.android.internal.R.dimen
- .config_screenBrightnessDozeFloat);
final float dim = mContext.getResources().getFloat(com.android.internal.R.dimen
.config_screenBrightnessDimFloat);
@@ -1240,13 +1235,6 @@ public final class PowerManagerService extends SystemService
mScreenBrightnessMaximum = max;
mScreenBrightnessDefault = def;
}
- if (doze == INVALID_BRIGHTNESS_IN_CONFIG) {
- mScreenBrightnessDoze = BrightnessSynchronizer.brightnessIntToFloat(
- mContext.getResources().getInteger(com.android.internal.R.integer
- .config_screenBrightnessDoze));
- } else {
- mScreenBrightnessDoze = doze;
- }
if (dim == INVALID_BRIGHTNESS_IN_CONFIG) {
mScreenBrightnessDim = BrightnessSynchronizer.brightnessIntToFloat(
mContext.getResources().getInteger(com.android.internal.R.integer
@@ -6090,8 +6078,6 @@ public final class PowerManagerService extends SystemService
return mScreenBrightnessDefault;
case PowerManager.BRIGHTNESS_CONSTRAINT_TYPE_DIM:
return mScreenBrightnessDim;
- case PowerManager.BRIGHTNESS_CONSTRAINT_TYPE_DOZE:
- return mScreenBrightnessDoze;
default:
return PowerManager.BRIGHTNESS_INVALID_FLOAT;
}
diff --git a/services/core/java/com/android/server/power/WakefulnessSessionObserver.java b/services/core/java/com/android/server/power/WakefulnessSessionObserver.java
index d57cd5df41db..3546565480ad 100644
--- a/services/core/java/com/android/server/power/WakefulnessSessionObserver.java
+++ b/services/core/java/com/android/server/power/WakefulnessSessionObserver.java
@@ -16,8 +16,11 @@
package com.android.server.power;
+import static android.hardware.display.DisplayManagerInternal.DisplayPowerRequest.POLICY_BRIGHT;
+import static android.hardware.display.DisplayManagerInternal.DisplayPowerRequest.POLICY_DIM;
import static android.os.PowerManager.USER_ACTIVITY_EVENT_OTHER;
import static android.os.PowerManagerInternal.isInteractive;
+import static android.view.Display.DEFAULT_DISPLAY;
import static com.android.server.power.PowerManagerService.DEFAULT_SCREEN_OFF_TIMEOUT;
import static com.android.server.power.ScreenTimeoutOverridePolicy.RELEASE_REASON_NON_INTERACTIVE;
@@ -34,6 +37,9 @@ import android.app.ActivityManager;
import android.app.SynchronousUserSwitchObserver;
import android.content.Context;
import android.database.ContentObserver;
+import android.hardware.display.DisplayManager;
+import android.hardware.display.DisplayManagerInternal;
+import android.hardware.display.DisplayManagerInternal.DisplayPowerRequest;
import android.os.Handler;
import android.os.PowerManager;
import android.os.PowerManagerInternal;
@@ -44,9 +50,13 @@ import android.provider.Settings;
import android.util.IndentingPrintWriter;
import android.util.SparseArray;
import android.view.Display;
+import android.view.DisplayAddress;
+import android.view.DisplayInfo;
import com.android.internal.annotations.VisibleForTesting;
+import com.android.internal.os.BackgroundThread;
import com.android.internal.util.FrameworkStatsLog;
+import com.android.server.LocalServices;
import java.io.PrintWriter;
import java.lang.annotation.Retention;
@@ -117,9 +127,42 @@ public class WakefulnessSessionObserver {
@Retention(RetentionPolicy.SOURCE)
private @interface OverrideOutcome {}
- private static final int DEFAULT_USER_ACTIVITY = USER_ACTIVITY_EVENT_OTHER;
- private static final long TIMEOUT_USER_INITIATED_REVERT_THRESHOLD_MILLIS = 5000L;
+ private static final int POLICY_REASON_UNKNOWN = FrameworkStatsLog
+ .SCREEN_DIM_REPORTED__POLICY_REASON__UNKNOWN;
+ @VisibleForTesting
+ protected static final int POLICY_REASON_OFF_TIMEOUT = FrameworkStatsLog
+ .SCREEN_DIM_REPORTED__POLICY_REASON__OFF_TIMEOUT;
+ @VisibleForTesting
+ protected static final int POLICY_REASON_OFF_POWER_BUTTON = FrameworkStatsLog
+ .SCREEN_DIM_REPORTED__POLICY_REASON__OFF_POWER_BUTTON;
+ @VisibleForTesting
+ protected static final int POLICY_REASON_BRIGHT_UNDIM = FrameworkStatsLog
+ .SCREEN_DIM_REPORTED__POLICY_REASON__BRIGHT_UNDIM;
+ @VisibleForTesting
+ protected static final int POLICY_REASON_BRIGHT_INITIATED_REVERT = FrameworkStatsLog
+ .SCREEN_DIM_REPORTED__POLICY_REASON__BRIGHT_INITIATED_REVERT;
+
+ /**
+ * Policy Reason
+ * {@link android.os.statsd.power.ScreenDimReported.PolicyReason}.
+ */
+ @IntDef(prefix = {"POLICY_REASON_"}, value = {
+ POLICY_REASON_UNKNOWN,
+ POLICY_REASON_OFF_TIMEOUT,
+ POLICY_REASON_OFF_POWER_BUTTON,
+ POLICY_REASON_BRIGHT_UNDIM,
+ POLICY_REASON_BRIGHT_INITIATED_REVERT
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ private @interface PolicyReason {}
+
+ @VisibleForTesting protected static final int DEFAULT_USER_ACTIVITY = USER_ACTIVITY_EVENT_OTHER;
+ private static final long USER_INITIATED_REVERT_THRESHOLD_MILLIS = 5000L;
private static final long SEND_OVERRIDE_TIMEOUT_LOG_THRESHOLD_MILLIS = 1000L;
+ @VisibleForTesting
+ protected static final long SCREEN_POLICY_DIM_POWER_OFF_BRIGHT_THRESHOLD_MILLIS = 500L;
+
+ @VisibleForTesting protected static final Object HANDLER_TOKEN = new Object();
private Context mContext;
private int mScreenOffTimeoutMs;
@@ -130,17 +173,24 @@ public class WakefulnessSessionObserver {
protected WakefulnessSessionFrameworkStatsLogger mWakefulnessSessionFrameworkStatsLogger;
private final Clock mClock;
private final Object mLock = new Object();
+ private final Handler mHandler;
- public WakefulnessSessionObserver(Context context, Injector injector) {
+ private DisplayManagerInternal mDisplayManagerInternal;
+ private int mPhysicalDisplayPortIdForDefaultDisplay;
+
+ public WakefulnessSessionObserver(
+ Context context, Injector injector) {
if (injector == null) {
injector = new Injector();
}
mContext = context;
+ mDisplayManagerInternal = injector.getDisplayManagerInternal();
mWakefulnessSessionFrameworkStatsLogger = injector
.getWakefulnessSessionFrameworkStatsLogger();
mClock = injector.getClock();
- updateSettingScreenOffTimeout(context);
+ mHandler = injector.getHandler();
+ updateSettingScreenOffTimeout(mContext);
try {
final UserSwitchObserver observer = new UserSwitchObserver();
@@ -164,6 +214,31 @@ public class WakefulnessSessionObserver {
},
UserHandle.USER_ALL);
+ mPhysicalDisplayPortIdForDefaultDisplay = getPhysicalDisplayPortId(DEFAULT_DISPLAY);
+ DisplayManager displayManager = mContext.getSystemService(DisplayManager.class);
+ if (displayManager != null) {
+ displayManager.registerDisplayListener(
+ new DisplayManager.DisplayListener() {
+ @Override
+ public void onDisplayChanged(int displayId) {
+ if (displayId == DEFAULT_DISPLAY) {
+ mPhysicalDisplayPortIdForDefaultDisplay = getPhysicalDisplayPortId(
+ DEFAULT_DISPLAY);
+ }
+ }
+
+ @Override
+ public void onDisplayAdded(int i) {
+ }
+
+ @Override
+ public void onDisplayRemoved(int i) {
+ }
+ },
+ mHandler,
+ DisplayManager.EVENT_FLAG_DISPLAY_CHANGED);
+ }
+
mPowerGroups.append(
Display.DEFAULT_DISPLAY_GROUP,
new WakefulnessSessionPowerGroup(Display.DEFAULT_DISPLAY_GROUP));
@@ -186,6 +261,20 @@ public class WakefulnessSessionObserver {
}
/**
+ * Track the screen policy
+ *
+ * @param eventTime policy changing time, in uptime millis.
+ * @param powerGroupId Power Group Id for this screen policy
+ * @param newPolicy Screen Policy defined in {@link DisplayPowerRequest}
+ */
+ public void onScreenPolicyUpdate(long eventTime, int powerGroupId, int newPolicy) {
+ if (!mPowerGroups.contains(powerGroupId)) {
+ mPowerGroups.append(powerGroupId, new WakefulnessSessionPowerGroup(powerGroupId));
+ }
+ mPowerGroups.get(powerGroupId).onScreenPolicyUpdate(eventTime, newPolicy);
+ }
+
+ /**
* Track the system wakefulness
*
* @param powerGroupId Power Group Id for this wakefulness changes
@@ -267,6 +356,14 @@ public class WakefulnessSessionObserver {
}
}
+ private int getPhysicalDisplayPortId(int displayId) {
+ if (mDisplayManagerInternal == null) {
+ return -1;
+ }
+ DisplayInfo display = mDisplayManagerInternal.getDisplayInfo(displayId);
+ return ((DisplayAddress.Physical) display.address).getPort();
+ }
+
private int getScreenOffTimeout() {
synchronized (mLock) {
return mScreenOffTimeoutMs;
@@ -277,10 +374,9 @@ public class WakefulnessSessionObserver {
@VisibleForTesting
protected class WakefulnessSessionPowerGroup {
private static final long TIMEOUT_OFF_RESET_TIMESTAMP = -1;
-
private int mPowerGroupId;
private int mCurrentWakefulness;
- private boolean mIsInteractive = false;
+ @VisibleForTesting protected boolean mIsInteractive = false;
// state on start timestamp: will be used in state off to calculate the duration of state on
private long mInteractiveStateOnStartTimestamp;
@VisibleForTesting
@@ -295,6 +391,17 @@ public class WakefulnessSessionObserver {
private int mTimeoutOverrideWakeLockCounter = 0;
// The timestamp when Override Timeout is set to false
private @ScreenTimeoutOverridePolicy.ReleaseReason int mTimeoutOverrideReleaseReason;
+ // The timestamp when current screen policy is set
+ private long mCurrentScreenPolicyTimestamp;
+ // current screen policy
+ private int mCurrentScreenPolicy;
+ // The screen policy before the current one
+ private int mPrevScreenPolicy;
+ // The previous screen policy duration
+ private int mPrevScreenPolicyDurationMs;
+ // The past dim duration
+ @VisibleForTesting protected int mPastDimDurationMs;
+ private long mInteractiveOffTimestamp;
// The timestamp when state off by timeout occurs
// will set TIMEOUT_OFF_RESET_TIMESTAMP if state on or state off by power button
private long mTimeoutOffTimestamp;
@@ -307,6 +414,10 @@ public class WakefulnessSessionObserver {
mPrevUserActivityEvent = DEFAULT_USER_ACTIVITY;
mPrevUserActivityTimestamp = -1;
mPowerGroupId = powerGroupId;
+ mCurrentScreenPolicy = mPrevScreenPolicy = POLICY_BRIGHT;
+ mCurrentScreenPolicyTimestamp = 0;
+ mPrevScreenPolicyDurationMs = 0;
+ mPastDimDurationMs = 0;
}
public void notifyUserActivity(long eventTime, @PowerManager.UserActivityEvent int event) {
@@ -320,6 +431,21 @@ public class WakefulnessSessionObserver {
mCurrentUserActivityTimestamp = eventTime;
}
+ public void onScreenPolicyUpdate(long eventTime, int newPolicy) {
+ if (newPolicy == mCurrentScreenPolicy) {
+ return;
+ }
+
+ if (newPolicy == POLICY_BRIGHT) {
+ checkAndLogDimIfQualified(POLICY_REASON_BRIGHT_UNDIM, eventTime);
+ }
+
+ mPrevScreenPolicy = mCurrentScreenPolicy;
+ mCurrentScreenPolicy = newPolicy;
+ mPrevScreenPolicyDurationMs = (int) (eventTime - mCurrentScreenPolicyTimestamp);
+ mCurrentScreenPolicyTimestamp = eventTime;
+ }
+
public void onWakefulnessChangeStarted(int wakefulness, int changeReason, long eventTime) {
mCurrentWakefulness = wakefulness;
if (mIsInteractive == isInteractive(wakefulness)) {
@@ -331,10 +457,10 @@ public class WakefulnessSessionObserver {
mInteractiveStateOnStartTimestamp = eventTime;
// Log the outcome of screen timeout override (USER INITIATED REVERT),
- // when user initiates to revert the screen off state in a short period.
+ // when user initiates to revert the off state in a short period.
if (mTimeoutOffTimestamp != TIMEOUT_OFF_RESET_TIMESTAMP) {
- long offToOnDurationMs = eventTime - mTimeoutOffTimestamp;
- if (offToOnDurationMs < TIMEOUT_USER_INITIATED_REVERT_THRESHOLD_MILLIS) {
+ long timeoutOffToOnDurationMs = eventTime - mTimeoutOffTimestamp;
+ if (timeoutOffToOnDurationMs < USER_INITIATED_REVERT_THRESHOLD_MILLIS) {
mWakefulnessSessionFrameworkStatsLogger.logTimeoutOverrideEvent(
mPowerGroupId,
OVERRIDE_OUTCOME_TIMEOUT_USER_INITIATED_REVERT,
@@ -344,11 +470,15 @@ public class WakefulnessSessionObserver {
}
mTimeoutOffTimestamp = TIMEOUT_OFF_RESET_TIMESTAMP;
}
+
+ checkAndLogDimIfQualified(POLICY_REASON_BRIGHT_INITIATED_REVERT, eventTime);
+
} else {
int lastUserActivity = mCurrentUserActivityEvent;
long lastUserActivityDurationMs = eventTime - mCurrentUserActivityTimestamp;
@OffReason int interactiveStateOffReason = OFF_REASON_UNKNOWN;
int reducedInteractiveStateOnDurationMs = 0;
+ mInteractiveOffTimestamp = eventTime;
if (changeReason == PowerManager.GO_TO_SLEEP_REASON_POWER_BUTTON) {
interactiveStateOffReason = OFF_REASON_POWER_BUTTON;
@@ -369,6 +499,9 @@ public class WakefulnessSessionObserver {
mSendOverrideTimeoutLogTimestamp = eventTime;
mTimeoutOverrideReleaseReason = RELEASE_REASON_UNKNOWN; // reset the reason
}
+
+ checkAndLogDimIfQualified(POLICY_REASON_OFF_POWER_BUTTON, eventTime);
+
} else if (changeReason == PowerManager.GO_TO_SLEEP_REASON_TIMEOUT) {
// Interactive Off reason is timeout
interactiveStateOffReason = OFF_REASON_TIMEOUT;
@@ -393,6 +526,8 @@ public class WakefulnessSessionObserver {
// state instantly
mTimeoutOffTimestamp = eventTime;
}
+
+ checkAndLogDimIfQualified(POLICY_REASON_OFF_TIMEOUT, eventTime);
}
long interactiveStateOnDurationMs =
@@ -462,6 +597,106 @@ public class WakefulnessSessionObserver {
}
}
+ private void checkAndLogDimIfQualified(
+ @PolicyReason int reasonToBeChecked, long eventTime) {
+ // Only log dim event when DEFAULT_DISPLAY
+ if (mPowerGroupId != DEFAULT_DISPLAY) {
+ return;
+ }
+
+ int dimDurationMs = 0;
+ int lastUserActivity = mCurrentUserActivityEvent;
+ int lastUserActivityDurationMs = (int) (eventTime - mCurrentUserActivityTimestamp);
+ switch (reasonToBeChecked) {
+ case POLICY_REASON_OFF_TIMEOUT: {
+ // The policy ordering:
+ // (1) --DIM--OFF/DOZE->| or (2) --DIM->| because OFF/DOZE hasn't been updated.
+ dimDurationMs = (int) (eventTime - mCurrentScreenPolicyTimestamp); //(1)--DIM->|
+ if (mPrevScreenPolicy == POLICY_DIM) { // for (2) --DIM--OFF/DOZE->|
+ dimDurationMs = mPrevScreenPolicyDurationMs;
+ }
+ mWakefulnessSessionFrameworkStatsLogger.logDimEvent(
+ mPhysicalDisplayPortIdForDefaultDisplay,
+ reasonToBeChecked,
+ lastUserActivity,
+ lastUserActivityDurationMs,
+ dimDurationMs,
+ mScreenOffTimeoutMs);
+ mPastDimDurationMs = dimDurationMs;
+ return;
+ }
+ case POLICY_REASON_OFF_POWER_BUTTON: {
+ // Power Off will be triggered by USER_ACTIVITY_EVENT_BUTTON
+ // The metric wants to record the previous activity before EVENT_BUTTON
+ lastUserActivity = mPrevUserActivityEvent;
+ lastUserActivityDurationMs = (int) (eventTime - mPrevUserActivityTimestamp);
+ // the policy ordering:
+ // (1) ---BRIGHT->| or (2) ---DIM->| because OFF/DOZE hasn't been updated
+ dimDurationMs = 0; // for (1) ---BRIGHT->| which doesn't have dim (no need log)
+ if (mCurrentScreenPolicy == POLICY_DIM) { // for (2) ---DIM->|
+ dimDurationMs = (int) (eventTime - mCurrentScreenPolicyTimestamp);
+ mWakefulnessSessionFrameworkStatsLogger.logDimEvent(
+ mPhysicalDisplayPortIdForDefaultDisplay,
+ reasonToBeChecked,
+ lastUserActivity,
+ lastUserActivityDurationMs,
+ dimDurationMs,
+ mScreenOffTimeoutMs);
+ mHandler.removeCallbacksAndMessages(HANDLER_TOKEN);
+ }
+
+ mPastDimDurationMs = dimDurationMs;
+ return;
+ }
+ case POLICY_REASON_BRIGHT_UNDIM: {
+ // Has checked the latest screen policy is POLICY_BRIGHT in onScreenPolicyUpdate
+ if (mCurrentScreenPolicy == POLICY_DIM) { // policy ordering: --DIM--BRIGHT->|
+ int savedDimDurationMs = (int) (eventTime - mCurrentScreenPolicyTimestamp);
+ int savedLastUserActivity = lastUserActivity;
+ int savedLastUserActivityDurationMs = lastUserActivityDurationMs;
+
+ // For the undim case --DIM--BRIGHT->|, it needs wait 500 ms to
+ // differentiate between "power button off" case, which is
+ // --DIM--BRIGHT(<500ms)--OFF/DOZE->|
+ // [Method] Wait 500 ms to see whether triggers power button off or not.
+ // [Reason] We got --DIM--BRIGHT->|. However, if BRIGHT is so short (<500ms)
+ // and follows OFF/DOZE, it represents power button off, not undim.
+ // It is normal to have a short BRIGHT for power button off because
+ // the system need to play an animation before off.
+ mHandler.postDelayed(() -> {
+ mWakefulnessSessionFrameworkStatsLogger.logDimEvent(
+ mPhysicalDisplayPortIdForDefaultDisplay,
+ reasonToBeChecked,
+ savedLastUserActivity,
+ savedLastUserActivityDurationMs,
+ savedDimDurationMs,
+ mScreenOffTimeoutMs);
+ mPastDimDurationMs = savedDimDurationMs;
+ }, HANDLER_TOKEN, SCREEN_POLICY_DIM_POWER_OFF_BRIGHT_THRESHOLD_MILLIS);
+ }
+ return;
+ }
+ case POLICY_REASON_BRIGHT_INITIATED_REVERT: {
+ // the dimDuration in BRIGHT_INITIATE_REVERT is for the dim duration before
+ // screen interactive off (mPastDimDurationMs)
+ long offToOnDurationMs = eventTime - mInteractiveOffTimestamp;
+ if (mPastDimDurationMs > 0
+ && offToOnDurationMs < USER_INITIATED_REVERT_THRESHOLD_MILLIS) {
+ mWakefulnessSessionFrameworkStatsLogger.logDimEvent(
+ mPhysicalDisplayPortIdForDefaultDisplay,
+ reasonToBeChecked,
+ lastUserActivity,
+ lastUserActivityDurationMs,
+ mPastDimDurationMs,
+ mScreenOffTimeoutMs);
+ }
+ return;
+ }
+ default:
+ return;
+ }
+ }
+
void dump(IndentingPrintWriter writer) {
final long now = mClock.uptimeMillis();
@@ -475,6 +710,12 @@ public class WakefulnessSessionObserver {
final long prevUserActivityDurationMs = now - mPrevUserActivityTimestamp;
writer.println("previous user activity duration: " + prevUserActivityDurationMs);
writer.println("is in override timeout: " + isInOverrideTimeout());
+ writer.println("mIsInteractive: " + mIsInteractive);
+ writer.println("current screen policy: " + mCurrentScreenPolicy);
+ final long currentScreenPolicyDurationMs = now - mCurrentScreenPolicyTimestamp;
+ writer.println("current screen policy duration: " + currentScreenPolicyDurationMs);
+ writer.println("previous screen policy: " + mPrevScreenPolicy);
+ writer.println("past screen policy duration: " + mPrevScreenPolicyDurationMs);
writer.decreaseIndent();
}
}
@@ -512,6 +753,24 @@ public class WakefulnessSessionObserver {
(long) defaultTimeoutMs);
}
+ public void logDimEvent(
+ int physicalDisplayPortId,
+ @PolicyReason int policyReason,
+ @PowerManager.UserActivityEvent int userActivityEvent,
+ int lastUserActivityEventDurationMs,
+ int dimDurationMs,
+ int defaultTimeoutMs) {
+ int logUserActivityEvent = convertToLogUserActivityEvent(userActivityEvent);
+ FrameworkStatsLog.write(
+ FrameworkStatsLog.SCREEN_DIM_REPORTED,
+ physicalDisplayPortId,
+ policyReason,
+ logUserActivityEvent,
+ lastUserActivityEventDurationMs,
+ dimDurationMs,
+ defaultTimeoutMs);
+ }
+
private static final int USER_ACTIVITY_OTHER = FrameworkStatsLog
.SCREEN_INTERACTIVE_SESSION_REPORTED__LAST_USER_ACTIVITY_EVENT__OTHER;
@@ -591,5 +850,13 @@ public class WakefulnessSessionObserver {
Clock getClock() {
return SystemClock::uptimeMillis;
}
+
+ Handler getHandler() {
+ return BackgroundThread.getHandler();
+ }
+
+ DisplayManagerInternal getDisplayManagerInternal() {
+ return LocalServices.getService(DisplayManagerInternal.class);
+ }
}
}
diff --git a/services/core/java/com/android/server/power/hint/HintManagerService.java b/services/core/java/com/android/server/power/hint/HintManagerService.java
index 7e27407fc57f..f6c3d8ef1249 100644
--- a/services/core/java/com/android/server/power/hint/HintManagerService.java
+++ b/services/core/java/com/android/server/power/hint/HintManagerService.java
@@ -76,6 +76,7 @@ import java.util.List;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Objects;
+import java.util.PriorityQueue;
import java.util.Set;
import java.util.TreeMap;
import java.util.concurrent.TimeUnit;
@@ -109,12 +110,31 @@ public final class HintManagerService extends SystemService {
@GuardedBy("mChannelMapLock")
private ArrayMap<Integer, TreeMap<Integer, ChannelItem>> mChannelMap;
+ /*
+ * Multi-level map storing the session statistics since last pull from StatsD.
+ * The first level is keyed by the UID of the process owning the session.
+ * The second level is keyed by the tag of the session. The point of separating different
+ * tags is that since different categories (e.g. HWUI vs APP) of the sessions may have different
+ * behaviors.
+ */
+ @GuardedBy("mSessionSnapshotMapLock")
+ private ArrayMap<Integer, ArrayMap<Integer, AppHintSessionSnapshot>> mSessionSnapshotMap;
+
/** Lock to protect mActiveSessions and the UidObserver. */
private final Object mLock = new Object();
/** Lock to protect mChannelMap. */
private final Object mChannelMapLock = new Object();
+ /*
+ * Lock to protect mSessionSnapshotMap.
+ * Nested acquisition of mSessionSnapshotMapLock and mLock should be avoided.
+ * We should grab these separately.
+ * When we need to have nested acquisitions, we should always follow the order of acquiring
+ * mSessionSnapshotMapLock first then mLock.
+ */
+ private final Object mSessionSnapshotMapLock = new Object();
+
@GuardedBy("mNonIsolatedTidsLock")
private final Map<Integer, Set<Long>> mNonIsolatedTids;
@@ -135,6 +155,8 @@ public final class HintManagerService extends SystemService {
private int mPowerHalVersion;
private final PackageManager mPackageManager;
+ private boolean mUsesFmq;
+
private static final String PROPERTY_SF_ENABLE_CPU_HINT = "debug.sf.enable_adpf_cpu_hint";
private static final String PROPERTY_HWUI_ENABLE_HINT_MANAGER = "debug.hwui.use_hint_manager";
@@ -162,6 +184,7 @@ public final class HintManagerService extends SystemService {
}
mActiveSessions = new ArrayMap<>();
mChannelMap = new ArrayMap<>();
+ mSessionSnapshotMap = new ArrayMap<>();
mNativeWrapper = injector.createNativeWrapper();
mNativeWrapper.halInit();
mHintSessionPreferredRate = mNativeWrapper.halGetHintSessionPreferredRate();
@@ -170,6 +193,7 @@ public final class HintManagerService extends SystemService {
LocalServices.getService(ActivityManagerInternal.class));
mPowerHal = injector.createIPower();
mPowerHalVersion = 0;
+ mUsesFmq = false;
if (mPowerHal != null) {
try {
mPowerHalVersion = mPowerHal.getInterfaceVersion();
@@ -197,6 +221,134 @@ public final class HintManagerService extends SystemService {
}
}
+ private class AppHintSessionSnapshot {
+ /*
+ * Per-Uid and Per-SessionTag snapshot that tracks metrics including
+ * number of created sessions, number of power efficienct sessions, and
+ * maximum number of threads in a session.
+ * Given that it's Per-SessionTag, each uid can have multiple snapshots.
+ */
+ int mCurrentSessionCount;
+ int mMaxConcurrentSession;
+ int mMaxThreadCount;
+ int mPowerEfficientSessionCount;
+
+ final int mTargetDurationNsCountPQSize = 100;
+ PriorityQueue<TargetDurationRecord> mTargetDurationNsCountPQ;
+
+ class TargetDurationRecord implements Comparable<TargetDurationRecord> {
+ long mTargetDurationNs;
+ long mTimestamp;
+ int mCount;
+ TargetDurationRecord(long targetDurationNs) {
+ mTargetDurationNs = targetDurationNs;
+ mTimestamp = System.currentTimeMillis();
+ mCount = 1;
+ }
+
+ @Override
+ public int compareTo(TargetDurationRecord t) {
+ int tCount = t.getCount();
+ int thisCount = this.getCount();
+ // Here we sort in the order of number of count in ascending order.
+ // i.e. the lowest count of target duration is at the head of the queue.
+ // Upon same count, the tiebreaker is the timestamp, the older item will be at the
+ // front of the queue.
+ if (tCount == thisCount) {
+ return (t.getTimestamp() < this.getTimestamp()) ? 1 : -1;
+ }
+ return (tCount < thisCount) ? 1 : -1;
+ }
+ long getTargetDurationNs() {
+ return mTargetDurationNs;
+ }
+
+ int getCount() {
+ return mCount;
+ }
+
+ long getTimestamp() {
+ return mTimestamp;
+ }
+
+ void setCount(int count) {
+ mCount = count;
+ }
+
+ void setTimestamp() {
+ mTimestamp = System.currentTimeMillis();
+ }
+
+ void setTargetDurationNs(long targetDurationNs) {
+ mTargetDurationNs = targetDurationNs;
+ }
+ }
+
+ AppHintSessionSnapshot() {
+ mCurrentSessionCount = 0;
+ mMaxConcurrentSession = 0;
+ mMaxThreadCount = 0;
+ mPowerEfficientSessionCount = 0;
+ mTargetDurationNsCountPQ = new PriorityQueue<>(1);
+ }
+
+ void updateUponSessionCreation(int threadCount, long targetDuration) {
+ mCurrentSessionCount += 1;
+ mMaxConcurrentSession = Math.max(mMaxConcurrentSession, mCurrentSessionCount);
+ mMaxThreadCount = Math.max(mMaxThreadCount, threadCount);
+ updateTargetDurationNs(targetDuration);
+ }
+
+ void updateUponSessionClose() {
+ mCurrentSessionCount -= 1;
+ }
+
+ void logPowerEfficientSession() {
+ mPowerEfficientSessionCount += 1;
+ }
+
+ void updateThreadCount(int threadCount) {
+ mMaxThreadCount = Math.max(mMaxThreadCount, threadCount);
+ }
+
+ void updateTargetDurationNs(long targetDurationNs) {
+ for (TargetDurationRecord t : mTargetDurationNsCountPQ) {
+ if (t.getTargetDurationNs() == targetDurationNs) {
+ t.setCount(t.getCount() + 1);
+ t.setTimestamp();
+ return;
+ }
+ }
+ if (mTargetDurationNsCountPQ.size() == mTargetDurationNsCountPQSize) {
+ mTargetDurationNsCountPQ.poll();
+ }
+ mTargetDurationNsCountPQ.add(new TargetDurationRecord(targetDurationNs));
+ }
+
+ int getMaxConcurrentSession() {
+ return mMaxConcurrentSession;
+ }
+
+ int getMaxThreadCount() {
+ return mMaxThreadCount;
+ }
+
+ int getPowerEfficientSessionCount() {
+ return mPowerEfficientSessionCount;
+ }
+
+ long[] targetDurationNsList() {
+ final int listSize = 5;
+ long[] targetDurations = new long[listSize];
+ while (mTargetDurationNsCountPQ.size() > listSize) {
+ mTargetDurationNsCountPQ.poll();
+ }
+ for (int i = 0; i < listSize && !mTargetDurationNsCountPQ.isEmpty(); ++i) {
+ targetDurations[i] = mTargetDurationNsCountPQ.poll().getTargetDurationNs();
+ }
+ return targetDurations;
+ }
+ }
private boolean isHalSupported() {
return mHintSessionPreferredRate != -1;
}
@@ -235,6 +387,11 @@ public final class HintManagerService extends SystemService {
null, // use default PullAtomMetadata values
DIRECT_EXECUTOR,
this::onPullAtom);
+ statsManager.setPullAtomCallback(
+ FrameworkStatsLog.ADPF_SESSION_SNAPSHOT,
+ null, // use default PullAtomMetadata values
+ DIRECT_EXECUTOR,
+ this::onPullAtom);
}
private int onPullAtom(int atomTag, @NonNull List<StatsEvent> data) {
@@ -247,11 +404,82 @@ public final class HintManagerService extends SystemService {
data.add(FrameworkStatsLog.buildStatsEvent(
FrameworkStatsLog.ADPF_SYSTEM_COMPONENT_INFO,
isSurfaceFlingerUsingCpuHint,
- isHwuiHintManagerEnabled));
+ isHwuiHintManagerEnabled,
+ getFmqUsage()));
+ }
+ if (atomTag == FrameworkStatsLog.ADPF_SESSION_SNAPSHOT) {
+ synchronized (mSessionSnapshotMapLock) {
+ for (int i = 0; i < mSessionSnapshotMap.size(); ++i) {
+ final int uid = mSessionSnapshotMap.keyAt(i);
+ final ArrayMap<Integer, AppHintSessionSnapshot> sessionSnapshots =
+ mSessionSnapshotMap.valueAt(i);
+ for (int j = 0; j < sessionSnapshots.size(); ++j) {
+ final int sessionTag = sessionSnapshots.keyAt(j);
+ final AppHintSessionSnapshot sessionSnapshot = sessionSnapshots.valueAt(j);
+ data.add(FrameworkStatsLog.buildStatsEvent(
+ FrameworkStatsLog.ADPF_SESSION_SNAPSHOT,
+ uid,
+ sessionTag,
+ sessionSnapshot.getMaxConcurrentSession(),
+ sessionSnapshot.getMaxThreadCount(),
+ sessionSnapshot.getPowerEfficientSessionCount(),
+ sessionSnapshot.targetDurationNsList()
+ ));
+ }
+ }
+ }
+ restoreSessionSnapshot();
}
return android.app.StatsManager.PULL_SUCCESS;
}
+ private int getFmqUsage() {
+ if (mUsesFmq) {
+ return FrameworkStatsLog.ADPFSYSTEM_COMPONENT_INFO__FMQ_SUPPORTED__SUPPORTED;
+ } else if (mPowerHalVersion < 5) {
+ return FrameworkStatsLog.ADPFSYSTEM_COMPONENT_INFO__FMQ_SUPPORTED__HAL_VERSION_NOT_MET;
+ } else {
+ return FrameworkStatsLog.ADPFSYSTEM_COMPONENT_INFO__FMQ_SUPPORTED__UNSUPPORTED;
+ }
+ }
+
+ private void restoreSessionSnapshot() {
+ // clean up snapshot map and rebuild with current active sessions
+ synchronized (mSessionSnapshotMapLock) {
+ mSessionSnapshotMap.clear();
+ synchronized (mLock) {
+ for (int i = 0; i < mActiveSessions.size(); i++) {
+ ArrayMap<IBinder, ArraySet<AppHintSession>> tokenMap =
+ mActiveSessions.valueAt(i);
+ for (int j = 0; j < tokenMap.size(); j++) {
+ ArraySet<AppHintSession> sessionSet = tokenMap.valueAt(j);
+ for (int k = 0; k < sessionSet.size(); ++k) {
+ AppHintSession appHintSession = sessionSet.valueAt(k);
+ final int tag = appHintSession.getTag();
+ final int uid = appHintSession.getUid();
+ final long targetDuationNs =
+ appHintSession.getTargetDurationNs();
+ final int threadCount = appHintSession.getThreadIds().length;
+ ArrayMap<Integer, AppHintSessionSnapshot> snapshots =
+ mSessionSnapshotMap.get(uid);
+ if (snapshots == null) {
+ snapshots = new ArrayMap<>();
+ mSessionSnapshotMap.put(uid, snapshots);
+ }
+ AppHintSessionSnapshot snapshot = snapshots.get(tag);
+ if (snapshot == null) {
+ snapshot = new AppHintSessionSnapshot();
+ snapshots.put(tag, snapshot);
+ }
+ snapshot.updateUponSessionCreation(threadCount,
+ targetDuationNs);
+ }
+ }
+ }
+ }
+ }
+ }
+
/**
* Wrapper around the static-native methods from native.
*
@@ -833,17 +1061,13 @@ public final class HintManagerService extends SystemService {
// we change the session tag to SessionTag.GAME
// as it was not previously classified
switch (getUidApplicationCategory(callingUid)) {
- case ApplicationInfo.CATEGORY_GAME:
- tag = SessionTag.GAME;
- break;
- case ApplicationInfo.CATEGORY_UNDEFINED:
+ case ApplicationInfo.CATEGORY_GAME -> tag = SessionTag.GAME;
+ case ApplicationInfo.CATEGORY_UNDEFINED ->
// We use CATEGORY_UNDEFINED to filter the case when
// PackageManager.NameNotFoundException is caught,
// which should not happen.
tag = SessionTag.APP;
- break;
- default:
- tag = SessionTag.APP;
+ default -> tag = SessionTag.APP;
}
}
@@ -889,9 +1113,15 @@ public final class HintManagerService extends SystemService {
logPerformanceHintSessionAtom(
callingUid, sessionId, durationNanos, tids, tag);
+ synchronized (mSessionSnapshotMapLock) {
+ // Update session snapshot upon session creation
+ mSessionSnapshotMap.computeIfAbsent(callingUid, k -> new ArrayMap<>())
+ .computeIfAbsent(tag, k -> new AppHintSessionSnapshot())
+ .updateUponSessionCreation(tids.length, durationNanos);
+ }
synchronized (mLock) {
- AppHintSession hs = new AppHintSession(callingUid, callingTgid, tids, token,
- halSessionPtr, durationNanos);
+ AppHintSession hs = new AppHintSession(callingUid, callingTgid, tag, tids,
+ token, halSessionPtr, durationNanos);
ArrayMap<IBinder, ArraySet<AppHintSession>> tokenMap =
mActiveSessions.get(callingUid);
if (tokenMap == null) {
@@ -904,6 +1134,8 @@ public final class HintManagerService extends SystemService {
tokenMap.put(token, sessionSet);
}
sessionSet.add(hs);
+ mUsesFmq = mUsesFmq || hasChannel(callingTgid, callingUid);
+
return hs;
}
} finally {
@@ -996,6 +1228,7 @@ public final class HintManagerService extends SystemService {
final class AppHintSession extends IHintSession.Stub implements IBinder.DeathRecipient {
protected final int mUid;
protected final int mPid;
+ protected final int mTag;
protected int[] mThreadIds;
protected final IBinder mToken;
protected long mHalSessionPtr;
@@ -1003,6 +1236,7 @@ public final class HintManagerService extends SystemService {
protected boolean mUpdateAllowedByProcState;
protected int[] mNewThreadIds;
protected boolean mPowerEfficient;
+ protected boolean mHasBeenPowerEfficient;
protected boolean mShouldForcePause;
private enum SessionModes {
@@ -1010,16 +1244,18 @@ public final class HintManagerService extends SystemService {
};
protected AppHintSession(
- int uid, int pid, int[] threadIds, IBinder token,
+ int uid, int pid, int sessionTag, int[] threadIds, IBinder token,
long halSessionPtr, long durationNanos) {
mUid = uid;
mPid = pid;
+ mTag = sessionTag;
mToken = token;
mThreadIds = threadIds;
mHalSessionPtr = halSessionPtr;
mTargetDurationNanos = durationNanos;
mUpdateAllowedByProcState = true;
mPowerEfficient = false;
+ mHasBeenPowerEfficient = false;
mShouldForcePause = false;
final boolean allowed = mUidObserver.isUidForeground(mUid);
updateHintAllowedByProcState(allowed);
@@ -1056,6 +1292,20 @@ public final class HintManagerService extends SystemService {
mNativeWrapper.halUpdateTargetWorkDuration(mHalSessionPtr, targetDurationNanos);
mTargetDurationNanos = targetDurationNanos;
}
+ synchronized (mSessionSnapshotMapLock) {
+ ArrayMap<Integer, AppHintSessionSnapshot> sessionSnapshots =
+ mSessionSnapshotMap.get(mUid);
+ if (sessionSnapshots == null) {
+ Slogf.w(TAG, "Session snapshot map is null for uid " + mUid);
+ return;
+ }
+ AppHintSessionSnapshot sessionSnapshot = sessionSnapshots.get(mTag);
+ if (sessionSnapshot == null) {
+ Slogf.w(TAG, "Session snapshot is null for uid " + mUid + " and tag " + mTag);
+ return;
+ }
+ sessionSnapshot.updateTargetDurationNs(mTargetDurationNanos);
+ }
}
@Override
@@ -1108,6 +1358,20 @@ public final class HintManagerService extends SystemService {
if (sessionSet.isEmpty()) tokenMap.remove(mToken);
if (tokenMap.isEmpty()) mActiveSessions.remove(mUid);
}
+ synchronized (mSessionSnapshotMapLock) {
+ ArrayMap<Integer, AppHintSessionSnapshot> sessionSnapshots =
+ mSessionSnapshotMap.get(mUid);
+ if (sessionSnapshots == null) {
+ Slogf.w(TAG, "Session snapshot map is null for uid " + mUid);
+ return;
+ }
+ AppHintSessionSnapshot sessionSnapshot = sessionSnapshots.get(mTag);
+ if (sessionSnapshot == null) {
+ Slogf.w(TAG, "Session snapshot is null for uid " + mUid + " and tag " + mTag);
+ return;
+ }
+ sessionSnapshot.updateUponSessionClose();
+ }
if (powerhintThreadCleanup()) {
synchronized (mNonIsolatedTidsLock) {
final int[] tids = getTidsInternal();
@@ -1191,6 +1455,21 @@ public final class HintManagerService extends SystemService {
mShouldForcePause = false;
}
}
+ synchronized (mSessionSnapshotMapLock) {
+ ArrayMap<Integer, AppHintSessionSnapshot> sessionSnapshots =
+ mSessionSnapshotMap.get(mUid);
+ if (sessionSnapshots == null) {
+ Slogf.w(TAG, "Session snapshot map is null for uid " + mUid);
+ return;
+ }
+ AppHintSessionSnapshot sessionSnapshot = sessionSnapshots.get(mTag);
+ if (sessionSnapshot == null) {
+ Slogf.w(TAG, "Session snapshot is null for uid " + mUid + " and tag "
+ + mTag);
+ return;
+ }
+ sessionSnapshot.updateThreadCount(tids.length);
+ }
}
public int[] getThreadIds() {
@@ -1231,6 +1510,26 @@ public final class HintManagerService extends SystemService {
}
mNativeWrapper.halSetMode(mHalSessionPtr, mode, enabled);
}
+ if (enabled && (mode == SessionModes.POWER_EFFICIENCY.ordinal())) {
+ if (!mHasBeenPowerEfficient) {
+ mHasBeenPowerEfficient = true;
+ synchronized (mSessionSnapshotMapLock) {
+ ArrayMap<Integer, AppHintSessionSnapshot> sessionSnapshots =
+ mSessionSnapshotMap.get(mUid);
+ if (sessionSnapshots == null) {
+ Slogf.w(TAG, "Session snapshot map is null for uid " + mUid);
+ return;
+ }
+ AppHintSessionSnapshot sessionSnapshot = sessionSnapshots.get(mTag);
+ if (sessionSnapshot == null) {
+ Slogf.w(TAG, "Session snapshot is null for uid " + mUid
+ + " and tag " + mTag);
+ return;
+ }
+ sessionSnapshot.logPowerEfficientSession();
+ }
+ }
+ }
}
@Override
@@ -1254,6 +1553,20 @@ public final class HintManagerService extends SystemService {
}
}
+ public int getUid() {
+ return mUid;
+ }
+
+ public int getTag() {
+ return mTag;
+ }
+
+ public long getTargetDurationNs() {
+ synchronized (this) {
+ return mTargetDurationNanos;
+ }
+ }
+
void validateWorkDuration(WorkDuration workDuration) {
if (DEBUG) {
Slogf.d(TAG, "WorkDuration("
diff --git a/services/core/java/com/android/server/power/stats/BatteryStatsDumpHelperImpl.java b/services/core/java/com/android/server/power/stats/BatteryStatsDumpHelperImpl.java
index ad146afe16e7..fb54c5de260a 100644
--- a/services/core/java/com/android/server/power/stats/BatteryStatsDumpHelperImpl.java
+++ b/services/core/java/com/android/server/power/stats/BatteryStatsDumpHelperImpl.java
@@ -20,6 +20,8 @@ import android.os.BatteryStats;
import android.os.BatteryUsageStats;
import android.os.BatteryUsageStatsQuery;
+import com.android.server.power.optimization.Flags;
+
public class BatteryStatsDumpHelperImpl implements BatteryStats.BatteryStatsDumpHelper {
private final BatteryUsageStatsProvider mBatteryUsageStatsProvider;
@@ -33,6 +35,9 @@ public class BatteryStatsDumpHelperImpl implements BatteryStats.BatteryStatsDump
.setMaxStatsAgeMs(0);
if (detailed) {
builder.includePowerModels().includeProcessStateData().includeVirtualUids();
+ if (Flags.batteryUsageStatsByPowerAndScreenState()) {
+ builder.includePowerStateData().includeScreenStateData();
+ }
}
return mBatteryUsageStatsProvider.getBatteryUsageStats((BatteryStatsImpl) batteryStats,
builder.build());
diff --git a/services/core/java/com/android/server/power/stats/BatteryStatsImpl.java b/services/core/java/com/android/server/power/stats/BatteryStatsImpl.java
index 1b7bf89d7b44..4052a64aabba 100644
--- a/services/core/java/com/android/server/power/stats/BatteryStatsImpl.java
+++ b/services/core/java/com/android/server/power/stats/BatteryStatsImpl.java
@@ -16356,6 +16356,7 @@ public class BatteryStatsImpl extends BatteryStats {
mBluetoothPowerStatsCollector.collectAndDump(pw);
mCameraPowerStatsCollector.collectAndDump(pw);
mGnssPowerStatsCollector.collectAndDump(pw);
+ mCustomEnergyConsumerPowerStatsCollector.collectAndDump(pw);
}
private final Runnable mWriteAsyncRunnable = () -> {
diff --git a/services/core/java/com/android/server/power/stats/BatteryUsageStatsProvider.java b/services/core/java/com/android/server/power/stats/BatteryUsageStatsProvider.java
index 8127b8217bb0..ac6896696de6 100644
--- a/services/core/java/com/android/server/power/stats/BatteryUsageStatsProvider.java
+++ b/services/core/java/com/android/server/power/stats/BatteryUsageStatsProvider.java
@@ -201,7 +201,8 @@ public class BatteryUsageStatsProvider {
batteryUsageStatsBuilder = new BatteryUsageStats.Builder(
stats.getCustomEnergyConsumerNames(), includePowerModels,
- includeProcessStateData, minConsumedPowerThreshold);
+ includeProcessStateData, query.isScreenStateDataNeeded(),
+ query.isPowerStateDataNeeded(), minConsumedPowerThreshold);
// TODO(b/188068523): use a monotonic clock to ensure resilience of order and duration
// of batteryUsageStats sessions to wall-clock adjustments
@@ -348,6 +349,7 @@ public class BatteryUsageStatsProvider {
final String[] customEnergyConsumerNames = stats.getCustomEnergyConsumerNames();
final BatteryUsageStats.Builder builder = new BatteryUsageStats.Builder(
customEnergyConsumerNames, includePowerModels, includeProcessStateData,
+ query.isScreenStateDataNeeded(), query.isPowerStateDataNeeded(),
minConsumedPowerThreshold);
if (mPowerStatsStore == null) {
Log.e(TAG, "PowerStatsStore is unavailable");
@@ -408,7 +410,6 @@ public class BatteryUsageStatsProvider {
+ " does not include process state data");
continue;
}
-
builder.add(snapshot);
}
}
diff --git a/services/core/java/com/android/server/power/stats/CustomEnergyConsumerPowerStatsCollector.java b/services/core/java/com/android/server/power/stats/CustomEnergyConsumerPowerStatsCollector.java
index 11919019be4a..0273ba6a6d18 100644
--- a/services/core/java/com/android/server/power/stats/CustomEnergyConsumerPowerStatsCollector.java
+++ b/services/core/java/com/android/server/power/stats/CustomEnergyConsumerPowerStatsCollector.java
@@ -19,6 +19,7 @@ package com.android.server.power.stats;
import android.hardware.power.stats.EnergyConsumerType;
import android.os.BatteryConsumer;
+import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
@@ -65,4 +66,12 @@ public class CustomEnergyConsumerPowerStatsCollector extends PowerStatsCollector
}
return success;
}
+
+ @Override
+ public void collectAndDump(PrintWriter pw) {
+ ensureInitialized();
+ for (int i = 0; i < mCollectors.size(); i++) {
+ mCollectors.get(i).collectAndDump(pw);
+ }
+ }
}
diff --git a/services/core/java/com/android/server/power/stats/EnergyConsumerPowerStatsCollector.java b/services/core/java/com/android/server/power/stats/EnergyConsumerPowerStatsCollector.java
index cace94114aa0..ce11fa0edaf7 100644
--- a/services/core/java/com/android/server/power/stats/EnergyConsumerPowerStatsCollector.java
+++ b/services/core/java/com/android/server/power/stats/EnergyConsumerPowerStatsCollector.java
@@ -176,9 +176,12 @@ public class EnergyConsumerPowerStatsCollector extends PowerStatsCollector {
for (EnergyConsumerAttribution attribution : perUid) {
int uid = mUidResolver.mapUid(attribution.uid);
- long lastEnergy = mLastConsumerEnergyPerUid.get(uid);
- long deltaEnergy = attribution.energyUWs - lastEnergy;
+ long lastEnergy = mLastConsumerEnergyPerUid.get(uid, ENERGY_UNSPECIFIED);
mLastConsumerEnergyPerUid.put(uid, attribution.energyUWs);
+ if (lastEnergy == ENERGY_UNSPECIFIED) {
+ continue;
+ }
+ long deltaEnergy = attribution.energyUWs - lastEnergy;
if (deltaEnergy <= 0) {
continue;
}
@@ -189,7 +192,8 @@ public class EnergyConsumerPowerStatsCollector extends PowerStatsCollector {
}
mLayout.setUidConsumedEnergy(uidStats, 0,
- mLayout.getUidConsumedEnergy(uidStats, 0) + deltaEnergy);
+ mLayout.getUidConsumedEnergy(uidStats, 0)
+ + uJtoUc(deltaEnergy, averageVoltage));
}
}
}
diff --git a/services/core/java/com/android/server/power/stats/PowerStatsCollector.java b/services/core/java/com/android/server/power/stats/PowerStatsCollector.java
index d9f6c1ff1444..f5b00054bea4 100644
--- a/services/core/java/com/android/server/power/stats/PowerStatsCollector.java
+++ b/services/core/java/com/android/server/power/stats/PowerStatsCollector.java
@@ -196,12 +196,11 @@ public abstract class PowerStatsCollector {
}
IndentingPrintWriter out = new IndentingPrintWriter(pw);
- out.print(getClass().getSimpleName());
if (!isEnabled()) {
+ out.print(getClass().getSimpleName());
out.println(": disabled");
return;
}
- out.println();
ArrayList<PowerStats> collected = new ArrayList<>();
Consumer<PowerStats> consumer = collected::add;
@@ -215,11 +214,9 @@ public abstract class PowerStatsCollector {
removeConsumer(consumer);
}
- out.increaseIndent();
for (PowerStats stats : collected) {
stats.dump(out);
}
- out.decreaseIndent();
}
private void awaitCompletion() {
diff --git a/services/core/java/com/android/server/power/stats/PowerStatsExporter.java b/services/core/java/com/android/server/power/stats/PowerStatsExporter.java
index 549a97ea49cd..0f1349287a0f 100644
--- a/services/core/java/com/android/server/power/stats/PowerStatsExporter.java
+++ b/services/core/java/com/android/server/power/stats/PowerStatsExporter.java
@@ -129,17 +129,55 @@ public class PowerStatsExporter {
if (descriptor == null) {
return;
}
+ boolean isCustomComponent =
+ descriptor.powerComponentId >= BatteryConsumer.FIRST_CUSTOM_POWER_COMPONENT_ID;
PowerStatsLayout layout = new PowerStatsLayout();
layout.fromExtras(descriptor.extras);
long[] deviceStats = new long[descriptor.statsArrayLength];
+ for (int screenState = 0; screenState < BatteryConsumer.SCREEN_STATE_COUNT; screenState++) {
+ if (batteryUsageStatsBuilder.isScreenStateDataNeeded()) {
+ if (screenState == BatteryConsumer.SCREEN_STATE_UNSPECIFIED) {
+ continue;
+ }
+ } else if (screenState != BatteryConsumer.SCREEN_STATE_UNSPECIFIED) {
+ continue;
+ }
+
+ for (int powerState = 0; powerState < BatteryConsumer.POWER_STATE_COUNT; powerState++) {
+ if (batteryUsageStatsBuilder.isPowerStateDataNeeded() && !isCustomComponent) {
+ if (powerState == BatteryConsumer.POWER_STATE_UNSPECIFIED) {
+ continue;
+ }
+ } else if (powerState != BatteryConsumer.POWER_STATE_BATTERY) {
+ continue;
+ }
+
+ populateAggregatedBatteryConsumer(batteryUsageStatsBuilder, powerComponentStats,
+ layout, deviceStats, screenState, powerState);
+ }
+ }
+ if (layout.isUidPowerAttributionSupported()) {
+ populateBatteryConsumers(batteryUsageStatsBuilder,
+ powerComponentStats, layout);
+ }
+ }
+
+ private static void populateAggregatedBatteryConsumer(
+ BatteryUsageStats.Builder batteryUsageStatsBuilder,
+ PowerComponentAggregatedPowerStats powerComponentStats, PowerStatsLayout layout,
+ long[] deviceStats, @BatteryConsumer.ScreenState int screenState,
+ @BatteryConsumer.PowerState int powerState) {
+ int powerComponentId = powerComponentStats.powerComponentId;
+ boolean isCustomComponent =
+ powerComponentId >= BatteryConsumer.FIRST_CUSTOM_POWER_COMPONENT_ID;
+
double[] totalPower = new double[1];
MultiStateStats.States.forEachTrackedStateCombination(
powerComponentStats.getConfig().getDeviceStateConfig(),
states -> {
- if (states[AggregatedPowerStatsConfig.STATE_POWER]
- != AggregatedPowerStatsConfig.POWER_STATE_BATTERY) {
+ if (!areMatchingStates(states, screenState, powerState)) {
return;
}
@@ -153,24 +191,23 @@ public class PowerStatsExporter {
AggregateBatteryConsumer.Builder deviceScope =
batteryUsageStatsBuilder.getAggregateBatteryConsumerBuilder(
BatteryUsageStats.AGGREGATE_BATTERY_CONSUMER_SCOPE_DEVICE);
- if (descriptor.powerComponentId >= BatteryConsumer.FIRST_CUSTOM_POWER_COMPONENT_ID) {
- if (batteryUsageStatsBuilder.isSupportedCustomPowerComponent(
- descriptor.powerComponentId)) {
- deviceScope.addConsumedPowerForCustomComponent(descriptor.powerComponentId,
- totalPower[0]);
+ if (isCustomComponent) {
+ if (batteryUsageStatsBuilder.isSupportedCustomPowerComponent(powerComponentId)) {
+ deviceScope.addConsumedPowerForCustomComponent(powerComponentId, totalPower[0]);
}
} else {
- deviceScope.addConsumedPower(descriptor.powerComponentId,
- totalPower[0], BatteryConsumer.POWER_MODEL_UNDEFINED);
- }
-
- if (layout.isUidPowerAttributionSupported()) {
- populateUidBatteryConsumers(batteryUsageStatsBuilder,
- powerComponentStats, layout);
+ BatteryConsumer.Key key = deviceScope.getKey(powerComponentId,
+ BatteryConsumer.PROCESS_STATE_ANY, screenState, powerState);
+ if (key != null) {
+ deviceScope.addConsumedPower(key, totalPower[0],
+ BatteryConsumer.POWER_MODEL_UNDEFINED);
+ }
+ deviceScope.addConsumedPower(powerComponentId, totalPower[0],
+ BatteryConsumer.POWER_MODEL_UNDEFINED);
}
}
- private static void populateUidBatteryConsumers(
+ private static void populateBatteryConsumers(
BatteryUsageStats.Builder batteryUsageStatsBuilder,
PowerComponentAggregatedPowerStats powerComponentStats,
PowerStatsLayout layout) {
@@ -185,11 +222,44 @@ public class PowerStatsExporter {
.getUidStateConfig()[AggregatedPowerStatsConfig.STATE_PROCESS_STATE].isTracked()
&& powerComponentId < BatteryConsumer.FIRST_CUSTOM_POWER_COMPONENT_ID;
+ ArrayList<Integer> uids = new ArrayList<>();
+ powerComponentStats.collectUids(uids);
+ for (int screenState = 0; screenState < BatteryConsumer.SCREEN_STATE_COUNT; screenState++) {
+ if (batteryUsageStatsBuilder.isScreenStateDataNeeded()) {
+ if (screenState == BatteryConsumer.SCREEN_STATE_UNSPECIFIED) {
+ continue;
+ }
+ } else if (screenState != BatteryConsumer.SCREEN_STATE_UNSPECIFIED) {
+ continue;
+ }
+
+ for (int powerState = 0; powerState < BatteryConsumer.POWER_STATE_COUNT; powerState++) {
+ if (batteryUsageStatsBuilder.isPowerStateDataNeeded()) {
+ if (powerState == BatteryConsumer.POWER_STATE_UNSPECIFIED) {
+ continue;
+ }
+ } else if (powerState != BatteryConsumer.POWER_STATE_BATTERY) {
+ continue;
+ }
+
+ populateUidBatteryConsumers(batteryUsageStatsBuilder, powerComponentStats, layout,
+ uids, powerComponent, uidStats, breakDownByProcState, screenState,
+ powerState);
+ }
+ }
+ }
+
+ private static void populateUidBatteryConsumers(
+ BatteryUsageStats.Builder batteryUsageStatsBuilder,
+ PowerComponentAggregatedPowerStats powerComponentStats, PowerStatsLayout layout,
+ List<Integer> uids, AggregatedPowerStatsConfig.PowerComponent powerComponent,
+ long[] uidStats, boolean breakDownByProcState,
+ @BatteryConsumer.ScreenState int screenState,
+ @BatteryConsumer.PowerState int powerState) {
+ int powerComponentId = powerComponentStats.powerComponentId;
double[] powerByProcState =
new double[breakDownByProcState ? BatteryConsumer.PROCESS_STATE_COUNT : 1];
double powerAllApps = 0;
- ArrayList<Integer> uids = new ArrayList<>();
- powerComponentStats.collectUids(uids);
for (int uid : uids) {
UidBatteryConsumer.Builder builder =
batteryUsageStatsBuilder.getOrCreateUidBatteryConsumerBuilder(uid);
@@ -199,8 +269,7 @@ public class PowerStatsExporter {
MultiStateStats.States.forEachTrackedStateCombination(
powerComponent.getUidStateConfig(),
states -> {
- if (states[AggregatedPowerStatsConfig.STATE_POWER]
- != AggregatedPowerStatsConfig.POWER_STATE_BATTERY) {
+ if (!areMatchingStates(states, screenState, powerState)) {
return;
}
@@ -224,8 +293,17 @@ public class PowerStatsExporter {
powerAllProcStates += power;
if (breakDownByProcState
&& procState != BatteryConsumer.PROCESS_STATE_UNSPECIFIED) {
- builder.addConsumedPower(builder.getKey(powerComponentId, procState), power,
- BatteryConsumer.POWER_MODEL_UNDEFINED);
+ if (batteryUsageStatsBuilder.isPowerStateDataNeeded()) {
+ builder.addConsumedPower(
+ builder.getKey(powerComponentId, procState, screenState,
+ powerState),
+ power, BatteryConsumer.POWER_MODEL_UNDEFINED);
+ } else {
+ builder.addConsumedPower(
+ builder.getKey(powerComponentId, procState, screenState,
+ BatteryConsumer.POWER_STATE_UNSPECIFIED),
+ power, BatteryConsumer.POWER_MODEL_UNDEFINED);
+ }
}
}
if (powerComponentId >= BatteryConsumer.FIRST_CUSTOM_POWER_COMPONENT_ID) {
@@ -243,8 +321,49 @@ public class PowerStatsExporter {
if (powerComponentId >= BatteryConsumer.FIRST_CUSTOM_POWER_COMPONENT_ID) {
allAppsScope.addConsumedPowerForCustomComponent(powerComponentId, powerAllApps);
} else {
+ BatteryConsumer.Key key = allAppsScope.getKey(powerComponentId,
+ BatteryConsumer.PROCESS_STATE_ANY, screenState, powerState);
+ if (key != null) {
+ allAppsScope.addConsumedPower(key, powerAllApps,
+ BatteryConsumer.POWER_MODEL_UNDEFINED);
+ }
allAppsScope.addConsumedPower(powerComponentId, powerAllApps,
BatteryConsumer.POWER_MODEL_UNDEFINED);
}
}
+
+ private static boolean areMatchingStates(int[] states,
+ @BatteryConsumer.ScreenState int screenState,
+ @BatteryConsumer.PowerState int powerState) {
+ switch (screenState) {
+ case BatteryConsumer.SCREEN_STATE_ON:
+ if (states[AggregatedPowerStatsConfig.STATE_SCREEN]
+ != AggregatedPowerStatsConfig.SCREEN_STATE_ON) {
+ return false;
+ }
+ break;
+ case BatteryConsumer.SCREEN_STATE_OTHER:
+ if (states[AggregatedPowerStatsConfig.STATE_SCREEN]
+ != AggregatedPowerStatsConfig.SCREEN_STATE_OTHER) {
+ return false;
+ }
+ break;
+ }
+
+ switch (powerState) {
+ case BatteryConsumer.POWER_STATE_BATTERY:
+ if (states[AggregatedPowerStatsConfig.STATE_POWER]
+ != AggregatedPowerStatsConfig.POWER_STATE_BATTERY) {
+ return false;
+ }
+ break;
+ case BatteryConsumer.POWER_STATE_OTHER:
+ if (states[AggregatedPowerStatsConfig.STATE_POWER]
+ != AggregatedPowerStatsConfig.POWER_STATE_OTHER) {
+ return false;
+ }
+ break;
+ }
+ return true;
+ }
}
diff --git a/services/core/java/com/android/server/power/stats/WifiPowerStatsCollector.java b/services/core/java/com/android/server/power/stats/WifiPowerStatsCollector.java
index 6d519ee200c2..90981ada7c31 100644
--- a/services/core/java/com/android/server/power/stats/WifiPowerStatsCollector.java
+++ b/services/core/java/com/android/server/power/stats/WifiPowerStatsCollector.java
@@ -86,8 +86,7 @@ public class WifiPowerStatsCollector extends PowerStatsCollector {
private ConsumedEnergyRetriever mConsumedEnergyRetriever;
private IntSupplier mVoltageSupplier;
private int[] mEnergyConsumerIds = new int[0];
- private WifiActivityEnergyInfo mLastWifiActivityInfo =
- new WifiActivityEnergyInfo(0, 0, 0, 0, 0, 0);
+ private WifiActivityEnergyInfo mLastWifiActivityInfo;
private NetworkStats mLastNetworkStats;
private long[] mLastConsumedEnergyUws;
private int mLastVoltageMv;
@@ -206,14 +205,21 @@ public class WifiPowerStatsCollector extends PowerStatsCollector {
return null;
}
- long rxDuration = activityInfo.getControllerRxDurationMillis()
- - mLastWifiActivityInfo.getControllerRxDurationMillis();
- long txDuration = activityInfo.getControllerTxDurationMillis()
- - mLastWifiActivityInfo.getControllerTxDurationMillis();
- long scanDuration = activityInfo.getControllerScanDurationMillis()
- - mLastWifiActivityInfo.getControllerScanDurationMillis();
- long idleDuration = activityInfo.getControllerIdleDurationMillis()
- - mLastWifiActivityInfo.getControllerIdleDurationMillis();
+ long rxDuration = 0;
+ long txDuration = 0;
+ long scanDuration = 0;
+ long idleDuration = 0;
+
+ if (mLastWifiActivityInfo != null) {
+ rxDuration = activityInfo.getControllerRxDurationMillis()
+ - mLastWifiActivityInfo.getControllerRxDurationMillis();
+ txDuration = activityInfo.getControllerTxDurationMillis()
+ - mLastWifiActivityInfo.getControllerTxDurationMillis();
+ scanDuration = activityInfo.getControllerScanDurationMillis()
+ - mLastWifiActivityInfo.getControllerScanDurationMillis();
+ idleDuration = activityInfo.getControllerIdleDurationMillis()
+ - mLastWifiActivityInfo.getControllerIdleDurationMillis();
+ }
mLayout.setDeviceRxTime(mDeviceStats, rxDuration);
mLayout.setDeviceTxTime(mDeviceStats, txDuration);
diff --git a/services/core/java/com/android/server/power/stats/flags.aconfig b/services/core/java/com/android/server/power/stats/flags.aconfig
index 6a5a7ac8d240..cc0a283db6a0 100644
--- a/services/core/java/com/android/server/power/stats/flags.aconfig
+++ b/services/core/java/com/android/server/power/stats/flags.aconfig
@@ -47,3 +47,24 @@ flag {
purpose: PURPOSE_BUGFIX
}
}
+
+flag {
+ name: "add_battery_usage_stats_slice_atom"
+ namespace: "backstage_power"
+ description: "Adds battery_usage_stats_slice atom"
+ bug: "324602949"
+}
+
+flag {
+ name: "battery_usage_stats_by_power_and_screen_state"
+ namespace: "backstage_power"
+ description: "Batterystats dumpsys is enhanced by including power break-down by power s"
+ bug: "352835319"
+}
+
+flag {
+ name: "disable_composite_battery_usage_stats_atoms"
+ namespace: "backstage_power"
+ description: "Disable deprecated BatteryUsageStatsAtom pulled atom"
+ bug: "324602949"
+}
diff --git a/services/core/java/com/android/server/stats/pull/RawSettingsTelemetryUtils.java b/services/core/java/com/android/server/stats/pull/RawSettingsTelemetryUtils.java
new file mode 100644
index 000000000000..1e3203d60e22
--- /dev/null
+++ b/services/core/java/com/android/server/stats/pull/RawSettingsTelemetryUtils.java
@@ -0,0 +1,83 @@
+/*
+ * 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.server.stats.pull;
+
+import static android.provider.Settings.System.PEAK_REFRESH_RATE;
+
+import android.annotation.Nullable;
+import android.content.Context;
+import android.util.Log;
+
+import com.android.internal.display.RefreshRateSettingsUtils;
+
+/**
+ * Utility methods for processing raw settings values to the format that
+ * is acceptable for telemetry system.
+ * For instance, raw setting values could be hard to visualize on dashboards, etc.
+ */
+public final class RawSettingsTelemetryUtils {
+
+ private static final String TAG = "SettingsTelemetryUtils";
+
+ /**
+ * Get string that should be written as a value of settingKey and should be sent to telemetry
+ * system.
+ *
+ * @param context The context
+ * @param key The setting key
+ * @param value The setting raw value that was parsed from Settings.
+ * @return The setting string value that should be sent to telemetry system.
+ */
+ @Nullable
+ public static String getTelemetrySettingFromRawVal(Context context, String key, String value) {
+ if (key == null) {
+ return null;
+ }
+
+ if (key.equals(PEAK_REFRESH_RATE)) {
+ return getPeakRefreshRateSetting(context, value);
+ }
+
+ return value;
+ }
+
+ /**
+ * Get string that should be written as a value of "peak_refresh_setting" setting
+ * and should be sent to telemetry.
+ * system.
+ *
+ * @param context The context
+ * @param settingRawValue The setting raw value that was parsed from Settings.
+ * @return The "peak_refresh_setting" string value that should be sent to telemetry system.
+ */
+ @Nullable
+ private static String getPeakRefreshRateSetting(Context context, String settingRawValue) {
+ if (settingRawValue == null) {
+ Log.e(TAG, "PEAK_REFRESH_RATE value is null");
+ return null;
+ }
+
+ String floatInfinityStr = Float.toString(Float.POSITIVE_INFINITY);
+ if (settingRawValue.equals(floatInfinityStr)) {
+ float max_refresh_rate =
+ RefreshRateSettingsUtils.findHighestRefreshRateAmongAllBuiltInDisplays(context);
+ return Float.toString(max_refresh_rate);
+ }
+
+ return settingRawValue;
+ }
+}
diff --git a/services/core/java/com/android/server/stats/pull/SettingsStatsUtil.java b/services/core/java/com/android/server/stats/pull/SettingsStatsUtil.java
index 7cdb84ba0404..f74508998c15 100644
--- a/services/core/java/com/android/server/stats/pull/SettingsStatsUtil.java
+++ b/services/core/java/com/android/server/stats/pull/SettingsStatsUtil.java
@@ -107,7 +107,9 @@ final class SettingsStatsUtil {
}
for (String key : proto.element) {
final String value = Settings.System.getStringForUser(resolver, key, userId);
- output.add(createStatsEvent(atomTag, key, value, userId,
+ final String telemetryValue = RawSettingsTelemetryUtils
+ .getTelemetrySettingFromRawVal(context, key, value);
+ output.add(createStatsEvent(atomTag, key, telemetryValue, userId,
flagsData.mDataType));
}
}
diff --git a/services/core/java/com/android/server/stats/pull/StatsPullAtomService.java b/services/core/java/com/android/server/stats/pull/StatsPullAtomService.java
index 0041d39f4b2b..bca81f52a1ac 100644
--- a/services/core/java/com/android/server/stats/pull/StatsPullAtomService.java
+++ b/services/core/java/com/android/server/stats/pull/StatsPullAtomService.java
@@ -1283,7 +1283,7 @@ public class StatsPullAtomService extends SystemService {
}
case FrameworkStatsLog.PROXY_BYTES_TRANSFER_BY_FG_BG: {
final NetworkStats stats = getUidNetworkStatsSnapshotForTemplate(
- new NetworkTemplate.Builder(MATCH_PROXY).build(), /*includeTags=*/true);
+ new NetworkTemplate.Builder(MATCH_PROXY).build(), /*includeTags=*/false);
if (stats != null) {
ret.add(new NetworkStatsExt(sliceNetworkStatsByUidTagAndMetered(stats),
new int[]{TRANSPORT_BLUETOOTH},
@@ -1542,6 +1542,11 @@ public class StatsPullAtomService extends SystemService {
final long bucketDuration = Settings.Global.getLong(mContext.getContentResolver(),
NETSTATS_UID_BUCKET_DURATION, NETSTATS_UID_DEFAULT_BUCKET_DURATION_MS);
+ // Set startTime before boot so that NetworkStats includes at least one full bucket.
+ // Set endTime in the future so that NetworkStats includes everything in the active bucket.
+ final long startTime = currentTimeInMillis - elapsedMillisSinceBoot - bucketDuration;
+ final long endTime = currentTimeInMillis + bucketDuration;
+
// TODO (b/156313635): This is short-term hack to allow perfd gets updated networkStats
// history when query in every second in order to show realtime statistics. However,
// this is not a good long-term solution since NetworkStatsService will make frequent
@@ -1552,9 +1557,7 @@ public class StatsPullAtomService extends SystemService {
}
final android.app.usage.NetworkStats queryNonTaggedStats =
- getNetworkStatsManager().querySummary(
- template, currentTimeInMillis - elapsedMillisSinceBoot - bucketDuration,
- currentTimeInMillis);
+ getNetworkStatsManager().querySummary(template, startTime, endTime);
final NetworkStats nonTaggedStats =
NetworkStatsUtils.fromPublicNetworkStats(queryNonTaggedStats);
@@ -1562,9 +1565,7 @@ public class StatsPullAtomService extends SystemService {
if (!includeTags) return nonTaggedStats;
final android.app.usage.NetworkStats queryTaggedStats =
- getNetworkStatsManager().queryTaggedSummary(template,
- currentTimeInMillis - elapsedMillisSinceBoot - bucketDuration,
- currentTimeInMillis);
+ getNetworkStatsManager().queryTaggedSummary(template, startTime, endTime);
final NetworkStats taggedStats =
NetworkStatsUtils.fromPublicNetworkStats(queryTaggedStats);
queryTaggedStats.close();
diff --git a/services/core/java/com/android/server/trust/TrustManagerService.java b/services/core/java/com/android/server/trust/TrustManagerService.java
index ddbd8091b601..953aae9588dd 100644
--- a/services/core/java/com/android/server/trust/TrustManagerService.java
+++ b/services/core/java/com/android/server/trust/TrustManagerService.java
@@ -16,6 +16,7 @@
package com.android.server.trust;
+import static android.security.Flags.shouldTrustManagerListenForPrimaryAuth;
import static android.service.trust.GrantTrustResult.STATUS_UNLOCKED_BY_GRANT;
import static android.service.trust.TrustAgentService.FLAG_GRANT_TRUST_TEMPORARY_AND_RENEWABLE;
@@ -84,6 +85,9 @@ import com.android.internal.content.PackageMonitor;
import com.android.internal.infra.AndroidFuture;
import com.android.internal.util.DumpUtils;
import com.android.internal.widget.LockPatternUtils;
+import com.android.internal.widget.LockSettingsInternal;
+import com.android.internal.widget.LockSettingsStateListener;
+import com.android.server.LocalServices;
import com.android.server.SystemService;
import com.android.server.servicewatcher.CurrentUserServiceSupplier;
import com.android.server.servicewatcher.ServiceWatcher;
@@ -159,6 +163,7 @@ public class TrustManagerService extends SystemService {
/* package */ final TrustArchive mArchive = new TrustArchive();
private final Context mContext;
+ private final LockSettingsInternal mLockSettings;
private final LockPatternUtils mLockPatternUtils;
private final KeyStoreAuthorization mKeyStoreAuthorization;
private final UserManager mUserManager;
@@ -250,6 +255,20 @@ public class TrustManagerService extends SystemService {
private final StrongAuthTracker mStrongAuthTracker;
+ // Used to subscribe to device credential auth attempts.
+ private final LockSettingsStateListener mLockSettingsStateListener =
+ new LockSettingsStateListener() {
+ @Override
+ public void onAuthenticationSucceeded(int userId) {
+ mHandler.obtainMessage(MSG_DISPATCH_UNLOCK_ATTEMPT, 1, userId).sendToTarget();
+ }
+
+ @Override
+ public void onAuthenticationFailed(int userId) {
+ mHandler.obtainMessage(MSG_DISPATCH_UNLOCK_ATTEMPT, 0, userId).sendToTarget();
+ }
+ };
+
private boolean mTrustAgentsCanRun = false;
private int mCurrentUser = UserHandle.USER_SYSTEM;
@@ -294,6 +313,7 @@ public class TrustManagerService extends SystemService {
mHandler = createHandler(injector.getLooper());
mUserManager = (UserManager) mContext.getSystemService(Context.USER_SERVICE);
mActivityManager = (ActivityManager) mContext.getSystemService(Context.ACTIVITY_SERVICE);
+ mLockSettings = LocalServices.getService(LockSettingsInternal.class);
mLockPatternUtils = injector.getLockPatternUtils();
mKeyStoreAuthorization = injector.getKeyStoreAuthorization();
mStrongAuthTracker = new StrongAuthTracker(context, injector.getLooper());
@@ -315,6 +335,9 @@ public class TrustManagerService extends SystemService {
checkNewAgents();
mPackageMonitor.register(mContext, mHandler.getLooper(), UserHandle.ALL, true);
mReceiver.register(mContext);
+ if (shouldTrustManagerListenForPrimaryAuth()) {
+ mLockSettings.registerLockSettingsStateListener(mLockSettingsStateListener);
+ }
mLockPatternUtils.registerStrongAuthTracker(mStrongAuthTracker);
mFingerprintManager = mContext.getSystemService(FingerprintManager.class);
mFaceManager = mContext.getSystemService(FaceManager.class);
diff --git a/services/core/java/com/android/server/updates/Android.bp b/services/core/java/com/android/server/updates/Android.bp
new file mode 100644
index 000000000000..10beebb82711
--- /dev/null
+++ b/services/core/java/com/android/server/updates/Android.bp
@@ -0,0 +1,11 @@
+aconfig_declarations {
+ name: "updates_flags",
+ package: "com.android.server.updates",
+ container: "system",
+ srcs: ["*.aconfig"],
+}
+
+java_aconfig_library {
+ name: "updates_flags_lib",
+ aconfig_declarations: "updates_flags",
+}
diff --git a/services/core/java/com/android/server/updates/CertificateTransparencyLogInstallReceiver.java b/services/core/java/com/android/server/updates/CertificateTransparencyLogInstallReceiver.java
index 5565b6ffb5ac..af4025e1db7c 100644
--- a/services/core/java/com/android/server/updates/CertificateTransparencyLogInstallReceiver.java
+++ b/services/core/java/com/android/server/updates/CertificateTransparencyLogInstallReceiver.java
@@ -16,17 +16,15 @@
package com.android.server.updates;
+import android.content.Context;
+import android.content.Intent;
import android.os.FileUtils;
import android.system.ErrnoException;
import android.system.Os;
-import android.util.Base64;
import android.util.Slog;
-import com.android.internal.util.HexDump;
-
import libcore.io.Streams;
-import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
@@ -36,10 +34,7 @@ import java.io.FileFilter;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
-import java.io.OutputStreamWriter;
import java.nio.charset.StandardCharsets;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
public class CertificateTransparencyLogInstallReceiver extends ConfigUpdateInstallReceiver {
@@ -52,31 +47,31 @@ public class CertificateTransparencyLogInstallReceiver extends ConfigUpdateInsta
@Override
protected void install(InputStream inputStream, int version) throws IOException {
- /* Install is complicated here because we translate the input, which is a JSON file
- * containing log information to a directory with a file per log. To support atomically
- * replacing the old configuration directory with the new there's a bunch of steps. We
- * create a new directory with the logs and then do an atomic update of the current symlink
- * to point to the new directory.
- */
+ if (!Flags.certificateTransparencyInstaller()) {
+ return;
+ }
+ // To support atomically replacing the old configuration directory with the new there's a
+ // bunch of steps. We create a new directory with the logs and then do an atomic update of
+ // the current symlink to point to the new directory.
// 1. Ensure that the update dir exists and is readable
updateDir.mkdir();
if (!updateDir.isDirectory()) {
throw new IOException("Unable to make directory " + updateDir.getCanonicalPath());
}
if (!updateDir.setReadable(true, false)) {
- throw new IOException("Unable to set permissions on " +
- updateDir.getCanonicalPath());
+ throw new IOException("Unable to set permissions on " + updateDir.getCanonicalPath());
}
File currentSymlink = new File(updateDir, "current");
File newVersion = new File(updateDir, LOGDIR_PREFIX + String.valueOf(version));
- File oldDirectory;
// 2. Handle the corner case where the new directory already exists.
if (newVersion.exists()) {
// If the symlink has already been updated then the update died between steps 7 and 8
// and so we cannot delete the directory since its in use. Instead just bump the version
// and return.
if (newVersion.getCanonicalPath().equals(currentSymlink.getCanonicalPath())) {
- writeUpdate(updateDir, updateVersion,
+ writeUpdate(
+ updateDir,
+ updateVersion,
new ByteArrayInputStream(Long.toString(version).getBytes()));
deleteOldLogDirectories();
return;
@@ -91,22 +86,12 @@ public class CertificateTransparencyLogInstallReceiver extends ConfigUpdateInsta
throw new IOException("Unable to make directory " + newVersion.getCanonicalPath());
}
if (!newVersion.setReadable(true, false)) {
- throw new IOException("Failed to set " +newVersion.getCanonicalPath() +
- " readable");
+ throw new IOException(
+ "Failed to set " + newVersion.getCanonicalPath() + " readable");
}
- // 4. For each log in the log file create the corresponding file in <new_version>/ .
- try {
- byte[] content = Streams.readFullyNoClose(inputStream);
- JSONObject json = new JSONObject(new String(content, StandardCharsets.UTF_8));
- JSONArray logs = json.getJSONArray("logs");
- for (int i = 0; i < logs.length(); i++) {
- JSONObject log = logs.getJSONObject(i);
- installLog(newVersion, log);
- }
- } catch (JSONException e) {
- throw new IOException("Failed to parse logs", e);
- }
+ // 4. Validate the log list json and move the file in <new_version>/ .
+ installLogList(newVersion, inputStream);
// 5. Create the temp symlink. We'll rename this to the target symlink to get an atomic
// update.
@@ -125,62 +110,53 @@ public class CertificateTransparencyLogInstallReceiver extends ConfigUpdateInsta
}
Slog.i(TAG, "CT log directory updated to " + newVersion.getAbsolutePath());
// 7. Update the current version information
- writeUpdate(updateDir, updateVersion,
+ writeUpdate(
+ updateDir,
+ updateVersion,
new ByteArrayInputStream(Long.toString(version).getBytes()));
// 8. Cleanup
deleteOldLogDirectories();
}
- private void installLog(File directory, JSONObject logObject) throws IOException {
+ @Override
+ protected void postInstall(Context context, Intent intent) {
+ if (!Flags.certificateTransparencyInstaller()) {
+ return;
+ }
+ }
+
+ private void installLogList(File directory, InputStream inputStream) throws IOException {
try {
- String logFilename = getLogFileName(logObject.getString("key"));
- File file = new File(directory, logFilename);
- try (OutputStreamWriter out =
- new OutputStreamWriter(new FileOutputStream(file), StandardCharsets.UTF_8)) {
- writeLogEntry(out, "key", logObject.getString("key"));
- writeLogEntry(out, "url", logObject.getString("url"));
- writeLogEntry(out, "description", logObject.getString("description"));
+ byte[] content = Streams.readFullyNoClose(inputStream);
+ if (new JSONObject(new String(content, StandardCharsets.UTF_8)).length() == 0) {
+ throw new IOException("Log list data not valid");
+ }
+
+ File file = new File(directory, "log_list.json");
+ try (FileOutputStream outputStream = new FileOutputStream(file)) {
+ outputStream.write(content);
}
if (!file.setReadable(true, false)) {
throw new IOException("Failed to set permissions on " + file.getCanonicalPath());
}
} catch (JSONException e) {
- throw new IOException("Failed to parse log", e);
- }
-
- }
-
- /**
- * Get the filename for a log based on its public key. This must be kept in sync with
- * org.conscrypt.ct.CTLogStoreImpl.
- */
- private String getLogFileName(String base64PublicKey) {
- byte[] keyBytes = Base64.decode(base64PublicKey, Base64.DEFAULT);
- try {
- byte[] id = MessageDigest.getInstance("SHA-256").digest(keyBytes);
- return HexDump.toHexString(id, false);
- } catch (NoSuchAlgorithmException e) {
- // SHA-256 is guaranteed to be available.
- throw new RuntimeException(e);
+ throw new IOException("Malformed json in log list", e);
}
}
- private void writeLogEntry(OutputStreamWriter out, String key, String value)
- throws IOException {
- out.write(key + ":" + value + "\n");
- }
-
private void deleteOldLogDirectories() throws IOException {
if (!updateDir.exists()) {
return;
}
File currentTarget = new File(updateDir, "current").getCanonicalFile();
- FileFilter filter = new FileFilter() {
- @Override
- public boolean accept(File file) {
- return !currentTarget.equals(file) && file.getName().startsWith(LOGDIR_PREFIX);
- }
- };
+ FileFilter filter =
+ new FileFilter() {
+ @Override
+ public boolean accept(File file) {
+ return !currentTarget.equals(file)
+ && file.getName().startsWith(LOGDIR_PREFIX);
+ }
+ };
for (File f : updateDir.listFiles(filter)) {
FileUtils.deleteContentsAndDir(f);
}
diff --git a/services/core/java/com/android/server/updates/flags.aconfig b/services/core/java/com/android/server/updates/flags.aconfig
new file mode 100644
index 000000000000..476cb3723c97
--- /dev/null
+++ b/services/core/java/com/android/server/updates/flags.aconfig
@@ -0,0 +1,10 @@
+package: "com.android.server.updates"
+container: "system"
+
+flag {
+ name: "certificate_transparency_installer"
+ is_exported: true
+ namespace: "network_security"
+ description: "Enable certificate transparency installer for log list data"
+ bug: "319829948"
+}
diff --git a/services/core/java/com/android/server/vibrator/HapticFeedbackVibrationProvider.java b/services/core/java/com/android/server/vibrator/HapticFeedbackVibrationProvider.java
index 8138168f609e..98a2ba0d62cf 100644
--- a/services/core/java/com/android/server/vibrator/HapticFeedbackVibrationProvider.java
+++ b/services/core/java/com/android/server/vibrator/HapticFeedbackVibrationProvider.java
@@ -186,13 +186,13 @@ public final class HapticFeedbackVibrationProvider {
*
* @param effectId the haptic feedback effect ID whose respective vibration attributes we want
* to get.
- * @param bypassVibrationIntensitySetting {@code true} if the returned attribute should bypass
- * vibration intensity settings. {@code false} otherwise.
- * @param fromIme the haptic feedback is performed from an IME.
+ * @param flags Additional flags as per {@link HapticFeedbackConstants}.
+ * @param privFlags Additional private flags as per {@link HapticFeedbackConstants}.
* @return the {@link VibrationAttributes} that should be used for the provided haptic feedback.
*/
- public VibrationAttributes getVibrationAttributesForHapticFeedback(
- int effectId, boolean bypassVibrationIntensitySetting, boolean fromIme) {
+ public VibrationAttributes getVibrationAttributesForHapticFeedback(int effectId,
+ @HapticFeedbackConstants.Flags int flags,
+ @HapticFeedbackConstants.PrivateFlags int privFlags) {
VibrationAttributes attrs;
switch (effectId) {
case HapticFeedbackConstants.EDGE_SQUEEZE:
@@ -208,7 +208,7 @@ public final class HapticFeedbackVibrationProvider {
break;
case HapticFeedbackConstants.KEYBOARD_TAP:
case HapticFeedbackConstants.KEYBOARD_RELEASE:
- attrs = createKeyboardVibrationAttributes(fromIme);
+ attrs = createKeyboardVibrationAttributes(privFlags);
break;
case HapticFeedbackConstants.BIOMETRIC_CONFIRM:
case HapticFeedbackConstants.BIOMETRIC_REJECT:
@@ -218,18 +218,23 @@ public final class HapticFeedbackVibrationProvider {
attrs = TOUCH_VIBRATION_ATTRIBUTES;
}
- int flags = 0;
+ int vibFlags = 0;
+ boolean fromIme =
+ (privFlags & HapticFeedbackConstants.PRIVATE_FLAG_APPLY_INPUT_METHOD_SETTINGS) != 0;
+ boolean bypassVibrationIntensitySetting =
+ (flags & HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING) != 0;
if (bypassVibrationIntensitySetting) {
- flags |= VibrationAttributes.FLAG_BYPASS_USER_VIBRATION_INTENSITY_OFF;
+ vibFlags |= VibrationAttributes.FLAG_BYPASS_USER_VIBRATION_INTENSITY_OFF;
}
if (shouldBypassInterruptionPolicy(effectId)) {
- flags |= VibrationAttributes.FLAG_BYPASS_INTERRUPTION_POLICY;
+ vibFlags |= VibrationAttributes.FLAG_BYPASS_INTERRUPTION_POLICY;
}
if (shouldBypassIntensityScale(effectId, fromIme)) {
- flags |= VibrationAttributes.FLAG_BYPASS_USER_VIBRATION_INTENSITY_SCALE;
+ vibFlags |= VibrationAttributes.FLAG_BYPASS_USER_VIBRATION_INTENSITY_SCALE;
}
- return flags == 0 ? attrs : new VibrationAttributes.Builder(attrs).setFlags(flags).build();
+ return vibFlags == 0 ? attrs : new VibrationAttributes.Builder(attrs)
+ .setFlags(vibFlags).build();
}
/**
@@ -373,12 +378,16 @@ public final class HapticFeedbackVibrationProvider {
return false;
}
- private VibrationAttributes createKeyboardVibrationAttributes(boolean fromIme) {
- // Use touch attribute when the keyboard category is disable or it's not from an IME.
- if (!Flags.keyboardCategoryEnabled() || !fromIme) {
+ private VibrationAttributes createKeyboardVibrationAttributes(
+ @HapticFeedbackConstants.PrivateFlags int privFlags) {
+ // Use touch attribute when the keyboard category is disable.
+ if (!Flags.keyboardCategoryEnabled()) {
+ return TOUCH_VIBRATION_ATTRIBUTES;
+ }
+ // Use touch attribute when the haptic is not apply to IME.
+ if ((privFlags & HapticFeedbackConstants.PRIVATE_FLAG_APPLY_INPUT_METHOD_SETTINGS) == 0) {
return TOUCH_VIBRATION_ATTRIBUTES;
}
-
return new VibrationAttributes.Builder(TOUCH_VIBRATION_ATTRIBUTES)
.setCategory(VibrationAttributes.CATEGORY_KEYBOARD)
.build();
diff --git a/services/core/java/com/android/server/vibrator/Vibration.java b/services/core/java/com/android/server/vibrator/Vibration.java
index 6537228583ec..5fab13bdc402 100644
--- a/services/core/java/com/android/server/vibrator/Vibration.java
+++ b/services/core/java/com/android/server/vibrator/Vibration.java
@@ -67,6 +67,7 @@ abstract class Vibration {
CANCELLED_BY_SCREEN_OFF(VibrationProto.CANCELLED_BY_SCREEN_OFF),
CANCELLED_BY_SETTINGS_UPDATE(VibrationProto.CANCELLED_BY_SETTINGS_UPDATE),
CANCELLED_BY_USER(VibrationProto.CANCELLED_BY_USER),
+ CANCELLED_BY_FOREGROUND_USER(VibrationProto.CANCELLED_BY_FOREGROUND_USER),
CANCELLED_BY_UNKNOWN_REASON(VibrationProto.CANCELLED_BY_UNKNOWN_REASON),
CANCELLED_SUPERSEDED(VibrationProto.CANCELLED_SUPERSEDED),
CANCELLED_BY_APP_OPS(VibrationProto.CANCELLED_BY_APP_OPS),
diff --git a/services/core/java/com/android/server/vibrator/VibratorManagerService.java b/services/core/java/com/android/server/vibrator/VibratorManagerService.java
index 5c15ccb55c65..bff175fec1dd 100644
--- a/services/core/java/com/android/server/vibrator/VibratorManagerService.java
+++ b/services/core/java/com/android/server/vibrator/VibratorManagerService.java
@@ -16,6 +16,7 @@
package com.android.server.vibrator;
+import static android.os.VibrationAttributes.USAGE_CLASS_ALARM;
import static android.os.VibrationEffect.VibrationParameter.targetAmplitude;
import static android.os.VibrationEffect.VibrationParameter.targetFrequency;
@@ -65,6 +66,7 @@ import android.util.IndentingPrintWriter;
import android.util.Slog;
import android.util.SparseArray;
import android.util.proto.ProtoOutputStream;
+import android.view.HapticFeedbackConstants;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
@@ -72,6 +74,7 @@ import com.android.internal.app.IBatteryStats;
import com.android.internal.util.DumpUtils;
import com.android.internal.util.FrameworkStatsLog;
import com.android.server.SystemService;
+import com.android.server.pm.BackgroundUserSoundNotifier;
import libcore.util.NativeAllocationRegistry;
@@ -172,7 +175,8 @@ public class VibratorManagerService extends IVibratorManagerService.Stub {
@GuardedBy("mLock")
@Nullable private HapticFeedbackVibrationProvider mHapticFeedbackVibrationProvider;
- private BroadcastReceiver mIntentReceiver = new BroadcastReceiver() {
+ @VisibleForTesting
+ BroadcastReceiver mIntentReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
if (intent.getAction().equals(Intent.ACTION_SCREEN_OFF)) {
@@ -189,6 +193,19 @@ public class VibratorManagerService extends IVibratorManagerService.Stub {
/* immediate= */ false);
}
}
+ } else if (android.multiuser.Flags.addUiForSoundsFromBackgroundUsers()
+ && intent.getAction().equals(BackgroundUserSoundNotifier.ACTION_MUTE_SOUND)) {
+ synchronized (mLock) {
+ if (shouldCancelOnFgUserRequest(mNextVibration)) {
+ clearNextVibrationLocked(new Vibration.EndInfo(
+ Vibration.Status.CANCELLED_BY_FOREGROUND_USER));
+ }
+ if (shouldCancelOnFgUserRequest(mCurrentVibration)) {
+ mCurrentVibration.notifyCancelled(new Vibration.EndInfo(
+ Vibration.Status.CANCELLED_BY_FOREGROUND_USER),
+ /* immediate= */ false);
+ }
+ }
}
}
};
@@ -298,6 +315,9 @@ public class VibratorManagerService extends IVibratorManagerService.Stub {
IntentFilter filter = new IntentFilter();
filter.addAction(Intent.ACTION_SCREEN_OFF);
+ if (android.multiuser.Flags.addUiForSoundsFromBackgroundUsers()) {
+ filter.addAction(BackgroundUserSoundNotifier.ACTION_MUTE_SOUND);
+ }
context.registerReceiver(mIntentReceiver, filter, Context.RECEIVER_NOT_EXPORTED);
injector.addService(EXTERNAL_VIBRATOR_SERVICE, new ExternalVibratorService());
@@ -439,13 +459,13 @@ public class VibratorManagerService extends IVibratorManagerService.Stub {
@Override // Binder call
public void performHapticFeedback(int uid, int deviceId, String opPkg, int constant,
- boolean always, String reason, boolean fromIme) {
+ String reason, int flags, int privFlags) {
// Note that the `performHapticFeedback` method does not take a token argument from the
// caller, and instead, uses this service as the token. This is to mitigate performance
// impact that would otherwise be caused due to marshal latency. Haptic feedback effects are
// short-lived, so we don't need to cancel when the process dies.
- performHapticFeedbackInternal(
- uid, deviceId, opPkg, constant, always, reason, /* token= */ this, fromIme);
+ performHapticFeedbackInternal(uid, deviceId, opPkg, constant, reason, /* token= */
+ this, flags, privFlags);
}
/**
@@ -456,8 +476,8 @@ public class VibratorManagerService extends IVibratorManagerService.Stub {
@VisibleForTesting
@Nullable
HalVibration performHapticFeedbackInternal(
- int uid, int deviceId, String opPkg, int constant, boolean always, String reason,
- IBinder token, boolean fromIme) {
+ int uid, int deviceId, String opPkg, int constant, String reason,
+ IBinder token, int flags, int privFlags) {
HapticFeedbackVibrationProvider hapticVibrationProvider = getHapticVibrationProvider();
if (hapticVibrationProvider == null) {
Slog.e(TAG, "performHapticFeedback; haptic vibration provider not ready.");
@@ -474,9 +494,8 @@ public class VibratorManagerService extends IVibratorManagerService.Stub {
return null;
}
CombinedVibration vib = CombinedVibration.createParallel(effect);
- VibrationAttributes attrs =
- hapticVibrationProvider.getVibrationAttributesForHapticFeedback(
- constant, /* bypassVibrationIntensitySetting= */ always, fromIme);
+ VibrationAttributes attrs = hapticVibrationProvider.getVibrationAttributesForHapticFeedback(
+ constant, flags, privFlags);
reason = "performHapticFeedback(constant=" + constant + "): " + reason;
VibratorFrameworkStatsLogger.logPerformHapticsFeedbackIfKeyboard(uid, constant);
return vibrateWithoutPermissionCheck(uid, deviceId, opPkg, vib, attrs, reason, token);
@@ -1423,6 +1442,14 @@ public class VibratorManagerService extends IVibratorManagerService.Stub {
}
@GuardedBy("mLock")
+ private boolean shouldCancelOnFgUserRequest(@Nullable VibrationStepConductor conductor) {
+ if (conductor == null) {
+ return false;
+ }
+ return conductor.getVibration().callerInfo.attrs.getUsageClass() == USAGE_CLASS_ALARM;
+ }
+
+ @GuardedBy("mLock")
private void onAllVibratorsLocked(Consumer<VibratorController> consumer) {
for (int i = 0; i < mVibrators.size(); i++) {
consumer.accept(mVibrators.valueAt(i));
@@ -2295,10 +2322,11 @@ public class VibratorManagerService extends IVibratorManagerService.Stub {
IBinder deathBinder = commonOptions.background ? VibratorManagerService.this
: mShellCallbacksToken;
+ int flags = commonOptions.force
+ ? HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING : 0;
HalVibration vib = performHapticFeedbackInternal(Binder.getCallingUid(),
Context.DEVICE_ID_DEFAULT, SHELL_PACKAGE_NAME, constant,
- /* always= */ commonOptions.force, /* reason= */ commonOptions.description,
- deathBinder, false /* fromIme */);
+ /* reason= */ commonOptions.description, deathBinder, flags, /* privFlags */ 0);
maybeWaitOnVibration(vib, commonOptions);
return 0;
diff --git a/services/core/java/com/android/server/webkit/SystemImpl.java b/services/core/java/com/android/server/webkit/SystemImpl.java
index a821f54520df..c4d601d03652 100644
--- a/services/core/java/com/android/server/webkit/SystemImpl.java
+++ b/services/core/java/com/android/server/webkit/SystemImpl.java
@@ -67,19 +67,13 @@ public class SystemImpl implements SystemInterface {
private static final String TAG_SIGNATURE = "signature";
private static final String TAG_FALLBACK = "isFallback";
private static final String PIN_GROUP = "webview";
- private final WebViewProviderInfo[] mWebViewProviderPackages;
- // Initialization-on-demand holder idiom for getting the WebView provider packages once and
- // for all in a thread-safe manner.
- private static class LazyHolder {
- private static final SystemImpl INSTANCE = new SystemImpl();
- }
+ private final Context mContext;
+ private final WebViewProviderInfo[] mWebViewProviderPackages;
- public static SystemImpl getInstance() {
- return LazyHolder.INSTANCE;
- }
+ SystemImpl(Context context) {
+ mContext = context;
- private SystemImpl() {
int numFallbackPackages = 0;
int numAvailableByDefaultPackages = 0;
XmlResourceParser parser = null;
@@ -184,14 +178,14 @@ public class SystemImpl implements SystemInterface {
}
@Override
- public String getUserChosenWebViewProvider(Context context) {
- return Settings.Global.getString(context.getContentResolver(),
+ public String getUserChosenWebViewProvider() {
+ return Settings.Global.getString(mContext.getContentResolver(),
Settings.Global.WEBVIEW_PROVIDER);
}
@Override
- public void updateUserSetting(Context context, String newProviderName) {
- Settings.Global.putString(context.getContentResolver(),
+ public void updateUserSetting(String newProviderName) {
+ Settings.Global.putString(mContext.getContentResolver(),
Settings.Global.WEBVIEW_PROVIDER,
newProviderName == null ? "" : newProviderName);
}
@@ -207,8 +201,8 @@ public class SystemImpl implements SystemInterface {
}
@Override
- public void enablePackageForAllUsers(Context context, String packageName, boolean enable) {
- UserManager userManager = (UserManager)context.getSystemService(Context.USER_SERVICE);
+ public void enablePackageForAllUsers(String packageName, boolean enable) {
+ UserManager userManager = mContext.getSystemService(UserManager.class);
for(UserInfo userInfo : userManager.getUsers()) {
enablePackageForUser(packageName, enable, userInfo.id);
}
@@ -228,16 +222,15 @@ public class SystemImpl implements SystemInterface {
}
@Override
- public void installExistingPackageForAllUsers(Context context, String packageName) {
- UserManager userManager = context.getSystemService(UserManager.class);
+ public void installExistingPackageForAllUsers(String packageName) {
+ UserManager userManager = mContext.getSystemService(UserManager.class);
for (UserInfo userInfo : userManager.getUsers()) {
installPackageForUser(packageName, userInfo.id);
}
}
private void installPackageForUser(String packageName, int userId) {
- final Context context = AppGlobals.getInitialApplication();
- final Context contextAsUser = context.createContextAsUser(UserHandle.of(userId), 0);
+ final Context contextAsUser = mContext.createContextAsUser(UserHandle.of(userId), 0);
final PackageInstaller installer = contextAsUser.getPackageManager().getPackageInstaller();
installer.installExistingPackage(packageName, PackageManager.INSTALL_REASON_UNKNOWN, null);
}
@@ -255,29 +248,28 @@ public class SystemImpl implements SystemInterface {
}
@Override
- public List<UserPackage> getPackageInfoForProviderAllUsers(Context context,
- WebViewProviderInfo configInfo) {
- return UserPackage.getPackageInfosAllUsers(context, configInfo.packageName, PACKAGE_FLAGS);
+ public List<UserPackage> getPackageInfoForProviderAllUsers(WebViewProviderInfo configInfo) {
+ return UserPackage.getPackageInfosAllUsers(mContext, configInfo.packageName, PACKAGE_FLAGS);
}
@Override
- public int getMultiProcessSetting(Context context) {
+ public int getMultiProcessSetting() {
if (updateServiceV2()) {
throw new IllegalStateException(
"getMultiProcessSetting shouldn't be called if update_service_v2 flag is set.");
}
return Settings.Global.getInt(
- context.getContentResolver(), Settings.Global.WEBVIEW_MULTIPROCESS, 0);
+ mContext.getContentResolver(), Settings.Global.WEBVIEW_MULTIPROCESS, 0);
}
@Override
- public void setMultiProcessSetting(Context context, int value) {
+ public void setMultiProcessSetting(int value) {
if (updateServiceV2()) {
throw new IllegalStateException(
"setMultiProcessSetting shouldn't be called if update_service_v2 flag is set.");
}
Settings.Global.putInt(
- context.getContentResolver(), Settings.Global.WEBVIEW_MULTIPROCESS, value);
+ mContext.getContentResolver(), Settings.Global.WEBVIEW_MULTIPROCESS, value);
}
@Override
diff --git a/services/core/java/com/android/server/webkit/SystemInterface.java b/services/core/java/com/android/server/webkit/SystemInterface.java
index ad32f623c80d..3b77d07412ce 100644
--- a/services/core/java/com/android/server/webkit/SystemInterface.java
+++ b/services/core/java/com/android/server/webkit/SystemInterface.java
@@ -16,7 +16,6 @@
package com.android.server.webkit;
-import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager.NameNotFoundException;
@@ -34,19 +33,19 @@ import java.util.List;
* @hide
*/
public interface SystemInterface {
- public WebViewProviderInfo[] getWebViewPackages();
- public int onWebViewProviderChanged(PackageInfo packageInfo);
- public long getFactoryPackageVersion(String packageName) throws NameNotFoundException;
+ WebViewProviderInfo[] getWebViewPackages();
+ int onWebViewProviderChanged(PackageInfo packageInfo);
+ long getFactoryPackageVersion(String packageName) throws NameNotFoundException;
- public String getUserChosenWebViewProvider(Context context);
- public void updateUserSetting(Context context, String newProviderName);
- public void killPackageDependents(String packageName);
+ String getUserChosenWebViewProvider();
+ void updateUserSetting(String newProviderName);
+ void killPackageDependents(String packageName);
- public void enablePackageForAllUsers(Context context, String packageName, boolean enable);
- public void installExistingPackageForAllUsers(Context context, String packageName);
+ void enablePackageForAllUsers(String packageName, boolean enable);
+ void installExistingPackageForAllUsers(String packageName);
- public boolean systemIsDebuggable();
- public PackageInfo getPackageInfoForProvider(WebViewProviderInfo configInfo)
+ boolean systemIsDebuggable();
+ PackageInfo getPackageInfoForProvider(WebViewProviderInfo configInfo)
throws NameNotFoundException;
/**
* Get the PackageInfos of all users for the package represented by {@param configInfo}.
@@ -54,15 +53,14 @@ public interface SystemInterface {
* certain user. The returned array can contain null PackageInfos if the given package
* is uninstalled for some user.
*/
- public List<UserPackage> getPackageInfoForProviderAllUsers(Context context,
- WebViewProviderInfo configInfo);
+ List<UserPackage> getPackageInfoForProviderAllUsers(WebViewProviderInfo configInfo);
- public int getMultiProcessSetting(Context context);
- public void setMultiProcessSetting(Context context, int value);
- public void notifyZygote(boolean enableMultiProcess);
+ int getMultiProcessSetting();
+ void setMultiProcessSetting(int value);
+ void notifyZygote(boolean enableMultiProcess);
/** Start the zygote if it's not already running. */
- public void ensureZygoteStarted();
- public boolean isMultiProcessDefaultEnabled();
+ void ensureZygoteStarted();
+ boolean isMultiProcessDefaultEnabled();
- public void pinWebviewIfRequired(ApplicationInfo appInfo);
+ void pinWebviewIfRequired(ApplicationInfo appInfo);
}
diff --git a/services/core/java/com/android/server/webkit/WebViewUpdateService.java b/services/core/java/com/android/server/webkit/WebViewUpdateService.java
index 043470f62850..7acb864cbb40 100644
--- a/services/core/java/com/android/server/webkit/WebViewUpdateService.java
+++ b/services/core/java/com/android/server/webkit/WebViewUpdateService.java
@@ -73,9 +73,9 @@ public class WebViewUpdateService extends SystemService {
public WebViewUpdateService(Context context) {
super(context);
if (updateServiceV2()) {
- mImpl = new WebViewUpdateServiceImpl2(context, SystemImpl.getInstance());
+ mImpl = new WebViewUpdateServiceImpl2(new SystemImpl(context));
} else {
- mImpl = new WebViewUpdateServiceImpl(context, SystemImpl.getInstance());
+ mImpl = new WebViewUpdateServiceImpl(new SystemImpl(context));
}
}
diff --git a/services/core/java/com/android/server/webkit/WebViewUpdateServiceImpl.java b/services/core/java/com/android/server/webkit/WebViewUpdateServiceImpl.java
index dcf20f97ef71..b9be4a2deef2 100644
--- a/services/core/java/com/android/server/webkit/WebViewUpdateServiceImpl.java
+++ b/services/core/java/com/android/server/webkit/WebViewUpdateServiceImpl.java
@@ -16,7 +16,6 @@
package com.android.server.webkit;
import android.annotation.Nullable;
-import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.Signature;
@@ -92,7 +91,6 @@ class WebViewUpdateServiceImpl implements WebViewUpdateServiceInterface {
private static final int MULTIPROCESS_SETTING_OFF_VALUE = Integer.MIN_VALUE;
private final SystemInterface mSystemInterface;
- private final Context mContext;
private long mMinimumVersionCode = -1;
@@ -110,8 +108,7 @@ class WebViewUpdateServiceImpl implements WebViewUpdateServiceInterface {
private final Object mLock = new Object();
- WebViewUpdateServiceImpl(Context context, SystemInterface systemInterface) {
- mContext = context;
+ WebViewUpdateServiceImpl(SystemInterface systemInterface) {
mSystemInterface = systemInterface;
}
@@ -173,7 +170,7 @@ class WebViewUpdateServiceImpl implements WebViewUpdateServiceInterface {
try {
synchronized (mLock) {
mCurrentWebViewPackage = findPreferredWebViewPackage();
- String userSetting = mSystemInterface.getUserChosenWebViewProvider(mContext);
+ String userSetting = mSystemInterface.getUserChosenWebViewProvider();
if (userSetting != null
&& !userSetting.equals(mCurrentWebViewPackage.packageName)) {
// Don't persist the user-chosen setting across boots if the package being
@@ -181,8 +178,7 @@ class WebViewUpdateServiceImpl implements WebViewUpdateServiceInterface {
// be surprised by the device switching to using a certain webview package,
// that was uninstalled/disabled a long time ago, if it is installed/enabled
// again.
- mSystemInterface.updateUserSetting(mContext,
- mCurrentWebViewPackage.packageName);
+ mSystemInterface.updateUserSetting(mCurrentWebViewPackage.packageName);
}
onWebViewProviderChanged(mCurrentWebViewPackage);
}
@@ -203,8 +199,7 @@ class WebViewUpdateServiceImpl implements WebViewUpdateServiceInterface {
WebViewProviderInfo fallbackProvider = getFallbackProvider(webviewProviders);
if (fallbackProvider != null) {
Slog.w(TAG, "No valid provider, trying to enable " + fallbackProvider.packageName);
- mSystemInterface.enablePackageForAllUsers(mContext, fallbackProvider.packageName,
- true);
+ mSystemInterface.enablePackageForAllUsers(fallbackProvider.packageName, true);
} else {
Slog.e(TAG, "No valid provider and no fallback available.");
}
@@ -316,7 +311,7 @@ class WebViewUpdateServiceImpl implements WebViewUpdateServiceInterface {
oldPackage = mCurrentWebViewPackage;
if (newProviderName != null) {
- mSystemInterface.updateUserSetting(mContext, newProviderName);
+ mSystemInterface.updateUserSetting(newProviderName);
}
try {
@@ -447,7 +442,7 @@ class WebViewUpdateServiceImpl implements WebViewUpdateServiceInterface {
private PackageInfo findPreferredWebViewPackage() throws WebViewPackageMissingException {
ProviderAndPackageInfo[] providers = getValidWebViewPackagesAndInfos();
- String userChosenProvider = mSystemInterface.getUserChosenWebViewProvider(mContext);
+ String userChosenProvider = mSystemInterface.getUserChosenWebViewProvider();
// If the user has chosen provider, use that (if it's installed and enabled for all
// users).
@@ -455,7 +450,7 @@ class WebViewUpdateServiceImpl implements WebViewUpdateServiceInterface {
if (providerAndPackage.provider.packageName.equals(userChosenProvider)) {
// userPackages can contain null objects.
List<UserPackage> userPackages =
- mSystemInterface.getPackageInfoForProviderAllUsers(mContext,
+ mSystemInterface.getPackageInfoForProviderAllUsers(
providerAndPackage.provider);
if (isInstalledAndEnabledForAllUsers(userPackages)) {
return providerAndPackage.packageInfo;
@@ -470,7 +465,7 @@ class WebViewUpdateServiceImpl implements WebViewUpdateServiceInterface {
if (providerAndPackage.provider.availableByDefault) {
// userPackages can contain null objects.
List<UserPackage> userPackages =
- mSystemInterface.getPackageInfoForProviderAllUsers(mContext,
+ mSystemInterface.getPackageInfoForProviderAllUsers(
providerAndPackage.provider);
if (isInstalledAndEnabledForAllUsers(userPackages)) {
return providerAndPackage.packageInfo;
@@ -658,7 +653,7 @@ class WebViewUpdateServiceImpl implements WebViewUpdateServiceInterface {
@Override
public boolean isMultiProcessEnabled() {
- int settingValue = mSystemInterface.getMultiProcessSetting(mContext);
+ int settingValue = mSystemInterface.getMultiProcessSetting();
if (mSystemInterface.isMultiProcessDefaultEnabled()) {
// Multiprocess should be enabled unless the user has turned it off manually.
return settingValue > MULTIPROCESS_SETTING_OFF_VALUE;
@@ -671,7 +666,7 @@ class WebViewUpdateServiceImpl implements WebViewUpdateServiceInterface {
@Override
public void enableMultiProcess(boolean enable) {
PackageInfo current = getCurrentWebViewPackage();
- mSystemInterface.setMultiProcessSetting(mContext,
+ mSystemInterface.setMultiProcessSetting(
enable ? MULTIPROCESS_SETTING_ON_VALUE : MULTIPROCESS_SETTING_OFF_VALUE);
mSystemInterface.notifyZygote(enable);
if (current != null) {
@@ -725,7 +720,7 @@ class WebViewUpdateServiceImpl implements WebViewUpdateServiceInterface {
pw.println(" WebView packages:");
for (WebViewProviderInfo provider : allProviders) {
List<UserPackage> userPackages =
- mSystemInterface.getPackageInfoForProviderAllUsers(mContext, provider);
+ mSystemInterface.getPackageInfoForProviderAllUsers(provider);
PackageInfo systemUserPackageInfo =
userPackages.get(UserHandle.USER_SYSTEM).getPackageInfo();
if (systemUserPackageInfo == null) {
@@ -741,7 +736,7 @@ class WebViewUpdateServiceImpl implements WebViewUpdateServiceInterface {
systemUserPackageInfo.applicationInfo.targetSdkVersion);
if (validity == VALIDITY_OK) {
boolean installedForAllUsers = isInstalledAndEnabledForAllUsers(
- mSystemInterface.getPackageInfoForProviderAllUsers(mContext, provider));
+ mSystemInterface.getPackageInfoForProviderAllUsers(provider));
pw.println(String.format(
" Valid package %s (%s) is %s installed/enabled for all users",
systemUserPackageInfo.packageName,
diff --git a/services/core/java/com/android/server/webkit/WebViewUpdateServiceImpl2.java b/services/core/java/com/android/server/webkit/WebViewUpdateServiceImpl2.java
index 993597eedd2c..307c15b72c76 100644
--- a/services/core/java/com/android/server/webkit/WebViewUpdateServiceImpl2.java
+++ b/services/core/java/com/android/server/webkit/WebViewUpdateServiceImpl2.java
@@ -16,7 +16,6 @@
package com.android.server.webkit;
import android.annotation.Nullable;
-import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.Signature;
@@ -86,7 +85,6 @@ class WebViewUpdateServiceImpl2 implements WebViewUpdateServiceInterface {
private static final int VALIDITY_NO_LIBRARY_FLAG = 4;
private final SystemInterface mSystemInterface;
- private final Context mContext;
private final WebViewProviderInfo mDefaultProvider;
private long mMinimumVersionCode = -1;
@@ -108,8 +106,7 @@ class WebViewUpdateServiceImpl2 implements WebViewUpdateServiceInterface {
private final Object mLock = new Object();
- WebViewUpdateServiceImpl2(Context context, SystemInterface systemInterface) {
- mContext = context;
+ WebViewUpdateServiceImpl2(SystemInterface systemInterface) {
mSystemInterface = systemInterface;
WebViewProviderInfo[] webviewProviders = getWebViewPackages();
@@ -194,8 +191,7 @@ class WebViewUpdateServiceImpl2 implements WebViewUpdateServiceInterface {
}
if (mCurrentWebViewPackage.packageName.equals(mDefaultProvider.packageName)) {
List<UserPackage> userPackages =
- mSystemInterface.getPackageInfoForProviderAllUsers(
- mContext, mDefaultProvider);
+ mSystemInterface.getPackageInfoForProviderAllUsers(mDefaultProvider);
return !isInstalledAndEnabledForAllUsers(userPackages);
} else {
return false;
@@ -216,10 +212,8 @@ class WebViewUpdateServiceImpl2 implements WebViewUpdateServiceInterface {
TAG,
"No provider available for all users, trying to install and enable "
+ mDefaultProvider.packageName);
- mSystemInterface.installExistingPackageForAllUsers(
- mContext, mDefaultProvider.packageName);
- mSystemInterface.enablePackageForAllUsers(
- mContext, mDefaultProvider.packageName, true);
+ mSystemInterface.installExistingPackageForAllUsers(mDefaultProvider.packageName);
+ mSystemInterface.enablePackageForAllUsers(mDefaultProvider.packageName, true);
}
@Override
@@ -229,7 +223,7 @@ class WebViewUpdateServiceImpl2 implements WebViewUpdateServiceInterface {
synchronized (mLock) {
mCurrentWebViewPackage = findPreferredWebViewPackage();
repairNeeded = shouldTriggerRepairLocked();
- String userSetting = mSystemInterface.getUserChosenWebViewProvider(mContext);
+ String userSetting = mSystemInterface.getUserChosenWebViewProvider();
if (userSetting != null
&& !userSetting.equals(mCurrentWebViewPackage.packageName)) {
// Don't persist the user-chosen setting across boots if the package being
@@ -237,8 +231,7 @@ class WebViewUpdateServiceImpl2 implements WebViewUpdateServiceInterface {
// be surprised by the device switching to using a certain webview package,
// that was uninstalled/disabled a long time ago, if it is installed/enabled
// again.
- mSystemInterface.updateUserSetting(mContext,
- mCurrentWebViewPackage.packageName);
+ mSystemInterface.updateUserSetting(mCurrentWebViewPackage.packageName);
}
onWebViewProviderChanged(mCurrentWebViewPackage);
}
@@ -362,7 +355,7 @@ class WebViewUpdateServiceImpl2 implements WebViewUpdateServiceInterface {
oldPackage = mCurrentWebViewPackage;
if (newProviderName != null) {
- mSystemInterface.updateUserSetting(mContext, newProviderName);
+ mSystemInterface.updateUserSetting(newProviderName);
}
try {
@@ -493,7 +486,7 @@ class WebViewUpdateServiceImpl2 implements WebViewUpdateServiceInterface {
Counter.logIncrement("webview.value_find_preferred_webview_package_counter");
// If the user has chosen provider, use that (if it's installed and enabled for all
// users).
- String userChosenPackageName = mSystemInterface.getUserChosenWebViewProvider(mContext);
+ String userChosenPackageName = mSystemInterface.getUserChosenWebViewProvider();
WebViewProviderInfo userChosenProvider =
getWebViewProviderForPackage(userChosenPackageName);
if (userChosenProvider != null) {
@@ -502,8 +495,7 @@ class WebViewUpdateServiceImpl2 implements WebViewUpdateServiceInterface {
mSystemInterface.getPackageInfoForProvider(userChosenProvider);
if (validityResult(userChosenProvider, packageInfo) == VALIDITY_OK) {
List<UserPackage> userPackages =
- mSystemInterface.getPackageInfoForProviderAllUsers(
- mContext, userChosenProvider);
+ mSystemInterface.getPackageInfoForProviderAllUsers(userChosenProvider);
if (isInstalledAndEnabledForAllUsers(userPackages)) {
return packageInfo;
}
@@ -779,7 +771,7 @@ class WebViewUpdateServiceImpl2 implements WebViewUpdateServiceInterface {
pw.println(" WebView packages:");
for (WebViewProviderInfo provider : allProviders) {
List<UserPackage> userPackages =
- mSystemInterface.getPackageInfoForProviderAllUsers(mContext, provider);
+ mSystemInterface.getPackageInfoForProviderAllUsers(provider);
PackageInfo systemUserPackageInfo =
userPackages.get(UserHandle.USER_SYSTEM).getPackageInfo();
if (systemUserPackageInfo == null) {
@@ -798,8 +790,7 @@ class WebViewUpdateServiceImpl2 implements WebViewUpdateServiceInterface {
if (validity == VALIDITY_OK) {
boolean installedForAllUsers =
isInstalledAndEnabledForAllUsers(
- mSystemInterface.getPackageInfoForProviderAllUsers(
- mContext, provider));
+ mSystemInterface.getPackageInfoForProviderAllUsers(provider));
pw.println(
TextUtils.formatSimple(
" Valid package %s (%s) is %s installed/enabled for all users",
diff --git a/services/core/java/com/android/server/wm/AbsAppSnapshotController.java b/services/core/java/com/android/server/wm/AbsAppSnapshotController.java
index 2d8aa3f06de3..09de01e88c9e 100644
--- a/services/core/java/com/android/server/wm/AbsAppSnapshotController.java
+++ b/services/core/java/com/android/server/wm/AbsAppSnapshotController.java
@@ -137,7 +137,7 @@ abstract class AbsAppSnapshotController<TYPE extends WindowContainer,
}
abstract ActivityRecord getTopActivity(TYPE source);
- abstract ActivityRecord getTopFullscreenActivity(TYPE source);
+ abstract WindowState getTopFullscreenWindow(TYPE source);
abstract ActivityManager.TaskDescription getTaskDescription(TYPE source);
/**
* Find the window for a given task to take a snapshot. Top child of the task is usually the one
@@ -465,10 +465,7 @@ abstract class AbsAppSnapshotController<TYPE extends WindowContainer,
*/
@WindowInsetsController.Appearance
private int getAppearance(TYPE source) {
- final ActivityRecord topFullscreenActivity = getTopFullscreenActivity(source);
- final WindowState topFullscreenWindow = topFullscreenActivity != null
- ? topFullscreenActivity.findMainWindow()
- : null;
+ final WindowState topFullscreenWindow = getTopFullscreenWindow(source);
if (topFullscreenWindow != null) {
return topFullscreenWindow.mAttrs.insetsFlags.appearance;
}
diff --git a/services/core/java/com/android/server/wm/AccessibilityController.java b/services/core/java/com/android/server/wm/AccessibilityController.java
index 5be5bc5e3952..2c734127b7ea 100644
--- a/services/core/java/com/android/server/wm/AccessibilityController.java
+++ b/services/core/java/com/android/server/wm/AccessibilityController.java
@@ -47,7 +47,7 @@ import static com.android.server.accessibility.AccessibilityTraceProto.WHERE;
import static com.android.server.accessibility.AccessibilityTraceProto.WINDOW_MANAGER_SERVICE;
import static com.android.server.wm.WindowManagerDebugConfig.TAG_WITH_CLASS_NAME;
import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM;
-import static com.android.server.wm.WindowTracing.WINSCOPE_EXT;
+import static com.android.server.wm.WindowTracingLegacy.WINSCOPE_EXT;
import android.accessibilityservice.AccessibilityTrace;
import android.animation.ObjectAnimator;
diff --git a/services/core/java/com/android/server/wm/ActivityRecord.java b/services/core/java/com/android/server/wm/ActivityRecord.java
index b0f92e8f1c2b..516fc656ccb4 100644
--- a/services/core/java/com/android/server/wm/ActivityRecord.java
+++ b/services/core/java/com/android/server/wm/ActivityRecord.java
@@ -53,7 +53,6 @@ import static android.app.WindowConfiguration.WINDOWING_MODE_MULTI_WINDOW;
import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED;
import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED;
import static android.app.WindowConfiguration.activityTypeToString;
-import static android.app.WindowConfiguration.isFloating;
import static android.app.admin.DevicePolicyResources.Drawables.Source.PROFILE_SWITCH_ANIMATION;
import static android.app.admin.DevicePolicyResources.Drawables.Style.OUTLINE;
import static android.app.admin.DevicePolicyResources.Drawables.WORK_PROFILE_ICON;
@@ -65,6 +64,7 @@ import static android.content.Intent.CATEGORY_SECONDARY_HOME;
import static android.content.Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS;
import static android.content.Intent.FLAG_ACTIVITY_NO_HISTORY;
import static android.content.pm.ActivityInfo.CONFIG_ORIENTATION;
+import static android.content.pm.ActivityInfo.CONFIG_RESOURCES_UNUSED;
import static android.content.pm.ActivityInfo.CONFIG_SCREEN_LAYOUT;
import static android.content.pm.ActivityInfo.CONFIG_SCREEN_SIZE;
import static android.content.pm.ActivityInfo.CONFIG_SMALLEST_SCREEN_SIZE;
@@ -89,12 +89,6 @@ import static android.content.pm.ActivityInfo.LOCK_TASK_LAUNCH_MODE_DEFAULT;
import static android.content.pm.ActivityInfo.LOCK_TASK_LAUNCH_MODE_IF_ALLOWLISTED;
import static android.content.pm.ActivityInfo.LOCK_TASK_LAUNCH_MODE_NEVER;
import static android.content.pm.ActivityInfo.OVERRIDE_ENABLE_INSETS_DECOUPLED_CONFIGURATION;
-import static android.content.pm.ActivityInfo.OVERRIDE_MIN_ASPECT_RATIO_EXCLUDE_PORTRAIT_FULLSCREEN;
-import static android.content.pm.ActivityInfo.OVERRIDE_MIN_ASPECT_RATIO_LARGE;
-import static android.content.pm.ActivityInfo.OVERRIDE_MIN_ASPECT_RATIO_MEDIUM;
-import static android.content.pm.ActivityInfo.OVERRIDE_MIN_ASPECT_RATIO_PORTRAIT_ONLY;
-import static android.content.pm.ActivityInfo.OVERRIDE_MIN_ASPECT_RATIO_SMALL;
-import static android.content.pm.ActivityInfo.OVERRIDE_MIN_ASPECT_RATIO_TO_ALIGN_WITH_SPLIT_SCREEN;
import static android.content.pm.ActivityInfo.PERSIST_ACROSS_REBOOTS;
import static android.content.pm.ActivityInfo.PERSIST_ROOT_ONLY;
import static android.content.pm.ActivityInfo.RESIZE_MODE_FORCE_RESIZEABLE;
@@ -114,7 +108,6 @@ import static android.content.res.Configuration.ORIENTATION_PORTRAIT;
import static android.content.res.Configuration.ORIENTATION_UNDEFINED;
import static android.content.res.Configuration.UI_MODE_TYPE_DESK;
import static android.content.res.Configuration.UI_MODE_TYPE_MASK;
-import static android.content.res.Configuration.UI_MODE_TYPE_VR_HEADSET;
import static android.os.Build.VERSION_CODES.HONEYCOMB;
import static android.os.Build.VERSION_CODES.O;
import static android.os.InputConstants.DEFAULT_DISPATCHING_TIMEOUT_MILLIS;
@@ -240,11 +233,10 @@ import static com.android.server.wm.ActivityTaskManagerService.RELAUNCH_REASON_F
import static com.android.server.wm.ActivityTaskManagerService.RELAUNCH_REASON_NONE;
import static com.android.server.wm.ActivityTaskManagerService.RELAUNCH_REASON_WINDOWING_MODE_RESIZE;
import static com.android.server.wm.ActivityTaskManagerService.getInputDispatchingTimeoutMillisLocked;
+import static com.android.server.wm.DesktopModeHelper.canEnterDesktopMode;
import static com.android.server.wm.IdentifierProto.HASH_CODE;
import static com.android.server.wm.IdentifierProto.TITLE;
import static com.android.server.wm.IdentifierProto.USER_ID;
-import static com.android.server.wm.LetterboxConfiguration.DEFAULT_LETTERBOX_ASPECT_RATIO_FOR_MULTI_WINDOW;
-import static com.android.server.wm.LetterboxConfiguration.MIN_FIXED_ORIENTATION_LETTERBOX_ASPECT_RATIO;
import static com.android.server.wm.StartingData.AFTER_TRANSACTION_COPY_TO_CLIENT;
import static com.android.server.wm.StartingData.AFTER_TRANSACTION_REMOVE_DIRECTLY;
import static com.android.server.wm.SurfaceAnimator.ANIMATION_TYPE_APP_TRANSITION;
@@ -343,7 +335,6 @@ import android.service.contentcapture.ActivityEvent;
import android.service.dreams.DreamActivity;
import android.service.voice.IVoiceInteractionSession;
import android.util.ArraySet;
-import android.util.DisplayMetrics;
import android.util.EventLog;
import android.util.Log;
import android.util.MergedConfiguration;
@@ -485,9 +476,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
// finished destroying itself.
private static final int DESTROY_TIMEOUT = 10 * 1000;
- // Rounding tolerance to be used in aspect ratio computations
- private static final float ASPECT_RATIO_ROUNDING_TOLERANCE = 0.005f;
-
final ActivityTaskManagerService mAtmService;
final ActivityCallerState mCallerState;
@NonNull
@@ -831,26 +819,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
// naturally.
private boolean mInSizeCompatModeForBounds = false;
- // Whether the aspect ratio restrictions applied to the activity bounds in applyAspectRatio().
- private boolean mIsAspectRatioApplied = false;
-
- // Bounds populated in resolveFixedOrientationConfiguration when this activity is letterboxed
- // for fixed orientation. If not null, they are used as parent container in
- // resolveSizeCompatModeConfiguration and in a constructor of CompatDisplayInsets. If
- // letterboxed due to fixed orientation then aspect ratio restrictions are also respected.
- // This happens when an activity has fixed orientation which doesn't match orientation of the
- // parent because a display is ignoring orientation request or fixed to user rotation.
- // See WindowManagerService#getIgnoreOrientationRequest and
- // WindowManagerService#getFixedToUserRotation for more context.
- @Nullable
- private Rect mLetterboxBoundsForFixedOrientationAndAspectRatio;
-
- // Bounds populated in resolveAspectRatioRestriction when this activity is letterboxed for
- // aspect ratio. If not null, they are used as parent container in
- // resolveSizeCompatModeConfiguration and in a constructor of CompatDisplayInsets.
- @Nullable
- private Rect mLetterboxBoundsForAspectRatio;
-
// Whether the activity is eligible to be letterboxed for fixed orientation with respect to its
// requested orientation, even when it's letterbox for another reason (e.g., size compat mode)
// and therefore #isLetterboxedForFixedOrientationAndAspectRatio returns false.
@@ -892,8 +860,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
/** The last set {@link DropInputMode} for this activity surface. */
@DropInputMode
private int mLastDropInputMode = DropInputMode.NONE;
- /** Whether the input to this activity will be dropped during the current playing animation. */
- private boolean mIsInputDroppedForAnimation;
/**
* Whether the application has desk mode resources. Calculated and cached when
@@ -1136,11 +1102,9 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
pw.println(prefix + "mLastReportedConfigurations:");
mLastReportedConfiguration.dump(pw, prefix + " ");
- if (Flags.activityWindowInfoFlag()) {
- pw.print(prefix);
- pw.print("mLastReportedActivityWindowInfo=");
- pw.println(mLastReportedActivityWindowInfo);
- }
+ pw.print(prefix);
+ pw.print("mLastReportedActivityWindowInfo=");
+ pw.println(mLastReportedActivityWindowInfo);
pw.print(prefix); pw.print("CurrentConfiguration="); pw.println(getConfiguration());
if (!getRequestedOverrideConfiguration().equals(EMPTY)) {
@@ -1733,15 +1697,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
}
}
- /** Sets if all input will be dropped as a protection during the client-driven animation. */
- void setDropInputForAnimation(boolean isInputDroppedForAnimation) {
- if (mIsInputDroppedForAnimation == isInputDroppedForAnimation) {
- return;
- }
- mIsInputDroppedForAnimation = isInputDroppedForAnimation;
- updateUntrustedEmbeddingInputProtection();
- }
-
/**
* Sets to drop input when obscured to activity if it is embedded in untrusted mode.
*
@@ -1754,10 +1709,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
if (getSurfaceControl() == null) {
return;
}
- if (mIsInputDroppedForAnimation) {
- // Disable all input during the animation.
- setDropInputMode(DropInputMode.ALL);
- } else if (isEmbeddedInUntrustedMode()) {
+ if (isEmbeddedInUntrustedMode()) {
// Set drop input to OBSCURED when untrusted embedded.
setDropInputMode(DropInputMode.OBSCURED);
} else {
@@ -2913,7 +2865,10 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
if (mStartingData != null) {
if (mStartingData.mAssociatedTask != null) {
// The snapshot type may have called associateStartingDataWithTask().
- attachStartingSurfaceToAssociatedTask();
+ // If this activity is rotated, don't attach to task to preserve the transform.
+ if (!hasFixedRotationTransform()) {
+ attachStartingSurfaceToAssociatedTask();
+ }
} else if (isEmbedded()) {
associateStartingWindowWithTaskIfNeeded();
}
@@ -2944,6 +2899,12 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|| mStartingData.mAssociatedTask != null) {
return;
}
+ if (task.isVisible() && !task.inTransition()) {
+ // Don't associated with task if the task is visible especially when the activity is
+ // embedded. We just need to show splash screen on the activity in case the first frame
+ // is not ready.
+ return;
+ }
associateStartingDataWithTask();
attachStartingSurfaceToAssociatedTask();
}
@@ -3207,7 +3168,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
@NonNull
ActivityWindowInfo getActivityWindowInfo() {
- if (!Flags.activityWindowInfoFlag() || !isAttached()) {
+ if (!isAttached()) {
return mTmpActivityWindowInfo;
}
if (isFixedRotationTransforming()) {
@@ -7221,7 +7182,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
Slog.v(TAG, "Eval win " + w + ": isDrawn=" + w.isDrawn()
+ ", isAnimationSet=" + isAnimationSet);
if (!w.isDrawn()) {
- Slog.v(TAG, "Not displayed: s=" + winAnimator.mSurfaceController
+ Slog.v(TAG, "Not displayed: s=" + winAnimator.mSurfaceControl
+ " pv=" + w.isVisibleByPolicy()
+ " mDrawState=" + winAnimator.drawStateToString()
+ " ph=" + w.isParentWindowHidden() + " th=" + mVisibleRequested
@@ -8330,9 +8291,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
}
void setLastReportedActivityWindowInfo(@NonNull ActivityWindowInfo activityWindowInfo) {
- if (Flags.activityWindowInfoFlag()) {
- mLastReportedActivityWindowInfo.set(activityWindowInfo);
- }
+ mLastReportedActivityWindowInfo.set(activityWindowInfo);
}
@Nullable
@@ -8392,7 +8351,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
* aspect ratio.
*/
boolean shouldCreateCompatDisplayInsets() {
- if (mLetterboxUiController.hasFullscreenOverride()) {
+ if (mAppCompatController.getAppCompatAspectRatioOverrides().hasFullscreenOverride()) {
// If the user has forced the applications aspect ratio to be fullscreen, don't use size
// compatibility mode in any situation. The user has been warned and therefore accepts
// the risk of the application misbehaving.
@@ -8481,10 +8440,9 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
fullConfig.windowConfiguration.getRotation());
}
- final Rect letterboxedContainerBounds =
- mLetterboxBoundsForFixedOrientationAndAspectRatio != null
- ? mLetterboxBoundsForFixedOrientationAndAspectRatio
- : mLetterboxBoundsForAspectRatio;
+ final Rect letterboxedContainerBounds = mAppCompatController
+ .getAppCompatAspectRatioPolicy().getLetterboxedContainerBounds();
+
// The role of CompatDisplayInsets is like the override bounds.
mCompatDisplayInsets =
new CompatDisplayInsets(
@@ -8558,10 +8516,8 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
newParentConfiguration = mTmpConfig;
}
- mIsAspectRatioApplied = false;
+ mAppCompatController.getAppCompatAspectRatioPolicy().reset();
mIsEligibleForFixedOrientationLetterbox = false;
- mLetterboxBoundsForFixedOrientationAndAspectRatio = null;
- mLetterboxBoundsForAspectRatio = null;
mResolveConfigHint.resolveTmpOverrides(mDisplayContent, newParentConfiguration,
isFixedRotationTransforming());
@@ -8594,8 +8550,11 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
// If activity in fullscreen mode is letterboxed because of fixed orientation then bounds
// are already calculated in resolveFixedOrientationConfiguration.
// Don't apply aspect ratio if app is overridden to fullscreen by device user/manufacturer.
- if (Flags.immersiveAppRepositioning() && !isLetterboxedForFixedOrientationAndAspectRatio()
- && !mLetterboxUiController.hasFullscreenOverride()) {
+ if (Flags.immersiveAppRepositioning()
+ && !mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio()
+ && !mAppCompatController.getAppCompatAspectRatioOverrides()
+ .hasFullscreenOverride()) {
resolveAspectRatioRestriction(newParentConfiguration);
}
final CompatDisplayInsets compatDisplayInsets = getCompatDisplayInsets();
@@ -8615,8 +8574,12 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
// are already calculated in resolveFixedOrientationConfiguration, or if in size compat
// mode, it should already be calculated in resolveSizeCompatModeConfiguration.
// Don't apply aspect ratio if app is overridden to fullscreen by device user/manufacturer.
- if (!Flags.immersiveAppRepositioning() && !isLetterboxedForFixedOrientationAndAspectRatio()
- && !mInSizeCompatModeForBounds && !mLetterboxUiController.hasFullscreenOverride()) {
+ if (!Flags.immersiveAppRepositioning()
+ && !mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio()
+ && !mInSizeCompatModeForBounds
+ && !mAppCompatController.getAppCompatAspectRatioOverrides()
+ .hasFullscreenOverride()) {
resolveAspectRatioRestriction(newParentConfiguration);
}
@@ -8633,14 +8596,16 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
// Fixed orientation letterboxing is possible on both large screen devices
// with ignoreOrientationRequest enabled and on phones in split screen even with
// ignoreOrientationRequest disabled.
- && (mLetterboxBoundsForFixedOrientationAndAspectRatio != null
+ && (mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio()
// Limiting check for aspect ratio letterboxing to devices with enabled
// ignoreOrientationRequest. This avoids affecting phones where apps may
// not expect the change of smallestScreenWidthDp after rotation which is
// possible with this logic. Not having smallestScreenWidthDp completely
// accurate on phones shouldn't make the big difference and is expected
// to be already well-tested by apps.
- || (isIgnoreOrientationRequest && mIsAspectRatioApplied))) {
+ || (isIgnoreOrientationRequest
+ && mAppCompatController.getAppCompatAspectRatioPolicy().isAspectRatioApplied()))) {
// TODO(b/264034555): Use mDisplayContent to calculate smallestScreenWidthDp from all
// rotations and only re-calculate if parent bounds have non-orientation size change.
resolvedConfig.smallestScreenWidthDp =
@@ -8681,7 +8646,14 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
resolvedConfig.windowConfiguration.setMaxBounds(mTmpBounds);
}
- applySizeOverrideIfNeeded(newParentConfiguration, parentWindowingMode, resolvedConfig);
+ applySizeOverrideIfNeeded(
+ mDisplayContent,
+ info.applicationInfo,
+ newParentConfiguration,
+ resolvedConfig,
+ mOptOutEdgeToEdge,
+ hasFixedRotationTransform(),
+ getCompatDisplayInsets() != null);
mResolveConfigHint.resetTmpOverrides();
logAppCompatState();
@@ -8691,100 +8663,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
return Rect.copyOrNull(mResolveConfigHint.mParentAppBoundsOverride);
}
- /**
- * If necessary, override configuration fields related to app bounds.
- * This will happen when the app is targeting SDK earlier than 35.
- * The insets and configuration has decoupled since SDK level 35, to make the system
- * compatible to existing apps, override the configuration with legacy metrics. In legacy
- * metrics, fields such as appBounds will exclude some of the system bar areas.
- * The override contains all potentially affected fields in Configuration, including
- * screenWidthDp, screenHeightDp, smallestScreenWidthDp, and orientation.
- * All overrides to those fields should be in this method.
- *
- * TODO: Consider integrate this with computeConfigByResolveHint()
- */
- private void applySizeOverrideIfNeeded(Configuration newParentConfiguration,
- int parentWindowingMode, Configuration inOutConfig) {
- if (mDisplayContent == null) {
- return;
- }
- final Rect parentBounds = newParentConfiguration.windowConfiguration.getBounds();
- int rotation = newParentConfiguration.windowConfiguration.getRotation();
- if (rotation == ROTATION_UNDEFINED && !isFixedRotationTransforming()) {
- rotation = mDisplayContent.getRotation();
- }
- if (!mOptOutEdgeToEdge && (!mResolveConfigHint.mUseOverrideInsetsForConfig
- || getCompatDisplayInsets() != null
- || (isFloating(parentWindowingMode)
- // Check the requested windowing mode of activity as well in case it is
- // switching between PiP and fullscreen.
- && (inOutConfig.windowConfiguration.getWindowingMode()
- == WINDOWING_MODE_UNDEFINED
- || isFloating(inOutConfig.windowConfiguration.getWindowingMode())))
- || rotation == ROTATION_UNDEFINED)) {
- // If the insets configuration decoupled logic is not enabled for the app, or the app
- // already has a compat override, or the context doesn't contain enough info to
- // calculate the override, skip the override.
- return;
- }
- // Make sure the orientation related fields will be updated by the override insets, because
- // fixed rotation has assigned the fields from display's configuration.
- if (hasFixedRotationTransform()) {
- inOutConfig.windowConfiguration.setAppBounds(null);
- inOutConfig.screenWidthDp = Configuration.SCREEN_WIDTH_DP_UNDEFINED;
- inOutConfig.screenHeightDp = Configuration.SCREEN_HEIGHT_DP_UNDEFINED;
- inOutConfig.smallestScreenWidthDp = Configuration.SMALLEST_SCREEN_WIDTH_DP_UNDEFINED;
- inOutConfig.orientation = ORIENTATION_UNDEFINED;
- }
-
- // Override starts here.
- final boolean rotated = (rotation == ROTATION_90 || rotation == ROTATION_270);
- final int dw = rotated ? mDisplayContent.mBaseDisplayHeight
- : mDisplayContent.mBaseDisplayWidth;
- final int dh = rotated ? mDisplayContent.mBaseDisplayWidth
- : mDisplayContent.mBaseDisplayHeight;
- final Rect nonDecorInsets = mDisplayContent.getDisplayPolicy()
- .getDecorInsetsInfo(rotation, dw, dh).mOverrideNonDecorInsets;
- // This should be the only place override the configuration for ActivityRecord. Override
- // the value if not calculated yet.
- Rect outAppBounds = inOutConfig.windowConfiguration.getAppBounds();
- if (outAppBounds == null || outAppBounds.isEmpty()) {
- inOutConfig.windowConfiguration.setAppBounds(parentBounds);
- outAppBounds = inOutConfig.windowConfiguration.getAppBounds();
- outAppBounds.inset(nonDecorInsets);
- }
- float density = inOutConfig.densityDpi;
- if (density == Configuration.DENSITY_DPI_UNDEFINED) {
- density = newParentConfiguration.densityDpi;
- }
- density *= DisplayMetrics.DENSITY_DEFAULT_SCALE;
- if (inOutConfig.screenWidthDp == Configuration.SCREEN_WIDTH_DP_UNDEFINED) {
- inOutConfig.screenWidthDp = (int) (outAppBounds.width() / density + 0.5f);
- }
- if (inOutConfig.screenHeightDp == Configuration.SCREEN_HEIGHT_DP_UNDEFINED) {
- inOutConfig.screenHeightDp = (int) (outAppBounds.height() / density + 0.5f);
- }
- if (inOutConfig.smallestScreenWidthDp
- == Configuration.SMALLEST_SCREEN_WIDTH_DP_UNDEFINED
- && parentWindowingMode == WINDOWING_MODE_FULLSCREEN) {
- // For the case of PIP transition and multi-window environment, the
- // smallestScreenWidthDp is handled already. Override only if the app is in
- // fullscreen.
- final DisplayInfo info = new DisplayInfo(mDisplayContent.getDisplayInfo());
- mDisplayContent.computeSizeRanges(info, rotated, dw, dh,
- mDisplayContent.getDisplayMetrics().density,
- inOutConfig, true /* overrideConfig */);
- }
-
- // It's possible that screen size will be considered in different orientation with or
- // without considering the system bar insets. Override orientation as well.
- if (inOutConfig.orientation == ORIENTATION_UNDEFINED) {
- inOutConfig.orientation =
- (inOutConfig.screenWidthDp <= inOutConfig.screenHeightDp)
- ? ORIENTATION_PORTRAIT : ORIENTATION_LANDSCAPE;
- }
- }
-
private void computeConfigByResolveHint(@NonNull Configuration resolvedConfig,
@NonNull Configuration parentConfig) {
task.computeConfigResourceOverrides(resolvedConfig, parentConfig, mResolveConfigHint);
@@ -8844,11 +8722,13 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
// letterboxed for fixed orientation. Aspect ratio restrictions are also applied if
// present. But this doesn't return true when the activity is letterboxed only because
// of aspect ratio restrictions.
- if (isLetterboxedForFixedOrientationAndAspectRatio()) {
+ if (mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio()) {
return APP_COMPAT_STATE_CHANGED__STATE__LETTERBOXED_FOR_FIXED_ORIENTATION;
}
// Letterbox for limited aspect ratio.
- if (isLetterboxedForAspectRatioOnly()) {
+ if (mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForAspectRatioOnly()) {
return APP_COMPAT_STATE_CHANGED__STATE__LETTERBOXED_FOR_ASPECT_RATIO;
}
@@ -8998,43 +8878,13 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
return inTransitionSelfOrParent();
}
- boolean isDisplaySleepingAndSwapping() {
- for (int i = mDisplayContent.mAllSleepTokens.size() - 1; i >= 0; i--) {
- RootWindowContainer.SleepToken sleepToken = mDisplayContent.mAllSleepTokens.get(i);
- if (sleepToken.isDisplaySwapping()) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Whether this activity is letterboxed for fixed orientation. If letterboxed due to fixed
- * orientation then aspect ratio restrictions are also already respected.
- *
- * <p>This happens when an activity has fixed orientation which doesn't match orientation of the
- * parent because a display setting 'ignoreOrientationRequest' is set to true. See {@link
- * WindowManagerService#getIgnoreOrientationRequest} for more context.
- */
- boolean isLetterboxedForFixedOrientationAndAspectRatio() {
- return mLetterboxBoundsForFixedOrientationAndAspectRatio != null;
- }
-
- boolean isLetterboxedForAspectRatioOnly() {
- return mLetterboxBoundsForAspectRatio != null;
- }
-
- boolean isAspectRatioApplied() {
- return mIsAspectRatioApplied;
- }
-
/**
* Whether this activity is eligible for letterbox eduction.
*
* <p>Conditions that need to be met:
*
* <ul>
- * <li>{@link LetterboxConfiguration#getIsEducationEnabled} is true.
+ * <li>{@link AppCompatConfiguration#getIsEducationEnabled} is true.
* <li>The activity is eligible for fixed orientation letterbox.
* <li>The activity is in fullscreen.
* <li>The activity is portrait-only.
@@ -9043,7 +8893,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
* </ul>
*/
boolean isEligibleForLetterboxEducation() {
- return mWmService.mLetterboxConfiguration.getIsEducationEnabled()
+ return mWmService.mAppCompatConfiguration.getIsEducationEnabled()
&& mIsEligibleForFixedOrientationLetterbox
&& getWindowingMode() == WINDOWING_MODE_FULLSCREEN
&& getRequestedConfigurationOrientation() == ORIENTATION_PORTRAIT
@@ -9060,7 +8910,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
* @param parentBounds are the new parent bounds passed down to the activity and should be used
* to compute the stable bounds.
* @param outStableBounds will store the stable bounds, which are the bounds with insets
- * applied, if orientation is not respected when insets are applied.
+ * applied, if orientation is not respected when insets are applied.g
* Stable bounds should be used to compute letterboxed bounds if
* orientation is not respected when insets are applied.
* @param outNonDecorBounds will store the non decor bounds, which are the bounds with non
@@ -9213,23 +9063,9 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
final Rect prevResolvedBounds = new Rect(resolvedBounds);
resolvedBounds.set(containingBounds);
- final float letterboxAspectRatioOverride =
- mLetterboxUiController.getFixedOrientationLetterboxAspectRatio(newParentConfig);
-
- // Aspect ratio as suggested by the system. Apps requested mix/max aspect ratio will
- // be respected in #applyAspectRatio.
- final float desiredAspectRatio;
- if (isDefaultMultiWindowLetterboxAspectRatioDesired(newParentConfig)) {
- desiredAspectRatio = DEFAULT_LETTERBOX_ASPECT_RATIO_FOR_MULTI_WINDOW;
- } else if (letterboxAspectRatioOverride > MIN_FIXED_ORIENTATION_LETTERBOX_ASPECT_RATIO) {
- desiredAspectRatio = letterboxAspectRatioOverride;
- } else {
- desiredAspectRatio = computeAspectRatio(parentBounds);
- }
-
- // Apply aspect ratio to resolved bounds
- mIsAspectRatioApplied = applyAspectRatio(resolvedBounds, containingBoundsWithInsets,
- containingBounds, desiredAspectRatio);
+ mAppCompatController.getAppCompatAspectRatioPolicy()
+ .applyDesiredAspectRatio(newParentConfig, parentBounds, resolvedBounds,
+ containingBoundsWithInsets, containingBounds);
if (compatDisplayInsets != null) {
compatDisplayInsets.getBoundsByRotation(mTmpBounds,
@@ -9257,21 +9093,8 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
// for comparison with size compat app bounds in {@link resolveSizeCompatModeConfiguration}.
mResolveConfigHint.mTmpCompatInsets = compatDisplayInsets;
computeConfigByResolveHint(getResolvedOverrideConfiguration(), newParentConfig);
- mLetterboxBoundsForFixedOrientationAndAspectRatio = new Rect(resolvedBounds);
- }
-
- /**
- * Returns {@code true} if the default aspect ratio for a letterboxed app in multi-window mode
- * should be used.
- */
- private boolean isDefaultMultiWindowLetterboxAspectRatioDesired(
- @NonNull Configuration parentConfig) {
- if (mDisplayContent == null) {
- return false;
- }
- final int windowingMode = parentConfig.windowConfiguration.getWindowingMode();
- return WindowConfiguration.inMultiWindowMode(windowingMode)
- && !mDisplayContent.getIgnoreOrientationRequest();
+ mAppCompatController.getAppCompatAspectRatioPolicy()
+ .setLetterboxBoundsForFixedOrientationAndAspectRatio(new Rect(resolvedBounds));
}
/**
@@ -9288,7 +9111,8 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
// Use tmp bounds to calculate aspect ratio so we can know whether the activity should use
// restricted size (resolved bounds may be the requested override bounds).
mTmpBounds.setEmpty();
- mIsAspectRatioApplied = applyAspectRatio(mTmpBounds, parentAppBounds, parentBounds);
+ mAppCompatController.getAppCompatAspectRatioPolicy()
+ .applyAspectRatioForLetterbox(mTmpBounds, parentAppBounds, parentBounds);
// If the out bounds is not empty, it means the activity cannot fill parent's app bounds,
// then they should be aligned later in #updateResolvedBoundsPosition()
if (!mTmpBounds.isEmpty()) {
@@ -9299,7 +9123,8 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
// restrict, the bounds should be the requested override bounds.
mResolveConfigHint.mTmpOverrideDisplayInfo = getFixedRotationTransformDisplayInfo();
computeConfigByResolveHint(resolvedConfig, newParentConfiguration);
- mLetterboxBoundsForAspectRatio = new Rect(resolvedBounds);
+ mAppCompatController.getAppCompatAspectRatioPolicy()
+ .setLetterboxBoundsForAspectRatio(new Rect(resolvedBounds));
}
}
@@ -9317,7 +9142,10 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
// activity will be displayed within them even if it is in size compat mode. They should be
// saved here before resolved bounds are overridden below.
final boolean useResolvedBounds = Flags.immersiveAppRepositioning()
- ? isAspectRatioApplied() : isLetterboxedForFixedOrientationAndAspectRatio();
+ ? mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isAspectRatioApplied()
+ : mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio();
final Rect containerBounds = useResolvedBounds
? new Rect(resolvedBounds)
: newParentConfiguration.windowConfiguration.getBounds();
@@ -9361,8 +9189,9 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
resolvedBounds.set(containingBounds);
// The size of floating task is fixed (only swap), so the aspect ratio is already correct.
if (!compatDisplayInsets.mIsFloating) {
- mIsAspectRatioApplied =
- applyAspectRatio(resolvedBounds, containingAppBounds, containingBounds);
+ mAppCompatController.getAppCompatAspectRatioPolicy()
+ .applyAspectRatioForLetterbox(resolvedBounds, containingAppBounds,
+ containingBounds);
}
// Use resolvedBounds to compute other override configurations such as appBounds. The bounds
@@ -9447,18 +9276,24 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
}
void updateSizeCompatScale(Rect resolvedAppBounds, Rect containerAppBounds) {
- // Only allow to scale down.
mSizeCompatScale = mAppCompatController.getTransparentPolicy()
.findOpaqueNotFinishingActivityBelow()
.map(activityRecord -> activityRecord.mSizeCompatScale)
- .orElseGet(() -> {
- final int contentW = resolvedAppBounds.width();
- final int contentH = resolvedAppBounds.height();
- final int viewportW = containerAppBounds.width();
- final int viewportH = containerAppBounds.height();
- return (contentW <= viewportW && contentH <= viewportH) ? 1f : Math.min(
- (float) viewportW / contentW, (float) viewportH / contentH);
- });
+ .orElseGet(() -> calculateSizeCompatScale(resolvedAppBounds, containerAppBounds));
+ }
+
+ private float calculateSizeCompatScale(Rect resolvedAppBounds, Rect containerAppBounds) {
+ final int contentW = resolvedAppBounds.width();
+ final int contentH = resolvedAppBounds.height();
+ final int viewportW = containerAppBounds.width();
+ final int viewportH = containerAppBounds.height();
+ // Allow an application to be up-scaled if its window is smaller than its
+ // original container or if it's a freeform window in desktop mode.
+ boolean shouldAllowUpscaling = !(contentW <= viewportW && contentH <= viewportH)
+ || (canEnterDesktopMode(mAtmService.mContext)
+ && getWindowingMode() == WINDOWING_MODE_FREEFORM);
+ return shouldAllowUpscaling ? Math.min(
+ (float) viewportW / contentW, (float) viewportH / contentH) : 1f;
}
private boolean isInSizeCompatModeForBounds(final Rect appBounds, final Rect containerBounds) {
@@ -9766,190 +9601,15 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
return mPauseConfigurationDispatchCount > 0;
}
- private boolean applyAspectRatio(Rect outBounds, Rect containingAppBounds,
- Rect containingBounds) {
- return applyAspectRatio(outBounds, containingAppBounds, containingBounds,
- 0 /* desiredAspectRatio */);
- }
-
- /**
- * Applies aspect ratio restrictions to outBounds. If no restrictions, then no change is
- * made to outBounds.
- *
- * @return {@code true} if aspect ratio restrictions were applied.
- */
- // TODO(b/36505427): Consider moving this method and similar ones to ConfigurationContainer.
- private boolean applyAspectRatio(Rect outBounds, Rect containingAppBounds,
- Rect containingBounds, float desiredAspectRatio) {
- final float maxAspectRatio = getMaxAspectRatio();
- final Task rootTask = getRootTask();
- final float minAspectRatio = getMinAspectRatio();
- final TaskFragment organizedTf = getOrganizedTaskFragment();
- float aspectRatioToApply = desiredAspectRatio;
- if (task == null || rootTask == null
- || (maxAspectRatio < 1 && minAspectRatio < 1 && aspectRatioToApply < 1)
- // Don't set aspect ratio if we are in VR mode.
- || isInVrUiMode(getConfiguration())
- // TODO(b/232898850): Always respect aspect ratio requests.
- // Don't set aspect ratio for activity in ActivityEmbedding split.
- || (organizedTf != null && !organizedTf.fillsParent())) {
- return false;
- }
-
- final int containingAppWidth = containingAppBounds.width();
- final int containingAppHeight = containingAppBounds.height();
- final float containingRatio = computeAspectRatio(containingAppBounds);
-
- if (aspectRatioToApply < 1) {
- aspectRatioToApply = containingRatio;
- }
-
- if (maxAspectRatio >= 1 && aspectRatioToApply > maxAspectRatio) {
- aspectRatioToApply = maxAspectRatio;
- } else if (minAspectRatio >= 1 && aspectRatioToApply < minAspectRatio) {
- aspectRatioToApply = minAspectRatio;
- }
-
- int activityWidth = containingAppWidth;
- int activityHeight = containingAppHeight;
-
- if (containingRatio - aspectRatioToApply > ASPECT_RATIO_ROUNDING_TOLERANCE) {
- if (containingAppWidth < containingAppHeight) {
- // Width is the shorter side, so we use that to figure-out what the max. height
- // should be given the aspect ratio.
- activityHeight = (int) ((activityWidth * aspectRatioToApply) + 0.5f);
- } else {
- // Height is the shorter side, so we use that to figure-out what the max. width
- // should be given the aspect ratio.
- activityWidth = (int) ((activityHeight * aspectRatioToApply) + 0.5f);
- }
- } else if (aspectRatioToApply - containingRatio > ASPECT_RATIO_ROUNDING_TOLERANCE) {
- boolean adjustWidth;
- switch (getRequestedConfigurationOrientation()) {
- case ORIENTATION_LANDSCAPE:
- // Width should be the longer side for this landscape app, so we use the width
- // to figure-out what the max. height should be given the aspect ratio.
- adjustWidth = false;
- break;
- case ORIENTATION_PORTRAIT:
- // Height should be the longer side for this portrait app, so we use the height
- // to figure-out what the max. width should be given the aspect ratio.
- adjustWidth = true;
- break;
- default:
- // This app doesn't have a preferred orientation, so we keep the length of the
- // longer side, and use it to figure-out the length of the shorter side.
- if (containingAppWidth < containingAppHeight) {
- // Width is the shorter side, so we use the height to figure-out what the
- // max. width should be given the aspect ratio.
- adjustWidth = true;
- } else {
- // Height is the shorter side, so we use the width to figure-out what the
- // max. height should be given the aspect ratio.
- adjustWidth = false;
- }
- break;
- }
- if (adjustWidth) {
- activityWidth = (int) ((activityHeight / aspectRatioToApply) + 0.5f);
- } else {
- activityHeight = (int) ((activityWidth / aspectRatioToApply) + 0.5f);
- }
- }
-
- if (containingAppWidth <= activityWidth && containingAppHeight <= activityHeight) {
- // The display matches or is less than the activity aspect ratio, so nothing else to do.
- return false;
- }
-
- // Compute configuration based on max or min supported width and height.
- // Also account for the insets (e.g. display cutouts, navigation bar), which will be
- // clipped away later in {@link Task#computeConfigResourceOverrides()}, i.e., the out
- // bounds are the app bounds restricted by aspect ratio + clippable insets. Otherwise,
- // the app bounds would end up too small. To achieve this we will also add clippable insets
- // when the corresponding dimension fully fills the parent
-
- int right = activityWidth + containingAppBounds.left;
- int left = containingAppBounds.left;
- if (right >= containingAppBounds.right) {
- right = containingBounds.right;
- left = containingBounds.left;
- }
- int bottom = activityHeight + containingAppBounds.top;
- int top = containingAppBounds.top;
- if (bottom >= containingAppBounds.bottom) {
- bottom = containingBounds.bottom;
- top = containingBounds.top;
- }
- outBounds.set(left, top, right, bottom);
- return true;
- }
-
/**
* Returns the min aspect ratio of this activity.
*/
float getMinAspectRatio() {
- if (mAppCompatController.getTransparentPolicy().isRunning()) {
- return mAppCompatController.getTransparentPolicy().getInheritedMinAspectRatio();
- }
- if (info.applicationInfo == null) {
- return info.getMinAspectRatio();
- }
- if (mLetterboxUiController.shouldApplyUserMinAspectRatioOverride()) {
- return mLetterboxUiController.getUserMinAspectRatio();
- }
- if (!mLetterboxUiController.shouldOverrideMinAspectRatio()
- && !mAppCompatController.getAppCompatCameraOverrides()
- .shouldOverrideMinAspectRatioForCamera()) {
- return info.getMinAspectRatio();
- }
- if (info.isChangeEnabled(OVERRIDE_MIN_ASPECT_RATIO_PORTRAIT_ONLY)
- && !ActivityInfo.isFixedOrientationPortrait(
- getOverrideOrientation())) {
- return info.getMinAspectRatio();
- }
-
- if (info.isChangeEnabled(OVERRIDE_MIN_ASPECT_RATIO_EXCLUDE_PORTRAIT_FULLSCREEN)
- && isParentFullscreenPortrait()) {
- // We are using the parent configuration here as this is the most recent one that gets
- // passed to onConfigurationChanged when a relevant change takes place
- return info.getMinAspectRatio();
- }
-
- if (info.isChangeEnabled(OVERRIDE_MIN_ASPECT_RATIO_TO_ALIGN_WITH_SPLIT_SCREEN)) {
- return Math.max(mLetterboxUiController.getSplitScreenAspectRatio(),
- info.getMinAspectRatio());
- }
-
- if (info.isChangeEnabled(OVERRIDE_MIN_ASPECT_RATIO_LARGE)) {
- return Math.max(ActivityInfo.OVERRIDE_MIN_ASPECT_RATIO_LARGE_VALUE,
- info.getMinAspectRatio());
- }
-
- if (info.isChangeEnabled(OVERRIDE_MIN_ASPECT_RATIO_MEDIUM)) {
- return Math.max(ActivityInfo.OVERRIDE_MIN_ASPECT_RATIO_MEDIUM_VALUE,
- info.getMinAspectRatio());
- }
-
- if (info.isChangeEnabled(OVERRIDE_MIN_ASPECT_RATIO_SMALL)) {
- return Math.max(ActivityInfo.OVERRIDE_MIN_ASPECT_RATIO_SMALL_VALUE,
- info.getMinAspectRatio());
- }
- return info.getMinAspectRatio();
- }
-
- private boolean isParentFullscreenPortrait() {
- final WindowContainer parent = getParent();
- return parent != null
- && parent.getConfiguration().orientation == ORIENTATION_PORTRAIT
- && parent.getWindowConfiguration().getWindowingMode() == WINDOWING_MODE_FULLSCREEN;
+ return mAppCompatController.getAppCompatAspectRatioPolicy().getMinAspectRatio();
}
float getMaxAspectRatio() {
- if (mAppCompatController.getTransparentPolicy().isRunning()) {
- return mAppCompatController.getTransparentPolicy().getInheritedMaxAspectRatio();
- }
- return info.getMaxAspectRatio();
+ return mAppCompatController.getAppCompatAspectRatioPolicy().getMaxAspectRatio();
}
/**
@@ -9960,18 +9620,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
}
/**
- * Returns the aspect ratio of the given {@code rect}.
- */
- static float computeAspectRatio(Rect rect) {
- final int width = rect.width();
- final int height = rect.height();
- if (width == 0 || height == 0) {
- return 0;
- }
- return Math.max(width, height) / (float) Math.min(width, height);
- }
-
- /**
* @return {@code true} if this activity was reparented to another display but
* {@link #ensureActivityConfiguration} is not called.
*/
@@ -10059,8 +9707,8 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
// the combine configurations are equal, but would otherwise differ in the override config
mTmpConfig.setTo(mLastReportedConfiguration.getMergedConfiguration());
final ActivityWindowInfo newActivityWindowInfo = getActivityWindowInfo();
- final boolean isActivityWindowInfoChanged = Flags.activityWindowInfoFlag()
- && !mLastReportedActivityWindowInfo.equals(newActivityWindowInfo);
+ final boolean isActivityWindowInfoChanged =
+ !mLastReportedActivityWindowInfo.equals(newActivityWindowInfo);
if (!displayChanged && !isActivityWindowInfoChanged
&& getConfiguration().equals(mTmpConfig)) {
ProtoLog.v(WM_DEBUG_CONFIGURATION, "Configuration & display "
@@ -10197,6 +9845,15 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
*/
private boolean shouldRelaunchLocked(int changes, Configuration changesConfig) {
int configChanged = info.getRealConfigChanged();
+ if (android.content.res.Flags.handleAllConfigChanges()) {
+ if ((configChanged & CONFIG_RESOURCES_UNUSED) != 0) {
+ // Don't relaunch any activities that claim they do not use resources at all.
+ // If they still do, the onConfigurationChanged() callback will get called to
+ // let them know anyway.
+ return false;
+ }
+ }
+
boolean onlyVrUiModeChanged = onlyVrUiModeChanged(changes, changesConfig);
// Override for apps targeting pre-O sdks
@@ -10225,8 +9882,8 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
*/
private boolean onlyVrUiModeChanged(int changes, Configuration lastReportedConfig) {
final Configuration currentConfig = getConfiguration();
- return changes == CONFIG_UI_MODE && (isInVrUiMode(currentConfig)
- != isInVrUiMode(lastReportedConfig));
+ return changes == CONFIG_UI_MODE && (AppCompatUtils.isInVrUiMode(currentConfig)
+ != AppCompatUtils.isInVrUiMode(lastReportedConfig));
}
/**
@@ -10598,10 +10255,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
return r;
}
- private static boolean isInVrUiMode(Configuration config) {
- return (config.uiMode & UI_MODE_TYPE_MASK) == UI_MODE_TYPE_VR_HEADSET;
- }
-
private static boolean isInDeskUiMode(Configuration config) {
return (config.uiMode & UI_MODE_TYPE_MASK) == UI_MODE_TYPE_DESK;
}
@@ -10825,16 +10478,19 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
mAppCompatController.getAppCompatCameraOverrides()
.shouldRefreshActivityViaPauseForCameraCompat());
proto.write(SHOULD_OVERRIDE_MIN_ASPECT_RATIO,
- mLetterboxUiController.shouldOverrideMinAspectRatio());
+ mAppCompatController.getAppCompatAspectRatioOverrides()
+ .shouldOverrideMinAspectRatio());
proto.write(SHOULD_IGNORE_ORIENTATION_REQUEST_LOOP,
mAppCompatController.getAppCompatOrientationOverrides()
.shouldIgnoreOrientationRequestLoop());
proto.write(SHOULD_OVERRIDE_FORCE_RESIZE_APP,
mLetterboxUiController.shouldOverrideForceResizeApp());
proto.write(SHOULD_ENABLE_USER_ASPECT_RATIO_SETTINGS,
- mLetterboxUiController.shouldEnableUserAspectRatioSettings());
+ mAppCompatController.getAppCompatAspectRatioOverrides()
+ .shouldEnableUserAspectRatioSettings());
proto.write(IS_USER_FULLSCREEN_OVERRIDE_ENABLED,
- mLetterboxUiController.isUserFullscreenOverrideEnabled());
+ mAppCompatController.getAppCompatAspectRatioOverrides()
+ .isUserFullscreenOverrideEnabled());
}
@Override
diff --git a/services/core/java/com/android/server/wm/ActivityRefresher.java b/services/core/java/com/android/server/wm/ActivityRefresher.java
index 0c32dfcf6d43..bc822718d45a 100644
--- a/services/core/java/com/android/server/wm/ActivityRefresher.java
+++ b/services/core/java/com/android/server/wm/ActivityRefresher.java
@@ -75,7 +75,7 @@ class ActivityRefresher {
}
final boolean cycleThroughStop =
- mWmService.mLetterboxConfiguration
+ mWmService.mAppCompatConfiguration
.isCameraCompatRefreshCycleThroughStopEnabled()
&& !activity.mAppCompatController.getAppCompatCameraOverrides()
.shouldRefreshActivityViaPauseForCameraCompat();
@@ -114,7 +114,7 @@ class ActivityRefresher {
private boolean shouldRefreshActivity(@NonNull ActivityRecord activity,
@NonNull Configuration newConfig, @NonNull Configuration lastReportedConfig) {
- return mWmService.mLetterboxConfiguration.isCameraCompatRefreshEnabled()
+ return mWmService.mAppCompatConfiguration.isCameraCompatRefreshEnabled()
&& activity.mAppCompatController.getAppCompatOverrides()
.getAppCompatCameraOverrides().shouldRefreshActivityForCameraCompat()
&& ArrayUtils.find(mEvaluators.toArray(), evaluator ->
diff --git a/services/core/java/com/android/server/wm/ActivitySnapshotController.java b/services/core/java/com/android/server/wm/ActivitySnapshotController.java
index 62fb4bfc74d7..48bc813b0a38 100644
--- a/services/core/java/com/android/server/wm/ActivitySnapshotController.java
+++ b/services/core/java/com/android/server/wm/ActivitySnapshotController.java
@@ -590,10 +590,8 @@ class ActivitySnapshotController extends AbsAppSnapshotController<ActivityRecord
return activity;
}
- @Override
- ActivityRecord getTopFullscreenActivity(ActivityRecord activity) {
- final WindowState win = activity.findMainWindow();
- return (win != null && win.mAttrs.isFullscreen()) ? activity : null;
+ WindowState getTopFullscreenWindow(ActivityRecord activity) {
+ return activity.findMainWindow();
}
@Override
diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerInternal.java b/services/core/java/com/android/server/wm/ActivityTaskManagerInternal.java
index c0881180af94..26a6b00254d3 100644
--- a/services/core/java/com/android/server/wm/ActivityTaskManagerInternal.java
+++ b/services/core/java/com/android/server/wm/ActivityTaskManagerInternal.java
@@ -145,13 +145,6 @@ public abstract class ActivityTaskManagerInternal {
void acquire(int displayId);
/**
- * Acquires a sleep token.
- * @param displayId The display to apply to.
- * @param isSwappingDisplay Whether the display is swapping to another physical display.
- */
- void acquire(int displayId, boolean isSwappingDisplay);
-
- /**
* Releases the sleep token.
* @param displayId The display to apply to.
*/
@@ -591,7 +584,7 @@ public abstract class ActivityTaskManagerInternal {
public abstract void clearLockedTasks(String reason);
public abstract void updateUserConfiguration();
- public abstract boolean canShowErrorDialogs();
+ public abstract boolean canShowErrorDialogs(int userId);
public abstract void setProfileApp(String profileApp);
public abstract void setProfileProc(WindowProcessController wpc);
diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
index ded205e5eafd..a84598dd73dc 100644
--- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
+++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
@@ -190,6 +190,7 @@ import android.content.pm.PackageManager;
import android.content.pm.PackageManagerInternal;
import android.content.pm.ParceledListSlice;
import android.content.pm.ResolveInfo;
+import android.content.pm.UserInfo;
import android.content.res.CompatibilityInfo;
import android.content.res.Configuration;
import android.content.res.Resources;
@@ -4709,6 +4710,10 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
// Update stored global config and notify everyone about the change.
mRootWindowContainer.onConfigurationChanged(mTempConfig);
Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER);
+ if ((changes & ActivityInfo.CONFIG_ORIENTATION) != 0) {
+ FrameworkStatsLog.write(FrameworkStatsLog.DEVICE_ORIENTATION_CHANGED,
+ values.orientation);
+ }
Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER);
return changes;
@@ -4895,14 +4900,21 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
* dialog / global actions also might want different behaviors.
*/
private void updateShouldShowDialogsLocked(Configuration config) {
+ mShowDialogs = shouldShowDialogs(config, /* checkUiMode= */ true);
+ }
+
+ private boolean shouldShowDialogs(Configuration config, boolean checkUiMode) {
final boolean inputMethodExists = !(config.keyboard == Configuration.KEYBOARD_NOKEYS
&& config.touchscreen == Configuration.TOUCHSCREEN_NOTOUCH
&& config.navigation == Configuration.NAVIGATION_NONAV);
final boolean hideDialogsSet = Settings.Global.getInt(mContext.getContentResolver(),
HIDE_ERROR_DIALOGS, 0) != 0;
- mShowDialogs = inputMethodExists
- && ActivityTaskManager.currentUiModeSupportsErrorDialogs(config)
- && !hideDialogsSet;
+ boolean showDialogs = inputMethodExists && !hideDialogsSet;
+ if (checkUiMode) {
+ showDialogs = showDialogs
+ && ActivityTaskManager.currentUiModeSupportsErrorDialogs(config);
+ }
+ return showDialogs;
}
private void updateFontScaleIfNeeded(@UserIdInt int userId) {
@@ -5056,16 +5068,10 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
@Override
public void acquire(int displayId) {
- acquire(displayId, false /* isSwappingDisplay */);
- }
-
- @Override
- public void acquire(int displayId, boolean isSwappingDisplay) {
synchronized (mGlobalLock) {
if (!mSleepTokens.contains(displayId)) {
mSleepTokens.append(displayId,
- mRootWindowContainer.createSleepToken(mTag, displayId,
- isSwappingDisplay));
+ mRootWindowContainer.createSleepToken(mTag, displayId));
updateSleepIfNeededLocked();
}
}
@@ -5189,6 +5195,10 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
String hostingType) {
if (!mStartingProcessActivities.contains(activity)) {
mStartingProcessActivities.add(activity);
+ // Let the activity with higher z-order be started first.
+ if (mStartingProcessActivities.size() > 1) {
+ mStartingProcessActivities.sort(null /* by WindowContainer#compareTo */);
+ }
} else if (mProcessNames.get(
activity.processName, activity.info.applicationInfo.uid) != null) {
// The process is already starting. Wait for it to attach.
@@ -7146,15 +7156,67 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
}
@Override
- public boolean canShowErrorDialogs() {
+ public boolean canShowErrorDialogs(int userId) {
synchronized (mGlobalLock) {
- return mShowDialogs && !mSleeping && !mShuttingDown
+ final boolean showDialogs = mShowDialogs
+ || shouldShowDialogsForVisibleBackgroundUserLocked(userId);
+ final UserInfo userInfo = getUserManager().getUserInfo(userId);
+ if (userInfo == null) {
+ // Unable to retrieve user information. Returning false, assuming there is
+ // no valid user with the given id.
+ return false;
+ }
+ return showDialogs && !mSleeping && !mShuttingDown
&& !mKeyguardController.isKeyguardOrAodShowing(DEFAULT_DISPLAY)
- && !hasUserRestriction(UserManager.DISALLOW_SYSTEM_ERROR_DIALOGS,
- mAmInternal.getCurrentUserId())
+ && !hasUserRestriction(UserManager.DISALLOW_SYSTEM_ERROR_DIALOGS, userId)
&& !(UserManager.isDeviceInDemoMode(mContext)
- && mAmInternal.getCurrentUser().isDemo());
+ && userInfo.isDemo());
+ }
+ }
+
+ /**
+ * Checks if the given user is a visible background user, which is a full, background user
+ * assigned to secondary displays on the devices that have
+ * {@link UserManager#isVisibleBackgroundUsersEnabled()
+ * config_multiuserVisibleBackgroundUsers enabled} (for example, passenger users on
+ * automotive builds, using the display associated with their seats).
+ *
+ * @see UserManager#isUserVisible()
+ */
+ private boolean isVisibleBackgroundUser(int userId) {
+ if (!UserManager.isVisibleBackgroundUsersEnabled()) {
+ return false;
+ }
+ boolean isForeground = getCurrentUserId() == userId;
+ boolean isProfile = getUserManager().isProfile(userId);
+ boolean isVisible = mWindowManager.mUmInternal.isUserVisible(userId);
+ return isVisible && !isForeground && !isProfile;
+ }
+
+ /**
+ * In a car environment, {@link ActivityTaskManagerService#mShowDialogs} is always set to
+ * {@code false} from {@link ActivityTaskManagerService#updateShouldShowDialogsLocked}
+ * because its UI mode is {@link Configuration#UI_MODE_TYPE_CAR}. Thus, error dialogs are
+ * not displayed when an ANR or a crash occurs. However, in the automotive multi-user
+ * multi-display environment, this can confuse the passenger users and leave them
+ * uninformed when an app is terminated by the ANR or crash without any notification.
+ * To address this, error dialogs are allowed for the passenger users who have UI access
+ * on assigned displays (a.k.a. visible background users) on devices that have
+ * config_multiuserVisibleBackgroundUsers enabled even though the UI mode is
+ * {@link Configuration#UI_MODE_TYPE_CAR}.
+ *
+ * @see ActivityTaskManagerService#updateShouldShowDialogsLocked
+ */
+ private boolean shouldShowDialogsForVisibleBackgroundUserLocked(int userId) {
+ if (!isVisibleBackgroundUser(userId)) {
+ return false;
+ }
+ final int displayId = mWindowManager.mUmInternal.getMainDisplayAssignedToUser(userId);
+ final DisplayContent dc = mRootWindowContainer.getDisplayContent(displayId);
+ if (dc == null) {
+ return false;
}
+ return shouldShowDialogs(dc.getConfiguration(), /* checkUiMode= */ false);
}
@Override
diff --git a/services/core/java/com/android/server/wm/ActivityTaskSupervisor.java b/services/core/java/com/android/server/wm/ActivityTaskSupervisor.java
index 00b6453b2484..e81b440f6d6d 100644
--- a/services/core/java/com/android/server/wm/ActivityTaskSupervisor.java
+++ b/services/core/java/com/android/server/wm/ActivityTaskSupervisor.java
@@ -38,6 +38,7 @@ import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM;
import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED;
import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED;
+import static android.content.Intent.ACTION_VIEW;
import static android.content.pm.PackageManager.NOTIFY_PACKAGE_USE_ACTIVITY;
import static android.content.pm.PackageManager.PERMISSION_DENIED;
import static android.content.pm.PackageManager.PERMISSION_GRANTED;
@@ -121,6 +122,7 @@ import android.content.res.Configuration;
import android.graphics.Rect;
import android.hardware.SensorPrivacyManager;
import android.hardware.SensorPrivacyManagerInternal;
+import android.net.Uri;
import android.os.Binder;
import android.os.Build;
import android.os.Bundle;
@@ -142,6 +144,7 @@ import android.util.Slog;
import android.util.SparseArray;
import android.util.SparseIntArray;
import android.view.Display;
+import android.webkit.URLUtil;
import android.window.ActivityWindowInfo;
import com.android.internal.R;
@@ -158,6 +161,7 @@ import com.android.server.am.UserState;
import com.android.server.pm.SaferIntentUtils;
import com.android.server.utils.Slogf;
import com.android.server.wm.ActivityMetricsLogger.LaunchingState;
+import com.android.window.flags.Flags;
import java.io.FileDescriptor;
import java.io.PrintWriter;
@@ -189,9 +193,6 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks {
// How long we can hold the launch wake lock before giving up.
private static final int LAUNCH_TIMEOUT = 10 * 1000 * Build.HW_TIMEOUT_MULTIPLIER;
- // How long we delay processing the stopping and finishing activities.
- private static final int SCHEDULE_FINISHING_STOPPING_ACTIVITY_MS = 200;
-
/** How long we wait until giving up on the activity telling us it released the top state. */
private static final int TOP_RESUMED_STATE_LOSS_TIMEOUT = 500;
@@ -2093,7 +2094,6 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks {
boolean processPausingActivities, String reason) {
// Stop any activities that are scheduled to do so but have been waiting for the transition
// animation to finish.
- boolean displaySwapping = false;
ArrayList<ActivityRecord> readyToStopActivities = null;
for (int i = 0; i < mStoppingActivities.size(); i++) {
final ActivityRecord s = mStoppingActivities.get(i);
@@ -2101,10 +2101,9 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks {
// send onStop before any configuration change when removing pip transition is ongoing.
final boolean animating = s.isInTransition()
&& s.getTask() != null && !s.getTask().isForceHidden();
- displaySwapping |= s.isDisplaySleepingAndSwapping();
ProtoLog.v(WM_DEBUG_STATES, "Stopping %s: nowVisible=%b animating=%b "
+ "finishing=%s", s, s.nowVisible, animating, s.finishing);
- if ((!animating && !displaySwapping) || mService.mShuttingDown
+ if (!animating || mService.mShuttingDown
|| s.getRootTask().isForceHiddenForPinnedTask()) {
if (!processPausingActivities && s.isState(PAUSING)) {
// Defer processing pausing activities in this iteration and reschedule
@@ -2125,16 +2124,6 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks {
}
}
- // Stopping activities are deferred processing if the display is swapping. Check again
- // later to ensure the stopping activities can be stopped after display swapped.
- if (displaySwapping) {
- mHandler.postDelayed(() -> {
- synchronized (mService.mGlobalLock) {
- scheduleProcessStoppingAndFinishingActivitiesIfNeeded();
- }
- }, SCHEDULE_FINISHING_STOPPING_ACTIVITY_MS);
- }
-
final int numReadyStops = readyToStopActivities == null ? 0 : readyToStopActivities.size();
for (int i = 0; i < numReadyStops; i++) {
final ActivityRecord r = readyToStopActivities.get(i);
@@ -2915,6 +2904,9 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks {
@Override
public void accept(ActivityRecord r) {
+ if (Flags.enableDesktopWindowingAppToWeb() && mInfo.capturedLink == null) {
+ setCapturedLink(r);
+ }
if (r.mLaunchCookie != null) {
mInfo.addLaunchCookie(r.mLaunchCookie);
}
@@ -2927,6 +2919,16 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks {
mTopRunning = r;
}
}
+
+ private void setCapturedLink(ActivityRecord r) {
+ final Uri uri = r.intent.getData();
+ if (uri == null || !ACTION_VIEW.equals(r.intent.getAction())
+ || !URLUtil.isNetworkUrl(uri.toString())) {
+ return;
+ }
+ mInfo.capturedLink = uri;
+ mInfo.capturedLinkTimestamp = r.lastLaunchTime;
+ }
}
/**
diff --git a/services/core/java/com/android/server/wm/AppCompatAspectRatioOverrides.java b/services/core/java/com/android/server/wm/AppCompatAspectRatioOverrides.java
new file mode 100644
index 000000000000..05d4c821c161
--- /dev/null
+++ b/services/core/java/com/android/server/wm/AppCompatAspectRatioOverrides.java
@@ -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.server.wm;
+
+import static android.content.pm.ActivityInfo.OVERRIDE_ANY_ORIENTATION_TO_USER;
+import static android.content.pm.ActivityInfo.OVERRIDE_MIN_ASPECT_RATIO;
+import static android.content.pm.ActivityInfo.isFixedOrientationLandscape;
+import static android.content.pm.PackageManager.USER_MIN_ASPECT_RATIO_16_9;
+import static android.content.pm.PackageManager.USER_MIN_ASPECT_RATIO_3_2;
+import static android.content.pm.PackageManager.USER_MIN_ASPECT_RATIO_4_3;
+import static android.content.pm.PackageManager.USER_MIN_ASPECT_RATIO_APP_DEFAULT;
+import static android.content.pm.PackageManager.USER_MIN_ASPECT_RATIO_DISPLAY_SIZE;
+import static android.content.pm.PackageManager.USER_MIN_ASPECT_RATIO_FULLSCREEN;
+import static android.content.pm.PackageManager.USER_MIN_ASPECT_RATIO_SPLIT_SCREEN;
+import static android.content.pm.PackageManager.USER_MIN_ASPECT_RATIO_UNSET;
+import static android.view.WindowManager.PROPERTY_COMPAT_ALLOW_MIN_ASPECT_RATIO_OVERRIDE;
+import static android.view.WindowManager.PROPERTY_COMPAT_ALLOW_ORIENTATION_OVERRIDE;
+import static android.view.WindowManager.PROPERTY_COMPAT_ALLOW_USER_ASPECT_RATIO_FULLSCREEN_OVERRIDE;
+import static android.view.WindowManager.PROPERTY_COMPAT_ALLOW_USER_ASPECT_RATIO_OVERRIDE;
+
+import static com.android.server.wm.ActivityTaskManagerDebugConfig.TAG_ATM;
+import static com.android.server.wm.ActivityTaskManagerDebugConfig.TAG_WITH_CLASS_NAME;
+import static com.android.server.wm.AppCompatConfiguration.LETTERBOX_POSITION_MULTIPLIER_CENTER;
+import static com.android.server.wm.AppCompatConfiguration.MIN_FIXED_ORIENTATION_LETTERBOX_ASPECT_RATIO;
+
+import android.annotation.NonNull;
+import android.content.pm.PackageManager;
+import android.content.res.Configuration;
+import android.content.res.Resources;
+import android.graphics.Rect;
+import android.os.RemoteException;
+import android.util.Slog;
+
+import com.android.internal.R;
+import com.android.internal.annotations.VisibleForTesting;
+import com.android.server.wm.utils.OptPropFactory;
+
+import java.util.function.Function;
+
+/**
+ * Encapsulates app compat configurations and overrides related to aspect ratio.
+ */
+class AppCompatAspectRatioOverrides {
+
+ private static final String TAG =
+ TAG_WITH_CLASS_NAME ? "AppCompatAspectRatioOverrides" : TAG_ATM;
+
+ @NonNull
+ private final ActivityRecord mActivityRecord;
+ @NonNull
+ private final AppCompatConfiguration mAppCompatConfiguration;
+ @NonNull
+ private final UserAspectRatioState mUserAspectRatioState;
+
+ @NonNull
+ private final OptPropFactory.OptProp mAllowMinAspectRatioOverrideOptProp;
+ @NonNull
+ private final OptPropFactory.OptProp mAllowUserAspectRatioOverrideOptProp;
+ @NonNull
+ private final OptPropFactory.OptProp mAllowUserAspectRatioFullscreenOverrideOptProp;
+ @NonNull
+ private final OptPropFactory.OptProp mAllowOrientationOverrideOptProp;
+ @NonNull
+ private final Function<Boolean, Boolean> mIsDisplayFullScreenAndInPostureProvider;
+ @NonNull
+ private final Function<Configuration, Float> mGetHorizontalPositionMultiplierProvider;
+
+ AppCompatAspectRatioOverrides(@NonNull ActivityRecord activityRecord,
+ @NonNull AppCompatConfiguration appCompatConfiguration,
+ @NonNull OptPropFactory optPropBuilder,
+ @NonNull Function<Boolean, Boolean> isDisplayFullScreenAndInPostureProvider,
+ @NonNull Function<Configuration, Float> getHorizontalPositionMultiplierProvider) {
+ mActivityRecord = activityRecord;
+ mAppCompatConfiguration = appCompatConfiguration;
+ mUserAspectRatioState = new UserAspectRatioState();
+ mIsDisplayFullScreenAndInPostureProvider = isDisplayFullScreenAndInPostureProvider;
+ mGetHorizontalPositionMultiplierProvider = getHorizontalPositionMultiplierProvider;
+ mAllowMinAspectRatioOverrideOptProp = optPropBuilder.create(
+ PROPERTY_COMPAT_ALLOW_MIN_ASPECT_RATIO_OVERRIDE);
+ mAllowUserAspectRatioOverrideOptProp = optPropBuilder.create(
+ PROPERTY_COMPAT_ALLOW_USER_ASPECT_RATIO_OVERRIDE,
+ mAppCompatConfiguration::isUserAppAspectRatioSettingsEnabled);
+ mAllowUserAspectRatioFullscreenOverrideOptProp = optPropBuilder.create(
+ PROPERTY_COMPAT_ALLOW_USER_ASPECT_RATIO_FULLSCREEN_OVERRIDE,
+ mAppCompatConfiguration::isUserAppAspectRatioFullscreenEnabled);
+ mAllowOrientationOverrideOptProp = optPropBuilder.create(
+ PROPERTY_COMPAT_ALLOW_ORIENTATION_OVERRIDE);
+ }
+
+ /**
+ * Whether we should apply the min aspect ratio per-app override. When this override is applied
+ * the min aspect ratio given in the app's manifest will be overridden to the largest enabled
+ * aspect ratio treatment unless the app's manifest value is higher. The treatment will also
+ * apply if no value is provided in the manifest.
+ *
+ * <p>This method returns {@code true} when the following conditions are met:
+ * <ul>
+ * <li>Opt-out component property isn't enabled
+ * <li>Per-app override is enabled
+ * </ul>
+ */
+ boolean shouldOverrideMinAspectRatio() {
+ return mAllowMinAspectRatioOverrideOptProp.shouldEnableWithOptInOverrideAndOptOutProperty(
+ isCompatChangeEnabled(OVERRIDE_MIN_ASPECT_RATIO));
+ }
+
+ /**
+ * Whether we should apply the user aspect ratio override to the min aspect ratio for the
+ * current app.
+ */
+ boolean shouldApplyUserMinAspectRatioOverride() {
+ if (!shouldEnableUserAspectRatioSettings()) {
+ return false;
+ }
+
+ mUserAspectRatioState.mUserAspectRatio = getUserMinAspectRatioOverrideCode();
+
+ return mUserAspectRatioState.mUserAspectRatio != USER_MIN_ASPECT_RATIO_UNSET
+ && mUserAspectRatioState.mUserAspectRatio != USER_MIN_ASPECT_RATIO_APP_DEFAULT
+ && mUserAspectRatioState.mUserAspectRatio != USER_MIN_ASPECT_RATIO_FULLSCREEN;
+ }
+
+ boolean shouldApplyUserFullscreenOverride() {
+ if (isUserFullscreenOverrideEnabled()) {
+ mUserAspectRatioState.mUserAspectRatio = getUserMinAspectRatioOverrideCode();
+
+ return mUserAspectRatioState.mUserAspectRatio == USER_MIN_ASPECT_RATIO_FULLSCREEN;
+ }
+
+ return false;
+ }
+
+ boolean isUserFullscreenOverrideEnabled() {
+ if (mAllowUserAspectRatioOverrideOptProp.isFalse()
+ || mAllowUserAspectRatioFullscreenOverrideOptProp.isFalse()
+ || !mAppCompatConfiguration.isUserAppAspectRatioFullscreenEnabled()) {
+ return false;
+ }
+ return true;
+ }
+
+ boolean isSystemOverrideToFullscreenEnabled() {
+ return isCompatChangeEnabled(OVERRIDE_ANY_ORIENTATION_TO_USER)
+ && !mAllowOrientationOverrideOptProp.isFalse()
+ && (mUserAspectRatioState.mUserAspectRatio == USER_MIN_ASPECT_RATIO_UNSET
+ || mUserAspectRatioState.mUserAspectRatio == USER_MIN_ASPECT_RATIO_FULLSCREEN);
+ }
+
+ /**
+ * Whether we should enable users to resize the current app.
+ */
+ boolean shouldEnableUserAspectRatioSettings() {
+ // We use mBooleanPropertyAllowUserAspectRatioOverride to allow apps to opt-out which has
+ // effect only if explicitly false. If mBooleanPropertyAllowUserAspectRatioOverride is null,
+ // the current app doesn't opt-out so the first part of the predicate is true.
+ return !mAllowUserAspectRatioOverrideOptProp.isFalse()
+ && mAppCompatConfiguration.isUserAppAspectRatioSettingsEnabled()
+ && mActivityRecord.mDisplayContent != null
+ && mActivityRecord.mDisplayContent.getIgnoreOrientationRequest();
+ }
+
+ boolean hasFullscreenOverride() {
+ // `mUserAspectRatio` is always initialized first in `shouldApplyUserFullscreenOverride()`.
+ return shouldApplyUserFullscreenOverride() || isSystemOverrideToFullscreenEnabled();
+ }
+
+ float getUserMinAspectRatio() {
+ switch (mUserAspectRatioState.mUserAspectRatio) {
+ case USER_MIN_ASPECT_RATIO_DISPLAY_SIZE:
+ return getDisplaySizeMinAspectRatio();
+ case USER_MIN_ASPECT_RATIO_SPLIT_SCREEN:
+ return getSplitScreenAspectRatio();
+ case USER_MIN_ASPECT_RATIO_16_9:
+ return 16 / 9f;
+ case USER_MIN_ASPECT_RATIO_4_3:
+ return 4 / 3f;
+ case USER_MIN_ASPECT_RATIO_3_2:
+ return 3 / 2f;
+ default:
+ throw new AssertionError("Unexpected user min aspect ratio override: "
+ + mUserAspectRatioState.mUserAspectRatio);
+ }
+ }
+
+ float getSplitScreenAspectRatio() {
+ // Getting the same aspect ratio that apps get in split screen.
+ final DisplayArea displayArea = mActivityRecord.getDisplayArea();
+ if (displayArea == null) {
+ return getDefaultMinAspectRatioForUnresizableApps();
+ }
+ int dividerWindowWidth =
+ getResources().getDimensionPixelSize(R.dimen.docked_stack_divider_thickness);
+ int dividerInsets =
+ getResources().getDimensionPixelSize(R.dimen.docked_stack_divider_insets);
+ int dividerSize = dividerWindowWidth - dividerInsets * 2;
+ final Rect bounds = new Rect(displayArea.getWindowConfiguration().getAppBounds());
+ if (bounds.width() >= bounds.height()) {
+ bounds.inset(/* dx */ dividerSize / 2, /* dy */ 0);
+ bounds.right = bounds.centerX();
+ } else {
+ bounds.inset(/* dx */ 0, /* dy */ dividerSize / 2);
+ bounds.bottom = bounds.centerY();
+ }
+ return AppCompatUtils.computeAspectRatio(bounds);
+ }
+
+ float getFixedOrientationLetterboxAspectRatio(@NonNull Configuration parentConfiguration) {
+ return shouldUseSplitScreenAspectRatio(parentConfiguration)
+ ? getSplitScreenAspectRatio()
+ : mActivityRecord.shouldCreateCompatDisplayInsets()
+ ? getDefaultMinAspectRatioForUnresizableApps()
+ : getDefaultMinAspectRatio();
+ }
+
+ float getDefaultMinAspectRatioForUnresizableAppsFromConfig() {
+ return mAppCompatConfiguration.getDefaultMinAspectRatioForUnresizableApps();
+ }
+
+ boolean isSplitScreenAspectRatioForUnresizableAppsEnabled() {
+ return mAppCompatConfiguration.getIsSplitScreenAspectRatioForUnresizableAppsEnabled();
+ }
+
+ private float getDisplaySizeMinAspectRatio() {
+ final DisplayArea displayArea = mActivityRecord.getDisplayArea();
+ if (displayArea == null) {
+ return mActivityRecord.info.getMinAspectRatio();
+ }
+ final Rect bounds = new Rect(displayArea.getWindowConfiguration().getAppBounds());
+ return AppCompatUtils.computeAspectRatio(bounds);
+ }
+
+ private boolean shouldUseSplitScreenAspectRatio(@NonNull Configuration parentConfiguration) {
+ final boolean isBookMode = mIsDisplayFullScreenAndInPostureProvider
+ .apply(/* isTabletop */false);
+ final boolean isNotCenteredHorizontally = mGetHorizontalPositionMultiplierProvider.apply(
+ parentConfiguration) != LETTERBOX_POSITION_MULTIPLIER_CENTER;
+ final boolean isTabletopMode = mIsDisplayFullScreenAndInPostureProvider
+ .apply(/* isTabletop */ true);
+ final boolean isLandscape = isFixedOrientationLandscape(
+ mActivityRecord.getOverrideOrientation());
+ final AppCompatCameraOverrides cameraOverrides =
+ mActivityRecord.mAppCompatController.getAppCompatCameraOverrides();
+ final AppCompatCameraPolicy cameraPolicy =
+ mActivityRecord.mAppCompatController.getAppCompatCameraPolicy();
+ // Don't resize to split screen size when in book mode if letterbox position is centered
+ return (isBookMode && isNotCenteredHorizontally || isTabletopMode && isLandscape)
+ || cameraOverrides.isCameraCompatSplitScreenAspectRatioAllowed()
+ && (cameraPolicy != null
+ && cameraPolicy.isTreatmentEnabledForActivity(mActivityRecord));
+ }
+
+ @VisibleForTesting
+ int getUserMinAspectRatioOverrideCode() {
+ try {
+ return mActivityRecord.mAtmService.getPackageManager()
+ .getUserMinAspectRatio(mActivityRecord.packageName, mActivityRecord.mUserId);
+ } catch (RemoteException e) {
+ Slog.w(TAG, "Exception thrown retrieving aspect ratio user override " + this, e);
+ }
+ return mUserAspectRatioState.mUserAspectRatio;
+ }
+
+ private float getDefaultMinAspectRatioForUnresizableApps() {
+ if (!mAppCompatConfiguration.getIsSplitScreenAspectRatioForUnresizableAppsEnabled()
+ || mActivityRecord.getDisplayArea() == null) {
+ return mAppCompatConfiguration.getDefaultMinAspectRatioForUnresizableApps()
+ > MIN_FIXED_ORIENTATION_LETTERBOX_ASPECT_RATIO
+ ? mAppCompatConfiguration.getDefaultMinAspectRatioForUnresizableApps()
+ : getDefaultMinAspectRatio();
+ }
+
+ return getSplitScreenAspectRatio();
+ }
+
+ float getDefaultMinAspectRatio() {
+ if (mActivityRecord.getDisplayArea() == null
+ || !mAppCompatConfiguration
+ .getIsDisplayAspectRatioEnabledForFixedOrientationLetterbox()) {
+ return mAppCompatConfiguration.getFixedOrientationLetterboxAspectRatio();
+ }
+ return getDisplaySizeMinAspectRatio();
+ }
+
+ private static class UserAspectRatioState {
+ // TODO(b/315140179): Make mUserAspectRatio final
+ // The min aspect ratio override set by user
+ @PackageManager.UserMinAspectRatio
+ private int mUserAspectRatio = USER_MIN_ASPECT_RATIO_UNSET;
+ }
+
+ private boolean isCompatChangeEnabled(long overrideChangeId) {
+ return mActivityRecord.info.isChangeEnabled(overrideChangeId);
+ }
+
+ private Resources getResources() {
+ return mActivityRecord.mWmService.mContext.getResources();
+ }
+}
diff --git a/services/core/java/com/android/server/wm/AppCompatAspectRatioPolicy.java b/services/core/java/com/android/server/wm/AppCompatAspectRatioPolicy.java
new file mode 100644
index 000000000000..b23e75a0fbc2
--- /dev/null
+++ b/services/core/java/com/android/server/wm/AppCompatAspectRatioPolicy.java
@@ -0,0 +1,379 @@
+/*
+ * 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.server.wm;
+
+import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
+import static android.content.pm.ActivityInfo.OVERRIDE_MIN_ASPECT_RATIO_EXCLUDE_PORTRAIT_FULLSCREEN;
+import static android.content.pm.ActivityInfo.OVERRIDE_MIN_ASPECT_RATIO_LARGE;
+import static android.content.pm.ActivityInfo.OVERRIDE_MIN_ASPECT_RATIO_MEDIUM;
+import static android.content.pm.ActivityInfo.OVERRIDE_MIN_ASPECT_RATIO_PORTRAIT_ONLY;
+import static android.content.pm.ActivityInfo.OVERRIDE_MIN_ASPECT_RATIO_SMALL;
+import static android.content.pm.ActivityInfo.OVERRIDE_MIN_ASPECT_RATIO_TO_ALIGN_WITH_SPLIT_SCREEN;
+import static android.content.res.Configuration.ORIENTATION_LANDSCAPE;
+import static android.content.res.Configuration.ORIENTATION_PORTRAIT;
+
+import static com.android.server.wm.AppCompatConfiguration.DEFAULT_LETTERBOX_ASPECT_RATIO_FOR_MULTI_WINDOW;
+import static com.android.server.wm.AppCompatConfiguration.MIN_FIXED_ORIENTATION_LETTERBOX_ASPECT_RATIO;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.app.WindowConfiguration;
+import android.content.pm.ActivityInfo;
+import android.content.res.Configuration;
+import android.graphics.Rect;
+
+/**
+ * Encapsulate app compat policy logic related to aspect ratio.
+ */
+class AppCompatAspectRatioPolicy {
+
+ // Rounding tolerance to be used in aspect ratio computations
+ private static final float ASPECT_RATIO_ROUNDING_TOLERANCE = 0.005f;
+
+ @NonNull
+ private final ActivityRecord mActivityRecord;
+ @NonNull
+ private final TransparentPolicy mTransparentPolicy;
+ @NonNull
+ private final AppCompatOverrides mAppCompatOverrides;
+ @NonNull
+ private final AppCompatAspectRatioState mAppCompatAspectRatioState;
+
+ AppCompatAspectRatioPolicy(@NonNull ActivityRecord activityRecord,
+ @NonNull TransparentPolicy transparentPolicy,
+ @NonNull AppCompatOverrides appCompatOverrides) {
+ mActivityRecord = activityRecord;
+ mTransparentPolicy = transparentPolicy;
+ mAppCompatOverrides = appCompatOverrides;
+ mAppCompatAspectRatioState = new AppCompatAspectRatioState();
+ }
+
+ /**
+ * Starts the evaluation of app compat aspect ratio when a new configuration needs to be
+ * resolved.
+ */
+ void reset() {
+ mAppCompatAspectRatioState.reset();
+ }
+
+ float getDesiredAspectRatio(@NonNull Configuration newParentConfig,
+ @NonNull Rect parentBounds) {
+ final float letterboxAspectRatioOverride =
+ mAppCompatOverrides.getAppCompatAspectRatioOverrides()
+ .getFixedOrientationLetterboxAspectRatio(newParentConfig);
+ // Aspect ratio as suggested by the system. Apps requested mix/max aspect ratio will
+ // be respected in #applyAspectRatio.
+ if (isDefaultMultiWindowLetterboxAspectRatioDesired(newParentConfig)) {
+ return DEFAULT_LETTERBOX_ASPECT_RATIO_FOR_MULTI_WINDOW;
+ } else if (letterboxAspectRatioOverride > MIN_FIXED_ORIENTATION_LETTERBOX_ASPECT_RATIO) {
+ return letterboxAspectRatioOverride;
+ }
+ return AppCompatUtils.computeAspectRatio(parentBounds);
+ }
+
+ void applyDesiredAspectRatio(@NonNull Configuration newParentConfig, @NonNull Rect parentBounds,
+ @NonNull Rect resolvedBounds, @NonNull Rect containingBoundsWithInsets,
+ @NonNull Rect containingBounds) {
+ final float desiredAspectRatio = getDesiredAspectRatio(newParentConfig, parentBounds);
+ mAppCompatAspectRatioState.mIsAspectRatioApplied = applyAspectRatio(resolvedBounds,
+ containingBoundsWithInsets, containingBounds, desiredAspectRatio);
+ }
+
+ void applyAspectRatioForLetterbox(Rect outBounds, Rect containingAppBounds,
+ Rect containingBounds) {
+ mAppCompatAspectRatioState.mIsAspectRatioApplied = applyAspectRatio(outBounds,
+ containingAppBounds, containingBounds, 0 /* desiredAspectRatio */);
+ }
+
+ /**
+ * @return {@code true} when an app compat aspect ratio has been applied.
+ */
+ boolean isAspectRatioApplied() {
+ return mAppCompatAspectRatioState.mIsAspectRatioApplied;
+ }
+
+ /**
+ * Returns the min aspect ratio of this activity.
+ */
+ float getMinAspectRatio() {
+ if (mTransparentPolicy.isRunning()) {
+ return mTransparentPolicy.getInheritedMinAspectRatio();
+ }
+ final ActivityInfo info = mActivityRecord.info;
+ if (info.applicationInfo == null) {
+ return info.getMinAspectRatio();
+ }
+ final AppCompatAspectRatioOverrides aspectRatioOverrides =
+ mAppCompatOverrides.getAppCompatAspectRatioOverrides();
+ if (aspectRatioOverrides.shouldApplyUserMinAspectRatioOverride()) {
+ return aspectRatioOverrides.getUserMinAspectRatio();
+ }
+ if (!aspectRatioOverrides.shouldOverrideMinAspectRatio()
+ && !mAppCompatOverrides.getAppCompatCameraOverrides()
+ .shouldOverrideMinAspectRatioForCamera()) {
+ return info.getMinAspectRatio();
+ }
+
+ if (info.isChangeEnabled(OVERRIDE_MIN_ASPECT_RATIO_PORTRAIT_ONLY)
+ && !ActivityInfo.isFixedOrientationPortrait(
+ mActivityRecord.getOverrideOrientation())) {
+ return info.getMinAspectRatio();
+ }
+
+ if (info.isChangeEnabled(OVERRIDE_MIN_ASPECT_RATIO_EXCLUDE_PORTRAIT_FULLSCREEN)
+ && isParentFullscreenPortrait()) {
+ // We are using the parent configuration here as this is the most recent one that gets
+ // passed to onConfigurationChanged when a relevant change takes place
+ return info.getMinAspectRatio();
+ }
+
+ if (info.isChangeEnabled(OVERRIDE_MIN_ASPECT_RATIO_TO_ALIGN_WITH_SPLIT_SCREEN)) {
+ return Math.max(aspectRatioOverrides.getSplitScreenAspectRatio(),
+ info.getMinAspectRatio());
+ }
+
+ if (info.isChangeEnabled(OVERRIDE_MIN_ASPECT_RATIO_LARGE)) {
+ return Math.max(ActivityInfo.OVERRIDE_MIN_ASPECT_RATIO_LARGE_VALUE,
+ info.getMinAspectRatio());
+ }
+
+ if (info.isChangeEnabled(OVERRIDE_MIN_ASPECT_RATIO_MEDIUM)) {
+ return Math.max(ActivityInfo.OVERRIDE_MIN_ASPECT_RATIO_MEDIUM_VALUE,
+ info.getMinAspectRatio());
+ }
+
+ if (info.isChangeEnabled(OVERRIDE_MIN_ASPECT_RATIO_SMALL)) {
+ return Math.max(ActivityInfo.OVERRIDE_MIN_ASPECT_RATIO_SMALL_VALUE,
+ info.getMinAspectRatio());
+ }
+ return info.getMinAspectRatio();
+ }
+
+ float getMaxAspectRatio() {
+ if (mTransparentPolicy.isRunning()) {
+ return mTransparentPolicy.getInheritedMaxAspectRatio();
+ }
+ return mActivityRecord.info.getMaxAspectRatio();
+ }
+
+ @Nullable
+ Rect getLetterboxedContainerBounds() {
+ return mAppCompatAspectRatioState.getLetterboxedContainerBounds();
+ }
+
+ /**
+ * Whether this activity is letterboxed for fixed orientation. If letterboxed due to fixed
+ * orientation then aspect ratio restrictions are also already respected.
+ *
+ * <p>This happens when an activity has fixed orientation which doesn't match orientation of the
+ * parent because a display setting 'ignoreOrientationRequest' is set to true. See {@link
+ * WindowManagerService#getIgnoreOrientationRequest} for more context.
+ */
+ boolean isLetterboxedForFixedOrientationAndAspectRatio() {
+ return mAppCompatAspectRatioState.isLetterboxedForFixedOrientationAndAspectRatio();
+ }
+
+ boolean isLetterboxedForAspectRatioOnly() {
+ return mAppCompatAspectRatioState.isLetterboxedForAspectRatioOnly();
+ }
+
+ void setLetterboxBoundsForFixedOrientationAndAspectRatio(@NonNull Rect bounds) {
+ mAppCompatAspectRatioState.mLetterboxBoundsForFixedOrientationAndAspectRatio = bounds;
+ }
+
+ void setLetterboxBoundsForAspectRatio(@NonNull Rect bounds) {
+ mAppCompatAspectRatioState.mLetterboxBoundsForAspectRatio = bounds;
+ }
+
+ private boolean isParentFullscreenPortrait() {
+ final WindowContainer<?> parent = mActivityRecord.getParent();
+ return parent != null
+ && parent.getConfiguration().orientation == ORIENTATION_PORTRAIT
+ && parent.getWindowConfiguration().getWindowingMode() == WINDOWING_MODE_FULLSCREEN;
+ }
+
+ /**
+ * Applies aspect ratio restrictions to outBounds. If no restrictions, then no change is
+ * made to outBounds.
+ *
+ * @return {@code true} if aspect ratio restrictions were applied.
+ */
+ private boolean applyAspectRatio(Rect outBounds, Rect containingAppBounds,
+ Rect containingBounds, float desiredAspectRatio) {
+ final float maxAspectRatio = getMaxAspectRatio();
+ final Task rootTask = mActivityRecord.getRootTask();
+ final Task task = mActivityRecord.getTask();
+ final float minAspectRatio = getMinAspectRatio();
+ final TaskFragment organizedTf = mActivityRecord.getOrganizedTaskFragment();
+ float aspectRatioToApply = desiredAspectRatio;
+ if (task == null || rootTask == null
+ || (maxAspectRatio < 1 && minAspectRatio < 1 && aspectRatioToApply < 1)
+ // Don't set aspect ratio if we are in VR mode.
+ || AppCompatUtils.isInVrUiMode(mActivityRecord.getConfiguration())
+ // TODO(b/232898850): Always respect aspect ratio requests.
+ // Don't set aspect ratio for activity in ActivityEmbedding split.
+ || (organizedTf != null && !organizedTf.fillsParent())) {
+ return false;
+ }
+
+ final int containingAppWidth = containingAppBounds.width();
+ final int containingAppHeight = containingAppBounds.height();
+ final float containingRatio = AppCompatUtils.computeAspectRatio(containingAppBounds);
+
+ if (aspectRatioToApply < 1) {
+ aspectRatioToApply = containingRatio;
+ }
+
+ if (maxAspectRatio >= 1 && aspectRatioToApply > maxAspectRatio) {
+ aspectRatioToApply = maxAspectRatio;
+ } else if (minAspectRatio >= 1 && aspectRatioToApply < minAspectRatio) {
+ aspectRatioToApply = minAspectRatio;
+ }
+
+ int activityWidth = containingAppWidth;
+ int activityHeight = containingAppHeight;
+
+ if (containingRatio - aspectRatioToApply > ASPECT_RATIO_ROUNDING_TOLERANCE) {
+ if (containingAppWidth < containingAppHeight) {
+ // Width is the shorter side, so we use that to figure-out what the max. height
+ // should be given the aspect ratio.
+ activityHeight = (int) ((activityWidth * aspectRatioToApply) + 0.5f);
+ } else {
+ // Height is the shorter side, so we use that to figure-out what the max. width
+ // should be given the aspect ratio.
+ activityWidth = (int) ((activityHeight * aspectRatioToApply) + 0.5f);
+ }
+ } else if (aspectRatioToApply - containingRatio > ASPECT_RATIO_ROUNDING_TOLERANCE) {
+ boolean adjustWidth;
+ switch (mActivityRecord.getRequestedConfigurationOrientation()) {
+ case ORIENTATION_LANDSCAPE:
+ // Width should be the longer side for this landscape app, so we use the width
+ // to figure-out what the max. height should be given the aspect ratio.
+ adjustWidth = false;
+ break;
+ case ORIENTATION_PORTRAIT:
+ // Height should be the longer side for this portrait app, so we use the height
+ // to figure-out what the max. width should be given the aspect ratio.
+ adjustWidth = true;
+ break;
+ default:
+ // This app doesn't have a preferred orientation, so we keep the length of the
+ // longer side, and use it to figure-out the length of the shorter side.
+ if (containingAppWidth < containingAppHeight) {
+ // Width is the shorter side, so we use the height to figure-out what the
+ // max. width should be given the aspect ratio.
+ adjustWidth = true;
+ } else {
+ // Height is the shorter side, so we use the width to figure-out what the
+ // max. height should be given the aspect ratio.
+ adjustWidth = false;
+ }
+ break;
+ }
+ if (adjustWidth) {
+ activityWidth = (int) ((activityHeight / aspectRatioToApply) + 0.5f);
+ } else {
+ activityHeight = (int) ((activityWidth / aspectRatioToApply) + 0.5f);
+ }
+ }
+
+ if (containingAppWidth <= activityWidth && containingAppHeight <= activityHeight) {
+ // The display matches or is less than the activity aspect ratio, so nothing else to do.
+ return false;
+ }
+
+ // Compute configuration based on max or min supported width and height.
+ // Also account for the insets (e.g. display cutouts, navigation bar), which will be
+ // clipped away later in {@link Task#computeConfigResourceOverrides()}, i.e., the out
+ // bounds are the app bounds restricted by aspect ratio + clippable insets. Otherwise,
+ // the app bounds would end up too small. To achieve this we will also add clippable insets
+ // when the corresponding dimension fully fills the parent
+
+ int right = activityWidth + containingAppBounds.left;
+ int left = containingAppBounds.left;
+ if (right >= containingAppBounds.right) {
+ right = containingBounds.right;
+ left = containingBounds.left;
+ }
+ int bottom = activityHeight + containingAppBounds.top;
+ int top = containingAppBounds.top;
+ if (bottom >= containingAppBounds.bottom) {
+ bottom = containingBounds.bottom;
+ top = containingBounds.top;
+ }
+ outBounds.set(left, top, right, bottom);
+ return true;
+ }
+
+ /**
+ * Returns {@code true} if the default aspect ratio for a letterboxed app in multi-window mode
+ * should be used.
+ */
+ private boolean isDefaultMultiWindowLetterboxAspectRatioDesired(
+ @NonNull Configuration parentConfig) {
+ final DisplayContent dc = mActivityRecord.mDisplayContent;
+ if (dc == null) {
+ return false;
+ }
+ final int windowingMode = parentConfig.windowConfiguration.getWindowingMode();
+ return WindowConfiguration.inMultiWindowMode(windowingMode)
+ && !dc.getIgnoreOrientationRequest();
+ }
+
+ private static class AppCompatAspectRatioState {
+ // Whether the aspect ratio restrictions applied to the activity bounds
+ // in applyAspectRatio().
+ private boolean mIsAspectRatioApplied = false;
+
+ // Bounds populated in resolveAspectRatioRestriction when this activity is letterboxed for
+ // aspect ratio. If not null, they are used as parent container in
+ // resolveSizeCompatModeConfiguration and in a constructor of CompatDisplayInsets.
+ @Nullable
+ private Rect mLetterboxBoundsForAspectRatio;
+ // Bounds populated in resolveFixedOrientationConfiguration when this activity is
+ // letterboxed for fixed orientation. If not null, they are used as parent container in
+ // resolveSizeCompatModeConfiguration and in a constructor of CompatDisplayInsets. If
+ // letterboxed due to fixed orientation then aspect ratio restrictions are also respected.
+ // This happens when an activity has fixed orientation which doesn't match orientation of
+ // the parent because a display is ignoring orientation request or fixed to user rotation.
+ // See WindowManagerService#getIgnoreOrientationRequest and
+ // WindowManagerService#getFixedToUserRotation for more context.
+ @Nullable
+ private Rect mLetterboxBoundsForFixedOrientationAndAspectRatio;
+
+ @Nullable
+ Rect getLetterboxedContainerBounds() {
+ return mLetterboxBoundsForFixedOrientationAndAspectRatio != null
+ ? mLetterboxBoundsForFixedOrientationAndAspectRatio
+ : mLetterboxBoundsForAspectRatio;
+ }
+
+ void reset() {
+ mIsAspectRatioApplied = false;
+ mLetterboxBoundsForFixedOrientationAndAspectRatio = null;
+ mLetterboxBoundsForAspectRatio = null;
+ }
+
+ boolean isLetterboxedForFixedOrientationAndAspectRatio() {
+ return mLetterboxBoundsForFixedOrientationAndAspectRatio != null;
+ }
+
+ boolean isLetterboxedForAspectRatioOnly() {
+ return mLetterboxBoundsForAspectRatio != null;
+ }
+ }
+}
diff --git a/services/core/java/com/android/server/wm/AppCompatCameraOverrides.java b/services/core/java/com/android/server/wm/AppCompatCameraOverrides.java
index 0d108e1d9fd9..93a866380550 100644
--- a/services/core/java/com/android/server/wm/AppCompatCameraOverrides.java
+++ b/services/core/java/com/android/server/wm/AppCompatCameraOverrides.java
@@ -52,7 +52,7 @@ class AppCompatCameraOverrides {
@NonNull
private final AppCompatCameraOverridesState mAppCompatCameraOverridesState;
@NonNull
- private final LetterboxConfiguration mLetterboxConfiguration;
+ private final AppCompatConfiguration mAppCompatConfiguration;
@NonNull
private final OptPropFactory.OptProp mAllowMinAspectRatioOverrideOptProp;
@NonNull
@@ -63,15 +63,15 @@ class AppCompatCameraOverrides {
private final OptPropFactory.OptProp mCameraCompatAllowForceRotationOptProp;
AppCompatCameraOverrides(@NonNull ActivityRecord activityRecord,
- @NonNull LetterboxConfiguration letterboxConfiguration,
+ @NonNull AppCompatConfiguration appCompatConfiguration,
@NonNull OptPropFactory optPropBuilder) {
mActivityRecord = activityRecord;
- mLetterboxConfiguration = letterboxConfiguration;
+ mAppCompatConfiguration = appCompatConfiguration;
mAppCompatCameraOverridesState = new AppCompatCameraOverridesState();
mAllowMinAspectRatioOverrideOptProp = optPropBuilder.create(
PROPERTY_COMPAT_ALLOW_MIN_ASPECT_RATIO_OVERRIDE);
final BooleanSupplier isCameraCompatTreatmentEnabled = AppCompatUtils.asLazy(
- mLetterboxConfiguration::isCameraCompatTreatmentEnabled);
+ mAppCompatConfiguration::isCameraCompatTreatmentEnabled);
mCameraCompatAllowRefreshOptProp = optPropBuilder.create(
PROPERTY_CAMERA_COMPAT_ALLOW_REFRESH,
isCameraCompatTreatmentEnabled);
@@ -214,7 +214,7 @@ class AppCompatCameraOverrides {
* is active because the corresponding config is enabled and activity supports resizing.
*/
boolean isCameraCompatSplitScreenAspectRatioAllowed() {
- return mLetterboxConfiguration.isCameraCompatSplitScreenAspectRatioEnabled()
+ return mAppCompatConfiguration.isCameraCompatSplitScreenAspectRatioEnabled()
&& !mActivityRecord.shouldCreateCompatDisplayInsets();
}
diff --git a/services/core/java/com/android/server/wm/AppCompatCameraPolicy.java b/services/core/java/com/android/server/wm/AppCompatCameraPolicy.java
index 53729a2a971c..1562cf64ad96 100644
--- a/services/core/java/com/android/server/wm/AppCompatCameraPolicy.java
+++ b/services/core/java/com/android/server/wm/AppCompatCameraPolicy.java
@@ -45,9 +45,9 @@ class AppCompatCameraPolicy {
// Not checking DeviceConfig value here to allow enabling via DeviceConfig
// without the need to restart the device.
final boolean needsDisplayRotationCompatPolicy =
- wmService.mLetterboxConfiguration.isCameraCompatTreatmentEnabledAtBuildTime();
+ wmService.mAppCompatConfiguration.isCameraCompatTreatmentEnabledAtBuildTime();
final boolean needsCameraCompatFreeformPolicy = Flags.cameraCompatForFreeform()
- && DesktopModeLaunchParamsModifier.canEnterDesktopMode(wmService.mContext);
+ && DesktopModeHelper.canEnterDesktopMode(wmService.mContext);
if (needsDisplayRotationCompatPolicy || needsCameraCompatFreeformPolicy) {
mCameraStateMonitor = new CameraStateMonitor(displayContent, wmService.mH);
mActivityRefresher = new ActivityRefresher(wmService, wmService.mH);
diff --git a/services/core/java/com/android/server/wm/LetterboxConfiguration.java b/services/core/java/com/android/server/wm/AppCompatConfiguration.java
index b5af8065726d..ffa4251d0ded 100644
--- a/services/core/java/com/android/server/wm/LetterboxConfiguration.java
+++ b/services/core/java/com/android/server/wm/AppCompatConfiguration.java
@@ -19,7 +19,6 @@ package com.android.server.wm;
import static com.android.server.wm.ActivityTaskManagerDebugConfig.TAG_ATM;
import static com.android.server.wm.ActivityTaskManagerDebugConfig.TAG_WITH_CLASS_NAME;
-import android.annotation.DimenRes;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -29,16 +28,16 @@ import android.provider.DeviceConfig;
import com.android.internal.R;
import com.android.internal.annotations.VisibleForTesting;
+import com.android.server.wm.utils.DimenPxIntSupplier;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.function.Function;
-import java.util.function.IntSupplier;
-/** Reads letterbox configs from resources and controls their overrides at runtime. */
-final class LetterboxConfiguration {
+/** Reads app compatibility configs from resources and controls their overrides at runtime. */
+final class AppCompatConfiguration {
- private static final String TAG = TAG_WITH_CLASS_NAME ? "LetterboxConfiguration" : TAG_ATM;
+ private static final String TAG = TAG_WITH_CLASS_NAME ? "AppCompatConfiguration" : TAG_ATM;
// Whether camera compatibility treatment is enabled.
// See DisplayRotationCompatPolicy for context.
@@ -184,7 +183,7 @@ final class LetterboxConfiguration {
// Responsible for the persistence of letterbox[Horizontal|Vertical]PositionMultiplier
@NonNull
- private final LetterboxConfigurationPersister mLetterboxConfigurationPersister;
+ private final AppCompatConfigurationPersister mAppCompatConfigurationPersister;
// Aspect ratio of letterbox for fixed orientation, values <=
// MIN_FIXED_ORIENTATION_LETTERBOX_ASPECT_RATIO will be ignored.
@@ -308,36 +307,8 @@ final class LetterboxConfiguration {
// Flags dynamically updated with {@link android.provider.DeviceConfig}.
@NonNull private final SynchedDeviceConfig mDeviceConfig;
- // Cached version of IntSupplier customised to evaluate new dimen in pixels
- // when density changes
- private static class DimenPxIntSupplier implements IntSupplier {
-
- @NonNull
- private final Context mContext;
-
- private final int mResourceId;
-
- private float mLastDensity = Float.MIN_VALUE;
- private int mValue = 0;
-
- private DimenPxIntSupplier(@NonNull Context context, @DimenRes int resourceId) {
- mContext = context;
- mResourceId = resourceId;
- }
-
- @Override
- public int getAsInt() {
- final float newDensity = mContext.getResources().getDisplayMetrics().density;
- if (newDensity != mLastDensity) {
- mLastDensity = newDensity;
- mValue = mContext.getResources().getDimensionPixelSize(mResourceId);
- }
- return mValue;
- }
- }
-
- LetterboxConfiguration(@NonNull final Context systemUiContext) {
- this(systemUiContext, new LetterboxConfigurationPersister(
+ AppCompatConfiguration(@NonNull final Context systemUiContext) {
+ this(systemUiContext, new AppCompatConfigurationPersister(
() -> readLetterboxHorizontalReachabilityPositionFromConfig(
systemUiContext, /* forBookMode */ false),
() -> readLetterboxVerticalReachabilityPositionFromConfig(
@@ -349,8 +320,8 @@ final class LetterboxConfiguration {
}
@VisibleForTesting
- LetterboxConfiguration(@NonNull final Context systemUiContext,
- @NonNull final LetterboxConfigurationPersister letterboxConfigurationPersister) {
+ AppCompatConfiguration(@NonNull final Context systemUiContext,
+ @NonNull final AppCompatConfigurationPersister appCompatConfigurationPersister) {
mContext = systemUiContext;
mFixedOrientationLetterboxAspectRatio = mContext.getResources().getFloat(
@@ -399,8 +370,8 @@ final class LetterboxConfiguration {
mThinLetterboxHeightPxSupplier = new DimenPxIntSupplier(mContext,
R.dimen.config_letterboxThinLetterboxHeightDp);
- mLetterboxConfigurationPersister = letterboxConfigurationPersister;
- mLetterboxConfigurationPersister.start();
+ mAppCompatConfigurationPersister = appCompatConfigurationPersister;
+ mAppCompatConfigurationPersister.start();
mDeviceConfig = SynchedDeviceConfig.builder(DeviceConfig.NAMESPACE_WINDOW_MANAGER,
systemUiContext.getMainExecutor())
@@ -634,7 +605,7 @@ final class LetterboxConfiguration {
/**
* Overrides alpha of a black scrim shown over wallpaper for {@link
- * #LETTERBOX_BACKGROUND_WALLPAPER} option returned from {@link getLetterboxBackgroundType()}.
+ * #LETTERBOX_BACKGROUND_WALLPAPER} option returned from {@link #getLetterboxBackgroundType()}.
*
* <p>If given value is < 0 or >= 1, both it and a value of {@link
* com.android.internal.R.dimen.config_letterboxBackgroundWallaperDarkScrimAlpha} are ignored
@@ -661,8 +632,8 @@ final class LetterboxConfiguration {
}
/**
- * Overrides blur radius for {@link #LETTERBOX_BACKGROUND_WALLPAPER} option from
- * {@link getLetterboxBackgroundType()}.
+ * Overrides blur radius for {@link #LETTERBOX_BACKGROUND_WALLPAPER} option from {@link
+ * #getLetterboxBackgroundType()}.
*
* <p> If given value <= 0, both it and a value of {@link
* com.android.internal.R.dimen.config_letterboxBackgroundWallpaperBlurRadius} are ignored
@@ -674,7 +645,7 @@ final class LetterboxConfiguration {
/**
* Resets blur raidus for {@link #LETTERBOX_BACKGROUND_WALLPAPER} option returned by {@link
- * getLetterboxBackgroundType()} to {@link
+ * #getLetterboxBackgroundType()} to {@link
* com.android.internal.R.dimen.config_letterboxBackgroundWallpaperBlurRadius}.
*/
void resetLetterboxBackgroundWallpaperBlurRadiusPx() {
@@ -683,14 +654,14 @@ final class LetterboxConfiguration {
}
/**
- * Gets blur raidus for {@link #LETTERBOX_BACKGROUND_WALLPAPER} option returned by {@link
- * getLetterboxBackgroundType()}.
+ * Gets blur radius for {@link #LETTERBOX_BACKGROUND_WALLPAPER} option returned by {@link
+ * #getLetterboxBackgroundType()}.
*/
int getLetterboxBackgroundWallpaperBlurRadiusPx() {
return mLetterboxBackgroundWallpaperBlurRadiusPx;
}
- /*
+ /**
* Gets horizontal position of a center of the letterboxed app window specified
* in {@link com.android.internal.R.dimen.config_letterboxHorizontalPositionMultiplier}
* or via an ADB command. 0 corresponds to the left side of the screen and 1 to the
@@ -701,7 +672,7 @@ final class LetterboxConfiguration {
: mLetterboxHorizontalPositionMultiplier;
}
- /*
+ /**
* Gets vertical position of a center of the letterboxed app window specified
* in {@link com.android.internal.R.dimen.config_letterboxVerticalPositionMultiplier}
* or via an ADB command. 0 corresponds to the top side of the screen and 1 to the
@@ -772,7 +743,7 @@ final class LetterboxConfiguration {
"mLetterboxBookModePositionMultiplier");
}
- /*
+ /**
* Whether horizontal reachability repositioning is allowed for letterboxed fullscreen apps in
* landscape device orientation.
*/
@@ -780,7 +751,7 @@ final class LetterboxConfiguration {
return mIsHorizontalReachabilityEnabled;
}
- /*
+ /**
* Whether vertical reachability repositioning is allowed for letterboxed fullscreen apps in
* portrait device orientation.
*/
@@ -788,7 +759,7 @@ final class LetterboxConfiguration {
return mIsVerticalReachabilityEnabled;
}
- /*
+ /**
* Whether automatic horizontal reachability repositioning in book mode is allowed for
* letterboxed fullscreen apps in landscape device orientation.
*/
@@ -850,7 +821,7 @@ final class LetterboxConfiguration {
R.bool.config_letterboxIsAutomaticReachabilityInBookModeEnabled);
}
- /*
+ /**
* Gets default horizontal position of the letterboxed app window when horizontal reachability
* is enabled.
*
@@ -862,7 +833,7 @@ final class LetterboxConfiguration {
return mDefaultPositionForHorizontalReachability;
}
- /*
+ /**
* Gets default vertical position of the letterboxed app window when vertical reachability is
* enabled.
*
@@ -918,7 +889,7 @@ final class LetterboxConfiguration {
*/
void setPersistentLetterboxPositionForHorizontalReachability(boolean forBookMode,
@LetterboxHorizontalReachabilityPosition int position) {
- mLetterboxConfigurationPersister.setLetterboxPositionForHorizontalReachability(
+ mAppCompatConfigurationPersister.setLetterboxPositionForHorizontalReachability(
forBookMode, position);
}
@@ -928,7 +899,7 @@ final class LetterboxConfiguration {
*/
void setPersistentLetterboxPositionForVerticalReachability(boolean forTabletopMode,
@LetterboxVerticalReachabilityPosition int position) {
- mLetterboxConfigurationPersister.setLetterboxPositionForVerticalReachability(
+ mAppCompatConfigurationPersister.setLetterboxPositionForVerticalReachability(
forTabletopMode, position);
}
@@ -938,11 +909,11 @@ final class LetterboxConfiguration {
* is enabled to default position.
*/
void resetPersistentLetterboxPositionForHorizontalReachability() {
- mLetterboxConfigurationPersister.setLetterboxPositionForHorizontalReachability(
+ mAppCompatConfigurationPersister.setLetterboxPositionForHorizontalReachability(
false /* forBookMode */,
readLetterboxHorizontalReachabilityPositionFromConfig(mContext,
false /* forBookMode */));
- mLetterboxConfigurationPersister.setLetterboxPositionForHorizontalReachability(
+ mAppCompatConfigurationPersister.setLetterboxPositionForHorizontalReachability(
true /* forBookMode */,
readLetterboxHorizontalReachabilityPositionFromConfig(mContext,
true /* forBookMode */));
@@ -954,11 +925,11 @@ final class LetterboxConfiguration {
* enabled to default position.
*/
void resetPersistentLetterboxPositionForVerticalReachability() {
- mLetterboxConfigurationPersister.setLetterboxPositionForVerticalReachability(
+ mAppCompatConfigurationPersister.setLetterboxPositionForVerticalReachability(
false /* forTabletopMode */,
readLetterboxVerticalReachabilityPositionFromConfig(mContext,
false /* forTabletopMode */));
- mLetterboxConfigurationPersister.setLetterboxPositionForVerticalReachability(
+ mAppCompatConfigurationPersister.setLetterboxPositionForVerticalReachability(
true /* forTabletopMode */,
readLetterboxVerticalReachabilityPositionFromConfig(mContext,
true /* forTabletopMode */));
@@ -990,7 +961,7 @@ final class LetterboxConfiguration {
? position : LETTERBOX_VERTICAL_REACHABILITY_POSITION_CENTER;
}
- /*
+ /**
* Gets horizontal position of a center of the letterboxed app window when reachability
* is enabled specified. 0 corresponds to the left side of the screen and 1 to the right side.
*
@@ -998,7 +969,7 @@ final class LetterboxConfiguration {
*/
float getHorizontalMultiplierForReachability(boolean isDeviceInBookMode) {
final int letterboxPositionForHorizontalReachability =
- mLetterboxConfigurationPersister.getLetterboxPositionForHorizontalReachability(
+ mAppCompatConfigurationPersister.getLetterboxPositionForHorizontalReachability(
isDeviceInBookMode);
switch (letterboxPositionForHorizontalReachability) {
case LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_LEFT:
@@ -1014,7 +985,7 @@ final class LetterboxConfiguration {
}
}
- /*
+ /**
* Gets vertical position of a center of the letterboxed app window when reachability
* is enabled specified. 0 corresponds to the top side of the screen and 1 to the bottom side.
*
@@ -1022,7 +993,7 @@ final class LetterboxConfiguration {
*/
float getVerticalMultiplierForReachability(boolean isDeviceInTabletopMode) {
final int letterboxPositionForVerticalReachability =
- mLetterboxConfigurationPersister.getLetterboxPositionForVerticalReachability(
+ mAppCompatConfigurationPersister.getLetterboxPositionForVerticalReachability(
isDeviceInTabletopMode);
switch (letterboxPositionForVerticalReachability) {
case LETTERBOX_VERTICAL_REACHABILITY_POSITION_TOP:
@@ -1038,23 +1009,23 @@ final class LetterboxConfiguration {
}
}
- /*
+ /**
* Gets the horizontal position of the letterboxed app window when horizontal reachability is
* enabled.
*/
@LetterboxHorizontalReachabilityPosition
int getLetterboxPositionForHorizontalReachability(boolean isInFullScreenBookMode) {
- return mLetterboxConfigurationPersister.getLetterboxPositionForHorizontalReachability(
+ return mAppCompatConfigurationPersister.getLetterboxPositionForHorizontalReachability(
isInFullScreenBookMode);
}
- /*
+ /**
* Gets the vertical position of the letterboxed app window when vertical reachability is
* enabled.
*/
@LetterboxVerticalReachabilityPosition
int getLetterboxPositionForVerticalReachability(boolean isInFullScreenTabletopMode) {
- return mLetterboxConfigurationPersister.getLetterboxPositionForVerticalReachability(
+ return mAppCompatConfigurationPersister.getLetterboxPositionForVerticalReachability(
isInFullScreenTabletopMode);
}
@@ -1226,6 +1197,10 @@ final class LetterboxConfiguration {
|| mDeviceConfig.getFlagValue(KEY_ENABLE_LETTERBOX_TRANSLUCENT_ACTIVITY);
}
+ /**
+ * Sets whether we use the constraints override strategy for letterboxing when dealing
+ * with translucent activities.
+ */
void setTranslucentLetterboxingOverrideEnabled(
boolean translucentLetterboxingOverrideEnabled) {
mTranslucentLetterboxingOverrideEnabled = translucentLetterboxingOverrideEnabled;
@@ -1233,8 +1208,8 @@ final class LetterboxConfiguration {
/**
* Resets whether we use the constraints override strategy for letterboxing when dealing
- * with translucent activities
- * {@link mDeviceConfig.getFlagValue(KEY_ENABLE_LETTERBOX_TRANSLUCENT_ACTIVITY)}.
+ * with translucent activities, which means mDeviceConfig.getFlagValue(
+ * KEY_ENABLE_LETTERBOX_TRANSLUCENT_ACTIVITY) will be used.
*/
void resetTranslucentLetterboxingEnabled() {
setTranslucentLetterboxingOverrideEnabled(false);
@@ -1244,11 +1219,11 @@ final class LetterboxConfiguration {
private void updatePositionForHorizontalReachability(boolean isDeviceInBookMode,
Function<Integer, Integer> newHorizonalPositionFun) {
final int letterboxPositionForHorizontalReachability =
- mLetterboxConfigurationPersister.getLetterboxPositionForHorizontalReachability(
+ mAppCompatConfigurationPersister.getLetterboxPositionForHorizontalReachability(
isDeviceInBookMode);
final int nextHorizontalPosition = newHorizonalPositionFun.apply(
letterboxPositionForHorizontalReachability);
- mLetterboxConfigurationPersister.setLetterboxPositionForHorizontalReachability(
+ mAppCompatConfigurationPersister.setLetterboxPositionForHorizontalReachability(
isDeviceInBookMode, nextHorizontalPosition);
}
@@ -1256,11 +1231,11 @@ final class LetterboxConfiguration {
private void updatePositionForVerticalReachability(boolean isDeviceInTabletopMode,
Function<Integer, Integer> newVerticalPositionFun) {
final int letterboxPositionForVerticalReachability =
- mLetterboxConfigurationPersister.getLetterboxPositionForVerticalReachability(
+ mAppCompatConfigurationPersister.getLetterboxPositionForVerticalReachability(
isDeviceInTabletopMode);
final int nextVerticalPosition = newVerticalPositionFun.apply(
letterboxPositionForVerticalReachability);
- mLetterboxConfigurationPersister.setLetterboxPositionForVerticalReachability(
+ mAppCompatConfigurationPersister.setLetterboxPositionForVerticalReachability(
isDeviceInTabletopMode, nextVerticalPosition);
}
diff --git a/services/core/java/com/android/server/wm/LetterboxConfigurationPersister.java b/services/core/java/com/android/server/wm/AppCompatConfigurationPersister.java
index 38aa903e3954..852ce0401e2c 100644
--- a/services/core/java/com/android/server/wm/LetterboxConfigurationPersister.java
+++ b/services/core/java/com/android/server/wm/AppCompatConfigurationPersister.java
@@ -30,8 +30,8 @@ import android.util.AtomicFile;
import android.util.Slog;
import com.android.internal.annotations.VisibleForTesting;
-import com.android.server.wm.LetterboxConfiguration.LetterboxHorizontalReachabilityPosition;
-import com.android.server.wm.LetterboxConfiguration.LetterboxVerticalReachabilityPosition;
+import com.android.server.wm.AppCompatConfiguration.LetterboxHorizontalReachabilityPosition;
+import com.android.server.wm.AppCompatConfiguration.LetterboxVerticalReachabilityPosition;
import com.android.server.wm.nano.WindowManagerProtos;
import java.io.ByteArrayOutputStream;
@@ -45,12 +45,12 @@ import java.util.function.Supplier;
/**
* Persists the values of letterboxPositionForHorizontalReachability and
- * letterboxPositionForVerticalReachability for {@link LetterboxConfiguration}.
+ * letterboxPositionForVerticalReachability for {@link AppCompatConfiguration}.
*/
-class LetterboxConfigurationPersister {
+class AppCompatConfigurationPersister {
private static final String TAG =
- TAG_WITH_CLASS_NAME ? "LetterboxConfigurationPersister" : TAG_WM;
+ TAG_WITH_CLASS_NAME ? "AppCompatConfigurationPersister" : TAG_WM;
private static final String LETTERBOX_CONFIGURATION_FILENAME = "letterbox_config";
@@ -94,7 +94,7 @@ class LetterboxConfigurationPersister {
@NonNull
private final PersisterQueue mPersisterQueue;
- LetterboxConfigurationPersister(
+ AppCompatConfigurationPersister(
@NonNull Supplier<Integer> defaultHorizontalReachabilitySupplier,
@NonNull Supplier<Integer> defaultVerticalReachabilitySupplier,
@NonNull Supplier<Integer> defaultBookModeReachabilitySupplier,
@@ -106,7 +106,7 @@ class LetterboxConfigurationPersister {
}
@VisibleForTesting
- LetterboxConfigurationPersister(
+ AppCompatConfigurationPersister(
@NonNull Supplier<Integer> defaultHorizontalReachabilitySupplier,
@NonNull Supplier<Integer> defaultVerticalReachabilitySupplier,
@NonNull Supplier<Integer> defaultBookModeReachabilitySupplier,
@@ -233,7 +233,7 @@ class LetterboxConfigurationPersister {
letterboxData.letterboxPositionForTabletopModeReachability;
} catch (IOException ioe) {
Slog.e(TAG,
- "Error reading from LetterboxConfigurationPersister. "
+ "Error reading from AppCompatConfigurationPersister. "
+ "Using default values!", ioe);
useDefaultValue();
} finally {
@@ -242,7 +242,7 @@ class LetterboxConfigurationPersister {
fis.close();
} catch (IOException e) {
useDefaultValue();
- Slog.e(TAG, "Error reading from LetterboxConfigurationPersister ", e);
+ Slog.e(TAG, "Error reading from AppCompatConfigurationPersister ", e);
}
}
}
@@ -332,7 +332,7 @@ class LetterboxConfigurationPersister {
} catch (IOException ioe) {
mFileToUpdate.failWrite(fos);
Slog.e(TAG,
- "Error writing to LetterboxConfigurationPersister. "
+ "Error writing to AppCompatConfigurationPersister. "
+ "Using default values!", ioe);
} finally {
if (mOnComplete != null) {
diff --git a/services/core/java/com/android/server/wm/AppCompatController.java b/services/core/java/com/android/server/wm/AppCompatController.java
index 16d3787b5e74..f9e2507aa1eb 100644
--- a/services/core/java/com/android/server/wm/AppCompatController.java
+++ b/services/core/java/com/android/server/wm/AppCompatController.java
@@ -33,6 +33,8 @@ class AppCompatController {
@NonNull
private final AppCompatOrientationPolicy mOrientationPolicy;
@NonNull
+ private final AppCompatAspectRatioPolicy mAppCompatAspectRatioPolicy;
+ @NonNull
private final AppCompatOverrides mAppCompatOverrides;
AppCompatController(@NonNull WindowManagerService wmService,
@@ -42,15 +44,12 @@ class AppCompatController {
final OptPropFactory optPropBuilder = new OptPropFactory(packageManager,
activityRecord.packageName);
mTransparentPolicy = new TransparentPolicy(activityRecord,
- wmService.mLetterboxConfiguration);
+ wmService.mAppCompatConfiguration);
mAppCompatOverrides = new AppCompatOverrides(activityRecord,
- wmService.mLetterboxConfiguration, optPropBuilder);
- // TODO(b/341903757) Remove BooleanSuppliers after fixing dependency with aspectRatio.
- final LetterboxUiController tmpController = activityRecord.mLetterboxUiController;
- mOrientationPolicy = new AppCompatOrientationPolicy(activityRecord,
- mAppCompatOverrides, tmpController::shouldApplyUserFullscreenOverride,
- tmpController::shouldApplyUserMinAspectRatioOverride,
- tmpController::isSystemOverrideToFullscreenEnabled);
+ wmService.mAppCompatConfiguration, optPropBuilder);
+ mOrientationPolicy = new AppCompatOrientationPolicy(activityRecord, mAppCompatOverrides);
+ mAppCompatAspectRatioPolicy = new AppCompatAspectRatioPolicy(activityRecord,
+ mTransparentPolicy, mAppCompatOverrides);
}
@NonNull
@@ -64,6 +63,11 @@ class AppCompatController {
}
@NonNull
+ AppCompatAspectRatioPolicy getAppCompatAspectRatioPolicy() {
+ return mAppCompatAspectRatioPolicy;
+ }
+
+ @NonNull
AppCompatOverrides getAppCompatOverrides() {
return mAppCompatOverrides;
}
@@ -78,6 +82,11 @@ class AppCompatController {
return mAppCompatOverrides.getAppCompatCameraOverrides();
}
+ @NonNull
+ AppCompatAspectRatioOverrides getAppCompatAspectRatioOverrides() {
+ return mAppCompatOverrides.getAppCompatAspectRatioOverrides();
+ }
+
@Nullable
AppCompatCameraPolicy getAppCompatCameraPolicy() {
if (mActivityRecord.mDisplayContent != null) {
diff --git a/services/core/java/com/android/server/wm/AppCompatOrientationOverrides.java b/services/core/java/com/android/server/wm/AppCompatOrientationOverrides.java
index 155e246db7de..0adf825b43ae 100644
--- a/services/core/java/com/android/server/wm/AppCompatOrientationOverrides.java
+++ b/services/core/java/com/android/server/wm/AppCompatOrientationOverrides.java
@@ -50,7 +50,6 @@ class AppCompatOrientationOverrides {
private final ActivityRecord mActivityRecord;
@NonNull
private final AppCompatCameraOverrides mAppCompatCameraOverrides;
-
@NonNull
private final OptPropFactory.OptProp mIgnoreRequestedOrientationOptProp;
@NonNull
@@ -60,7 +59,7 @@ class AppCompatOrientationOverrides {
final OrientationOverridesState mOrientationOverridesState;
AppCompatOrientationOverrides(@NonNull ActivityRecord activityRecord,
- @NonNull LetterboxConfiguration letterboxConfiguration,
+ @NonNull AppCompatConfiguration appCompatConfiguration,
@NonNull OptPropFactory optPropBuilder,
@NonNull AppCompatCameraOverrides appCompatCameraOverrides) {
mActivityRecord = activityRecord;
@@ -68,7 +67,7 @@ class AppCompatOrientationOverrides {
mOrientationOverridesState = new OrientationOverridesState(mActivityRecord,
System::currentTimeMillis);
final BooleanSupplier isPolicyForIgnoringRequestedOrientationEnabled = asLazy(
- letterboxConfiguration::isPolicyForIgnoringRequestedOrientationEnabled);
+ appCompatConfiguration::isPolicyForIgnoringRequestedOrientationEnabled);
mIgnoreRequestedOrientationOptProp = optPropBuilder.create(
PROPERTY_COMPAT_IGNORE_REQUESTED_ORIENTATION,
isPolicyForIgnoringRequestedOrientationEnabled);
@@ -109,7 +108,8 @@ class AppCompatOrientationOverrides {
mOrientationOverridesState.updateOrientationRequestLoopState();
return mOrientationOverridesState.shouldIgnoreRequestInLoop()
- && !mActivityRecord.isLetterboxedForFixedOrientationAndAspectRatio();
+ && !mActivityRecord.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio();
}
/**
diff --git a/services/core/java/com/android/server/wm/AppCompatOrientationPolicy.java b/services/core/java/com/android/server/wm/AppCompatOrientationPolicy.java
index 69ba59b9ff49..17f0d970d043 100644
--- a/services/core/java/com/android/server/wm/AppCompatOrientationPolicy.java
+++ b/services/core/java/com/android/server/wm/AppCompatOrientationPolicy.java
@@ -32,8 +32,6 @@ import android.annotation.NonNull;
import android.content.pm.ActivityInfo;
import android.util.Slog;
-import java.util.function.BooleanSupplier;
-
/**
* Contains all the logic related to orientation in the context of app compatibility
*/
@@ -46,24 +44,11 @@ class AppCompatOrientationPolicy {
@NonNull
private final AppCompatOverrides mAppCompatOverrides;
- @NonNull
- private final BooleanSupplier mShouldApplyUserFullscreenOverride;
- @NonNull
- private final BooleanSupplier mShouldApplyUserMinAspectRatioOverride;
- @NonNull
- private final BooleanSupplier mIsSystemOverrideToFullscreenEnabled;
- // TODO(b/341903757) Remove BooleanSuppliers after fixing dependency with spectRatio component
AppCompatOrientationPolicy(@NonNull ActivityRecord activityRecord,
- @NonNull AppCompatOverrides appCompatOverrides,
- @NonNull BooleanSupplier shouldApplyUserFullscreenOverride,
- @NonNull BooleanSupplier shouldApplyUserMinAspectRatioOverride,
- @NonNull BooleanSupplier isSystemOverrideToFullscreenEnabled) {
+ @NonNull AppCompatOverrides appCompatOverrides) {
mActivityRecord = activityRecord;
mAppCompatOverrides = appCompatOverrides;
- mShouldApplyUserFullscreenOverride = shouldApplyUserFullscreenOverride;
- mShouldApplyUserMinAspectRatioOverride = shouldApplyUserMinAspectRatioOverride;
- mIsSystemOverrideToFullscreenEnabled = isSystemOverrideToFullscreenEnabled;
}
@ActivityInfo.ScreenOrientation
@@ -71,7 +56,9 @@ class AppCompatOrientationPolicy {
final DisplayContent displayContent = mActivityRecord.mDisplayContent;
final boolean isIgnoreOrientationRequestEnabled = displayContent != null
&& displayContent.getIgnoreOrientationRequest();
- if (mShouldApplyUserFullscreenOverride.getAsBoolean() && isIgnoreOrientationRequestEnabled
+ final boolean shouldApplyUserFullscreenOverride = mAppCompatOverrides
+ .getAppCompatAspectRatioOverrides().shouldApplyUserFullscreenOverride();
+ if (shouldApplyUserFullscreenOverride && isIgnoreOrientationRequestEnabled
// Do not override orientation to fullscreen for camera activities.
// Fixed-orientation activities are rarely tested in other orientations, and it
// often results in sideways or stretched previews. As the camera compat treatment
@@ -88,8 +75,9 @@ class AppCompatOrientationPolicy {
// In some cases (e.g. Kids app) we need to map the candidate orientation to some other
// orientation.
candidate = mActivityRecord.mWmService.mapOrientationRequest(candidate);
-
- if (mShouldApplyUserMinAspectRatioOverride.getAsBoolean() && (!isFixedOrientation(candidate)
+ final boolean shouldApplyUserMinAspectRatioOverride = mAppCompatOverrides
+ .getAppCompatAspectRatioOverrides().shouldApplyUserMinAspectRatioOverride();
+ if (shouldApplyUserMinAspectRatioOverride && (!isFixedOrientation(candidate)
|| candidate == SCREEN_ORIENTATION_LOCKED)) {
Slog.v(TAG, "Requested orientation " + screenOrientationToString(candidate)
+ " for " + mActivityRecord + " is overridden to "
@@ -113,7 +101,9 @@ class AppCompatOrientationPolicy {
// mUserAspectRatio is always initialized first in shouldApplyUserFullscreenOverride(),
// which will always come first before this check as user override > device
// manufacturer override.
- if (mIsSystemOverrideToFullscreenEnabled.getAsBoolean() && isIgnoreOrientationRequestEnabled
+ final boolean isSystemOverrideToFullscreenEnabled = mAppCompatOverrides
+ .getAppCompatAspectRatioOverrides().isSystemOverrideToFullscreenEnabled();
+ if (isSystemOverrideToFullscreenEnabled && isIgnoreOrientationRequestEnabled
// Do not override orientation to fullscreen for camera activities.
// Fixed-orientation activities are rarely tested in other orientations, and it
// often results in sideways or stretched previews. As the camera compat treatment
diff --git a/services/core/java/com/android/server/wm/AppCompatOverrides.java b/services/core/java/com/android/server/wm/AppCompatOverrides.java
index 94c6ba90866c..b611ba9bb065 100644
--- a/services/core/java/com/android/server/wm/AppCompatOverrides.java
+++ b/services/core/java/com/android/server/wm/AppCompatOverrides.java
@@ -18,20 +18,13 @@ package com.android.server.wm;
import static android.content.pm.ActivityInfo.FORCE_NON_RESIZE_APP;
import static android.content.pm.ActivityInfo.FORCE_RESIZE_APP;
-import static android.content.pm.ActivityInfo.OVERRIDE_ANY_ORIENTATION_TO_USER;
import static android.content.pm.ActivityInfo.OVERRIDE_ENABLE_COMPAT_FAKE_FOCUS;
-import static android.content.pm.ActivityInfo.OVERRIDE_MIN_ASPECT_RATIO;
import static android.content.pm.ActivityInfo.OVERRIDE_RESPECT_REQUESTED_ORIENTATION;
import static android.content.pm.ActivityInfo.OVERRIDE_USE_DISPLAY_LANDSCAPE_NATURAL_ORIENTATION;
-import static android.content.pm.PackageManager.USER_MIN_ASPECT_RATIO_FULLSCREEN;
-import static android.content.pm.PackageManager.USER_MIN_ASPECT_RATIO_UNSET;
import static android.content.res.Configuration.ORIENTATION_LANDSCAPE;
import static android.view.WindowManager.PROPERTY_COMPAT_ALLOW_DISPLAY_ORIENTATION_OVERRIDE;
-import static android.view.WindowManager.PROPERTY_COMPAT_ALLOW_MIN_ASPECT_RATIO_OVERRIDE;
import static android.view.WindowManager.PROPERTY_COMPAT_ALLOW_ORIENTATION_OVERRIDE;
import static android.view.WindowManager.PROPERTY_COMPAT_ALLOW_RESIZEABLE_ACTIVITY_OVERRIDES;
-import static android.view.WindowManager.PROPERTY_COMPAT_ALLOW_USER_ASPECT_RATIO_FULLSCREEN_OVERRIDE;
-import static android.view.WindowManager.PROPERTY_COMPAT_ALLOW_USER_ASPECT_RATIO_OVERRIDE;
import static android.view.WindowManager.PROPERTY_COMPAT_ENABLE_FAKE_FOCUS;
import static com.android.server.wm.ActivityTaskManagerDebugConfig.TAG_ATM;
@@ -49,7 +42,7 @@ public class AppCompatOverrides {
private static final String TAG = TAG_WITH_CLASS_NAME ? "AppCompatOverrides" : TAG_ATM;
@NonNull
- private final LetterboxConfiguration mLetterboxConfiguration;
+ private final AppCompatConfiguration mAppCompatConfiguration;
@NonNull
private final ActivityRecord mActivityRecord;
@@ -61,31 +54,32 @@ public class AppCompatOverrides {
@NonNull
private final OptPropFactory.OptProp mAllowDisplayOrientationOverrideOptProp;
@NonNull
- private final OptPropFactory.OptProp mAllowMinAspectRatioOverrideOptProp;
- @NonNull
private final OptPropFactory.OptProp mAllowForceResizeOverrideOptProp;
@NonNull
- private final OptPropFactory.OptProp mAllowUserAspectRatioOverrideOptProp;
- @NonNull
- private final OptPropFactory.OptProp mAllowUserAspectRatioFullscreenOverrideOptProp;
- @NonNull
private final AppCompatOrientationOverrides mAppCompatOrientationOverrides;
@NonNull
private final AppCompatCameraOverrides mAppCompatCameraOverrides;
+ @NonNull
+ private final AppCompatAspectRatioOverrides mAppCompatAspectRatioOverrides;
AppCompatOverrides(@NonNull ActivityRecord activityRecord,
- @NonNull LetterboxConfiguration letterboxConfiguration,
+ @NonNull AppCompatConfiguration appCompatConfiguration,
@NonNull OptPropFactory optPropBuilder) {
- mLetterboxConfiguration = letterboxConfiguration;
+ mAppCompatConfiguration = appCompatConfiguration;
mActivityRecord = activityRecord;
mAppCompatCameraOverrides = new AppCompatCameraOverrides(mActivityRecord,
- mLetterboxConfiguration, optPropBuilder);
+ mAppCompatConfiguration, optPropBuilder);
mAppCompatOrientationOverrides = new AppCompatOrientationOverrides(mActivityRecord,
- mLetterboxConfiguration, optPropBuilder, mAppCompatCameraOverrides);
+ mAppCompatConfiguration, optPropBuilder, mAppCompatCameraOverrides);
+ // TODO(b/341903757) Remove BooleanSuppliers after fixing dependency with reachability.
+ mAppCompatAspectRatioOverrides = new AppCompatAspectRatioOverrides(activityRecord,
+ mAppCompatConfiguration, optPropBuilder,
+ activityRecord.mLetterboxUiController::isDisplayFullScreenAndInPosture,
+ activityRecord.mLetterboxUiController::getHorizontalPositionMultiplier);
mFakeFocusOptProp = optPropBuilder.create(PROPERTY_COMPAT_ENABLE_FAKE_FOCUS,
- mLetterboxConfiguration::isCompatFakeFocusEnabled);
+ mAppCompatConfiguration::isCompatFakeFocusEnabled);
mAllowOrientationOverrideOptProp = optPropBuilder.create(
@@ -101,16 +95,8 @@ public class AppCompatOverrides {
== ORIENTATION_LANDSCAPE
);
- mAllowMinAspectRatioOverrideOptProp = optPropBuilder.create(
- PROPERTY_COMPAT_ALLOW_MIN_ASPECT_RATIO_OVERRIDE);
mAllowForceResizeOverrideOptProp = optPropBuilder.create(
PROPERTY_COMPAT_ALLOW_RESIZEABLE_ACTIVITY_OVERRIDES);
- mAllowUserAspectRatioOverrideOptProp = optPropBuilder.create(
- PROPERTY_COMPAT_ALLOW_USER_ASPECT_RATIO_OVERRIDE,
- mLetterboxConfiguration::isUserAppAspectRatioSettingsEnabled);
- mAllowUserAspectRatioFullscreenOverrideOptProp = optPropBuilder.create(
- PROPERTY_COMPAT_ALLOW_USER_ASPECT_RATIO_FULLSCREEN_OVERRIDE,
- mLetterboxConfiguration::isUserAppAspectRatioFullscreenEnabled);
}
@NonNull
@@ -123,6 +109,11 @@ public class AppCompatOverrides {
return mAppCompatCameraOverrides;
}
+ @NonNull
+ AppCompatAspectRatioOverrides getAppCompatAspectRatioOverrides() {
+ return mAppCompatAspectRatioOverrides;
+ }
+
/**
* Whether sending compat fake focus for split screen resumed activities is enabled. Needed
* because some game engines wait to get focus before drawing the content of the app which isn't
@@ -140,34 +131,10 @@ public class AppCompatOverrides {
isCompatChangeEnabled(OVERRIDE_ENABLE_COMPAT_FAKE_FOCUS));
}
- boolean isSystemOverrideToFullscreenEnabled(int userAspectRatio) {
- return isCompatChangeEnabled(OVERRIDE_ANY_ORIENTATION_TO_USER)
- && !mAllowOrientationOverrideOptProp.isFalse()
- && (userAspectRatio == USER_MIN_ASPECT_RATIO_UNSET
- || userAspectRatio == USER_MIN_ASPECT_RATIO_FULLSCREEN);
- }
-
boolean isAllowOrientationOverrideOptOut() {
return mAllowOrientationOverrideOptProp.isFalse();
}
- /**
- * Whether we should apply the min aspect ratio per-app override. When this override is applied
- * the min aspect ratio given in the app's manifest will be overridden to the largest enabled
- * aspect ratio treatment unless the app's manifest value is higher. The treatment will also
- * apply if no value is provided in the manifest.
- *
- * <p>This method returns {@code true} when the following conditions are met:
- * <ul>
- * <li>Opt-out component property isn't enabled
- * <li>Per-app override is enabled
- * </ul>
- */
- boolean shouldOverrideMinAspectRatio() {
- return mAllowMinAspectRatioOverrideOptProp.shouldEnableWithOptInOverrideAndOptOutProperty(
- isCompatChangeEnabled(OVERRIDE_MIN_ASPECT_RATIO));
- }
-
boolean isOverrideRespectRequestedOrientationEnabled() {
return isCompatChangeEnabled(OVERRIDE_RESPECT_REQUESTED_ORIENTATION);
}
@@ -209,28 +176,6 @@ public class AppCompatOverrides {
}
/**
- * Whether we should enable users to resize the current app.
- */
- boolean shouldEnableUserAspectRatioSettings() {
- // We use mBooleanPropertyAllowUserAspectRatioOverride to allow apps to opt-out which has
- // effect only if explicitly false. If mBooleanPropertyAllowUserAspectRatioOverride is null,
- // the current app doesn't opt-out so the first part of the predicate is true.
- return !mAllowUserAspectRatioOverrideOptProp.isFalse()
- && mLetterboxConfiguration.isUserAppAspectRatioSettingsEnabled()
- && mActivityRecord.mDisplayContent != null
- && mActivityRecord.mDisplayContent.getIgnoreOrientationRequest();
- }
-
- boolean isUserFullscreenOverrideEnabled() {
- if (mAllowUserAspectRatioOverrideOptProp.isFalse()
- || mAllowUserAspectRatioFullscreenOverrideOptProp.isFalse()
- || !mLetterboxConfiguration.isUserAppAspectRatioFullscreenEnabled()) {
- return false;
- }
- return true;
- }
-
- /**
* Whether we should apply the force non resize per-app override. When this override is applied
* it forces the packages it is applied to to be non-resizable.
*
diff --git a/services/core/java/com/android/server/wm/AppCompatUtils.java b/services/core/java/com/android/server/wm/AppCompatUtils.java
index be51dd3bcf1c..1b30a20d3e9a 100644
--- a/services/core/java/com/android/server/wm/AppCompatUtils.java
+++ b/services/core/java/com/android/server/wm/AppCompatUtils.java
@@ -16,7 +16,12 @@
package com.android.server.wm;
+import static android.content.res.Configuration.UI_MODE_TYPE_MASK;
+import static android.content.res.Configuration.UI_MODE_TYPE_VR_HEADSET;
+
import android.annotation.NonNull;
+import android.content.res.Configuration;
+import android.graphics.Rect;
import java.util.function.BooleanSupplier;
@@ -48,4 +53,24 @@ class AppCompatUtils {
}
};
}
+
+ /**
+ * Returns the aspect ratio of the given {@code rect}.
+ */
+ static float computeAspectRatio(Rect rect) {
+ final int width = rect.width();
+ final int height = rect.height();
+ if (width == 0 || height == 0) {
+ return 0;
+ }
+ return Math.max(width, height) / (float) Math.min(width, height);
+ }
+
+ /**
+ * @param config The current {@link Configuration}
+ * @return {@code true} if using a VR headset.
+ */
+ static boolean isInVrUiMode(Configuration config) {
+ return (config.uiMode & UI_MODE_TYPE_MASK) == UI_MODE_TYPE_VR_HEADSET;
+ }
}
diff --git a/services/core/java/com/android/server/wm/AppTransitionController.java b/services/core/java/com/android/server/wm/AppTransitionController.java
index 44b414f1ea7e..78636a7870cf 100644
--- a/services/core/java/com/android/server/wm/AppTransitionController.java
+++ b/services/core/java/com/android/server/wm/AppTransitionController.java
@@ -98,7 +98,6 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.ArrayDeque;
import java.util.ArrayList;
-import java.util.function.Consumer;
import java.util.function.Predicate;
/**
@@ -290,12 +289,10 @@ public class AppTransitionController {
getTopApp(mDisplayContent.mChangingContainers, false /* ignoreHidden */);
final WindowManager.LayoutParams animLp = getAnimLp(animLpActivity);
- // Check if there is any override
- if (!overrideWithTaskFragmentRemoteAnimation(transit, activityTypes)) {
- // Unfreeze the windows that were previously frozen for TaskFragment animation.
- unfreezeEmbeddedChangingWindows();
- overrideWithRemoteAnimationIfSet(animLpActivity, transit, activityTypes);
- }
+ // No AE remote animation with Shell transition.
+ // Unfreeze the windows that were previously frozen for TaskFragment animation.
+ unfreezeEmbeddedChangingWindows();
+ overrideWithRemoteAnimationIfSet(animLpActivity, transit, activityTypes);
final boolean voiceInteraction = containsVoiceInteraction(mDisplayContent.mClosingApps)
|| containsVoiceInteraction(mDisplayContent.mOpeningApps);
@@ -726,64 +723,6 @@ public class AppTransitionController {
}
/**
- * Overrides the pending transition with the remote animation defined by the
- * {@link ITaskFragmentOrganizer} if all windows in the transition are children of
- * {@link TaskFragment} that are organized by the same organizer.
- *
- * @return {@code true} if the transition is overridden.
- */
- private boolean overrideWithTaskFragmentRemoteAnimation(@TransitionOldType int transit,
- ArraySet<Integer> activityTypes) {
- if (transitionMayContainNonAppWindows(transit)) {
- return false;
- }
- if (!transitionContainsTaskFragmentWithBoundsOverride()) {
- // No need to play TaskFragment remote animation if all embedded TaskFragment in the
- // transition fill the Task.
- return false;
- }
-
- final Task task = findParentTaskForAllEmbeddedWindows();
- final ITaskFragmentOrganizer organizer = findTaskFragmentOrganizer(task);
- final RemoteAnimationDefinition definition = organizer != null
- ? mDisplayContent.mAtmService.mTaskFragmentOrganizerController
- .getRemoteAnimationDefinition(organizer)
- : null;
- final RemoteAnimationAdapter adapter = definition != null
- ? definition.getAdapter(transit, activityTypes)
- : null;
- if (adapter == null) {
- return false;
- }
- mDisplayContent.mAppTransition.overridePendingAppTransitionRemote(
- adapter, false /* sync */, true /*isActivityEmbedding*/);
- ProtoLog.v(WM_DEBUG_APP_TRANSITIONS,
- "Override with TaskFragment remote animation for transit=%s",
- AppTransition.appTransitionOldToString(transit));
-
- final int organizerUid = mDisplayContent.mAtmService.mTaskFragmentOrganizerController
- .getTaskFragmentOrganizerUid(organizer);
- final boolean shouldDisableInputForRemoteAnimation = !task.isFullyTrustedEmbedding(
- organizerUid);
- final RemoteAnimationController remoteAnimationController =
- mDisplayContent.mAppTransition.getRemoteAnimationController();
- if (shouldDisableInputForRemoteAnimation && remoteAnimationController != null) {
- // We are going to use client-driven animation, Disable all input on activity windows
- // during the animation (unless it is fully trusted) to ensure it is safe to allow
- // client to animate the surfaces.
- // This is needed for all activity windows in the animation Task.
- remoteAnimationController.setOnRemoteAnimationReady(() -> {
- final Consumer<ActivityRecord> updateActivities =
- activity -> activity.setDropInputForAnimation(true);
- task.forAllActivities(updateActivities);
- });
- ProtoLog.d(WM_DEBUG_APP_TRANSITIONS, "Task=%d contains embedded TaskFragment."
- + " Disabled all input during TaskFragment remote animation.", task.mTaskId);
- }
- return true;
- }
-
- /**
* Overrides the pending transition with the remote animation defined for the transition in the
* set of defined remote animations in the app window token.
*/
diff --git a/services/core/java/com/android/server/wm/BackNavigationController.java b/services/core/java/com/android/server/wm/BackNavigationController.java
index 8421765060ce..0f8d68b713a7 100644
--- a/services/core/java/com/android/server/wm/BackNavigationController.java
+++ b/services/core/java/com/android/server/wm/BackNavigationController.java
@@ -166,15 +166,14 @@ class BackNavigationController {
return null;
}
- // Move focus to the top embedded window if possible
- if (mWindowManagerService.moveFocusToAdjacentEmbeddedWindow(window)) {
- window = wmService.getFocusedWindowLocked();
- if (window == null) {
- Slog.e(TAG, "New focused window is null, returning null.");
- return null;
- }
+ // Updating the window to the most recently used one among the embedded windows
+ // that are displayed adjacently, unless the IME is visible.
+ // When the IME is visible, the IME is displayed on top of embedded activities.
+ // In that case, the back event should still be delivered to focused activity in
+ // order to dismiss the IME.
+ if (!window.getDisplayContent().getImeContainer().isVisible()) {
+ window = mWindowManagerService.getMostRecentUsedEmbeddedWindowForBack(window);
}
-
if (!window.isDrawn()) {
ProtoLog.d(WM_DEBUG_BACK_PREVIEW,
"Focused window didn't have a valid surface drawn.");
diff --git a/services/core/java/com/android/server/wm/BackgroundActivityStartController.java b/services/core/java/com/android/server/wm/BackgroundActivityStartController.java
index a4fb95964a5c..54024e92f95f 100644
--- a/services/core/java/com/android/server/wm/BackgroundActivityStartController.java
+++ b/services/core/java/com/android/server/wm/BackgroundActivityStartController.java
@@ -128,21 +128,24 @@ public class BackgroundActivityStartController {
// TODO(b/263368846) Rename when ASM logic is moved in
@Retention(SOURCE)
- @IntDef({BAL_BLOCK,
- BAL_ALLOW_DEFAULT,
- BAL_ALLOW_ALLOWLISTED_UID,
+ @IntDef({
BAL_ALLOW_ALLOWLISTED_COMPONENT,
- BAL_ALLOW_VISIBLE_WINDOW,
+ BAL_ALLOW_ALLOWLISTED_UID,
+ BAL_ALLOW_BOUND_BY_FOREGROUND,
+ BAL_ALLOW_DEFAULT,
+ BAL_ALLOW_FOREGROUND,
+ BAL_ALLOW_GRACE_PERIOD,
BAL_ALLOW_PENDING_INTENT,
BAL_ALLOW_PERMISSION,
BAL_ALLOW_SAW_PERMISSION,
- BAL_ALLOW_GRACE_PERIOD,
- BAL_ALLOW_FOREGROUND,
- BAL_ALLOW_SDK_SANDBOX
+ BAL_ALLOW_SDK_SANDBOX,
+ BAL_ALLOW_TOKEN,
+ BAL_ALLOW_VISIBLE_WINDOW,
+ BAL_BLOCK
})
public @interface BalCode {}
- static final int BAL_BLOCK = 0;
+ static final int BAL_BLOCK = FrameworkStatsLog.BAL_ALLOWED__ALLOWED_REASON__BAL_BLOCKED;
static final int BAL_ALLOW_DEFAULT =
FrameworkStatsLog.BAL_ALLOWED__ALLOWED_REASON__BAL_ALLOW_DEFAULT;
@@ -195,10 +198,19 @@ public class BackgroundActivityStartController {
static final int BAL_ALLOW_NON_APP_VISIBLE_WINDOW =
FrameworkStatsLog.BAL_ALLOWED__ALLOWED_REASON__BAL_ALLOW_NON_APP_VISIBLE_WINDOW;
+ /** Process belongs to a SDK sandbox */
+ static final int BAL_ALLOW_TOKEN =
+ FrameworkStatsLog.BAL_ALLOWED__ALLOWED_REASON__BAL_ALLOW_TOKEN;
+
+ /** Process belongs to a SDK sandbox */
+ static final int BAL_ALLOW_BOUND_BY_FOREGROUND =
+ FrameworkStatsLog.BAL_ALLOWED__ALLOWED_REASON__BAL_ALLOW_BOUND_BY_FOREGROUND;
+
static String balCodeToString(@BalCode int balCode) {
return switch (balCode) {
case BAL_ALLOW_ALLOWLISTED_COMPONENT -> "BAL_ALLOW_ALLOWLISTED_COMPONENT";
case BAL_ALLOW_ALLOWLISTED_UID -> "BAL_ALLOW_ALLOWLISTED_UID";
+ case BAL_ALLOW_BOUND_BY_FOREGROUND -> "BAL_ALLOW_BOUND_BY_FOREGROUND";
case BAL_ALLOW_DEFAULT -> "BAL_ALLOW_DEFAULT";
case BAL_ALLOW_FOREGROUND -> "BAL_ALLOW_FOREGROUND";
case BAL_ALLOW_GRACE_PERIOD -> "BAL_ALLOW_GRACE_PERIOD";
@@ -207,6 +219,7 @@ public class BackgroundActivityStartController {
case BAL_ALLOW_PERMISSION -> "BAL_ALLOW_PERMISSION";
case BAL_ALLOW_SAW_PERMISSION -> "BAL_ALLOW_SAW_PERMISSION";
case BAL_ALLOW_SDK_SANDBOX -> "BAL_ALLOW_SDK_SANDBOX";
+ case BAL_ALLOW_TOKEN -> "BAL_ALLOW_TOKEN";
case BAL_ALLOW_VISIBLE_WINDOW -> "BAL_ALLOW_VISIBLE_WINDOW";
case BAL_BLOCK -> "BAL_BLOCK";
default -> throw new IllegalArgumentException("Unexpected value: " + balCode);
@@ -1042,7 +1055,9 @@ public class BackgroundActivityStartController {
|| balCode == BAL_ALLOW_PENDING_INTENT
|| balCode == BAL_ALLOW_SAW_PERMISSION
|| balCode == BAL_ALLOW_VISIBLE_WINDOW
- || balCode == BAL_ALLOW_NON_APP_VISIBLE_WINDOW) {
+ || balCode == BAL_ALLOW_NON_APP_VISIBLE_WINDOW
+ || balCode == BAL_ALLOW_TOKEN
+ || balCode == BAL_ALLOW_BOUND_BY_FOREGROUND) {
return true;
}
}
@@ -1266,7 +1281,8 @@ public class BackgroundActivityStartController {
|| balCode == BAL_ALLOW_PERMISSION
|| balCode == BAL_ALLOW_SAW_PERMISSION
|| balCode == BAL_ALLOW_VISIBLE_WINDOW
- || balCode == BAL_ALLOW_NON_APP_VISIBLE_WINDOW) {
+ || balCode == BAL_ALLOW_NON_APP_VISIBLE_WINDOW
+ || balCode == BAL_ALLOW_BOUND_BY_FOREGROUND) {
return;
}
@@ -1572,7 +1588,7 @@ public class BackgroundActivityStartController {
}
if (balCode == BAL_ALLOW_VISIBLE_WINDOW || balCode == BAL_ALLOW_NON_APP_VISIBLE_WINDOW
- || balCode == BAL_ALLOW_FOREGROUND) {
+ || balCode == BAL_ALLOW_FOREGROUND || balCode == BAL_ALLOW_BOUND_BY_FOREGROUND) {
Task task = sourceRecord != null ? sourceRecord.getTask() : targetTask;
if (task != null && task.getDisplayArea() != null) {
joiner.add(prefix + "Tasks: ");
@@ -1659,6 +1675,8 @@ public class BackgroundActivityStartController {
activityName = "";
}
writeBalAllowedLog(activityName, finalVerdict.getCode(), state);
+ } else {
+ writeBalAllowedLogMinimal(state);
}
} else {
@BalCode int code = finalVerdict.getCode();
@@ -1723,6 +1741,24 @@ public class BackgroundActivityStartController {
);
}
+ @VisibleForTesting void writeBalAllowedLogMinimal(BalState state) {
+ FrameworkStatsLog.write(FrameworkStatsLog.BAL_ALLOWED,
+ "",
+ BAL_ALLOW_DEFAULT,
+ NO_PROCESS_UID,
+ NO_PROCESS_UID,
+ state.mResultForCaller == null ? BAL_BLOCK : state.mResultForCaller.getRawCode(),
+ state.mBalAllowedByPiCreator.allowsBackgroundActivityStarts(),
+ state.callerExplicitOptInOrOut(),
+ state.mResultForRealCaller == null ? BAL_BLOCK
+ : state.mResultForRealCaller.getRawCode(),
+ state.mBalAllowedByPiSender.allowsBackgroundActivityStarts(),
+ state.realCallerExplicitOptInOrOut(),
+ getTargetSdk(state.mCallingPackage),
+ getTargetSdk(state.mRealCallingPackage)
+ );
+ }
+
/**
* Called whenever an activity finishes. Stores the record, so it can be used by ASM grace
* period checks.
diff --git a/services/core/java/com/android/server/wm/BackgroundLaunchProcessController.java b/services/core/java/com/android/server/wm/BackgroundLaunchProcessController.java
index 478524b7bd1c..4a870a3a5b6e 100644
--- a/services/core/java/com/android/server/wm/BackgroundLaunchProcessController.java
+++ b/services/core/java/com/android/server/wm/BackgroundLaunchProcessController.java
@@ -23,10 +23,13 @@ import static com.android.server.wm.ActivityTaskManagerDebugConfig.TAG_WITH_CLAS
import static com.android.server.wm.ActivityTaskManagerService.ACTIVITY_BG_START_GRACE_PERIOD_MS;
import static com.android.server.wm.ActivityTaskManagerService.APP_SWITCH_ALLOW;
import static com.android.server.wm.ActivityTaskManagerService.APP_SWITCH_DISALLOW;
+import static com.android.server.wm.BackgroundActivityStartController.BAL_ALLOW_BOUND_BY_FOREGROUND;
import static com.android.server.wm.BackgroundActivityStartController.BAL_ALLOW_FOREGROUND;
import static com.android.server.wm.BackgroundActivityStartController.BAL_ALLOW_GRACE_PERIOD;
import static com.android.server.wm.BackgroundActivityStartController.BAL_ALLOW_PERMISSION;
+import static com.android.server.wm.BackgroundActivityStartController.BAL_ALLOW_TOKEN;
import static com.android.server.wm.BackgroundActivityStartController.BAL_ALLOW_VISIBLE_WINDOW;
+import static com.android.window.flags.Flags.balImprovedMetrics;
import static java.util.Objects.requireNonNull;
@@ -110,8 +113,8 @@ class BackgroundLaunchProcessController {
}
// Allow if the flag was explicitly set.
if (isBackgroundStartAllowedByToken(uid, packageName, isCheckingForFgsStart)) {
- return new BalVerdict(BAL_ALLOW_PERMISSION, /*background*/ true,
- "process allowed by token");
+ return new BalVerdict(balImprovedMetrics() ? BAL_ALLOW_TOKEN : BAL_ALLOW_PERMISSION,
+ /*background*/ true, "process allowed by token");
}
// Allow if the caller is bound by a UID that's currently foreground.
// But still respect the appSwitchState.
@@ -120,7 +123,8 @@ class BackgroundLaunchProcessController {
? appSwitchState != APP_SWITCH_DISALLOW && isBoundByForegroundUid()
: isBoundByForegroundUid();
if (allowBoundByForegroundUid) {
- return new BalVerdict(BAL_ALLOW_VISIBLE_WINDOW, /*background*/ false,
+ return new BalVerdict(balImprovedMetrics() ? BAL_ALLOW_BOUND_BY_FOREGROUND
+ : BAL_ALLOW_VISIBLE_WINDOW, /*background*/ false,
"process bound by foreground uid");
}
// Allow if the caller has an activity in any foreground task.
diff --git a/services/core/java/com/android/server/wm/CameraCompatFreeformPolicy.java b/services/core/java/com/android/server/wm/CameraCompatFreeformPolicy.java
index 68a417289c55..2755a80ea705 100644
--- a/services/core/java/com/android/server/wm/CameraCompatFreeformPolicy.java
+++ b/services/core/java/com/android/server/wm/CameraCompatFreeformPolicy.java
@@ -26,13 +26,14 @@ import static com.android.server.wm.WindowManagerDebugConfig.TAG_WITH_CLASS_NAME
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 com.android.internal.annotations.VisibleForTesting;
-import com.android.internal.protolog.ProtoLogGroup;
import com.android.internal.protolog.ProtoLog;
+import com.android.internal.protolog.ProtoLogGroup;
import com.android.window.flags.Flags;
/**
@@ -56,6 +57,9 @@ final class CameraCompatFreeformPolicy implements CameraStateMonitor.CameraCompa
private boolean mIsCameraCompatTreatmentPending = false;
+ @Nullable
+ private Task mCameraTask;
+
CameraCompatFreeformPolicy(@NonNull DisplayContent displayContent,
@NonNull CameraStateMonitor cameraStateMonitor,
@NonNull ActivityRefresher activityRefresher) {
@@ -116,6 +120,7 @@ final class CameraCompatFreeformPolicy implements CameraStateMonitor.CameraCompa
final int newCameraCompatMode = getCameraCompatMode(cameraActivity);
if (newCameraCompatMode != existingCameraCompatMode) {
mIsCameraCompatTreatmentPending = true;
+ mCameraTask = cameraActivity.getTask();
cameraActivity.mAppCompatController.getAppCompatCameraOverrides()
.setFreeformCameraCompatMode(newCameraCompatMode);
forceUpdateActivityAndTask(cameraActivity);
@@ -127,18 +132,22 @@ final class CameraCompatFreeformPolicy implements CameraStateMonitor.CameraCompa
}
@Override
- public boolean onCameraClosed(@NonNull ActivityRecord cameraActivity,
- @NonNull String cameraId) {
- if (isActivityForCameraIdRefreshing(cameraId)) {
- ProtoLog.v(ProtoLogGroup.WM_DEBUG_STATES,
- "Display id=%d is notified that Camera %s is closed but activity is"
- + " still refreshing. Rescheduling an update.",
- mDisplayContent.mDisplayId, cameraId);
- return false;
+ public boolean onCameraClosed(@NonNull String cameraId) {
+ // Top activity in the same task as the camera activity, or `null` if the task is
+ // closed.
+ final ActivityRecord topActivity = mCameraTask != null
+ ? mCameraTask.getTopActivity(/* isFinishing */ false, /* includeOverlays */ false)
+ : null;
+ if (topActivity != null) {
+ if (isActivityForCameraIdRefreshing(topActivity, cameraId)) {
+ ProtoLog.v(ProtoLogGroup.WM_DEBUG_STATES,
+ "Display id=%d is notified that Camera %s is closed but activity is"
+ + " still refreshing. Rescheduling an update.",
+ mDisplayContent.mDisplayId, cameraId);
+ return false;
+ }
}
- cameraActivity.mAppCompatController.getAppCompatCameraOverrides()
- .setFreeformCameraCompatMode(CameraCompatTaskInfo.CAMERA_COMPAT_FREEFORM_NONE);
- forceUpdateActivityAndTask(cameraActivity);
+ mCameraTask = null;
mIsCameraCompatTreatmentPending = false;
return true;
}
@@ -186,10 +195,9 @@ final class CameraCompatFreeformPolicy implements CameraStateMonitor.CameraCompa
&& !activity.isEmbedded();
}
- private boolean isActivityForCameraIdRefreshing(@NonNull String cameraId) {
- final ActivityRecord topActivity = mDisplayContent.topRunningActivity(
- /* considerKeyguardState= */ true);
- if (topActivity == null || !isTreatmentEnabledForActivity(topActivity)
+ private boolean isActivityForCameraIdRefreshing(@NonNull ActivityRecord topActivity,
+ @NonNull String cameraId) {
+ if (!isTreatmentEnabledForActivity(topActivity)
|| mCameraStateMonitor.isCameraWithIdRunningForActivity(topActivity, cameraId)) {
return false;
}
diff --git a/services/core/java/com/android/server/wm/CameraStateMonitor.java b/services/core/java/com/android/server/wm/CameraStateMonitor.java
index a54141ce5230..068fc001ae2c 100644
--- a/services/core/java/com/android/server/wm/CameraStateMonitor.java
+++ b/services/core/java/com/android/server/wm/CameraStateMonitor.java
@@ -61,9 +61,6 @@ class CameraStateMonitor {
@NonNull
private final Handler mHandler;
- @Nullable
- private ActivityRecord mCameraActivity;
-
// Bi-directional map between package names and active camera IDs since we need to 1) get a
// camera id by a package name when resizing the window; 2) get a package name by a camera id
// when camera connection is closed and we need to clean up our records.
@@ -91,13 +88,13 @@ class CameraStateMonitor {
@Override
public void onCameraOpened(@NonNull String cameraId, @NonNull String packageId) {
synchronized (mWmService.mGlobalLock) {
- notifyCameraOpened(cameraId, packageId);
+ notifyCameraOpenedWithDelay(cameraId, packageId);
}
}
@Override
public void onCameraClosed(@NonNull String cameraId) {
synchronized (mWmService.mGlobalLock) {
- notifyCameraClosed(cameraId);
+ notifyCameraClosedWithDelay(cameraId);
}
}
};
@@ -131,8 +128,8 @@ class CameraStateMonitor {
mCameraStateListeners.remove(listener);
}
- private void notifyCameraOpened(
- @NonNull String cameraId, @NonNull String packageName) {
+ private void notifyCameraOpenedWithDelay(@NonNull String cameraId,
+ @NonNull String packageName) {
// If an activity is restarting or camera is flipping, the camera connection can be
// quickly closed and reopened.
mScheduledToBeRemovedCameraIdSet.remove(cameraId);
@@ -142,25 +139,30 @@ class CameraStateMonitor {
// Some apps can’t handle configuration changes coming at the same time with Camera setup so
// delaying orientation update to accommodate for that.
mScheduledCompatModeUpdateCameraIdSet.add(cameraId);
- mHandler.postDelayed(
- () -> {
- synchronized (mWmService.mGlobalLock) {
- if (!mScheduledCompatModeUpdateCameraIdSet.remove(cameraId)) {
- // Camera compat mode update has happened already or was cancelled
- // because camera was closed.
- return;
- }
- mCameraIdPackageBiMapping.put(packageName, cameraId);
- mCameraActivity = findCameraActivity(packageName);
- if (mCameraActivity == null || mCameraActivity.getTask() == null) {
- return;
- }
- notifyListenersCameraOpened(mCameraActivity, cameraId);
- }
- },
+ mHandler.postDelayed(() -> notifyCameraOpenedInternal(cameraId, packageName),
CAMERA_OPENED_LETTERBOX_UPDATE_DELAY_MS);
}
+ private void notifyCameraOpenedInternal(@NonNull String cameraId, @NonNull String packageName) {
+ synchronized (mWmService.mGlobalLock) {
+ if (!mScheduledCompatModeUpdateCameraIdSet.remove(cameraId)) {
+ // Camera compat mode update has happened already or was cancelled
+ // because camera was closed.
+ return;
+ }
+ mCameraIdPackageBiMapping.put(packageName, cameraId);
+ // If there are multiple activities of the same package name and none of
+ // them are the top running activity, we do not apply treatment (rather than
+ // guessing and applying it to the wrong activity).
+ final ActivityRecord cameraActivity =
+ findUniqueActivityWithPackageName(packageName);
+ if (cameraActivity == null || cameraActivity.getTask() == null) {
+ return;
+ }
+ notifyListenersCameraOpened(cameraActivity, cameraId);
+ }
+ }
+
private void notifyListenersCameraOpened(@NonNull ActivityRecord cameraActivity,
@NonNull String cameraId) {
for (int i = 0; i < mCameraStateListeners.size(); i++) {
@@ -174,7 +176,13 @@ class CameraStateMonitor {
}
}
- private void notifyCameraClosed(@NonNull String cameraId) {
+ /**
+ * Processes camera closed, and schedules notifying listeners.
+ *
+ * <p>The delay is introduced to avoid flickering when switching between front and back camera,
+ * and when an activity is refreshed due to camera compat treatment.
+ */
+ private void notifyCameraClosedWithDelay(@NonNull String cameraId) {
ProtoLog.v(WM_DEBUG_STATES,
"Display id=%d is notified that Camera %s is closed.",
mDisplayContent.mDisplayId, cameraId);
@@ -217,9 +225,10 @@ class CameraStateMonitor {
// Already reconnected to this camera, no need to clean up.
return;
}
- if (mCameraActivity != null && mCurrentListenerForCameraActivity != null) {
+
+ if (mCurrentListenerForCameraActivity != null) {
boolean closeSuccessful =
- mCurrentListenerForCameraActivity.onCameraClosed(mCameraActivity, cameraId);
+ mCurrentListenerForCameraActivity.onCameraClosed(cameraId);
if (closeSuccessful) {
mCameraIdPackageBiMapping.removeCameraId(cameraId);
mCurrentListenerForCameraActivity = null;
@@ -231,8 +240,14 @@ class CameraStateMonitor {
}
// TODO(b/335165310): verify that this works in multi instance and permission dialogs.
+ /**
+ * Finds a visible activity with the given package name.
+ *
+ * <p>If there are multiple visible activities with a given package name, and none of them are
+ * the `topRunningActivity`, returns null.
+ */
@Nullable
- private ActivityRecord findCameraActivity(@NonNull String packageName) {
+ private ActivityRecord findUniqueActivityWithPackageName(@NonNull String packageName) {
final ActivityRecord topActivity = mDisplayContent.topRunningActivity(
/* considerKeyguardState= */ true);
if (topActivity != null && topActivity.packageName.equals(packageName)) {
@@ -277,11 +292,11 @@ class CameraStateMonitor {
// TODO(b/336474959): try to decouple `cameraId` from the listeners.
boolean onCameraOpened(@NonNull ActivityRecord cameraActivity, @NonNull String cameraId);
/**
- * Notifies the compat listener that an activity has closed the camera.
+ * Notifies the compat listener that camera is closed.
*
* @return true if cleanup has been successful - the notifier might try again if false.
*/
// TODO(b/336474959): try to decouple `cameraId` from the listeners.
- boolean onCameraClosed(@NonNull ActivityRecord cameraActivity, @NonNull String cameraId);
+ boolean onCameraClosed(@NonNull String cameraId);
}
}
diff --git a/services/core/java/com/android/server/wm/ConfigurationContainer.java b/services/core/java/com/android/server/wm/ConfigurationContainer.java
index efd52026cfec..3ebaf03c4a31 100644
--- a/services/core/java/com/android/server/wm/ConfigurationContainer.java
+++ b/services/core/java/com/android/server/wm/ConfigurationContainer.java
@@ -22,14 +22,23 @@ import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_RECENTS;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_UNDEFINED;
+import static android.app.WindowConfiguration.ROTATION_UNDEFINED;
import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM;
import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED;
import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED;
import static android.app.WindowConfiguration.activityTypeToString;
+import static android.app.WindowConfiguration.isFloating;
import static android.app.WindowConfiguration.windowingModeToString;
import static android.app.WindowConfigurationProto.WINDOWING_MODE;
import static android.content.ConfigurationProto.WINDOW_CONFIGURATION;
+import static android.content.pm.ActivityInfo.INSETS_DECOUPLED_CONFIGURATION_ENFORCED;
+import static android.content.pm.ActivityInfo.OVERRIDE_ENABLE_INSETS_DECOUPLED_CONFIGURATION;
+import static android.content.res.Configuration.ORIENTATION_LANDSCAPE;
+import static android.content.res.Configuration.ORIENTATION_PORTRAIT;
+import static android.content.res.Configuration.ORIENTATION_UNDEFINED;
+import static android.view.Surface.ROTATION_270;
+import static android.view.Surface.ROTATION_90;
import static com.android.server.wm.ConfigurationContainerProto.FULL_CONFIGURATION;
import static com.android.server.wm.ConfigurationContainerProto.MERGED_OVERRIDE_CONFIGURATION;
@@ -38,11 +47,14 @@ import static com.android.server.wm.ConfigurationContainerProto.OVERRIDE_CONFIGU
import android.annotation.CallSuper;
import android.annotation.NonNull;
import android.app.WindowConfiguration;
+import android.content.pm.ApplicationInfo;
import android.content.res.Configuration;
import android.graphics.Point;
import android.graphics.Rect;
import android.os.LocaleList;
+import android.util.DisplayMetrics;
import android.util.proto.ProtoOutputStream;
+import android.view.DisplayInfo;
import com.android.internal.annotations.VisibleForTesting;
@@ -173,6 +185,110 @@ public abstract class ConfigurationContainer<E extends ConfigurationContainer> {
mResolvedOverrideConfiguration.setTo(mRequestedOverrideConfiguration);
}
+ /**
+ * If necessary, override configuration fields related to app bounds.
+ * This will happen when the app is targeting SDK earlier than 35.
+ * The insets and configuration has decoupled since SDK level 35, to make the system
+ * compatible to existing apps, override the configuration with legacy metrics. In legacy
+ * metrics, fields such as appBounds will exclude some of the system bar areas.
+ * The override contains all potentially affected fields in Configuration, including
+ * screenWidthDp, screenHeightDp, smallestScreenWidthDp, and orientation.
+ * All overrides to those fields should be in this method.
+ *
+ * TODO: Consider integrate this with computeConfigByResolveHint()
+ */
+ static void applySizeOverrideIfNeeded(DisplayContent displayContent, ApplicationInfo appInfo,
+ Configuration newParentConfiguration, Configuration inOutConfig,
+ boolean optsOutEdgeToEdge, boolean hasFixedRotationTransform,
+ boolean hasCompatDisplayInsets) {
+ if (displayContent == null) {
+ return;
+ }
+ final boolean useOverrideInsetsForConfig =
+ displayContent.mWmService.mFlags.mInsetsDecoupledConfiguration
+ ? !appInfo.isChangeEnabled(INSETS_DECOUPLED_CONFIGURATION_ENFORCED)
+ && !appInfo.isChangeEnabled(
+ OVERRIDE_ENABLE_INSETS_DECOUPLED_CONFIGURATION)
+ : appInfo.isChangeEnabled(OVERRIDE_ENABLE_INSETS_DECOUPLED_CONFIGURATION);
+ final int parentWindowingMode =
+ newParentConfiguration.windowConfiguration.getWindowingMode();
+ final boolean isFloating = isFloating(parentWindowingMode)
+ // Check the requested windowing mode of activity as well in case it is
+ // switching between PiP and fullscreen.
+ && (inOutConfig.windowConfiguration.getWindowingMode() == WINDOWING_MODE_UNDEFINED
+ || isFloating(inOutConfig.windowConfiguration.getWindowingMode()));
+ int rotation = newParentConfiguration.windowConfiguration.getRotation();
+ if (rotation == ROTATION_UNDEFINED && !hasFixedRotationTransform) {
+ rotation = displayContent.getRotation();
+ }
+ if (!optsOutEdgeToEdge && (!useOverrideInsetsForConfig
+ || hasCompatDisplayInsets
+ || isFloating
+ || rotation == ROTATION_UNDEFINED)) {
+ // If the insets configuration decoupled logic is not enabled for the app, or the app
+ // already has a compat override, or the context doesn't contain enough info to
+ // calculate the override, skip the override.
+ return;
+ }
+ // Make sure the orientation related fields will be updated by the override insets, because
+ // fixed rotation has assigned the fields from display's configuration.
+ if (hasFixedRotationTransform) {
+ inOutConfig.windowConfiguration.setAppBounds(null);
+ inOutConfig.screenWidthDp = Configuration.SCREEN_WIDTH_DP_UNDEFINED;
+ inOutConfig.screenHeightDp = Configuration.SCREEN_HEIGHT_DP_UNDEFINED;
+ inOutConfig.smallestScreenWidthDp = Configuration.SMALLEST_SCREEN_WIDTH_DP_UNDEFINED;
+ inOutConfig.orientation = ORIENTATION_UNDEFINED;
+ }
+
+ // Override starts here.
+ final boolean rotated = (rotation == ROTATION_90 || rotation == ROTATION_270);
+ final int dw = rotated
+ ? displayContent.mBaseDisplayHeight
+ : displayContent.mBaseDisplayWidth;
+ final int dh = rotated
+ ? displayContent.mBaseDisplayWidth
+ : displayContent.mBaseDisplayHeight;
+ // This should be the only place override the configuration for ActivityRecord. Override
+ // the value if not calculated yet.
+ Rect outAppBounds = inOutConfig.windowConfiguration.getAppBounds();
+ if (outAppBounds == null || outAppBounds.isEmpty()) {
+ inOutConfig.windowConfiguration.setAppBounds(
+ newParentConfiguration.windowConfiguration.getBounds());
+ outAppBounds = inOutConfig.windowConfiguration.getAppBounds();
+ outAppBounds.inset(displayContent.getDisplayPolicy()
+ .getDecorInsetsInfo(rotation, dw, dh).mOverrideNonDecorInsets);
+ }
+ float density = inOutConfig.densityDpi;
+ if (density == Configuration.DENSITY_DPI_UNDEFINED) {
+ density = newParentConfiguration.densityDpi;
+ }
+ density *= DisplayMetrics.DENSITY_DEFAULT_SCALE;
+ if (inOutConfig.screenWidthDp == Configuration.SCREEN_WIDTH_DP_UNDEFINED) {
+ inOutConfig.screenWidthDp = (int) (outAppBounds.width() / density + 0.5f);
+ }
+ if (inOutConfig.screenHeightDp == Configuration.SCREEN_HEIGHT_DP_UNDEFINED) {
+ inOutConfig.screenHeightDp = (int) (outAppBounds.height() / density + 0.5f);
+ }
+ if (inOutConfig.smallestScreenWidthDp == Configuration.SMALLEST_SCREEN_WIDTH_DP_UNDEFINED
+ && parentWindowingMode == WINDOWING_MODE_FULLSCREEN) {
+ // For the case of PIP transition and multi-window environment, the
+ // smallestScreenWidthDp is handled already. Override only if the app is in
+ // fullscreen.
+ final DisplayInfo info = new DisplayInfo(displayContent.getDisplayInfo());
+ displayContent.computeSizeRanges(info, rotated, dw, dh,
+ displayContent.getDisplayMetrics().density,
+ inOutConfig, true /* overrideConfig */);
+ }
+
+ // It's possible that screen size will be considered in different orientation with or
+ // without considering the system bar insets. Override orientation as well.
+ if (inOutConfig.orientation == ORIENTATION_UNDEFINED) {
+ inOutConfig.orientation = (inOutConfig.screenWidthDp <= inOutConfig.screenHeightDp)
+ ? ORIENTATION_PORTRAIT
+ : ORIENTATION_LANDSCAPE;
+ }
+ }
+
/** Returns {@code true} if requested override override configuration is not empty. */
boolean hasRequestedOverrideConfiguration() {
return mHasOverrideConfiguration;
diff --git a/services/core/java/com/android/server/wm/DesktopModeBoundsCalculator.java b/services/core/java/com/android/server/wm/DesktopModeBoundsCalculator.java
new file mode 100644
index 000000000000..3ecdff6b18a0
--- /dev/null
+++ b/services/core/java/com/android/server/wm/DesktopModeBoundsCalculator.java
@@ -0,0 +1,357 @@
+/*
+ * 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.server.wm;
+
+import static android.content.pm.ActivityInfo.isFixedOrientationLandscape;
+import static android.content.pm.ActivityInfo.isFixedOrientationPortrait;
+import static android.content.res.Configuration.ORIENTATION_LANDSCAPE;
+import static android.content.res.Configuration.ORIENTATION_PORTRAIT;
+
+import static com.android.server.wm.AppCompatConfiguration.DEFAULT_LETTERBOX_ASPECT_RATIO_FOR_MULTI_WINDOW;
+import static com.android.server.wm.AppCompatConfiguration.MIN_FIXED_ORIENTATION_LETTERBOX_ASPECT_RATIO;
+import static com.android.server.wm.AppCompatUtils.computeAspectRatio;
+import static com.android.server.wm.LaunchParamsUtil.applyLayoutGravity;
+import static com.android.server.wm.LaunchParamsUtil.calculateLayoutBounds;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.app.ActivityOptions;
+import android.app.AppCompatTaskInfo;
+import android.app.TaskInfo;
+import android.content.pm.ActivityInfo;
+import android.content.res.Configuration;
+import android.graphics.Rect;
+import android.os.SystemProperties;
+import android.util.Size;
+import android.view.Gravity;
+
+import com.android.internal.R;
+import com.android.internal.annotations.VisibleForTesting;
+import com.android.window.flags.Flags;
+
+import java.util.function.Consumer;
+
+/**
+ * Calculates the value of the {@link LaunchParamsController.LaunchParams} bounds for the
+ * {@link DesktopModeLaunchParamsModifier}.
+ */
+public final class DesktopModeBoundsCalculator {
+
+ public static final float DESKTOP_MODE_INITIAL_BOUNDS_SCALE = SystemProperties
+ .getInt("persist.wm.debug.desktop_mode_initial_bounds_scale", 75) / 100f;
+ public static final int DESKTOP_MODE_LANDSCAPE_APP_PADDING = SystemProperties
+ .getInt("persist.wm.debug.desktop_mode_landscape_app_padding", 25);
+
+ /**
+ * Updates launch bounds for an activity with respect to its activity options, window layout,
+ * android manifest and task configuration.
+ */
+ static void updateInitialBounds(@NonNull Task task, @Nullable ActivityInfo.WindowLayout layout,
+ @Nullable ActivityRecord activity, @Nullable ActivityOptions options,
+ @NonNull Rect outBounds, @NonNull Consumer<String> logger) {
+ // Use stable frame instead of raw frame to avoid launching freeform windows on top of
+ // stable insets, which usually are system widgets such as sysbar & navbar.
+ final Rect stableBounds = new Rect();
+ task.getDisplayArea().getStableRect(stableBounds);
+
+ if (options != null && options.getLaunchBounds() != null) {
+ outBounds.set(options.getLaunchBounds());
+ logger.accept("inherit-from-options=" + outBounds);
+ } else if (layout != null) {
+ final int verticalGravity = layout.gravity & Gravity.VERTICAL_GRAVITY_MASK;
+ final int horizontalGravity = layout.gravity & Gravity.HORIZONTAL_GRAVITY_MASK;
+ if (layout.hasSpecifiedSize()) {
+ calculateLayoutBounds(stableBounds, layout, outBounds,
+ calculateIdealSize(stableBounds, DESKTOP_MODE_INITIAL_BOUNDS_SCALE));
+ applyLayoutGravity(verticalGravity, horizontalGravity, outBounds,
+ stableBounds);
+ logger.accept("layout specifies sizes, inheriting size and applying gravity");
+ } else if (verticalGravity > 0 || horizontalGravity > 0) {
+ outBounds.set(calculateInitialBounds(task, activity, stableBounds));
+ applyLayoutGravity(verticalGravity, horizontalGravity, outBounds,
+ stableBounds);
+ logger.accept("layout specifies gravity, applying desired bounds and gravity");
+ }
+ } else {
+ outBounds.set(calculateInitialBounds(task, activity, stableBounds));
+ logger.accept("layout not specified, applying desired bounds");
+ }
+ }
+
+ /**
+ * Calculates the initial bounds required for an application to fill a scale of the display
+ * bounds without any letterboxing. This is done by taking into account the applications
+ * fullscreen size, aspect ratio, orientation and resizability to calculate an area this is
+ * compatible with the applications previous configuration.
+ */
+ private static @NonNull Rect calculateInitialBounds(@NonNull Task task,
+ @NonNull ActivityRecord activity, @NonNull Rect stableBounds
+ ) {
+ final TaskInfo taskInfo = task.getTaskInfo();
+ // Display bounds not taking into account insets.
+ final TaskDisplayArea displayArea = task.getDisplayArea();
+ final Rect screenBounds = displayArea.getBounds();
+ final Size idealSize = calculateIdealSize(screenBounds, DESKTOP_MODE_INITIAL_BOUNDS_SCALE);
+ if (!Flags.enableWindowingDynamicInitialBounds()) {
+ return centerInScreen(idealSize, screenBounds);
+ }
+ // TODO(b/353457301): Replace with app compat aspect ratio method when refactoring complete.
+ float appAspectRatio = calculateAspectRatio(task, activity);
+ final float tdaWidth = stableBounds.width();
+ final float tdaHeight = stableBounds.height();
+ final int activityOrientation = activity.getOverrideOrientation();
+ final Size initialSize = switch (taskInfo.configuration.orientation) {
+ case ORIENTATION_LANDSCAPE -> {
+ // Device in landscape orientation.
+ if (appAspectRatio == 0) {
+ appAspectRatio = 1;
+ }
+ if (taskInfo.isResizeable) {
+ if (isFixedOrientationPortrait(activityOrientation)) {
+ // For portrait resizeable activities, respect apps fullscreen width but
+ // apply ideal size height.
+ yield new Size((int) ((tdaHeight / appAspectRatio) + 0.5f),
+ idealSize.getHeight());
+ }
+ // For landscape resizeable activities, simply apply ideal size.
+ yield idealSize;
+ }
+ // If activity is unresizeable, regardless of orientation, calculate maximum size
+ // (within the ideal size) maintaining original aspect ratio.
+ yield maximizeSizeGivenAspectRatio(
+ activity.getOverrideOrientation(), idealSize, appAspectRatio);
+ }
+ case ORIENTATION_PORTRAIT -> {
+ // Device in portrait orientation.
+ final int customPortraitWidthForLandscapeApp = screenBounds.width()
+ - (DESKTOP_MODE_LANDSCAPE_APP_PADDING * 2);
+ if (taskInfo.isResizeable) {
+ if (isFixedOrientationLandscape(activityOrientation)) {
+ if (appAspectRatio == 0) {
+ appAspectRatio = tdaWidth / (tdaWidth - 1);
+ }
+ // For landscape resizeable activities, respect apps fullscreen height and
+ // apply custom app width.
+ yield new Size(customPortraitWidthForLandscapeApp,
+ (int) ((tdaWidth / appAspectRatio) + 0.5f));
+ }
+ // For portrait resizeable activities, simply apply ideal size.
+ yield idealSize;
+ }
+ if (appAspectRatio == 0) {
+ appAspectRatio = 1;
+ }
+ if (isFixedOrientationLandscape(activityOrientation)) {
+ // For landscape unresizeable activities, apply custom app width to ideal size
+ // and calculate maximum size with this area while maintaining original aspect
+ // ratio.
+ yield maximizeSizeGivenAspectRatio(activityOrientation,
+ new Size(customPortraitWidthForLandscapeApp, idealSize.getHeight()),
+ appAspectRatio);
+ }
+ // For portrait unresizeable activities, calculate maximum size (within the ideal
+ // size) maintaining original aspect ratio.
+ yield maximizeSizeGivenAspectRatio(activityOrientation, idealSize, appAspectRatio);
+ }
+ default -> idealSize;
+ };
+ return centerInScreen(initialSize, screenBounds);
+ }
+
+ /**
+ * Calculates the largest size that can fit in a given area while maintaining a specific aspect
+ * ratio.
+ */
+ private static @NonNull Size maximizeSizeGivenAspectRatio(
+ @ActivityInfo.ScreenOrientation int orientation,
+ @NonNull Size targetArea,
+ float aspectRatio
+ ) {
+ final int targetHeight = targetArea.getHeight();
+ final int targetWidth = targetArea.getWidth();
+ final int finalHeight;
+ final int finalWidth;
+ if (isFixedOrientationPortrait(orientation)) {
+ // Portrait activity.
+ // Calculate required width given ideal height and aspect ratio.
+ int tempWidth = (int) (targetHeight / aspectRatio);
+ if (tempWidth <= targetWidth) {
+ // If the calculated width does not exceed the ideal width, overall size is within
+ // ideal size and can be applied.
+ finalHeight = targetHeight;
+ finalWidth = tempWidth;
+ } else {
+ // Applying target height cause overall size to exceed ideal size when maintain
+ // aspect ratio. Instead apply ideal width and calculate required height to respect
+ // aspect ratio.
+ finalWidth = targetWidth;
+ finalHeight = (int) (finalWidth * aspectRatio);
+ }
+ } else {
+ // Landscape activity.
+ // Calculate required width given ideal height and aspect ratio.
+ int tempWidth = (int) (targetHeight * aspectRatio);
+ if (tempWidth <= targetWidth) {
+ // If the calculated width does not exceed the ideal width, overall size is within
+ // ideal size and can be applied.
+ finalHeight = targetHeight;
+ finalWidth = tempWidth;
+ } else {
+ // Applying target height cause overall size to exceed ideal size when maintain
+ // aspect ratio. Instead apply ideal width and calculate required height to respect
+ // aspect ratio.
+ finalWidth = targetWidth;
+ finalHeight = (int) (finalWidth / aspectRatio);
+ }
+ }
+ return new Size(finalWidth, finalHeight);
+ }
+
+ /**
+ * Calculates the aspect ratio of an activity from its fullscreen bounds.
+ */
+ @VisibleForTesting
+ static float calculateAspectRatio(@NonNull Task task, @NonNull ActivityRecord activity) {
+ final TaskInfo taskInfo = task.getTaskInfo();
+ final float fullscreenWidth = task.getDisplayArea().getBounds().width();
+ final float fullscreenHeight = task.getDisplayArea().getBounds().height();
+ final float maxAspectRatio = activity.getMaxAspectRatio();
+ final float minAspectRatio = activity.getMinAspectRatio();
+ float desiredAspectRatio = 0;
+ if (taskInfo.isRunning) {
+ final AppCompatTaskInfo appCompatTaskInfo = taskInfo.appCompatTaskInfo;
+ if (appCompatTaskInfo.topActivityBoundsLetterboxed) {
+ desiredAspectRatio = (float) Math.max(
+ appCompatTaskInfo.topActivityLetterboxWidth,
+ appCompatTaskInfo.topActivityLetterboxHeight)
+ / Math.min(appCompatTaskInfo.topActivityLetterboxWidth,
+ appCompatTaskInfo.topActivityLetterboxHeight);
+ } else {
+ desiredAspectRatio = Math.max(fullscreenHeight, fullscreenWidth)
+ / Math.min(fullscreenHeight, fullscreenWidth);
+ }
+ } else {
+ final float letterboxAspectRatioOverride =
+ getFixedOrientationLetterboxAspectRatio(activity, task);
+ if (!task.mDisplayContent.getIgnoreOrientationRequest()) {
+ desiredAspectRatio = DEFAULT_LETTERBOX_ASPECT_RATIO_FOR_MULTI_WINDOW;
+ } else if (letterboxAspectRatioOverride
+ > MIN_FIXED_ORIENTATION_LETTERBOX_ASPECT_RATIO) {
+ desiredAspectRatio = letterboxAspectRatioOverride;
+ }
+ }
+ // If the activity matches display orientation, the display aspect ratio should be used
+ if (activityMatchesDisplayOrientation(
+ taskInfo.configuration.orientation,
+ activity.getOverrideOrientation())) {
+ desiredAspectRatio = Math.max(fullscreenWidth, fullscreenHeight)
+ / Math.min(fullscreenWidth, fullscreenHeight);
+ }
+ if (maxAspectRatio >= 1 && desiredAspectRatio > maxAspectRatio) {
+ desiredAspectRatio = maxAspectRatio;
+ } else if (minAspectRatio >= 1 && desiredAspectRatio < minAspectRatio) {
+ desiredAspectRatio = minAspectRatio;
+ }
+ return desiredAspectRatio;
+ }
+
+ private static boolean activityMatchesDisplayOrientation(
+ @Configuration.Orientation int deviceOrientation,
+ @ActivityInfo.ScreenOrientation int activityOrientation) {
+ if (deviceOrientation == ORIENTATION_PORTRAIT) {
+ return isFixedOrientationPortrait(activityOrientation);
+ }
+ return isFixedOrientationLandscape(activityOrientation);
+ }
+
+ /**
+ * Calculates the desired initial bounds for applications in desktop windowing. This is done as
+ * a scale of the screen bounds.
+ */
+ private static @NonNull Size calculateIdealSize(@NonNull Rect screenBounds, float scale) {
+ final int width = (int) (screenBounds.width() * scale);
+ final int height = (int) (screenBounds.height() * scale);
+ return new Size(width, height);
+ }
+
+ /**
+ * Adjusts bounds to be positioned in the middle of the screen.
+ */
+ private static @NonNull Rect centerInScreen(@NonNull Size desiredSize,
+ @NonNull Rect screenBounds) {
+ // TODO(b/325240051): Position apps with bottom heavy offset
+ final int heightOffset = (screenBounds.height() - desiredSize.getHeight()) / 2;
+ final int widthOffset = (screenBounds.width() - desiredSize.getWidth()) / 2;
+ final Rect resultBounds = new Rect(0, 0,
+ desiredSize.getWidth(), desiredSize.getHeight());
+ resultBounds.offset(screenBounds.left + widthOffset, screenBounds.top + heightOffset);
+ return resultBounds;
+ }
+
+ private static float getFixedOrientationLetterboxAspectRatio(@NonNull ActivityRecord activity,
+ @NonNull Task task) {
+ return activity.shouldCreateCompatDisplayInsets()
+ ? getDefaultMinAspectRatioForUnresizableApps(activity, task)
+ : activity.mAppCompatController.getAppCompatAspectRatioOverrides()
+ .getDefaultMinAspectRatio();
+ }
+
+ private static float getDefaultMinAspectRatioForUnresizableApps(
+ @NonNull ActivityRecord activity,
+ @NonNull Task task) {
+ final AppCompatAspectRatioOverrides appCompatAspectRatioOverrides =
+ activity.mAppCompatController.getAppCompatAspectRatioOverrides();
+ if (appCompatAspectRatioOverrides.isSplitScreenAspectRatioForUnresizableAppsEnabled()) {
+ // Default letterbox aspect ratio for unresizable apps.
+ return getSplitScreenAspectRatio(activity, task);
+ }
+
+ if (appCompatAspectRatioOverrides.getDefaultMinAspectRatioForUnresizableAppsFromConfig()
+ > MIN_FIXED_ORIENTATION_LETTERBOX_ASPECT_RATIO) {
+ return appCompatAspectRatioOverrides
+ .getDefaultMinAspectRatioForUnresizableAppsFromConfig();
+ }
+
+ return appCompatAspectRatioOverrides.getDefaultMinAspectRatio();
+ }
+
+ /**
+ * Calculates the aspect ratio of the available display area when an app enters split-screen on
+ * a given device, taking into account any dividers and insets.
+ */
+ private static float getSplitScreenAspectRatio(@NonNull ActivityRecord activity,
+ @NonNull Task task) {
+ final int dividerWindowWidth =
+ activity.mWmService.mContext.getResources().getDimensionPixelSize(
+ R.dimen.docked_stack_divider_thickness);
+ final int dividerInsets =
+ activity.mWmService.mContext.getResources().getDimensionPixelSize(
+ R.dimen.docked_stack_divider_insets);
+ final int dividerSize = dividerWindowWidth - dividerInsets * 2;
+ final Rect bounds = new Rect(0, 0,
+ task.mDisplayContent.getDisplayInfo().appWidth,
+ task.mDisplayContent.getDisplayInfo().appHeight);
+ if (bounds.width() >= bounds.height()) {
+ bounds.inset(/* dx */ dividerSize / 2, /* dy */ 0);
+ bounds.right = bounds.centerX();
+ } else {
+ bounds.inset(/* dx */ 0, /* dy */ dividerSize / 2);
+ bounds.bottom = bounds.centerY();
+ }
+ return computeAspectRatio(bounds);
+ }
+}
diff --git a/services/core/java/com/android/server/wm/DesktopModeHelper.java b/services/core/java/com/android/server/wm/DesktopModeHelper.java
new file mode 100644
index 000000000000..e0c0c2c60123
--- /dev/null
+++ b/services/core/java/com/android/server/wm/DesktopModeHelper.java
@@ -0,0 +1,66 @@
+/*
+ * 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.server.wm;
+
+import android.annotation.NonNull;
+import android.content.Context;
+import android.os.SystemProperties;
+
+import com.android.internal.R;
+import com.android.internal.annotations.VisibleForTesting;
+import com.android.server.wm.utils.DesktopModeFlagsUtil;
+
+/**
+ * Constants for desktop mode feature
+ */
+public final class DesktopModeHelper {
+ /**
+ * Flag to indicate whether to restrict desktop mode to supported devices.
+ */
+ private static final boolean ENFORCE_DEVICE_RESTRICTIONS = SystemProperties.getBoolean(
+ "persist.wm.debug.desktop_mode_enforce_device_restrictions", true);
+
+ /** Whether desktop mode is enabled. */
+ static boolean isDesktopModeEnabled(@NonNull Context context) {
+ return DesktopModeFlagsUtil.DESKTOP_WINDOWING_MODE.isEnabled(context);
+ }
+
+ /**
+ * Return {@code true} if desktop mode should be restricted to supported devices.
+ */
+ @VisibleForTesting
+ static boolean shouldEnforceDeviceRestrictions() {
+ return ENFORCE_DEVICE_RESTRICTIONS;
+ }
+
+ /**
+ * Return {@code true} if the current device supports desktop mode.
+ */
+ // TODO(b/337819319): use a companion object instead.
+ @VisibleForTesting
+ static boolean isDesktopModeSupported(@NonNull Context context) {
+ return context.getResources().getBoolean(R.bool.config_isDesktopModeSupported);
+ }
+
+ /**
+ * Return {@code true} if desktop mode can be entered on the current device.
+ */
+ static boolean canEnterDesktopMode(@NonNull Context context) {
+ return isDesktopModeEnabled(context)
+ && (!shouldEnforceDeviceRestrictions() || isDesktopModeSupported(context));
+ }
+}
diff --git a/services/core/java/com/android/server/wm/DesktopModeLaunchParamsModifier.java b/services/core/java/com/android/server/wm/DesktopModeLaunchParamsModifier.java
index 50ac801a9d04..548addbef39d 100644
--- a/services/core/java/com/android/server/wm/DesktopModeLaunchParamsModifier.java
+++ b/services/core/java/com/android/server/wm/DesktopModeLaunchParamsModifier.java
@@ -18,46 +18,28 @@ package com.android.server.wm;
import static com.android.server.wm.ActivityTaskManagerDebugConfig.TAG_ATM;
import static com.android.server.wm.ActivityTaskManagerDebugConfig.TAG_WITH_CLASS_NAME;
-import static com.android.server.wm.LaunchParamsUtil.applyLayoutGravity;
-import static com.android.server.wm.LaunchParamsUtil.calculateLayoutBounds;
+import static com.android.server.wm.DesktopModeHelper.canEnterDesktopMode;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.app.ActivityOptions;
import android.content.Context;
import android.content.pm.ActivityInfo;
-import android.graphics.Rect;
-import android.os.SystemProperties;
-import android.util.Size;
import android.util.Slog;
-import android.view.Gravity;
-import com.android.internal.R;
-import com.android.internal.annotations.VisibleForTesting;
import com.android.server.wm.LaunchParamsController.LaunchParamsModifier;
-import com.android.window.flags.Flags;
/**
* The class that defines default launch params for tasks in desktop mode
*/
-public class DesktopModeLaunchParamsModifier implements LaunchParamsModifier {
+class DesktopModeLaunchParamsModifier implements LaunchParamsModifier {
private static final String TAG =
TAG_WITH_CLASS_NAME ? "DesktopModeLaunchParamsModifier" : TAG_ATM;
private static final boolean DEBUG = false;
- public static final float DESKTOP_MODE_INITIAL_BOUNDS_SCALE =
- SystemProperties
- .getInt("persist.wm.debug.desktop_mode_initial_bounds_scale", 75) / 100f;
-
- /**
- * Flag to indicate whether to restrict desktop mode to supported devices.
- */
- private static final boolean ENFORCE_DEVICE_RESTRICTIONS = SystemProperties.getBoolean(
- "persist.wm.debug.desktop_mode_enforce_device_restrictions", true);
-
private StringBuilder mLogBuilder;
- private final Context mContext;
+ @NonNull private final Context mContext;
DesktopModeLaunchParamsModifier(@NonNull Context context) {
mContext = context;
@@ -67,8 +49,8 @@ public class DesktopModeLaunchParamsModifier implements LaunchParamsModifier {
public int onCalculate(@Nullable Task task, @Nullable ActivityInfo.WindowLayout layout,
@Nullable ActivityRecord activity, @Nullable ActivityRecord source,
@Nullable ActivityOptions options, @Nullable ActivityStarter.Request request, int phase,
- LaunchParamsController.LaunchParams currentParams,
- LaunchParamsController.LaunchParams outParams) {
+ @NonNull LaunchParamsController.LaunchParams currentParams,
+ @NonNull LaunchParamsController.LaunchParams outParams) {
initLogBuilder(task, activity);
int result = calculate(task, layout, activity, source, options, request, phase,
@@ -80,15 +62,15 @@ public class DesktopModeLaunchParamsModifier implements LaunchParamsModifier {
private int calculate(@Nullable Task task, @Nullable ActivityInfo.WindowLayout layout,
@Nullable ActivityRecord activity, @Nullable ActivityRecord source,
@Nullable ActivityOptions options, @Nullable ActivityStarter.Request request, int phase,
- LaunchParamsController.LaunchParams currentParams,
- LaunchParamsController.LaunchParams outParams) {
+ @NonNull LaunchParamsController.LaunchParams currentParams,
+ @NonNull LaunchParamsController.LaunchParams outParams) {
if (!canEnterDesktopMode(mContext)) {
appendLog("desktop mode is not enabled, skipping");
return RESULT_SKIP;
}
- if (task == null) {
+ if (task == null || !task.isAttached()) {
appendLog("task null, skipping");
return RESULT_SKIP;
}
@@ -123,60 +105,12 @@ public class DesktopModeLaunchParamsModifier implements LaunchParamsModifier {
return RESULT_SKIP;
}
- // Use stable frame instead of raw frame to avoid launching freeform windows on top of
- // stable insets, which usually are system widgets such as sysbar & navbar.
- final Rect stableBounds = new Rect();
- task.getDisplayArea().getStableRect(stableBounds);
- final int desiredWidth = (int) (stableBounds.width() * DESKTOP_MODE_INITIAL_BOUNDS_SCALE);
- final int desiredHeight = (int) (stableBounds.height() * DESKTOP_MODE_INITIAL_BOUNDS_SCALE);
-
- if (options != null && options.getLaunchBounds() != null) {
- outParams.mBounds.set(options.getLaunchBounds());
- appendLog("inherit-from-options=" + outParams.mBounds);
- } else if (layout != null) {
- final int verticalGravity = layout.gravity & Gravity.VERTICAL_GRAVITY_MASK;
- final int horizontalGravity = layout.gravity & Gravity.HORIZONTAL_GRAVITY_MASK;
- if (layout.hasSpecifiedSize()) {
- calculateLayoutBounds(stableBounds, layout, outParams.mBounds,
- new Size(desiredWidth, desiredHeight));
- applyLayoutGravity(verticalGravity, horizontalGravity, outParams.mBounds,
- stableBounds);
- appendLog("layout specifies sizes, inheriting size and applying gravity");
- } else if (verticalGravity > 0 || horizontalGravity > 0) {
- calculateAndCentreInitialBounds(task, outParams);
- applyLayoutGravity(verticalGravity, horizontalGravity, outParams.mBounds,
- stableBounds);
- appendLog("layout specifies gravity, applying desired bounds and gravity");
- }
- } else {
- calculateAndCentreInitialBounds(task, outParams);
- appendLog("layout not specified, applying desired bounds");
- }
-
+ DesktopModeBoundsCalculator.updateInitialBounds(task, layout, activity, options,
+ outParams.mBounds, this::appendLog);
appendLog("final desktop mode task bounds set to %s", outParams.mBounds);
return RESULT_CONTINUE;
}
- /**
- * Calculates the initial height and width of a task in desktop mode and centers it within the
- * window bounds.
- */
- private void calculateAndCentreInitialBounds(Task task,
- LaunchParamsController.LaunchParams outParams) {
- // TODO(b/319819547): Account for app constraints so apps do not become letterboxed
- final Rect stableBounds = new Rect();
- task.getDisplayArea().getStableRect(stableBounds);
- // The desired dimensions that a fully resizable window should take when initially entering
- // desktop mode. Calculated as a percentage of the available display area as defined by the
- // DESKTOP_MODE_INITIAL_BOUNDS_SCALE.
- final int desiredWidth = (int) (stableBounds.width() * DESKTOP_MODE_INITIAL_BOUNDS_SCALE);
- final int desiredHeight = (int) (stableBounds.height() * DESKTOP_MODE_INITIAL_BOUNDS_SCALE);
- outParams.mBounds.right = desiredWidth;
- outParams.mBounds.bottom = desiredHeight;
- outParams.mBounds.offset(stableBounds.centerX() - outParams.mBounds.centerX(),
- stableBounds.centerY() - outParams.mBounds.centerY());
- }
-
private void initLogBuilder(Task task, ActivityRecord activity) {
if (DEBUG) {
mLogBuilder = new StringBuilder(
@@ -191,34 +125,4 @@ public class DesktopModeLaunchParamsModifier implements LaunchParamsModifier {
private void outputLog() {
if (DEBUG) Slog.d(TAG, mLogBuilder.toString());
}
-
- /** Whether desktop mode is enabled. */
- static boolean isDesktopModeEnabled() {
- return Flags.enableDesktopWindowingMode();
- }
-
- /**
- * Return {@code true} if desktop mode should be restricted to supported devices.
- */
- @VisibleForTesting
- static boolean enforceDeviceRestrictions() {
- return ENFORCE_DEVICE_RESTRICTIONS;
- }
-
- /**
- * Return {@code true} if the current device supports desktop mode.
- */
- // TODO(b/337819319): use a companion object instead.
- @VisibleForTesting
- static boolean isDesktopModeSupported(@NonNull Context context) {
- return context.getResources().getBoolean(R.bool.config_isDesktopModeSupported);
- }
-
- /**
- * Return {@code true} if desktop mode can be entered on the current device.
- */
- static boolean canEnterDesktopMode(@NonNull Context context) {
- return isDesktopModeEnabled()
- && (!enforceDeviceRestrictions() || isDesktopModeSupported(context));
- }
}
diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java
index a8aa0ba1f5e7..fa603682bc40 100644
--- a/services/core/java/com/android/server/wm/DisplayContent.java
+++ b/services/core/java/com/android/server/wm/DisplayContent.java
@@ -1754,6 +1754,82 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
return mDisplayRotation.updateOrientation(orientation, forceUpdate);
}
+ @Nullable
+ private ActivityRecord getLastOrientationSourceApp() {
+ final WindowContainer<?> orientationSrc = getLastOrientationSource();
+ return orientationSrc != null ? orientationSrc.asActivityRecord() : null;
+ }
+
+ /**
+ * This is called when the display rotation is changed. If the current top activity which
+ * decides the display orientation is not opaque, all non-top visible activities with
+ * different fixed orientations will still keep their original appearances.
+ */
+ void applyFixedRotationForNonTopVisibleActivityIfNeeded() {
+ if (!mWmService.mFlags.mRespectNonTopVisibleFixedOrientation) {
+ return;
+ }
+ final ActivityRecord orientationSrcApp = getLastOrientationSourceApp();
+ if (orientationSrcApp == null || orientationSrcApp.fillsParent()) {
+ return;
+ }
+ final int topOrientation = orientationSrcApp.getRequestedOrientation();
+ if (topOrientation == SCREEN_ORIENTATION_UNSPECIFIED) {
+ return;
+ }
+ forAllActivities(ar -> {
+ if (!ar.isVisibleRequested()) {
+ return true;
+ }
+ applyFixedRotationForNonTopVisibleActivityIfNeeded(ar, topOrientation);
+ return false;
+ }, true /* traverseTopToBottom */);
+ }
+
+ /**
+ * This is called when a non-top activity becomes visible. Such when moving a task which
+ * contains 2 activities with different fixed orientations, and if the top one is translucent,
+ * then the bottom one will apply the fixed rotation transform for its orientation.
+ */
+ void applyFixedRotationForNonTopVisibleActivityIfNeeded(@NonNull ActivityRecord ar) {
+ if (!mWmService.mFlags.mRespectNonTopVisibleFixedOrientation) {
+ return;
+ }
+ final ActivityRecord orientationSrcApp = getLastOrientationSourceApp();
+ if (orientationSrcApp != null) {
+ applyFixedRotationForNonTopVisibleActivityIfNeeded(ar,
+ orientationSrcApp.getRequestedOrientation());
+ }
+ }
+
+ /**
+ * If the given visible activity uses a different fixed orientation than the current top, the
+ * fixed rotation transform will be applied to respect its requested appearance.
+ */
+ private void applyFixedRotationForNonTopVisibleActivityIfNeeded(@NonNull ActivityRecord ar,
+ @ActivityInfo.ScreenOrientation int topOrientation) {
+ final int orientation = ar.getRequestedOrientation();
+ if (orientation == topOrientation || ar.inMultiWindowMode()
+ || ar.getRequestedConfigurationOrientation() == ORIENTATION_UNDEFINED) {
+ return;
+ }
+ final int displayRotation = getRotation();
+ final int rotation = ar.isVisible()
+ ? ar.getWindowConfiguration().getDisplayRotation()
+ : mDisplayRotation.rotationForOrientation(orientation, displayRotation);
+ if (rotation == displayRotation) {
+ return;
+ }
+ startFixedRotationTransform(ar, rotation);
+ final WindowState wallpaperTarget = mWallpaperController.getWallpaperTarget();
+ if (wallpaperTarget != null && wallpaperTarget.mActivityRecord == ar) {
+ final WindowState wp = mWallpaperController.getTopVisibleWallpaper();
+ if (wp != null) {
+ wp.mToken.linkFixedRotationTransform(ar);
+ }
+ }
+ }
+
@Override
boolean isSyncFinished(BLASTSyncEngine.SyncGroup group) {
// Do not consider children because if they are requested to be synced, they should be
@@ -1822,10 +1898,23 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
return false;
}
if (r.hasFixedRotationTransform()) {
+ if (mWmService.mFlags.mRespectNonTopVisibleFixedOrientation
+ && mFixedRotationLaunchingApp == null) {
+ // It could be finishing the previous top translucent activity, and the next fixed
+ // orientation activity becomes the current top.
+ setFixedRotationLaunchingAppUnchecked(r,
+ r.getWindowConfiguration().getDisplayRotation());
+ }
// It has been set and not yet finished.
return true;
}
- if (!r.occludesParent() || r.isReportedDrawn()) {
+ if (mWmService.mFlags.mRespectNonTopVisibleFixedOrientation) {
+ if (r.isReportedDrawn()) {
+ // It is late for a drawn app. Either this is already a stable state or it needs
+ // a rotation animation to handle the change.
+ return false;
+ }
+ } else if (!r.occludesParent() || r.isReportedDrawn()) {
// While entering or leaving a translucent or floating activity (e.g. dialog style),
// there is a visible activity in the background. Then it still needs rotation animation
// to cover the activity configuration change.
@@ -3806,6 +3895,22 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
}
/**
+ * Returns the focused window of the given Activity if the Activity is focused.
+ */
+ WindowState findFocusedWindow(ActivityRecord activityRecord) {
+ final ActivityRecord tmpApp = mFocusedApp;
+ mTmpWindow = null;
+ try {
+ mFocusedApp = activityRecord;
+ // mFindFocusedWindow will populate mTmpWindow with the new focused window when found.
+ activityRecord.forAllWindows(mFindFocusedWindow, true /* traverseTopToBottom */);
+ } finally {
+ mFocusedApp = tmpApp;
+ }
+ return mTmpWindow;
+ }
+
+ /**
* Update the focused window and make some adjustments if the focus has changed.
*
* @param mode Indicates the situation we are in. Possible modes are:
@@ -3993,12 +4098,12 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
final Transaction t = mWmService.mTransactionFactory.get();
forAllWindows(w -> {
final WindowStateAnimator wsa = w.mWinAnimator;
- if (wsa.mSurfaceController == null) {
+ if (wsa.mSurfaceControl == null) {
return;
}
if (!mWmService.mSessions.contains(wsa.mSession)) {
Slog.w(TAG_WM, "LEAKED SURFACE (session doesn't exist): "
- + w + " surface=" + wsa.mSurfaceController
+ + w + " surface=" + wsa.mSurfaceControl
+ " token=" + w.mToken
+ " pid=" + w.mSession.mPid
+ " uid=" + w.mSession.mUid);
@@ -4007,7 +4112,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
mTmpWindow = w;
} else if (w.mActivityRecord != null && !w.mActivityRecord.isClientVisible()) {
Slog.w(TAG_WM, "LEAKED SURFACE (app token hidden): "
- + w + " surface=" + wsa.mSurfaceController
+ + w + " surface=" + wsa.mSurfaceControl
+ " token=" + w.mActivityRecord);
ProtoLog.i(WM_SHOW_TRANSACTIONS, "SURFACE LEAK DESTROY: %s", w);
wsa.destroySurface(t);
@@ -6822,6 +6927,10 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
/** Whether {@link #mAnimatingRecents} is going to be the top activity. */
private boolean mRecentsWillBeTop;
+ FixedRotationTransitionListener() {
+ super(DisplayContent.this.mDisplayId);
+ }
+
/**
* If the recents activity has a fixed orientation which is different from the current top
* activity, it will be rotated before being shown so we avoid a screen rotation animation
@@ -6923,7 +7032,11 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
// In most cases this is a no-op if the activity doesn't have fixed rotation.
// Otherwise it could be from finishing recents animation while the display has
// different orientation.
- r.finishFixedRotationTransform();
+ if (!mWmService.mFlags.mRespectNonTopVisibleFixedOrientation) {
+ r.finishFixedRotationTransform();
+ } else if (!r.isVisible()) {
+ r.finishFixedRotationTransform();
+ }
return;
}
if (mFixedRotationLaunchingApp.hasFixedRotationTransform(r)) {
@@ -6938,7 +7051,12 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
// E.g. activity A transferred starting window to B, only A will receive transition
// finished event. A doesn't have fixed rotation but B is the rotated launching app.
final Task task = r.getTask();
- if (task == null || task != mFixedRotationLaunchingApp.getTask()) {
+ if (task != mFixedRotationLaunchingApp.getTask()
+ // When closing a translucent task A (r.fillsParent() is false) to a
+ // visible task B, because only A has visibility change, there is only A's
+ // transition callback. Then it still needs to update orientation for B.
+ && (!mWmService.mFlags.mRespectNonTopVisibleFixedOrientation
+ || r.fillsParent())) {
// Different tasks won't be in one activity transition animation.
return;
}
diff --git a/services/core/java/com/android/server/wm/DisplayPolicy.java b/services/core/java/com/android/server/wm/DisplayPolicy.java
index 80362a44a33f..c3339cde6828 100644
--- a/services/core/java/com/android/server/wm/DisplayPolicy.java
+++ b/services/core/java/com/android/server/wm/DisplayPolicy.java
@@ -588,7 +588,7 @@ public class DisplayPolicy {
gesturesPointerEventCallbacks);
displayContent.registerPointerEventListener(mSystemGestures);
}
- mAppTransitionListener = new WindowManagerInternal.AppTransitionListener() {
+ mAppTransitionListener = new WindowManagerInternal.AppTransitionListener(displayId) {
private Runnable mAppTransitionPending = () -> {
StatusBarManagerInternal statusBar = getStatusBarManagerInternal();
diff --git a/services/core/java/com/android/server/wm/DisplayRotation.java b/services/core/java/com/android/server/wm/DisplayRotation.java
index c67928aeeb5d..8272e1609e0d 100644
--- a/services/core/java/com/android/server/wm/DisplayRotation.java
+++ b/services/core/java/com/android/server/wm/DisplayRotation.java
@@ -326,7 +326,7 @@ public class DisplayRotation {
DisplayRotationImmersiveAppCompatPolicy initImmersiveAppCompatPolicy(
WindowManagerService service, DisplayContent displayContent) {
return DisplayRotationImmersiveAppCompatPolicy.createIfNeeded(
- service.mLetterboxConfiguration, this, displayContent);
+ service.mAppCompatConfiguration, this, displayContent);
}
// Change the default value to the value specified in the sysprop
@@ -627,6 +627,7 @@ public class DisplayRotation {
mRotation = rotation;
+ mDisplayContent.applyFixedRotationForNonTopVisibleActivityIfNeeded();
mDisplayContent.setLayoutNeeded();
mDisplayContent.mWaitingForConfig = true;
diff --git a/services/core/java/com/android/server/wm/DisplayRotationCompatPolicy.java b/services/core/java/com/android/server/wm/DisplayRotationCompatPolicy.java
index 9998e1a016d0..e50a089a4d5e 100644
--- a/services/core/java/com/android/server/wm/DisplayRotationCompatPolicy.java
+++ b/services/core/java/com/android/server/wm/DisplayRotationCompatPolicy.java
@@ -44,6 +44,7 @@ import com.android.internal.R;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.protolog.ProtoLog;
import com.android.server.UiThread;
+import com.android.window.flags.Flags;
/**
* Controls camera compatibility treatment that handles orientation mismatch between camera
@@ -69,6 +70,9 @@ final class DisplayRotationCompatPolicy implements CameraStateMonitor.CameraComp
@NonNull
private final ActivityRefresher mActivityRefresher;
+ @Nullable
+ private Task mCameraTask;
+
@ScreenOrientation
private int mLastReportedOrientation = SCREEN_ORIENTATION_UNSET;
@@ -104,7 +108,7 @@ final class DisplayRotationCompatPolicy implements CameraStateMonitor.CameraComp
* guaranteed to match, the rotation can cause letterboxing.
*
* <p>If treatment isn't applicable returns {@link SCREEN_ORIENTATION_UNSPECIFIED}. See {@link
- * #shouldComputeCameraCompatOrientation} for conditions enabling the treatment.
+ * #isTreatmentEnabledForDisplay} for conditions enabling the treatment.
*/
@ScreenOrientation
int getOrientation() {
@@ -136,9 +140,9 @@ final class DisplayRotationCompatPolicy implements CameraStateMonitor.CameraComp
// are aligned when they compute orientation of the preview.
// This means that even for a landscape-only activity and a device with landscape natural
// orientation this would return SCREEN_ORIENTATION_PORTRAIT because an assumption that
- // natural orientation = portrait window = portait camera is the main wrong assumption
+ // natural orientation = portrait window = portrait camera is the main wrong assumption
// that apps make when they implement camera previews so landscape windows need be
- // rotated in the orientation oposite to the natural one even if it's portrait.
+ // rotated in the orientation opposite to the natural one even if it's portrait.
// TODO(b/261475895): Consider allowing more rotations for "sensor" and "user" versions
// of the portrait and landscape orientation requests.
final int orientation = (isPortraitActivity && isNaturalDisplayOrientationPortrait)
@@ -247,7 +251,7 @@ final class DisplayRotationCompatPolicy implements CameraStateMonitor.CameraComp
* </ul>
*/
private boolean isTreatmentEnabledForDisplay() {
- return mWmService.mLetterboxConfiguration.isCameraCompatTreatmentEnabled()
+ return mWmService.mAppCompatConfiguration.isCameraCompatTreatmentEnabled()
&& mDisplayContent.getIgnoreOrientationRequest()
// TODO(b/225928882): Support camera compat rotation for external displays
&& mDisplayContent.getDisplay().getType() == TYPE_INTERNAL;
@@ -296,6 +300,7 @@ final class DisplayRotationCompatPolicy implements CameraStateMonitor.CameraComp
@Override
public boolean onCameraOpened(@NonNull ActivityRecord cameraActivity,
@NonNull String cameraId) {
+ mCameraTask = cameraActivity.getTask();
// Checking whether an activity in fullscreen rather than the task as this camera
// compat treatment doesn't cover activity embedding.
if (cameraActivity.getWindowingMode() == WINDOWING_MODE_FULLSCREEN) {
@@ -305,7 +310,7 @@ final class DisplayRotationCompatPolicy implements CameraStateMonitor.CameraComp
}
// Checking that the whole app is in multi-window mode as we shouldn't show toast
// for the activity embedding case.
- if (cameraActivity.getTask().getWindowingMode() == WINDOWING_MODE_MULTI_WINDOW
+ if (mCameraTask != null && mCameraTask.getWindowingMode() == WINDOWING_MODE_MULTI_WINDOW
&& isTreatmentEnabledForActivity(
cameraActivity, /* mustBeFullscreen */ false)) {
final PackageManager packageManager = mWmService.mContext.getPackageManager();
@@ -342,12 +347,24 @@ final class DisplayRotationCompatPolicy implements CameraStateMonitor.CameraComp
}
@Override
- public boolean onCameraClosed(@NonNull ActivityRecord cameraActivity,
- @NonNull String cameraId) {
+ public boolean onCameraClosed(@NonNull String cameraId) {
+ final ActivityRecord topActivity;
+ if (Flags.cameraCompatFullscreenPickSameTaskActivity()) {
+ topActivity = mCameraTask != null ? mCameraTask.getTopActivity(
+ /* includeFinishing= */ true, /* includeOverlays= */ false) : null;
+ } else {
+ topActivity = mDisplayContent.topRunningActivity(/* considerKeyguardState= */ true);
+ }
+
+ mCameraTask = null;
+ if (topActivity == null) {
+ return true;
+ }
+
synchronized (this) {
// TODO(b/336474959): Once refresh is implemented in `CameraCompatFreeformPolicy`,
// consider checking this in CameraStateMonitor before notifying the listeners (this).
- if (isActivityForCameraIdRefreshing(cameraId)) {
+ if (isActivityForCameraIdRefreshing(topActivity, cameraId)) {
ProtoLog.v(WM_DEBUG_ORIENTATION,
"Display id=%d is notified that camera is closed but activity is"
+ " still refreshing. Rescheduling an update.",
@@ -355,15 +372,13 @@ final class DisplayRotationCompatPolicy implements CameraStateMonitor.CameraComp
return false;
}
}
+
ProtoLog.v(WM_DEBUG_ORIENTATION,
"Display id=%d is notified that Camera is closed, updating rotation.",
mDisplayContent.mDisplayId);
- final ActivityRecord topActivity = mDisplayContent.topRunningActivity(
- /* considerKeyguardState= */ true);
- if (topActivity == null
- // Checking whether an activity in fullscreen rather than the task as this
- // camera compat treatment doesn't cover activity embedding.
- || topActivity.getWindowingMode() != WINDOWING_MODE_FULLSCREEN) {
+ // Checking whether an activity in fullscreen rather than the task as this camera compat
+ // treatment doesn't cover activity embedding.
+ if (topActivity.getWindowingMode() != WINDOWING_MODE_FULLSCREEN) {
return true;
}
recomputeConfigurationForCameraCompatIfNeeded(topActivity);
@@ -372,14 +387,13 @@ final class DisplayRotationCompatPolicy implements CameraStateMonitor.CameraComp
}
// TODO(b/336474959): Do we need cameraId here?
- private boolean isActivityForCameraIdRefreshing(@NonNull String cameraId) {
- final ActivityRecord topActivity = mDisplayContent.topRunningActivity(
- /* considerKeyguardState= */ true);
- if (!isTreatmentEnabledForActivity(topActivity)
- || !mCameraStateMonitor.isCameraWithIdRunningForActivity(topActivity, cameraId)) {
+ private boolean isActivityForCameraIdRefreshing(@NonNull ActivityRecord activity,
+ @NonNull String cameraId) {
+ if (!isTreatmentEnabledForActivity(activity)
+ || !mCameraStateMonitor.isCameraWithIdRunningForActivity(activity, cameraId)) {
return false;
}
- return mActivityRefresher.isActivityRefreshing(topActivity);
+ return mActivityRefresher.isActivityRefreshing(activity);
}
private void recomputeConfigurationForCameraCompatIfNeeded(
diff --git a/services/core/java/com/android/server/wm/DisplayRotationImmersiveAppCompatPolicy.java b/services/core/java/com/android/server/wm/DisplayRotationImmersiveAppCompatPolicy.java
index de70c4df7985..094434d07cfe 100644
--- a/services/core/java/com/android/server/wm/DisplayRotationImmersiveAppCompatPolicy.java
+++ b/services/core/java/com/android/server/wm/DisplayRotationImmersiveAppCompatPolicy.java
@@ -40,28 +40,28 @@ final class DisplayRotationImmersiveAppCompatPolicy {
@Nullable
static DisplayRotationImmersiveAppCompatPolicy createIfNeeded(
- @NonNull final LetterboxConfiguration letterboxConfiguration,
+ @NonNull final AppCompatConfiguration appCompatConfiguration,
@NonNull final DisplayRotation displayRotation,
@NonNull final DisplayContent displayContent) {
- if (!letterboxConfiguration
+ if (!appCompatConfiguration
.isDisplayRotationImmersiveAppCompatPolicyEnabledAtBuildTime()) {
return null;
}
return new DisplayRotationImmersiveAppCompatPolicy(
- letterboxConfiguration, displayRotation, displayContent);
+ appCompatConfiguration, displayRotation, displayContent);
}
private final DisplayRotation mDisplayRotation;
- private final LetterboxConfiguration mLetterboxConfiguration;
+ private final AppCompatConfiguration mAppCompatConfiguration;
private final DisplayContent mDisplayContent;
private DisplayRotationImmersiveAppCompatPolicy(
- @NonNull final LetterboxConfiguration letterboxConfiguration,
+ @NonNull final AppCompatConfiguration appCompatConfiguration,
@NonNull final DisplayRotation displayRotation,
@NonNull final DisplayContent displayContent) {
mDisplayRotation = displayRotation;
- mLetterboxConfiguration = letterboxConfiguration;
+ mAppCompatConfiguration = appCompatConfiguration;
mDisplayContent = displayContent;
}
@@ -80,14 +80,14 @@ final class DisplayRotationImmersiveAppCompatPolicy {
* <li>Rotation will lead to letterboxing due to fixed orientation.
* <li>{@link DisplayContent#getIgnoreOrientationRequest} is {@code true}
* <li>This policy is enabled on the device, for details see
- * {@link LetterboxConfiguration#isDisplayRotationImmersiveAppCompatPolicyEnabled}
+ * {@link AppCompatConfiguration#isDisplayRotationImmersiveAppCompatPolicyEnabled}
* </ul>
*
* @param proposedRotation new proposed {@link Surface.Rotation} for the screen.
* @return {@code true}, if there is a need to lock screen rotation, {@code false} otherwise.
*/
boolean isRotationLockEnforced(@Surface.Rotation final int proposedRotation) {
- if (!mLetterboxConfiguration.isDisplayRotationImmersiveAppCompatPolicyEnabled()) {
+ if (!mAppCompatConfiguration.isDisplayRotationImmersiveAppCompatPolicyEnabled()) {
return false;
}
synchronized (mDisplayContent.mWmService.mGlobalLock) {
diff --git a/services/core/java/com/android/server/wm/DragDropController.java b/services/core/java/com/android/server/wm/DragDropController.java
index 30f2d0d64d13..6abef8b9a048 100644
--- a/services/core/java/com/android/server/wm/DragDropController.java
+++ b/services/core/java/com/android/server/wm/DragDropController.java
@@ -16,6 +16,7 @@
package com.android.server.wm;
+import static android.content.ClipDescription.EXTRA_HIDE_DRAG_SOURCE_TASK_ID;
import static android.os.Trace.TRACE_TAG_WINDOW_MANAGER;
import static android.view.View.DRAG_FLAG_GLOBAL;
import static android.view.View.DRAG_FLAG_GLOBAL_SAME_APPLICATION;
@@ -217,6 +218,11 @@ class DragDropController {
mDragState.mToken = dragToken;
mDragState.mDisplayContent = displayContent;
mDragState.mData = data;
+ mDragState.mCallingTaskIdToHide = shouldMoveCallingTaskToBack(callingWin,
+ flags);
+ if (DEBUG_DRAG) {
+ Slog.d(TAG_WM, "Calling task to hide=" + mDragState.mCallingTaskIdToHide);
+ }
if ((flags & View.DRAG_FLAG_ACCESSIBILITY_ACTION) == 0) {
final Display display = displayContent.getDisplay();
@@ -364,6 +370,23 @@ class DragDropController {
}
/**
+ * If the calling window's task should be hidden for the duration of the drag, this returns the
+ * task id of the task (or -1 otherwise).
+ */
+ private int shouldMoveCallingTaskToBack(WindowState callingWin, int flags) {
+ if ((flags & View.DRAG_FLAG_HIDE_CALLING_TASK_ON_DRAG_START) == 0) {
+ // Not requested by the app
+ return -1;
+ }
+ final ActivityRecord callingActivity = callingWin.getActivityRecord();
+ if (callingActivity == null || callingActivity.getTask() == null) {
+ // Not an activity
+ return -1;
+ }
+ return callingActivity.getTask().mTaskId;
+ }
+
+ /**
* Notifies the unhandled drag listener if needed.
* @return whether the listener was notified and subsequent drag completion should be deferred
* until the listener calls back
diff --git a/services/core/java/com/android/server/wm/DragState.java b/services/core/java/com/android/server/wm/DragState.java
index 4be5bad644f7..ba74f5076bc0 100644
--- a/services/core/java/com/android/server/wm/DragState.java
+++ b/services/core/java/com/android/server/wm/DragState.java
@@ -16,6 +16,7 @@
package com.android.server.wm;
+import static android.content.ClipDescription.EXTRA_HIDE_DRAG_SOURCE_TASK_ID;
import static android.content.ClipDescription.MIMETYPE_APPLICATION_ACTIVITY;
import static android.content.ClipDescription.MIMETYPE_APPLICATION_SHORTCUT;
import static android.content.ClipDescription.MIMETYPE_APPLICATION_TASK;
@@ -48,6 +49,7 @@ import android.graphics.Rect;
import android.os.Binder;
import android.os.Build;
import android.os.IBinder;
+import android.os.PersistableBundle;
import android.os.RemoteException;
import android.os.Trace;
import android.os.UserHandle;
@@ -117,6 +119,8 @@ class DragState {
InputInterceptor mInputInterceptor;
ArrayList<WindowState> mNotifiedWindows;
boolean mDragInProgress;
+ // Set to non -1 value if a valid app requests DRAG_FLAG_HIDE_CALLING_TASK_ON_DRAG_START
+ int mCallingTaskIdToHide;
/**
* Whether if animation is completed. Needs to be volatile to update from the animation thread
* without having a WM lock.
@@ -320,12 +324,12 @@ class DragState {
}
}
final boolean targetInterceptsGlobalDrag = targetInterceptsGlobalDrag(touchedWin);
- return obtainDragEvent(DragEvent.ACTION_DROP, x, y, mData,
+ return obtainDragEvent(DragEvent.ACTION_DROP, x, y, mDataDescription, mData,
/* includeDragSurface= */ targetInterceptsGlobalDrag,
/* includeDragFlags= */ targetInterceptsGlobalDrag,
dragAndDropPermissions);
} else {
- return obtainDragEvent(DragEvent.ACTION_DROP, x, y, mData,
+ return obtainDragEvent(DragEvent.ACTION_DROP, x, y, mDataDescription, mData,
/* includeDragSurface= */ includePrivateInfo,
/* includeDragFlags= */ includePrivateInfo,
null /* dragAndDropPermissions */);
@@ -527,11 +531,24 @@ class DragState {
Slog.d(TAG_WM, "Sending DRAG_STARTED to new window " + newWin);
}
// Only allow the extras to be dispatched to a global-intercepting drag target
- ClipData data = interceptsGlobalDrag ? mData.copyForTransferWithActivityInfo() : null;
+ ClipData data = null;
+ if (interceptsGlobalDrag) {
+ data = mData.copyForTransferWithActivityInfo();
+ PersistableBundle extras = data.getDescription().getExtras() != null
+ ? data.getDescription().getExtras()
+ : new PersistableBundle();
+ extras.putInt(EXTRA_HIDE_DRAG_SOURCE_TASK_ID, mCallingTaskIdToHide);
+ // Note that setting extras always copies the bundle
+ data.getDescription().setExtras(extras);
+ if (DEBUG_DRAG) {
+ Slog.d(TAG_WM, "Adding EXTRA_HIDE_DRAG_SOURCE_TASK_ID=" + mCallingTaskIdToHide);
+ }
+ }
+ ClipDescription description = data != null ? data.getDescription() : mDataDescription;
DragEvent event = obtainDragEvent(DragEvent.ACTION_DRAG_STARTED,
newWin.translateToWindowX(touchX), newWin.translateToWindowY(touchY),
- data, false /* includeDragSurface */, true /* includeDragFlags */,
- null /* dragAndDropPermission */);
+ description, data, false /* includeDragSurface */,
+ true /* includeDragFlags */, null /* dragAndDropPermission */);
try {
newWin.mClient.dispatchDragEvent(event);
// track each window that we've notified that the drag is starting
@@ -700,37 +717,51 @@ class DragState {
return mDragInProgress;
}
- private DragEvent obtainDragEvent(int action, float x, float y, ClipData data,
- boolean includeDragSurface, boolean includeDragFlags,
+ private DragEvent obtainDragEvent(int action, float x, float y, ClipDescription description,
+ ClipData data, boolean includeDragSurface, boolean includeDragFlags,
IDragAndDropPermissions dragAndDropPermissions) {
return DragEvent.obtain(action, x, y, mThumbOffsetX, mThumbOffsetY,
includeDragFlags ? mFlags : 0,
- null /* localState */, mDataDescription, data,
+ null /* localState */, description, data,
includeDragSurface ? mSurfaceControl : null,
dragAndDropPermissions, false /* result */);
}
private ValueAnimator createReturnAnimationLocked() {
- final ValueAnimator animator = ValueAnimator.ofPropertyValuesHolder(
- PropertyValuesHolder.ofFloat(
- ANIMATED_PROPERTY_X, mCurrentX - mThumbOffsetX,
- mOriginalX - mThumbOffsetX),
- PropertyValuesHolder.ofFloat(
- ANIMATED_PROPERTY_Y, mCurrentY - mThumbOffsetY,
- mOriginalY - mThumbOffsetY),
- PropertyValuesHolder.ofFloat(ANIMATED_PROPERTY_SCALE, mAnimatedScale,
- mAnimatedScale),
- PropertyValuesHolder.ofFloat(
- ANIMATED_PROPERTY_ALPHA, mOriginalAlpha, mOriginalAlpha / 2));
-
- final float translateX = mOriginalX - mCurrentX;
- final float translateY = mOriginalY - mCurrentY;
- // Adjust the duration to the travel distance.
- final double travelDistance = Math.sqrt(translateX * translateX + translateY * translateY);
- final double displayDiagonal =
- Math.sqrt(mDisplaySize.x * mDisplaySize.x + mDisplaySize.y * mDisplaySize.y);
- final long duration = MIN_ANIMATION_DURATION_MS + (long) (travelDistance / displayDiagonal
- * (MAX_ANIMATION_DURATION_MS - MIN_ANIMATION_DURATION_MS));
+ final ValueAnimator animator;
+ final long duration;
+ if (mCallingTaskIdToHide != -1) {
+ animator = ValueAnimator.ofPropertyValuesHolder(
+ PropertyValuesHolder.ofFloat(ANIMATED_PROPERTY_X, mCurrentX, mCurrentX),
+ PropertyValuesHolder.ofFloat(ANIMATED_PROPERTY_Y, mCurrentY, mCurrentY),
+ PropertyValuesHolder.ofFloat(ANIMATED_PROPERTY_SCALE, mAnimatedScale,
+ mAnimatedScale),
+ PropertyValuesHolder.ofFloat(ANIMATED_PROPERTY_ALPHA, mOriginalAlpha, 0f));
+ duration = MIN_ANIMATION_DURATION_MS;
+ } else {
+ animator = ValueAnimator.ofPropertyValuesHolder(
+ PropertyValuesHolder.ofFloat(
+ ANIMATED_PROPERTY_X, mCurrentX - mThumbOffsetX,
+ mOriginalX - mThumbOffsetX),
+ PropertyValuesHolder.ofFloat(
+ ANIMATED_PROPERTY_Y, mCurrentY - mThumbOffsetY,
+ mOriginalY - mThumbOffsetY),
+ PropertyValuesHolder.ofFloat(ANIMATED_PROPERTY_SCALE, mAnimatedScale,
+ mAnimatedScale),
+ PropertyValuesHolder.ofFloat(
+ ANIMATED_PROPERTY_ALPHA, mOriginalAlpha, mOriginalAlpha / 2));
+
+ final float translateX = mOriginalX - mCurrentX;
+ final float translateY = mOriginalY - mCurrentY;
+ // Adjust the duration to the travel distance.
+ final double travelDistance = Math.sqrt(
+ translateX * translateX + translateY * translateY);
+ final double displayDiagonal =
+ Math.sqrt(mDisplaySize.x * mDisplaySize.x + mDisplaySize.y * mDisplaySize.y);
+ duration = MIN_ANIMATION_DURATION_MS + (long) (travelDistance / displayDiagonal
+ * (MAX_ANIMATION_DURATION_MS - MIN_ANIMATION_DURATION_MS));
+ }
+
final AnimationListener listener = new AnimationListener();
animator.setDuration(duration);
animator.setInterpolator(mCubicEaseOutInterpolator);
@@ -742,13 +773,24 @@ class DragState {
}
private ValueAnimator createCancelAnimationLocked() {
- final ValueAnimator animator = ValueAnimator.ofPropertyValuesHolder(
- PropertyValuesHolder.ofFloat(
- ANIMATED_PROPERTY_X, mCurrentX - mThumbOffsetX, mCurrentX),
- PropertyValuesHolder.ofFloat(
- ANIMATED_PROPERTY_Y, mCurrentY - mThumbOffsetY, mCurrentY),
- PropertyValuesHolder.ofFloat(ANIMATED_PROPERTY_SCALE, mAnimatedScale, 0),
- PropertyValuesHolder.ofFloat(ANIMATED_PROPERTY_ALPHA, mOriginalAlpha, 0));
+ final ValueAnimator animator;
+ if (mCallingTaskIdToHide != -1) {
+ animator = ValueAnimator.ofPropertyValuesHolder(
+ PropertyValuesHolder.ofFloat(ANIMATED_PROPERTY_X, mCurrentX, mCurrentX),
+ PropertyValuesHolder.ofFloat(ANIMATED_PROPERTY_Y, mCurrentY, mCurrentY),
+ PropertyValuesHolder.ofFloat(ANIMATED_PROPERTY_SCALE, mAnimatedScale,
+ mAnimatedScale),
+ PropertyValuesHolder.ofFloat(ANIMATED_PROPERTY_ALPHA, mOriginalAlpha, 0f));
+ } else {
+ animator = ValueAnimator.ofPropertyValuesHolder(
+ PropertyValuesHolder.ofFloat(
+ ANIMATED_PROPERTY_X, mCurrentX - mThumbOffsetX, mCurrentX),
+ PropertyValuesHolder.ofFloat(
+ ANIMATED_PROPERTY_Y, mCurrentY - mThumbOffsetY, mCurrentY),
+ PropertyValuesHolder.ofFloat(ANIMATED_PROPERTY_SCALE, mAnimatedScale, 0),
+ PropertyValuesHolder.ofFloat(ANIMATED_PROPERTY_ALPHA, mOriginalAlpha, 0));
+ }
+
final AnimationListener listener = new AnimationListener();
animator.setDuration(MIN_ANIMATION_DURATION_MS);
animator.setInterpolator(mCubicEaseOutInterpolator);
diff --git a/services/core/java/com/android/server/wm/EnsureActivitiesVisibleHelper.java b/services/core/java/com/android/server/wm/EnsureActivitiesVisibleHelper.java
index f40eb24fd5eb..3123018e9e88 100644
--- a/services/core/java/com/android/server/wm/EnsureActivitiesVisibleHelper.java
+++ b/services/core/java/com/android/server/wm/EnsureActivitiesVisibleHelper.java
@@ -174,6 +174,9 @@ class EnsureActivitiesVisibleHelper {
// First: if this is not the current activity being started, make
// sure it matches the current configuration.
if (r != mStarting && mNotifyClients) {
+ if (!isTop) {
+ r.mDisplayContent.applyFixedRotationForNonTopVisibleActivityIfNeeded(r);
+ }
r.ensureActivityConfiguration(true /* ignoreVisibility */);
}
diff --git a/services/core/java/com/android/server/wm/ImmersiveModeConfirmation.java b/services/core/java/com/android/server/wm/ImmersiveModeConfirmation.java
index bf99ccdf1b0a..d79c11cecdc0 100644
--- a/services/core/java/com/android/server/wm/ImmersiveModeConfirmation.java
+++ b/services/core/java/com/android/server/wm/ImmersiveModeConfirmation.java
@@ -408,9 +408,8 @@ public class ImmersiveModeConfirmation {
final boolean intersectsTopCutout = topDisplayCutout.intersects(
width - (windowWidth / 2), 0,
width + (windowWidth / 2), topDisplayCutout.bottom);
- if (mClingWindow != null &&
- (windowWidth < 0 || (width > 0 && intersectsTopCutout))) {
- final View iconView = mClingWindow.findViewById(R.id.immersive_cling_icon);
+ if (windowWidth < 0 || (width > 0 && intersectsTopCutout)) {
+ final View iconView = findViewById(R.id.immersive_cling_icon);
RelativeLayout.LayoutParams lp = (RelativeLayout.LayoutParams)
iconView.getLayoutParams();
lp.topMargin = topDisplayCutout.bottom;
diff --git a/services/core/java/com/android/server/wm/InputMonitor.java b/services/core/java/com/android/server/wm/InputMonitor.java
index 74dbd15d1399..b496a65ba4a6 100644
--- a/services/core/java/com/android/server/wm/InputMonitor.java
+++ b/services/core/java/com/android/server/wm/InputMonitor.java
@@ -623,7 +623,7 @@ final class InputMonitor {
// occlusion detection depending on the type or if it's a trusted overlay.
populateOverlayInputInfo(inputWindowHandle, w);
setInputWindowInfoIfNeeded(mInputTransaction,
- w.mWinAnimator.mSurfaceController.mSurfaceControl, inputWindowHandle);
+ w.mWinAnimator.mSurfaceControl, inputWindowHandle);
return;
}
// Skip this window because it cannot possibly receive input.
@@ -687,7 +687,7 @@ final class InputMonitor {
if (w.mWinAnimator.hasSurface()) {
populateInputWindowHandle(inputWindowHandle, w);
setInputWindowInfoIfNeeded(mInputTransaction,
- w.mWinAnimator.mSurfaceController.mSurfaceControl, inputWindowHandle);
+ w.mWinAnimator.mSurfaceControl, inputWindowHandle);
}
}
}
diff --git a/services/core/java/com/android/server/wm/InsetsStateController.java b/services/core/java/com/android/server/wm/InsetsStateController.java
index 348384203fba..dcadb0f31085 100644
--- a/services/core/java/com/android/server/wm/InsetsStateController.java
+++ b/services/core/java/com/android/server/wm/InsetsStateController.java
@@ -397,9 +397,11 @@ class InsetsStateController {
onRequestedVisibleTypesChanged(newControlTargets.valueAt(i));
}
newControlTargets.clear();
- // Check for and try to run the scheduled show IME request (if it exists), as we
- // now applied the surface transaction and notified the target of the new control.
- getImeSourceProvider().checkAndStartShowImePostLayout();
+ if (!android.view.inputmethod.Flags.refactorInsetsController()) {
+ // Check for and try to run the scheduled show IME request (if it exists), as we
+ // now applied the surface transaction and notified the target of the new control.
+ getImeSourceProvider().checkAndStartShowImePostLayout();
+ }
});
}
diff --git a/services/core/java/com/android/server/wm/LetterboxUiController.java b/services/core/java/com/android/server/wm/LetterboxUiController.java
index a3550bcb8cf5..be8e806a5752 100644
--- a/services/core/java/com/android/server/wm/LetterboxUiController.java
+++ b/services/core/java/com/android/server/wm/LetterboxUiController.java
@@ -17,15 +17,6 @@
package com.android.server.wm;
import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
-import static android.content.pm.ActivityInfo.isFixedOrientationLandscape;
-import static android.content.pm.PackageManager.USER_MIN_ASPECT_RATIO_16_9;
-import static android.content.pm.PackageManager.USER_MIN_ASPECT_RATIO_3_2;
-import static android.content.pm.PackageManager.USER_MIN_ASPECT_RATIO_4_3;
-import static android.content.pm.PackageManager.USER_MIN_ASPECT_RATIO_APP_DEFAULT;
-import static android.content.pm.PackageManager.USER_MIN_ASPECT_RATIO_DISPLAY_SIZE;
-import static android.content.pm.PackageManager.USER_MIN_ASPECT_RATIO_FULLSCREEN;
-import static android.content.pm.PackageManager.USER_MIN_ASPECT_RATIO_SPLIT_SCREEN;
-import static android.content.pm.PackageManager.USER_MIN_ASPECT_RATIO_UNSET;
import static android.view.WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER;
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_STARTING;
import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION;
@@ -44,33 +35,27 @@ import static com.android.internal.util.FrameworkStatsLog.LETTERBOX_POSITION_CHA
import static com.android.internal.util.FrameworkStatsLog.LETTERBOX_POSITION_CHANGED__POSITION_CHANGE__LEFT_TO_CENTER;
import static com.android.internal.util.FrameworkStatsLog.LETTERBOX_POSITION_CHANGED__POSITION_CHANGE__RIGHT_TO_CENTER;
import static com.android.internal.util.FrameworkStatsLog.LETTERBOX_POSITION_CHANGED__POSITION_CHANGE__TOP_TO_CENTER;
-import static com.android.server.wm.ActivityRecord.computeAspectRatio;
import static com.android.server.wm.ActivityTaskManagerDebugConfig.TAG_ATM;
import static com.android.server.wm.ActivityTaskManagerDebugConfig.TAG_WITH_CLASS_NAME;
-import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_BACKGROUND_APP_COLOR_BACKGROUND;
-import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_BACKGROUND_APP_COLOR_BACKGROUND_FLOATING;
-import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_BACKGROUND_SOLID_COLOR;
-import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_BACKGROUND_WALLPAPER;
-import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_CENTER;
-import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_LEFT;
-import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_RIGHT;
-import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_POSITION_MULTIPLIER_CENTER;
-import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_VERTICAL_REACHABILITY_POSITION_BOTTOM;
-import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_VERTICAL_REACHABILITY_POSITION_CENTER;
-import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_VERTICAL_REACHABILITY_POSITION_TOP;
-import static com.android.server.wm.LetterboxConfiguration.MIN_FIXED_ORIENTATION_LETTERBOX_ASPECT_RATIO;
-import static com.android.server.wm.LetterboxConfiguration.letterboxBackgroundTypeToString;
+import static com.android.server.wm.AppCompatConfiguration.LETTERBOX_BACKGROUND_APP_COLOR_BACKGROUND;
+import static com.android.server.wm.AppCompatConfiguration.LETTERBOX_BACKGROUND_APP_COLOR_BACKGROUND_FLOATING;
+import static com.android.server.wm.AppCompatConfiguration.LETTERBOX_BACKGROUND_SOLID_COLOR;
+import static com.android.server.wm.AppCompatConfiguration.LETTERBOX_BACKGROUND_WALLPAPER;
+import static com.android.server.wm.AppCompatConfiguration.LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_CENTER;
+import static com.android.server.wm.AppCompatConfiguration.LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_LEFT;
+import static com.android.server.wm.AppCompatConfiguration.LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_RIGHT;
+import static com.android.server.wm.AppCompatConfiguration.LETTERBOX_VERTICAL_REACHABILITY_POSITION_BOTTOM;
+import static com.android.server.wm.AppCompatConfiguration.LETTERBOX_VERTICAL_REACHABILITY_POSITION_CENTER;
+import static com.android.server.wm.AppCompatConfiguration.LETTERBOX_VERTICAL_REACHABILITY_POSITION_TOP;
+import static com.android.server.wm.AppCompatConfiguration.letterboxBackgroundTypeToString;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.app.ActivityManager.TaskDescription;
-import android.content.pm.PackageManager;
import android.content.res.Configuration;
-import android.content.res.Resources;
import android.graphics.Color;
import android.graphics.Point;
import android.graphics.Rect;
-import android.os.RemoteException;
import android.util.Slog;
import android.view.InsetsSource;
import android.view.InsetsState;
@@ -80,10 +65,9 @@ import android.view.SurfaceControl.Transaction;
import android.view.WindowInsets;
import android.view.WindowManager;
-import com.android.internal.R;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.statusbar.LetterboxDetails;
-import com.android.server.wm.LetterboxConfiguration.LetterboxBackgroundType;
+import com.android.server.wm.AppCompatConfiguration.LetterboxBackgroundType;
import com.android.window.flags.Flags;
import java.io.PrintWriter;
@@ -97,17 +81,12 @@ final class LetterboxUiController {
private final Point mTmpPoint = new Point();
- private final LetterboxConfiguration mLetterboxConfiguration;
+ private final AppCompatConfiguration mAppCompatConfiguration;
private final ActivityRecord mActivityRecord;
private boolean mShowWallpaperForLetterboxBackground;
- // TODO(b/315140179): Make mUserAspectRatio final
- // The min aspect ratio override set by user
- @PackageManager.UserMinAspectRatio
- private int mUserAspectRatio = USER_MIN_ASPECT_RATIO_UNSET;
-
@Nullable
private Letterbox mLetterbox;
@@ -116,7 +95,7 @@ final class LetterboxUiController {
private boolean mDoubleTapEvent;
LetterboxUiController(WindowManagerService wmService, ActivityRecord activityRecord) {
- mLetterboxConfiguration = wmService.mLetterboxConfiguration;
+ mAppCompatConfiguration = wmService.mAppCompatConfiguration;
// Given activityRecord may not be fully constructed since LetterboxUiController
// is created in its constructor. It shouldn't be used in this constructor but it's safe
// to use it after since controller is only used in ActivityRecord.
@@ -154,22 +133,6 @@ final class LetterboxUiController {
}
/**
- * Whether we should apply the min aspect ratio per-app override. When this override is applied
- * the min aspect ratio given in the app's manifest will be overridden to the largest enabled
- * aspect ratio treatment unless the app's manifest value is higher. The treatment will also
- * apply if no value is provided in the manifest.
- *
- * <p>This method returns {@code true} when the following conditions are met:
- * <ul>
- * <li>Opt-out component property isn't enabled
- * <li>Per-app override is enabled
- * </ul>
- */
- boolean shouldOverrideMinAspectRatio() {
- return getAppCompatOverrides().shouldOverrideMinAspectRatio();
- }
-
- /**
* Whether we should apply the force resize per-app override. When this override is applied it
* forces the packages it is applied to to be resizable. It won't change whether the app can be
* put into multi-windowing mode, but allow the app to resize without going into size-compat
@@ -230,10 +193,6 @@ final class LetterboxUiController {
return getAppCompatOverrides().shouldUseDisplayLandscapeNaturalOrientation();
}
- private boolean isCompatChangeEnabled(long overrideChangeId) {
- return mActivityRecord.info.isChangeEnabled(overrideChangeId);
- }
-
boolean hasWallpaperBackgroundForLetterbox() {
return mShowWallpaperForLetterboxBackground;
}
@@ -386,7 +345,7 @@ final class LetterboxUiController {
private boolean shouldLetterboxHaveRoundedCorners() {
// TODO(b/214030873): remove once background is drawn for transparent activities
// Letterbox shouldn't have rounded corners if the activity is transparent
- return mLetterboxConfiguration.isLetterboxActivityCornersRounded()
+ return mAppCompatConfiguration.isLetterboxActivityCornersRounded()
&& mActivityRecord.fillsParent();
}
@@ -395,7 +354,7 @@ final class LetterboxUiController {
// be a TaskFragment, and its windowing mode is always MULTI_WINDOW, even if the task is
// actually fullscreen. If display is still in transition e.g. unfolding, don't return true
// for HALF_FOLDED state or app will flicker.
- private boolean isDisplayFullScreenAndInPosture(boolean isTabletop) {
+ boolean isDisplayFullScreenAndInPosture(boolean isTabletop) {
Task task = mActivityRecord.getTask();
return mActivityRecord.mDisplayContent != null && task != null
&& mActivityRecord.mDisplayContent.getDisplayRotation().isDeviceInPosture(
@@ -423,13 +382,13 @@ final class LetterboxUiController {
return isHorizontalReachabilityEnabled(parentConfiguration)
// Using the last global dynamic position to avoid "jumps" when moving
// between apps or activities.
- ? mLetterboxConfiguration.getHorizontalMultiplierForReachability(bookModeEnabled)
- : mLetterboxConfiguration.getLetterboxHorizontalPositionMultiplier(bookModeEnabled);
+ ? mAppCompatConfiguration.getHorizontalMultiplierForReachability(bookModeEnabled)
+ : mAppCompatConfiguration.getLetterboxHorizontalPositionMultiplier(bookModeEnabled);
}
private boolean isFullScreenAndBookModeEnabled() {
return isDisplayFullScreenAndInPosture(/* isTabletop */ false)
- && mLetterboxConfiguration.getIsAutomaticReachabilityInBookModeEnabled();
+ && mAppCompatConfiguration.getIsAutomaticReachabilityInBookModeEnabled();
}
float getVerticalPositionMultiplier(Configuration parentConfiguration) {
@@ -439,58 +398,24 @@ final class LetterboxUiController {
return isVerticalReachabilityEnabled(parentConfiguration)
// Using the last global dynamic position to avoid "jumps" when moving
// between apps or activities.
- ? mLetterboxConfiguration.getVerticalMultiplierForReachability(tabletopMode)
- : mLetterboxConfiguration.getLetterboxVerticalPositionMultiplier(tabletopMode);
+ ? mAppCompatConfiguration.getVerticalMultiplierForReachability(tabletopMode)
+ : mAppCompatConfiguration.getLetterboxVerticalPositionMultiplier(tabletopMode);
}
float getFixedOrientationLetterboxAspectRatio(@NonNull Configuration parentConfiguration) {
- return shouldUseSplitScreenAspectRatio(parentConfiguration)
- ? getSplitScreenAspectRatio()
- : mActivityRecord.shouldCreateCompatDisplayInsets()
- ? getDefaultMinAspectRatioForUnresizableApps()
- : getDefaultMinAspectRatio();
+ return mActivityRecord.mAppCompatController.getAppCompatAspectRatioOverrides()
+ .getFixedOrientationLetterboxAspectRatio(parentConfiguration);
}
boolean isLetterboxEducationEnabled() {
- return mLetterboxConfiguration.getIsEducationEnabled();
- }
-
- private boolean shouldUseSplitScreenAspectRatio(@NonNull Configuration parentConfiguration) {
- final boolean isBookMode = isDisplayFullScreenAndInPosture(/* isTabletop */ false);
- final boolean isNotCenteredHorizontally = getHorizontalPositionMultiplier(
- parentConfiguration) != LETTERBOX_POSITION_MULTIPLIER_CENTER;
- final boolean isTabletopMode = isDisplayFullScreenAndInPosture(/* isTabletop */ true);
- final boolean isLandscape = isFixedOrientationLandscape(
- mActivityRecord.getOverrideOrientation());
- final AppCompatCameraOverrides appCompatCameraOverrides =
- mActivityRecord.mAppCompatController.getAppCompatCameraOverrides();
- final AppCompatCameraPolicy cameraPolicy =
- mActivityRecord.mAppCompatController.getAppCompatCameraPolicy();
- final boolean isCameraCompatTreatmentActive = cameraPolicy != null
- && cameraPolicy.isTreatmentEnabledForActivity(mActivityRecord);
- // Don't resize to split screen size when in book mode if letterbox position is centered
- return (isBookMode && isNotCenteredHorizontally || isTabletopMode && isLandscape)
- || (appCompatCameraOverrides.isCameraCompatSplitScreenAspectRatioAllowed()
- && isCameraCompatTreatmentActive);
- }
-
- private float getDefaultMinAspectRatioForUnresizableApps() {
- if (!mLetterboxConfiguration.getIsSplitScreenAspectRatioForUnresizableAppsEnabled()
- || mActivityRecord.getDisplayArea() == null) {
- return mLetterboxConfiguration.getDefaultMinAspectRatioForUnresizableApps()
- > MIN_FIXED_ORIENTATION_LETTERBOX_ASPECT_RATIO
- ? mLetterboxConfiguration.getDefaultMinAspectRatioForUnresizableApps()
- : getDefaultMinAspectRatio();
- }
-
- return getSplitScreenAspectRatio();
+ return mAppCompatConfiguration.getIsEducationEnabled();
}
/**
* @return {@value true} if the resulting app is letterboxed in a way defined as thin.
*/
boolean isVerticalThinLetterboxed() {
- final int thinHeight = mLetterboxConfiguration.getThinLetterboxHeightPx();
+ final int thinHeight = mAppCompatConfiguration.getThinLetterboxHeightPx();
if (thinHeight < 0) {
return false;
}
@@ -507,7 +432,7 @@ final class LetterboxUiController {
* @return {@value true} if the resulting app is pillarboxed in a way defined as thin.
*/
boolean isHorizontalThinLetterboxed() {
- final int thinWidth = mLetterboxConfiguration.getThinLetterboxWidthPx();
+ final int thinWidth = mAppCompatConfiguration.getThinLetterboxWidthPx();
if (thinWidth < 0) {
return false;
}
@@ -547,136 +472,22 @@ final class LetterboxUiController {
return !isHorizontalThinLetterboxed();
}
- float getSplitScreenAspectRatio() {
- // Getting the same aspect ratio that apps get in split screen.
- final DisplayArea displayArea = mActivityRecord.getDisplayArea();
- if (displayArea == null) {
- return getDefaultMinAspectRatioForUnresizableApps();
- }
- int dividerWindowWidth =
- getResources().getDimensionPixelSize(R.dimen.docked_stack_divider_thickness);
- int dividerInsets =
- getResources().getDimensionPixelSize(R.dimen.docked_stack_divider_insets);
- int dividerSize = dividerWindowWidth - dividerInsets * 2;
- final Rect bounds = new Rect(displayArea.getWindowConfiguration().getAppBounds());
- if (bounds.width() >= bounds.height()) {
- bounds.inset(/* dx */ dividerSize / 2, /* dy */ 0);
- bounds.right = bounds.centerX();
- } else {
- bounds.inset(/* dx */ 0, /* dy */ dividerSize / 2);
- bounds.bottom = bounds.centerY();
- }
- return computeAspectRatio(bounds);
- }
-
- /**
- * Whether we should enable users to resize the current app.
- */
- boolean shouldEnableUserAspectRatioSettings() {
- return getAppCompatOverrides().shouldEnableUserAspectRatioSettings();
- }
-
- /**
- * Whether we should apply the user aspect ratio override to the min aspect ratio for the
- * current app.
- */
- boolean shouldApplyUserMinAspectRatioOverride() {
- if (!shouldEnableUserAspectRatioSettings()) {
- return false;
- }
-
- mUserAspectRatio = getUserMinAspectRatioOverrideCode();
-
- return mUserAspectRatio != USER_MIN_ASPECT_RATIO_UNSET
- && mUserAspectRatio != USER_MIN_ASPECT_RATIO_APP_DEFAULT
- && mUserAspectRatio != USER_MIN_ASPECT_RATIO_FULLSCREEN;
- }
-
- boolean shouldApplyUserFullscreenOverride() {
- if (isUserFullscreenOverrideEnabled()) {
- mUserAspectRatio = getUserMinAspectRatioOverrideCode();
-
- return mUserAspectRatio == USER_MIN_ASPECT_RATIO_FULLSCREEN;
- }
-
- return false;
- }
-
- boolean isUserFullscreenOverrideEnabled() {
- return getAppCompatOverrides().isUserFullscreenOverrideEnabled();
- }
-
- boolean isSystemOverrideToFullscreenEnabled() {
- return getAppCompatOverrides().isSystemOverrideToFullscreenEnabled(mUserAspectRatio);
- }
-
- boolean hasFullscreenOverride() {
- // `mUserAspectRatio` is always initialized first in `shouldApplyUserFullscreenOverride()`.
- return shouldApplyUserFullscreenOverride() || isSystemOverrideToFullscreenEnabled();
- }
-
- float getUserMinAspectRatio() {
- switch (mUserAspectRatio) {
- case USER_MIN_ASPECT_RATIO_DISPLAY_SIZE:
- return getDisplaySizeMinAspectRatio();
- case USER_MIN_ASPECT_RATIO_SPLIT_SCREEN:
- return getSplitScreenAspectRatio();
- case USER_MIN_ASPECT_RATIO_16_9:
- return 16 / 9f;
- case USER_MIN_ASPECT_RATIO_4_3:
- return 4 / 3f;
- case USER_MIN_ASPECT_RATIO_3_2:
- return 3 / 2f;
- default:
- throw new AssertionError("Unexpected user min aspect ratio override: "
- + mUserAspectRatio);
- }
- }
-
- @VisibleForTesting
- int getUserMinAspectRatioOverrideCode() {
- try {
- return mActivityRecord.mAtmService.getPackageManager()
- .getUserMinAspectRatio(mActivityRecord.packageName, mActivityRecord.mUserId);
- } catch (RemoteException e) {
- Slog.w(TAG, "Exception thrown retrieving aspect ratio user override " + this, e);
- }
- return mUserAspectRatio;
- }
-
- private float getDisplaySizeMinAspectRatio() {
- final DisplayArea displayArea = mActivityRecord.getDisplayArea();
- if (displayArea == null) {
- return mActivityRecord.info.getMinAspectRatio();
- }
- final Rect bounds = new Rect(displayArea.getWindowConfiguration().getAppBounds());
- return computeAspectRatio(bounds);
- }
-
- private float getDefaultMinAspectRatio() {
- if (mActivityRecord.getDisplayArea() == null
- || !mLetterboxConfiguration
- .getIsDisplayAspectRatioEnabledForFixedOrientationLetterbox()) {
- return mLetterboxConfiguration.getFixedOrientationLetterboxAspectRatio();
- }
- return getDisplaySizeMinAspectRatio();
- }
-
- Resources getResources() {
- return mActivityRecord.mWmService.mContext.getResources();
+ boolean shouldOverrideMinAspectRatio() {
+ return mActivityRecord.mAppCompatController.getAppCompatAspectRatioOverrides()
+ .shouldOverrideMinAspectRatio();
}
- @LetterboxConfiguration.LetterboxVerticalReachabilityPosition
+ @AppCompatConfiguration.LetterboxVerticalReachabilityPosition
int getLetterboxPositionForVerticalReachability() {
final boolean isInFullScreenTabletopMode = isDisplayFullScreenAndSeparatingHinge();
- return mLetterboxConfiguration.getLetterboxPositionForVerticalReachability(
+ return mAppCompatConfiguration.getLetterboxPositionForVerticalReachability(
isInFullScreenTabletopMode);
}
- @LetterboxConfiguration.LetterboxHorizontalReachabilityPosition
+ @AppCompatConfiguration.LetterboxHorizontalReachabilityPosition
int getLetterboxPositionForHorizontalReachability() {
final boolean isInFullScreenBookMode = isFullScreenAndBookModeEnabled();
- return mLetterboxConfiguration.getLetterboxPositionForHorizontalReachability(
+ return mAppCompatConfiguration.getLetterboxPositionForHorizontalReachability(
isInFullScreenBookMode);
}
@@ -692,12 +503,12 @@ final class LetterboxUiController {
}
boolean isInFullScreenBookMode = isDisplayFullScreenAndSeparatingHinge()
- && mLetterboxConfiguration.getIsAutomaticReachabilityInBookModeEnabled();
- int letterboxPositionForHorizontalReachability = mLetterboxConfiguration
+ && mAppCompatConfiguration.getIsAutomaticReachabilityInBookModeEnabled();
+ int letterboxPositionForHorizontalReachability = mAppCompatConfiguration
.getLetterboxPositionForHorizontalReachability(isInFullScreenBookMode);
if (mLetterbox.getInnerFrame().left > x) {
// Moving to the next stop on the left side of the app window: right > center > left.
- mLetterboxConfiguration.movePositionForHorizontalReachabilityToNextLeftStop(
+ mAppCompatConfiguration.movePositionForHorizontalReachabilityToNextLeftStop(
isInFullScreenBookMode);
int changeToLog =
letterboxPositionForHorizontalReachability
@@ -708,7 +519,7 @@ final class LetterboxUiController {
mDoubleTapEvent = true;
} else if (mLetterbox.getInnerFrame().right < x) {
// Moving to the next stop on the right side of the app window: left > center > right.
- mLetterboxConfiguration.movePositionForHorizontalReachabilityToNextRightStop(
+ mAppCompatConfiguration.movePositionForHorizontalReachabilityToNextRightStop(
isInFullScreenBookMode);
int changeToLog =
letterboxPositionForHorizontalReachability
@@ -733,11 +544,11 @@ final class LetterboxUiController {
return;
}
boolean isInFullScreenTabletopMode = isDisplayFullScreenAndSeparatingHinge();
- int letterboxPositionForVerticalReachability = mLetterboxConfiguration
+ int letterboxPositionForVerticalReachability = mAppCompatConfiguration
.getLetterboxPositionForVerticalReachability(isInFullScreenTabletopMode);
if (mLetterbox.getInnerFrame().top > y) {
// Moving to the next stop on the top side of the app window: bottom > center > top.
- mLetterboxConfiguration.movePositionForVerticalReachabilityToNextTopStop(
+ mAppCompatConfiguration.movePositionForVerticalReachabilityToNextTopStop(
isInFullScreenTabletopMode);
int changeToLog =
letterboxPositionForVerticalReachability
@@ -748,7 +559,7 @@ final class LetterboxUiController {
mDoubleTapEvent = true;
} else if (mLetterbox.getInnerFrame().bottom < y) {
// Moving to the next stop on the bottom side of the app window: top > center > bottom.
- mLetterboxConfiguration.movePositionForVerticalReachabilityToNextBottomStop(
+ mAppCompatConfiguration.movePositionForVerticalReachabilityToNextBottomStop(
isInFullScreenTabletopMode);
int changeToLog =
letterboxPositionForVerticalReachability
@@ -785,7 +596,7 @@ final class LetterboxUiController {
.getTransparentPolicy().getFirstOpaqueActivity()
.map(ActivityRecord::getScreenResolvedBounds)
.orElse(mActivityRecord.getScreenResolvedBounds());
- return mLetterboxConfiguration.getIsHorizontalReachabilityEnabled()
+ return mAppCompatConfiguration.getIsHorizontalReachabilityEnabled()
&& parentConfiguration.windowConfiguration.getWindowingMode()
== WINDOWING_MODE_FULLSCREEN
// Check whether the activity fills the parent vertically.
@@ -830,7 +641,7 @@ final class LetterboxUiController {
.getTransparentPolicy().getFirstOpaqueActivity()
.map(ActivityRecord::getScreenResolvedBounds)
.orElse(mActivityRecord.getScreenResolvedBounds());
- return mLetterboxConfiguration.getIsVerticalReachabilityEnabled()
+ return mAppCompatConfiguration.getIsVerticalReachabilityEnabled()
&& parentConfiguration.windowConfiguration.getWindowingMode()
== WINDOWING_MODE_FULLSCREEN
// Check whether the activity fills the parent horizontally.
@@ -870,7 +681,7 @@ final class LetterboxUiController {
return Color.valueOf(Color.BLACK);
}
@LetterboxBackgroundType int letterboxBackgroundType =
- mLetterboxConfiguration.getLetterboxBackgroundType();
+ mAppCompatConfiguration.getLetterboxBackgroundType();
TaskDescription taskDescription = mActivityRecord.taskDescription;
switch (letterboxBackgroundType) {
case LETTERBOX_BACKGROUND_APP_COLOR_BACKGROUND_FLOATING:
@@ -886,7 +697,7 @@ final class LetterboxUiController {
case LETTERBOX_BACKGROUND_WALLPAPER:
if (hasWallpaperBackgroundForLetterbox()) {
// Color is used for translucent scrim that dims wallpaper.
- return mLetterboxConfiguration.getLetterboxBackgroundColor();
+ return mAppCompatConfiguration.getLetterboxBackgroundColor();
}
Slog.w(TAG, "Wallpaper option is selected for letterbox background but "
+ "blur is not supported by a device or not supported in the current "
@@ -894,14 +705,14 @@ final class LetterboxUiController {
+ "provided so using solid color background");
break;
case LETTERBOX_BACKGROUND_SOLID_COLOR:
- return mLetterboxConfiguration.getLetterboxBackgroundColor();
+ return mAppCompatConfiguration.getLetterboxBackgroundColor();
default:
throw new AssertionError(
"Unexpected letterbox background type: " + letterboxBackgroundType);
}
// If picked option configured incorrectly or not supported then default to a solid color
// background.
- return mLetterboxConfiguration.getLetterboxBackgroundColor();
+ return mAppCompatConfiguration.getLetterboxBackgroundColor();
}
private void updateRoundedCornersIfNeeded(final WindowState mainWindow) {
@@ -960,7 +771,7 @@ final class LetterboxUiController {
private boolean requiresRoundedCorners(final WindowState mainWindow) {
return isLetterboxedNotForDisplayCutout(mainWindow)
- && mLetterboxConfiguration.isLetterboxActivityCornersRounded();
+ && mAppCompatConfiguration.isLetterboxActivityCornersRounded();
}
// Returns rounded corners radius the letterboxed activity should have based on override in
@@ -974,8 +785,8 @@ final class LetterboxUiController {
}
final int radius;
- if (mLetterboxConfiguration.getLetterboxActivityCornersRadius() >= 0) {
- radius = mLetterboxConfiguration.getLetterboxActivityCornersRadius();
+ if (mAppCompatConfiguration.getLetterboxActivityCornersRadius() >= 0) {
+ radius = mAppCompatConfiguration.getLetterboxActivityCornersRadius();
} else {
final InsetsState insetsState = mainWindow.getInsetsState();
radius = Math.min(
@@ -1039,7 +850,7 @@ final class LetterboxUiController {
private void updateWallpaperForLetterbox(WindowState mainWindow) {
@LetterboxBackgroundType int letterboxBackgroundType =
- mLetterboxConfiguration.getLetterboxBackgroundType();
+ mAppCompatConfiguration.getLetterboxBackgroundType();
boolean wallpaperShouldBeShown =
letterboxBackgroundType == LETTERBOX_BACKGROUND_WALLPAPER
// Don't use wallpaper as a background if letterboxed for display cutout.
@@ -1057,18 +868,18 @@ final class LetterboxUiController {
}
private int getLetterboxWallpaperBlurRadiusPx() {
- int blurRadius = mLetterboxConfiguration.getLetterboxBackgroundWallpaperBlurRadiusPx();
+ int blurRadius = mAppCompatConfiguration.getLetterboxBackgroundWallpaperBlurRadiusPx();
return Math.max(blurRadius, 0);
}
private float getLetterboxWallpaperDarkScrimAlpha() {
- float alpha = mLetterboxConfiguration.getLetterboxBackgroundWallpaperDarkScrimAlpha();
+ float alpha = mAppCompatConfiguration.getLetterboxBackgroundWallpaperDarkScrimAlpha();
// No scrim by default.
return (alpha < 0 || alpha >= 1) ? 0.0f : alpha;
}
private boolean isLetterboxWallpaperBlurSupported() {
- return mLetterboxConfiguration.mContext.getSystemService(WindowManager.class)
+ return mAppCompatConfiguration.mContext.getSystemService(WindowManager.class)
.isCrossWindowBlurEnabled();
}
@@ -1086,7 +897,7 @@ final class LetterboxUiController {
pw.println(prefix + " letterboxReason=" + getLetterboxReasonString(mainWin));
pw.println(prefix + " activityAspectRatio="
- + mActivityRecord.computeAspectRatio(mActivityRecord.getBounds()));
+ + AppCompatUtils.computeAspectRatio(mActivityRecord.getBounds()));
boolean shouldShowLetterboxUi = shouldShowLetterboxUi(mainWin);
pw.println(prefix + "shouldShowLetterboxUi=" + shouldShowLetterboxUi);
@@ -1100,10 +911,10 @@ final class LetterboxUiController {
getLetterboxBackgroundColor().toArgb()));
pw.println(prefix + " letterboxBackgroundType="
+ letterboxBackgroundTypeToString(
- mLetterboxConfiguration.getLetterboxBackgroundType()));
+ mAppCompatConfiguration.getLetterboxBackgroundType()));
pw.println(prefix + " letterboxCornerRadius="
+ getRoundedCornersRadius(mainWin));
- if (mLetterboxConfiguration.getLetterboxBackgroundType()
+ if (mAppCompatConfiguration.getLetterboxBackgroundType()
== LETTERBOX_BACKGROUND_WALLPAPER) {
pw.println(prefix + " isLetterboxWallpaperBlurSupported="
+ isLetterboxWallpaperBlurSupported());
@@ -1121,19 +932,19 @@ final class LetterboxUiController {
pw.println(prefix + " letterboxVerticalPositionMultiplier="
+ getVerticalPositionMultiplier(mActivityRecord.getParent().getConfiguration()));
pw.println(prefix + " letterboxPositionForHorizontalReachability="
- + LetterboxConfiguration.letterboxHorizontalReachabilityPositionToString(
- mLetterboxConfiguration.getLetterboxPositionForHorizontalReachability(false)));
+ + AppCompatConfiguration.letterboxHorizontalReachabilityPositionToString(
+ mAppCompatConfiguration.getLetterboxPositionForHorizontalReachability(false)));
pw.println(prefix + " letterboxPositionForVerticalReachability="
- + LetterboxConfiguration.letterboxVerticalReachabilityPositionToString(
- mLetterboxConfiguration.getLetterboxPositionForVerticalReachability(false)));
+ + AppCompatConfiguration.letterboxVerticalReachabilityPositionToString(
+ mAppCompatConfiguration.getLetterboxPositionForVerticalReachability(false)));
pw.println(prefix + " fixedOrientationLetterboxAspectRatio="
- + mLetterboxConfiguration.getFixedOrientationLetterboxAspectRatio());
+ + mAppCompatConfiguration.getFixedOrientationLetterboxAspectRatio());
pw.println(prefix + " defaultMinAspectRatioForUnresizableApps="
- + mLetterboxConfiguration.getDefaultMinAspectRatioForUnresizableApps());
+ + mAppCompatConfiguration.getDefaultMinAspectRatioForUnresizableApps());
pw.println(prefix + " isSplitScreenAspectRatioForUnresizableAppsEnabled="
- + mLetterboxConfiguration.getIsSplitScreenAspectRatioForUnresizableAppsEnabled());
+ + mAppCompatConfiguration.getIsSplitScreenAspectRatioForUnresizableAppsEnabled());
pw.println(prefix + " isDisplayAspectRatioEnabledForFixedOrientationLetterbox="
- + mLetterboxConfiguration
+ + mAppCompatConfiguration
.getIsDisplayAspectRatioEnabledForFixedOrientationLetterbox());
}
@@ -1145,20 +956,22 @@ final class LetterboxUiController {
if (mActivityRecord.inSizeCompatMode()) {
return "SIZE_COMPAT_MODE";
}
- if (mActivityRecord.isLetterboxedForFixedOrientationAndAspectRatio()) {
+ if (mActivityRecord.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio()) {
return "FIXED_ORIENTATION";
}
if (mainWin.isLetterboxedForDisplayCutout()) {
return "DISPLAY_CUTOUT";
}
- if (mActivityRecord.isLetterboxedForAspectRatioOnly()) {
+ if (mActivityRecord.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForAspectRatioOnly()) {
return "ASPECT_RATIO";
}
return "UNKNOWN_REASON";
}
private int letterboxHorizontalReachabilityPositionToLetterboxPosition(
- @LetterboxConfiguration.LetterboxHorizontalReachabilityPosition int position) {
+ @AppCompatConfiguration.LetterboxHorizontalReachabilityPosition int position) {
switch (position) {
case LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_LEFT:
return APP_COMPAT_STATE_CHANGED__LETTERBOX_POSITION__LEFT;
@@ -1174,7 +987,7 @@ final class LetterboxUiController {
}
private int letterboxVerticalReachabilityPositionToLetterboxPosition(
- @LetterboxConfiguration.LetterboxVerticalReachabilityPosition int position) {
+ @AppCompatConfiguration.LetterboxVerticalReachabilityPosition int position) {
switch (position) {
case LETTERBOX_VERTICAL_REACHABILITY_POSITION_TOP:
return APP_COMPAT_STATE_CHANGED__LETTERBOX_POSITION__TOP;
@@ -1192,13 +1005,13 @@ final class LetterboxUiController {
int getLetterboxPositionForLogging() {
int positionToLog = APP_COMPAT_STATE_CHANGED__LETTERBOX_POSITION__UNKNOWN_POSITION;
if (isHorizontalReachabilityEnabled()) {
- int letterboxPositionForHorizontalReachability = mLetterboxConfiguration
+ int letterboxPositionForHorizontalReachability = mAppCompatConfiguration
.getLetterboxPositionForHorizontalReachability(
isDisplayFullScreenAndInPosture(/* isTabletop */ false));
positionToLog = letterboxHorizontalReachabilityPositionToLetterboxPosition(
letterboxPositionForHorizontalReachability);
} else if (isVerticalReachabilityEnabled()) {
- int letterboxPositionForVerticalReachability = mLetterboxConfiguration
+ int letterboxPositionForVerticalReachability = mAppCompatConfiguration
.getLetterboxPositionForVerticalReachability(
isDisplayFullScreenAndInPosture(/* isTabletop */ true));
positionToLog = letterboxVerticalReachabilityPositionToLetterboxPosition(
diff --git a/services/core/java/com/android/server/wm/RecentTasks.java b/services/core/java/com/android/server/wm/RecentTasks.java
index 6f2528085d74..7aede8b4a068 100644
--- a/services/core/java/com/android/server/wm/RecentTasks.java
+++ b/services/core/java/com/android/server/wm/RecentTasks.java
@@ -61,7 +61,6 @@ import android.content.pm.ParceledListSlice;
import android.content.pm.UserInfo;
import android.content.res.Resources;
import android.graphics.Bitmap;
-import android.graphics.Insets;
import android.graphics.Rect;
import android.os.Environment;
import android.os.IBinder;
@@ -76,7 +75,6 @@ import android.util.SparseArray;
import android.util.SparseBooleanArray;
import android.view.InsetsState;
import android.view.MotionEvent;
-import android.view.WindowInsets;
import android.view.WindowManagerPolicyConstants.PointerEventListener;
import com.android.internal.annotations.VisibleForTesting;
@@ -1536,6 +1534,11 @@ class RecentTasks {
return true;
}
+ // The task is marked as non-trimmable. Don't trim the task.
+ if (!task.mIsTrimmableFromRecents) {
+ return false;
+ }
+
// Ignore tasks from different displays
// TODO (b/115289124): No Recents on non-default displays.
if (!task.isOnHomeDisplay()) {
diff --git a/services/core/java/com/android/server/wm/RemoteAnimationController.java b/services/core/java/com/android/server/wm/RemoteAnimationController.java
index a8edaebd24a6..f8665c70c61d 100644
--- a/services/core/java/com/android/server/wm/RemoteAnimationController.java
+++ b/services/core/java/com/android/server/wm/RemoteAnimationController.java
@@ -44,8 +44,8 @@ import android.view.SurfaceControl.Transaction;
import android.view.WindowManager;
import com.android.internal.annotations.VisibleForTesting;
-import com.android.internal.protolog.common.LogLevel;
import com.android.internal.protolog.ProtoLog;
+import com.android.internal.protolog.common.LogLevel;
import com.android.internal.util.FastPrintWriter;
import com.android.server.wm.SurfaceAnimator.AnimationType;
import com.android.server.wm.SurfaceAnimator.OnAnimationFinishedCallback;
@@ -53,7 +53,6 @@ import com.android.server.wm.SurfaceAnimator.OnAnimationFinishedCallback;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.ArrayList;
-import java.util.function.Consumer;
/**
* Helper class to run app animations in a remote process.
@@ -349,10 +348,6 @@ class RemoteAnimationController implements DeathRecipient {
} finally {
mIsFinishing = false;
}
- // Reset input for all activities when the remote animation is finished.
- final Consumer<ActivityRecord> updateActivities =
- activity -> activity.setDropInputForAnimation(false);
- mDisplayContent.forAllActivities(updateActivities);
}
setRunningRemoteAnimation(false);
ProtoLog.i(WM_DEBUG_REMOTE_ANIMATIONS, "Finishing remote animation");
diff --git a/services/core/java/com/android/server/wm/RootWindowContainer.java b/services/core/java/com/android/server/wm/RootWindowContainer.java
index d3fc7f36eac8..f2ccbc4e1aeb 100644
--- a/services/core/java/com/android/server/wm/RootWindowContainer.java
+++ b/services/core/java/com/android/server/wm/RootWindowContainer.java
@@ -667,7 +667,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
boolean reclaimSomeSurfaceMemory(WindowStateAnimator winAnimator, String operation,
boolean secure) {
- final WindowSurfaceController surfaceController = winAnimator.mSurfaceController;
+ final SurfaceControl surfaceControl = winAnimator.mSurfaceControl;
boolean leakedSurface = false;
boolean killedApps = false;
EventLogTags.writeWmNoSurfaceMemory(winAnimator.mWin.toString(),
@@ -692,7 +692,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
return;
}
final WindowStateAnimator wsa = w.mWinAnimator;
- if (wsa.mSurfaceController != null) {
+ if (wsa.mSurfaceControl != null) {
pidCandidates.append(wsa.mSession.mPid, wsa.mSession.mPid);
}
}, false /* traverseTopToBottom */);
@@ -717,7 +717,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
// app to request another one.
Slog.w(TAG_WM,
"Looks like we have reclaimed some memory, clearing surface for retry.");
- if (surfaceController != null) {
+ if (surfaceControl != null) {
ProtoLog.i(WM_SHOW_SURFACE_ALLOC,
"SURFACE RECOVER DESTROY: %s", winAnimator.mWin);
SurfaceControl.Transaction t = mWmService.mTransactionFactory.get();
@@ -2847,10 +2847,6 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
}
SleepToken createSleepToken(String tag, int displayId) {
- return createSleepToken(tag, displayId, false /* isSwappingDisplay */);
- }
-
- SleepToken createSleepToken(String tag, int displayId, boolean isSwappingDisplay) {
final DisplayContent display = getDisplayContent(displayId);
if (display == null) {
throw new IllegalArgumentException("Invalid display: " + displayId);
@@ -2859,7 +2855,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
final int tokenKey = makeSleepTokenKey(tag, displayId);
SleepToken token = mSleepTokens.get(tokenKey);
if (token == null) {
- token = new SleepToken(tag, displayId, isSwappingDisplay);
+ token = new SleepToken(tag, displayId);
mSleepTokens.put(tokenKey, token);
display.mAllSleepTokens.add(token);
ProtoLog.d(WM_DEBUG_STATES, "Create sleep token: tag=%s, displayId=%d", tag, displayId);
@@ -3799,34 +3795,18 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
private final String mTag;
private final long mAcquireTime;
private final int mDisplayId;
- private final boolean mIsSwappingDisplay;
final int mHashKey;
- // The display could remain in sleep after the physical display swapped, adding a 1
- // seconds display swap timeout to prevent activities staying in PAUSED state.
- // Otherwise, the sleep token should be removed once display turns back on after swapped.
- private static final long DISPLAY_SWAP_TIMEOUT = 1000;
-
- SleepToken(String tag, int displayId, boolean isSwappingDisplay) {
+ SleepToken(String tag, int displayId) {
mTag = tag;
mDisplayId = displayId;
mAcquireTime = SystemClock.uptimeMillis();
- mIsSwappingDisplay = isSwappingDisplay;
mHashKey = makeSleepTokenKey(mTag, mDisplayId);
}
- public boolean isDisplaySwapping() {
- long now = SystemClock.uptimeMillis();
- if (now - mAcquireTime > DISPLAY_SWAP_TIMEOUT) {
- return false;
- }
- return mIsSwappingDisplay;
- }
-
@Override
public String toString() {
return "{\"" + mTag + "\", display " + mDisplayId
- + (mIsSwappingDisplay ? " is swapping " : "")
+ ", acquire at " + TimeUtils.formatUptime(mAcquireTime) + "}";
}
diff --git a/services/core/java/com/android/server/wm/SafeActivityOptions.java b/services/core/java/com/android/server/wm/SafeActivityOptions.java
index b452131188c6..8c7b6375a72f 100644
--- a/services/core/java/com/android/server/wm/SafeActivityOptions.java
+++ b/services/core/java/com/android/server/wm/SafeActivityOptions.java
@@ -442,7 +442,10 @@ public class SafeActivityOptions {
return taskDisplayArea;
}
- private boolean isAssistant(ActivityTaskManagerService atmService, int callingUid) {
+ /**
+ * Returns whether the given UID caller is the assistant.
+ */
+ public static boolean isAssistant(ActivityTaskManagerService atmService, int callingUid) {
if (atmService.mActiveVoiceInteractionServiceComponent == null) {
return false;
}
diff --git a/services/core/java/com/android/server/wm/ScreenRotationAnimation.java b/services/core/java/com/android/server/wm/ScreenRotationAnimation.java
index 31fda77a8a7d..db0374e52b1a 100644
--- a/services/core/java/com/android/server/wm/ScreenRotationAnimation.java
+++ b/services/core/java/com/android/server/wm/ScreenRotationAnimation.java
@@ -324,7 +324,7 @@ class ScreenRotationAnimation {
if (!w.mToken.mRoundedCornerOverlay || !w.isVisible() || !w.mWinAnimator.hasSurface()) {
return;
}
- t.setSkipScreenshot(w.mWinAnimator.mSurfaceController.mSurfaceControl, skipScreenshot);
+ t.setSkipScreenshot(w.mWinAnimator.mSurfaceControl, skipScreenshot);
}, false);
if (!skipScreenshot) {
// Use sync apply to apply the change immediately, so that the next
diff --git a/services/core/java/com/android/server/wm/Session.java b/services/core/java/com/android/server/wm/Session.java
index 310516b09530..cc95518cce39 100644
--- a/services/core/java/com/android/server/wm/Session.java
+++ b/services/core/java/com/android/server/wm/Session.java
@@ -39,7 +39,6 @@ import static android.view.WindowManager.LayoutParams.isSystemAlertWindowType;
import static com.android.internal.protolog.ProtoLogGroup.WM_SHOW_TRANSACTIONS;
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG;
-import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_TASK_POSITIONING;
import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM;
import android.annotation.NonNull;
@@ -109,8 +108,8 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient {
private final String mStringName;
SurfaceSession mSurfaceSession;
private final ArrayList<WindowState> mAddedWindows = new ArrayList<>();
- /** Set of visible alert/app-overlay window surfaces connected to this session. */
- private final ArraySet<WindowSurfaceController> mAlertWindowSurfaces = new ArraySet<>();
+ /** Set of visible alert/app-overlay windows connected to this session. */
+ private final ArraySet<WindowState> mAlertWindows = new ArraySet<>();
private final DragDropController mDragDropController;
final boolean mCanAddInternalSystemWindow;
boolean mCanForceShowingInsets;
@@ -324,19 +323,19 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient {
}
@Override
- public boolean performHapticFeedback(int effectId, boolean always, boolean fromIme) {
+ public boolean performHapticFeedback(int effectId, int flags, int privFlags) {
final long ident = Binder.clearCallingIdentity();
try {
- return mService.mPolicy.performHapticFeedback(mUid, mPackageName,
- effectId, always, null, fromIme);
+ return mService.mPolicy.performHapticFeedback(mUid, mPackageName, effectId, null, flags,
+ privFlags);
} finally {
Binder.restoreCallingIdentity(ident);
}
}
@Override
- public void performHapticFeedbackAsync(int effectId, boolean always, boolean fromIme) {
- performHapticFeedback(effectId, always, fromIme);
+ public void performHapticFeedbackAsync(int effectId, int flags, int privFlags) {
+ performHapticFeedback(effectId, flags, privFlags);
}
/* Drag/drop */
@@ -349,7 +348,7 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient {
final int callingPid = Binder.getCallingPid();
// Validate and resolve ClipDescription data before clearing the calling identity
validateAndResolveDragMimeTypeExtras(data, callingUid, callingPid, mPackageName);
- validateDragFlags(flags);
+ validateDragFlags(flags, callingUid);
final long ident = Binder.clearCallingIdentity();
try {
return mDragDropController.performDrag(mPid, mUid, window, flags, surface, touchSource,
@@ -375,12 +374,17 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient {
* Validates the given drag flags.
*/
@VisibleForTesting
- void validateDragFlags(int flags) {
+ void validateDragFlags(int flags, int callingUid) {
if ((flags & View.DRAG_FLAG_REQUEST_SURFACE_FOR_RETURN_ANIMATION) != 0) {
if (!mCanStartTasksFromRecents) {
throw new SecurityException("Requires START_TASKS_FROM_RECENTS permission");
}
}
+ if ((flags & View.DRAG_FLAG_HIDE_CALLING_TASK_ON_DRAG_START) != 0) {
+ if (!SafeActivityOptions.isAssistant(mService.mAtmService, callingUid)) {
+ throw new SecurityException("Caller is not the assistant");
+ }
+ }
}
/**
@@ -532,27 +536,11 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient {
@Override
public boolean startMovingTask(IWindow window, float startX, float startY) {
- if (DEBUG_TASK_POSITIONING) Slog.d(
- TAG_WM, "startMovingTask: {" + startX + "," + startY + "}");
-
- final long ident = Binder.clearCallingIdentity();
- try {
- return mService.mTaskPositioningController.startMovingTask(window, startX, startY);
- } finally {
- Binder.restoreCallingIdentity(ident);
- }
+ return false;
}
@Override
public void finishMovingTask(IWindow window) {
- if (DEBUG_TASK_POSITIONING) Slog.d(TAG_WM, "finishMovingTask");
-
- final long ident = Binder.clearCallingIdentity();
- try {
- mService.mTaskPositioningController.finishTaskPositioning(window);
- } finally {
- Binder.restoreCallingIdentity(ident);
- }
}
@Override
@@ -764,9 +752,8 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient {
return !mAddedWindows.isEmpty();
}
- void onWindowSurfaceVisibilityChanged(WindowSurfaceController surfaceController,
- boolean visible, int type) {
-
+ void onWindowSurfaceVisibilityChanged(WindowState window, boolean visible) {
+ final int type = window.mAttrs.type;
if (!isSystemAlertWindowType(type)) {
return;
}
@@ -777,7 +764,7 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient {
final boolean noSystemOverlayPermission =
!mCanAddInternalSystemWindow && !mCanCreateSystemApplicationOverlay;
if (visible) {
- changed = mAlertWindowSurfaces.add(surfaceController);
+ changed = mAlertWindows.add(window);
if (type == TYPE_APPLICATION_OVERLAY) {
MetricsLoggerWrapper.logAppOverlayEnter(mUid, mPackageName, changed, type,
false /* set false to only log for TYPE_APPLICATION_OVERLAY */);
@@ -786,7 +773,7 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient {
true /* only log for non-TYPE_APPLICATION_OVERLAY */);
}
} else {
- changed = mAlertWindowSurfaces.remove(surfaceController);
+ changed = mAlertWindows.remove(window);
if (type == TYPE_APPLICATION_OVERLAY) {
MetricsLoggerWrapper.logAppOverlayExit(mUid, mPackageName, changed, type,
false /* set false to only log for TYPE_APPLICATION_OVERLAY */);
@@ -797,7 +784,7 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient {
}
if (changed && noSystemOverlayPermission) {
- if (mAlertWindowSurfaces.isEmpty()) {
+ if (mAlertWindows.isEmpty()) {
cancelAlertWindowNotification();
} else if (mAlertWindowNotification == null && !isSatellitePointingUiPackage()) {
mAlertWindowNotification = new AlertWindowNotification(mService, mPackageName);
@@ -810,7 +797,7 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient {
if (changed && mPid != WindowManagerService.MY_PID) {
// Notify activity manager that the process contains overlay/alert windows, so it can
// adjust the importance score for the process.
- setHasOverlayUi(!mAlertWindowSurfaces.isEmpty());
+ setHasOverlayUi(!mAlertWindows.isEmpty());
}
}
@@ -854,7 +841,7 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient {
}
mSurfaceSession = null;
mAddedWindows.clear();
- mAlertWindowSurfaces.clear();
+ mAlertWindows.clear();
setHasOverlayUi(false);
cancelAlertWindowNotification();
}
@@ -875,7 +862,7 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient {
void dump(PrintWriter pw, String prefix) {
pw.print(prefix); pw.print("numWindow="); pw.print(mAddedWindows.size());
pw.print(" mCanAddInternalSystemWindow="); pw.print(mCanAddInternalSystemWindow);
- pw.print(" mAlertWindowSurfaces="); pw.print(mAlertWindowSurfaces);
+ pw.print(" mAlertWindows="); pw.print(mAlertWindows);
pw.print(" mClientDead="); pw.print(mClientDead);
pw.print(" mSurfaceSession="); pw.println(mSurfaceSession);
pw.print(prefix); pw.print("mPackageName="); pw.println(mPackageName);
@@ -891,9 +878,9 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient {
/** @return {@code true} if there is an alert window surface on the given display. */
boolean hasAlertWindowSurfaces(DisplayContent displayContent) {
- for (int i = mAlertWindowSurfaces.size() - 1; i >= 0; i--) {
- final WindowSurfaceController surfaceController = mAlertWindowSurfaces.valueAt(i);
- if (surfaceController.mAnimator.mWin.getDisplayContent() == displayContent) {
+ for (int i = mAlertWindows.size() - 1; i >= 0; i--) {
+ final WindowState window = mAlertWindows.valueAt(i);
+ if (window.mDisplayContent == displayContent) {
return true;
}
}
diff --git a/services/core/java/com/android/server/wm/StartingSurfaceController.java b/services/core/java/com/android/server/wm/StartingSurfaceController.java
index cff40c768381..a1e6701f75fd 100644
--- a/services/core/java/com/android/server/wm/StartingSurfaceController.java
+++ b/services/core/java/com/android/server/wm/StartingSurfaceController.java
@@ -146,7 +146,10 @@ public class StartingSurfaceController {
+ activity);
return null;
}
- final WindowState mainWindow = activity.findMainWindow(false);
+ // For snapshot surface, the top activity could be trampoline activity, so here should
+ // search for top fullscreen activity in the task.
+ final WindowState mainWindow = task
+ .getTopFullscreenMainWindow(false /* includeStartingApp */);
if (mainWindow == null) {
Slog.w(TAG, "TaskSnapshotSurface.create: no main window in " + activity);
return null;
diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java
index 33a649be43d0..8f83a7c2c853 100644
--- a/services/core/java/com/android/server/wm/Task.java
+++ b/services/core/java/com/android/server/wm/Task.java
@@ -495,6 +495,12 @@ class Task extends TaskFragment {
*/
boolean mReparentLeafTaskIfRelaunch;
+ /**
+ * Set to affect whether recents should be able to trim this task or not. It's set to true by
+ * default.
+ */
+ boolean mIsTrimmableFromRecents;
+
private final AnimatingActivityRegistry mAnimatingActivityRegistry =
new AnimatingActivityRegistry();
@@ -666,6 +672,7 @@ class Task extends TaskFragment {
mLaunchCookie = _launchCookie;
mDeferTaskAppear = _deferTaskAppear;
mRemoveWithTaskOrganizer = _removeWithTaskOrganizer;
+ mIsTrimmableFromRecents = true;
EventLogTags.writeWmTaskCreated(mTaskId);
}
@@ -809,42 +816,30 @@ class Task extends TaskFragment {
}
}
- /** Convenience method to reparent a task to the top or bottom position of the root task. */
- boolean reparent(Task preferredRootTask, boolean toTop,
- @ReparentMoveRootTaskMode int moveRootTaskMode, boolean animate, boolean deferResume,
- String reason) {
- return reparent(preferredRootTask, toTop ? MAX_VALUE : 0, moveRootTaskMode, animate,
- deferResume, true /* schedulePictureInPictureModeChange */, reason);
- }
-
/**
* Reparents the task into a preferred root task, creating it if necessary.
*
* @param preferredRootTask the target root task to move this task
- * @param position the position to place this task in the new root task
+ * @param toTop top or bottom position to place this task in the target task
* @param animate whether or not we should wait for the new window created as a part of the
* reparenting to be drawn and animated in
* @param moveRootTaskMode whether or not to move the root task to the front always, only if
* it was previously focused & in front, or never
* @param deferResume whether or not to update the visibility of other tasks and root tasks
* that may have changed as a result of this reparenting
- * @param schedulePictureInPictureModeChange specifies whether or not to schedule the PiP mode
- * change. Callers may set this to false if they are explicitly scheduling PiP mode
- * changes themselves, like during the PiP animation
* @param reason the caller of this reparenting
* @return whether the task was reparented
*/
// TODO: Inspect all call sites and change to just changing windowing mode of the root task vs.
// re-parenting the task. Can only be done when we are no longer using static root task Ids.
- boolean reparent(Task preferredRootTask, int position,
+ boolean reparent(Task preferredRootTask, boolean toTop,
@ReparentMoveRootTaskMode int moveRootTaskMode, boolean animate, boolean deferResume,
- boolean schedulePictureInPictureModeChange, String reason) {
+ String reason) {
final ActivityTaskSupervisor supervisor = mTaskSupervisor;
final RootWindowContainer root = mRootWindowContainer;
- final WindowManagerService windowManager = mAtmService.mWindowManager;
final Task sourceRootTask = getRootTask();
final Task toRootTask = supervisor.getReparentTargetRootTask(this, preferredRootTask,
- position == MAX_VALUE);
+ toTop);
if (toRootTask == sourceRootTask) {
return false;
}
@@ -855,7 +850,6 @@ class Task extends TaskFragment {
final ActivityRecord topActivity = getTopNonFinishingActivity();
mAtmService.deferWindowLayout();
- boolean kept = true;
try {
final ActivityRecord r = topRunningActivityLocked();
final boolean wasFocused = r != null && root.isTopDisplayFocusedRootTask(sourceRootTask)
@@ -871,12 +865,7 @@ class Task extends TaskFragment {
|| (moveRootTaskMode == REPARENT_KEEP_ROOT_TASK_AT_FRONT
&& (wasFocused || wasFront));
- reparent(toRootTask, position, moveRootTaskToFront, reason);
-
- if (schedulePictureInPictureModeChange) {
- // Notify of picture-in-picture mode changes
- supervisor.scheduleUpdatePictureInPictureModeIfNeeded(this, sourceRootTask);
- }
+ reparent(toRootTask, toTop ? MAX_VALUE : 0, moveRootTaskToFront, reason);
// If the task had focus before (or we're requested to move focus), move focus to the
// new root task by moving the root task to the front.
@@ -3018,11 +3007,17 @@ class Task extends TaskFragment {
return r.getTask().mTaskId != taskId && r.token != notTop && r.canBeTopRunning();
}
- ActivityRecord getTopFullscreenActivity() {
- return getActivity((r) -> {
- final WindowState win = r.findMainWindow();
- return (win != null && win.mAttrs.isFullscreen());
+ WindowState getTopFullscreenMainWindow(boolean includeStartingApp) {
+ final WindowState[] candidate = new WindowState[1];
+ getActivity((r) -> {
+ final WindowState win = r.findMainWindow(includeStartingApp);
+ if (win != null && win.mAttrs.isFullscreen()) {
+ candidate[0] = win;
+ return true;
+ }
+ return false;
});
+ return candidate[0];
}
/**
@@ -3388,7 +3383,7 @@ class Task extends TaskFragment {
// Whether the direct top activity is in size compat mode
appCompatTaskInfo.topActivityInSizeCompat = isTopActivityVisible && top.inSizeCompatMode();
if (appCompatTaskInfo.topActivityInSizeCompat
- && mWmService.mLetterboxConfiguration.isTranslucentLetterboxingEnabled()) {
+ && mWmService.mAppCompatConfiguration.isTranslucentLetterboxingEnabled()) {
// We hide the restart button in case of transparent activities.
appCompatTaskInfo.topActivityInSizeCompat = top.fillsParent();
}
@@ -3417,9 +3412,11 @@ class Task extends TaskFragment {
appCompatTaskInfo.topActivityLetterboxWidth = TaskInfo.PROPERTY_VALUE_UNSET;
appCompatTaskInfo.topActivityLetterboxHeight = TaskInfo.PROPERTY_VALUE_UNSET;
appCompatTaskInfo.isUserFullscreenOverrideEnabled = top != null
- && top.mLetterboxUiController.shouldApplyUserFullscreenOverride();
+ && top.mAppCompatController.getAppCompatAspectRatioOverrides()
+ .shouldApplyUserFullscreenOverride();
appCompatTaskInfo.isSystemFullscreenOverrideEnabled = top != null
- && top.mLetterboxUiController.isSystemOverrideToFullscreenEnabled();
+ && top.mAppCompatController.getAppCompatAspectRatioOverrides()
+ .isSystemOverrideToFullscreenEnabled();
appCompatTaskInfo.isFromLetterboxDoubleTap = top != null
&& top.mLetterboxUiController.isFromDoubleTap();
if (top != null) {
@@ -3453,7 +3450,8 @@ class Task extends TaskFragment {
}
appCompatTaskInfo.topActivityEligibleForUserAspectRatioButton = top != null
&& !appCompatTaskInfo.topActivityInSizeCompat
- && top.mLetterboxUiController.shouldEnableUserAspectRatioSettings()
+ && top.mAppCompatController.getAppCompatAspectRatioOverrides()
+ .shouldEnableUserAspectRatioSettings()
&& !info.isTopActivityTransparent;
appCompatTaskInfo.topActivityBoundsLetterboxed = top != null && top.areBoundsLetterboxed();
appCompatTaskInfo.cameraCompatTaskInfo.freeformCameraCompatMode = top == null
@@ -3587,14 +3585,12 @@ class Task extends TaskFragment {
// starting window because persisted configuration does not effect to Task.
info.taskInfo.configuration.setTo(activity.getConfiguration());
if (!Flags.drawSnapshotAspectRatioMatch()) {
- final ActivityRecord topFullscreenActivity = getTopFullscreenActivity();
- if (topFullscreenActivity != null) {
- final WindowState mainWindow = topFullscreenActivity.findMainWindow(false);
- if (mainWindow != null) {
- info.topOpaqueWindowInsetsState =
- mainWindow.getInsetsStateWithVisibilityOverride();
- info.topOpaqueWindowLayoutParams = mainWindow.getAttrs();
- }
+ final WindowState mainWindow =
+ getTopFullscreenMainWindow(false /* includeStartingApp */);
+ if (mainWindow != null) {
+ info.topOpaqueWindowInsetsState =
+ mainWindow.getInsetsStateWithVisibilityOverride();
+ info.topOpaqueWindowLayoutParams = mainWindow.getAttrs();
}
}
return info;
@@ -3856,6 +3852,7 @@ class Task extends TaskFragment {
pw.print(" isResizeable="); pw.println(isResizeable());
pw.print(prefix); pw.print("lastActiveTime="); pw.print(lastActiveTime);
pw.println(" (inactive for " + (getInactiveDuration() / 1000) + "s)");
+ pw.print(prefix); pw.println(" isTrimmable=" + mIsTrimmableFromRecents);
}
@Override
@@ -6296,6 +6293,10 @@ class Task extends TaskFragment {
}
}
+ void setTrimmableFromRecents(boolean isTrimmable) {
+ mIsTrimmableFromRecents = isTrimmable;
+ }
+
/**
* Return true if the activityInfo has the same requiredDisplayCategory as this task.
*/
diff --git a/services/core/java/com/android/server/wm/TaskFragmentOrganizerController.java b/services/core/java/com/android/server/wm/TaskFragmentOrganizerController.java
index b6b6cf2dc430..561ff7db5b9d 100644
--- a/services/core/java/com/android/server/wm/TaskFragmentOrganizerController.java
+++ b/services/core/java/com/android/server/wm/TaskFragmentOrganizerController.java
@@ -46,7 +46,6 @@ import android.util.ArrayMap;
import android.util.ArraySet;
import android.util.Slog;
import android.util.SparseArray;
-import android.view.RemoteAnimationDefinition;
import android.view.WindowManager;
import android.window.ITaskFragmentOrganizer;
import android.window.ITaskFragmentOrganizerController;
@@ -58,8 +57,8 @@ import android.window.TaskFragmentTransaction;
import android.window.WindowContainerTransaction;
import com.android.internal.annotations.VisibleForTesting;
-import com.android.internal.protolog.ProtoLogGroup;
import com.android.internal.protolog.ProtoLog;
+import com.android.internal.protolog.ProtoLogGroup;
import com.android.window.flags.Flags;
import java.lang.annotation.Retention;
@@ -146,13 +145,6 @@ public class TaskFragmentOrganizerController extends ITaskFragmentOrganizerContr
private final boolean mIsSystemOrganizer;
/**
- * {@link RemoteAnimationDefinition} for embedded activities transition animation that is
- * organized by this organizer.
- */
- @Nullable
- private RemoteAnimationDefinition mRemoteAnimationDefinition;
-
- /**
* Map from {@link TaskFragmentTransaction#getTransactionToken()} to the
* {@link Transition#getSyncId()} that has been deferred. {@link TransitionController} will
* wait until the organizer finished handling the {@link TaskFragmentTransaction}.
@@ -533,50 +525,6 @@ public class TaskFragmentOrganizerController extends ITaskFragmentOrganizerContr
}
@Override
- public void registerRemoteAnimations(@NonNull ITaskFragmentOrganizer organizer,
- @NonNull RemoteAnimationDefinition definition) {
- final int pid = Binder.getCallingPid();
- final int uid = Binder.getCallingUid();
- synchronized (mGlobalLock) {
- ProtoLog.v(WM_DEBUG_WINDOW_ORGANIZER,
- "Register remote animations for organizer=%s uid=%d pid=%d",
- organizer.asBinder(), uid, pid);
- final TaskFragmentOrganizerState organizerState =
- mTaskFragmentOrganizerState.get(organizer.asBinder());
- if (organizerState == null) {
- throw new IllegalStateException("The organizer hasn't been registered.");
- }
- if (organizerState.mRemoteAnimationDefinition != null) {
- throw new IllegalStateException(
- "The organizer has already registered remote animations="
- + organizerState.mRemoteAnimationDefinition);
- }
-
- definition.setCallingPidUid(pid, uid);
- organizerState.mRemoteAnimationDefinition = definition;
- }
- }
-
- @Override
- public void unregisterRemoteAnimations(@NonNull ITaskFragmentOrganizer organizer) {
- final int pid = Binder.getCallingPid();
- final long uid = Binder.getCallingUid();
- synchronized (mGlobalLock) {
- ProtoLog.v(WM_DEBUG_WINDOW_ORGANIZER,
- "Unregister remote animations for organizer=%s uid=%d pid=%d",
- organizer.asBinder(), uid, pid);
- final TaskFragmentOrganizerState organizerState =
- mTaskFragmentOrganizerState.get(organizer.asBinder());
- if (organizerState == null) {
- Slog.e(TAG, "The organizer hasn't been registered.");
- return;
- }
-
- organizerState.mRemoteAnimationDefinition = null;
- }
- }
-
- @Override
public void onTransactionHandled(@NonNull IBinder transactionToken,
@NonNull WindowContainerTransaction wct,
@WindowManager.TransitionType int transitionType, boolean shouldApplyIndependently) {
@@ -617,25 +565,6 @@ public class TaskFragmentOrganizerController extends ITaskFragmentOrganizerContr
}
}
- /**
- * Gets the {@link RemoteAnimationDefinition} set on the given organizer if exists. Returns
- * {@code null} if it doesn't.
- */
- @Nullable
- public RemoteAnimationDefinition getRemoteAnimationDefinition(
- @NonNull ITaskFragmentOrganizer organizer) {
- synchronized (mGlobalLock) {
- final TaskFragmentOrganizerState organizerState =
- mTaskFragmentOrganizerState.get(organizer.asBinder());
- if (organizerState == null) {
- Slog.e(TAG, "TaskFragmentOrganizer has been unregistered or died when trying"
- + " to play animation on its organized windows.");
- return null;
- }
- return organizerState.mRemoteAnimationDefinition;
- }
- }
-
int getTaskFragmentOrganizerUid(@NonNull ITaskFragmentOrganizer organizer) {
final TaskFragmentOrganizerState state = validateAndGetState(organizer);
return state.mOrganizerUid;
@@ -1240,16 +1169,6 @@ public class TaskFragmentOrganizerController extends ITaskFragmentOrganizerContr
}
}
- @Override
- public boolean isActivityEmbedded(IBinder activityToken) {
- synchronized (mGlobalLock) {
- final ActivityRecord activity = ActivityRecord.forTokenLocked(activityToken);
- return activity != null
- ? activity.isEmbeddedInHostContainer()
- : false;
- }
- }
-
@VisibleForTesting
@NonNull
IApplicationThread getAppThread(int pid, int uid) {
diff --git a/services/core/java/com/android/server/wm/TaskPositioner.java b/services/core/java/com/android/server/wm/TaskPositioner.java
deleted file mode 100644
index 972dd2e382cc..000000000000
--- a/services/core/java/com/android/server/wm/TaskPositioner.java
+++ /dev/null
@@ -1,500 +0,0 @@
-/*
- * Copyright (C) 2015 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server.wm;
-
-import static android.app.ActivityTaskManager.RESIZE_MODE_USER;
-import static android.app.ActivityTaskManager.RESIZE_MODE_USER_FORCED;
-import static android.os.InputConstants.DEFAULT_DISPATCHING_TIMEOUT_MILLIS;
-import static android.os.Trace.TRACE_TAG_WINDOW_MANAGER;
-
-import static com.android.internal.policy.TaskResizingAlgorithm.CTRL_BOTTOM;
-import static com.android.internal.policy.TaskResizingAlgorithm.CTRL_LEFT;
-import static com.android.internal.policy.TaskResizingAlgorithm.CTRL_NONE;
-import static com.android.internal.policy.TaskResizingAlgorithm.CTRL_RIGHT;
-import static com.android.internal.policy.TaskResizingAlgorithm.CTRL_TOP;
-import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_ORIENTATION;
-import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_TASK_POSITIONING;
-import static com.android.server.wm.WindowManagerDebugConfig.TAG_WITH_CLASS_NAME;
-import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM;
-import static com.android.server.wm.WindowManagerService.dipToPixel;
-import static com.android.server.wm.WindowState.MINIMUM_VISIBLE_HEIGHT_IN_DP;
-import static com.android.server.wm.WindowState.MINIMUM_VISIBLE_WIDTH_IN_DP;
-
-import static java.util.concurrent.CompletableFuture.completedFuture;
-
-import android.annotation.NonNull;
-import android.graphics.Point;
-import android.graphics.Rect;
-import android.os.Binder;
-import android.os.IBinder;
-import android.os.InputConfig;
-import android.os.RemoteException;
-import android.os.Trace;
-import android.util.DisplayMetrics;
-import android.util.Slog;
-import android.view.BatchedInputEventReceiver;
-import android.view.InputApplicationHandle;
-import android.view.InputChannel;
-import android.view.InputDevice;
-import android.view.InputEvent;
-import android.view.InputEventReceiver;
-import android.view.InputWindowHandle;
-import android.view.MotionEvent;
-import android.view.WindowManager;
-
-import com.android.internal.annotations.VisibleForTesting;
-import com.android.internal.policy.TaskResizingAlgorithm;
-import com.android.internal.policy.TaskResizingAlgorithm.CtrlType;
-import com.android.internal.protolog.ProtoLog;
-
-import java.util.concurrent.CompletableFuture;
-
-class TaskPositioner implements IBinder.DeathRecipient {
- private static final boolean DEBUG_ORIENTATION_VIOLATIONS = false;
- private static final String TAG_LOCAL = "TaskPositioner";
- private static final String TAG = TAG_WITH_CLASS_NAME ? TAG_LOCAL : TAG_WM;
-
- private static Factory sFactory;
-
- public static final float RESIZING_HINT_ALPHA = 0.5f;
-
- public static final int RESIZING_HINT_DURATION_MS = 0;
-
- private final WindowManagerService mService;
- private InputEventReceiver mInputEventReceiver;
- private DisplayContent mDisplayContent;
- private Rect mTmpRect = new Rect();
- private int mMinVisibleWidth;
- private int mMinVisibleHeight;
-
- @VisibleForTesting
- Task mTask;
- WindowState mWindow;
- private boolean mResizing;
- private boolean mPreserveOrientation;
- private boolean mStartOrientationWasLandscape;
- private final Rect mWindowOriginalBounds = new Rect();
- private final Rect mWindowDragBounds = new Rect();
- private final Point mMaxVisibleSize = new Point();
- private float mStartDragX;
- private float mStartDragY;
- @CtrlType
- private int mCtrlType = CTRL_NONE;
- @VisibleForTesting
- boolean mDragEnded;
- IBinder mClientCallback;
-
- InputChannel mClientChannel;
- InputApplicationHandle mDragApplicationHandle;
- InputWindowHandle mDragWindowHandle;
-
- /** Use {@link #create(WindowManagerService)} instead. */
- @VisibleForTesting
- TaskPositioner(WindowManagerService service) {
- mService = service;
- }
-
- private boolean onInputEvent(InputEvent event) {
- // All returns need to be in the try block to make sure the finishInputEvent is
- // called correctly.
- if (!(event instanceof MotionEvent)
- || (event.getSource() & InputDevice.SOURCE_CLASS_POINTER) == 0) {
- return false;
- }
- final MotionEvent motionEvent = (MotionEvent) event;
- if (mDragEnded) {
- // The drag has ended but the clean-up message has not been processed by
- // window manager. Drop events that occur after this until window manager
- // has a chance to clean-up the input handle.
- return true;
- }
-
- final float newX = motionEvent.getRawX();
- final float newY = motionEvent.getRawY();
-
- switch (motionEvent.getAction()) {
- case MotionEvent.ACTION_DOWN: {
- if (DEBUG_TASK_POSITIONING) {
- Slog.w(TAG, "ACTION_DOWN @ {" + newX + ", " + newY + "}");
- }
- }
- break;
-
- case MotionEvent.ACTION_MOVE: {
- if (DEBUG_TASK_POSITIONING) {
- Slog.w(TAG, "ACTION_MOVE @ {" + newX + ", " + newY + "}");
- }
- synchronized (mService.mGlobalLock) {
- mDragEnded = notifyMoveLocked(newX, newY);
- mTask.getDimBounds(mTmpRect);
- }
- if (!mTmpRect.equals(mWindowDragBounds)) {
- Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER,
- "wm.TaskPositioner.resizeTask");
- mService.mAtmService.resizeTask(
- mTask.mTaskId, mWindowDragBounds, RESIZE_MODE_USER);
- Trace.traceEnd(Trace.TRACE_TAG_WINDOW_MANAGER);
- }
- }
- break;
-
- case MotionEvent.ACTION_UP: {
- if (DEBUG_TASK_POSITIONING) {
- Slog.w(TAG, "ACTION_UP @ {" + newX + ", " + newY + "}");
- }
- mDragEnded = true;
- }
- break;
-
- case MotionEvent.ACTION_CANCEL: {
- if (DEBUG_TASK_POSITIONING) {
- Slog.w(TAG, "ACTION_CANCEL @ {" + newX + ", " + newY + "}");
- }
- mDragEnded = true;
- }
- break;
- }
-
- if (mDragEnded) {
- final boolean wasResizing = mResizing;
- synchronized (mService.mGlobalLock) {
- endDragLocked();
- mTask.getDimBounds(mTmpRect);
- }
- if (wasResizing && !mTmpRect.equals(mWindowDragBounds)) {
- // We were using fullscreen surface during resizing. Request
- // resizeTask() one last time to restore surface to window size.
- mService.mAtmService.resizeTask(
- mTask.mTaskId, mWindowDragBounds, RESIZE_MODE_USER_FORCED);
- }
-
- // Post back to WM to handle clean-ups. We still need the input
- // event handler for the last finishInputEvent()!
- mService.mTaskPositioningController.finishTaskPositioning();
- }
- return true;
- }
-
- @VisibleForTesting
- Rect getWindowDragBounds() {
- return mWindowDragBounds;
- }
-
- /**
- * @param displayContent The Display that the window being dragged is on.
- * @param win The window which will be dragged.
- */
- CompletableFuture<Void> register(DisplayContent displayContent, @NonNull WindowState win) {
- if (DEBUG_TASK_POSITIONING) {
- Slog.d(TAG, "Registering task positioner");
- }
-
- if (mClientChannel != null) {
- Slog.e(TAG, "Task positioner already registered");
- return completedFuture(null);
- }
-
- mDisplayContent = displayContent;
- mClientChannel = mService.mInputManager.createInputChannel(TAG);
-
- mInputEventReceiver = new BatchedInputEventReceiver.SimpleBatchedInputEventReceiver(
- mClientChannel, mService.mAnimationHandler.getLooper(),
- mService.mAnimator.getChoreographer(), this::onInputEvent);
-
- mDragApplicationHandle = new InputApplicationHandle(new Binder(), TAG,
- DEFAULT_DISPATCHING_TIMEOUT_MILLIS);
-
- mDragWindowHandle = new InputWindowHandle(mDragApplicationHandle,
- displayContent.getDisplayId());
- mDragWindowHandle.name = TAG;
- mDragWindowHandle.token = mClientChannel.getToken();
- mDragWindowHandle.layoutParamsType = WindowManager.LayoutParams.TYPE_DRAG;
- mDragWindowHandle.dispatchingTimeoutMillis = DEFAULT_DISPATCHING_TIMEOUT_MILLIS;
- mDragWindowHandle.ownerPid = WindowManagerService.MY_PID;
- mDragWindowHandle.ownerUid = WindowManagerService.MY_UID;
- mDragWindowHandle.scaleFactor = 1.0f;
- // When dragging the window around, we do not want to steal focus for the window.
- mDragWindowHandle.inputConfig = InputConfig.NOT_FOCUSABLE;
-
- // The drag window cannot receive new touches.
- mDragWindowHandle.touchableRegion.setEmpty();
-
- // Pause rotations before a drag.
- ProtoLog.d(WM_DEBUG_ORIENTATION, "Pausing rotation during re-position");
- mDisplayContent.getDisplayRotation().pause();
-
- // Notify InputMonitor to take mDragWindowHandle.
- return mService.mTaskPositioningController.showInputSurface(win.getDisplayId())
- .thenRun(() -> {
- // The global lock is held by the callers of register but released before the async
- // results are waited on. We must acquire the lock in this callback to ensure thread
- // safety.
- synchronized (mService.mGlobalLock) {
- final Rect displayBounds = mTmpRect;
- displayContent.getBounds(displayBounds);
- final DisplayMetrics displayMetrics = displayContent.getDisplayMetrics();
- mMinVisibleWidth = dipToPixel(MINIMUM_VISIBLE_WIDTH_IN_DP, displayMetrics);
- mMinVisibleHeight = dipToPixel(MINIMUM_VISIBLE_HEIGHT_IN_DP, displayMetrics);
- mMaxVisibleSize.set(displayBounds.width(), displayBounds.height());
-
- mDragEnded = false;
-
- try {
- mClientCallback = win.mClient.asBinder();
- mClientCallback.linkToDeath(this, 0 /* flags */);
- } catch (RemoteException e) {
- // The caller has died, so clean up TaskPositioningController.
- mService.mTaskPositioningController.finishTaskPositioning();
- return;
- }
- mWindow = win;
- mTask = win.getTask();
- }
- });
- }
-
- void unregister() {
- if (DEBUG_TASK_POSITIONING) {
- Slog.d(TAG, "Unregistering task positioner");
- }
-
- if (mClientChannel == null) {
- Slog.e(TAG, "Task positioner not registered");
- return;
- }
-
- mService.mTaskPositioningController.hideInputSurface(mDisplayContent.getDisplayId());
- mService.mInputManager.removeInputChannel(mClientChannel.getToken());
-
- mInputEventReceiver.dispose();
- mInputEventReceiver = null;
- mClientChannel.dispose();
- mClientChannel = null;
-
- mDragWindowHandle = null;
- mDragApplicationHandle = null;
- mDragEnded = true;
-
- // Notify InputMonitor to remove mDragWindowHandle.
- mDisplayContent.getInputMonitor().updateInputWindowsLw(true /*force*/);
-
- // Resume rotations after a drag.
- ProtoLog.d(WM_DEBUG_ORIENTATION, "Resuming rotation after re-position");
- mDisplayContent.getDisplayRotation().resume();
- mDisplayContent = null;
- if (mClientCallback != null) {
- mClientCallback.unlinkToDeath(this, 0 /* flags */);
- }
- mWindow = null;
- }
-
- /**
- * Starts moving or resizing the task. This method should be only called from
- * {@link TaskPositioningController#startPositioningLocked} or unit tests.
- */
- void startDrag(boolean resize, boolean preserveOrientation, float startX, float startY) {
- if (DEBUG_TASK_POSITIONING) {
- Slog.d(TAG, "startDrag: win=" + mWindow + ", resize=" + resize
- + ", preserveOrientation=" + preserveOrientation + ", {" + startX + ", "
- + startY + "}");
- }
- // Use the bounds of the task which accounts for
- // multiple app windows. Don't use any bounds from win itself as it
- // may not be the same size as the task.
- final Rect startBounds = mTmpRect;
- mTask.getBounds(startBounds);
-
- mCtrlType = CTRL_NONE;
- mStartDragX = startX;
- mStartDragY = startY;
- mPreserveOrientation = preserveOrientation;
-
- if (resize) {
- if (startX < startBounds.left) {
- mCtrlType |= CTRL_LEFT;
- }
- if (startX > startBounds.right) {
- mCtrlType |= CTRL_RIGHT;
- }
- if (startY < startBounds.top) {
- mCtrlType |= CTRL_TOP;
- }
- if (startY > startBounds.bottom) {
- mCtrlType |= CTRL_BOTTOM;
- }
- mResizing = mCtrlType != CTRL_NONE;
- }
-
- // In case of !isDockedInEffect we are using the union of all task bounds. These might be
- // made up out of multiple windows which are only partially overlapping. When that happens,
- // the orientation from the window of interest to the entire stack might diverge. However
- // for now we treat them as the same.
- mStartOrientationWasLandscape = startBounds.width() >= startBounds.height();
- mWindowOriginalBounds.set(startBounds);
-
- // Notify the app that resizing has started, even though we haven't received any new
- // bounds yet. This will guarantee that the app starts the backdrop renderer before
- // configuration changes which could cause an activity restart.
- if (mResizing) {
- notifyMoveLocked(startX, startY);
-
- // The WindowPositionerEventReceiver callbacks are delivered on the same handler so this
- // initial resize is always guaranteed to happen before subsequent drag resizes.
- mService.mH.post(() -> {
- mService.mAtmService.resizeTask(
- mTask.mTaskId, startBounds, RESIZE_MODE_USER_FORCED);
- });
- }
-
- // Make sure we always have valid drag bounds even if the drag ends before any move events
- // have been handled.
- mWindowDragBounds.set(startBounds);
- }
-
- private void endDragLocked() {
- mResizing = false;
- mTask.setDragResizing(false);
- }
-
- /** Returns true if the move operation should be ended. */
- @VisibleForTesting
- boolean notifyMoveLocked(float x, float y) {
- if (DEBUG_TASK_POSITIONING) {
- Slog.d(TAG, "notifyMoveLocked: {" + x + "," + y + "}");
- }
-
- if (mCtrlType != CTRL_NONE) {
- resizeDrag(x, y);
- mTask.setDragResizing(true);
- return false;
- }
-
- // This is a moving or scrolling operation.
- // Only allow to move in stable area so the target window won't be covered by system bar.
- // Though {@link Task#resolveOverrideConfiguration} should also avoid the case.
- mDisplayContent.getStableRect(mTmpRect);
- // The task may be put in a limited display area.
- mTmpRect.intersect(mTask.getRootTask().getParent().getBounds());
-
- int nX = (int) x;
- int nY = (int) y;
- if (!mTmpRect.contains(nX, nY)) {
- // For a moving operation we allow the pointer to go out of the stack bounds, but
- // use the clamped pointer position for the drag bounds computation.
- nX = Math.min(Math.max(nX, mTmpRect.left), mTmpRect.right);
- nY = Math.min(Math.max(nY, mTmpRect.top), mTmpRect.bottom);
- }
-
- updateWindowDragBounds(nX, nY, mTmpRect);
- return false;
- }
-
- /**
- * The user is drag - resizing the window.
- *
- * @param x The x coordinate of the current drag coordinate.
- * @param y the y coordinate of the current drag coordinate.
- */
- @VisibleForTesting
- void resizeDrag(float x, float y) {
- updateDraggedBounds(TaskResizingAlgorithm.resizeDrag(x, y, mStartDragX, mStartDragY,
- mWindowOriginalBounds, mCtrlType, mMinVisibleWidth, mMinVisibleHeight,
- mMaxVisibleSize, mPreserveOrientation, mStartOrientationWasLandscape));
- }
-
- private void updateDraggedBounds(Rect newBounds) {
- mWindowDragBounds.set(newBounds);
-
- checkBoundsForOrientationViolations(mWindowDragBounds);
- }
-
- /**
- * Validate bounds against orientation violations (if DEBUG_ORIENTATION_VIOLATIONS is set).
- *
- * @param bounds The bounds to be checked.
- */
- private void checkBoundsForOrientationViolations(Rect bounds) {
- // When using debug check that we are not violating the given constraints.
- if (DEBUG_ORIENTATION_VIOLATIONS) {
- if (mStartOrientationWasLandscape != (bounds.width() >= bounds.height())) {
- Slog.e(TAG, "Orientation violation detected! should be "
- + (mStartOrientationWasLandscape ? "landscape" : "portrait")
- + " but is the other");
- } else {
- Slog.v(TAG, "new bounds size: " + bounds.width() + " x " + bounds.height());
- }
- if (mMinVisibleWidth > bounds.width() || mMinVisibleHeight > bounds.height()) {
- Slog.v(TAG, "Minimum requirement violated: Width(min, is)=(" + mMinVisibleWidth
- + ", " + bounds.width() + ") Height(min,is)=("
- + mMinVisibleHeight + ", " + bounds.height() + ")");
- }
- if (mMaxVisibleSize.x < bounds.width() || mMaxVisibleSize.y < bounds.height()) {
- Slog.v(TAG, "Maximum requirement violated: Width(min, is)=(" + mMaxVisibleSize.x
- + ", " + bounds.width() + ") Height(min,is)=("
- + mMaxVisibleSize.y + ", " + bounds.height() + ")");
- }
- }
- }
-
- private void updateWindowDragBounds(int x, int y, Rect rootTaskBounds) {
- final int offsetX = Math.round(x - mStartDragX);
- final int offsetY = Math.round(y - mStartDragY);
- mWindowDragBounds.set(mWindowOriginalBounds);
- // Horizontally, at least mMinVisibleWidth pixels of the window should remain visible.
- final int maxLeft = rootTaskBounds.right - mMinVisibleWidth;
- final int minLeft = rootTaskBounds.left + mMinVisibleWidth - mWindowOriginalBounds.width();
-
- // Vertically, the top mMinVisibleHeight of the window should remain visible.
- // (This assumes that the window caption bar is at the top of the window).
- final int minTop = rootTaskBounds.top;
- final int maxTop = rootTaskBounds.bottom - mMinVisibleHeight;
-
- mWindowDragBounds.offsetTo(
- Math.min(Math.max(mWindowOriginalBounds.left + offsetX, minLeft), maxLeft),
- Math.min(Math.max(mWindowOriginalBounds.top + offsetY, minTop), maxTop));
-
- if (DEBUG_TASK_POSITIONING) Slog.d(TAG,
- "updateWindowDragBounds: " + mWindowDragBounds);
- }
-
- public String toShortString() {
- return TAG;
- }
-
- static void setFactory(Factory factory) {
- sFactory = factory;
- }
-
- static TaskPositioner create(WindowManagerService service) {
- if (sFactory == null) {
- sFactory = new Factory() {};
- }
-
- return sFactory.create(service);
- }
-
- @Override
- public void binderDied() {
- mService.mTaskPositioningController.finishTaskPositioning();
- }
-
- interface Factory {
- default TaskPositioner create(WindowManagerService service) {
- return new TaskPositioner(service);
- }
- }
-}
diff --git a/services/core/java/com/android/server/wm/TaskPositioningController.java b/services/core/java/com/android/server/wm/TaskPositioningController.java
deleted file mode 100644
index 6f548ab01d74..000000000000
--- a/services/core/java/com/android/server/wm/TaskPositioningController.java
+++ /dev/null
@@ -1,250 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server.wm;
-
-import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_TASK_POSITIONING;
-import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM;
-
-import static java.util.concurrent.CompletableFuture.completedFuture;
-
-import android.annotation.Nullable;
-import android.graphics.Point;
-import android.graphics.Rect;
-import android.util.Slog;
-import android.view.Display;
-import android.view.IWindow;
-import android.view.InputWindowHandle;
-import android.view.SurfaceControl;
-
-import java.util.concurrent.CompletableFuture;
-
-/**
- * Controller for task positioning by drag.
- */
-class TaskPositioningController {
- private final WindowManagerService mService;
- private SurfaceControl mInputSurface;
- private DisplayContent mPositioningDisplay;
-
- private @Nullable TaskPositioner mTaskPositioner;
-
- private final Rect mTmpClipRect = new Rect();
-
- boolean isPositioningLocked() {
- return mTaskPositioner != null;
- }
-
- final SurfaceControl.Transaction mTransaction;
-
- InputWindowHandle getDragWindowHandleLocked() {
- return mTaskPositioner != null ? mTaskPositioner.mDragWindowHandle : null;
- }
-
- TaskPositioningController(WindowManagerService service) {
- mService = service;
- mTransaction = service.mTransactionFactory.get();
- }
-
- void hideInputSurface(int displayId) {
- if (mPositioningDisplay != null && mPositioningDisplay.getDisplayId() == displayId
- && mInputSurface != null) {
- mTransaction.hide(mInputSurface).apply();
- }
- }
-
- /**
- * @return a future that completes after window info is sent.
- */
- CompletableFuture<Void> showInputSurface(int displayId) {
- if (mPositioningDisplay == null || mPositioningDisplay.getDisplayId() != displayId) {
- return completedFuture(null);
- }
- final DisplayContent dc = mService.mRoot.getDisplayContent(displayId);
- if (mInputSurface == null) {
- mInputSurface = mService.makeSurfaceBuilder(dc.getSession())
- .setContainerLayer()
- .setName("Drag and Drop Input Consumer")
- .setCallsite("TaskPositioningController.showInputSurface")
- .setParent(dc.getOverlayLayer())
- .build();
- }
-
- final InputWindowHandle h = getDragWindowHandleLocked();
- if (h == null) {
- Slog.w(TAG_WM, "Drag is in progress but there is no "
- + "drag window handle.");
- return completedFuture(null);
- }
-
- final Display display = dc.getDisplay();
- final Point p = new Point();
- display.getRealSize(p);
- mTmpClipRect.set(0, 0, p.x, p.y);
-
- CompletableFuture<Void> result = new CompletableFuture<>();
- mTransaction.show(mInputSurface)
- .setInputWindowInfo(mInputSurface, h)
- .setLayer(mInputSurface, Integer.MAX_VALUE)
- .setPosition(mInputSurface, 0, 0)
- .setCrop(mInputSurface, mTmpClipRect)
- .addWindowInfosReportedListener(() -> result.complete(null))
- .apply();
- return result;
- }
-
- boolean startMovingTask(IWindow window, float startX, float startY) {
- WindowState win = null;
- CompletableFuture<Boolean> startPositioningLockedFuture;
- synchronized (mService.mGlobalLock) {
- win = mService.windowForClientLocked(null, window, false);
- startPositioningLockedFuture =
- startPositioningLocked(
- win, false /*resize*/, false /*preserveOrientation*/, startX, startY);
- }
-
- try {
- if (!startPositioningLockedFuture.get()) {
- return false;
- }
- } catch (Exception exception) {
- Slog.e(TAG_WM, "Exception thrown while waiting for startPositionLocked future",
- exception);
- return false;
- }
-
- synchronized (mService.mGlobalLock) {
- mService.mAtmService.setFocusedTask(win.getTask().mTaskId);
- }
- return true;
- }
-
- void handleTapOutsideTask(DisplayContent displayContent, int x, int y) {
- mService.mH.post(() -> {
- Task task;
- CompletableFuture<Boolean> startPositioningLockedFuture;
- synchronized (mService.mGlobalLock) {
- task = displayContent.findTaskForResizePoint(x, y);
- if (task == null || !task.isResizeable()) {
- // The task is not resizable, so don't do anything when the user drags the
- // the resize handles.
- return;
- }
- startPositioningLockedFuture =
- startPositioningLocked(task.getTopVisibleAppMainWindow(), true /*resize*/,
- task.preserveOrientationOnResize(), x, y);
- }
-
- try {
- if (!startPositioningLockedFuture.get()) {
- return;
- }
- } catch (Exception exception) {
- Slog.e(TAG_WM, "Exception thrown while waiting for startPositionLocked future",
- exception);
- return;
- }
-
- synchronized (mService.mGlobalLock) {
- mService.mAtmService.setFocusedTask(task.mTaskId);
- }
- });
- }
-
- private CompletableFuture<Boolean> startPositioningLocked(WindowState win, boolean resize,
- boolean preserveOrientation, float startX, float startY) {
- if (DEBUG_TASK_POSITIONING)
- Slog.d(TAG_WM, "startPositioningLocked: "
- + "win=" + win + ", resize=" + resize + ", preserveOrientation="
- + preserveOrientation + ", {" + startX + ", " + startY + "}");
-
- if (win == null || win.mActivityRecord == null) {
- Slog.w(TAG_WM, "startPositioningLocked: Bad window " + win);
- return completedFuture(false);
- }
- if (win.mInputChannel == null) {
- Slog.wtf(TAG_WM, "startPositioningLocked: " + win + " has no input channel, "
- + " probably being removed");
- return completedFuture(false);
- }
-
- final DisplayContent displayContent = win.getDisplayContent();
- if (displayContent == null) {
- Slog.w(TAG_WM, "startPositioningLocked: Invalid display content " + win);
- return completedFuture(false);
- }
- mPositioningDisplay = displayContent;
-
- mTaskPositioner = TaskPositioner.create(mService);
- return mTaskPositioner.register(displayContent, win).thenApply(unused -> {
- // The global lock is held by the callers of startPositioningLocked but released before
- // the async results are waited on. We must acquire the lock in this callback to ensure
- // thread safety.
- synchronized (mService.mGlobalLock) {
- // We need to grab the touch focus so that the touch events during the
- // resizing/scrolling are not sent to the app. 'win' is the main window
- // of the app, it may not have focus since there might be other windows
- // on top (eg. a dialog window).
- WindowState transferTouchFromWin = win;
- if (displayContent.mCurrentFocus != null && displayContent.mCurrentFocus != win
- && displayContent.mCurrentFocus.mActivityRecord == win.mActivityRecord) {
- transferTouchFromWin = displayContent.mCurrentFocus;
- }
- if (!mService.mInputManager.transferTouchGesture(
- transferTouchFromWin.mInputChannel.getToken(),
- mTaskPositioner.mClientChannel.getToken())) {
- Slog.e(TAG_WM, "startPositioningLocked: Unable to transfer touch focus");
- cleanUpTaskPositioner();
- return false;
- }
-
- mTaskPositioner.startDrag(resize, preserveOrientation, startX, startY);
- return true;
- }
- });
- }
-
- public void finishTaskPositioning(IWindow window) {
- if (mTaskPositioner != null && mTaskPositioner.mClientCallback == window.asBinder()) {
- finishTaskPositioning();
- }
- }
-
- void finishTaskPositioning() {
- // TaskPositioner attaches the InputEventReceiver to the animation thread. We need to
- // dispose the receiver on the same thread to avoid race conditions.
- mService.mAnimationHandler.post(() -> {
- if (DEBUG_TASK_POSITIONING) Slog.d(TAG_WM, "finishPositioning");
-
- synchronized (mService.mGlobalLock) {
- cleanUpTaskPositioner();
- mPositioningDisplay = null;
- }
- });
- }
-
- private void cleanUpTaskPositioner() {
- final TaskPositioner positioner = mTaskPositioner;
- if (positioner == null) {
- return;
- }
-
- // We need to assign task positioner to null first to indicate that we're finishing task
- // positioning.
- mTaskPositioner = null;
- positioner.unregister();
- }
-}
diff --git a/services/core/java/com/android/server/wm/TaskSnapshotController.java b/services/core/java/com/android/server/wm/TaskSnapshotController.java
index 4218f8f88a07..57c7753d5c4b 100644
--- a/services/core/java/com/android/server/wm/TaskSnapshotController.java
+++ b/services/core/java/com/android/server/wm/TaskSnapshotController.java
@@ -261,8 +261,8 @@ class TaskSnapshotController extends AbsAppSnapshotController<Task, TaskSnapshot
}
@Override
- ActivityRecord getTopFullscreenActivity(Task source) {
- return source.getTopFullscreenActivity();
+ WindowState getTopFullscreenWindow(Task source) {
+ return source.getTopFullscreenMainWindow(true /* includeStartingApp */);
}
@Override
diff --git a/services/core/java/com/android/server/wm/Transition.java b/services/core/java/com/android/server/wm/Transition.java
index 47af6fc0a6c7..65bc9a226f55 100644
--- a/services/core/java/com/android/server/wm/Transition.java
+++ b/services/core/java/com/android/server/wm/Transition.java
@@ -16,6 +16,7 @@
package com.android.server.wm;
+import static android.app.ActivityOptions.ANIM_CUSTOM;
import static android.app.ActivityOptions.ANIM_OPEN_CROSS_PROFILE_APPS;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_RECENTS;
@@ -744,6 +745,7 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
if (mController.isAnimating()) {
dc.enableHighPerfTransition(true);
}
+ mController.dispatchLegacyAppTransitionPending(dc.mDisplayId);
}
/**
@@ -1617,7 +1619,7 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
mController.mTransitionTracer.logAbortedTransition(this);
// Syncengine abort will call through to onTransactionReady()
mSyncEngine.abort(mSyncId);
- mController.dispatchLegacyAppTransitionCancelled();
+ mController.dispatchLegacyAppTransitionCancelled(mTargetDisplays);
invokeTransitionEndedListeners();
}
@@ -1765,7 +1767,19 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
}
for (int i = 0; i < mTargets.size(); ++i) {
- final DisplayArea da = mTargets.get(i).mContainer.asDisplayArea();
+ final WindowContainer<?> wc = mTargets.get(i).mContainer;
+ final WallpaperWindowToken wp = wc.asWallpaperToken();
+ if (wp != null) {
+ // If on a rotation leash, the wallpaper token surface needs to be shown explicitly
+ // because shell only gets the leash and the wallpaper token surface is not allowed
+ // to be changed by non-transition logic until the transition is finished.
+ if (Flags.ensureWallpaperInTransitions() && wp.isVisibleRequested()
+ && wp.getFixedRotationLeash() != null) {
+ transaction.show(wp.mSurfaceControl);
+ }
+ continue;
+ }
+ final DisplayArea<?> da = wc.asDisplayArea();
if (da == null) continue;
if (da.isVisibleRequested()) {
mController.mValidateDisplayVis.remove(da);
@@ -1897,7 +1911,8 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
}
}
- private void overrideAnimationOptionsToInfoIfNecessary(@NonNull TransitionInfo info) {
+ @VisibleForTesting
+ void overrideAnimationOptionsToInfoIfNecessary(@NonNull TransitionInfo info) {
if (mOverrideOptions == null) {
return;
}
@@ -1914,12 +1929,28 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
changes.get(i).setAnimationOptions(mOverrideOptions);
// TODO(b/295805497): Extract mBackgroundColor from AnimationOptions.
changes.get(i).setBackgroundColor(mOverrideOptions.getBackgroundColor());
+ } else if (shouldApplyAnimOptionsToEmbeddedTf(container.asTaskFragment())) {
+ // We only override AnimationOptions because backgroundColor should be from
+ // TaskFragmentAnimationParams.
+ changes.get(i).setAnimationOptions(mOverrideOptions);
}
}
}
updateActivityTargetForCrossProfileAnimation(info);
}
+ private boolean shouldApplyAnimOptionsToEmbeddedTf(@Nullable TaskFragment taskFragment) {
+ if (taskFragment == null || !taskFragment.isEmbedded()) {
+ return false;
+ }
+ if (taskFragment.getAnimationParams().hasOverrideAnimation()) {
+ // Always respect animation overrides from TaskFragmentAnimationParams.
+ return false;
+ }
+ // ActivityEmbedding animation adapter only support custom animation
+ return mOverrideOptions != null && mOverrideOptions.getType() == ANIM_CUSTOM;
+ }
+
/**
* Updates activity open target if {@link #mOverrideOptions} is
* {@link ANIM_OPEN_CROSS_PROFILE_APPS}.
@@ -1929,8 +1960,7 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
return;
}
for (int i = 0; i < mTargets.size(); ++i) {
- final ActivityRecord activity = mTargets.get(i).mContainer
- .asActivityRecord();
+ final ActivityRecord activity = mTargets.get(i).mContainer.asActivityRecord();
final TransitionInfo.Change change = info.getChanges().get(i);
if (activity == null || change.getMode() != TRANSIT_OPEN) {
continue;
@@ -2126,6 +2156,16 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
}
/**
+
+ * Wallpaper will set itself as target if it wants to keep itself visible without a target.
+ */
+ private static boolean wallpaperIsOwnTarget(WallpaperWindowToken wallpaper) {
+ final WindowState target =
+ wallpaper.getDisplayContent().mWallpaperController.getWallpaperTarget();
+ return target != null && target.isDescendantOf(wallpaper);
+ }
+
+ /**
* Reset waitingToshow for all wallpapers, and commit the visibility of the visible ones
*/
private void commitVisibleWallpapers(SurfaceControl.Transaction t) {
@@ -2133,16 +2173,13 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
for (int i = mParticipants.size() - 1; i >= 0; --i) {
final WallpaperWindowToken wallpaper = mParticipants.valueAt(i).asWallpaperToken();
if (wallpaper != null) {
- if (!wallpaper.isVisible() && wallpaper.isVisibleRequested()) {
+ if (!wallpaper.isVisible() && (wallpaper.isVisibleRequested()
+ || (Flags.ensureWallpaperInTransitions() && showWallpaper))) {
wallpaper.commitVisibility(showWallpaper);
- }
- if (showWallpaper && Flags.ensureWallpaperInTransitions()
- && wallpaper.isVisibleRequested()
- && getLeashSurface(wallpaper, t) != wallpaper.getSurfaceControl()) {
- // If on a rotation leash, we need to explicitly show the wallpaper surface
- // because shell only gets the leash and we don't allow non-transition logic
- // to touch the surfaces until the transition is over.
- t.show(wallpaper.getSurfaceControl());
+ } else if (Flags.ensureWallpaperInTransitions() && wallpaper.isVisible()
+ && !showWallpaper && !wallpaper.getDisplayContent().isKeyguardLocked()
+ && !wallpaperIsOwnTarget(wallpaper)) {
+ wallpaper.setVisibleRequested(false);
}
}
}
@@ -2556,11 +2593,10 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
if (wc.asWindowState() != null) continue;
final ChangeInfo changeInfo = changes.get(wc);
- // Reject no-ops, unless wallpaper
- if (!changeInfo.hasChanged()
- && (!Flags.ensureWallpaperInTransitions() || wc.asWallpaperToken() == null)) {
+ // Reject no-ops
+ if (!changeInfo.hasChanged()) {
ProtoLog.v(ProtoLogGroup.WM_DEBUG_WINDOW_TRANSITIONS,
- " Rejecting as no-op: %s", wc);
+ " Rejecting as no-op: %s vis: %b", wc, wc.isVisibleRequested());
continue;
}
targets.add(changeInfo);
@@ -2757,12 +2793,19 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
return out;
}
+ // Get the animation theme from the top-most application window
+ // when Flags.customAnimationsBehindTranslucent() is false.
final AnimationOptions animOptionsForActivityTransition =
calculateAnimationOptionsForActivityTransition(type, sortedTargets);
+
if (!Flags.moveAnimationOptionsToChange() && animOptionsForActivityTransition != null) {
out.setAnimationOptions(animOptionsForActivityTransition);
}
+ // Store the animation options of the topmost non-translucent change
+ // (Used when Flags.customAnimationsBehindTranslucent() is true)
+ AnimationOptions activityAboveAnimationOptions = null;
+
final ArraySet<WindowContainer> occludedAtEndContainers = new ArraySet<>();
// Convert all the resolved ChangeInfos into TransactionInfo.Change objects in order.
final int count = sortedTargets.size();
@@ -2881,9 +2924,26 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
change.setBackgroundColor(ColorUtils.setAlphaComponent(backgroundColor, 255));
}
- AnimationOptions animOptions = null;
+ // Calculate the animation options for this change
if (Flags.moveAnimationOptionsToChange()) {
- if (activityRecord != null && animOptionsForActivityTransition != null) {
+ AnimationOptions animOptions = null;
+ if (Flags.customAnimationsBehindTranslucent() && activityRecord != null) {
+ if (activityAboveAnimationOptions != null) {
+ // Inherit the options from one of the changes on top of this
+ animOptions = activityAboveAnimationOptions;
+ } else {
+ // Create the options based on this change's custom animations and layout
+ // parameters
+ animOptions = getOptions(activityRecord /* customAnimActivity */,
+ activityRecord /* animLpActivity */);
+ if (!change.hasFlags(FLAG_TRANSLUCENT)) {
+ // If this change is not translucent, its options are going to be
+ // inherited by the changes below
+ activityAboveAnimationOptions = animOptions;
+ }
+ }
+ } else if (activityRecord != null && animOptionsForActivityTransition != null) {
+ // Use the same options from the top activity for all the activities
animOptions = animOptionsForActivityTransition;
} else if (Flags.activityEmbeddingOverlayPresentationFlag()
&& isEmbeddedTaskFragment) {
@@ -2931,25 +2991,42 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
@Nullable
private static AnimationOptions calculateAnimationOptionsForActivityTransition(
@TransitionType int type, @NonNull ArrayList<ChangeInfo> sortedTargets) {
- TransitionInfo.AnimationOptions animOptions = null;
-
- // Check if the top-most app is an activity (ie. activity->activity). If so, make sure
- // to honor its custom transition options.
WindowContainer<?> topApp = null;
for (int i = 0; i < sortedTargets.size(); i++) {
- if (isWallpaper(sortedTargets.get(i).mContainer)) continue;
- topApp = sortedTargets.get(i).mContainer;
- break;
+ if (!isWallpaper(sortedTargets.get(i).mContainer)) {
+ topApp = sortedTargets.get(i).mContainer;
+ break;
+ }
}
- if (topApp.asActivityRecord() != null) {
- final ActivityRecord topActivity = topApp.asActivityRecord();
- animOptions = addCustomActivityTransition(topActivity, true/* open */,
- null /* animOptions */);
- animOptions = addCustomActivityTransition(topActivity, false/* open */,
+ ActivityRecord animLpActivity = findAnimLayoutParamsActivityRecord(type, sortedTargets);
+ return getOptions(topApp.asActivityRecord() /* customAnimActivity */,
+ animLpActivity /* animLpActivity */);
+ }
+
+ /**
+ * Updates and returns animOptions with the layout parameters of animLpActivity
+ * @param customAnimActivity the activity that drives the custom animation options
+ * @param animLpActivity the activity that drives the animation options with its layout
+ * parameters
+ * @return the options extracted from the provided activities
+ */
+ @Nullable
+ private static AnimationOptions getOptions(@Nullable ActivityRecord customAnimActivity,
+ @Nullable ActivityRecord animLpActivity) {
+ AnimationOptions animOptions = null;
+ // Custom
+ if (customAnimActivity != null) {
+ animOptions = addCustomActivityTransition(customAnimActivity, true /* open */,
+ animOptions);
+ animOptions = addCustomActivityTransition(customAnimActivity, false /* open */,
animOptions);
}
- final WindowManager.LayoutParams animLp =
- getLayoutParamsForAnimationsStyle(type, sortedTargets);
+
+ // Layout parameters
+ final WindowState mainWindow = animLpActivity != null
+ ? animLpActivity.findMainWindow() : null;
+ final WindowManager.LayoutParams animLp = mainWindow != null ? mainWindow.mAttrs : null;
+
if (animLp != null && animLp.type != TYPE_APPLICATION_STARTING
&& animLp.windowAnimations != 0) {
// Don't send animation options if no windowAnimations have been set or if the we
@@ -3087,10 +3164,9 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
return ancestor;
}
- private static WindowManager.LayoutParams getLayoutParamsForAnimationsStyle(int type,
- ArrayList<ChangeInfo> sortedTargets) {
- // Find the layout params of the top-most application window that is part of the
- // transition, which is what will control the animation theme.
+ @Nullable
+ private static ActivityRecord findAnimLayoutParamsActivityRecord(
+ @TransitionType int transit, @NonNull List<ChangeInfo> sortedTargets) {
final ArraySet<Integer> activityTypes = new ArraySet<>();
final int targetCount = sortedTargets.size();
for (int i = 0; i < targetCount; ++i) {
@@ -3110,16 +3186,7 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
// activity through the layout parameter animation style.
return null;
}
- final ActivityRecord animLpActivity =
- findAnimLayoutParamsActivityRecord(sortedTargets, type, activityTypes);
- final WindowState mainWindow = animLpActivity != null
- ? animLpActivity.findMainWindow() : null;
- return mainWindow != null ? mainWindow.mAttrs : null;
- }
- private static ActivityRecord findAnimLayoutParamsActivityRecord(
- List<ChangeInfo> sortedTargets,
- @TransitionType int transit, ArraySet<Integer> activityTypes) {
// Remote animations always win, but fullscreen windows override non-fullscreen windows.
ActivityRecord result = lookForTopWindowWithFilter(sortedTargets,
w -> w.getRemoteAnimationDefinition() != null
diff --git a/services/core/java/com/android/server/wm/TransitionController.java b/services/core/java/com/android/server/wm/TransitionController.java
index f4ff404c2bff..1df251cf3225 100644
--- a/services/core/java/com/android/server/wm/TransitionController.java
+++ b/services/core/java/com/android/server/wm/TransitionController.java
@@ -42,6 +42,7 @@ import android.util.Slog;
import android.util.SparseArray;
import android.util.TimeUtils;
import android.util.proto.ProtoOutputStream;
+import android.view.Display;
import android.view.WindowManager;
import android.window.ITransitionMetricsReporter;
import android.window.ITransitionPlayer;
@@ -326,7 +327,6 @@ class TransitionController {
mCollectingTransition.startCollecting(timeoutMs);
ProtoLog.v(ProtoLogGroup.WM_DEBUG_WINDOW_TRANSITIONS, "Start collecting in Transition: %s",
mCollectingTransition);
- dispatchLegacyAppTransitionPending();
}
void registerTransitionPlayer(@Nullable ITransitionPlayer player,
@@ -1347,31 +1347,54 @@ class TransitionController {
mLegacyListeners.remove(listener);
}
- void dispatchLegacyAppTransitionPending() {
+ private static boolean shouldDispatchLegacyListener(
+ WindowManagerInternal.AppTransitionListener listener, int displayId) {
+ // INVALID_DISPLAY means that it is a global listener.
+ return listener.mDisplayId == Display.INVALID_DISPLAY || listener.mDisplayId == displayId;
+ }
+
+ void dispatchLegacyAppTransitionPending(int displayId) {
for (int i = 0; i < mLegacyListeners.size(); ++i) {
- mLegacyListeners.get(i).onAppTransitionPendingLocked();
+ final WindowManagerInternal.AppTransitionListener listener = mLegacyListeners.get(i);
+ if (shouldDispatchLegacyListener(listener, displayId)) {
+ listener.onAppTransitionPendingLocked();
+ }
}
}
void dispatchLegacyAppTransitionStarting(TransitionInfo info, long statusBarTransitionDelay) {
+ final long now = SystemClock.uptimeMillis();
for (int i = 0; i < mLegacyListeners.size(); ++i) {
- // TODO(shell-transitions): handle (un)occlude transition.
- mLegacyListeners.get(i).onAppTransitionStartingLocked(
- SystemClock.uptimeMillis() + statusBarTransitionDelay,
- AnimationAdapter.STATUS_BAR_TRANSITION_DURATION);
+ final WindowManagerInternal.AppTransitionListener listener = mLegacyListeners.get(i);
+ for (int j = 0; j < info.getRootCount(); ++j) {
+ final int displayId = info.getRoot(j).getDisplayId();
+ if (shouldDispatchLegacyListener(listener, displayId)) {
+ listener.onAppTransitionStartingLocked(
+ now + statusBarTransitionDelay,
+ AnimationAdapter.STATUS_BAR_TRANSITION_DURATION);
+ }
+ }
}
}
void dispatchLegacyAppTransitionFinished(ActivityRecord ar) {
for (int i = 0; i < mLegacyListeners.size(); ++i) {
- mLegacyListeners.get(i).onAppTransitionFinishedLocked(ar.token);
+ final WindowManagerInternal.AppTransitionListener listener = mLegacyListeners.get(i);
+ if (shouldDispatchLegacyListener(listener, ar.getDisplayId())) {
+ listener.onAppTransitionFinishedLocked(ar.token);
+ }
}
}
- void dispatchLegacyAppTransitionCancelled() {
- for (int i = 0; i < mLegacyListeners.size(); ++i) {
- mLegacyListeners.get(i).onAppTransitionCancelledLocked(
- false /* keyguardGoingAwayCancelled */);
+ void dispatchLegacyAppTransitionCancelled(ArrayList<DisplayContent> targetDisplays) {
+ for (int i = 0; i < targetDisplays.size(); ++i) {
+ final int displayId = targetDisplays.get(i).mDisplayId;
+ for (int j = 0; j < mLegacyListeners.size(); ++j) {
+ final var listener = mLegacyListeners.get(j);
+ if (shouldDispatchLegacyListener(listener, displayId)) {
+ listener.onAppTransitionCancelledLocked(false /* keyguardGoingAwayCancelled */);
+ }
+ }
}
}
diff --git a/services/core/java/com/android/server/wm/TransparentPolicy.java b/services/core/java/com/android/server/wm/TransparentPolicy.java
index 3044abdffa8f..2f46103fdf17 100644
--- a/services/core/java/com/android/server/wm/TransparentPolicy.java
+++ b/services/core/java/com/android/server/wm/TransparentPolicy.java
@@ -73,10 +73,10 @@ class TransparentPolicy {
private final TransparentPolicyState mTransparentPolicyState;
TransparentPolicy(@NonNull ActivityRecord activityRecord,
- @NonNull LetterboxConfiguration letterboxConfiguration) {
+ @NonNull AppCompatConfiguration appCompatConfiguration) {
mActivityRecord = activityRecord;
mIsTranslucentLetterboxingEnabledSupplier =
- letterboxConfiguration::isTranslucentLetterboxingEnabled;
+ appCompatConfiguration::isTranslucentLetterboxingEnabled;
mTransparentPolicyState = new TransparentPolicyState(activityRecord);
}
@@ -162,10 +162,6 @@ class TransparentPolicy {
mTransparentPolicyState.clearInheritedCompatDisplayInsets();
}
- TransparentPolicyState getTransparentPolicyState() {
- return mTransparentPolicyState;
- }
-
/**
* In case of translucent activities, it consumes the {@link ActivityRecord} of the first opaque
* activity beneath using the given consumer and returns {@code true}.
@@ -176,7 +172,7 @@ class TransparentPolicy {
@NonNull
Optional<ActivityRecord> getFirstOpaqueActivity() {
- return isRunning() ? Optional.of(mTransparentPolicyState.mFirstOpaqueActivity)
+ return isRunning() ? Optional.ofNullable(mTransparentPolicyState.mFirstOpaqueActivity)
: Optional.empty();
}
@@ -216,10 +212,6 @@ class TransparentPolicy {
SMALLEST_SCREEN_WIDTH_DP_UNDEFINED;
}
- private void inheritConfiguration(ActivityRecord firstOpaque) {
- mTransparentPolicyState.inheritFromOpaque(firstOpaque);
- }
-
/**
* Encapsulate the state for the current translucent activity when the transparent policy
* has started.
diff --git a/services/core/java/com/android/server/wm/WindowContainer.java b/services/core/java/com/android/server/wm/WindowContainer.java
index 1d02f1c133f6..eb1a80b74b76 100644
--- a/services/core/java/com/android/server/wm/WindowContainer.java
+++ b/services/core/java/com/android/server/wm/WindowContainer.java
@@ -117,6 +117,7 @@ import com.android.server.wm.SurfaceAnimator.Animatable;
import com.android.server.wm.SurfaceAnimator.AnimationType;
import com.android.server.wm.SurfaceAnimator.OnAnimationFinishedCallback;
import com.android.server.wm.utils.AlwaysTruePredicate;
+import com.android.window.flags.Flags;
import java.io.PrintWriter;
import java.lang.ref.WeakReference;
@@ -458,6 +459,9 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
source.setFrame(provider.getArbitraryRectangle())
.updateSideHint(getBounds())
.setBoundingRects(provider.getBoundingRects());
+ if (Flags.enableCaptionCompatInsetForceConsumption()) {
+ source.setFlags(provider.getFlags());
+ }
mLocalInsetsSources.put(id, source);
mDisplayContent.getInsetsStateController().updateAboveInsetsState(true);
}
@@ -2579,8 +2583,12 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
// Containers don't belong to the same hierarchy???
if (commonAncestor == null) {
- throw new IllegalArgumentException("No in the same hierarchy this="
- + thisParentChain + " other=" + otherParentChain);
+ final int thisZ = getPrefixOrderIndex();
+ final int otherZ = other.getPrefixOrderIndex();
+ Slog.w(TAG, "Compare not in the same hierarchy this="
+ + thisParentChain + " thisZ=" + thisZ + " other="
+ + otherParentChain + " otherZ=" + otherZ);
+ return Integer.compare(thisZ, otherZ);
}
// Children are always considered greater than their parents, so if one of the containers
diff --git a/services/core/java/com/android/server/wm/WindowManagerDebugConfig.java b/services/core/java/com/android/server/wm/WindowManagerDebugConfig.java
index 42b556f77ab6..61253602c066 100644
--- a/services/core/java/com/android/server/wm/WindowManagerDebugConfig.java
+++ b/services/core/java/com/android/server/wm/WindowManagerDebugConfig.java
@@ -47,7 +47,6 @@ public class WindowManagerDebugConfig {
static final boolean DEBUG_LAYOUT_REPEATS = false;
static final boolean DEBUG_WINDOW_TRACE = false;
static final boolean DEBUG_TASK_MOVEMENT = false;
- static final boolean DEBUG_TASK_POSITIONING = false;
static final boolean DEBUG_ROOT_TASK = false;
static final boolean DEBUG_DISPLAY = false;
static final boolean DEBUG_POWER = false;
diff --git a/services/core/java/com/android/server/wm/WindowManagerFlags.java b/services/core/java/com/android/server/wm/WindowManagerFlags.java
index 294733e85fbd..f3e6a184ce45 100644
--- a/services/core/java/com/android/server/wm/WindowManagerFlags.java
+++ b/services/core/java/com/android/server/wm/WindowManagerFlags.java
@@ -50,5 +50,8 @@ class WindowManagerFlags {
final boolean mInsetsDecoupledConfiguration = Flags.insetsDecoupledConfiguration();
+ final boolean mRespectNonTopVisibleFixedOrientation =
+ Flags.respectNonTopVisibleFixedOrientation();
+
/* End Available Flags */
}
diff --git a/services/core/java/com/android/server/wm/WindowManagerInternal.java b/services/core/java/com/android/server/wm/WindowManagerInternal.java
index 2ea1cf88447a..132e1ee99914 100644
--- a/services/core/java/com/android/server/wm/WindowManagerInternal.java
+++ b/services/core/java/com/android/server/wm/WindowManagerInternal.java
@@ -244,6 +244,22 @@ public abstract class WindowManagerInternal {
public static abstract class AppTransitionListener {
/**
+ * The display this listener is interested in. If it is INVALID_DISPLAY, then which display
+ * should be notified depends on the dispatcher.
+ */
+ public final int mDisplayId;
+
+ /** Let transition controller decide which display should receive the callbacks. */
+ public AppTransitionListener() {
+ this(Display.INVALID_DISPLAY);
+ }
+
+ /** It will listen the transition on the given display. */
+ public AppTransitionListener(int displayId) {
+ mDisplayId = displayId;
+ }
+
+ /**
* Called when an app transition is being setup and about to be executed.
*/
public void onAppTransitionPendingLocked() {}
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index 9a5f84cf7449..f65eea0797bf 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -54,7 +54,6 @@ import static android.service.dreams.Flags.dreamHandlesConfirmKeys;
import static android.view.ContentRecordingSession.RECORD_CONTENT_TASK;
import static android.view.Display.DEFAULT_DISPLAY;
import static android.view.Display.INVALID_DISPLAY;
-import static android.view.flags.Flags.sensitiveContentAppProtection;
import static android.view.WindowManager.DISPLAY_IME_POLICY_FALLBACK_DISPLAY;
import static android.view.WindowManager.DISPLAY_IME_POLICY_LOCAL;
import static android.view.WindowManager.LayoutParams.FIRST_APPLICATION_WINDOW;
@@ -97,6 +96,7 @@ import static android.view.WindowManagerGlobal.RELAYOUT_RES_SURFACE_CHANGED;
import static android.view.WindowManagerPolicyConstants.TYPE_LAYER_MULTIPLIER;
import static android.view.displayhash.DisplayHashResultCallback.DISPLAY_HASH_ERROR_MISSING_WINDOW;
import static android.view.displayhash.DisplayHashResultCallback.DISPLAY_HASH_ERROR_NOT_VISIBLE_ON_SCREEN;
+import static android.view.flags.Flags.sensitiveContentAppProtection;
import static android.window.WindowProviderService.isWindowProviderService;
import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_ADD_REMOVE;
@@ -120,10 +120,10 @@ import static com.android.server.policy.WindowManagerPolicy.FINISH_LAYOUT_REDO_W
import static com.android.server.wm.ActivityTaskManagerService.POWER_MODE_REASON_CHANGE_DISPLAY;
import static com.android.server.wm.DisplayContent.IME_TARGET_CONTROL;
import static com.android.server.wm.DisplayContent.IME_TARGET_LAYERING;
-import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_BACKGROUND_APP_COLOR_BACKGROUND;
-import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_BACKGROUND_APP_COLOR_BACKGROUND_FLOATING;
-import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_BACKGROUND_SOLID_COLOR;
-import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_BACKGROUND_WALLPAPER;
+import static com.android.server.wm.AppCompatConfiguration.LETTERBOX_BACKGROUND_APP_COLOR_BACKGROUND;
+import static com.android.server.wm.AppCompatConfiguration.LETTERBOX_BACKGROUND_APP_COLOR_BACKGROUND_FLOATING;
+import static com.android.server.wm.AppCompatConfiguration.LETTERBOX_BACKGROUND_SOLID_COLOR;
+import static com.android.server.wm.AppCompatConfiguration.LETTERBOX_BACKGROUND_WALLPAPER;
import static com.android.server.wm.RootWindowContainer.MATCH_ATTACHED_TASK_OR_RECENT_TASKS;
import static com.android.server.wm.SensitiveContentPackages.PackageInfo;
import static com.android.server.wm.SurfaceAnimator.ANIMATION_TYPE_ALL;
@@ -283,6 +283,7 @@ import android.view.InsetsFrameProvider;
import android.view.InsetsSourceControl;
import android.view.InsetsState;
import android.view.KeyEvent;
+import android.view.KeyboardShortcutGroup;
import android.view.MagnificationSpec;
import android.view.RemoteAnimationAdapter;
import android.view.ScrollCaptureResponse;
@@ -334,8 +335,8 @@ import com.android.internal.policy.IKeyguardLockedStateListener;
import com.android.internal.policy.IShortcutService;
import com.android.internal.policy.KeyInterceptionInfo;
import com.android.internal.protolog.LegacyProtoLogImpl;
-import com.android.internal.protolog.ProtoLogGroup;
import com.android.internal.protolog.ProtoLog;
+import com.android.internal.protolog.ProtoLogGroup;
import com.android.internal.util.DumpUtils;
import com.android.internal.util.FastPrintWriter;
import com.android.internal.util.FrameworkStatsLog;
@@ -1053,7 +1054,7 @@ public class WindowManagerService extends IWindowManager.Stub
private boolean mAnimationsDisabled = false;
boolean mPointerLocationEnabled = false;
- final LetterboxConfiguration mLetterboxConfiguration;
+ final AppCompatConfiguration mAppCompatConfiguration;
private boolean mIsIgnoreOrientationRequestDisabled;
@@ -1069,7 +1070,6 @@ public class WindowManagerService extends IWindowManager.Stub
/** Whether or not a layout can cause a wake up when theater mode is enabled. */
boolean mAllowTheaterModeWakeFromLayout;
- final TaskPositioningController mTaskPositioningController;
final DragDropController mDragDropController;
/** For frozen screen animations. */
@@ -1293,7 +1293,7 @@ public class WindowManagerService extends IWindowManager.Stub
| WindowInsets.Type.navigationBars();
}
- mLetterboxConfiguration = new LetterboxConfiguration(
+ mAppCompatConfiguration = new AppCompatConfiguration(
// Using SysUI context to have access to Material colors extracted from Wallpaper.
ActivityThread.currentActivityThread().getSystemUiContext());
@@ -1427,7 +1427,6 @@ public class WindowManagerService extends IWindowManager.Stub
mAllowTheaterModeWakeFromLayout = context.getResources().getBoolean(
com.android.internal.R.bool.config_allowTheaterModeWakeFromWindowLayout);
- mTaskPositioningController = new TaskPositioningController(this);
mDragDropController = new DragDropController(this, mH.getLooper());
mHighRefreshRateDenylist = HighRefreshRateDenylist.create(context.getResources());
@@ -2569,7 +2568,7 @@ public class WindowManagerService extends IWindowManager.Stub
// surface, let the client use that, but don't create new surface at this
// point.
Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "relayoutWindow: getSurface");
- winAnimator.mSurfaceController.getSurfaceControl(outSurfaceControl);
+ winAnimator.getSurfaceControl(outSurfaceControl);
Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER);
} else {
if (DEBUG_VISIBILITY) Slog.i(TAG_WM, "Releasing surface in: " + win);
@@ -2765,15 +2764,15 @@ public class WindowManagerService extends IWindowManager.Stub
result |= RELAYOUT_RES_SURFACE_CHANGED;
}
- WindowSurfaceController surfaceController;
+ SurfaceControl surfaceControl;
try {
Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "createSurfaceControl");
- surfaceController = winAnimator.createSurfaceLocked();
+ surfaceControl = winAnimator.createSurfaceLocked();
} finally {
Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER);
}
- if (surfaceController != null) {
- surfaceController.getSurfaceControl(outSurfaceControl);
+ if (surfaceControl != null) {
+ winAnimator.getSurfaceControl(outSurfaceControl);
ProtoLog.i(WM_SHOW_TRANSACTIONS, "OUT SURFACE %s: copied", outSurfaceControl);
} else {
@@ -4440,7 +4439,7 @@ public class WindowManagerService extends IWindowManager.Stub
*/
boolean isIgnoreOrientationRequestDisabled() {
return mIsIgnoreOrientationRequestDisabled
- || !mLetterboxConfiguration.isIgnoreOrientationRequestAllowed();
+ || !mAppCompatConfiguration.isIgnoreOrientationRequestAllowed();
}
@Override
@@ -6772,11 +6771,11 @@ public class WindowManagerService extends IWindowManager.Stub
if (windowState == null) {
return false;
}
- WindowSurfaceController surfaceController = windowState.mWinAnimator.mSurfaceController;
- if (surfaceController == null) {
+ final SurfaceControl surfaceControl = windowState.mWinAnimator.mSurfaceControl;
+ if (surfaceControl == null) {
return false;
}
- return surfaceController.clearWindowContentFrameStats();
+ return surfaceControl.clearContentFrameStats();
}
}
@@ -6791,15 +6790,15 @@ public class WindowManagerService extends IWindowManager.Stub
if (windowState == null) {
return null;
}
- WindowSurfaceController surfaceController = windowState.mWinAnimator.mSurfaceController;
- if (surfaceController == null) {
+ final SurfaceControl surfaceControl = windowState.mWinAnimator.mSurfaceControl;
+ if (surfaceControl == null) {
return null;
}
if (mTempWindowRenderStats == null) {
mTempWindowRenderStats = new WindowContentFrameStats();
}
WindowContentFrameStats stats = mTempWindowRenderStats;
- if (!surfaceController.getWindowContentFrameStats(stats)) {
+ if (!surfaceControl.getContentFrameStats(stats)) {
return null;
}
return stats;
@@ -7440,6 +7439,16 @@ public class WindowManagerService extends IWindowManager.Stub
}
@Override
+ public KeyboardShortcutGroup getApplicationLaunchKeyboardShortcuts(int deviceId) {
+ long token = Binder.clearCallingIdentity();
+ try {
+ return mPolicy.getApplicationLaunchKeyboardShortcuts(deviceId);
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
+ }
+
+ @Override
public void requestAppKeyboardShortcuts(IResultReceiver receiver, int deviceId) {
enforceRegisterWindowManagerListenersPermission("requestAppKeyboardShortcuts");
@@ -9299,7 +9308,8 @@ public class WindowManagerService extends IWindowManager.Stub
isTrustedOverlay);
final int sanitizedLpFlags =
- (flags & (FLAG_NOT_TOUCHABLE | FLAG_SLIPPERY | LayoutParams.FLAG_NOT_FOCUSABLE))
+ (flags & (FLAG_NOT_TOUCHABLE | FLAG_SLIPPERY | LayoutParams.FLAG_NOT_FOCUSABLE
+ | LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH))
| LayoutParams.FLAG_NOT_TOUCH_MODAL;
h.layoutParamsType = type;
h.layoutParamsFlags = sanitizedLpFlags;
@@ -9367,40 +9377,82 @@ public class WindowManagerService extends IWindowManager.Stub
}
/**
- * Move focus to the adjacent embedded activity if the adjacent activity is more recently
- * created or has a window more recently added.
+ * Returns the Activity that has the most recently created window in the adjacent activities
+ * if any.
*/
- boolean moveFocusToAdjacentEmbeddedWindow(@NonNull WindowState focusedWindow) {
- final TaskFragment taskFragment = focusedWindow.getTaskFragment();
+ @NonNull
+ ActivityRecord getMostRecentActivityInAdjacent(@NonNull ActivityRecord focusedActivity) {
+ final TaskFragment taskFragment = focusedActivity.getTaskFragment();
if (taskFragment == null) {
- // Skip if not an Activity window.
- return false;
+ // Return if activity no attached.
+ return focusedActivity;
}
if (!Flags.embeddedActivityBackNavFlag()) {
- // Skip if flag is not enabled.
- return false;
+ // Return if flag is not enabled.
+ return focusedActivity;
}
- if (!focusedWindow.mActivityRecord.isEmbedded()) {
- // Skip if the focused activity is not embedded
- return false;
+ if (!focusedActivity.isEmbedded()) {
+ // Return if the focused activity is not embedded.
+ return focusedActivity;
}
final TaskFragment adjacentTaskFragment = taskFragment.getAdjacentTaskFragment();
final ActivityRecord adjacentTopActivity =
adjacentTaskFragment != null ? adjacentTaskFragment.topRunningActivity() : null;
if (adjacentTopActivity == null) {
- return false;
+ // Return if no adjacent activity.
+ return focusedActivity;
}
if (adjacentTopActivity.getLastWindowCreateTime()
- < focusedWindow.mActivityRecord.getLastWindowCreateTime()) {
- // Skip if the current focus activity has more recently active window.
+ < focusedActivity.getLastWindowCreateTime()) {
+ // Return if the current focus activity has more recently active window.
+ return focusedActivity;
+ }
+
+ return adjacentTopActivity;
+ }
+
+ @NonNull
+ WindowState getMostRecentUsedEmbeddedWindowForBack(@NonNull WindowState focusedWindow) {
+ final ActivityRecord focusedActivity = focusedWindow.getActivityRecord();
+ if (focusedActivity == null) {
+ // Not an Activity.
+ return focusedWindow;
+ }
+
+ final ActivityRecord mostRecentActivityInAdjacent = getMostRecentActivityInAdjacent(
+ focusedActivity);
+ if (mostRecentActivityInAdjacent == focusedActivity) {
+ // Already be the most recent window.
+ return focusedWindow;
+ }
+
+ // Looks for a candidate focused window on the adjacent Activity for the back event.
+ final WindowState candidate =
+ mostRecentActivityInAdjacent.getDisplayContent().findFocusedWindow(
+ mostRecentActivityInAdjacent);
+ return candidate != null ? candidate : focusedWindow;
+ }
+
+ /**
+ * Move focus to the adjacent embedded activity if the adjacent activity is more recently
+ * created or has a window more recently added.
+ * <p>
+ * Returns {@code true} if the focused window is changed. Otherwise, returns {@code false}.
+ */
+ boolean moveFocusToAdjacentEmbeddedWindow(@NonNull WindowState focusedWindow) {
+ final ActivityRecord activity = focusedWindow.getActivityRecord();
+ if (activity == null) {
return false;
}
- moveFocusToActivity(adjacentTopActivity);
+ final ActivityRecord mostRecentActivityInAdjacent = getMostRecentActivityInAdjacent(
+ activity);
+
+ moveFocusToActivity(mostRecentActivityInAdjacent);
return !focusedWindow.isFocused();
}
@@ -9980,7 +10032,7 @@ public class WindowManagerService extends IWindowManager.Stub
*/
@Override
public int getLetterboxBackgroundColorInArgb() {
- return mLetterboxConfiguration.getLetterboxBackgroundColor().toArgb();
+ return mAppCompatConfiguration.getLetterboxBackgroundColor().toArgb();
}
/**
@@ -9988,8 +10040,8 @@ public class WindowManagerService extends IWindowManager.Stub
*/
@Override
public boolean isLetterboxBackgroundMultiColored() {
- @LetterboxConfiguration.LetterboxBackgroundType int letterboxBackgroundType =
- mLetterboxConfiguration.getLetterboxBackgroundType();
+ @AppCompatConfiguration.LetterboxBackgroundType int letterboxBackgroundType =
+ mAppCompatConfiguration.getLetterboxBackgroundType();
switch (letterboxBackgroundType) {
case LETTERBOX_BACKGROUND_APP_COLOR_BACKGROUND_FLOATING:
case LETTERBOX_BACKGROUND_APP_COLOR_BACKGROUND:
diff --git a/services/core/java/com/android/server/wm/WindowManagerShellCommand.java b/services/core/java/com/android/server/wm/WindowManagerShellCommand.java
index 6febe80166f4..51d5bc099bd6 100644
--- a/services/core/java/com/android/server/wm/WindowManagerShellCommand.java
+++ b/services/core/java/com/android/server/wm/WindowManagerShellCommand.java
@@ -19,16 +19,16 @@ package com.android.server.wm;
import static android.os.Build.IS_USER;
import static android.view.CrossWindowBlurListeners.CROSS_WINDOW_BLUR_SUPPORTED;
-import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_BACKGROUND_APP_COLOR_BACKGROUND;
-import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_BACKGROUND_APP_COLOR_BACKGROUND_FLOATING;
-import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_BACKGROUND_SOLID_COLOR;
-import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_BACKGROUND_WALLPAPER;
-import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_CENTER;
-import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_LEFT;
-import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_RIGHT;
-import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_VERTICAL_REACHABILITY_POSITION_BOTTOM;
-import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_VERTICAL_REACHABILITY_POSITION_CENTER;
-import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_VERTICAL_REACHABILITY_POSITION_TOP;
+import static com.android.server.wm.AppCompatConfiguration.LETTERBOX_BACKGROUND_APP_COLOR_BACKGROUND;
+import static com.android.server.wm.AppCompatConfiguration.LETTERBOX_BACKGROUND_APP_COLOR_BACKGROUND_FLOATING;
+import static com.android.server.wm.AppCompatConfiguration.LETTERBOX_BACKGROUND_SOLID_COLOR;
+import static com.android.server.wm.AppCompatConfiguration.LETTERBOX_BACKGROUND_WALLPAPER;
+import static com.android.server.wm.AppCompatConfiguration.LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_CENTER;
+import static com.android.server.wm.AppCompatConfiguration.LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_LEFT;
+import static com.android.server.wm.AppCompatConfiguration.LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_RIGHT;
+import static com.android.server.wm.AppCompatConfiguration.LETTERBOX_VERTICAL_REACHABILITY_POSITION_BOTTOM;
+import static com.android.server.wm.AppCompatConfiguration.LETTERBOX_VERTICAL_REACHABILITY_POSITION_CENTER;
+import static com.android.server.wm.AppCompatConfiguration.LETTERBOX_VERTICAL_REACHABILITY_POSITION_TOP;
import android.content.res.Resources.NotFoundException;
import android.graphics.Color;
@@ -50,12 +50,12 @@ import android.view.ViewDebug;
import com.android.internal.os.ByteTransferPipe;
import com.android.internal.protolog.LegacyProtoLogImpl;
import com.android.internal.protolog.PerfettoProtoLogImpl;
-import com.android.internal.protolog.common.IProtoLog;
import com.android.internal.protolog.ProtoLog;
+import com.android.internal.protolog.common.IProtoLog;
import com.android.server.IoThread;
-import com.android.server.wm.LetterboxConfiguration.LetterboxBackgroundType;
-import com.android.server.wm.LetterboxConfiguration.LetterboxHorizontalReachabilityPosition;
-import com.android.server.wm.LetterboxConfiguration.LetterboxVerticalReachabilityPosition;
+import com.android.server.wm.AppCompatConfiguration.LetterboxBackgroundType;
+import com.android.server.wm.AppCompatConfiguration.LetterboxHorizontalReachabilityPosition;
+import com.android.server.wm.AppCompatConfiguration.LetterboxVerticalReachabilityPosition;
import java.io.IOException;
import java.io.PrintWriter;
@@ -78,12 +78,12 @@ public class WindowManagerShellCommand extends ShellCommand {
// Internal service impl -- must perform security checks before touching.
private final WindowManagerService mInternal;
- private final LetterboxConfiguration mLetterboxConfiguration;
+ private final AppCompatConfiguration mAppCompatConfiguration;
public WindowManagerShellCommand(WindowManagerService service) {
mInterface = service;
mInternal = service;
- mLetterboxConfiguration = service.mLetterboxConfiguration;
+ mAppCompatConfiguration = service.mAppCompatConfiguration;
}
@Override
@@ -678,7 +678,7 @@ public class WindowManagerShellCommand extends ShellCommand {
return -1;
}
synchronized (mInternal.mGlobalLock) {
- mLetterboxConfiguration.setFixedOrientationLetterboxAspectRatio(aspectRatio);
+ mAppCompatConfiguration.setFixedOrientationLetterboxAspectRatio(aspectRatio);
}
return 0;
}
@@ -698,7 +698,7 @@ public class WindowManagerShellCommand extends ShellCommand {
return -1;
}
synchronized (mInternal.mGlobalLock) {
- mLetterboxConfiguration.setDefaultMinAspectRatioForUnresizableApps(aspectRatio);
+ mAppCompatConfiguration.setDefaultMinAspectRatioForUnresizableApps(aspectRatio);
}
return 0;
}
@@ -717,7 +717,7 @@ public class WindowManagerShellCommand extends ShellCommand {
return -1;
}
synchronized (mInternal.mGlobalLock) {
- mLetterboxConfiguration.setLetterboxActivityCornersRadius(cornersRadius);
+ mAppCompatConfiguration.setLetterboxActivityCornersRadius(cornersRadius);
}
return 0;
}
@@ -752,7 +752,7 @@ public class WindowManagerShellCommand extends ShellCommand {
return -1;
}
synchronized (mInternal.mGlobalLock) {
- mLetterboxConfiguration.setLetterboxBackgroundTypeOverride(backgroundType);
+ mAppCompatConfiguration.setLetterboxBackgroundTypeOverride(backgroundType);
}
return 0;
}
@@ -770,7 +770,7 @@ public class WindowManagerShellCommand extends ShellCommand {
return -1;
}
synchronized (mInternal.mGlobalLock) {
- mLetterboxConfiguration.setLetterboxBackgroundColorResourceId(colorId);
+ mAppCompatConfiguration.setLetterboxBackgroundColorResourceId(colorId);
}
return 0;
}
@@ -787,7 +787,7 @@ public class WindowManagerShellCommand extends ShellCommand {
return -1;
}
synchronized (mInternal.mGlobalLock) {
- mLetterboxConfiguration.setLetterboxBackgroundColor(color);
+ mAppCompatConfiguration.setLetterboxBackgroundColor(color);
}
return 0;
}
@@ -809,7 +809,7 @@ public class WindowManagerShellCommand extends ShellCommand {
synchronized (mInternal.mGlobalLock) {
final int radiusPx = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,
radiusDp, mInternal.mContext.getResources().getDisplayMetrics());
- mLetterboxConfiguration.setLetterboxBackgroundWallpaperBlurRadiusPx(radiusPx);
+ mAppCompatConfiguration.setLetterboxBackgroundWallpaperBlurRadiusPx(radiusPx);
}
return 0;
}
@@ -829,7 +829,7 @@ public class WindowManagerShellCommand extends ShellCommand {
return -1;
}
synchronized (mInternal.mGlobalLock) {
- mLetterboxConfiguration.setLetterboxBackgroundWallpaperDarkScrimAlpha(alpha);
+ mAppCompatConfiguration.setLetterboxBackgroundWallpaperDarkScrimAlpha(alpha);
}
return 0;
}
@@ -849,7 +849,7 @@ public class WindowManagerShellCommand extends ShellCommand {
}
synchronized (mInternal.mGlobalLock) {
try {
- mLetterboxConfiguration.setLetterboxHorizontalPositionMultiplier(multiplier);
+ mAppCompatConfiguration.setLetterboxHorizontalPositionMultiplier(multiplier);
} catch (IllegalArgumentException e) {
getErrPrintWriter().println("Error: invalid multiplier value " + e);
return -1;
@@ -873,7 +873,7 @@ public class WindowManagerShellCommand extends ShellCommand {
}
synchronized (mInternal.mGlobalLock) {
try {
- mLetterboxConfiguration.setLetterboxVerticalPositionMultiplier(multiplier);
+ mAppCompatConfiguration.setLetterboxVerticalPositionMultiplier(multiplier);
} catch (IllegalArgumentException e) {
getErrPrintWriter().println("Error: invalid multiplier value " + e);
return -1;
@@ -908,7 +908,7 @@ public class WindowManagerShellCommand extends ShellCommand {
return -1;
}
synchronized (mInternal.mGlobalLock) {
- mLetterboxConfiguration.setDefaultPositionForHorizontalReachability(position);
+ mAppCompatConfiguration.setDefaultPositionForHorizontalReachability(position);
}
return 0;
}
@@ -939,7 +939,7 @@ public class WindowManagerShellCommand extends ShellCommand {
return -1;
}
synchronized (mInternal.mGlobalLock) {
- mLetterboxConfiguration.setDefaultPositionForVerticalReachability(position);
+ mAppCompatConfiguration.setDefaultPositionForVerticalReachability(position);
}
return 0;
}
@@ -970,7 +970,7 @@ public class WindowManagerShellCommand extends ShellCommand {
return -1;
}
synchronized (mInternal.mGlobalLock) {
- mLetterboxConfiguration.setPersistentLetterboxPositionForHorizontalReachability(
+ mAppCompatConfiguration.setPersistentLetterboxPositionForHorizontalReachability(
false /* IsInBookMode */, position);
}
return 0;
@@ -1002,7 +1002,7 @@ public class WindowManagerShellCommand extends ShellCommand {
return -1;
}
synchronized (mInternal.mGlobalLock) {
- mLetterboxConfiguration.setPersistentLetterboxPositionForVerticalReachability(
+ mAppCompatConfiguration.setPersistentLetterboxPositionForVerticalReachability(
false /* forTabletopMode */, position);
}
return 0;
@@ -1074,15 +1074,15 @@ public class WindowManagerShellCommand extends ShellCommand {
runSetLetterboxVerticalPositionMultiplier(pw);
break;
case "--isHorizontalReachabilityEnabled":
- runSetBooleanFlag(pw, mLetterboxConfiguration
+ runSetBooleanFlag(pw, mAppCompatConfiguration
::setIsHorizontalReachabilityEnabled);
break;
case "--isVerticalReachabilityEnabled":
- runSetBooleanFlag(pw, mLetterboxConfiguration
+ runSetBooleanFlag(pw, mAppCompatConfiguration
::setIsVerticalReachabilityEnabled);
break;
case "--isAutomaticReachabilityInBookModeEnabled":
- runSetBooleanFlag(pw, mLetterboxConfiguration
+ runSetBooleanFlag(pw, mAppCompatConfiguration
::setIsAutomaticReachabilityInBookModeEnabled);
break;
case "--defaultPositionForHorizontalReachability":
@@ -1098,34 +1098,34 @@ public class WindowManagerShellCommand extends ShellCommand {
runSetPersistentLetterboxPositionForVerticalReachability(pw);
break;
case "--isEducationEnabled":
- runSetBooleanFlag(pw, mLetterboxConfiguration::setIsEducationEnabled);
+ runSetBooleanFlag(pw, mAppCompatConfiguration::setIsEducationEnabled);
break;
case "--isSplitScreenAspectRatioForUnresizableAppsEnabled":
- runSetBooleanFlag(pw, mLetterboxConfiguration
+ runSetBooleanFlag(pw, mAppCompatConfiguration
::setIsSplitScreenAspectRatioForUnresizableAppsEnabled);
break;
case "--isDisplayAspectRatioEnabledForFixedOrientationLetterbox":
- runSetBooleanFlag(pw, mLetterboxConfiguration
+ runSetBooleanFlag(pw, mAppCompatConfiguration
::setIsDisplayAspectRatioEnabledForFixedOrientationLetterbox);
break;
case "--isTranslucentLetterboxingEnabled":
- runSetBooleanFlag(pw, mLetterboxConfiguration
+ runSetBooleanFlag(pw, mAppCompatConfiguration
::setTranslucentLetterboxingOverrideEnabled);
break;
case "--isUserAppAspectRatioSettingsEnabled":
- runSetBooleanFlag(pw, mLetterboxConfiguration
+ runSetBooleanFlag(pw, mAppCompatConfiguration
::setUserAppAspectRatioSettingsOverrideEnabled);
break;
case "--isUserAppAspectRatioFullscreenEnabled":
- runSetBooleanFlag(pw, mLetterboxConfiguration
+ runSetBooleanFlag(pw, mAppCompatConfiguration
::setUserAppAspectRatioFullscreenOverrideEnabled);
break;
case "--isCameraCompatRefreshEnabled":
- runSetBooleanFlag(pw, mLetterboxConfiguration::setCameraCompatRefreshEnabled);
+ runSetBooleanFlag(pw, mAppCompatConfiguration::setCameraCompatRefreshEnabled);
break;
case "--isCameraCompatRefreshCycleThroughStopEnabled":
runSetBooleanFlag(pw,
- mLetterboxConfiguration::setCameraCompatRefreshCycleThroughStopEnabled);
+ mAppCompatConfiguration::setCameraCompatRefreshCycleThroughStopEnabled);
break;
default:
getErrPrintWriter().println(
@@ -1145,77 +1145,77 @@ public class WindowManagerShellCommand extends ShellCommand {
String arg = getNextArg();
switch (arg) {
case "aspectRatio":
- mLetterboxConfiguration.resetFixedOrientationLetterboxAspectRatio();
+ mAppCompatConfiguration.resetFixedOrientationLetterboxAspectRatio();
break;
case "minAspectRatioForUnresizable":
- mLetterboxConfiguration.resetDefaultMinAspectRatioForUnresizableApps();
+ mAppCompatConfiguration.resetDefaultMinAspectRatioForUnresizableApps();
break;
case "cornerRadius":
- mLetterboxConfiguration.resetLetterboxActivityCornersRadius();
+ mAppCompatConfiguration.resetLetterboxActivityCornersRadius();
break;
case "backgroundType":
- mLetterboxConfiguration.resetLetterboxBackgroundType();
+ mAppCompatConfiguration.resetLetterboxBackgroundType();
break;
case "backgroundColor":
- mLetterboxConfiguration.resetLetterboxBackgroundColor();
+ mAppCompatConfiguration.resetLetterboxBackgroundColor();
break;
case "wallpaperBlurRadius":
- mLetterboxConfiguration.resetLetterboxBackgroundWallpaperBlurRadiusPx();
+ mAppCompatConfiguration.resetLetterboxBackgroundWallpaperBlurRadiusPx();
break;
case "wallpaperDarkScrimAlpha":
- mLetterboxConfiguration.resetLetterboxBackgroundWallpaperDarkScrimAlpha();
+ mAppCompatConfiguration.resetLetterboxBackgroundWallpaperDarkScrimAlpha();
break;
case "horizontalPositionMultiplier":
- mLetterboxConfiguration.resetLetterboxHorizontalPositionMultiplier();
+ mAppCompatConfiguration.resetLetterboxHorizontalPositionMultiplier();
break;
case "verticalPositionMultiplier":
- mLetterboxConfiguration.resetLetterboxVerticalPositionMultiplier();
+ mAppCompatConfiguration.resetLetterboxVerticalPositionMultiplier();
break;
case "isHorizontalReachabilityEnabled":
- mLetterboxConfiguration.resetIsHorizontalReachabilityEnabled();
+ mAppCompatConfiguration.resetIsHorizontalReachabilityEnabled();
break;
case "isVerticalReachabilityEnabled":
- mLetterboxConfiguration.resetIsVerticalReachabilityEnabled();
+ mAppCompatConfiguration.resetIsVerticalReachabilityEnabled();
break;
case "defaultPositionForHorizontalReachability":
- mLetterboxConfiguration.resetDefaultPositionForHorizontalReachability();
+ mAppCompatConfiguration.resetDefaultPositionForHorizontalReachability();
break;
case "defaultPositionForVerticalReachability":
- mLetterboxConfiguration.resetDefaultPositionForVerticalReachability();
+ mAppCompatConfiguration.resetDefaultPositionForVerticalReachability();
break;
case "persistentPositionForHorizontalReachability":
- mLetterboxConfiguration
+ mAppCompatConfiguration
.resetPersistentLetterboxPositionForHorizontalReachability();
break;
case "persistentPositionForVerticalReachability":
- mLetterboxConfiguration
+ mAppCompatConfiguration
.resetPersistentLetterboxPositionForVerticalReachability();
break;
case "isEducationEnabled":
- mLetterboxConfiguration.resetIsEducationEnabled();
+ mAppCompatConfiguration.resetIsEducationEnabled();
break;
case "isSplitScreenAspectRatioForUnresizableAppsEnabled":
- mLetterboxConfiguration
+ mAppCompatConfiguration
.resetIsSplitScreenAspectRatioForUnresizableAppsEnabled();
break;
case "IsDisplayAspectRatioEnabledForFixedOrientationLetterbox":
- mLetterboxConfiguration
+ mAppCompatConfiguration
.resetIsDisplayAspectRatioEnabledForFixedOrientationLetterbox();
break;
case "isTranslucentLetterboxingEnabled":
- mLetterboxConfiguration.resetTranslucentLetterboxingEnabled();
+ mAppCompatConfiguration.resetTranslucentLetterboxingEnabled();
break;
case "isUserAppAspectRatioSettingsEnabled":
- mLetterboxConfiguration.resetUserAppAspectRatioSettingsEnabled();
+ mAppCompatConfiguration.resetUserAppAspectRatioSettingsEnabled();
break;
case "isUserAppAspectRatioFullscreenEnabled":
- mLetterboxConfiguration.resetUserAppAspectRatioFullscreenEnabled();
+ mAppCompatConfiguration.resetUserAppAspectRatioFullscreenEnabled();
break;
case "isCameraCompatRefreshEnabled":
- mLetterboxConfiguration.resetCameraCompatRefreshEnabled();
+ mAppCompatConfiguration.resetCameraCompatRefreshEnabled();
break;
case "isCameraCompatRefreshCycleThroughStopEnabled":
- mLetterboxConfiguration
+ mAppCompatConfiguration
.resetCameraCompatRefreshCycleThroughStopEnabled();
break;
default:
@@ -1304,104 +1304,104 @@ public class WindowManagerShellCommand extends ShellCommand {
private void resetLetterboxStyle() {
synchronized (mInternal.mGlobalLock) {
- mLetterboxConfiguration.resetFixedOrientationLetterboxAspectRatio();
- mLetterboxConfiguration.resetDefaultMinAspectRatioForUnresizableApps();
- mLetterboxConfiguration.resetLetterboxActivityCornersRadius();
- mLetterboxConfiguration.resetLetterboxBackgroundType();
- mLetterboxConfiguration.resetLetterboxBackgroundColor();
- mLetterboxConfiguration.resetLetterboxBackgroundWallpaperBlurRadiusPx();
- mLetterboxConfiguration.resetLetterboxBackgroundWallpaperDarkScrimAlpha();
- mLetterboxConfiguration.resetLetterboxHorizontalPositionMultiplier();
- mLetterboxConfiguration.resetLetterboxVerticalPositionMultiplier();
- mLetterboxConfiguration.resetIsHorizontalReachabilityEnabled();
- mLetterboxConfiguration.resetIsVerticalReachabilityEnabled();
- mLetterboxConfiguration.resetEnabledAutomaticReachabilityInBookMode();
- mLetterboxConfiguration.resetDefaultPositionForHorizontalReachability();
- mLetterboxConfiguration.resetDefaultPositionForVerticalReachability();
- mLetterboxConfiguration.resetPersistentLetterboxPositionForHorizontalReachability();
- mLetterboxConfiguration.resetPersistentLetterboxPositionForVerticalReachability();
- mLetterboxConfiguration.resetIsEducationEnabled();
- mLetterboxConfiguration.resetIsSplitScreenAspectRatioForUnresizableAppsEnabled();
- mLetterboxConfiguration.resetIsDisplayAspectRatioEnabledForFixedOrientationLetterbox();
- mLetterboxConfiguration.resetTranslucentLetterboxingEnabled();
- mLetterboxConfiguration.resetUserAppAspectRatioSettingsEnabled();
- mLetterboxConfiguration.resetUserAppAspectRatioFullscreenEnabled();
- mLetterboxConfiguration.resetCameraCompatRefreshEnabled();
- mLetterboxConfiguration.resetCameraCompatRefreshCycleThroughStopEnabled();
+ mAppCompatConfiguration.resetFixedOrientationLetterboxAspectRatio();
+ mAppCompatConfiguration.resetDefaultMinAspectRatioForUnresizableApps();
+ mAppCompatConfiguration.resetLetterboxActivityCornersRadius();
+ mAppCompatConfiguration.resetLetterboxBackgroundType();
+ mAppCompatConfiguration.resetLetterboxBackgroundColor();
+ mAppCompatConfiguration.resetLetterboxBackgroundWallpaperBlurRadiusPx();
+ mAppCompatConfiguration.resetLetterboxBackgroundWallpaperDarkScrimAlpha();
+ mAppCompatConfiguration.resetLetterboxHorizontalPositionMultiplier();
+ mAppCompatConfiguration.resetLetterboxVerticalPositionMultiplier();
+ mAppCompatConfiguration.resetIsHorizontalReachabilityEnabled();
+ mAppCompatConfiguration.resetIsVerticalReachabilityEnabled();
+ mAppCompatConfiguration.resetEnabledAutomaticReachabilityInBookMode();
+ mAppCompatConfiguration.resetDefaultPositionForHorizontalReachability();
+ mAppCompatConfiguration.resetDefaultPositionForVerticalReachability();
+ mAppCompatConfiguration.resetPersistentLetterboxPositionForHorizontalReachability();
+ mAppCompatConfiguration.resetPersistentLetterboxPositionForVerticalReachability();
+ mAppCompatConfiguration.resetIsEducationEnabled();
+ mAppCompatConfiguration.resetIsSplitScreenAspectRatioForUnresizableAppsEnabled();
+ mAppCompatConfiguration.resetIsDisplayAspectRatioEnabledForFixedOrientationLetterbox();
+ mAppCompatConfiguration.resetTranslucentLetterboxingEnabled();
+ mAppCompatConfiguration.resetUserAppAspectRatioSettingsEnabled();
+ mAppCompatConfiguration.resetUserAppAspectRatioFullscreenEnabled();
+ mAppCompatConfiguration.resetCameraCompatRefreshEnabled();
+ mAppCompatConfiguration.resetCameraCompatRefreshCycleThroughStopEnabled();
}
}
private int runGetLetterboxStyle(PrintWriter pw) throws RemoteException {
synchronized (mInternal.mGlobalLock) {
pw.println("Corner radius: "
- + mLetterboxConfiguration.getLetterboxActivityCornersRadius());
+ + mAppCompatConfiguration.getLetterboxActivityCornersRadius());
pw.println("Horizontal position multiplier: "
- + mLetterboxConfiguration.getLetterboxHorizontalPositionMultiplier(
+ + mAppCompatConfiguration.getLetterboxHorizontalPositionMultiplier(
false /* isInBookMode */));
pw.println("Vertical position multiplier: "
- + mLetterboxConfiguration.getLetterboxVerticalPositionMultiplier(
+ + mAppCompatConfiguration.getLetterboxVerticalPositionMultiplier(
false /* isInTabletopMode */));
pw.println("Horizontal position multiplier (book mode): "
- + mLetterboxConfiguration.getLetterboxHorizontalPositionMultiplier(
+ + mAppCompatConfiguration.getLetterboxHorizontalPositionMultiplier(
true /* isInBookMode */));
pw.println("Vertical position multiplier (tabletop mode): "
- + mLetterboxConfiguration.getLetterboxVerticalPositionMultiplier(
+ + mAppCompatConfiguration.getLetterboxVerticalPositionMultiplier(
true /* isInTabletopMode */));
pw.println("Horizontal position multiplier for reachability: "
- + mLetterboxConfiguration.getHorizontalMultiplierForReachability(
+ + mAppCompatConfiguration.getHorizontalMultiplierForReachability(
false /* isInBookMode */));
pw.println("Vertical position multiplier for reachability: "
- + mLetterboxConfiguration.getVerticalMultiplierForReachability(
+ + mAppCompatConfiguration.getVerticalMultiplierForReachability(
false /* isInTabletopMode */));
pw.println("Aspect ratio: "
- + mLetterboxConfiguration.getFixedOrientationLetterboxAspectRatio());
+ + mAppCompatConfiguration.getFixedOrientationLetterboxAspectRatio());
pw.println("Default min aspect ratio for unresizable apps: "
- + mLetterboxConfiguration.getDefaultMinAspectRatioForUnresizableApps());
+ + mAppCompatConfiguration.getDefaultMinAspectRatioForUnresizableApps());
pw.println("Is horizontal reachability enabled: "
- + mLetterboxConfiguration.getIsHorizontalReachabilityEnabled());
+ + mAppCompatConfiguration.getIsHorizontalReachabilityEnabled());
pw.println("Is vertical reachability enabled: "
- + mLetterboxConfiguration.getIsVerticalReachabilityEnabled());
+ + mAppCompatConfiguration.getIsVerticalReachabilityEnabled());
pw.println("Is automatic reachability in book mode enabled: "
- + mLetterboxConfiguration.getIsAutomaticReachabilityInBookModeEnabled());
+ + mAppCompatConfiguration.getIsAutomaticReachabilityInBookModeEnabled());
pw.println("Default position for horizontal reachability: "
- + LetterboxConfiguration.letterboxHorizontalReachabilityPositionToString(
- mLetterboxConfiguration.getDefaultPositionForHorizontalReachability()));
+ + AppCompatConfiguration.letterboxHorizontalReachabilityPositionToString(
+ mAppCompatConfiguration.getDefaultPositionForHorizontalReachability()));
pw.println("Default position for vertical reachability: "
- + LetterboxConfiguration.letterboxVerticalReachabilityPositionToString(
- mLetterboxConfiguration.getDefaultPositionForVerticalReachability()));
+ + AppCompatConfiguration.letterboxVerticalReachabilityPositionToString(
+ mAppCompatConfiguration.getDefaultPositionForVerticalReachability()));
pw.println("Current position for horizontal reachability:"
- + LetterboxConfiguration.letterboxHorizontalReachabilityPositionToString(
- mLetterboxConfiguration.getLetterboxPositionForHorizontalReachability(false)));
+ + AppCompatConfiguration.letterboxHorizontalReachabilityPositionToString(
+ mAppCompatConfiguration.getLetterboxPositionForHorizontalReachability(false)));
pw.println("Current position for vertical reachability:"
- + LetterboxConfiguration.letterboxVerticalReachabilityPositionToString(
- mLetterboxConfiguration.getLetterboxPositionForVerticalReachability(false)));
+ + AppCompatConfiguration.letterboxVerticalReachabilityPositionToString(
+ mAppCompatConfiguration.getLetterboxPositionForVerticalReachability(false)));
pw.println("Is education enabled: "
- + mLetterboxConfiguration.getIsEducationEnabled());
+ + mAppCompatConfiguration.getIsEducationEnabled());
pw.println("Is using split screen aspect ratio as aspect ratio for unresizable apps: "
- + mLetterboxConfiguration
+ + mAppCompatConfiguration
.getIsSplitScreenAspectRatioForUnresizableAppsEnabled());
pw.println("Is using display aspect ratio as aspect ratio for all letterboxed apps: "
- + mLetterboxConfiguration
+ + mAppCompatConfiguration
.getIsDisplayAspectRatioEnabledForFixedOrientationLetterbox());
pw.println(" Is activity \"refresh\" in camera compatibility treatment enabled: "
- + mLetterboxConfiguration.isCameraCompatRefreshEnabled());
+ + mAppCompatConfiguration.isCameraCompatRefreshEnabled());
pw.println(" Refresh using \"stopped -> resumed\" cycle: "
- + mLetterboxConfiguration.isCameraCompatRefreshCycleThroughStopEnabled());
+ + mAppCompatConfiguration.isCameraCompatRefreshCycleThroughStopEnabled());
pw.println("Background type: "
- + LetterboxConfiguration.letterboxBackgroundTypeToString(
- mLetterboxConfiguration.getLetterboxBackgroundType()));
+ + AppCompatConfiguration.letterboxBackgroundTypeToString(
+ mAppCompatConfiguration.getLetterboxBackgroundType()));
pw.println(" Background color: " + Integer.toHexString(
- mLetterboxConfiguration.getLetterboxBackgroundColor().toArgb()));
+ mAppCompatConfiguration.getLetterboxBackgroundColor().toArgb()));
pw.println(" Wallpaper blur radius: "
- + mLetterboxConfiguration.getLetterboxBackgroundWallpaperBlurRadiusPx());
+ + mAppCompatConfiguration.getLetterboxBackgroundWallpaperBlurRadiusPx());
pw.println(" Wallpaper dark scrim alpha: "
- + mLetterboxConfiguration.getLetterboxBackgroundWallpaperDarkScrimAlpha());
+ + mAppCompatConfiguration.getLetterboxBackgroundWallpaperDarkScrimAlpha());
pw.println("Is letterboxing for translucent activities enabled: "
- + mLetterboxConfiguration.isTranslucentLetterboxingEnabled());
+ + mAppCompatConfiguration.isTranslucentLetterboxingEnabled());
pw.println("Is the user aspect ratio settings enabled: "
- + mLetterboxConfiguration.isUserAppAspectRatioSettingsEnabled());
+ + mAppCompatConfiguration.isUserAppAspectRatioSettingsEnabled());
pw.println("Is the fullscreen option in user aspect ratio settings enabled: "
- + mLetterboxConfiguration.isUserAppAspectRatioFullscreenEnabled());
+ + mAppCompatConfiguration.isUserAppAspectRatioFullscreenEnabled());
}
return 0;
}
@@ -1539,13 +1539,13 @@ public class WindowManagerShellCommand extends ShellCommand {
pw.println(" Sets letterbox style using the following options:");
pw.println(" --aspectRatio aspectRatio");
pw.println(" Aspect ratio of letterbox for fixed orientation. If aspectRatio <= "
- + LetterboxConfiguration.MIN_FIXED_ORIENTATION_LETTERBOX_ASPECT_RATIO);
+ + AppCompatConfiguration.MIN_FIXED_ORIENTATION_LETTERBOX_ASPECT_RATIO);
pw.println(" both it and R.dimen.config_fixedOrientationLetterboxAspectRatio will");
pw.println(" be ignored and framework implementation will determine aspect ratio.");
pw.println(" --minAspectRatioForUnresizable aspectRatio");
pw.println(" Default min aspect ratio for unresizable apps which is used when an");
pw.println(" app is eligible for the size compat mode. If aspectRatio <= "
- + LetterboxConfiguration.MIN_FIXED_ORIENTATION_LETTERBOX_ASPECT_RATIO);
+ + AppCompatConfiguration.MIN_FIXED_ORIENTATION_LETTERBOX_ASPECT_RATIO);
pw.println(" both it and R.dimen.config_fixedOrientationLetterboxAspectRatio will");
pw.println(" be ignored and framework implementation will determine aspect ratio.");
pw.println(" --cornerRadius radius");
diff --git a/services/core/java/com/android/server/wm/WindowOrganizerController.java b/services/core/java/com/android/server/wm/WindowOrganizerController.java
index e9004880f506..bc32b91f2c57 100644
--- a/services/core/java/com/android/server/wm/WindowOrganizerController.java
+++ b/services/core/java/com/android/server/wm/WindowOrganizerController.java
@@ -62,6 +62,7 @@ import static android.window.WindowContainerTransaction.HierarchyOp.HIERARCHY_OP
import static android.window.WindowContainerTransaction.HierarchyOp.HIERARCHY_OP_TYPE_RESTORE_TRANSIENT_ORDER;
import static android.window.WindowContainerTransaction.HierarchyOp.HIERARCHY_OP_TYPE_SET_ADJACENT_ROOTS;
import static android.window.WindowContainerTransaction.HierarchyOp.HIERARCHY_OP_TYPE_SET_ALWAYS_ON_TOP;
+import static android.window.WindowContainerTransaction.HierarchyOp.HIERARCHY_OP_TYPE_SET_IS_TRIMMABLE;
import static android.window.WindowContainerTransaction.HierarchyOp.HIERARCHY_OP_TYPE_SET_LAUNCH_ADJACENT_FLAG_ROOT;
import static android.window.WindowContainerTransaction.HierarchyOp.HIERARCHY_OP_TYPE_SET_LAUNCH_ROOT;
import static android.window.WindowContainerTransaction.HierarchyOp.HIERARCHY_OP_TYPE_SET_REPARENT_LEAF_TASK_IF_RELAUNCH;
@@ -123,8 +124,8 @@ import android.window.WindowContainerToken;
import android.window.WindowContainerTransaction;
import com.android.internal.annotations.VisibleForTesting;
-import com.android.internal.protolog.ProtoLogGroup;
import com.android.internal.protolog.ProtoLog;
+import com.android.internal.protolog.ProtoLogGroup;
import com.android.internal.util.ArrayUtils;
import com.android.server.LocalServices;
import com.android.server.pm.LauncherAppsService.LauncherAppsServiceInternal;
@@ -1371,6 +1372,17 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub
task.setReparentLeafTaskIfRelaunch(hop.isReparentLeafTaskIfRelaunch());
break;
}
+ case HIERARCHY_OP_TYPE_SET_IS_TRIMMABLE: {
+ final WindowContainer container = WindowContainer.fromBinder(hop.getContainer());
+ final Task task = container != null ? container.asTask() : null;
+ if (task == null || !task.isAttached()) {
+ Slog.e(TAG, "Attempt to operate on unknown or detached container: "
+ + container);
+ break;
+ }
+ task.setTrimmableFromRecents(hop.isTrimmableFromRecents());
+ break;
+ }
}
return effects;
}
diff --git a/services/core/java/com/android/server/wm/WindowProcessController.java b/services/core/java/com/android/server/wm/WindowProcessController.java
index 60d3e787cac4..984caf1c692b 100644
--- a/services/core/java/com/android/server/wm/WindowProcessController.java
+++ b/services/core/java/com/android/server/wm/WindowProcessController.java
@@ -19,6 +19,7 @@ package com.android.server.wm;
import static android.app.ActivityManager.PROCESS_STATE_CACHED_ACTIVITY;
import static android.app.ActivityManager.PROCESS_STATE_NONEXISTENT;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_UNDEFINED;
+import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM;
import static android.app.WindowConfiguration.WINDOWING_MODE_MULTI_WINDOW;
import static android.content.res.Configuration.ASSETS_SEQ_UNDEFINED;
import static android.os.Build.VERSION_CODES.Q;
@@ -73,6 +74,7 @@ import android.os.LocaleList;
import android.os.Message;
import android.os.Process;
import android.os.RemoteException;
+import android.os.SystemProperties;
import android.os.UserHandle;
import android.util.ArrayMap;
import android.util.Log;
@@ -112,6 +114,13 @@ public class WindowProcessController extends ConfigurationContainer<Configuratio
private static final String TAG_RELEASE = TAG + POSTFIX_RELEASE;
private static final String TAG_CONFIGURATION = TAG + POSTFIX_CONFIGURATION;
+ /**
+ * The max number of processes which can be top scheduling group if there are non-top visible
+ * freeform activities run in the process.
+ */
+ private static final int MAX_NUM_PERCEPTIBLE_FREEFORM =
+ SystemProperties.getInt("persist.wm.max_num_perceptible_freeform", 1);
+
private static final int MAX_RAPID_ACTIVITY_LAUNCH_COUNT = 200;
private static final long RAPID_ACTIVITY_LAUNCH_MS = 500;
private static final long RESET_RAPID_ACTIVITY_LAUNCH_MS = 3 * RAPID_ACTIVITY_LAUNCH_MS;
@@ -318,6 +327,7 @@ public class WindowProcessController extends ConfigurationContainer<Configuratio
public static final int ACTIVITY_STATE_FLAG_HAS_RESUMED = 1 << 21;
public static final int ACTIVITY_STATE_FLAG_HAS_ACTIVITY_IN_VISIBLE_TASK = 1 << 22;
public static final int ACTIVITY_STATE_FLAG_RESUMED_SPLIT_SCREEN = 1 << 23;
+ public static final int ACTIVITY_STATE_FLAG_PERCEPTIBLE_FREEFORM = 1 << 24;
public static final int ACTIVITY_STATE_FLAG_MASK_MIN_TASK_LAYER = 0x0000ffff;
/**
@@ -1229,6 +1239,7 @@ public class WindowProcessController extends ConfigurationContainer<Configuratio
ActivityRecord.State bestInvisibleState = DESTROYED;
boolean allStoppingFinishing = true;
boolean visible = false;
+ boolean hasResumedFreeform = false;
int minTaskLayer = Integer.MAX_VALUE;
int stateFlags = 0;
final boolean wasResumed = hasResumedActivity();
@@ -1256,6 +1267,8 @@ public class WindowProcessController extends ConfigurationContainer<Configuratio
.processPriorityPolicyForMultiWindowMode()
&& task.getAdjacentTask() != null) {
stateFlags |= ACTIVITY_STATE_FLAG_RESUMED_SPLIT_SCREEN;
+ } else if (windowingMode == WINDOWING_MODE_FREEFORM) {
+ hasResumedFreeform = true;
}
}
if (minTaskLayer > 0) {
@@ -1289,6 +1302,12 @@ public class WindowProcessController extends ConfigurationContainer<Configuratio
}
}
+ if (hasResumedFreeform
+ && com.android.window.flags.Flags.processPriorityPolicyForMultiWindowMode()
+ // Exclude task layer 1 because it is already the top most.
+ && minTaskLayer > 1 && minTaskLayer <= 1 + MAX_NUM_PERCEPTIBLE_FREEFORM) {
+ stateFlags |= ACTIVITY_STATE_FLAG_PERCEPTIBLE_FREEFORM;
+ }
stateFlags |= minTaskLayer & ACTIVITY_STATE_FLAG_MASK_MIN_TASK_LAYER;
if (visible) {
stateFlags |= ACTIVITY_STATE_FLAG_IS_VISIBLE;
@@ -1655,6 +1674,22 @@ public class WindowProcessController extends ConfigurationContainer<Configuratio
// Otherwise if other places send wpc.getConfiguration() to client, the configuration may
// be ignored due to the seq is older.
resolvedConfig.seq = newParentConfig.seq;
+
+ if (mConfigActivityRecord != null) {
+ // Let the activity decide whether to apply the size override.
+ return;
+ }
+ final DisplayContent displayContent = mAtm.mWindowManager != null
+ ? mAtm.mWindowManager.getDefaultDisplayContentLocked()
+ : null;
+ applySizeOverrideIfNeeded(
+ displayContent,
+ mInfo,
+ newParentConfig,
+ resolvedConfig,
+ false /* optsOutEdgeToEdge */,
+ false /* hasFixedRotationTransform */,
+ false /* hasCompatDisplayInsets */);
}
void dispatchConfiguration(@NonNull Configuration config) {
@@ -2105,6 +2140,9 @@ public class WindowProcessController extends ConfigurationContainer<Configuratio
if ((stateFlags & ACTIVITY_STATE_FLAG_RESUMED_SPLIT_SCREEN) != 0) {
pw.print("RS|");
}
+ if ((stateFlags & ACTIVITY_STATE_FLAG_PERCEPTIBLE_FREEFORM) != 0) {
+ pw.print("PF|");
+ }
}
} else if ((stateFlags & ACTIVITY_STATE_FLAG_IS_PAUSING_OR_PAUSED) != 0) {
pw.print("P|");
diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java
index de73e6cfad12..a36cff6d7bc5 100644
--- a/services/core/java/com/android/server/wm/WindowState.java
+++ b/services/core/java/com/android/server/wm/WindowState.java
@@ -98,6 +98,7 @@ import static android.view.WindowManagerGlobal.RELAYOUT_RES_FIRST_TIME;
import static android.view.WindowManagerPolicyConstants.TYPE_LAYER_MULTIPLIER;
import static android.view.WindowManagerPolicyConstants.TYPE_LAYER_OFFSET;
+import static com.android.input.flags.Flags.removeInputChannelFromWindowstate;
import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_ADD_REMOVE;
import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_ANIM;
import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_APP_TRANSITIONS;
@@ -633,6 +634,9 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
// Input channel and input window handle used by the input dispatcher.
final InputWindowHandleWrapper mInputWindowHandle;
+ /**
+ * Only populated if flag REMOVE_INPUT_CHANNEL_FROM_WINDOWSTATE is disabled.
+ */
InputChannel mInputChannel;
/**
@@ -1101,7 +1105,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
mPolicy = mWmService.mPolicy;
mContext = mWmService.mContext;
mForceSeamlesslyRotate = token.mRoundedCornerOverlay;
- mLastReportedActivityWindowInfo = Flags.activityWindowInfoFlag() && mActivityRecord != null
+ mLastReportedActivityWindowInfo = mActivityRecord != null
? new ActivityWindowInfo()
: null;
mInputWindowHandle = new InputWindowHandleWrapper(new InputWindowHandle(
@@ -1497,7 +1501,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
if (isDrawn()) {
ProtoLog.v(WM_DEBUG_ORIENTATION,
"Orientation not waiting for draw in %s, surfaceController %s", this,
- winAnimator.mSurfaceController);
+ winAnimator.mSurfaceControl);
setOrientationChanging(false);
mLastFreezeDuration = (int)(SystemClock.elapsedRealtime()
- mWmService.mDisplayFreezeTime);
@@ -1877,6 +1881,10 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
* Input Manager uses when discarding windows from input consideration.
*/
boolean isPotentialDragTarget(boolean targetInterceptsGlobalDrag) {
+ if (removeInputChannelFromWindowstate()) {
+ return (targetInterceptsGlobalDrag || isVisibleNow()) && !mRemoved
+ && mInputChannelToken != null && mInputWindowHandle != null;
+ }
return (targetInterceptsGlobalDrag || isVisibleNow()) && !mRemoved
&& mInputChannel != null && mInputWindowHandle != null;
}
@@ -2417,7 +2425,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
ProtoLog.v(WM_DEBUG_FOCUS, "Remove client=%x, surfaceController=%s Callers=%s",
System.identityHashCode(mClient.asBinder()),
- mWinAnimator.mSurfaceController,
+ mWinAnimator.mSurfaceControl,
Debug.getCallers(5));
final DisplayContent displayContent = getDisplayContent();
@@ -2428,10 +2436,10 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
mOnBackInvokedCallbackInfo = null;
ProtoLog.v(WM_DEBUG_APP_TRANSITIONS,
- "Remove %s: mSurfaceController=%s mAnimatingExit=%b mRemoveOnExit=%b "
+ "Remove %s: mSurfaceControl=%s mAnimatingExit=%b mRemoveOnExit=%b "
+ "mHasSurface=%b surfaceShowing=%b animating=%b app-animation=%b "
+ "mDisplayFrozen=%b callers=%s",
- this, mWinAnimator.mSurfaceController, mAnimatingExit, mRemoveOnExit,
+ this, mWinAnimator.mSurfaceControl, mAnimatingExit, mRemoveOnExit,
mHasSurface, mWinAnimator.getShown(),
isAnimating(TRANSITION | PARENTS),
mActivityRecord != null && mActivityRecord.isAnimating(PARENTS | TRANSITION),
@@ -2608,7 +2616,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
+ isVisibleRequestedOrAdding() + " isVisible: " + (isVisible()
&& mActivityRecord != null && mActivityRecord.isVisible()));
if (!isVisibleRequestedOrAdding()) {
- Slog.i(TAG_WM, " mSurfaceController=" + mWinAnimator.mSurfaceController
+ Slog.i(TAG_WM, " mSurfaceControl=" + mWinAnimator.mSurfaceControl
+ " relayoutCalled=" + mRelayoutCalled
+ " viewVis=" + mViewVisibility
+ " policyVis=" + isVisibleByPolicy()
@@ -2626,6 +2634,19 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
}
void openInputChannel(@NonNull InputChannel outInputChannel) {
+ if (mInputChannelToken != null) {
+ throw new IllegalStateException("Window already has an input channel token.");
+ }
+ if (removeInputChannelFromWindowstate()) {
+ String name = getName();
+ InputChannel channel = mWmService.mInputManager.createInputChannel(name);
+ mInputChannelToken = channel.getToken();
+ mInputWindowHandle.setToken(mInputChannelToken);
+ mWmService.mInputToWindowMap.put(mInputChannelToken, this);
+ channel.copyTo(outInputChannel);
+ channel.dispose();
+ return;
+ }
if (mInputChannel != null) {
throw new IllegalStateException("Window already has an input channel.");
}
@@ -2657,9 +2678,11 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
mInputChannelToken = null;
}
- if (mInputChannel != null) {
- mInputChannel.dispose();
- mInputChannel = null;
+ if (!removeInputChannelFromWindowstate()) {
+ if (mInputChannel != null) {
+ mInputChannel.dispose();
+ mInputChannel = null;
+ }
}
mInputWindowHandle.setToken(null);
}
@@ -4434,7 +4457,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
for (int i = mChildren.size() - 1; i >= 0; --i) {
final WindowState c = mChildren.get(i);
- if (c.mWinAnimator.mSurfaceController != null) {
+ if (c.mWinAnimator.mSurfaceControl != null) {
c.performShowLocked();
// It hadn't been shown, which means layout not performed on it, so now we
// want to make sure to do a layout. If called from within the transaction
@@ -4625,14 +4648,16 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
if (!isImeLayeringTarget()) {
return false;
}
- // Note that we don't process IME window if the IME input target is not on the screen.
- // In case some unexpected IME visibility cases happen like starting the remote
- // animation on the keyguard but seeing the IME window that originally on the app
- // which behinds the keyguard.
- final WindowState imeInputTarget = getImeInputTarget();
- if (imeInputTarget != null
- && !(imeInputTarget.isDrawn() || imeInputTarget.isVisibleRequested())) {
- return false;
+ if (!com.android.window.flags.Flags.doNotSkipImeByTargetVisibility()) {
+ // Note that we don't process IME window if the IME input target is not on the screen.
+ // In case some unexpected IME visibility cases happen like starting the remote
+ // animation on the keyguard but seeing the IME window that originally on the app
+ // which behinds the keyguard.
+ final WindowState imeInputTarget = getImeInputTarget();
+ if (imeInputTarget != null
+ && !(imeInputTarget.isDrawn() || imeInputTarget.isVisibleRequested())) {
+ return false;
+ }
}
return mDisplayContent.forAllImeWindows(callback, traverseTopToBottom);
}
@@ -4891,7 +4916,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
Slog.v(TAG, "Win " + this + ": isDrawn=" + isDrawn()
+ ", animating=" + isAnimating(TRANSITION | PARENTS));
if (!isDrawn()) {
- Slog.v(TAG, "Not displayed: s=" + mWinAnimator.mSurfaceController
+ Slog.v(TAG, "Not displayed: s=" + mWinAnimator.mSurfaceControl
+ " pv=" + isVisibleByPolicy()
+ " mDrawState=" + mWinAnimator.mDrawState
+ " ph=" + isParentWindowHidden()
@@ -5481,7 +5506,8 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
@Override
public SurfaceControl getAnimationLeashParent() {
- if (isStartingWindowAssociatedToTask()) {
+ if (mActivityRecord != null && !mActivityRecord.hasFixedRotationTransform()
+ && isStartingWindowAssociatedToTask()) {
return mStartingData.mAssociatedTask.mSurfaceControl;
}
return super.getAnimationLeashParent();
@@ -5512,13 +5538,13 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
// been defined and so we can use static layers and leave it that way.
if (w.mAttrs.type == TYPE_APPLICATION_MEDIA) {
if (mWinAnimator.hasSurface()) {
- w.assignRelativeLayer(t, mWinAnimator.mSurfaceController.mSurfaceControl, -2);
+ w.assignRelativeLayer(t, mWinAnimator.mSurfaceControl, -2);
} else {
w.assignLayer(t, -2);
}
} else if (w.mAttrs.type == TYPE_APPLICATION_MEDIA_OVERLAY) {
if (mWinAnimator.hasSurface()) {
- w.assignRelativeLayer(t, mWinAnimator.mSurfaceController.mSurfaceControl, -1);
+ w.assignRelativeLayer(t, mWinAnimator.mSurfaceControl, -1);
} else {
w.assignLayer(t, -1);
}
@@ -5694,7 +5720,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
}
SurfaceControl getClientViewRootSurface() {
- return mWinAnimator.getSurfaceControl();
+ return mWinAnimator.mSurfaceControl;
}
/** Drops a buffer for this window's view-root from a transaction */
@@ -6094,11 +6120,10 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
}
getPendingTransaction().setSecure(mSurfaceControl, isSecure);
} else {
- if (mWinAnimator.mSurfaceController == null
- || mWinAnimator.mSurfaceController.mSurfaceControl == null) {
+ if (mWinAnimator.mSurfaceControl == null) {
return;
}
- getPendingTransaction().setSecure(mWinAnimator.mSurfaceController.mSurfaceControl,
+ getPendingTransaction().setSecure(mWinAnimator.mSurfaceControl,
isSecure);
}
if (mDisplayContent != null) {
diff --git a/services/core/java/com/android/server/wm/WindowStateAnimator.java b/services/core/java/com/android/server/wm/WindowStateAnimator.java
index 397a6357fb66..24a2a626fe50 100644
--- a/services/core/java/com/android/server/wm/WindowStateAnimator.java
+++ b/services/core/java/com/android/server/wm/WindowStateAnimator.java
@@ -16,6 +16,10 @@
package com.android.server.wm;
+import static android.os.Trace.TRACE_TAG_WINDOW_MANAGER;
+import static android.view.SurfaceControl.METADATA_OWNER_PID;
+import static android.view.SurfaceControl.METADATA_OWNER_UID;
+import static android.view.SurfaceControl.METADATA_WINDOW_TYPE;
import static android.view.WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED;
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_IS_ROUNDED_CORNERS_OVERLAY;
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_STARTING;
@@ -44,6 +48,7 @@ import static com.android.server.wm.WindowManagerService.logWithStack;
import static com.android.server.wm.WindowStateAnimatorProto.DRAW_STATE;
import static com.android.server.wm.WindowStateAnimatorProto.SURFACE;
import static com.android.server.wm.WindowStateAnimatorProto.SYSTEM_DECOR_RECT;
+import static com.android.server.wm.WindowSurfaceControllerProto.SHOWN;
import static com.android.window.flags.Flags.secureWindowState;
import static com.android.window.flags.Flags.setScPropertiesInClient;
@@ -52,6 +57,7 @@ import android.graphics.PixelFormat;
import android.graphics.Rect;
import android.os.Debug;
import android.os.Trace;
+import android.util.EventLog;
import android.util.Slog;
import android.util.proto.ProtoOutputStream;
import android.view.Surface.OutOfResourcesException;
@@ -95,12 +101,13 @@ class WindowStateAnimator {
final Session mSession;
final WindowManagerPolicy mPolicy;
final Context mContext;
- final boolean mIsWallpaper;
private final WallpaperController mWallpaperControllerLocked;
boolean mAnimationIsEntrance;
- WindowSurfaceController mSurfaceController;
+ SurfaceControl mSurfaceControl;
+ private boolean mSurfaceShown;
+ private String mTitle;
float mShownAlpha = 0;
float mAlpha = 0;
@@ -164,7 +171,6 @@ class WindowStateAnimator {
mWin = win;
mSession = win.mSession;
mAttrType = win.mAttrs.type;
- mIsWallpaper = win.mIsWallpaper;
mWallpaperControllerLocked = win.getDisplayContent().mWallpaperController;
}
@@ -198,16 +204,32 @@ class WindowStateAnimator {
}
void hide(SurfaceControl.Transaction transaction, String reason) {
- if (!mLastHidden) {
- //dump();
- mLastHidden = true;
+ if (mLastHidden) {
+ return;
+ }
+ mLastHidden = true;
+ if (mSurfaceControl == null || !mSurfaceShown) {
+ return;
+ }
+ ProtoLog.i(WM_SHOW_TRANSACTIONS, "SURFACE HIDE ( %s ): %s", reason, mTitle);
- if (mSurfaceController != null) {
- mSurfaceController.hide(transaction, reason);
- }
+ setShown(false);
+ transaction.hide(mSurfaceControl);
+ if (mWin.mIsWallpaper) {
+ final DisplayContent dc = mWin.getDisplayContent();
+ EventLog.writeEvent(EventLogTags.WM_WALLPAPER_SURFACE,
+ dc.mDisplayId, 0 /* request hidden */,
+ String.valueOf(dc.mWallpaperController.getWallpaperTarget()));
}
}
+ private void setShown(boolean surfaceShown) {
+ mSurfaceShown = surfaceShown;
+ mService.updateNonSystemOverlayWindowsVisibilityIfNeeded(mWin, surfaceShown);
+ mWin.onSurfaceShownChanged(surfaceShown);
+ mSession.onWindowSurfaceVisibilityChanged(mWin, mSurfaceShown);
+ }
+
boolean finishDrawingLocked(SurfaceControl.Transaction postDrawTransaction) {
final boolean startingWindow =
mWin.mAttrs.type == WindowManager.LayoutParams.TYPE_APPLICATION_STARTING;
@@ -221,7 +243,7 @@ class WindowStateAnimator {
if (mDrawState == DRAW_PENDING) {
ProtoLog.v(WM_DEBUG_DRAW,
"finishDrawingLocked: mDrawState=COMMIT_DRAW_PENDING %s in %s", mWin,
- mSurfaceController);
+ mSurfaceControl);
if (startingWindow) {
ProtoLog.v(WM_DEBUG_STARTING_WINDOW, "Draw state now committed in %s", mWin);
}
@@ -248,7 +270,7 @@ class WindowStateAnimator {
return false;
}
ProtoLog.i(WM_DEBUG_ANIM, "commitFinishDrawingLocked: mDrawState=READY_TO_SHOW %s",
- mSurfaceController);
+ mSurfaceControl);
mDrawState = READY_TO_SHOW;
boolean result = false;
final ActivityRecord activity = mWin.mActivityRecord;
@@ -271,11 +293,11 @@ class WindowStateAnimator {
}
}
- WindowSurfaceController createSurfaceLocked() {
+ SurfaceControl createSurfaceLocked() {
final WindowState w = mWin;
- if (mSurfaceController != null) {
- return mSurfaceController;
+ if (mSurfaceControl != null) {
+ return mSurfaceControl;
}
w.setHasSurface(false);
@@ -312,10 +334,22 @@ class WindowStateAnimator {
final boolean isHwAccelerated = (attrs.flags & FLAG_HARDWARE_ACCELERATED) != 0;
final int format = isHwAccelerated ? PixelFormat.TRANSLUCENT : attrs.format;
- mSurfaceController = new WindowSurfaceController(attrs.getTitle().toString(), format,
- flags, this, attrs.type);
+ mTitle = attrs.getTitle().toString();
+ Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "new SurfaceControl");
+ mSurfaceControl = mWin.makeSurface()
+ .setParent(mWin.mSurfaceControl)
+ .setName(mTitle)
+ .setFormat(format)
+ .setFlags(flags)
+ .setMetadata(METADATA_WINDOW_TYPE, attrs.type)
+ .setMetadata(METADATA_OWNER_UID, mSession.mUid)
+ .setMetadata(METADATA_OWNER_PID, mSession.mPid)
+ .setCallsite("WindowSurfaceController")
+ .setBLASTLayer().build();
+ Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER);
+
if (!setScPropertiesInClient()) {
- mSurfaceController.setColorSpaceAgnostic(w.getPendingTransaction(),
+ setColorSpaceAgnosticLocked(
(attrs.privateFlags & LayoutParams.PRIVATE_FLAG_COLOR_SPACE_AGNOSTIC) != 0);
}
@@ -326,7 +360,7 @@ class WindowStateAnimator {
ProtoLog.i(WM_SHOW_SURFACE_ALLOC,
" CREATE SURFACE %s IN SESSION %s: pid=%d format=%d flags=0x%x / %s",
- mSurfaceController, mSession.mSurfaceSession, mSession.mPid, attrs.format,
+ mSurfaceControl, mSession.mSurfaceSession, mSession.mPid, attrs.format,
flags, this);
} catch (OutOfResourcesException e) {
Slog.w(TAG, "OutOfResourcesException creating surface");
@@ -340,7 +374,7 @@ class WindowStateAnimator {
}
if (DEBUG) {
- Slog.v(TAG, "Got surface: " + mSurfaceController
+ Slog.v(TAG, "Got surface: " + mSurfaceControl
+ ", set left=" + w.getFrame().left + " top=" + w.getFrame().top);
}
@@ -353,15 +387,19 @@ class WindowStateAnimator {
mLastHidden = true;
if (DEBUG) Slog.v(TAG, "Created surface " + this);
- return mSurfaceController;
+ return mSurfaceControl;
}
boolean hasSurface() {
- return mSurfaceController != null && mSurfaceController.hasSurface();
+ return mSurfaceControl != null;
+ }
+
+ void getSurfaceControl(SurfaceControl outSurfaceControl) {
+ outSurfaceControl.copyFrom(mSurfaceControl, "WindowStateAnimator.getSurfaceControl");
}
void destroySurfaceLocked(SurfaceControl.Transaction t) {
- if (mSurfaceController == null) {
+ if (mSurfaceControl == null) {
return;
}
@@ -370,7 +408,7 @@ class WindowStateAnimator {
try {
if (DEBUG_VISIBILITY) {
logWithStack(TAG, "Window " + this + " destroying surface "
- + mSurfaceController + ", session " + mSession);
+ + mSurfaceControl + ", session " + mSession);
}
ProtoLog.i(WM_SHOW_SURFACE_ALLOC, "SURFACE DESTROY: %s. %s",
mWin, new RuntimeException().fillInStackTrace());
@@ -384,23 +422,13 @@ class WindowStateAnimator {
}
} catch (RuntimeException e) {
Slog.w(TAG, "Exception thrown when destroying Window " + this
- + " surface " + mSurfaceController + " session " + mSession + ": "
+ + " surface " + mSurfaceControl + " session " + mSession + ": "
+ e.toString());
}
-
- // Whether the surface was preserved (and copied to mPendingDestroySurface) or not, it
- // needs to be cleared to match the WindowState.mHasSurface state. It is also necessary
- // so it can be recreated successfully in mPendingDestroySurface case.
- mWin.setHasSurface(false);
- if (mSurfaceController != null) {
- mSurfaceController.setShown(false);
- }
- mSurfaceController = null;
- mDrawState = NO_SURFACE;
}
void computeShownFrameLocked() {
- if (mIsWallpaper && mService.mRoot.mWallpaperActionPending) {
+ if (mWin.mIsWallpaper && mService.mRoot.mWallpaperActionPending) {
return;
} else if (mWin.isDragResizeChanged()) {
// This window is awaiting a relayout because user just started (or ended)
@@ -454,14 +482,13 @@ class WindowStateAnimator {
mLastAlpha = mShownAlpha;
ProtoLog.i(WM_SHOW_TRANSACTIONS,
"SURFACE controller=%s alpha=%f HScale=%f, VScale=%f: %s",
- mSurfaceController, mShownAlpha, w.mHScale, w.mVScale, w);
+ mSurfaceControl, mShownAlpha, w.mHScale, w.mVScale, w);
- boolean prepared =
- mSurfaceController.prepareToShowInTransaction(t, mShownAlpha);
+ t.setAlpha(mSurfaceControl, mShownAlpha);
- if (prepared && mDrawState == HAS_DRAWN) {
+ if (mDrawState == HAS_DRAWN) {
if (mLastHidden) {
- mSurfaceController.showRobustly(t);
+ showRobustly(t);
mLastHidden = false;
final DisplayContent displayContent = w.getDisplayContent();
if (!displayContent.getLastHasContent()) {
@@ -494,18 +521,38 @@ class WindowStateAnimator {
}
}
+ private void showRobustly(SurfaceControl.Transaction t) {
+ if (mSurfaceShown) {
+ return;
+ }
+
+ ProtoLog.i(WM_SHOW_TRANSACTIONS, "SURFACE SHOW (performLayout): %s", mTitle);
+ if (DEBUG_VISIBILITY) Slog.v(TAG, "Showing " + this + " during relayout");
+ setShown(true);
+ t.show(mSurfaceControl);
+ if (mWin.mIsWallpaper) {
+ final DisplayContent dc = mWin.mDisplayContent;
+ EventLog.writeEvent(EventLogTags.WM_WALLPAPER_SURFACE,
+ dc.mDisplayId, 1 /* request shown */,
+ String.valueOf(dc.mWallpaperController.getWallpaperTarget()));
+ }
+ }
+
void setOpaqueLocked(boolean isOpaque) {
- if (mSurfaceController == null) {
+ if (mSurfaceControl == null) {
return;
}
- mSurfaceController.setOpaque(isOpaque);
+ ProtoLog.i(WM_SHOW_TRANSACTIONS, "SURFACE isOpaque=%b: %s", isOpaque, mTitle);
+ mWin.getPendingTransaction().setOpaque(mSurfaceControl, isOpaque);
+ mService.scheduleAnimationLocked();
}
void setColorSpaceAgnosticLocked(boolean agnostic) {
- if (mSurfaceController == null) {
+ if (mSurfaceControl == null) {
return;
}
- mSurfaceController.setColorSpaceAgnostic(mWin.getPendingTransaction(), agnostic);
+ ProtoLog.i(WM_SHOW_TRANSACTIONS, "SURFACE isColorSpaceAgnostic=%b: %s", agnostic, mTitle);
+ mWin.getPendingTransaction().setColorSpaceAgnostic(mSurfaceControl, agnostic);
}
void applyEnterAnimationLocked() {
@@ -521,7 +568,7 @@ class WindowStateAnimator {
// should be controlled by ActivityRecord in general. Wallpaper is also excluded because
// WallpaperController should handle it. Also skip play enter animation for the window
// below starting window.
- if (mAttrType != TYPE_BASE_APPLICATION && !mIsWallpaper
+ if (mAttrType != TYPE_BASE_APPLICATION && !mWin.mIsWallpaper
&& !(mWin.mActivityRecord != null && mWin.mActivityRecord.hasStartingWindow())) {
applyAnimationLocked(transit, true);
}
@@ -614,8 +661,10 @@ class WindowStateAnimator {
void dumpDebug(ProtoOutputStream proto, long fieldId) {
final long token = proto.start(fieldId);
- if (mSurfaceController != null) {
- mSurfaceController.dumpDebug(proto, SURFACE);
+ if (mSurfaceControl != null) {
+ final long dumpToken = proto.start(SURFACE);
+ proto.write(SHOWN, mSurfaceShown);
+ proto.end(dumpToken);
}
proto.write(DRAW_STATE, mDrawState);
mSystemDecorRect.dumpDebug(proto, SYSTEM_DECOR_RECT);
@@ -626,8 +675,11 @@ class WindowStateAnimator {
if (mAnimationIsEntrance) {
pw.print(prefix); pw.print(" mAnimationIsEntrance="); pw.print(mAnimationIsEntrance);
}
- if (mSurfaceController != null) {
- mSurfaceController.dump(pw, prefix, dumpAll);
+ if (mSurfaceControl != null) {
+ if (dumpAll) {
+ pw.print(prefix); pw.print("mSurface="); pw.println(mSurfaceControl);
+ }
+ pw.print(prefix); pw.print("Surface: shown="); pw.print(mSurfaceShown);
}
if (dumpAll) {
pw.print(prefix); pw.print("mDrawState="); pw.print(drawStateToString());
@@ -659,31 +711,24 @@ class WindowStateAnimator {
}
boolean getShown() {
- if (mSurfaceController != null) {
- return mSurfaceController.getShown();
- }
- return false;
+ return mSurfaceControl != null && mSurfaceShown;
}
void destroySurface(SurfaceControl.Transaction t) {
- try {
- if (mSurfaceController != null) {
- mSurfaceController.destroy(t);
- }
- } catch (RuntimeException e) {
- Slog.w(TAG, "Exception thrown when destroying surface " + this
- + " surface " + mSurfaceController + " session " + mSession + ": " + e);
- } finally {
- mWin.setHasSurface(false);
- mSurfaceController = null;
- mDrawState = NO_SURFACE;
+ if (mSurfaceControl == null) {
+ return;
}
- }
-
- SurfaceControl getSurfaceControl() {
- if (!hasSurface()) {
- return null;
+ ProtoLog.i(WM_SHOW_SURFACE_ALLOC,
+ "Destroying surface %s called by %s", this, Debug.getCallers(8));
+ if (mWin.mIsWallpaper && !mWin.mWindowRemovalAllowed && !mWin.mRemoveOnExit) {
+ // The wallpaper surface should have the same lifetime as its window.
+ Slog.e(TAG, "Unexpected removing wallpaper surface of " + mWin
+ + " by " + Debug.getCallers(8));
}
- return mSurfaceController.mSurfaceControl;
+ t.remove(mSurfaceControl);
+ setShown(false);
+ mSurfaceControl = null;
+ mWin.setHasSurface(false);
+ mDrawState = NO_SURFACE;
}
}
diff --git a/services/core/java/com/android/server/wm/WindowSurfaceController.java b/services/core/java/com/android/server/wm/WindowSurfaceController.java
deleted file mode 100644
index d9766e0dfa61..000000000000
--- a/services/core/java/com/android/server/wm/WindowSurfaceController.java
+++ /dev/null
@@ -1,237 +0,0 @@
-/*
- * Copyright (C) 2015 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server.wm;
-
-import static android.os.Trace.TRACE_TAG_WINDOW_MANAGER;
-import static android.view.SurfaceControl.METADATA_OWNER_PID;
-import static android.view.SurfaceControl.METADATA_OWNER_UID;
-import static android.view.SurfaceControl.METADATA_WINDOW_TYPE;
-
-import static com.android.internal.protolog.ProtoLogGroup.WM_SHOW_SURFACE_ALLOC;
-import static com.android.internal.protolog.ProtoLogGroup.WM_SHOW_TRANSACTIONS;
-import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_VISIBILITY;
-import static com.android.server.wm.WindowManagerDebugConfig.TAG_WITH_CLASS_NAME;
-import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM;
-import static com.android.server.wm.WindowSurfaceControllerProto.SHOWN;
-
-import android.os.Debug;
-import android.os.Trace;
-import android.util.EventLog;
-import android.util.Slog;
-import android.util.proto.ProtoOutputStream;
-import android.view.SurfaceControl;
-import android.view.WindowContentFrameStats;
-
-import com.android.internal.protolog.ProtoLog;
-
-import java.io.PrintWriter;
-
-class WindowSurfaceController {
- static final String TAG = TAG_WITH_CLASS_NAME ? "WindowSurfaceController" : TAG_WM;
-
- final WindowStateAnimator mAnimator;
-
- SurfaceControl mSurfaceControl;
-
- // Should only be set from within setShown().
- private boolean mSurfaceShown = false;
-
- private final String title;
-
- private final WindowManagerService mService;
-
- private final int mWindowType;
- private final Session mWindowSession;
-
-
- WindowSurfaceController(String name, int format, int flags, WindowStateAnimator animator,
- int windowType) {
- mAnimator = animator;
-
- title = name;
-
- mService = animator.mService;
- final WindowState win = animator.mWin;
- mWindowType = windowType;
- mWindowSession = win.mSession;
-
- Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "new SurfaceControl");
- mSurfaceControl = win.makeSurface()
- .setParent(win.getSurfaceControl())
- .setName(name)
- .setFormat(format)
- .setFlags(flags)
- .setMetadata(METADATA_WINDOW_TYPE, windowType)
- .setMetadata(METADATA_OWNER_UID, mWindowSession.mUid)
- .setMetadata(METADATA_OWNER_PID, mWindowSession.mPid)
- .setCallsite("WindowSurfaceController")
- .setBLASTLayer().build();
-
- Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER);
- }
-
- void hide(SurfaceControl.Transaction transaction, String reason) {
- ProtoLog.i(WM_SHOW_TRANSACTIONS, "SURFACE HIDE ( %s ): %s", reason, title);
-
- if (mSurfaceShown) {
- hideSurface(transaction);
- }
- }
-
- private void hideSurface(SurfaceControl.Transaction transaction) {
- if (mSurfaceControl == null) {
- return;
- }
- setShown(false);
- try {
- transaction.hide(mSurfaceControl);
- if (mAnimator.mIsWallpaper) {
- final DisplayContent dc = mAnimator.mWin.getDisplayContent();
- EventLog.writeEvent(EventLogTags.WM_WALLPAPER_SURFACE,
- dc.mDisplayId, 0 /* request hidden */,
- String.valueOf(dc.mWallpaperController.getWallpaperTarget()));
- }
- } catch (RuntimeException e) {
- Slog.w(TAG, "Exception hiding surface in " + this);
- }
- }
-
- void destroy(SurfaceControl.Transaction t) {
- ProtoLog.i(WM_SHOW_SURFACE_ALLOC,
- "Destroying surface %s called by %s", this, Debug.getCallers(8));
- try {
- if (mSurfaceControl != null) {
- if (mAnimator.mIsWallpaper && !mAnimator.mWin.mWindowRemovalAllowed
- && !mAnimator.mWin.mRemoveOnExit) {
- // The wallpaper surface should have the same lifetime as its window.
- Slog.e(TAG, "Unexpected removing wallpaper surface of " + mAnimator.mWin
- + " by " + Debug.getCallers(8));
- }
- t.remove(mSurfaceControl);
- }
- } catch (RuntimeException e) {
- Slog.w(TAG, "Error destroying surface in: " + this, e);
- } finally {
- setShown(false);
- mSurfaceControl = null;
- }
- }
-
- boolean prepareToShowInTransaction(SurfaceControl.Transaction t, float alpha) {
- if (mSurfaceControl == null) {
- return false;
- }
-
- t.setAlpha(mSurfaceControl, alpha);
- return true;
- }
-
- void setOpaque(boolean isOpaque) {
- ProtoLog.i(WM_SHOW_TRANSACTIONS, "SURFACE isOpaque=%b: %s", isOpaque, title);
-
- if (mSurfaceControl == null) {
- return;
- }
-
- mAnimator.mWin.getPendingTransaction().setOpaque(mSurfaceControl, isOpaque);
- mService.scheduleAnimationLocked();
- }
-
- void setColorSpaceAgnostic(SurfaceControl.Transaction t, boolean agnostic) {
- ProtoLog.i(WM_SHOW_TRANSACTIONS, "SURFACE isColorSpaceAgnostic=%b: %s", agnostic, title);
-
- if (mSurfaceControl == null) {
- return;
- }
- t.setColorSpaceAgnostic(mSurfaceControl, agnostic);
- }
-
- void showRobustly(SurfaceControl.Transaction t) {
- ProtoLog.i(WM_SHOW_TRANSACTIONS, "SURFACE SHOW (performLayout): %s", title);
- if (DEBUG_VISIBILITY) Slog.v(TAG, "Showing " + this
- + " during relayout");
-
- if (mSurfaceShown) {
- return;
- }
-
- setShown(true);
- t.show(mSurfaceControl);
- if (mAnimator.mIsWallpaper) {
- final DisplayContent dc = mAnimator.mWin.getDisplayContent();
- EventLog.writeEvent(EventLogTags.WM_WALLPAPER_SURFACE,
- dc.mDisplayId, 1 /* request shown */,
- String.valueOf(dc.mWallpaperController.getWallpaperTarget()));
- }
- }
-
- boolean clearWindowContentFrameStats() {
- if (mSurfaceControl == null) {
- return false;
- }
- return mSurfaceControl.clearContentFrameStats();
- }
-
- boolean getWindowContentFrameStats(WindowContentFrameStats outStats) {
- if (mSurfaceControl == null) {
- return false;
- }
- return mSurfaceControl.getContentFrameStats(outStats);
- }
-
- boolean hasSurface() {
- return mSurfaceControl != null;
- }
-
- void getSurfaceControl(SurfaceControl outSurfaceControl) {
- outSurfaceControl.copyFrom(mSurfaceControl, "WindowSurfaceController.getSurfaceControl");
- }
-
- boolean getShown() {
- return mSurfaceShown;
- }
-
- void setShown(boolean surfaceShown) {
- mSurfaceShown = surfaceShown;
-
- mService.updateNonSystemOverlayWindowsVisibilityIfNeeded(mAnimator.mWin, surfaceShown);
-
- mAnimator.mWin.onSurfaceShownChanged(surfaceShown);
-
- if (mWindowSession != null) {
- mWindowSession.onWindowSurfaceVisibilityChanged(this, mSurfaceShown, mWindowType);
- }
- }
-
- void dumpDebug(ProtoOutputStream proto, long fieldId) {
- final long token = proto.start(fieldId);
- proto.write(SHOWN, mSurfaceShown);
- proto.end(token);
- }
-
- public void dump(PrintWriter pw, String prefix, boolean dumpAll) {
- if (dumpAll) {
- pw.print(prefix); pw.print("mSurface="); pw.println(mSurfaceControl);
- }
- pw.print(prefix); pw.print("Surface: shown="); pw.print(mSurfaceShown);
- }
-
- @Override
- public String toString() {
- return mSurfaceControl.toString();
- }
-}
diff --git a/services/core/java/com/android/server/wm/WindowTracing.java b/services/core/java/com/android/server/wm/WindowTracing.java
index ba5323ee1f8f..04d5c03e64a6 100644
--- a/services/core/java/com/android/server/wm/WindowTracing.java
+++ b/services/core/java/com/android/server/wm/WindowTracing.java
@@ -18,89 +18,55 @@ package com.android.server.wm;
import static android.os.Build.IS_USER;
-import static com.android.server.wm.WindowManagerTraceFileProto.ENTRY;
-import static com.android.server.wm.WindowManagerTraceFileProto.MAGIC_NUMBER;
-import static com.android.server.wm.WindowManagerTraceFileProto.MAGIC_NUMBER_H;
-import static com.android.server.wm.WindowManagerTraceFileProto.MAGIC_NUMBER_L;
-import static com.android.server.wm.WindowManagerTraceFileProto.REAL_TO_ELAPSED_TIME_OFFSET_NANOS;
import static com.android.server.wm.WindowManagerTraceProto.ELAPSED_REALTIME_NANOS;
import static com.android.server.wm.WindowManagerTraceProto.WHERE;
import static com.android.server.wm.WindowManagerTraceProto.WINDOW_MANAGER_SERVICE;
import android.annotation.Nullable;
import android.os.ShellCommand;
-import android.os.SystemClock;
import android.os.Trace;
import android.util.Log;
import android.util.proto.ProtoOutputStream;
import android.view.Choreographer;
import com.android.internal.protolog.LegacyProtoLogImpl;
-import com.android.internal.protolog.common.IProtoLog;
import com.android.internal.protolog.ProtoLog;
-import com.android.internal.util.TraceBuffer;
-import java.io.File;
-import java.io.IOException;
import java.io.PrintWriter;
-import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
/**
- * A class that allows window manager to dump its state continuously to a trace file, such that a
+ * A class that allows window manager to dump its state continuously, such that a
* time series of window manager state can be analyzed after the fact.
*/
-class WindowTracing {
-
- /**
- * Maximum buffer size, currently defined as 5 MB
- * Size was experimentally defined to fit between 100 to 150 elements.
- */
- private static final int BUFFER_CAPACITY_CRITICAL = 5120 * 1024; // 5 MB
- private static final int BUFFER_CAPACITY_TRIM = 10240 * 1024; // 10 MB
- private static final int BUFFER_CAPACITY_ALL = 20480 * 1024; // 20 MB
- static final String WINSCOPE_EXT = ".winscope";
- private static final String TRACE_FILENAME = "/data/misc/wmtrace/wm_trace" + WINSCOPE_EXT;
- private static final String TAG = "WindowTracing";
- private static final long MAGIC_NUMBER_VALUE = ((long) MAGIC_NUMBER_H << 32) | MAGIC_NUMBER_L;
+abstract class WindowTracing {
+ protected static final String TAG = "WindowTracing";
+ protected static final String WHERE_START_TRACING = "trace.enable";
+ protected static final String WHERE_ON_FRAME = "onFrame";
private final WindowManagerService mService;
private final Choreographer mChoreographer;
private final WindowManagerGlobalLock mGlobalLock;
- private final Object mEnabledLock = new Object();
- private final File mTraceFile;
- private final TraceBuffer mBuffer;
private final Choreographer.FrameCallback mFrameCallback = (frameTimeNanos) ->
- log("onFrame" /* where */);
+ log(WHERE_ON_FRAME);
- private @WindowTraceLogLevel int mLogLevel = WindowTraceLogLevel.TRIM;
- private boolean mLogOnFrame = false;
- private boolean mEnabled;
- private volatile boolean mEnabledLockFree;
- private boolean mScheduled;
+ private AtomicBoolean mScheduled = new AtomicBoolean(false);
- private final IProtoLog mProtoLog;
static WindowTracing createDefaultAndStartLooper(WindowManagerService service,
Choreographer choreographer) {
- File file = new File(TRACE_FILENAME);
- return new WindowTracing(file, service, choreographer, BUFFER_CAPACITY_TRIM);
- }
-
- private WindowTracing(File file, WindowManagerService service, Choreographer choreographer,
- int bufferCapacity) {
- this(file, service, choreographer, service.mGlobalLock, bufferCapacity);
+ if (!android.tracing.Flags.perfettoWmTracing()) {
+ return new WindowTracingLegacy(service, choreographer);
+ }
+ return new WindowTracingPerfetto(service, choreographer);
}
- WindowTracing(File file, WindowManagerService service, Choreographer choreographer,
- WindowManagerGlobalLock globalLock, int bufferCapacity) {
+ protected WindowTracing(WindowManagerService service, Choreographer choreographer,
+ WindowManagerGlobalLock globalLock) {
mChoreographer = choreographer;
mService = service;
mGlobalLock = globalLock;
- mTraceFile = file;
- mBuffer = new TraceBuffer(bufferCapacity);
- setLogLevel(WindowTraceLogLevel.TRIM, null /* pw */);
- mProtoLog = ProtoLog.getSingleInstance();
}
void startTrace(@Nullable PrintWriter pw) {
@@ -108,44 +74,29 @@ class WindowTracing {
logAndPrintln(pw, "Error: Tracing is not supported on user builds.");
return;
}
- synchronized (mEnabledLock) {
- if (!android.tracing.Flags.perfettoProtologTracing()) {
- ((LegacyProtoLogImpl) ProtoLog.getSingleInstance()).startProtoLog(pw);
- }
- logAndPrintln(pw, "Start tracing to " + mTraceFile + ".");
- mBuffer.resetBuffer();
- mEnabled = mEnabledLockFree = true;
+ if (!android.tracing.Flags.perfettoProtologTracing()) {
+ ((LegacyProtoLogImpl) ProtoLog.getSingleInstance()).startProtoLog(pw);
}
- log("trace.enable");
+ startTraceInternal(pw);
}
- /**
- * Stops the trace and write the current buffer to disk
- * @param pw Print writer
- */
void stopTrace(@Nullable PrintWriter pw) {
if (IS_USER) {
logAndPrintln(pw, "Error: Tracing is not supported on user builds.");
return;
}
- synchronized (mEnabledLock) {
- logAndPrintln(pw, "Stop tracing to " + mTraceFile + ". Waiting for traces to flush.");
- mEnabled = mEnabledLockFree = false;
-
- if (mEnabled) {
- logAndPrintln(pw, "ERROR: tracing was re-enabled while waiting for flush.");
- throw new IllegalStateException("tracing enabled while waiting for flush.");
- }
- writeTraceToFileLocked();
- logAndPrintln(pw, "Trace written to " + mTraceFile + ".");
- }
if (!android.tracing.Flags.perfettoProtologTracing()) {
((LegacyProtoLogImpl) ProtoLog.getSingleInstance()).stopProtoLog(pw, true);
}
+ stopTraceInternal(pw);
}
/**
- * Stops the trace and write the current buffer to disk then restart, if it's already running.
+ * If legacy tracing is enabled (either WM or ProtoLog):
+ * 1. Stop tracing
+ * 2. Write trace to disk (to be picked by dumpstate)
+ * 3. Restart tracing
+ *
* @param pw Print writer
*/
void saveForBugreport(@Nullable PrintWriter pw) {
@@ -153,143 +104,24 @@ class WindowTracing {
logAndPrintln(pw, "Error: Tracing is not supported on user builds.");
return;
}
- synchronized (mEnabledLock) {
- if (!mEnabled) {
- return;
- }
- mEnabled = mEnabledLockFree = false;
- logAndPrintln(pw, "Stop tracing to " + mTraceFile + ". Waiting for traces to flush.");
- writeTraceToFileLocked();
- logAndPrintln(pw, "Trace written to " + mTraceFile + ".");
- if (!android.tracing.Flags.perfettoProtologTracing()) {
- ((LegacyProtoLogImpl) mProtoLog).stopProtoLog(pw, true);
- }
- logAndPrintln(pw, "Start tracing to " + mTraceFile + ".");
- mBuffer.resetBuffer();
- mEnabled = mEnabledLockFree = true;
- if (!android.tracing.Flags.perfettoProtologTracing()) {
- ((LegacyProtoLogImpl) mProtoLog).startProtoLog(pw);
- }
- }
- }
-
- private void setLogLevel(@WindowTraceLogLevel int logLevel, PrintWriter pw) {
- logAndPrintln(pw, "Setting window tracing log level to " + logLevel);
- mLogLevel = logLevel;
-
- switch (logLevel) {
- case WindowTraceLogLevel.ALL: {
- setBufferCapacity(BUFFER_CAPACITY_ALL, pw);
- break;
- }
- case WindowTraceLogLevel.TRIM: {
- setBufferCapacity(BUFFER_CAPACITY_TRIM, pw);
- break;
- }
- case WindowTraceLogLevel.CRITICAL: {
- setBufferCapacity(BUFFER_CAPACITY_CRITICAL, pw);
- break;
- }
- }
- }
-
- private void setLogFrequency(boolean onFrame, PrintWriter pw) {
- logAndPrintln(pw, "Setting window tracing log frequency to "
- + ((onFrame) ? "frame" : "transaction"));
- mLogOnFrame = onFrame;
- }
-
- private void setBufferCapacity(int capacity, PrintWriter pw) {
- logAndPrintln(pw, "Setting window tracing buffer capacity to " + capacity + "bytes");
- mBuffer.setCapacity(capacity);
- }
-
- boolean isEnabled() {
- return mEnabledLockFree;
- }
-
- int onShellCommand(ShellCommand shell) {
- PrintWriter pw = shell.getOutPrintWriter();
- String cmd = shell.getNextArgRequired();
- switch (cmd) {
- case "start":
- startTrace(pw);
- return 0;
- case "stop":
- stopTrace(pw);
- return 0;
- case "save-for-bugreport":
- saveForBugreport(pw);
- return 0;
- case "status":
- logAndPrintln(pw, getStatus());
- return 0;
- case "frame":
- setLogFrequency(true /* onFrame */, pw);
- mBuffer.resetBuffer();
- return 0;
- case "transaction":
- setLogFrequency(false /* onFrame */, pw);
- mBuffer.resetBuffer();
- return 0;
- case "level":
- String logLevelStr = shell.getNextArgRequired().toLowerCase();
- switch (logLevelStr) {
- case "all": {
- setLogLevel(WindowTraceLogLevel.ALL, pw);
- break;
- }
- case "trim": {
- setLogLevel(WindowTraceLogLevel.TRIM, pw);
- break;
- }
- case "critical": {
- setLogLevel(WindowTraceLogLevel.CRITICAL, pw);
- break;
- }
- default: {
- setLogLevel(WindowTraceLogLevel.TRIM, pw);
- break;
- }
- }
- mBuffer.resetBuffer();
- return 0;
- case "size":
- setBufferCapacity(Integer.parseInt(shell.getNextArgRequired()) * 1024, pw);
- mBuffer.resetBuffer();
- return 0;
- default:
- pw.println("Unknown command: " + cmd);
- pw.println("Window manager trace options:");
- pw.println(" start: Start logging");
- pw.println(" stop: Stop logging");
- pw.println(" save-for-bugreport: Save logging data to file if it's running.");
- pw.println(" frame: Log trace once per frame");
- pw.println(" transaction: Log each transaction");
- pw.println(" size: Set the maximum log size (in KB)");
- pw.println(" status: Print trace status");
- pw.println(" level [lvl]: Set the log level between");
- pw.println(" lvl may be one of:");
- pw.println(" critical: Only visible windows with reduced information");
- pw.println(" trim: All windows with reduced");
- pw.println(" all: All window and information");
- return -1;
+ if (!android.tracing.Flags.perfettoProtologTracing()
+ && ProtoLog.getSingleInstance().isProtoEnabled()) {
+ ((LegacyProtoLogImpl) ProtoLog.getSingleInstance()).stopProtoLog(pw, true);
+ ((LegacyProtoLogImpl) ProtoLog.getSingleInstance()).startProtoLog(pw);
}
+ saveForBugreportInternal(pw);
}
- String getStatus() {
- return "Status: "
- + ((isEnabled()) ? "Enabled" : "Disabled")
- + "\n"
- + "Log level: "
- + mLogLevel
- + "\n"
- + mBuffer.getStatus();
- }
+ abstract void setLogLevel(@WindowTraceLogLevel int logLevel, PrintWriter pw);
+ abstract void setLogFrequency(boolean onFrame, PrintWriter pw);
+ abstract void setBufferCapacity(int capacity, PrintWriter pw);
+ abstract boolean isEnabled();
+ abstract int onShellCommand(ShellCommand shell);
+ abstract String getStatus();
/**
* If tracing is enabled, log the current state or schedule the next frame to be logged,
- * according to {@link #mLogOnFrame}.
+ * according to the configuration in the derived tracing class.
*
* @param where Logging point descriptor
*/
@@ -298,59 +130,63 @@ class WindowTracing {
return;
}
- if (mLogOnFrame) {
- schedule();
- } else {
+ if (shouldLogOnTransaction()) {
log(where);
}
+
+ if (shouldLogOnFrame()) {
+ schedule();
+ }
}
/**
* Schedule the log to trace the next frame
*/
private void schedule() {
- if (mScheduled) {
+ if (!mScheduled.compareAndSet(false, true)) {
return;
}
- mScheduled = true;
mChoreographer.postFrameCallback(mFrameCallback);
}
/**
- * Write the current frame to the buffer
+ * Write the current frame to proto
*
+ * @param os Proto stream buffer
+ * @param logLevel Log level
* @param where Logging point descriptor
+ * @param elapsedRealtimeNanos Timestamp
*/
- private void log(String where) {
+ protected void dumpToProto(ProtoOutputStream os, @WindowTraceLogLevel int logLevel,
+ String where, long elapsedRealtimeNanos) {
Trace.traceBegin(Trace.TRACE_TAG_WINDOW_MANAGER, "traceStateLocked");
try {
- ProtoOutputStream os = new ProtoOutputStream();
- long tokenOuter = os.start(ENTRY);
- os.write(ELAPSED_REALTIME_NANOS, SystemClock.elapsedRealtimeNanos());
+ os.write(ELAPSED_REALTIME_NANOS, elapsedRealtimeNanos);
os.write(WHERE, where);
- long tokenInner = os.start(WINDOW_MANAGER_SERVICE);
+ long token = os.start(WINDOW_MANAGER_SERVICE);
synchronized (mGlobalLock) {
Trace.traceBegin(Trace.TRACE_TAG_WINDOW_MANAGER, "dumpDebugLocked");
try {
- mService.dumpDebugLocked(os, mLogLevel);
+ mService.dumpDebugLocked(os, logLevel);
} finally {
Trace.traceEnd(Trace.TRACE_TAG_WINDOW_MANAGER);
}
}
- os.end(tokenInner);
- os.end(tokenOuter);
- mBuffer.add(os);
- mScheduled = false;
+ os.end(token);
} catch (Exception e) {
Log.wtf(TAG, "Exception while tracing state", e);
} finally {
+ boolean isOnFrameLogEvent = where == WHERE_ON_FRAME;
+ if (isOnFrameLogEvent) {
+ mScheduled.set(false);
+ }
Trace.traceEnd(Trace.TRACE_TAG_WINDOW_MANAGER);
}
}
- private void logAndPrintln(@Nullable PrintWriter pw, String msg) {
+ protected void logAndPrintln(@Nullable PrintWriter pw, String msg) {
Log.i(TAG, msg);
if (pw != null) {
pw.println(msg);
@@ -358,24 +194,10 @@ class WindowTracing {
}
}
- /**
- * Writes the trace buffer to disk. This method has no internal synchronization and should be
- * externally synchronized
- */
- private void writeTraceToFileLocked() {
- try {
- Trace.traceBegin(Trace.TRACE_TAG_WINDOW_MANAGER, "writeTraceToFileLocked");
- ProtoOutputStream proto = new ProtoOutputStream();
- proto.write(MAGIC_NUMBER, MAGIC_NUMBER_VALUE);
- long timeOffsetNs =
- TimeUnit.MILLISECONDS.toNanos(System.currentTimeMillis())
- - SystemClock.elapsedRealtimeNanos();
- proto.write(REAL_TO_ELAPSED_TIME_OFFSET_NANOS, timeOffsetNs);
- mBuffer.writeTraceToFile(mTraceFile, proto);
- } catch (IOException e) {
- Log.e(TAG, "Unable to write buffer to file", e);
- } finally {
- Trace.traceEnd(Trace.TRACE_TAG_WINDOW_MANAGER);
- }
- }
+ protected abstract void startTraceInternal(@Nullable PrintWriter pw);
+ protected abstract void stopTraceInternal(@Nullable PrintWriter pw);
+ protected abstract void saveForBugreportInternal(@Nullable PrintWriter pw);
+ protected abstract void log(String where);
+ protected abstract boolean shouldLogOnFrame();
+ protected abstract boolean shouldLogOnTransaction();
}
diff --git a/services/core/java/com/android/server/wm/WindowTracingDataSource.java b/services/core/java/com/android/server/wm/WindowTracingDataSource.java
new file mode 100644
index 000000000000..3d2c0d3f79b9
--- /dev/null
+++ b/services/core/java/com/android/server/wm/WindowTracingDataSource.java
@@ -0,0 +1,204 @@
+/*
+ * 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.server.wm;
+
+import static android.tracing.perfetto.DataSourceParams.PERFETTO_DS_BUFFER_EXHAUSTED_POLICY_STALL_AND_ABORT;
+
+import android.annotation.NonNull;
+import android.internal.perfetto.protos.DataSourceConfigOuterClass.DataSourceConfig;
+import android.internal.perfetto.protos.WindowmanagerConfig.WindowManagerConfig;
+import android.tracing.perfetto.CreateTlsStateArgs;
+import android.tracing.perfetto.DataSource;
+import android.tracing.perfetto.DataSourceInstance;
+import android.tracing.perfetto.DataSourceParams;
+import android.tracing.perfetto.InitArguments;
+import android.tracing.perfetto.Producer;
+import android.tracing.perfetto.StartCallbackArguments;
+import android.tracing.perfetto.StopCallbackArguments;
+import android.util.Log;
+import android.util.proto.ProtoInputStream;
+
+import java.io.IOException;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.function.Consumer;
+
+public final class WindowTracingDataSource extends DataSource<WindowTracingDataSource.Instance,
+ WindowTracingDataSource.TlsState, Void> {
+ public static final String DATA_SOURCE_NAME = "android.windowmanager";
+
+ public static class TlsState {
+ public final Config mConfig;
+ public final AtomicBoolean mIsStarting = new AtomicBoolean(true);
+
+ private TlsState(Config config) {
+ mConfig = config;
+ }
+ }
+
+ public static class Config {
+ public final @WindowTraceLogLevel int mLogLevel;
+ public final boolean mLogOnFrame;
+
+ private Config(@WindowTraceLogLevel int logLevel, boolean logOnFrame) {
+ mLogLevel = logLevel;
+ mLogOnFrame = logOnFrame;
+ }
+ }
+
+ public abstract static class Instance extends DataSourceInstance {
+ public final Config mConfig;
+
+ public Instance(DataSource dataSource, int instanceIndex, Config config) {
+ super(dataSource, instanceIndex);
+ mConfig = config;
+ }
+ }
+
+ private static final Config CONFIG_DEFAULT = new Config(WindowTraceLogLevel.TRIM, true);
+ private static final int CONFIG_VALUE_UNSPECIFIED = 0;
+ private static final String TAG = "WindowTracingDataSource";
+
+ @NonNull
+ private final Consumer<Config> mOnStartCallback;
+ @NonNull
+ private final Consumer<Config> mOnStopCallback;
+
+ public WindowTracingDataSource(@NonNull Consumer<Config> onStart,
+ @NonNull Consumer<Config> onStop) {
+ super(DATA_SOURCE_NAME);
+ mOnStartCallback = onStart;
+ mOnStopCallback = onStop;
+
+ Producer.init(InitArguments.DEFAULTS);
+ DataSourceParams params =
+ new DataSourceParams.Builder()
+ .setBufferExhaustedPolicy(
+ PERFETTO_DS_BUFFER_EXHAUSTED_POLICY_STALL_AND_ABORT)
+ .build();
+ register(params);
+ }
+
+ @Override
+ public Instance createInstance(ProtoInputStream configStream, int instanceIndex) {
+ final Config config = parseDataSourceConfig(configStream);
+
+ return new Instance(this, instanceIndex, config != null ? config : CONFIG_DEFAULT) {
+ @Override
+ protected void onStart(StartCallbackArguments args) {
+ mOnStartCallback.accept(mConfig);
+ }
+
+ @Override
+ protected void onStop(StopCallbackArguments args) {
+ mOnStopCallback.accept(mConfig);
+ }
+ };
+ }
+
+ @Override
+ public TlsState createTlsState(
+ CreateTlsStateArgs<Instance> args) {
+ try (Instance dsInstance = args.getDataSourceInstanceLocked()) {
+ if (dsInstance == null) {
+ // Datasource instance has been removed
+ return new TlsState(CONFIG_DEFAULT);
+ }
+ return new TlsState(dsInstance.mConfig);
+ }
+ }
+
+ private Config parseDataSourceConfig(ProtoInputStream stream) {
+ try {
+ while (stream.nextField() != ProtoInputStream.NO_MORE_FIELDS) {
+ if (stream.getFieldNumber() != (int) DataSourceConfig.WINDOWMANAGER_CONFIG) {
+ continue;
+ }
+ return parseWindowManagerConfig(stream);
+ }
+ Log.w(TAG, "Received start request without config parameters. Will use defaults.");
+ } catch (IOException e) {
+ throw new RuntimeException("Failed to parse DataSourceConfig", e);
+ }
+ return null;
+ }
+
+ private Config parseWindowManagerConfig(ProtoInputStream stream) {
+ int parsedLogLevel = CONFIG_VALUE_UNSPECIFIED;
+ int parsedLogFrequency = CONFIG_VALUE_UNSPECIFIED;
+
+ try {
+ final long token = stream.start(DataSourceConfig.WINDOWMANAGER_CONFIG);
+ while (stream.nextField() != ProtoInputStream.NO_MORE_FIELDS) {
+ switch (stream.getFieldNumber()) {
+ case (int) WindowManagerConfig.LOG_LEVEL:
+ parsedLogLevel = stream.readInt(WindowManagerConfig.LOG_LEVEL);
+ break;
+ case (int) WindowManagerConfig.LOG_FREQUENCY:
+ parsedLogFrequency = stream.readInt(WindowManagerConfig.LOG_FREQUENCY);
+ break;
+ default:
+ Log.w(TAG, "Unrecognized WindowManagerConfig field number: "
+ + stream.getFieldNumber());
+ }
+ }
+ stream.end(token);
+ } catch (IOException e) {
+ throw new RuntimeException("Failed to parse WindowManagerConfig", e);
+ }
+
+ @WindowTraceLogLevel int logLevel;
+ switch(parsedLogLevel) {
+ case CONFIG_VALUE_UNSPECIFIED:
+ Log.w(TAG, "Unspecified log level. Defaulting to TRIM");
+ logLevel = WindowTraceLogLevel.TRIM;
+ break;
+ case WindowManagerConfig.LOG_LEVEL_VERBOSE:
+ logLevel = WindowTraceLogLevel.ALL;
+ break;
+ case WindowManagerConfig.LOG_LEVEL_DEBUG:
+ logLevel = WindowTraceLogLevel.TRIM;
+ break;
+ case WindowManagerConfig.LOG_LEVEL_CRITICAL:
+ logLevel = WindowTraceLogLevel.CRITICAL;
+ break;
+ default:
+ Log.w(TAG, "Unrecognized log level. Defaulting to TRIM");
+ logLevel = WindowTraceLogLevel.TRIM;
+ break;
+ }
+
+ boolean logOnFrame;
+ switch(parsedLogFrequency) {
+ case CONFIG_VALUE_UNSPECIFIED:
+ Log.w(TAG, "Unspecified log frequency. Defaulting to 'log on frame'");
+ logOnFrame = true;
+ break;
+ case WindowManagerConfig.LOG_FREQUENCY_FRAME:
+ logOnFrame = true;
+ break;
+ case WindowManagerConfig.LOG_FREQUENCY_TRANSACTION:
+ logOnFrame = false;
+ break;
+ default:
+ Log.w(TAG, "Unrecognized log frequency. Defaulting to 'log on frame'");
+ logOnFrame = true;
+ break;
+ }
+
+ return new Config(logLevel, logOnFrame);
+ }
+}
diff --git a/services/core/java/com/android/server/wm/WindowTracingLegacy.java b/services/core/java/com/android/server/wm/WindowTracingLegacy.java
new file mode 100644
index 000000000000..7a36707fd95a
--- /dev/null
+++ b/services/core/java/com/android/server/wm/WindowTracingLegacy.java
@@ -0,0 +1,276 @@
+/*
+ * 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.server.wm;
+
+import static com.android.server.wm.WindowManagerTraceFileProto.ENTRY;
+import static com.android.server.wm.WindowManagerTraceFileProto.MAGIC_NUMBER;
+import static com.android.server.wm.WindowManagerTraceFileProto.MAGIC_NUMBER_H;
+import static com.android.server.wm.WindowManagerTraceFileProto.MAGIC_NUMBER_L;
+import static com.android.server.wm.WindowManagerTraceFileProto.REAL_TO_ELAPSED_TIME_OFFSET_NANOS;
+
+import android.annotation.Nullable;
+import android.os.ShellCommand;
+import android.os.SystemClock;
+import android.os.Trace;
+import android.util.Log;
+import android.util.proto.ProtoOutputStream;
+import android.view.Choreographer;
+
+import com.android.internal.util.TraceBuffer;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.concurrent.TimeUnit;
+
+class WindowTracingLegacy extends WindowTracing {
+
+ /**
+ * Maximum buffer size, currently defined as 5 MB
+ * Size was experimentally defined to fit between 100 to 150 elements.
+ */
+ private static final int BUFFER_CAPACITY_CRITICAL = 5120 * 1024; // 5 MB
+ private static final int BUFFER_CAPACITY_TRIM = 10240 * 1024; // 10 MB
+ private static final int BUFFER_CAPACITY_ALL = 20480 * 1024; // 20 MB
+ static final String WINSCOPE_EXT = ".winscope";
+ private static final String TRACE_FILENAME = "/data/misc/wmtrace/wm_trace" + WINSCOPE_EXT;
+ private static final String TAG = "WindowTracing";
+ private static final long MAGIC_NUMBER_VALUE = ((long) MAGIC_NUMBER_H << 32) | MAGIC_NUMBER_L;
+
+ private final Object mEnabledLock = new Object();
+ private final File mTraceFile;
+ private final TraceBuffer mBuffer;
+
+ private boolean mEnabled;
+ private volatile boolean mEnabledLockFree;
+
+ protected @WindowTraceLogLevel int mLogLevel = WindowTraceLogLevel.TRIM;
+ protected boolean mLogOnFrame = false;
+
+ WindowTracingLegacy(WindowManagerService service, Choreographer choreographer) {
+ this(new File(TRACE_FILENAME), service, choreographer,
+ service.mGlobalLock, BUFFER_CAPACITY_TRIM);
+ }
+
+ WindowTracingLegacy(File traceFile, WindowManagerService service, Choreographer choreographer,
+ WindowManagerGlobalLock globalLock, int bufferSize) {
+ super(service, choreographer, globalLock);
+ mTraceFile = traceFile;
+ mBuffer = new TraceBuffer(bufferSize);
+ }
+
+ @Override
+ void setLogLevel(@WindowTraceLogLevel int logLevel, PrintWriter pw) {
+ logAndPrintln(pw, "Setting window tracing log level to " + logLevel);
+ mLogLevel = logLevel;
+
+ switch (logLevel) {
+ case WindowTraceLogLevel.ALL: {
+ setBufferCapacity(BUFFER_CAPACITY_ALL, pw);
+ break;
+ }
+ case WindowTraceLogLevel.TRIM: {
+ setBufferCapacity(BUFFER_CAPACITY_TRIM, pw);
+ break;
+ }
+ case WindowTraceLogLevel.CRITICAL: {
+ setBufferCapacity(BUFFER_CAPACITY_CRITICAL, pw);
+ break;
+ }
+ }
+ }
+
+ @Override
+ void setLogFrequency(boolean onFrame, PrintWriter pw) {
+ logAndPrintln(pw, "Setting window tracing log frequency to "
+ + ((onFrame) ? "frame" : "transaction"));
+ mLogOnFrame = onFrame;
+ }
+
+ @Override
+ void setBufferCapacity(int capacity, PrintWriter pw) {
+ logAndPrintln(pw, "Setting window tracing buffer capacity to " + capacity + "bytes");
+ mBuffer.setCapacity(capacity);
+ }
+
+ @Override
+ boolean isEnabled() {
+ return mEnabledLockFree;
+ }
+
+ @Override
+ int onShellCommand(ShellCommand shell) {
+ PrintWriter pw = shell.getOutPrintWriter();
+ String cmd = shell.getNextArgRequired();
+ switch (cmd) {
+ case "start":
+ startTrace(pw);
+ return 0;
+ case "stop":
+ stopTrace(pw);
+ return 0;
+ case "save-for-bugreport":
+ saveForBugreport(pw);
+ return 0;
+ case "status":
+ logAndPrintln(pw, getStatus());
+ return 0;
+ case "frame":
+ setLogFrequency(true /* onFrame */, pw);
+ mBuffer.resetBuffer();
+ return 0;
+ case "transaction":
+ setLogFrequency(false /* onFrame */, pw);
+ mBuffer.resetBuffer();
+ return 0;
+ case "level":
+ String logLevelStr = shell.getNextArgRequired().toLowerCase();
+ switch (logLevelStr) {
+ case "all": {
+ setLogLevel(WindowTraceLogLevel.ALL, pw);
+ break;
+ }
+ case "trim": {
+ setLogLevel(WindowTraceLogLevel.TRIM, pw);
+ break;
+ }
+ case "critical": {
+ setLogLevel(WindowTraceLogLevel.CRITICAL, pw);
+ break;
+ }
+ default: {
+ setLogLevel(WindowTraceLogLevel.TRIM, pw);
+ break;
+ }
+ }
+ mBuffer.resetBuffer();
+ return 0;
+ case "size":
+ setBufferCapacity(Integer.parseInt(shell.getNextArgRequired()) * 1024, pw);
+ mBuffer.resetBuffer();
+ return 0;
+ default:
+ pw.println("Unknown command: " + cmd);
+ pw.println("Window manager trace options:");
+ pw.println(" start: Start logging");
+ pw.println(" stop: Stop logging");
+ pw.println(" save-for-bugreport: Save logging data to file if it's running.");
+ pw.println(" frame: Log trace once per frame");
+ pw.println(" transaction: Log each transaction");
+ pw.println(" size: Set the maximum log size (in KB)");
+ pw.println(" status: Print trace status");
+ pw.println(" level [lvl]: Set the log level between");
+ pw.println(" lvl may be one of:");
+ pw.println(" critical: Only visible windows with reduced information");
+ pw.println(" trim: All windows with reduced");
+ pw.println(" all: All window and information");
+ return -1;
+ }
+ }
+
+ @Override
+ String getStatus() {
+ return "Status: "
+ + ((isEnabled()) ? "Enabled" : "Disabled")
+ + "\n"
+ + "Log level: "
+ + mLogLevel
+ + "\n"
+ + mBuffer.getStatus();
+ }
+
+ @Override
+ protected void startTraceInternal(@Nullable PrintWriter pw) {
+ synchronized (mEnabledLock) {
+ logAndPrintln(pw, "Start tracing to " + mTraceFile + ".");
+ mBuffer.resetBuffer();
+ mEnabled = mEnabledLockFree = true;
+ }
+ log(WHERE_START_TRACING);
+ }
+
+ @Override
+ protected void stopTraceInternal(@Nullable PrintWriter pw) {
+ synchronized (mEnabledLock) {
+ logAndPrintln(pw, "Stop tracing to " + mTraceFile + ". Waiting for traces to flush.");
+ mEnabled = mEnabledLockFree = false;
+
+ if (mEnabled) {
+ logAndPrintln(pw, "ERROR: tracing was re-enabled while waiting for flush.");
+ throw new IllegalStateException("tracing enabled while waiting for flush.");
+ }
+ writeTraceToFileLocked();
+ logAndPrintln(pw, "Trace written to " + mTraceFile + ".");
+ }
+ }
+
+ @Override
+ protected void saveForBugreportInternal(@Nullable PrintWriter pw) {
+ synchronized (mEnabledLock) {
+ if (!mEnabled) {
+ return;
+ }
+ mEnabled = mEnabledLockFree = false;
+ logAndPrintln(pw, "Stop tracing to " + mTraceFile + ". Waiting for traces to flush.");
+ writeTraceToFileLocked();
+ logAndPrintln(pw, "Trace written to " + mTraceFile + ".");
+ logAndPrintln(pw, "Start tracing to " + mTraceFile + ".");
+ mBuffer.resetBuffer();
+ mEnabled = mEnabledLockFree = true;
+ }
+ }
+
+ @Override
+ protected void log(String where) {
+ try {
+ ProtoOutputStream os = new ProtoOutputStream();
+ long token = os.start(ENTRY);
+ dumpToProto(os, mLogLevel, where, SystemClock.elapsedRealtimeNanos());
+ os.end(token);
+ mBuffer.add(os);
+ } catch (Exception e) {
+ Log.wtf(TAG, "Exception while tracing state", e);
+ }
+ }
+
+ @Override
+ protected boolean shouldLogOnFrame() {
+ return mLogOnFrame;
+ }
+
+ @Override
+ protected boolean shouldLogOnTransaction() {
+ return !mLogOnFrame;
+ }
+
+ private void writeTraceToFileLocked() {
+ try {
+ Trace.traceBegin(Trace.TRACE_TAG_WINDOW_MANAGER, "writeTraceToFileLocked");
+ ProtoOutputStream proto = new ProtoOutputStream();
+ proto.write(MAGIC_NUMBER, MAGIC_NUMBER_VALUE);
+ long timeOffsetNs =
+ TimeUnit.MILLISECONDS.toNanos(System.currentTimeMillis())
+ - SystemClock.elapsedRealtimeNanos();
+ proto.write(REAL_TO_ELAPSED_TIME_OFFSET_NANOS, timeOffsetNs);
+ mBuffer.writeTraceToFile(mTraceFile, proto);
+ } catch (IOException e) {
+ Log.e(TAG, "Unable to write buffer to file", e);
+ } finally {
+ Trace.traceEnd(Trace.TRACE_TAG_WINDOW_MANAGER);
+ }
+ }
+}
diff --git a/services/core/java/com/android/server/wm/WindowTracingPerfetto.java b/services/core/java/com/android/server/wm/WindowTracingPerfetto.java
new file mode 100644
index 000000000000..653b6dac1537
--- /dev/null
+++ b/services/core/java/com/android/server/wm/WindowTracingPerfetto.java
@@ -0,0 +1,163 @@
+/*
+ * 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.server.wm;
+
+import android.annotation.Nullable;
+import android.internal.perfetto.protos.TracePacketOuterClass.TracePacket;
+import android.internal.perfetto.protos.WinscopeExtensionsImplOuterClass.WinscopeExtensionsImpl;
+import android.os.ShellCommand;
+import android.os.SystemClock;
+import android.util.Log;
+import android.util.proto.ProtoOutputStream;
+import android.view.Choreographer;
+
+import java.io.PrintWriter;
+import java.util.concurrent.atomic.AtomicInteger;
+
+class WindowTracingPerfetto extends WindowTracing {
+ private static final String TAG = "WindowTracing";
+
+ private final AtomicInteger mCountSessionsOnFrame = new AtomicInteger();
+ private final AtomicInteger mCountSessionsOnTransaction = new AtomicInteger();
+ private final WindowTracingDataSource mDataSource = new WindowTracingDataSource(
+ this::onStart, this::onStop);
+
+ WindowTracingPerfetto(WindowManagerService service, Choreographer choreographer) {
+ super(service, choreographer, service.mGlobalLock);
+ }
+
+ @Override
+ void setLogLevel(@WindowTraceLogLevel int logLevel, PrintWriter pw) {
+ logAndPrintln(pw, "Log level must be configured through perfetto");
+ }
+
+ @Override
+ void setLogFrequency(boolean onFrame, PrintWriter pw) {
+ logAndPrintln(pw, "Log frequency must be configured through perfetto");
+ }
+
+ @Override
+ void setBufferCapacity(int capacity, PrintWriter pw) {
+ logAndPrintln(pw, "Buffer capacity must be configured through perfetto");
+ }
+
+ @Override
+ boolean isEnabled() {
+ return (mCountSessionsOnFrame.get() + mCountSessionsOnTransaction.get()) > 0;
+ }
+
+ @Override
+ int onShellCommand(ShellCommand shell) {
+ PrintWriter pw = shell.getOutPrintWriter();
+ pw.println("Shell commands are ignored."
+ + " Any type of action should be performed through perfetto.");
+ return -1;
+ }
+
+ @Override
+ String getStatus() {
+ return "Status: "
+ + ((isEnabled()) ? "Enabled" : "Disabled")
+ + "\n"
+ + "Sessions logging 'on frame': " + mCountSessionsOnFrame.get()
+ + "\n"
+ + "Sessions logging 'on transaction': " + mCountSessionsOnTransaction.get()
+ + "\n";
+ }
+
+ @Override
+ protected void startTraceInternal(@Nullable PrintWriter pw) {
+ logAndPrintln(pw, "Tracing must be started through perfetto");
+ }
+
+ @Override
+ protected void stopTraceInternal(@Nullable PrintWriter pw) {
+ logAndPrintln(pw, "Tracing must be stopped through perfetto");
+ }
+
+ @Override
+ protected void saveForBugreportInternal(@Nullable PrintWriter pw) {
+ logAndPrintln(pw, "Tracing snapshot for bugreport must be handled through perfetto");
+ }
+
+ @Override
+ protected void log(String where) {
+ try {
+ boolean isStartLogEvent = where == WHERE_START_TRACING;
+ boolean isOnFrameLogEvent = where == WHERE_ON_FRAME;
+
+ mDataSource.trace((context) -> {
+ WindowTracingDataSource.Config dataSourceConfig =
+ context.getCustomTlsState().mConfig;
+
+ if (isStartLogEvent) {
+ boolean isDataSourceStarting = context.getCustomTlsState()
+ .mIsStarting.compareAndSet(true, false);
+ if (!isDataSourceStarting) {
+ return;
+ }
+ } else if (isOnFrameLogEvent != dataSourceConfig.mLogOnFrame) {
+ return;
+ }
+
+ ProtoOutputStream os = context.newTracePacket();
+ long timestamp = SystemClock.elapsedRealtimeNanos();
+ os.write(TracePacket.TIMESTAMP, timestamp);
+ final long tokenWinscopeExtensions =
+ os.start(TracePacket.WINSCOPE_EXTENSIONS);
+ final long tokenExtensionsField =
+ os.start(WinscopeExtensionsImpl.WINDOWMANAGER);
+ dumpToProto(os, dataSourceConfig.mLogLevel, where, timestamp);
+ os.end(tokenExtensionsField);
+ os.end(tokenWinscopeExtensions);
+ });
+ } catch (Exception e) {
+ Log.wtf(TAG, "Exception while tracing state", e);
+ }
+ }
+
+ @Override
+ protected boolean shouldLogOnFrame() {
+ return mCountSessionsOnFrame.get() > 0;
+ }
+
+ @Override
+ protected boolean shouldLogOnTransaction() {
+ return mCountSessionsOnTransaction.get() > 0;
+ }
+
+ private void onStart(WindowTracingDataSource.Config config) {
+ if (config.mLogOnFrame) {
+ mCountSessionsOnFrame.incrementAndGet();
+ } else {
+ mCountSessionsOnTransaction.incrementAndGet();
+ }
+
+ Log.i(TAG, "Started with logLevel: " + config.mLogLevel
+ + " logOnFrame: " + config.mLogOnFrame);
+ log(WHERE_START_TRACING);
+ }
+
+ private void onStop(WindowTracingDataSource.Config config) {
+ if (config.mLogOnFrame) {
+ mCountSessionsOnFrame.decrementAndGet();
+ } else {
+ mCountSessionsOnTransaction.decrementAndGet();
+ }
+ Log.i(TAG, "Stopped");
+ }
+}
diff --git a/services/core/java/com/android/server/wm/utils/DesktopModeFlagsUtil.java b/services/core/java/com/android/server/wm/utils/DesktopModeFlagsUtil.java
new file mode 100644
index 000000000000..3559e620a350
--- /dev/null
+++ b/services/core/java/com/android/server/wm/utils/DesktopModeFlagsUtil.java
@@ -0,0 +1,133 @@
+/*
+ * 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.server.wm.utils;
+
+import static com.android.server.wm.utils.DesktopModeFlagsUtil.ToggleOverride.OVERRIDE_UNSET;
+
+import android.annotation.Nullable;
+import android.content.Context;
+import android.provider.Settings;
+import android.util.Log;
+
+import com.android.window.flags.Flags;
+
+import java.util.function.Supplier;
+
+/**
+ * Util to check desktop mode flags state.
+ *
+ * This utility is used to allow developer option toggles to override flags related to desktop
+ * windowing.
+ *
+ * Computes whether Desktop Windowing related flags should be enabled by using the aconfig flag
+ * value and the developer option override state (if applicable).
+ *
+ * This is a partial copy of {@link com.android.wm.shell.shared.desktopmode.DesktopModeFlags} which
+ * is to be used in WM core.
+ */
+public enum DesktopModeFlagsUtil {
+ // All desktop mode related flags to be overridden by developer option toggle will be added here
+ DESKTOP_WINDOWING_MODE(
+ Flags::enableDesktopWindowingMode, /* shouldOverrideByDevOption= */ true),
+ WALLPAPER_ACTIVITY(
+ Flags::enableDesktopWindowingWallpaperActivity, /* shouldOverrideByDevOption= */ true);
+
+ private static final String TAG = "DesktopModeFlagsUtil";
+ // Function called to obtain aconfig flag value.
+ private final Supplier<Boolean> mFlagFunction;
+ // Whether the flag state should be affected by developer option.
+ private final boolean mShouldOverrideByDevOption;
+
+ // Local cache for toggle override, which is initialized once on its first access. It needs to
+ // be refreshed only on reboots as overridden state is expected to take effect on reboots.
+ private static ToggleOverride sCachedToggleOverride;
+
+ DesktopModeFlagsUtil(Supplier<Boolean> flagFunction, boolean shouldOverrideByDevOption) {
+ this.mFlagFunction = flagFunction;
+ this.mShouldOverrideByDevOption = shouldOverrideByDevOption;
+ }
+
+ /**
+ * Determines state of flag based on the actual flag and desktop mode developer option
+ * overrides.
+ */
+ public boolean isEnabled(Context context) {
+ if (!Flags.showDesktopWindowingDevOption()
+ || !mShouldOverrideByDevOption
+ || context.getContentResolver() == null) {
+ return mFlagFunction.get();
+ } else {
+ boolean shouldToggleBeEnabledByDefault = Flags.enableDesktopWindowingMode();
+ return switch (getToggleOverride(context)) {
+ case OVERRIDE_UNSET -> mFlagFunction.get();
+ // When toggle override matches its default state, don't override flags. This
+ // helps users reset their feature overrides.
+ case OVERRIDE_OFF -> !shouldToggleBeEnabledByDefault && mFlagFunction.get();
+ case OVERRIDE_ON -> shouldToggleBeEnabledByDefault ? mFlagFunction.get() : true;
+ };
+ }
+ }
+
+ private ToggleOverride getToggleOverride(Context context) {
+ // If cached, return it
+ if (sCachedToggleOverride != null) {
+ return sCachedToggleOverride;
+ }
+
+ // Otherwise, fetch and cache it
+ ToggleOverride override = getToggleOverrideFromSystem(context);
+ sCachedToggleOverride = override;
+ Log.d(TAG, "Toggle override initialized to: " + override);
+ return override;
+ }
+
+ /**
+ * Returns {@link ToggleOverride} from Settings.Global set by toggle.
+ */
+ private ToggleOverride getToggleOverrideFromSystem(Context context) {
+ int settingValue = Settings.Global.getInt(
+ context.getContentResolver(),
+ Settings.Global.DEVELOPMENT_OVERRIDE_DESKTOP_MODE_FEATURES,
+ OVERRIDE_UNSET.getSetting()
+ );
+ return ToggleOverride.fromSetting(settingValue, OVERRIDE_UNSET);
+ }
+
+ /** Override state of desktop mode developer option toggle. */
+ enum ToggleOverride {
+ OVERRIDE_UNSET,
+ OVERRIDE_OFF,
+ OVERRIDE_ON;
+
+ int getSetting() {
+ return switch (this) {
+ case OVERRIDE_ON -> 1;
+ case OVERRIDE_OFF -> 0;
+ case OVERRIDE_UNSET -> -1;
+ };
+ }
+
+ static ToggleOverride fromSetting(int setting, @Nullable ToggleOverride fallback) {
+ return switch (setting) {
+ case 1 -> OVERRIDE_ON;
+ case 0 -> OVERRIDE_OFF;
+ case -1 -> OVERRIDE_UNSET;
+ default -> fallback;
+ };
+ }
+ }
+}
diff --git a/services/core/java/com/android/server/wm/utils/DimenPxIntSupplier.java b/services/core/java/com/android/server/wm/utils/DimenPxIntSupplier.java
new file mode 100644
index 000000000000..5e4934500154
--- /dev/null
+++ b/services/core/java/com/android/server/wm/utils/DimenPxIntSupplier.java
@@ -0,0 +1,54 @@
+/*
+ * 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.server.wm.utils;
+
+import android.annotation.DimenRes;
+import android.annotation.NonNull;
+import android.content.Context;
+
+import java.util.function.IntSupplier;
+
+/**
+ * Cached version of IntSupplier customised to evaluate new dimen in pixels
+ * when density changes.
+ * @hide
+ */
+public class DimenPxIntSupplier implements IntSupplier {
+
+ @NonNull
+ private final Context mContext;
+
+ private final int mResourceId;
+
+ private float mLastDensity = Float.MIN_VALUE;
+ private int mValue = 0;
+
+ public DimenPxIntSupplier(@NonNull Context context, @DimenRes int resourceId) {
+ mContext = context;
+ mResourceId = resourceId;
+ }
+
+ @Override
+ public int getAsInt() {
+ final float newDensity = mContext.getResources().getDisplayMetrics().density;
+ if (newDensity != mLastDensity) {
+ mLastDensity = newDensity;
+ mValue = mContext.getResources().getDimensionPixelSize(mResourceId);
+ }
+ return mValue;
+ }
+}
diff --git a/services/core/jni/com_android_server_UsbDeviceManager.cpp b/services/core/jni/com_android_server_UsbDeviceManager.cpp
index 9dc70afad9d9..4ef9cf4d2388 100644
--- a/services/core/jni/com_android_server_UsbDeviceManager.cpp
+++ b/services/core/jni/com_android_server_UsbDeviceManager.cpp
@@ -15,33 +15,168 @@
*/
#define LOG_TAG "UsbDeviceManagerJNI"
-#include "utils/Log.h"
-
-#include "jni.h"
+#include <android-base/properties.h>
+#include <android-base/unique_fd.h>
+#include <core_jni_helpers.h>
+#include <fcntl.h>
+#include <linux/usb/f_accessory.h>
#include <nativehelper/JNIPlatformHelp.h>
#include <nativehelper/ScopedUtfChars.h>
-#include "android_runtime/AndroidRuntime.h"
-#include "android_runtime/Log.h"
-#include "MtpDescriptors.h"
-
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
+#include <sys/epoll.h>
#include <sys/ioctl.h>
-#include <linux/usb/f_accessory.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
+#include <thread>
+
+#include "MtpDescriptors.h"
+#include "android_runtime/AndroidRuntime.h"
+#include "android_runtime/Log.h"
+#include "jni.h"
+#include "utils/Log.h"
#define DRIVER_NAME "/dev/usb_accessory"
+#define EPOLL_MAX_EVENTS 4
+#define USB_STATE_MAX_LEN 20
namespace android
{
+static JavaVM *gvm = nullptr;
+static jmethodID gUpdateGadgetStateMethod;
+
static struct parcel_file_descriptor_offsets_t
{
jclass mClass;
jmethodID mConstructor;
} gParcelFileDescriptorOffsets;
+/*
+ * NativeGadgetMonitorThread starts a new thread to monitor udc state by epoll,
+ * convert and update the state to UsbDeviceManager.
+ */
+class NativeGadgetMonitorThread {
+ android::base::unique_fd mMonitorFd;
+ int mPipefd[2];
+ std::thread mThread;
+ jobject mCallbackObj;
+ std::string mGadgetState;
+
+ void handleStateUpdate(const char *state) {
+ JNIEnv *env = AndroidRuntime::getJNIEnv();
+ std::string gadgetState;
+
+ if (!std::strcmp(state, "not attached\n")) {
+ gadgetState = "DISCONNECTED";
+ } else if (!std::strcmp(state, "attached\n") || !std::strcmp(state, "powered\n") ||
+ !std::strcmp(state, "default\n") || !std::strcmp(state, "addressed\n")) {
+ gadgetState = "CONNECTED";
+ } else if (!std::strcmp(state, "configured\n")) {
+ gadgetState = "CONFIGURED";
+ } else if (!std::strcmp(state, "suspended\n")) {
+ return;
+ } else {
+ ALOGE("Unknown gadget state %s", state);
+ return;
+ }
+
+ if (mGadgetState.compare(gadgetState)) {
+ mGadgetState = gadgetState;
+ jstring obj = env->NewStringUTF(gadgetState.c_str());
+ env->CallVoidMethod(mCallbackObj, gUpdateGadgetStateMethod, obj);
+ }
+ }
+
+ int setupEpoll(android::base::unique_fd &epollFd) {
+ struct epoll_event ev;
+
+ ev.data.fd = mMonitorFd.get();
+ ev.events = EPOLLPRI;
+ if (epoll_ctl(epollFd.get(), EPOLL_CTL_ADD, mMonitorFd.get(), &ev) != 0) {
+ ALOGE("epoll_ctl failed for monitor fd; errno=%d", errno);
+ return errno;
+ }
+
+ ev.data.fd = mPipefd[0];
+ ev.events = EPOLLIN;
+ if (epoll_ctl(epollFd.get(), EPOLL_CTL_ADD, mPipefd[0], &ev) != 0) {
+ ALOGE("epoll_ctl failed for pipe fd; errno=%d", errno);
+ return errno;
+ }
+
+ return 0;
+ }
+
+ void monitorLoop() {
+ android::base::unique_fd epollFd(epoll_create(EPOLL_MAX_EVENTS));
+ if (epollFd.get() == -1) {
+ ALOGE("epoll_create failed; errno=%d", errno);
+ return;
+ }
+ if (setupEpoll(epollFd) != 0) return;
+
+ JNIEnv *env = nullptr;
+ JavaVMAttachArgs aargs = {JNI_VERSION_1_4, "NativeGadgetMonitorThread", nullptr};
+ if (gvm->AttachCurrentThread(&env, &aargs) != JNI_OK || env == nullptr) {
+ ALOGE("Couldn't attach thread");
+ return;
+ }
+
+ struct epoll_event events[EPOLL_MAX_EVENTS];
+ int nevents = 0;
+ while (true) {
+ nevents = epoll_wait(epollFd.get(), events, EPOLL_MAX_EVENTS, -1);
+ if (nevents < 0) {
+ ALOGE("usb epoll_wait failed; errno=%d", errno);
+ continue;
+ }
+ for (int i = 0; i < nevents; ++i) {
+ int fd = events[i].data.fd;
+ if (fd == mPipefd[0]) {
+ goto exit;
+ } else if (fd == mMonitorFd.get()) {
+ char state[USB_STATE_MAX_LEN] = {0};
+ lseek(fd, 0, SEEK_SET);
+ read(fd, &state, USB_STATE_MAX_LEN);
+ handleStateUpdate(state);
+ }
+ }
+ }
+
+ exit:
+ auto res = gvm->DetachCurrentThread();
+ ALOGE_IF(res != JNI_OK, "Couldn't detach thread");
+ return;
+ }
+
+ void stop() {
+ if (mThread.joinable()) {
+ int c = 'q';
+ write(mPipefd[1], &c, 1);
+ mThread.join();
+ }
+ }
+
+ DISALLOW_COPY_AND_ASSIGN(NativeGadgetMonitorThread);
+
+public:
+ explicit NativeGadgetMonitorThread(jobject obj, android::base::unique_fd monitorFd)
+ : mMonitorFd(std::move(monitorFd)), mGadgetState("") {
+ mCallbackObj = AndroidRuntime::getJNIEnv()->NewGlobalRef(obj);
+ pipe(mPipefd);
+ mThread = std::thread(&NativeGadgetMonitorThread::monitorLoop, this);
+ }
+
+ ~NativeGadgetMonitorThread() {
+ stop();
+ close(mPipefd[0]);
+ close(mPipefd[1]);
+ AndroidRuntime::getJNIEnv()->DeleteGlobalRef(mCallbackObj);
+ }
+};
+static std::unique_ptr<NativeGadgetMonitorThread> sGadgetMonitorThread;
+
static void set_accessory_string(JNIEnv *env, int fd, int cmd, jobjectArray strArray, int index)
{
char buffer[256];
@@ -135,6 +270,41 @@ static jobject android_server_UsbDeviceManager_openControl(JNIEnv *env, jobject
return jifd;
}
+static jboolean android_server_UsbDeviceManager_startGadgetMonitor(JNIEnv *env, jobject thiz,
+ jstring jUdcName) {
+ std::string filePath;
+ ScopedUtfChars udcName(env, jUdcName);
+
+ filePath = "/sys/class/udc/" + std::string(udcName.c_str()) + "/state";
+ android::base::unique_fd fd(open(filePath.c_str(), O_RDONLY));
+
+ if (fd.get() == -1) {
+ ALOGE("Cannot open %s", filePath.c_str());
+ return JNI_FALSE;
+ }
+
+ ALOGI("Start monitoring %s", filePath.c_str());
+ sGadgetMonitorThread.reset(new NativeGadgetMonitorThread(thiz, std::move(fd)));
+
+ return JNI_TRUE;
+}
+
+static void android_server_UsbDeviceManager_stopGadgetMonitor(JNIEnv *env, jobject /* thiz */) {
+ sGadgetMonitorThread.reset();
+ return;
+}
+
+static jstring android_server_UsbDeviceManager_waitAndGetProperty(JNIEnv *env, jobject thiz,
+ jstring jPropName) {
+ ScopedUtfChars propName(env, jPropName);
+ std::string propValue;
+
+ while (!android::base::WaitForPropertyCreation(propName.c_str()));
+ propValue = android::base::GetProperty(propName.c_str(), "" /* default */);
+
+ return env->NewStringUTF(propValue.c_str());
+}
+
static const JNINativeMethod method_table[] = {
{"nativeGetAccessoryStrings", "()[Ljava/lang/String;",
(void *)android_server_UsbDeviceManager_getAccessoryStrings},
@@ -143,16 +313,26 @@ static const JNINativeMethod method_table[] = {
{"nativeIsStartRequested", "()Z", (void *)android_server_UsbDeviceManager_isStartRequested},
{"nativeOpenControl", "(Ljava/lang/String;)Ljava/io/FileDescriptor;",
(void *)android_server_UsbDeviceManager_openControl},
+ {"nativeStartGadgetMonitor", "(Ljava/lang/String;)Z",
+ (void *)android_server_UsbDeviceManager_startGadgetMonitor},
+ {"nativeStopGadgetMonitor", "()V",
+ (void *)android_server_UsbDeviceManager_stopGadgetMonitor},
+ {"nativeWaitAndGetProperty", "(Ljava/lang/String;)Ljava/lang/String;",
+ (void *)android_server_UsbDeviceManager_waitAndGetProperty},
};
-int register_android_server_UsbDeviceManager(JNIEnv *env)
-{
+int register_android_server_UsbDeviceManager(JavaVM *vm, JNIEnv *env) {
+ gvm = vm;
+
jclass clazz = env->FindClass("com/android/server/usb/UsbDeviceManager");
if (clazz == NULL) {
ALOGE("Can't find com/android/server/usb/UsbDeviceManager");
return -1;
}
+ gUpdateGadgetStateMethod =
+ GetMethodIDOrDie(env, clazz, "updateGadgetState", "(Ljava/lang/String;)V");
+
clazz = env->FindClass("android/os/ParcelFileDescriptor");
LOG_FATAL_IF(clazz == NULL, "Unable to find class android.os.ParcelFileDescriptor");
gParcelFileDescriptorOffsets.mClass = (jclass) env->NewGlobalRef(clazz);
@@ -163,5 +343,4 @@ int register_android_server_UsbDeviceManager(JNIEnv *env)
return jniRegisterNativeMethods(env, "com/android/server/usb/UsbDeviceManager",
method_table, NELEM(method_table));
}
-
};
diff --git a/services/core/jni/com_android_server_companion_virtual_InputController.cpp b/services/core/jni/com_android_server_companion_virtual_InputController.cpp
index a32b0f1526cd..9ec5ae5a8e51 100644
--- a/services/core/jni/com_android_server_companion_virtual_InputController.cpp
+++ b/services/core/jni/com_android_server_companion_virtual_InputController.cpp
@@ -125,6 +125,9 @@ static unique_fd openUinput(const char* readableName, jint vendorId, jint produc
case DeviceType::ROTARY_ENCODER:
ioctl(fd, UI_SET_EVBIT, EV_REL);
ioctl(fd, UI_SET_RELBIT, REL_WHEEL);
+ if (vd_flags::high_resolution_scroll()) {
+ ioctl(fd, UI_SET_RELBIT, REL_WHEEL_HI_RES);
+ }
break;
default:
ALOGE("Invalid input device type %d", static_cast<int32_t>(deviceType));
diff --git a/services/core/jni/com_android_server_input_InputManagerService.cpp b/services/core/jni/com_android_server_input_InputManagerService.cpp
index 1f0c827083ac..4d6a90c81b27 100644
--- a/services/core/jni/com_android_server_input_InputManagerService.cpp
+++ b/services/core/jni/com_android_server_input_InputManagerService.cpp
@@ -104,7 +104,6 @@ static const char* VELOCITYTRACKER_STRATEGY = "velocitytracker_strategy";
static struct {
jclass clazz;
- jmethodID notifyConfigurationChanged;
jmethodID notifyInputDevicesChanged;
jmethodID notifySwitch;
jmethodID notifyInputChannelBroken;
@@ -331,7 +330,6 @@ public:
void notifySwitch(nsecs_t when, uint32_t switchValues, uint32_t switchMask,
uint32_t policyFlags) override;
- void notifyConfigurationChanged(nsecs_t when) override;
// ANR-related callbacks -- start
void notifyNoFocusedWindowAnr(const std::shared_ptr<InputApplicationHandle>& handle) override;
void notifyWindowUnresponsive(const sp<IBinder>& token, std::optional<gui::Pid> pid,
@@ -382,6 +380,7 @@ public:
PointerControllerInterface::ControllerType type) override;
void notifyPointerDisplayIdChanged(ui::LogicalDisplayId displayId,
const FloatPoint& position) override;
+ void notifyMouseCursorFadedOnTyping() override;
/* --- InputFilterPolicyInterface implementation --- */
void notifyStickyModifierStateChanged(uint32_t modifierState,
@@ -788,6 +787,10 @@ void NativeInputManager::notifyPointerDisplayIdChanged(ui::LogicalDisplayId poin
InputReaderConfiguration::Change::DISPLAY_INFO);
}
+void NativeInputManager::notifyMouseCursorFadedOnTyping() {
+ mInputManager->getReader().notifyMouseCursorFadedOnTyping();
+}
+
void NativeInputManager::notifyStickyModifierStateChanged(uint32_t modifierState,
uint32_t lockedModifierState) {
JNIEnv* env = jniEnv();
@@ -935,18 +938,6 @@ void NativeInputManager::notifySwitch(nsecs_t when,
checkAndClearExceptionFromCallback(env, "notifySwitch");
}
-void NativeInputManager::notifyConfigurationChanged(nsecs_t when) {
-#if DEBUG_INPUT_DISPATCHER_POLICY
- ALOGD("notifyConfigurationChanged - when=%lld", when);
-#endif
- ATRACE_CALL();
-
- JNIEnv* env = jniEnv();
-
- env->CallVoidMethod(mServiceObj, gServiceClassInfo.notifyConfigurationChanged, when);
- checkAndClearExceptionFromCallback(env, "notifyConfigurationChanged");
-}
-
static jobject getInputApplicationHandleObjLocalRef(
JNIEnv* env, const std::shared_ptr<InputApplicationHandle>& inputApplicationHandle) {
if (inputApplicationHandle == nullptr) {
@@ -1847,10 +1838,6 @@ static void handleInputChannelDisposed(JNIEnv* env, jobject /* inputChannelObj *
const std::shared_ptr<InputChannel>& inputChannel,
void* data) {
NativeInputManager* im = static_cast<NativeInputManager*>(data);
-
- ALOGW("Input channel object '%s' was disposed without first being removed with "
- "the input manager!",
- inputChannel->getName().c_str());
im->removeInputChannel(inputChannel->getConnectionToken());
}
@@ -2872,9 +2859,6 @@ int register_android_server_InputManager(JNIEnv* env) {
FIND_CLASS(clazz, "com/android/server/input/InputManagerService");
gServiceClassInfo.clazz = reinterpret_cast<jclass>(env->NewGlobalRef(clazz));
- GET_METHOD_ID(gServiceClassInfo.notifyConfigurationChanged, clazz,
- "notifyConfigurationChanged", "(J)V");
-
GET_METHOD_ID(gServiceClassInfo.notifyInputDevicesChanged, clazz,
"notifyInputDevicesChanged", "([Landroid/view/InputDevice;)V");
diff --git a/services/core/jni/onload.cpp b/services/core/jni/onload.cpp
index 6464081d615a..314ff9d3c808 100644
--- a/services/core/jni/onload.cpp
+++ b/services/core/jni/onload.cpp
@@ -37,7 +37,7 @@ int register_android_server_SerialService(JNIEnv* env);
int register_android_server_SystemServer(JNIEnv* env);
int register_android_server_UsbAlsaJackDetector(JNIEnv* env);
int register_android_server_UsbAlsaMidiDevice(JNIEnv* env);
-int register_android_server_UsbDeviceManager(JNIEnv* env);
+int register_android_server_UsbDeviceManager(JavaVM* vm, JNIEnv* env);
int register_android_server_UsbHostManager(JNIEnv* env);
int register_android_server_vr_VrManagerService(JNIEnv* env);
int register_android_server_vibrator_VibratorController(JavaVM* vm, JNIEnv* env);
@@ -96,7 +96,7 @@ extern "C" jint JNI_OnLoad(JavaVM* vm, void* /* reserved */)
register_android_server_SerialService(env);
register_android_server_InputManager(env);
register_android_server_LightsService(env);
- register_android_server_UsbDeviceManager(env);
+ register_android_server_UsbDeviceManager(vm, env);
register_android_server_UsbAlsaJackDetector(env);
register_android_server_UsbAlsaMidiDevice(env);
register_android_server_UsbHostManager(env);
diff --git a/services/core/xsd/display-device-config/display-device-config.xsd b/services/core/xsd/display-device-config/display-device-config.xsd
index eeb8b9b0b469..4231149336ec 100644
--- a/services/core/xsd/display-device-config/display-device-config.xsd
+++ b/services/core/xsd/display-device-config/display-device-config.xsd
@@ -179,6 +179,19 @@
<xs:element name="supportsVrr" type="xs:boolean" minOccurs="0">
<xs:annotation name="final"/>
</xs:element>
+ <!-- Table that translates doze brightness sensor values to brightness values in
+ the float scale [0, 1]; -1 means the current brightness should be kept.
+ The following formula should be used for conversion between nits and the float
+ scale: float = (nits - minNits) / (maxNits - minNits). minNits and maxNits are
+ defined in screenBrightnessMap. -->
+ <xs:element type="float-array" name="dozeBrightnessSensorValueToBrightness">
+ <xs:annotation name="final"/>
+ </xs:element>
+ <!-- The default screen brightness in the scale [0, 1] to use while the device is
+ dozing. -->
+ <xs:element type="nonNegativeDecimal" name="defaultDozeBrightness">
+ <xs:annotation name="final"/>
+ </xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
@@ -315,6 +328,42 @@
<xs:element name="screenBrightnessRampDecrease" type="nonNegativeDecimal">
<xs:annotation name="final"/>
</xs:element>
+
+ <!-- The minimum HDR layer % at which hdr boost will be applied with transition point cap.
+ Should be lower or equal to minimumHdrPercentOfScreenForHbm. -->
+ <xs:element name="minimumHdrPercentOfScreenForNbm" type="nonNegativeDecimal"
+ minOccurs="0" maxOccurs="1">
+ <xs:annotation name="nullable"/>
+ <xs:annotation name="final"/>
+ </xs:element>
+ <!-- The minimum HDR layer size at which hdr boost will be applied. -->
+ <xs:element name="minimumHdrPercentOfScreenForHbm" type="nonNegativeDecimal"
+ minOccurs="0" maxOccurs="1">
+ <xs:annotation name="nullable"/>
+ <xs:annotation name="final"/>
+ </xs:element>
+ <!-- If hdr boost is allowed in low power mode. -->
+ <xs:element name="allowInLowPowerMode" type="xs:boolean" minOccurs="0" maxOccurs="1">
+ <xs:annotation name="nonnull"/>
+ <xs:annotation name="final"/>
+ </xs:element>
+ <!-- sdrNits, hdrRatio This LUT specifies how to boost HDR brightness at given SDR brightness (nits). -->
+ <!-- sdr brightness to hdr boost ratio map
+ Format: first = sdrNits, second = hdrRatio. E.g. :
+ <sdrHdrRatioMap>
+ <point>
+ <first>2.0</first> // sdrNits
+ <second>4.0</second> // hdrRatio
+ </point>
+ ....
+ </sdrHdrRatioMap>
+ -->
+ <xs:element type="nonNegativeFloatToFloatMap" name="sdrHdrRatioMap" minOccurs="0" maxOccurs="1">
+ <xs:annotation name="nullable"/>
+ <xs:annotation name="final"/>
+ </xs:element>
+
+
</xs:complexType>
<!-- Maps to PowerManager.THERMAL_STATUS_* values. -->
@@ -823,6 +872,12 @@
</xs:sequence>
</xs:complexType>
+ <xs:complexType name="float-array">
+ <xs:sequence>
+ <xs:element name="item" type="nonNegativeDecimal" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+
<xs:complexType name="usiVersion">
<xs:element name="majorVersion" type="xs:nonNegativeInteger"
minOccurs="1" maxOccurs="1">
diff --git a/services/core/xsd/display-device-config/schema/current.txt b/services/core/xsd/display-device-config/schema/current.txt
index 757b23a2df7e..cec2787ca51f 100644
--- a/services/core/xsd/display-device-config/schema/current.txt
+++ b/services/core/xsd/display-device-config/schema/current.txt
@@ -125,9 +125,11 @@ package com.android.server.display.config {
method public final java.math.BigInteger getAmbientLightHorizonLong();
method public final java.math.BigInteger getAmbientLightHorizonShort();
method public com.android.server.display.config.AutoBrightness getAutoBrightness();
+ method public final java.math.BigDecimal getDefaultDozeBrightness();
method @Nullable public final com.android.server.display.config.DensityMapping getDensityMapping();
method @NonNull public final com.android.server.display.config.Thresholds getDisplayBrightnessChangeThresholds();
method public final com.android.server.display.config.Thresholds getDisplayBrightnessChangeThresholdsIdle();
+ method public final com.android.server.display.config.FloatArray getDozeBrightnessSensorValueToBrightness();
method public final com.android.server.display.config.EvenDimmerMode getEvenDimmer();
method @Nullable public final com.android.server.display.config.HdrBrightnessConfig getHdrBrightnessConfig();
method public com.android.server.display.config.HighBrightnessMode getHighBrightnessMode();
@@ -163,9 +165,11 @@ package com.android.server.display.config {
method public final void setAmbientLightHorizonLong(java.math.BigInteger);
method public final void setAmbientLightHorizonShort(java.math.BigInteger);
method public void setAutoBrightness(com.android.server.display.config.AutoBrightness);
+ method public final void setDefaultDozeBrightness(java.math.BigDecimal);
method public final void setDensityMapping(@Nullable com.android.server.display.config.DensityMapping);
method public final void setDisplayBrightnessChangeThresholds(@NonNull com.android.server.display.config.Thresholds);
method public final void setDisplayBrightnessChangeThresholdsIdle(com.android.server.display.config.Thresholds);
+ method public final void setDozeBrightnessSensorValueToBrightness(com.android.server.display.config.FloatArray);
method public final void setEvenDimmer(com.android.server.display.config.EvenDimmerMode);
method public final void setHdrBrightnessConfig(@Nullable com.android.server.display.config.HdrBrightnessConfig);
method public void setHighBrightnessMode(com.android.server.display.config.HighBrightnessMode);
@@ -214,6 +218,11 @@ package com.android.server.display.config {
method public void setTransitionPoint(java.math.BigDecimal);
}
+ public class FloatArray {
+ ctor public FloatArray();
+ method public java.util.List<java.math.BigDecimal> getItem();
+ }
+
public class HbmTiming {
ctor public HbmTiming();
method @NonNull public final java.math.BigInteger getTimeMaxSecs_all();
@@ -226,16 +235,24 @@ package com.android.server.display.config {
public class HdrBrightnessConfig {
ctor public HdrBrightnessConfig();
+ method @NonNull public final boolean getAllowInLowPowerMode();
method public final java.math.BigInteger getBrightnessDecreaseDebounceMillis();
method public final java.math.BigInteger getBrightnessIncreaseDebounceMillis();
method @NonNull public final com.android.server.display.config.NonNegativeFloatToFloatMap getBrightnessMap();
+ method @Nullable public final java.math.BigDecimal getMinimumHdrPercentOfScreenForHbm();
+ method @Nullable public final java.math.BigDecimal getMinimumHdrPercentOfScreenForNbm();
method public final java.math.BigDecimal getScreenBrightnessRampDecrease();
method public final java.math.BigDecimal getScreenBrightnessRampIncrease();
+ method @Nullable public final com.android.server.display.config.NonNegativeFloatToFloatMap getSdrHdrRatioMap();
+ method public final void setAllowInLowPowerMode(@NonNull boolean);
method public final void setBrightnessDecreaseDebounceMillis(java.math.BigInteger);
method public final void setBrightnessIncreaseDebounceMillis(java.math.BigInteger);
method public final void setBrightnessMap(@NonNull com.android.server.display.config.NonNegativeFloatToFloatMap);
+ method public final void setMinimumHdrPercentOfScreenForHbm(@Nullable java.math.BigDecimal);
+ method public final void setMinimumHdrPercentOfScreenForNbm(@Nullable java.math.BigDecimal);
method public final void setScreenBrightnessRampDecrease(java.math.BigDecimal);
method public final void setScreenBrightnessRampIncrease(java.math.BigDecimal);
+ method public final void setSdrHdrRatioMap(@Nullable com.android.server.display.config.NonNegativeFloatToFloatMap);
}
public class HighBrightnessMode {
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/ActiveAdmin.java b/services/devicepolicy/java/com/android/server/devicepolicy/ActiveAdmin.java
index dc8cec91001b..6a0dd5a04f82 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/ActiveAdmin.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/ActiveAdmin.java
@@ -182,6 +182,7 @@ class ActiveAdmin {
private static final String TAG_CREDENTIAL_MANAGER_POLICY = "credential-manager-policy";
private static final String TAG_DIALER_PACKAGE = "dialer_package";
private static final String TAG_SMS_PACKAGE = "sms_package";
+ private static final String TAG_PROVISIONING_CONTEXT = "provisioning-context";
// If the ActiveAdmin is a permission-based admin, then info will be null because the
// permission-based admin is not mapped to a device administrator component.
@@ -359,6 +360,8 @@ class ActiveAdmin {
int mWifiMinimumSecurityLevel = DevicePolicyManager.WIFI_SECURITY_OPEN;
String mDialerPackage;
String mSmsPackage;
+ private String mProvisioningContext;
+ private static final int PROVISIONING_CONTEXT_LENGTH_LIMIT = 1000;
ActiveAdmin(DeviceAdminInfo info, boolean isParent) {
this.userId = -1;
@@ -404,6 +407,23 @@ class ActiveAdmin {
return UserHandle.of(UserHandle.getUserId(info.getActivityInfo().applicationInfo.uid));
}
+ /**
+ * Stores metadata about context of setting an active admin
+ * @param provisioningContext some metadata, for example test method name
+ */
+ public void setProvisioningContext(@Nullable String provisioningContext) {
+ if (Flags.provisioningContextParameter()
+ && !TextUtils.isEmpty(provisioningContext)
+ && !provisioningContext.isBlank()) {
+ if (provisioningContext.length() > PROVISIONING_CONTEXT_LENGTH_LIMIT) {
+ mProvisioningContext = provisioningContext.substring(
+ 0, PROVISIONING_CONTEXT_LENGTH_LIMIT);
+ } else {
+ mProvisioningContext = provisioningContext;
+ }
+ }
+ }
+
void writeToXml(TypedXmlSerializer out)
throws IllegalArgumentException, IllegalStateException, IOException {
if (info != null) {
@@ -694,6 +714,12 @@ class ActiveAdmin {
if (!TextUtils.isEmpty(mSmsPackage)) {
writeAttributeValueToXml(out, TAG_SMS_PACKAGE, mSmsPackage);
}
+
+ if (Flags.provisioningContextParameter() && !TextUtils.isEmpty(mProvisioningContext)) {
+ out.startTag(null, TAG_PROVISIONING_CONTEXT);
+ out.attribute(null, ATTR_VALUE, mProvisioningContext);
+ out.endTag(null, TAG_PROVISIONING_CONTEXT);
+ }
}
private void writePackagePolicy(TypedXmlSerializer out, String tag,
@@ -1006,6 +1032,9 @@ class ActiveAdmin {
mDialerPackage = parser.getAttributeValue(null, ATTR_VALUE);
} else if (TAG_SMS_PACKAGE.equals(tag)) {
mSmsPackage = parser.getAttributeValue(null, ATTR_VALUE);
+ } else if (Flags.provisioningContextParameter()
+ && TAG_PROVISIONING_CONTEXT.equals(tag)) {
+ mProvisioningContext = parser.getAttributeValue(null, ATTR_VALUE);
} else {
Slogf.w(LOG_TAG, "Unknown admin tag: %s", tag);
XmlUtils.skipCurrentTag(parser);
@@ -1496,5 +1525,10 @@ class ActiveAdmin {
pw.println(mDialerPackage);
pw.print("mSmsPackage=");
pw.println(mSmsPackage);
+
+ if (Flags.provisioningContextParameter()) {
+ pw.print("mProvisioningContext=");
+ pw.println(mProvisioningContext);
+ }
}
}
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
index e122fe039c45..7cb8ace697ec 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -1131,9 +1131,9 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
}
@Override
- public void onUserUnlocked(@NonNull TargetUser user) {
- if (user.isPreCreated()) return;
- mService.handleOnUserUnlocked(user.getUserIdentifier());
+ public void onUserSwitching(@NonNull TargetUser from, @NonNull TargetUser to) {
+ if (to.isPreCreated()) return;
+ mService.handleOnUserSwitching(from.getUserIdentifier(), to.getUserIdentifier());
}
}
@@ -1378,7 +1378,10 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
// Clear always-on configuration if it wasn't set by the admin.
if (adminConfiguredVpnPkg == null) {
- mInjector.getVpnManager().setAlwaysOnVpnPackageForUser(userId, null, false, null);
+ VpnManager vpnManager = mInjector.getVpnManager();
+ if (vpnManager != null) {
+ vpnManager.setAlwaysOnVpnPackageForUser(userId, null, false, null);
+ }
}
// Clear app authorizations to establish VPNs. When DISALLOW_CONFIG_VPN is enforced apps
@@ -1789,6 +1792,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
return mContext.getSystemService(ConnectivityManager.class);
}
+ @Nullable
VpnManager getVpnManager() {
return mContext.getSystemService(VpnManager.class);
}
@@ -3831,8 +3835,8 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
mDevicePolicyEngine.handleUnlockUser(userId);
}
- void handleOnUserUnlocked(int userId) {
- showNewUserDisclaimerIfNecessary(userId);
+ void handleOnUserSwitching(int fromUserId, int toUserId) {
+ showNewUserDisclaimerIfNecessary(toUserId);
}
void handleStopUser(int userId) {
@@ -3943,10 +3947,16 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
/**
* @param adminReceiver The admin to add
* @param refreshing true = update an active admin, no error
+ * @param userHandle which user this admin will be set on
+ * @param provisioningContext additional information for debugging
*/
@Override
public void setActiveAdmin(
- ComponentName adminReceiver, boolean refreshing, int userHandle) {
+ ComponentName adminReceiver,
+ boolean refreshing,
+ int userHandle,
+ @Nullable String provisioningContext
+ ) {
if (!mHasFeature) {
return;
}
@@ -3972,6 +3982,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
newAdmin.testOnlyAdmin =
(existingAdmin != null) ? existingAdmin.testOnlyAdmin
: isPackageTestOnly(adminReceiver.getPackageName(), userHandle);
+ newAdmin.setProvisioningContext(provisioningContext);
policy.mAdminMap.put(adminReceiver, newAdmin);
int replaceIndex = -1;
final int N = policy.mAdminList.size();
@@ -7697,8 +7708,10 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
}
}
// If some package is uninstalled after the check above, it will be ignored by CM.
- if (!mInjector.getVpnManager().setAlwaysOnVpnPackageForUser(
- userId, vpnPackage, lockdown, lockdownAllowlist)) {
+ VpnManager vpnManager = mInjector.getVpnManager();
+ if (vpnManager == null
+ || !mInjector.getVpnManager().setAlwaysOnVpnPackageForUser(
+ userId, vpnPackage, lockdown, lockdownAllowlist)) {
throw new UnsupportedOperationException();
}
});
@@ -7746,8 +7759,12 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
Preconditions.checkCallAuthorization(
isDefaultDeviceOwner(caller) || isProfileOwner(caller));
+ VpnManager vpnManager = mInjector.getVpnManager();
+ if (vpnManager == null) {
+ return null;
+ }
return mInjector.binderWithCleanCallingIdentity(
- () -> mInjector.getVpnManager().getAlwaysOnVpnPackageForUser(caller.getUserId()));
+ () -> vpnManager.getAlwaysOnVpnPackageForUser(caller.getUserId()));
}
@Override
@@ -7774,8 +7791,12 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
isDefaultDeviceOwner(caller) || isProfileOwner(caller));
}
+ VpnManager vpnManager = mInjector.getVpnManager();
+ if (vpnManager == null) {
+ return false;
+ }
return mInjector.binderWithCleanCallingIdentity(
- () -> mInjector.getVpnManager().isVpnLockdownEnabled(caller.getUserId()));
+ () -> vpnManager.isVpnLockdownEnabled(caller.getUserId()));
}
@Override
@@ -7797,8 +7818,12 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
Preconditions.checkCallAuthorization(
isDefaultDeviceOwner(caller) || isProfileOwner(caller));
+ VpnManager vpnManager = mInjector.getVpnManager();
+ if (vpnManager == null) {
+ return null;
+ }
return mInjector.binderWithCleanCallingIdentity(
- () -> mInjector.getVpnManager().getVpnLockdownAllowlist(caller.getUserId()));
+ () -> vpnManager.getVpnLockdownAllowlist(caller.getUserId()));
}
private void forceWipeDeviceNoLock(boolean wipeExtRequested, String reason, boolean wipeEuicc,
@@ -12830,7 +12855,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
});
// Set admin.
- setActiveAdmin(profileOwner, /* refreshing= */ true, userId);
+ setActiveAdmin(profileOwner, /* refreshing= */ true, userId, null);
setProfileOwner(profileOwner, userId);
synchronized (getLockObject()) {
@@ -21883,7 +21908,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
@UserIdInt int userId, @UserIdInt int callingUserId, ComponentName adminComponent) {
final String adminPackage = adminComponent.getPackageName();
enablePackage(adminPackage, callingUserId);
- setActiveAdmin(adminComponent, /* refreshing= */ true, userId);
+ setActiveAdmin(adminComponent, /* refreshing= */ true, userId, null);
}
private void enablePackage(String packageName, @UserIdInt int userId) {
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerServiceShellCommand.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerServiceShellCommand.java
index eb893fcfee1f..0cd5b47b75c0 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerServiceShellCommand.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerServiceShellCommand.java
@@ -17,6 +17,7 @@ package com.android.server.devicepolicy;
import android.app.ActivityManager;
import android.app.admin.DevicePolicyManager;
+import android.app.admin.flags.Flags;
import android.content.ComponentName;
import android.os.ShellCommand;
import android.os.SystemClock;
@@ -46,11 +47,13 @@ final class DevicePolicyManagerServiceShellCommand extends ShellCommand {
private static final String USER_OPTION = "--user";
private static final String DO_ONLY_OPTION = "--device-owner-only";
+ private static final String PROVISIONING_CONTEXT_OPTION = "--provisioning-context";
private final DevicePolicyManagerService mService;
private int mUserId = UserHandle.USER_SYSTEM;
private ComponentName mComponent;
private boolean mSetDoOnly;
+ private String mProvisioningContext = null;
DevicePolicyManagerServiceShellCommand(DevicePolicyManagerService service) {
mService = Objects.requireNonNull(service);
@@ -127,15 +130,28 @@ final class DevicePolicyManagerServiceShellCommand extends ShellCommand {
pw.printf(" Lists the device / profile owners per user \n\n");
pw.printf(" %s\n", CMD_LIST_POLICY_EXEMPT_APPS);
pw.printf(" Lists the apps that are exempt from policies\n\n");
- pw.printf(" %s [ %s <USER_ID> | current ] <COMPONENT>\n",
- CMD_SET_ACTIVE_ADMIN, USER_OPTION);
- pw.printf(" Sets the given component as active admin for an existing user.\n\n");
- pw.printf(" %s [ %s <USER_ID> | current *EXPERIMENTAL* ] [ %s ]"
- + "<COMPONENT>\n", CMD_SET_DEVICE_OWNER, USER_OPTION, DO_ONLY_OPTION);
- pw.printf(" Sets the given component as active admin, and its package as device owner."
- + "\n\n");
- pw.printf(" %s [ %s <USER_ID> | current ] <COMPONENT>\n",
- CMD_SET_PROFILE_OWNER, USER_OPTION);
+ if (Flags.provisioningContextParameter()) {
+ pw.printf(" %s [ %s <USER_ID> | current ] [ %s <PROVISIONING_CONTEXT>] <COMPONENT>\n",
+ CMD_SET_ACTIVE_ADMIN, USER_OPTION, PROVISIONING_CONTEXT_OPTION);
+ pw.printf(" Sets the given component as active admin for an existing user.\n\n");
+ pw.printf(" %s [ %s <USER_ID> | current *EXPERIMENTAL* ] [ %s ]"
+ + " [ %s <PROVISIONING_CONTEXT>] <COMPONENT>\n",
+ CMD_SET_DEVICE_OWNER, USER_OPTION, DO_ONLY_OPTION, PROVISIONING_CONTEXT_OPTION);
+ pw.printf(" Sets the given component as active admin, and its package as device"
+ + " owner.\n\n");
+ pw.printf(" %s [ %s <USER_ID> | current ] [ %s <PROVISIONING_CONTEXT>] <COMPONENT>\n",
+ CMD_SET_PROFILE_OWNER, USER_OPTION, PROVISIONING_CONTEXT_OPTION);
+ } else {
+ pw.printf(" %s [ %s <USER_ID> | current ] <COMPONENT>\n",
+ CMD_SET_ACTIVE_ADMIN, USER_OPTION);
+ pw.printf(" Sets the given component as active admin for an existing user.\n\n");
+ pw.printf(" %s [ %s <USER_ID> | current *EXPERIMENTAL* ] [ %s ]"
+ + "<COMPONENT>\n", CMD_SET_DEVICE_OWNER, USER_OPTION, DO_ONLY_OPTION);
+ pw.printf(" Sets the given component as active admin, and its package as device"
+ + " owner.\n\n");
+ pw.printf(" %s [ %s <USER_ID> | current ] <COMPONENT>\n",
+ CMD_SET_PROFILE_OWNER, USER_OPTION);
+ }
pw.printf(" Sets the given component as active admin and profile owner for an existing "
+ "user.\n\n");
pw.printf(" %s [ %s <USER_ID> | current ] <COMPONENT>\n",
@@ -243,7 +259,7 @@ final class DevicePolicyManagerServiceShellCommand extends ShellCommand {
private int runSetActiveAdmin(PrintWriter pw) {
parseArgs();
- mService.setActiveAdmin(mComponent, /* refreshing= */ true, mUserId);
+ mService.setActiveAdmin(mComponent, /* refreshing= */ true, mUserId, mProvisioningContext);
pw.printf("Success: Active admin set to component %s\n", mComponent.flattenToShortString());
return 0;
@@ -253,7 +269,12 @@ final class DevicePolicyManagerServiceShellCommand extends ShellCommand {
parseArgs();
boolean isAdminAdded = false;
try {
- mService.setActiveAdmin(mComponent, /* refreshing= */ false, mUserId);
+ mService.setActiveAdmin(
+ mComponent,
+ /* refreshing= */ false,
+ mUserId,
+ mProvisioningContext
+ );
isAdminAdded = true;
} catch (IllegalArgumentException e) {
pw.printf("%s was already an admin for user %d. No need to set it again.\n",
@@ -291,7 +312,7 @@ final class DevicePolicyManagerServiceShellCommand extends ShellCommand {
private int runSetProfileOwner(PrintWriter pw) {
parseArgs();
- mService.setActiveAdmin(mComponent, /* refreshing= */ true, mUserId);
+ mService.setActiveAdmin(mComponent, /* refreshing= */ true, mUserId, mProvisioningContext);
try {
if (!mService.setProfileOwner(mComponent, mUserId)) {
@@ -363,6 +384,8 @@ final class DevicePolicyManagerServiceShellCommand extends ShellCommand {
}
} else if (DO_ONLY_OPTION.equals(opt)) {
mSetDoOnly = true;
+ } else if (PROVISIONING_CONTEXT_OPTION.equals(opt)) {
+ mProvisioningContext = getNextArgRequired();
} else {
throw new IllegalArgumentException("Unknown option: " + opt);
}
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/EnterpriseSpecificIdCalculator.java b/services/devicepolicy/java/com/android/server/devicepolicy/EnterpriseSpecificIdCalculator.java
index cbd28475bc26..6e038f9b67a0 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/EnterpriseSpecificIdCalculator.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/EnterpriseSpecificIdCalculator.java
@@ -17,6 +17,7 @@
package com.android.server.devicepolicy;
import android.content.Context;
+import android.content.pm.PackageManager;
import android.content.pm.VerifierDeviceIdentity;
import android.net.wifi.WifiManager;
import android.os.Build;
@@ -77,13 +78,14 @@ class EnterpriseSpecificIdCalculator {
mMeid = meid;
mSerialNumber = Build.getSerial();
WifiManager wifiManager = context.getSystemService(WifiManager.class);
- Preconditions.checkState(wifiManager != null, "Unable to access WiFi service");
- final String[] macAddresses = wifiManager.getFactoryMacAddresses();
- if (macAddresses == null || macAddresses.length == 0) {
- mMacAddress = "";
- } else {
- mMacAddress = macAddresses[0];
+ String macAddress = "";
+ if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_WIFI)) {
+ final String[] macAddresses = wifiManager.getFactoryMacAddresses();
+ if (macAddresses != null && macAddresses.length > 0) {
+ macAddress = macAddresses[0];
+ }
}
+ mMacAddress = macAddress;
}
private static String getPaddedTruncatedString(String input, int maxLength) {
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 791d030a6b63..9e8811f419a2 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -153,6 +153,7 @@ import com.android.server.contentsuggestions.ContentSuggestionsManagerService;
import com.android.server.contextualsearch.ContextualSearchManagerService;
import com.android.server.coverage.CoverageService;
import com.android.server.cpu.CpuMonitorService;
+import com.android.server.crashrecovery.CrashRecoveryModule;
import com.android.server.credentials.CredentialManagerService;
import com.android.server.criticalevents.CriticalEventLog;
import com.android.server.devicepolicy.DevicePolicyManagerService;
@@ -382,6 +383,7 @@ public final class SystemServer implements Dumpable {
private static final String UPDATABLE_DEVICE_CONFIG_SERVICE_CLASS =
"com.android.server.deviceconfig.DeviceConfigInit$Lifecycle";
+
/*
* Implementation class names and jar locations for services in
* {@code STANDALONE_SYSTEMSERVER_JARS}.
@@ -1196,15 +1198,18 @@ public final class SystemServer implements Dumpable {
mSystemServiceManager.startService(RecoverySystemService.Lifecycle.class);
t.traceEnd();
- // Initialize RescueParty.
- RescueParty.registerHealthObserver(mSystemContext);
- if (!Flags.recoverabilityDetection()) {
- // Now that we have the bare essentials of the OS up and running, take
- // note that we just booted, which might send out a rescue party if
- // we're stuck in a runtime restart loop.
- PackageWatchdog.getInstance(mSystemContext).noteBoot();
+ if (!Flags.refactorCrashrecovery()) {
+ // Initialize RescueParty.
+ RescueParty.registerHealthObserver(mSystemContext);
+ if (!Flags.recoverabilityDetection()) {
+ // Now that we have the bare essentials of the OS up and running, take
+ // note that we just booted, which might send out a rescue party if
+ // we're stuck in a runtime restart loop.
+ PackageWatchdog.getInstance(mSystemContext).noteBoot();
+ }
}
+
// Manages LEDs and display backlight so we need it to bring up the display.
t.traceBegin("StartLightsService");
mSystemServiceManager.startService(LightsService.class);
@@ -2445,11 +2450,11 @@ public final class SystemServer implements Dumpable {
t.traceEnd();
}
- t.traceBegin("CertBlacklister");
+ t.traceBegin("CertBlocklister");
try {
- CertBlacklister blacklister = new CertBlacklister(context);
+ CertBlocklister blocklister = new CertBlocklister(context);
} catch (Throwable e) {
- reportWtf("starting CertBlacklister", e);
+ reportWtf("starting CertBlocklister", e);
}
t.traceEnd();
@@ -2931,12 +2936,18 @@ public final class SystemServer implements Dumpable {
mPackageManagerService.systemReady();
t.traceEnd();
- if (Flags.recoverabilityDetection()) {
- // Now that we have the essential services needed for mitigations, register the boot
- // with package watchdog.
- // Note that we just booted, which might send out a rescue party if we're stuck in a
- // runtime restart loop.
- PackageWatchdog.getInstance(mSystemContext).noteBoot();
+ if (Flags.refactorCrashrecovery()) {
+ t.traceBegin("StartCrashRecoveryModule");
+ mSystemServiceManager.startService(CrashRecoveryModule.Lifecycle.class);
+ t.traceEnd();
+ } else {
+ if (Flags.recoverabilityDetection()) {
+ // Now that we have the essential services needed for mitigations, register the boot
+ // with package watchdog.
+ // Note that we just booted, which might send out a rescue party if we're stuck in a
+ // runtime restart loop.
+ PackageWatchdog.getInstance(mSystemContext).noteBoot();
+ }
}
t.traceBegin("MakeDisplayManagerServiceReady");
diff --git a/services/manifest_services.xml b/services/manifest_services.xml
index 8ff1a7dfa37b..114fe324f016 100644
--- a/services/manifest_services.xml
+++ b/services/manifest_services.xml
@@ -4,9 +4,4 @@
<version>2</version>
<fqname>IAltitudeService/default</fqname>
</hal>
- <hal format="aidl">
- <name>android.frameworks.vibrator</name>
- <version>1</version>
- <fqname>IVibratorControlService/default</fqname>
- </hal>
</manifest>
diff --git a/services/manifest_services_android.frameworks.vibrator.xml b/services/manifest_services_android.frameworks.vibrator.xml
new file mode 100644
index 000000000000..c287643e8697
--- /dev/null
+++ b/services/manifest_services_android.frameworks.vibrator.xml
@@ -0,0 +1,7 @@
+<manifest version="1.0" type="framework">
+ <hal format="aidl">
+ <name>android.frameworks.vibrator</name>
+ <version>1</version>
+ <fqname>IVibratorControlService/default</fqname>
+ </hal>
+</manifest>
diff --git a/services/net/Android.bp b/services/net/Android.bp
index 3d40f6445834..927146db0a24 100644
--- a/services/net/Android.bp
+++ b/services/net/Android.bp
@@ -21,6 +21,7 @@ java_library_static {
":services.net-sources",
],
static_libs: [
+ "modules-utils-build_system",
"netd-client",
"networkstack-client",
"net-utils-services-common",
diff --git a/services/permission/java/com/android/server/permission/access/util/AtomicFileExtensions.kt b/services/permission/java/com/android/server/permission/access/util/AtomicFileExtensions.kt
index 6b20ef1d5519..95ee958f3ce4 100644
--- a/services/permission/java/com/android/server/permission/access/util/AtomicFileExtensions.kt
+++ b/services/permission/java/com/android/server/permission/access/util/AtomicFileExtensions.kt
@@ -19,6 +19,7 @@ package com.android.server.permission.access.util
import android.os.FileUtils
import android.util.AtomicFile
import android.util.Slog
+import com.android.server.security.FileIntegrity;
import java.io.File
import java.io.FileInputStream
import java.io.FileNotFoundException
@@ -47,9 +48,9 @@ inline fun AtomicFile.readWithReserveCopy(block: (FileInputStream) -> Unit) {
/** Write to actual file and reserve file. */
@Throws(IOException::class)
inline fun AtomicFile.writeWithReserveCopy(block: (FileOutputStream) -> Unit) {
+ writeInlined(block)
val reserveFile = File(baseFile.parentFile, baseFile.name + ".reservecopy")
reserveFile.delete()
- writeInlined(block)
try {
FileInputStream(baseFile).use { inputStream ->
FileOutputStream(reserveFile).use { outputStream ->
@@ -60,6 +61,12 @@ inline fun AtomicFile.writeWithReserveCopy(block: (FileOutputStream) -> Unit) {
} catch (e: Exception) {
Slog.e("AccessPersistence", "Failed to write $reserveFile", e)
}
+ try {
+ FileIntegrity.setUpFsVerity(baseFile)
+ FileIntegrity.setUpFsVerity(reserveFile)
+ } catch (e: Exception) {
+ Slog.e("AccessPersistence", "Failed to verity-protect runtime-permissions", e)
+ }
}
/** Write to an [AtomicFile] and close everything safely when done. */
diff --git a/services/profcollect/src/com/android/server/profcollect/ProfcollectForwardingService.java b/services/profcollect/src/com/android/server/profcollect/ProfcollectForwardingService.java
index c76bcf804ee4..acdbbdee7d67 100644
--- a/services/profcollect/src/com/android/server/profcollect/ProfcollectForwardingService.java
+++ b/services/profcollect/src/com/android/server/profcollect/ProfcollectForwardingService.java
@@ -398,13 +398,13 @@ public final class ProfcollectForwardingService extends SystemService {
if (randomNum >= traceFrequency) {
return;
}
- // For a small percentage a traces, we collect the initialization behavior.
- boolean traceInitialization = ThreadLocalRandom.current().nextInt(10) < 1;
- int traceDelay = traceInitialization ? 0 : 1000;
- String traceTag = traceInitialization ? "camera_init" : "camera";
+ final int traceDelay = 1000;
+ final int traceDuration = 5000;
+ final String traceTag = "camera";
BackgroundThread.get().getThreadHandler().postDelayed(() -> {
try {
- mIProfcollect.trace_system(traceTag);
+ mIProfcollect.trace_process(traceTag, "android.hardware.camera.provider",
+ traceDuration);
} catch (RemoteException e) {
Log.e(LOG_TAG, "Failed to initiate trace: " + e.getMessage());
}
diff --git a/services/tests/InputMethodSystemServerTests/src/com/android/inputmethodservice/InputMethodServiceTest.java b/services/tests/InputMethodSystemServerTests/src/com/android/inputmethodservice/InputMethodServiceTest.java
index 2029b71034eb..0787058e3c11 100644
--- a/services/tests/InputMethodSystemServerTests/src/com/android/inputmethodservice/InputMethodServiceTest.java
+++ b/services/tests/InputMethodSystemServerTests/src/com/android/inputmethodservice/InputMethodServiceTest.java
@@ -21,6 +21,7 @@ import static android.view.WindowInsets.Type.captionBar;
import static com.android.compatibility.common.util.SystemUtil.eventually;
import static com.google.common.truth.Truth.assertThat;
+import static com.google.common.truth.Truth.assertWithMessage;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
@@ -33,18 +34,20 @@ import android.content.res.Configuration;
import android.graphics.Insets;
import android.os.RemoteException;
import android.provider.Settings;
-import android.support.test.uiautomator.By;
-import android.support.test.uiautomator.UiDevice;
-import android.support.test.uiautomator.UiObject2;
-import android.support.test.uiautomator.Until;
import android.util.Log;
import android.view.WindowManagerGlobal;
+import android.view.WindowManagerPolicyConstants;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager;
+import androidx.annotation.NonNull;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.MediumTest;
import androidx.test.platform.app.InstrumentationRegistry;
+import androidx.test.uiautomator.By;
+import androidx.test.uiautomator.UiDevice;
+import androidx.test.uiautomator.UiObject2;
+import androidx.test.uiautomator.Until;
import com.android.apps.inputmethod.simpleime.ims.InputMethodServiceWrapper;
import com.android.apps.inputmethod.simpleime.testing.TestActivity;
@@ -57,6 +60,7 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import java.io.IOException;
+import java.util.Objects;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
@@ -66,6 +70,10 @@ public class InputMethodServiceTest {
private static final String TAG = "SimpleIMSTest";
private static final String INPUT_METHOD_SERVICE_NAME = ".SimpleInputMethodService";
private static final String EDIT_TEXT_DESC = "Input box";
+ private static final String INPUT_METHOD_NAV_BACK_ID =
+ "android:id/input_method_nav_back";
+ private static final String INPUT_METHOD_NAV_IME_SWITCHER_ID =
+ "android:id/input_method_nav_ime_switcher";
private static final long TIMEOUT_IN_SECONDS = 3;
private static final String ENABLE_SHOW_IME_WITH_HARD_KEYBOARD_CMD =
"settings put secure " + Settings.Secure.SHOW_IME_WITH_HARD_KEYBOARD + " 1";
@@ -99,6 +107,12 @@ public class InputMethodServiceTest {
InputMethodServiceWrapper.getInputMethodServiceWrapperForTesting();
assertThat(mInputMethodService).isNotNull();
+ // The activity gets focus.
+ assertThat(mActivity.hasWindowFocus()).isTrue();
+ assertThat(mInputMethodService.getCurrentInputEditorInfo()).isNotNull();
+ assertThat(mInputMethodService.getCurrentInputEditorInfo().packageName)
+ .isEqualTo(mTargetPackageName);
+
// The editor won't bring up keyboard by default.
assertThat(mInputMethodService.getCurrentInputStarted()).isTrue();
assertThat(mInputMethodService.getCurrentInputViewStarted()).isFalse();
@@ -691,6 +705,155 @@ public class InputMethodServiceTest {
assertThat(mInputMethodService.isImeNavigationBarShownForTesting()).isFalse();
}
+ /**
+ * Verifies that clicking on the IME navigation bar back button hides the IME.
+ */
+ @Test
+ public void testBackButtonClick() throws Exception {
+ boolean hasNavigationBar = WindowManagerGlobal.getWindowManagerService()
+ .hasNavigationBar(mInputMethodService.getDisplayId());
+ assumeTrue("Must have a navigation bar", hasNavigationBar);
+ assumeTrue("Must be in gesture navigation mode", isGestureNavEnabled());
+
+ setShowImeWithHardKeyboard(true /* enabled */);
+
+ verifyInputViewStatusOnMainSync(
+ () -> {
+ // Ensure the IME navigation bar and the IME switch button are drawn.
+ mInputMethodService.getInputMethodInternal().onNavButtonFlagsChanged(
+ InputMethodNavButtonFlags.IME_DRAWS_IME_NAV_BAR
+ | InputMethodNavButtonFlags.SHOW_IME_SWITCHER_WHEN_IME_IS_SHOWN
+ );
+ assertThat(mActivity.showImeWithWindowInsetsController()).isTrue();
+ },
+ true /* expected */,
+ true /* inputViewStarted */);
+ assertThat(mInputMethodService.isInputViewShown()).isTrue();
+
+ final var backButtonUiObject = getUiObjectById(INPUT_METHOD_NAV_BACK_ID);
+ backButtonUiObject.click();
+ mInstrumentation.waitForIdleSync();
+
+ assertThat(mInputMethodService.isInputViewShown()).isFalse();
+ }
+
+ /**
+ * Verifies that long clicking on the IME navigation bar back button hides the IME.
+ */
+ @Test
+ public void testBackButtonLongClick() throws Exception {
+ boolean hasNavigationBar = WindowManagerGlobal.getWindowManagerService()
+ .hasNavigationBar(mInputMethodService.getDisplayId());
+ assumeTrue("Must have a navigation bar", hasNavigationBar);
+ assumeTrue("Must be in gesture navigation mode", isGestureNavEnabled());
+
+ setShowImeWithHardKeyboard(true /* enabled */);
+
+ verifyInputViewStatusOnMainSync(
+ () -> {
+ // Ensure the IME navigation bar and the IME switch button are drawn.
+ mInputMethodService.getInputMethodInternal().onNavButtonFlagsChanged(
+ InputMethodNavButtonFlags.IME_DRAWS_IME_NAV_BAR
+ | InputMethodNavButtonFlags.SHOW_IME_SWITCHER_WHEN_IME_IS_SHOWN
+ );
+ assertThat(mActivity.showImeWithWindowInsetsController()).isTrue();
+ },
+ true /* expected */,
+ true /* inputViewStarted */);
+ assertThat(mInputMethodService.isInputViewShown()).isTrue();
+
+ final var backButtonUiObject = getUiObjectById(INPUT_METHOD_NAV_BACK_ID);
+ backButtonUiObject.longClick();
+ mInstrumentation.waitForIdleSync();
+
+ assertThat(mInputMethodService.isInputViewShown()).isFalse();
+ }
+
+ /**
+ * Verifies that clicking on the IME switch button either shows the Input Method Switcher Menu,
+ * or switches the input method.
+ */
+ @Test
+ public void testImeSwitchButtonClick() throws Exception {
+ boolean hasNavigationBar = WindowManagerGlobal.getWindowManagerService()
+ .hasNavigationBar(mInputMethodService.getDisplayId());
+ assumeTrue("Must have a navigation bar", hasNavigationBar);
+ assumeTrue("Must be in gesture navigation mode", isGestureNavEnabled());
+
+ setShowImeWithHardKeyboard(true /* enabled */);
+
+ verifyInputViewStatusOnMainSync(
+ () -> {
+ // Ensure the IME navigation bar and the IME switch button are drawn.
+ mInputMethodService.getInputMethodInternal().onNavButtonFlagsChanged(
+ InputMethodNavButtonFlags.IME_DRAWS_IME_NAV_BAR
+ | InputMethodNavButtonFlags.SHOW_IME_SWITCHER_WHEN_IME_IS_SHOWN
+ );
+ assertThat(mActivity.showImeWithWindowInsetsController()).isTrue();
+ },
+ true /* expected */,
+ true /* inputViewStarted */);
+ assertThat(mInputMethodService.isInputViewShown()).isTrue();
+
+ final var imm = mContext.getSystemService(InputMethodManager.class);
+ final var initialInfo = imm.getCurrentInputMethodInfo();
+
+ final var imeSwitchButtonUiObject = getUiObjectById(INPUT_METHOD_NAV_IME_SWITCHER_ID);
+ imeSwitchButtonUiObject.click();
+ mInstrumentation.waitForIdleSync();
+
+ final var newInfo = imm.getCurrentInputMethodInfo();
+
+ assertWithMessage("Input Method Switcher Menu is shown or input method was switched")
+ .that(isInputMethodPickerShown(imm) || !Objects.equals(initialInfo, newInfo))
+ .isTrue();
+
+ assertThat(mInputMethodService.isInputViewShown()).isTrue();
+
+ // Hide the Picker menu before finishing.
+ mUiDevice.pressBack();
+ }
+
+ /**
+ * Verifies that long clicking on the IME switch button shows the Input Method Switcher Menu.
+ */
+ @Test
+ public void testImeSwitchButtonLongClick() throws Exception {
+ boolean hasNavigationBar = WindowManagerGlobal.getWindowManagerService()
+ .hasNavigationBar(mInputMethodService.getDisplayId());
+ assumeTrue("Must have a navigation bar", hasNavigationBar);
+ assumeTrue("Must be in gesture navigation mode", isGestureNavEnabled());
+
+ setShowImeWithHardKeyboard(true /* enabled */);
+
+ verifyInputViewStatusOnMainSync(
+ () -> {
+ // Ensure the IME navigation bar and the IME switch button are drawn.
+ mInputMethodService.getInputMethodInternal().onNavButtonFlagsChanged(
+ InputMethodNavButtonFlags.IME_DRAWS_IME_NAV_BAR
+ | InputMethodNavButtonFlags.SHOW_IME_SWITCHER_WHEN_IME_IS_SHOWN
+ );
+ assertThat(mActivity.showImeWithWindowInsetsController()).isTrue();
+ },
+ true /* expected */,
+ true /* inputViewStarted */);
+ assertThat(mInputMethodService.isInputViewShown()).isTrue();
+
+ final var imm = mContext.getSystemService(InputMethodManager.class);
+
+ final var imeSwitchButtonUiObject = getUiObjectById(INPUT_METHOD_NAV_IME_SWITCHER_ID);
+ imeSwitchButtonUiObject.longClick();
+ mInstrumentation.waitForIdleSync();
+
+ assertWithMessage("Input Method Switcher Menu is shown")
+ .that(isInputMethodPickerShown(imm))
+ .isTrue();
+ assertThat(mInputMethodService.isInputViewShown()).isTrue();
+
+ // Hide the Picker menu before finishing.
+ mUiDevice.pressBack();
+ }
+
private void verifyInputViewStatus(
Runnable runnable, boolean expected, boolean inputViewStarted)
throws InterruptedException {
@@ -838,6 +1001,32 @@ public class InputMethodServiceTest {
return SystemUtil.runShellCommandOrThrow(cmd);
}
+ /**
+ * Checks if the Input Method Switcher Menu is shown. This runs by adopting the Shell's
+ * permission to ensure we have TEST_INPUT_METHOD permission.
+ */
+ private static boolean isInputMethodPickerShown(@NonNull InputMethodManager imm) {
+ return SystemUtil.runWithShellPermissionIdentity(imm::isInputMethodPickerShown);
+ }
+
+ @NonNull
+ private UiObject2 getUiObjectById(@NonNull String id) {
+ final var uiObject = mUiDevice.wait(
+ Until.findObject(By.res(id)),
+ TimeUnit.SECONDS.toMillis(TIMEOUT_IN_SECONDS));
+ assertThat(uiObject).isNotNull();
+ return uiObject;
+ }
+
+ /**
+ * Returns {@code true} if the navigation mode is gesture nav, and {@code false} otherwise.
+ */
+ private boolean isGestureNavEnabled() {
+ return mContext.getResources().getInteger(
+ com.android.internal.R.integer.config_navBarInteractionMode)
+ == WindowManagerPolicyConstants.NAV_BAR_MODE_GESTURAL;
+ }
+
private void clickOnEditorText() {
// Find the editText and click it.
UiObject2 editTextUiObject =
diff --git a/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/AdditionalSubtypeUtilsTest.java b/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/AdditionalSubtypeUtilsTest.java
index 63224bb2aa3f..c54ff5fb2f69 100644
--- a/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/AdditionalSubtypeUtilsTest.java
+++ b/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/AdditionalSubtypeUtilsTest.java
@@ -25,7 +25,7 @@ import android.util.AtomicFile;
import android.view.inputmethod.InputMethodInfo;
import android.view.inputmethod.InputMethodSubtype;
-import androidx.test.InstrumentationRegistry;
+import androidx.test.platform.app.InstrumentationRegistry;
import org.junit.Test;
@@ -54,7 +54,8 @@ public final class AdditionalSubtypeUtilsTest {
// Save & load.
AtomicFile atomicFile = new AtomicFile(
- new File(InstrumentationRegistry.getContext().getCacheDir(), "subtypes.xml"));
+ new File(InstrumentationRegistry.getInstrumentation().getContext().getCacheDir(),
+ "subtypes.xml"));
AdditionalSubtypeUtils.saveToFile(AdditionalSubtypeMap.of(allSubtypes),
InputMethodMap.of(methodMap), atomicFile);
AdditionalSubtypeMap loadedSubtypes = AdditionalSubtypeUtils.loadFromFile(atomicFile);
diff --git a/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/InputMethodManagerServiceTestBase.java b/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/InputMethodManagerServiceTestBase.java
index 17d9ef9fad34..ec9bfa7200c6 100644
--- a/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/InputMethodManagerServiceTestBase.java
+++ b/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/InputMethodManagerServiceTestBase.java
@@ -25,6 +25,7 @@ import static com.android.dx.mockito.inline.extended.ExtendedMockito.spyOn;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.ArgumentMatchers.anyList;
import static org.mockito.ArgumentMatchers.anyLong;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.notNull;
@@ -35,17 +36,22 @@ import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import android.app.ActivityManagerInternal;
+import android.content.BroadcastReceiver;
import android.content.Context;
+import android.content.IntentFilter;
+import android.content.pm.PackageManager;
import android.content.pm.PackageManagerInternal;
import android.content.res.Configuration;
import android.hardware.input.IInputManager;
import android.hardware.input.InputManagerGlobal;
import android.os.Binder;
+import android.os.Handler;
import android.os.IBinder;
import android.os.Process;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.UserHandle;
+import android.util.ArraySet;
import android.view.InputChannel;
import android.view.inputmethod.EditorInfo;
import android.window.ImeOnBackInvokedDispatcher;
@@ -53,6 +59,7 @@ import android.window.ImeOnBackInvokedDispatcher;
import androidx.test.platform.app.InstrumentationRegistry;
import com.android.internal.compat.IPlatformCompat;
+import com.android.internal.inputmethod.DirectBootAwareness;
import com.android.internal.inputmethod.IInputMethod;
import com.android.internal.inputmethod.IInputMethodClient;
import com.android.internal.inputmethod.IInputMethodSession;
@@ -62,7 +69,6 @@ import com.android.internal.inputmethod.InputBindResult;
import com.android.internal.view.IInputMethodManager;
import com.android.server.LocalServices;
import com.android.server.ServiceThread;
-import com.android.server.SystemServerInitThreadPool;
import com.android.server.SystemService;
import com.android.server.input.InputManagerInternal;
import com.android.server.pm.UserManagerInternal;
@@ -131,6 +137,14 @@ public class InputMethodManagerServiceTestBase {
protected boolean mIsLargeScreen;
private InputManagerGlobal.TestSession mInputManagerGlobalSession;
+ private final ArraySet<Class<?>> mRegisteredLocalServices = new ArraySet<>();
+
+ protected <T> void addLocalServiceMock(Class<T> type, T service) {
+ mRegisteredLocalServices.add(type);
+ LocalServices.removeServiceForTest(type);
+ LocalServices.addService(type, service);
+ }
+
@BeforeClass
public static void setupClass() {
// Make sure DeviceConfig's lazy-initialized ContentProvider gets
@@ -145,9 +159,10 @@ public class InputMethodManagerServiceTestBase {
mockitoSession()
.initMocks(this)
.strictness(Strictness.LENIENT)
- .spyStatic(LocalServices.class)
+ .spyStatic(InputMethodUtils.class)
.mockStatic(ServiceManager.class)
- .mockStatic(SystemServerInitThreadPool.class)
+ .spyStatic(AdditionalSubtypeMapRepository.class)
+ .spyStatic(AdditionalSubtypeUtils.class)
.startMocking();
mContext = spy(InstrumentationRegistry.getInstrumentation().getContext());
@@ -160,18 +175,13 @@ public class InputMethodManagerServiceTestBase {
mEditorInfo.packageName = TEST_EDITOR_PKG_NAME;
// Injecting and mocking local services.
- doReturn(mMockWindowManagerInternal)
- .when(() -> LocalServices.getService(WindowManagerInternal.class));
- doReturn(mMockActivityManagerInternal)
- .when(() -> LocalServices.getService(ActivityManagerInternal.class));
- doReturn(mMockPackageManagerInternal)
- .when(() -> LocalServices.getService(PackageManagerInternal.class));
- doReturn(mMockInputManagerInternal)
- .when(() -> LocalServices.getService(InputManagerInternal.class));
- doReturn(mMockUserManagerInternal)
- .when(() -> LocalServices.getService(UserManagerInternal.class));
- doReturn(mMockImeTargetVisibilityPolicy)
- .when(() -> LocalServices.getService(ImeTargetVisibilityPolicy.class));
+ addLocalServiceMock(WindowManagerInternal.class, mMockWindowManagerInternal);
+ addLocalServiceMock(ActivityManagerInternal.class, mMockActivityManagerInternal);
+ addLocalServiceMock(PackageManagerInternal.class, mMockPackageManagerInternal);
+ addLocalServiceMock(InputManagerInternal.class, mMockInputManagerInternal);
+ addLocalServiceMock(UserManagerInternal.class, mMockUserManagerInternal);
+ addLocalServiceMock(ImeTargetVisibilityPolicy.class, mMockImeTargetVisibilityPolicy);
+
doReturn(mMockIInputMethodManager)
.when(() -> ServiceManager.getServiceOrThrow(Context.INPUT_METHOD_SERVICE));
doReturn(mMockIPlatformCompat)
@@ -182,6 +192,9 @@ public class InputMethodManagerServiceTestBase {
doNothing().when(mContext).enforceCallingPermission(anyString(), anyString());
doNothing().when(mContext).sendBroadcastAsUser(any(), any());
doReturn(null).when(mContext).registerReceiver(any(), any());
+ doReturn(null).when(mContext).registerReceiver(
+ any(BroadcastReceiver.class),
+ any(IntentFilter.class), anyString(), any(Handler.class));
doReturn(null)
.when(mContext)
.registerReceiverAsUser(any(), any(), any(), anyString(), any(), anyInt());
@@ -218,23 +231,33 @@ public class InputMethodManagerServiceTestBase {
.thenReturn(TEST_IME_TARGET_INFO);
when(mMockInputMethodClient.asBinder()).thenReturn(mMockInputMethodBinder);
- // Used by lazy initializing draw IMS nav bar at InputMethodManagerService#systemRunning(),
- // which is ok to be mocked out for now.
- doReturn(null).when(() -> SystemServerInitThreadPool.submit(any(), anyString()));
+ // This changes the real IME component state. Not appropriate to do in tests.
+ doNothing().when(() -> InputMethodUtils.setNonSelectedSystemImesDisabledUntilUsed(
+ any(PackageManager.class), anyList()));
+
+ // The background writer thread in AdditionalSubtypeMapRepository should be stubbed out.
+ doNothing().when(AdditionalSubtypeMapRepository::startWriterThread);
+ doReturn(AdditionalSubtypeMap.EMPTY_MAP).when(() -> AdditionalSubtypeUtils.load(anyInt()));
mServiceThread =
new ServiceThread(
"immstest1",
Process.THREAD_PRIORITY_FOREGROUND,
true /* allowIo */);
+ mServiceThread.start();
mIoThread =
new ServiceThread(
"immstest2",
Process.THREAD_PRIORITY_FOREGROUND,
true /* allowIo */);
+ mIoThread.start();
+
+ final var ioHandler = spy(Handler.createAsync(mIoThread.getLooper()));
+ doReturn(true).when(ioHandler).post(any());
+
mInputMethodManagerService = new InputMethodManagerService(mContext,
InputMethodManagerService.shouldEnableConcurrentMultiUserMode(mContext),
- mServiceThread, mIoThread,
+ mServiceThread.getLooper(), ioHandler,
unusedUserId -> mMockInputMethodBindingController);
spyOn(mInputMethodManagerService);
@@ -246,16 +269,20 @@ public class InputMethodManagerServiceTestBase {
// Public local InputMethodManagerService.
LocalServices.removeServiceForTest(InputMethodManagerInternal.class);
lifecycle.onStart();
- try {
- // After this boot phase, services can broadcast Intents.
- lifecycle.onBootPhase(SystemService.PHASE_ACTIVITY_MANAGER_READY);
- } catch (SecurityException e) {
- // Security exception to permission denial is expected in test, mocking out to ensure
- // InputMethodManagerService as system ready state.
- if (!e.getMessage().contains("Permission Denial: not allowed to send broadcast")) {
- throw e;
- }
- }
+
+ // Certain tests rely on TEST_IME_ID that is installed with AndroidTest.xml.
+ // TODO(b/352615651): Consider just synthesizing test InputMethodInfo then injecting it.
+ AdditionalSubtypeMapRepository.ensureInitializedAndGet(mCallingUserId);
+ final var settings = InputMethodManagerService.queryInputMethodServicesInternal(mContext,
+ mCallingUserId, AdditionalSubtypeMapRepository.get(mCallingUserId),
+ DirectBootAwareness.AUTO);
+ InputMethodSettingsRepository.put(mCallingUserId, settings);
+
+ // Emulate that the user initialization is done.
+ mInputMethodManagerService.getUserData(mCallingUserId).mBackgroundLoadLatch.countDown();
+
+ // After this boot phase, services can broadcast Intents.
+ lifecycle.onBootPhase(SystemService.PHASE_ACTIVITY_MANAGER_READY);
// Call InputMethodManagerService#addClient() as a preparation to start interacting with it.
mInputMethodManagerService.addClient(mMockInputMethodClient, mMockRemoteInputConnection, 0);
@@ -264,6 +291,8 @@ public class InputMethodManagerServiceTestBase {
@After
public void tearDown() {
+ InputMethodSettingsRepository.remove(mCallingUserId);
+
if (mInputMethodManagerService != null) {
mInputMethodManagerService.mInputMethodDeviceConfigs.destroy();
}
@@ -283,7 +312,7 @@ public class InputMethodManagerServiceTestBase {
if (mInputManagerGlobalSession != null) {
mInputManagerGlobalSession.close();
}
- LocalServices.removeServiceForTest(InputMethodManagerInternal.class);
+ mRegisteredLocalServices.forEach(LocalServices::removeServiceForTest);
}
protected void verifyShowSoftInput(boolean setVisible, boolean showSoftInput)
diff --git a/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/InputMethodManagerServiceWindowGainedFocusTest.java b/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/InputMethodManagerServiceWindowGainedFocusTest.java
index 9f46d0ba7df6..ffc4df8f2069 100644
--- a/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/InputMethodManagerServiceWindowGainedFocusTest.java
+++ b/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/InputMethodManagerServiceWindowGainedFocusTest.java
@@ -50,7 +50,6 @@ import com.android.internal.inputmethod.InputBindResult;
import com.android.internal.inputmethod.InputMethodDebug;
import com.android.internal.inputmethod.StartInputFlags;
import com.android.internal.inputmethod.StartInputReason;
-import com.android.server.LocalServices;
import com.android.server.companion.virtual.VirtualDeviceManagerInternal;
import com.android.server.wm.WindowManagerInternal;
@@ -270,8 +269,7 @@ public class InputMethodManagerServiceWindowGainedFocusTest
@Test
public void startInputOrWindowGainedFocus_localeHintsOverride() throws RemoteException {
- doReturn(mMockVdmInternal).when(
- () -> LocalServices.getService(VirtualDeviceManagerInternal.class));
+ addLocalServiceMock(VirtualDeviceManagerInternal.class, mMockVdmInternal);
LocaleList overrideLocale = LocaleList.forLanguageTags("zh-CN");
doReturn(overrideLocale).when(mMockVdmInternal).getPreferredLocaleListForUid(anyInt());
mockHasImeFocusAndRestoreImeVisibility(false /* restoreImeVisibility */);
diff --git a/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/InputMethodSubtypeSwitchingControllerTest.java b/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/InputMethodSubtypeSwitchingControllerTest.java
index e81cf9df6660..dc0373239547 100644
--- a/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/InputMethodSubtypeSwitchingControllerTest.java
+++ b/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/InputMethodSubtypeSwitchingControllerTest.java
@@ -16,15 +16,26 @@
package com.android.server.inputmethod;
+import static com.android.server.inputmethod.InputMethodSubtypeSwitchingController.MODE_AUTO;
+import static com.android.server.inputmethod.InputMethodSubtypeSwitchingController.MODE_RECENT;
+import static com.android.server.inputmethod.InputMethodSubtypeSwitchingController.MODE_STATIC;
+import static com.android.server.inputmethod.InputMethodSubtypeSwitchingController.SwitchMode;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import android.content.ComponentName;
import android.content.pm.ApplicationInfo;
import android.content.pm.ResolveInfo;
import android.content.pm.ServiceInfo;
+import android.platform.test.annotations.RequiresFlagsDisabled;
+import android.platform.test.annotations.RequiresFlagsEnabled;
+import android.platform.test.flag.junit.CheckFlagsRule;
+import android.platform.test.flag.junit.DeviceFlagsValueProvider;
+import android.view.inputmethod.Flags;
import android.view.inputmethod.InputMethodInfo;
import android.view.inputmethod.InputMethodSubtype;
import android.view.inputmethod.InputMethodSubtype.InputMethodSubtypeBuilder;
@@ -35,6 +46,7 @@ import androidx.annotation.Nullable;
import com.android.server.inputmethod.InputMethodSubtypeSwitchingController.ControllerImpl;
import com.android.server.inputmethod.InputMethodSubtypeSwitchingController.ImeSubtypeListItem;
+import org.junit.Rule;
import org.junit.Test;
import java.util.ArrayList;
@@ -51,6 +63,9 @@ public final class InputMethodSubtypeSwitchingControllerTest {
private static final String SYSTEM_LOCALE = "en_US";
private static final int NOT_A_SUBTYPE_ID = InputMethodUtils.NOT_A_SUBTYPE_ID;
+ @Rule
+ public final CheckFlagsRule mCheckFlagsRule = DeviceFlagsValueProvider.createCheckFlagsRule();
+
@NonNull
private static InputMethodSubtype createTestSubtype(@NonNull String locale) {
return new InputMethodSubtypeBuilder()
@@ -170,7 +185,7 @@ public final class InputMethodSubtypeSwitchingControllerTest {
subtype = createTestSubtype(currentItem.mSubtypeName.toString());
}
final ImeSubtypeListItem nextIme = controller.getNextInputMethod(onlyCurrentIme,
- currentItem.mImi, subtype);
+ currentItem.mImi, subtype, MODE_STATIC, true /* forward */);
assertEquals(nextItem, nextIme);
}
@@ -185,15 +200,16 @@ public final class InputMethodSubtypeSwitchingControllerTest {
}
}
- private void onUserAction(@NonNull ControllerImpl controller,
+ private boolean onUserAction(@NonNull ControllerImpl controller,
@NonNull ImeSubtypeListItem subtypeListItem) {
InputMethodSubtype subtype = null;
if (subtypeListItem.mSubtypeName != null) {
subtype = createTestSubtype(subtypeListItem.mSubtypeName.toString());
}
- controller.onUserActionLocked(subtypeListItem.mImi, subtype);
+ return controller.onUserActionLocked(subtypeListItem.mImi, subtype);
}
+ @RequiresFlagsDisabled(Flags.FLAG_IME_SWITCHER_REVAMP)
@Test
public void testControllerImpl() {
final List<ImeSubtypeListItem> disabledItems = createDisabledImeSubtypes();
@@ -213,7 +229,7 @@ public final class InputMethodSubtypeSwitchingControllerTest {
final ImeSubtypeListItem switchUnawareJapaneseIme_ja_jp = enabledItems.get(7);
final ControllerImpl controller = ControllerImpl.createFrom(
- null /* currentInstance */, enabledItems);
+ null /* currentInstance */, enabledItems, new ArrayList<>());
// switching-aware loop
assertRotationOrder(controller, false /* onlyCurrentIme */,
@@ -257,6 +273,7 @@ public final class InputMethodSubtypeSwitchingControllerTest {
disabledSubtypeUnawareIme, null);
}
+ @RequiresFlagsDisabled(Flags.FLAG_IME_SWITCHER_REVAMP)
@Test
public void testControllerImplWithUserAction() {
final List<ImeSubtypeListItem> enabledItems = createEnabledImeSubtypes();
@@ -270,7 +287,7 @@ public final class InputMethodSubtypeSwitchingControllerTest {
final ImeSubtypeListItem switchUnawareJapaneseIme_ja_jp = enabledItems.get(7);
final ControllerImpl controller = ControllerImpl.createFrom(
- null /* currentInstance */, enabledItems);
+ null /* currentInstance */, enabledItems, new ArrayList<>());
// === switching-aware loop ===
assertRotationOrder(controller, false /* onlyCurrentIme */,
@@ -320,7 +337,7 @@ public final class InputMethodSubtypeSwitchingControllerTest {
// Rotation order should be preserved when created with the same subtype list.
final List<ImeSubtypeListItem> sameEnabledItems = createEnabledImeSubtypes();
final ControllerImpl newController = ControllerImpl.createFrom(controller,
- sameEnabledItems);
+ sameEnabledItems, new ArrayList<>());
assertRotationOrder(newController, false /* onlyCurrentIme */,
subtypeAwareIme, latinIme_fr, latinIme_en_us, japaneseIme_ja_jp);
assertRotationOrder(newController, false /* onlyCurrentIme */,
@@ -332,7 +349,7 @@ public final class InputMethodSubtypeSwitchingControllerTest {
latinIme_en_us, latinIme_fr, subtypeAwareIme, switchingUnawareLatinIme_en_uk,
switchUnawareJapaneseIme_ja_jp, subtypeUnawareIme);
final ControllerImpl anotherController = ControllerImpl.createFrom(controller,
- differentEnabledItems);
+ differentEnabledItems, new ArrayList<>());
assertRotationOrder(anotherController, false /* onlyCurrentIme */,
latinIme_en_us, latinIme_fr, subtypeAwareIme);
assertRotationOrder(anotherController, false /* onlyCurrentIme */,
@@ -370,6 +387,7 @@ public final class InputMethodSubtypeSwitchingControllerTest {
assertFalse(item_en_us_allcaps.mIsSystemLanguage);
}
+ @RequiresFlagsDisabled(Flags.FLAG_IME_SWITCHER_REVAMP)
@SuppressWarnings("SelfComparison")
@Test
public void testImeSubtypeListComparator() {
@@ -471,4 +489,739 @@ public final class InputMethodSubtypeSwitchingControllerTest {
assertNotEquals(ime2, ime1);
}
}
+
+ /** Verifies the static mode. */
+ @RequiresFlagsEnabled(Flags.FLAG_IME_SWITCHER_REVAMP)
+ @Test
+ public void testModeStatic() {
+ final var items = new ArrayList<ImeSubtypeListItem>();
+ addTestImeSubtypeListItems(items, "LatinIme", "LatinIme",
+ List.of("en", "fr", "it"), true /* supportsSwitchingToNextInputMethod */);
+ addTestImeSubtypeListItems(items, "SimpleIme", "SimpleIme",
+ null, true /* supportsSwitchingToNextInputMethod */);
+
+ final var english = items.get(0);
+ final var french = items.get(1);
+ final var italian = items.get(2);
+ final var simple = items.get(3);
+ final var latinIme = List.of(english, french, italian);
+ final var simpleIme = List.of(simple);
+
+ final var hardwareItems = new ArrayList<ImeSubtypeListItem>();
+ addTestImeSubtypeListItems(hardwareItems, "HardwareLatinIme", "HardwareLatinIme",
+ List.of("en", "fr", "it"), true /* supportsSwitchingToNextInputMethod */);
+ addTestImeSubtypeListItems(hardwareItems, "HardwareSimpleIme", "HardwareSimpleIme",
+ null, true /* supportsSwitchingToNextInputMethod */);
+
+ final var hardwareEnglish = hardwareItems.get(0);
+ final var hardwareFrench = hardwareItems.get(1);
+ final var hardwareItalian = hardwareItems.get(2);
+ final var hardwareSimple = hardwareItems.get(3);
+ final var hardwareLatinIme = List.of(hardwareEnglish, hardwareFrench, hardwareItalian);
+ final var hardwareSimpleIme = List.of(hardwareSimple);
+
+ final var controller = ControllerImpl.createFrom(null /* currentInstance */, items,
+ hardwareItems);
+
+ final int mode = MODE_STATIC;
+
+ // Static mode matches the given items order.
+ assertNextOrder(controller, false /* forHardware */, mode,
+ items, List.of(latinIme, simpleIme));
+
+ assertNextOrder(controller, true /* forHardware */, mode,
+ hardwareItems, List.of(hardwareLatinIme, hardwareSimpleIme));
+
+ // Set french IME as most recent.
+ assertTrue("Recency updated for french IME", onUserAction(controller, french));
+
+ // Static mode is not influenced by recency updates on non-hardware item.
+ assertNextOrder(controller, false /* forHardware */, mode,
+ items, List.of(latinIme, simpleIme));
+
+ assertNextOrder(controller, true /* forHardware */, mode,
+ hardwareItems, List.of(hardwareLatinIme, hardwareSimpleIme));
+
+ assertTrue("Recency updated for french hardware IME",
+ onUserAction(controller, hardwareFrench));
+
+ // Static mode is not influenced by recency updates on hardware item.
+ assertNextOrder(controller, false /* forHardware */, mode,
+ items, List.of(latinIme, simpleIme));
+
+ assertNextOrder(controller, true /* forHardware */, mode,
+ hardwareItems, List.of(hardwareLatinIme, hardwareSimpleIme));
+ }
+
+ /** Verifies the recency mode. */
+ @RequiresFlagsEnabled(Flags.FLAG_IME_SWITCHER_REVAMP)
+ @Test
+ public void testModeRecent() {
+ final var items = new ArrayList<ImeSubtypeListItem>();
+ addTestImeSubtypeListItems(items, "LatinIme", "LatinIme",
+ List.of("en", "fr", "it"), true /* supportsSwitchingToNextInputMethod */);
+ addTestImeSubtypeListItems(items, "SimpleIme", "SimpleIme",
+ null, true /* supportsSwitchingToNextInputMethod */);
+
+ final var english = items.get(0);
+ final var french = items.get(1);
+ final var italian = items.get(2);
+ final var simple = items.get(3);
+ final var latinIme = List.of(english, french, italian);
+ final var simpleIme = List.of(simple);
+
+ final var hardwareItems = new ArrayList<ImeSubtypeListItem>();
+ addTestImeSubtypeListItems(hardwareItems, "HardwareLatinIme", "HardwareLatinIme",
+ List.of("en", "fr", "it"), true /* supportsSwitchingToNextInputMethod */);
+ addTestImeSubtypeListItems(hardwareItems, "HardwareSimpleIme", "HardwareSimpleIme",
+ null, true /* supportsSwitchingToNextInputMethod */);
+
+ final var hardwareEnglish = hardwareItems.get(0);
+ final var hardwareFrench = hardwareItems.get(1);
+ final var hardwareItalian = hardwareItems.get(2);
+ final var hardwareSimple = hardwareItems.get(3);
+ final var hardwareLatinIme = List.of(hardwareEnglish, hardwareFrench, hardwareItalian);
+ final var hardwareSimpleIme = List.of(hardwareSimple);
+
+ final var controller = ControllerImpl.createFrom(null /* currentInstance */, items,
+ hardwareItems);
+
+ final int mode = MODE_RECENT;
+
+ // Recency order is initialized to static order.
+ assertNextOrder(controller, false /* forHardware */, mode,
+ items, List.of(latinIme, simpleIme));
+
+ assertNextOrder(controller, true /* forHardware */, mode,
+ hardwareItems, List.of(hardwareLatinIme, hardwareSimpleIme));
+
+ assertTrue("Recency updated for french IME", onUserAction(controller, french));
+ final var recencyItems = List.of(french, english, italian, simple);
+ final var recencyLatinIme = List.of(french, english, italian);
+ final var recencySimpleIme = List.of(simple);
+
+ // The order of non-hardware items is updated.
+ assertNextOrder(controller, false /* forHardware */, mode,
+ recencyItems, List.of(recencyLatinIme, recencySimpleIme));
+
+ // The order of hardware items remains unchanged for an action on a non-hardware item.
+ assertNextOrder(controller, true /* forHardware */, mode,
+ hardwareItems, List.of(hardwareLatinIme, hardwareSimpleIme));
+
+ assertFalse("Recency not updated again for same IME", onUserAction(controller, french));
+
+ // The order of non-hardware items remains unchanged.
+ assertNextOrder(controller, false /* forHardware */, mode,
+ recencyItems, List.of(recencyLatinIme, recencySimpleIme));
+
+ // The order of hardware items remains unchanged.
+ assertNextOrder(controller, true /* forHardware */, mode,
+ hardwareItems, List.of(hardwareLatinIme, hardwareSimpleIme));
+
+ assertTrue("Recency updated for french hardware IME",
+ onUserAction(controller, hardwareFrench));
+
+ final var recencyHardwareItems =
+ List.of(hardwareFrench, hardwareEnglish, hardwareItalian, hardwareSimple);
+ final var recencyHardwareLatinIme =
+ List.of(hardwareFrench, hardwareEnglish, hardwareItalian);
+ final var recencyHardwareSimpleIme = List.of(hardwareSimple);
+
+ // The order of non-hardware items is unchanged.
+ assertNextOrder(controller, false /* forHardware */, mode,
+ recencyItems, List.of(recencyLatinIme, recencySimpleIme));
+
+ // The order of hardware items is updated.
+ assertNextOrder(controller, true /* forHardware */, mode,
+ recencyHardwareItems, List.of(recencyHardwareLatinIme, recencyHardwareSimpleIme));
+ }
+
+ /** Verifies the auto mode. */
+ @RequiresFlagsEnabled(Flags.FLAG_IME_SWITCHER_REVAMP)
+ @Test
+ public void testModeAuto() {
+ final var items = new ArrayList<ImeSubtypeListItem>();
+ addTestImeSubtypeListItems(items, "LatinIme", "LatinIme",
+ List.of("en", "fr", "it"), true /* supportsSwitchingToNextInputMethod */);
+ addTestImeSubtypeListItems(items, "SimpleIme", "SimpleIme",
+ null, true /* supportsSwitchingToNextInputMethod */);
+
+ final var english = items.get(0);
+ final var french = items.get(1);
+ final var italian = items.get(2);
+ final var simple = items.get(3);
+ final var latinIme = List.of(english, french, italian);
+ final var simpleIme = List.of(simple);
+
+ final var hardwareItems = new ArrayList<ImeSubtypeListItem>();
+ addTestImeSubtypeListItems(hardwareItems, "HardwareLatinIme", "HardwareLatinIme",
+ List.of("en", "fr", "it"), true /* supportsSwitchingToNextInputMethod */);
+ addTestImeSubtypeListItems(hardwareItems, "HardwareSimpleIme", "HardwareSimpleIme",
+ null, true /* supportsSwitchingToNextInputMethod */);
+
+ final var hardwareEnglish = hardwareItems.get(0);
+ final var hardwareFrench = hardwareItems.get(1);
+ final var hardwareItalian = hardwareItems.get(2);
+ final var hardwareSimple = hardwareItems.get(3);
+ final var hardwareLatinIme = List.of(hardwareEnglish, hardwareFrench, hardwareItalian);
+ final var hardwareSimpleIme = List.of(hardwareSimple);
+
+ final var controller = ControllerImpl.createFrom(null /* currentInstance */, items,
+ hardwareItems);
+
+ final int mode = MODE_AUTO;
+
+ // Auto mode resolves to static order initially.
+ assertNextOrder(controller, false /* forHardware */, mode,
+ items, List.of(latinIme, simpleIme));
+
+ assertNextOrder(controller, true /* forHardware */, mode,
+ hardwareItems, List.of(hardwareLatinIme, hardwareSimpleIme));
+
+ // User action on french IME.
+ assertTrue("Recency updated for french IME", onUserAction(controller, french));
+
+ final var recencyItems = List.of(french, english, italian, simple);
+ final var recencyLatinIme = List.of(french, english, italian);
+ final var recencySimpleIme = List.of(simple);
+
+ // Auto mode resolves to recency order for the first forward after user action, and to
+ // static order for the backwards direction.
+ assertNextOrder(controller, false /* forHardware */, mode, true /* forward */,
+ recencyItems, List.of(recencyLatinIme, recencySimpleIme));
+ assertNextOrder(controller, false /* forHardware */, mode, false /* forward */,
+ items.reversed(), List.of(latinIme.reversed(), simpleIme.reversed()));
+
+ // Auto mode resolves to recency order for the first forward after user action,
+ // but the recency was not updated for hardware items, so it's equivalent to static order.
+ assertNextOrder(controller, true /* forHardware */, mode,
+ hardwareItems, List.of(hardwareLatinIme, hardwareSimpleIme));
+
+ // Change IME, reset user action having happened.
+ controller.onInputMethodSubtypeChanged();
+
+ // Auto mode resolves to static order as there was no user action since changing IMEs.
+ assertNextOrder(controller, false /* forHardware */, mode,
+ items, List.of(latinIme, simpleIme));
+
+ assertNextOrder(controller, true /* forHardware */, mode,
+ hardwareItems, List.of(hardwareLatinIme, hardwareSimpleIme));
+
+ // User action on french IME again.
+ assertFalse("Recency not updated again for same IME", onUserAction(controller, french));
+
+ // Auto mode still resolves to static order, as a user action on the currently most
+ // recent IME has no effect.
+ assertNextOrder(controller, false /* forHardware */, mode,
+ items, List.of(latinIme, simpleIme));
+
+ assertNextOrder(controller, true /* forHardware */, mode,
+ hardwareItems, List.of(hardwareLatinIme, hardwareSimpleIme));
+
+ // User action on hardware french IME.
+ assertTrue("Recency updated for french hardware IME",
+ onUserAction(controller, hardwareFrench));
+
+ final var recencyHardware =
+ List.of(hardwareFrench, hardwareEnglish, hardwareItalian, hardwareSimple);
+ final var recencyHardwareLatin =
+ List.of(hardwareFrench, hardwareEnglish, hardwareItalian);
+ final var recencyHardwareSimple = List.of(hardwareSimple);
+
+ // Auto mode resolves to recency order for the first forward direction after a user action
+ // on a hardware IME, and to static order for the backwards direction.
+ assertNextOrder(controller, false /* forHardware */, mode, true /* forward */,
+ recencyItems, List.of(recencyLatinIme, recencySimpleIme));
+ assertNextOrder(controller, false /* forHardware */, mode, false /* forward */,
+ items.reversed(), List.of(latinIme.reversed(), simpleIme.reversed()));
+
+ assertNextOrder(controller, true /* forHardware */, mode, true /* forward */,
+ recencyHardware, List.of(recencyHardwareLatin, recencyHardwareSimple));
+
+ assertNextOrder(controller, true /* forHardware */, mode, false /* forward */,
+ hardwareItems.reversed(),
+ List.of(hardwareLatinIme.reversed(), hardwareSimpleIme.reversed()));
+ }
+
+ /**
+ * Verifies that the recency order is preserved only when updating with an equal list of items.
+ */
+ @RequiresFlagsEnabled(Flags.FLAG_IME_SWITCHER_REVAMP)
+ @Test
+ public void testUpdateList() {
+ final var items = new ArrayList<ImeSubtypeListItem>();
+ addTestImeSubtypeListItems(items, "LatinIme", "LatinIme",
+ List.of("en", "fr", "it"), true /* supportsSwitchingToNextInputMethod */);
+ addTestImeSubtypeListItems(items, "SimpleIme", "SimpleIme",
+ null, true /* supportsSwitchingToNextInputMethod */);
+
+ final var english = items.get(0);
+ final var french = items.get(1);
+ final var italian = items.get(2);
+ final var simple = items.get(3);
+
+ final var latinIme = List.of(english, french, italian);
+ final var simpleIme = List.of(simple);
+
+ final var hardwareItems = new ArrayList<ImeSubtypeListItem>();
+ addTestImeSubtypeListItems(hardwareItems, "HardwareLatinIme", "HardwareLatinIme",
+ List.of("en", "fr", "it"), true /* supportsSwitchingToNextInputMethod */);
+ addTestImeSubtypeListItems(hardwareItems, "HardwareSimpleIme", "HardwareSimpleIme",
+ null, true /* supportsSwitchingToNextInputMethod */);
+
+ final var hardwareEnglish = hardwareItems.get(0);
+ final var hardwareFrench = hardwareItems.get(1);
+ final var hardwareItalian = hardwareItems.get(2);
+ final var hardwareSimple = hardwareItems.get(3);
+
+ final var hardwareLatinIme = List.of(hardwareEnglish, hardwareFrench, hardwareItalian);
+ final var hardwareSimpleIme = List.of(hardwareSimple);
+
+ final var controller = ControllerImpl.createFrom(null /* currentInstance */, items,
+ hardwareItems);
+
+ final int mode = MODE_RECENT;
+
+ // Recency order is initialized to static order.
+ assertNextOrder(controller, false /* forHardware */, mode,
+ items, List.of(latinIme, simpleIme));
+
+ assertNextOrder(controller, true /* forHardware */, mode,
+ hardwareItems, List.of(hardwareLatinIme, hardwareSimpleIme));
+
+ // User action on french IME.
+ assertTrue("Recency updated for french IME", onUserAction(controller, french));
+
+ final var equalItems = new ArrayList<>(items);
+ final var otherItems = new ArrayList<>(items);
+ otherItems.remove(simple);
+
+ final var equalController = ControllerImpl.createFrom(controller, equalItems,
+ hardwareItems);
+ final var otherController = ControllerImpl.createFrom(controller, otherItems,
+ hardwareItems);
+
+ final var recencyItems = List.of(french, english, italian, simple);
+ final var recencyLatinIme = List.of(french, english, italian);
+ final var recencySimpleIme = List.of(simple);
+
+ assertNextOrder(controller, false /* forHardware */, mode,
+ recencyItems, List.of(recencyLatinIme, recencySimpleIme));
+
+ // The order of equal non-hardware items is unchanged.
+ assertNextOrder(equalController, false /* forHardware */, mode,
+ recencyItems, List.of(recencyLatinIme, recencySimpleIme));
+
+ // The order of other hardware items is reset.
+ assertNextOrder(otherController, false /* forHardware */, mode,
+ latinIme, List.of(latinIme));
+
+ // The order of hardware remains unchanged.
+ assertNextOrder(controller, true /* forHardware */, mode,
+ hardwareItems, List.of(hardwareLatinIme, hardwareSimpleIme));
+
+ assertNextOrder(equalController, true /* forHardware */, mode,
+ hardwareItems, List.of(hardwareLatinIme, hardwareSimpleIme));
+
+ assertNextOrder(otherController, true /* forHardware */, mode,
+ hardwareItems, List.of(hardwareLatinIme, hardwareSimpleIme));
+
+ assertTrue("Recency updated for french hardware IME",
+ onUserAction(controller, hardwareFrench));
+
+ final var equalHardwareItems = new ArrayList<>(hardwareItems);
+ final var otherHardwareItems = new ArrayList<>(hardwareItems);
+ otherHardwareItems.remove(hardwareSimple);
+
+ final var equalHardwareController = ControllerImpl.createFrom(controller, items,
+ equalHardwareItems);
+ final var otherHardwareController = ControllerImpl.createFrom(controller, items,
+ otherHardwareItems);
+
+ final var recencyHardwareItems =
+ List.of(hardwareFrench, hardwareEnglish, hardwareItalian, hardwareSimple);
+ final var recencyHardwareLatinIme =
+ List.of(hardwareFrench, hardwareEnglish, hardwareItalian);
+ final var recencyHardwareSimpleIme = List.of(hardwareSimple);
+
+ // The order of non-hardware items remains unchanged.
+ assertNextOrder(controller, false /* forHardware */, mode,
+ recencyItems, List.of(recencyLatinIme, recencySimpleIme));
+
+ assertNextOrder(equalHardwareController, false /* forHardware */, mode,
+ recencyItems, List.of(recencyLatinIme, recencySimpleIme));
+
+ assertNextOrder(otherHardwareController, false /* forHardware */, mode,
+ recencyItems, List.of(recencyLatinIme, recencySimpleIme));
+
+ assertNextOrder(controller, true /* forHardware */, mode,
+ recencyHardwareItems, List.of(recencyHardwareLatinIme, recencyHardwareSimpleIme));
+
+ // The order of equal hardware items is unchanged.
+ assertNextOrder(equalHardwareController, true /* forHardware */, mode,
+ recencyHardwareItems, List.of(recencyHardwareLatinIme, recencyHardwareSimpleIme));
+
+ // The order of other hardware items is reset.
+ assertNextOrder(otherHardwareController, true /* forHardware */, mode,
+ hardwareLatinIme, List.of(hardwareLatinIme));
+ }
+
+ /** Verifies that switch aware and switch unaware IMEs are combined together. */
+ @RequiresFlagsEnabled(Flags.FLAG_IME_SWITCHER_REVAMP)
+ @Test
+ public void testSwitchAwareAndUnawareCombined() {
+ final var items = new ArrayList<ImeSubtypeListItem>();
+ addTestImeSubtypeListItems(items, "switchAware", "switchAware",
+ null, true /* supportsSwitchingToNextInputMethod*/);
+ addTestImeSubtypeListItems(items, "switchUnaware", "switchUnaware",
+ null, false /* supportsSwitchingToNextInputMethod*/);
+
+ final var hardwareItems = new ArrayList<ImeSubtypeListItem>();
+ addTestImeSubtypeListItems(hardwareItems, "hardwareSwitchAware", "hardwareSwitchAware",
+ null, true /* supportsSwitchingToNextInputMethod*/);
+ addTestImeSubtypeListItems(hardwareItems, "hardwareSwitchUnaware", "hardwareSwitchUnaware",
+ null, false /* supportsSwitchingToNextInputMethod*/);
+
+ final var controller = ControllerImpl.createFrom(null /* currentInstance */, items,
+ hardwareItems);
+
+ for (int mode = MODE_STATIC; mode <= MODE_AUTO; mode++) {
+ assertNextOrder(controller, false /* forHardware */, false /* onlyCurrentIme */,
+ mode, true /* forward */, items);
+ assertNextOrder(controller, false /* forHardware */, false /* onlyCurrentIme */,
+ mode, false /* forward */, items.reversed());
+
+ assertNextOrder(controller, true /* forHardware */, false /* onlyCurrentIme */,
+ mode, true /* forward */, hardwareItems);
+ assertNextOrder(controller, true /* forHardware */, false /* onlyCurrentIme */,
+ mode, false /* forward */, hardwareItems.reversed());
+ }
+ }
+
+ /** Verifies that an empty controller can't take any actions. */
+ @RequiresFlagsEnabled(Flags.FLAG_IME_SWITCHER_REVAMP)
+ @Test
+ public void testEmptyList() {
+ final var items = new ArrayList<ImeSubtypeListItem>();
+ addTestImeSubtypeListItems(items, "LatinIme", "LatinIme",
+ List.of("en", "fr"), true /* supportsSwitchingToNextInputMethod */);
+
+ final var hardwareItems = new ArrayList<ImeSubtypeListItem>();
+ addTestImeSubtypeListItems(hardwareItems, "HardwareIme", "HardwareIme",
+ List.of("en", "fr"), true /* supportsSwitchingToNextInputMethod */);
+
+ final var controller = ControllerImpl.createFrom(null /* currentInstance */, List.of(),
+ List.of());
+
+ assertNoAction(controller, false /* forHardware */, items);
+ assertNoAction(controller, true /* forHardware */, hardwareItems);
+ }
+
+ /** Verifies that a controller with a single item can't take any actions. */
+ @RequiresFlagsEnabled(Flags.FLAG_IME_SWITCHER_REVAMP)
+ @Test
+ public void testSingleItemList() {
+ final var items = new ArrayList<ImeSubtypeListItem>();
+ addTestImeSubtypeListItems(items, "LatinIme", "LatinIme",
+ List.of("en", "fr"), true /* supportsSwitchingToNextInputMethod */);
+
+ final var hardwareItems = new ArrayList<ImeSubtypeListItem>();
+ addTestImeSubtypeListItems(hardwareItems, "HardwareIme", "HardwareIme",
+ List.of("en", "fr"), true /* supportsSwitchingToNextInputMethod */);
+
+ final var controller = ControllerImpl.createFrom(null /* currentInstance */,
+ List.of(items.get(0)), List.of(hardwareItems.get(0)));
+
+ assertNoAction(controller, false /* forHardware */, items);
+ assertNoAction(controller, true /* forHardware */, hardwareItems);
+ }
+
+ /** Verifies that a controller can't take any actions for unknown items. */
+ @RequiresFlagsEnabled(Flags.FLAG_IME_SWITCHER_REVAMP)
+ @Test
+ public void testUnknownItems() {
+ final var items = new ArrayList<ImeSubtypeListItem>();
+ addTestImeSubtypeListItems(items, "LatinIme", "LatinIme",
+ List.of("en", "fr"), true /* supportsSwitchingToNextInputMethod */);
+ final var unknownItems = new ArrayList<ImeSubtypeListItem>();
+ addTestImeSubtypeListItems(unknownItems, "UnknownIme", "UnknownIme",
+ List.of("en", "fr"), true /* supportsSwitchingToNextInputMethod */);
+
+ final var hardwareItems = new ArrayList<ImeSubtypeListItem>();
+ addTestImeSubtypeListItems(hardwareItems, "HardwareIme", "HardwareIme",
+ List.of("en", "fr"), true /* supportsSwitchingToNextInputMethod */);
+ final var unknownHardwareItems = new ArrayList<ImeSubtypeListItem>();
+ addTestImeSubtypeListItems(unknownHardwareItems, "HardwareUnknownIme", "HardwareUnknownIme",
+ List.of("en", "fr"), true /* supportsSwitchingToNextInputMethod */);
+
+ final var controller = ControllerImpl.createFrom(null /* currentInstance */, items,
+ hardwareItems);
+
+ assertNoAction(controller, false /* forHardware */, unknownItems);
+ assertNoAction(controller, true /* forHardware */, unknownHardwareItems);
+ }
+
+ /** Verifies that the IME name does influence the comparison order. */
+ @RequiresFlagsEnabled(Flags.FLAG_IME_SWITCHER_REVAMP)
+ @Test
+ public void testCompareImeName() {
+ final var component = new ComponentName("com.example.ime", "Ime");
+ final var imeX = createTestItem(component, "ImeX", "A", "en_US", 0);
+ final var imeY = createTestItem(component, "ImeY", "A", "en_US", 0);
+
+ assertTrue("Smaller IME name should be smaller.", imeX.compareTo(imeY) < 0);
+ assertTrue("Larger IME name should be larger.", imeY.compareTo(imeX) > 0);
+ }
+
+ /** Verifies that the IME ID does influence the comparison order. */
+ @RequiresFlagsEnabled(Flags.FLAG_IME_SWITCHER_REVAMP)
+ @Test
+ public void testCompareImeId() {
+ final var component1 = new ComponentName("com.example.ime1", "Ime");
+ final var component2 = new ComponentName("com.example.ime2", "Ime");
+ final var ime1 = createTestItem(component1, "Ime", "A", "en_US", 0);
+ final var ime2 = createTestItem(component2, "Ime", "A", "en_US", 0);
+
+ assertTrue("Smaller IME ID should be smaller.", ime1.compareTo(ime2) < 0);
+ assertTrue("Larger IME ID should be larger.", ime2.compareTo(ime1) > 0);
+ }
+
+ /** Verifies that comparison on self returns an equal order. */
+ @SuppressWarnings("SelfComparison")
+ @RequiresFlagsEnabled(Flags.FLAG_IME_SWITCHER_REVAMP)
+ @Test
+ public void testCompareSelf() {
+ final var component = new ComponentName("com.example.ime", "Ime");
+ final var item = createTestItem(component, "Ime", "A", "en_US", 0);
+
+ assertEquals("Item should have the same order to itself.", 0, item.compareTo(item));
+ }
+
+ /** Verifies that comparison on an equivalent item returns an equal order. */
+ @RequiresFlagsEnabled(Flags.FLAG_IME_SWITCHER_REVAMP)
+ @Test
+ public void testCompareEquivalent() {
+ final var component = new ComponentName("com.example.ime", "Ime");
+ final var item = createTestItem(component, "Ime", "A", "en_US", 0);
+ final var equivalent = createTestItem(component, "Ime", "A", "en_US", 0);
+
+ assertEquals("Equivalent items should have the same order.", 0, item.compareTo(equivalent));
+ }
+
+ /**
+ * Verifies that the system locale and system language do not the influence comparison order.
+ */
+ @RequiresFlagsEnabled(Flags.FLAG_IME_SWITCHER_REVAMP)
+ @Test
+ public void testCompareSystemLocaleSystemLanguage() {
+ final var component = new ComponentName("com.example.ime", "Ime");
+ final var japanese = createTestItem(component, "Ime", "A", "ja_JP", 0);
+ final var systemLanguage = createTestItem(component, "Ime", "A", "en_GB", 0);
+ final var systemLocale = createTestItem(component, "Ime", "A", "en_US", 0);
+
+ assertFalse(japanese.mIsSystemLanguage);
+ assertFalse(japanese.mIsSystemLocale);
+ assertTrue(systemLanguage.mIsSystemLanguage);
+ assertFalse(systemLanguage.mIsSystemLocale);
+ assertTrue(systemLocale.mIsSystemLanguage);
+ assertTrue(systemLocale.mIsSystemLocale);
+
+ assertEquals("System language shouldn't influence comparison over non-system language.",
+ 0, japanese.compareTo(systemLanguage));
+ assertEquals("System locale shouldn't influence comparison over non-system locale.",
+ 0, japanese.compareTo(systemLocale));
+ assertEquals("System locale shouldn't influence comparison over system language.",
+ 0, systemLanguage.compareTo(systemLocale));
+ }
+
+ /** Verifies that the subtype name does not influence the comparison order. */
+ @RequiresFlagsEnabled(Flags.FLAG_IME_SWITCHER_REVAMP)
+ @Test
+ public void testCompareSubtypeName() {
+ final var component = new ComponentName("com.example.ime", "Ime");
+ final var subtypeA = createTestItem(component, "Ime", "A", "en_US", 0);
+ final var subtypeB = createTestItem(component, "Ime", "B", "en_US", 0);
+
+ assertEquals("Subtype name shouldn't influence comparison.",
+ 0, subtypeA.compareTo(subtypeB));
+ }
+
+ /** Verifies that the subtype index does not influence the comparison order. */
+ @RequiresFlagsEnabled(Flags.FLAG_IME_SWITCHER_REVAMP)
+ @Test
+ public void testCompareSubtypeIndex() {
+ final var component = new ComponentName("com.example.ime", "Ime");
+ final var subtype0 = createTestItem(component, "Ime1", "A", "en_US", 0);
+ final var subtype1 = createTestItem(component, "Ime1", "A", "en_US", 1);
+
+ assertEquals("Subtype index shouldn't influence comparison.",
+ 0, subtype0.compareTo(subtype1));
+ }
+
+ /**
+ * Verifies that the controller's next item order matches the given one, and cycles back at
+ * the end, both across all IMEs, and also per each IME. If a single item is given, verifies
+ * that no next item is returned.
+ *
+ * @param controller the controller to use for finding the next items.
+ * @param forHardware whether to find the next hardware item, or software item.
+ * @param mode the switching mode.
+ * @param forward whether to search forwards or backwards in the list.
+ * @param allItems the list of items across all IMEs.
+ * @param perImeItems the list of lists of items per IME.
+ */
+ private static void assertNextOrder(@NonNull ControllerImpl controller, boolean forHardware,
+ @SwitchMode int mode, boolean forward, @NonNull List<ImeSubtypeListItem> allItems,
+ @NonNull List<List<ImeSubtypeListItem>> perImeItems) {
+ assertNextOrder(controller, forHardware, false /* onlyCurrentIme */, mode,
+ forward, allItems);
+
+ for (var imeItems : perImeItems) {
+ assertNextOrder(controller, forHardware, true /* onlyCurrentIme */, mode,
+ forward, imeItems);
+ }
+ }
+
+ /**
+ * Verifies that the controller's next item order matches the given one, and cycles back at
+ * the end, both across all IMEs, and also per each IME. This checks the forward direction
+ * with the given items, and the backwards order with the items reversed. If a single item is
+ * given, verifies that no next item is returned.
+ *
+ * @param controller the controller to use for finding the next items.
+ * @param forHardware whether to find the next hardware item, or software item.
+ * @param mode the switching mode.
+ * @param allItems the list of items across all IMEs.
+ * @param perImeItems the list of lists of items per IME.
+ */
+ private static void assertNextOrder(@NonNull ControllerImpl controller, boolean forHardware,
+ @SwitchMode int mode, @NonNull List<ImeSubtypeListItem> allItems,
+ @NonNull List<List<ImeSubtypeListItem>> perImeItems) {
+ assertNextOrder(controller, forHardware, false /* onlyCurrentIme */, mode,
+ true /* forward */, allItems);
+ assertNextOrder(controller, forHardware, false /* onlyCurrentIme */, mode,
+ false /* forward */, allItems.reversed());
+
+ for (var imeItems : perImeItems) {
+ assertNextOrder(controller, forHardware, true /* onlyCurrentIme */, mode,
+ true /* forward */, imeItems);
+ assertNextOrder(controller, forHardware, true /* onlyCurrentIme */, mode,
+ false /* forward */, imeItems.reversed());
+ }
+ }
+
+ /**
+ * Verifies that the controller's next item order (starting from the first one in {@code items}
+ * matches the given on, and cycles back at the end. If a single item is given, verifies that
+ * no next item is returned.
+ *
+ * @param controller the controller to use for finding the next items.
+ * @param forHardware whether to find the next hardware item, or software item.
+ * @param onlyCurrentIme whether to consider only subtypes of the current input method.
+ * @param mode the switching mode.
+ * @param forward whether to search forwards or backwards in the list.
+ * @param items the list of items to verify, in the expected order.
+ */
+ private static void assertNextOrder(@NonNull ControllerImpl controller,
+ boolean forHardware, boolean onlyCurrentIme, @SwitchMode int mode, boolean forward,
+ @NonNull List<ImeSubtypeListItem> items) {
+ final int numItems = items.size();
+ if (numItems == 0) {
+ return;
+ } else if (numItems == 1) {
+ // Single item controllers should never return a next item.
+ assertNextItem(controller, forHardware, onlyCurrentIme, mode, forward, items.get(0),
+ null /* expectedNext*/);
+ return;
+ }
+
+ var item = items.get(0);
+
+ final var expectedNextItems = new ArrayList<>(items);
+ // Add first item in the last position of expected order, to ensure the order is cyclic.
+ expectedNextItems.add(item);
+
+ final var nextItems = new ArrayList<>();
+ // Add first item in the first position of actual order, to ensure the order is cyclic.
+ nextItems.add(item);
+
+ // Compute the nextItems starting from the first given item, and compare the order.
+ for (int i = 0; i < numItems; i++) {
+ item = getNextItem(controller, forHardware, onlyCurrentIme, mode, forward, item);
+ assertNotNull("Next item shouldn't be null.", item);
+ nextItems.add(item);
+ }
+
+ assertEquals("Rotation order doesn't match.", expectedNextItems, nextItems);
+ }
+
+ /**
+ * Verifies that the controller gets the expected next value from the given item.
+ *
+ * @param controller the controller to sue for finding the next value.
+ * @param forHardware whether to find the next hardware item, or software item.
+ * @param onlyCurrentIme whether to consider only subtypes of the current input method.
+ * @param mode the switching mode.
+ * @param forward whether to search forwards or backwards in the list.
+ * @param item the item to find the next value from.
+ * @param expectedNext the expected next value.
+ */
+ private static void assertNextItem(@NonNull ControllerImpl controller,
+ boolean forHardware, boolean onlyCurrentIme, @SwitchMode int mode, boolean forward,
+ @NonNull ImeSubtypeListItem item, @Nullable ImeSubtypeListItem expectedNext) {
+ final var nextItem = getNextItem(controller, forHardware, onlyCurrentIme, mode, forward,
+ item);
+ assertEquals("Next item doesn't match.", expectedNext, nextItem);
+ }
+
+ /**
+ * Gets the next value from the given item.
+ *
+ * @param controller the controller to use for finding the next value.
+ * @param forHardware whether to find the next hardware item, or software item.
+ * @param onlyCurrentIme whether to consider only subtypes of the current input method.
+ * @param mode the switching mode.
+ * @param forward whether to search forwards or backwards in the list.
+ * @param item the item to find the next value from.
+ * @return the next item found, otherwise {@code null}.
+ */
+ @Nullable
+ private static ImeSubtypeListItem getNextItem(@NonNull ControllerImpl controller,
+ boolean forHardware, boolean onlyCurrentIme, @SwitchMode int mode, boolean forward,
+ @NonNull ImeSubtypeListItem item) {
+ final var subtype = item.mSubtypeName != null
+ ? createTestSubtype(item.mSubtypeName.toString()) : null;
+ return forHardware
+ ? controller.getNextInputMethodForHardware(
+ onlyCurrentIme, item.mImi, subtype, mode, forward)
+ : controller.getNextInputMethod(
+ onlyCurrentIme, item.mImi, subtype, mode, forward);
+ }
+
+ /**
+ * Verifies that no next items can be found, and the recency cannot be updated for the
+ * given items.
+ *
+ * @param controller the controller to verify the items on.
+ * @param forHardware whether to try finding the next hardware item, or software item.
+ * @param items the list of items to verify.
+ */
+ private void assertNoAction(@NonNull ControllerImpl controller, boolean forHardware,
+ @NonNull List<ImeSubtypeListItem> items) {
+ for (var item : items) {
+ for (int mode = MODE_STATIC; mode <= MODE_AUTO; mode++) {
+ assertNextItem(controller, forHardware, false /* onlyCurrentIme */, mode,
+ false /* forward */, item, null /* expectedNext */);
+ assertNextItem(controller, forHardware, false /* onlyCurrentIme */, mode,
+ true /* forward */, item, null /* expectedNext */);
+ assertNextItem(controller, forHardware, true /* onlyCurrentIme */, mode,
+ false /* forward */, item, null /* expectedNext */);
+ assertNextItem(controller, forHardware, true /* onlyCurrentIme */, mode,
+ true /* forward */, item, null /* expectedNext */);
+ }
+
+ assertFalse("User action shouldn't have updated the recency.",
+ onUserAction(controller, item));
+ }
+ }
}
diff --git a/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/InputMethodUtilsTest.java b/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/InputMethodUtilsTest.java
index 2857619c70d3..3cf895ee7204 100644
--- a/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/InputMethodUtilsTest.java
+++ b/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/InputMethodUtilsTest.java
@@ -40,7 +40,7 @@ import android.view.inputmethod.InputMethodSubtype;
import android.view.inputmethod.InputMethodSubtype.InputMethodSubtypeBuilder;
import androidx.annotation.NonNull;
-import androidx.test.InstrumentationRegistry;
+import androidx.test.platform.app.InstrumentationRegistry;
import com.android.internal.inputmethod.StartInputFlags;
diff --git a/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/UserDataRepositoryTest.java b/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/UserDataRepositoryTest.java
index e2f3eec1a20b..d59f28b4cad2 100644
--- a/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/UserDataRepositoryTest.java
+++ b/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/UserDataRepositoryTest.java
@@ -18,23 +18,12 @@ package com.android.server.inputmethod;
import static com.google.common.truth.Truth.assertThat;
-import static org.mockito.Mockito.spy;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-
-import android.content.pm.UserInfo;
-import android.os.ConditionVariable;
-import android.os.Handler;
-import android.os.Looper;
import android.platform.test.ravenwood.RavenwoodRule;
-import com.android.server.pm.UserManagerInternal;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
-import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
@@ -52,13 +41,8 @@ public final class UserDataRepositoryTest {
.setProvideMainThread(true).build();
@Mock
- private UserManagerInternal mMockUserManagerInternal;
-
- @Mock
private InputMethodManagerService mMockInputMethodManagerService;
- private Handler mHandler;
-
private IntFunction<InputMethodBindingController> mBindingControllerFactory;
@Before
@@ -66,7 +50,6 @@ public final class UserDataRepositoryTest {
MockitoAnnotations.initMocks(this);
SecureSettingsWrapper.startTestMode();
- mHandler = new Handler(Looper.getMainLooper());
mBindingControllerFactory = new IntFunction<InputMethodBindingController>() {
@Override
@@ -81,54 +64,20 @@ public final class UserDataRepositoryTest {
SecureSettingsWrapper.endTestMode();
}
- @Test
- public void testUserDataRepository_addsNewUserInfoOnUserCreatedEvent() {
- // Create UserDataRepository and capture the user lifecycle listener
- final var captor = ArgumentCaptor.forClass(UserManagerInternal.UserLifecycleListener.class);
- final var bindingControllerFactorySpy = spy(mBindingControllerFactory);
- final var repository = new UserDataRepository(mHandler,
- mMockUserManagerInternal, bindingControllerFactorySpy);
-
- verify(mMockUserManagerInternal, times(1)).addUserLifecycleListener(captor.capture());
- final var listener = captor.getValue();
-
- // Assert that UserDataRepository is empty and then call onUserCreated
- assertThat(collectUserData(repository)).isEmpty();
- final var userInfo = new UserInfo();
- userInfo.id = ANY_USER_ID;
- listener.onUserCreated(userInfo, /* unused token */ new Object());
- waitForIdle();
-
- // Assert UserDataRepository contains the expected UserData
- final var allUserData = collectUserData(repository);
- assertThat(allUserData).hasSize(1);
- assertThat(allUserData.get(0).mUserId).isEqualTo(ANY_USER_ID);
-
- // Assert UserDataRepository called the InputMethodBindingController creator function.
- verify(bindingControllerFactorySpy).apply(ANY_USER_ID);
- assertThat(allUserData.get(0).mBindingController.getUserId()).isEqualTo(ANY_USER_ID);
- }
-
+ // TODO(b/352615651): Move this to end-to-end test.
@Test
public void testUserDataRepository_removesUserInfoOnUserRemovedEvent() {
- // Create UserDataRepository and capture the user lifecycle listener
- final var captor = ArgumentCaptor.forClass(UserManagerInternal.UserLifecycleListener.class);
- final var repository = new UserDataRepository(mHandler,
- mMockUserManagerInternal,
+ // Create UserDataRepository
+ final var repository = new UserDataRepository(
userId -> new InputMethodBindingController(userId, mMockInputMethodManagerService));
- verify(mMockUserManagerInternal, times(1)).addUserLifecycleListener(captor.capture());
- final var listener = captor.getValue();
-
// Add one UserData ...
- final var userInfo = new UserInfo();
- userInfo.id = ANY_USER_ID;
- listener.onUserCreated(userInfo, /* unused token */ new Object());
- waitForIdle();
+ final var userData = repository.getOrCreate(ANY_USER_ID);
+ assertThat(userData.mUserId).isEqualTo(ANY_USER_ID);
+
// ... and then call onUserRemoved
assertThat(collectUserData(repository)).hasSize(1);
- listener.onUserRemoved(userInfo);
- waitForIdle();
+ repository.remove(ANY_USER_ID);
// Assert UserDataRepository is now empty
assertThat(collectUserData(repository)).isEmpty();
@@ -136,13 +85,10 @@ public final class UserDataRepositoryTest {
@Test
public void testGetOrCreate() {
- final var repository = new UserDataRepository(mHandler,
- mMockUserManagerInternal, mBindingControllerFactory);
+ final var repository = new UserDataRepository(mBindingControllerFactory);
- synchronized (ImfLock.class) {
- final var userData = repository.getOrCreate(ANY_USER_ID);
- assertThat(userData.mUserId).isEqualTo(ANY_USER_ID);
- }
+ final var userData = repository.getOrCreate(ANY_USER_ID);
+ assertThat(userData.mUserId).isEqualTo(ANY_USER_ID);
final var allUserData = collectUserData(repository);
assertThat(allUserData).hasSize(1);
@@ -152,17 +98,10 @@ public final class UserDataRepositoryTest {
assertThat(allUserData.get(0).mBindingController.getUserId()).isEqualTo(ANY_USER_ID);
}
- private List<UserDataRepository.UserData> collectUserData(UserDataRepository repository) {
- final var collected = new ArrayList<UserDataRepository.UserData>();
- synchronized (ImfLock.class) {
- repository.forAllUserData(userData -> collected.add(userData));
- }
+ private List<UserData> collectUserData(UserDataRepository repository) {
+ final var collected = new ArrayList<UserData>();
+ repository.forAllUserData(userData -> collected.add(userData));
return collected;
}
- private void waitForIdle() {
- final var done = new ConditionVariable();
- mHandler.post(done::open);
- done.block();
- }
}
diff --git a/services/tests/InputMethodSystemServerTests/test-apps/SimpleTestIme/src/com/android/apps/inputmethod/simpleime/ims/InputMethodServiceWrapper.java b/services/tests/InputMethodSystemServerTests/test-apps/SimpleTestIme/src/com/android/apps/inputmethod/simpleime/ims/InputMethodServiceWrapper.java
index b706a654e3a8..67212b60f1b8 100644
--- a/services/tests/InputMethodSystemServerTests/test-apps/SimpleTestIme/src/com/android/apps/inputmethod/simpleime/ims/InputMethodServiceWrapper.java
+++ b/services/tests/InputMethodSystemServerTests/test-apps/SimpleTestIme/src/com/android/apps/inputmethod/simpleime/ims/InputMethodServiceWrapper.java
@@ -53,13 +53,14 @@ public class InputMethodServiceWrapper extends InputMethodService {
@Override
public void onStartInput(EditorInfo info, boolean restarting) {
- Log.i(TAG, "onStartInput() editor=" + info + ", restarting=" + restarting);
+ Log.i(TAG, "onStartInput() editor=" + dumpEditorInfo(info) + ", restarting=" + restarting);
super.onStartInput(info, restarting);
}
@Override
public void onStartInputView(EditorInfo info, boolean restarting) {
- Log.i(TAG, "onStartInputView() editor=" + info + ", restarting=" + restarting);
+ Log.i(TAG, "onStartInputView() editor=" + dumpEditorInfo(info)
+ + ", restarting=" + restarting);
super.onStartInputView(info, restarting);
mInputViewStarted = true;
if (mCountDownLatchForTesting != null) {
@@ -99,4 +100,14 @@ public class InputMethodServiceWrapper extends InputMethodService {
mCountDownLatchForTesting.countDown();
}
}
+
+ private String dumpEditorInfo(EditorInfo info) {
+ var sb = new StringBuilder();
+ sb.append("EditorInfo{packageName=").append(info.packageName);
+ sb.append(" fieldId=").append(info.fieldId);
+ sb.append(" hintText=").append(info.hintText);
+ sb.append(" privateImeOptions=").append(info.privateImeOptions);
+ sb.append("}");
+ return sb.toString();
+ }
}
diff --git a/services/tests/PackageManagerServiceTests/server/src/com/android/server/pm/PackageManagerSettingsTests.java b/services/tests/PackageManagerServiceTests/server/src/com/android/server/pm/PackageManagerSettingsTests.java
index 89b4aea216f9..dec463444faa 100644
--- a/services/tests/PackageManagerServiceTests/server/src/com/android/server/pm/PackageManagerSettingsTests.java
+++ b/services/tests/PackageManagerServiceTests/server/src/com/android/server/pm/PackageManagerSettingsTests.java
@@ -1027,6 +1027,96 @@ public class PackageManagerSettingsTests {
}
@Test
+ public void testWriteReadDebuggable() {
+ Settings settings = makeSettings();
+ PackageSetting packageSetting = createPackageSetting(PACKAGE_NAME_1);
+ packageSetting.setAppId(Process.FIRST_APPLICATION_UID);
+ packageSetting.setPkg(PackageImpl.forTesting(PACKAGE_NAME_1).hideAsParsed()
+ .setUid(packageSetting.getAppId())
+ .hideAsFinal());
+
+ packageSetting.setDebuggable(true);
+ settings.mPackages.put(PACKAGE_NAME_1, packageSetting);
+
+ settings.writeLPr(computer, /* sync= */ true);
+ settings.mPackages.clear();
+
+ assertThat(settings.readLPw(computer, createFakeUsers()), is(true));
+ assertThat(settings.getPackageLPr(PACKAGE_NAME_1).isDebuggable(), is(true));
+ }
+
+ @Test
+ public void testWriteReadBaseRevisionCode() {
+ Settings settings = makeSettings();
+ PackageSetting packageSetting = createPackageSetting(PACKAGE_NAME_1);
+ packageSetting.setAppId(Process.FIRST_APPLICATION_UID);
+ packageSetting.setPkg(PackageImpl.forTesting(PACKAGE_NAME_1).hideAsParsed()
+ .setUid(packageSetting.getAppId())
+ .hideAsFinal());
+
+ final int revisionCode = 311;
+ packageSetting.setBaseRevisionCode(revisionCode);
+ settings.mPackages.put(PACKAGE_NAME_1, packageSetting);
+
+ settings.writeLPr(computer, /* sync= */ true);
+ settings.mPackages.clear();
+
+ assertThat(settings.readLPw(computer, createFakeUsers()), is(true));
+ assertThat(settings.getPackageLPr(PACKAGE_NAME_1).getBaseRevisionCode(), is(revisionCode));
+ }
+
+ @Test
+ public void testHasPkg_writeReadSplitVersions() {
+ Settings settings = makeSettings();
+ PackageSetting packageSetting = createPackageSetting(PACKAGE_NAME_1);
+ packageSetting.setAppId(Process.FIRST_APPLICATION_UID);
+ packageSetting.setPkg(PackageImpl.forTesting(PACKAGE_NAME_1).hideAsParsed()
+ .setUid(packageSetting.getAppId())
+ .hideAsFinal());
+
+ final String splitOne = "one";
+ final String splitTwo = "two";
+ final int revisionOne = 311;
+ final int revisionTwo = 330;
+ packageSetting.setSplitNames(new String[] { splitOne, splitTwo});
+ packageSetting.setSplitRevisionCodes(new int[] { revisionOne, revisionTwo});
+ settings.mPackages.put(PACKAGE_NAME_1, packageSetting);
+
+ settings.writeLPr(computer, /* sync= */ true);
+ settings.mPackages.clear();
+
+ assertThat(settings.readLPw(computer, createFakeUsers()), is(true));
+ PackageSetting resultSetting = settings.getPackageLPr(PACKAGE_NAME_1);
+ assertThat(resultSetting.getSplitNames().length, is(0));
+ assertThat(resultSetting.getSplitRevisionCodes().length, is(0));
+ }
+
+ @Test
+ public void testNoPkg_writeReadSplitVersions() {
+ Settings settings = makeSettings();
+ PackageSetting packageSetting = createPackageSetting(PACKAGE_NAME_1);
+ packageSetting.setAppId(Process.FIRST_APPLICATION_UID);
+
+ final String splitOne = "one";
+ final String splitTwo = "two";
+ final int revisionOne = 311;
+ final int revisionTwo = 330;
+ packageSetting.setSplitNames(new String[] { splitOne, splitTwo});
+ packageSetting.setSplitRevisionCodes(new int[] { revisionOne, revisionTwo});
+ settings.mPackages.put(PACKAGE_NAME_1, packageSetting);
+
+ settings.writeLPr(computer, /* sync= */ true);
+ settings.mPackages.clear();
+
+ assertThat(settings.readLPw(computer, createFakeUsers()), is(true));
+ PackageSetting resultSetting = settings.getPackageLPr(PACKAGE_NAME_1);
+ assertThat(resultSetting.getSplitNames()[0], is(splitOne));
+ assertThat(resultSetting.getSplitNames()[1], is(splitTwo));
+ assertThat(resultSetting.getSplitRevisionCodes()[0], is(revisionOne));
+ assertThat(resultSetting.getSplitRevisionCodes()[1], is(revisionTwo));
+ }
+
+ @Test
public void testWriteReadArchiveState() {
Settings settings = makeSettings();
PackageSetting packageSetting = createPackageSetting(PACKAGE_NAME_1);
diff --git a/services/tests/displayservicetests/src/com/android/server/display/BrightnessThrottlerTest.java b/services/tests/displayservicetests/src/com/android/server/display/BrightnessThrottlerTest.java
index 05c243fda2b8..36baacc529d5 100644
--- a/services/tests/displayservicetests/src/com/android/server/display/BrightnessThrottlerTest.java
+++ b/services/tests/displayservicetests/src/com/android/server/display/BrightnessThrottlerTest.java
@@ -16,6 +16,8 @@
package com.android.server.display;
+import static com.android.server.display.config.DisplayDeviceConfigTestUtilsKt.createSensorData;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
@@ -301,7 +303,7 @@ public class BrightnessThrottlerTest {
new ThrottlingLevel(PowerManager.THERMAL_STATUS_CRITICAL, 0.25f);
List<ThrottlingLevel> levels = new ArrayList<>(List.of(level));
final ThermalBrightnessThrottlingData data = ThermalBrightnessThrottlingData.create(levels);
- final SensorData tempSensor = new SensorData("DISPLAY", "VIRTUAL-SKIN-DISPLAY");
+ final SensorData tempSensor = createSensorData("DISPLAY", "VIRTUAL-SKIN-DISPLAY");
final BrightnessThrottler throttler =
createThrottlerSupportedWithTempSensor(data, tempSensor);
assertTrue(throttler.deviceSupportsThrottling());
diff --git a/services/tests/displayservicetests/src/com/android/server/display/DisplayBrightnessStateTest.java b/services/tests/displayservicetests/src/com/android/server/display/DisplayBrightnessStateTest.java
index bba4c8d64c86..f690b1bbfccf 100644
--- a/services/tests/displayservicetests/src/com/android/server/display/DisplayBrightnessStateTest.java
+++ b/services/tests/displayservicetests/src/com/android/server/display/DisplayBrightnessStateTest.java
@@ -44,7 +44,7 @@ public class DisplayBrightnessStateTest {
@Test
public void validateAllDisplayBrightnessStateFieldsAreSetAsExpected() {
float brightness = 0.3f;
- float sdrBrightness = 0.2f;
+ float hdrBrightness = 0.4f;
boolean shouldUseAutoBrightness = true;
boolean shouldUpdateScreenBrightnessSetting = true;
int brightnessAdjustmentFlag = 2;
@@ -53,7 +53,7 @@ public class DisplayBrightnessStateTest {
brightnessReason.setModifier(BrightnessReason.MODIFIER_DIMMED);
DisplayBrightnessState displayBrightnessState = mDisplayBrightnessStateBuilder
.setBrightness(brightness)
- .setSdrBrightness(sdrBrightness)
+ .setHdrBrightness(hdrBrightness)
.setBrightnessReason(brightnessReason)
.setShouldUseAutoBrightness(shouldUseAutoBrightness)
.setShouldUpdateScreenBrightnessSetting(shouldUpdateScreenBrightnessSetting)
@@ -62,7 +62,7 @@ public class DisplayBrightnessStateTest {
.build();
assertEquals(displayBrightnessState.getBrightness(), brightness, FLOAT_DELTA);
- assertEquals(displayBrightnessState.getSdrBrightness(), sdrBrightness, FLOAT_DELTA);
+ assertEquals(displayBrightnessState.getHdrBrightness(), hdrBrightness, FLOAT_DELTA);
assertEquals(displayBrightnessState.getBrightnessReason(), brightnessReason);
assertEquals(displayBrightnessState.getShouldUseAutoBrightness(), shouldUseAutoBrightness);
assertEquals(shouldUpdateScreenBrightnessSetting,
@@ -78,7 +78,7 @@ public class DisplayBrightnessStateTest {
DisplayBrightnessState state1 = new DisplayBrightnessState.Builder()
.setBrightnessReason(reason)
.setBrightness(0.26f)
- .setSdrBrightness(0.23f)
+ .setHdrBrightness(0.29f)
.setShouldUseAutoBrightness(false)
.setShouldUpdateScreenBrightnessSetting(true)
.build();
@@ -91,8 +91,8 @@ public class DisplayBrightnessStateTest {
sb.append("DisplayBrightnessState:")
.append("\n brightness:")
.append(displayBrightnessState.getBrightness())
- .append("\n sdrBrightness:")
- .append(displayBrightnessState.getSdrBrightness())
+ .append("\n hdrBrightness:")
+ .append(displayBrightnessState.getHdrBrightness())
.append("\n brightnessReason:")
.append(displayBrightnessState.getBrightnessReason())
.append("\n shouldUseAutoBrightness:")
diff --git a/services/tests/displayservicetests/src/com/android/server/display/DisplayDeviceConfigTest.java b/services/tests/displayservicetests/src/com/android/server/display/DisplayDeviceConfigTest.java
index 9a25b1acfaae..d4506831d9c2 100644
--- a/services/tests/displayservicetests/src/com/android/server/display/DisplayDeviceConfigTest.java
+++ b/services/tests/displayservicetests/src/com/android/server/display/DisplayDeviceConfigTest.java
@@ -54,6 +54,7 @@ import androidx.test.filters.SmallTest;
import com.android.internal.R;
import com.android.server.display.config.HdrBrightnessData;
+import com.android.server.display.config.HighBrightnessModeData;
import com.android.server.display.config.HysteresisLevels;
import com.android.server.display.config.IdleScreenRefreshRateTimeoutLuxThresholdPoint;
import com.android.server.display.config.RefreshRateData;
@@ -436,7 +437,7 @@ public final class DisplayDeviceConfigTest {
public void testHighBrightnessModeDataFromDisplayConfig() throws IOException {
setupDisplayDeviceConfigFromDisplayConfigFile();
- DisplayDeviceConfig.HighBrightnessModeData hbmData =
+ HighBrightnessModeData hbmData =
mDisplayDeviceConfig.getHighBrightnessModeData();
assertNotNull(hbmData);
assertEquals(BRIGHTNESS[1], hbmData.transitionPoint, ZERO_DELTA);
@@ -671,14 +672,14 @@ public final class DisplayDeviceConfigTest {
HdrBrightnessData data = mDisplayDeviceConfig.getHdrBrightnessData();
assertNotNull(data);
- assertEquals(2, data.mMaxBrightnessLimits.size());
- assertEquals(13000, data.mBrightnessDecreaseDebounceMillis);
- assertEquals(0.1f, data.mScreenBrightnessRampDecrease, SMALL_DELTA);
- assertEquals(1000, data.mBrightnessIncreaseDebounceMillis);
- assertEquals(0.11f, data.mScreenBrightnessRampIncrease, SMALL_DELTA);
-
- assertEquals(0.3f, data.mMaxBrightnessLimits.get(500f), SMALL_DELTA);
- assertEquals(0.6f, data.mMaxBrightnessLimits.get(1200f), SMALL_DELTA);
+ assertEquals(2, data.maxBrightnessLimits.size());
+ assertEquals(13000, data.brightnessDecreaseDebounceMillis);
+ assertEquals(0.1f, data.screenBrightnessRampDecrease, SMALL_DELTA);
+ assertEquals(1000, data.brightnessIncreaseDebounceMillis);
+ assertEquals(0.11f, data.screenBrightnessRampIncrease, SMALL_DELTA);
+
+ assertEquals(0.3f, data.maxBrightnessLimits.get(500f), SMALL_DELTA);
+ assertEquals(0.6f, data.maxBrightnessLimits.get(1200f), SMALL_DELTA);
}
private void verifyConfigValuesFromConfigResource() {
@@ -964,6 +965,51 @@ public final class DisplayDeviceConfigTest {
assertThat(supportedModeData.vsyncRate).isEqualTo(240);
}
+ @Test
+ public void testDozeBrightness_Ddc() throws IOException {
+ when(mFlags.isDozeBrightnessFloatEnabled()).thenReturn(true);
+ setupDisplayDeviceConfigFromDisplayConfigFile();
+
+ assertArrayEquals(new float[]{ -1, 0.1f, 0.2f, 0.3f, 0.4f },
+ mDisplayDeviceConfig.getDozeBrightnessSensorValueToBrightness(), SMALL_DELTA);
+ assertEquals(0.25f, mDisplayDeviceConfig.getDefaultDozeBrightness(), SMALL_DELTA);
+ }
+
+ @Test
+ public void testDefaultDozeBrightness_FallBackToConfigXmlFloat() throws IOException {
+ setupDisplayDeviceConfigFromConfigResourceFile();
+ when(mFlags.isDozeBrightnessFloatEnabled()).thenReturn(true);
+ when(mResources.getFloat(com.android.internal.R.dimen.config_screenBrightnessDozeFloat))
+ .thenReturn(0.31f);
+ when(mResources.getInteger(com.android.internal.R.integer.config_screenBrightnessDoze))
+ .thenReturn(90);
+
+ // Empty display config file
+ setupDisplayDeviceConfigFromDisplayConfigFile(
+ "<?xml version='1.0' encoding='utf-8' standalone='yes' ?>\n"
+ + "<displayConfiguration />\n");
+
+ assertEquals(0.31f, mDisplayDeviceConfig.getDefaultDozeBrightness(), ZERO_DELTA);
+ }
+
+ @Test
+ public void testDefaultDozeBrightness_FallBackToConfigXmlInt() throws IOException {
+ setupDisplayDeviceConfigFromConfigResourceFile();
+ when(mFlags.isDozeBrightnessFloatEnabled()).thenReturn(true);
+ when(mResources.getFloat(com.android.internal.R.dimen.config_screenBrightnessDozeFloat))
+ .thenReturn(DisplayDeviceConfig.INVALID_BRIGHTNESS_IN_CONFIG);
+ when(mResources.getInteger(com.android.internal.R.integer.config_screenBrightnessDoze))
+ .thenReturn(90);
+
+ // Empty display config file
+ setupDisplayDeviceConfigFromDisplayConfigFile(
+ "<?xml version='1.0' encoding='utf-8' standalone='yes' ?>\n"
+ + "<displayConfiguration />\n");
+
+ assertEquals(brightnessIntToFloat(90),
+ mDisplayDeviceConfig.getDefaultDozeBrightness(), ZERO_DELTA);
+ }
+
private String getValidLuxThrottling() {
return "<luxThrottling>\n"
+ " <brightnessLimitMap>\n"
@@ -1707,6 +1753,16 @@ public final class DisplayDeviceConfigTest {
+ "</point>"
+ "</luxThresholds>"
+ "</idleScreenRefreshRateTimeout>"
+ + "<dozeBrightnessSensorValueToBrightness>\n"
+ + "<item>-1</item>\n"
+ + "<item>0.1</item>\n"
+ + "<item>0.2</item>\n"
+ + "<item>0.3</item>\n"
+ + "<item>0.4</item>\n"
+ + "</dozeBrightnessSensorValueToBrightness>\n"
+ + "<defaultDozeBrightness>"
+ + "0.25"
+ + "</defaultDozeBrightness>\n"
+ "</displayConfiguration>\n";
}
diff --git a/services/tests/displayservicetests/src/com/android/server/display/DisplayManagerServiceTest.java b/services/tests/displayservicetests/src/com/android/server/display/DisplayManagerServiceTest.java
index d2686372f550..2b03dc4f78ad 100644
--- a/services/tests/displayservicetests/src/com/android/server/display/DisplayManagerServiceTest.java
+++ b/services/tests/displayservicetests/src/com/android/server/display/DisplayManagerServiceTest.java
@@ -31,6 +31,7 @@ import static android.view.ContentRecordingSession.RECORD_CONTENT_TASK;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.doAnswer;
import static com.android.server.display.ExternalDisplayPolicy.ENABLE_ON_CONNECT;
import static com.android.server.display.VirtualDisplayAdapter.UNIQUE_ID_PREFIX;
+import static com.android.server.display.config.DisplayDeviceConfigTestUtilsKt.createSensorData;
import static com.google.common.truth.Truth.assertThat;
import static com.google.common.truth.Truth.assertWithMessage;
@@ -2423,7 +2424,7 @@ public class DisplayManagerServiceTest {
String testSensorType = "testType";
Sensor testSensor = TestUtils.createSensor(testSensorType, testSensorName);
- SensorData sensorData = new SensorData(testSensorType, testSensorName,
+ SensorData sensorData = createSensorData(testSensorType, testSensorName,
/* minRefreshRate= */ 10f, /* maxRefreshRate= */ 100f);
when(mMockDisplayDeviceConfig.getProximitySensor()).thenReturn(sensorData);
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 2018e1a3ae62..8ed38a6d0cad 100644
--- a/services/tests/displayservicetests/src/com/android/server/display/DisplayPowerControllerTest.java
+++ b/services/tests/displayservicetests/src/com/android/server/display/DisplayPowerControllerTest.java
@@ -21,6 +21,7 @@ import static com.android.dx.mockito.inline.extended.ExtendedMockito.verify;
import static com.android.server.display.AutomaticBrightnessController.AUTO_BRIGHTNESS_MODE_DEFAULT;
import static com.android.server.display.AutomaticBrightnessController.AUTO_BRIGHTNESS_MODE_DOZE;
import static com.android.server.display.AutomaticBrightnessController.AUTO_BRIGHTNESS_MODE_IDLE;
+import static com.android.server.display.config.DisplayDeviceConfigTestUtilsKt.createSensorData;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
@@ -83,8 +84,8 @@ import com.android.server.display.brightness.BrightnessReason;
import com.android.server.display.brightness.clamper.BrightnessClamperController;
import com.android.server.display.brightness.clamper.HdrClamper;
import com.android.server.display.color.ColorDisplayService;
+import com.android.server.display.config.HighBrightnessModeData;
import com.android.server.display.config.HysteresisLevels;
-import com.android.server.display.config.SensorData;
import com.android.server.display.feature.DisplayManagerFlags;
import com.android.server.display.feature.flags.Flags;
import com.android.server.display.layout.Layout;
@@ -116,6 +117,7 @@ public final class DisplayPowerControllerTest {
private static final String SECOND_FOLLOWER_UNIQUE_DISPLAY_ID = "unique_id_789";
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 BRIGHTNESS_RAMP_RATE_MINIMUM = 0.0f;
private static final float BRIGHTNESS_RAMP_RATE_FAST_DECREASE = 0.3f;
@@ -2050,9 +2052,6 @@ public final class DisplayPowerControllerTest {
@Test
public void testDefaultDozeBrightness() {
- float brightness = 0.121f;
- when(mPowerManagerMock.getBrightnessConstraint(
- PowerManager.BRIGHTNESS_CONSTRAINT_TYPE_DOZE)).thenReturn(brightness);
mContext.getOrCreateTestableResources().addOverride(
com.android.internal.R.bool.config_allowAutoBrightnessWhileDozing, false);
mHolder = createDisplayPowerController(DISPLAY_ID, UNIQUE_ID);
@@ -2068,15 +2067,25 @@ public final class DisplayPowerControllerTest {
mHolder.dpc.requestPowerState(dpr, /* waitForNegativeProximity= */ false);
advanceTime(1); // Run updatePowerState
- verify(mHolder.animator).animateTo(eq(brightness), /* linearSecondTarget= */ anyFloat(),
- eq(BRIGHTNESS_RAMP_RATE_FAST_INCREASE), eq(false));
+ verify(mHolder.animator).animateTo(eq(DEFAULT_DOZE_BRIGHTNESS),
+ /* linearSecondTarget= */ anyFloat(), eq(BRIGHTNESS_RAMP_RATE_FAST_INCREASE),
+ eq(false));
+
+ // The display device changes and the default doze brightness changes
+ setUpDisplay(DISPLAY_ID, "new_unique_id", mHolder.display, mock(DisplayDevice.class),
+ mHolder.config, /* isEnabled= */ true);
+ when(mHolder.config.getDefaultDozeBrightness()).thenReturn(DEFAULT_DOZE_BRIGHTNESS / 2);
+ mHolder.dpc.onDisplayChanged(mHolder.hbmMetadata, Layout.NO_LEAD_DISPLAY);
+
+ advanceTime(1); // Run updatePowerState
+
+ verify(mHolder.animator).animateTo(eq(DEFAULT_DOZE_BRIGHTNESS / 2),
+ /* linearSecondTarget= */ anyFloat(), eq(BRIGHTNESS_RAMP_RATE_FAST_INCREASE),
+ eq(false));
}
@Test
public void testDefaultDozeBrightness_ShouldNotBeUsedIfAutoBrightnessAllowedInDoze() {
- float brightness = 0.121f;
- when(mPowerManagerMock.getBrightnessConstraint(
- PowerManager.BRIGHTNESS_CONSTRAINT_TYPE_DOZE)).thenReturn(brightness);
mContext.getOrCreateTestableResources().addOverride(
com.android.internal.R.bool.config_allowAutoBrightnessWhileDozing, true);
mHolder = createDisplayPowerController(DISPLAY_ID, UNIQUE_ID);
@@ -2092,7 +2101,7 @@ public final class DisplayPowerControllerTest {
mHolder.dpc.requestPowerState(dpr, /* waitForNegativeProximity= */ false);
advanceTime(1); // Run updatePowerState
- verify(mHolder.animator, never()).animateTo(eq(brightness),
+ verify(mHolder.animator, never()).animateTo(eq(DEFAULT_DOZE_BRIGHTNESS),
/* linearSecondTarget= */ anyFloat(), /* rate= */ anyFloat(),
/* ignoreAnimationLimits= */ anyBoolean());
}
@@ -2128,6 +2137,14 @@ public final class DisplayPowerControllerTest {
private void setUpDisplay(int displayId, String uniqueId, LogicalDisplay logicalDisplayMock,
DisplayDevice displayDeviceMock, DisplayDeviceConfig displayDeviceConfigMock,
boolean isEnabled) {
+
+ setUpDisplay(displayId, uniqueId, logicalDisplayMock, displayDeviceMock,
+ displayDeviceConfigMock, isEnabled, "display_name");
+ }
+
+ private void setUpDisplay(int displayId, String uniqueId, LogicalDisplay logicalDisplayMock,
+ DisplayDevice displayDeviceMock, DisplayDeviceConfig displayDeviceConfigMock,
+ boolean isEnabled, String displayName) {
DisplayInfo info = new DisplayInfo();
DisplayDeviceInfo deviceInfo = new DisplayDeviceInfo();
deviceInfo.uniqueId = uniqueId;
@@ -2139,17 +2156,20 @@ public final class DisplayPowerControllerTest {
when(logicalDisplayMock.isInTransitionLocked()).thenReturn(false);
when(displayDeviceMock.getDisplayDeviceInfoLocked()).thenReturn(deviceInfo);
when(displayDeviceMock.getUniqueId()).thenReturn(uniqueId);
+ when(displayDeviceMock.getNameLocked()).thenReturn(displayName);
when(displayDeviceMock.getDisplayDeviceConfig()).thenReturn(displayDeviceConfigMock);
when(displayDeviceConfigMock.getProximitySensor()).thenReturn(
- new SensorData(Sensor.STRING_TYPE_PROXIMITY, null));
+ createSensorData(Sensor.STRING_TYPE_PROXIMITY));
when(displayDeviceConfigMock.getNits()).thenReturn(new float[]{2, 500});
when(displayDeviceConfigMock.isAutoBrightnessAvailable()).thenReturn(true);
when(displayDeviceConfigMock.getAmbientLightSensor()).thenReturn(
- new SensorData());
+ createSensorData());
when(displayDeviceConfigMock.getScreenOffBrightnessSensor()).thenReturn(
- new SensorData(Sensor.STRING_TYPE_LIGHT, null));
+ createSensorData(Sensor.STRING_TYPE_LIGHT));
when(displayDeviceConfigMock.getScreenOffBrightnessSensorValueToLux())
.thenReturn(new int[0]);
+ when(displayDeviceConfigMock.getDefaultDozeBrightness())
+ .thenReturn(DEFAULT_DOZE_BRIGHTNESS);
when(displayDeviceConfigMock.getBrightnessRampFastDecrease())
.thenReturn(BRIGHTNESS_RAMP_RATE_FAST_DECREASE);
@@ -2425,7 +2445,7 @@ public final class DisplayPowerControllerTest {
@Override
HighBrightnessModeController getHighBrightnessModeController(Handler handler, int width,
int height, IBinder displayToken, String displayUniqueId, float brightnessMin,
- float brightnessMax, DisplayDeviceConfig.HighBrightnessModeData hbmData,
+ float brightnessMax, HighBrightnessModeData hbmData,
HighBrightnessModeController.HdrBrightnessDeviceConfig hdrBrightnessCfg,
Runnable hbmChangeCallback, HighBrightnessModeMetadata hbmMetadata,
Context context) {
diff --git a/services/tests/displayservicetests/src/com/android/server/display/DisplayPowerProximityStateControllerTest.java b/services/tests/displayservicetests/src/com/android/server/display/DisplayPowerProximityStateControllerTest.java
index ebd6614aba14..29f07227a12d 100644
--- a/services/tests/displayservicetests/src/com/android/server/display/DisplayPowerProximityStateControllerTest.java
+++ b/services/tests/displayservicetests/src/com/android/server/display/DisplayPowerProximityStateControllerTest.java
@@ -17,6 +17,7 @@
package com.android.server.display;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.verify;
+import static com.android.server.display.config.DisplayDeviceConfigTestUtilsKt.createSensorData;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -37,7 +38,6 @@ import android.view.Display;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
-import com.android.server.display.config.SensorData;
import com.android.server.testutils.OffsettableClock;
import org.junit.Before;
@@ -75,7 +75,7 @@ public final class DisplayPowerProximityStateControllerTest {
mClock = new OffsettableClock.Stopped();
mTestLooper = new TestLooper(mClock::now);
when(mDisplayDeviceConfig.getProximitySensor()).thenReturn(
- new SensorData(Sensor.STRING_TYPE_PROXIMITY, null));
+ createSensorData(Sensor.STRING_TYPE_PROXIMITY));
setUpProxSensor();
DisplayPowerProximityStateController.Injector injector =
new DisplayPowerProximityStateController.Injector() {
@@ -165,7 +165,7 @@ public final class DisplayPowerProximityStateControllerTest {
@Test
public void isProximitySensorAvailableReturnsFalseWhenNotAvailableAndNoDefault() {
- when(mDisplayDeviceConfig.getProximitySensor()).thenReturn(new SensorData());
+ when(mDisplayDeviceConfig.getProximitySensor()).thenReturn(createSensorData());
mDisplayPowerProximityStateController = new DisplayPowerProximityStateController(
mWakelockController, mDisplayDeviceConfig, mTestLooper.getLooper(),
mNudgeUpdatePowerState, Display.DEFAULT_DISPLAY,
@@ -176,7 +176,7 @@ public final class DisplayPowerProximityStateControllerTest {
@Test
public void isProximitySensorAvailableReturnsTrueWhenNotAvailableAndHasDefault()
throws Exception {
- when(mDisplayDeviceConfig.getProximitySensor()).thenReturn(new SensorData());
+ when(mDisplayDeviceConfig.getProximitySensor()).thenReturn(createSensorData());
when(mSensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY)).thenReturn(
TestUtils.createSensor(Sensor.TYPE_PROXIMITY, "proximity"));
mDisplayPowerProximityStateController = new DisplayPowerProximityStateController(
@@ -189,7 +189,7 @@ public final class DisplayPowerProximityStateControllerTest {
@Test
public void isProximitySensorAvailableReturnsFalseWhenNotAvailableHasDefaultNonDefaultDisplay()
throws Exception {
- when(mDisplayDeviceConfig.getProximitySensor()).thenReturn(new SensorData());
+ when(mDisplayDeviceConfig.getProximitySensor()).thenReturn(createSensorData());
when(mSensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY)).thenReturn(
TestUtils.createSensor(Sensor.TYPE_PROXIMITY, "proximity"));
mDisplayPowerProximityStateController = new DisplayPowerProximityStateController(
@@ -216,7 +216,7 @@ public final class DisplayPowerProximityStateControllerTest {
public void notifyDisplayDeviceChangedReloadsTheProximitySensor() throws Exception {
DisplayDeviceConfig updatedDisplayDeviceConfig = mock(DisplayDeviceConfig.class);
when(updatedDisplayDeviceConfig.getProximitySensor()).thenReturn(
- new SensorData(Sensor.STRING_TYPE_PROXIMITY, null));
+ createSensorData(Sensor.STRING_TYPE_PROXIMITY));
Sensor newProxSensor = TestUtils.createSensor(
Sensor.TYPE_PROXIMITY, Sensor.STRING_TYPE_PROXIMITY, 4.0f);
when(mSensorManager.getSensorList(eq(Sensor.TYPE_ALL)))
diff --git a/services/tests/displayservicetests/src/com/android/server/display/HighBrightnessModeControllerTest.java b/services/tests/displayservicetests/src/com/android/server/display/HighBrightnessModeControllerTest.java
index 8e01a11cb23f..cde87b9b89b2 100644
--- a/services/tests/displayservicetests/src/com/android/server/display/HighBrightnessModeControllerTest.java
+++ b/services/tests/displayservicetests/src/com/android/server/display/HighBrightnessModeControllerTest.java
@@ -23,7 +23,6 @@ import static android.hardware.display.BrightnessInfo.HIGH_BRIGHTNESS_MODE_SUNLI
import static com.android.server.display.AutomaticBrightnessController.AUTO_BRIGHTNESS_DISABLED;
import static com.android.server.display.AutomaticBrightnessController.AUTO_BRIGHTNESS_ENABLED;
import static com.android.server.display.AutomaticBrightnessController.AUTO_BRIGHTNESS_OFF_DUE_TO_DISPLAY_STATE;
-import static com.android.server.display.DisplayDeviceConfig.HDR_PERCENT_OF_SCREEN_REQUIRED_DEFAULT;
import static com.android.server.display.HighBrightnessModeController.HBM_TRANSITION_POINT_INVALID;
import static org.junit.Assert.assertEquals;
@@ -56,8 +55,8 @@ import androidx.test.runner.AndroidJUnit4;
import com.android.internal.util.FrameworkStatsLog;
import com.android.internal.util.test.FakeSettingsProvider;
import com.android.internal.util.test.FakeSettingsProviderRule;
-import com.android.server.display.DisplayDeviceConfig.HighBrightnessModeData;
import com.android.server.display.HighBrightnessModeController.Injector;
+import com.android.server.display.config.HighBrightnessModeData;
import com.android.server.testutils.OffsettableClock;
import org.junit.Before;
@@ -77,6 +76,7 @@ public class HighBrightnessModeControllerTest {
private static final long TIME_ALLOWED_IN_WINDOW_MILLIS = 12 * 1000;
private static final long TIME_MINIMUM_AVAILABLE_TO_ENABLE_MILLIS = 5 * 1000;
private static final boolean ALLOW_IN_LOW_POWER_MODE = false;
+ private static final float HDR_PERCENT_OF_SCREEN_REQUIRED_DEFAULT = 0.5f;
private static final float DEFAULT_MIN = 0.01f;
private static final float DEFAULT_MAX = 0.80f;
@@ -103,7 +103,8 @@ public class HighBrightnessModeControllerTest {
private static final HighBrightnessModeData DEFAULT_HBM_DATA =
new HighBrightnessModeData(MINIMUM_LUX, TRANSITION_POINT, TIME_WINDOW_MILLIS,
TIME_ALLOWED_IN_WINDOW_MILLIS, TIME_MINIMUM_AVAILABLE_TO_ENABLE_MILLIS,
- ALLOW_IN_LOW_POWER_MODE, HDR_PERCENT_OF_SCREEN_REQUIRED_DEFAULT);
+ ALLOW_IN_LOW_POWER_MODE, HDR_PERCENT_OF_SCREEN_REQUIRED_DEFAULT,
+ null, null, true);
@Before
public void setUp() {
diff --git a/services/tests/displayservicetests/src/com/android/server/display/HighBrightnessModeMetadataMapperTest.java b/services/tests/displayservicetests/src/com/android/server/display/HighBrightnessModeMetadataMapperTest.java
index 7e7ccf733876..7132bc1687ca 100644
--- a/services/tests/displayservicetests/src/com/android/server/display/HighBrightnessModeMetadataMapperTest.java
+++ b/services/tests/displayservicetests/src/com/android/server/display/HighBrightnessModeMetadataMapperTest.java
@@ -22,6 +22,8 @@ import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.when;
+import com.android.server.display.config.HighBrightnessModeData;
+
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
@@ -39,7 +41,7 @@ public class HighBrightnessModeMetadataMapperTest {
private DisplayDeviceConfig mDdcMock;
@Mock
- private DisplayDeviceConfig.HighBrightnessModeData mHbmDataMock;
+ private HighBrightnessModeData mHbmDataMock;
private HighBrightnessModeMetadataMapper mHighBrightnessModeMetadataMapper;
diff --git a/services/tests/displayservicetests/src/com/android/server/display/LogicalDisplayMapperTest.java b/services/tests/displayservicetests/src/com/android/server/display/LogicalDisplayMapperTest.java
index 6d138c5b6b29..1729ad5ff19f 100644
--- a/services/tests/displayservicetests/src/com/android/server/display/LogicalDisplayMapperTest.java
+++ b/services/tests/displayservicetests/src/com/android/server/display/LogicalDisplayMapperTest.java
@@ -16,7 +16,7 @@
package com.android.server.display;
-import static android.hardware.devicestate.DeviceStateManager.INVALID_DEVICE_STATE_IDENTIFIER;
+import static android.hardware.devicestate.DeviceStateManager.INVALID_DEVICE_STATE;
import static android.view.Display.DEFAULT_DISPLAY;
import static android.view.Display.DEFAULT_DISPLAY_GROUP;
import static android.view.Display.FLAG_REAR;
@@ -62,9 +62,11 @@ import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
+import android.annotation.NonNull;
import android.app.PropertyInvalidatedCache;
import android.content.Context;
import android.content.res.Resources;
+import android.hardware.devicestate.DeviceState;
import android.os.Handler;
import android.os.IPowerManager;
import android.os.IThermalService;
@@ -103,7 +105,9 @@ import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collections;
import java.util.List;
+import java.util.Set;
@SmallTest
@RunWith(AndroidJUnit4.class)
@@ -111,9 +115,12 @@ public class LogicalDisplayMapperTest {
private static int sUniqueTestDisplayId = 0;
private static final int TIMEOUT_STATE_TRANSITION_MILLIS = 500;
private static final int FOLD_SETTLE_DELAY = 1000;
- private static final int DEVICE_STATE_CLOSED = 0;
- private static final int DEVICE_STATE_HALF_OPEN = 1;
- private static final int DEVICE_STATE_OPEN = 2;
+ private static final DeviceState DEVICE_STATE_CLOSED = createDeviceState(0, "Zero",
+ Set.of(DeviceState.PROPERTY_POWER_CONFIGURATION_TRIGGER_SLEEP), Collections.emptySet());
+ private static final DeviceState DEVICE_STATE_HALF_OPEN = createDeviceState(1, "One",
+ Set.of(DeviceState.PROPERTY_POWER_CONFIGURATION_TRIGGER_WAKE), Collections.emptySet());
+ private static final DeviceState DEVICE_STATE_OPEN = createDeviceState(2, "Two",
+ Set.of(DeviceState.PROPERTY_POWER_CONFIGURATION_TRIGGER_WAKE), Collections.emptySet());
private static final int FLAG_GO_TO_SLEEP_ON_FOLD = 0;
private static final int FLAG_GO_TO_SLEEP_FLAG_SOFT_SLEEP = 2;
private static int sNextNonDefaultDisplayId = DEFAULT_DISPLAY + 1;
@@ -703,8 +710,7 @@ public class LogicalDisplayMapperTest {
/* isInteractive= */true,
/* isBootCompleted= */true));
assertFalse(mLogicalDisplayMapper.shouldDeviceBePutToSleep(DEVICE_STATE_CLOSED,
- INVALID_DEVICE_STATE_IDENTIFIER,
- /* isInteractive= */true,
+ INVALID_DEVICE_STATE /* currentState */, /* isInteractive= */true,
/* isBootCompleted= */true));
}
@@ -932,7 +938,7 @@ public class LogicalDisplayMapperTest {
// We can only have one default display
assertEquals(DEFAULT_DISPLAY, id(display1));
- mLogicalDisplayMapper.setDeviceStateLocked(0);
+ mLogicalDisplayMapper.setDeviceStateLocked(DEVICE_STATE_CLOSED);
advanceTime(1000);
// The new state is not applied until the boot is completed
assertTrue(mLogicalDisplayMapper.getDisplayLocked(device1).isEnabledLocked());
@@ -953,7 +959,7 @@ public class LogicalDisplayMapperTest {
assertEquals("concurrent", mLogicalDisplayMapper.getDisplayLocked(device2)
.getDisplayInfoLocked().thermalBrightnessThrottlingDataId);
- mLogicalDisplayMapper.setDeviceStateLocked(1);
+ mLogicalDisplayMapper.setDeviceStateLocked(DEVICE_STATE_HALF_OPEN);
advanceTime(1000);
assertFalse(mLogicalDisplayMapper.getDisplayLocked(device1).isEnabledLocked());
assertTrue(mLogicalDisplayMapper.getDisplayLocked(device2).isEnabledLocked());
@@ -966,7 +972,7 @@ public class LogicalDisplayMapperTest {
mLogicalDisplayMapper.getDisplayLocked(device2)
.getDisplayInfoLocked().thermalBrightnessThrottlingDataId);
- mLogicalDisplayMapper.setDeviceStateLocked(2);
+ mLogicalDisplayMapper.setDeviceStateLocked(DEVICE_STATE_OPEN);
advanceTime(1000);
assertFalse(mLogicalDisplayMapper.getDisplayLocked(device1).isEnabledLocked());
assertTrue(mLogicalDisplayMapper.getDisplayLocked(device2).isEnabledLocked());
@@ -1043,7 +1049,7 @@ public class LogicalDisplayMapperTest {
// 3) Send DISPLAY_DEVICE_EVENT_CHANGE to inform the mapper of the new display state
// 4) Dispatch handler events.
mLogicalDisplayMapper.onBootCompleted();
- mLogicalDisplayMapper.setDeviceStateLocked(0);
+ mLogicalDisplayMapper.setDeviceStateLocked(DEVICE_STATE_CLOSED);
mDisplayDeviceRepo.onDisplayDeviceEvent(device3, DISPLAY_DEVICE_EVENT_CHANGED);
advanceTime(1000);
final int[] allDisplayIds = mLogicalDisplayMapper.getDisplayIdsLocked(
@@ -1073,7 +1079,7 @@ public class LogicalDisplayMapperTest {
/* includeDisabled= */ false));
// Now do it again to go back to state 1
- mLogicalDisplayMapper.setDeviceStateLocked(1);
+ mLogicalDisplayMapper.setDeviceStateLocked(DEVICE_STATE_HALF_OPEN);
mDisplayDeviceRepo.onDisplayDeviceEvent(device3, DISPLAY_DEVICE_EVENT_CHANGED);
advanceTime(1000);
final int[] threeDisplaysEnabled = mLogicalDisplayMapper.getDisplayIdsLocked(
@@ -1127,7 +1133,7 @@ public class LogicalDisplayMapperTest {
// We can only have one default display
assertEquals(DEFAULT_DISPLAY, id(display1));
- mLogicalDisplayMapper.setDeviceStateLocked(0);
+ mLogicalDisplayMapper.setDeviceStateLocked(DEVICE_STATE_CLOSED);
advanceTime(1000);
mLogicalDisplayMapper.onBootCompleted();
advanceTime(1000);
@@ -1180,13 +1186,15 @@ public class LogicalDisplayMapperTest {
Layout layout = new Layout();
createDefaultDisplay(layout, outer);
createNonDefaultDisplay(layout, inner, /* enabled= */ false, /* group= */ null);
- when(mDeviceStateToLayoutMapSpy.get(DEVICE_STATE_CLOSED)).thenReturn(layout);
+ when(mDeviceStateToLayoutMapSpy.get(DEVICE_STATE_CLOSED.getIdentifier())).thenReturn(
+ layout);
layout = new Layout();
createNonDefaultDisplay(layout, outer, /* enabled= */ false, /* group= */ null);
createDefaultDisplay(layout, inner);
- when(mDeviceStateToLayoutMapSpy.get(DEVICE_STATE_HALF_OPEN)).thenReturn(layout);
- when(mDeviceStateToLayoutMapSpy.get(DEVICE_STATE_OPEN)).thenReturn(layout);
+ when(mDeviceStateToLayoutMapSpy.get(DEVICE_STATE_HALF_OPEN.getIdentifier())).thenReturn(
+ layout);
+ when(mDeviceStateToLayoutMapSpy.get(DEVICE_STATE_OPEN.getIdentifier())).thenReturn(layout);
when(mDeviceStateToLayoutMapSpy.size()).thenReturn(4);
add(outer);
@@ -1317,6 +1325,15 @@ public class LogicalDisplayMapperTest {
assertNotEquals(DEFAULT_DISPLAY, id(displayRemoved));
}
+ private static DeviceState createDeviceState(int identifier, @NonNull String name,
+ @NonNull Set<@DeviceState.SystemDeviceStateProperties Integer> systemProperties,
+ @NonNull Set<@DeviceState.PhysicalDeviceStateProperties Integer> physicalProperties) {
+ DeviceState.Configuration deviceStateConfiguration = new DeviceState.Configuration.Builder(
+ identifier, name).setSystemProperties(systemProperties).setPhysicalProperties(
+ physicalProperties).build();
+ return new DeviceState(deviceStateConfiguration);
+ }
+
private final static class FoldableDisplayDevices {
final TestDisplayDevice mOuter;
final TestDisplayDevice mInner;
diff --git a/services/tests/displayservicetests/src/com/android/server/display/brightness/BrightnessEventTest.java b/services/tests/displayservicetests/src/com/android/server/display/brightness/BrightnessEventTest.java
index 397d77c52f68..26f6e91d29c8 100644
--- a/services/tests/displayservicetests/src/com/android/server/display/brightness/BrightnessEventTest.java
+++ b/services/tests/displayservicetests/src/com/android/server/display/brightness/BrightnessEventTest.java
@@ -43,10 +43,14 @@ public final class BrightnessEventTest {
mBrightnessEvent = new BrightnessEvent(1);
mBrightnessEvent.setReason(
getReason(BrightnessReason.REASON_DOZE, BrightnessReason.MODIFIER_LOW_POWER));
- mBrightnessEvent.setPhysicalDisplayId("test");
+ mBrightnessEvent.setPhysicalDisplayId("987654321");
+ mBrightnessEvent.setPhysicalDisplayName("display_name");
mBrightnessEvent.setDisplayState(Display.STATE_ON);
mBrightnessEvent.setDisplayPolicy(POLICY_BRIGHT);
mBrightnessEvent.setLux(100.0f);
+ mBrightnessEvent.setPercent(46.5f);
+ mBrightnessEvent.setNits(893.8f);
+ mBrightnessEvent.setUnclampedBrightness(0.65f);
mBrightnessEvent.setPreThresholdLux(150.0f);
mBrightnessEvent.setTime(System.currentTimeMillis());
mBrightnessEvent.setInitialBrightness(25.0f);
@@ -77,12 +81,13 @@ public final class BrightnessEventTest {
public void testToStringWorksAsExpected() {
String actualString = mBrightnessEvent.toString(false);
String expectedString =
- "BrightnessEvent: disp=1, physDisp=test, displayState=ON, displayPolicy=BRIGHT,"
- + " brt=0.6, initBrt=25.0, rcmdBrt=0.6, preBrt=NaN, lux=100.0, preLux=150.0,"
- + " hbmMax=0.62, hbmMode=off, rbcStrength=-1, thrmMax=0.65, powerFactor=0.2,"
- + " wasShortTermModelActive=true, flags=, reason=doze [ low_pwr ],"
- + " autoBrightness=true, strategy=" + DISPLAY_BRIGHTNESS_STRATEGY_NAME
- + ", autoBrightnessMode=idle";
+ "BrightnessEvent: brt=0.6 (46.5%), nits= 893.8, lux=100.0, reason=doze [ "
+ + "low_pwr ], strat=strategy_name, state=ON, policy=BRIGHT, flags=, "
+ + "initBrt=25.0, rcmdBrt=0.6, preBrt=NaN, preLux=150.0, "
+ + "wasShortTermModelActive=true, autoBrightness=true (idle), "
+ + "unclampedBrt=0.65, hbmMax=0.62, hbmMode=off, thrmMax=0.65, "
+ + "rbcStrength=-1, powerFactor=0.2, physDisp=display_name(987654321), "
+ + "logicalId=1";
assertEquals(expectedString, actualString);
}
diff --git a/services/tests/displayservicetests/src/com/android/server/display/brightness/clamper/BrightnessClamperControllerTest.java b/services/tests/displayservicetests/src/com/android/server/display/brightness/clamper/BrightnessClamperControllerTest.java
index e982153acbd1..0ce9233b4b6f 100644
--- a/services/tests/displayservicetests/src/com/android/server/display/brightness/clamper/BrightnessClamperControllerTest.java
+++ b/services/tests/displayservicetests/src/com/android/server/display/brightness/clamper/BrightnessClamperControllerTest.java
@@ -24,6 +24,7 @@ import static org.junit.Assert.assertFalse;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.clearInvocations;
+import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
@@ -41,8 +42,8 @@ import androidx.test.filters.SmallTest;
import androidx.test.platform.app.InstrumentationRegistry;
import com.android.server.display.DisplayBrightnessState;
-import com.android.server.display.DisplayDeviceConfig;
import com.android.server.display.brightness.BrightnessReason;
+import com.android.server.display.brightness.clamper.BrightnessClamperController.ModifiersAggregatedState;
import com.android.server.display.config.SensorData;
import com.android.server.display.feature.DeviceConfigParameterProvider;
import com.android.server.display.feature.DisplayManagerFlags;
@@ -89,6 +90,10 @@ public class BrightnessClamperControllerTest {
@Mock
private BrightnessModifier mMockModifier;
@Mock
+ private TestStatefulModifier mMockStatefulModifier;
+ @Mock
+ private TestDisplayListenerModifier mMockDisplayListenerModifier;
+ @Mock
private DisplayManagerInternal.DisplayPowerRequest mMockRequest;
@Mock
@@ -99,7 +104,8 @@ public class BrightnessClamperControllerTest {
@Before
public void setUp() throws Exception {
MockitoAnnotations.initMocks(this);
- mTestInjector = new TestInjector(List.of(mMockClamper), List.of(mMockModifier));
+ mTestInjector = new TestInjector(List.of(mMockClamper),
+ List.of(mMockModifier, mMockStatefulModifier, mMockDisplayListenerModifier));
when(mMockDisplayDeviceData.getDisplayId()).thenReturn(DISPLAY_ID);
when(mMockDisplayDeviceData.getAmbientLightSensor()).thenReturn(mMockSensorData);
@@ -168,6 +174,13 @@ public class BrightnessClamperControllerTest {
}
@Test
+ public void testOnDisplayChanged_DelegatesToDisplayListeners() {
+ mClamperController.onDisplayChanged(mMockDisplayDeviceData);
+
+ verify(mMockDisplayListenerModifier).onDisplayChanged(mMockDisplayDeviceData);
+ }
+
+ @Test
public void testOnDisplayChanged_doesNotRestartLightSensor() {
mClamperController.onDisplayChanged(mMockDisplayDeviceData);
@@ -189,6 +202,8 @@ public class BrightnessClamperControllerTest {
mClamperController.clamp(mMockRequest, initialBrightness, initialSlowChange, STATE_ON);
verify(mMockModifier).apply(eq(mMockRequest), any());
+ verify(mMockDisplayListenerModifier).apply(eq(mMockRequest), any());
+ verify(mMockStatefulModifier).apply(eq(mMockRequest), any());
}
@Test
@@ -326,11 +341,41 @@ public class BrightnessClamperControllerTest {
verify(mMockClamper).stop();
}
+ @Test
+ public void test_doesNotNotifyExternalListener_aggregatedStateNotChanged() {
+ mTestInjector.mCapturedChangeListener.onChanged();
+ mTestHandler.flush();
+
+ verify(mMockExternalListener, never()).onChanged();
+ }
+
+ @Test
+ public void test_notifiesExternalListener_aggregatedStateChanged() {
+ doAnswer((invocation) -> {
+ ModifiersAggregatedState argument = invocation.getArgument(0);
+ // we need to do changes in AggregatedState to trigger onChange
+ argument.mMaxHdrBrightness = 0.5f;
+ return null;
+ }).when(mMockStatefulModifier).applyStateChange(any());
+ mTestInjector.mCapturedChangeListener.onChanged();
+ mTestHandler.flush();
+
+ verify(mMockExternalListener).onChanged();
+ }
+
private BrightnessClamperController createBrightnessClamperController() {
return new BrightnessClamperController(mTestInjector, mTestHandler, mMockExternalListener,
mMockDisplayDeviceData, mMockContext, mFlags, mSensorManager);
}
+ interface TestDisplayListenerModifier extends BrightnessStateModifier,
+ BrightnessClamperController.DisplayDeviceDataListener {
+ }
+
+ interface TestStatefulModifier extends BrightnessStateModifier,
+ BrightnessClamperController.StatefulModifier {
+ }
+
private class TestInjector extends BrightnessClamperController.Injector {
private final List<BrightnessClamper<? super BrightnessClamperController.DisplayDeviceData>>
@@ -366,7 +411,7 @@ public class BrightnessClamperControllerTest {
@Override
List<BrightnessStateModifier> getModifiers(DisplayManagerFlags flags, Context context,
Handler handler, BrightnessClamperController.ClamperChangeListener listener,
- DisplayDeviceConfig displayDeviceConfig) {
+ BrightnessClamperController.DisplayDeviceData displayDeviceData) {
return mModifiers;
}
diff --git a/services/tests/displayservicetests/src/com/android/server/display/brightness/clamper/BrightnessThermalClamperTest.java b/services/tests/displayservicetests/src/com/android/server/display/brightness/clamper/BrightnessThermalClamperTest.java
index 34f352e7bf54..9d16594fae93 100644
--- a/services/tests/displayservicetests/src/com/android/server/display/brightness/clamper/BrightnessThermalClamperTest.java
+++ b/services/tests/displayservicetests/src/com/android/server/display/brightness/clamper/BrightnessThermalClamperTest.java
@@ -16,6 +16,8 @@
package com.android.server.display.brightness.clamper;
+import static com.android.server.display.config.DisplayDeviceConfigTestUtilsKt.createSensorData;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
@@ -189,7 +191,7 @@ public class BrightnessThermalClamperTest {
final int severity = PowerManager.THERMAL_STATUS_SEVERE;
IThermalEventListener thermalEventListener = captureSkinThermalEventListener();
// Update config to listen to display type sensor.
- final SensorData tempSensor = new SensorData("DISPLAY", "VIRTUAL-SKIN-DISPLAY");
+ final SensorData tempSensor = createSensorData("DISPLAY", "VIRTUAL-SKIN-DISPLAY");
final TestThermalData thermalData =
new TestThermalData(
DISPLAY_ID,
diff --git a/services/tests/displayservicetests/src/com/android/server/display/brightness/clamper/ClamperTestUtils.kt b/services/tests/displayservicetests/src/com/android/server/display/brightness/clamper/ClamperTestUtils.kt
new file mode 100644
index 000000000000..5fd848f6adcc
--- /dev/null
+++ b/services/tests/displayservicetests/src/com/android/server/display/brightness/clamper/ClamperTestUtils.kt
@@ -0,0 +1,44 @@
+/*
+ * 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.server.display.brightness.clamper
+
+import android.os.IBinder
+import android.view.Display
+import com.android.server.display.DisplayDeviceConfig
+import com.android.server.display.brightness.clamper.BrightnessClamperController.DisplayDeviceData
+
+fun createDisplayDeviceData(
+ displayDeviceConfig: DisplayDeviceConfig,
+ displayToken: IBinder,
+ uniqueDisplayId: String = "displayId",
+ thermalThrottlingDataId: String = "thermalId",
+ powerThrottlingDataId: String = "powerId",
+ width: Int = 100,
+ height: Int = 100,
+ displayId: Int = Display.DEFAULT_DISPLAY
+): DisplayDeviceData {
+ return DisplayDeviceData(
+ uniqueDisplayId,
+ thermalThrottlingDataId,
+ powerThrottlingDataId,
+ displayDeviceConfig,
+ width,
+ height,
+ displayToken,
+ displayId
+ )
+} \ No newline at end of file
diff --git a/services/tests/displayservicetests/src/com/android/server/display/brightness/clamper/HdrBrightnessModifierTest.kt b/services/tests/displayservicetests/src/com/android/server/display/brightness/clamper/HdrBrightnessModifierTest.kt
new file mode 100644
index 000000000000..0ed96ae52491
--- /dev/null
+++ b/services/tests/displayservicetests/src/com/android/server/display/brightness/clamper/HdrBrightnessModifierTest.kt
@@ -0,0 +1,405 @@
+/*
+ * 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.server.display.brightness.clamper
+
+import android.hardware.display.DisplayManagerInternal
+import android.os.IBinder
+import android.os.PowerManager.BRIGHTNESS_MAX
+import android.util.Spline
+import android.view.SurfaceControlHdrLayerInfoListener
+import androidx.test.filters.SmallTest
+import com.android.server.display.DisplayBrightnessState
+import com.android.server.display.DisplayBrightnessState.BRIGHTNESS_NOT_SET
+import com.android.server.display.DisplayBrightnessState.CUSTOM_ANIMATION_RATE_NOT_SET
+import com.android.server.display.DisplayDeviceConfig
+import com.android.server.display.brightness.clamper.BrightnessClamperController.ClamperChangeListener
+import com.android.server.display.brightness.clamper.BrightnessClamperController.ModifiersAggregatedState
+import com.android.server.display.brightness.clamper.HdrBrightnessModifier.DEFAULT_MAX_HDR_SDR_RATIO
+import com.android.server.display.brightness.clamper.HdrBrightnessModifier.Injector
+import com.android.server.display.config.HdrBrightnessData
+import com.android.server.display.config.createHdrBrightnessData
+import com.android.server.testutils.OffsettableClock
+import com.android.server.testutils.TestHandler
+import com.google.common.truth.Truth.assertThat
+
+import org.junit.Test
+import org.mockito.kotlin.any
+import org.mockito.kotlin.clearInvocations
+import org.mockito.kotlin.mock
+import org.mockito.kotlin.never
+import org.mockito.kotlin.verify
+import org.mockito.kotlin.whenever
+
+private const val SEND_TIME_TOLERANCE: Long = 100
+
+@SmallTest
+class HdrBrightnessModifierTest {
+
+ private val stoppedClock = OffsettableClock.Stopped()
+ private val testHandler = TestHandler(null, stoppedClock)
+ private val testInjector = TestInjector()
+ private val mockChangeListener = mock<ClamperChangeListener>()
+ private val mockDisplayDeviceConfig = mock<DisplayDeviceConfig>()
+ private val mockDisplayBinder = mock<IBinder>()
+ private val mockDisplayBinderOther = mock<IBinder>()
+ private val mockSpline = mock<Spline>()
+ private val mockRequest = mock<DisplayManagerInternal.DisplayPowerRequest>()
+
+ private lateinit var modifier: HdrBrightnessModifier
+ private val dummyData = createDisplayDeviceData(mockDisplayDeviceConfig, mockDisplayBinder)
+
+ @Test
+ fun `change listener is not called on init`() {
+ initHdrModifier()
+
+ verify(mockChangeListener, never()).onChanged()
+ }
+
+ @Test
+ fun `hdr listener registered on init if hdr data is present`() {
+ initHdrModifier()
+
+ assertThat(testInjector.registeredHdrListener).isNotNull()
+ assertThat(testInjector.registeredToken).isEqualTo(mockDisplayBinder)
+ }
+
+ @Test
+ fun `hdr listener not registered on init if hdr data is missing`() {
+ initHdrModifier(null)
+
+ testHandler.flush()
+
+ assertThat(testInjector.registeredHdrListener).isNull()
+ assertThat(testInjector.registeredToken).isNull()
+ }
+
+ @Test
+ fun `unsubscribes hdr listener when display changed with no hdr data`() {
+ initHdrModifier()
+
+ whenever(mockDisplayDeviceConfig.hdrBrightnessData).thenReturn(null)
+ modifier.onDisplayChanged(dummyData)
+ testHandler.flush()
+
+ assertThat(testInjector.registeredHdrListener).isNull()
+ assertThat(testInjector.registeredToken).isNull()
+ verify(mockChangeListener, never()).onChanged()
+ }
+
+ @Test
+ fun `resubscribes hdr listener when display changed with different token`() {
+ initHdrModifier()
+
+ modifier.onDisplayChanged(
+ createDisplayDeviceData(mockDisplayDeviceConfig, mockDisplayBinderOther))
+ testHandler.flush()
+
+ assertThat(testInjector.registeredHdrListener).isNotNull()
+ assertThat(testInjector.registeredToken).isEqualTo(mockDisplayBinderOther)
+ verify(mockChangeListener, never()).onChanged()
+ }
+
+ @Test
+ fun `test NO_HDR mode`() {
+ initHdrModifier()
+ // screen size = 10_000
+ setupDisplay(width = 100, height = 100, hdrBrightnessData = createHdrBrightnessData(
+ minimumHdrPercentOfScreenForNbm = 0.5f,
+ minimumHdrPercentOfScreenForHbm = 0.7f,
+ sdrToHdrRatioSpline = mockSpline
+ ))
+
+ // hdr size = 900
+ val desiredMaxHdrRatio = 8f
+ setupHdrLayer(width = 30, height = 30, maxHdrRatio = desiredMaxHdrRatio)
+
+ assertModifierState()
+ }
+
+ @Test
+ fun `test NBM_HDR mode`() {
+ initHdrModifier()
+ // screen size = 10_000
+ val transitionPoint = 0.55f
+ setupDisplay(width = 100, height = 100, hdrBrightnessData = createHdrBrightnessData(
+ minimumHdrPercentOfScreenForNbm = 0.5f,
+ minimumHdrPercentOfScreenForHbm = 0.7f,
+ transitionPoint = transitionPoint,
+ sdrToHdrRatioSpline = mockSpline
+ ))
+ // hdr size = 5_100
+ val desiredMaxHdrRatio = 8f
+ setupHdrLayer(width = 100, height = 51, maxHdrRatio = desiredMaxHdrRatio)
+
+ whenever(mockDisplayDeviceConfig.getHdrBrightnessFromSdr(
+ 0f, desiredMaxHdrRatio, mockSpline)).thenReturn(0.85f)
+
+ assertModifierState(
+ maxBrightness = transitionPoint,
+ hdrRatio = desiredMaxHdrRatio,
+ hdrBrightness = transitionPoint,
+ spline = mockSpline
+ )
+ }
+
+ @Test
+ fun `test HBM_HDR mode`() {
+ initHdrModifier()
+ // screen size = 10_000
+ setupDisplay(width = 100, height = 100, hdrBrightnessData = createHdrBrightnessData(
+ minimumHdrPercentOfScreenForNbm = 0.5f,
+ minimumHdrPercentOfScreenForHbm = 0.7f,
+ transitionPoint = 0.55f,
+ sdrToHdrRatioSpline = mockSpline
+ ))
+ // hdr size = 7_100
+ val desiredMaxHdrRatio = 8f
+ setupHdrLayer(width = 100, height = 71, maxHdrRatio = desiredMaxHdrRatio)
+
+ val expectedHdrBrightness = 0.92f
+ whenever(mockDisplayDeviceConfig.getHdrBrightnessFromSdr(
+ 0f, desiredMaxHdrRatio, mockSpline)).thenReturn(expectedHdrBrightness)
+
+ assertModifierState(
+ hdrRatio = desiredMaxHdrRatio,
+ hdrBrightness = expectedHdrBrightness,
+ spline = mockSpline
+ )
+ }
+
+ @Test
+ fun `test display change no HDR content`() {
+ initHdrModifier()
+ setupDisplay(width = 100, height = 100)
+ assertModifierState()
+ clearInvocations(mockChangeListener)
+ // display change, new instance of HdrBrightnessData
+ setupDisplay(width = 100, height = 100)
+
+ assertModifierState()
+ verify(mockChangeListener, never()).onChanged()
+ }
+
+ @Test
+ fun `test display change with HDR content`() {
+ initHdrModifier()
+ setupDisplay(width = 100, height = 100)
+ setupHdrLayer(width = 100, height = 100, maxHdrRatio = 5f)
+ assertModifierState(
+ hdrBrightness = 0f,
+ hdrRatio = 5f,
+ spline = mockSpline
+ )
+ clearInvocations(mockChangeListener)
+ // display change, new instance of HdrBrightnessData
+ setupDisplay(width = 100, height = 100)
+
+ assertModifierState(
+ hdrBrightness = 0f,
+ hdrRatio = 5f,
+ spline = mockSpline
+ )
+ // new instance of HdrBrightnessData received, notify listener
+ verify(mockChangeListener).onChanged()
+ }
+
+ @Test
+ fun `test ambient lux decrease above maxBrightnessLimits no HDR`() {
+ initHdrModifier()
+ modifier.setAmbientLux(1000f)
+ setupDisplay(width = 100, height = 100, hdrBrightnessData = createHdrBrightnessData(
+ maxBrightnessLimits = mapOf(Pair(500f, 0.6f))
+ ))
+
+ modifier.setAmbientLux(500f)
+ // verify debounce is not scheduled
+ assertThat(testHandler.hasMessagesOrCallbacks()).isFalse()
+
+ assertModifierState()
+ verify(mockDisplayDeviceConfig, never()).getHdrBrightnessFromSdr(any(), any(), any())
+ }
+
+ @Test
+ fun `test ambient lux decrease above maxBrightnessLimits with HDR`() {
+ initHdrModifier()
+ modifier.setAmbientLux(1000f)
+ setupDisplay(width = 200, height = 200, hdrBrightnessData = createHdrBrightnessData(
+ maxBrightnessLimits = mapOf(Pair(500f, 0.6f)),
+ sdrToHdrRatioSpline = mockSpline
+ ))
+ setupHdrLayer(width = 200, height = 200, maxHdrRatio = 8f)
+
+ modifier.setAmbientLux(500f)
+
+ // verify debounce is not scheduled
+ assertThat(testHandler.hasMessagesOrCallbacks()).isFalse()
+
+ val hdrBrightnessFromSdr = 0.83f
+ whenever(mockDisplayDeviceConfig.getHdrBrightnessFromSdr(
+ 0f, 8f, mockSpline)).thenReturn(hdrBrightnessFromSdr)
+
+ assertModifierState(
+ hdrBrightness = hdrBrightnessFromSdr,
+ spline = mockSpline,
+ hdrRatio = 8f
+ )
+ }
+
+ @Test
+ fun `test ambient lux decrease below maxBrightnessLimits no HDR`() {
+ initHdrModifier()
+ modifier.setAmbientLux(1000f)
+ setupDisplay(width = 100, height = 100, hdrBrightnessData = createHdrBrightnessData(
+ maxBrightnessLimits = mapOf(Pair(500f, 0.6f))
+ ))
+
+ modifier.setAmbientLux(499f)
+ // verify debounce is not scheduled
+ assertThat(testHandler.hasMessagesOrCallbacks()).isFalse()
+
+ assertModifierState()
+ verify(mockDisplayDeviceConfig, never()).getHdrBrightnessFromSdr(any(), any(), any())
+ }
+
+ @Test
+ fun `test ambient lux decrease below maxBrightnessLimits with HDR`() {
+ initHdrModifier()
+ modifier.setAmbientLux(1000f)
+ val maxBrightness = 0.6f
+ val brightnessDecreaseDebounceMillis = 2800L
+ val animationRate = 0.01f
+ setupDisplay(width = 200, height = 200, hdrBrightnessData = createHdrBrightnessData(
+ maxBrightnessLimits = mapOf(Pair(500f, maxBrightness)),
+ brightnessDecreaseDebounceMillis = brightnessDecreaseDebounceMillis,
+ screenBrightnessRampDecrease = animationRate,
+ sdrToHdrRatioSpline = mockSpline,
+ ))
+ setupHdrLayer(width = 200, height = 200, maxHdrRatio = 8f)
+
+ modifier.setAmbientLux(499f)
+
+ val hdrBrightnessFromSdr = 0.83f
+ whenever(mockDisplayDeviceConfig.getHdrBrightnessFromSdr(
+ 0f, 8f, mockSpline)).thenReturn(hdrBrightnessFromSdr)
+ // debounce with brightnessDecreaseDebounceMillis, no changes to the state just yet
+ assertModifierState(
+ hdrBrightness = hdrBrightnessFromSdr,
+ spline = mockSpline,
+ hdrRatio = 8f
+ )
+
+ // verify debounce is scheduled
+ assertThat(testHandler.hasMessagesOrCallbacks()).isTrue()
+ val msgInfo = testHandler.pendingMessages.peek()
+ assertSendTime(brightnessDecreaseDebounceMillis, msgInfo!!.sendTime)
+ clearInvocations(mockChangeListener)
+
+ // triggering debounce, state changes
+ testHandler.flush()
+
+ verify(mockChangeListener).onChanged()
+
+ assertModifierState(
+ hdrBrightness = maxBrightness,
+ spline = mockSpline,
+ hdrRatio = 8f,
+ maxBrightness = maxBrightness,
+ animationRate = animationRate
+ )
+ }
+
+ private fun setupHdrLayer(width: Int = 100, height: Int = 100, maxHdrRatio: Float = 0.8f) {
+ testInjector.registeredHdrListener!!.onHdrInfoChanged(
+ mockDisplayBinder, 1, width, height, 0, maxHdrRatio
+ )
+ testHandler.flush()
+ }
+
+ private fun setupDisplay(
+ width: Int = 100,
+ height: Int = 100,
+ hdrBrightnessData: HdrBrightnessData? = createHdrBrightnessData(
+ minimumHdrPercentOfScreenForNbm = 0.5f,
+ minimumHdrPercentOfScreenForHbm = 0.7f,
+ transitionPoint = 0.68f,
+ sdrToHdrRatioSpline = mockSpline
+ )
+ ) {
+ whenever(mockDisplayDeviceConfig.hdrBrightnessData).thenReturn(hdrBrightnessData)
+ modifier.onDisplayChanged(createDisplayDeviceData(
+ mockDisplayDeviceConfig, mockDisplayBinder,
+ width = width,
+ height = height
+ ))
+ testHandler.flush()
+ }
+
+ private fun initHdrModifier(hdrBrightnessData: HdrBrightnessData? = createHdrBrightnessData()) {
+ whenever(mockDisplayDeviceConfig.hdrBrightnessData).thenReturn(hdrBrightnessData)
+ modifier = HdrBrightnessModifier(testHandler, mockChangeListener, testInjector, dummyData)
+ testHandler.flush()
+ }
+
+ // MsgInfo.sendTime is calculated first by adding SystemClock.uptimeMillis()
+ // (in Handler.sendMessageDelayed) and then by subtracting SystemClock.uptimeMillis()
+ // (in TestHandler.sendMessageAtTime, there might be several milliseconds difference between
+ // SystemClock.uptimeMillis() calls, and subtracted value might be greater than added.
+ private fun assertSendTime(expectedTime: Long, sendTime: Long) {
+ assertThat(sendTime).isAtMost(expectedTime)
+ assertThat(sendTime).isGreaterThan(expectedTime - SEND_TIME_TOLERANCE)
+ }
+
+ private fun assertModifierState(
+ maxBrightness: Float = BRIGHTNESS_MAX,
+ hdrRatio: Float = DEFAULT_MAX_HDR_SDR_RATIO,
+ spline: Spline? = null,
+ hdrBrightness: Float = BRIGHTNESS_NOT_SET,
+ animationRate: Float = CUSTOM_ANIMATION_RATE_NOT_SET
+ ) {
+ val modifierState = ModifiersAggregatedState()
+ modifier.applyStateChange(modifierState)
+
+ assertThat(modifierState.mMaxHdrBrightness).isEqualTo(maxBrightness)
+ assertThat(modifierState.mMaxDesiredHdrRatio).isEqualTo(hdrRatio)
+ assertThat(modifierState.mSdrHdrRatioSpline).isEqualTo(spline)
+
+ val stateBuilder = DisplayBrightnessState.builder()
+ modifier.apply(mockRequest, stateBuilder)
+
+ assertThat(stateBuilder.hdrBrightness).isEqualTo(hdrBrightness)
+ assertThat(stateBuilder.customAnimationRate).isEqualTo(animationRate)
+ }
+
+ internal class TestInjector : Injector() {
+ var registeredHdrListener: SurfaceControlHdrLayerInfoListener? = null
+ var registeredToken: IBinder? = null
+
+ override fun registerHdrListener(
+ listener: SurfaceControlHdrLayerInfoListener, token: IBinder
+ ) {
+ registeredHdrListener = listener
+ registeredToken = token
+ }
+
+ override fun unregisterHdrListener(
+ listener: SurfaceControlHdrLayerInfoListener, token: IBinder
+ ) {
+ registeredHdrListener = null
+ registeredToken = null
+ }
+ }
+} \ No newline at end of file
diff --git a/services/tests/displayservicetests/src/com/android/server/display/brightness/clamper/HdrClamperTest.java b/services/tests/displayservicetests/src/com/android/server/display/brightness/clamper/HdrClamperTest.java
index c785ea6b1865..721285636d7a 100644
--- a/services/tests/displayservicetests/src/com/android/server/display/brightness/clamper/HdrClamperTest.java
+++ b/services/tests/displayservicetests/src/com/android/server/display/brightness/clamper/HdrClamperTest.java
@@ -34,6 +34,7 @@ import android.os.PowerManager;
import androidx.test.filters.SmallTest;
import com.android.server.display.AutomaticBrightnessController;
+import com.android.server.display.config.DisplayDeviceConfigTestUtilsKt;
import com.android.server.display.config.HdrBrightnessData;
import com.android.server.testutils.OffsettableClock;
import com.android.server.testutils.TestHandler;
@@ -54,13 +55,14 @@ public class HdrClamperTest {
private static final float FLOAT_TOLERANCE = 0.0001f;
private static final long SEND_TIME_TOLERANCE = 100;
- private static final HdrBrightnessData TEST_HDR_DATA = new HdrBrightnessData(
- Map.of(500f, 0.6f),
- /* brightnessIncreaseDebounceMillis= */ 1000,
- /* screenBrightnessRampIncrease= */ 0.02f,
- /* brightnessDecreaseDebounceMillis= */ 3000,
- /* screenBrightnessRampDecrease= */0.04f
- );
+ private static final HdrBrightnessData TEST_HDR_DATA = DisplayDeviceConfigTestUtilsKt
+ .createHdrBrightnessData(
+ Map.of(500f, 0.6f),
+ /* brightnessIncreaseDebounceMillis= */ 1000,
+ /* screenBrightnessRampIncrease= */ 0.02f,
+ /* brightnessDecreaseDebounceMillis= */ 3000,
+ /* screenBrightnessRampDecrease= */0.04f
+ );
private static final int WIDTH = 600;
private static final int HEIGHT = 800;
diff --git a/services/tests/displayservicetests/src/com/android/server/display/brightness/clamper/LightSensorControllerTest.kt b/services/tests/displayservicetests/src/com/android/server/display/brightness/clamper/LightSensorControllerTest.kt
index b742d021f2e9..f59e1275d2ce 100644
--- a/services/tests/displayservicetests/src/com/android/server/display/brightness/clamper/LightSensorControllerTest.kt
+++ b/services/tests/displayservicetests/src/com/android/server/display/brightness/clamper/LightSensorControllerTest.kt
@@ -26,6 +26,7 @@ import com.android.server.display.TestUtils
import com.android.server.display.brightness.clamper.LightSensorController.Injector
import com.android.server.display.brightness.clamper.LightSensorController.LightSensorListener
import com.android.server.display.config.SensorData
+import com.android.server.display.config.createSensorData
import com.android.server.display.utils.AmbientFilter
import org.junit.Before
import org.mockito.kotlin.any
@@ -51,7 +52,7 @@ class LightSensorControllerTest {
private val mockAmbientFilter: AmbientFilter = mock()
private val testInjector = TestInjector()
- private val dummySensorData = SensorData()
+ private val dummySensorData = createSensorData()
private lateinit var controller: LightSensorController
diff --git a/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/AutoBrightnessFallbackStrategyTest.java b/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/AutoBrightnessFallbackStrategyTest.java
index 4d5ff55cc805..bb24c0f7b18e 100644
--- a/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/AutoBrightnessFallbackStrategyTest.java
+++ b/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/AutoBrightnessFallbackStrategyTest.java
@@ -110,7 +110,6 @@ public class AutoBrightnessFallbackStrategyTest {
new DisplayBrightnessState.Builder()
.setBrightness(fallbackBrightness)
.setBrightnessReason(brightnessReason)
- .setSdrBrightness(fallbackBrightness)
.setDisplayBrightnessStrategyName(mAutoBrightnessFallbackStrategy.getName())
.build();
DisplayBrightnessState updatedDisplayBrightnessState =
diff --git a/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/AutomaticBrightnessStrategyTest.java b/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/AutomaticBrightnessStrategyTest.java
index e16377e57321..93ff9e11d52f 100644
--- a/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/AutomaticBrightnessStrategyTest.java
+++ b/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/AutomaticBrightnessStrategyTest.java
@@ -559,7 +559,6 @@ public class AutomaticBrightnessStrategyTest {
mock(DisplayManagerInternal.DisplayPowerRequest.class);
DisplayBrightnessState expectedDisplayBrightnessState = new DisplayBrightnessState.Builder()
.setBrightness(brightness)
- .setSdrBrightness(brightness)
.setBrightnessReason(brightnessReason)
.setDisplayBrightnessStrategyName(mAutomaticBrightnessStrategy.getName())
.setIsSlowChange(false)
@@ -608,7 +607,6 @@ public class AutomaticBrightnessStrategyTest {
DisplayBrightnessState expectedDisplayBrightnessState = new DisplayBrightnessState.Builder()
.setBrightness(brightness)
- .setSdrBrightness(brightness)
.setBrightnessReason(brightnessReason)
.setDisplayBrightnessStrategyName(mAutomaticBrightnessStrategy.getName())
.setIsSlowChange(false)
@@ -648,7 +646,6 @@ public class AutomaticBrightnessStrategyTest {
DisplayBrightnessState expectedDisplayBrightnessState = new DisplayBrightnessState.Builder()
.setBrightness(brightness)
- .setSdrBrightness(brightness)
.setBrightnessReason(brightnessReason)
.setDisplayBrightnessStrategyName(mAutomaticBrightnessStrategy.getName())
.setIsSlowChange(true)
@@ -688,7 +685,6 @@ public class AutomaticBrightnessStrategyTest {
DisplayBrightnessState expectedDisplayBrightnessState = new DisplayBrightnessState.Builder()
.setBrightness(brightness)
- .setSdrBrightness(brightness)
.setBrightnessReason(brightnessReason)
.setDisplayBrightnessStrategyName(mAutomaticBrightnessStrategy.getName())
.setIsSlowChange(false)
diff --git a/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/BoostBrightnessStrategyTest.java b/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/BoostBrightnessStrategyTest.java
index 353432539587..275bb3efee8e 100644
--- a/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/BoostBrightnessStrategyTest.java
+++ b/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/BoostBrightnessStrategyTest.java
@@ -55,7 +55,6 @@ public class BoostBrightnessStrategyTest {
new DisplayBrightnessState.Builder()
.setBrightness(PowerManager.BRIGHTNESS_MAX)
.setBrightnessReason(brightnessReason)
- .setSdrBrightness(PowerManager.BRIGHTNESS_MAX)
.setDisplayBrightnessStrategyName(mBoostBrightnessStrategy.getName())
.build();
DisplayBrightnessState updatedDisplayBrightnessState =
diff --git a/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/DozeBrightnessStrategyTest.java b/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/DozeBrightnessStrategyTest.java
index bd6d8be45fcb..23e447c25245 100644
--- a/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/DozeBrightnessStrategyTest.java
+++ b/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/DozeBrightnessStrategyTest.java
@@ -52,7 +52,6 @@ public class DozeBrightnessStrategyTest {
new DisplayBrightnessState.Builder()
.setBrightness(dozeScreenBrightness)
.setBrightnessReason(brightnessReason)
- .setSdrBrightness(dozeScreenBrightness)
.setDisplayBrightnessStrategyName(mDozeBrightnessModeStrategy.getName())
.build();
DisplayBrightnessState updatedDisplayBrightnessState =
diff --git a/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/FallbackBrightnessStrategyTest.java b/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/FallbackBrightnessStrategyTest.java
index 4cae35d11853..c4a579092d38 100644
--- a/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/FallbackBrightnessStrategyTest.java
+++ b/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/FallbackBrightnessStrategyTest.java
@@ -54,7 +54,6 @@ public class FallbackBrightnessStrategyTest {
new DisplayBrightnessState.Builder()
.setBrightness(currentBrightness)
.setBrightnessReason(brightnessReason)
- .setSdrBrightness(currentBrightness)
.setDisplayBrightnessStrategyName(mFallbackBrightnessStrategy.getName())
.setShouldUpdateScreenBrightnessSetting(true)
.setIsUserInitiatedChange(true)
diff --git a/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/FollowerBrightnessStrategyTest.java b/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/FollowerBrightnessStrategyTest.java
index fdaf8f6a7808..c01f96e800de 100644
--- a/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/FollowerBrightnessStrategyTest.java
+++ b/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/FollowerBrightnessStrategyTest.java
@@ -55,7 +55,6 @@ public class FollowerBrightnessStrategyTest {
new DisplayBrightnessState.Builder()
.setBrightness(brightnessToFollow)
.setBrightnessReason(brightnessReason)
- .setSdrBrightness(brightnessToFollow)
.setDisplayBrightnessStrategyName(mFollowerBrightnessStrategy.getName())
.setIsSlowChange(slowChange)
.build();
diff --git a/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/OffloadBrightnessStrategyTest.java b/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/OffloadBrightnessStrategyTest.java
index e3c276025e51..9fb2afa26ed2 100644
--- a/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/OffloadBrightnessStrategyTest.java
+++ b/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/OffloadBrightnessStrategyTest.java
@@ -66,7 +66,6 @@ public class OffloadBrightnessStrategyTest {
new DisplayBrightnessState.Builder()
.setBrightness(brightness)
.setBrightnessReason(brightnessReason)
- .setSdrBrightness(brightness)
.setDisplayBrightnessStrategyName(mOffloadBrightnessStrategy.getName())
.setShouldUpdateScreenBrightnessSetting(true)
.build();
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 ebe407b2445b..e8b4c06b9c89 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
@@ -55,7 +55,6 @@ public class OverrideBrightnessStrategyTest {
new DisplayBrightnessState.Builder()
.setBrightness(overrideBrightness)
.setBrightnessReason(brightnessReason)
- .setSdrBrightness(overrideBrightness)
.setDisplayBrightnessStrategyName(mOverrideBrightnessStrategy.getName())
.build();
DisplayBrightnessState updatedDisplayBrightnessState =
diff --git a/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/ScreenOffBrightnessStrategyTest.java b/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/ScreenOffBrightnessStrategyTest.java
index 4bad5696861f..38709ece7007 100644
--- a/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/ScreenOffBrightnessStrategyTest.java
+++ b/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/ScreenOffBrightnessStrategyTest.java
@@ -51,7 +51,6 @@ public final class ScreenOffBrightnessStrategyTest {
DisplayBrightnessState expectedDisplayBrightnessState =
new DisplayBrightnessState.Builder()
.setBrightness(PowerManager.BRIGHTNESS_OFF_FLOAT)
- .setSdrBrightness(PowerManager.BRIGHTNESS_OFF_FLOAT)
.setBrightnessReason(brightnessReason)
.setDisplayBrightnessStrategyName(mScreenOffBrightnessModeStrategy
.getName())
diff --git a/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/TemporaryBrightnessStrategyTest.java b/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/TemporaryBrightnessStrategyTest.java
index 5410a20e9d75..f523b6af426b 100644
--- a/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/TemporaryBrightnessStrategyTest.java
+++ b/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/TemporaryBrightnessStrategyTest.java
@@ -55,7 +55,6 @@ public class TemporaryBrightnessStrategyTest {
new DisplayBrightnessState.Builder()
.setBrightness(temporaryBrightness)
.setBrightnessReason(brightnessReason)
- .setSdrBrightness(temporaryBrightness)
.setDisplayBrightnessStrategyName(mTemporaryBrightnessStrategy.getName())
.build();
DisplayBrightnessState updatedDisplayBrightnessState =
diff --git a/services/tests/displayservicetests/src/com/android/server/display/config/DisplayDeviceConfigTestUtils.kt b/services/tests/displayservicetests/src/com/android/server/display/config/DisplayDeviceConfigTestUtils.kt
new file mode 100644
index 000000000000..c7580331c841
--- /dev/null
+++ b/services/tests/displayservicetests/src/com/android/server/display/config/DisplayDeviceConfigTestUtils.kt
@@ -0,0 +1,186 @@
+/*
+ * 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.server.display.config
+
+import android.util.Spline
+import android.util.Xml
+import com.android.server.display.config.HighBrightnessModeData.HDR_PERCENT_OF_SCREEN_REQUIRED_DEFAULT
+import java.io.ByteArrayInputStream
+import java.io.ByteArrayOutputStream
+import java.io.OutputStreamWriter
+import org.xmlpull.v1.XmlSerializer
+
+@JvmOverloads
+fun createSensorData(
+ type: String? = null,
+ name: String? = null,
+ minRefreshRate: Float = 0f,
+ maxRefreshRate: Float = Float.POSITIVE_INFINITY,
+ supportedModes: List<SupportedModeData> = emptyList()
+): SensorData {
+ return SensorData(type, name, minRefreshRate, maxRefreshRate, supportedModes)
+}
+
+fun createRefreshRateData(
+ defaultRefreshRate: Int = 60,
+ defaultPeakRefreshRate: Int = 60,
+ defaultRefreshRateInHbmHdr: Int = 60,
+ defaultRefreshRateInHbmSunlight: Int = 60,
+ lowPowerSupportedModes: List<SupportedModeData> = emptyList(),
+ lowLightBlockingZoneSupportedModes: List<SupportedModeData> = emptyList()
+): RefreshRateData {
+ return RefreshRateData(
+ defaultRefreshRate, defaultPeakRefreshRate,
+ defaultRefreshRateInHbmHdr, defaultRefreshRateInHbmSunlight,
+ lowPowerSupportedModes, lowLightBlockingZoneSupportedModes
+ )
+}
+
+@JvmOverloads
+fun createHdrBrightnessData(
+ maxBrightnessLimits: Map<Float, Float> = mapOf(Pair(500f, 0.6f)),
+ brightnessIncreaseDebounceMillis: Long = 1000,
+ screenBrightnessRampIncrease: Float = 0.02f,
+ brightnessDecreaseDebounceMillis: Long = 3000,
+ screenBrightnessRampDecrease: Float = 0.04f,
+ transitionPoint: Float = 0.65f,
+ minimumHdrPercentOfScreenForNbm: Float = HDR_PERCENT_OF_SCREEN_REQUIRED_DEFAULT,
+ minimumHdrPercentOfScreenForHbm: Float = HDR_PERCENT_OF_SCREEN_REQUIRED_DEFAULT,
+ allowInLowPowerMode: Boolean = false,
+ sdrToHdrRatioSpline: Spline? = null
+): HdrBrightnessData {
+ return HdrBrightnessData(
+ maxBrightnessLimits,
+ brightnessIncreaseDebounceMillis,
+ screenBrightnessRampIncrease,
+ brightnessDecreaseDebounceMillis,
+ screenBrightnessRampDecrease,
+ transitionPoint,
+ minimumHdrPercentOfScreenForNbm,
+ minimumHdrPercentOfScreenForHbm,
+ allowInLowPowerMode,
+ sdrToHdrRatioSpline
+ )
+}
+
+fun XmlSerializer.highBrightnessMode(
+ enabled: String = "true",
+ transitionPoint: String = "0.67",
+ minimumLux: String = "2500",
+ timeWindowSecs: String = "200",
+ timeMaxSecs: String = "30",
+ timeMinSecs: String = "3",
+ refreshRateRange: Pair<String, String>? = null,
+ allowInLowPowerMode: String? = null,
+ minimumHdrPercentOfScreen: String? = null,
+ sdrHdrRatioMap: List<Pair<String, String>>? = null,
+) {
+ element("highBrightnessMode") {
+ attribute("", "enabled", enabled)
+ element("transitionPoint", transitionPoint)
+ element("minimumLux", minimumLux)
+ element("timing") {
+ element("timeWindowSecs", timeWindowSecs)
+ element("timeMaxSecs", timeMaxSecs)
+ element("timeMinSecs", timeMinSecs)
+ }
+ pair("refreshRate", "minimum", "maximum", refreshRateRange)
+ element("allowInLowPowerMode", allowInLowPowerMode)
+ element("minimumHdrPercentOfScreen", minimumHdrPercentOfScreen)
+ map("sdrHdrRatioMap", "point", "sdrNits", "hdrRatio", sdrHdrRatioMap)
+ }
+}
+
+fun XmlSerializer.hdrBrightnessConfig(
+ brightnessMap: List<Pair<String, String>> = listOf(Pair("500", "0.6")),
+ brightnessIncreaseDebounceMillis: String = "1000",
+ screenBrightnessRampIncrease: String = "0.02",
+ brightnessDecreaseDebounceMillis: String = "3000",
+ screenBrightnessRampDecrease: String = "0.04",
+ minimumHdrPercentOfScreenForNbm: String? = null,
+ minimumHdrPercentOfScreenForHbm: String? = null,
+ allowInLowPowerMode: String? = null,
+ sdrHdrRatioMap: List<Pair<String, String>>? = null,
+) {
+ element("hdrBrightnessConfig") {
+ map("brightnessMap", "point", "first", "second", brightnessMap)
+ element("brightnessIncreaseDebounceMillis", brightnessIncreaseDebounceMillis)
+ element("screenBrightnessRampIncrease", screenBrightnessRampIncrease)
+ element("brightnessDecreaseDebounceMillis", brightnessDecreaseDebounceMillis)
+ element("screenBrightnessRampDecrease", screenBrightnessRampDecrease)
+ element("minimumHdrPercentOfScreenForNbm", minimumHdrPercentOfScreenForNbm)
+ element("minimumHdrPercentOfScreenForHbm", minimumHdrPercentOfScreenForHbm)
+ element("allowInLowPowerMode", allowInLowPowerMode)
+ map("sdrHdrRatioMap", "point", "first", "second", sdrHdrRatioMap)
+ }
+}
+
+fun createDisplayConfiguration(content: XmlSerializer.() -> Unit = { }): DisplayConfiguration {
+ val byteArrayOutputStream = ByteArrayOutputStream()
+ val xmlSerializer = Xml.newSerializer()
+ OutputStreamWriter(byteArrayOutputStream).use { writer ->
+ xmlSerializer.setOutput(writer)
+ xmlSerializer.startDocument("UTF-8", true)
+ xmlSerializer.startTag("", "displayConfiguration")
+ xmlSerializer.content()
+ xmlSerializer.endTag("", "displayConfiguration")
+ xmlSerializer.endDocument()
+ }
+ return XmlParser.read(ByteArrayInputStream(byteArrayOutputStream.toByteArray()))
+}
+
+private fun XmlSerializer.map(
+ rootName: String,
+ nodeName: String,
+ keyName: String,
+ valueName: String,
+ map: List<Pair<String, String>>?
+) {
+ map?.let { m ->
+ element(rootName) {
+ m.forEach { e -> pair(nodeName, keyName, valueName, e) }
+ }
+ }
+}
+
+private fun XmlSerializer.pair(
+ nodeName: String,
+ keyName: String,
+ valueName: String,
+ pair: Pair<String, String>?
+) {
+ pair?.let {
+ element(nodeName) {
+ element(keyName, pair.first)
+ element(valueName, pair.second)
+ }
+ }
+}
+
+private fun XmlSerializer.element(name: String, content: String?) {
+ if (content != null) {
+ startTag("", name)
+ text(content)
+ endTag("", name)
+ }
+}
+
+private fun XmlSerializer.element(name: String, content: XmlSerializer.() -> Unit) {
+ startTag("", name)
+ content()
+ endTag("", name)
+} \ No newline at end of file
diff --git a/services/tests/displayservicetests/src/com/android/server/display/config/HdrBrightnessDataTest.kt b/services/tests/displayservicetests/src/com/android/server/display/config/HdrBrightnessDataTest.kt
new file mode 100644
index 000000000000..917c681a0d95
--- /dev/null
+++ b/services/tests/displayservicetests/src/com/android/server/display/config/HdrBrightnessDataTest.kt
@@ -0,0 +1,169 @@
+/*
+ * 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.server.display.config
+
+import android.os.PowerManager
+import android.util.Spline.createSpline
+import androidx.test.filters.SmallTest
+import com.android.server.display.DisplayBrightnessState
+import com.android.server.display.config.HighBrightnessModeData.HDR_PERCENT_OF_SCREEN_REQUIRED_DEFAULT
+import com.google.common.truth.Truth.assertThat
+import org.junit.Test
+
+@SmallTest
+class HdrBrightnessDataTest {
+
+ @Test
+ fun `test HdrBrightnessData default configuration`() {
+ val displayConfiguration = createDisplayConfiguration {
+ hdrBrightnessConfig(
+ brightnessDecreaseDebounceMillis = "3000",
+ screenBrightnessRampDecrease = "0.05",
+ brightnessIncreaseDebounceMillis = "2000",
+ screenBrightnessRampIncrease = "0.03",
+ brightnessMap = listOf(Pair("500", "0.6"), Pair("600", "0.7")),
+ minimumHdrPercentOfScreenForNbm = null,
+ minimumHdrPercentOfScreenForHbm = null,
+ allowInLowPowerMode = null,
+ sdrHdrRatioMap = null,
+ )
+ }
+
+ val hdrBrightnessData = HdrBrightnessData.loadConfig(displayConfiguration) { 0.6f }
+ assertThat(hdrBrightnessData).isNotNull()
+
+ assertThat(hdrBrightnessData!!.brightnessDecreaseDebounceMillis).isEqualTo(3000)
+ assertThat(hdrBrightnessData.screenBrightnessRampDecrease).isEqualTo(0.05f)
+ assertThat(hdrBrightnessData.brightnessIncreaseDebounceMillis).isEqualTo(2000)
+ assertThat(hdrBrightnessData.screenBrightnessRampIncrease).isEqualTo(0.03f)
+
+ assertThat(hdrBrightnessData.maxBrightnessLimits).hasSize(2)
+ assertThat(hdrBrightnessData.maxBrightnessLimits).containsEntry(500f, 0.6f)
+ assertThat(hdrBrightnessData.maxBrightnessLimits).containsEntry(600f, 0.7f)
+
+ assertThat(hdrBrightnessData.hbmTransitionPoint).isEqualTo(PowerManager.BRIGHTNESS_MAX)
+ assertThat(hdrBrightnessData.minimumHdrPercentOfScreenForNbm).isEqualTo(
+ HDR_PERCENT_OF_SCREEN_REQUIRED_DEFAULT
+ )
+ assertThat(hdrBrightnessData.minimumHdrPercentOfScreenForHbm).isEqualTo(
+ HDR_PERCENT_OF_SCREEN_REQUIRED_DEFAULT
+ )
+ assertThat(hdrBrightnessData.allowInLowPowerMode).isFalse()
+ assertThat(hdrBrightnessData.sdrToHdrRatioSpline).isNull()
+ }
+
+ @Test
+ fun `test HdrBrightnessData fallback configuration`() {
+ val displayConfiguration = createDisplayConfiguration {
+ hdrBrightnessConfig(
+ minimumHdrPercentOfScreenForNbm = null,
+ minimumHdrPercentOfScreenForHbm = null,
+ allowInLowPowerMode = null,
+ sdrHdrRatioMap = null,
+ )
+ highBrightnessMode(
+ minimumHdrPercentOfScreen = "0.2",
+ sdrHdrRatioMap = listOf(Pair("2.0", "4.0"), Pair("5.0", "8.0"))
+ )
+ }
+
+ val transitionPoint = 0.6f
+ val hdrBrightnessData =
+ HdrBrightnessData.loadConfig(displayConfiguration) { transitionPoint }
+ assertThat(hdrBrightnessData).isNotNull()
+
+ assertThat(hdrBrightnessData!!.hbmTransitionPoint).isEqualTo(transitionPoint)
+ assertThat(hdrBrightnessData.minimumHdrPercentOfScreenForNbm).isEqualTo(0.2f)
+ assertThat(hdrBrightnessData.minimumHdrPercentOfScreenForHbm).isEqualTo(0.2f)
+ assertThat(hdrBrightnessData.allowInLowPowerMode).isFalse()
+
+ val expectedSpline = createSpline(floatArrayOf(2.0f, 5.0f), floatArrayOf(4.0f, 8.0f))
+ assertThat(hdrBrightnessData.sdrToHdrRatioSpline.toString())
+ .isEqualTo(expectedSpline.toString())
+ }
+
+ @Test
+ fun `test HdrBrightnessData fallback configuration no hdrBrightnessConfig`() {
+ val displayConfiguration = createDisplayConfiguration {
+ highBrightnessMode(
+ minimumHdrPercentOfScreen = "0.2",
+ sdrHdrRatioMap = listOf(Pair("2.0", "4.0"), Pair("5.0", "8.0"))
+ )
+ }
+
+ val transitionPoint = 0.6f
+ val hdrBrightnessData =
+ HdrBrightnessData.loadConfig(displayConfiguration) { transitionPoint }
+ assertThat(hdrBrightnessData).isNotNull()
+
+ assertThat(hdrBrightnessData!!.brightnessDecreaseDebounceMillis).isEqualTo(0)
+ assertThat(hdrBrightnessData.screenBrightnessRampDecrease)
+ .isEqualTo(DisplayBrightnessState.CUSTOM_ANIMATION_RATE_NOT_SET)
+ assertThat(hdrBrightnessData.brightnessIncreaseDebounceMillis).isEqualTo(0)
+ assertThat(hdrBrightnessData.screenBrightnessRampIncrease)
+ .isEqualTo(DisplayBrightnessState.CUSTOM_ANIMATION_RATE_NOT_SET)
+
+ assertThat(hdrBrightnessData.maxBrightnessLimits).hasSize(0)
+
+ assertThat(hdrBrightnessData.hbmTransitionPoint).isEqualTo(transitionPoint)
+ assertThat(hdrBrightnessData.minimumHdrPercentOfScreenForNbm).isEqualTo(0.2f)
+ assertThat(hdrBrightnessData.minimumHdrPercentOfScreenForHbm).isEqualTo(0.2f)
+ assertThat(hdrBrightnessData.allowInLowPowerMode).isFalse()
+
+ val expectedSpline = createSpline(floatArrayOf(2.0f, 5.0f), floatArrayOf(4.0f, 8.0f))
+ assertThat(hdrBrightnessData.sdrToHdrRatioSpline.toString())
+ .isEqualTo(expectedSpline.toString())
+ }
+
+ @Test
+ fun `test HdrBrightnessData configuration no configuration`() {
+ val displayConfiguration = createDisplayConfiguration()
+
+ val hdrBrightnessData = HdrBrightnessData.loadConfig(displayConfiguration) { 0.6f }
+ assertThat(hdrBrightnessData).isNull()
+ }
+
+ @Test
+ fun `test HdrBrightnessData real configuration`() {
+ val displayConfiguration = createDisplayConfiguration {
+ hdrBrightnessConfig(
+ minimumHdrPercentOfScreenForNbm = "0.3",
+ minimumHdrPercentOfScreenForHbm = "0.6",
+ allowInLowPowerMode = "true",
+ sdrHdrRatioMap = listOf(Pair("3.0", "5.0"), Pair("6.0", "8.0"))
+ )
+ highBrightnessMode(
+ minimumHdrPercentOfScreen = "0.2",
+ sdrHdrRatioMap = listOf(Pair("2.0", "4.0"), Pair("5.0", "8.0"))
+ )
+ }
+
+ val transitionPoint = 0.6f
+ val hdrBrightnessData =
+ HdrBrightnessData.loadConfig(displayConfiguration) { transitionPoint }
+ assertThat(hdrBrightnessData).isNotNull()
+
+ assertThat(hdrBrightnessData!!.hbmTransitionPoint).isEqualTo(transitionPoint)
+ assertThat(hdrBrightnessData.minimumHdrPercentOfScreenForNbm).isEqualTo(0.3f)
+ assertThat(hdrBrightnessData.minimumHdrPercentOfScreenForHbm).isEqualTo(0.6f)
+ assertThat(hdrBrightnessData.allowInLowPowerMode).isTrue()
+
+ val expectedSpline = createSpline(floatArrayOf(3.0f, 6.0f), floatArrayOf(5.0f, 8.0f))
+ assertThat(hdrBrightnessData.sdrToHdrRatioSpline.toString())
+ .isEqualTo(expectedSpline.toString())
+ }
+} \ No newline at end of file
diff --git a/services/tests/displayservicetests/src/com/android/server/display/mode/BrightnessObserverTest.kt b/services/tests/displayservicetests/src/com/android/server/display/mode/BrightnessObserverTest.kt
index 95702aa1bce1..3c77ec925078 100644
--- a/services/tests/displayservicetests/src/com/android/server/display/mode/BrightnessObserverTest.kt
+++ b/services/tests/displayservicetests/src/com/android/server/display/mode/BrightnessObserverTest.kt
@@ -25,6 +25,7 @@ import androidx.test.filters.SmallTest
import com.android.server.display.DisplayDeviceConfig
import com.android.server.display.config.RefreshRateData
import com.android.server.display.config.SupportedModeData
+import com.android.server.display.config.createRefreshRateData
import com.android.server.display.feature.DisplayManagerFlags
import com.android.server.display.mode.DisplayModeDirector.DisplayDeviceConfigProvider
import com.android.server.testutils.TestHandler
diff --git a/services/tests/displayservicetests/src/com/android/server/display/mode/SettingsObserverTest.kt b/services/tests/displayservicetests/src/com/android/server/display/mode/SettingsObserverTest.kt
index e431c8c3555c..4fc574a77571 100644
--- a/services/tests/displayservicetests/src/com/android/server/display/mode/SettingsObserverTest.kt
+++ b/services/tests/displayservicetests/src/com/android/server/display/mode/SettingsObserverTest.kt
@@ -29,6 +29,7 @@ import com.android.internal.util.test.FakeSettingsProvider
import com.android.server.display.DisplayDeviceConfig
import com.android.server.display.config.RefreshRateData
import com.android.server.display.config.SupportedModeData
+import com.android.server.display.config.createRefreshRateData
import com.android.server.display.feature.DisplayManagerFlags
import com.android.server.display.mode.DisplayModeDirector.DisplayDeviceConfigProvider
import com.android.server.display.mode.SupportedRefreshRatesVote.RefreshRates
diff --git a/services/tests/displayservicetests/src/com/android/server/display/mode/TestUtils.kt b/services/tests/displayservicetests/src/com/android/server/display/mode/TestUtils.kt
index 5b07166d63e4..0b34fce18a1b 100644
--- a/services/tests/displayservicetests/src/com/android/server/display/mode/TestUtils.kt
+++ b/services/tests/displayservicetests/src/com/android/server/display/mode/TestUtils.kt
@@ -16,9 +16,6 @@
package com.android.server.display.mode
-import com.android.server.display.config.RefreshRateData
-import com.android.server.display.config.SupportedModeData
-
internal fun createVotesSummary(
isDisplayResolutionRangeVotingEnabled: Boolean = true,
supportedModesVoteEnabled: Boolean = true,
@@ -29,15 +26,3 @@ internal fun createVotesSummary(
loggingEnabled, supportsFrameRateOverride)
}
-fun createRefreshRateData(
- defaultRefreshRate: Int = 60,
- defaultPeakRefreshRate: Int = 60,
- defaultRefreshRateInHbmHdr: Int = 60,
- defaultRefreshRateInHbmSunlight: Int = 60,
- lowPowerSupportedModes: List<SupportedModeData> = emptyList(),
- lowLightBlockingZoneSupportedModes: List<SupportedModeData> = emptyList()
-): RefreshRateData {
- return RefreshRateData(defaultRefreshRate, defaultPeakRefreshRate,
- defaultRefreshRateInHbmHdr, defaultRefreshRateInHbmSunlight,
- lowPowerSupportedModes, lowLightBlockingZoneSupportedModes)
-}
diff --git a/services/tests/displayservicetests/src/com/android/server/display/utils/SensorUtilsTest.java b/services/tests/displayservicetests/src/com/android/server/display/utils/SensorUtilsTest.java
index 6e2d954c05a8..c0f5e7a69af7 100644
--- a/services/tests/displayservicetests/src/com/android/server/display/utils/SensorUtilsTest.java
+++ b/services/tests/displayservicetests/src/com/android/server/display/utils/SensorUtilsTest.java
@@ -16,6 +16,8 @@
package com.android.server.display.utils;
+import static com.android.server.display.config.DisplayDeviceConfigTestUtilsKt.createSensorData;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.mockito.Mockito.when;
@@ -65,7 +67,7 @@ public class SensorUtilsTest {
@Test
public void testNoSensorManager() {
- Sensor result = SensorUtils.findSensor(null, new SensorData(), Sensor.TYPE_LIGHT);
+ Sensor result = SensorUtils.findSensor(null, createSensorData(), Sensor.TYPE_LIGHT);
assertNull(result);
}
@@ -123,7 +125,7 @@ public class SensorUtilsTest {
when(mSensorManager.getSensorList(Sensor.TYPE_ALL)).thenReturn(allSensors);
when(mSensorManager.getDefaultSensor(fallbackType)).thenReturn(defaultSensor);
- SensorData sensorData = new SensorData(sensorType, sensorName);
+ SensorData sensorData = createSensorData(sensorType, sensorName);
Sensor result = SensorUtils.findSensor(mSensorManager, sensorData, fallbackType);
diff --git a/services/tests/dreamservicetests/src/com/android/server/dreams/DreamAccessibilityTest.java b/services/tests/dreamservicetests/src/com/android/server/dreams/DreamAccessibilityTest.java
index 99968d5117c7..9da695a4effb 100644
--- a/services/tests/dreamservicetests/src/com/android/server/dreams/DreamAccessibilityTest.java
+++ b/services/tests/dreamservicetests/src/com/android/server/dreams/DreamAccessibilityTest.java
@@ -19,10 +19,12 @@ package com.android.server.dreams;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.argThat;
-import static org.mockito.Mockito.clearInvocations;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.mock;
+
import android.content.Context;
import android.content.res.Resources;
@@ -44,9 +46,6 @@ import org.mockito.Captor;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
-import java.util.ArrayList;
-import java.util.Collections;
-
@SmallTest
@RunWith(AndroidJUnit4.class)
public class DreamAccessibilityTest {
@@ -73,7 +72,8 @@ public class DreamAccessibilityTest {
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
- mDreamAccessibility = new DreamAccessibility(mContext, mView);
+ Runnable mDismissCallback = () -> {};
+ mDreamAccessibility = new DreamAccessibility(mContext, mView, mDismissCallback);
when(mContext.getResources()).thenReturn(mResources);
when(mResources.getString(R.string.dream_accessibility_action_click))
@@ -84,80 +84,55 @@ public class DreamAccessibilityTest {
*/
@Test
public void testConfigureAccessibilityActions() {
- when(mAccessibilityNodeInfo.getActionList()).thenReturn(new ArrayList<>());
+ when(mView.getAccessibilityDelegate()).thenReturn(null);
- mDreamAccessibility.updateAccessibilityConfiguration(false);
+ mDreamAccessibility.updateAccessibilityConfiguration();
verify(mView).setAccessibilityDelegate(mAccessibilityDelegateArgumentCaptor.capture());
- View.AccessibilityDelegate capturedDelegate =
- mAccessibilityDelegateArgumentCaptor.getValue();
+ View.AccessibilityDelegate capturedDelegate = mAccessibilityDelegateArgumentCaptor
+ .getValue();
capturedDelegate.onInitializeAccessibilityNodeInfo(mView, mAccessibilityNodeInfo);
verify(mAccessibilityNodeInfo).addAction(argThat(action ->
- action.getId() == AccessibilityNodeInfo.ACTION_CLICK
+ action.getId() == AccessibilityNodeInfo.ACTION_DISMISS
&& TextUtils.equals(action.getLabel(), CUSTOM_ACTION)));
}
/**
- * Test to verify the configuration of accessibility actions within a view delegate,
- * specifically checking the removal of an existing click action and addition
- * of a new custom action.
+ * Test to verify no accessibility configuration is added if one exist.
*/
@Test
- public void testConfigureAccessibilityActions_RemovesExistingClickAction() {
- AccessibilityNodeInfo.AccessibilityAction existingAction =
- new AccessibilityNodeInfo.AccessibilityAction(AccessibilityNodeInfo.ACTION_CLICK,
- EXISTING_ACTION);
- when(mAccessibilityNodeInfo.getActionList())
- .thenReturn(Collections.singletonList(existingAction));
-
- mDreamAccessibility.updateAccessibilityConfiguration(false);
-
- verify(mView).setAccessibilityDelegate(mAccessibilityDelegateArgumentCaptor.capture());
- View.AccessibilityDelegate capturedDelegate =
- mAccessibilityDelegateArgumentCaptor.getValue();
-
- capturedDelegate.onInitializeAccessibilityNodeInfo(mView, mAccessibilityNodeInfo);
+ public void testNotAddingDuplicateAccessibilityConfiguration() {
+ View.AccessibilityDelegate existingDelegate = mock(View.AccessibilityDelegate.class);
+ when(mView.getAccessibilityDelegate()).thenReturn(existingDelegate);
- verify(mAccessibilityNodeInfo).removeAction(existingAction);
- verify(mAccessibilityNodeInfo).addAction(argThat(action ->
- action.getId() == AccessibilityNodeInfo.ACTION_CLICK
- && TextUtils.equals(action.getLabel(), CUSTOM_ACTION)));
+ mDreamAccessibility.updateAccessibilityConfiguration();
+ verify(mView, never()).setAccessibilityDelegate(any());
}
/**
- * Test to verify the removal of a custom accessibility action within a view delegate.
+ * Test to verify dismiss callback is called
*/
@Test
- public void testRemoveCustomAccessibilityAction() {
+ public void testPerformAccessibilityAction() {
+ Runnable mockDismissCallback = mock(Runnable.class);
+ DreamAccessibility dreamAccessibility = new DreamAccessibility(mContext,
+ mView, mockDismissCallback);
- AccessibilityNodeInfo.AccessibilityAction existingAction =
- new AccessibilityNodeInfo.AccessibilityAction(AccessibilityNodeInfo.ACTION_CLICK,
- EXISTING_ACTION);
- when(mAccessibilityNodeInfo.getActionList())
- .thenReturn(Collections.singletonList(existingAction));
+ dreamAccessibility.updateAccessibilityConfiguration();
- mDreamAccessibility.updateAccessibilityConfiguration(false);
verify(mView).setAccessibilityDelegate(mAccessibilityDelegateArgumentCaptor.capture());
- View.AccessibilityDelegate capturedDelegate =
- mAccessibilityDelegateArgumentCaptor.getValue();
- when(mView.getAccessibilityDelegate()).thenReturn(capturedDelegate);
- clearInvocations(mView);
+ View.AccessibilityDelegate capturedDelegate = mAccessibilityDelegateArgumentCaptor
+ .getValue();
- mDreamAccessibility.updateAccessibilityConfiguration(true);
- verify(mView).setAccessibilityDelegate(null);
- }
+ boolean result = capturedDelegate.performAccessibilityAction(mView,
+ AccessibilityNodeInfo.ACTION_DISMISS, null);
- /**
- * Test to verify the removal of custom accessibility action is not called if delegate is not
- * set by the dreamService.
- */
- @Test
- public void testRemoveCustomAccessibility_DoesNotRemoveDelegateNotSetByDreamAccessibility() {
- mDreamAccessibility.updateAccessibilityConfiguration(true);
- verify(mView, never()).setAccessibilityDelegate(any());
+ assertTrue(result);
+ verify(mockDismissCallback).run();
}
+
}
diff --git a/services/tests/mockingservicestests/Android.bp b/services/tests/mockingservicestests/Android.bp
index 4149e44a2ee9..5b2c0c651058 100644
--- a/services/tests/mockingservicestests/Android.bp
+++ b/services/tests/mockingservicestests/Android.bp
@@ -53,6 +53,7 @@ android_test {
"mockingservicestests-utils-mockito",
"mockito-target-extended-minus-junit4",
"platform-compat-test-rules",
+ "platform-parametric-runner-lib",
"platform-test-annotations",
"PlatformProperties",
"service-blobstore",
diff --git a/services/tests/mockingservicestests/src/com/android/server/alarm/UserWakeupStoreTest.java b/services/tests/mockingservicestests/src/com/android/server/alarm/UserWakeupStoreTest.java
index 72883e269a65..5bd919f28e6a 100644
--- a/services/tests/mockingservicestests/src/com/android/server/alarm/UserWakeupStoreTest.java
+++ b/services/tests/mockingservicestests/src/com/android/server/alarm/UserWakeupStoreTest.java
@@ -23,6 +23,7 @@ import static com.android.server.alarm.UserWakeupStore.USER_START_TIME_DEVIATION
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
+import static org.testng.AssertJUnit.assertFalse;
import android.os.Environment;
import android.os.FileUtils;
@@ -51,6 +52,7 @@ public class UserWakeupStoreTest {
private static final int USER_ID_1 = 10;
private static final int USER_ID_2 = 11;
private static final int USER_ID_3 = 12;
+ private static final int USER_ID_SYSTEM = 0;
private static final long TEST_TIMESTAMP = 150_000;
private static final File TEST_SYSTEM_DIR = new File(InstrumentationRegistry
.getInstrumentation().getContext().getDataDir(), "alarmsTestDir");
@@ -110,6 +112,14 @@ public class UserWakeupStoreTest {
}
@Test
+ public void testAddWakeupForSystemUser_shouldDoNothing() {
+ mUserWakeupStore.addUserWakeup(USER_ID_SYSTEM, TEST_TIMESTAMP - 19_000);
+ assertEquals(0, mUserWakeupStore.getUserIdsToWakeup(TEST_TIMESTAMP).length);
+ final File file = new File(ROOT_DIR , "usersWithAlarmClocks.xml");
+ assertFalse(file.exists());
+ }
+
+ @Test
public void testAddMultipleWakeupsForUser_ensureOnlyLastWakeupRemains() {
final long finalAlarmTime = TEST_TIMESTAMP - 13_000;
mUserWakeupStore.addUserWakeup(USER_ID_1, TEST_TIMESTAMP - 29_000);
diff --git a/services/tests/mockingservicestests/src/com/android/server/am/ActivityManagerServiceTest.java b/services/tests/mockingservicestests/src/com/android/server/am/ActivityManagerServiceTest.java
index 419bcb8650a7..e610a32cb549 100644
--- a/services/tests/mockingservicestests/src/com/android/server/am/ActivityManagerServiceTest.java
+++ b/services/tests/mockingservicestests/src/com/android/server/am/ActivityManagerServiceTest.java
@@ -527,7 +527,7 @@ public class ActivityManagerServiceTest {
final ProcessRecord appRec = new ProcessRecord(mAms, info, info.processName, uid);
final ProcessStatsService tracker = mAms.mProcessStats;
- final IApplicationThread appThread = mock(IApplicationThread.class);
+ final ApplicationThreadDeferred appThread = mock(ApplicationThreadDeferred.class);
doReturn(mock(IBinder.class)).when(appThread).asBinder();
appRec.makeActive(appThread, tracker);
mAms.mProcessList.addProcessNameLocked(appRec);
@@ -701,7 +701,8 @@ public class ActivityManagerServiceTest {
final var wpc = fifoProc.getWindowProcessController();
spyOn(wpc);
doReturn(true).when(wpc).useFifoUiScheduling();
- fifoProc.makeActive(fifoProc.getThread(), mAms.mProcessStats);
+ fifoProc.makeActive(new ApplicationThreadDeferred(fifoProc.getThread()),
+ mAms.mProcessStats);
assertTrue(fifoProc.useFifoUiScheduling());
assertTrue(mAms.mSpecifiedFifoProcesses.contains(fifoProc));
diff --git a/services/tests/mockingservicestests/src/com/android/server/am/ApplicationThreadDeferredTest.java b/services/tests/mockingservicestests/src/com/android/server/am/ApplicationThreadDeferredTest.java
new file mode 100644
index 000000000000..8f8c1ac51907
--- /dev/null
+++ b/services/tests/mockingservicestests/src/com/android/server/am/ApplicationThreadDeferredTest.java
@@ -0,0 +1,99 @@
+/*
+ * 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.server.am;
+
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+
+import android.app.IApplicationThread;
+
+import androidx.test.filters.SmallTest;
+
+import org.junit.Test;
+
+
+/**
+ * Tests to verify that the ApplicationThreadDeferred properly defers binder calls to paused
+ * processes.
+ */
+@SmallTest
+public class ApplicationThreadDeferredTest {
+ private static final String TAG = "ApplicationThreadDeferredTest";
+
+ private void callDeferredApis(IApplicationThread thread) throws Exception {
+ thread.clearDnsCache();
+ thread.updateHttpProxy();
+ thread.updateTimeZone();
+ thread.scheduleLowMemory();
+ }
+
+ // Verify that the special APIs have been called count times.
+ private void verifyDeferredApis(IApplicationThread thread, int count) throws Exception {
+ verify(thread, times(count)).clearDnsCache();
+ verify(thread, times(count)).updateHttpProxy();
+ verify(thread, times(count)).updateTimeZone();
+ verify(thread, times(count)).scheduleLowMemory();
+ }
+
+ // Test the baseline behavior of IApplicationThread. If this test fails, all other tests are
+ // suspect.
+ @Test
+ public void testBaseline() throws Exception {
+ IApplicationThread thread = mock(IApplicationThread.class);
+ callDeferredApis(thread);
+ verifyDeferredApis(thread, 1);
+ }
+
+ // Test the baseline behavior of IApplicationThreadDeferred. If this test fails, all other
+ // tests are suspect.
+ @Test
+ public void testBaselineDeferred() throws Exception {
+ IApplicationThread thread = mock(ApplicationThreadDeferred.class);
+ callDeferredApis(thread);
+ verifyDeferredApis(thread, 1);
+ }
+
+ // Verify that a deferred thread behaves like a regular thread when it is not paused.
+ @Test
+ public void testDeferredUnpaused() throws Exception {
+ IApplicationThread base = mock(IApplicationThread.class);
+ ApplicationThreadDeferred thread = new ApplicationThreadDeferred(base, true);
+ callDeferredApis(thread);
+ verifyDeferredApis(base, 1);
+ }
+
+ // Verify that a paused deferred thread thread does not deliver any calls to its parent. Then
+ // unpause the thread and verify that the collapsed calls are forwarded.
+ @Test
+ public void testDeferredPaused() throws Exception {
+ IApplicationThread base = mock(IApplicationThread.class);
+ ApplicationThreadDeferred thread = new ApplicationThreadDeferred(base, true);
+ thread.onProcessPaused();
+ callDeferredApis(thread);
+ callDeferredApis(thread);
+ verifyDeferredApis(base, 0);
+ thread.onProcessUnpaused();
+ verifyDeferredApis(base, 1);
+ }
+
+ // TODO: [b/302724778] Remove manual JNI load
+ static {
+ System.loadLibrary("mockingservicestestjni");
+ }
+}
diff --git a/services/tests/mockingservicestests/src/com/android/server/am/AsyncProcessStartTest.java b/services/tests/mockingservicestests/src/com/android/server/am/AsyncProcessStartTest.java
index 80f7a066985b..93066d8d113a 100644
--- a/services/tests/mockingservicestests/src/com/android/server/am/AsyncProcessStartTest.java
+++ b/services/tests/mockingservicestests/src/com/android/server/am/AsyncProcessStartTest.java
@@ -189,7 +189,7 @@ public class AsyncProcessStartTest {
private ProcessRecord makeActiveProcessRecord(ApplicationInfo ai, boolean wedge)
throws Exception {
- final IApplicationThread thread = mock(IApplicationThread.class);
+ final ApplicationThreadDeferred thread = mock(ApplicationThreadDeferred.class);
final IBinder threadBinder = new Binder();
doReturn(threadBinder).when(thread).asBinder();
doAnswer((invocation) -> {
diff --git a/services/tests/mockingservicestests/src/com/android/server/am/BroadcastQueueTest.java b/services/tests/mockingservicestests/src/com/android/server/am/BroadcastQueueTest.java
index 13ba1e5e705c..3aaf2e5c61a6 100644
--- a/services/tests/mockingservicestests/src/com/android/server/am/BroadcastQueueTest.java
+++ b/services/tests/mockingservicestests/src/com/android/server/am/BroadcastQueueTest.java
@@ -325,13 +325,13 @@ public class BroadcastQueueTest extends BaseBroadcastQueueTest {
ProcessRecord.updateProcessRecordNodes(r);
mActiveProcesses.add(r);
- final IApplicationThread thread;
+ final ApplicationThreadDeferred thread;
if (dead) {
- thread = mock(IApplicationThread.class, (invocation) -> {
+ thread = mock(ApplicationThreadDeferred.class, (invocation) -> {
throw new DeadObjectException();
});
} else {
- thread = mock(IApplicationThread.class);
+ thread = mock(ApplicationThreadDeferred.class);
}
final IBinder threadBinder = new Binder();
doReturn(threadBinder).when(thread).asBinder();
diff --git a/services/tests/mockingservicestests/src/com/android/server/am/CacheOomRankerTest.java b/services/tests/mockingservicestests/src/com/android/server/am/CacheOomRankerTest.java
index 240ddf51ffdc..0796f419e385 100644
--- a/services/tests/mockingservicestests/src/com/android/server/am/CacheOomRankerTest.java
+++ b/services/tests/mockingservicestests/src/com/android/server/am/CacheOomRankerTest.java
@@ -760,7 +760,7 @@ public class CacheOomRankerTest {
ProcessStatsService processStatsService = new ProcessStatsService(
mock(ActivityManagerService.class), new File(Environment.getDataSystemCeDirectory(),
"procstats"));
- app.makeActive(mock(IApplicationThread.class), processStatsService);
+ app.makeActive(mock(ApplicationThreadDeferred.class), processStatsService);
return app;
}
diff --git a/services/tests/mockingservicestests/src/com/android/server/am/MockingOomAdjusterTests.java b/services/tests/mockingservicestests/src/com/android/server/am/MockingOomAdjusterTests.java
index 6366f24a27e1..8656b991b5fc 100644
--- a/services/tests/mockingservicestests/src/com/android/server/am/MockingOomAdjusterTests.java
+++ b/services/tests/mockingservicestests/src/com/android/server/am/MockingOomAdjusterTests.java
@@ -500,6 +500,13 @@ public class MockingOomAdjusterTests {
updateOomAdj(app);
assertProcStates(app, PROCESS_STATE_TOP, VISIBLE_APP_ADJ, SCHED_GROUP_TOP_APP);
assertEquals("resumed-split-screen-activity", app.mState.getAdjType());
+
+ doReturn(WindowProcessController.ACTIVITY_STATE_FLAG_IS_VISIBLE
+ | WindowProcessController.ACTIVITY_STATE_FLAG_PERCEPTIBLE_FREEFORM)
+ .when(wpc).getActivityStateFlags();
+ updateOomAdj(app);
+ assertProcStates(app, PROCESS_STATE_TOP, VISIBLE_APP_ADJ, SCHED_GROUP_TOP_APP);
+ assertEquals("perceptible-freeform-activity", app.mState.getAdjType());
}
@SuppressWarnings("GuardedBy")
@@ -3209,7 +3216,7 @@ public class MockingOomAdjusterTests {
final ProcessReceiverRecord receivers = app.mReceivers;
final ProcessProfileRecord profile = app.mProfile;
final ProcessProviderRecord providers = app.mProviders;
- app.makeActive(mock(IApplicationThread.class), mService.mProcessStats);
+ app.makeActive(mock(ApplicationThreadDeferred.class), mService.mProcessStats);
app.setLastActivityTime(mLastActivityTime);
app.setKilledByAm(mKilledByAm);
app.setIsolatedEntryPoint(mIsolatedEntryPoint);
diff --git a/services/tests/mockingservicestests/src/com/android/server/am/ProcessObserverTest.java b/services/tests/mockingservicestests/src/com/android/server/am/ProcessObserverTest.java
index 89c67d5e32b7..3572d2315a9d 100644
--- a/services/tests/mockingservicestests/src/com/android/server/am/ProcessObserverTest.java
+++ b/services/tests/mockingservicestests/src/com/android/server/am/ProcessObserverTest.java
@@ -193,7 +193,7 @@ public class ProcessObserverTest {
private ProcessRecord makeActiveProcessRecord(ApplicationInfo ai)
throws Exception {
- final IApplicationThread thread = mock(IApplicationThread.class);
+ final ApplicationThreadDeferred thread = mock(ApplicationThreadDeferred.class);
final IBinder threadBinder = new Binder();
doReturn(threadBinder).when(thread).asBinder();
doAnswer((invocation) -> {
diff --git a/services/tests/mockingservicestests/src/com/android/server/am/ServiceBindingOomAdjPolicyTest.java b/services/tests/mockingservicestests/src/com/android/server/am/ServiceBindingOomAdjPolicyTest.java
index 5f126774835d..1ff4a27cb787 100644
--- a/services/tests/mockingservicestests/src/com/android/server/am/ServiceBindingOomAdjPolicyTest.java
+++ b/services/tests/mockingservicestests/src/com/android/server/am/ServiceBindingOomAdjPolicyTest.java
@@ -529,7 +529,7 @@ public final class ServiceBindingOomAdjPolicyTest {
@SuppressWarnings("GuardedBy")
private ProcessRecord addProcessRecord(int pid, int uid, int procState, int adj, int cap,
String packageName) {
- final IApplicationThread appThread = mock(IApplicationThread.class);
+ final ApplicationThreadDeferred appThread = mock(ApplicationThreadDeferred.class);
final IBinder threadBinder = mock(IBinder.class);
final ProcessRecord app = makeProcessRecord(pid, uid, uid, null, 0,
procState, adj, cap, 0L, 0L, packageName, packageName, mAms);
diff --git a/services/tests/mockingservicestests/src/com/android/server/am/ServiceTimeoutTest.java b/services/tests/mockingservicestests/src/com/android/server/am/ServiceTimeoutTest.java
index 7ec27be0bfc3..3c4363651557 100644
--- a/services/tests/mockingservicestests/src/com/android/server/am/ServiceTimeoutTest.java
+++ b/services/tests/mockingservicestests/src/com/android/server/am/ServiceTimeoutTest.java
@@ -145,7 +145,7 @@ public final class ServiceTimeoutTest {
name, // processName
name, // packageName
mAms);
- app.makeActive(mock(IApplicationThread.class), mAms.mProcessStats);
+ app.makeActive(mock(ApplicationThreadDeferred.class), mAms.mProcessStats);
mProcessList.updateLruProcessLocked(app, false, null);
final long now = SystemClock.uptimeMillis();
diff --git a/services/tests/mockingservicestests/src/com/android/server/backup/utils/TarBackupReaderTest.java b/services/tests/mockingservicestests/src/com/android/server/backup/utils/TarBackupReaderTest.java
index 396f4da75172..bf7e3a0bd0a6 100644
--- a/services/tests/mockingservicestests/src/com/android/server/backup/utils/TarBackupReaderTest.java
+++ b/services/tests/mockingservicestests/src/com/android/server/backup/utils/TarBackupReaderTest.java
@@ -525,7 +525,7 @@ public class TarBackupReaderTest {
@Test
public void
- chooseRestorePolicy_flagOnNotRestoreAnyVersionVToURestoreAndInAllowlist_returnsIgnore()
+ chooseRestorePolicy_flagOnNotRestoreAnyVersionVToURestoreAndInAllowlist_returnsAccept()
throws Exception {
mSetFlagsRule.enableFlags(
@@ -540,7 +540,8 @@ public class TarBackupReaderTest {
FileMetadata info = new FileMetadata();
info.version = Build.VERSION_CODES.UPSIDE_DOWN_CAKE + 1;
- PackageInfo packageInfo = createNonRestoreAnyVersionUPackage();
+ PackageInfo packageInfo = createNonRestoreAnyVersionPackage(
+ Build.VERSION_CODES.UPSIDE_DOWN_CAKE);
PackageManagerStub.sPackageInfo = packageInfo;
doReturn(true).when(mMockPackageManagerInternal).isDataRestoreSafe(FAKE_SIGNATURE_1,
@@ -559,7 +560,7 @@ public class TarBackupReaderTest {
@Test
public void
- chooseRestorePolicy_flagOffNotRestoreAnyVersionVToURestoreAndInAllowlist_returnsAccept()
+ chooseRestorePolicy_flagOffNotRestoreAnyVersionVToURestoreAndInAllowlist_returnsIgnore()
throws Exception {
mSetFlagsRule.disableFlags(
@@ -574,7 +575,8 @@ public class TarBackupReaderTest {
FileMetadata info = new FileMetadata();
info.version = Build.VERSION_CODES.UPSIDE_DOWN_CAKE + 1;
- PackageInfo packageInfo = createNonRestoreAnyVersionUPackage();
+ PackageInfo packageInfo = createNonRestoreAnyVersionPackage(
+ Build.VERSION_CODES.UPSIDE_DOWN_CAKE);
PackageManagerStub.sPackageInfo = packageInfo;
doReturn(true).when(mMockPackageManagerInternal).isDataRestoreSafe(FAKE_SIGNATURE_1,
@@ -608,7 +610,8 @@ public class TarBackupReaderTest {
FileMetadata info = new FileMetadata();
info.version = Build.VERSION_CODES.UPSIDE_DOWN_CAKE + 1;
- PackageInfo packageInfo = createNonRestoreAnyVersionUPackage();
+ PackageInfo packageInfo = createNonRestoreAnyVersionPackage(
+ Build.VERSION_CODES.UPSIDE_DOWN_CAKE);
PackageManagerStub.sPackageInfo = packageInfo;
doReturn(true).when(mMockPackageManagerInternal).isDataRestoreSafe(FAKE_SIGNATURE_1,
@@ -716,6 +719,36 @@ public class TarBackupReaderTest {
LOG_EVENT_ID_VERSION_OF_BACKUP_OLDER);
}
+ @Test
+ public void
+ chooseRestorePolicy_allowlistNotSetNotRestoreAnyVersionVersionMismatch_returnsIgnore()
+ throws Exception {
+ mSetFlagsRule.disableFlags(
+ Flags.FLAG_ENABLE_V_TO_U_RESTORE_FOR_SYSTEM_COMPONENTS_IN_ALLOWLIST);
+
+ TarBackupReader tarBackupReader = createTarBackupReader();
+
+ Signature[] signatures = new Signature[]{FAKE_SIGNATURE_1};
+ FileMetadata info = new FileMetadata();
+ info.version = Build.VERSION_CODES.UPSIDE_DOWN_CAKE + 2;
+
+ PackageInfo packageInfo = createNonRestoreAnyVersionPackage(
+ Build.VERSION_CODES.UPSIDE_DOWN_CAKE + 1);
+ PackageManagerStub.sPackageInfo = packageInfo;
+
+ doReturn(true).when(mMockPackageManagerInternal).isDataRestoreSafe(FAKE_SIGNATURE_1,
+ packageInfo.packageName);
+ RestorePolicy policy = tarBackupReader.chooseRestorePolicy(mPackageManagerStub,
+ false /* allowApks */, info, signatures, mMockPackageManagerInternal,
+ mUserId, mContext);
+
+ assertThat(policy).isEqualTo(RestorePolicy.IGNORE);
+ ArgumentCaptor<Bundle> bundleCaptor = ArgumentCaptor.forClass(Bundle.class);
+ verify(mBackupManagerMonitorMock).onEvent(bundleCaptor.capture());
+ assertThat(bundleCaptor.getValue().get(EXTRA_LOG_EVENT_ID)).isEqualTo(
+ LOG_EVENT_ID_VERSION_OF_BACKUP_OLDER);
+ }
+
private TarBackupReader createTarBackupReader() throws Exception {
InputStream inputStream = mContext.getResources().openRawResource(
R.raw.backup_telephony_no_password);
@@ -726,7 +759,7 @@ public class TarBackupReaderTest {
return tarBackupReader;
}
- private PackageInfo createNonRestoreAnyVersionUPackage(){
+ private PackageInfo createNonRestoreAnyVersionPackage(int versionCode) {
PackageInfo packageInfo = new PackageInfo();
packageInfo.packageName = "test";
packageInfo.applicationInfo = new ApplicationInfo();
@@ -740,7 +773,7 @@ public class TarBackupReaderTest {
SigningDetails.SignatureSchemeVersion.SIGNING_BLOCK_V3,
null,
null));
- packageInfo.versionCode = Build.VERSION_CODES.UPSIDE_DOWN_CAKE;
+ packageInfo.versionCode = versionCode;
return packageInfo;
}
}
diff --git a/services/tests/mockingservicestests/src/com/android/server/crashrecovery/Android.bp b/services/tests/mockingservicestests/src/com/android/server/crashrecovery/Android.bp
new file mode 100644
index 000000000000..127d3e8a4136
--- /dev/null
+++ b/services/tests/mockingservicestests/src/com/android/server/crashrecovery/Android.bp
@@ -0,0 +1,58 @@
+// 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 {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "frameworks_base_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["frameworks_base_license"],
+ default_team: "trendy_team_mainline_modularization",
+}
+
+android_test {
+ name: "CrashRecoveryModuleTests",
+
+ srcs: [
+ "*.java",
+ ],
+
+ static_libs: [
+ "androidx.test.core",
+ "androidx.test.runner",
+ "mockito-target-extended-minus-junit4",
+ "services.core",
+ "truth",
+ "flag-junit",
+ ],
+
+ libs: [
+ "android.test.mock",
+ "android.test.base",
+ "android.test.runner",
+ ],
+
+ jni_libs: [
+ "libdexmakerjvmtiagent",
+ "libstaticjvmtiagent",
+ ],
+
+ certificate: "platform",
+ platform_apis: true,
+ test_suites: [
+ "device-tests",
+ "automotive-tests",
+ ],
+}
diff --git a/core/tests/batterystatstests/BatteryUsageStatsProtoTests/AndroidManifest.xml b/services/tests/mockingservicestests/src/com/android/server/crashrecovery/AndroidManifest.xml
index 9128dca2080b..067f116d003c 100644
--- a/core/tests/batterystatstests/BatteryUsageStatsProtoTests/AndroidManifest.xml
+++ b/services/tests/mockingservicestests/src/com/android/server/crashrecovery/AndroidManifest.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
- ~ Copyright (C) 2021 The Android Open Source Project
+ ~ 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.
@@ -16,13 +16,17 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.android.frameworks.core.batteryusagestatsprototests">
+ package="com.android.server.crashrecovery">
- <uses-permission android:name="android.permission.BATTERY_STATS"/>
+ <uses-sdk android:targetSdkVersion="35" />
+
+ <application android:testOnly="true"
+ android:debuggable="true">
+ <uses-library android:name="android.test.runner" />
+ </application>
<instrumentation
android:name="androidx.test.runner.AndroidJUnitRunner"
- android:targetPackage="com.android.frameworks.core.batteryusagestatsprototests"
- android:label="BatteryUsageStats Proto Tests" />
-
+ android:targetPackage="com.android.server.crashrecovery"
+ android:label="Frameworks crashrecovery module test" />
</manifest>
diff --git a/services/tests/mockingservicestests/src/com/android/server/crashrecovery/AndroidTest.xml b/services/tests/mockingservicestests/src/com/android/server/crashrecovery/AndroidTest.xml
new file mode 100644
index 000000000000..7b06ebec654d
--- /dev/null
+++ b/services/tests/mockingservicestests/src/com/android/server/crashrecovery/AndroidTest.xml
@@ -0,0 +1,34 @@
+<?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.
+ -->
+<configuration description="Runs Crashrecovery Module Tests.">
+ <option name="test-suite-tag" value="apct" />
+ <option name="test-suite-tag" value="apct-instrumentation" />
+
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <option name="install-arg" value="-t" />
+ <option name="test-file-name" value="CrashRecoveryModuleTests.apk" />
+ </target_preparer>
+
+ <option name="test-tag" value="CrashRecoveryModuleTests" />
+
+ <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
+ <option name="package" value="com.android.server.crashrecovery" />
+ <option name="runner" value="androidx.test.runner.AndroidJUnitRunner" />
+ <option name="hidden-api-checks" value="false"/>
+ </test>
+</configuration>
diff --git a/services/tests/mockingservicestests/src/com/android/server/crashrecovery/CrashRecoveryModuleTest.java b/services/tests/mockingservicestests/src/com/android/server/crashrecovery/CrashRecoveryModuleTest.java
new file mode 100644
index 000000000000..d0b7cc7b70e6
--- /dev/null
+++ b/services/tests/mockingservicestests/src/com/android/server/crashrecovery/CrashRecoveryModuleTest.java
@@ -0,0 +1,105 @@
+/*
+ * 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.server.crashrecovery;
+
+import static com.android.server.SystemService.PHASE_ACTIVITY_MANAGER_READY;
+import static com.android.server.SystemService.PHASE_THIRD_PARTY_APPS_CAN_START;
+
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import android.content.Context;
+import android.platform.test.flag.junit.SetFlagsRule;
+
+import androidx.test.core.app.ApplicationProvider;
+import androidx.test.runner.AndroidJUnit4;
+
+
+import com.android.dx.mockito.inline.extended.ExtendedMockito;
+import com.android.server.PackageWatchdog;
+import com.android.server.RescueParty;
+import com.android.server.crashrecovery.CrashRecoveryModule.Lifecycle;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoSession;
+import org.mockito.quality.Strictness;
+
+/**
+ * Test CrashRecoveryModule.
+ */
+@RunWith(AndroidJUnit4.class)
+public class CrashRecoveryModuleTest {
+
+ @Rule
+ public SetFlagsRule mSetFlagsRule;
+
+ private MockitoSession mSession;
+ private Lifecycle mLifecycle;
+
+ @Mock PackageWatchdog mPackageWatchdog;
+
+ @Before
+ public void setup() {
+ Context context = ApplicationProvider.getApplicationContext();
+ mSession = ExtendedMockito.mockitoSession()
+ .initMocks(this)
+ .strictness(Strictness.LENIENT)
+ .mockStatic(PackageWatchdog.class)
+ .mockStatic(RescueParty.class)
+ .startMocking();
+ when(PackageWatchdog.getInstance(context)).thenReturn(mPackageWatchdog);
+ ExtendedMockito.doNothing().when(() -> RescueParty.registerHealthObserver(context));
+ mLifecycle = new Lifecycle(context);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ mSession.finishMocking();
+ }
+
+ @Test
+ public void testLifecycleServiceStart() {
+ mLifecycle.onStart();
+ doNothing().when(mPackageWatchdog).registerShutdownBroadcastReceiver();
+
+ verify(mPackageWatchdog, times(1)).noteBoot();
+ verify(mPackageWatchdog, times(1)).registerShutdownBroadcastReceiver();
+ ExtendedMockito.verify(() -> RescueParty.registerHealthObserver(any()),
+ Mockito.times(1));
+ }
+
+ @Test
+ public void testLifecycleServiceOnBootPhase() {
+ doNothing().when(mPackageWatchdog).onPackagesReady();
+
+ mLifecycle.onBootPhase(PHASE_ACTIVITY_MANAGER_READY);
+ verify(mPackageWatchdog, never()).onPackagesReady();
+
+ mLifecycle.onBootPhase(PHASE_THIRD_PARTY_APPS_CAN_START);
+ verify(mPackageWatchdog, times(1)).onPackagesReady();
+ }
+}
diff --git a/services/tests/mockingservicestests/src/com/android/server/crashrecovery/OWNERS b/services/tests/mockingservicestests/src/com/android/server/crashrecovery/OWNERS
new file mode 100644
index 000000000000..8337fd2453df
--- /dev/null
+++ b/services/tests/mockingservicestests/src/com/android/server/crashrecovery/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/crashrecovery/OWNERS \ No newline at end of file
diff --git a/services/tests/mockingservicestests/src/com/android/server/trust/TrustManagerServiceTest.java b/services/tests/mockingservicestests/src/com/android/server/trust/TrustManagerServiceTest.java
index 7aec42b7eceb..1a398c5f1ec3 100644
--- a/services/tests/mockingservicestests/src/com/android/server/trust/TrustManagerServiceTest.java
+++ b/services/tests/mockingservicestests/src/com/android/server/trust/TrustManagerServiceTest.java
@@ -16,6 +16,8 @@
package com.android.server.trust;
+import static android.security.Flags.FLAG_SHOULD_TRUST_MANAGER_LISTEN_FOR_PRIMARY_AUTH;
+import static android.security.Flags.shouldTrustManagerListenForPrimaryAuth;
import static android.service.trust.TrustAgentService.FLAG_GRANT_TRUST_TEMPORARY_AND_RENEWABLE;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.any;
@@ -43,6 +45,7 @@ import static java.util.Collections.singleton;
import android.Manifest;
import android.annotation.Nullable;
import android.app.ActivityManager;
+import android.app.ActivityManagerInternal;
import android.app.AlarmManager;
import android.app.IActivityManager;
import android.app.admin.DevicePolicyManager;
@@ -72,6 +75,8 @@ import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.UserHandle;
import android.os.UserManager;
+import android.platform.test.flag.junit.FlagsParameterization;
+import android.platform.test.flag.junit.SetFlagsRule;
import android.provider.Settings;
import android.security.KeyStoreAuthorization;
import android.service.trust.GrantTrustResult;
@@ -90,6 +95,7 @@ import com.android.internal.widget.LockPatternUtils;
import com.android.internal.widget.LockPatternUtils.StrongAuthTracker;
import com.android.internal.widget.LockPatternUtils.StrongAuthTracker.StrongAuthFlags;
import com.android.internal.widget.LockSettingsInternal;
+import com.android.internal.widget.LockSettingsStateListener;
import com.android.modules.utils.testing.ExtendedMockitoRule;
import com.android.server.LocalServices;
import com.android.server.SystemService;
@@ -100,6 +106,7 @@ import org.junit.Before;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
+import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
import org.mockito.ArgumentMatcher;
import org.mockito.Mock;
@@ -111,7 +118,16 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import platform.test.runner.parameterized.ParameterizedAndroidJunit4;
+import platform.test.runner.parameterized.Parameters;
+
+@RunWith(ParameterizedAndroidJunit4.class)
public class TrustManagerServiceTest {
+ @Parameters(name = "{0}")
+ public static List<FlagsParameterization> getParams() {
+ return FlagsParameterization.allCombinationsOf(
+ FLAG_SHOULD_TRUST_MANAGER_LISTEN_FOR_PRIMARY_AUTH);
+ }
@Rule
public final ExtendedMockitoRule mExtendedMockitoRule = new ExtendedMockitoRule.Builder(this)
@@ -121,6 +137,9 @@ public class TrustManagerServiceTest {
.build();
@Rule
+ public final SetFlagsRule mSetFlagsRule;
+
+ @Rule
public final MockContext mMockContext = new MockContext(
ApplicationProvider.getApplicationContext());
@@ -142,6 +161,7 @@ public class TrustManagerServiceTest {
private final Map<ComponentName, ITrustAgentService.Stub> mMockTrustAgents = new HashMap<>();
private @Mock ActivityManager mActivityManager;
+ private @Mock ActivityManagerInternal mActivityManagerInternal;
private @Mock AlarmManager mAlarmManager;
private @Mock BiometricManager mBiometricManager;
private @Mock DevicePolicyManager mDevicePolicyManager;
@@ -158,6 +178,11 @@ public class TrustManagerServiceTest {
private HandlerThread mHandlerThread;
private TrustManagerService mService;
private ITrustManager mTrustManager;
+ private ActivityManagerInternal mPreviousActivityManagerInternal;
+
+ public TrustManagerServiceTest(FlagsParameterization flags) {
+ mSetFlagsRule = new SetFlagsRule(SetFlagsRule.DefaultInitValueType.DEVICE_DEFAULT, flags);
+ }
@Before
public void setUp() throws Exception {
@@ -210,6 +235,11 @@ public class TrustManagerServiceTest {
mMockContext.setMockPackageManager(mPackageManager);
mMockContext.addMockSystemService(UserManager.class, mUserManager);
doReturn(mWindowManager).when(() -> WindowManagerGlobal.getWindowManagerService());
+ mPreviousActivityManagerInternal = LocalServices.getService(
+ ActivityManagerInternal.class);
+ LocalServices.removeServiceForTest(ActivityManagerInternal.class);
+ LocalServices.addService(ActivityManagerInternal.class,
+ mActivityManagerInternal);
LocalServices.addService(SystemServiceManager.class, mock(SystemServiceManager.class));
grantPermission(Manifest.permission.ACCESS_KEYGUARD_SECURE_STORAGE);
@@ -257,7 +287,14 @@ public class TrustManagerServiceTest {
@After
public void tearDown() {
LocalServices.removeServiceForTest(SystemServiceManager.class);
- mHandlerThread.quit();
+ LocalServices.removeServiceForTest(ActivityManagerInternal.class);
+ if (mPreviousActivityManagerInternal != null) {
+ LocalServices.addService(ActivityManagerInternal.class,
+ mPreviousActivityManagerInternal);
+ }
+ if (mHandlerThread != null) {
+ mHandlerThread.quit();
+ }
}
@Test
@@ -579,11 +616,27 @@ public class TrustManagerServiceTest {
}
private void attemptSuccessfulUnlock(int userId) throws RemoteException {
- mTrustManager.reportUnlockAttempt(/* successful= */ true, userId);
+ if (shouldTrustManagerListenForPrimaryAuth()) {
+ ArgumentCaptor<LockSettingsStateListener> captor =
+ ArgumentCaptor.forClass(LockSettingsStateListener.class);
+ verify(mLockSettingsInternal).registerLockSettingsStateListener(captor.capture());
+ LockSettingsStateListener listener = captor.getValue();
+ listener.onAuthenticationSucceeded(userId);
+ } else {
+ mTrustManager.reportUnlockAttempt(/* successful= */ true, userId);
+ }
}
private void attemptFailedUnlock(int userId) throws RemoteException {
- mTrustManager.reportUnlockAttempt(/* successful= */ false, userId);
+ if (shouldTrustManagerListenForPrimaryAuth()) {
+ ArgumentCaptor<LockSettingsStateListener> captor =
+ ArgumentCaptor.forClass(LockSettingsStateListener.class);
+ verify(mLockSettingsInternal).registerLockSettingsStateListener(captor.capture());
+ LockSettingsStateListener listener = captor.getValue();
+ listener.onAuthenticationFailed(userId);
+ } else {
+ mTrustManager.reportUnlockAttempt(/* successful= */ false, userId);
+ }
}
private void grantRenewableTrust(ITrustAgentServiceCallback callback) throws RemoteException {
diff --git a/services/tests/powerstatstests/Android.bp b/services/tests/powerstatstests/Android.bp
index f2b4136c51ed..b2a5b02c49e1 100644
--- a/services/tests/powerstatstests/Android.bp
+++ b/services/tests/powerstatstests/Android.bp
@@ -59,6 +59,7 @@ android_ravenwood_test {
name: "PowerStatsTestsRavenwood",
static_libs: [
"services.core",
+ "platformprotosnano",
"coretests-aidl",
"ravenwood-junit",
"truth",
diff --git a/core/tests/batterystatstests/BatteryUsageStatsProtoTests/src/com/android/internal/os/BatteryUsageStatsPulledTest.java b/services/tests/powerstatstests/src/com/android/server/power/stats/BatteryUsageStatsAtomTest.java
index ac1f7d0e345f..37d8f2f74850 100644
--- a/core/tests/batterystatstests/BatteryUsageStatsProtoTests/src/com/android/internal/os/BatteryUsageStatsPulledTest.java
+++ b/services/tests/powerstatstests/src/com/android/server/power/stats/BatteryUsageStatsAtomTest.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.android.internal.os;
+package com.android.server.power.stats;
import static android.os.BatteryUsageStats.AGGREGATE_BATTERY_CONSUMER_SCOPE_DEVICE;
@@ -23,39 +23,262 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.fail;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyNoMoreInteractions;
import android.os.AggregateBatteryConsumer;
import android.os.BatteryConsumer;
import android.os.BatteryUsageStats;
+import android.os.Process;
import android.os.UidBatteryConsumer;
import android.os.nano.BatteryUsageStatsAtomsProto;
import android.os.nano.BatteryUsageStatsAtomsProto.BatteryConsumerData.PowerComponentUsage;
+import android.platform.test.ravenwood.RavenwoodRule;
+import android.util.StatsEvent;
import androidx.test.filters.SmallTest;
+import com.android.server.am.BatteryStatsService;
+
import com.google.protobuf.nano.InvalidProtocolBufferNanoException;
+import org.junit.Rule;
import org.junit.Test;
+import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
-
@SmallTest
-public class BatteryUsageStatsPulledTest {
+public class BatteryUsageStatsAtomTest {
+
+ @Rule
+ public final RavenwoodRule mRavenwood = new RavenwoodRule();
private static final int UID_0 = 1000;
private static final int UID_1 = 2000;
private static final int UID_2 = 3000;
private static final int UID_3 = 4000;
- private static final int[] UID_USAGE_TIME_PROCESS_STATES = {
- BatteryConsumer.PROCESS_STATE_FOREGROUND,
- BatteryConsumer.PROCESS_STATE_BACKGROUND,
- BatteryConsumer.PROCESS_STATE_FOREGROUND_SERVICE
- };
@Test
- public void testGetStatsProto() {
+ public void testAtom_BatteryUsageStatsPerUid() {
+ final BatteryUsageStats bus = buildBatteryUsageStats();
+ BatteryStatsService.FrameworkStatsLogger statsLogger =
+ mock(BatteryStatsService.FrameworkStatsLogger.class);
+
+ List<StatsEvent> actual = new ArrayList<>();
+ new BatteryStatsService.StatsPerUidLogger(statsLogger).logStats(bus, actual);
+
+ // Device-wide totals
+ verify(statsLogger).buildStatsEvent(
+ 1000L,
+ 20000L,
+ 10000L,
+ 20,
+ 1234L,
+ Process.INVALID_UID,
+ BatteryConsumer.PROCESS_STATE_UNSPECIFIED,
+ 0L,
+ "cpu",
+ 30000.0f,
+ 20100.0f,
+ 20300L
+ );
+ verify(statsLogger).buildStatsEvent(
+ 1000L,
+ 20000L,
+ 10000L,
+ 20,
+ 1234L,
+ Process.INVALID_UID,
+ BatteryConsumer.PROCESS_STATE_UNSPECIFIED,
+ 0L,
+ "camera",
+ 30000.0f,
+ 20150.0f,
+ 0L
+ );
+ verify(statsLogger).buildStatsEvent(
+ 1000L,
+ 20000L,
+ 10000L,
+ 20,
+ 1234L,
+ Process.INVALID_UID,
+ BatteryConsumer.PROCESS_STATE_UNSPECIFIED,
+ 0L,
+ "CustomConsumer1",
+ 30000.0f,
+ 20200.0f,
+ 20400L
+ );
+
+ // Per-proc state estimates for UID_0
+ verify(statsLogger).buildStatsEvent(
+ 1000L,
+ 20000L,
+ 10000L,
+ 20,
+ 1234L,
+ UID_0,
+ BatteryConsumer.PROCESS_STATE_UNSPECIFIED,
+ 0L,
+ "screen",
+ 1650.0f,
+ 300.0f,
+ 0L
+ );
+ verify(statsLogger).buildStatsEvent(
+ 1000L,
+ 20000L,
+ 10000L,
+ 20,
+ 1234L,
+ UID_0,
+ BatteryConsumer.PROCESS_STATE_UNSPECIFIED,
+ 0L,
+ "cpu",
+ 1650.0f,
+ 400.0f,
+ 600L
+ );
+ verify(statsLogger).buildStatsEvent(
+ 1000L,
+ 20000L,
+ 10000L,
+ 20,
+ 1234L,
+ UID_0,
+ BatteryConsumer.PROCESS_STATE_FOREGROUND,
+ 1000L,
+ "cpu",
+ 1650.0f,
+ 9100.0f,
+ 8100L
+ );
+ verify(statsLogger).buildStatsEvent(
+ 1000L,
+ 20000L,
+ 10000L,
+ 20,
+ 1234L,
+ UID_0,
+ BatteryConsumer.PROCESS_STATE_BACKGROUND,
+ 2000L,
+ "cpu",
+ 1650.0f,
+ 9200.0f,
+ 8200L
+ );
+ verify(statsLogger).buildStatsEvent(
+ 1000L,
+ 20000L,
+ 10000L,
+ 20,
+ 1234L,
+ UID_0,
+ BatteryConsumer.PROCESS_STATE_FOREGROUND_SERVICE,
+ 0L,
+ "cpu",
+ 1650.0f,
+ 9300.0f,
+ 8400L
+ );
+ verify(statsLogger).buildStatsEvent(
+ 1000L,
+ 20000L,
+ 10000L,
+ 20,
+ 1234L,
+ UID_0,
+ BatteryConsumer.PROCESS_STATE_CACHED,
+ 0L,
+ "cpu",
+ 1650.0f,
+ 9400.0f,
+ 0L
+ );
+ verify(statsLogger).buildStatsEvent(
+ 1000L,
+ 20000L,
+ 10000L,
+ 20,
+ 1234L,
+ UID_0,
+ BatteryConsumer.PROCESS_STATE_FOREGROUND,
+ 1000L,
+ "CustomConsumer1",
+ 1650.0f,
+ 450.0f,
+ 0L
+ );
+ verify(statsLogger).buildStatsEvent(
+ 1000L,
+ 20000L,
+ 10000L,
+ 20,
+ 1234L,
+ UID_0,
+ BatteryConsumer.PROCESS_STATE_BACKGROUND,
+ 2000L,
+ "CustomConsumer1",
+ 1650.0f,
+ 450.0f,
+ 0L
+ );
+ verify(statsLogger).buildStatsEvent(
+ 1000L,
+ 20000L,
+ 10000L,
+ 20,
+ 1234L,
+ UID_0,
+ BatteryConsumer.PROCESS_STATE_FOREGROUND,
+ 1000L,
+ "CustomConsumer2",
+ 1650.0f,
+ 500.0f,
+ 800L
+ );
+ verify(statsLogger).buildStatsEvent(
+ 1000L,
+ 20000L,
+ 10000L,
+ 20,
+ 1234L,
+ UID_0,
+ BatteryConsumer.PROCESS_STATE_BACKGROUND,
+ 2000L,
+ "CustomConsumer2",
+ 1650.0f,
+ 500.0f,
+ 800L
+ );
+
+ // Nothing for UID_1, because its power consumption is 0
+
+ // Only "screen" is populated for UID_2
+ verify(statsLogger).buildStatsEvent(
+ 1000L,
+ 20000L,
+ 10000L,
+ 20,
+ 1234L,
+ UID_2,
+ BatteryConsumer.PROCESS_STATE_UNSPECIFIED,
+ 0L,
+ "screen",
+ 766.0f,
+ 766.0f,
+ 0L
+ );
+
+ verifyNoMoreInteractions(statsLogger);
+ }
+
+ @Test
+ public void testAtom_BatteryUsageStatsAtomsProto() {
final BatteryUsageStats bus = buildBatteryUsageStats();
final byte[] bytes = bus.getStatsProto();
BatteryUsageStatsAtomsProto proto;
@@ -68,9 +291,7 @@ public class BatteryUsageStatsPulledTest {
assertEquals(bus.getStatsStartTimestamp(), proto.sessionStartMillis);
assertEquals(bus.getStatsEndTimestamp(), proto.sessionEndMillis);
- assertEquals(
- bus.getStatsEndTimestamp() - bus.getStatsStartTimestamp(),
- proto.sessionDurationMillis);
+ assertEquals(10000, proto.sessionDurationMillis);
assertEquals(bus.getDischargePercentage(), proto.sessionDischargePercentage);
assertEquals(bus.getDischargeDurationMs(), proto.dischargeDurationMillis);
@@ -90,8 +311,8 @@ public class BatteryUsageStatsPulledTest {
final List<android.os.UidBatteryConsumer> uidConsumers = bus.getUidBatteryConsumers();
uidConsumers.sort((a, b) -> a.getUid() - b.getUid());
- final BatteryUsageStatsAtomsProto.UidBatteryConsumer[] uidConsumersProto
- = proto.uidBatteryConsumers;
+ final BatteryUsageStatsAtomsProto.UidBatteryConsumer[] uidConsumersProto =
+ proto.uidBatteryConsumers;
Arrays.sort(uidConsumersProto, (a, b) -> a.uid - b.uid);
// UID_0 - After sorting, UID_0 should be in position 0 for both data structures
@@ -186,6 +407,12 @@ public class BatteryUsageStatsPulledTest {
}
}
+ private static final int[] UID_USAGE_TIME_PROCESS_STATES = {
+ BatteryConsumer.PROCESS_STATE_FOREGROUND,
+ BatteryConsumer.PROCESS_STATE_BACKGROUND,
+ BatteryConsumer.PROCESS_STATE_FOREGROUND_SERVICE
+ };
+
private void assertSameUidBatteryConsumer(
android.os.UidBatteryConsumer uidConsumer,
BatteryUsageStatsAtomsProto.UidBatteryConsumer uidConsumerProto,
@@ -195,10 +422,10 @@ public class BatteryUsageStatsPulledTest {
assertEquals("Uid consumers had mismatched uids", uid, uidConsumer.getUid());
assertEquals("For uid " + uid,
- uidConsumer.getTimeInStateMs(android.os.UidBatteryConsumer.STATE_FOREGROUND),
+ uidConsumer.getTimeInProcessStateMs(BatteryConsumer.PROCESS_STATE_FOREGROUND),
uidConsumerProto.timeInForegroundMillis);
assertEquals("For uid " + uid,
- uidConsumer.getTimeInStateMs(android.os.UidBatteryConsumer.STATE_BACKGROUND),
+ uidConsumer.getTimeInProcessStateMs(BatteryConsumer.PROCESS_STATE_BACKGROUND),
uidConsumerProto.timeInBackgroundMillis);
for (int processState : UID_USAGE_TIME_PROCESS_STATES) {
final long timeInStateMillis = uidConsumer.getTimeInProcessStateMs(processState);
@@ -261,11 +488,15 @@ public class BatteryUsageStatsPulledTest {
new BatteryUsageStats.Builder(new String[]{"CustomConsumer1", "CustomConsumer2"},
/* includePowerModels */ true,
/* includeProcessStats */ true,
+ /* includeScreenStateData */ false,
+ /* includePowerStateData */ false,
/* minConsumedPowerThreshold */ 0)
.setDischargePercentage(20)
.setDischargedPowerRange(1000, 2000)
.setDischargeDurationMs(1234)
- .setStatsStartTimestamp(1000);
+ .setStatsStartTimestamp(1000)
+ .setStatsEndTimestamp(20000)
+ .setStatsDuration(10000);
final UidBatteryConsumer.Builder uidBuilder = builder
.getOrCreateUidBatteryConsumerBuilder(UID_0)
.setPackageWithHighestDrain("myPackage0")
@@ -345,7 +576,7 @@ public class BatteryUsageStatsPulledTest {
@Test
public void testLargeAtomTruncated() {
final BatteryUsageStats.Builder builder =
- new BatteryUsageStats.Builder(new String[0], true, false, 0);
+ new BatteryUsageStats.Builder(new String[0], true, false, false, false, 0);
// If not truncated, this BatteryUsageStats object would generate a proto buffer
// significantly larger than 50 Kb
for (int i = 0; i < 3000; i++) {
diff --git a/services/tests/powerstatstests/src/com/android/server/power/stats/BatteryUsageStatsRule.java b/services/tests/powerstatstests/src/com/android/server/power/stats/BatteryUsageStatsRule.java
index 6edfedee9e5b..624b18948c49 100644
--- a/services/tests/powerstatstests/src/com/android/server/power/stats/BatteryUsageStatsRule.java
+++ b/services/tests/powerstatstests/src/com/android/server/power/stats/BatteryUsageStatsRule.java
@@ -397,10 +397,14 @@ public class BatteryUsageStatsRule implements TestRule {
& BatteryUsageStatsQuery.FLAG_BATTERY_USAGE_STATS_INCLUDE_POWER_MODELS) != 0;
final boolean includeProcessStateData = (query.getFlags()
& BatteryUsageStatsQuery.FLAG_BATTERY_USAGE_STATS_INCLUDE_PROCESS_STATE_DATA) != 0;
+ final boolean includeScreenStateData = (query.getFlags()
+ & BatteryUsageStatsQuery.FLAG_BATTERY_USAGE_STATS_INCLUDE_SCREEN_STATE) != 0;
+ final boolean includePowerStateData = (query.getFlags()
+ & BatteryUsageStatsQuery.FLAG_BATTERY_USAGE_STATS_INCLUDE_POWER_STATE) != 0;
final double minConsumedPowerThreshold = query.getMinConsumedPowerThreshold();
BatteryUsageStats.Builder builder = new BatteryUsageStats.Builder(
customPowerComponentNames, includePowerModels, includeProcessStateData,
- minConsumedPowerThreshold);
+ includeScreenStateData, includePowerStateData, minConsumedPowerThreshold);
SparseArray<? extends BatteryStats.Uid> uidStats = mBatteryStats.getUidStats();
for (int i = 0; i < uidStats.size(); i++) {
builder.getOrCreateUidBatteryConsumerBuilder(uidStats.valueAt(i));
diff --git a/services/tests/powerstatstests/src/com/android/server/power/stats/BatteryUsageStatsTest.java b/services/tests/powerstatstests/src/com/android/server/power/stats/BatteryUsageStatsTest.java
index a3f0770ec8ba..52bb5e839ca2 100644
--- a/services/tests/powerstatstests/src/com/android/server/power/stats/BatteryUsageStatsTest.java
+++ b/services/tests/powerstatstests/src/com/android/server/power/stats/BatteryUsageStatsTest.java
@@ -31,6 +31,8 @@ import static org.junit.Assert.fail;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
+import static java.util.regex.Pattern.quote;
+
import android.os.AggregateBatteryConsumer;
import android.os.BatteryConsumer;
import android.os.BatteryUsageStats;
@@ -91,7 +93,7 @@ public class BatteryUsageStatsTest {
final Parcel parcel = Parcel.obtain();
parcel.writeParcelable(outBatteryUsageStats, 0);
- assertThat(parcel.dataSize()).isLessThan(12000);
+ assertThat(parcel.dataSize()).isLessThan(100000);
parcel.setDataPosition(0);
@@ -161,15 +163,47 @@ public class BatteryUsageStatsTest {
assertThat(dump).contains("Computed drain: 30000");
assertThat(dump).contains("actual drain: 1000-2000");
assertThat(dump).contains("cpu: 20100 apps: 10100 duration: 20s 300ms");
- assertThat(dump).contains("cpu(fg): 2333 apps: 1333 duration: 3s 332ms");
- assertThat(dump).contains("cpu(bg): 2444 apps: 1444 duration: 4s 442ms");
- assertThat(dump).contains("cpu(fgs): 2555 apps: 1555 duration: 5s 552ms");
- assertThat(dump).contains("cpu(cached): 123 apps: 123 duration: 456ms");
assertThat(dump).contains("FOO: 20200 apps: 10200 duration: 20s 400ms");
- assertThat(dump).contains("UID 271: 1200 fg: 1777 bg: 1888 fgs: 1999 cached: 123 "
- + "( screen=300 cpu=400 (600ms) cpu:fg=1777 (7s 771ms) cpu:bg=1888 (8s 881ms) "
- + "cpu:fgs=1999 (9s 991ms) cpu:cached=123 (456ms) FOO=500 )");
- assertThat(dump).contains("User 42: 30.0 ( cpu=10.0 (30ms) FOO=20.0 )");
+ assertThat(dump).containsMatch(quote("(on battery, screen on)") + "\\s*"
+ + "cpu: 2333 apps: 1333 duration: 3s 332ms");
+ assertThat(dump).containsMatch(quote("(not on battery, screen on)") + "\\s*"
+ + "cpu: 2555 apps: 1555 duration: 5s 552ms");
+ assertThat(dump).containsMatch(quote("(on battery, screen off/doze)") + "\\s*"
+ + "cpu: 2444 apps: 1444 duration: 4s 442ms");
+ assertThat(dump).containsMatch(quote("(not on battery, screen off/doze)") + "\\s*"
+ + "cpu: 123 apps: 123 duration: 456ms");
+ assertThat(dump).containsMatch(
+ "UID 271: 1200 fg: 1777 bg: 1888 fgs: 1999 cached: 123\\s*"
+ + quote("screen=300 cpu=5787 (27s 99ms) cpu:fg=1777 (7s 771ms) "
+ + "cpu:bg=1888 (8s 881ms) cpu:fgs=1999 (9s 991ms) "
+ + "cpu:cached=123 (456ms) FOO=500") + "\\s*"
+ + quote("(on battery, screen on)") + "\\s*"
+ + quote("cpu:fg=1777 (7s 771ms)"));
+ assertThat(dump).containsMatch("User 42: 30.0\\s*"
+ + quote("cpu=10.0 (30ms) FOO=20.0"));
+ }
+
+ @Test
+ public void testDumpNoScreenOrPowerState() {
+ final BatteryUsageStats stats = buildBatteryUsageStats1(true, false, false).build();
+ final StringWriter out = new StringWriter();
+ try (PrintWriter pw = new PrintWriter(out)) {
+ stats.dump(pw, " ");
+ }
+ final String dump = out.toString();
+
+ assertThat(dump).contains("Capacity: 4000");
+ assertThat(dump).contains("Computed drain: 30000");
+ assertThat(dump).contains("actual drain: 1000-2000");
+ assertThat(dump).contains("cpu: 20100 apps: 10100 duration: 20s 300ms");
+ assertThat(dump).contains("FOO: 20200 apps: 10200 duration: 20s 400ms");
+ assertThat(dump).containsMatch(
+ "UID 271: 1200 fg: 1777 bg: 1888 fgs: 1999 cached: 123\\s*"
+ + quote("screen=300 cpu=5787 (600ms) cpu:fg=1777 (7s 771ms) "
+ + "cpu:bg=1888 (8s 881ms) cpu:fgs=1999 (9s 991ms) "
+ + "cpu:cached=123 (456ms) FOO=500"));
+ assertThat(dump).containsMatch("User 42: 30.0\\s*"
+ + quote("cpu=10.0 (30ms) FOO=20.0"));
}
@Test
@@ -186,9 +220,8 @@ public class BatteryUsageStatsTest {
public void testAdd() {
final BatteryUsageStats stats1 = buildBatteryUsageStats1(false).build();
final BatteryUsageStats stats2 = buildBatteryUsageStats2(new String[]{"FOO"}, true).build();
-
final BatteryUsageStats sum =
- new BatteryUsageStats.Builder(new String[]{"FOO"}, true, true, 0)
+ new BatteryUsageStats.Builder(new String[]{"FOO"}, true, true, true, true, 0)
.add(stats1)
.add(stats2)
.build();
@@ -200,14 +233,14 @@ public class BatteryUsageStatsTest {
for (UidBatteryConsumer uidBatteryConsumer : uidBatteryConsumers) {
if (uidBatteryConsumer.getUid() == APP_UID1) {
assertUidBatteryConsumer(uidBatteryConsumer, 2124, null,
- 5321, 6900, 532, 423, BatteryConsumer.POWER_MODEL_POWER_PROFILE, 745,
+ 5321, 6900, 532, 423, BatteryConsumer.POWER_MODEL_POWER_PROFILE, 11772,
POWER_MODEL_UNDEFINED,
956, 1167, 1478,
true, 3554, 3776, 3998, 444, 3554, 15542, 3776, 17762, 3998, 19982,
444, 1110);
} else if (uidBatteryConsumer.getUid() == APP_UID2) {
assertUidBatteryConsumer(uidBatteryConsumer, 1332, "bar",
- 1111, 2220, 2, 333, BatteryConsumer.POWER_MODEL_POWER_PROFILE, 444,
+ 1111, 2220, 2, 333, BatteryConsumer.POWER_MODEL_POWER_PROFILE, 5985,
BatteryConsumer.POWER_MODEL_POWER_PROFILE,
555, 666, 777,
true, 1777, 1888, 1999, 321, 1777, 7771, 1888, 8881, 1999, 9991,
@@ -229,7 +262,7 @@ public class BatteryUsageStatsTest {
@Test
public void testAdd_customComponentMismatch() {
final BatteryUsageStats.Builder builder =
- new BatteryUsageStats.Builder(new String[]{"FOO"}, true, true, 0);
+ new BatteryUsageStats.Builder(new String[]{"FOO"}, true, true, true, true, 0);
final BatteryUsageStats stats = buildBatteryUsageStats2(new String[]{"BAR"}, false).build();
assertThrows(IllegalArgumentException.class, () -> builder.add(stats));
@@ -238,7 +271,7 @@ public class BatteryUsageStatsTest {
@Test
public void testAdd_processStateDataMismatch() {
final BatteryUsageStats.Builder builder =
- new BatteryUsageStats.Builder(new String[]{"FOO"}, true, true, 0);
+ new BatteryUsageStats.Builder(new String[]{"FOO"}, true, true, true, true, 0);
final BatteryUsageStats stats = buildBatteryUsageStats2(new String[]{"FOO"}, false).build();
assertThrows(IllegalArgumentException.class, () -> builder.add(stats));
@@ -259,15 +292,23 @@ public class BatteryUsageStatsTest {
parser.setInput(in, StandardCharsets.UTF_8.name());
final BatteryUsageStats fromXml = BatteryUsageStats.createFromXml(parser);
+ System.out.println("stats = " + stats);
+ System.out.println("fromXml = " + fromXml);
assertBatteryUsageStats1(fromXml, true);
}
private BatteryUsageStats.Builder buildBatteryUsageStats1(boolean includeUserBatteryConsumer) {
+ return buildBatteryUsageStats1(includeUserBatteryConsumer, true, true);
+ }
+
+ private BatteryUsageStats.Builder buildBatteryUsageStats1(boolean includeUserBatteryConsumer,
+ boolean includeScreenState, boolean includePowerState) {
final MockClock clocks = new MockClock();
final MockBatteryStatsImpl batteryStats = new MockBatteryStatsImpl(clocks);
final BatteryUsageStats.Builder builder =
- new BatteryUsageStats.Builder(new String[]{"FOO"}, true, true, 0)
+ new BatteryUsageStats.Builder(new String[]{"FOO"}, true, true,
+ includeScreenState, includePowerState, 0)
.setBatteryCapacity(4000)
.setDischargePercentage(20)
.setDischargedPowerRange(1000, 2000)
@@ -312,7 +353,7 @@ public class BatteryUsageStatsTest {
final BatteryUsageStats.Builder builder =
new BatteryUsageStats.Builder(customPowerComponentNames, true,
- includeProcessStateData, 0);
+ includeProcessStateData, true, true, 0);
builder.setDischargePercentage(30)
.setDischargedPowerRange(1234, 2345)
.setStatsStartTimestamp(2000)
@@ -371,9 +412,15 @@ public class BatteryUsageStatsTest {
.setUsageDurationForCustomComponentMillis(
BatteryConsumer.FIRST_CUSTOM_POWER_COMPONENT_ID, customComponentDuration);
if (builder.isProcessStateDataNeeded()) {
- final BatteryConsumer.Key cpuFgKey = uidBuilder.getKey(
- BatteryConsumer.POWER_COMPONENT_CPU,
- BatteryConsumer.PROCESS_STATE_FOREGROUND);
+ final BatteryConsumer.Key cpuFgKey = builder.isScreenStateDataNeeded()
+ ? uidBuilder.getKey(
+ BatteryConsumer.POWER_COMPONENT_CPU,
+ BatteryConsumer.PROCESS_STATE_FOREGROUND,
+ BatteryConsumer.SCREEN_STATE_ON,
+ BatteryConsumer.POWER_STATE_BATTERY)
+ : uidBuilder.getKey(
+ BatteryConsumer.POWER_COMPONENT_CPU,
+ BatteryConsumer.PROCESS_STATE_FOREGROUND);
final BatteryConsumer.Key cpuBgKey = uidBuilder.getKey(
BatteryConsumer.POWER_COMPONENT_CPU,
BatteryConsumer.PROCESS_STATE_BACKGROUND);
@@ -401,9 +448,9 @@ public class BatteryUsageStatsTest {
private void addAggregateBatteryConsumer(BatteryUsageStats.Builder builder, int scope,
double consumedPower, int cpuPower, int customComponentPower, int cpuDuration,
- int customComponentDuration, double cpuPowerForeground, long cpuDurationForeground,
- double cpuPowerBackground, long cpuDurationBackground, double cpuPowerFgs,
- long cpuDurationFgs, double cpuPowerCached, long cpuDurationCached) {
+ int customComponentDuration, double cpuPowerBatScrOn, long cpuDurationBatScrOn,
+ double cpuPowerBatScrOff, long cpuDurationBatScrOff, double cpuPowerChgScrOn,
+ long cpuDurationChgScrOn, double cpuPowerChgScrOff, long cpuDurationChgScrOff) {
final AggregateBatteryConsumer.Builder aggBuilder =
builder.getAggregateBatteryConsumerBuilder(scope)
.setConsumedPower(consumedPower)
@@ -417,32 +464,40 @@ public class BatteryUsageStatsTest {
.setUsageDurationForCustomComponentMillis(
BatteryConsumer.FIRST_CUSTOM_POWER_COMPONENT_ID,
customComponentDuration);
- if (builder.isProcessStateDataNeeded()) {
- final BatteryConsumer.Key cpuFgKey = aggBuilder.getKey(
+ if (builder.isPowerStateDataNeeded() || builder.isScreenStateDataNeeded()) {
+ final BatteryConsumer.Key cpuBatScrOn = aggBuilder.getKey(
BatteryConsumer.POWER_COMPONENT_CPU,
- BatteryConsumer.PROCESS_STATE_FOREGROUND);
- final BatteryConsumer.Key cpuBgKey = aggBuilder.getKey(
+ BatteryConsumer.PROCESS_STATE_UNSPECIFIED,
+ BatteryConsumer.SCREEN_STATE_ON,
+ BatteryConsumer.POWER_STATE_BATTERY);
+ final BatteryConsumer.Key cpuBatScrOff = aggBuilder.getKey(
BatteryConsumer.POWER_COMPONENT_CPU,
- BatteryConsumer.PROCESS_STATE_BACKGROUND);
- final BatteryConsumer.Key cpuFgsKey = aggBuilder.getKey(
+ BatteryConsumer.PROCESS_STATE_UNSPECIFIED,
+ BatteryConsumer.SCREEN_STATE_OTHER,
+ BatteryConsumer.POWER_STATE_BATTERY);
+ final BatteryConsumer.Key cpuChgScrOn = aggBuilder.getKey(
BatteryConsumer.POWER_COMPONENT_CPU,
- BatteryConsumer.PROCESS_STATE_FOREGROUND_SERVICE);
- final BatteryConsumer.Key cpuCachedKey = aggBuilder.getKey(
+ BatteryConsumer.PROCESS_STATE_UNSPECIFIED,
+ BatteryConsumer.SCREEN_STATE_ON,
+ BatteryConsumer.POWER_STATE_OTHER);
+ final BatteryConsumer.Key cpuChgScrOff = aggBuilder.getKey(
BatteryConsumer.POWER_COMPONENT_CPU,
- BatteryConsumer.PROCESS_STATE_CACHED);
+ BatteryConsumer.PROCESS_STATE_UNSPECIFIED,
+ BatteryConsumer.SCREEN_STATE_OTHER,
+ BatteryConsumer.POWER_STATE_OTHER);
aggBuilder
- .setConsumedPower(cpuFgKey, cpuPowerForeground,
+ .setConsumedPower(cpuBatScrOn, cpuPowerBatScrOn,
BatteryConsumer.POWER_MODEL_POWER_PROFILE)
- .setUsageDurationMillis(cpuFgKey, cpuDurationForeground)
- .setConsumedPower(cpuBgKey, cpuPowerBackground,
+ .setUsageDurationMillis(cpuBatScrOn, cpuDurationBatScrOn)
+ .setConsumedPower(cpuBatScrOff, cpuPowerBatScrOff,
BatteryConsumer.POWER_MODEL_POWER_PROFILE)
- .setUsageDurationMillis(cpuBgKey, cpuDurationBackground)
- .setConsumedPower(cpuFgsKey, cpuPowerFgs,
+ .setUsageDurationMillis(cpuBatScrOff, cpuDurationBatScrOff)
+ .setConsumedPower(cpuChgScrOn, cpuPowerChgScrOn,
BatteryConsumer.POWER_MODEL_POWER_PROFILE)
- .setUsageDurationMillis(cpuFgsKey, cpuDurationFgs)
- .setConsumedPower(cpuCachedKey, cpuPowerCached,
+ .setUsageDurationMillis(cpuChgScrOn, cpuDurationChgScrOn)
+ .setConsumedPower(cpuChgScrOff, cpuPowerChgScrOff,
BatteryConsumer.POWER_MODEL_POWER_PROFILE)
- .setUsageDurationMillis(cpuCachedKey, cpuDurationCached);
+ .setUsageDurationMillis(cpuChgScrOff, cpuDurationChgScrOff);
}
}
@@ -456,7 +511,7 @@ public class BatteryUsageStatsTest {
for (UidBatteryConsumer uidBatteryConsumer : uidBatteryConsumers) {
if (uidBatteryConsumer.getUid() == APP_UID1) {
assertUidBatteryConsumer(uidBatteryConsumer, 1200, "foo",
- 1000, 1500, 500, 300, BatteryConsumer.POWER_MODEL_POWER_PROFILE, 400,
+ 1000, 1500, 500, 300, BatteryConsumer.POWER_MODEL_POWER_PROFILE, 5787,
BatteryConsumer.POWER_MODEL_POWER_PROFILE,
500, 600, 800,
true, 1777, 1888, 1999, 123, 1777, 7771, 1888, 8881, 1999, 9991, 123, 456);
@@ -568,54 +623,53 @@ public class BatteryUsageStatsTest {
.isEqualTo(totalPowerCached);
}
- final BatteryConsumer.Key cpuFgKey = uidBatteryConsumer.getKey(
+ final BatteryConsumer.Dimensions cpuFg = new BatteryConsumer.Dimensions(
BatteryConsumer.POWER_COMPONENT_CPU, BatteryConsumer.PROCESS_STATE_FOREGROUND);
if (processStateDataIncluded) {
- assertThat(cpuFgKey).isNotNull();
- assertThat(uidBatteryConsumer.getConsumedPower(cpuFgKey))
+ assertThat(uidBatteryConsumer.getConsumedPower(cpuFg))
.isEqualTo(cpuPowerForeground);
- assertThat(uidBatteryConsumer.getUsageDurationMillis(cpuFgKey))
+ assertThat(uidBatteryConsumer.getUsageDurationMillis(cpuFg))
.isEqualTo(cpuDurationForeground);
} else {
- assertThat(cpuFgKey).isNull();
+ assertThat(uidBatteryConsumer.getConsumedPower(cpuFg)).isEqualTo(0);
}
- final BatteryConsumer.Key cpuBgKey = uidBatteryConsumer.getKey(
+ final BatteryConsumer.Dimensions cpuBg = new BatteryConsumer.Dimensions(
BatteryConsumer.POWER_COMPONENT_CPU, BatteryConsumer.PROCESS_STATE_BACKGROUND);
if (processStateDataIncluded) {
- assertThat(cpuBgKey).isNotNull();
- assertThat(uidBatteryConsumer.getConsumedPower(cpuBgKey))
+ assertThat(uidBatteryConsumer.getConsumedPower(cpuBg))
.isEqualTo(cpuPowerBackground);
- assertThat(uidBatteryConsumer.getUsageDurationMillis(cpuBgKey))
+ assertThat(uidBatteryConsumer.getUsageDurationMillis(cpuBg))
.isEqualTo(cpuDurationBackground);
} else {
- assertThat(cpuBgKey).isNull();
+ assertThat(uidBatteryConsumer.getConsumedPower(cpuBg))
+ .isEqualTo(0);
}
- final BatteryConsumer.Key cpuFgsKey = uidBatteryConsumer.getKey(
+ final BatteryConsumer.Dimensions cpuFgs = new BatteryConsumer.Dimensions(
BatteryConsumer.POWER_COMPONENT_CPU,
BatteryConsumer.PROCESS_STATE_FOREGROUND_SERVICE);
if (processStateDataIncluded) {
- assertThat(cpuFgsKey).isNotNull();
- assertThat(uidBatteryConsumer.getConsumedPower(cpuFgsKey))
+ assertThat(uidBatteryConsumer.getConsumedPower(cpuFgs))
.isEqualTo(cpuPowerFgs);
- assertThat(uidBatteryConsumer.getUsageDurationMillis(cpuFgsKey))
+ assertThat(uidBatteryConsumer.getUsageDurationMillis(cpuFgs))
.isEqualTo(cpuDurationFgs);
} else {
- assertThat(cpuFgsKey).isNotNull();
+ assertThat(uidBatteryConsumer.getConsumedPower(cpuFgs))
+ .isEqualTo(0);
}
- final BatteryConsumer.Key cachedKey = uidBatteryConsumer.getKey(
+ final BatteryConsumer.Dimensions cached = new BatteryConsumer.Dimensions(
BatteryConsumer.POWER_COMPONENT_CPU,
BatteryConsumer.PROCESS_STATE_CACHED);
if (processStateDataIncluded) {
- assertThat(cachedKey).isNotNull();
- assertThat(uidBatteryConsumer.getConsumedPower(cachedKey))
+ assertThat(uidBatteryConsumer.getConsumedPower(cached))
.isEqualTo(cpuPowerCached);
- assertThat(uidBatteryConsumer.getUsageDurationMillis(cachedKey))
+ assertThat(uidBatteryConsumer.getUsageDurationMillis(cached))
.isEqualTo(cpuDurationCached);
} else {
- assertThat(cpuFgsKey).isNotNull();
+ assertThat(uidBatteryConsumer.getConsumedPower(cached))
+ .isEqualTo(0);
}
}
diff --git a/services/tests/powerstatstests/src/com/android/server/power/stats/CpuPowerStatsCollectorValidationTest.java b/services/tests/powerstatstests/src/com/android/server/power/stats/CpuPowerStatsCollectorValidationTest.java
index 644ae4717eb1..005ceee703a8 100644
--- a/services/tests/powerstatstests/src/com/android/server/power/stats/CpuPowerStatsCollectorValidationTest.java
+++ b/services/tests/powerstatstests/src/com/android/server/power/stats/CpuPowerStatsCollectorValidationTest.java
@@ -130,7 +130,7 @@ public class CpuPowerStatsCollectorValidationTest {
boolean inCpuSection = false;
for (int i = 0; i < lines.length; i++) {
if (!inCpuSection) {
- if (lines[i].startsWith("CpuPowerStatsCollector")) {
+ if (lines[i].startsWith("cpu (1)")) {
inCpuSection = true;
}
} else if (lines[i].startsWith(" ")) {
diff --git a/services/tests/powerstatstests/src/com/android/server/power/stats/CustomEnergyConsumerPowerStatsTest.java b/services/tests/powerstatstests/src/com/android/server/power/stats/CustomEnergyConsumerPowerStatsTest.java
index 7bec13f653e7..1621d47d62b5 100644
--- a/services/tests/powerstatstests/src/com/android/server/power/stats/CustomEnergyConsumerPowerStatsTest.java
+++ b/services/tests/powerstatstests/src/com/android/server/power/stats/CustomEnergyConsumerPowerStatsTest.java
@@ -149,9 +149,9 @@ public class CustomEnergyConsumerPowerStatsTest {
.isEqualTo(20000);
assertThat(ps2.uidStats.size()).isEqualTo(2);
assertThat(POWER_STATS_LAYOUT.getUidConsumedEnergy(ps2.uidStats.get(APP_UID1), 0))
- .isEqualTo(14000);
+ .isEqualTo(4000);
assertThat(POWER_STATS_LAYOUT.getUidConsumedEnergy(ps2.uidStats.get(APP_UID2), 0))
- .isEqualTo(21000);
+ .isEqualTo(6000);
}
@Test
@@ -209,8 +209,8 @@ public class CustomEnergyConsumerPowerStatsTest {
assertThat(POWER_STATS_LAYOUT.getDevicePowerEstimate(deviceStats))
.isWithin(PRECISION).of(expectedPower * 0.75);
- // UID1: estimated power = 14,000 uC = 0.00388 mAh
- expectedPower = 0.00388;
+ // UID1: estimated power = 4,000 uC = 0.00111 mAh
+ expectedPower = 0.00111;
ps2.getUidStats(uidStats, APP_UID1,
states(POWER_STATE_OTHER, SCREEN_STATE_ON, PROCESS_STATE_FOREGROUND));
assertThat(POWER_STATS_LAYOUT.getUidPowerEstimate(uidStats))
@@ -221,8 +221,8 @@ public class CustomEnergyConsumerPowerStatsTest {
assertThat(POWER_STATS_LAYOUT.getUidPowerEstimate(uidStats))
.isWithin(PRECISION).of(expectedPower * 0.75);
- // UID2: estimated power = 21,000 uC = 0.00583 mAh
- expectedPower = 0.00583;
+ // UID2: estimated power = 6,000 uC = 0.00166 mAh
+ expectedPower = 0.00167;
ps2.getUidStats(uidStats, APP_UID2,
states(POWER_STATE_OTHER, SCREEN_STATE_ON, PROCESS_STATE_CACHED));
assertThat(POWER_STATS_LAYOUT.getUidPowerEstimate(uidStats))
diff --git a/services/tests/powerstatstests/src/com/android/server/power/stats/PowerStatsExporterTest.java b/services/tests/powerstatstests/src/com/android/server/power/stats/PowerStatsExporterTest.java
index 32bfb2cd3507..7f7967ba4d7b 100644
--- a/services/tests/powerstatstests/src/com/android/server/power/stats/PowerStatsExporterTest.java
+++ b/services/tests/powerstatstests/src/com/android/server/power/stats/PowerStatsExporterTest.java
@@ -19,7 +19,6 @@ package com.android.server.power.stats;
import static com.google.common.truth.Truth.assertThat;
import static com.google.common.truth.Truth.assertWithMessage;
-import static org.junit.Assert.assertThrows;
import static org.mockito.Mockito.mock;
import android.os.AggregateBatteryConsumer;
@@ -131,9 +130,20 @@ public class PowerStatsExporterTest {
@Test
public void breakdownByProcState_fullRange() throws Exception {
+ breakdownByProcState_fullRange(false, false);
+ }
+
+ @Test
+ public void breakdownByProcStateScreenAndPower_fullRange() throws Exception {
+ breakdownByProcState_fullRange(true, true);
+ }
+
+ private void breakdownByProcState_fullRange(boolean includeScreenStateData,
+ boolean includePowerStateData) throws Exception {
BatteryUsageStats.Builder builder = new BatteryUsageStats.Builder(
new String[]{"cu570m"}, /* includePowerModels */ false,
- /* includeProcessStateData */ true, /* powerThreshold */ 0);
+ /* includeProcessStateData */ true, includeScreenStateData,
+ includePowerStateData, /* powerThreshold */ 0);
exportAggregatedPowerStats(builder, 1000, 10000);
BatteryUsageStats actual = builder.build();
@@ -177,7 +187,7 @@ public class PowerStatsExporterTest {
public void breakdownByProcState_subRange() throws Exception {
BatteryUsageStats.Builder builder = new BatteryUsageStats.Builder(
new String[]{"cu570m"}, /* includePowerModels */ false,
- /* includeProcessStateData */ true, /* powerThreshold */ 0);
+ /* includeProcessStateData */ true, true, true, /* powerThreshold */ 0);
exportAggregatedPowerStats(builder, 3700, 6700);
BatteryUsageStats actual = builder.build();
@@ -209,7 +219,7 @@ public class PowerStatsExporterTest {
public void combinedProcessStates() throws Exception {
BatteryUsageStats.Builder builder = new BatteryUsageStats.Builder(
new String[]{"cu570m"}, /* includePowerModels */ false,
- /* includeProcessStateData */ false, /* powerThreshold */ 0);
+ /* includeProcessStateData */ false, true, true, /* powerThreshold */ 0);
exportAggregatedPowerStats(builder, 1000, 10000);
BatteryUsageStats actual = builder.build();
@@ -229,13 +239,13 @@ public class PowerStatsExporterTest {
UidBatteryConsumer uidScope = actual.getUidBatteryConsumers().stream()
.filter(us -> us.getUid() == APP_UID1).findFirst().orElse(null);
// There shouldn't be any per-procstate data
- assertThrows(
- IllegalArgumentException.class,
- () -> uidScope.getConsumedPower(new BatteryConsumer.Dimensions(
+ for (int procState = 0; procState < BatteryConsumer.PROCESS_STATE_COUNT; procState++) {
+ if (procState != BatteryConsumer.PROCESS_STATE_UNSPECIFIED) {
+ assertThat(uidScope.getConsumedPower(new BatteryConsumer.Dimensions(
BatteryConsumer.POWER_COMPONENT_CPU,
- BatteryConsumer.PROCESS_STATE_FOREGROUND)));
-
-
+ BatteryConsumer.PROCESS_STATE_FOREGROUND))).isEqualTo(0);
+ }
+ }
actual.close();
}
diff --git a/services/tests/powerstatstests/src/com/android/server/power/stats/WifiPowerStatsCollectorTest.java b/services/tests/powerstatstests/src/com/android/server/power/stats/WifiPowerStatsCollectorTest.java
index 362607b91763..b13fc530399b 100644
--- a/services/tests/powerstatstests/src/com/android/server/power/stats/WifiPowerStatsCollectorTest.java
+++ b/services/tests/powerstatstests/src/com/android/server/power/stats/WifiPowerStatsCollectorTest.java
@@ -355,7 +355,7 @@ public class WifiPowerStatsCollectorTest {
assertThat(stats.getNumBytesRx()).isEqualTo(13321);
assertThat(stats.getNumPacketsTx()).isEqualTo(263);
assertThat(stats.getNumBytesTx()).isEqualTo(7234);
- assertThat(stats.getScanTimeMillis()).isEqualTo(2200);
+ assertThat(stats.getScanTimeMillis()).isEqualTo(200);
assertThat(stats.getRxTimeMillis()).isEqualTo(6000);
assertThat(stats.getTxTimeMillis()).isEqualTo(1000);
assertThat(stats.getIdleTimeMillis()).isEqualTo(300);
diff --git a/services/tests/servicestests/Android.bp b/services/tests/servicestests/Android.bp
index 753db125ffe3..b9e99dd2e1e4 100644
--- a/services/tests/servicestests/Android.bp
+++ b/services/tests/servicestests/Android.bp
@@ -36,6 +36,8 @@ android_test {
"-Werror",
],
static_libs: [
+ "a11ychecker-protos-java-proto-lite",
+ "aatf",
"cts-input-lib",
"frameworks-base-testutils",
"services.accessibility",
diff --git a/services/tests/servicestests/src/com/android/server/accessibility/AccessibilityUserStateTest.java b/services/tests/servicestests/src/com/android/server/accessibility/AccessibilityUserStateTest.java
index ca3055196e6d..62fa95149067 100644
--- a/services/tests/servicestests/src/com/android/server/accessibility/AccessibilityUserStateTest.java
+++ b/services/tests/servicestests/src/com/android/server/accessibility/AccessibilityUserStateTest.java
@@ -152,6 +152,7 @@ public class AccessibilityUserStateTest {
@Test
public void onSwitchToAnotherUser_userStateClearedNonDefaultValues() {
+ String componentNameString = COMPONENT_NAME.flattenToString();
mUserState.getBoundServicesLocked().add(mMockConnection);
mUserState.getBindingServicesLocked().add(COMPONENT_NAME);
mUserState.setLastSentClientStateLocked(
@@ -162,10 +163,13 @@ public class AccessibilityUserStateTest {
mUserState.setInteractiveUiTimeoutLocked(30);
mUserState.mEnabledServices.add(COMPONENT_NAME);
mUserState.mTouchExplorationGrantedServices.add(COMPONENT_NAME);
- mUserState.updateShortcutTargetsLocked(Set.of(COMPONENT_NAME.flattenToString()), HARDWARE);
- mUserState.updateShortcutTargetsLocked(Set.of(COMPONENT_NAME.flattenToString()), SOFTWARE);
- mUserState.updateShortcutTargetsLocked(Set.of(COMPONENT_NAME.flattenToString()), GESTURE);
- mUserState.setTargetAssignedToAccessibilityButton(COMPONENT_NAME.flattenToString());
+ mUserState.updateShortcutTargetsLocked(Set.of(componentNameString), HARDWARE);
+ mUserState.updateShortcutTargetsLocked(Set.of(componentNameString), SOFTWARE);
+ mUserState.updateShortcutTargetsLocked(Set.of(componentNameString), GESTURE);
+ mUserState.updateShortcutTargetsLocked(Set.of(componentNameString), QUICK_SETTINGS);
+ mUserState.updateA11yTilesInQsPanelLocked(
+ Set.of(AccessibilityShortcutController.COLOR_INVERSION_TILE_COMPONENT_NAME));
+ mUserState.setTargetAssignedToAccessibilityButton(componentNameString);
mUserState.setTouchExplorationEnabledLocked(true);
mUserState.setMagnificationSingleFingerTripleTapEnabledLocked(true);
mUserState.setMagnificationTwoFingerTripleTapEnabledLocked(true);
@@ -189,6 +193,8 @@ public class AccessibilityUserStateTest {
assertTrue(mUserState.getShortcutTargetsLocked(HARDWARE).isEmpty());
assertTrue(mUserState.getShortcutTargetsLocked(SOFTWARE).isEmpty());
assertTrue(mUserState.getShortcutTargetsLocked(GESTURE).isEmpty());
+ assertTrue(mUserState.getShortcutTargetsLocked(QUICK_SETTINGS).isEmpty());
+ assertTrue(mUserState.getA11yQsTilesInQsPanel().isEmpty());
assertNull(mUserState.getTargetAssignedToAccessibilityButton());
assertFalse(mUserState.isTouchExplorationEnabledLocked());
assertFalse(mUserState.isMagnificationSingleFingerTripleTapEnabledLocked());
diff --git a/services/tests/servicestests/src/com/android/server/accessibility/MouseKeysInterceptorTest.kt b/services/tests/servicestests/src/com/android/server/accessibility/MouseKeysInterceptorTest.kt
new file mode 100644
index 000000000000..0def51691efa
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/accessibility/MouseKeysInterceptorTest.kt
@@ -0,0 +1,295 @@
+/*
+ * 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.server.accessibility
+
+import android.util.MathUtils.sqrt
+
+import android.companion.virtual.VirtualDeviceManager
+import android.companion.virtual.VirtualDeviceParams
+import android.content.Context
+import android.hardware.input.IInputManager
+import android.hardware.input.InputManager
+import android.hardware.input.InputManagerGlobal
+import android.hardware.input.VirtualMouse
+import android.hardware.input.VirtualMouseButtonEvent
+import android.hardware.input.VirtualMouseConfig
+import android.hardware.input.VirtualMouseRelativeEvent
+import android.hardware.input.VirtualMouseScrollEvent
+import android.os.RemoteException
+import android.os.test.TestLooper
+import android.platform.test.annotations.Presubmit
+import android.view.KeyEvent
+import androidx.test.core.app.ApplicationProvider
+import com.android.server.companion.virtual.VirtualDeviceManagerInternal
+import com.android.server.LocalServices
+import com.android.server.testutils.OffsettableClock
+import junit.framework.Assert.assertEquals
+import org.junit.After
+import org.junit.Before
+import org.junit.Test
+import org.mockito.ArgumentCaptor
+import org.mockito.Mock
+import org.mockito.Mockito
+import org.mockito.MockitoAnnotations
+import java.util.concurrent.TimeUnit
+import java.util.LinkedList
+import java.util.Queue
+import android.util.ArraySet
+
+/**
+ * Tests for {@link MouseKeysInterceptor}
+ *
+ * Build/Install/Run:
+ * atest FrameworksServicesTests:MouseKeysInterceptorTest
+ */
+@Presubmit
+class MouseKeysInterceptorTest {
+ companion object {
+ const val DISPLAY_ID = 1
+ const val DEVICE_ID = 123
+ const val MOUSE_POINTER_MOVEMENT_STEP = 1.8f
+ // This delay is required for key events to be sent and handled correctly.
+ // The handler only performs a move/scroll event if it receives the key event
+ // at INTERVAL_MILLIS (which happens in practice). Hence, we need this delay in the tests.
+ const val KEYBOARD_POST_EVENT_DELAY_MILLIS = 20L
+ }
+
+ private lateinit var mouseKeysInterceptor: MouseKeysInterceptor
+ private val clock = OffsettableClock()
+ private val testLooper = TestLooper { clock.now() }
+ private val nextInterceptor = TrackingInterceptor()
+
+ @Mock
+ private lateinit var mockAms: AccessibilityManagerService
+
+ @Mock
+ private lateinit var iInputManager: IInputManager
+ private lateinit var testSession: InputManagerGlobal.TestSession
+ private lateinit var mockInputManager: InputManager
+
+ @Mock
+ private lateinit var mockVirtualDeviceManagerInternal: VirtualDeviceManagerInternal
+ @Mock
+ private lateinit var mockVirtualDevice: VirtualDeviceManager.VirtualDevice
+ @Mock
+ private lateinit var mockVirtualMouse: VirtualMouse
+
+ @Mock
+ private lateinit var mockTraceManager: AccessibilityTraceManager
+
+ @Before
+ @Throws(RemoteException::class)
+ fun setUp() {
+ MockitoAnnotations.initMocks(this)
+ val context = ApplicationProvider.getApplicationContext<Context>()
+ testSession = InputManagerGlobal.createTestSession(iInputManager)
+ mockInputManager = InputManager(context)
+
+ Mockito.`when`(mockVirtualDeviceManagerInternal.getDeviceIdsForUid(Mockito.anyInt()))
+ .thenReturn(ArraySet(setOf(DEVICE_ID)))
+ LocalServices.removeServiceForTest(VirtualDeviceManagerInternal::class.java)
+ LocalServices.addService<VirtualDeviceManagerInternal>(
+ VirtualDeviceManagerInternal::class.java, mockVirtualDeviceManagerInternal
+ )
+
+ Mockito.`when`(mockVirtualDeviceManagerInternal.createVirtualDevice(
+ Mockito.any(VirtualDeviceParams::class.java)
+ )).thenReturn(mockVirtualDevice)
+ Mockito.`when`(mockVirtualDevice.createVirtualMouse(
+ Mockito.any(VirtualMouseConfig::class.java)
+ )).thenReturn(mockVirtualMouse)
+
+ Mockito.`when`(iInputManager.inputDeviceIds).thenReturn(intArrayOf(DEVICE_ID))
+ Mockito.`when`(mockAms.traceManager).thenReturn(mockTraceManager)
+
+ mouseKeysInterceptor = MouseKeysInterceptor(mockAms, testLooper.looper, DISPLAY_ID)
+ // VirtualMouse is created on a separate thread.
+ // Wait for VirtualMouse to be created before running tests
+ TimeUnit.MILLISECONDS.sleep(20L)
+ mouseKeysInterceptor.next = nextInterceptor
+ }
+
+ @After
+ fun tearDown() {
+ testLooper.dispatchAll()
+ if (this::testSession.isInitialized) {
+ testSession.close()
+ }
+ }
+
+ @Test
+ fun whenNonMouseKeyEventArrives_eventIsPassedToNextInterceptor() {
+ val downTime = clock.now()
+ val downEvent = KeyEvent(downTime, downTime, KeyEvent.ACTION_DOWN,
+ KeyEvent.KEYCODE_Q, 0, 0, DEVICE_ID, 0)
+ mouseKeysInterceptor.onKeyEvent(downEvent, 0)
+ testLooper.dispatchAll()
+
+ assertEquals(1, nextInterceptor.events.size)
+ assertEquals(downEvent, nextInterceptor.events.poll())
+ }
+
+ @Test
+ fun whenMouseDirectionalKeyIsPressed_relativeEventIsSent() {
+ // There should be some delay between the downTime of the key event and calling onKeyEvent
+ val downTime = clock.now() - KEYBOARD_POST_EVENT_DELAY_MILLIS
+ val keyCode = MouseKeysInterceptor.MouseKeyEvent.DIAGONAL_DOWN_LEFT_MOVE.keyCodeValue
+ val downEvent = KeyEvent(downTime, downTime, KeyEvent.ACTION_DOWN,
+ keyCode, 0, 0, DEVICE_ID, 0)
+
+ mouseKeysInterceptor.onKeyEvent(downEvent, 0)
+ testLooper.dispatchAll()
+
+ // Verify the sendRelativeEvent method is called once and capture the arguments
+ verifyRelativeEvents(arrayOf(-MOUSE_POINTER_MOVEMENT_STEP / sqrt(2.0f)),
+ arrayOf(MOUSE_POINTER_MOVEMENT_STEP / sqrt(2.0f)))
+ }
+
+ @Test
+ fun whenClickKeyIsPressed_buttonEventIsSent() {
+ // There should be some delay between the downTime of the key event and calling onKeyEvent
+ val downTime = clock.now() - KEYBOARD_POST_EVENT_DELAY_MILLIS
+ val keyCode = MouseKeysInterceptor.MouseKeyEvent.LEFT_CLICK.keyCodeValue
+ val downEvent = KeyEvent(downTime, downTime, KeyEvent.ACTION_DOWN,
+ keyCode, 0, 0, DEVICE_ID, 0)
+ mouseKeysInterceptor.onKeyEvent(downEvent, 0)
+ testLooper.dispatchAll()
+
+ val actions = arrayOf<Int>(
+ VirtualMouseButtonEvent.ACTION_BUTTON_PRESS,
+ VirtualMouseButtonEvent.ACTION_BUTTON_RELEASE)
+ val buttons = arrayOf<Int>(
+ VirtualMouseButtonEvent.BUTTON_PRIMARY,
+ VirtualMouseButtonEvent.BUTTON_PRIMARY)
+ // Verify the sendButtonEvent method is called twice and capture the arguments
+ verifyButtonEvents(actions, buttons)
+ }
+
+ @Test
+ fun whenHoldKeyIsPressed_buttonEventIsSent() {
+ val downTime = clock.now() - KEYBOARD_POST_EVENT_DELAY_MILLIS
+ val keyCode = MouseKeysInterceptor.MouseKeyEvent.HOLD.keyCodeValue
+ val downEvent = KeyEvent(downTime, downTime, KeyEvent.ACTION_DOWN,
+ keyCode, 0, 0, DEVICE_ID, 0)
+ mouseKeysInterceptor.onKeyEvent(downEvent, 0)
+ testLooper.dispatchAll()
+
+ // Verify the sendButtonEvent method is called once and capture the arguments
+ verifyButtonEvents(
+ arrayOf<Int>( VirtualMouseButtonEvent.ACTION_BUTTON_PRESS),
+ arrayOf<Int>( VirtualMouseButtonEvent.BUTTON_PRIMARY)
+ )
+ }
+
+ @Test
+ fun whenReleaseKeyIsPressed_buttonEventIsSent() {
+ val downTime = clock.now() - KEYBOARD_POST_EVENT_DELAY_MILLIS
+ val keyCode = MouseKeysInterceptor.MouseKeyEvent.RELEASE.keyCodeValue
+ val downEvent = KeyEvent(downTime, downTime, KeyEvent.ACTION_DOWN,
+ keyCode, 0, 0, DEVICE_ID, 0)
+ mouseKeysInterceptor.onKeyEvent(downEvent, 0)
+ testLooper.dispatchAll()
+
+ // Verify the sendButtonEvent method is called once and capture the arguments
+ verifyButtonEvents(
+ arrayOf<Int>( VirtualMouseButtonEvent.ACTION_BUTTON_RELEASE),
+ arrayOf<Int>( VirtualMouseButtonEvent.BUTTON_PRIMARY)
+ )
+ }
+
+ @Test
+ fun whenScrollToggleOn_ScrollUpKeyIsPressed_scrollEventIsSent() {
+ // There should be some delay between the downTime of the key event and calling onKeyEvent
+ val downTime = clock.now() - KEYBOARD_POST_EVENT_DELAY_MILLIS
+ val keyCodeScrollToggle = MouseKeysInterceptor.MouseKeyEvent.SCROLL_TOGGLE.keyCodeValue
+ val keyCodeScroll = MouseKeysInterceptor.MouseKeyEvent.UP_MOVE_OR_SCROLL.keyCodeValue
+
+ val scrollToggleDownEvent = KeyEvent(downTime, downTime, KeyEvent.ACTION_DOWN,
+ keyCodeScrollToggle, 0, 0, DEVICE_ID, 0)
+ val scrollDownEvent = KeyEvent(downTime, downTime, KeyEvent.ACTION_DOWN,
+ keyCodeScroll, 0, 0, DEVICE_ID, 0)
+
+ mouseKeysInterceptor.onKeyEvent(scrollToggleDownEvent, 0)
+ mouseKeysInterceptor.onKeyEvent(scrollDownEvent, 0)
+ testLooper.dispatchAll()
+
+ // Verify the sendScrollEvent method is called once and capture the arguments
+ verifyScrollEvents(arrayOf<Float>(0f), arrayOf<Float>(1.0f))
+ }
+
+ @Test
+ fun whenScrollToggleOff_DirectionalUpKeyIsPressed_RelativeEventIsSent() {
+ // There should be some delay between the downTime of the key event and calling onKeyEvent
+ val downTime = clock.now() - KEYBOARD_POST_EVENT_DELAY_MILLIS
+ val keyCode = MouseKeysInterceptor.MouseKeyEvent.UP_MOVE_OR_SCROLL.keyCodeValue
+ val downEvent = KeyEvent(downTime, downTime, KeyEvent.ACTION_DOWN,
+ keyCode, 0, 0, DEVICE_ID, 0)
+
+ mouseKeysInterceptor.onKeyEvent(downEvent, 0)
+ testLooper.dispatchAll()
+
+ // Verify the sendRelativeEvent method is called once and capture the arguments
+ verifyRelativeEvents(arrayOf<Float>(0f), arrayOf<Float>(-MOUSE_POINTER_MOVEMENT_STEP))
+ }
+
+ private fun verifyRelativeEvents(expectedX: Array<Float>, expectedY: Array<Float>) {
+ assertEquals(expectedX.size, expectedY.size)
+ val captor = ArgumentCaptor.forClass(VirtualMouseRelativeEvent::class.java)
+ Mockito.verify(mockVirtualMouse, Mockito.times(expectedX.size))
+ .sendRelativeEvent(captor.capture())
+
+ for (i in expectedX.indices) {
+ val captorEvent = captor.allValues[i]
+ assertEquals(expectedX[i], captorEvent.relativeX)
+ assertEquals(expectedY[i], captorEvent.relativeY)
+ }
+ }
+
+ private fun verifyButtonEvents(actions: Array<Int>, buttons: Array<Int>) {
+ assertEquals(actions.size, buttons.size)
+ val captor = ArgumentCaptor.forClass(VirtualMouseButtonEvent::class.java)
+ Mockito.verify(mockVirtualMouse, Mockito.times(actions.size))
+ .sendButtonEvent(captor.capture())
+
+ for (i in actions.indices) {
+ val captorEvent = captor.allValues[i]
+ assertEquals(actions[i], captorEvent.action)
+ assertEquals(buttons[i], captorEvent.buttonCode)
+ }
+ }
+
+ private fun verifyScrollEvents(xAxisMovements: Array<Float>, yAxisMovements: Array<Float>) {
+ assertEquals(xAxisMovements.size, yAxisMovements.size)
+ val captor = ArgumentCaptor.forClass(VirtualMouseScrollEvent::class.java)
+ Mockito.verify(mockVirtualMouse, Mockito.times(xAxisMovements.size))
+ .sendScrollEvent(captor.capture())
+
+ for (i in xAxisMovements.indices) {
+ val captorEvent = captor.allValues[i]
+ assertEquals(xAxisMovements[i], captorEvent.xAxisMovement)
+ assertEquals(yAxisMovements[i], captorEvent.yAxisMovement)
+ }
+ }
+
+ private class TrackingInterceptor : BaseEventStreamTransformation() {
+ val events: Queue<KeyEvent> = LinkedList()
+
+ override fun onKeyEvent(event: KeyEvent, policyFlags: Int) {
+ events.add(event)
+ }
+ }
+}
diff --git a/services/tests/servicestests/src/com/android/server/accessibility/a11ychecker/AccessibilityCheckerUtilsTest.java b/services/tests/servicestests/src/com/android/server/accessibility/a11ychecker/AccessibilityCheckerUtilsTest.java
new file mode 100644
index 000000000000..90d427596ab2
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/accessibility/a11ychecker/AccessibilityCheckerUtilsTest.java
@@ -0,0 +1,187 @@
+/*
+ * 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.server.accessibility.a11ychecker;
+
+import static com.android.server.accessibility.a11ychecker.TestUtils.TEST_A11Y_SERVICE_CLASS_NAME;
+import static com.android.server.accessibility.a11ychecker.TestUtils.TEST_A11Y_SERVICE_SOURCE_PACKAGE_NAME;
+import static com.android.server.accessibility.a11ychecker.TestUtils.TEST_A11Y_SERVICE_SOURCE_VERSION_CODE;
+import static com.android.server.accessibility.a11ychecker.TestUtils.TEST_ACTIVITY_NAME;
+import static com.android.server.accessibility.a11ychecker.TestUtils.TEST_APP_PACKAGE_NAME;
+import static com.android.server.accessibility.a11ychecker.TestUtils.TEST_APP_VERSION_CODE;
+import static com.android.server.accessibility.a11ychecker.TestUtils.TEST_WINDOW_TITLE;
+import static com.android.server.accessibility.a11ychecker.TestUtils.getMockPackageManagerWithInstalledApps;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import static org.mockito.Mockito.when;
+
+import android.content.ComponentName;
+import android.content.pm.PackageManager;
+import android.view.accessibility.AccessibilityEvent;
+import android.view.accessibility.AccessibilityNodeInfo;
+
+import androidx.test.runner.AndroidJUnit4;
+
+import com.google.android.apps.common.testing.accessibility.framework.AccessibilityCheckPreset;
+import com.google.android.apps.common.testing.accessibility.framework.AccessibilityCheckResult;
+import com.google.android.apps.common.testing.accessibility.framework.AccessibilityHierarchyCheck;
+import com.google.android.apps.common.testing.accessibility.framework.AccessibilityHierarchyCheckResult;
+import com.google.android.apps.common.testing.accessibility.framework.checks.ClassNameCheck;
+import com.google.android.apps.common.testing.accessibility.framework.checks.ClickableSpanCheck;
+import com.google.android.apps.common.testing.accessibility.framework.checks.SpeakableTextPresentCheck;
+import com.google.android.apps.common.testing.accessibility.framework.checks.TouchTargetSizeCheck;
+import com.google.common.collect.ImmutableSet;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.util.List;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+@RunWith(AndroidJUnit4.class)
+public class AccessibilityCheckerUtilsTest {
+
+ PackageManager mMockPackageManager;
+
+ @Before
+ public void setUp() throws PackageManager.NameNotFoundException {
+ mMockPackageManager = getMockPackageManagerWithInstalledApps();
+ }
+
+ @Test
+ public void processResults_happyPath_setsAllFields() {
+ AccessibilityNodeInfo mockNodeInfo =
+ new MockAccessibilityNodeInfoBuilder()
+ .setViewIdResourceName("TargetNode")
+ .build();
+ AccessibilityHierarchyCheckResult result1 =
+ new AccessibilityHierarchyCheckResult(
+ SpeakableTextPresentCheck.class,
+ AccessibilityCheckResult.AccessibilityCheckResultType.WARNING, null, 1,
+ null);
+ AccessibilityHierarchyCheckResult result2 =
+ new AccessibilityHierarchyCheckResult(
+ TouchTargetSizeCheck.class,
+ AccessibilityCheckResult.AccessibilityCheckResultType.ERROR, null, 2, null);
+ AccessibilityHierarchyCheckResult result3 =
+ new AccessibilityHierarchyCheckResult(
+ ClassNameCheck.class,
+ AccessibilityCheckResult.AccessibilityCheckResultType.INFO, null, 5, null);
+ AccessibilityHierarchyCheckResult result4 =
+ new AccessibilityHierarchyCheckResult(
+ ClickableSpanCheck.class,
+ AccessibilityCheckResult.AccessibilityCheckResultType.NOT_RUN, null, 5,
+ null);
+
+ Set<A11yCheckerProto.AccessibilityCheckResultReported> atoms =
+ AccessibilityCheckerUtils.processResults(
+ mockNodeInfo,
+ List.of(result1, result2, result3, result4),
+ null,
+ mMockPackageManager,
+ new ComponentName(TEST_A11Y_SERVICE_SOURCE_PACKAGE_NAME,
+ TEST_A11Y_SERVICE_CLASS_NAME));
+
+ assertThat(atoms).containsExactly(
+ createAtom(A11yCheckerProto.AccessibilityCheckClass.SPEAKABLE_TEXT_PRESENT_CHECK,
+ A11yCheckerProto.AccessibilityCheckResultType.WARNING, 1),
+ createAtom(A11yCheckerProto.AccessibilityCheckClass.TOUCH_TARGET_SIZE_CHECK,
+ A11yCheckerProto.AccessibilityCheckResultType.ERROR, 2)
+ );
+ }
+
+ @Test
+ public void processResults_packageNameNotFound_returnsEmptySet()
+ throws PackageManager.NameNotFoundException {
+ when(mMockPackageManager.getPackageInfo("com.uninstalled.app", 0))
+ .thenThrow(PackageManager.NameNotFoundException.class);
+ AccessibilityNodeInfo mockNodeInfo =
+ new MockAccessibilityNodeInfoBuilder()
+ .setPackageName("com.uninstalled.app")
+ .setViewIdResourceName("TargetNode")
+ .build();
+ AccessibilityHierarchyCheckResult result1 =
+ new AccessibilityHierarchyCheckResult(
+ TouchTargetSizeCheck.class,
+ AccessibilityCheckResult.AccessibilityCheckResultType.WARNING, null, 1,
+ null);
+ AccessibilityHierarchyCheckResult result2 =
+ new AccessibilityHierarchyCheckResult(
+ TouchTargetSizeCheck.class,
+ AccessibilityCheckResult.AccessibilityCheckResultType.ERROR, null, 2, null);
+
+ Set<A11yCheckerProto.AccessibilityCheckResultReported> atoms =
+ AccessibilityCheckerUtils.processResults(
+ mockNodeInfo,
+ List.of(result1, result2),
+ null,
+ mMockPackageManager,
+ new ComponentName(TEST_A11Y_SERVICE_SOURCE_PACKAGE_NAME,
+ TEST_A11Y_SERVICE_CLASS_NAME));
+
+ assertThat(atoms).isEmpty();
+ }
+
+ @Test
+ public void getActivityName_hasWindowStateChangedEvent_returnsActivityName() {
+ AccessibilityEvent accessibilityEvent =
+ AccessibilityEvent.obtain(AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED);
+ accessibilityEvent.setPackageName(TEST_APP_PACKAGE_NAME);
+ accessibilityEvent.setClassName(TEST_ACTIVITY_NAME);
+
+ assertThat(AccessibilityCheckerUtils.getActivityName(mMockPackageManager,
+ accessibilityEvent)).isEqualTo("MainActivity");
+ }
+
+ // Makes sure the AccessibilityHierarchyCheck class to enum mapping is up to date with the
+ // latest prod preset.
+ @Test
+ public void checkClassToEnumMap_hasAllLatestPreset() {
+ ImmutableSet<AccessibilityHierarchyCheck> checkPreset =
+ AccessibilityCheckPreset.getAccessibilityHierarchyChecksForPreset(
+ AccessibilityCheckPreset.LATEST);
+ Set<Class<? extends AccessibilityHierarchyCheck>> latestCheckClasses =
+ checkPreset.stream().map(AccessibilityHierarchyCheck::getClass).collect(
+ Collectors.toUnmodifiableSet());
+
+ assertThat(AccessibilityCheckerUtils.CHECK_CLASS_TO_ENUM_MAP.keySet())
+ .containsExactlyElementsIn(latestCheckClasses);
+ }
+
+
+ private static A11yCheckerProto.AccessibilityCheckResultReported createAtom(
+ A11yCheckerProto.AccessibilityCheckClass checkClass,
+ A11yCheckerProto.AccessibilityCheckResultType resultType,
+ int resultId) {
+ return A11yCheckerProto.AccessibilityCheckResultReported.newBuilder()
+ .setPackageName(TEST_APP_PACKAGE_NAME)
+ .setAppVersionCode(TEST_APP_VERSION_CODE)
+ .setUiElementPath(TEST_APP_PACKAGE_NAME + ":TargetNode")
+ .setWindowTitle(TEST_WINDOW_TITLE)
+ .setActivityName("")
+ .setSourceComponentName(new ComponentName(TEST_A11Y_SERVICE_SOURCE_PACKAGE_NAME,
+ TEST_A11Y_SERVICE_CLASS_NAME).flattenToString())
+ .setSourceVersionCode(TEST_A11Y_SERVICE_SOURCE_VERSION_CODE)
+ .setResultCheckClass(checkClass)
+ .setResultType(resultType)
+ .setResultId(resultId)
+ .build();
+ }
+
+}
diff --git a/core/tests/coretests/src/android/view/accessibility/a11ychecker/AccessibilityNodePathBuilderTest.java b/services/tests/servicestests/src/com/android/server/accessibility/a11ychecker/AccessibilityNodePathBuilderTest.java
index 438277b272cb..a53f42ece21f 100644
--- a/core/tests/coretests/src/android/view/accessibility/a11ychecker/AccessibilityNodePathBuilderTest.java
+++ b/services/tests/servicestests/src/com/android/server/accessibility/a11ychecker/AccessibilityNodePathBuilderTest.java
@@ -14,9 +14,9 @@
* limitations under the License.
*/
-package android.view.accessibility.a11ychecker;
+package com.android.server.accessibility.a11ychecker;
-import static android.view.accessibility.a11ychecker.MockAccessibilityNodeInfoBuilder.PACKAGE_NAME;
+import static com.android.server.accessibility.a11ychecker.TestUtils.TEST_APP_PACKAGE_NAME;
import static com.google.common.truth.Truth.assertThat;
@@ -36,7 +36,7 @@ import org.junit.runner.RunWith;
@RunWith(AndroidJUnit4.class)
public class AccessibilityNodePathBuilderTest {
- public static final String RESOURCE_ID_PREFIX = PACKAGE_NAME + ":id/";
+ public static final String RESOURCE_ID_PREFIX = TEST_APP_PACKAGE_NAME + ":id/";
@Test
public void createNodePath_pathWithResourceNames() {
@@ -55,11 +55,11 @@ public class AccessibilityNodePathBuilderTest {
.build();
assertThat(AccessibilityNodePathBuilder.createNodePath(child))
- .isEqualTo(PACKAGE_NAME + ":root_node/parent_node[1]/child_node[1]");
+ .isEqualTo(TEST_APP_PACKAGE_NAME + ":root_node/parent_node[1]/child_node[1]");
assertThat(AccessibilityNodePathBuilder.createNodePath(parent))
- .isEqualTo(PACKAGE_NAME + ":root_node/parent_node[1]");
+ .isEqualTo(TEST_APP_PACKAGE_NAME + ":root_node/parent_node[1]");
assertThat(AccessibilityNodePathBuilder.createNodePath(root))
- .isEqualTo(PACKAGE_NAME + ":root_node");
+ .isEqualTo(TEST_APP_PACKAGE_NAME + ":root_node");
}
@Test
@@ -81,11 +81,11 @@ public class AccessibilityNodePathBuilderTest {
.build();
assertThat(AccessibilityNodePathBuilder.createNodePath(child))
- .isEqualTo(PACKAGE_NAME + ":FrameLayout/RecyclerView[1]/TextView[1]");
+ .isEqualTo(TEST_APP_PACKAGE_NAME + ":FrameLayout/RecyclerView[1]/TextView[1]");
assertThat(AccessibilityNodePathBuilder.createNodePath(parent))
- .isEqualTo(PACKAGE_NAME + ":FrameLayout/RecyclerView[1]");
+ .isEqualTo(TEST_APP_PACKAGE_NAME + ":FrameLayout/RecyclerView[1]");
assertThat(AccessibilityNodePathBuilder.createNodePath(root))
- .isEqualTo(PACKAGE_NAME + ":FrameLayout");
+ .isEqualTo(TEST_APP_PACKAGE_NAME + ":FrameLayout");
}
@Test
@@ -105,11 +105,11 @@ public class AccessibilityNodePathBuilderTest {
.build();
assertThat(AccessibilityNodePathBuilder.createNodePath(child1))
- .isEqualTo(PACKAGE_NAME + ":FrameLayout/child1[1]");
+ .isEqualTo(TEST_APP_PACKAGE_NAME + ":FrameLayout/child1[1]");
assertThat(AccessibilityNodePathBuilder.createNodePath(child2))
- .isEqualTo(PACKAGE_NAME + ":FrameLayout/TextView[2]");
+ .isEqualTo(TEST_APP_PACKAGE_NAME + ":FrameLayout/TextView[2]");
assertThat(AccessibilityNodePathBuilder.createNodePath(parent))
- .isEqualTo(PACKAGE_NAME + ":FrameLayout");
+ .isEqualTo(TEST_APP_PACKAGE_NAME + ":FrameLayout");
}
@Test
@@ -133,13 +133,13 @@ public class AccessibilityNodePathBuilderTest {
.build();
assertThat(AccessibilityNodePathBuilder.createNodePath(child1))
- .isEqualTo(PACKAGE_NAME + ":parentId/childId[1]");
+ .isEqualTo(TEST_APP_PACKAGE_NAME + ":parentId/childId[1]");
assertThat(AccessibilityNodePathBuilder.createNodePath(child2))
- .isEqualTo(PACKAGE_NAME + ":parentId/child/Id/With/Slash[2]");
+ .isEqualTo(TEST_APP_PACKAGE_NAME + ":parentId/child/Id/With/Slash[2]");
assertThat(AccessibilityNodePathBuilder.createNodePath(child3))
- .isEqualTo(PACKAGE_NAME + ":parentId/childIdWithoutPrefix[3]");
+ .isEqualTo(TEST_APP_PACKAGE_NAME + ":parentId/childIdWithoutPrefix[3]");
assertThat(AccessibilityNodePathBuilder.createNodePath(parent))
- .isEqualTo(PACKAGE_NAME + ":parentId");
+ .isEqualTo(TEST_APP_PACKAGE_NAME + ":parentId");
}
}
diff --git a/core/tests/coretests/src/android/view/accessibility/a11ychecker/MockAccessibilityNodeInfoBuilder.java b/services/tests/servicestests/src/com/android/server/accessibility/a11ychecker/MockAccessibilityNodeInfoBuilder.java
index e363f0c81720..7cd3535e72ba 100644
--- a/core/tests/coretests/src/android/view/accessibility/a11ychecker/MockAccessibilityNodeInfoBuilder.java
+++ b/services/tests/servicestests/src/com/android/server/accessibility/a11ychecker/MockAccessibilityNodeInfoBuilder.java
@@ -14,21 +14,33 @@
* limitations under the License.
*/
-package android.view.accessibility.a11ychecker;
+package com.android.server.accessibility.a11ychecker;
+
+import static com.android.server.accessibility.a11ychecker.TestUtils.TEST_APP_PACKAGE_NAME;
+import static com.android.server.accessibility.a11ychecker.TestUtils.TEST_WINDOW_TITLE;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import android.view.accessibility.AccessibilityNodeInfo;
+import android.view.accessibility.AccessibilityWindowInfo;
import java.util.List;
final class MockAccessibilityNodeInfoBuilder {
- static final String PACKAGE_NAME = "com.example.app";
private final AccessibilityNodeInfo mMockNodeInfo = mock(AccessibilityNodeInfo.class);
MockAccessibilityNodeInfoBuilder() {
- when(mMockNodeInfo.getPackageName()).thenReturn(PACKAGE_NAME);
+ setPackageName(TEST_APP_PACKAGE_NAME);
+
+ AccessibilityWindowInfo windowInfo = new AccessibilityWindowInfo();
+ windowInfo.setTitle(TEST_WINDOW_TITLE);
+ when(mMockNodeInfo.getWindow()).thenReturn(windowInfo);
+ }
+
+ MockAccessibilityNodeInfoBuilder setPackageName(String packageName) {
+ when(mMockNodeInfo.getPackageName()).thenReturn(packageName);
+ return this;
}
MockAccessibilityNodeInfoBuilder setClassName(String className) {
diff --git a/services/tests/servicestests/src/com/android/server/accessibility/a11ychecker/OWNERS b/services/tests/servicestests/src/com/android/server/accessibility/a11ychecker/OWNERS
new file mode 100644
index 000000000000..7bdc0297907c
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/accessibility/a11ychecker/OWNERS
@@ -0,0 +1 @@
+include /services/accessibility/java/com/android/server/accessibility/a11ychecker/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/accessibility/a11ychecker/TestUtils.java b/services/tests/servicestests/src/com/android/server/accessibility/a11ychecker/TestUtils.java
new file mode 100644
index 000000000000..a04bbee05730
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/accessibility/a11ychecker/TestUtils.java
@@ -0,0 +1,74 @@
+/*
+ * 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.server.accessibility.a11ychecker;
+
+import static org.mockito.Mockito.when;
+
+import android.annotation.Nullable;
+import android.content.ComponentName;
+import android.content.pm.ActivityInfo;
+import android.content.pm.PackageInfo;
+import android.content.pm.PackageManager;
+
+import org.mockito.Mockito;
+
+public class TestUtils {
+ static final String TEST_APP_PACKAGE_NAME = "com.example.app";
+ static final int TEST_APP_VERSION_CODE = 12321;
+ static final String TEST_ACTIVITY_NAME = "com.example.app.MainActivity";
+ static final String TEST_A11Y_SERVICE_SOURCE_PACKAGE_NAME = "com.assistive.app";
+ static final String TEST_A11Y_SERVICE_CLASS_NAME = "MyA11yService";
+ static final int TEST_A11Y_SERVICE_SOURCE_VERSION_CODE = 333555;
+ static final String TEST_WINDOW_TITLE = "Example window";
+
+ static PackageManager getMockPackageManagerWithInstalledApps()
+ throws PackageManager.NameNotFoundException {
+ PackageManager mockPackageManager = Mockito.mock(PackageManager.class);
+ ActivityInfo testActivityInfo = getTestActivityInfo();
+ ComponentName testActivityComponentName = new ComponentName(TEST_APP_PACKAGE_NAME,
+ TEST_ACTIVITY_NAME);
+
+ when(mockPackageManager.getActivityInfo(testActivityComponentName, 0))
+ .thenReturn(testActivityInfo);
+ when(mockPackageManager.getPackageInfo(TEST_APP_PACKAGE_NAME, 0))
+ .thenReturn(createPackageInfo(TEST_APP_PACKAGE_NAME, TEST_APP_VERSION_CODE,
+ testActivityInfo));
+ when(mockPackageManager.getPackageInfo(TEST_A11Y_SERVICE_SOURCE_PACKAGE_NAME, 0))
+ .thenReturn(createPackageInfo(TEST_A11Y_SERVICE_SOURCE_PACKAGE_NAME,
+ TEST_A11Y_SERVICE_SOURCE_VERSION_CODE, null));
+ return mockPackageManager;
+ }
+
+ static ActivityInfo getTestActivityInfo() {
+ ActivityInfo activityInfo = new ActivityInfo();
+ activityInfo.packageName = TEST_APP_PACKAGE_NAME;
+ activityInfo.name = TEST_ACTIVITY_NAME;
+ return activityInfo;
+ }
+
+ static PackageInfo createPackageInfo(String packageName, int versionCode,
+ @Nullable ActivityInfo activityInfo) {
+ PackageInfo packageInfo = new PackageInfo();
+ packageInfo.packageName = packageName;
+ packageInfo.setLongVersionCode(versionCode);
+ if (activityInfo != null) {
+ packageInfo.activities = new ActivityInfo[]{activityInfo};
+ }
+ return packageInfo;
+
+ }
+}
diff --git a/services/tests/servicestests/src/com/android/server/audio/AbsoluteVolumeBehaviorTest.java b/services/tests/servicestests/src/com/android/server/audio/AbsoluteVolumeBehaviorTest.java
index 758c84a26dcd..ef9580c54de6 100644
--- a/services/tests/servicestests/src/com/android/server/audio/AbsoluteVolumeBehaviorTest.java
+++ b/services/tests/servicestests/src/com/android/server/audio/AbsoluteVolumeBehaviorTest.java
@@ -101,7 +101,7 @@ public class AbsoluteVolumeBehaviorTest {
mAudioService = new AudioService(mContext, mSpyAudioSystem, mSystemServer,
mSettingsAdapter, mAudioVolumeGroupHelper, mMockAudioPolicy,
mTestLooper.getLooper(), mock(AppOpsManager.class), mock(PermissionEnforcer.class),
- mock(AudioServerPermissionProvider.class)) {
+ mock(AudioServerPermissionProvider.class), r -> r.run()) {
@Override
public int getDeviceForStream(int stream) {
return AudioSystem.DEVICE_OUT_SPEAKER;
diff --git a/services/tests/servicestests/src/com/android/server/audio/AudioDeviceVolumeManagerTest.java b/services/tests/servicestests/src/com/android/server/audio/AudioDeviceVolumeManagerTest.java
index 2cb02bdd2806..464515632997 100644
--- a/services/tests/servicestests/src/com/android/server/audio/AudioDeviceVolumeManagerTest.java
+++ b/services/tests/servicestests/src/com/android/server/audio/AudioDeviceVolumeManagerTest.java
@@ -78,7 +78,7 @@ public class AudioDeviceVolumeManagerTest {
mAudioService = new AudioService(mContext, mSpyAudioSystem, mSystemServer,
mSettingsAdapter, mAudioVolumeGroupHelper, mAudioPolicyMock,
mTestLooper.getLooper(), mock(AppOpsManager.class), mock(PermissionEnforcer.class),
- mock(AudioServerPermissionProvider.class)) {
+ mock(AudioServerPermissionProvider.class), r -> r.run()) {
@Override
public int getDeviceForStream(int stream) {
return AudioSystem.DEVICE_OUT_SPEAKER;
diff --git a/services/tests/servicestests/src/com/android/server/audio/AudioServiceTest.java b/services/tests/servicestests/src/com/android/server/audio/AudioServiceTest.java
index 037c3c00443c..b7100ea00a40 100644
--- a/services/tests/servicestests/src/com/android/server/audio/AudioServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/audio/AudioServiceTest.java
@@ -87,7 +87,7 @@ public class AudioServiceTest {
.thenReturn(AppOpsManager.MODE_ALLOWED);
mAudioService = new AudioService(mContext, mSpyAudioSystem, mSpySystemServer,
mSettingsAdapter, mAudioVolumeGroupHelper, mMockAudioPolicy, null,
- mMockAppOpsManager, mMockPermissionEnforcer, mMockPermissionProvider);
+ mMockAppOpsManager, mMockPermissionEnforcer, mMockPermissionProvider, r -> r.run());
}
/**
diff --git a/services/tests/servicestests/src/com/android/server/audio/DeviceVolumeBehaviorTest.java b/services/tests/servicestests/src/com/android/server/audio/DeviceVolumeBehaviorTest.java
index 27b552fa7cdd..746645a8c585 100644
--- a/services/tests/servicestests/src/com/android/server/audio/DeviceVolumeBehaviorTest.java
+++ b/services/tests/servicestests/src/com/android/server/audio/DeviceVolumeBehaviorTest.java
@@ -78,7 +78,7 @@ public class DeviceVolumeBehaviorTest {
mAudioService = new AudioService(mContext, mAudioSystem, mSystemServer,
mSettingsAdapter, mAudioVolumeGroupHelper, mAudioPolicyMock,
mTestLooper.getLooper(), mock(AppOpsManager.class), mock(PermissionEnforcer.class),
- mock(AudioServerPermissionProvider.class));
+ mock(AudioServerPermissionProvider.class), r -> r.run());
mTestLooper.dispatchAll();
}
diff --git a/services/tests/servicestests/src/com/android/server/audio/VolumeHelperTest.java b/services/tests/servicestests/src/com/android/server/audio/VolumeHelperTest.java
index 8e34ee1b6a42..e45ab319146c 100644
--- a/services/tests/servicestests/src/com/android/server/audio/VolumeHelperTest.java
+++ b/services/tests/servicestests/src/com/android/server/audio/VolumeHelperTest.java
@@ -160,7 +160,7 @@ public class VolumeHelperTest {
@NonNull PermissionEnforcer enforcer,
AudioServerPermissionProvider permissionProvider) {
super(context, audioSystem, systemServer, settings, audioVolumeGroupHelper,
- audioPolicy, looper, appOps, enforcer, permissionProvider);
+ audioPolicy, looper, appOps, enforcer, permissionProvider, r -> r.run());
}
public void setDeviceForStream(int stream, int device) {
diff --git a/services/tests/servicestests/src/com/android/server/autofill/HelperTest.java b/services/tests/servicestests/src/com/android/server/autofill/HelperTest.java
new file mode 100644
index 000000000000..f698bea1a199
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/autofill/HelperTest.java
@@ -0,0 +1,113 @@
+/*
+ * 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.server.autofill;
+
+import static com.android.server.autofill.Helper.SaveInfoStats;
+import static com.android.server.autofill.Helper.getSaveInfoStatsFromFillResponses;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import android.os.Bundle;
+import android.service.autofill.FillResponse;
+import android.service.autofill.SaveInfo;
+import android.util.SparseArray;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+
+@RunWith(JUnit4.class)
+public class HelperTest {
+
+ @Test
+ public void testGetSaveInfoStatsFromFillResponses_nullFillResponses() {
+ SaveInfoStats saveInfoStats = getSaveInfoStatsFromFillResponses(null);
+
+ assertThat(saveInfoStats.saveInfoCount).isEqualTo(-1);
+ assertThat(saveInfoStats.saveDataTypeCount).isEqualTo(-1);
+ }
+
+ @Test
+ public void testGetSaveInfoStatsFromFillResponses_emptyFillResponseSparseArray() {
+ SaveInfoStats saveInfoStats = getSaveInfoStatsFromFillResponses(new SparseArray<>());
+
+ assertThat(saveInfoStats.saveInfoCount).isEqualTo(0);
+ assertThat(saveInfoStats.saveDataTypeCount).isEqualTo(0);
+ }
+
+ @Test
+ public void testGetSaveInfoStatsFromFillResponses_singleResponseWithoutSaveInfo() {
+ FillResponse.Builder fillResponseBuilder = new FillResponse.Builder();
+ // Add client state to satisfy the sanity check in FillResponseBuilder.build()
+ Bundle clientState = new Bundle();
+ fillResponseBuilder.setClientState(clientState);
+ FillResponse testFillResponse = fillResponseBuilder.build();
+
+ SparseArray<FillResponse> testFillResponses = new SparseArray<>();
+ testFillResponses.put(0, testFillResponse);
+
+ SaveInfoStats saveInfoStats = getSaveInfoStatsFromFillResponses(testFillResponses);
+
+ assertThat(saveInfoStats.saveInfoCount).isEqualTo(0);
+ assertThat(saveInfoStats.saveDataTypeCount).isEqualTo(0);
+ }
+
+ @Test
+ public void testGetSaveInfoStatsFromFillResponses_singleResponseWithSaveInfo() {
+ FillResponse.Builder fillResponseBuilder = new FillResponse.Builder();
+ SaveInfo.Builder saveInfoBuilder = new SaveInfo.Builder(SaveInfo.SAVE_DATA_TYPE_GENERIC);
+ fillResponseBuilder.setSaveInfo(saveInfoBuilder.build());
+ FillResponse testFillResponse = fillResponseBuilder.build();
+
+ SparseArray<FillResponse> testFillResponses = new SparseArray<>();
+ testFillResponses.put(0, testFillResponse);
+
+ SaveInfoStats saveInfoStats = getSaveInfoStatsFromFillResponses(testFillResponses);
+
+ assertThat(saveInfoStats.saveInfoCount).isEqualTo(1);
+ assertThat(saveInfoStats.saveDataTypeCount).isEqualTo(1);
+ }
+
+ @Test
+ public void testGetSaveInfoStatsFromFillResponses_multipleResponseWithDifferentTypeSaveInfo() {
+ FillResponse.Builder fillResponseBuilder1 = new FillResponse.Builder();
+ SaveInfo.Builder saveInfoBuilder1 = new SaveInfo.Builder(SaveInfo.SAVE_DATA_TYPE_GENERIC);
+ fillResponseBuilder1.setSaveInfo(saveInfoBuilder1.build());
+ FillResponse testFillResponse1 = fillResponseBuilder1.build();
+
+ FillResponse.Builder fillResponseBuilder2 = new FillResponse.Builder();
+ SaveInfo.Builder saveInfoBuilder2 = new SaveInfo.Builder(SaveInfo.SAVE_DATA_TYPE_ADDRESS);
+ fillResponseBuilder2.setSaveInfo(saveInfoBuilder2.build());
+ FillResponse testFillResponse2 = fillResponseBuilder2.build();
+
+ FillResponse.Builder fillResponseBuilder3 = new FillResponse.Builder();
+ SaveInfo.Builder saveInfoBuilder3 = new SaveInfo.Builder(SaveInfo.SAVE_DATA_TYPE_ADDRESS);
+ fillResponseBuilder3.setSaveInfo(saveInfoBuilder3.build());
+ FillResponse testFillResponse3 = fillResponseBuilder3.build();
+
+ SparseArray<FillResponse> testFillResponses = new SparseArray<>();
+ testFillResponses.put(0, testFillResponse1);
+ testFillResponses.put(1, testFillResponse2);
+ testFillResponses.put(2, testFillResponse3);
+
+ SaveInfoStats saveInfoStats = getSaveInfoStatsFromFillResponses(testFillResponses);
+
+ // Save info count is 3. Since two save info share the same save data type, the distinct
+ // save data type count is 2.
+ assertThat(saveInfoStats.saveInfoCount).isEqualTo(3);
+ assertThat(saveInfoStats.saveDataTypeCount).isEqualTo(2);
+ }
+}
diff --git a/services/tests/servicestests/src/com/android/server/biometrics/BiometricServiceTest.java b/services/tests/servicestests/src/com/android/server/biometrics/BiometricServiceTest.java
index 0f385325e525..a4222ff5650b 100644
--- a/services/tests/servicestests/src/com/android/server/biometrics/BiometricServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/biometrics/BiometricServiceTest.java
@@ -1518,7 +1518,8 @@ public class BiometricServiceTest {
mBiometricService.onStart();
when(mTrustManager.isInSignificantPlace()).thenReturn(false);
- when(mBiometricService.mSettingObserver.getMandatoryBiometricsEnabledForUser(anyInt()))
+ when(mBiometricService.mSettingObserver
+ .getMandatoryBiometricsEnabledAndRequirementsSatisfiedForUser(anyInt()))
.thenReturn(true);
setupAuthForOnly(TYPE_FINGERPRINT, Authenticators.BIOMETRIC_STRONG);
@@ -1540,7 +1541,8 @@ public class BiometricServiceTest {
mBiometricService.onStart();
when(mTrustManager.isInSignificantPlace()).thenReturn(false);
- when(mBiometricService.mSettingObserver.getMandatoryBiometricsEnabledForUser(anyInt()))
+ when(mBiometricService.mSettingObserver
+ .getMandatoryBiometricsEnabledAndRequirementsSatisfiedForUser(anyInt()))
.thenReturn(true);
setupAuthForOnly(TYPE_FINGERPRINT, Authenticators.BIOMETRIC_STRONG);
@@ -1564,7 +1566,8 @@ public class BiometricServiceTest {
mBiometricService.onStart();
when(mTrustManager.isInSignificantPlace()).thenReturn(false);
- when(mBiometricService.mSettingObserver.getMandatoryBiometricsEnabledForUser(anyInt()))
+ when(mBiometricService.mSettingObserver
+ .getMandatoryBiometricsEnabledAndRequirementsSatisfiedForUser(anyInt()))
.thenReturn(true);
setupAuthForOnly(TYPE_CREDENTIAL, Authenticators.DEVICE_CREDENTIAL);
diff --git a/services/tests/servicestests/src/com/android/server/biometrics/PreAuthInfoTest.java b/services/tests/servicestests/src/com/android/server/biometrics/PreAuthInfoTest.java
index b831ef5c30bc..240da9fe46bd 100644
--- a/services/tests/servicestests/src/com/android/server/biometrics/PreAuthInfoTest.java
+++ b/services/tests/servicestests/src/com/android/server/biometrics/PreAuthInfoTest.java
@@ -90,7 +90,8 @@ public class PreAuthInfoTest {
when(mDevicePolicyManager.getKeyguardDisabledFeatures(any(), anyInt()))
.thenReturn(KEYGUARD_DISABLE_FEATURES_NONE);
when(mSettingObserver.getEnabledForApps(anyInt())).thenReturn(true);
- when(mSettingObserver.getMandatoryBiometricsEnabledForUser(anyInt())).thenReturn(true);
+ when(mSettingObserver.getMandatoryBiometricsEnabledAndRequirementsSatisfiedForUser(
+ anyInt())).thenReturn(true);
when(mFaceAuthenticator.hasEnrolledTemplates(anyInt(), any())).thenReturn(true);
when(mFaceAuthenticator.isHardwareDetected(any())).thenReturn(true);
when(mFaceAuthenticator.getLockoutModeForUser(anyInt()))
diff --git a/services/tests/servicestests/src/com/android/server/biometrics/sensors/BiometricSchedulerOperationTest.java b/services/tests/servicestests/src/com/android/server/biometrics/sensors/BiometricSchedulerOperationTest.java
index f6da41166403..ffc78110d496 100644
--- a/services/tests/servicestests/src/com/android/server/biometrics/sensors/BiometricSchedulerOperationTest.java
+++ b/services/tests/servicestests/src/com/android/server/biometrics/sensors/BiometricSchedulerOperationTest.java
@@ -28,7 +28,6 @@ import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import static org.testng.Assert.assertThrows;
import android.hardware.biometrics.BiometricConstants;
import android.os.Handler;
@@ -88,16 +87,14 @@ public class BiometricSchedulerOperationTest {
private Handler mHandler;
private BiometricSchedulerOperation mInterruptableOperation;
private BiometricSchedulerOperation mNonInterruptableOperation;
- private boolean mIsDebuggable;
@Before
public void setUp() {
mHandler = new Handler(TestableLooper.get(this).getLooper());
- mIsDebuggable = false;
mInterruptableOperation = new BiometricSchedulerOperation(mInterruptableClientMonitor,
- mClientCallback, () -> mIsDebuggable);
+ mClientCallback);
mNonInterruptableOperation = new BiometricSchedulerOperation(mNonInterruptableClientMonitor,
- mClientCallback, () -> mIsDebuggable);
+ mClientCallback);
when(mInterruptableClientMonitor.isInterruptable()).thenReturn(true);
when(mNonInterruptableClientMonitor.isInterruptable()).thenReturn(false);
@@ -143,32 +140,13 @@ public class BiometricSchedulerOperationTest {
}
@Test
- public void testSecondStartWithCookieCrashesWhenDebuggable() {
+ public void testSecondStartWithCookieFails() {
final int cookie = 5;
- mIsDebuggable = true;
when(mInterruptableClientMonitor.getCookie()).thenReturn(cookie);
when(mInterruptableClientMonitor.getFreshDaemon()).thenReturn(mHal);
- final boolean started = mInterruptableOperation.startWithCookie(mOnStartCallback, cookie);
- assertThat(started).isTrue();
-
- assertThrows(IllegalStateException.class,
- () -> mInterruptableOperation.startWithCookie(mOnStartCallback, cookie));
- }
-
- @Test
- public void testSecondStartWithCookieFailsNicelyWhenNotDebuggable() {
- final int cookie = 5;
- mIsDebuggable = false;
- when(mInterruptableClientMonitor.getCookie()).thenReturn(cookie);
- when(mInterruptableClientMonitor.getFreshDaemon()).thenReturn(mHal);
-
- final boolean started = mInterruptableOperation.startWithCookie(mOnStartCallback, cookie);
- assertThat(started).isTrue();
-
- final boolean startedAgain = mInterruptableOperation.startWithCookie(mOnStartCallback,
- cookie);
- assertThat(startedAgain).isFalse();
+ assertThat(mInterruptableOperation.startWithCookie(mOnStartCallback, cookie)).isTrue();
+ assertThat(mInterruptableOperation.startWithCookie(mOnStartCallback, cookie)).isFalse();
}
@Test
@@ -217,56 +195,23 @@ public class BiometricSchedulerOperationTest {
}
@Test
- public void secondStartCrashesWhenDebuggable() {
- mIsDebuggable = true;
+ public void secondStartFails() {
when(mInterruptableClientMonitor.getCookie()).thenReturn(0);
when(mInterruptableClientMonitor.getFreshDaemon()).thenReturn(mHal);
- final boolean started = mInterruptableOperation.start(mOnStartCallback);
- assertThat(started).isTrue();
-
- assertThrows(IllegalStateException.class, () -> mInterruptableOperation.start(
- mOnStartCallback));
- }
-
- @Test
- public void secondStartFailsNicelyWhenNotDebuggable() {
- mIsDebuggable = false;
- when(mInterruptableClientMonitor.getCookie()).thenReturn(0);
- when(mInterruptableClientMonitor.getFreshDaemon()).thenReturn(mHal);
-
- final boolean started = mInterruptableOperation.start(mOnStartCallback);
- assertThat(started).isTrue();
-
- final boolean startedAgain = mInterruptableOperation.start(mOnStartCallback);
- assertThat(startedAgain).isFalse();
+ assertThat(mInterruptableOperation.start(mOnStartCallback)).isTrue();
+ assertThat(mInterruptableOperation.start(mOnStartCallback)).isFalse();
}
@Test
public void doesNotStartWithCookie() {
- // This class only throws exceptions when debuggable.
- mIsDebuggable = true;
when(mInterruptableClientMonitor.getCookie()).thenReturn(9);
- assertThrows(IllegalStateException.class,
- () -> mInterruptableOperation.start(mock(ClientMonitorCallback.class)));
- }
- @Test
- public void cannotRestart() {
- // This class only throws exceptions when debuggable.
- mIsDebuggable = true;
- when(mInterruptableClientMonitor.getFreshDaemon()).thenReturn(mHal);
-
- mInterruptableOperation.start(mOnStartCallback);
-
- assertThrows(IllegalStateException.class,
- () -> mInterruptableOperation.start(mock(ClientMonitorCallback.class)));
+ assertThat(mInterruptableOperation.start(mock(ClientMonitorCallback.class))).isFalse();
}
@Test
- public void abortsNotRunning() {
- // This class only throws exceptions when debuggable.
- mIsDebuggable = true;
+ public void abortSuccessfulIfOperationNotRunning() {
when(mInterruptableClientMonitor.getFreshDaemon()).thenReturn(mHal);
mInterruptableOperation.abort();
@@ -274,28 +219,17 @@ public class BiometricSchedulerOperationTest {
assertThat(mInterruptableOperation.isFinished()).isTrue();
verify(mInterruptableClientMonitor).unableToStart();
verify(mInterruptableClientMonitor).destroy();
- assertThrows(IllegalStateException.class,
- () -> mInterruptableOperation.start(mock(ClientMonitorCallback.class)));
+ assertThat(mInterruptableOperation.start(mock(ClientMonitorCallback.class))).isFalse();
}
@Test
- public void abortCrashesWhenDebuggableIfOperationIsRunning() {
- mIsDebuggable = true;
+ public void abortFailsIfOperationIsRunning() {
when(mInterruptableClientMonitor.getFreshDaemon()).thenReturn(mHal);
mInterruptableOperation.start(mOnStartCallback);
-
- assertThrows(IllegalStateException.class, () -> mInterruptableOperation.abort());
- }
-
- @Test
- public void abortFailsNicelyWhenNotDebuggableIfOperationIsRunning() {
- mIsDebuggable = false;
- when(mInterruptableClientMonitor.getFreshDaemon()).thenReturn(mHal);
-
- mInterruptableOperation.start(mOnStartCallback);
-
mInterruptableOperation.abort();
+
+ assertThat(mInterruptableOperation.isFinished()).isFalse();
}
@Test
@@ -344,21 +278,7 @@ public class BiometricSchedulerOperationTest {
}
@Test
- public void cancelCrashesWhenDebuggableIfOperationIsFinished() {
- mIsDebuggable = true;
- when(mInterruptableClientMonitor.getFreshDaemon()).thenReturn(mHal);
-
- mInterruptableOperation.abort();
- assertThat(mInterruptableOperation.isFinished()).isTrue();
-
- final ClientMonitorCallback cancelCb = mock(ClientMonitorCallback.class);
- assertThrows(IllegalStateException.class, () -> mInterruptableOperation.cancel(mHandler,
- cancelCb));
- }
-
- @Test
- public void cancelFailsNicelyWhenNotDebuggableIfOperationIsFinished() {
- mIsDebuggable = false;
+ public void cancelFailsIfOperationIsFinished() {
when(mInterruptableClientMonitor.getFreshDaemon()).thenReturn(mHal);
mInterruptableOperation.abort();
@@ -366,6 +286,9 @@ public class BiometricSchedulerOperationTest {
final ClientMonitorCallback cancelCb = mock(ClientMonitorCallback.class);
mInterruptableOperation.cancel(mHandler, cancelCb);
+
+ verify(mInterruptableClientMonitor, never()).cancel();
+ verify(mInterruptableClientMonitor, never()).cancelWithoutStarting(any());
}
@Test
diff --git a/services/tests/servicestests/src/com/android/server/devicepolicy/NetworkEventTest.java b/services/tests/servicestests/src/com/android/server/devicepolicy/NetworkEventTest.java
index 8a9538f2374a..ebdde94237eb 100644
--- a/services/tests/servicestests/src/com/android/server/devicepolicy/NetworkEventTest.java
+++ b/services/tests/servicestests/src/com/android/server/devicepolicy/NetworkEventTest.java
@@ -66,7 +66,7 @@ public class NetworkEventTest extends DpmTestBase {
any(UserHandle.class));
mDpmTestable = new DevicePolicyManagerServiceTestable(getServices(), mSpiedDpmMockContext);
setUpPackageManagerForAdmin(admin1, DpmMockContext.CALLER_UID);
- mDpmTestable.setActiveAdmin(admin1, true, DpmMockContext.CALLER_USER_HANDLE);
+ mDpmTestable.setActiveAdmin(admin1, true, DpmMockContext.CALLER_USER_HANDLE, null);
}
@Test
diff --git a/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecNetworkTest.java b/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecNetworkTest.java
index 10f4308cbcfb..599a3b86e1af 100644
--- a/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecNetworkTest.java
+++ b/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecNetworkTest.java
@@ -396,7 +396,7 @@ public class HdmiCecNetworkTest {
}
@Test
- public void cecDevices_tracking_updatesPhysicalAddress() {
+ public void cecDevices_tracking_updatesPhysicalAddress_add() {
int logicalAddress = Constants.ADDR_PLAYBACK_1;
int initialPhysicalAddress = 0x1000;
int updatedPhysicalAddress = 0x2000;
@@ -415,11 +415,12 @@ public class HdmiCecNetworkTest {
assertThat(cecDeviceInfo.getPhysicalAddress()).isEqualTo(updatedPhysicalAddress);
assertThat(cecDeviceInfo.getDeviceType()).isEqualTo(type);
- // ADD for physical address first detected
- // UPDATE for updating device with new physical address
+ // Handle case where PA is changed: Update CEC device information by calling
+ // addCecDevice().
assertThat(mDeviceEventListenerStatuses).containsExactly(
HdmiControlManager.DEVICE_EVENT_ADD_DEVICE,
- HdmiControlManager.DEVICE_EVENT_UPDATE_DEVICE);
+ HdmiControlManager.DEVICE_EVENT_REMOVE_DEVICE,
+ HdmiControlManager.DEVICE_EVENT_ADD_DEVICE);
}
@Test
diff --git a/services/tests/servicestests/src/com/android/server/location/contexthub/ContextHubEventLoggerTest.java b/services/tests/servicestests/src/com/android/server/location/contexthub/ContextHubEventLoggerTest.java
index 8863d2796acf..41cb6fd99d9b 100644
--- a/services/tests/servicestests/src/com/android/server/location/contexthub/ContextHubEventLoggerTest.java
+++ b/services/tests/servicestests/src/com/android/server/location/contexthub/ContextHubEventLoggerTest.java
@@ -18,11 +18,15 @@ package com.android.server.location.contexthub;
import static com.google.common.truth.Truth.assertThat;
+import android.chre.flags.Flags;
import android.hardware.location.NanoAppMessage;
+import android.platform.test.annotations.EnableFlags;
import android.platform.test.annotations.Presubmit;
+import android.platform.test.flag.junit.SetFlagsRule;
import androidx.test.ext.junit.runners.AndroidJUnit4;
+import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -33,6 +37,8 @@ import java.util.Arrays;
public class ContextHubEventLoggerTest {
private static final ContextHubEventLogger sInstance = ContextHubEventLogger.getInstance();
+ @Rule public final SetFlagsRule mSetFlagsRule = new SetFlagsRule();
+
@Test
public void testLogNanoappLoad() {
ContextHubEventLogger.NanoappLoadEvent[] events =
@@ -46,10 +52,10 @@ public class ContextHubEventLoggerTest {
sInstance.clear();
sInstance.logNanoappLoad(-1, 42, -34, 100, false);
sInstance.logNanoappLoad(0, 123, 321, 001, true);
- String sInstanceDump = sInstance.toString();
+ String instanceDump = sInstance.toString();
for (String eventString: eventStrings) {
assertThat(eventString.length() > 0).isTrue();
- assertThat(sInstanceDump.contains(eventString)).isTrue();
+ assertThat(instanceDump.contains(eventString)).isTrue();
}
}
@@ -66,10 +72,10 @@ public class ContextHubEventLoggerTest {
sInstance.clear();
sInstance.logNanoappUnload(-1, 47, false);
sInstance.logNanoappUnload(1, 0xFFFFFFFF, true);
- String sInstanceDump = sInstance.toString();
+ String instanceDump = sInstance.toString();
for (String eventString: eventStrings) {
assertThat(eventString.length() > 0).isTrue();
- assertThat(sInstanceDump.contains(eventString)).isTrue();
+ assertThat(instanceDump.contains(eventString)).isTrue();
}
}
@@ -90,10 +96,10 @@ public class ContextHubEventLoggerTest {
sInstance.clear();
sInstance.logMessageFromNanoapp(-123, message1, false);
sInstance.logMessageFromNanoapp(321, message2, true);
- String sInstanceDump = sInstance.toString();
+ String instanceDump = sInstance.toString();
for (String eventString: eventStrings) {
assertThat(eventString.length() > 0).isTrue();
- assertThat(sInstanceDump.contains(eventString)).isTrue();
+ assertThat(instanceDump.contains(eventString)).isTrue();
}
}
@@ -114,10 +120,54 @@ public class ContextHubEventLoggerTest {
sInstance.clear();
sInstance.logMessageToNanoapp(888, message1, true);
sInstance.logMessageToNanoapp(999, message2, false);
- String sInstanceDump = sInstance.toString();
+ String instanceDump = sInstance.toString();
+ for (String eventString: eventStrings) {
+ assertThat(eventString.length() > 0).isTrue();
+ assertThat(instanceDump.contains(eventString)).isTrue();
+ }
+ }
+
+ @Test
+ @EnableFlags({Flags.FLAG_RELIABLE_MESSAGE,
+ Flags.FLAG_RELIABLE_MESSAGE_IMPLEMENTATION})
+ public void testLogReliableMessageToNanoappStatus() {
+ NanoAppMessage message1 = NanoAppMessage.createMessageToNanoApp(1, 0,
+ new byte[] {0x00, 0x11, 0x22, 0x33});
+ NanoAppMessage message2 = NanoAppMessage.createMessageToNanoApp(0, 1,
+ new byte[] {(byte) 0xDE, (byte) 0xAD, (byte) 0xBE, (byte) 0xEF});
+ message1.setIsReliable(true);
+ message2.setIsReliable(true);
+ message1.setMessageSequenceNumber(0);
+ message2.setMessageSequenceNumber(1);
+
+ ContextHubEventLogger.NanoappMessageEvent[] events =
+ new ContextHubEventLogger.NanoappMessageEvent[] {
+ new ContextHubEventLogger.NanoappMessageEvent(23, 888, message1, true),
+ new ContextHubEventLogger.NanoappMessageEvent(34, 999, message2, false)
+ };
+ String[] eventStrings = generateEventDumpStrings(events);
+
+ // log events and test sInstance.toString() contains event details
+ sInstance.clear();
+ sInstance.logMessageToNanoapp(888, message1, true);
+ sInstance.logMessageToNanoapp(999, message2, false);
+ String instanceDump = sInstance.toString();
+ for (String eventString: eventStrings) {
+ assertThat(eventString.length() > 0).isTrue();
+ assertThat(instanceDump.contains(eventString)).isTrue();
+ }
+
+ // set the error codes for the events and verify
+ sInstance.logReliableMessageToNanoappStatus(0, (byte) 0x02);
+ sInstance.logReliableMessageToNanoappStatus(1, (byte) 0x03);
+ events[0].setErrorCode((byte) 0x02);
+ events[1].setErrorCode((byte) 0x03);
+ eventStrings = generateEventDumpStrings(events);
+
+ instanceDump = sInstance.toString();
for (String eventString: eventStrings) {
assertThat(eventString.length() > 0).isTrue();
- assertThat(sInstanceDump.contains(eventString)).isTrue();
+ assertThat(instanceDump.contains(eventString)).isTrue();
}
}
@@ -134,10 +184,10 @@ public class ContextHubEventLoggerTest {
sInstance.clear();
sInstance.logContextHubRestart(1);
sInstance.logContextHubRestart(2);
- String sInstanceDump = sInstance.toString();
+ String instanceDump = sInstance.toString();
for (String eventString: eventStrings) {
assertThat(eventString.length() > 0).isTrue();
- assertThat(sInstanceDump.contains(eventString)).isTrue();
+ assertThat(instanceDump.contains(eventString)).isTrue();
}
}
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 e64397d4223b..689b241f0faa 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
@@ -17,6 +17,7 @@
package com.android.server.media.projection;
+import static android.Manifest.permission.RECORD_SENSITIVE_CONTENT;
import static android.app.WindowConfiguration.WINDOWING_MODE_MULTI_WINDOW;
import static android.content.pm.ApplicationInfo.PRIVATE_FLAG_PRIVILEGED;
import static android.media.projection.MediaProjectionManager.TYPE_MIRRORING;
@@ -38,6 +39,7 @@ import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.atLeastOnce;
+import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
@@ -50,6 +52,7 @@ import static org.testng.Assert.assertThrows;
import android.app.ActivityManagerInternal;
import android.app.ActivityOptions.LaunchCookie;
+import android.app.KeyguardManager;
import android.content.Context;
import android.content.ContextWrapper;
import android.content.pm.ApplicationInfo;
@@ -66,7 +69,9 @@ import android.os.Looper;
import android.os.RemoteException;
import android.os.UserHandle;
import android.os.test.TestLooper;
+import android.platform.test.annotations.EnableFlags;
import android.platform.test.annotations.Presubmit;
+import android.platform.test.flag.junit.SetFlagsRule;
import android.view.ContentRecordingSession;
import android.view.ContentRecordingSession.RecordContent;
@@ -81,6 +86,7 @@ import com.android.server.wm.WindowManagerInternal;
import org.junit.After;
import org.junit.Before;
+import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
@@ -151,6 +157,9 @@ public class MediaProjectionManagerServiceTest {
private ContentRecordingSession mWaitingDisplaySession =
createDisplaySession(DEFAULT_DISPLAY);
+ @Rule
+ public final SetFlagsRule mSetFlagsRule = new SetFlagsRule();
+
@Mock
private ActivityManagerInternal mAmInternal;
@Mock
@@ -158,6 +167,8 @@ public class MediaProjectionManagerServiceTest {
@Mock
private PackageManager mPackageManager;
@Mock
+ private KeyguardManager mKeyguardManager;
+ @Mock
private IMediaProjectionWatcherCallback mWatcherCallback;
@Mock
private MediaProjectionMetricsLogger mMediaProjectionMetricsLogger;
@@ -177,6 +188,7 @@ public class MediaProjectionManagerServiceTest {
mContext = spy(new ContextWrapper(
InstrumentationRegistry.getInstrumentation().getTargetContext()));
doReturn(mPackageManager).when(mContext).getPackageManager();
+ doReturn(mKeyguardManager).when(mContext).getSystemService(eq(Context.KEYGUARD_SERVICE));
mClock = new OffsettableClock.Stopped();
mWaitingDisplaySession.setWaitingForConsent(true);
@@ -246,6 +258,39 @@ public class MediaProjectionManagerServiceTest {
assertThat(stoppedCallback2).isFalse();
}
+ @EnableFlags(android.companion.virtualdevice.flags
+ .Flags.FLAG_MEDIA_PROJECTION_KEYGUARD_RESTRICTIONS)
+ @Test
+ public void testCreateProjection_keyguardLocked() throws Exception {
+ MediaProjectionManagerService.MediaProjection projection = startProjectionPreconditions();
+
+ doReturn(true).when(mKeyguardManager).isKeyguardLocked();
+ doReturn(PackageManager.PERMISSION_DENIED).when(mPackageManager)
+ .checkPermission(RECORD_SENSITIVE_CONTENT, projection.packageName);
+ projection.start(mIMediaProjectionCallback);
+ projection.notifyVirtualDisplayCreated(10);
+
+ assertThat(mService.getActiveProjectionInfo()).isNull();
+ assertThat(mIMediaProjectionCallback.mLatch.await(5, TimeUnit.SECONDS)).isTrue();
+ }
+
+ @EnableFlags(android.companion.virtualdevice.flags
+ .Flags.FLAG_MEDIA_PROJECTION_KEYGUARD_RESTRICTIONS)
+ @Test
+ public void testCreateProjection_keyguardLocked_packageAllowlisted()
+ throws NameNotFoundException {
+ MediaProjectionManagerService.MediaProjection projection = startProjectionPreconditions();
+
+ doReturn(true).when(mKeyguardManager).isKeyguardLocked();
+ doReturn(PackageManager.PERMISSION_GRANTED).when(mPackageManager)
+ .checkPermission(RECORD_SENSITIVE_CONTENT, projection.packageName);
+ projection.start(mIMediaProjectionCallback);
+ projection.notifyVirtualDisplayCreated(10);
+
+ // The projection was started because it was allowed to capture the keyguard.
+ assertThat(mService.getActiveProjectionInfo()).isNotNull();
+ }
+
@Test
public void testCreateProjection_attemptReuse_noPriorProjectionGrant()
throws NameNotFoundException {
@@ -317,6 +362,81 @@ public class MediaProjectionManagerServiceTest {
assertThat(secondProjection).isNotEqualTo(projection);
}
+ @EnableFlags(android.companion.virtualdevice.flags
+ .Flags.FLAG_MEDIA_PROJECTION_KEYGUARD_RESTRICTIONS)
+ @Test
+ public void testReuseProjection_keyguardNotLocked_startConsentDialog()
+ throws NameNotFoundException {
+ MediaProjectionManagerService.MediaProjection projection = startProjectionPreconditions();
+ projection.start(mIMediaProjectionCallback);
+
+ doNothing().when(mContext).startActivityAsUser(any(), any());
+ doReturn(false).when(mKeyguardManager).isKeyguardLocked();
+
+ MediaProjectionManagerService.BinderService mediaProjectionBinderService =
+ mService.new BinderService(mContext);
+ mediaProjectionBinderService.requestConsentForInvalidProjection(projection);
+
+ verify(mContext).startActivityAsUser(any(), any());
+ }
+
+ @EnableFlags(android.companion.virtualdevice.flags
+ .Flags.FLAG_MEDIA_PROJECTION_KEYGUARD_RESTRICTIONS)
+ @Test
+ public void testReuseProjection_keyguardLocked_noConsentDialog() throws NameNotFoundException {
+ MediaProjectionManagerService.MediaProjection projection = startProjectionPreconditions();
+ projection.start(mIMediaProjectionCallback);
+
+ doReturn(true).when(mKeyguardManager).isKeyguardLocked();
+ MediaProjectionManagerService.BinderService mediaProjectionBinderService =
+ mService.new BinderService(mContext);
+ mediaProjectionBinderService.requestConsentForInvalidProjection(projection);
+
+ verify(mContext, never()).startActivityAsUser(any(), any());
+ }
+
+ @EnableFlags(android.companion.virtualdevice.flags
+ .Flags.FLAG_MEDIA_PROJECTION_KEYGUARD_RESTRICTIONS)
+ @Test
+ public void testKeyguardLocked_stopsActiveProjection() throws Exception {
+ MediaProjectionManagerService service =
+ new MediaProjectionManagerService(mContext, mMediaProjectionMetricsLoggerInjector);
+ MediaProjectionManagerService.MediaProjection projection =
+ startProjectionPreconditions(service);
+ projection.start(mIMediaProjectionCallback);
+
+ assertThat(service.getActiveProjectionInfo()).isNotNull();
+
+ doReturn(PackageManager.PERMISSION_DENIED).when(mPackageManager)
+ .checkPermission(RECORD_SENSITIVE_CONTENT, projection.packageName);
+ service.onKeyguardLockedStateChanged(true);
+
+ verify(mMediaProjectionMetricsLogger).logStopped(UID, TARGET_UID_UNKNOWN);
+ assertThat(service.getActiveProjectionInfo()).isNull();
+ assertThat(mIMediaProjectionCallback.mLatch.await(5, TimeUnit.SECONDS)).isTrue();
+ }
+
+ @EnableFlags(android.companion.virtualdevice.flags
+ .Flags.FLAG_MEDIA_PROJECTION_KEYGUARD_RESTRICTIONS)
+ @Test
+ public void testKeyguardLocked_packageAllowlisted_doesNotStopActiveProjection()
+ throws NameNotFoundException {
+ MediaProjectionManagerService service =
+ new MediaProjectionManagerService(mContext, mMediaProjectionMetricsLoggerInjector);
+ MediaProjectionManagerService.MediaProjection projection =
+ startProjectionPreconditions(service);
+ projection.start(mIMediaProjectionCallback);
+
+ assertThat(service.getActiveProjectionInfo()).isNotNull();
+
+ doReturn(PackageManager.PERMISSION_GRANTED).when(mPackageManager).checkPermission(
+ RECORD_SENSITIVE_CONTENT, projection.packageName);
+ service.onKeyguardLockedStateChanged(true);
+
+ verifyZeroInteractions(mMediaProjectionMetricsLogger);
+ assertThat(service.getActiveProjectionInfo()).isNotNull();
+ }
+
@Test
public void stop_noActiveProjections_doesNotLog() throws Exception {
MediaProjectionManagerService service =
diff --git a/services/tests/servicestests/src/com/android/server/pm/UserManagerTest.java b/services/tests/servicestests/src/com/android/server/pm/UserManagerTest.java
index 02d3b59fbf87..d714db99f18f 100644
--- a/services/tests/servicestests/src/com/android/server/pm/UserManagerTest.java
+++ b/services/tests/servicestests/src/com/android/server/pm/UserManagerTest.java
@@ -1060,6 +1060,23 @@ public final class UserManagerTest {
assertThrows(SecurityException.class, userProps::getAlwaysVisible);
}
+ /**
+ * Test that UserManager.getUserProperties throws the IllegalArgumentException for unsupported
+ * arguments such as UserHandle.NULL, UserHandle.CURRENT or UserHandle.ALL.
+ **/
+ @MediumTest
+ @Test
+ public void testThrowUserPropertiesForUnsupportedUserHandles() throws Exception {
+ assertThrows(IllegalArgumentException.class, () ->
+ mUserManager.getUserProperties(UserHandle.of(UserHandle.USER_NULL)));
+ assertThrows(IllegalArgumentException.class, () ->
+ mUserManager.getUserProperties(UserHandle.CURRENT));
+ assertThrows(IllegalArgumentException.class, () ->
+ mUserManager.getUserProperties(UserHandle.CURRENT_OR_SELF));
+ assertThrows(IllegalArgumentException.class, () ->
+ mUserManager.getUserProperties(UserHandle.ALL));
+ }
+
// Make sure only max managed profiles can be created
@MediumTest
@Test
@@ -1845,6 +1862,25 @@ public final class UserManagerTest {
assertThat(profilesExcludingHidden).asList().doesNotContain(profile.id);
}
+ /**
+ * Test that UserManager.isQuietModeEnabled return false for unsupported
+ * arguments such as UserHandle.NULL, UserHandle.CURRENT or UserHandle.ALL.
+ **/
+ @MediumTest
+ @Test
+ public void testQuietModeEnabledForUnsupportedUserHandles() throws Exception {
+ assumeManagedUsersSupported();
+ final int mainUserId = mUserManager.getMainUser().getIdentifier();
+ UserInfo userInfo = createProfileForUser("Profile",
+ UserManager.USER_TYPE_PROFILE_MANAGED, mainUserId);
+ mUserManager.requestQuietModeEnabled(true, userInfo.getUserHandle());
+ assertThat(mUserManager.isQuietModeEnabled(userInfo.getUserHandle())).isTrue();
+ assertThat(mUserManager.isQuietModeEnabled(UserHandle.of(UserHandle.USER_NULL))).isFalse();
+ assertThat(mUserManager.isQuietModeEnabled(UserHandle.CURRENT)).isFalse();
+ assertThat(mUserManager.isQuietModeEnabled(UserHandle.CURRENT_OR_SELF)).isFalse();
+ assertThat(mUserManager.isQuietModeEnabled(UserHandle.ALL)).isFalse();
+ }
+
private String generateLongString() {
String partialString = "Test Name Test Name Test Name Test Name Test Name Test Name Test "
+ "Name Test Name Test Name Test Name "; //String of length 100
diff --git a/services/tests/servicestests/src/com/android/server/power/WakefulnessSessionObserverTest.java b/services/tests/servicestests/src/com/android/server/power/WakefulnessSessionObserverTest.java
index 698f094c8796..6b32be0b2dfd 100644
--- a/services/tests/servicestests/src/com/android/server/power/WakefulnessSessionObserverTest.java
+++ b/services/tests/servicestests/src/com/android/server/power/WakefulnessSessionObserverTest.java
@@ -16,9 +16,14 @@
package com.android.server.power;
+import static android.hardware.display.DisplayManagerInternal.DisplayPowerRequest.POLICY_BRIGHT;
+import static android.hardware.display.DisplayManagerInternal.DisplayPowerRequest.POLICY_DIM;
+import static android.hardware.display.DisplayManagerInternal.DisplayPowerRequest.POLICY_OFF;
import static android.os.PowerManager.GO_TO_SLEEP_REASON_POWER_BUTTON;
import static android.os.PowerManager.GO_TO_SLEEP_REASON_TIMEOUT;
import static android.os.PowerManager.WAKE_REASON_POWER_BUTTON;
+import static android.view.Display.DEFAULT_DISPLAY;
+import static android.view.Display.DEFAULT_DISPLAY_GROUP;
import static com.android.server.power.ScreenTimeoutOverridePolicy.RELEASE_REASON_UNKNOWN;
import static com.android.server.power.ScreenTimeoutOverridePolicy.RELEASE_REASON_USER_ACTIVITY_TOUCH;
@@ -27,6 +32,10 @@ import static com.android.server.power.WakefulnessSessionObserver.OVERRIDE_OUTCO
import static com.android.server.power.WakefulnessSessionObserver.OVERRIDE_OUTCOME_CANCEL_USER_INTERACTION;
import static com.android.server.power.WakefulnessSessionObserver.OVERRIDE_OUTCOME_TIMEOUT_SUCCESS;
import static com.android.server.power.WakefulnessSessionObserver.OVERRIDE_OUTCOME_TIMEOUT_USER_INITIATED_REVERT;
+import static com.android.server.power.WakefulnessSessionObserver.POLICY_REASON_BRIGHT_INITIATED_REVERT;
+import static com.android.server.power.WakefulnessSessionObserver.POLICY_REASON_BRIGHT_UNDIM;
+import static com.android.server.power.WakefulnessSessionObserver.POLICY_REASON_OFF_POWER_BUTTON;
+import static com.android.server.power.WakefulnessSessionObserver.POLICY_REASON_OFF_TIMEOUT;
import static com.google.common.truth.Truth.assertThat;
@@ -40,18 +49,24 @@ import static org.mockito.Mockito.when;
import android.content.Context;
import android.content.ContextWrapper;
import android.content.res.Resources;
+import android.hardware.display.DisplayManagerInternal;
+import android.os.Handler;
import android.os.PowerManager;
import android.os.PowerManagerInternal;
import android.os.UserHandle;
import android.provider.Settings;
import android.test.mock.MockContentResolver;
+import android.view.DisplayAddress;
+import android.view.DisplayInfo;
import androidx.test.filters.SmallTest;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.runner.AndroidJUnit4;
+import com.android.internal.R;
import com.android.internal.util.test.FakeSettingsProvider;
import com.android.server.testutils.OffsettableClock;
+import com.android.server.testutils.TestHandler;
import org.junit.After;
import org.junit.Before;
@@ -65,25 +80,18 @@ import org.mockito.MockitoAnnotations;
public class WakefulnessSessionObserverTest {
private static final int DEFAULT_SCREEN_OFF_TIMEOUT_MS = 30000;
private static final int OVERRIDE_SCREEN_OFF_TIMEOUT_MS = 15000;
+ private static final int DISPLAY_PORT = 0xFF;
+ private static final long DISPLAY_MODEL = 0xEEEEEEEEL;
private WakefulnessSessionObserver mWakefulnessSessionObserver;
private Context mContext;
private OffsettableClock mTestClock;
@Mock
private WakefulnessSessionObserver.WakefulnessSessionFrameworkStatsLogger
mWakefulnessSessionFrameworkStatsLogger;
- private WakefulnessSessionObserver.Injector mInjector =
- new WakefulnessSessionObserver.Injector() {
- @Override
- WakefulnessSessionObserver.WakefulnessSessionFrameworkStatsLogger
- getWakefulnessSessionFrameworkStatsLogger() {
- return mWakefulnessSessionFrameworkStatsLogger;
- }
- @Override
- WakefulnessSessionObserver.Clock getClock() {
- return mTestClock::now;
- }
- };
+ @Mock
+ private DisplayManagerInternal mDisplayManagerInternal;
+ private TestHandler mHandler;
@Before
public void setUp() {
mTestClock = new OffsettableClock.Stopped();
@@ -95,7 +103,7 @@ public class WakefulnessSessionObserverTest {
final Resources res = spy(mContext.getResources());
doReturn(OVERRIDE_SCREEN_OFF_TIMEOUT_MS).when(res).getInteger(
- com.android.internal.R.integer.config_screenTimeoutOverride);
+ R.integer.config_screenTimeoutOverride);
when(mContext.getResources()).thenReturn(res);
FakeSettingsProvider.clearSettingsProvider();
MockContentResolver mockContentResolver = new MockContentResolver();
@@ -104,7 +112,32 @@ public class WakefulnessSessionObserverTest {
Settings.System.putIntForUser(mockContentResolver, Settings.System.SCREEN_OFF_TIMEOUT,
DEFAULT_SCREEN_OFF_TIMEOUT_MS, UserHandle.USER_CURRENT);
- mWakefulnessSessionObserver = new WakefulnessSessionObserver(mContext, mInjector);
+ final DisplayInfo info = new DisplayInfo();
+ info.address = DisplayAddress.fromPortAndModel(DISPLAY_PORT, DISPLAY_MODEL);
+ mHandler = new TestHandler(null);
+ mWakefulnessSessionObserver = new WakefulnessSessionObserver(
+ mContext, new WakefulnessSessionObserver.Injector() {
+ @Override
+ WakefulnessSessionObserver.WakefulnessSessionFrameworkStatsLogger
+ getWakefulnessSessionFrameworkStatsLogger() {
+ return mWakefulnessSessionFrameworkStatsLogger;
+ }
+ @Override
+ WakefulnessSessionObserver.Clock getClock() {
+ return mTestClock::now;
+ }
+ @Override
+ Handler getHandler() {
+ return mHandler;
+ }
+ @Override
+ DisplayManagerInternal getDisplayManagerInternal() {
+ when(mDisplayManagerInternal.getDisplayInfo(DEFAULT_DISPLAY))
+ .thenReturn(info);
+ return mDisplayManagerInternal;
+ }
+ }
+ );
}
@After
@@ -317,6 +350,167 @@ public class WakefulnessSessionObserverTest {
DEFAULT_SCREEN_OFF_TIMEOUT_MS); // default timeout ms
}
+ @Test
+ public void testOnScreenPolicyUpdate_OffByTimeout() {
+ int userActivity = PowerManager.USER_ACTIVITY_EVENT_ATTENTION;
+ long userActivityTimestamp = mTestClock.now();
+ mWakefulnessSessionObserver.notifyUserActivity(
+ userActivityTimestamp, DEFAULT_DISPLAY_GROUP, userActivity);
+ mWakefulnessSessionObserver.onScreenPolicyUpdate(
+ mTestClock.now(), DEFAULT_DISPLAY_GROUP, POLICY_DIM);
+ mWakefulnessSessionObserver.onWakefulnessChangeStarted(
+ DEFAULT_DISPLAY_GROUP, PowerManagerInternal.WAKEFULNESS_AWAKE,
+ WAKE_REASON_POWER_BUTTON, mTestClock.now());
+ int advancedTime = 5;
+ advanceTime(advancedTime);
+ mWakefulnessSessionObserver.onScreenPolicyUpdate(mTestClock.now(), DEFAULT_DISPLAY_GROUP,
+ POLICY_OFF);
+ mWakefulnessSessionObserver.onWakefulnessChangeStarted(
+ DEFAULT_DISPLAY_GROUP, PowerManagerInternal.WAKEFULNESS_ASLEEP,
+ GO_TO_SLEEP_REASON_TIMEOUT, mTestClock.now());
+
+ verify(mWakefulnessSessionFrameworkStatsLogger)
+ .logDimEvent(
+ DISPLAY_PORT, // physical display port id
+ POLICY_REASON_OFF_TIMEOUT, // policy reason
+ userActivity, // last user activity event
+ advancedTime, // last user activity timestamp
+ advancedTime, // dim duration ms
+ DEFAULT_SCREEN_OFF_TIMEOUT_MS); // default Timeout Ms
+ }
+
+ @Test
+ public void testOnScreenPolicyUpdate_NoLogging_NotDefaultDisplayGroup() {
+ int powerGroupId = 1;
+ int userActivity = PowerManager.USER_ACTIVITY_EVENT_ATTENTION;
+ long userActivityTimestamp = mTestClock.now();
+ int advancedTime = 5;
+ mWakefulnessSessionObserver.notifyUserActivity(
+ userActivityTimestamp, powerGroupId, userActivity);
+ mWakefulnessSessionObserver.onScreenPolicyUpdate(
+ mTestClock.now(), powerGroupId, POLICY_DIM);
+ advanceTime(advancedTime);
+ mWakefulnessSessionObserver.onScreenPolicyUpdate(mTestClock.now(), powerGroupId,
+ POLICY_OFF);
+
+ verify(mWakefulnessSessionFrameworkStatsLogger, never())
+ .logDimEvent(
+ DISPLAY_PORT, // physical display port id
+ POLICY_REASON_OFF_TIMEOUT, // policy reason
+ userActivity, // last user activity event
+ advancedTime, // last user activity timestamp
+ advancedTime, // dim duration ms
+ DEFAULT_SCREEN_OFF_TIMEOUT_MS); // default Timeout Ms
+ }
+
+ @Test
+ public void testOnScreenPolicyUpdate_OffByPowerButton() {
+ // ----- initialize start -----
+ mWakefulnessSessionObserver.onWakefulnessChangeStarted(
+ DEFAULT_DISPLAY_GROUP, PowerManagerInternal.WAKEFULNESS_AWAKE,
+ WAKE_REASON_POWER_BUTTON, mTestClock.now());
+
+ int userActivity = PowerManager.USER_ACTIVITY_EVENT_ACCESSIBILITY;
+ long userActivityTimestamp = mTestClock.now();
+ mWakefulnessSessionObserver.notifyUserActivity(
+ userActivityTimestamp, DEFAULT_DISPLAY_GROUP, userActivity);
+ mWakefulnessSessionObserver.onScreenPolicyUpdate(
+ mTestClock.now(), DEFAULT_DISPLAY_GROUP, POLICY_DIM);
+ // ----- initialize end -----
+
+ int dimDuration = 500;
+ advanceTime(dimDuration);
+ int userActivityDuration = dimDuration;
+ mWakefulnessSessionObserver.notifyUserActivity(
+ mTestClock.now(), DEFAULT_DISPLAY_GROUP, PowerManager.USER_ACTIVITY_EVENT_BUTTON);
+ mWakefulnessSessionObserver.onWakefulnessChangeStarted(
+ DEFAULT_DISPLAY_GROUP, PowerManagerInternal.WAKEFULNESS_ASLEEP,
+ GO_TO_SLEEP_REASON_POWER_BUTTON, mTestClock.now());
+
+ verify(mWakefulnessSessionFrameworkStatsLogger)
+ .logDimEvent(
+ DISPLAY_PORT, // physical display port id
+ POLICY_REASON_OFF_POWER_BUTTON, // policy reason
+ userActivity, // last user activity event
+ userActivityDuration, // last user activity timestamp
+ dimDuration, // dim duration ms
+ DEFAULT_SCREEN_OFF_TIMEOUT_MS); // default Timeout Ms
+ assertThat(mHandler.getPendingMessages()).isEmpty();
+ }
+
+ @Test
+ public void testOnScreenPolicyUpdate_Undim() {
+ // ----- initialize start -----
+ int userActivity = PowerManager.USER_ACTIVITY_EVENT_TOUCH;
+ long userActivityTimestamp = mTestClock.now();
+ mWakefulnessSessionObserver.notifyUserActivity(
+ userActivityTimestamp, DEFAULT_DISPLAY_GROUP, userActivity);
+ mWakefulnessSessionObserver.onScreenPolicyUpdate(
+ mTestClock.now(), DEFAULT_DISPLAY_GROUP, POLICY_DIM);
+ mWakefulnessSessionObserver.mPowerGroups.get(DEFAULT_DISPLAY_GROUP).mIsInteractive = true;
+ // ----- initialize end -----
+
+ int dimDurationMs = 5;
+ advanceTime(dimDurationMs);
+ mWakefulnessSessionObserver.onScreenPolicyUpdate(
+ mTestClock.now(), DEFAULT_DISPLAY_GROUP, POLICY_BRIGHT);
+
+ int expectedLastUserActivityTimeMs = (int) (mTestClock.now() - userActivityTimestamp);
+
+ mHandler.flush();
+ verify(mWakefulnessSessionFrameworkStatsLogger)
+ .logDimEvent(
+ DISPLAY_PORT, // physical display port id
+ POLICY_REASON_BRIGHT_UNDIM, // policy reason
+ userActivity, // last user activity event
+ expectedLastUserActivityTimeMs, // last user activity timestamp
+ dimDurationMs, // dim duration ms
+ DEFAULT_SCREEN_OFF_TIMEOUT_MS); // default Timeout Ms
+ }
+
+ @Test
+ public void testOnScreenPolicyUpdate_BrightInitiatedRevert() {
+ // ----- initialize start -----
+ mWakefulnessSessionObserver.onScreenPolicyUpdate(
+ mTestClock.now(), DEFAULT_DISPLAY_GROUP, POLICY_DIM);
+ int dimDurationMs = 500;
+ advanceTime(dimDurationMs);
+ int userActivity = PowerManager.USER_ACTIVITY_EVENT_BUTTON;
+ long userActivityTimestamp = mTestClock.now();
+ mWakefulnessSessionObserver.notifyUserActivity(
+ userActivityTimestamp, DEFAULT_DISPLAY_GROUP, userActivity);
+ int userActivityTime = 5;
+ advanceTime(userActivityTime);
+ dimDurationMs += userActivityTime;
+ mWakefulnessSessionObserver.onScreenPolicyUpdate(
+ mTestClock.now(), DEFAULT_DISPLAY_GROUP, POLICY_OFF);
+ mWakefulnessSessionObserver.onWakefulnessChangeStarted(
+ DEFAULT_DISPLAY_GROUP, PowerManagerInternal.WAKEFULNESS_ASLEEP,
+ GO_TO_SLEEP_REASON_POWER_BUTTON, mTestClock.now());
+
+ mWakefulnessSessionObserver.mPowerGroups.get(DEFAULT_DISPLAY_GROUP)
+ .mPastDimDurationMs = dimDurationMs;
+ // ----- initialize end -----
+
+ int advancedTime = 5;
+ advanceTime(advancedTime); // shorter than 5000 ms
+ userActivityTime += advancedTime;
+ mWakefulnessSessionObserver.onScreenPolicyUpdate(mTestClock.now(), DEFAULT_DISPLAY_GROUP,
+ POLICY_BRIGHT);
+ mWakefulnessSessionObserver.onWakefulnessChangeStarted(
+ DEFAULT_DISPLAY_GROUP, PowerManagerInternal.WAKEFULNESS_AWAKE,
+ WAKE_REASON_POWER_BUTTON, mTestClock.now());
+
+ verify(mWakefulnessSessionFrameworkStatsLogger)
+ .logDimEvent(
+ DISPLAY_PORT, // physical display port id
+ POLICY_REASON_BRIGHT_INITIATED_REVERT, // policy reason
+ userActivity, // last user activity event
+ userActivityTime, // last user activity timestamp
+ dimDurationMs, // dim duration ms
+ DEFAULT_SCREEN_OFF_TIMEOUT_MS); // default Timeout Ms
+ }
+
private void advanceTime(long timeMs) {
mTestClock.fastForward(timeMs);
}
diff --git a/services/tests/servicestests/src/com/android/server/power/hint/HintManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/power/hint/HintManagerServiceTest.java
index bf478162c46e..1decd36be394 100644
--- a/services/tests/servicestests/src/com/android/server/power/hint/HintManagerServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/power/hint/HintManagerServiceTest.java
@@ -151,7 +151,6 @@ public class HintManagerServiceTest {
private HintManagerService mService;
private ChannelConfig mConfig;
- private ApplicationInfo mApplicationInfo;
private static Answer<Long> fakeCreateWithConfig(Long ptr, Long sessionId) {
return new Answer<Long>() {
@@ -168,12 +167,12 @@ public class HintManagerServiceTest {
mConfig = new ChannelConfig();
mConfig.readFlagBitmask = 1;
mConfig.writeFlagBitmask = 2;
- mApplicationInfo = new ApplicationInfo();
- mApplicationInfo.category = ApplicationInfo.CATEGORY_GAME;
+ ApplicationInfo applicationInfo = new ApplicationInfo();
+ applicationInfo.category = ApplicationInfo.CATEGORY_GAME;
when(mContext.getPackageManager()).thenReturn(mMockPackageManager);
when(mMockPackageManager.getNameForUid(anyInt())).thenReturn(TEST_APP_NAME);
when(mMockPackageManager.getApplicationInfo(eq(TEST_APP_NAME), anyInt()))
- .thenReturn(mApplicationInfo);
+ .thenReturn(applicationInfo);
when(mNativeWrapperMock.halGetHintSessionPreferredRate())
.thenReturn(DEFAULT_HINT_PREFERRED_RATE);
when(mNativeWrapperMock.halCreateHintSession(eq(TGID), eq(UID), eq(SESSION_TIDS_A),
diff --git a/services/tests/servicestests/src/com/android/server/webkit/TestSystemImpl.java b/services/tests/servicestests/src/com/android/server/webkit/TestSystemImpl.java
index 54d11387752c..cbf79356e9c4 100644
--- a/services/tests/servicestests/src/com/android/server/webkit/TestSystemImpl.java
+++ b/services/tests/servicestests/src/com/android/server/webkit/TestSystemImpl.java
@@ -16,7 +16,6 @@
package com.android.server.webkit;
-import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager.NameNotFoundException;
@@ -66,10 +65,12 @@ public class TestSystemImpl implements SystemInterface {
}
@Override
- public String getUserChosenWebViewProvider(Context context) { return mUserProvider; }
+ public String getUserChosenWebViewProvider() {
+ return mUserProvider;
+ }
@Override
- public void updateUserSetting(Context context, String newProviderName) {
+ public void updateUserSetting(String newProviderName) {
mUserProvider = newProviderName;
}
@@ -77,14 +78,14 @@ public class TestSystemImpl implements SystemInterface {
public void killPackageDependents(String packageName) {}
@Override
- public void enablePackageForAllUsers(Context context, String packageName, boolean enable) {
+ public void enablePackageForAllUsers(String packageName, boolean enable) {
for(int userId : mUsers) {
enablePackageForUser(packageName, enable, userId);
}
}
@Override
- public void installExistingPackageForAllUsers(Context context, String packageName) {
+ public void installExistingPackageForAllUsers(String packageName) {
for (int userId : mUsers) {
installPackageForUser(packageName, userId);
}
@@ -131,8 +132,7 @@ public class TestSystemImpl implements SystemInterface {
}
@Override
- public List<UserPackage> getPackageInfoForProviderAllUsers(
- Context context, WebViewProviderInfo info) {
+ public List<UserPackage> getPackageInfoForProviderAllUsers(WebViewProviderInfo info) {
Map<Integer, PackageInfo> userPackages = mPackages.get(info.packageName);
List<UserPackage> ret = new ArrayList();
// Loop over defined users, and find the corresponding package for each user.
@@ -185,12 +185,12 @@ public class TestSystemImpl implements SystemInterface {
}
@Override
- public int getMultiProcessSetting(Context context) {
+ public int getMultiProcessSetting() {
return mMultiProcessSetting;
}
@Override
- public void setMultiProcessSetting(Context context, int value) {
+ public void setMultiProcessSetting(int value) {
mMultiProcessSetting = value;
}
diff --git a/services/tests/servicestests/src/com/android/server/webkit/WebViewUpdateServiceTest.java b/services/tests/servicestests/src/com/android/server/webkit/WebViewUpdateServiceTest.java
index e181a513b637..06479c84bfc7 100644
--- a/services/tests/servicestests/src/com/android/server/webkit/WebViewUpdateServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/webkit/WebViewUpdateServiceTest.java
@@ -104,10 +104,10 @@ public class WebViewUpdateServiceTest {
mTestSystemImpl = Mockito.spy(testing);
if (updateServiceV2()) {
mWebViewUpdateServiceImpl =
- new WebViewUpdateServiceImpl2(null /*Context*/, mTestSystemImpl);
+ new WebViewUpdateServiceImpl2(mTestSystemImpl);
} else {
mWebViewUpdateServiceImpl =
- new WebViewUpdateServiceImpl(null /*Context*/, mTestSystemImpl);
+ new WebViewUpdateServiceImpl(mTestSystemImpl);
}
}
@@ -140,7 +140,7 @@ public class WebViewUpdateServiceTest {
WebViewProviderInfo[] webviewPackages, int numRelros, String userSetting) {
setupWithPackagesAndRelroCount(webviewPackages, numRelros);
if (userSetting != null) {
- mTestSystemImpl.updateUserSetting(null, userSetting);
+ mTestSystemImpl.updateUserSetting(userSetting);
}
// Add (enabled and valid) package infos for each provider
setEnabledAndValidPackageInfos(webviewPackages);
@@ -313,7 +313,7 @@ public class WebViewUpdateServiceTest {
};
setupWithPackagesNonDebuggable(packages);
// Start with the setting pointing to the invalid package
- mTestSystemImpl.updateUserSetting(null, invalidPackage);
+ mTestSystemImpl.updateUserSetting(invalidPackage);
mTestSystemImpl.setPackageInfo(createPackageInfo(invalidPackage, true /* enabled */,
true /* valid */, true /* installed */, new Signature[]{invalidPackageSignature}
, 0 /* updateTime */));
@@ -481,7 +481,7 @@ public class WebViewUpdateServiceTest {
new WebViewProviderInfo(secondPackage, "", true, false, null)};
setupWithPackages(packages);
// Start with the setting pointing to the second package
- mTestSystemImpl.updateUserSetting(null, secondPackage);
+ mTestSystemImpl.updateUserSetting(secondPackage);
// Have all packages be enabled, so that we can change provider however we want to
setEnabledAndValidPackageInfos(packages);
@@ -572,7 +572,7 @@ public class WebViewUpdateServiceTest {
// Check that the boot time logic re-enables the fallback package.
runWebViewBootPreparationOnMainSync();
Mockito.verify(mTestSystemImpl).enablePackageForAllUsers(
- Matchers.anyObject(), Mockito.eq(testPackage), Mockito.eq(true));
+ Mockito.eq(testPackage), Mockito.eq(true));
// Fake the message about the enabling having changed the package state,
// and check we now use that package.
@@ -657,7 +657,7 @@ public class WebViewUpdateServiceTest {
null)};
setupWithPackages(packages);
// Start with the setting pointing to the secondary package
- mTestSystemImpl.updateUserSetting(null, secondaryPackage);
+ mTestSystemImpl.updateUserSetting(secondaryPackage);
int secondaryUserId = 10;
int userIdToChangePackageFor = multiUser ? secondaryUserId : TestSystemImpl.PRIMARY_USER_ID;
if (multiUser) {
@@ -710,7 +710,7 @@ public class WebViewUpdateServiceTest {
null)};
setupWithPackages(packages);
// Start with the setting pointing to the secondary package
- mTestSystemImpl.updateUserSetting(null, secondaryPackage);
+ mTestSystemImpl.updateUserSetting(secondaryPackage);
setEnabledAndValidPackageInfosForUser(TestSystemImpl.PRIMARY_USER_ID, packages);
int newUser = 100;
mTestSystemImpl.addUser(newUser);
@@ -832,14 +832,13 @@ public class WebViewUpdateServiceTest {
true /* installed */));
// Set user-chosen package
- mTestSystemImpl.updateUserSetting(null, chosenPackage);
+ mTestSystemImpl.updateUserSetting(chosenPackage);
runWebViewBootPreparationOnMainSync();
// Verify that we switch the setting to point to the current package
- Mockito.verify(mTestSystemImpl).updateUserSetting(
- Mockito.anyObject(), Mockito.eq(nonChosenPackage));
- assertEquals(nonChosenPackage, mTestSystemImpl.getUserChosenWebViewProvider(null));
+ Mockito.verify(mTestSystemImpl).updateUserSetting(Mockito.eq(nonChosenPackage));
+ assertEquals(nonChosenPackage, mTestSystemImpl.getUserChosenWebViewProvider());
checkPreparationPhasesForPackage(nonChosenPackage, 1);
}
@@ -976,7 +975,7 @@ public class WebViewUpdateServiceTest {
setEnabledAndValidPackageInfos(packages);
// Start with the setting pointing to the third package
- mTestSystemImpl.updateUserSetting(null, thirdPackage);
+ mTestSystemImpl.updateUserSetting(thirdPackage);
runWebViewBootPreparationOnMainSync();
checkPreparationPhasesForPackage(thirdPackage, 1);
@@ -1167,7 +1166,7 @@ public class WebViewUpdateServiceTest {
setupWithPackages(webviewPackages);
// Start with the setting pointing to the uninstalled package
- mTestSystemImpl.updateUserSetting(null, uninstalledPackage);
+ mTestSystemImpl.updateUserSetting(uninstalledPackage);
int secondaryUserId = 5;
if (multiUser) {
mTestSystemImpl.addUser(secondaryUserId);
@@ -1220,7 +1219,7 @@ public class WebViewUpdateServiceTest {
setupWithPackages(webviewPackages);
// Start with the setting pointing to the uninstalled package
- mTestSystemImpl.updateUserSetting(null, uninstalledPackage);
+ mTestSystemImpl.updateUserSetting(uninstalledPackage);
int secondaryUserId = 412;
mTestSystemImpl.addUser(secondaryUserId);
@@ -1277,7 +1276,7 @@ public class WebViewUpdateServiceTest {
setupWithPackages(webviewPackages);
// Start with the setting pointing to the uninstalled package
- mTestSystemImpl.updateUserSetting(null, uninstalledPackage);
+ mTestSystemImpl.updateUserSetting(uninstalledPackage);
int secondaryUserId = 4;
mTestSystemImpl.addUser(secondaryUserId);
@@ -1290,7 +1289,7 @@ public class WebViewUpdateServiceTest {
0 /* updateTime */, (testHidden ? true : false) /* hidden */));
// Start with the setting pointing to the uninstalled package
- mTestSystemImpl.updateUserSetting(null, uninstalledPackage);
+ mTestSystemImpl.updateUserSetting(uninstalledPackage);
runWebViewBootPreparationOnMainSync();
@@ -1458,7 +1457,7 @@ public class WebViewUpdateServiceTest {
runWebViewBootPreparationOnMainSync();
checkPreparationPhasesForPackage(primaryPackage, 1 /* first preparation phase */);
- mTestSystemImpl.setMultiProcessSetting(null /* context */, settingValue);
+ mTestSystemImpl.setMultiProcessSetting(settingValue);
assertEquals(expectEnabled, mWebViewUpdateServiceImpl.isMultiProcessEnabled());
}
@@ -1492,7 +1491,7 @@ public class WebViewUpdateServiceTest {
};
setupWithPackages(packages);
// Start with the setting pointing to the invalid package
- mTestSystemImpl.updateUserSetting(null, oldSdkPackage.packageName);
+ mTestSystemImpl.updateUserSetting(oldSdkPackage.packageName);
mTestSystemImpl.setPackageInfo(newSdkPackage);
mTestSystemImpl.setPackageInfo(currentSdkPackage);
@@ -1545,8 +1544,7 @@ public class WebViewUpdateServiceTest {
// Check that the boot time logic re-enables the default package.
runWebViewBootPreparationOnMainSync();
Mockito.verify(mTestSystemImpl)
- .enablePackageForAllUsers(
- Matchers.anyObject(), Mockito.eq(testPackage), Mockito.eq(true));
+ .enablePackageForAllUsers(Mockito.eq(testPackage), Mockito.eq(true));
}
@Test
@@ -1570,8 +1568,7 @@ public class WebViewUpdateServiceTest {
// Check that the boot time logic tries to install the default package.
runWebViewBootPreparationOnMainSync();
Mockito.verify(mTestSystemImpl)
- .installExistingPackageForAllUsers(
- Matchers.anyObject(), Mockito.eq(testPackage));
+ .installExistingPackageForAllUsers(Mockito.eq(testPackage));
}
@Test
@@ -1598,8 +1595,7 @@ public class WebViewUpdateServiceTest {
// Check that we try to re-install the default package.
Mockito.verify(mTestSystemImpl)
- .installExistingPackageForAllUsers(
- Matchers.anyObject(), Mockito.eq(testPackage));
+ .installExistingPackageForAllUsers(Mockito.eq(testPackage));
}
/**
@@ -1632,8 +1628,7 @@ public class WebViewUpdateServiceTest {
// Check that we try to re-install the default package for all users.
Mockito.verify(mTestSystemImpl)
- .installExistingPackageForAllUsers(
- Matchers.anyObject(), Mockito.eq(testPackage));
+ .installExistingPackageForAllUsers(Mockito.eq(testPackage));
}
private void testDefaultPackageChosen(PackageInfo packageInfo) {
diff --git a/services/tests/uiservicestests/src/com/android/server/notification/NotificationAttentionHelperTest.java b/services/tests/uiservicestests/src/com/android/server/notification/NotificationAttentionHelperTest.java
index 2233aa2eed0f..e06d939a34f7 100644
--- a/services/tests/uiservicestests/src/com/android/server/notification/NotificationAttentionHelperTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/NotificationAttentionHelperTest.java
@@ -223,10 +223,16 @@ public class NotificationAttentionHelperTest extends UiServiceTestCase {
Settings.System.putInt(getContext().getContentResolver(),
Settings.System.NOTIFICATION_LIGHT_PULSE, 1);
+ // Enable notification cooldown independent of device Settings
+ Settings.System.putInt(getContext().getContentResolver(),
+ Settings.System.NOTIFICATION_COOLDOWN_ENABLED, 1);
+
Resources resources = spy(getContext().getResources());
when(resources.getBoolean(R.bool.config_useAttentionLight)).thenReturn(true);
when(resources.getBoolean(
com.android.internal.R.bool.config_intrusiveNotificationLed)).thenReturn(true);
+ when(resources.getBoolean(R.bool.config_enableNotificationAccessibilityEvents))
+ .thenReturn(true);
when(getContext().getResources()).thenReturn(resources);
// TODO (b/291907312): remove feature flag
@@ -2830,6 +2836,34 @@ public class NotificationAttentionHelperTest extends UiServiceTestCase {
assertThat(r.getRankingTimeMs()).isEqualTo(r.getSbn().getPostTime());
}
+ @Test
+ public void testAccessibilityEventsEnabledInConfig() throws Exception {
+ Resources resources = spy(getContext().getResources());
+ when(resources.getBoolean(R.bool.config_enableNotificationAccessibilityEvents))
+ .thenReturn(true);
+ when(getContext().getResources()).thenReturn(resources);
+ initAttentionHelper(mTestFlagResolver);
+ NotificationRecord r = getBeepyNotification();
+
+ mAttentionHelper.buzzBeepBlinkLocked(r, DEFAULT_SIGNALS);
+
+ verify(mAccessibilityService).sendAccessibilityEvent(any(), anyInt());
+ }
+
+ @Test
+ public void testAccessibilityEventsDisabledInConfig() throws Exception {
+ Resources resources = spy(getContext().getResources());
+ when(resources.getBoolean(R.bool.config_enableNotificationAccessibilityEvents))
+ .thenReturn(false);
+ when(getContext().getResources()).thenReturn(resources);
+ initAttentionHelper(mTestFlagResolver);
+ NotificationRecord r = getBeepyNotification();
+
+ mAttentionHelper.buzzBeepBlinkLocked(r, DEFAULT_SIGNALS);
+
+ verify(mAccessibilityService, never()).sendAccessibilityEvent(any(), anyInt());
+ }
+
static class VibrateRepeatMatcher implements ArgumentMatcher<VibrationEffect> {
private final int mRepeatIndex;
diff --git a/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java b/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java
index 5d306e152ad7..c1f5a01a8c47 100644
--- a/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java
@@ -89,7 +89,6 @@ import static android.os.UserManager.USER_TYPE_FULL_SECONDARY;
import static android.os.UserManager.USER_TYPE_PROFILE_CLONE;
import static android.os.UserManager.USER_TYPE_PROFILE_MANAGED;
import static android.os.UserManager.USER_TYPE_PROFILE_PRIVATE;
-import static android.platform.test.flag.junit.SetFlagsRule.DefaultInitValueType.DEVICE_DEFAULT;
import static android.provider.Settings.Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS;
import static android.service.notification.Adjustment.KEY_CONTEXTUAL_ACTIONS;
import static android.service.notification.Adjustment.KEY_IMPORTANCE;
@@ -838,13 +837,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
// Pretend the shortcut exists
List<ShortcutInfo> shortcutInfos = new ArrayList<>();
- ShortcutInfo info = mock(ShortcutInfo.class);
- when(info.getPackage()).thenReturn(mPkg);
- when(info.getId()).thenReturn(VALID_CONVO_SHORTCUT_ID);
- when(info.getUserId()).thenReturn(USER_SYSTEM);
- when(info.isLongLived()).thenReturn(true);
- when(info.isEnabled()).thenReturn(true);
- shortcutInfos.add(info);
+ shortcutInfos.add(createMockConvoShortcut());
when(mLauncherApps.getShortcuts(any(), any())).thenReturn(shortcutInfos);
when(mShortcutServiceInternal.isSharingShortcut(anyInt(), anyString(), anyString(),
anyString(), anyInt(), any())).thenReturn(true);
@@ -11109,8 +11102,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
BUBBLE_PREFERENCE_ALL /* app */,
true /* channel */);
- ArgumentCaptor<LauncherApps.Callback> launcherAppsCallback =
- ArgumentCaptor.forClass(LauncherApps.Callback.class);
+ ArgumentCaptor<LauncherApps.ShortcutChangeCallback> shortcutChangeCallback =
+ ArgumentCaptor.forClass(LauncherApps.ShortcutChangeCallback.class);
// Messaging notification with shortcut info
Notification.BubbleMetadata metadata =
@@ -11131,7 +11124,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
// Verify:
// Make sure we register the callback for shortcut changes
- verify(mLauncherApps, times(1)).registerCallback(launcherAppsCallback.capture(), any());
+ verify(mShortcutServiceInternal, times(1)).addShortcutChangeCallback(
+ shortcutChangeCallback.capture());
// yes allowed, yes messaging w/shortcut, yes bubble
Notification notif = mService.getNotificationRecord(nr.getSbn().getKey()).getNotification();
@@ -11144,14 +11138,17 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
// Test: Remove the shortcut
when(mLauncherApps.getShortcuts(any(), any())).thenReturn(null);
- launcherAppsCallback.getValue().onShortcutsChanged(mPkg, emptyList(),
+ ArrayList<ShortcutInfo> removedShortcuts = new ArrayList<>();
+ removedShortcuts.add(createMockConvoShortcut());
+ shortcutChangeCallback.getValue().onShortcutsRemoved(mPkg, removedShortcuts,
UserHandle.getUserHandleForUid(mUid));
waitForIdle();
// Verify:
// Make sure callback is unregistered
- verify(mLauncherApps, times(1)).unregisterCallback(launcherAppsCallback.getValue());
+ verify(mShortcutServiceInternal, times(1)).removeShortcutChangeCallback(
+ shortcutChangeCallback.getValue());
// We're no longer a bubble
NotificationRecord notif2 = mService.getNotificationRecord(
@@ -11169,8 +11166,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
BUBBLE_PREFERENCE_ALL /* app */,
true /* channel */);
- ArgumentCaptor<LauncherApps.Callback> launcherAppsCallback =
- ArgumentCaptor.forClass(LauncherApps.Callback.class);
+ ArgumentCaptor<LauncherApps.ShortcutChangeCallback> shortcutChangeCallback =
+ ArgumentCaptor.forClass(LauncherApps.ShortcutChangeCallback.class);
// Messaging notification with shortcut info
Notification.BubbleMetadata metadata = new Notification.BubbleMetadata.Builder(
@@ -11204,7 +11201,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
// Verify:
// Make sure we register the callback for shortcut changes
- verify(mLauncherApps, times(1)).registerCallback(launcherAppsCallback.capture(), any());
+ verify(mShortcutServiceInternal, times(1)).addShortcutChangeCallback(
+ shortcutChangeCallback.capture());
// yes allowed, yes messaging w/shortcut, yes bubble
Notification notif = mService.getNotificationRecord(nr.getSbn().getKey()).getNotification();
@@ -11223,7 +11221,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
// Verify:
// Make sure callback is unregistered
- verify(mLauncherApps, times(1)).unregisterCallback(launcherAppsCallback.getValue());
+ verify(mShortcutServiceInternal, times(1)).removeShortcutChangeCallback(
+ shortcutChangeCallback.getValue());
}
@Test
@@ -16263,4 +16262,14 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
assertThat(r.getChannel().getId()).isEqualTo(NEWS_ID);
}
+
+ private ShortcutInfo createMockConvoShortcut() {
+ ShortcutInfo info = mock(ShortcutInfo.class);
+ when(info.getPackage()).thenReturn(mPkg);
+ when(info.getId()).thenReturn(VALID_CONVO_SHORTCUT_ID);
+ when(info.getUserId()).thenReturn(USER_SYSTEM);
+ when(info.isLongLived()).thenReturn(true);
+ when(info.isEnabled()).thenReturn(true);
+ return info;
+ }
}
diff --git a/services/tests/uiservicestests/src/com/android/server/notification/ShortcutHelperTest.java b/services/tests/uiservicestests/src/com/android/server/notification/ShortcutHelperTest.java
index a4fb16dc1adc..f008cb671e78 100644
--- a/services/tests/uiservicestests/src/com/android/server/notification/ShortcutHelperTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/ShortcutHelperTest.java
@@ -22,17 +22,22 @@ import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.reset;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import android.app.Notification;
+import android.app.NotificationChannel;
+import android.app.PendingIntent;
import android.app.Person;
import android.content.pm.LauncherApps;
import android.content.pm.LauncherApps.ShortcutQuery;
import android.content.pm.ShortcutInfo;
import android.content.pm.ShortcutQueryWrapper;
import android.content.pm.ShortcutServiceInternal;
+import android.graphics.drawable.Icon;
import android.os.UserHandle;
import android.os.UserManager;
import android.service.notification.StatusBarNotification;
@@ -50,11 +55,9 @@ import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
import org.mockito.Mock;
-import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
import java.util.ArrayList;
-import java.util.Collections;
import java.util.List;
@SmallTest
@@ -64,7 +67,6 @@ public class ShortcutHelperTest extends UiServiceTestCase {
private static final String SHORTCUT_ID = "shortcut";
private static final String PKG = "pkg";
- private static final String KEY = "key";
private static final Person PERSON = mock(Person.class);
@Mock
@@ -75,19 +77,11 @@ public class ShortcutHelperTest extends UiServiceTestCase {
UserManager mUserManager;
@Mock
ShortcutServiceInternal mShortcutServiceInternal;
- @Mock
- NotificationRecord mNr;
- @Mock
- Notification mNotif;
- @Mock
- StatusBarNotification mSbn;
- @Mock
- Notification.BubbleMetadata mBubbleMetadata;
- @Mock
- ShortcutInfo mShortcutInfo;
@Captor private ArgumentCaptor<ShortcutQuery> mShortcutQueryCaptor;
+ NotificationRecord mNr;
+
ShortcutHelper mShortcutHelper;
@Before
@@ -96,137 +90,186 @@ public class ShortcutHelperTest extends UiServiceTestCase {
mShortcutHelper = new ShortcutHelper(
mLauncherApps, mShortcutListener, mShortcutServiceInternal, mUserManager);
- when(mSbn.getPackageName()).thenReturn(PKG);
- when(mShortcutInfo.getId()).thenReturn(SHORTCUT_ID);
- when(mNotif.getBubbleMetadata()).thenReturn(mBubbleMetadata);
- when(mBubbleMetadata.getShortcutId()).thenReturn(SHORTCUT_ID);
when(mUserManager.isUserUnlocked(any(UserHandle.class))).thenReturn(true);
- setUpMockNotificationRecord(mNr, KEY);
+ mNr = setUpNotificationRecord(SHORTCUT_ID, PKG, UserHandle.of(UserHandle.USER_SYSTEM));
}
- private void setUpMockNotificationRecord(NotificationRecord mockRecord, String key) {
- when(mockRecord.getKey()).thenReturn(key);
- when(mockRecord.getSbn()).thenReturn(mSbn);
- when(mockRecord.getNotification()).thenReturn(mNotif);
- when(mockRecord.getShortcutInfo()).thenReturn(mShortcutInfo);
+ private NotificationRecord setUpNotificationRecord(String shortcutId,
+ String pkg,
+ UserHandle user) {
+ ShortcutInfo shortcutInfo = mock(ShortcutInfo.class);
+ when(shortcutInfo.getId()).thenReturn(shortcutId);
+ when(shortcutInfo.getUserHandle()).thenReturn(user);
+ when(shortcutInfo.isLongLived()).thenReturn(true);
+
+ Notification notification = new Notification.Builder(getContext())
+ .setContentTitle("title")
+ .setShortcutId(shortcutId)
+ .setBubbleMetadata(new Notification.BubbleMetadata.Builder(shortcutId).build())
+ .build();
+
+ StatusBarNotification sbn = new StatusBarNotification(pkg, pkg, 0, null,
+ 1000, 2000, notification, user, null, System.currentTimeMillis());
+ NotificationRecord record = new NotificationRecord(mContext, sbn,
+ mock(NotificationChannel.class));
+ record.setShortcutInfo(shortcutInfo);
+ return record;
}
- private LauncherApps.Callback addShortcutBubbleAndVerifyListener() {
- mShortcutHelper.maybeListenForShortcutChangesForBubbles(mNr,
- false /* removed */,
- null /* handler */);
+ private LauncherApps.ShortcutChangeCallback addShortcutBubbleAndVerifyListener(
+ NotificationRecord record) {
+ mShortcutHelper.maybeListenForShortcutChangesForBubbles(record, false /* removed */);
- ArgumentCaptor<LauncherApps.Callback> launcherAppsCallback =
- ArgumentCaptor.forClass(LauncherApps.Callback.class);
+ ArgumentCaptor<LauncherApps.ShortcutChangeCallback> launcherAppsCallback =
+ ArgumentCaptor.forClass(LauncherApps.ShortcutChangeCallback.class);
- verify(mLauncherApps, times(1)).registerCallback(
- launcherAppsCallback.capture(), any());
+ verify(mShortcutServiceInternal, times(1)).addShortcutChangeCallback(
+ launcherAppsCallback.capture());
return launcherAppsCallback.getValue();
}
@Test
public void testBubbleAdded_listenedAdded() {
- addShortcutBubbleAndVerifyListener();
+ addShortcutBubbleAndVerifyListener(mNr);
}
@Test
+ public void testListenerNotifiedOnShortcutRemoved() {
+ LauncherApps.ShortcutChangeCallback callback = addShortcutBubbleAndVerifyListener(mNr);
+
+ List<ShortcutInfo> removedShortcuts = new ArrayList<>();
+ removedShortcuts.add(mNr.getShortcutInfo());
+
+ callback.onShortcutsRemoved(PKG, removedShortcuts, mNr.getUser());
+ verify(mShortcutListener).onShortcutRemoved(mNr.getKey());
+ }
+
+ @Test
+ public void testListenerNotNotified_notMatchingPackage() {
+ LauncherApps.ShortcutChangeCallback callback = addShortcutBubbleAndVerifyListener(mNr);
+
+ List<ShortcutInfo> removedShortcuts = new ArrayList<>();
+ removedShortcuts.add(mNr.getShortcutInfo());
+
+ callback.onShortcutsRemoved("differentPackage", removedShortcuts, mNr.getUser());
+ verify(mShortcutListener, never()).onShortcutRemoved(anyString());
+ }
+
+ @Test
+ public void testListenerNotNotified_notMatchingUser() {
+ LauncherApps.ShortcutChangeCallback callback = addShortcutBubbleAndVerifyListener(mNr);
+
+ List<ShortcutInfo> removedShortcuts = new ArrayList<>();
+ removedShortcuts.add(mNr.getShortcutInfo());
+
+ callback.onShortcutsRemoved(PKG, removedShortcuts, UserHandle.of(10));
+ verify(mShortcutListener, never()).onShortcutRemoved(anyString());
+ }
+
+ @Test
+ public void testListenerNotifiedDifferentUser() {
+ LauncherApps.ShortcutChangeCallback callback = addShortcutBubbleAndVerifyListener(mNr);
+ NotificationRecord diffUserRecord = setUpNotificationRecord(SHORTCUT_ID, PKG,
+ UserHandle.of(10));
+ mShortcutHelper.maybeListenForShortcutChangesForBubbles(diffUserRecord,
+ false /* removed */);
+
+ List<ShortcutInfo> removedShortcuts = new ArrayList<>();
+ removedShortcuts.add(mNr.getShortcutInfo());
+
+ callback.onShortcutsRemoved(PKG, removedShortcuts, mNr.getUser());
+ verify(mShortcutListener).onShortcutRemoved(mNr.getKey());
+
+ reset(mShortcutListener);
+ removedShortcuts.clear();
+ removedShortcuts.add(diffUserRecord.getShortcutInfo());
+
+ callback.onShortcutsRemoved(PKG, removedShortcuts, diffUserRecord.getUser());
+ verify(mShortcutListener).onShortcutRemoved(diffUserRecord.getKey());
+ }
+
+
+ @Test
public void testBubbleRemoved_listenerRemoved() {
// First set it up to listen
- addShortcutBubbleAndVerifyListener();
+ addShortcutBubbleAndVerifyListener(mNr);
// Then remove the notif
mShortcutHelper.maybeListenForShortcutChangesForBubbles(mNr,
- true /* removed */,
- null /* handler */);
+ true /* removed */);
- verify(mLauncherApps, times(1)).unregisterCallback(any());
+ verify(mShortcutServiceInternal, times(1)).removeShortcutChangeCallback(any());
}
@Test
public void testBubbleNoLongerHasBubbleMetadata_listenerRemoved() {
// First set it up to listen
- addShortcutBubbleAndVerifyListener();
+ addShortcutBubbleAndVerifyListener(mNr);
// Then make it not a bubble
- when(mNotif.getBubbleMetadata()).thenReturn(null);
+ mNr.getNotification().setBubbleMetadata(null);
mShortcutHelper.maybeListenForShortcutChangesForBubbles(mNr,
- false /* removed */,
- null /* handler */);
+ false /* removed */);
- verify(mLauncherApps, times(1)).unregisterCallback(any());
+ verify(mShortcutServiceInternal, times(1)).removeShortcutChangeCallback(any());
}
@Test
public void testBubbleNoLongerHasShortcutId_listenerRemoved() {
// First set it up to listen
- addShortcutBubbleAndVerifyListener();
+ addShortcutBubbleAndVerifyListener(mNr);
// Clear out shortcutId
- when(mBubbleMetadata.getShortcutId()).thenReturn(null);
+ mNr.getNotification().setBubbleMetadata(new Notification.BubbleMetadata.Builder(
+ mock(PendingIntent.class), mock(Icon.class)).build());
mShortcutHelper.maybeListenForShortcutChangesForBubbles(mNr,
- false /* removed */,
- null /* handler */);
+ false /* removed */);
- verify(mLauncherApps, times(1)).unregisterCallback(any());
+ verify(mShortcutServiceInternal, times(1)).removeShortcutChangeCallback(any());
}
@Test
public void testNotifNoLongerHasShortcut_listenerRemoved() {
// First set it up to listen
- addShortcutBubbleAndVerifyListener();
-
- NotificationRecord validMock1 = Mockito.mock(NotificationRecord.class);
- setUpMockNotificationRecord(validMock1, "KEY1");
-
- NotificationRecord validMock2 = Mockito.mock(NotificationRecord.class);
- setUpMockNotificationRecord(validMock2, "KEY2");
+ addShortcutBubbleAndVerifyListener(mNr);
- NotificationRecord validMock3 = Mockito.mock(NotificationRecord.class);
- setUpMockNotificationRecord(validMock3, "KEY3");
+ NotificationRecord record1 = setUpNotificationRecord(SHORTCUT_ID, PKG,
+ UserHandle.of(UserHandle.USER_SYSTEM));
+ NotificationRecord record2 = setUpNotificationRecord(SHORTCUT_ID, PKG,
+ UserHandle.of(UserHandle.USER_SYSTEM));
+ NotificationRecord record3 = setUpNotificationRecord(SHORTCUT_ID, PKG,
+ UserHandle.of(UserHandle.USER_SYSTEM));
- mShortcutHelper.maybeListenForShortcutChangesForBubbles(validMock1,
- false /* removed */,
- null /* handler */);
+ mShortcutHelper.maybeListenForShortcutChangesForBubbles(record1,
+ false /* removed */);
- mShortcutHelper.maybeListenForShortcutChangesForBubbles(validMock2,
- false /* removed */,
- null /* handler */);
+ mShortcutHelper.maybeListenForShortcutChangesForBubbles(record2,
+ false /* removed */);
- mShortcutHelper.maybeListenForShortcutChangesForBubbles(validMock3,
- false /* removed */,
- null /* handler */);
+ mShortcutHelper.maybeListenForShortcutChangesForBubbles(record3,
+ false /* removed */);
- // Clear out shortcutId of the bubble in the middle, to double check that we don't hit a
+ // Clear out shortcutId of the bubble in the middle, to double-check that we don't hit a
// concurrent modification exception (removing the last bubble would sidestep that check).
- when(validMock2.getShortcutInfo()).thenReturn(null);
- mShortcutHelper.maybeListenForShortcutChangesForBubbles(validMock2,
- false /* removed */,
- null /* handler */);
+ record2.setShortcutInfo(null);
+ mShortcutHelper.maybeListenForShortcutChangesForBubbles(record2,
+ false /* removed */);
- verify(mLauncherApps, times(1)).unregisterCallback(any());
+ verify(mShortcutServiceInternal, times(1)).removeShortcutChangeCallback(any());
}
@Test
public void testOnShortcutsChanged_listenerRemoved() {
// First set it up to listen
- LauncherApps.Callback callback = addShortcutBubbleAndVerifyListener();
+ LauncherApps.ShortcutChangeCallback callback = addShortcutBubbleAndVerifyListener(mNr);
// App shortcuts are removed:
- callback.onShortcutsChanged(PKG, Collections.emptyList(), mock(UserHandle.class));
+ List<ShortcutInfo> removedShortcuts = new ArrayList<>();
+ removedShortcuts.add(mNr.getShortcutInfo());
+ callback.onShortcutsRemoved(PKG, removedShortcuts, mNr.getUser());
- verify(mLauncherApps, times(1)).unregisterCallback(any());
- }
-
- @Test
- public void testListenerNotifiedOnShortcutRemoved() {
- LauncherApps.Callback callback = addShortcutBubbleAndVerifyListener();
-
- List<ShortcutInfo> shortcutInfos = new ArrayList<>();
- when(mLauncherApps.getShortcuts(any(), any())).thenReturn(shortcutInfos);
-
- callback.onShortcutsChanged(PKG, shortcutInfos, mock(UserHandle.class));
- verify(mShortcutListener).onShortcutRemoved(mNr.getKey());
+ verify(mShortcutServiceInternal, times(1)).removeShortcutChangeCallback(any());
}
@Test
@@ -321,7 +364,6 @@ public class ShortcutHelperTest extends UiServiceTestCase {
.isSameInstanceAs(si);
}
-
@Test
public void testGetValidShortcutInfo_isValidButUserLocked() {
ShortcutInfo si = mock(ShortcutInfo.class);
diff --git a/services/tests/uiservicestests/src/com/android/server/notification/TimeToLiveHelperTest.java b/services/tests/uiservicestests/src/com/android/server/notification/TimeToLiveHelperTest.java
index 8b46c8c409d4..ad6c233789e9 100644
--- a/services/tests/uiservicestests/src/com/android/server/notification/TimeToLiveHelperTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/TimeToLiveHelperTest.java
@@ -29,6 +29,8 @@ import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
+import android.content.Intent;
+import android.net.Uri;
import android.os.SystemClock;
import android.os.UserHandle;
import android.service.notification.StatusBarNotification;
@@ -36,6 +38,7 @@ import android.testing.TestableLooper;
import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import com.android.server.UiServiceTestCase;
+import com.android.server.pm.PackageManagerService;
import org.junit.After;
import org.junit.Before;
@@ -125,6 +128,50 @@ public class TimeToLiveHelperTest extends UiServiceTestCase {
}
@Test
+ public void testTimeoutExpires_notifAlreadyCanceled() {
+ NotificationRecord r = getRecord("testTimeoutExpires", 1);
+
+ mHelper.scheduleTimeoutLocked(r, 1);
+ mHelper.cancelScheduledTimeoutLocked(r);
+
+ Intent intent = new Intent("com.android.server.notification.TimeToLiveHelper")
+ .setPackage(PackageManagerService.PLATFORM_PACKAGE_NAME)
+ .setData(new Uri.Builder()
+ .scheme("timeout")
+ .appendPath(r.getKey())
+ .build())
+ .putExtra(EXTRA_KEY, r.getKey())
+ .addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
+
+ mHelper.mNotificationTimeoutReceiver.onReceive(mContext, intent);
+
+ assertThat(mHelper.mKeys).isEmpty();
+ }
+
+ @Test
+ public void testTimeoutExpires_laterNotifAlreadyCanceled() {
+ NotificationRecord r = getRecord("testTimeoutExpires", 1);
+ NotificationRecord r2 = getRecord("testTimeoutExpires", 2);
+
+ mHelper.scheduleTimeoutLocked(r, 1);
+ mHelper.scheduleTimeoutLocked(r2, 2);
+ mHelper.cancelScheduledTimeoutLocked(r2);
+
+ Intent intent = new Intent("com.android.server.notification.TimeToLiveHelper")
+ .setPackage(PackageManagerService.PLATFORM_PACKAGE_NAME)
+ .setData(new Uri.Builder()
+ .scheme("timeout")
+ .appendPath(r2.getKey())
+ .build())
+ .putExtra(EXTRA_KEY, r2.getKey())
+ .addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
+
+ mHelper.mNotificationTimeoutReceiver.onReceive(mContext, intent);
+
+ assertThat(mHelper.mKeys).isEmpty();
+ }
+
+ @Test
public void testTimeout_earlierEntryAddedSecond() {
NotificationRecord later = getRecord("testTimeoutSecond", 2);
mHelper.scheduleTimeoutLocked(later, 1);
diff --git a/services/tests/uiservicestests/src/com/android/server/notification/ZenModeEventLoggerFake.java b/services/tests/uiservicestests/src/com/android/server/notification/ZenModeEventLoggerFake.java
index ff1308c4f6db..1c8cb8f90f1e 100644
--- a/services/tests/uiservicestests/src/com/android/server/notification/ZenModeEventLoggerFake.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/ZenModeEventLoggerFake.java
@@ -137,4 +137,9 @@ public class ZenModeEventLoggerFake extends ZenModeEventLogger {
checkInRange(i);
return mChanges.get(i).getActiveRuleTypes();
}
+
+ public int getChangeOrigin(int i) throws IllegalArgumentException {
+ checkInRange(i);
+ return mChanges.get(i).getChangeOrigin();
+ }
}
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 7bb633e6e1e0..b07940ad8de3 100644
--- a/services/tests/uiservicestests/src/com/android/server/notification/ZenModeHelperTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/ZenModeHelperTest.java
@@ -186,6 +186,9 @@ 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;
@@ -205,9 +208,6 @@ 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)
@@ -818,7 +818,7 @@ public class ZenModeHelperTest extends UiServiceTestCase {
// 1. Current ringer is normal
when(mAudioManager.getRingerModeInternal()).thenReturn(AudioManager.RINGER_MODE_NORMAL);
// Set zen to priority-only with all notification sounds muted (so ringer will be muted)
- Policy totalSilence = new Policy(0,0,0);
+ Policy totalSilence = new Policy(0, 0, 0);
mZenModeHelper.setNotificationPolicy(totalSilence, UPDATE_ORIGIN_APP, 1);
mZenModeHelper.mZenMode = ZEN_MODE_IMPORTANT_INTERRUPTIONS;
@@ -873,7 +873,7 @@ public class ZenModeHelperTest extends UiServiceTestCase {
// even when ringer is muted (since all ringer sounds cannot bypass DND),
// system stream is still affected by ringer mode
- mZenModeHelper.setNotificationPolicy(new Policy(0,0,0), UPDATE_ORIGIN_APP, 1);
+ mZenModeHelper.setNotificationPolicy(new Policy(0, 0, 0), UPDATE_ORIGIN_APP, 1);
mZenModeHelper.setManualZenMode(ZEN_MODE_IMPORTANT_INTERRUPTIONS, Uri.EMPTY,
UPDATE_ORIGIN_APP, "test", "caller", 1);
ZenModeHelper.RingerModeDelegate ringerModeDelegateRingerNotMuted =
@@ -1065,9 +1065,10 @@ public class ZenModeHelperTest extends UiServiceTestCase {
@Test
public void testParcelConfig() {
mZenModeHelper.setNotificationPolicy(new Policy(PRIORITY_CATEGORY_EVENTS
- | PRIORITY_CATEGORY_MESSAGES | PRIORITY_CATEGORY_REPEAT_CALLERS
- | PRIORITY_CATEGORY_CONVERSATIONS, PRIORITY_SENDERS_STARRED,
- PRIORITY_SENDERS_STARRED, 0, CONVERSATION_SENDERS_ANYONE), UPDATE_ORIGIN_UNKNOWN,
+ | PRIORITY_CATEGORY_MESSAGES | PRIORITY_CATEGORY_REPEAT_CALLERS
+ | PRIORITY_CATEGORY_CONVERSATIONS, PRIORITY_SENDERS_STARRED,
+ PRIORITY_SENDERS_STARRED, 0, CONVERSATION_SENDERS_ANYONE),
+ UPDATE_ORIGIN_UNKNOWN,
1);
mZenModeHelper.setManualZenRuleDeviceEffects(new ZenDeviceEffects.Builder()
.setShouldDimWallpaper(true)
@@ -1085,13 +1086,14 @@ public class ZenModeHelperTest extends UiServiceTestCase {
@Test
public void testWriteXml() throws Exception {
mZenModeHelper.setNotificationPolicy(new Policy(PRIORITY_CATEGORY_EVENTS
- | PRIORITY_CATEGORY_MESSAGES | PRIORITY_CATEGORY_REPEAT_CALLERS
- | PRIORITY_CATEGORY_CONVERSATIONS, PRIORITY_SENDERS_STARRED,
- PRIORITY_SENDERS_STARRED, SUPPRESSED_EFFECT_BADGE, CONVERSATION_SENDERS_ANYONE),
+ | PRIORITY_CATEGORY_MESSAGES | PRIORITY_CATEGORY_REPEAT_CALLERS
+ | PRIORITY_CATEGORY_CONVERSATIONS, PRIORITY_SENDERS_STARRED,
+ PRIORITY_SENDERS_STARRED, SUPPRESSED_EFFECT_BADGE,
+ CONVERSATION_SENDERS_ANYONE),
UPDATE_ORIGIN_UNKNOWN, 1);
mZenModeHelper.setManualZenRuleDeviceEffects(new ZenDeviceEffects.Builder()
- .setShouldDimWallpaper(true)
- .setShouldDisplayGrayscale(true)
+ .setShouldDimWallpaper(true)
+ .setShouldDisplayGrayscale(true)
.build(), UPDATE_ORIGIN_UNKNOWN, "test", 1);
mZenModeHelper.setManualZenMode(ZEN_MODE_IMPORTANT_INTERRUPTIONS, Uri.EMPTY,
UPDATE_ORIGIN_UNKNOWN, "test", "me", 1);
@@ -2210,7 +2212,7 @@ public class ZenModeHelperTest extends UiServiceTestCase {
customDefaultRule.name = "Schedule Default Rule";
customDefaultRule.zenMode = ZEN_MODE_IMPORTANT_INTERRUPTIONS;
ScheduleInfo scheduleInfo = new ScheduleInfo();
- scheduleInfo.days = new int[] { Calendar.SUNDAY };
+ scheduleInfo.days = new int[]{Calendar.SUNDAY};
scheduleInfo.startHour = 18;
scheduleInfo.endHour = 19;
customDefaultRule.conditionId = ZenModeConfig.toScheduleConditionId(scheduleInfo);
@@ -3027,7 +3029,7 @@ public class ZenModeHelperTest extends UiServiceTestCase {
// Turn zen mode on (to important_interruptions)
// Need to additionally call the looper in order to finish the post-apply-config process
mZenModeHelper.setManualZenMode(ZEN_MODE_IMPORTANT_INTERRUPTIONS, null,
- Flags.modesApi() ? UPDATE_ORIGIN_USER: UPDATE_ORIGIN_SYSTEM_OR_SYSTEMUI, "", null,
+ Flags.modesApi() ? UPDATE_ORIGIN_USER : UPDATE_ORIGIN_SYSTEM_OR_SYSTEMUI, "", null,
Process.SYSTEM_UID);
// Now turn zen mode off, but via a different package UID -- this should get registered as
@@ -3060,6 +3062,9 @@ public class ZenModeHelperTest extends UiServiceTestCase {
assertTrue(mZenModeEventLogger.getIsUserAction(0));
assertEquals(Process.SYSTEM_UID, mZenModeEventLogger.getPackageUid(0));
checkDndProtoMatchesSetupZenConfig(mZenModeEventLogger.getPolicyProto(0));
+ // change origin should be populated only under modes_ui
+ assertThat(mZenModeEventLogger.getChangeOrigin(0)).isEqualTo(
+ (Flags.modesApi() && Flags.modesUi()) ? UPDATE_ORIGIN_USER : 0);
// and from turning zen mode off:
// - event ID: DND_TURNED_OFF
@@ -3082,6 +3087,8 @@ public class ZenModeHelperTest extends UiServiceTestCase {
} else {
checkDndProtoMatchesSetupZenConfig(mZenModeEventLogger.getPolicyProto(1));
}
+ assertThat(mZenModeEventLogger.getChangeOrigin(1)).isEqualTo(
+ Flags.modesUi() ? UPDATE_ORIGIN_APP : 0);
}
@Test
@@ -3098,17 +3105,21 @@ public class ZenModeHelperTest extends UiServiceTestCase {
null,
NotificationManager.INTERRUPTION_FILTER_PRIORITY, true);
String id = mZenModeHelper.addAutomaticZenRule(mContext.getPackageName(), zenRule,
- UPDATE_ORIGIN_SYSTEM_OR_SYSTEMUI, "test", Process.SYSTEM_UID);
+ UPDATE_ORIGIN_APP, "test", CUSTOM_PKG_UID);
// Event 1: Mimic the rule coming on automatically by setting the Condition to STATE_TRUE
+ // Note that pre-modes_ui, this event serves as a test that automatic changes to an app's
+ // that look like they're coming from the system are attributed to the app, but when
+ // modes_ui is true, we opt to trust the provided change origin.
mZenModeHelper.setAutomaticZenRuleState(id,
new Condition(zenRule.getConditionId(), "", STATE_TRUE),
- UPDATE_ORIGIN_SYSTEM_OR_SYSTEMUI, Process.SYSTEM_UID);
+ Flags.modesUi() ? UPDATE_ORIGIN_APP : UPDATE_ORIGIN_SYSTEM_OR_SYSTEMUI,
+ CUSTOM_PKG_UID);
// Event 2: "User" turns off the automatic rule (sets it to not enabled)
zenRule.setEnabled(false);
mZenModeHelper.updateAutomaticZenRule(id, zenRule,
- Flags.modesApi() ? UPDATE_ORIGIN_USER: UPDATE_ORIGIN_SYSTEM_OR_SYSTEMUI, "",
+ Flags.modesApi() ? UPDATE_ORIGIN_USER : UPDATE_ORIGIN_SYSTEM_OR_SYSTEMUI, "",
Process.SYSTEM_UID);
AutomaticZenRule systemRule = new AutomaticZenRule("systemRule",
@@ -3118,7 +3129,7 @@ public class ZenModeHelperTest extends UiServiceTestCase {
null,
NotificationManager.INTERRUPTION_FILTER_PRIORITY, true);
String systemId = mZenModeHelper.addAutomaticZenRule(mContext.getPackageName(), systemRule,
- Flags.modesApi() ? UPDATE_ORIGIN_USER: UPDATE_ORIGIN_SYSTEM_OR_SYSTEMUI, "test",
+ Flags.modesApi() ? UPDATE_ORIGIN_USER : UPDATE_ORIGIN_SYSTEM_OR_SYSTEMUI, "test",
Process.SYSTEM_UID);
// Event 3: turn on the system rule
@@ -3128,7 +3139,7 @@ public class ZenModeHelperTest extends UiServiceTestCase {
// Event 4: "User" deletes the rule
mZenModeHelper.removeAutomaticZenRule(systemId,
- Flags.modesApi() ? UPDATE_ORIGIN_USER: UPDATE_ORIGIN_SYSTEM_OR_SYSTEMUI, "",
+ Flags.modesApi() ? UPDATE_ORIGIN_USER : UPDATE_ORIGIN_SYSTEM_OR_SYSTEMUI, "",
Process.SYSTEM_UID);
// In total, this represents 4 events
assertEquals(4, mZenModeEventLogger.numLoggedChanges());
@@ -3151,9 +3162,13 @@ public class ZenModeHelperTest extends UiServiceTestCase {
assertFalse(mZenModeEventLogger.getIsUserAction(0));
assertEquals(CUSTOM_PKG_UID, mZenModeEventLogger.getPackageUid(0));
checkDndProtoMatchesDefaultZenConfig(mZenModeEventLogger.getPolicyProto(0));
+ assertThat(mZenModeEventLogger.getChangeOrigin(0)).isEqualTo(
+ Flags.modesUi() ? UPDATE_ORIGIN_APP : 0);
// When the automatic rule is disabled, this should turn off zen mode and also count as a
// user action. We don't care what the consolidated policy is when DND turns off.
+ // When modes_ui is true, this event should look like a user action attributed to the
+ // specific app.
assertEquals(ZenModeEventLogger.ZenStateChangedEvent.DND_TURNED_OFF.getId(),
mZenModeEventLogger.getEventId(1));
assertEquals(ZEN_MODE_IMPORTANT_INTERRUPTIONS, mZenModeEventLogger.getPrevZenMode(1));
@@ -3161,12 +3176,15 @@ public class ZenModeHelperTest extends UiServiceTestCase {
assertEquals(DNDProtoEnums.AUTOMATIC_RULE, mZenModeEventLogger.getChangedRuleType(1));
assertEquals(0, mZenModeEventLogger.getNumRulesActive(1));
assertTrue(mZenModeEventLogger.getIsUserAction(1));
- assertEquals(Process.SYSTEM_UID, mZenModeEventLogger.getPackageUid(1));
+ assertThat(mZenModeEventLogger.getPackageUid(1)).isEqualTo(
+ Flags.modesUi() ? CUSTOM_PKG_UID : Process.SYSTEM_UID);
if (Flags.modesApi()) {
assertThat(mZenModeEventLogger.getPolicyProto(1)).isNull();
} else {
checkDndProtoMatchesSetupZenConfig(mZenModeEventLogger.getPolicyProto(1));
}
+ assertThat(mZenModeEventLogger.getChangeOrigin(1)).isEqualTo(
+ Flags.modesUi() ? UPDATE_ORIGIN_USER : 0);
// When the system rule is enabled, this counts as an automatic action that comes from the
// system and turns on DND
@@ -3176,6 +3194,8 @@ public class ZenModeHelperTest extends UiServiceTestCase {
assertEquals(1, mZenModeEventLogger.getNumRulesActive(2));
assertFalse(mZenModeEventLogger.getIsUserAction(2));
assertEquals(Process.SYSTEM_UID, mZenModeEventLogger.getPackageUid(2));
+ assertThat(mZenModeEventLogger.getChangeOrigin(2)).isEqualTo(
+ Flags.modesUi() ? UPDATE_ORIGIN_SYSTEM_OR_SYSTEMUI : 0);
// When the system rule is deleted, we consider this a user action that turns DND off
// (again)
@@ -3185,6 +3205,8 @@ public class ZenModeHelperTest extends UiServiceTestCase {
assertEquals(0, mZenModeEventLogger.getNumRulesActive(3));
assertTrue(mZenModeEventLogger.getIsUserAction(3));
assertEquals(Process.SYSTEM_UID, mZenModeEventLogger.getPackageUid(3));
+ assertThat(mZenModeEventLogger.getChangeOrigin(3)).isEqualTo(
+ Flags.modesUi() ? UPDATE_ORIGIN_USER : 0);
}
@Test
@@ -3238,6 +3260,8 @@ public class ZenModeHelperTest extends UiServiceTestCase {
assertEquals(1, mZenModeEventLogger.getNumRulesActive(0));
assertTrue(mZenModeEventLogger.getIsUserAction(0));
assertEquals(CUSTOM_PKG_UID, mZenModeEventLogger.getPackageUid(0));
+ assertThat(mZenModeEventLogger.getChangeOrigin(0)).isEqualTo(
+ Flags.modesUi() ? UPDATE_ORIGIN_USER : 0);
// Automatic rule turned off automatically by app:
// - event ID: DND_TURNED_OFF
@@ -3249,6 +3273,8 @@ public class ZenModeHelperTest extends UiServiceTestCase {
assertEquals(0, mZenModeEventLogger.getNumRulesActive(1));
assertFalse(mZenModeEventLogger.getIsUserAction(1));
assertEquals(CUSTOM_PKG_UID, mZenModeEventLogger.getPackageUid(1));
+ assertThat(mZenModeEventLogger.getChangeOrigin(1)).isEqualTo(
+ Flags.modesUi() ? UPDATE_ORIGIN_APP : 0);
// Automatic rule turned on automatically by app:
// - event ID: DND_TURNED_ON
@@ -3261,6 +3287,8 @@ public class ZenModeHelperTest extends UiServiceTestCase {
assertEquals(1, mZenModeEventLogger.getNumRulesActive(2));
assertFalse(mZenModeEventLogger.getIsUserAction(2));
assertEquals(CUSTOM_PKG_UID, mZenModeEventLogger.getPackageUid(2));
+ assertThat(mZenModeEventLogger.getChangeOrigin(2)).isEqualTo(
+ Flags.modesUi() ? UPDATE_ORIGIN_APP : 0);
// Automatic rule turned off automatically by the user:
// - event ID: DND_TURNED_ON
@@ -3272,6 +3300,8 @@ public class ZenModeHelperTest extends UiServiceTestCase {
assertEquals(0, mZenModeEventLogger.getNumRulesActive(3));
assertTrue(mZenModeEventLogger.getIsUserAction(3));
assertEquals(CUSTOM_PKG_UID, mZenModeEventLogger.getPackageUid(3));
+ assertThat(mZenModeEventLogger.getChangeOrigin(3)).isEqualTo(
+ Flags.modesUi() ? UPDATE_ORIGIN_USER : 0);
}
@Test
@@ -3335,7 +3365,7 @@ public class ZenModeHelperTest extends UiServiceTestCase {
AutomaticZenRule zenRule = new AutomaticZenRule("name",
null,
- new ComponentName(CUSTOM_PKG_NAME, "ScheduleConditionProvider"),
+ new ComponentName("android", "ScheduleConditionProvider"),
ZenModeConfig.toScheduleConditionId(new ScheduleInfo()),
null,
NotificationManager.INTERRUPTION_FILTER_PRIORITY, true);
@@ -3345,7 +3375,7 @@ public class ZenModeHelperTest extends UiServiceTestCase {
// Rule 2, same as rule 1
AutomaticZenRule zenRule2 = new AutomaticZenRule("name2",
null,
- new ComponentName(CUSTOM_PKG_NAME, "ScheduleConditionProvider"),
+ new ComponentName("android", "ScheduleConditionProvider"),
ZenModeConfig.toScheduleConditionId(new ScheduleInfo()),
null,
NotificationManager.INTERRUPTION_FILTER_PRIORITY, true);
@@ -3395,7 +3425,7 @@ public class ZenModeHelperTest extends UiServiceTestCase {
assertEquals(ZEN_MODE_IMPORTANT_INTERRUPTIONS, mZenModeEventLogger.getNewZenMode(0));
assertEquals(1, mZenModeEventLogger.getNumRulesActive(0));
assertFalse(mZenModeEventLogger.getIsUserAction(0));
- assertEquals(CUSTOM_PKG_UID, mZenModeEventLogger.getPackageUid(0));
+ assertEquals(Process.SYSTEM_UID, mZenModeEventLogger.getPackageUid(0));
checkDndProtoMatchesDefaultZenConfig(mZenModeEventLogger.getPolicyProto(0));
// Event 2: rule 2 turns on. This should not change anything about the policy, so the only
@@ -3404,7 +3434,7 @@ public class ZenModeHelperTest extends UiServiceTestCase {
mZenModeEventLogger.getEventId(1));
assertEquals(2, mZenModeEventLogger.getNumRulesActive(1));
assertFalse(mZenModeEventLogger.getIsUserAction(1));
- assertEquals(CUSTOM_PKG_UID, mZenModeEventLogger.getPackageUid(1));
+ assertEquals(Process.SYSTEM_UID, mZenModeEventLogger.getPackageUid(1));
checkDndProtoMatchesDefaultZenConfig(mZenModeEventLogger.getPolicyProto(1));
// Event 3: rule 3 turns on. This should trigger a policy change, and be classified as such,
@@ -3482,9 +3512,11 @@ public class ZenModeHelperTest extends UiServiceTestCase {
// Turn on rule 1; call looks like it's from the system. Because setting a condition is
// typically an automatic (non-user-initiated) action, expect the calling UID to be
// re-evaluated to the one associated with CUSTOM_PKG_NAME.
+ // When modes_ui is true: we expect the change origin to be the source of truth.
mZenModeHelper.setAutomaticZenRuleState(id,
new Condition(zenRule.getConditionId(), "", STATE_TRUE),
- UPDATE_ORIGIN_SYSTEM_OR_SYSTEMUI, Process.SYSTEM_UID);
+ Flags.modesUi() ? UPDATE_ORIGIN_APP : UPDATE_ORIGIN_SYSTEM_OR_SYSTEMUI,
+ Process.SYSTEM_UID);
// Second: turn on rule 2. This is a system-owned rule and the UID should not be modified
// (nor even looked up; the mock PackageManager won't handle "android" as input).
@@ -3493,7 +3525,7 @@ public class ZenModeHelperTest extends UiServiceTestCase {
UPDATE_ORIGIN_SYSTEM_OR_SYSTEMUI, Process.SYSTEM_UID);
// Disable rule 1. Because this looks like a user action, the UID should not be modified
- // from the system-provided one.
+ // from the system-provided one unless modes_ui is true.
zenRule.setEnabled(false);
mZenModeHelper.updateAutomaticZenRule(id, zenRule,
UPDATE_ORIGIN_USER, "", Process.SYSTEM_UID);
@@ -3504,6 +3536,7 @@ public class ZenModeHelperTest extends UiServiceTestCase {
// Change rule 2's condition, but from some other UID. Since it doesn't look like it's from
// the system, we keep the UID info.
+ // Note that this probably shouldn't be able to occur in real scenarios.
mZenModeHelper.setAutomaticZenRuleState(id2,
new Condition(zenRule2.getConditionId(), "", STATE_FALSE),
UPDATE_ORIGIN_APP, 12345);
@@ -3528,11 +3561,13 @@ public class ZenModeHelperTest extends UiServiceTestCase {
assertEquals(Process.SYSTEM_UID, mZenModeEventLogger.getPackageUid(1));
// Third event: disable rule 1. This looks like a user action so UID should be left alone.
+ // When modes_ui is true, we assign log this user action with the app that owns the rule.
assertEquals(ZenModeEventLogger.ZenStateChangedEvent.DND_ACTIVE_RULES_CHANGED.getId(),
mZenModeEventLogger.getEventId(2));
assertEquals(DNDProtoEnums.AUTOMATIC_RULE, mZenModeEventLogger.getChangedRuleType(2));
assertTrue(mZenModeEventLogger.getIsUserAction(2));
- assertEquals(Process.SYSTEM_UID, mZenModeEventLogger.getPackageUid(2));
+ assertThat(mZenModeEventLogger.getPackageUid(2)).isEqualTo(
+ Flags.modesUi() ? CUSTOM_PKG_UID : Process.SYSTEM_UID);
// Fourth event: turns on manual mode. Doesn't change effective policy so this is just a
// change in active rules. Confirm that the package UID is left unchanged.
@@ -4987,6 +5022,34 @@ public class ZenModeHelperTest extends UiServiceTestCase {
}
@Test
+ @EnableFlags(FLAG_MODES_API)
+ public void updateAutomaticZenRule_ruleChangedByUser_doesNotDeactivateRule_forWatch() {
+ when(mContext.getPackageManager()).thenReturn(mPackageManager);
+ when(mPackageManager.hasSystemFeature(PackageManager.FEATURE_WATCH)).thenReturn(true);
+ assertThat(mZenModeHelper.getZenMode()).isEqualTo(ZEN_MODE_OFF);
+ AutomaticZenRule rule =
+ new AutomaticZenRule.Builder("rule", CONDITION_ID)
+ .setConfigurationActivity(new ComponentName(mPkg, "cls"))
+ .setInterruptionFilter(INTERRUPTION_FILTER_PRIORITY)
+ .build();
+ String ruleId =
+ mZenModeHelper.addAutomaticZenRule(
+ mPkg, rule, UPDATE_ORIGIN_APP, "reason", CUSTOM_PKG_UID);
+ mZenModeHelper.setAutomaticZenRuleState(
+ ruleId, CONDITION_TRUE, UPDATE_ORIGIN_APP, CUSTOM_PKG_UID);
+ assertThat(mZenModeHelper.getZenMode()).isEqualTo(ZEN_MODE_IMPORTANT_INTERRUPTIONS);
+
+ AutomaticZenRule updateWithDiff =
+ new AutomaticZenRule.Builder(rule).setTriggerDescription("Whenever").build();
+ mZenModeHelper.updateAutomaticZenRule(ruleId, updateWithDiff, UPDATE_ORIGIN_USER, "reason",
+ CUSTOM_PKG_UID);
+
+ assertThat(mZenModeHelper.getZenMode()).isEqualTo(ZEN_MODE_IMPORTANT_INTERRUPTIONS);
+ assertThat(mZenModeHelper.mConfig.automaticRules.get(ruleId).condition).isEqualTo(
+ CONDITION_TRUE);
+ }
+
+ @Test
@EnableFlags({FLAG_MODES_API, FLAG_MODES_UI})
public void updateAutomaticZenRule_ruleDisabledByUser_doesNotReactivateOnReenable() {
assertThat(mZenModeHelper.getZenMode()).isEqualTo(ZEN_MODE_OFF);
@@ -6202,7 +6265,7 @@ public class ZenModeHelperTest extends UiServiceTestCase {
public void setManualZenRuleDeviceEffects_noPreexistingMode() {
ZenDeviceEffects effects = new ZenDeviceEffects.Builder()
.setShouldDimWallpaper(true)
- .build();
+ .build();
mZenModeHelper.setManualZenRuleDeviceEffects(effects, UPDATE_ORIGIN_USER, "settings", 1000);
assertThat(mZenModeHelper.getConfig().manualRule).isNotNull();
@@ -6339,21 +6402,21 @@ public class ZenModeHelperTest extends UiServiceTestCase {
private static final Correspondence<ZenRule, ZenRule> IGNORE_METADATA =
Correspondence.transforming(zr -> {
- Parcel p = Parcel.obtain();
- try {
- zr.writeToParcel(p, 0);
- p.setDataPosition(0);
- ZenRule copy = new ZenRule(p);
- copy.creationTime = 0;
- copy.userModifiedFields = 0;
- copy.zenPolicyUserModifiedFields = 0;
- copy.zenDeviceEffectsUserModifiedFields = 0;
- return copy;
- } finally {
- p.recycle();
- }
- },
- "Ignoring timestamp and userModifiedFields");
+ Parcel p = Parcel.obtain();
+ try {
+ zr.writeToParcel(p, 0);
+ p.setDataPosition(0);
+ ZenRule copy = new ZenRule(p);
+ copy.creationTime = 0;
+ copy.userModifiedFields = 0;
+ copy.zenPolicyUserModifiedFields = 0;
+ copy.zenDeviceEffectsUserModifiedFields = 0;
+ return copy;
+ } finally {
+ p.recycle();
+ }
+ },
+ "Ignoring timestamp and userModifiedFields");
private ZenRule expectedImplicitRule(String ownerPkg, int zenMode, ZenPolicy policy,
@Nullable Boolean conditionActive) {
diff --git a/services/tests/vibrator/src/com/android/server/vibrator/HapticFeedbackVibrationProviderTest.java b/services/tests/vibrator/src/com/android/server/vibrator/HapticFeedbackVibrationProviderTest.java
index 633a3c985b7f..901c0361092f 100644
--- a/services/tests/vibrator/src/com/android/server/vibrator/HapticFeedbackVibrationProviderTest.java
+++ b/services/tests/vibrator/src/com/android/server/vibrator/HapticFeedbackVibrationProviderTest.java
@@ -54,6 +54,7 @@ import android.os.vibrator.Flags;
import android.platform.test.flag.junit.SetFlagsRule;
import android.util.AtomicFile;
import android.util.SparseArray;
+import android.view.HapticFeedbackConstants;
import androidx.test.InstrumentationRegistry;
@@ -292,7 +293,7 @@ public class HapticFeedbackVibrationProviderTest {
for (int effectId : BIOMETRIC_FEEDBACK_CONSTANTS) {
VibrationAttributes attrs = hapticProvider.getVibrationAttributesForHapticFeedback(
- effectId, /* bypassVibrationIntensitySetting= */ false, /* fromIme= */ false);
+ effectId, /* flags */ 0, /* privFlags */ 0);
assertThat(attrs.getUsage()).isEqualTo(VibrationAttributes.USAGE_COMMUNICATION_REQUEST);
}
}
@@ -302,8 +303,7 @@ public class HapticFeedbackVibrationProviderTest {
HapticFeedbackVibrationProvider hapticProvider = createProviderWithDefaultCustomizations();
VibrationAttributes attrs = hapticProvider.getVibrationAttributesForHapticFeedback(
- SAFE_MODE_ENABLED, /* bypassVibrationIntensitySetting= */ false,
- false /* fromIme*/);
+ SAFE_MODE_ENABLED, /* flags */ 0, /* privFlags */ 0);
assertThat(attrs.isFlagSet(FLAG_BYPASS_USER_VIBRATION_INTENSITY_OFF)).isFalse();
}
@@ -313,7 +313,8 @@ public class HapticFeedbackVibrationProviderTest {
HapticFeedbackVibrationProvider hapticProvider = createProviderWithDefaultCustomizations();
VibrationAttributes attrs = hapticProvider.getVibrationAttributesForHapticFeedback(
- SAFE_MODE_ENABLED, /* bypassVibrationIntensitySetting= */ true, false /* fromIme*/);
+ SAFE_MODE_ENABLED,
+ /* flags */ HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING, /* privFlags */ 0);
assertThat(attrs.isFlagSet(FLAG_BYPASS_USER_VIBRATION_INTENSITY_OFF)).isTrue();
}
@@ -325,7 +326,7 @@ public class HapticFeedbackVibrationProviderTest {
for (int effectId : SCROLL_FEEDBACK_CONSTANTS) {
VibrationAttributes attrs = hapticProvider.getVibrationAttributesForHapticFeedback(
- effectId, /* bypassVibrationIntensitySetting= */ false, false /* fromIme*/);
+ effectId, /* flags */ 0, /* privFlags */ 0);
assertWithMessage("Expected FLAG_BYPASS_INTERRUPTION_POLICY for effect " + effectId)
.that(attrs.isFlagSet(FLAG_BYPASS_INTERRUPTION_POLICY)).isTrue();
}
@@ -338,7 +339,7 @@ public class HapticFeedbackVibrationProviderTest {
for (int effectId : SCROLL_FEEDBACK_CONSTANTS) {
VibrationAttributes attrs = hapticProvider.getVibrationAttributesForHapticFeedback(
- effectId, /* bypassVibrationIntensitySetting= */ false, false /* fromIme*/);
+ effectId, /* flags */ 0, /* privFlags */ 0);
assertWithMessage("Expected no FLAG_BYPASS_INTERRUPTION_POLICY for effect " + effectId)
.that(attrs.isFlagSet(FLAG_BYPASS_INTERRUPTION_POLICY)).isFalse();
}
@@ -351,7 +352,8 @@ public class HapticFeedbackVibrationProviderTest {
for (int effectId : KEYBOARD_FEEDBACK_CONSTANTS) {
VibrationAttributes attrs = hapticProvider.getVibrationAttributesForHapticFeedback(
- effectId, /* bypassVibrationIntensitySetting= */ false, true /* fromIme*/);
+ effectId, /* flags */ 0,
+ HapticFeedbackConstants.PRIVATE_FLAG_APPLY_INPUT_METHOD_SETTINGS);
assertWithMessage("Expected USAGE_TOUCH for effect " + effectId)
.that(attrs.getUsage()).isEqualTo(USAGE_TOUCH);
assertWithMessage("Expected no CATEGORY_KEYBOARD for effect " + effectId)
@@ -366,7 +368,7 @@ public class HapticFeedbackVibrationProviderTest {
for (int effectId : KEYBOARD_FEEDBACK_CONSTANTS) {
VibrationAttributes attrs = hapticProvider.getVibrationAttributesForHapticFeedback(
- effectId, /* bypassVibrationIntensitySetting= */ false, false /* fromIme*/);
+ effectId, /* flags */ 0, /* privFlags */ 0);
assertWithMessage("Expected USAGE_TOUCH for effect " + effectId)
.that(attrs.getUsage()).isEqualTo(USAGE_TOUCH);
assertWithMessage("Expected CATEGORY_KEYBOARD for effect " + effectId)
@@ -381,7 +383,8 @@ public class HapticFeedbackVibrationProviderTest {
for (int effectId : KEYBOARD_FEEDBACK_CONSTANTS) {
VibrationAttributes attrs = hapticProvider.getVibrationAttributesForHapticFeedback(
- effectId, /* bypassVibrationIntensitySetting= */ false, true /* fromIme*/);
+ effectId, /* flags */ 0,
+ HapticFeedbackConstants.PRIVATE_FLAG_APPLY_INPUT_METHOD_SETTINGS);
assertWithMessage("Expected USAGE_TOUCH for effect " + effectId)
.that(attrs.getUsage()).isEqualTo(USAGE_TOUCH);
assertWithMessage("Expected CATEGORY_KEYBOARD for effect " + effectId)
@@ -398,7 +401,8 @@ public class HapticFeedbackVibrationProviderTest {
for (int effectId : KEYBOARD_FEEDBACK_CONSTANTS) {
VibrationAttributes attrs = hapticProvider.getVibrationAttributesForHapticFeedback(
- effectId, /* bypassVibrationIntensitySetting= */ false, true /* fromIme*/);
+ effectId, /* flags */ 0,
+ HapticFeedbackConstants.PRIVATE_FLAG_APPLY_INPUT_METHOD_SETTINGS);
assertWithMessage("Expected no FLAG_BYPASS_USER_VIBRATION_INTENSITY_SCALE for effect "
+ effectId)
.that(attrs.isFlagSet(FLAG_BYPASS_USER_VIBRATION_INTENSITY_SCALE)).isFalse();
@@ -414,7 +418,7 @@ public class HapticFeedbackVibrationProviderTest {
for (int effectId : KEYBOARD_FEEDBACK_CONSTANTS) {
VibrationAttributes attrs = hapticProvider.getVibrationAttributesForHapticFeedback(
- effectId, /* bypassVibrationIntensitySetting= */ false, false /* fromIme*/);
+ effectId, /* flags */ 0, /* privFlags */ 0);
assertWithMessage("Expected no FLAG_BYPASS_USER_VIBRATION_INTENSITY_SCALE for effect "
+ effectId)
.that(attrs.isFlagSet(FLAG_BYPASS_USER_VIBRATION_INTENSITY_SCALE)).isFalse();
@@ -430,7 +434,8 @@ public class HapticFeedbackVibrationProviderTest {
for (int effectId : KEYBOARD_FEEDBACK_CONSTANTS) {
VibrationAttributes attrs = hapticProvider.getVibrationAttributesForHapticFeedback(
- effectId, /* bypassVibrationIntensitySetting= */ false, true /* fromIme*/);
+ effectId, /* flags */ 0,
+ HapticFeedbackConstants.PRIVATE_FLAG_APPLY_INPUT_METHOD_SETTINGS);
assertWithMessage("Expected FLAG_BYPASS_USER_VIBRATION_INTENSITY_SCALE for effect "
+ effectId)
.that(attrs.isFlagSet(FLAG_BYPASS_USER_VIBRATION_INTENSITY_SCALE)).isTrue();
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 9dac23f075e6..d7004e72bc52 100644
--- a/services/tests/vibrator/src/com/android/server/vibrator/VibrationThreadTest.java
+++ b/services/tests/vibrator/src/com/android/server/vibrator/VibrationThreadTest.java
@@ -1746,10 +1746,6 @@ public class VibrationThreadTest {
assertTrue("Tested duration=" + duration4, duration4 < 2000);
// Effect5: played normally after effect4, which may or may not have played.
-
- verify(mControllerCallbacks).onComplete(eq(VIBRATOR_ID), eq(vibrationId5));
- verifyCallbacksTriggered(vibrationId5, Vibration.Status.FINISHED);
-
assertEquals(Arrays.asList(expectedPrebaked(VibrationEffect.EFFECT_CLICK)),
fakeVibrator.getEffectSegments(vibrationId5));
}
diff --git a/services/tests/vibrator/src/com/android/server/vibrator/VibratorManagerServiceTest.java b/services/tests/vibrator/src/com/android/server/vibrator/VibratorManagerServiceTest.java
index 18752847910b..5ae5677b9b53 100644
--- a/services/tests/vibrator/src/com/android/server/vibrator/VibratorManagerServiceTest.java
+++ b/services/tests/vibrator/src/com/android/server/vibrator/VibratorManagerServiceTest.java
@@ -47,6 +47,7 @@ import android.content.ComponentName;
import android.content.ContentResolver;
import android.content.Context;
import android.content.ContextWrapper;
+import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.PackageManagerInternal;
import android.content.res.Resources;
@@ -103,6 +104,7 @@ import com.android.internal.util.test.FakeSettingsProvider;
import com.android.internal.util.test.FakeSettingsProviderRule;
import com.android.server.LocalServices;
import com.android.server.companion.virtual.VirtualDeviceManagerInternal;
+import com.android.server.pm.BackgroundUserSoundNotifier;
import org.junit.After;
import org.junit.Before;
@@ -809,6 +811,32 @@ public class VibratorManagerServiceTest {
}
@Test
+ @RequiresFlagsEnabled(android.multiuser.Flags.FLAG_ADD_UI_FOR_SOUNDS_FROM_BACKGROUND_USERS)
+ public void vibrate_thenFgUserRequestsMute_getsCancelled() throws Throwable {
+ mockVibrators(1);
+ VibratorManagerService service = createSystemReadyService();
+
+ var vib = vibrate(service,
+ VibrationEffect.createWaveform(new long[]{100, 100, 100, 100}, 0), ALARM_ATTRS);
+
+ assertTrue(waitUntil(s -> s.isVibrating(1), service, TEST_TIMEOUT_MILLIS));
+
+
+ service.mIntentReceiver.onReceive(mContextSpy, new Intent(
+ BackgroundUserSoundNotifier.ACTION_MUTE_SOUND));
+
+ assertTrue(waitUntil(s -> vib.hasEnded(), service, TEST_TIMEOUT_MILLIS));
+
+ var statsInfoCaptor = ArgumentCaptor.forClass(VibrationStats.StatsInfo.class);
+ verify(mVibratorFrameworkStatsLoggerMock, timeout(TEST_TIMEOUT_MILLIS))
+ .writeVibrationReportedAsync(statsInfoCaptor.capture());
+
+ VibrationStats.StatsInfo touchMetrics = statsInfoCaptor.getAllValues().get(0);
+ assertEquals(Vibration.Status.CANCELLED_BY_FOREGROUND_USER.getProtoEnumValue(),
+ touchMetrics.status);
+ }
+
+ @Test
public void vibrate_withVibrationAttributes_usesCorrespondingAudioUsageInAppOpsManager() {
VibratorManagerService service = createSystemReadyService();
@@ -2661,9 +2689,10 @@ public class VibratorManagerServiceTest {
private HalVibration performHapticFeedbackAndWaitUntilFinished(VibratorManagerService service,
int constant, boolean always) throws InterruptedException {
- HalVibration vib =
- service.performHapticFeedbackInternal(UID, Context.DEVICE_ID_DEFAULT, PACKAGE_NAME,
- constant, always, "some reason", service, false /* fromIme */);
+ HalVibration vib = service.performHapticFeedbackInternal(UID, Context.DEVICE_ID_DEFAULT,
+ PACKAGE_NAME, constant, "some reason", service,
+ always ? HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING : 0 /* flags */,
+ 0 /* privFlags */);
if (vib != null) {
vib.waitForEnd();
}
diff --git a/services/tests/wmtests/AndroidManifest.xml b/services/tests/wmtests/AndroidManifest.xml
index 777f6189fdea..6e6b70d319ab 100644
--- a/services/tests/wmtests/AndroidManifest.xml
+++ b/services/tests/wmtests/AndroidManifest.xml
@@ -52,6 +52,7 @@
<uses-permission android:name="android.permission.OBSERVE_ROLE_HOLDERS"/>
<uses-permission android:name="android.permission.MANAGE_DEFAULT_APPLICATIONS"/>
<uses-permission android:name="android.permission.DUMP"/>
+ <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
<!-- TODO: Remove largeHeap hack when memory leak is fixed (b/123984854) -->
<application android:debuggable="true"
diff --git a/services/tests/wmtests/OWNERS b/services/tests/wmtests/OWNERS
index 78b867f9190b..51519fdc4b87 100644
--- a/services/tests/wmtests/OWNERS
+++ b/services/tests/wmtests/OWNERS
@@ -4,4 +4,7 @@ include /services/core/java/com/android/server/wm/OWNERS
# Voice Interaction
per-file *Assist* = file:/core/java/android/service/voice/OWNERS
-natanieljr@google.com \ No newline at end of file
+# Keyboard shortcuts
+per-file res/xml/bookmarks.xml = file:/services/core/java/com/android/server/input/OWNERS
+
+natanieljr@google.com
diff --git a/services/tests/wmtests/res/xml/bookmarks.xml b/services/tests/wmtests/res/xml/bookmarks.xml
new file mode 100644
index 000000000000..1549b2de78c3
--- /dev/null
+++ b/services/tests/wmtests/res/xml/bookmarks.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<bookmarks>
+ <!-- the key combinations for the following shortcuts must be in sync
+ with the key combinations sent by the test in ModifierShortcutTests.java -->
+ <bookmark
+ role="android.app.role.BROWSER"
+ shortcut="b" />
+ <bookmark
+ category="android.intent.category.APP_CONTACTS"
+ shortcut="c" />
+ <bookmark
+ category="android.intent.category.APP_EMAIL"
+ shortcut="e" />
+ <bookmark
+ category="android.intent.category.APP_CALENDAR"
+ shortcut="k" />
+ <bookmark
+ category="android.intent.category.APP_MAPS"
+ shortcut="m" />
+ <bookmark
+ category="android.intent.category.APP_MUSIC"
+ shortcut="p" />
+ <bookmark
+ role="android.app.role.SMS"
+ shortcut="s" />
+ <bookmark
+ category="android.intent.category.APP_CALCULATOR"
+ shortcut="u" />
+
+ <!-- The following shortcuts will not be invoked by tests but are here to
+ provide test coverage of parsing the different types of shortcut. -->
+ <bookmark
+ package="com.test"
+ class="com.test.BookmarkTest"
+ shortcut="a" />
+ <bookmark
+ package="com.test2"
+ class="com.test.BookmarkTest"
+ shortcut="d" />
+
+ <bookmark
+ role="android.app.role.BROWSER"
+ shortcut="b"
+ shift="true" />
+ <bookmark
+ category="android.intent.category.APP_CONTACTS"
+ shortcut="c"
+ shift="true" />
+ <bookmark
+ package="com.test"
+ class="com.test.BookmarkTest"
+ shortcut="a"
+ shift="true" />
+
+ <!-- It's intended that this package/class will NOT resolve so we test the resolution
+ failure case. -->
+ <bookmark
+ package="com.test3"
+ class="com.test.BookmarkTest"
+ shortcut="f" />
+
+</bookmarks>
diff --git a/services/tests/wmtests/src/com/android/server/policy/CombinationKeyTests.java b/services/tests/wmtests/src/com/android/server/policy/CombinationKeyTests.java
index 896edffee875..1c331166d317 100644
--- a/services/tests/wmtests/src/com/android/server/policy/CombinationKeyTests.java
+++ b/services/tests/wmtests/src/com/android/server/policy/CombinationKeyTests.java
@@ -24,8 +24,8 @@ import static com.android.server.policy.PhoneWindowManager.POWER_VOLUME_UP_BEHAV
import android.view.ViewConfiguration;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.MediumTest;
-import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test;
diff --git a/services/tests/wmtests/src/com/android/server/policy/ModifierShortcutManagerTests.java b/services/tests/wmtests/src/com/android/server/policy/ModifierShortcutManagerTests.java
new file mode 100644
index 000000000000..5533ff909c50
--- /dev/null
+++ b/services/tests/wmtests/src/com/android/server/policy/ModifierShortcutManagerTests.java
@@ -0,0 +1,203 @@
+/*
+ * 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.server.policy;
+
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.AdditionalMatchers.aryEq;
+import static org.mockito.Mockito.anyInt;
+import static org.mockito.Mockito.anyObject;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.doThrow;
+import static org.mockito.Mockito.eq;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.when;
+
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.pm.ActivityInfo;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
+import android.content.res.Resources;
+import android.content.res.XmlResourceParser;
+import android.os.Handler;
+import android.os.Looper;
+import android.view.KeyEvent;
+import android.view.KeyboardShortcutGroup;
+import android.view.KeyboardShortcutInfo;
+
+import androidx.test.filters.SmallTest;
+
+import com.android.internal.R;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import java.util.Collections;
+
+/**
+ * Test class for {@link ModifierShortcutManager}.
+ *
+ * Build/Install/Run:
+ * atest ModifierShortcutManagerTests
+ */
+
+@SmallTest
+public class ModifierShortcutManagerTests {
+ private ModifierShortcutManager mModifierShortcutManager;
+ private Handler mHandler;
+ private Context mContext;
+ private Resources mResources;
+ private PackageManager mPackageManager;
+
+ @Before
+ public void setUp() {
+ mHandler = new Handler(Looper.getMainLooper());
+ mContext = spy(getInstrumentation().getTargetContext());
+ mResources = spy(mContext.getResources());
+ mPackageManager = spy(mContext.getPackageManager());
+
+ XmlResourceParser testBookmarks = mResources.getXml(
+ com.android.frameworks.wmtests.R.xml.bookmarks);
+
+ when(mContext.getResources()).thenReturn(mResources);
+ when(mContext.getPackageManager()).thenReturn(mPackageManager);
+ when(mResources.getXml(R.xml.bookmarks)).thenReturn(testBookmarks);
+ try {
+ // Keep packageName / className in sync with
+ // services/tests/wmtests/res/xml/bookmarks.xml
+ ActivityInfo testActivityInfo = new ActivityInfo();
+ testActivityInfo.applicationInfo = new ApplicationInfo();
+ testActivityInfo.packageName =
+ testActivityInfo.applicationInfo.packageName = "com.test";
+
+ doReturn(testActivityInfo).when(mPackageManager).getActivityInfo(
+ eq(new ComponentName("com.test", "com.test.BookmarkTest")), anyInt());
+ doThrow(new PackageManager.NameNotFoundException("com.test3")).when(mPackageManager)
+ .getActivityInfo(eq(new ComponentName("com.test3", "com.test.BookmarkTest")),
+ anyInt());
+ } catch (PackageManager.NameNotFoundException ignored) { }
+ doReturn(new String[] { "com.test" }).when(mPackageManager)
+ .canonicalToCurrentPackageNames(aryEq(new String[] { "com.test2" }));
+
+
+ mModifierShortcutManager = new ModifierShortcutManager(mContext, mHandler);
+ }
+
+ @Test
+ public void test_getApplicationLaunchKeyboardShortcuts() {
+ // Expected values here determined by the number of shortcuts defined in
+ // services/tests/wmtests/res/xml/bookmarks.xml
+
+ // Total valid shortcuts.
+ KeyboardShortcutGroup group =
+ mModifierShortcutManager.getApplicationLaunchKeyboardShortcuts(-1);
+ assertEquals(13, group.getItems().size());
+
+ // Total valid shift shortcuts.
+ assertEquals(3, group.getItems().stream()
+ .filter(s -> s.getModifiers() == (KeyEvent.META_SHIFT_ON | KeyEvent.META_META_ON))
+ .count());
+ }
+
+ @Test
+ public void test_shortcutInfoFromIntent_appIntent() {
+ Intent mockIntent = mock(Intent.class);
+ ActivityInfo mockActivityInfo = mock(ActivityInfo.class);
+ when(mockActivityInfo.loadLabel(anyObject())).thenReturn("label");
+ mockActivityInfo.packageName = "android";
+ when(mockActivityInfo.getIconResource()).thenReturn(R.drawable.sym_def_app_icon);
+ when(mockIntent.resolveActivityInfo(anyObject(), anyInt())).thenReturn(mockActivityInfo);
+
+ KeyboardShortcutInfo info = mModifierShortcutManager.shortcutInfoFromIntent(
+ 'a', mockIntent, true);
+
+ assertEquals("label", info.getLabel().toString());
+ assertEquals('a', info.getBaseCharacter());
+ assertEquals(R.drawable.sym_def_app_icon, info.getIcon().getResId());
+ assertEquals(KeyEvent.META_META_ON | KeyEvent.META_SHIFT_ON, info.getModifiers());
+
+ }
+
+ @Test
+ public void test_shortcutInfoFromIntent_resolverIntent() {
+ Intent mockIntent = mock(Intent.class);
+ Intent mockSelector = mock(Intent.class);
+ ActivityInfo mockActivityInfo = mock(ActivityInfo.class);
+ mockActivityInfo.name = com.android.internal.app.ResolverActivity.class.getName();
+ when(mockIntent.resolveActivityInfo(anyObject(), anyInt())).thenReturn(mockActivityInfo);
+ when(mockIntent.getSelector()).thenReturn(mockSelector);
+ when(mockSelector.getCategories()).thenReturn(
+ Collections.singleton(Intent.CATEGORY_APP_BROWSER));
+
+ KeyboardShortcutInfo info = mModifierShortcutManager.shortcutInfoFromIntent(
+ 'a', mockIntent, false);
+
+ assertEquals(mContext.getString(R.string.keyboard_shortcut_group_applications_browser),
+ info.getLabel().toString());
+ assertEquals('a', info.getBaseCharacter());
+ assertEquals(R.drawable.sym_def_app_icon, info.getIcon().getResId());
+ assertEquals(KeyEvent.META_META_ON, info.getModifiers());
+
+ // validate that an unknown category that we can't present a label to the user for
+ // returns null shortcut info.
+ when(mockSelector.getCategories()).thenReturn(
+ Collections.singleton("not_a_category"));
+ assertEquals(null, mModifierShortcutManager.shortcutInfoFromIntent(
+ 'a', mockIntent, false));
+ }
+
+ @Test
+ public void test_getIntentCategoryLabel() {
+ assertEquals(
+ mContext.getString(R.string.keyboard_shortcut_group_applications_browser),
+ ModifierShortcutManager.getIntentCategoryLabel(
+ mContext, Intent.CATEGORY_APP_BROWSER));
+ assertEquals(
+ mContext.getString(R.string.keyboard_shortcut_group_applications_contacts),
+ ModifierShortcutManager.getIntentCategoryLabel(
+ mContext, Intent.CATEGORY_APP_CONTACTS));
+ assertEquals(
+ mContext.getString(R.string.keyboard_shortcut_group_applications_email),
+ ModifierShortcutManager.getIntentCategoryLabel(
+ mContext, Intent.CATEGORY_APP_EMAIL));
+ assertEquals(
+ mContext.getString(R.string.keyboard_shortcut_group_applications_calendar),
+ ModifierShortcutManager.getIntentCategoryLabel(
+ mContext, Intent.CATEGORY_APP_CALENDAR));
+ assertEquals(
+ mContext.getString(R.string.keyboard_shortcut_group_applications_maps),
+ ModifierShortcutManager.getIntentCategoryLabel(
+ mContext, Intent.CATEGORY_APP_MAPS));
+ assertEquals(
+ mContext.getString(R.string.keyboard_shortcut_group_applications_music),
+ ModifierShortcutManager.getIntentCategoryLabel(
+ mContext, Intent.CATEGORY_APP_MUSIC));
+ assertEquals(
+ mContext.getString(R.string.keyboard_shortcut_group_applications_sms),
+ ModifierShortcutManager.getIntentCategoryLabel(
+ mContext, Intent.CATEGORY_APP_MESSAGING));
+ assertEquals(
+ mContext.getString(R.string.keyboard_shortcut_group_applications_calculator),
+ ModifierShortcutManager.getIntentCategoryLabel(
+ mContext, Intent.CATEGORY_APP_CALCULATOR));
+ assertEquals(null, ModifierShortcutManager.getIntentCategoryLabel(mContext, "foo"));
+ }
+}
diff --git a/services/tests/wmtests/src/com/android/server/policy/ModifierShortcutTests.java b/services/tests/wmtests/src/com/android/server/policy/ModifierShortcutTests.java
index 0ed02dd0f429..526c351a656c 100644
--- a/services/tests/wmtests/src/com/android/server/policy/ModifierShortcutTests.java
+++ b/services/tests/wmtests/src/com/android/server/policy/ModifierShortcutTests.java
@@ -65,7 +65,8 @@ public class ModifierShortcutTests extends ShortcutKeyTestBase {
private static final SparseArray<String> INTENT_SHORTCUTS = new SparseArray<>();
private static final SparseArray<String> ROLE_SHORTCUTS = new SparseArray<>();
static {
- // These shortcuts should align with those defined in bookmarks.xml
+ // These shortcuts should align with those defined in
+ // services/tests/wmtests/res/xml/bookmarks.xml
INTENT_SHORTCUTS.append(KEYCODE_U, Intent.CATEGORY_APP_CALCULATOR);
INTENT_SHORTCUTS.append(KEYCODE_C, Intent.CATEGORY_APP_CONTACTS);
INTENT_SHORTCUTS.append(KEYCODE_E, Intent.CATEGORY_APP_EMAIL);
@@ -96,6 +97,7 @@ public class ModifierShortcutTests extends ShortcutKeyTestBase {
mPhoneWindowManager.assertLaunchCategory(category);
}
+ mPhoneWindowManager.overrideRoleManager();
for (int i = 0; i < ROLE_SHORTCUTS.size(); i++) {
final int keyCode = ROLE_SHORTCUTS.keyAt(i);
final String role = ROLE_SHORTCUTS.valueAt(i);
diff --git a/services/tests/wmtests/src/com/android/server/policy/PhoneWindowManagerTests.java b/services/tests/wmtests/src/com/android/server/policy/PhoneWindowManagerTests.java
index 248091371ff1..07934ea90b7e 100644
--- a/services/tests/wmtests/src/com/android/server/policy/PhoneWindowManagerTests.java
+++ b/services/tests/wmtests/src/com/android/server/policy/PhoneWindowManagerTests.java
@@ -131,8 +131,6 @@ public class PhoneWindowManagerTests {
@Test
public void testScreenTurnedOff() {
- mSetFlagsRule.enableFlags(com.android.window.flags.Flags
- .FLAG_SKIP_SLEEPING_WHEN_SWITCHING_DISPLAY);
doNothing().when(mPhoneWindowManager).updateSettings(any());
doNothing().when(mPhoneWindowManager).initializeHdmiState();
final boolean[] isScreenTurnedOff = { false };
@@ -159,14 +157,15 @@ public class PhoneWindowManagerTests {
// Skip sleep-token for non-sleep-screen-off.
clearInvocations(tokenAcquirer);
mPhoneWindowManager.screenTurnedOff(DEFAULT_DISPLAY, true /* isSwappingDisplay */);
- verify(tokenAcquirer, never()).acquire(anyInt(), anyBoolean());
+ verify(tokenAcquirer, never()).acquire(anyInt());
assertThat(isScreenTurnedOff[0]).isTrue();
// Apply sleep-token for sleep-screen-off.
+ isScreenTurnedOff[0] = false;
mPhoneWindowManager.startedGoingToSleep(DEFAULT_DISPLAY, 0 /* reason */);
assertThat(mPhoneWindowManager.mIsGoingToSleepDefaultDisplay).isTrue();
mPhoneWindowManager.screenTurnedOff(DEFAULT_DISPLAY, true /* isSwappingDisplay */);
- verify(tokenAcquirer).acquire(eq(DEFAULT_DISPLAY), eq(true));
+ verify(tokenAcquirer).acquire(eq(DEFAULT_DISPLAY));
mPhoneWindowManager.finishedGoingToSleep(DEFAULT_DISPLAY, 0 /* reason */);
assertThat(mPhoneWindowManager.mIsGoingToSleepDefaultDisplay).isFalse();
@@ -176,11 +175,11 @@ public class PhoneWindowManagerTests {
isScreenTurnedOff[0] = false;
clearInvocations(tokenAcquirer);
mPhoneWindowManager.screenTurnedOff(DEFAULT_DISPLAY, true /* isSwappingDisplay */);
- verify(tokenAcquirer, never()).acquire(anyInt(), anyBoolean());
+ verify(tokenAcquirer, never()).acquire(anyInt());
assertThat(displayPolicy.isScreenOnEarly()).isFalse();
assertThat(displayPolicy.isScreenOnFully()).isFalse();
mPhoneWindowManager.startedGoingToSleep(DEFAULT_DISPLAY, 0 /* reason */);
- verify(tokenAcquirer).acquire(eq(DEFAULT_DISPLAY), eq(false));
+ verify(tokenAcquirer).acquire(eq(DEFAULT_DISPLAY));
}
@Test
diff --git a/services/tests/wmtests/src/com/android/server/policy/ShortcutKeyTestBase.java b/services/tests/wmtests/src/com/android/server/policy/ShortcutKeyTestBase.java
index dff4984adb80..f5c8fb803fd8 100644
--- a/services/tests/wmtests/src/com/android/server/policy/ShortcutKeyTestBase.java
+++ b/services/tests/wmtests/src/com/android/server/policy/ShortcutKeyTestBase.java
@@ -49,6 +49,7 @@ import static java.util.Collections.unmodifiableMap;
import android.content.Context;
import android.content.res.Resources;
+import android.content.res.XmlResourceParser;
import android.platform.test.flag.junit.SetFlagsRule;
import android.util.ArrayMap;
import android.view.InputDevice;
@@ -102,6 +103,9 @@ class ShortcutKeyTestBase {
doReturn(mResources).when(mContext).getResources();
doReturn(mSettingsProviderRule.mockContentResolver(mContext))
.when(mContext).getContentResolver();
+ XmlResourceParser testBookmarks = mResources.getXml(
+ com.android.frameworks.wmtests.R.xml.bookmarks);
+ doReturn(testBookmarks).when(mResources).getXml(com.android.internal.R.xml.bookmarks);
}
diff --git a/services/tests/wmtests/src/com/android/server/policy/TestPhoneWindowManager.java b/services/tests/wmtests/src/com/android/server/policy/TestPhoneWindowManager.java
index fdb57d1e29d1..2b7e7ab1b9ae 100644
--- a/services/tests/wmtests/src/com/android/server/policy/TestPhoneWindowManager.java
+++ b/services/tests/wmtests/src/com/android/server/policy/TestPhoneWindowManager.java
@@ -568,6 +568,12 @@ class TestPhoneWindowManager {
doReturn(isShowing).when(mKeyguardServiceDelegate).isShowing();
}
+ void overrideRoleManager() {
+ doReturn(mContext).when(mContext).createContextAsUser(any(), anyInt());
+ doReturn(mRoleManager).when(mContext).getSystemService(eq(RoleManager.class));
+ doReturn(mPackageManager).when(mContext).getPackageManager();
+ }
+
void setupAssistForLaunch() {
doNothing().when(mPhoneWindowManager).sendCloseSystemWindows();
doReturn(true).when(mPhoneWindowManager).isUserSetupComplete();
@@ -709,7 +715,7 @@ class TestPhoneWindowManager {
throw new AssertionError("failed to assert " + category, t);
}
// Reset verifier for next call.
- Mockito.reset(mContext);
+ Mockito.clearInvocations(mContext);
}
void assertLaunchRole(String role) {
@@ -719,10 +725,10 @@ class TestPhoneWindowManager {
verify(mContext).startActivityAsUser(intentCaptor.capture(), any());
switch (role) {
case RoleManager.ROLE_BROWSER:
- Assert.assertEquals(intentCaptor.getValue(), mBrowserIntent);
+ Assert.assertEquals(mBrowserIntent, intentCaptor.getValue());
break;
case RoleManager.ROLE_SMS:
- Assert.assertEquals(intentCaptor.getValue(), mSmsIntent);
+ Assert.assertEquals(mSmsIntent, intentCaptor.getValue());
break;
default:
throw new AssertionError("Role " + role + " not supported in tests.");
@@ -731,7 +737,7 @@ class TestPhoneWindowManager {
throw new AssertionError("failed to assert " + role, t);
}
// Reset verifier for next call.
- Mockito.reset(mContext);
+ Mockito.clearInvocations(mContext);
}
diff --git a/services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java b/services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java
index eb8825c0c08b..24fc7ee0c392 100644
--- a/services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java
@@ -684,7 +684,8 @@ public class ActivityRecordTests extends WindowTestsBase {
// Asserts fixed orientation request is not ignored, and the orientation is changed.
assertNotEquals(activityCurOrientation, activity.getConfiguration().orientation);
- assertTrue(activity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertTrue(activity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
}
@Test
@@ -717,7 +718,8 @@ public class ActivityRecordTests extends WindowTestsBase {
// Relaunching the app should still respect the orientation request.
assertEquals(ORIENTATION_PORTRAIT, activity.getConfiguration().orientation);
- assertTrue(activity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertTrue(activity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
}
@Test
@@ -2953,7 +2955,8 @@ public class ActivityRecordTests extends WindowTestsBase {
@Test
public void testStartingWindowInTaskFragment() {
- final ActivityRecord activity1 = new ActivityBuilder(mAtm).setCreateTask(true).build();
+ final ActivityRecord activity1 = new ActivityBuilder(mAtm).setCreateTask(true)
+ .setVisible(false).build();
final WindowState startingWindow = createWindowState(
new WindowManager.LayoutParams(TYPE_APPLICATION_STARTING), activity1);
activity1.addWindow(startingWindow);
@@ -3009,6 +3012,28 @@ public class ActivityRecordTests extends WindowTestsBase {
}
@Test
+ public void testStartingWindowInTaskFragmentWithVisibleTask() {
+ final ActivityRecord activity1 = new ActivityBuilder(mAtm).setCreateTask(true).build();
+ final Task task = activity1.getTask();
+ final Rect taskBounds = task.getBounds();
+ final Rect tfBounds = new Rect(taskBounds.left, taskBounds.top,
+ taskBounds.left + taskBounds.width() / 2, taskBounds.bottom);
+ final TaskFragment taskFragment = new TaskFragmentBuilder(mAtm).setParentTask(task)
+ .setBounds(tfBounds).build();
+
+ final ActivityRecord activity2 = new ActivityBuilder(mAtm).build();
+ final WindowState startingWindow = createWindowState(
+ new WindowManager.LayoutParams(TYPE_APPLICATION_STARTING), activity1);
+ taskFragment.addChild(activity2);
+ activity2.addWindow(startingWindow);
+ activity2.mStartingData = mock(StartingData.class);
+ activity2.attachStartingWindow(startingWindow);
+
+ assertNull(activity2.mStartingData.mAssociatedTask);
+ assertNull(task.mSharedStartingData);
+ }
+
+ @Test
public void testTransitionAnimationBounds() {
removeGlobalMinSizeRestriction();
final Task task = new TaskBuilder(mSupervisor)
diff --git a/services/tests/wmtests/src/com/android/server/wm/ActivityRefresherTests.java b/services/tests/wmtests/src/com/android/server/wm/ActivityRefresherTests.java
index a3252f87dc9d..6ad1044d2012 100644
--- a/services/tests/wmtests/src/com/android/server/wm/ActivityRefresherTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/ActivityRefresherTests.java
@@ -53,7 +53,7 @@ import org.junit.runner.RunWith;
@RunWith(WindowTestRunner.class)
public class ActivityRefresherTests extends WindowTestsBase {
private Handler mMockHandler;
- private LetterboxConfiguration mLetterboxConfiguration;
+ private AppCompatConfiguration mAppCompatConfiguration;
private ActivityRecord mActivity;
private ActivityRefresher mActivityRefresher;
@@ -69,13 +69,13 @@ public class ActivityRefresherTests extends WindowTestsBase {
@Before
public void setUp() throws Exception {
- mLetterboxConfiguration = mDisplayContent.mWmService.mLetterboxConfiguration;
- spyOn(mLetterboxConfiguration);
- when(mLetterboxConfiguration.isCameraCompatTreatmentEnabled())
+ mAppCompatConfiguration = mDisplayContent.mWmService.mAppCompatConfiguration;
+ spyOn(mAppCompatConfiguration);
+ when(mAppCompatConfiguration.isCameraCompatTreatmentEnabled())
.thenReturn(true);
- when(mLetterboxConfiguration.isCameraCompatRefreshEnabled())
+ when(mAppCompatConfiguration.isCameraCompatRefreshEnabled())
.thenReturn(true);
- when(mLetterboxConfiguration.isCameraCompatRefreshCycleThroughStopEnabled())
+ when(mAppCompatConfiguration.isCameraCompatRefreshCycleThroughStopEnabled())
.thenReturn(true);
mMockHandler = mock(Handler.class);
@@ -90,7 +90,7 @@ public class ActivityRefresherTests extends WindowTestsBase {
@Test
public void testShouldRefreshActivity_refreshDisabled() throws Exception {
- when(mLetterboxConfiguration.isCameraCompatRefreshEnabled())
+ when(mAppCompatConfiguration.isCameraCompatRefreshEnabled())
.thenReturn(false);
configureActivityAndDisplay();
mActivityRefresher.addEvaluator(mEvaluatorTrue);
@@ -146,7 +146,7 @@ public class ActivityRefresherTests extends WindowTestsBase {
public void testOnActivityConfigurationChanging_cycleThroughStopDisabled()
throws Exception {
mActivityRefresher.addEvaluator(mEvaluatorTrue);
- when(mLetterboxConfiguration.isCameraCompatRefreshCycleThroughStopEnabled())
+ when(mAppCompatConfiguration.isCameraCompatRefreshCycleThroughStopEnabled())
.thenReturn(false);
configureActivityAndDisplay();
diff --git a/services/tests/wmtests/src/com/android/server/wm/AppCompatActivityRobot.java b/services/tests/wmtests/src/com/android/server/wm/AppCompatActivityRobot.java
index f79cdc1da451..867f01fd4699 100644
--- a/services/tests/wmtests/src/com/android/server/wm/AppCompatActivityRobot.java
+++ b/services/tests/wmtests/src/com/android/server/wm/AppCompatActivityRobot.java
@@ -143,8 +143,8 @@ class AppCompatActivityRobot {
}
void setLetterboxedForFixedOrientationAndAspectRatio(boolean enabled) {
- doReturn(enabled).when(mActivityStack.top())
- .isLetterboxedForFixedOrientationAndAspectRatio();
+ doReturn(enabled).when(mActivityStack.top().mAppCompatController
+ .getAppCompatAspectRatioPolicy()).isLetterboxedForFixedOrientationAndAspectRatio();
}
void enableTreatmentForTopActivity(boolean enabled) {
@@ -163,8 +163,8 @@ class AppCompatActivityRobot {
}
void setShouldApplyUserMinAspectRatioOverride(boolean enabled) {
- doReturn(enabled).when(mActivityStack.top()
- .mLetterboxUiController).shouldApplyUserMinAspectRatioOverride();
+ doReturn(enabled).when(mActivityStack.top().mAppCompatController
+ .getAppCompatAspectRatioOverrides()).shouldApplyUserMinAspectRatioOverride();
}
void setShouldCreateCompatDisplayInsets(boolean enabled) {
@@ -172,13 +172,14 @@ class AppCompatActivityRobot {
}
void setShouldApplyUserFullscreenOverride(boolean enabled) {
- doReturn(enabled).when(mActivityStack.top()
- .mLetterboxUiController).shouldApplyUserFullscreenOverride();
+ doReturn(enabled).when(mActivityStack.top().mAppCompatController
+ .getAppCompatAspectRatioOverrides()).shouldApplyUserFullscreenOverride();
}
void setGetUserMinAspectRatioOverrideCode(@PackageManager.UserMinAspectRatio int orientation) {
doReturn(orientation).when(mActivityStack.top()
- .mLetterboxUiController).getUserMinAspectRatioOverrideCode();
+ .mAppCompatController.getAppCompatAspectRatioOverrides())
+ .getUserMinAspectRatioOverrideCode();
}
void setIgnoreOrientationRequest(boolean enabled) {
@@ -401,6 +402,8 @@ class AppCompatActivityRobot {
mActivityStack.push(activity);
spyOn(activity);
spyOn(activity.mAppCompatController.getTransparentPolicy());
+ spyOn(activity.mAppCompatController.getAppCompatAspectRatioOverrides());
+ spyOn(activity.mAppCompatController.getAppCompatAspectRatioPolicy());
spyOn(activity.mLetterboxUiController);
}
diff --git a/services/tests/wmtests/src/com/android/server/wm/AppCompatAspectRatioOverridesTest.java b/services/tests/wmtests/src/com/android/server/wm/AppCompatAspectRatioOverridesTest.java
new file mode 100644
index 000000000000..ddd6d562abb1
--- /dev/null
+++ b/services/tests/wmtests/src/com/android/server/wm/AppCompatAspectRatioOverridesTest.java
@@ -0,0 +1,316 @@
+/*
+ * 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.server.wm;
+
+import static android.content.pm.ActivityInfo.OVERRIDE_MIN_ASPECT_RATIO;
+import static android.content.pm.PackageManager.USER_MIN_ASPECT_RATIO_3_2;
+import static android.content.pm.PackageManager.USER_MIN_ASPECT_RATIO_FULLSCREEN;
+import static android.view.WindowManager.PROPERTY_COMPAT_ALLOW_MIN_ASPECT_RATIO_OVERRIDE;
+import static android.view.WindowManager.PROPERTY_COMPAT_ALLOW_USER_ASPECT_RATIO_FULLSCREEN_OVERRIDE;
+import static android.view.WindowManager.PROPERTY_COMPAT_ALLOW_USER_ASPECT_RATIO_OVERRIDE;
+
+import static com.android.dx.mockito.inline.extended.ExtendedMockito.spyOn;
+
+import static org.junit.Assert.assertEquals;
+
+import android.compat.testing.PlatformCompatChangeRule;
+import android.platform.test.annotations.Presubmit;
+
+import androidx.annotation.NonNull;
+
+import libcore.junit.util.compat.CoreCompatChangeRule.DisableCompatChanges;
+import libcore.junit.util.compat.CoreCompatChangeRule.EnableCompatChanges;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.TestRule;
+import org.junit.runner.RunWith;
+
+import java.util.function.Consumer;
+
+/**
+ * Test class for {@link AppCompatAspectRatioOverrides}.
+ * <p>
+ * Build/Install/Run:
+ * atest WmTests:AppCompatAspectRatioOverridesTest
+ */
+@Presubmit
+@RunWith(WindowTestRunner.class)
+public class AppCompatAspectRatioOverridesTest extends WindowTestsBase {
+
+ @Rule
+ public TestRule compatChangeRule = new PlatformCompatChangeRule();
+
+ @Test
+ public void testShouldApplyUserFullscreenOverride_trueProperty_returnsFalse() {
+ runTestScenario((robot)-> {
+ robot.prop().enable(PROPERTY_COMPAT_ALLOW_USER_ASPECT_RATIO_FULLSCREEN_OVERRIDE);
+ robot.conf().enableUserAppAspectRatioFullscreen(/* enabled */ false);
+
+ robot.activity().createActivityWithComponent();
+
+ robot.checkShouldApplyUserFullscreenOverride(/* expected */ false);
+ });
+ }
+
+ @Test
+ public void testShouldApplyUserFullscreenOverride_falseFullscreenProperty_returnsFalse() {
+ runTestScenario((robot)-> {
+ robot.conf().enableUserAppAspectRatioFullscreen(/* enabled */ true);
+ robot.activity().setIgnoreOrientationRequest(/* enabled */ true);
+ robot.prop().disable(PROPERTY_COMPAT_ALLOW_USER_ASPECT_RATIO_FULLSCREEN_OVERRIDE);
+ robot.activity().createActivityWithComponent();
+ robot.activity().setGetUserMinAspectRatioOverrideCode(USER_MIN_ASPECT_RATIO_FULLSCREEN);
+
+ robot.checkShouldApplyUserFullscreenOverride(/* expected */ false);
+ });
+ }
+
+ @Test
+ public void testShouldApplyUserFullscreenOverride_falseSettingsProperty_returnsFalse() {
+ runTestScenario((robot)-> {
+ robot.conf().enableUserAppAspectRatioSettings(/* enabled */ true);
+ robot.activity().setIgnoreOrientationRequest(/* enabled */ true);
+ robot.prop().disable(PROPERTY_COMPAT_ALLOW_USER_ASPECT_RATIO_OVERRIDE);
+ robot.activity().createActivityWithComponent();
+ robot.activity().setGetUserMinAspectRatioOverrideCode(USER_MIN_ASPECT_RATIO_FULLSCREEN);
+ robot.checkShouldApplyUserFullscreenOverride(/* expected */ false);
+ });
+ }
+
+
+ @Test
+ public void testShouldApplyUserFullscreenOverride_returnsTrue() {
+ runTestScenario((robot)-> {
+ robot.conf().enableUserAppAspectRatioFullscreen(/* enabled */ true);
+ robot.activity().setIgnoreOrientationRequest(/* enabled */ true);
+ robot.activity().createActivityWithComponent();
+ robot.activity().setGetUserMinAspectRatioOverrideCode(USER_MIN_ASPECT_RATIO_FULLSCREEN);
+
+ robot.checkShouldApplyUserFullscreenOverride(/* expected */ true);
+ });
+ }
+
+ @Test
+ public void testShouldEnableUserAspectRatioSettings_falseProperty_returnsFalse() {
+ runTestScenario((robot)-> {
+ robot.conf().enableUserAppAspectRatioSettings(/* enabled */ true);
+ robot.activity().setIgnoreOrientationRequest(/* enabled */ true);
+ robot.prop().disable(PROPERTY_COMPAT_ALLOW_USER_ASPECT_RATIO_OVERRIDE);
+ robot.activity().createActivityWithComponent();
+ robot.activity().setGetUserMinAspectRatioOverrideCode(USER_MIN_ASPECT_RATIO_3_2);
+
+ robot.checkShouldEnableUserAspectRatioSettings(/* expected */ false);
+ });
+ }
+
+ @Test
+ public void testShouldEnableUserAspectRatioSettings_trueProperty_returnsTrue() {
+ runTestScenario((robot)-> {
+ robot.conf().enableUserAppAspectRatioSettings(/* enabled */ true);
+ robot.activity().setIgnoreOrientationRequest(/* enabled */ true);
+ robot.prop().enable(PROPERTY_COMPAT_ALLOW_USER_ASPECT_RATIO_OVERRIDE);
+ robot.activity().createActivityWithComponent();
+ robot.activity().setGetUserMinAspectRatioOverrideCode(USER_MIN_ASPECT_RATIO_3_2);
+
+ robot.checkShouldEnableUserAspectRatioSettings(/* expected */ true);
+ });
+ }
+
+ @Test
+ public void testShouldEnableUserAspectRatioSettings_ignoreOrientation_returnsFalse() {
+ runTestScenario((robot)-> {
+ robot.conf().enableUserAppAspectRatioSettings(/* enabled */ false);
+ robot.activity().setIgnoreOrientationRequest(/* enabled */ true);
+ robot.prop().enable(PROPERTY_COMPAT_ALLOW_USER_ASPECT_RATIO_OVERRIDE);
+ robot.activity().createActivityWithComponent();
+ robot.activity().setGetUserMinAspectRatioOverrideCode(USER_MIN_ASPECT_RATIO_3_2);
+
+ robot.checkShouldEnableUserAspectRatioSettings(/* expected */ false);
+ });
+ }
+
+ @Test
+ public void testShouldApplyUserMinAspectRatioOverride_falseProperty_returnsFalse() {
+ runTestScenario((robot)-> {
+ robot.conf().enableUserAppAspectRatioSettings(/* enabled */ true);
+ robot.activity().setIgnoreOrientationRequest(/* enabled */ true);
+ robot.prop().disable(PROPERTY_COMPAT_ALLOW_USER_ASPECT_RATIO_OVERRIDE);
+ robot.activity().createActivityWithComponent();
+ robot.activity().setGetUserMinAspectRatioOverrideCode(USER_MIN_ASPECT_RATIO_3_2);
+
+ robot.checkShouldEnableUserAspectRatioSettings(/* expected */ false);
+ });
+ }
+
+ @Test
+ public void testShouldApplyUserMinAspectRatioOverride_trueProperty_returnsFalse() {
+ runTestScenario((robot)-> {
+ robot.conf().enableUserAppAspectRatioSettings(/* enabled */ false);
+ robot.prop().enable(PROPERTY_COMPAT_ALLOW_USER_ASPECT_RATIO_OVERRIDE);
+ robot.activity().createActivityWithComponent();
+
+ robot.checkShouldEnableUserAspectRatioSettings(/* enabled */ false);
+ });
+ }
+
+ @Test
+ public void testShouldApplyUserMinAspectRatioOverride_disabledIgnoreOrientationRequest() {
+ runTestScenario((robot)-> {
+ robot.conf().enableUserAppAspectRatioSettings(/* enabled */ true);
+ robot.activity().setIgnoreOrientationRequest(/* enabled */ false);
+ robot.activity().createActivityWithComponent();
+ robot.activity().setGetUserMinAspectRatioOverrideCode(USER_MIN_ASPECT_RATIO_3_2);
+
+ robot.checkShouldApplyUserMinAspectRatioOverride(/* expected */ false);
+ });
+ }
+
+ @Test
+ public void testShouldApplyUserMinAspectRatioOverride_returnsTrue() {
+ runTestScenario((robot)-> {
+ robot.conf().enableUserAppAspectRatioSettings(/* enabled */ true);
+ robot.activity().setIgnoreOrientationRequest(/* enabled */ true);
+ robot.activity().createActivityWithComponent();
+ robot.activity().setGetUserMinAspectRatioOverrideCode(USER_MIN_ASPECT_RATIO_3_2);
+
+ robot.checkShouldApplyUserMinAspectRatioOverride(/* expected */ true);
+ });
+ }
+
+ @Test
+ public void testShouldApplyUserMinAspectRatioOverride_ignoreOrientation_returnsFalse() {
+ runTestScenario((robot)-> {
+ robot.conf().enableUserAppAspectRatioSettings(/* enabled */ false);
+ robot.activity().setIgnoreOrientationRequest(/* enabled */ true);
+ robot.activity().createActivityWithComponent();
+ robot.activity().setGetUserMinAspectRatioOverrideCode(USER_MIN_ASPECT_RATIO_3_2);
+
+ robot.checkShouldApplyUserMinAspectRatioOverride(/* expected */ false);
+ });
+ }
+
+ @Test
+ @EnableCompatChanges({OVERRIDE_MIN_ASPECT_RATIO})
+ public void testShouldOverrideMinAspectRatio_overrideEnabled_returnsTrue() {
+ runTestScenario((robot)-> {
+ robot.activity().createActivityWithComponent();
+
+ robot.checkShouldOverrideMinAspectRatio(/* expected */ true);
+ });
+ }
+
+ @Test
+ @EnableCompatChanges({OVERRIDE_MIN_ASPECT_RATIO})
+ public void testShouldOverrideMinAspectRatio_propertyTrue_overrideEnabled_returnsTrue() {
+ runTestScenario((robot)-> {
+ robot.prop().enable(PROPERTY_COMPAT_ALLOW_MIN_ASPECT_RATIO_OVERRIDE);
+ robot.activity().createActivityWithComponent();
+
+ robot.checkShouldOverrideMinAspectRatio(/* expected */ true);
+ });
+ }
+
+ @Test
+ @DisableCompatChanges({OVERRIDE_MIN_ASPECT_RATIO})
+ public void testShouldOverrideMinAspectRatio_propertyTrue_overrideDisabled_returnsFalse() {
+ runTestScenario((robot)-> {
+ robot.prop().enable(PROPERTY_COMPAT_ALLOW_MIN_ASPECT_RATIO_OVERRIDE);
+ robot.activity().createActivityWithComponent();
+
+ robot.checkShouldOverrideMinAspectRatio(/* expected */ false);
+ });
+ }
+
+ @Test
+ @DisableCompatChanges({OVERRIDE_MIN_ASPECT_RATIO})
+ public void testShouldOverrideMinAspectRatio_overrideDisabled_returnsFalse() {
+ runTestScenario((robot)-> {
+ robot.activity().createActivityWithComponent();
+
+ robot.checkShouldOverrideMinAspectRatio(/* expected */ false);
+ });
+ }
+
+
+ @Test
+ @EnableCompatChanges({OVERRIDE_MIN_ASPECT_RATIO})
+ public void testshouldOverrideMinAspectRatio_propertyFalse_overrideEnabled_returnsFalse() {
+ runTestScenario((robot)-> {
+ robot.prop().disable(PROPERTY_COMPAT_ALLOW_MIN_ASPECT_RATIO_OVERRIDE);
+ robot.activity().createActivityWithComponent();
+
+ robot.checkShouldOverrideMinAspectRatio(/* expected */ false);
+ });
+ }
+
+ @Test
+ @DisableCompatChanges({OVERRIDE_MIN_ASPECT_RATIO})
+ public void testshouldOverrideMinAspectRatio_propertyFalse_noOverride_returnsFalse() {
+ runTestScenario((robot)-> {
+ robot.prop().disable(PROPERTY_COMPAT_ALLOW_MIN_ASPECT_RATIO_OVERRIDE);
+ robot.activity().createActivityWithComponent();
+
+ robot.checkShouldOverrideMinAspectRatio(/* expected */ false);
+ });
+ }
+
+ /**
+ * Runs a test scenario providing a Robot.
+ */
+ void runTestScenario(@NonNull Consumer<AspectRatioOverridesRobotTest> consumer) {
+ spyOn(mWm.mAppCompatConfiguration);
+ final AspectRatioOverridesRobotTest robot =
+ new AspectRatioOverridesRobotTest(mWm, mAtm, mSupervisor);
+ consumer.accept(robot);
+ }
+
+ private static class AspectRatioOverridesRobotTest extends AppCompatRobotBase {
+
+ AspectRatioOverridesRobotTest(@NonNull WindowManagerService wm,
+ @NonNull ActivityTaskManagerService atm,
+ @NonNull ActivityTaskSupervisor supervisor) {
+ super(wm, atm, supervisor);
+ }
+
+ void checkShouldApplyUserFullscreenOverride(boolean expected) {
+ assertEquals(expected, getTopActivityAppCompatAspectRatioOverrides()
+ .shouldApplyUserFullscreenOverride());
+ }
+
+ void checkShouldEnableUserAspectRatioSettings(boolean expected) {
+ assertEquals(expected, getTopActivityAppCompatAspectRatioOverrides()
+ .shouldEnableUserAspectRatioSettings());
+ }
+
+ void checkShouldApplyUserMinAspectRatioOverride(boolean expected) {
+ assertEquals(expected, getTopActivityAppCompatAspectRatioOverrides()
+ .shouldApplyUserMinAspectRatioOverride());
+ }
+
+ void checkShouldOverrideMinAspectRatio(boolean expected) {
+ assertEquals(expected, getTopActivityAppCompatAspectRatioOverrides()
+ .shouldOverrideMinAspectRatio());
+ }
+
+ @NonNull
+ private AppCompatAspectRatioOverrides getTopActivityAppCompatAspectRatioOverrides() {
+ return activity().top().mAppCompatController.getAppCompatAspectRatioOverrides();
+ }
+ }
+
+}
diff --git a/services/tests/wmtests/src/com/android/server/wm/AppCompatCameraOverridesTest.java b/services/tests/wmtests/src/com/android/server/wm/AppCompatCameraOverridesTest.java
index 2d94b34c52f1..de99f546ab07 100644
--- a/services/tests/wmtests/src/com/android/server/wm/AppCompatCameraOverridesTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/AppCompatCameraOverridesTest.java
@@ -25,6 +25,7 @@ import static android.content.pm.ActivityInfo.OVERRIDE_ORIENTATION_ONLY_FOR_CAME
import static android.view.WindowManager.PROPERTY_CAMERA_COMPAT_ALLOW_FORCE_ROTATION;
import static android.view.WindowManager.PROPERTY_CAMERA_COMPAT_ALLOW_REFRESH;
import static android.view.WindowManager.PROPERTY_CAMERA_COMPAT_ENABLE_REFRESH_VIA_PAUSE;
+import static android.view.WindowManager.PROPERTY_COMPAT_ALLOW_MIN_ASPECT_RATIO_OVERRIDE;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.spyOn;
import static com.android.window.flags.Flags.FLAG_CAMERA_COMPAT_FOR_FREEFORM;
@@ -36,6 +37,7 @@ import android.platform.test.annotations.Presubmit;
import androidx.annotation.NonNull;
+import libcore.junit.util.compat.CoreCompatChangeRule.DisableCompatChanges;
import libcore.junit.util.compat.CoreCompatChangeRule.EnableCompatChanges;
import org.junit.Rule;
@@ -286,11 +288,93 @@ public class AppCompatCameraOverridesTest extends WindowTestsBase {
});
}
+
+ @Test
+ @EnableCompatChanges({OVERRIDE_MIN_ASPECT_RATIO_ONLY_FOR_CAMERA})
+ public void shouldOverrideMinAspectRatioForCamera_overrideEnabled_returnsTrue() {
+ runTestScenario((robot) -> {
+ robot.activity().createActivityWithComponent();
+ robot.activity().activateCameraInPolicy(/* isCameraActive */ true);
+
+ robot.checkShouldOverrideMinAspectRatioForCamera(/* expected */ true);
+ });
+ }
+
+ @Test
+ @EnableCompatChanges({OVERRIDE_MIN_ASPECT_RATIO_ONLY_FOR_CAMERA})
+ public void shouldOverrideMinAspectRatioForCamera_propertyTrue_overrideEnabled_returnsTrue() {
+ runTestScenario((robot) -> {
+ robot.prop().enable(PROPERTY_COMPAT_ALLOW_MIN_ASPECT_RATIO_OVERRIDE);
+ robot.activity().createActivityWithComponent();
+ robot.activity().activateCameraInPolicy(/* isCameraActive */ true);
+
+ robot.checkShouldOverrideMinAspectRatioForCamera(/* expected */ true);
+ });
+ }
+
+ @Test
+ @EnableCompatChanges({OVERRIDE_MIN_ASPECT_RATIO_ONLY_FOR_CAMERA})
+ public void shouldOverrideMinAspectRatioForCamera_propertyTrue_overrideEnabled_returnsFalse() {
+ runTestScenario((robot) -> {
+ robot.prop().enable(PROPERTY_COMPAT_ALLOW_MIN_ASPECT_RATIO_OVERRIDE);
+ robot.activity().createActivityWithComponent();
+ robot.activity().activateCameraInPolicy(/* isCameraActive */ false);
+
+ robot.checkShouldOverrideMinAspectRatioForCamera(/* expected */ false);
+ });
+ }
+
+ @Test
+ @DisableCompatChanges({OVERRIDE_MIN_ASPECT_RATIO_ONLY_FOR_CAMERA})
+ public void shouldOverrideMinAspectRatioForCamera_propertyTrue_overrideDisabled_returnsFalse() {
+ runTestScenario((robot) -> {
+ robot.prop().enable(PROPERTY_COMPAT_ALLOW_MIN_ASPECT_RATIO_OVERRIDE);
+ robot.activity().createActivityWithComponent();
+ robot.activity().activateCameraInPolicy(/* isCameraActive */ true);
+
+ robot.checkShouldOverrideMinAspectRatioForCamera(/* expected */ false);
+ });
+ }
+
+ @Test
+ @DisableCompatChanges({OVERRIDE_MIN_ASPECT_RATIO_ONLY_FOR_CAMERA})
+ public void shouldOverrideMinAspectRatioForCamera_overrideDisabled_returnsFalse() {
+ runTestScenario((robot) -> {
+ robot.activity().createActivityWithComponent();
+ robot.activity().activateCameraInPolicy(/* isCameraActive */ true);
+
+ robot.checkShouldOverrideMinAspectRatioForCamera(/* expected */ false);
+ });
+ }
+
+ @Test
+ @EnableCompatChanges({OVERRIDE_MIN_ASPECT_RATIO_ONLY_FOR_CAMERA})
+ public void shouldOverrideMinAspectRatioForCamera_propertyFalse_overrideEnabled_returnsFalse() {
+ runTestScenario((robot) -> {
+ robot.prop().disable(PROPERTY_COMPAT_ALLOW_MIN_ASPECT_RATIO_OVERRIDE);
+ robot.activity().createActivityWithComponent();
+
+ robot.checkShouldOverrideMinAspectRatioForCamera(/* expected */ false);
+ });
+ }
+
+ @Test
+ @DisableCompatChanges({OVERRIDE_MIN_ASPECT_RATIO_ONLY_FOR_CAMERA})
+ public void shouldOverrideMinAspectRatioForCamera_propertyFalse_noOverride_returnsFalse() {
+ runTestScenario((robot) -> {
+ robot.prop().disable(PROPERTY_COMPAT_ALLOW_MIN_ASPECT_RATIO_OVERRIDE);
+ robot.activity().createActivityWithComponent();
+ robot.activity().activateCameraInPolicy(/* isCameraActive */ true);
+
+ robot.checkShouldOverrideMinAspectRatioForCamera(/* expected */ false);
+ });
+ }
+
/**
* Runs a test scenario providing a Robot.
*/
void runTestScenario(@NonNull Consumer<CameraOverridesRobotTest> consumer) {
- spyOn(mWm.mLetterboxConfiguration);
+ spyOn(mWm.mAppCompatConfiguration);
final CameraOverridesRobotTest robot = new CameraOverridesRobotTest(mWm, mAtm, mSupervisor);
consumer.accept(robot);
}
@@ -323,6 +407,11 @@ public class AppCompatCameraOverridesTest extends WindowTestsBase {
.shouldApplyFreeformTreatmentForCameraCompat(), expected);
}
+ void checkShouldOverrideMinAspectRatioForCamera(boolean expected) {
+ Assert.assertEquals(getAppCompatCameraOverrides()
+ .shouldOverrideMinAspectRatioForCamera(), expected);
+ }
+
void checkIsCameraActive(boolean active) {
Assert.assertEquals(getAppCompatCameraOverrides().isCameraActive(), active);
}
diff --git a/services/tests/wmtests/src/com/android/server/wm/AppCompatCameraPolicyTest.java b/services/tests/wmtests/src/com/android/server/wm/AppCompatCameraPolicyTest.java
index 006b37002e23..0b1bb0f75a09 100644
--- a/services/tests/wmtests/src/com/android/server/wm/AppCompatCameraPolicyTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/AppCompatCameraPolicyTest.java
@@ -112,7 +112,7 @@ public class AppCompatCameraPolicyTest extends WindowTestsBase {
* Runs a test scenario providing a Robot.
*/
void runTestScenario(@NonNull Consumer<DisplayRotationPolicyRobotTest> consumer) {
- spyOn(mWm.mLetterboxConfiguration);
+ spyOn(mWm.mAppCompatConfiguration);
final DisplayRotationPolicyRobotTest robot =
new DisplayRotationPolicyRobotTest(mWm, mAtm, mSupervisor);
consumer.accept(robot);
@@ -168,7 +168,7 @@ public class AppCompatCameraPolicyTest extends WindowTestsBase {
// TODO(b/350460645): Create Desktop Windowing Robot to reuse common functionalities.
void allowEnterDesktopMode(boolean isAllowed) {
doReturn(isAllowed).when(() ->
- DesktopModeLaunchParamsModifier.canEnterDesktopMode(any()));
+ DesktopModeHelper.canEnterDesktopMode(any()));
}
private AppCompatCameraPolicy getTopAppCompatCameraPolicy() {
diff --git a/services/tests/wmtests/src/com/android/server/wm/AppCompatComponentPropRobot.java b/services/tests/wmtests/src/com/android/server/wm/AppCompatComponentPropRobot.java
index d568eecfd1c5..361177f480a6 100644
--- a/services/tests/wmtests/src/com/android/server/wm/AppCompatComponentPropRobot.java
+++ b/services/tests/wmtests/src/com/android/server/wm/AppCompatComponentPropRobot.java
@@ -32,27 +32,27 @@ import androidx.annotation.NonNull;
*/
class AppCompatComponentPropRobot {
@NonNull
- private final WindowManagerService mWm;
+ private final PackageManager mPackageManager;
AppCompatComponentPropRobot(@NonNull WindowManagerService wm) {
- mWm = wm;
+ mPackageManager = wm.mContext.getPackageManager();
+ spyOn(mPackageManager);
}
void enable(@NonNull String propertyName) {
- setPropertyValue(propertyName, /* enabled */ true);
+ setPropertyValue(propertyName, "", "", /* enabled */ true);
}
void disable(@NonNull String propertyName) {
- setPropertyValue(propertyName, /* enabled */ false);
+ setPropertyValue(propertyName, "", "", /* enabled */ false);
}
- private void setPropertyValue(@NonNull String propertyName, boolean enabled) {
+ private void setPropertyValue(@NonNull String propertyName, @NonNull String packageName,
+ @NonNull String className, boolean enabled) {
final PackageManager.Property property = new PackageManager.Property(propertyName,
- /* value */ enabled, /* packageName */ "", /* className */ "");
- final PackageManager pm = mWm.mContext.getPackageManager();
- spyOn(pm);
+ /* value */ enabled, packageName, className);
try {
- doReturn(property).when(pm).getProperty(eq(propertyName), anyString());
+ doReturn(property).when(mPackageManager).getProperty(eq(propertyName), anyString());
} catch (PackageManager.NameNotFoundException e) {
fail(e.getLocalizedMessage());
}
diff --git a/services/tests/wmtests/src/com/android/server/wm/LetterboxConfigurationPersisterTest.java b/services/tests/wmtests/src/com/android/server/wm/AppCompatConfigurationPersisterTest.java
index 3fcec963593c..c952e2f682c3 100644
--- a/services/tests/wmtests/src/com/android/server/wm/LetterboxConfigurationPersisterTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/AppCompatConfigurationPersisterTest.java
@@ -18,8 +18,8 @@ package com.android.server.wm;
import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
-import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_LEFT;
-import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_VERTICAL_REACHABILITY_POSITION_TOP;
+import static com.android.server.wm.AppCompatConfiguration.LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_LEFT;
+import static com.android.server.wm.AppCompatConfiguration.LETTERBOX_VERTICAL_REACHABILITY_POSITION_TOP;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -44,14 +44,14 @@ import java.util.function.Consumer;
import java.util.function.Supplier;
/**
- * Tests for the {@link LetterboxConfigurationPersister} class.
+ * Tests for the {@link AppCompatConfigurationPersister} class.
*
* Build/Install/Run:
- * atest WmTests:LetterboxConfigurationPersisterTest
+ * atest WmTests:AppCompatConfigurationPersisterTest
*/
@SmallTest
@Presubmit
-public class LetterboxConfigurationPersisterTest {
+public class AppCompatConfigurationPersisterTest {
private static final long TIMEOUT = 2000L; // 2 secs
@@ -61,7 +61,7 @@ public class LetterboxConfigurationPersisterTest {
private static final String LETTERBOX_CONFIGURATION_TEST_FILENAME = "letterbox_config_test";
- private LetterboxConfigurationPersister mLetterboxConfigurationPersister;
+ private AppCompatConfigurationPersister mAppCompatConfigurationPersister;
private Context mContext;
private PersisterQueue mPersisterQueue;
private QueueState mQueueState;
@@ -74,7 +74,7 @@ public class LetterboxConfigurationPersisterTest {
mConfigFolder = mContext.getFilesDir();
mPersisterQueue = new PersisterQueue();
mQueueState = new QueueState();
- mLetterboxConfigurationPersister = new LetterboxConfigurationPersister(
+ mAppCompatConfigurationPersister = new AppCompatConfigurationPersister(
() -> mContext.getResources().getInteger(
R.integer.config_letterboxDefaultPositionForHorizontalReachability),
() -> mContext.getResources().getInteger(
@@ -88,12 +88,12 @@ public class LetterboxConfigurationPersisterTest {
LETTERBOX_CONFIGURATION_TEST_FILENAME);
mQueueListener = queueEmpty -> mQueueState.onItemAdded();
mPersisterQueue.addListener(mQueueListener);
- mLetterboxConfigurationPersister.start();
+ mAppCompatConfigurationPersister.start();
}
@After
public void tearDown() throws InterruptedException {
- deleteConfiguration(mLetterboxConfigurationPersister, mPersisterQueue);
+ deleteConfiguration(mAppCompatConfigurationPersister, mPersisterQueue);
waitForCompletion(mPersisterQueue);
mPersisterQueue.removeListener(mQueueListener);
stopPersisterSafe(mPersisterQueue);
@@ -102,7 +102,7 @@ public class LetterboxConfigurationPersisterTest {
@Test
public void test_whenStoreIsCreated_valuesAreDefaults() {
final int positionForHorizontalReachability =
- mLetterboxConfigurationPersister.getLetterboxPositionForHorizontalReachability(
+ mAppCompatConfigurationPersister.getLetterboxPositionForHorizontalReachability(
false);
final int defaultPositionForHorizontalReachability =
mContext.getResources().getInteger(
@@ -110,7 +110,7 @@ public class LetterboxConfigurationPersisterTest {
Assert.assertEquals(defaultPositionForHorizontalReachability,
positionForHorizontalReachability);
final int positionForVerticalReachability =
- mLetterboxConfigurationPersister.getLetterboxPositionForVerticalReachability(false);
+ mAppCompatConfigurationPersister.getLetterboxPositionForVerticalReachability(false);
final int defaultPositionForVerticalReachability =
mContext.getResources().getInteger(
R.integer.config_letterboxDefaultPositionForVerticalReachability);
@@ -120,16 +120,16 @@ public class LetterboxConfigurationPersisterTest {
@Test
public void test_whenUpdatedWithNewValues_valuesAreWritten() {
- mLetterboxConfigurationPersister.setLetterboxPositionForHorizontalReachability(false,
+ mAppCompatConfigurationPersister.setLetterboxPositionForHorizontalReachability(false,
LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_LEFT);
- mLetterboxConfigurationPersister.setLetterboxPositionForVerticalReachability(false,
+ mAppCompatConfigurationPersister.setLetterboxPositionForVerticalReachability(false,
LETTERBOX_VERTICAL_REACHABILITY_POSITION_TOP);
waitForCompletion(mPersisterQueue);
final int newPositionForHorizontalReachability =
- mLetterboxConfigurationPersister.getLetterboxPositionForHorizontalReachability(
+ mAppCompatConfigurationPersister.getLetterboxPositionForHorizontalReachability(
false);
final int newPositionForVerticalReachability =
- mLetterboxConfigurationPersister.getLetterboxPositionForVerticalReachability(false);
+ mAppCompatConfigurationPersister.getLetterboxPositionForVerticalReachability(false);
Assert.assertEquals(LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_LEFT,
newPositionForHorizontalReachability);
Assert.assertEquals(LETTERBOX_VERTICAL_REACHABILITY_POSITION_TOP,
@@ -139,7 +139,7 @@ public class LetterboxConfigurationPersisterTest {
@Test
public void test_whenUpdatedWithNewValues_valuesAreReadAfterRestart() {
final PersisterQueue firstPersisterQueue = new PersisterQueue();
- final LetterboxConfigurationPersister firstPersister = new LetterboxConfigurationPersister(
+ final AppCompatConfigurationPersister firstPersister = new AppCompatConfigurationPersister(
DEFAULT_REACHABILITY_SUPPLIER_TEST, DEFAULT_REACHABILITY_SUPPLIER_TEST,
DEFAULT_REACHABILITY_SUPPLIER_TEST, DEFAULT_REACHABILITY_SUPPLIER_TEST,
mContext.getFilesDir(), firstPersisterQueue, mQueueState,
@@ -152,7 +152,7 @@ public class LetterboxConfigurationPersisterTest {
waitForCompletion(firstPersisterQueue);
stopPersisterSafe(firstPersisterQueue);
final PersisterQueue secondPersisterQueue = new PersisterQueue();
- final LetterboxConfigurationPersister secondPersister = new LetterboxConfigurationPersister(
+ final AppCompatConfigurationPersister secondPersister = new AppCompatConfigurationPersister(
DEFAULT_REACHABILITY_SUPPLIER_TEST, DEFAULT_REACHABILITY_SUPPLIER_TEST,
DEFAULT_REACHABILITY_SUPPLIER_TEST, DEFAULT_REACHABILITY_SUPPLIER_TEST,
mContext.getFilesDir(), secondPersisterQueue, mQueueState,
@@ -174,7 +174,7 @@ public class LetterboxConfigurationPersisterTest {
@Test
public void test_whenUpdatedWithNewValuesAndDeleted_valuesAreDefaults() {
final PersisterQueue firstPersisterQueue = new PersisterQueue();
- final LetterboxConfigurationPersister firstPersister = new LetterboxConfigurationPersister(
+ final AppCompatConfigurationPersister firstPersister = new AppCompatConfigurationPersister(
DEFAULT_REACHABILITY_SUPPLIER_TEST, DEFAULT_REACHABILITY_SUPPLIER_TEST,
DEFAULT_REACHABILITY_SUPPLIER_TEST, DEFAULT_REACHABILITY_SUPPLIER_TEST,
mContext.getFilesDir(), firstPersisterQueue, mQueueState,
@@ -198,7 +198,7 @@ public class LetterboxConfigurationPersisterTest {
stopPersisterSafe(firstPersisterQueue);
final PersisterQueue secondPersisterQueue = new PersisterQueue();
- final LetterboxConfigurationPersister secondPersister = new LetterboxConfigurationPersister(
+ final AppCompatConfigurationPersister secondPersister = new AppCompatConfigurationPersister(
DEFAULT_REACHABILITY_SUPPLIER_TEST, DEFAULT_REACHABILITY_SUPPLIER_TEST,
DEFAULT_REACHABILITY_SUPPLIER_TEST, DEFAULT_REACHABILITY_SUPPLIER_TEST,
mContext.getFilesDir(), secondPersisterQueue, mQueueState,
@@ -245,7 +245,7 @@ public class LetterboxConfigurationPersisterTest {
return mQueueState.isEmpty();
}
- private void deleteConfiguration(LetterboxConfigurationPersister persister,
+ private void deleteConfiguration(AppCompatConfigurationPersister persister,
PersisterQueue persisterQueue) {
final AtomicFile fileToDelete = new AtomicFile(
new File(mConfigFolder, LETTERBOX_CONFIGURATION_TEST_FILENAME));
diff --git a/services/tests/wmtests/src/com/android/server/wm/AppCompatLetterboxConfigurationRobot.java b/services/tests/wmtests/src/com/android/server/wm/AppCompatConfigurationRobot.java
index e1da913872d8..0a1b16bfc3e9 100644
--- a/services/tests/wmtests/src/com/android/server/wm/AppCompatLetterboxConfigurationRobot.java
+++ b/services/tests/wmtests/src/com/android/server/wm/AppCompatConfigurationRobot.java
@@ -24,48 +24,46 @@ import static org.mockito.Mockito.when;
import androidx.annotation.NonNull;
/**
- * Robot implementation for {@link LetterboxConfiguration}.
+ * Robot implementation for {@link AppCompatConfiguration}.
*/
-class AppCompatLetterboxConfigurationRobot {
+class AppCompatConfigurationRobot {
@NonNull
- private final LetterboxConfiguration mLetterboxConfiguration;
+ private final AppCompatConfiguration mAppCompatConfiguration;
- AppCompatLetterboxConfigurationRobot(@NonNull LetterboxConfiguration letterboxConfiguration) {
- mLetterboxConfiguration = letterboxConfiguration;
- spyOn(mLetterboxConfiguration);
+ AppCompatConfigurationRobot(@NonNull AppCompatConfiguration appCompatConfiguration) {
+ mAppCompatConfiguration = appCompatConfiguration;
+ spyOn(mAppCompatConfiguration);
}
void enableTranslucentPolicy(boolean enabled) {
- when(mLetterboxConfiguration.isTranslucentLetterboxingEnabled()).thenReturn(enabled);
+ when(mAppCompatConfiguration.isTranslucentLetterboxingEnabled()).thenReturn(enabled);
}
void enablePolicyForIgnoringRequestedOrientation(boolean enabled) {
- doReturn(enabled).when(mLetterboxConfiguration)
+ doReturn(enabled).when(mAppCompatConfiguration)
.isPolicyForIgnoringRequestedOrientationEnabled();
}
void enableCameraCompatTreatment(boolean enabled) {
- doReturn(enabled).when(mLetterboxConfiguration).isCameraCompatTreatmentEnabled();
+ doReturn(enabled).when(mAppCompatConfiguration).isCameraCompatTreatmentEnabled();
}
void enableCameraCompatTreatmentAtBuildTime(boolean enabled) {
- doReturn(enabled).when(mLetterboxConfiguration)
+ doReturn(enabled).when(mAppCompatConfiguration)
.isCameraCompatTreatmentEnabledAtBuildTime();
}
void enableUserAppAspectRatioFullscreen(boolean enabled) {
- doReturn(enabled).when(mLetterboxConfiguration).isUserAppAspectRatioFullscreenEnabled();
+ doReturn(enabled).when(mAppCompatConfiguration).isUserAppAspectRatioFullscreenEnabled();
}
void enableUserAppAspectRatioSettings(boolean enabled) {
- doReturn(enabled).when(mLetterboxConfiguration).isUserAppAspectRatioSettingsEnabled();
+ doReturn(enabled).when(mAppCompatConfiguration).isUserAppAspectRatioSettingsEnabled();
}
void enableCameraCompatSplitScreenAspectRatio(boolean enabled) {
- doReturn(enabled).when(mLetterboxConfiguration)
+ doReturn(enabled).when(mAppCompatConfiguration)
.isCameraCompatSplitScreenAspectRatioEnabled();
}
-
-
}
diff --git a/services/tests/wmtests/src/com/android/server/wm/LetterboxConfigurationTest.java b/services/tests/wmtests/src/com/android/server/wm/AppCompatConfigurationTest.java
index 79e401c238bd..6efd7de80c55 100644
--- a/services/tests/wmtests/src/com/android/server/wm/LetterboxConfigurationTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/AppCompatConfigurationTest.java
@@ -19,12 +19,12 @@ package com.android.server.wm;
import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.spyOn;
-import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_CENTER;
-import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_LEFT;
-import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_RIGHT;
-import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_VERTICAL_REACHABILITY_POSITION_BOTTOM;
-import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_VERTICAL_REACHABILITY_POSITION_CENTER;
-import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_VERTICAL_REACHABILITY_POSITION_TOP;
+import static com.android.server.wm.AppCompatConfiguration.LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_CENTER;
+import static com.android.server.wm.AppCompatConfiguration.LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_LEFT;
+import static com.android.server.wm.AppCompatConfiguration.LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_RIGHT;
+import static com.android.server.wm.AppCompatConfiguration.LETTERBOX_VERTICAL_REACHABILITY_POSITION_BOTTOM;
+import static com.android.server.wm.AppCompatConfiguration.LETTERBOX_VERTICAL_REACHABILITY_POSITION_CENTER;
+import static com.android.server.wm.AppCompatConfiguration.LETTERBOX_VERTICAL_REACHABILITY_POSITION_TOP;
import static com.android.server.wm.testing.Assert.assertThrows;
import static junit.framework.Assert.assertEquals;
@@ -52,35 +52,35 @@ import java.util.Arrays;
import java.util.function.BiConsumer;
/**
- * Tests for the {@link LetterboxConfiguration} class.
+ * Tests for the {@link AppCompatConfiguration} class.
*
* Build/Install/Run:
- * atest WmTests:LetterboxConfigurationTest
+ * atest WmTests:AppCompatConfigurationTest
*/
@SmallTest
@Presubmit
-public class LetterboxConfigurationTest {
+public class AppCompatConfigurationTest {
private Context mContext;
- private LetterboxConfiguration mLetterboxConfiguration;
- private LetterboxConfigurationPersister mLetterboxConfigurationPersister;
+ private AppCompatConfiguration mAppCompatConfiguration;
+ private AppCompatConfigurationPersister mAppCompatConfigurationPersister;
@Before
public void setUp() throws Exception {
mContext = getInstrumentation().getTargetContext();
- mLetterboxConfigurationPersister = mock(LetterboxConfigurationPersister.class);
- mLetterboxConfiguration = new LetterboxConfiguration(mContext,
- mLetterboxConfigurationPersister);
+ mAppCompatConfigurationPersister = mock(AppCompatConfigurationPersister.class);
+ mAppCompatConfiguration = new AppCompatConfiguration(mContext,
+ mAppCompatConfigurationPersister);
}
@Test
public void test_whenReadingValues_storeIsInvoked() {
for (boolean halfFoldPose : Arrays.asList(false, true)) {
- mLetterboxConfiguration.getLetterboxPositionForHorizontalReachability(halfFoldPose);
- verify(mLetterboxConfigurationPersister).getLetterboxPositionForHorizontalReachability(
+ mAppCompatConfiguration.getLetterboxPositionForHorizontalReachability(halfFoldPose);
+ verify(mAppCompatConfigurationPersister).getLetterboxPositionForHorizontalReachability(
halfFoldPose);
- mLetterboxConfiguration.getLetterboxPositionForVerticalReachability(halfFoldPose);
- verify(mLetterboxConfigurationPersister).getLetterboxPositionForVerticalReachability(
+ mAppCompatConfiguration.getLetterboxPositionForVerticalReachability(halfFoldPose);
+ verify(mAppCompatConfigurationPersister).getLetterboxPositionForVerticalReachability(
halfFoldPose);
}
}
@@ -88,13 +88,13 @@ public class LetterboxConfigurationTest {
@Test
public void test_whenSettingValues_updateConfigurationIsInvoked() {
for (boolean halfFoldPose : Arrays.asList(false, true)) {
- mLetterboxConfiguration.movePositionForHorizontalReachabilityToNextRightStop(
+ mAppCompatConfiguration.movePositionForHorizontalReachabilityToNextRightStop(
halfFoldPose);
- verify(mLetterboxConfigurationPersister).setLetterboxPositionForHorizontalReachability(
+ verify(mAppCompatConfigurationPersister).setLetterboxPositionForHorizontalReachability(
eq(halfFoldPose), anyInt());
- mLetterboxConfiguration.movePositionForVerticalReachabilityToNextBottomStop(
+ mAppCompatConfiguration.movePositionForVerticalReachabilityToNextBottomStop(
halfFoldPose);
- verify(mLetterboxConfigurationPersister).setLetterboxPositionForVerticalReachability(
+ verify(mAppCompatConfigurationPersister).setLetterboxPositionForVerticalReachability(
eq(halfFoldPose), anyInt());
}
}
@@ -107,65 +107,65 @@ public class LetterboxConfigurationTest {
/* expected */ LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_LEFT,
/* expectedTime */ 1,
/* halfFoldPose */ false,
- LetterboxConfiguration::movePositionForHorizontalReachabilityToNextLeftStop);
+ AppCompatConfiguration::movePositionForHorizontalReachabilityToNextLeftStop);
assertForHorizontalMove(
/* from */ LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_CENTER,
/* expected */ LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_RIGHT,
/* expectedTime */ 1,
/* halfFoldPose */ false,
- LetterboxConfiguration::movePositionForHorizontalReachabilityToNextRightStop);
+ AppCompatConfiguration::movePositionForHorizontalReachabilityToNextRightStop);
// Starting from left
assertForHorizontalMove(
/* from */ LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_LEFT,
/* expected */ LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_LEFT,
/* expectedTime */ 2,
/* halfFoldPose */ false,
- LetterboxConfiguration::movePositionForHorizontalReachabilityToNextLeftStop);
+ AppCompatConfiguration::movePositionForHorizontalReachabilityToNextLeftStop);
assertForHorizontalMove(
/* from */ LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_LEFT,
/* expected */ LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_CENTER,
/* expectedTime */ 1,
/* halfFoldPose */ false,
- LetterboxConfiguration::movePositionForHorizontalReachabilityToNextRightStop);
+ AppCompatConfiguration::movePositionForHorizontalReachabilityToNextRightStop);
// Starting from right
assertForHorizontalMove(
/* from */ LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_RIGHT,
/* expected */ LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_RIGHT,
/* expectedTime */ 2,
/* halfFoldPose */ false,
- LetterboxConfiguration::movePositionForHorizontalReachabilityToNextRightStop);
+ AppCompatConfiguration::movePositionForHorizontalReachabilityToNextRightStop);
assertForHorizontalMove(
/* from */ LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_RIGHT,
/* expected */ LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_CENTER,
/* expectedTime */ 2,
/* halfFoldPose */ false,
- LetterboxConfiguration::movePositionForHorizontalReachabilityToNextLeftStop);
+ AppCompatConfiguration::movePositionForHorizontalReachabilityToNextLeftStop);
// Starting from left - book mode
assertForHorizontalMove(
/* from */ LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_LEFT,
/* expected */ LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_LEFT,
/* expectedTime */ 1,
/* halfFoldPose */ true,
- LetterboxConfiguration::movePositionForHorizontalReachabilityToNextLeftStop);
+ AppCompatConfiguration::movePositionForHorizontalReachabilityToNextLeftStop);
assertForHorizontalMove(
/* from */ LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_LEFT,
/* expected */ LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_RIGHT,
/* expectedTime */ 1,
/* halfFoldPose */ true,
- LetterboxConfiguration::movePositionForHorizontalReachabilityToNextRightStop);
+ AppCompatConfiguration::movePositionForHorizontalReachabilityToNextRightStop);
// Starting from right - book mode
assertForHorizontalMove(
/* from */ LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_RIGHT,
/* expected */ LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_RIGHT,
/* expectedTime */ 2,
/* halfFoldPose */ true,
- LetterboxConfiguration::movePositionForHorizontalReachabilityToNextRightStop);
+ AppCompatConfiguration::movePositionForHorizontalReachabilityToNextRightStop);
assertForHorizontalMove(
/* from */ LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_RIGHT,
/* expected */ LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_LEFT,
/* expectedTime */ 2,
/* halfFoldPose */ true,
- LetterboxConfiguration::movePositionForHorizontalReachabilityToNextLeftStop);
+ AppCompatConfiguration::movePositionForHorizontalReachabilityToNextLeftStop);
}
@Test
@@ -176,85 +176,85 @@ public class LetterboxConfigurationTest {
/* expected */ LETTERBOX_VERTICAL_REACHABILITY_POSITION_BOTTOM,
/* expectedTime */ 1,
/* halfFoldPose */ false,
- LetterboxConfiguration::movePositionForVerticalReachabilityToNextBottomStop);
+ AppCompatConfiguration::movePositionForVerticalReachabilityToNextBottomStop);
assertForVerticalMove(
/* from */ LETTERBOX_VERTICAL_REACHABILITY_POSITION_CENTER,
/* expected */ LETTERBOX_VERTICAL_REACHABILITY_POSITION_TOP,
/* expectedTime */ 1,
/* halfFoldPose */ false,
- LetterboxConfiguration::movePositionForVerticalReachabilityToNextTopStop);
+ AppCompatConfiguration::movePositionForVerticalReachabilityToNextTopStop);
// Starting from top
assertForVerticalMove(
/* from */ LETTERBOX_VERTICAL_REACHABILITY_POSITION_TOP,
/* expected */ LETTERBOX_VERTICAL_REACHABILITY_POSITION_CENTER,
/* expectedTime */ 1,
/* halfFoldPose */ false,
- LetterboxConfiguration::movePositionForVerticalReachabilityToNextBottomStop);
+ AppCompatConfiguration::movePositionForVerticalReachabilityToNextBottomStop);
assertForVerticalMove(
/* from */ LETTERBOX_VERTICAL_REACHABILITY_POSITION_TOP,
/* expected */ LETTERBOX_VERTICAL_REACHABILITY_POSITION_TOP,
/* expectedTime */ 2,
/* halfFoldPose */ false,
- LetterboxConfiguration::movePositionForVerticalReachabilityToNextTopStop);
+ AppCompatConfiguration::movePositionForVerticalReachabilityToNextTopStop);
// Starting from bottom
assertForVerticalMove(
/* from */ LETTERBOX_VERTICAL_REACHABILITY_POSITION_BOTTOM,
/* expected */ LETTERBOX_VERTICAL_REACHABILITY_POSITION_CENTER,
/* expectedTime */ 2,
/* halfFoldPose */ false,
- LetterboxConfiguration::movePositionForVerticalReachabilityToNextTopStop);
+ AppCompatConfiguration::movePositionForVerticalReachabilityToNextTopStop);
assertForVerticalMove(
/* from */ LETTERBOX_VERTICAL_REACHABILITY_POSITION_BOTTOM,
/* expected */ LETTERBOX_VERTICAL_REACHABILITY_POSITION_BOTTOM,
/* expectedTime */ 2,
/* halfFoldPose */ false,
- LetterboxConfiguration::movePositionForVerticalReachabilityToNextBottomStop);
+ AppCompatConfiguration::movePositionForVerticalReachabilityToNextBottomStop);
// Starting from top - tabletop mode
assertForVerticalMove(
/* from */ LETTERBOX_VERTICAL_REACHABILITY_POSITION_TOP,
/* expected */ LETTERBOX_VERTICAL_REACHABILITY_POSITION_BOTTOM,
/* expectedTime */ 1,
/* halfFoldPose */ true,
- LetterboxConfiguration::movePositionForVerticalReachabilityToNextBottomStop);
+ AppCompatConfiguration::movePositionForVerticalReachabilityToNextBottomStop);
assertForVerticalMove(
/* from */ LETTERBOX_VERTICAL_REACHABILITY_POSITION_TOP,
/* expected */ LETTERBOX_VERTICAL_REACHABILITY_POSITION_TOP,
/* expectedTime */ 1,
/* halfFoldPose */ true,
- LetterboxConfiguration::movePositionForVerticalReachabilityToNextTopStop);
+ AppCompatConfiguration::movePositionForVerticalReachabilityToNextTopStop);
// Starting from bottom - tabletop mode
assertForVerticalMove(
/* from */ LETTERBOX_VERTICAL_REACHABILITY_POSITION_BOTTOM,
/* expected */ LETTERBOX_VERTICAL_REACHABILITY_POSITION_TOP,
/* expectedTime */ 2,
/* halfFoldPose */ true,
- LetterboxConfiguration::movePositionForVerticalReachabilityToNextTopStop);
+ AppCompatConfiguration::movePositionForVerticalReachabilityToNextTopStop);
assertForVerticalMove(
/* from */ LETTERBOX_VERTICAL_REACHABILITY_POSITION_BOTTOM,
/* expected */ LETTERBOX_VERTICAL_REACHABILITY_POSITION_BOTTOM,
/* expectedTime */ 2,
/* halfFoldPose */ true,
- LetterboxConfiguration::movePositionForVerticalReachabilityToNextBottomStop);
+ AppCompatConfiguration::movePositionForVerticalReachabilityToNextBottomStop);
}
private void assertForHorizontalMove(int from, int expected, int expectedTime,
- boolean halfFoldPose, BiConsumer<LetterboxConfiguration, Boolean> move) {
+ boolean halfFoldPose, BiConsumer<AppCompatConfiguration, Boolean> move) {
// We are in the current position
- when(mLetterboxConfiguration.getLetterboxPositionForHorizontalReachability(halfFoldPose))
+ when(mAppCompatConfiguration.getLetterboxPositionForHorizontalReachability(halfFoldPose))
.thenReturn(from);
- move.accept(mLetterboxConfiguration, halfFoldPose);
- verify(mLetterboxConfigurationPersister,
+ move.accept(mAppCompatConfiguration, halfFoldPose);
+ verify(mAppCompatConfigurationPersister,
times(expectedTime)).setLetterboxPositionForHorizontalReachability(halfFoldPose,
expected);
}
private void assertForVerticalMove(int from, int expected, int expectedTime,
- boolean halfFoldPose, BiConsumer<LetterboxConfiguration, Boolean> move) {
+ boolean halfFoldPose, BiConsumer<AppCompatConfiguration, Boolean> move) {
// We are in the current position
- when(mLetterboxConfiguration.getLetterboxPositionForVerticalReachability(halfFoldPose))
+ when(mAppCompatConfiguration.getLetterboxPositionForVerticalReachability(halfFoldPose))
.thenReturn(from);
- move.accept(mLetterboxConfiguration, halfFoldPose);
- verify(mLetterboxConfigurationPersister,
+ move.accept(mAppCompatConfiguration, halfFoldPose);
+ verify(mAppCompatConfigurationPersister,
times(expectedTime)).setLetterboxPositionForVerticalReachability(halfFoldPose,
expected);
}
@@ -262,20 +262,20 @@ public class LetterboxConfigurationTest {
@Test
public void test_letterboxPositionWhenReachabilityEnabledIsReset() {
// Check that horizontal reachability is set with correct arguments
- mLetterboxConfiguration.resetPersistentLetterboxPositionForHorizontalReachability();
- verify(mLetterboxConfigurationPersister).setLetterboxPositionForHorizontalReachability(
+ mAppCompatConfiguration.resetPersistentLetterboxPositionForHorizontalReachability();
+ verify(mAppCompatConfigurationPersister).setLetterboxPositionForHorizontalReachability(
false /* forBookMode */,
LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_CENTER);
- verify(mLetterboxConfigurationPersister).setLetterboxPositionForHorizontalReachability(
+ verify(mAppCompatConfigurationPersister).setLetterboxPositionForHorizontalReachability(
true /* forBookMode */,
LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_LEFT);
// Check that vertical reachability is set with correct arguments
- mLetterboxConfiguration.resetPersistentLetterboxPositionForVerticalReachability();
- verify(mLetterboxConfigurationPersister).setLetterboxPositionForVerticalReachability(
+ mAppCompatConfiguration.resetPersistentLetterboxPositionForVerticalReachability();
+ verify(mAppCompatConfigurationPersister).setLetterboxPositionForVerticalReachability(
false /* forTabletopMode */,
LETTERBOX_VERTICAL_REACHABILITY_POSITION_CENTER);
- verify(mLetterboxConfigurationPersister).setLetterboxPositionForVerticalReachability(
+ verify(mAppCompatConfigurationPersister).setLetterboxPositionForVerticalReachability(
true /* forTabletopMode */,
LETTERBOX_VERTICAL_REACHABILITY_POSITION_TOP);
}
@@ -283,16 +283,16 @@ public class LetterboxConfigurationTest {
@Test
public void test_letterboxPositionWhenReachabilityEnabledIsSet() {
// Check that horizontal reachability is set with correct arguments
- mLetterboxConfiguration.setPersistentLetterboxPositionForHorizontalReachability(
+ mAppCompatConfiguration.setPersistentLetterboxPositionForHorizontalReachability(
false /* forBookMode */, LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_LEFT);
- verify(mLetterboxConfigurationPersister).setLetterboxPositionForHorizontalReachability(
+ verify(mAppCompatConfigurationPersister).setLetterboxPositionForHorizontalReachability(
false /* forBookMode */,
LETTERBOX_HORIZONTAL_REACHABILITY_POSITION_LEFT);
// Check that vertical reachability is set with correct arguments
- mLetterboxConfiguration.setPersistentLetterboxPositionForVerticalReachability(
+ mAppCompatConfiguration.setPersistentLetterboxPositionForVerticalReachability(
false /* forTabletopMode */, LETTERBOX_VERTICAL_REACHABILITY_POSITION_TOP);
- verify(mLetterboxConfigurationPersister).setLetterboxPositionForVerticalReachability(
+ verify(mAppCompatConfigurationPersister).setLetterboxPositionForVerticalReachability(
false /* forTabletopMode */,
LETTERBOX_VERTICAL_REACHABILITY_POSITION_TOP);
}
@@ -300,60 +300,60 @@ public class LetterboxConfigurationTest {
@Test
public void test_setLetterboxHorizontalPositionMultiplier_validValues() {
assertThrows(IllegalArgumentException.class,
- () -> mLetterboxConfiguration.setLetterboxHorizontalPositionMultiplier(-1));
+ () -> mAppCompatConfiguration.setLetterboxHorizontalPositionMultiplier(-1));
assertThrows(IllegalArgumentException.class,
- () -> mLetterboxConfiguration.setLetterboxHorizontalPositionMultiplier(2));
+ () -> mAppCompatConfiguration.setLetterboxHorizontalPositionMultiplier(2));
// Does not throw an exception for values [0,1].
- mLetterboxConfiguration.setLetterboxHorizontalPositionMultiplier(0);
- mLetterboxConfiguration.setLetterboxHorizontalPositionMultiplier(0.5f);
- mLetterboxConfiguration.setLetterboxHorizontalPositionMultiplier(1);
+ mAppCompatConfiguration.setLetterboxHorizontalPositionMultiplier(0);
+ mAppCompatConfiguration.setLetterboxHorizontalPositionMultiplier(0.5f);
+ mAppCompatConfiguration.setLetterboxHorizontalPositionMultiplier(1);
}
@Test
public void test_setLetterboxVerticalPositionMultiplier_validValues() {
assertThrows(IllegalArgumentException.class,
- () -> mLetterboxConfiguration.setLetterboxVerticalPositionMultiplier(-1));
+ () -> mAppCompatConfiguration.setLetterboxVerticalPositionMultiplier(-1));
assertThrows(IllegalArgumentException.class,
- () -> mLetterboxConfiguration.setLetterboxVerticalPositionMultiplier(2));
+ () -> mAppCompatConfiguration.setLetterboxVerticalPositionMultiplier(2));
// Does not throw an exception for values [0,1].
- mLetterboxConfiguration.setLetterboxVerticalPositionMultiplier(0);
- mLetterboxConfiguration.setLetterboxVerticalPositionMultiplier(0.5f);
- mLetterboxConfiguration.setLetterboxVerticalPositionMultiplier(1);
+ mAppCompatConfiguration.setLetterboxVerticalPositionMultiplier(0);
+ mAppCompatConfiguration.setLetterboxVerticalPositionMultiplier(0.5f);
+ mAppCompatConfiguration.setLetterboxVerticalPositionMultiplier(1);
}
@Test
public void test_setLetterboxBookModePositionMultiplier_validValues() {
assertThrows(IllegalArgumentException.class,
- () -> mLetterboxConfiguration.setLetterboxBookModePositionMultiplier(-1));
+ () -> mAppCompatConfiguration.setLetterboxBookModePositionMultiplier(-1));
assertThrows(IllegalArgumentException.class,
- () -> mLetterboxConfiguration.setLetterboxBookModePositionMultiplier(2));
+ () -> mAppCompatConfiguration.setLetterboxBookModePositionMultiplier(2));
// Does not throw an exception for values [0,1].
- mLetterboxConfiguration.setLetterboxBookModePositionMultiplier(0);
- mLetterboxConfiguration.setLetterboxBookModePositionMultiplier(0.5f);
- mLetterboxConfiguration.setLetterboxBookModePositionMultiplier(1);
+ mAppCompatConfiguration.setLetterboxBookModePositionMultiplier(0);
+ mAppCompatConfiguration.setLetterboxBookModePositionMultiplier(0.5f);
+ mAppCompatConfiguration.setLetterboxBookModePositionMultiplier(1);
}
@Test
public void test_setLetterboxTabletopModePositionMultiplier_validValues() {
assertThrows(IllegalArgumentException.class,
- () -> mLetterboxConfiguration.setLetterboxTabletopModePositionMultiplier(-1));
+ () -> mAppCompatConfiguration.setLetterboxTabletopModePositionMultiplier(-1));
assertThrows(IllegalArgumentException.class,
- () -> mLetterboxConfiguration.setLetterboxTabletopModePositionMultiplier(2));
+ () -> mAppCompatConfiguration.setLetterboxTabletopModePositionMultiplier(2));
// Does not throw an exception for values [0,1].
- mLetterboxConfiguration.setLetterboxTabletopModePositionMultiplier(0);
- mLetterboxConfiguration.setLetterboxTabletopModePositionMultiplier(0.5f);
- mLetterboxConfiguration.setLetterboxTabletopModePositionMultiplier(1);
+ mAppCompatConfiguration.setLetterboxTabletopModePositionMultiplier(0);
+ mAppCompatConfiguration.setLetterboxTabletopModePositionMultiplier(0.5f);
+ mAppCompatConfiguration.setLetterboxTabletopModePositionMultiplier(1);
}
@Test
public void test_evaluateThinLetterboxWhenDensityChanges() {
final Resources rs = mock(Resources.class);
final DisplayMetrics dm = mock(DisplayMetrics.class);
- final LetterboxConfigurationPersister lp = mock(LetterboxConfigurationPersister.class);
+ final AppCompatConfigurationPersister lp = mock(AppCompatConfigurationPersister.class);
spyOn(mContext);
when(rs.getDisplayMetrics()).thenReturn(dm);
when(mContext.getResources()).thenReturn(rs);
@@ -361,7 +361,7 @@ public class LetterboxConfigurationTest {
.thenReturn(100);
when(rs.getDimensionPixelSize(R.dimen.config_letterboxThinLetterboxHeightDp))
.thenReturn(200);
- final LetterboxConfiguration configuration = new LetterboxConfiguration(mContext, lp);
+ final AppCompatConfiguration configuration = new AppCompatConfiguration(mContext, lp);
// Verify the values are the expected ones
dm.density = 100;
diff --git a/services/tests/wmtests/src/com/android/server/wm/AppCompatOrientationOverridesTest.java b/services/tests/wmtests/src/com/android/server/wm/AppCompatOrientationOverridesTest.java
index 35c2ee0b83a1..634453fe008c 100644
--- a/services/tests/wmtests/src/com/android/server/wm/AppCompatOrientationOverridesTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/AppCompatOrientationOverridesTest.java
@@ -162,7 +162,7 @@ public class AppCompatOrientationOverridesTest extends WindowTestsBase {
* Runs a test scenario providing a Robot.
*/
void runTestScenario(@NonNull Consumer<OrientationOverridesRobotTest> consumer) {
- spyOn(mWm.mLetterboxConfiguration);
+ spyOn(mWm.mAppCompatConfiguration);
final OrientationOverridesRobotTest robot =
new OrientationOverridesRobotTest(mWm, mAtm, mSupervisor);
consumer.accept(robot);
diff --git a/services/tests/wmtests/src/com/android/server/wm/AppCompatOrientationPolicyTest.java b/services/tests/wmtests/src/com/android/server/wm/AppCompatOrientationPolicyTest.java
index aa520e9cc599..ad34a6b0fc87 100644
--- a/services/tests/wmtests/src/com/android/server/wm/AppCompatOrientationPolicyTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/AppCompatOrientationPolicyTest.java
@@ -514,7 +514,7 @@ public class AppCompatOrientationPolicyTest extends WindowTestsBase {
*/
void runTestScenario(boolean withActivity,
@NonNull Consumer<OrientationPolicyRobotTest> consumer) {
- spyOn(mWm.mLetterboxConfiguration);
+ spyOn(mWm.mAppCompatConfiguration);
final OrientationPolicyRobotTest robot =
new OrientationPolicyRobotTest(mWm, mAtm, mSupervisor, withActivity);
consumer.accept(robot);
diff --git a/services/tests/wmtests/src/com/android/server/wm/AppCompatRobotBase.java b/services/tests/wmtests/src/com/android/server/wm/AppCompatRobotBase.java
index de16e3888022..92f246be7cdf 100644
--- a/services/tests/wmtests/src/com/android/server/wm/AppCompatRobotBase.java
+++ b/services/tests/wmtests/src/com/android/server/wm/AppCompatRobotBase.java
@@ -31,7 +31,7 @@ abstract class AppCompatRobotBase {
@NonNull
private final AppCompatActivityRobot mActivityRobot;
@NonNull
- private final AppCompatLetterboxConfigurationRobot mConfigurationRobot;
+ private final AppCompatConfigurationRobot mConfigurationRobot;
@NonNull
private final AppCompatComponentPropRobot mOptPropRobot;
@@ -42,7 +42,7 @@ abstract class AppCompatRobotBase {
mActivityRobot = new AppCompatActivityRobot(wm, atm, supervisor,
displayWidth, displayHeight);
mConfigurationRobot =
- new AppCompatLetterboxConfigurationRobot(wm.mLetterboxConfiguration);
+ new AppCompatConfigurationRobot(wm.mAppCompatConfiguration);
mOptPropRobot = new AppCompatComponentPropRobot(wm);
}
@@ -53,12 +53,12 @@ abstract class AppCompatRobotBase {
}
@NonNull
- AppCompatLetterboxConfigurationRobot conf() {
+ AppCompatConfigurationRobot conf() {
return mConfigurationRobot;
}
@NonNull
- void applyOnConf(@NonNull Consumer<AppCompatLetterboxConfigurationRobot> consumer) {
+ void applyOnConf(@NonNull Consumer<AppCompatConfigurationRobot> consumer) {
consumer.accept(mConfigurationRobot);
}
diff --git a/services/tests/wmtests/src/com/android/server/wm/AppTransitionControllerTest.java b/services/tests/wmtests/src/com/android/server/wm/AppTransitionControllerTest.java
index 0c1fbf3cb3d7..af4394acce67 100644
--- a/services/tests/wmtests/src/com/android/server/wm/AppTransitionControllerTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/AppTransitionControllerTest.java
@@ -25,15 +25,11 @@ import static android.view.WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER;
import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION;
import static android.view.WindowManager.TRANSIT_CHANGE;
import static android.view.WindowManager.TRANSIT_CLOSE;
-import static android.view.WindowManager.TRANSIT_OLD_ACTIVITY_CLOSE;
import static android.view.WindowManager.TRANSIT_OLD_ACTIVITY_OPEN;
import static android.view.WindowManager.TRANSIT_OLD_DREAM_ACTIVITY_CLOSE;
import static android.view.WindowManager.TRANSIT_OLD_DREAM_ACTIVITY_OPEN;
import static android.view.WindowManager.TRANSIT_OLD_KEYGUARD_UNOCCLUDE;
import static android.view.WindowManager.TRANSIT_OLD_TASK_CHANGE_WINDOWING_MODE;
-import static android.view.WindowManager.TRANSIT_OLD_TASK_FRAGMENT_CHANGE;
-import static android.view.WindowManager.TRANSIT_OLD_TASK_FRAGMENT_CLOSE;
-import static android.view.WindowManager.TRANSIT_OLD_TASK_FRAGMENT_OPEN;
import static android.view.WindowManager.TRANSIT_OLD_TASK_OPEN;
import static android.view.WindowManager.TRANSIT_OPEN;
import static android.view.WindowManager.TRANSIT_TO_FRONT;
@@ -41,7 +37,6 @@ import static android.view.WindowManager.TRANSIT_TO_FRONT;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.doNothing;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.doReturn;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.spyOn;
-import static com.android.server.wm.WindowContainer.POSITION_BOTTOM;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -51,14 +46,11 @@ import static org.junit.Assert.fail;
import static org.junit.Assume.assumeFalse;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
-import static org.mockito.Mockito.clearInvocations;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
import android.annotation.Nullable;
-import android.graphics.Rect;
-import android.gui.DropInputMode;
import android.os.Binder;
import android.os.IBinder;
import android.os.RemoteException;
@@ -841,353 +833,6 @@ public class AppTransitionControllerTest extends WindowTestsBase {
}
@Test
- public void testOverrideTaskFragmentAdapter_overrideWithEmbeddedActivity() {
- final Task task = createTask(mDisplayContent);
- final TaskFragmentOrganizer organizer = new TaskFragmentOrganizer(Runnable::run);
- final TestRemoteAnimationRunner remoteAnimationRunner = new TestRemoteAnimationRunner();
- setupTaskFragmentRemoteAnimation(organizer, remoteAnimationRunner);
-
- // Create a TaskFragment with embedded activity.
- final TaskFragment taskFragment = createTaskFragmentWithEmbeddedActivity(task, organizer);
- final ActivityRecord activity = taskFragment.getTopMostActivity();
- prepareActivityForAppTransition(activity);
- spyOn(mDisplayContent.mAppTransition);
-
- // Prepare and start transition.
- prepareAndTriggerAppTransition(activity, null /* closingActivity */, taskFragment);
- mWm.mAnimator.executeAfterPrepareSurfacesRunnables();
-
- // Animation run by the remote handler.
- assertTrue(remoteAnimationRunner.isAnimationStarted());
- }
-
- @Test
- public void testOverrideTaskFragmentAdapter_noOverrideWithOnlyTaskFragmentFillingTask() {
- final Task task = createTask(mDisplayContent);
- final ActivityRecord closingActivity = createActivityRecord(task);
- final TaskFragmentOrganizer organizer = new TaskFragmentOrganizer(Runnable::run);
- final TestRemoteAnimationRunner remoteAnimationRunner = new TestRemoteAnimationRunner();
- setupTaskFragmentRemoteAnimation(organizer, remoteAnimationRunner);
-
- // Create a TaskFragment with embedded activity.
- final TaskFragment taskFragment = createTaskFragmentWithEmbeddedActivity(task, organizer);
-
- // Make sure the TaskFragment is not embedded.
- assertFalse(taskFragment.isEmbeddedWithBoundsOverride());
- final ActivityRecord openingActivity = taskFragment.getTopMostActivity();
- prepareActivityForAppTransition(closingActivity);
- prepareActivityForAppTransition(openingActivity);
- final int uid = 12345;
- closingActivity.info.applicationInfo.uid = uid;
- openingActivity.info.applicationInfo.uid = uid;
- task.effectiveUid = uid;
- spyOn(mDisplayContent.mAppTransition);
-
- // Prepare and start transition.
- prepareAndTriggerAppTransition(openingActivity, closingActivity,
- null /* changingTaskFragment */);
- mWm.mAnimator.executeAfterPrepareSurfacesRunnables();
-
- // Animation is not run by the remote handler because the activity is filling the Task.
- assertFalse(remoteAnimationRunner.isAnimationStarted());
- }
-
- @Test
- public void testOverrideTaskFragmentAdapter_overrideWithTaskFragmentNotFillingTask() {
- final Task task = createTask(mDisplayContent);
- final ActivityRecord closingActivity = createActivityRecord(task);
- final TaskFragmentOrganizer organizer = new TaskFragmentOrganizer(Runnable::run);
- final TestRemoteAnimationRunner remoteAnimationRunner = new TestRemoteAnimationRunner();
- setupTaskFragmentRemoteAnimation(organizer, remoteAnimationRunner);
-
- // Create a TaskFragment with embedded activity.
- final TaskFragment taskFragment = createTaskFragmentWithEmbeddedActivity(task, organizer);
-
- // Make sure the TaskFragment is embedded.
- taskFragment.setWindowingMode(WINDOWING_MODE_MULTI_WINDOW);
- final Rect embeddedBounds = new Rect(task.getBounds());
- embeddedBounds.right = embeddedBounds.left + embeddedBounds.width() / 2;
- taskFragment.setBounds(embeddedBounds);
- assertTrue(taskFragment.isEmbeddedWithBoundsOverride());
- final ActivityRecord openingActivity = taskFragment.getTopMostActivity();
- prepareActivityForAppTransition(closingActivity);
- prepareActivityForAppTransition(openingActivity);
- final int uid = 12345;
- closingActivity.info.applicationInfo.uid = uid;
- openingActivity.info.applicationInfo.uid = uid;
- task.effectiveUid = uid;
- spyOn(mDisplayContent.mAppTransition);
-
- // Prepare and start transition.
- prepareAndTriggerAppTransition(openingActivity, closingActivity,
- null /* changingTaskFragment */);
- mWm.mAnimator.executeAfterPrepareSurfacesRunnables();
-
- // Animation run by the remote handler.
- assertTrue(remoteAnimationRunner.isAnimationStarted());
- }
-
- @Test
- public void testOverrideTaskFragmentAdapter_overrideWithNonEmbeddedActivity() {
- final Task task = createTask(mDisplayContent);
- final TaskFragmentOrganizer organizer = new TaskFragmentOrganizer(Runnable::run);
- final TestRemoteAnimationRunner remoteAnimationRunner = new TestRemoteAnimationRunner();
- setupTaskFragmentRemoteAnimation(organizer, remoteAnimationRunner);
-
- // Closing non-embedded activity.
- final ActivityRecord closingActivity = createActivityRecord(task);
- prepareActivityForAppTransition(closingActivity);
- // Opening TaskFragment with embedded activity.
- final TaskFragment taskFragment = createTaskFragmentWithEmbeddedActivity(task, organizer);
- final ActivityRecord openingActivity = taskFragment.getTopMostActivity();
- prepareActivityForAppTransition(openingActivity);
- task.effectiveUid = openingActivity.getUid();
- spyOn(mDisplayContent.mAppTransition);
-
- // Prepare and start transition.
- prepareAndTriggerAppTransition(openingActivity, closingActivity, taskFragment);
- mWm.mAnimator.executeAfterPrepareSurfacesRunnables();
-
- // Animation run by the remote handler.
- assertTrue(remoteAnimationRunner.isAnimationStarted());
- }
-
- @Test
- public void testOverrideTaskFragmentAdapter_overrideEmbeddedActivityWithDiffUid() {
- final Task task = createTask(mDisplayContent);
- final TaskFragmentOrganizer organizer = new TaskFragmentOrganizer(Runnable::run);
- final TestRemoteAnimationRunner remoteAnimationRunner = new TestRemoteAnimationRunner();
- setupTaskFragmentRemoteAnimation(organizer, remoteAnimationRunner);
-
- // Closing TaskFragment with embedded activity.
- final TaskFragment taskFragment1 = createTaskFragmentWithEmbeddedActivity(task, organizer);
- final ActivityRecord closingActivity = taskFragment1.getTopMostActivity();
- prepareActivityForAppTransition(closingActivity);
- closingActivity.info.applicationInfo.uid = 12345;
- // Opening TaskFragment with embedded activity with different UID.
- final TaskFragment taskFragment2 = createTaskFragmentWithEmbeddedActivity(task, organizer);
- final ActivityRecord openingActivity = taskFragment2.getTopMostActivity();
- prepareActivityForAppTransition(openingActivity);
- openingActivity.info.applicationInfo.uid = 54321;
- spyOn(mDisplayContent.mAppTransition);
-
- // Prepare and start transition.
- prepareAndTriggerAppTransition(openingActivity, closingActivity, taskFragment1);
- mWm.mAnimator.executeAfterPrepareSurfacesRunnables();
-
- // Animation run by the remote handler.
- assertTrue(remoteAnimationRunner.isAnimationStarted());
- }
-
- @Test
- public void testOverrideTaskFragmentAdapter_noOverrideWithTwoApps() {
- final Task task = createTask(mDisplayContent);
- final TaskFragmentOrganizer organizer = new TaskFragmentOrganizer(Runnable::run);
- final TestRemoteAnimationRunner remoteAnimationRunner = new TestRemoteAnimationRunner();
- setupTaskFragmentRemoteAnimation(organizer, remoteAnimationRunner);
-
- // Closing activity in Task1.
- final ActivityRecord closingActivity = createActivityRecord(mDisplayContent);
- prepareActivityForAppTransition(closingActivity);
- // Opening TaskFragment with embedded activity in Task2.
- final TaskFragment taskFragment = createTaskFragmentWithEmbeddedActivity(task, organizer);
- final ActivityRecord openingActivity = taskFragment.getTopMostActivity();
- prepareActivityForAppTransition(openingActivity);
- spyOn(mDisplayContent.mAppTransition);
-
- // Prepare and start transition.
- prepareAndTriggerAppTransition(openingActivity, closingActivity, taskFragment);
- mWm.mAnimator.executeAfterPrepareSurfacesRunnables();
-
- // Animation not run by the remote handler.
- assertFalse(remoteAnimationRunner.isAnimationStarted());
- }
-
- @Test
- public void testOverrideTaskFragmentAdapter_noOverrideNonEmbeddedActivityWithDiffUid() {
- final Task task = createTask(mDisplayContent);
- final TaskFragmentOrganizer organizer = new TaskFragmentOrganizer(Runnable::run);
- final TestRemoteAnimationRunner remoteAnimationRunner = new TestRemoteAnimationRunner();
- setupTaskFragmentRemoteAnimation(organizer, remoteAnimationRunner);
-
- // Closing TaskFragment with embedded activity.
- final TaskFragment taskFragment = createTaskFragmentWithEmbeddedActivity(task, organizer);
- final ActivityRecord closingActivity = taskFragment.getTopMostActivity();
- prepareActivityForAppTransition(closingActivity);
- closingActivity.info.applicationInfo.uid = 12345;
- task.effectiveUid = closingActivity.getUid();
- // Opening non-embedded activity with different UID.
- final ActivityRecord openingActivity = createActivityRecord(task);
- prepareActivityForAppTransition(openingActivity);
- openingActivity.info.applicationInfo.uid = 54321;
- spyOn(mDisplayContent.mAppTransition);
-
- // Prepare and start transition.
- prepareAndTriggerAppTransition(openingActivity, closingActivity, taskFragment);
- mWm.mAnimator.executeAfterPrepareSurfacesRunnables();
-
- // Animation should not run by the remote handler when there are non-embedded activities of
- // different UID.
- assertFalse(remoteAnimationRunner.isAnimationStarted());
- }
-
- @Test
- public void testOverrideTaskFragmentAdapter_noOverrideWithWallpaper() {
- final Task task = createTask(mDisplayContent);
- final TaskFragmentOrganizer organizer = new TaskFragmentOrganizer(Runnable::run);
- final TestRemoteAnimationRunner remoteAnimationRunner = new TestRemoteAnimationRunner();
- setupTaskFragmentRemoteAnimation(organizer, remoteAnimationRunner);
-
- // Create a TaskFragment with embedded activity.
- final TaskFragment taskFragment = createTaskFragmentWithEmbeddedActivity(task, organizer);
- final ActivityRecord activity = taskFragment.getTopMostActivity();
- prepareActivityForAppTransition(activity);
- // Set wallpaper as visible.
- final WallpaperWindowToken wallpaperWindowToken = new WallpaperWindowToken(mWm,
- mock(IBinder.class), true, mDisplayContent, true /* ownerCanManageAppTokens */);
- spyOn(mDisplayContent.mWallpaperController);
- doReturn(true).when(mDisplayContent.mWallpaperController).isWallpaperVisible();
- spyOn(mDisplayContent.mAppTransition);
-
- // Prepare and start transition.
- prepareAndTriggerAppTransition(activity, null /* closingActivity */, taskFragment);
- mWm.mAnimator.executeAfterPrepareSurfacesRunnables();
-
- // Animation should not run by the remote handler when there is wallpaper in the transition.
- assertFalse(remoteAnimationRunner.isAnimationStarted());
- }
-
- @Test
- public void testOverrideTaskFragmentAdapter_inputProtectedForUntrustedAnimation() {
- final Task task = createTask(mDisplayContent);
- final TaskFragmentOrganizer organizer = new TaskFragmentOrganizer(Runnable::run);
- final TestRemoteAnimationRunner remoteAnimationRunner = new TestRemoteAnimationRunner();
- setupTaskFragmentRemoteAnimation(organizer, remoteAnimationRunner);
-
- // Create a TaskFragment with embedded activities, one is trusted embedded, and the other
- // one is untrusted embedded.
- final TaskFragment taskFragment = new TaskFragmentBuilder(mAtm)
- .setParentTask(task)
- .createActivityCount(2)
- .setOrganizer(organizer)
- .build();
- final ActivityRecord activity0 = taskFragment.getChildAt(0).asActivityRecord();
- final ActivityRecord activity1 = taskFragment.getChildAt(1).asActivityRecord();
- // Also create a non-embedded activity in the Task.
- final ActivityRecord activity2 = new ActivityBuilder(mAtm).build();
- task.addChild(activity2, POSITION_BOTTOM);
- prepareActivityForAppTransition(activity0);
- prepareActivityForAppTransition(activity1);
- prepareActivityForAppTransition(activity2);
- doReturn(false).when(taskFragment).isAllowedToEmbedActivityInTrustedMode(activity0);
- doReturn(true).when(taskFragment).isAllowedToEmbedActivityInTrustedMode(activity1);
- spyOn(mDisplayContent.mAppTransition);
-
- // Prepare and start transition.
- prepareAndTriggerAppTransition(activity1, null /* closingActivity */, taskFragment);
- mWm.mAnimator.executeAfterPrepareSurfacesRunnables();
-
- // The animation will be animated remotely by client and all activities are input disabled
- // for untrusted animation.
- assertTrue(remoteAnimationRunner.isAnimationStarted());
- verify(activity0).setDropInputForAnimation(true);
- verify(activity1).setDropInputForAnimation(true);
- verify(activity2).setDropInputForAnimation(true);
- verify(activity0).setDropInputMode(DropInputMode.ALL);
- verify(activity1).setDropInputMode(DropInputMode.ALL);
- verify(activity2).setDropInputMode(DropInputMode.ALL);
-
- // Reset input after animation is finished.
- clearInvocations(activity0);
- clearInvocations(activity1);
- clearInvocations(activity2);
- remoteAnimationRunner.finishAnimation();
-
- verify(activity0).setDropInputForAnimation(false);
- verify(activity1).setDropInputForAnimation(false);
- verify(activity2).setDropInputForAnimation(false);
- verify(activity0).setDropInputMode(DropInputMode.OBSCURED);
- verify(activity1).setDropInputMode(DropInputMode.NONE);
- verify(activity2).setDropInputMode(DropInputMode.NONE);
- }
-
- /**
- * Since we don't have any use case to rely on handling input during animation, disable it even
- * if it is trusted embedding so that it could cover some edge-cases when a previously trusted
- * host starts doing something bad.
- */
- @Test
- public void testOverrideTaskFragmentAdapter_inputProtectedForTrustedAnimation() {
- final Task task = createTask(mDisplayContent);
- final TaskFragmentOrganizer organizer = new TaskFragmentOrganizer(Runnable::run);
- final TestRemoteAnimationRunner remoteAnimationRunner = new TestRemoteAnimationRunner();
- setupTaskFragmentRemoteAnimation(organizer, remoteAnimationRunner);
-
- // Create a TaskFragment with only trusted embedded activity
- final TaskFragment taskFragment = new TaskFragmentBuilder(mAtm)
- .setParentTask(task)
- .createActivityCount(1)
- .setOrganizer(organizer)
- .build();
- final ActivityRecord activity = taskFragment.getChildAt(0).asActivityRecord();
- prepareActivityForAppTransition(activity);
- doReturn(true).when(taskFragment).isAllowedToEmbedActivityInTrustedMode(activity);
- spyOn(mDisplayContent.mAppTransition);
-
- // Prepare and start transition.
- prepareAndTriggerAppTransition(activity, null /* closingActivity */, taskFragment);
- mWm.mAnimator.executeAfterPrepareSurfacesRunnables();
-
- // The animation will be animated remotely by client and all activities are input disabled
- // for untrusted animation.
- assertTrue(remoteAnimationRunner.isAnimationStarted());
- verify(activity).setDropInputForAnimation(true);
- verify(activity).setDropInputMode(DropInputMode.ALL);
-
- // Reset input after animation is finished.
- clearInvocations(activity);
- remoteAnimationRunner.finishAnimation();
-
- verify(activity).setDropInputForAnimation(false);
- verify(activity).setDropInputMode(DropInputMode.NONE);
- }
-
- /**
- * We don't need to drop input for fully trusted embedding (system app, and embedding in the
- * same app). This will allow users to do fast tapping.
- */
- @Test
- public void testOverrideTaskFragmentAdapter_noInputProtectedForFullyTrustedAnimation() {
- final Task task = createTask(mDisplayContent);
- final TaskFragmentOrganizer organizer = new TaskFragmentOrganizer(Runnable::run);
- final TestRemoteAnimationRunner remoteAnimationRunner = new TestRemoteAnimationRunner();
- setupTaskFragmentRemoteAnimation(organizer, remoteAnimationRunner);
-
- // Create a TaskFragment with only trusted embedded activity
- final TaskFragment taskFragment = new TaskFragmentBuilder(mAtm)
- .setParentTask(task)
- .createActivityCount(1)
- .setOrganizer(organizer)
- .build();
- final ActivityRecord activity = taskFragment.getChildAt(0).asActivityRecord();
- prepareActivityForAppTransition(activity);
- final int uid = mAtm.mTaskFragmentOrganizerController.getTaskFragmentOrganizerUid(
- getITaskFragmentOrganizer(organizer));
- doReturn(true).when(task).isFullyTrustedEmbedding(uid);
- spyOn(mDisplayContent.mAppTransition);
-
- // Prepare and start transition.
- prepareAndTriggerAppTransition(activity, null /* closingActivity */, taskFragment);
- mWm.mAnimator.executeAfterPrepareSurfacesRunnables();
-
- // The animation will be animated remotely by client, but input should not be dropped for
- // fully trusted.
- assertTrue(remoteAnimationRunner.isAnimationStarted());
- verify(activity, never()).setDropInputForAnimation(true);
- verify(activity, never()).setDropInputMode(DropInputMode.ALL);
- }
-
- @Test
public void testTransitionGoodToGoForTaskFragments() {
final TaskFragmentOrganizer organizer = new TaskFragmentOrganizer(Runnable::run);
final Task task = createTask(mDisplayContent);
@@ -1253,22 +898,6 @@ public class AppTransitionControllerTest extends WindowTestsBase {
verify(mDisplayContent.mAppTransition).goodToGo(anyInt(), any());
}
- /** Registers remote animation for the organizer. */
- private void setupTaskFragmentRemoteAnimation(TaskFragmentOrganizer organizer,
- TestRemoteAnimationRunner remoteAnimationRunner) {
- final RemoteAnimationAdapter adapter = new RemoteAnimationAdapter(
- remoteAnimationRunner, 10, 1);
- final ITaskFragmentOrganizer iOrganizer = getITaskFragmentOrganizer(organizer);
- final RemoteAnimationDefinition definition = new RemoteAnimationDefinition();
- definition.addRemoteAnimation(TRANSIT_OLD_TASK_FRAGMENT_CHANGE, adapter);
- definition.addRemoteAnimation(TRANSIT_OLD_TASK_FRAGMENT_OPEN, adapter);
- definition.addRemoteAnimation(TRANSIT_OLD_TASK_FRAGMENT_CLOSE, adapter);
- definition.addRemoteAnimation(TRANSIT_OLD_ACTIVITY_OPEN, adapter);
- definition.addRemoteAnimation(TRANSIT_OLD_ACTIVITY_CLOSE, adapter);
- registerTaskFragmentOrganizer(iOrganizer);
- mAtm.mTaskFragmentOrganizerController.registerRemoteAnimations(iOrganizer, definition);
- }
-
private static ITaskFragmentOrganizer getITaskFragmentOrganizer(
TaskFragmentOrganizer organizer) {
return ITaskFragmentOrganizer.Stub.asInterface(organizer.getOrganizerToken().asBinder());
diff --git a/services/tests/wmtests/src/com/android/server/wm/BackNavigationControllerTests.java b/services/tests/wmtests/src/com/android/server/wm/BackNavigationControllerTests.java
index 63c14b90958f..afa22bc5eae8 100644
--- a/services/tests/wmtests/src/com/android/server/wm/BackNavigationControllerTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/BackNavigationControllerTests.java
@@ -67,6 +67,7 @@ import android.window.IOnBackInvokedCallback;
import android.window.OnBackInvokedCallback;
import android.window.OnBackInvokedCallbackInfo;
import android.window.OnBackInvokedDispatcher;
+import android.window.TaskFragmentOrganizer;
import android.window.TaskSnapshot;
import android.window.WindowOnBackInvokedDispatcher;
@@ -670,25 +671,29 @@ public class BackNavigationControllerTests extends WindowTestsBase {
}
@Test
- public void testAdjacentFocusInActivityEmbedding() {
+ public void testBackOnMostRecentWindowInActivityEmbedding() {
mSetFlagsRule.enableFlags(Flags.FLAG_EMBEDDED_ACTIVITY_BACK_NAV_FLAG);
final Task task = createTask(mDefaultDisplay);
- final TaskFragment primaryTf = createTaskFragmentWithActivity(task);
- final TaskFragment secondaryTf = createTaskFragmentWithActivity(task);
+ final TaskFragmentOrganizer organizer = new TaskFragmentOrganizer(Runnable::run);
+ final TaskFragment primaryTf = createTaskFragmentWithEmbeddedActivity(task, organizer);
+ final TaskFragment secondaryTf = createTaskFragmentWithEmbeddedActivity(task, organizer);
final ActivityRecord primaryActivity = primaryTf.getTopMostActivity();
final ActivityRecord secondaryActivity = secondaryTf.getTopMostActivity();
primaryTf.setAdjacentTaskFragment(secondaryTf);
secondaryTf.setAdjacentTaskFragment(primaryTf);
- final WindowState windowState = mock(WindowState.class);
- windowState.mActivityRecord = primaryActivity;
- doReturn(windowState).when(mWm).getFocusedWindowLocked();
- doReturn(primaryTf).when(windowState).getTaskFragment();
+ final WindowState primaryWindow = mock(WindowState.class);
+ final WindowState secondaryWindow = mock(WindowState.class);
+ doReturn(primaryActivity).when(primaryWindow).getActivityRecord();
+ doReturn(secondaryActivity).when(secondaryWindow).getActivityRecord();
doReturn(1L).when(primaryActivity).getLastWindowCreateTime();
doReturn(2L).when(secondaryActivity).getLastWindowCreateTime();
+ doReturn(mDisplayContent).when(primaryActivity).getDisplayContent();
+ doReturn(secondaryWindow).when(mDisplayContent).findFocusedWindow(eq(secondaryActivity));
- startBackNavigation();
- verify(mWm).moveFocusToActivity(eq(secondaryActivity));
+ final WindowState mostRecentUsedWindow =
+ mWm.getMostRecentUsedEmbeddedWindowForBack(primaryWindow);
+ assertThat(mostRecentUsedWindow).isEqualTo(secondaryWindow);
}
/**
diff --git a/services/tests/wmtests/src/com/android/server/wm/BackgroundLaunchProcessControllerTests.java b/services/tests/wmtests/src/com/android/server/wm/BackgroundLaunchProcessControllerTests.java
index a4df03447754..c9c7e92d71cd 100644
--- a/services/tests/wmtests/src/com/android/server/wm/BackgroundLaunchProcessControllerTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/BackgroundLaunchProcessControllerTests.java
@@ -18,9 +18,11 @@ package com.android.server.wm;
import static com.android.server.wm.ActivityTaskManagerService.APP_SWITCH_ALLOW;
import static com.android.server.wm.ActivityTaskManagerService.APP_SWITCH_DISALLOW;
+import static com.android.server.wm.BackgroundActivityStartController.BAL_ALLOW_BOUND_BY_FOREGROUND;
import static com.android.server.wm.BackgroundActivityStartController.BAL_ALLOW_FOREGROUND;
import static com.android.server.wm.BackgroundActivityStartController.BAL_ALLOW_GRACE_PERIOD;
import static com.android.server.wm.BackgroundActivityStartController.BAL_ALLOW_PERMISSION;
+import static com.android.server.wm.BackgroundActivityStartController.BAL_ALLOW_TOKEN;
import static com.android.server.wm.BackgroundActivityStartController.BAL_ALLOW_VISIBLE_WINDOW;
import static com.android.server.wm.BackgroundActivityStartController.BAL_BLOCK;
@@ -30,12 +32,18 @@ import android.app.BackgroundStartPrivileges;
import android.content.Context;
import android.os.Binder;
import android.os.IBinder;
+import android.platform.test.annotations.DisableFlags;
+import android.platform.test.annotations.EnableFlags;
import android.platform.test.annotations.Presubmit;
+import android.platform.test.flag.junit.SetFlagsRule;
import androidx.test.filters.SmallTest;
import com.android.server.wm.BackgroundActivityStartController.BalVerdict;
+import com.android.window.flags.Flags;
+import org.junit.ClassRule;
+import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
@@ -44,6 +52,7 @@ import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
+
/**
* Tests for the {@link BackgroundLaunchProcessController} class.
*
@@ -55,6 +64,10 @@ import java.util.Set;
@RunWith(JUnit4.class)
public class BackgroundLaunchProcessControllerTests {
+
+ @ClassRule public static final SetFlagsRule.ClassRule mClassRule = new SetFlagsRule.ClassRule();
+ @Rule public final SetFlagsRule mSetFlagsRule = mClassRule.createSetFlagsRule();
+
Set<IBinder> mActivityStartAllowed = new HashSet<>();
Set<Integer> mHasActiveVisibleWindow = new HashSet<>();
@@ -113,6 +126,25 @@ public class BackgroundLaunchProcessControllerTests {
}
@Test
+ @DisableFlags(Flags.FLAG_BAL_IMPROVED_METRICS)
+ public void testAllowedByTokenNoCallbackOld() {
+ mController = new BackgroundLaunchProcessController(mHasActiveVisibleWindow::contains,
+ null);
+ Binder token = new Binder();
+ mActivityStartAllowed.add(token);
+ mController.addOrUpdateAllowBackgroundStartPrivileges(token,
+ BackgroundStartPrivileges.ALLOW_BAL);
+ BalVerdict balVerdict = mController.areBackgroundActivityStartsAllowed(
+ mPid, mUid, mPackageName,
+ mAppSwitchState, mIsCheckingForFgsStart,
+ mHasActivityInVisibleTask, mHasBackgroundActivityStartPrivileges,
+ mLastStopAppSwitchesTime, mLastActivityLaunchTime,
+ mLastActivityFinishTime);
+ assertThat(balVerdict.getCode()).isEqualTo(BAL_ALLOW_PERMISSION);
+ }
+
+ @Test
+ @EnableFlags(Flags.FLAG_BAL_IMPROVED_METRICS)
public void testAllowedByTokenNoCallback() {
mController = new BackgroundLaunchProcessController(mHasActiveVisibleWindow::contains,
null);
@@ -126,10 +158,27 @@ public class BackgroundLaunchProcessControllerTests {
mHasActivityInVisibleTask, mHasBackgroundActivityStartPrivileges,
mLastStopAppSwitchesTime, mLastActivityLaunchTime,
mLastActivityFinishTime);
+ assertThat(balVerdict.getCode()).isEqualTo(BAL_ALLOW_TOKEN);
+ }
+
+ @Test
+ @DisableFlags(Flags.FLAG_BAL_IMPROVED_METRICS)
+ public void testAllowedByTokenOld() {
+ Binder token = new Binder();
+ mActivityStartAllowed.add(token);
+ mController.addOrUpdateAllowBackgroundStartPrivileges(token,
+ BackgroundStartPrivileges.ALLOW_BAL);
+ BalVerdict balVerdict = mController.areBackgroundActivityStartsAllowed(
+ mPid, mUid, mPackageName,
+ mAppSwitchState, mIsCheckingForFgsStart,
+ mHasActivityInVisibleTask, mHasBackgroundActivityStartPrivileges,
+ mLastStopAppSwitchesTime, mLastActivityLaunchTime,
+ mLastActivityFinishTime);
assertThat(balVerdict.getCode()).isEqualTo(BAL_ALLOW_PERMISSION);
}
@Test
+ @EnableFlags(Flags.FLAG_BAL_IMPROVED_METRICS)
public void testAllowedByToken() {
Binder token = new Binder();
mActivityStartAllowed.add(token);
@@ -141,11 +190,12 @@ public class BackgroundLaunchProcessControllerTests {
mHasActivityInVisibleTask, mHasBackgroundActivityStartPrivileges,
mLastStopAppSwitchesTime, mLastActivityLaunchTime,
mLastActivityFinishTime);
- assertThat(balVerdict.getCode()).isEqualTo(BAL_ALLOW_PERMISSION);
+ assertThat(balVerdict.getCode()).isEqualTo(BAL_ALLOW_TOKEN);
}
@Test
- public void testBoundByForeground() {
+ @DisableFlags(Flags.FLAG_BAL_IMPROVED_METRICS)
+ public void testBoundByForegroundOld() {
mAppSwitchState = APP_SWITCH_ALLOW;
mController.addBoundClientUid(999, "visible.package", Context.BIND_ALLOW_ACTIVITY_STARTS);
mHasActiveVisibleWindow.add(999);
@@ -159,6 +209,21 @@ public class BackgroundLaunchProcessControllerTests {
}
@Test
+ @EnableFlags(Flags.FLAG_BAL_IMPROVED_METRICS)
+ public void testBoundByForeground() {
+ mAppSwitchState = APP_SWITCH_ALLOW;
+ mController.addBoundClientUid(999, "visible.package", Context.BIND_ALLOW_ACTIVITY_STARTS);
+ mHasActiveVisibleWindow.add(999);
+ BalVerdict balVerdict = mController.areBackgroundActivityStartsAllowed(
+ mPid, mUid, mPackageName,
+ mAppSwitchState, mIsCheckingForFgsStart,
+ mHasActivityInVisibleTask, mHasBackgroundActivityStartPrivileges,
+ mLastStopAppSwitchesTime, mLastActivityLaunchTime,
+ mLastActivityFinishTime);
+ assertThat(balVerdict.getCode()).isEqualTo(BAL_ALLOW_BOUND_BY_FOREGROUND);
+ }
+
+ @Test
public void testForegroundTask() {
mAppSwitchState = APP_SWITCH_ALLOW;
mHasActivityInVisibleTask = true;
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 564c29f09bc9..eaa164127551 100644
--- a/services/tests/wmtests/src/com/android/server/wm/CameraCompatFreeformPolicyTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/CameraCompatFreeformPolicyTests.java
@@ -23,7 +23,6 @@ import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
import static android.content.pm.ActivityInfo.OVERRIDE_CAMERA_COMPAT_DISABLE_FREEFORM_WINDOWING_TREATMENT;
import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
-import static android.content.res.Configuration.ORIENTATION_LANDSCAPE;
import static android.content.res.Configuration.ORIENTATION_PORTRAIT;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.doAnswer;
@@ -89,7 +88,7 @@ public class CameraCompatFreeformPolicyTests extends WindowTestsBase {
private static final String CAMERA_ID_2 = "camera-2";
private CameraManager mMockCameraManager;
private Handler mMockHandler;
- private LetterboxConfiguration mLetterboxConfiguration;
+ private AppCompatConfiguration mAppCompatConfiguration;
private CameraManager.AvailabilityCallback mCameraAvailabilityCallback;
private CameraCompatFreeformPolicy mCameraCompatFreeformPolicy;
@@ -99,13 +98,13 @@ public class CameraCompatFreeformPolicyTests extends WindowTestsBase {
@Before
public void setUp() throws Exception {
- mLetterboxConfiguration = mDisplayContent.mWmService.mLetterboxConfiguration;
- spyOn(mLetterboxConfiguration);
- when(mLetterboxConfiguration.isCameraCompatTreatmentEnabled())
+ mAppCompatConfiguration = mDisplayContent.mWmService.mAppCompatConfiguration;
+ spyOn(mAppCompatConfiguration);
+ when(mAppCompatConfiguration.isCameraCompatTreatmentEnabled())
.thenReturn(true);
- when(mLetterboxConfiguration.isCameraCompatRefreshEnabled())
+ when(mAppCompatConfiguration.isCameraCompatRefreshEnabled())
.thenReturn(true);
- when(mLetterboxConfiguration.isCameraCompatRefreshCycleThroughStopEnabled())
+ when(mAppCompatConfiguration.isCameraCompatRefreshCycleThroughStopEnabled())
.thenReturn(true);
mMockCameraManager = mock(CameraManager.class);
@@ -176,22 +175,9 @@ public class CameraCompatFreeformPolicyTests extends WindowTestsBase {
configureActivity(SCREEN_ORIENTATION_PORTRAIT);
mCameraAvailabilityCallback.onCameraOpened(CAMERA_ID_1, TEST_PACKAGE_1);
- mCameraAvailabilityCallback.onCameraClosed(CAMERA_ID_1);
- mCameraAvailabilityCallback.onCameraOpened(CAMERA_ID_1, TEST_PACKAGE_1);
callOnActivityConfigurationChanging(mActivity);
-
- assertInCameraCompatMode();
- assertActivityRefreshRequested(/* refreshRequested */ true);
- }
-
- @Test
- public void testReconnectedToDifferentCamera_activatesCameraCompatModeAndRefresh()
- throws Exception {
- configureActivity(SCREEN_ORIENTATION_PORTRAIT);
-
- mCameraAvailabilityCallback.onCameraOpened(CAMERA_ID_1, TEST_PACKAGE_1);
mCameraAvailabilityCallback.onCameraClosed(CAMERA_ID_1);
- mCameraAvailabilityCallback.onCameraOpened(CAMERA_ID_2, TEST_PACKAGE_1);
+ mCameraAvailabilityCallback.onCameraOpened(CAMERA_ID_1, TEST_PACKAGE_1);
callOnActivityConfigurationChanging(mActivity);
assertInCameraCompatMode();
@@ -199,20 +185,6 @@ public class CameraCompatFreeformPolicyTests extends WindowTestsBase {
}
@Test
- public void testCameraDisconnected_deactivatesCameraCompatMode() {
- configureActivityAndDisplay(SCREEN_ORIENTATION_PORTRAIT, ORIENTATION_LANDSCAPE,
- WINDOWING_MODE_FREEFORM);
- // Open camera and test for compat treatment
- mCameraAvailabilityCallback.onCameraOpened(CAMERA_ID_1, TEST_PACKAGE_1);
- assertInCameraCompatMode();
-
- // Close camera and test for revert
- mCameraAvailabilityCallback.onCameraClosed(CAMERA_ID_1);
-
- assertNotInCameraCompatMode();
- }
-
- @Test
public void testCameraOpenedForDifferentPackage_notInCameraCompatMode() {
configureActivity(SCREEN_ORIENTATION_PORTRAIT);
@@ -256,7 +228,7 @@ public class CameraCompatFreeformPolicyTests extends WindowTestsBase {
@Test
public void testOnActivityConfigurationChanging_cycleThroughStopDisabled() throws Exception {
- when(mLetterboxConfiguration.isCameraCompatRefreshCycleThroughStopEnabled())
+ when(mAppCompatConfiguration.isCameraCompatRefreshCycleThroughStopEnabled())
.thenReturn(false);
configureActivity(SCREEN_ORIENTATION_PORTRAIT);
diff --git a/services/tests/wmtests/src/com/android/server/wm/CameraStateMonitorTests.java b/services/tests/wmtests/src/com/android/server/wm/CameraStateMonitorTests.java
index e468fd8ee495..12f5714f91c7 100644
--- a/services/tests/wmtests/src/com/android/server/wm/CameraStateMonitorTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/CameraStateMonitorTests.java
@@ -60,7 +60,7 @@ public final class CameraStateMonitorTests extends WindowTestsBase {
private static final String TEST_PACKAGE_1_LABEL = "testPackage1";
private CameraManager mMockCameraManager;
private Handler mMockHandler;
- private LetterboxConfiguration mLetterboxConfiguration;
+ private AppCompatConfiguration mAppCompatConfiguration;
private CameraStateMonitor mCameraStateMonitor;
private CameraManager.AvailabilityCallback mCameraAvailabilityCallback;
@@ -88,13 +88,13 @@ public final class CameraStateMonitorTests extends WindowTestsBase {
@Before
public void setUp() throws Exception {
- mLetterboxConfiguration = mDisplayContent.mWmService.mLetterboxConfiguration;
- spyOn(mLetterboxConfiguration);
- when(mLetterboxConfiguration.isCameraCompatTreatmentEnabled())
+ mAppCompatConfiguration = mDisplayContent.mWmService.mAppCompatConfiguration;
+ spyOn(mAppCompatConfiguration);
+ when(mAppCompatConfiguration.isCameraCompatTreatmentEnabled())
.thenReturn(true);
- when(mLetterboxConfiguration.isCameraCompatRefreshEnabled())
+ when(mAppCompatConfiguration.isCameraCompatRefreshEnabled())
.thenReturn(true);
- when(mLetterboxConfiguration.isCameraCompatRefreshCycleThroughStopEnabled())
+ when(mAppCompatConfiguration.isCameraCompatRefreshCycleThroughStopEnabled())
.thenReturn(true);
mMockCameraManager = mock(CameraManager.class);
@@ -256,8 +256,7 @@ public final class CameraStateMonitorTests extends WindowTestsBase {
}
@Override
- public boolean onCameraClosed(@NonNull ActivityRecord cameraActivity,
- @NonNull String cameraId) {
+ public boolean onCameraClosed(@NonNull String cameraId) {
mOnCameraClosedCounter++;
boolean returnValue = mOnCameraClosedReturnValue;
// If false, return false only the first time, so it doesn't fall in the infinite retry
diff --git a/services/tests/wmtests/src/com/android/server/wm/DesktopModeLaunchParamsModifierTests.java b/services/tests/wmtests/src/com/android/server/wm/DesktopModeLaunchParamsModifierTests.java
index a4bec64bdf97..b687042edfc3 100644
--- a/services/tests/wmtests/src/com/android/server/wm/DesktopModeLaunchParamsModifierTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/DesktopModeLaunchParamsModifierTests.java
@@ -21,9 +21,19 @@ import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_UNDEFINED;
import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM;
import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
+import static android.content.pm.ActivityInfo.RESIZE_MODE_RESIZEABLE;
+import static android.content.pm.ActivityInfo.RESIZE_MODE_UNRESIZEABLE;
+import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
+import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
+import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
+import static android.content.res.Configuration.ORIENTATION_LANDSCAPE;
+import static android.content.res.Configuration.ORIENTATION_PORTRAIT;
+import static android.util.DisplayMetrics.DENSITY_DEFAULT;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.doReturn;
-import static com.android.server.wm.DesktopModeLaunchParamsModifier.DESKTOP_MODE_INITIAL_BOUNDS_SCALE;
+import static com.android.server.wm.DesktopModeBoundsCalculator.DESKTOP_MODE_INITIAL_BOUNDS_SCALE;
+import static com.android.server.wm.DesktopModeBoundsCalculator.DESKTOP_MODE_LANDSCAPE_APP_PADDING;
+import static com.android.server.wm.DesktopModeBoundsCalculator.calculateAspectRatio;
import static com.android.server.wm.LaunchParamsController.LaunchParamsModifier.PHASE_DISPLAY;
import static com.android.server.wm.LaunchParamsController.LaunchParamsModifier.RESULT_CONTINUE;
import static com.android.server.wm.LaunchParamsController.LaunchParamsModifier.RESULT_SKIP;
@@ -59,6 +69,10 @@ import org.junit.runner.RunWith;
@RunWith(WindowTestRunner.class)
public class DesktopModeLaunchParamsModifierTests extends
LaunchParamsModifierTestsBase<DesktopModeLaunchParamsModifier> {
+ private static final Rect LANDSCAPE_DISPLAY_BOUNDS = new Rect(0, 0, 2560, 1600);
+ private static final Rect PORTRAIT_DISPLAY_BOUNDS = new Rect(0, 0, 1600, 2560);
+ private static final float LETTERBOX_ASPECT_RATIO = 1.3f;
+
@Before
public void setUp() throws Exception {
mActivity = new ActivityBuilder(mAtm).build();
@@ -158,6 +172,7 @@ public class DesktopModeLaunchParamsModifierTests extends
@Test
@EnableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_MODE)
+ @DisableFlags(Flags.FLAG_ENABLE_WINDOWING_DYNAMIC_INITIAL_BOUNDS)
public void testUsesDesiredBoundsIfEmptyLayoutAndActivityOptionsBounds() {
setupDesktopModeLaunchParamsModifier();
@@ -166,9 +181,212 @@ public class DesktopModeLaunchParamsModifierTests extends
ACTIVITY_TYPE_STANDARD).setDisplay(display).build();
final int desiredWidth =
- (int) (DISPLAY_STABLE_BOUNDS.width() * DESKTOP_MODE_INITIAL_BOUNDS_SCALE);
+ (int) (DISPLAY_BOUNDS.width() * DESKTOP_MODE_INITIAL_BOUNDS_SCALE);
+ final int desiredHeight =
+ (int) (DISPLAY_BOUNDS.height() * DESKTOP_MODE_INITIAL_BOUNDS_SCALE);
+
+ assertEquals(RESULT_CONTINUE, new CalculateRequestBuilder().setTask(task).calculate());
+ assertEquals(desiredWidth, mResult.mBounds.width());
+ assertEquals(desiredHeight, mResult.mBounds.height());
+ }
+
+ @Test
+ @EnableFlags({Flags.FLAG_ENABLE_DESKTOP_WINDOWING_MODE,
+ Flags.FLAG_ENABLE_WINDOWING_DYNAMIC_INITIAL_BOUNDS})
+ public void testDefaultLandscapeBounds_landscapeDevice_resizable_undefinedOrientation() {
+ setupDesktopModeLaunchParamsModifier();
+
+ final TestDisplayContent display = createDisplayContent(ORIENTATION_LANDSCAPE,
+ LANDSCAPE_DISPLAY_BOUNDS);
+ final Task task = createTask(display, SCREEN_ORIENTATION_UNSPECIFIED, true);
+
+ final int desiredWidth =
+ (int) (LANDSCAPE_DISPLAY_BOUNDS.width() * DESKTOP_MODE_INITIAL_BOUNDS_SCALE);
+ final int desiredHeight =
+ (int) (LANDSCAPE_DISPLAY_BOUNDS.height() * DESKTOP_MODE_INITIAL_BOUNDS_SCALE);
+
+ assertEquals(RESULT_CONTINUE, new CalculateRequestBuilder().setTask(task).calculate());
+ assertEquals(desiredWidth, mResult.mBounds.width());
+ assertEquals(desiredHeight, mResult.mBounds.height());
+ }
+
+ @Test
+ @EnableFlags({Flags.FLAG_ENABLE_DESKTOP_WINDOWING_MODE,
+ Flags.FLAG_ENABLE_WINDOWING_DYNAMIC_INITIAL_BOUNDS})
+ public void testDefaultLandscapeBounds_landscapeDevice_resizable_landscapeOrientation() {
+ setupDesktopModeLaunchParamsModifier();
+
+ final TestDisplayContent display = createDisplayContent(ORIENTATION_LANDSCAPE,
+ LANDSCAPE_DISPLAY_BOUNDS);
+ final Task task = createTask(display, SCREEN_ORIENTATION_LANDSCAPE, true);
+
+ final int desiredWidth =
+ (int) (LANDSCAPE_DISPLAY_BOUNDS.width() * DESKTOP_MODE_INITIAL_BOUNDS_SCALE);
+ final int desiredHeight =
+ (int) (LANDSCAPE_DISPLAY_BOUNDS.height() * DESKTOP_MODE_INITIAL_BOUNDS_SCALE);
+
+ assertEquals(RESULT_CONTINUE, new CalculateRequestBuilder().setTask(task).calculate());
+ assertEquals(desiredWidth, mResult.mBounds.width());
+ assertEquals(desiredHeight, mResult.mBounds.height());
+ }
+
+ @Test
+ @EnableFlags(Flags.FLAG_ENABLE_WINDOWING_DYNAMIC_INITIAL_BOUNDS)
+ public void testResizablePortraitBounds_landscapeDevice_resizable_portraitOrientation() {
+ setupDesktopModeLaunchParamsModifier();
+ doReturn(LETTERBOX_ASPECT_RATIO).when(()
+ -> calculateAspectRatio(any(), any()));
+
+ final TestDisplayContent display = createDisplayContent(ORIENTATION_LANDSCAPE,
+ LANDSCAPE_DISPLAY_BOUNDS);
+ final Task task = createTask(display, SCREEN_ORIENTATION_PORTRAIT, true);
+
+ final int desiredWidth =
+ (int) ((LANDSCAPE_DISPLAY_BOUNDS.height() / LETTERBOX_ASPECT_RATIO) + 0.5f);
+ final int desiredHeight =
+ (int) (LANDSCAPE_DISPLAY_BOUNDS.height() * DESKTOP_MODE_INITIAL_BOUNDS_SCALE);
+
+ assertEquals(RESULT_CONTINUE, new CalculateRequestBuilder().setTask(task).calculate());
+ assertEquals(desiredWidth, mResult.mBounds.width());
+ assertEquals(desiredHeight, mResult.mBounds.height());
+ }
+
+ @Test
+ @EnableFlags({Flags.FLAG_ENABLE_DESKTOP_WINDOWING_MODE,
+ Flags.FLAG_ENABLE_WINDOWING_DYNAMIC_INITIAL_BOUNDS})
+ public void testDefaultLandscapeBounds_landscapeDevice_unResizable_landscapeOrientation() {
+ setupDesktopModeLaunchParamsModifier();
+
+ final TestDisplayContent display = createDisplayContent(ORIENTATION_LANDSCAPE,
+ LANDSCAPE_DISPLAY_BOUNDS);
+ final Task task = createTask(display, SCREEN_ORIENTATION_LANDSCAPE, false);
+
+ final int desiredWidth =
+ (int) (LANDSCAPE_DISPLAY_BOUNDS.width() * DESKTOP_MODE_INITIAL_BOUNDS_SCALE);
+ final int desiredHeight =
+ (int) (LANDSCAPE_DISPLAY_BOUNDS.height() * DESKTOP_MODE_INITIAL_BOUNDS_SCALE);
+
+ assertEquals(RESULT_CONTINUE, new CalculateRequestBuilder().setTask(task).calculate());
+ assertEquals(desiredWidth, mResult.mBounds.width());
+ assertEquals(desiredHeight, mResult.mBounds.height());
+ }
+
+ @Test
+ @EnableFlags(Flags.FLAG_ENABLE_WINDOWING_DYNAMIC_INITIAL_BOUNDS)
+ public void testUnResizablePortraitBounds_landscapeDevice_unResizable_portraitOrientation() {
+ setupDesktopModeLaunchParamsModifier();
+ doReturn(LETTERBOX_ASPECT_RATIO).when(()
+ -> calculateAspectRatio(any(), any()));
+
+ final TestDisplayContent display = createDisplayContent(ORIENTATION_LANDSCAPE,
+ LANDSCAPE_DISPLAY_BOUNDS);
+ final Task task = createTask(display, SCREEN_ORIENTATION_PORTRAIT, false);
+
+ final int desiredHeight =
+ (int) (LANDSCAPE_DISPLAY_BOUNDS.height() * DESKTOP_MODE_INITIAL_BOUNDS_SCALE);
+ final int desiredWidth = (int) (desiredHeight / LETTERBOX_ASPECT_RATIO);
+
+ assertEquals(RESULT_CONTINUE, new CalculateRequestBuilder().setTask(task).calculate());
+ assertEquals(desiredWidth, mResult.mBounds.width());
+ assertEquals(desiredHeight, mResult.mBounds.height());
+ }
+
+ @Test
+ @EnableFlags({Flags.FLAG_ENABLE_DESKTOP_WINDOWING_MODE,
+ Flags.FLAG_ENABLE_WINDOWING_DYNAMIC_INITIAL_BOUNDS})
+ public void testDefaultPortraitBounds_portraitDevice_resizable_undefinedOrientation() {
+ setupDesktopModeLaunchParamsModifier();
+
+ final TestDisplayContent display = createDisplayContent(ORIENTATION_PORTRAIT,
+ PORTRAIT_DISPLAY_BOUNDS);
+ final Task task = createTask(display, SCREEN_ORIENTATION_UNSPECIFIED, true);
+
+ final int desiredWidth =
+ (int) (PORTRAIT_DISPLAY_BOUNDS.width() * DESKTOP_MODE_INITIAL_BOUNDS_SCALE);
+ final int desiredHeight =
+ (int) (PORTRAIT_DISPLAY_BOUNDS.height() * DESKTOP_MODE_INITIAL_BOUNDS_SCALE);
+
+ assertEquals(RESULT_CONTINUE, new CalculateRequestBuilder().setTask(task).calculate());
+ assertEquals(desiredWidth, mResult.mBounds.width());
+ assertEquals(desiredHeight, mResult.mBounds.height());
+ }
+
+ @Test
+ @EnableFlags({Flags.FLAG_ENABLE_DESKTOP_WINDOWING_MODE,
+ Flags.FLAG_ENABLE_WINDOWING_DYNAMIC_INITIAL_BOUNDS})
+ public void testDefaultPortraitBounds_portraitDevice_resizable_portraitOrientation() {
+ setupDesktopModeLaunchParamsModifier();
+
+ final TestDisplayContent display = createDisplayContent(ORIENTATION_PORTRAIT,
+ PORTRAIT_DISPLAY_BOUNDS);
+ final Task task = createTask(display, SCREEN_ORIENTATION_PORTRAIT, true);
+
+ final int desiredWidth =
+ (int) (PORTRAIT_DISPLAY_BOUNDS.width() * DESKTOP_MODE_INITIAL_BOUNDS_SCALE);
final int desiredHeight =
- (int) (DISPLAY_STABLE_BOUNDS.height() * DESKTOP_MODE_INITIAL_BOUNDS_SCALE);
+ (int) (PORTRAIT_DISPLAY_BOUNDS.height() * DESKTOP_MODE_INITIAL_BOUNDS_SCALE);
+
+ assertEquals(RESULT_CONTINUE, new CalculateRequestBuilder().setTask(task).calculate());
+ assertEquals(desiredWidth, mResult.mBounds.width());
+ assertEquals(desiredHeight, mResult.mBounds.height());
+ }
+
+ @Test
+ @EnableFlags(Flags.FLAG_ENABLE_WINDOWING_DYNAMIC_INITIAL_BOUNDS)
+ public void testResizableLandscapeBounds_portraitDevice_resizable_landscapeOrientation() {
+ setupDesktopModeLaunchParamsModifier();
+ doReturn(LETTERBOX_ASPECT_RATIO).when(()
+ -> calculateAspectRatio(any(), any()));
+
+ final TestDisplayContent display = createDisplayContent(ORIENTATION_PORTRAIT,
+ PORTRAIT_DISPLAY_BOUNDS);
+ final Task task = createTask(display, SCREEN_ORIENTATION_LANDSCAPE, true);
+
+ final int desiredWidth = PORTRAIT_DISPLAY_BOUNDS.width()
+ - (DESKTOP_MODE_LANDSCAPE_APP_PADDING * 2);
+ final int desiredHeight = (int)
+ ((PORTRAIT_DISPLAY_BOUNDS.width() / LETTERBOX_ASPECT_RATIO) + 0.5f);
+
+ assertEquals(RESULT_CONTINUE, new CalculateRequestBuilder().setTask(task).calculate());
+ assertEquals(desiredWidth, mResult.mBounds.width());
+ assertEquals(desiredHeight, mResult.mBounds.height());
+ }
+
+ @Test
+ @EnableFlags({Flags.FLAG_ENABLE_DESKTOP_WINDOWING_MODE,
+ Flags.FLAG_ENABLE_WINDOWING_DYNAMIC_INITIAL_BOUNDS})
+ public void testDefaultPortraitBounds_portraitDevice_unResizable_portraitOrientation() {
+ setupDesktopModeLaunchParamsModifier();
+
+ final TestDisplayContent display = createDisplayContent(ORIENTATION_PORTRAIT,
+ PORTRAIT_DISPLAY_BOUNDS);
+ final Task task = createTask(display, SCREEN_ORIENTATION_PORTRAIT, false);
+
+ final int desiredWidth =
+ (int) (PORTRAIT_DISPLAY_BOUNDS.width() * DESKTOP_MODE_INITIAL_BOUNDS_SCALE);
+ final int desiredHeight =
+ (int) (PORTRAIT_DISPLAY_BOUNDS.height() * DESKTOP_MODE_INITIAL_BOUNDS_SCALE);
+
+ assertEquals(RESULT_CONTINUE, new CalculateRequestBuilder().setTask(task).calculate());
+ assertEquals(desiredWidth, mResult.mBounds.width());
+ assertEquals(desiredHeight, mResult.mBounds.height());
+ }
+
+ @Test
+ @EnableFlags(Flags.FLAG_ENABLE_WINDOWING_DYNAMIC_INITIAL_BOUNDS)
+ public void testUnResizableLandscapeBounds_portraitDevice_unResizable_landscapeOrientation() {
+ setupDesktopModeLaunchParamsModifier();
+ doReturn(LETTERBOX_ASPECT_RATIO).when(()
+ -> calculateAspectRatio(any(), any()));
+
+ final TestDisplayContent display = createDisplayContent(ORIENTATION_PORTRAIT,
+ PORTRAIT_DISPLAY_BOUNDS);
+ final Task task = createTask(display, SCREEN_ORIENTATION_LANDSCAPE, false);
+
+ final int desiredWidth = PORTRAIT_DISPLAY_BOUNDS.width()
+ - (DESKTOP_MODE_LANDSCAPE_APP_PADDING * 2);
+ final int desiredHeight = (int) (desiredWidth / LETTERBOX_ASPECT_RATIO);
+
assertEquals(RESULT_CONTINUE, new CalculateRequestBuilder().setTask(task).calculate());
assertEquals(desiredWidth, mResult.mBounds.width());
assertEquals(desiredHeight, mResult.mBounds.height());
@@ -192,6 +410,7 @@ public class DesktopModeLaunchParamsModifierTests extends
}
@Test
+ @EnableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_MODE)
public void testNonEmptyLayoutBounds_CenterToDisplay() {
setupDesktopModeLaunchParamsModifier();
@@ -207,6 +426,7 @@ public class DesktopModeLaunchParamsModifierTests extends
}
@Test
+ @EnableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_MODE)
public void testNonEmptyLayoutBounds_LeftGravity() {
setupDesktopModeLaunchParamsModifier();
@@ -222,6 +442,7 @@ public class DesktopModeLaunchParamsModifierTests extends
}
@Test
+ @EnableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_MODE)
public void testNonEmptyLayoutBounds_TopGravity() {
setupDesktopModeLaunchParamsModifier();
@@ -237,6 +458,7 @@ public class DesktopModeLaunchParamsModifierTests extends
}
@Test
+ @EnableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_MODE)
public void testNonEmptyLayoutBounds_TopLeftGravity() {
setupDesktopModeLaunchParamsModifier();
@@ -252,6 +474,7 @@ public class DesktopModeLaunchParamsModifierTests extends
}
@Test
+ @EnableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_MODE)
public void testNonEmptyLayoutBounds_RightGravity() {
setupDesktopModeLaunchParamsModifier();
@@ -267,6 +490,7 @@ public class DesktopModeLaunchParamsModifierTests extends
}
@Test
+ @EnableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_MODE)
public void testNonEmptyLayoutBounds_BottomGravity() {
setupDesktopModeLaunchParamsModifier();
@@ -282,6 +506,7 @@ public class DesktopModeLaunchParamsModifierTests extends
}
@Test
+ @EnableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_MODE)
public void testNonEmptyLayoutBounds_RightBottomGravity() {
setupDesktopModeLaunchParamsModifier();
@@ -297,6 +522,7 @@ public class DesktopModeLaunchParamsModifierTests extends
}
@Test
+ @EnableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_MODE)
public void testNonEmptyLayoutFractionBounds() {
setupDesktopModeLaunchParamsModifier();
@@ -312,6 +538,7 @@ public class DesktopModeLaunchParamsModifierTests extends
}
@Test
+ @EnableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_MODE)
public void testNonEmptyLayoutBoundsRespectsGravityWithEmptySize_LeftGravity() {
setupDesktopModeLaunchParamsModifier();
@@ -327,6 +554,7 @@ public class DesktopModeLaunchParamsModifierTests extends
}
@Test
+ @EnableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_MODE)
public void testNonEmptyLayoutBoundsRespectsGravityWithEmptySize_TopGravity() {
setupDesktopModeLaunchParamsModifier();
@@ -342,6 +570,7 @@ public class DesktopModeLaunchParamsModifierTests extends
}
@Test
+ @EnableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_MODE)
public void testNonEmptyLayoutBoundsRespectsGravityWithEmptySize_TopLeftGravity() {
setupDesktopModeLaunchParamsModifier();
@@ -359,6 +588,7 @@ public class DesktopModeLaunchParamsModifierTests extends
}
@Test
+ @EnableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_MODE)
public void testNonEmptyLayoutBoundsRespectsGravityWithEmptySize_RightGravity() {
setupDesktopModeLaunchParamsModifier();
@@ -374,6 +604,7 @@ public class DesktopModeLaunchParamsModifierTests extends
}
@Test
+ @EnableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_MODE)
public void testNonEmptyLayoutBoundsRespectsGravityWithEmptySize_BottomGravity() {
setupDesktopModeLaunchParamsModifier();
@@ -389,6 +620,7 @@ public class DesktopModeLaunchParamsModifierTests extends
}
@Test
+ @EnableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_MODE)
public void testNonEmptyLayoutBoundsRespectsGravityWithEmptySize_BottomRightGravity() {
setupDesktopModeLaunchParamsModifier();
@@ -422,6 +654,38 @@ public class DesktopModeLaunchParamsModifierTests extends
assertEquals(WINDOWING_MODE_FREEFORM, mResult.mWindowingMode);
}
+ private Task createTask(DisplayContent display, int orientation, Boolean isResizeable) {
+ final int resizeMode = isResizeable ? RESIZE_MODE_RESIZEABLE
+ : RESIZE_MODE_UNRESIZEABLE;
+ final Task task = new TaskBuilder(mSupervisor).setActivityType(
+ ACTIVITY_TYPE_STANDARD).setDisplay(display).build();
+ task.setResizeMode(resizeMode);
+ mActivity = new ActivityBuilder(task.mAtmService)
+ .setTask(task)
+ .setScreenOrientation(orientation)
+ .setOnTop(true).build();
+
+ mActivity.onDisplayChanged(display);
+ mActivity.setOccludesParent(true);
+ mActivity.setVisible(true);
+ mActivity.setVisibleRequested(true);
+ mActivity.mDisplayContent.setIgnoreOrientationRequest(/* ignoreOrientationRequest */ true);
+
+ return task;
+ }
+
+ private TestDisplayContent createDisplayContent(int orientation, Rect displayBounds) {
+ final TestDisplayContent display = new TestDisplayContent
+ .Builder(mAtm, displayBounds.width(), displayBounds.height())
+ .setPosition(DisplayContent.POSITION_TOP).build();
+ display.setBounds(displayBounds);
+ display.getConfiguration().densityDpi = DENSITY_DEFAULT;
+ display.getConfiguration().orientation = ORIENTATION_LANDSCAPE;
+ display.getDefaultTaskDisplayArea().setWindowingMode(orientation);
+
+ return display;
+ }
+
private void setupDesktopModeLaunchParamsModifier() {
setupDesktopModeLaunchParamsModifier(/*isDesktopModeSupported=*/ true,
/*enforceDeviceRestrictions=*/ true);
@@ -430,8 +694,8 @@ public class DesktopModeLaunchParamsModifierTests extends
private void setupDesktopModeLaunchParamsModifier(boolean isDesktopModeSupported,
boolean enforceDeviceRestrictions) {
doReturn(isDesktopModeSupported)
- .when(() -> DesktopModeLaunchParamsModifier.isDesktopModeSupported(any()));
+ .when(() -> DesktopModeHelper.isDesktopModeSupported(any()));
doReturn(enforceDeviceRestrictions)
- .when(DesktopModeLaunchParamsModifier::enforceDeviceRestrictions);
+ .when(DesktopModeHelper::shouldEnforceDeviceRestrictions);
}
}
diff --git a/services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java b/services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java
index 5739a04972d9..ab0c8d4ed60a 100644
--- a/services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java
@@ -1871,6 +1871,46 @@ public class DisplayContentTests extends WindowTestsBase {
assertFalse(recentsActivity.hasFixedRotationTransform());
}
+ @EnableFlags(com.android.window.flags.Flags.FLAG_RESPECT_NON_TOP_VISIBLE_FIXED_ORIENTATION)
+ @Test
+ public void testRespectNonTopVisibleFixedOrientation() {
+ spyOn(mWm.mAppCompatConfiguration);
+ doReturn(false).when(mWm.mAppCompatConfiguration).isTranslucentLetterboxingEnabled();
+ makeDisplayPortrait(mDisplayContent);
+ final ActivityRecord nonTopVisible = new ActivityBuilder(mAtm)
+ .setScreenOrientation(SCREEN_ORIENTATION_PORTRAIT)
+ .setCreateTask(true).build();
+ final ActivityRecord translucentTop = new ActivityBuilder(mAtm)
+ .setScreenOrientation(SCREEN_ORIENTATION_LANDSCAPE)
+ .setTask(nonTopVisible.getTask()).setVisible(false)
+ .setActivityTheme(android.R.style.Theme_Translucent).build();
+ final TestTransitionPlayer player = registerTestTransitionPlayer();
+ mDisplayContent.requestTransitionAndLegacyPrepare(WindowManager.TRANSIT_OPEN, 0);
+ translucentTop.setVisibility(true);
+ mDisplayContent.updateOrientation();
+ assertEquals("Non-top visible activity must be portrait",
+ Configuration.ORIENTATION_PORTRAIT, nonTopVisible.getConfiguration().orientation);
+ assertEquals("Top translucent activity must be landscape",
+ Configuration.ORIENTATION_LANDSCAPE, translucentTop.getConfiguration().orientation);
+
+ player.start();
+ player.finish();
+ assertEquals("Display must be landscape after the transition is finished",
+ Configuration.ORIENTATION_LANDSCAPE,
+ mDisplayContent.getConfiguration().orientation);
+ assertEquals("Non-top visible activity must still be portrait",
+ Configuration.ORIENTATION_PORTRAIT,
+ nonTopVisible.getConfiguration().orientation);
+
+ translucentTop.finishIfPossible("test", false /* oomAdj */);
+ mDisplayContent.updateOrientation();
+ player.start();
+ player.finish();
+ assertEquals("Display must be portrait after closing the translucent activity",
+ Configuration.ORIENTATION_PORTRAIT,
+ mDisplayContent.getConfiguration().orientation);
+ }
+
@Test
public void testSecondaryInternalDisplayRotationFollowsDefaultDisplay() {
// Skip freezing so the unrelated conditions in updateRotationUnchecked won't disturb.
@@ -2564,7 +2604,7 @@ public class DisplayContentTests extends WindowTestsBase {
// test misc display overrides
assertEquals(ignoreOrientationRequests, testDisplayContent.mSetIgnoreOrientationRequest);
assertEquals(fixedOrientationLetterboxRatio,
- mWm.mLetterboxConfiguration.getFixedOrientationLetterboxAspectRatio(),
+ mWm.mAppCompatConfiguration.getFixedOrientationLetterboxAspectRatio(),
0 /* delta */);
}
@@ -2607,7 +2647,7 @@ public class DisplayContentTests extends WindowTestsBase {
// test misc display overrides
assertEquals(ignoreOrientationRequests, testDisplayContent.mSetIgnoreOrientationRequest);
assertEquals(fixedOrientationLetterboxRatio,
- mWm.mLetterboxConfiguration.getFixedOrientationLetterboxAspectRatio(),
+ mWm.mAppCompatConfiguration.getFixedOrientationLetterboxAspectRatio(),
0 /* delta */);
}
@@ -2830,7 +2870,7 @@ public class DisplayContentTests extends WindowTestsBase {
@Test
public void cameraCompatFreeformFlagEnabled_cameraCompatFreeformPolicyNotNull() {
doReturn(true).when(() ->
- DesktopModeLaunchParamsModifier.canEnterDesktopMode(any()));
+ DesktopModeHelper.canEnterDesktopMode(any()));
assertTrue(createNewDisplay().mAppCompatCameraPolicy.hasCameraCompatFreeformPolicy());
}
@@ -2839,7 +2879,7 @@ public class DisplayContentTests extends WindowTestsBase {
@Test
public void cameraCompatFreeformFlagNotEnabled_cameraCompatFreeformPolicyIsNull() {
doReturn(true).when(() ->
- DesktopModeLaunchParamsModifier.canEnterDesktopMode(any()));
+ DesktopModeHelper.canEnterDesktopMode(any()));
assertFalse(createNewDisplay().mAppCompatCameraPolicy.hasCameraCompatFreeformPolicy());
}
diff --git a/services/tests/wmtests/src/com/android/server/wm/DisplayRotationCompatPolicyTests.java b/services/tests/wmtests/src/com/android/server/wm/DisplayRotationCompatPolicyTests.java
index d7814ac4da30..e9fcc4048fbc 100644
--- a/services/tests/wmtests/src/com/android/server/wm/DisplayRotationCompatPolicyTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/DisplayRotationCompatPolicyTests.java
@@ -90,7 +90,7 @@ public final class DisplayRotationCompatPolicyTests extends WindowTestsBase {
private static final String TEST_PACKAGE_1_LABEL = "testPackage1";
private CameraManager mMockCameraManager;
private Handler mMockHandler;
- private LetterboxConfiguration mLetterboxConfiguration;
+ private AppCompatConfiguration mAppCompatConfiguration;
private ActivityRefresher mActivityRefresher;
private DisplayRotationCompatPolicy mDisplayRotationCompatPolicy;
@@ -101,13 +101,13 @@ public final class DisplayRotationCompatPolicyTests extends WindowTestsBase {
@Before
public void setUp() throws Exception {
- mLetterboxConfiguration = mDisplayContent.mWmService.mLetterboxConfiguration;
- spyOn(mLetterboxConfiguration);
- when(mLetterboxConfiguration.isCameraCompatTreatmentEnabled())
+ mAppCompatConfiguration = mDisplayContent.mWmService.mAppCompatConfiguration;
+ spyOn(mAppCompatConfiguration);
+ when(mAppCompatConfiguration.isCameraCompatTreatmentEnabled())
.thenReturn(true);
- when(mLetterboxConfiguration.isCameraCompatRefreshEnabled())
+ when(mAppCompatConfiguration.isCameraCompatRefreshEnabled())
.thenReturn(true);
- when(mLetterboxConfiguration.isCameraCompatRefreshCycleThroughStopEnabled())
+ when(mAppCompatConfiguration.isCameraCompatRefreshCycleThroughStopEnabled())
.thenReturn(true);
mMockCameraManager = mock(CameraManager.class);
@@ -185,7 +185,7 @@ public final class DisplayRotationCompatPolicyTests extends WindowTestsBase {
@Test
public void testOnScreenRotationAnimationFinished_treatmentNotEnabled_doNotShowToast() {
- when(mLetterboxConfiguration.isCameraCompatTreatmentEnabled())
+ when(mAppCompatConfiguration.isCameraCompatTreatmentEnabled())
.thenReturn(false);
mDisplayRotationCompatPolicy.onScreenRotationAnimationFinished();
@@ -239,7 +239,7 @@ public final class DisplayRotationCompatPolicyTests extends WindowTestsBase {
@Test
public void testTreatmentNotEnabled_noForceRotationOrRefresh() throws Exception {
- when(mLetterboxConfiguration.isCameraCompatTreatmentEnabled())
+ when(mAppCompatConfiguration.isCameraCompatTreatmentEnabled())
.thenReturn(false);
configureActivity(SCREEN_ORIENTATION_PORTRAIT);
@@ -253,7 +253,7 @@ public final class DisplayRotationCompatPolicyTests extends WindowTestsBase {
@Test
public void testTreatmentDisabledViaDeviceConfig_noForceRotationOrRefresh() throws Exception {
- when(mLetterboxConfiguration.isCameraCompatTreatmentEnabled())
+ when(mAppCompatConfiguration.isCameraCompatTreatmentEnabled())
.thenReturn(false);
configureActivity(SCREEN_ORIENTATION_PORTRAIT);
@@ -480,7 +480,7 @@ public final class DisplayRotationCompatPolicyTests extends WindowTestsBase {
@Test
public void testOnActivityConfigurationChanging_refreshDisabledPerApp_noRefresh()
throws Exception {
- when(mLetterboxConfiguration.isCameraCompatRefreshEnabled()).thenReturn(false);
+ when(mAppCompatConfiguration.isCameraCompatRefreshEnabled()).thenReturn(false);
configureActivity(SCREEN_ORIENTATION_PORTRAIT);
@@ -519,7 +519,7 @@ public final class DisplayRotationCompatPolicyTests extends WindowTestsBase {
@Test
public void testOnActivityConfigurationChanging_cycleThroughStopDisabled() throws Exception {
- when(mLetterboxConfiguration.isCameraCompatRefreshCycleThroughStopEnabled())
+ when(mAppCompatConfiguration.isCameraCompatRefreshCycleThroughStopEnabled())
.thenReturn(false);
configureActivity(SCREEN_ORIENTATION_PORTRAIT);
diff --git a/services/tests/wmtests/src/com/android/server/wm/DisplayRotationImmersiveAppCompatPolicyTests.java b/services/tests/wmtests/src/com/android/server/wm/DisplayRotationImmersiveAppCompatPolicyTests.java
index b1057032eb36..5e8f347c0c6e 100644
--- a/services/tests/wmtests/src/com/android/server/wm/DisplayRotationImmersiveAppCompatPolicyTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/DisplayRotationImmersiveAppCompatPolicyTests.java
@@ -55,7 +55,7 @@ public class DisplayRotationImmersiveAppCompatPolicyTests extends WindowTestsBas
private DisplayRotationImmersiveAppCompatPolicy mPolicy;
- private LetterboxConfiguration mMockLetterboxConfiguration;
+ private AppCompatConfiguration mMockAppCompatConfiguration;
private ActivityRecord mMockActivityRecord;
private Task mMockTask;
private WindowState mMockWindowState;
@@ -77,15 +77,15 @@ public class DisplayRotationImmersiveAppCompatPolicyTests extends WindowTestsBas
doReturn(mMockActivityRecord).when(mDisplayContent).topRunningActivity();
when(mDisplayContent.getIgnoreOrientationRequest()).thenReturn(true);
- mMockLetterboxConfiguration = mock(LetterboxConfiguration.class);
- when(mMockLetterboxConfiguration.isDisplayRotationImmersiveAppCompatPolicyEnabled())
+ mMockAppCompatConfiguration = mock(AppCompatConfiguration.class);
+ when(mMockAppCompatConfiguration.isDisplayRotationImmersiveAppCompatPolicyEnabled())
.thenReturn(true);
- when(mMockLetterboxConfiguration
+ when(mMockAppCompatConfiguration
.isDisplayRotationImmersiveAppCompatPolicyEnabledAtBuildTime())
.thenReturn(true);
mPolicy = DisplayRotationImmersiveAppCompatPolicy.createIfNeeded(
- mMockLetterboxConfiguration, createDisplayRotationMock(),
+ mMockAppCompatConfiguration, createDisplayRotationMock(),
mDisplayContent);
}
@@ -206,7 +206,7 @@ public class DisplayRotationImmersiveAppCompatPolicyTests extends WindowTestsBas
@Test
public void testRotationChoiceEnforcedOnly_featureFlagDisabled_lockNotEnforced() {
- when(mMockLetterboxConfiguration.isDisplayRotationImmersiveAppCompatPolicyEnabled())
+ when(mMockAppCompatConfiguration.isDisplayRotationImmersiveAppCompatPolicyEnabled())
.thenReturn(false);
assertIsRotationLockEnforcedReturnsFalseForAllRotations();
diff --git a/services/tests/wmtests/src/com/android/server/wm/DragDropControllerTests.java b/services/tests/wmtests/src/com/android/server/wm/DragDropControllerTests.java
index 7faf2aacc0bc..8cdb574a967b 100644
--- a/services/tests/wmtests/src/com/android/server/wm/DragDropControllerTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/DragDropControllerTests.java
@@ -497,7 +497,8 @@ public class DragDropControllerTests extends WindowTestsBase {
public void testValidateFlags() {
final Session session = getTestSession();
try {
- session.validateDragFlags(View.DRAG_FLAG_REQUEST_SURFACE_FOR_RETURN_ANIMATION);
+ session.validateDragFlags(View.DRAG_FLAG_REQUEST_SURFACE_FOR_RETURN_ANIMATION,
+ 0 /* callingUid */);
fail("Expected failure without permission");
} catch (SecurityException e) {
// Expected failure
@@ -510,7 +511,8 @@ public class DragDropControllerTests extends WindowTestsBase {
.checkCallingOrSelfPermission(eq(START_TASKS_FROM_RECENTS));
final Session session = createTestSession(mAtm);
try {
- session.validateDragFlags(View.DRAG_FLAG_REQUEST_SURFACE_FOR_RETURN_ANIMATION);
+ session.validateDragFlags(View.DRAG_FLAG_REQUEST_SURFACE_FOR_RETURN_ANIMATION,
+ 0 /* callingUid */);
// Expected pass
} catch (SecurityException e) {
fail("Expected no failure with permission");
diff --git a/services/tests/wmtests/src/com/android/server/wm/DualDisplayAreaGroupPolicyTest.java b/services/tests/wmtests/src/com/android/server/wm/DualDisplayAreaGroupPolicyTest.java
index 83ad7b1b5d92..708d6860abc2 100644
--- a/services/tests/wmtests/src/com/android/server/wm/DualDisplayAreaGroupPolicyTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/DualDisplayAreaGroupPolicyTest.java
@@ -214,7 +214,8 @@ public class DualDisplayAreaGroupPolicyTest extends WindowTestsBase {
final Rect activityBounds = new Rect(mFirstActivity.getBounds());
// DAG is portrait (860x1200), so Task and Activity fill DAG.
- assertThat(mFirstActivity.isLetterboxedForFixedOrientationAndAspectRatio()).isFalse();
+ assertThat(mFirstActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio()).isFalse();
assertThat(mFirstActivity.inSizeCompatMode()).isFalse();
assertThat(taskBounds).isEqualTo(dagBounds);
assertThat(activityBounds).isEqualTo(taskBounds);
@@ -238,7 +239,8 @@ public class DualDisplayAreaGroupPolicyTest extends WindowTestsBase {
new Rect(mFirstActivity.getConfiguration().windowConfiguration.getBounds());
// DAG is landscape (1200x860), no fixed orientation letterbox
- assertThat(mFirstActivity.isLetterboxedForFixedOrientationAndAspectRatio()).isFalse();
+ assertThat(mFirstActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio()).isFalse();
assertThat(mFirstActivity.inSizeCompatMode()).isTrue();
assertThat(newDagBounds.width()).isEqualTo(dagBounds.height());
assertThat(newDagBounds.height()).isEqualTo(dagBounds.width());
@@ -262,11 +264,13 @@ public class DualDisplayAreaGroupPolicyTest extends WindowTestsBase {
mDisplay.onLastFocusedTaskDisplayAreaChanged(mFirstTda);
prepareUnresizable(mFirstActivity, SCREEN_ORIENTATION_NOSENSOR);
- assertThat(mFirstActivity.isLetterboxedForFixedOrientationAndAspectRatio()).isFalse();
+ assertThat(mFirstActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio()).isFalse();
assertThat(mFirstActivity.inSizeCompatMode()).isFalse();
rotateDisplay(mDisplay, ROTATION_90);
- assertThat(mFirstActivity.isLetterboxedForFixedOrientationAndAspectRatio()).isFalse();
+ assertThat(mFirstActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio()).isFalse();
assertThat(mFirstActivity.inSizeCompatMode()).isFalse();
}
@@ -283,7 +287,8 @@ public class DualDisplayAreaGroupPolicyTest extends WindowTestsBase {
// DAG is portrait (860x1200), and activity is letterboxed for fixed orientation
// (860x[860x860/1200=616]). Task fills DAG.
- assertThat(mFirstActivity.isLetterboxedForFixedOrientationAndAspectRatio()).isTrue();
+ assertThat(mFirstActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio()).isTrue();
assertThat(mFirstActivity.inSizeCompatMode()).isFalse();
assertThat(taskBounds).isEqualTo(dagBounds);
assertThat(activityBounds.width()).isEqualTo(dagBounds.width());
@@ -300,7 +305,8 @@ public class DualDisplayAreaGroupPolicyTest extends WindowTestsBase {
mDisplay.onLastFocusedTaskDisplayAreaChanged(mFirstTda);
prepareUnresizable(mFirstActivity, SCREEN_ORIENTATION_NOSENSOR);
- assertThat(mFirstActivity.isLetterboxedForFixedOrientationAndAspectRatio()).isFalse();
+ assertThat(mFirstActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio()).isFalse();
}
@Test
@@ -310,7 +316,8 @@ public class DualDisplayAreaGroupPolicyTest extends WindowTestsBase {
mDisplay.onLastFocusedTaskDisplayAreaChanged(mFirstTda);
prepareUnresizable(mFirstActivity, SCREEN_ORIENTATION_LOCKED);
- assertThat(mFirstActivity.isLetterboxedForFixedOrientationAndAspectRatio()).isFalse();
+ assertThat(mFirstActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio()).isFalse();
}
@Test
@@ -329,7 +336,8 @@ public class DualDisplayAreaGroupPolicyTest extends WindowTestsBase {
final Rect newActivityBounds = new Rect(mFirstActivity.getBounds());
// DAG is landscape (1200x860), no fixed orientation letterbox
- assertThat(mFirstActivity.isLetterboxedForFixedOrientationAndAspectRatio()).isFalse();
+ assertThat(mFirstActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio()).isFalse();
assertThat(mFirstActivity.inSizeCompatMode()).isTrue();
assertThat(newDagBounds.width()).isEqualTo(dagBounds.height());
assertThat(newDagBounds.height()).isEqualTo(dagBounds.width());
@@ -354,7 +362,8 @@ public class DualDisplayAreaGroupPolicyTest extends WindowTestsBase {
rotateDisplay(mDisplay, ROTATION_90);
- assertThat(mFirstActivity.isLetterboxedForFixedOrientationAndAspectRatio()).isFalse();
+ assertThat(mFirstActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio()).isFalse();
assertThat(mFirstActivity.inSizeCompatMode()).isFalse();
}
@@ -522,7 +531,8 @@ public class DualDisplayAreaGroupPolicyTest extends WindowTestsBase {
assertThat(mDisplay.getLastOrientation()).isEqualTo(SCREEN_ORIENTATION_LANDSCAPE);
assertThat(mFirstRoot.getConfiguration().orientation).isEqualTo(ORIENTATION_PORTRAIT);
assertThat(mFirstActivity.getConfiguration().orientation).isEqualTo(ORIENTATION_PORTRAIT);
- assertThat(mFirstActivity.isLetterboxedForFixedOrientationAndAspectRatio()).isFalse();
+ assertThat(mFirstActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio()).isFalse();
assertThat(mFirstActivity.inSizeCompatMode()).isFalse();
// Launch portrait on second DAG
@@ -534,13 +544,15 @@ public class DualDisplayAreaGroupPolicyTest extends WindowTestsBase {
assertThat(mDisplay.getLastOrientation()).isEqualTo(SCREEN_ORIENTATION_PORTRAIT);
assertThat(mSecondRoot.getConfiguration().orientation).isEqualTo(ORIENTATION_LANDSCAPE);
assertThat(mSecondActivity.getConfiguration().orientation).isEqualTo(ORIENTATION_LANDSCAPE);
- assertThat(mSecondActivity.isLetterboxedForFixedOrientationAndAspectRatio()).isFalse();
+ assertThat(mSecondActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio()).isFalse();
assertThat(mSecondActivity.inSizeCompatMode()).isFalse();
// First activity is letterboxed in portrait as requested.
assertThat(mFirstRoot.getConfiguration().orientation).isEqualTo(ORIENTATION_LANDSCAPE);
assertThat(mFirstActivity.getConfiguration().orientation).isEqualTo(ORIENTATION_PORTRAIT);
- assertThat(mFirstActivity.isLetterboxedForFixedOrientationAndAspectRatio()).isTrue();
+ assertThat(mFirstActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio()).isTrue();
assertThat(mFirstActivity.inSizeCompatMode()).isFalse();
}
diff --git a/services/tests/wmtests/src/com/android/server/wm/LetterboxUiControllerTest.java b/services/tests/wmtests/src/com/android/server/wm/LetterboxUiControllerTest.java
index 51b3c4850938..44c7057b2294 100644
--- a/services/tests/wmtests/src/com/android/server/wm/LetterboxUiControllerTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/LetterboxUiControllerTest.java
@@ -19,19 +19,12 @@ package com.android.server.wm;
import static android.content.pm.ActivityInfo.FORCE_NON_RESIZE_APP;
import static android.content.pm.ActivityInfo.FORCE_RESIZE_APP;
import static android.content.pm.ActivityInfo.OVERRIDE_ENABLE_COMPAT_FAKE_FOCUS;
-import static android.content.pm.ActivityInfo.OVERRIDE_MIN_ASPECT_RATIO;
-import static android.content.pm.ActivityInfo.OVERRIDE_MIN_ASPECT_RATIO_ONLY_FOR_CAMERA;
import static android.content.pm.ActivityInfo.OVERRIDE_USE_DISPLAY_LANDSCAPE_NATURAL_ORIENTATION;
-import static android.content.pm.PackageManager.USER_MIN_ASPECT_RATIO_3_2;
-import static android.content.pm.PackageManager.USER_MIN_ASPECT_RATIO_FULLSCREEN;
import static android.content.res.Configuration.ORIENTATION_LANDSCAPE;
import static android.content.res.Configuration.ORIENTATION_PORTRAIT;
import static android.view.InsetsSource.FLAG_INSETS_ROUNDED_CORNER;
import static android.view.WindowManager.PROPERTY_COMPAT_ALLOW_DISPLAY_ORIENTATION_OVERRIDE;
-import static android.view.WindowManager.PROPERTY_COMPAT_ALLOW_MIN_ASPECT_RATIO_OVERRIDE;
import static android.view.WindowManager.PROPERTY_COMPAT_ALLOW_RESIZEABLE_ACTIVITY_OVERRIDES;
-import static android.view.WindowManager.PROPERTY_COMPAT_ALLOW_USER_ASPECT_RATIO_FULLSCREEN_OVERRIDE;
-import static android.view.WindowManager.PROPERTY_COMPAT_ALLOW_USER_ASPECT_RATIO_OVERRIDE;
import static android.view.WindowManager.PROPERTY_COMPAT_ENABLE_FAKE_FOCUS;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.doReturn;
@@ -106,21 +99,19 @@ public class LetterboxUiControllerTest extends WindowTestsBase {
private Task mTask;
private DisplayContent mDisplayContent;
private LetterboxUiController mController;
- private LetterboxConfiguration mLetterboxConfiguration;
+ private AppCompatConfiguration mAppCompatConfiguration;
private final Rect mLetterboxedPortraitTaskBounds = new Rect();
@Before
public void setUp() throws Exception {
mActivity = setUpActivityWithComponent();
- mLetterboxConfiguration = mWm.mLetterboxConfiguration;
- spyOn(mLetterboxConfiguration);
+ mAppCompatConfiguration = mWm.mAppCompatConfiguration;
+ spyOn(mAppCompatConfiguration);
mController = new LetterboxUiController(mWm, mActivity);
}
-
-
@Test
public void testGetCropBoundsIfNeeded_handleCropForTransparentActivityBasedOnOpaqueBounds() {
final InsetsSource taskbar = new InsetsSource(/*id=*/ 0,
@@ -238,7 +229,7 @@ public class LetterboxUiControllerTest extends WindowTestsBase {
/*centerX=*/ 1, /*centerY=*/ 1)
);
insets.setRoundedCorners(roundedCorners);
- mLetterboxConfiguration.setLetterboxActivityCornersRadius(-1);
+ mAppCompatConfiguration.setLetterboxActivityCornersRadius(-1);
assertEquals(expectedRadius, mController.getRoundedCornersRadius(mainWindow));
}
@@ -251,7 +242,7 @@ public class LetterboxUiControllerTest extends WindowTestsBase {
final WindowState mainWindow = mockForGetCropBoundsAndRoundedCorners(/*taskbar=*/ null);
mainWindow.mInvGlobalScale = invGlobalScale;
- mLetterboxConfiguration.setLetterboxActivityCornersRadius(configurationRadius);
+ mAppCompatConfiguration.setLetterboxActivityCornersRadius(configurationRadius);
doReturn(true).when(mActivity).isInLetterboxAnimation();
assertEquals(expectedRadius, mController.getRoundedCornersRadius(mainWindow));
@@ -272,7 +263,7 @@ public class LetterboxUiControllerTest extends WindowTestsBase {
final int configurationRadius = 15;
final WindowState mainWindow = mockForGetCropBoundsAndRoundedCorners(/*taskbar=*/ null);
- mLetterboxConfiguration.setLetterboxActivityCornersRadius(configurationRadius);
+ mAppCompatConfiguration.setLetterboxActivityCornersRadius(configurationRadius);
mainWindow.mInvGlobalScale = -1f;
assertEquals(configurationRadius, mController.getRoundedCornersRadius(mainWindow));
@@ -293,6 +284,7 @@ public class LetterboxUiControllerTest extends WindowTestsBase {
mainWindow.mInvGlobalScale = 1f;
spyOn(resources);
spyOn(mActivity);
+ spyOn(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy());
if (taskbar != null) {
taskbar.setVisible(true);
@@ -301,14 +293,15 @@ public class LetterboxUiControllerTest extends WindowTestsBase {
doReturn(mLetterboxedPortraitTaskBounds).when(mActivity).getBounds();
doReturn(false).when(mActivity).isInLetterboxAnimation();
doReturn(true).when(mActivity).isVisible();
- doReturn(true).when(mActivity).isLetterboxedForFixedOrientationAndAspectRatio();
+ doReturn(true).when(mActivity.mAppCompatController
+ .getAppCompatAspectRatioPolicy()).isLetterboxedForFixedOrientationAndAspectRatio();
doReturn(insets).when(mainWindow).getInsetsState();
doReturn(attrs).when(mainWindow).getAttrs();
doReturn(true).when(mainWindow).isDrawn();
doReturn(true).when(mainWindow).isOnScreen();
doReturn(false).when(mainWindow).isLetterboxedForDisplayCutout();
doReturn(true).when(mainWindow).areAppWindowBoundsLetterboxed();
- doReturn(true).when(mLetterboxConfiguration).isLetterboxActivityCornersRounded();
+ doReturn(true).when(mAppCompatConfiguration).isLetterboxActivityCornersRounded();
doReturn(TASKBAR_EXPANDED_HEIGHT).when(resources).getDimensionPixelSize(
R.dimen.taskbar_frame_height);
@@ -318,147 +311,6 @@ public class LetterboxUiControllerTest extends WindowTestsBase {
return mainWindow;
}
- // shouldApplyUser...Override
- @Test
- public void testShouldApplyUserFullscreenOverride_trueProperty_returnsFalse() throws Exception {
- mockThatProperty(PROPERTY_COMPAT_ALLOW_USER_ASPECT_RATIO_FULLSCREEN_OVERRIDE,
- /* value */ true);
-
- mController = new LetterboxUiController(mWm, mActivity);
- doReturn(false).when(mLetterboxConfiguration).isUserAppAspectRatioFullscreenEnabled();
-
- assertFalse(mController.shouldApplyUserFullscreenOverride());
- }
-
- @Test
- public void testShouldApplyUserFullscreenOverride_falseFullscreenProperty_returnsFalse()
- throws Exception {
- prepareActivityThatShouldApplyUserFullscreenOverride();
- mockThatProperty(PROPERTY_COMPAT_ALLOW_USER_ASPECT_RATIO_FULLSCREEN_OVERRIDE,
- /* value */ false);
-
- mController = new LetterboxUiController(mWm, mActivity);
-
- assertFalse(mController.shouldApplyUserFullscreenOverride());
- }
-
- @Test
- public void testShouldApplyUserFullscreenOverride_falseSettingsProperty_returnsFalse()
- throws Exception {
- prepareActivityThatShouldApplyUserFullscreenOverride();
- mockThatProperty(PROPERTY_COMPAT_ALLOW_USER_ASPECT_RATIO_OVERRIDE, /* value */ false);
-
- mController = new LetterboxUiController(mWm, mActivity);
-
- assertFalse(mController.shouldApplyUserFullscreenOverride());
- }
-
- @Test
- public void testShouldApplyUserFullscreenOverride_returnsTrue() {
- prepareActivityThatShouldApplyUserFullscreenOverride();
-
- assertTrue(mController.shouldApplyUserFullscreenOverride());
- }
-
- @Test
- public void testShouldEnableUserAspectRatioSettings_falseProperty_returnsFalse()
- throws Exception {
- prepareActivityThatShouldApplyUserMinAspectRatioOverride();
- mockThatProperty(PROPERTY_COMPAT_ALLOW_USER_ASPECT_RATIO_OVERRIDE, /* value */ false);
-
- mActivity = setUpActivityWithComponent();
- mController = new LetterboxUiController(mWm, mActivity);
-
- assertFalse(mController.shouldEnableUserAspectRatioSettings());
- }
-
- @Test
- public void testShouldEnableUserAspectRatioSettings_trueProperty_returnsTrue()
- throws Exception {
- prepareActivityThatShouldApplyUserMinAspectRatioOverride();
- mockThatProperty(PROPERTY_COMPAT_ALLOW_USER_ASPECT_RATIO_OVERRIDE, /* value */ true);
-
- mController = new LetterboxUiController(mWm, mActivity);
-
- assertTrue(mController.shouldEnableUserAspectRatioSettings());
- }
-
- @Test
- public void testShouldEnableUserAspectRatioSettings_noIgnoreOrientation_returnsFalse()
- throws Exception {
- prepareActivityForShouldApplyUserMinAspectRatioOverride(/* orientationRequest */ false);
- mockThatProperty(PROPERTY_COMPAT_ALLOW_USER_ASPECT_RATIO_OVERRIDE, /* value */ true);
-
- mController = new LetterboxUiController(mWm, mActivity);
-
- assertFalse(mController.shouldEnableUserAspectRatioSettings());
- }
-
- @Test
- public void testShouldApplyUserMinAspectRatioOverride_falseProperty_returnsFalse()
- throws Exception {
- prepareActivityThatShouldApplyUserMinAspectRatioOverride();
- mockThatProperty(PROPERTY_COMPAT_ALLOW_USER_ASPECT_RATIO_OVERRIDE, /* value */ false);
-
- mController = new LetterboxUiController(mWm, mActivity);
-
- assertFalse(mController.shouldApplyUserMinAspectRatioOverride());
- }
-
- @Test
- public void testShouldApplyUserMinAspectRatioOverride_trueProperty_returnsFalse()
- throws Exception {
- doReturn(false).when(mLetterboxConfiguration).isUserAppAspectRatioSettingsEnabled();
- mockThatProperty(PROPERTY_COMPAT_ALLOW_USER_ASPECT_RATIO_OVERRIDE, /* value */ true);
-
- mController = new LetterboxUiController(mWm, mActivity);
-
- assertFalse(mController.shouldApplyUserMinAspectRatioOverride());
- }
-
- @Test
- public void testShouldApplyUserMinAspectRatioOverride_disabledIgnoreOrientationRequest() {
- prepareActivityThatShouldApplyUserMinAspectRatioOverride();
- mDisplayContent.setIgnoreOrientationRequest(false);
-
- assertFalse(mController.shouldApplyUserMinAspectRatioOverride());
- }
-
- @Test
- public void testShouldApplyUserMinAspectRatioOverride_returnsTrue() {
- prepareActivityThatShouldApplyUserMinAspectRatioOverride();
-
- assertTrue(mController.shouldApplyUserMinAspectRatioOverride());
- }
-
- @Test
- public void testShouldApplyUserMinAspectRatioOverride_noIgnoreOrientation_returnsFalse() {
- prepareActivityForShouldApplyUserMinAspectRatioOverride(/* orientationRequest */ false);
-
- assertFalse(mController.shouldApplyUserMinAspectRatioOverride());
- }
-
- private void prepareActivityForShouldApplyUserMinAspectRatioOverride(
- boolean orientationRequest) {
- spyOn(mController);
- doReturn(orientationRequest).when(
- mLetterboxConfiguration).isUserAppAspectRatioSettingsEnabled();
- mDisplayContent.setIgnoreOrientationRequest(true);
- doReturn(USER_MIN_ASPECT_RATIO_3_2).when(mController).getUserMinAspectRatioOverrideCode();
- }
-
- private void prepareActivityThatShouldApplyUserMinAspectRatioOverride() {
- prepareActivityForShouldApplyUserMinAspectRatioOverride(/* orientationRequest */ true);
- }
-
- private void prepareActivityThatShouldApplyUserFullscreenOverride() {
- spyOn(mController);
- doReturn(true).when(mLetterboxConfiguration).isUserAppAspectRatioFullscreenEnabled();
- mDisplayContent.setIgnoreOrientationRequest(true);
- doReturn(USER_MIN_ASPECT_RATIO_FULLSCREEN).when(mController)
- .getUserMinAspectRatioOverrideCode();
- }
-
// shouldUseDisplayLandscapeNaturalOrientation
@Test
@@ -512,7 +364,7 @@ public class LetterboxUiControllerTest extends WindowTestsBase {
@Test
@EnableCompatChanges({OVERRIDE_ENABLE_COMPAT_FAKE_FOCUS})
public void testShouldSendFakeFocus_overrideEnabled_returnsTrue() {
- doReturn(true).when(mLetterboxConfiguration).isCompatFakeFocusEnabled();
+ doReturn(true).when(mAppCompatConfiguration).isCompatFakeFocusEnabled();
mController = new LetterboxUiController(mWm, mActivity);
@@ -522,7 +374,7 @@ public class LetterboxUiControllerTest extends WindowTestsBase {
@Test
@DisableCompatChanges({OVERRIDE_ENABLE_COMPAT_FAKE_FOCUS})
public void testShouldSendFakeFocus_overrideDisabled_returnsFalse() {
- doReturn(true).when(mLetterboxConfiguration).isCompatFakeFocusEnabled();
+ doReturn(true).when(mAppCompatConfiguration).isCompatFakeFocusEnabled();
mController = new LetterboxUiController(mWm, mActivity);
@@ -533,7 +385,7 @@ public class LetterboxUiControllerTest extends WindowTestsBase {
@EnableCompatChanges({OVERRIDE_ENABLE_COMPAT_FAKE_FOCUS})
public void testIsCompatFakeFocusEnabled_propertyDisabledAndOverrideEnabled_fakeFocusDisabled()
throws Exception {
- doReturn(true).when(mLetterboxConfiguration).isCompatFakeFocusEnabled();
+ doReturn(true).when(mAppCompatConfiguration).isCompatFakeFocusEnabled();
mockThatProperty(PROPERTY_COMPAT_ENABLE_FAKE_FOCUS, /* value */ false);
mController = new LetterboxUiController(mWm, mActivity);
@@ -545,7 +397,7 @@ public class LetterboxUiControllerTest extends WindowTestsBase {
@DisableCompatChanges({OVERRIDE_ENABLE_COMPAT_FAKE_FOCUS})
public void testIsCompatFakeFocusEnabled_propertyEnabled_noOverride_fakeFocusEnabled()
throws Exception {
- doReturn(true).when(mLetterboxConfiguration).isCompatFakeFocusEnabled();
+ doReturn(true).when(mAppCompatConfiguration).isCompatFakeFocusEnabled();
mockThatProperty(PROPERTY_COMPAT_ENABLE_FAKE_FOCUS, /* value */ true);
mController = new LetterboxUiController(mWm, mActivity);
@@ -556,7 +408,7 @@ public class LetterboxUiControllerTest extends WindowTestsBase {
@Test
public void testIsCompatFakeFocusEnabled_propertyDisabled_fakeFocusDisabled()
throws Exception {
- doReturn(true).when(mLetterboxConfiguration).isCompatFakeFocusEnabled();
+ doReturn(true).when(mAppCompatConfiguration).isCompatFakeFocusEnabled();
mockThatProperty(PROPERTY_COMPAT_ENABLE_FAKE_FOCUS, /* value */ false);
mController = new LetterboxUiController(mWm, mActivity);
@@ -567,7 +419,7 @@ public class LetterboxUiControllerTest extends WindowTestsBase {
@Test
public void testIsCompatFakeFocusEnabled_propertyEnabled_fakeFocusEnabled()
throws Exception {
- doReturn(true).when(mLetterboxConfiguration).isCompatFakeFocusEnabled();
+ doReturn(true).when(mAppCompatConfiguration).isCompatFakeFocusEnabled();
mockThatProperty(PROPERTY_COMPAT_ENABLE_FAKE_FOCUS, /* value */ true);
mController = new LetterboxUiController(mWm, mActivity);
@@ -576,151 +428,6 @@ public class LetterboxUiControllerTest extends WindowTestsBase {
}
@Test
- @EnableCompatChanges({OVERRIDE_MIN_ASPECT_RATIO})
- public void testshouldOverrideMinAspectRatio_overrideEnabled_returnsTrue() {
- mController = new LetterboxUiController(mWm, mActivity);
-
- assertTrue(mController.shouldOverrideMinAspectRatio());
- }
-
- @Test
- @EnableCompatChanges({OVERRIDE_MIN_ASPECT_RATIO})
- public void testshouldOverrideMinAspectRatio_propertyTrue_overrideEnabled_returnsTrue()
- throws Exception {
- mockThatProperty(PROPERTY_COMPAT_ALLOW_MIN_ASPECT_RATIO_OVERRIDE, /* value */ true);
- mController = new LetterboxUiController(mWm, mActivity);
-
- assertTrue(mController.shouldOverrideMinAspectRatio());
- }
-
- @Test
- @DisableCompatChanges({OVERRIDE_MIN_ASPECT_RATIO})
- public void testshouldOverrideMinAspectRatio_propertyTrue_overrideDisabled_returnsFalse()
- throws Exception {
- mockThatProperty(PROPERTY_COMPAT_ALLOW_MIN_ASPECT_RATIO_OVERRIDE, /* value */ true);
- mController = new LetterboxUiController(mWm, mActivity);
-
- assertFalse(mController.shouldOverrideMinAspectRatio());
- }
-
- @Test
- @DisableCompatChanges({OVERRIDE_MIN_ASPECT_RATIO})
- public void testshouldOverrideMinAspectRatio_overrideDisabled_returnsFalse() {
- mController = new LetterboxUiController(mWm, mActivity);
-
- assertFalse(mController.shouldOverrideMinAspectRatio());
- }
-
- @Test
- @EnableCompatChanges({OVERRIDE_MIN_ASPECT_RATIO})
- public void testshouldOverrideMinAspectRatio_propertyFalse_overrideEnabled_returnsFalse()
- throws Exception {
- mockThatProperty(PROPERTY_COMPAT_ALLOW_MIN_ASPECT_RATIO_OVERRIDE, /* value */ false);
-
- mActivity = setUpActivityWithComponent();
- mController = new LetterboxUiController(mWm, mActivity);
-
- assertFalse(mController.shouldOverrideMinAspectRatio());
- }
-
- @Test
- @DisableCompatChanges({OVERRIDE_MIN_ASPECT_RATIO})
- public void testshouldOverrideMinAspectRatio_propertyFalse_noOverride_returnsFalse()
- throws Exception {
- mockThatProperty(PROPERTY_COMPAT_ALLOW_MIN_ASPECT_RATIO_OVERRIDE, /* value */ false);
- mController = new LetterboxUiController(mWm, mActivity);
-
- assertFalse(mController.shouldOverrideMinAspectRatio());
- }
-
- @Test
- @EnableCompatChanges({OVERRIDE_MIN_ASPECT_RATIO_ONLY_FOR_CAMERA})
- public void shouldOverrideMinAspectRatioForCamera_overrideEnabled_returnsTrue() {
- mActivity = setUpActivityWithComponent();
- doReturn(true).when(mActivity.mAppCompatController
- .getAppCompatCameraOverrides()).isCameraActive();
-
- assertTrue(mActivity.mAppCompatController.getAppCompatCameraOverrides()
- .shouldOverrideMinAspectRatioForCamera());
- }
-
- @Test
- @EnableCompatChanges({OVERRIDE_MIN_ASPECT_RATIO_ONLY_FOR_CAMERA})
- public void shouldOverrideMinAspectRatioForCamera_propertyTrue_overrideEnabled_returnsTrue()
- throws Exception {
- mockThatProperty(PROPERTY_COMPAT_ALLOW_MIN_ASPECT_RATIO_OVERRIDE, /* value */ true);
- mActivity = setUpActivityWithComponent();
- doReturn(true).when(mActivity.mAppCompatController
- .getAppCompatCameraOverrides()).isCameraActive();
-
- assertTrue(mActivity.mAppCompatController.getAppCompatCameraOverrides()
- .shouldOverrideMinAspectRatioForCamera());
- }
-
- @Test
- @EnableCompatChanges({OVERRIDE_MIN_ASPECT_RATIO_ONLY_FOR_CAMERA})
- public void shouldOverrideMinAspectRatioForCamera_propertyTrue_overrideEnabled_returnsFalse()
- throws Exception {
- mockThatProperty(PROPERTY_COMPAT_ALLOW_MIN_ASPECT_RATIO_OVERRIDE, /* value */ true);
- mActivity = setUpActivityWithComponent();
- doReturn(false).when(mActivity.mAppCompatController
- .getAppCompatCameraOverrides()).isCameraActive();
-
- assertFalse(mActivity.mAppCompatController.getAppCompatCameraOverrides()
- .shouldOverrideMinAspectRatioForCamera());
- }
-
- @Test
- @DisableCompatChanges({OVERRIDE_MIN_ASPECT_RATIO_ONLY_FOR_CAMERA})
- public void shouldOverrideMinAspectRatioForCamera_propertyTrue_overrideDisabled_returnsFalse()
- throws Exception {
- mockThatProperty(PROPERTY_COMPAT_ALLOW_MIN_ASPECT_RATIO_OVERRIDE, /* value */ true);
- mActivity = setUpActivityWithComponent();
- doReturn(true).when(mActivity.mAppCompatController
- .getAppCompatCameraOverrides()).isCameraActive();
-
- assertFalse(mActivity.mAppCompatController.getAppCompatCameraOverrides()
- .shouldOverrideMinAspectRatioForCamera());
- }
-
- @Test
- @DisableCompatChanges({OVERRIDE_MIN_ASPECT_RATIO_ONLY_FOR_CAMERA})
- public void shouldOverrideMinAspectRatioForCamera_overrideDisabled_returnsFalse() {
- mActivity = setUpActivityWithComponent();
- doReturn(true).when(mActivity.mAppCompatController
- .getAppCompatCameraOverrides()).isCameraActive();
-
- assertFalse(mActivity.mAppCompatController.getAppCompatCameraOverrides()
- .shouldOverrideMinAspectRatioForCamera());
- }
-
- @Test
- @EnableCompatChanges({OVERRIDE_MIN_ASPECT_RATIO_ONLY_FOR_CAMERA})
- public void shouldOverrideMinAspectRatioForCamera_propertyFalse_overrideEnabled_returnsFalse()
- throws Exception {
- mockThatProperty(PROPERTY_COMPAT_ALLOW_MIN_ASPECT_RATIO_OVERRIDE, /* value */ false);
- mActivity = setUpActivityWithComponent();
-
- assertFalse(mActivity.mAppCompatController.getAppCompatCameraOverrides()
- .shouldOverrideMinAspectRatioForCamera());
- }
-
- @Test
- @DisableCompatChanges({OVERRIDE_MIN_ASPECT_RATIO_ONLY_FOR_CAMERA})
- public void shouldOverrideMinAspectRatioForCamera_propertyFalse_noOverride_returnsFalse()
- throws Exception {
- mockThatProperty(PROPERTY_COMPAT_ALLOW_MIN_ASPECT_RATIO_OVERRIDE, /* value */ false);
-
- mActivity = setUpActivityWithComponent();
-
- doReturn(true).when(mActivity.mAppCompatController
- .getAppCompatCameraOverrides()).isCameraActive();
-
- assertFalse(mActivity.mAppCompatController.getAppCompatCameraOverrides()
- .shouldOverrideMinAspectRatioForCamera());
- }
-
- @Test
@EnableCompatChanges({FORCE_RESIZE_APP})
public void testshouldOverrideForceResizeApp_overrideEnabled_returnsTrue() {
mController = new LetterboxUiController(mWm, mActivity);
@@ -838,15 +545,15 @@ public class LetterboxUiControllerTest extends WindowTestsBase {
@Test
public void testgetFixedOrientationLetterboxAspectRatio_splitScreenAspectEnabled() {
- doReturn(true).when(mActivity.mWmService.mLetterboxConfiguration)
+ doReturn(true).when(mActivity.mWmService.mAppCompatConfiguration)
.isCameraCompatTreatmentEnabled();
- doReturn(true).when(mActivity.mWmService.mLetterboxConfiguration)
+ doReturn(true).when(mActivity.mWmService.mAppCompatConfiguration)
.isCameraCompatTreatmentEnabledAtBuildTime();
- doReturn(true).when(mActivity.mWmService.mLetterboxConfiguration)
+ doReturn(true).when(mActivity.mWmService.mAppCompatConfiguration)
.isCameraCompatSplitScreenAspectRatioEnabled();
- doReturn(false).when(mActivity.mWmService.mLetterboxConfiguration)
+ doReturn(false).when(mActivity.mWmService.mAppCompatConfiguration)
.getIsDisplayAspectRatioEnabledForFixedOrientationLetterbox();
- doReturn(1.5f).when(mActivity.mWmService.mLetterboxConfiguration)
+ doReturn(1.5f).when(mActivity.mWmService.mAppCompatConfiguration)
.getFixedOrientationLetterboxAspectRatio();
// Recreate DisplayContent with DisplayRotationCompatPolicy
@@ -860,21 +567,23 @@ public class LetterboxUiControllerTest extends WindowTestsBase {
doReturn(true).when(mDisplayContent.mAppCompatCameraPolicy)
.isTreatmentEnabledForActivity(eq(mActivity));
- assertEquals(mController.getSplitScreenAspectRatio(),
- mController.getFixedOrientationLetterboxAspectRatio(
+ final AppCompatAspectRatioOverrides aspectRatioOverrides =
+ mActivity.mAppCompatController.getAppCompatAspectRatioOverrides();
+ assertEquals(aspectRatioOverrides.getSplitScreenAspectRatio(),
+ aspectRatioOverrides.getFixedOrientationLetterboxAspectRatio(
mActivity.getParent().getConfiguration()), /* delta */ 0.01);
}
@Test
public void testIsVerticalThinLetterboxed() {
// Vertical thin letterbox disabled
- doReturn(-1).when(mActivity.mWmService.mLetterboxConfiguration)
+ doReturn(-1).when(mActivity.mWmService.mAppCompatConfiguration)
.getThinLetterboxHeightPx();
assertFalse(mController.isVerticalThinLetterboxed());
// Define a Task 100x100
final Task task = mock(Task.class);
doReturn(new Rect(0, 0, 100, 100)).when(task).getBounds();
- doReturn(10).when(mActivity.mWmService.mLetterboxConfiguration)
+ doReturn(10).when(mActivity.mWmService.mAppCompatConfiguration)
.getThinLetterboxHeightPx();
// Vertical thin letterbox disabled without Task
@@ -899,13 +608,13 @@ public class LetterboxUiControllerTest extends WindowTestsBase {
@Test
public void testIsHorizontalThinLetterboxed() {
// Horizontal thin letterbox disabled
- doReturn(-1).when(mActivity.mWmService.mLetterboxConfiguration)
+ doReturn(-1).when(mActivity.mWmService.mAppCompatConfiguration)
.getThinLetterboxWidthPx();
assertFalse(mController.isHorizontalThinLetterboxed());
// Define a Task 100x100
final Task task = mock(Task.class);
doReturn(new Rect(0, 0, 100, 100)).when(task).getBounds();
- doReturn(10).when(mActivity.mWmService.mLetterboxConfiguration)
+ doReturn(10).when(mActivity.mWmService.mAppCompatConfiguration)
.getThinLetterboxWidthPx();
// Vertical thin letterbox disabled without Task
@@ -960,7 +669,7 @@ public class LetterboxUiControllerTest extends WindowTestsBase {
@Test
public void testIsLetterboxEducationEnabled() {
mController.isLetterboxEducationEnabled();
- verify(mLetterboxConfiguration).getIsEducationEnabled();
+ verify(mAppCompatConfiguration).getIsEducationEnabled();
}
private void mockThatProperty(String propertyName, boolean value) throws Exception {
diff --git a/services/tests/wmtests/src/com/android/server/wm/ProtoLogIntegrationTest.java b/services/tests/wmtests/src/com/android/server/wm/ProtoLogIntegrationTest.java
index 7efbc88833cf..35cff7a7a324 100644
--- a/services/tests/wmtests/src/com/android/server/wm/ProtoLogIntegrationTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/ProtoLogIntegrationTest.java
@@ -25,11 +25,11 @@ import android.platform.test.annotations.Presubmit;
import androidx.test.filters.SmallTest;
+import com.android.internal.protolog.ProtoLog;
import com.android.internal.protolog.ProtoLogGroup;
import com.android.internal.protolog.ProtoLogImpl;
import com.android.internal.protolog.common.IProtoLog;
import com.android.internal.protolog.common.LogLevel;
-import com.android.internal.protolog.ProtoLog;
import org.junit.After;
import org.junit.Ignore;
@@ -53,9 +53,6 @@ public class ProtoLogIntegrationTest {
runWith(mockedProtoLog, this::testProtoLog);
verify(mockedProtoLog).log(eq(LogLevel.ERROR), eq(ProtoLogGroup.TEST_GROUP),
anyInt(), eq(0b0010010111),
- eq(com.android.internal.protolog.ProtoLogGroup.TEST_GROUP.isLogToLogcat()
- ? "Test completed successfully: %b %d %x %f %% %s"
- : null),
eq(new Object[]{true, 1L, 2L, 0.3, "ok"}));
}
diff --git a/services/tests/wmtests/src/com/android/server/wm/RecentTasksTest.java b/services/tests/wmtests/src/com/android/server/wm/RecentTasksTest.java
index 6ec1429200e6..33f7035dbf18 100644
--- a/services/tests/wmtests/src/com/android/server/wm/RecentTasksTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/RecentTasksTest.java
@@ -653,6 +653,34 @@ public class RecentTasksTest extends WindowTestsBase {
}
@Test
+ public void testTrimNonTrimmableTask_isTrimmable_returnsFalse() {
+ Task nonTrimmableTask = createTaskBuilder(".NonTrimmableTask").setFlags(
+ FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS).build();
+ nonTrimmableTask.mIsTrimmableFromRecents = false;
+
+ // Move home to front so the task can satisfy the condition in RecentTasks#isTrimmable.
+ mRootWindowContainer.getDefaultTaskDisplayArea().getRootHomeTask().moveToFront("test");
+
+ assertThat(mRecentTasks.isTrimmable(nonTrimmableTask)).isFalse();
+ }
+
+ @Test
+ public void testTrimNonTrimmableTask_taskNotTrimmed() {
+ Task nonTrimmableTask = createTaskBuilder(".NonTrimmableTask").setFlags(
+ FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS).build();
+ nonTrimmableTask.mIsTrimmableFromRecents = false;
+
+ // Move home to front so the task can satisfy the condition in RecentTasks#isTrimmable.
+ mRootWindowContainer.getDefaultTaskDisplayArea().getRootHomeTask().moveToFront("test");
+
+ mRecentTasks.add(mTasks.get(0));
+ mRecentTasks.add(nonTrimmableTask);
+ mRecentTasks.add(mTasks.get(1));
+
+ triggerTrimAndAssertNoTasksTrimmed();
+ }
+
+ @Test
public void testSessionDuration() {
mRecentTasks.setOnlyTestVisibleRange();
mRecentTasks.setParameters(-1 /* min */, -1 /* max */, 50 /* ms */);
diff --git a/services/tests/wmtests/src/com/android/server/wm/RecentsAnimationControllerTest.java b/services/tests/wmtests/src/com/android/server/wm/RecentsAnimationControllerTest.java
index c1be5ca562b1..63e3e5cf865a 100644
--- a/services/tests/wmtests/src/com/android/server/wm/RecentsAnimationControllerTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/RecentsAnimationControllerTest.java
@@ -714,7 +714,7 @@ public class RecentsAnimationControllerTest extends WindowTestsBase {
// Simulate when the window is exiting and cleanupAnimation invoked
// (e.g. screen off during RecentsAnimation animating), will expect the window receives
// onExitAnimationDone to destroy the surface when the removal is allowed.
- win1.mWinAnimator.mSurfaceController = mock(WindowSurfaceController.class);
+ win1.mWinAnimator.mSurfaceControl = mock(SurfaceControl.class);
win1.mHasSurface = true;
win1.mAnimatingExit = true;
win1.mRemoveOnExit = true;
diff --git a/services/tests/wmtests/src/com/android/server/wm/RemoteAnimationControllerTest.java b/services/tests/wmtests/src/com/android/server/wm/RemoteAnimationControllerTest.java
index 11d9629cf25e..f93ffb83178f 100644
--- a/services/tests/wmtests/src/com/android/server/wm/RemoteAnimationControllerTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/RemoteAnimationControllerTest.java
@@ -43,8 +43,6 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyBoolean;
-import static org.mockito.ArgumentMatchers.anyFloat;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.mock;
@@ -749,6 +747,8 @@ public class RemoteAnimationControllerTest extends WindowTestsBase {
}
}
+ @android.platform.test.annotations.RequiresFlagsDisabled(
+ com.android.window.flags.Flags.FLAG_DO_NOT_SKIP_IME_BY_TARGET_VISIBILITY)
@SetupWindows(addWindows = W_INPUT_METHOD)
@Test
public void testLaunchRemoteAnimationWithoutImeBehind() {
@@ -758,12 +758,9 @@ public class RemoteAnimationControllerTest extends WindowTestsBase {
// Simulating win1 has shown IME and being IME layering/input target
mDisplayContent.setImeLayeringTarget(win1);
mDisplayContent.setImeInputTarget(win1);
- mImeWindow.mWinAnimator.mSurfaceController = mock(WindowSurfaceController.class);
mImeWindow.mWinAnimator.hide(mDisplayContent.getPendingTransaction(), "test");
spyOn(mDisplayContent);
- doReturn(true).when(mImeWindow.mWinAnimator.mSurfaceController).hasSurface();
- doReturn(true).when(mImeWindow.mWinAnimator.mSurfaceController)
- .prepareToShowInTransaction(any(), anyFloat());
+ mImeWindow.mWinAnimator.mSurfaceControl = mock(SurfaceControl.class);
makeWindowVisibleAndDrawn(mImeWindow);
assertTrue(mImeWindow.isOnScreen());
assertFalse(mImeWindow.isParentWindowHidden());
diff --git a/services/tests/wmtests/src/com/android/server/wm/RootWindowContainerTests.java b/services/tests/wmtests/src/com/android/server/wm/RootWindowContainerTests.java
index 3078df026d8a..d29505f02fe8 100644
--- a/services/tests/wmtests/src/com/android/server/wm/RootWindowContainerTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/RootWindowContainerTests.java
@@ -274,17 +274,28 @@ public class RootWindowContainerTests extends WindowTestsBase {
@Test
public void testAttachApplication() {
- final ActivityRecord activity = new ActivityBuilder(mAtm).setCreateTask(true).build();
+ final ActivityRecord activity = new ActivityBuilder(mAtm).setProcessName("testAttach")
+ .setCreateTask(true).build();
+ final ActivityRecord topActivity = new ActivityBuilder(mAtm).setProcessName("testAttach")
+ .setUseProcess(activity.app).setTask(activity.getTask()).build();
activity.detachFromProcess();
- mAtm.startProcessAsync(activity, false /* knownToBeDead */,
+ topActivity.detachFromProcess();
+ mAtm.startProcessAsync(topActivity, false /* knownToBeDead */,
true /* isTop */, "test" /* hostingType */);
+ // Even if the activity is added after topActivity, the start order should still follow
+ // z-order, i.e. the topActivity will be started first.
+ mAtm.startProcessAsync(activity, false /* knownToBeDead */,
+ false /* isTop */, "test" /* hostingType */);
+ assertEquals(2, mAtm.mStartingProcessActivities.size());
+ assertEquals("Top record must be at the tail to start first",
+ topActivity, mAtm.mStartingProcessActivities.get(1));
final WindowProcessController proc = mSystemServicesTestRule.addProcess(
activity.packageName, activity.processName,
6789 /* pid */, activity.info.applicationInfo.uid);
try {
mRootWindowContainer.attachApplication(proc);
- verify(mSupervisor).realStartActivityLocked(eq(activity), eq(proc), anyBoolean(),
- anyBoolean());
+ verify(mSupervisor).realStartActivityLocked(eq(topActivity), eq(proc),
+ anyBoolean(), anyBoolean());
} catch (RemoteException e) {
e.rethrowAsRuntimeException();
}
@@ -428,7 +439,8 @@ public class RootWindowContainerTests extends WindowTestsBase {
final Rect bounds = new Rect(task.getBounds());
bounds.scale(0.5f);
task.setBounds(bounds);
- assertFalse(activity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertFalse(activity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
assertThat(task.autoRemoveRecents).isFalse();
}
diff --git a/services/tests/wmtests/src/com/android/server/wm/SizeCompatTests.java b/services/tests/wmtests/src/com/android/server/wm/SizeCompatTests.java
index 64527cb63e45..8981f715cf4b 100644
--- a/services/tests/wmtests/src/com/android/server/wm/SizeCompatTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/SizeCompatTests.java
@@ -64,8 +64,9 @@ import static com.android.server.wm.ActivityRecord.State.PAUSED;
import static com.android.server.wm.ActivityRecord.State.RESTARTING_PROCESS;
import static com.android.server.wm.ActivityRecord.State.RESUMED;
import static com.android.server.wm.ActivityRecord.State.STOPPED;
+import static com.android.server.wm.AppCompatUtils.computeAspectRatio;
import static com.android.server.wm.DisplayContent.IME_TARGET_LAYERING;
-import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_POSITION_MULTIPLIER_CENTER;
+import static com.android.server.wm.AppCompatConfiguration.LETTERBOX_POSITION_MULTIPLIER_CENTER;
import static com.android.server.wm.WindowContainer.POSITION_TOP;
import static com.google.common.truth.Truth.assertThat;
@@ -103,6 +104,7 @@ import android.graphics.Rect;
import android.os.Binder;
import android.os.RemoteException;
import android.os.UserHandle;
+import android.platform.test.annotations.DisableFlags;
import android.platform.test.annotations.EnableFlags;
import android.platform.test.annotations.Presubmit;
import android.provider.DeviceConfig;
@@ -226,7 +228,7 @@ public class SizeCompatTests extends WindowTestsBase {
boolean horizontalReachability) {
setUpDisplaySizeWithApp(displayWidth, displayHeight);
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- final LetterboxConfiguration config = mWm.mLetterboxConfiguration;
+ final AppCompatConfiguration config = mWm.mAppCompatConfiguration;
config.setTranslucentLetterboxingOverrideEnabled(true);
config.setLetterboxVerticalPositionMultiplier(0.5f);
config.setIsVerticalReachabilityEnabled(true);
@@ -351,8 +353,8 @@ public class SizeCompatTests extends WindowTestsBase {
.build();
setUpApp(display);
display.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- mWm.mLetterboxConfiguration.setLetterboxVerticalPositionMultiplier(0.5f);
- mWm.mLetterboxConfiguration.setIsVerticalReachabilityEnabled(true);
+ mWm.mAppCompatConfiguration.setLetterboxVerticalPositionMultiplier(0.5f);
+ mWm.mAppCompatConfiguration.setIsVerticalReachabilityEnabled(true);
final ActivityRecord activity = getActivityBuilderOnSameTask()
.setScreenOrientation(SCREEN_ORIENTATION_LANDSCAPE)
@@ -494,7 +496,7 @@ public class SizeCompatTests extends WindowTestsBase {
// Activity is sandboxed; it is in size compat mode since it is not resizable and has a
// max aspect ratio.
assertActivityMaxBoundsSandboxed();
- assertScaled();
+ assertDownScaled();
}
@Test
@@ -514,7 +516,7 @@ public class SizeCompatTests extends WindowTestsBase {
// The bounds should be [100, 0 - 1100, 2500].
assertEquals(origBounds.width(), currentBounds.width());
assertEquals(origBounds.height(), currentBounds.height());
- assertScaled();
+ assertDownScaled();
// The scale is 2000/2500=0.8. The horizontal centered offset is (1000-(1000*0.8))/2=100.
final float scale = (float) display.mBaseDisplayHeight / currentBounds.height();
@@ -554,7 +556,7 @@ public class SizeCompatTests extends WindowTestsBase {
assertEquals(origBounds.width(), currentBounds.width());
assertEquals(origBounds.height(), currentBounds.height());
assertEquals(offsetX, mActivity.getBounds().left);
- assertScaled();
+ assertDownScaled();
// Activity is sandboxed due to size compat mode.
assertActivityMaxBoundsSandboxed();
@@ -692,7 +694,7 @@ public class SizeCompatTests extends WindowTestsBase {
// The configuration bounds [820, 0 - 1820, 2500] should keep the same.
assertEquals(originalBounds.width(), currentBounds.width());
assertEquals(originalBounds.height(), currentBounds.height());
- assertScaled();
+ assertDownScaled();
// Activity max bounds are sandboxed due to size compat mode on the new display.
assertActivityMaxBoundsSandboxed();
@@ -751,7 +753,7 @@ public class SizeCompatTests extends WindowTestsBase {
assertEquals(origAppBounds.width(), appBounds.width());
assertEquals(origAppBounds.height(), appBounds.height());
// The activity is 1000x1400 and the display is 2500x1000.
- assertScaled();
+ assertDownScaled();
final float scale = mActivity.getCompatScale();
// The position in configuration should be in app coordinates.
final Rect screenBounds = mActivity.getBounds();
@@ -848,7 +850,7 @@ public class SizeCompatTests extends WindowTestsBase {
// Size compatibility mode is able to handle orientation change so the process shouldn't be
// restarted and the override configuration won't be cleared.
verify(mActivity, never()).restartProcessIfVisible();
- assertScaled();
+ assertDownScaled();
// Activity max bounds are sandboxed due to size compat mode, even if is not visible.
assertActivityMaxBoundsSandboxed();
@@ -1080,11 +1082,12 @@ public class SizeCompatTests extends WindowTestsBase {
RESIZE_MODE_UNRESIZEABLE, ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
// Simulate the user selecting the fullscreen user aspect ratio override
- spyOn(activity.mWmService.mLetterboxConfiguration);
- spyOn(activity.mLetterboxUiController);
- doReturn(true).when(activity.mWmService.mLetterboxConfiguration)
+ spyOn(activity.mWmService.mAppCompatConfiguration);
+ spyOn(activity.mAppCompatController.getAppCompatAspectRatioOverrides());
+ doReturn(true).when(activity.mWmService.mAppCompatConfiguration)
.isUserAppAspectRatioFullscreenEnabled();
- doReturn(USER_MIN_ASPECT_RATIO_FULLSCREEN).when(activity.mLetterboxUiController)
+ doReturn(USER_MIN_ASPECT_RATIO_FULLSCREEN)
+ .when(activity.mAppCompatController.getAppCompatAspectRatioOverrides())
.getUserMinAspectRatioOverrideCode();
assertFalse(activity.shouldCreateCompatDisplayInsets());
}
@@ -1102,9 +1105,10 @@ public class SizeCompatTests extends WindowTestsBase {
RESIZE_MODE_UNRESIZEABLE, ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
// Simulate the user selecting the fullscreen user aspect ratio override
- spyOn(activity.mLetterboxUiController);
- doReturn(true).when(activity.mLetterboxUiController)
- .isSystemOverrideToFullscreenEnabled();
+ spyOn(activity.mAppCompatController.getAppCompatAspectRatioOverrides());
+ doReturn(true).when(
+ activity.mAppCompatController.getAppCompatAspectRatioOverrides())
+ .isSystemOverrideToFullscreenEnabled();
assertFalse(activity.shouldCreateCompatDisplayInsets());
}
@@ -1123,7 +1127,8 @@ public class SizeCompatTests extends WindowTestsBase {
prepareUnresizable(activity, /* maxAspect=*/ 1.5f, SCREEN_ORIENTATION_LANDSCAPE);
// Activity max bounds should not be sandboxed, even though it is letterboxed.
- assertTrue(activity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertTrue(activity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
assertThat(activity.getConfiguration().windowConfiguration.getMaxBounds())
.isEqualTo(activity.getDisplayArea().getBounds());
}
@@ -1164,7 +1169,8 @@ public class SizeCompatTests extends WindowTestsBase {
prepareUnresizable(activity, /* maxAspect=*/ 1.5f, SCREEN_ORIENTATION_LANDSCAPE);
// Activity max bounds should not be sandboxed, even though it is letterboxed.
- assertTrue(activity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertTrue(activity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
assertThat(activity.getConfiguration().windowConfiguration.getMaxBounds())
.isEqualTo(activity.getDisplayArea().getBounds());
}
@@ -1187,7 +1193,8 @@ public class SizeCompatTests extends WindowTestsBase {
prepareUnresizable(activity, /* maxAspect=*/ 1.5f, SCREEN_ORIENTATION_LANDSCAPE);
// Activity max bounds should not be sandboxed, even though it is letterboxed.
- assertTrue(activity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertTrue(activity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
assertThat(activity.getConfiguration().windowConfiguration.getMaxBounds())
.isEqualTo(activity.getDisplayArea().getBounds());
}
@@ -1618,6 +1625,85 @@ public class SizeCompatTests extends WindowTestsBase {
activity.getBounds().width(), 0.5);
}
+
+ /**
+ * Test that a freeform unresizeable activity can be down-scaled to fill its smaller parent
+ * bounds.
+ */
+ @Test
+ public void testCompatScaling_freeformUnresizeableApp_largerThanParent_downScaled() {
+ final int dw = 600;
+ final int dh = 800;
+ final DisplayContent display = new TestDisplayContent.Builder(mAtm, dw, dh)
+ .setWindowingMode(WINDOWING_MODE_FREEFORM)
+ .build();
+ setUpApp(display);
+ prepareUnresizable(mActivity, /* maxAspect */ 0f, SCREEN_ORIENTATION_PORTRAIT);
+ mActivity.setWindowingMode(WINDOWING_MODE_FREEFORM);
+ assertFalse(mActivity.inSizeCompatMode());
+
+ // Resize app to make original app bounds larger than parent bounds.
+ mTask.getWindowConfiguration().setAppBounds(
+ new Rect(0, 0, dw - 300, dh - 400));
+ mActivity.onConfigurationChanged(mTask.getConfiguration());
+ // App should enter size compat mode and be down-scaled to fill new parent bounds.
+ assertDownScaled();
+ }
+
+ /**
+ * Test that when desktop mode is enabled, a freeform unresizeable activity can be up-scaled to
+ * fill its larger parent bounds.
+ */
+ @Test
+ @EnableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_MODE)
+ public void testCompatScaling_freeformUnresizeableApp_smallerThanParent_upScaled() {
+ doReturn(true).when(() ->
+ DesktopModeHelper.canEnterDesktopMode(any()));
+ final int dw = 600;
+ final int dh = 800;
+ final DisplayContent display = new TestDisplayContent.Builder(mAtm, dw, dh)
+ .setWindowingMode(WINDOWING_MODE_FREEFORM)
+ .build();
+ setUpApp(display);
+ prepareUnresizable(mActivity, /* maxAspect */ 0f, SCREEN_ORIENTATION_PORTRAIT);
+ mActivity.setWindowingMode(WINDOWING_MODE_FREEFORM);
+ assertFalse(mActivity.inSizeCompatMode());
+
+ // Resize app to make original app bounds smaller than parent bounds.
+ mTask.getWindowConfiguration().setAppBounds(
+ new Rect(0, 0, dw + 300, dh + 400));
+ mActivity.onConfigurationChanged(mTask.getConfiguration());
+ // App should enter size compat mode and be up-scaled to fill parent bounds.
+ assertUpScaled();
+ }
+
+ /**
+ * Test that when desktop mode is disabled, a freeform unresizeable activity cannot be up-scaled
+ * despite its larger parent bounds.
+ */
+ @Test
+ @DisableFlags(Flags.FLAG_ENABLE_DESKTOP_WINDOWING_MODE)
+ public void testSizeCompatScaling_freeformUnresizeableApp_smallerThanParent_notScaled() {
+ final int dw = 600;
+ final int dh = 800;
+ final DisplayContent display = new TestDisplayContent.Builder(mAtm, dw, dh)
+ .setWindowingMode(WINDOWING_MODE_FREEFORM)
+ .build();
+ setUpApp(display);
+ prepareUnresizable(mActivity, /* maxAspect */ 0f, SCREEN_ORIENTATION_PORTRAIT);
+ mActivity.setWindowingMode(WINDOWING_MODE_FREEFORM);
+ assertFalse(mActivity.inSizeCompatMode());
+ final Rect originalAppBounds = mActivity.getBounds();
+
+ // Resize app to make original app bounds smaller than parent bounds.
+ mTask.getWindowConfiguration().setAppBounds(
+ new Rect(0, 0, dw + 300, dh + 400));
+ mActivity.onConfigurationChanged(mTask.getConfiguration());
+ // App should enter size compat mode but remain its original size.
+ assertTrue(mActivity.inSizeCompatMode());
+ assertEquals(originalAppBounds, mActivity.getBounds());
+ }
+
@Test
public void testGetLetterboxInnerBounds_noScalingApplied() {
// Set up a display in portrait and ignoring orientation request.
@@ -1636,7 +1722,8 @@ public class SizeCompatTests extends WindowTestsBase {
addWindowToActivity(mActivity);
// App should launch in fullscreen.
- assertFalse(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertFalse(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
assertFalse(mActivity.inSizeCompatMode());
// Activity inherits max bounds from TaskDisplayArea.
@@ -1650,8 +1737,9 @@ public class SizeCompatTests extends WindowTestsBase {
assertTrue(rotatedDisplayBounds.width() < rotatedDisplayBounds.height());
// App should be in size compat.
- assertFalse(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
- assertScaled();
+ assertFalse(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
+ assertDownScaled();
assertThat(mActivity.inSizeCompatMode()).isTrue();
assertActivityMaxBoundsSandboxed();
@@ -1762,7 +1850,8 @@ public class SizeCompatTests extends WindowTestsBase {
assertTrue(displayBounds.width() > displayBounds.height());
// App should launch in fixed orientation letterbox.
- assertTrue(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertTrue(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
assertFalse(mActivity.inSizeCompatMode());
assertActivityMaxBoundsSandboxed();
@@ -1780,7 +1869,7 @@ public class SizeCompatTests extends WindowTestsBase {
// Portrait fixed app with min aspect ratio higher that aspect ratio override for fixed
// orientation letterbox.
- mActivity.mWmService.mLetterboxConfiguration.setFixedOrientationLetterboxAspectRatio(1.1f);
+ mActivity.mWmService.mAppCompatConfiguration.setFixedOrientationLetterboxAspectRatio(1.1f);
mActivity.info.setMinAspectRatio(3);
prepareUnresizable(mActivity, /* maxAspect= */ 0, SCREEN_ORIENTATION_PORTRAIT);
@@ -1793,7 +1882,8 @@ public class SizeCompatTests extends WindowTestsBase {
assertTrue(displayBounds.width() > displayBounds.height());
// App should launch in fixed orientation letterbox.
- assertTrue(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertTrue(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
assertFalse(mActivity.inSizeCompatMode());
// Activity bounds should respect minimum aspect ratio for activity.
@@ -1811,7 +1901,7 @@ public class SizeCompatTests extends WindowTestsBase {
// Portrait fixed app with max aspect ratio lower that aspect ratio override for fixed
// orientation letterbox.
- mActivity.mWmService.mLetterboxConfiguration.setFixedOrientationLetterboxAspectRatio(3);
+ mActivity.mWmService.mAppCompatConfiguration.setFixedOrientationLetterboxAspectRatio(3);
prepareUnresizable(mActivity, /* maxAspect= */ 2, SCREEN_ORIENTATION_PORTRAIT);
final Rect displayBounds = new Rect(mActivity.mDisplayContent.getBounds());
@@ -1823,7 +1913,8 @@ public class SizeCompatTests extends WindowTestsBase {
assertTrue(displayBounds.width() > displayBounds.height());
// App should launch in fixed orientation letterbox.
- assertTrue(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertTrue(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
assertFalse(mActivity.inSizeCompatMode());
// Activity bounds should respect maximum aspect ratio for activity.
@@ -1840,7 +1931,7 @@ public class SizeCompatTests extends WindowTestsBase {
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
final float fixedOrientationLetterboxAspectRatio = 1.1f;
- mActivity.mWmService.mLetterboxConfiguration.setFixedOrientationLetterboxAspectRatio(
+ mActivity.mWmService.mAppCompatConfiguration.setFixedOrientationLetterboxAspectRatio(
fixedOrientationLetterboxAspectRatio);
prepareLimitedBounds(mActivity, SCREEN_ORIENTATION_PORTRAIT, /* isUnresizable= */ false);
@@ -1853,7 +1944,8 @@ public class SizeCompatTests extends WindowTestsBase {
assertTrue(displayBounds.width() > displayBounds.height());
// App should launch in fixed orientation letterbox.
- assertTrue(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertTrue(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
assertFalse(mActivity.inSizeCompatMode());
// Activity bounds should respect aspect ratio override for fixed orientation letterbox.
@@ -1887,7 +1979,7 @@ public class SizeCompatTests extends WindowTestsBase {
// Activity should be letterboxed with an aspect ratio of 1.01.
final Rect afterBounds = mActivity.getBounds();
final float actualAspectRatio = 1f * afterBounds.height() / afterBounds.width();
- assertEquals(LetterboxConfiguration.DEFAULT_LETTERBOX_ASPECT_RATIO_FOR_MULTI_WINDOW,
+ assertEquals(AppCompatConfiguration.DEFAULT_LETTERBOX_ASPECT_RATIO_FOR_MULTI_WINDOW,
actualAspectRatio, DELTA_ASPECT_RATIO_TOLERANCE);
assertTrue(mActivity.areBoundsLetterboxed());
}
@@ -1935,9 +2027,9 @@ public class SizeCompatTests extends WindowTestsBase {
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
final float fixedOrientationLetterboxAspectRatio = 1.1f;
- mActivity.mWmService.mLetterboxConfiguration.setFixedOrientationLetterboxAspectRatio(
+ mActivity.mWmService.mAppCompatConfiguration.setFixedOrientationLetterboxAspectRatio(
fixedOrientationLetterboxAspectRatio);
- mActivity.mWmService.mLetterboxConfiguration.setDefaultMinAspectRatioForUnresizableApps(
+ mActivity.mWmService.mAppCompatConfiguration.setDefaultMinAspectRatioForUnresizableApps(
1.5f);
prepareUnresizable(mActivity, SCREEN_ORIENTATION_PORTRAIT);
@@ -1950,13 +2042,14 @@ public class SizeCompatTests extends WindowTestsBase {
assertTrue(displayBounds.width() > displayBounds.height());
// App should launch in fixed orientation letterbox.
- assertTrue(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertTrue(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
assertFalse(mActivity.inSizeCompatMode());
// Letterbox logic should use config_letterboxDefaultMinAspectRatioForUnresizableApps over
// config_fixedOrientationLetterboxAspectRatio.
assertEquals(displayBounds.height(), activityBounds.height());
- final float defaultAspectRatio = mActivity.mWmService.mLetterboxConfiguration
+ final float defaultAspectRatio = mActivity.mWmService.mAppCompatConfiguration
.getDefaultMinAspectRatioForUnresizableApps();
assertEquals(displayBounds.height() / defaultAspectRatio, activityBounds.width(), 0.5);
}
@@ -1976,7 +2069,8 @@ public class SizeCompatTests extends WindowTestsBase {
// App should launch in fixed orientation letterbox.
// Activity bounds should be 700x1400 with the ratio as the display.
- assertTrue(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertTrue(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
assertFitted();
assertEquals(originalScreenWidthDp, mActivity.getConfiguration().smallestScreenWidthDp);
assertTrue(originalScreenWidthDp < originalScreenHeighthDp);
@@ -1986,7 +2080,7 @@ public class SizeCompatTests extends WindowTestsBase {
// After we rotate, the activity should go in the size-compat mode and report the same
// configuration values.
- assertScaled();
+ assertDownScaled();
assertEquals(originalScreenWidthDp, mActivity.getConfiguration().smallestScreenWidthDp);
assertEquals(originalScreenWidthDp, mActivity.getConfiguration().screenWidthDp);
assertEquals(originalScreenHeighthDp, mActivity.getConfiguration().screenHeightDp);
@@ -2018,7 +2112,8 @@ public class SizeCompatTests extends WindowTestsBase {
// App should launch in fixed orientation letterbox.
// Activity bounds should be 700x1400 with the ratio as the display.
- assertTrue(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertTrue(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
assertFitted();
assertEquals(originalScreenWidthDp, mActivity.getConfiguration().smallestScreenWidthDp);
assertTrue(originalScreenWidthDp < originalScreenHeighthDp);
@@ -2041,10 +2136,10 @@ public class SizeCompatTests extends WindowTestsBase {
int screenHeight = 1400;
setUpDisplaySizeWithApp(screenWidth, screenHeight);
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- mActivity.mWmService.mLetterboxConfiguration
+ mActivity.mWmService.mAppCompatConfiguration
.setIsSplitScreenAspectRatioForUnresizableAppsEnabled(true);
- mActivity.mWmService.mLetterboxConfiguration.setFixedOrientationLetterboxAspectRatio(1.1f);
+ mActivity.mWmService.mAppCompatConfiguration.setFixedOrientationLetterboxAspectRatio(1.1f);
prepareUnresizable(mActivity, SCREEN_ORIENTATION_PORTRAIT);
@@ -2052,7 +2147,8 @@ public class SizeCompatTests extends WindowTestsBase {
final Rect activityBounds = new Rect(mActivity.getBounds());
// App should launch in fixed orientation letterbox.
- assertTrue(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertTrue(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
// Checking that there is no size compat mode.
assertFitted();
@@ -2076,14 +2172,15 @@ public class SizeCompatTests extends WindowTestsBase {
final int displayHeight = 1400;
setUpDisplaySizeWithApp(displayWidth, displayHeight);
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- spyOn(mActivity.mWmService.mLetterboxConfiguration);
- doReturn(true).when(mActivity.mWmService.mLetterboxConfiguration)
+ spyOn(mActivity.mWmService.mAppCompatConfiguration);
+ doReturn(true).when(mActivity.mWmService.mAppCompatConfiguration)
.isUserAppAspectRatioFullscreenEnabled();
// Set user aspect ratio override
- spyOn(mActivity.mLetterboxUiController);
- doReturn(USER_MIN_ASPECT_RATIO_FULLSCREEN).when(mActivity.mLetterboxUiController)
- .getUserMinAspectRatioOverrideCode();
+ spyOn(mActivity.mAppCompatController.getAppCompatAspectRatioOverrides());
+ doReturn(USER_MIN_ASPECT_RATIO_FULLSCREEN)
+ .when(mActivity.mAppCompatController.getAppCompatAspectRatioOverrides())
+ .getUserMinAspectRatioOverrideCode();
prepareMinAspectRatio(mActivity, 16 / 9f, SCREEN_ORIENTATION_PORTRAIT);
@@ -2100,14 +2197,15 @@ public class SizeCompatTests extends WindowTestsBase {
final int displayHeight = 1600;
setUpDisplaySizeWithApp(displayWidth, displayHeight);
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- spyOn(mActivity.mWmService.mLetterboxConfiguration);
- doReturn(true).when(mActivity.mWmService.mLetterboxConfiguration)
+ spyOn(mActivity.mWmService.mAppCompatConfiguration);
+ doReturn(true).when(mActivity.mWmService.mAppCompatConfiguration)
.isUserAppAspectRatioFullscreenEnabled();
// Set user aspect ratio override
- spyOn(mActivity.mLetterboxUiController);
- doReturn(USER_MIN_ASPECT_RATIO_FULLSCREEN).when(mActivity.mLetterboxUiController)
- .getUserMinAspectRatioOverrideCode();
+ spyOn(mActivity.mAppCompatController.getAppCompatAspectRatioOverrides());
+ doReturn(USER_MIN_ASPECT_RATIO_FULLSCREEN)
+ .when(mActivity.mAppCompatController.getAppCompatAspectRatioOverrides())
+ .getUserMinAspectRatioOverrideCode();
prepareMinAspectRatio(mActivity, 16 / 9f, SCREEN_ORIENTATION_LANDSCAPE);
@@ -2124,9 +2222,10 @@ public class SizeCompatTests extends WindowTestsBase {
final int displayHeight = 1400;
setUpDisplaySizeWithApp(displayWidth, displayHeight);
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- spyOn(mActivity.mLetterboxUiController);
- doReturn(true).when(mActivity.mLetterboxUiController)
- .isSystemOverrideToFullscreenEnabled();
+ spyOn(mActivity.mAppCompatController.getAppCompatAspectRatioOverrides());
+ doReturn(true).when(
+ mActivity.mAppCompatController.getAppCompatAspectRatioOverrides())
+ .isSystemOverrideToFullscreenEnabled();
prepareMinAspectRatio(mActivity, 16 / 9f, SCREEN_ORIENTATION_PORTRAIT);
@@ -2143,9 +2242,10 @@ public class SizeCompatTests extends WindowTestsBase {
final int displayHeight = 1600;
setUpDisplaySizeWithApp(displayWidth, displayHeight);
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- spyOn(mActivity.mLetterboxUiController);
- doReturn(true).when(mActivity.mLetterboxUiController)
- .isSystemOverrideToFullscreenEnabled();
+ spyOn(mActivity.mAppCompatController.getAppCompatAspectRatioOverrides());
+ doReturn(true).when(
+ mActivity.mAppCompatController.getAppCompatAspectRatioOverrides())
+ .isSystemOverrideToFullscreenEnabled();
prepareMinAspectRatio(mActivity, 16 / 9f, SCREEN_ORIENTATION_LANDSCAPE);
@@ -2294,8 +2394,8 @@ public class SizeCompatTests extends WindowTestsBase {
boolean enabled) {
final ActivityRecord activity = getActivityBuilderOnSameTask().build();
activity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- spyOn(activity.mWmService.mLetterboxConfiguration);
- doReturn(enabled).when(activity.mWmService.mLetterboxConfiguration)
+ spyOn(activity.mWmService.mAppCompatConfiguration);
+ doReturn(enabled).when(activity.mWmService.mAppCompatConfiguration)
.isUserAppAspectRatioSettingsEnabled();
// Set user aspect ratio override
final IPackageManager pm = mAtm.getPackageManager();
@@ -2328,7 +2428,7 @@ public class SizeCompatTests extends WindowTestsBase {
.build();
// Setup Letterbox Configuration
activity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- activity.mWmService.mLetterboxConfiguration.setFixedOrientationLetterboxAspectRatio(1.5f);
+ activity.mWmService.mAppCompatConfiguration.setFixedOrientationLetterboxAspectRatio(1.5f);
// Non-resizable portrait activity
prepareUnresizable(activity, ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
float expectedAspectRatio = 1f * displayWidth / getExpectedSplitSize(displayHeight);
@@ -2349,7 +2449,7 @@ public class SizeCompatTests extends WindowTestsBase {
.build();
// Setup Letterbox Configuration
activity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- activity.mWmService.mLetterboxConfiguration.setFixedOrientationLetterboxAspectRatio(1.5f);
+ activity.mWmService.mAppCompatConfiguration.setFixedOrientationLetterboxAspectRatio(1.5f);
// Non-resizable portrait activity
prepareUnresizable(activity, ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
float expectedAspectRatio = 1f * displayHeight / getExpectedSplitSize(displayWidth);
@@ -2371,7 +2471,7 @@ public class SizeCompatTests extends WindowTestsBase {
.build();
// Setup Letterbox Configuration
activity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- activity.mWmService.mLetterboxConfiguration.setFixedOrientationLetterboxAspectRatio(1.5f);
+ activity.mWmService.mAppCompatConfiguration.setFixedOrientationLetterboxAspectRatio(1.5f);
// Non-resizable portrait activity
prepareUnresizable(activity, ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
float expectedAspectRatio = 1f * displayWidth / getExpectedSplitSize(displayHeight);
@@ -2393,7 +2493,7 @@ public class SizeCompatTests extends WindowTestsBase {
.build();
// Setup Letterbox Configuration
activity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- activity.mWmService.mLetterboxConfiguration.setFixedOrientationLetterboxAspectRatio(1.5f);
+ activity.mWmService.mAppCompatConfiguration.setFixedOrientationLetterboxAspectRatio(1.5f);
// Non-resizable portrait activity
prepareUnresizable(activity, ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
float expectedAspectRatio = 1f * displayHeight / getExpectedSplitSize(displayWidth);
@@ -2481,7 +2581,7 @@ public class SizeCompatTests extends WindowTestsBase {
public void testOverrideMinAspectRatioExcludePortraitFullscreen() {
setUpDisplaySizeWithApp(2600, 1600);
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- mActivity.mWmService.mLetterboxConfiguration.setFixedOrientationLetterboxAspectRatio(1.33f);
+ mActivity.mWmService.mAppCompatConfiguration.setFixedOrientationLetterboxAspectRatio(1.33f);
// Create a size compat activity on the same task.
final ActivityRecord activity = getActivityBuilderOnSameTask().build();
@@ -2511,7 +2611,7 @@ public class SizeCompatTests extends WindowTestsBase {
// In this test, the activity is not in fullscreen, so the override is not applied
setUpDisplaySizeWithApp(2600, 1600);
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- mActivity.mWmService.mLetterboxConfiguration.setFixedOrientationLetterboxAspectRatio(1.33f);
+ mActivity.mWmService.mAppCompatConfiguration.setFixedOrientationLetterboxAspectRatio(1.33f);
// Create a size compat activity on the same task.
final ActivityRecord activity = getActivityBuilderOnSameTask().build();
@@ -2577,10 +2677,10 @@ public class SizeCompatTests extends WindowTestsBase {
int screenHeight = 1600;
setUpDisplaySizeWithApp(screenWidth, screenHeight);
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- mActivity.mWmService.mLetterboxConfiguration
+ mActivity.mWmService.mAppCompatConfiguration
.setIsSplitScreenAspectRatioForUnresizableAppsEnabled(true);
- mActivity.mWmService.mLetterboxConfiguration.setFixedOrientationLetterboxAspectRatio(1.1f);
+ mActivity.mWmService.mAppCompatConfiguration.setFixedOrientationLetterboxAspectRatio(1.1f);
prepareUnresizable(mActivity, SCREEN_ORIENTATION_LANDSCAPE);
@@ -2588,7 +2688,8 @@ public class SizeCompatTests extends WindowTestsBase {
final Rect activityBounds = new Rect(mActivity.getBounds());
// App should launch in fixed orientation letterbox.
- assertTrue(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertTrue(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
// Checking that there is no size compat mode.
assertFitted();
@@ -2613,11 +2714,11 @@ public class SizeCompatTests extends WindowTestsBase {
int displayHeight = 1600;
setUpDisplaySizeWithApp(displayWidth, displayHeight);
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- mWm.mLetterboxConfiguration.setFixedOrientationLetterboxAspectRatio(2f);
+ mWm.mAppCompatConfiguration.setFixedOrientationLetterboxAspectRatio(2f);
// Enable display aspect ratio to take precedence before
// fixedOrientationLetterboxAspectRatio
- mWm.mLetterboxConfiguration
+ mWm.mAppCompatConfiguration
.setIsDisplayAspectRatioEnabledForFixedOrientationLetterbox(true);
// Set up resizable app in portrait
@@ -2632,13 +2733,14 @@ public class SizeCompatTests extends WindowTestsBase {
assertEquals(WINDOWING_MODE_MULTI_WINDOW, mActivity.getWindowingMode());
// App should launch in fixed orientation letterbox.
- assertTrue(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertTrue(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
// Checking that there is no size compat mode.
assertFitted();
// Check that the display aspect ratio is used by the app.
final float targetMinAspectRatio = 1f * displayHeight / displayWidth;
- assertEquals(targetMinAspectRatio, ActivityRecord
- .computeAspectRatio(mActivity.getBounds()), DELTA_ASPECT_RATIO_TOLERANCE);
+ assertEquals(targetMinAspectRatio, computeAspectRatio(mActivity.getBounds()),
+ DELTA_ASPECT_RATIO_TOLERANCE);
}
@Test
@@ -2648,11 +2750,11 @@ public class SizeCompatTests extends WindowTestsBase {
int displayHeight = 1400;
setUpDisplaySizeWithApp(displayWidth, displayHeight);
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- mWm.mLetterboxConfiguration.setFixedOrientationLetterboxAspectRatio(2f);
+ mWm.mAppCompatConfiguration.setFixedOrientationLetterboxAspectRatio(2f);
// Enable display aspect ratio to take precedence before
// fixedOrientationLetterboxAspectRatio
- mWm.mLetterboxConfiguration
+ mWm.mAppCompatConfiguration
.setIsDisplayAspectRatioEnabledForFixedOrientationLetterbox(true);
// Set up resizable app in landscape
@@ -2667,13 +2769,14 @@ public class SizeCompatTests extends WindowTestsBase {
assertEquals(WINDOWING_MODE_MULTI_WINDOW, mActivity.getWindowingMode());
// App should launch in fixed orientation letterbox.
- assertTrue(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertTrue(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
// Checking that there is no size compat mode.
assertFitted();
// Check that the display aspect ratio is used by the app.
final float targetMinAspectRatio = 1f * displayWidth / displayHeight;
- assertEquals(targetMinAspectRatio, ActivityRecord
- .computeAspectRatio(mActivity.getBounds()), DELTA_ASPECT_RATIO_TOLERANCE);
+ assertEquals(targetMinAspectRatio, computeAspectRatio(mActivity.getBounds()),
+ DELTA_ASPECT_RATIO_TOLERANCE);
}
@Test
@@ -2684,22 +2787,23 @@ public class SizeCompatTests extends WindowTestsBase {
setUpDisplaySizeWithApp(displayWidth, displayHeight);
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- mActivity.mWmService.mLetterboxConfiguration.setFixedOrientationLetterboxAspectRatio(1.1f);
+ mActivity.mWmService.mAppCompatConfiguration.setFixedOrientationLetterboxAspectRatio(1.1f);
// Enable display aspect ratio to take precedence before
// fixedOrientationLetterboxAspectRatio
- mWm.mLetterboxConfiguration
+ mWm.mAppCompatConfiguration
.setIsDisplayAspectRatioEnabledForFixedOrientationLetterbox(true);
prepareUnresizable(mActivity, SCREEN_ORIENTATION_LANDSCAPE);
// App should launch in fixed orientation letterbox.
- assertTrue(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertTrue(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
// Checking that there is no size compat mode.
assertFitted();
// Check that the display aspect ratio is used by the app.
final float targetMinAspectRatio = 1f * displayHeight / displayWidth;
- assertEquals(targetMinAspectRatio, ActivityRecord
- .computeAspectRatio(mActivity.getBounds()), DELTA_ASPECT_RATIO_TOLERANCE);
+ assertEquals(targetMinAspectRatio, computeAspectRatio(mActivity.getBounds()),
+ DELTA_ASPECT_RATIO_TOLERANCE);
}
@Test
@@ -2710,22 +2814,23 @@ public class SizeCompatTests extends WindowTestsBase {
setUpDisplaySizeWithApp(displayWidth, displayHeight);
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- mActivity.mWmService.mLetterboxConfiguration.setFixedOrientationLetterboxAspectRatio(1.1f);
+ mActivity.mWmService.mAppCompatConfiguration.setFixedOrientationLetterboxAspectRatio(1.1f);
// Enable display aspect ratio to take precedence before
// fixedOrientationLetterboxAspectRatio
- mWm.mLetterboxConfiguration
+ mWm.mAppCompatConfiguration
.setIsDisplayAspectRatioEnabledForFixedOrientationLetterbox(true);
prepareUnresizable(mActivity, SCREEN_ORIENTATION_PORTRAIT);
// App should launch in fixed orientation letterbox.
- assertTrue(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertTrue(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
// Checking that there is no size compat mode.
assertFitted();
// Check that the display aspect ratio is used by the app.
final float targetMinAspectRatio = 1f * displayWidth / displayHeight;
- assertEquals(targetMinAspectRatio, ActivityRecord
- .computeAspectRatio(mActivity.getBounds()), DELTA_ASPECT_RATIO_TOLERANCE);
+ assertEquals(targetMinAspectRatio, computeAspectRatio(mActivity.getBounds()),
+ DELTA_ASPECT_RATIO_TOLERANCE);
}
@Test
@@ -2748,8 +2853,9 @@ public class SizeCompatTests extends WindowTestsBase {
assertTrue(displayBounds.width() < displayBounds.height());
// App should be in size compat.
- assertFalse(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
- assertScaled();
+ assertFalse(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
+ assertDownScaled();
assertEquals(activityBounds.width(), newActivityBounds.width());
assertEquals(activityBounds.height(), newActivityBounds.height());
assertActivityMaxBoundsSandboxed();
@@ -2765,7 +2871,8 @@ public class SizeCompatTests extends WindowTestsBase {
prepareUnresizable(mActivity, 0, SCREEN_ORIENTATION_PORTRAIT);
// App should launch in fullscreen.
- assertFalse(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertFalse(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
assertFalse(mActivity.inSizeCompatMode());
// Activity inherits max bounds from TaskDisplayArea.
assertMaxBoundsInheritDisplayAreaBounds();
@@ -2778,8 +2885,9 @@ public class SizeCompatTests extends WindowTestsBase {
assertTrue(rotatedDisplayBounds.width() > rotatedDisplayBounds.height());
// App should be in size compat.
- assertFalse(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
- assertScaled();
+ assertFalse(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
+ assertDownScaled();
assertThat(mActivity.inSizeCompatMode()).isTrue();
assertActivityMaxBoundsSandboxed();
@@ -2799,7 +2907,8 @@ public class SizeCompatTests extends WindowTestsBase {
// Portrait fixed app without max aspect.
prepareUnresizable(mActivity, 0, SCREEN_ORIENTATION_PORTRAIT);
- assertTrue(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertTrue(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
assertFalse(mActivity.inSizeCompatMode());
// Launch another portrait fixed app.
@@ -2821,7 +2930,8 @@ public class SizeCompatTests extends WindowTestsBase {
// Task and display bounds should be equal while activity should be letterboxed and
// has 700x1400 bounds with the ratio as the display.
- assertTrue(newActivity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertTrue(newActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
assertFalse(newActivity.inSizeCompatMode());
// Activity max bounds are sandboxed due to size compat mode.
assertThat(newActivity.getConfiguration().windowConfiguration.getMaxBounds())
@@ -2842,7 +2952,8 @@ public class SizeCompatTests extends WindowTestsBase {
// Portrait fixed app without max aspect.
prepareUnresizable(mActivity, 0, SCREEN_ORIENTATION_PORTRAIT);
- assertTrue(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertTrue(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
assertFalse(mActivity.inSizeCompatMode());
mActivity.setRequestedOrientation(SCREEN_ORIENTATION_UNSPECIFIED);
@@ -2863,7 +2974,8 @@ public class SizeCompatTests extends WindowTestsBase {
// Portrait fixed app without max aspect.
prepareUnresizable(mActivity, 0, SCREEN_ORIENTATION_PORTRAIT);
- assertTrue(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertTrue(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
assertFalse(mActivity.inSizeCompatMode());
// Launch another portrait fixed app with max aspect ratio as 1.3.
@@ -2893,7 +3005,8 @@ public class SizeCompatTests extends WindowTestsBase {
assertActivityMaxBoundsSandboxed();
// Activity bounds should be (1400 / 1.3 = 1076)x1400 with the app requested ratio.
- assertTrue(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertTrue(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
assertFalse(newActivity.inSizeCompatMode());
assertEquals(displayBounds.height(), newActivityBounds.height());
assertEquals((long) Math.rint(newActivityBounds.height()
@@ -2912,15 +3025,17 @@ public class SizeCompatTests extends WindowTestsBase {
prepareUnresizable(mActivity, 0, SCREEN_ORIENTATION_PORTRAIT);
clearInvocations(mActivity);
- assertTrue(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertTrue(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
assertFalse(mActivity.inSizeCompatMode());
// Rotate display to portrait.
rotateDisplay(mActivity.mDisplayContent, ROTATION_90);
// App should be in size compat.
- assertFalse(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
- assertScaled();
+ assertFalse(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
+ assertDownScaled();
assertThat(mActivity.inSizeCompatMode()).isTrue();
// Activity max bounds are sandboxed due to size compat mode.
assertActivityMaxBoundsSandboxed();
@@ -2930,8 +3045,9 @@ public class SizeCompatTests extends WindowTestsBase {
// App still in size compat, and the bounds don't change.
verify(mActivity, never()).clearSizeCompatMode();
- assertFalse(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
- assertScaled();
+ assertFalse(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
+ assertDownScaled();
assertEquals(activityBounds, mActivity.getBounds());
// Activity max bounds are sandboxed due to size compat.
assertActivityMaxBoundsSandboxed();
@@ -2948,7 +3064,8 @@ public class SizeCompatTests extends WindowTestsBase {
prepareUnresizable(mActivity, 0, SCREEN_ORIENTATION_PORTRAIT);
// In fixed orientation letterbox
- assertTrue(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertTrue(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
assertFalse(mActivity.inSizeCompatMode());
assertActivityMaxBoundsSandboxed();
@@ -2956,15 +3073,17 @@ public class SizeCompatTests extends WindowTestsBase {
rotateDisplay(display, ROTATION_90);
// App should be in size compat.
- assertFalse(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
- assertScaled();
+ assertFalse(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
+ assertDownScaled();
assertActivityMaxBoundsSandboxed();
// Rotate display to landscape.
rotateDisplay(display, ROTATION_180);
// In activity letterbox
- assertTrue(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertTrue(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
assertFalse(mActivity.inSizeCompatMode());
assertActivityMaxBoundsSandboxed();
}
@@ -2982,7 +3101,8 @@ public class SizeCompatTests extends WindowTestsBase {
prepareUnresizable(mActivity, 0, SCREEN_ORIENTATION_LANDSCAPE);
// In fixed orientation letterbox
- assertTrue(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertTrue(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
assertFalse(mActivity.inSizeCompatMode());
assertActivityMaxBoundsSandboxed();
@@ -2990,15 +3110,17 @@ public class SizeCompatTests extends WindowTestsBase {
rotateDisplay(display, ROTATION_90);
// App should be in size compat.
- assertFalse(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
- assertScaled();
+ assertFalse(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
+ assertDownScaled();
assertActivityMaxBoundsSandboxed();
// Rotate display to portrait.
rotateDisplay(display, ROTATION_180);
// In fixed orientation letterbox
- assertTrue(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertTrue(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
assertFalse(mActivity.inSizeCompatMode());
assertActivityMaxBoundsSandboxed();
}
@@ -3012,14 +3134,14 @@ public class SizeCompatTests extends WindowTestsBase {
RESIZE_MODE_UNRESIZEABLE, SCREEN_ORIENTATION_PORTRAIT);
activity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- spyOn(activity.mWmService.mLetterboxConfiguration);
- doReturn(true).when(activity.mWmService.mLetterboxConfiguration)
+ spyOn(activity.mWmService.mAppCompatConfiguration);
+ doReturn(true).when(activity.mWmService.mAppCompatConfiguration)
.isIgnoreOrientationRequestAllowed();
// Display should not be rotated.
assertEquals(SCREEN_ORIENTATION_UNSPECIFIED, activity.mDisplayContent.getOrientation());
- doReturn(false).when(activity.mWmService.mLetterboxConfiguration)
+ doReturn(false).when(activity.mWmService.mAppCompatConfiguration)
.isIgnoreOrientationRequestAllowed();
// Display should be rotated.
@@ -3182,7 +3304,7 @@ public class SizeCompatTests extends WindowTestsBase {
assertEquals(WINDOWING_MODE_MULTI_WINDOW, mActivity.getWindowingMode());
// Non-resizable activity in size compat mode
- assertScaled();
+ assertDownScaled();
final Rect newBounds = new Rect(mActivity.getWindowConfiguration().getBounds());
assertEquals(originalBounds.width(), newBounds.width());
assertEquals(originalBounds.height(), newBounds.height());
@@ -3195,7 +3317,8 @@ public class SizeCompatTests extends WindowTestsBase {
assertEquals(ORIENTATION_PORTRAIT, mTask.getConfiguration().orientation);
assertEquals(ORIENTATION_LANDSCAPE, mActivity.getConfiguration().orientation);
assertFitted();
- assertTrue(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertTrue(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
assertActivityMaxBoundsSandboxed();
// Letterbox should fill the gap between the split screen and the letterboxed activity.
@@ -3221,7 +3344,8 @@ public class SizeCompatTests extends WindowTestsBase {
// Resizable activity is not in size compat mode but in the letterbox for fixed orientation.
assertFitted();
- assertTrue(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertTrue(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
}
@Test
@@ -3244,7 +3368,7 @@ public class SizeCompatTests extends WindowTestsBase {
assertEquals(WINDOWING_MODE_MULTI_WINDOW, mActivity.getWindowingMode());
// Non-resizable activity in size compat mode
- assertScaled();
+ assertDownScaled();
final Rect newBounds = new Rect(mActivity.getWindowConfiguration().getBounds());
assertEquals(originalBounds.width(), newBounds.width());
assertEquals(originalBounds.height(), newBounds.height());
@@ -3257,7 +3381,8 @@ public class SizeCompatTests extends WindowTestsBase {
assertEquals(ORIENTATION_PORTRAIT, mTask.getConfiguration().orientation);
assertEquals(ORIENTATION_PORTRAIT, mActivity.getConfiguration().orientation);
assertFitted();
- assertFalse(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertFalse(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
assertActivityMaxBoundsSandboxed();
// Activity bounds fill split screen.
@@ -3284,7 +3409,7 @@ public class SizeCompatTests extends WindowTestsBase {
organizer.mPrimary.setBounds(0, 0, 1000, 800);
// Non-resizable activity should be in size compat mode.
- assertScaled();
+ assertDownScaled();
assertEquals(mActivity.getBounds(), new Rect(60, 0, 940, 800));
recomputeNaturalConfigurationOfUnresizableActivity();
@@ -3302,7 +3427,7 @@ public class SizeCompatTests extends WindowTestsBase {
// Case when the reachability would be enabled otherwise
setUpDisplaySizeWithApp(/* dw */ 1000, /* dh */ 2800);
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- mWm.mLetterboxConfiguration.setIsVerticalReachabilityEnabled(true);
+ mWm.mAppCompatConfiguration.setIsVerticalReachabilityEnabled(true);
prepareUnresizable(mActivity, SCREEN_ORIENTATION_LANDSCAPE);
mActivity.getWindowConfiguration().setBounds(null);
@@ -3317,7 +3442,7 @@ public class SizeCompatTests extends WindowTestsBase {
mAtm.mDevEnableNonResizableMultiWindow = true;
setUpDisplaySizeWithApp(2800, 1000);
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- mWm.mLetterboxConfiguration.setIsHorizontalReachabilityEnabled(true);
+ mWm.mAppCompatConfiguration.setIsHorizontalReachabilityEnabled(true);
setUpAllowThinLetterboxed(/* thinLetterboxAllowed */ true);
final TestSplitOrganizer organizer =
new TestSplitOrganizer(mAtm, mActivity.getDisplayContent());
@@ -3340,7 +3465,7 @@ public class SizeCompatTests extends WindowTestsBase {
mAtm.mDevEnableNonResizableMultiWindow = true;
setUpDisplaySizeWithApp(1000, 2800);
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- mWm.mLetterboxConfiguration.setIsVerticalReachabilityEnabled(true);
+ mWm.mAppCompatConfiguration.setIsVerticalReachabilityEnabled(true);
setUpAllowThinLetterboxed(/* thinLetterboxAllowed */ true);
final TestSplitOrganizer organizer =
new TestSplitOrganizer(mAtm, mActivity.getDisplayContent());
@@ -3362,7 +3487,7 @@ public class SizeCompatTests extends WindowTestsBase {
public void testIsVerticalReachabilityEnabled_doesNotMatchParentWidth_false() {
setUpDisplaySizeWithApp(1000, 2800);
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- mWm.mLetterboxConfiguration.setIsVerticalReachabilityEnabled(true);
+ mWm.mAppCompatConfiguration.setIsVerticalReachabilityEnabled(true);
setUpAllowThinLetterboxed(/* thinLetterboxAllowed */ true);
// Unresizable landscape-only activity.
@@ -3384,7 +3509,7 @@ public class SizeCompatTests extends WindowTestsBase {
public void testIsVerticalReachabilityEnabled_emptyBounds_true() {
setUpDisplaySizeWithApp(/* dw */ 1000, /* dh */ 2800);
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- mWm.mLetterboxConfiguration.setIsVerticalReachabilityEnabled(true);
+ mWm.mAppCompatConfiguration.setIsVerticalReachabilityEnabled(true);
setUpAllowThinLetterboxed(/* thinLetterboxAllowed */ true);
prepareUnresizable(mActivity, SCREEN_ORIENTATION_LANDSCAPE);
@@ -3401,7 +3526,7 @@ public class SizeCompatTests extends WindowTestsBase {
public void testIsHorizontalReachabilityEnabled_emptyBounds_true() {
setUpDisplaySizeWithApp(/* dw */ 2800, /* dh */ 1000);
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- mWm.mLetterboxConfiguration.setIsHorizontalReachabilityEnabled(true);
+ mWm.mAppCompatConfiguration.setIsHorizontalReachabilityEnabled(true);
setUpAllowThinLetterboxed(/* thinLetterboxAllowed */ true);
prepareUnresizable(mActivity, SCREEN_ORIENTATION_PORTRAIT);
@@ -3418,7 +3543,7 @@ public class SizeCompatTests extends WindowTestsBase {
public void testIsHorizontalReachabilityEnabled_portraitDisplayAndApp_true() {
// Portrait display
setUpDisplaySizeWithApp(1400, 1600);
- mActivity.mWmService.mLetterboxConfiguration.setIsHorizontalReachabilityEnabled(true);
+ mActivity.mWmService.mAppCompatConfiguration.setIsHorizontalReachabilityEnabled(true);
setUpAllowThinLetterboxed(/* thinLetterboxAllowed */ true);
// 16:9f unresizable portrait app
@@ -3432,7 +3557,7 @@ public class SizeCompatTests extends WindowTestsBase {
public void testIsVerticalReachabilityEnabled_landscapeDisplayAndApp_true() {
// Landscape display
setUpDisplaySizeWithApp(1600, 1500);
- mActivity.mWmService.mLetterboxConfiguration.setIsVerticalReachabilityEnabled(true);
+ mActivity.mWmService.mAppCompatConfiguration.setIsVerticalReachabilityEnabled(true);
setUpAllowThinLetterboxed(/* thinLetterboxAllowed */ true);
// 16:9f unresizable landscape app
@@ -3446,7 +3571,7 @@ public class SizeCompatTests extends WindowTestsBase {
public void testIsHorizontalReachabilityEnabled_doesNotMatchParentHeight_false() {
setUpDisplaySizeWithApp(2800, 1000);
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- mWm.mLetterboxConfiguration.setIsHorizontalReachabilityEnabled(true);
+ mWm.mAppCompatConfiguration.setIsHorizontalReachabilityEnabled(true);
setUpAllowThinLetterboxed(/* thinLetterboxAllowed */ true);
// Unresizable portrait-only activity.
@@ -3468,7 +3593,7 @@ public class SizeCompatTests extends WindowTestsBase {
public void testIsHorizontalReachabilityEnabled_inSizeCompatMode_matchesParentHeight_true() {
setUpDisplaySizeWithApp(1800, 2200);
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- mWm.mLetterboxConfiguration.setIsHorizontalReachabilityEnabled(true);
+ mWm.mAppCompatConfiguration.setIsHorizontalReachabilityEnabled(true);
setUpAllowThinLetterboxed(/* thinLetterboxAllowed */ true);
// Unresizable portrait-only activity.
@@ -3490,7 +3615,7 @@ public class SizeCompatTests extends WindowTestsBase {
public void testIsVerticalReachabilityEnabled_inSizeCompatMode_matchesParentWidth_true() {
setUpDisplaySizeWithApp(2200, 1800);
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- mWm.mLetterboxConfiguration.setIsVerticalReachabilityEnabled(true);
+ mWm.mAppCompatConfiguration.setIsVerticalReachabilityEnabled(true);
setUpAllowThinLetterboxed(/* thinLetterboxAllowed */ true);
// Unresizable landscape-only activity.
@@ -3573,7 +3698,7 @@ public class SizeCompatTests extends WindowTestsBase {
@Test
public void testLetterboxDetailsForStatusBar_letterboxNotOverlappingStatusBar() {
// Align to center so that we don't overlap with the status bar
- mAtm.mWindowManager.mLetterboxConfiguration.setLetterboxVerticalPositionMultiplier(0.5f);
+ mAtm.mWindowManager.mAppCompatConfiguration.setLetterboxVerticalPositionMultiplier(0.5f);
final DisplayContent display = new TestDisplayContent.Builder(mAtm, 1000, 2800)
.setNotch(100)
.build();
@@ -3626,7 +3751,7 @@ public class SizeCompatTests extends WindowTestsBase {
navSource.setFlags(FLAG_INSETS_ROUNDED_CORNER, FLAG_INSETS_ROUNDED_CORNER);
navSource.setFrame(new Rect(0, screenHeight - taskbarHeight, screenWidth, screenHeight));
- mActivity.mWmService.mLetterboxConfiguration.setLetterboxActivityCornersRadius(15);
+ mActivity.mWmService.mAppCompatConfiguration.setLetterboxActivityCornersRadius(15);
final WindowState w1 = addWindowToActivity(mActivity);
w1.mAboveInsetsState.addSource(navSource);
@@ -3668,7 +3793,7 @@ public class SizeCompatTests extends WindowTestsBase {
setUpDisplaySizeWithApp(screenWidth, screenHeight);
mActivity.mDisplayContent.setIgnoreOrientationRequest(true);
- mActivity.mWmService.mLetterboxConfiguration.setLetterboxVerticalPositionMultiplier(1.0f);
+ mActivity.mWmService.mAppCompatConfiguration.setLetterboxVerticalPositionMultiplier(1.0f);
final InsetsSource navSource = new InsetsSource(
InsetsSource.createId(null, 0, navigationBars()), navigationBars());
@@ -3676,7 +3801,7 @@ public class SizeCompatTests extends WindowTestsBase {
// Immersive activity has transient navbar
navSource.setVisible(!immersive);
navSource.setFrame(new Rect(0, screenHeight - taskbarHeight, screenWidth, screenHeight));
- mActivity.mWmService.mLetterboxConfiguration.setLetterboxActivityCornersRadius(15);
+ mActivity.mWmService.mAppCompatConfiguration.setLetterboxActivityCornersRadius(15);
final WindowState w1 = addWindowToActivity(mActivity);
w1.mAboveInsetsState.addSource(navSource);
@@ -3784,7 +3909,7 @@ public class SizeCompatTests extends WindowTestsBase {
spyOn(policy);
doReturn(decorInfo).when(policy).getDecorInsetsInfo(ROTATION_90,
display.mBaseDisplayHeight, display.mBaseDisplayWidth);
- mWm.mLetterboxConfiguration.setLetterboxVerticalPositionMultiplier(0.5f);
+ mWm.mAppCompatConfiguration.setLetterboxVerticalPositionMultiplier(0.5f);
setUpApp(display);
prepareUnresizable(mActivity, SCREEN_ORIENTATION_PORTRAIT);
@@ -3849,7 +3974,7 @@ public class SizeCompatTests extends WindowTestsBase {
setUpDisplaySizeWithApp(2800, 1400);
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- mActivity.mWmService.mLetterboxConfiguration.setLetterboxHorizontalPositionMultiplier(
+ mActivity.mWmService.mAppCompatConfiguration.setLetterboxHorizontalPositionMultiplier(
letterboxHorizontalPositionMultiplier);
prepareUnresizable(mActivity, SCREEN_ORIENTATION_PORTRAIT);
assertEquals(fixedOrientationLetterbox, mActivity.getBounds());
@@ -3861,7 +3986,7 @@ public class SizeCompatTests extends WindowTestsBase {
// Force activity to scaled down for size compat mode.
resizeDisplay(mTask.mDisplayContent, 700, 1400);
assertTrue(mActivity.inSizeCompatMode());
- assertScaled();
+ assertDownScaled();
assertEquals(sizeCompatScaled, mActivity.getBounds());
}
@@ -3892,7 +4017,8 @@ public class SizeCompatTests extends WindowTestsBase {
// orientation is not respected with insets as insets have been decoupled.
final Rect appBounds = activity.getWindowConfiguration().getAppBounds();
final Rect displayBounds = display.getBounds();
- assertFalse(activity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertFalse(activity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
assertNotNull(appBounds);
assertEquals(displayBounds.width(), appBounds.width());
assertEquals(displayBounds.height(), appBounds.height());
@@ -3923,7 +4049,8 @@ public class SizeCompatTests extends WindowTestsBase {
final Rect bounds = activity.getBounds();
// Activity should be letterboxed and should have portrait app bounds
- assertTrue(activity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertTrue(activity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
assertTrue(bounds.height() > bounds.width());
}
@@ -3957,7 +4084,8 @@ public class SizeCompatTests extends WindowTestsBase {
assertNotNull(activity.getCompatDisplayInsets());
// Activity is not letterboxed for fixed orientation because orientation is respected
// with insets, and should not be in size compat mode
- assertFalse(activity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertFalse(activity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
assertFalse(activity.inSizeCompatMode());
}
@@ -4043,7 +4171,7 @@ public class SizeCompatTests extends WindowTestsBase {
public void testApplyAspectRatio_containingRatioAlmostEqualToMaxRatio_boundsUnchanged() {
setUpDisplaySizeWithApp(1981, 2576);
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- mWm.mLetterboxConfiguration.setLetterboxVerticalPositionMultiplier(0.5f);
+ mWm.mAppCompatConfiguration.setLetterboxVerticalPositionMultiplier(0.5f);
final Rect originalBounds = new Rect(mActivity.getBounds());
prepareUnresizable(mActivity, 1.3f, SCREEN_ORIENTATION_UNSPECIFIED);
@@ -4078,7 +4206,7 @@ public class SizeCompatTests extends WindowTestsBase {
spyOn(policy);
doReturn(decorInfo).when(policy).getDecorInsetsInfo(ROTATION_90,
display.mBaseDisplayHeight, display.mBaseDisplayWidth);
- mWm.mLetterboxConfiguration.setLetterboxVerticalPositionMultiplier(0.5f);
+ mWm.mAppCompatConfiguration.setLetterboxVerticalPositionMultiplier(0.5f);
setUpApp(display);
prepareUnresizable(mActivity, SCREEN_ORIENTATION_LANDSCAPE);
@@ -4141,7 +4269,7 @@ public class SizeCompatTests extends WindowTestsBase {
// Set up a display in portrait with a fixed-orientation LANDSCAPE app
setUpDisplaySizeWithApp(1400, 2800);
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- mActivity.mWmService.mLetterboxConfiguration.setLetterboxVerticalPositionMultiplier(
+ mActivity.mWmService.mAppCompatConfiguration.setLetterboxVerticalPositionMultiplier(
1.0f /*letterboxVerticalPositionMultiplier*/);
prepareUnresizable(mActivity, SCREEN_ORIENTATION_LANDSCAPE);
@@ -4166,7 +4294,7 @@ public class SizeCompatTests extends WindowTestsBase {
// Set up a display in portrait with a fixed-orientation LANDSCAPE app.
setUpDisplaySizeWithApp(1000, 2000);
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- mActivity.mWmService.mLetterboxConfiguration.setLetterboxVerticalPositionMultiplier(
+ mActivity.mWmService.mAppCompatConfiguration.setLetterboxVerticalPositionMultiplier(
1.0f /*letterboxVerticalPositionMultiplier*/);
prepareUnresizable(mActivity, SCREEN_ORIENTATION_LANDSCAPE);
@@ -4194,9 +4322,9 @@ public class SizeCompatTests extends WindowTestsBase {
public void testGetFixedOrientationLetterboxAspectRatio_tabletop_centered() {
// Set up a display in portrait with a fixed-orientation LANDSCAPE app
setUpDisplaySizeWithApp(1400, 2800);
- mWm.mLetterboxConfiguration.setLetterboxHorizontalPositionMultiplier(
+ mWm.mAppCompatConfiguration.setLetterboxHorizontalPositionMultiplier(
LETTERBOX_POSITION_MULTIPLIER_CENTER);
- mActivity.mWmService.mLetterboxConfiguration.setLetterboxVerticalPositionMultiplier(
+ mActivity.mWmService.mAppCompatConfiguration.setLetterboxVerticalPositionMultiplier(
1.0f /*letterboxVerticalPositionMultiplier*/);
prepareUnresizable(mActivity, SCREEN_ORIENTATION_LANDSCAPE);
@@ -4204,9 +4332,10 @@ public class SizeCompatTests extends WindowTestsBase {
Configuration parentConfig = mActivity.getParent().getConfiguration();
- float actual = mActivity.mLetterboxUiController
- .getFixedOrientationLetterboxAspectRatio(parentConfig);
- float expected = mActivity.mLetterboxUiController.getSplitScreenAspectRatio();
+ final AppCompatAspectRatioOverrides aspectRatioOverrides =
+ mActivity.mAppCompatController.getAppCompatAspectRatioOverrides();
+ float actual = aspectRatioOverrides.getFixedOrientationLetterboxAspectRatio(parentConfig);
+ float expected = aspectRatioOverrides.getSplitScreenAspectRatio();
assertEquals(expected, actual, DELTA_ASPECT_RATIO_TOLERANCE);
}
@@ -4231,8 +4360,8 @@ public class SizeCompatTests extends WindowTestsBase {
// Set up a display in landscape with a fixed-orientation PORTRAIT app
setUpDisplaySizeWithApp(2800, 1400);
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- mWm.mLetterboxConfiguration.setIsAutomaticReachabilityInBookModeEnabled(true);
- mWm.mLetterboxConfiguration.setLetterboxHorizontalPositionMultiplier(
+ mWm.mAppCompatConfiguration.setIsAutomaticReachabilityInBookModeEnabled(true);
+ mWm.mAppCompatConfiguration.setLetterboxHorizontalPositionMultiplier(
1.0f /*letterboxHorizontalPositionMultiplier*/);
prepareUnresizable(mActivity, SCREEN_ORIENTATION_PORTRAIT);
@@ -4257,8 +4386,8 @@ public class SizeCompatTests extends WindowTestsBase {
// Set up a display in landscape with a fixed-orientation PORTRAIT app
setUpDisplaySizeWithApp(2800, 1400);
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- mWm.mLetterboxConfiguration.setIsAutomaticReachabilityInBookModeEnabled(false);
- mWm.mLetterboxConfiguration.setLetterboxHorizontalPositionMultiplier(0.5f);
+ mWm.mAppCompatConfiguration.setIsAutomaticReachabilityInBookModeEnabled(false);
+ mWm.mAppCompatConfiguration.setLetterboxHorizontalPositionMultiplier(0.5f);
prepareUnresizable(mActivity, 1.75f, SCREEN_ORIENTATION_PORTRAIT);
Rect letterboxNoFold = new Rect(1000, 0, 1800, 1400);
@@ -4340,7 +4469,7 @@ public class SizeCompatTests extends WindowTestsBase {
setUpDisplaySizeWithApp(1400, 2800);
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- mActivity.mWmService.mLetterboxConfiguration.setLetterboxVerticalPositionMultiplier(
+ mActivity.mWmService.mAppCompatConfiguration.setLetterboxVerticalPositionMultiplier(
letterboxVerticalPositionMultiplier);
prepareUnresizable(mActivity, SCREEN_ORIENTATION_LANDSCAPE);
@@ -4357,7 +4486,7 @@ public class SizeCompatTests extends WindowTestsBase {
resizeDisplay(mTask.mDisplayContent, 1400, 700);
assertTrue(mActivity.inSizeCompatMode());
- assertScaled();
+ assertDownScaled();
assertEquals(sizeCompatScaled, mActivity.getBounds());
}
@@ -4380,7 +4509,8 @@ public class SizeCompatTests extends WindowTestsBase {
verifyLogAppCompatState(mActivity, APP_COMPAT_STATE_CHANGED__STATE__NOT_LETTERBOXED);
prepareUnresizable(mActivity, /* maxAspect= */ 2, SCREEN_ORIENTATION_PORTRAIT);
- assertFalse(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertFalse(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
assertFalse(mActivity.inSizeCompatMode());
assertTrue(mActivity.areBoundsLetterboxed());
@@ -4396,7 +4526,8 @@ public class SizeCompatTests extends WindowTestsBase {
// ActivityRecord#resolveSizeCompatModeConfiguration because mCompatDisplayInsets aren't
// null but activity doesn't enter size compat mode. Checking that areBoundsLetterboxed()
// still returns true because of the aspect ratio restrictions.
- assertFalse(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertFalse(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
assertFalse(mActivity.inSizeCompatMode());
assertTrue(mActivity.areBoundsLetterboxed());
verifyLogAppCompatState(mActivity,
@@ -4423,7 +4554,8 @@ public class SizeCompatTests extends WindowTestsBase {
prepareUnresizable(mActivity, SCREEN_ORIENTATION_PORTRAIT);
- assertTrue(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertTrue(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
assertFalse(mActivity.inSizeCompatMode());
assertTrue(mActivity.areBoundsLetterboxed());
verifyLogAppCompatState(mActivity,
@@ -4441,7 +4573,8 @@ public class SizeCompatTests extends WindowTestsBase {
rotateDisplay(mActivity.mDisplayContent, ROTATION_90);
- assertFalse(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertFalse(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
assertTrue(mActivity.inSizeCompatMode());
assertTrue(mActivity.areBoundsLetterboxed());
verifyLogAppCompatState(mActivity,
@@ -4452,7 +4585,7 @@ public class SizeCompatTests extends WindowTestsBase {
public void testIsEligibleForLetterboxEducation_educationNotEnabled_returnsFalse() {
setUpDisplaySizeWithApp(2500, 1000);
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- mActivity.mWmService.mLetterboxConfiguration.setIsEducationEnabled(false);
+ mActivity.mWmService.mAppCompatConfiguration.setIsEducationEnabled(false);
prepareUnresizable(mActivity, SCREEN_ORIENTATION_PORTRAIT);
@@ -4463,7 +4596,7 @@ public class SizeCompatTests extends WindowTestsBase {
public void testIsEligibleForLetterboxEducation_notEligibleForFixedOrientation_returnsFalse() {
setUpDisplaySizeWithApp(1000, 2500);
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- mActivity.mWmService.mLetterboxConfiguration.setIsEducationEnabled(true);
+ mActivity.mWmService.mAppCompatConfiguration.setIsEducationEnabled(true);
prepareUnresizable(mActivity, SCREEN_ORIENTATION_PORTRAIT);
@@ -4476,7 +4609,7 @@ public class SizeCompatTests extends WindowTestsBase {
mAtm.mDevEnableNonResizableMultiWindow = true;
setUpDisplaySizeWithApp(1000, 1200);
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- mActivity.mWmService.mLetterboxConfiguration.setIsEducationEnabled(true);
+ mActivity.mWmService.mAppCompatConfiguration.setIsEducationEnabled(true);
final TestSplitOrganizer organizer =
new TestSplitOrganizer(mAtm, mActivity.getDisplayContent());
@@ -4497,19 +4630,20 @@ public class SizeCompatTests extends WindowTestsBase {
public void testIsEligibleForLetterboxEducation_fixedOrientationLandscape_returnsFalse() {
setUpDisplaySizeWithApp(1000, 2500);
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- mActivity.mWmService.mLetterboxConfiguration.setIsEducationEnabled(true);
+ mActivity.mWmService.mAppCompatConfiguration.setIsEducationEnabled(true);
prepareUnresizable(mActivity, SCREEN_ORIENTATION_LANDSCAPE);
assertFalse(mActivity.isEligibleForLetterboxEducation());
- assertTrue(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertTrue(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
}
@Test
public void testIsEligibleForLetterboxEducation_hasStartingWindow_returnsFalseUntilRemoved() {
setUpDisplaySizeWithApp(2500, 1000);
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- mActivity.mWmService.mLetterboxConfiguration.setIsEducationEnabled(true);
+ mActivity.mWmService.mAppCompatConfiguration.setIsEducationEnabled(true);
prepareUnresizable(mActivity, SCREEN_ORIENTATION_PORTRAIT);
mActivity.mStartingData = mock(StartingData.class);
@@ -4532,7 +4666,7 @@ public class SizeCompatTests extends WindowTestsBase {
public void testIsEligibleForLetterboxEducation_hasStartingWindowAndEducationNotEnabled() {
setUpDisplaySizeWithApp(2500, 1000);
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- mActivity.mWmService.mLetterboxConfiguration.setIsEducationEnabled(false);
+ mActivity.mWmService.mAppCompatConfiguration.setIsEducationEnabled(false);
prepareUnresizable(mActivity, SCREEN_ORIENTATION_PORTRAIT);
mActivity.mStartingData = mock(StartingData.class);
@@ -4555,26 +4689,28 @@ public class SizeCompatTests extends WindowTestsBase {
public void testIsEligibleForLetterboxEducation_letterboxedForFixedOrientation_returnsTrue() {
setUpDisplaySizeWithApp(2500, 1000);
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- mActivity.mWmService.mLetterboxConfiguration.setIsEducationEnabled(true);
+ mActivity.mWmService.mAppCompatConfiguration.setIsEducationEnabled(true);
prepareUnresizable(mActivity, SCREEN_ORIENTATION_PORTRAIT);
assertTrue(mActivity.isEligibleForLetterboxEducation());
- assertTrue(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertTrue(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
}
@Test
public void testIsEligibleForLetterboxEducation_sizeCompatAndEligibleForFixedOrientation() {
setUpDisplaySizeWithApp(1000, 2500);
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- mActivity.mWmService.mLetterboxConfiguration.setIsEducationEnabled(true);
+ mActivity.mWmService.mAppCompatConfiguration.setIsEducationEnabled(true);
prepareUnresizable(mActivity, SCREEN_ORIENTATION_PORTRAIT);
rotateDisplay(mActivity.mDisplayContent, ROTATION_90);
assertTrue(mActivity.isEligibleForLetterboxEducation());
- assertFalse(mActivity.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertFalse(mActivity.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
assertTrue(mActivity.inSizeCompatMode());
}
@@ -4616,7 +4752,7 @@ public class SizeCompatTests extends WindowTestsBase {
// Target min aspect ratio must be larger than parent aspect ratio to be applied.
final float targetMinAspectRatio = 3.0f;
- // Create fixed portait activity with min aspect ratio greater than parent aspect ratio.
+ // Create fixed portrait activity with min aspect ratio greater than parent aspect ratio.
final ActivityRecord fixedOrientationActivity = new ActivityBuilder(mAtm)
.setTask(task).setScreenOrientation(SCREEN_ORIENTATION_PORTRAIT)
.setMinAspectRatio(targetMinAspectRatio).build();
@@ -4630,7 +4766,7 @@ public class SizeCompatTests extends WindowTestsBase {
final Rect minAspectRatioAppBounds = new Rect(minAspectRatioActivity.getConfiguration()
.windowConfiguration.getAppBounds());
- // Create unresizeable fixed portait activity with min aspect ratio greater than parent
+ // Create unresizeable fixed portrait activity with min aspect ratio greater than parent
// aspect ratio.
final ActivityRecord sizeCompatActivity = new ActivityBuilder(mAtm)
.setTask(task).setResizeMode(RESIZE_MODE_UNRESIZEABLE)
@@ -4642,12 +4778,12 @@ public class SizeCompatTests extends WindowTestsBase {
.windowConfiguration.getAppBounds());
// Check that aspect ratio of app bounds is equal to the min aspect ratio.
- assertEquals(targetMinAspectRatio, ActivityRecord
- .computeAspectRatio(fixedOrientationAppBounds), DELTA_ASPECT_RATIO_TOLERANCE);
- assertEquals(targetMinAspectRatio, ActivityRecord
- .computeAspectRatio(minAspectRatioAppBounds), DELTA_ASPECT_RATIO_TOLERANCE);
- assertEquals(targetMinAspectRatio, ActivityRecord
- .computeAspectRatio(sizeCompatAppBounds), DELTA_ASPECT_RATIO_TOLERANCE);
+ assertEquals(targetMinAspectRatio,
+ computeAspectRatio(fixedOrientationAppBounds), DELTA_ASPECT_RATIO_TOLERANCE);
+ assertEquals(targetMinAspectRatio,
+ computeAspectRatio(minAspectRatioAppBounds), DELTA_ASPECT_RATIO_TOLERANCE);
+ assertEquals(targetMinAspectRatio,
+ computeAspectRatio(sizeCompatAppBounds), DELTA_ASPECT_RATIO_TOLERANCE);
}
@Test
@@ -4663,7 +4799,7 @@ public class SizeCompatTests extends WindowTestsBase {
// Activity should enter size compat with old density after display density change.
display.setForcedDensity(newDensity, UserHandle.USER_CURRENT);
- assertScaled();
+ assertDownScaled();
assertEquals(origDensity, mActivity.getConfiguration().densityDpi);
// Activity should exit size compat with new density.
@@ -4743,7 +4879,7 @@ public class SizeCompatTests extends WindowTestsBase {
setUpDisplaySizeWithApp(2800, 1400);
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- mActivity.mWmService.mLetterboxConfiguration.setLetterboxHorizontalPositionMultiplier(
+ mActivity.mWmService.mAppCompatConfiguration.setLetterboxHorizontalPositionMultiplier(
letterboxHorizontalPositionMultiplier);
prepareUnresizable(mActivity, SCREEN_ORIENTATION_LANDSCAPE);
assertFitted();
@@ -4760,7 +4896,7 @@ public class SizeCompatTests extends WindowTestsBase {
setUpDisplaySizeWithApp(1400, 2800);
mActivity.mDisplayContent.setIgnoreOrientationRequest(true /* ignoreOrientationRequest */);
- mActivity.mWmService.mLetterboxConfiguration.setLetterboxVerticalPositionMultiplier(
+ mActivity.mWmService.mAppCompatConfiguration.setLetterboxVerticalPositionMultiplier(
letterboxVerticalPositionMultiplier);
prepareUnresizable(mActivity, SCREEN_ORIENTATION_PORTRAIT);
@@ -4902,14 +5038,25 @@ public class SizeCompatTests extends WindowTestsBase {
}
}
- private void assertScaled() {
- assertScaled(mActivity);
+ private void assertUpScaled() {
+ assertScaled(mActivity, /* upScalingExpected */ true);
}
- /** Asserts that the size of activity is larger than its parent so it is scaling. */
- private void assertScaled(ActivityRecord activity) {
+ private void assertDownScaled() {
+ assertScaled(mActivity, /* upScalingExpected */ false);
+ }
+
+ /**
+ * Asserts that the size of an activity differs from its parent and so it is scaling (either up
+ * or down).
+ */
+ private void assertScaled(ActivityRecord activity, boolean upScalingExpected) {
assertTrue(activity.inSizeCompatMode());
- assertNotEquals(1f, activity.getCompatScale(), 0.0001f /* delta */);
+ if (upScalingExpected) {
+ assertTrue(activity.getCompatScale() > 1f);
+ } else {
+ assertTrue(activity.getCompatScale() < 1f);
+ }
}
private void assertFitted() {
diff --git a/services/tests/wmtests/src/com/android/server/wm/SurfaceControlTests.java b/services/tests/wmtests/src/com/android/server/wm/SurfaceControlTests.java
index e3f8e8c54b73..8abf3f86c01e 100644
--- a/services/tests/wmtests/src/com/android/server/wm/SurfaceControlTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/SurfaceControlTests.java
@@ -36,8 +36,8 @@ import android.view.SurfaceHolder;
import android.view.SurfaceView;
import androidx.annotation.NonNull;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
-import androidx.test.runner.AndroidJUnit4;
import com.android.server.wm.utils.CommonUtils;
diff --git a/services/tests/wmtests/src/com/android/server/wm/SystemServicesTestRule.java b/services/tests/wmtests/src/com/android/server/wm/SystemServicesTestRule.java
index 4220f319b8f2..d5d284783978 100644
--- a/services/tests/wmtests/src/com/android/server/wm/SystemServicesTestRule.java
+++ b/services/tests/wmtests/src/com/android/server/wm/SystemServicesTestRule.java
@@ -202,7 +202,8 @@ public class SystemServicesTestRule implements TestRule {
.mockStatic(DisplayControl.class, mockStubOnly)
.mockStatic(LockGuard.class, mockStubOnly)
.mockStatic(Watchdog.class, mockStubOnly)
- .spyStatic(DesktopModeLaunchParamsModifier.class)
+ .spyStatic(DesktopModeHelper.class)
+ .spyStatic(DesktopModeBoundsCalculator.class)
.strictness(Strictness.LENIENT)
.startMocking();
diff --git a/services/tests/wmtests/src/com/android/server/wm/TaskFragmentOrganizerControllerTest.java b/services/tests/wmtests/src/com/android/server/wm/TaskFragmentOrganizerControllerTest.java
index a71b81e025d2..d013053a063d 100644
--- a/services/tests/wmtests/src/com/android/server/wm/TaskFragmentOrganizerControllerTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/TaskFragmentOrganizerControllerTest.java
@@ -90,7 +90,6 @@ import android.os.Bundle;
import android.os.IBinder;
import android.os.RemoteException;
import android.platform.test.annotations.Presubmit;
-import android.view.RemoteAnimationDefinition;
import android.view.SurfaceControl;
import android.window.IRemoteTransition;
import android.window.ITaskFragmentOrganizer;
@@ -140,7 +139,6 @@ public class TaskFragmentOrganizerControllerTest extends WindowTestsBase {
private IBinder mFragmentToken;
private WindowContainerTransaction mTransaction;
private WindowContainerToken mFragmentWindowToken;
- private RemoteAnimationDefinition mDefinition;
private IBinder mErrorToken;
private Rect mTaskFragBounds;
@@ -169,7 +167,6 @@ public class TaskFragmentOrganizerControllerTest extends WindowTestsBase {
mTransaction = new WindowContainerTransaction();
mTransaction.setTaskFragmentOrganizer(mIOrganizer);
mFragmentWindowToken = mTaskFragment.mRemoteToken.toWindowContainerToken();
- mDefinition = new RemoteAnimationDefinition();
mErrorToken = new Binder();
final Rect displayBounds = mDisplayContent.getBounds();
mTaskFragBounds = new Rect(displayBounds.left, displayBounds.top, displayBounds.centerX(),
@@ -579,17 +576,6 @@ public class TaskFragmentOrganizerControllerTest extends WindowTestsBase {
}
@Test
- public void testRegisterRemoteAnimations() {
- mController.registerRemoteAnimations(mIOrganizer, mDefinition);
-
- assertEquals(mDefinition, mController.getRemoteAnimationDefinition(mIOrganizer));
-
- mController.unregisterRemoteAnimations(mIOrganizer);
-
- assertNull(mController.getRemoteAnimationDefinition(mIOrganizer));
- }
-
- @Test
public void testApplyTransaction_disallowRemoteTransitionForNonSystemOrganizer() {
mTransaction.setRelativeBounds(mFragmentWindowToken, new Rect(0, 0, 100, 100));
mTaskFragment.setTaskFragmentOrganizer(mOrganizerToken, 10 /* uid */,
diff --git a/services/tests/wmtests/src/com/android/server/wm/TaskFragmentTest.java b/services/tests/wmtests/src/com/android/server/wm/TaskFragmentTest.java
index 35b6b70cb611..47d34a6e5f2b 100644
--- a/services/tests/wmtests/src/com/android/server/wm/TaskFragmentTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/TaskFragmentTest.java
@@ -759,20 +759,24 @@ public class TaskFragmentTest extends WindowTestsBase {
// Assert fixed orientation request is ignored for activity in ActivityEmbedding split.
activity0.setRequestedOrientation(SCREEN_ORIENTATION_LANDSCAPE);
- assertFalse(activity0.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertFalse(activity0.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
assertEquals(SCREEN_ORIENTATION_UNSET, task.getOrientation());
activity1.setRequestedOrientation(SCREEN_ORIENTATION_PORTRAIT);
- assertFalse(activity1.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertFalse(activity1.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
assertEquals(SCREEN_ORIENTATION_UNSET, task.getOrientation());
// Also verify the behavior on device that ignore orientation request.
mDisplayContent.setIgnoreOrientationRequest(true);
task.onConfigurationChanged(task.getParent().getConfiguration());
- assertFalse(activity0.isLetterboxedForFixedOrientationAndAspectRatio());
- assertFalse(activity1.isLetterboxedForFixedOrientationAndAspectRatio());
+ assertFalse(activity0.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
+ assertFalse(activity1.mAppCompatController.getAppCompatAspectRatioPolicy()
+ .isLetterboxedForFixedOrientationAndAspectRatio());
assertEquals(SCREEN_ORIENTATION_UNSET, task.getOrientation());
tf0.setResumedActivity(activity0, "test");
diff --git a/services/tests/wmtests/src/com/android/server/wm/TaskPositionerTests.java b/services/tests/wmtests/src/com/android/server/wm/TaskPositionerTests.java
deleted file mode 100644
index d5356774ffdb..000000000000
--- a/services/tests/wmtests/src/com/android/server/wm/TaskPositionerTests.java
+++ /dev/null
@@ -1,526 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server.wm;
-
-import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM;
-import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION;
-
-import static com.android.dx.mockito.inline.extended.ExtendedMockito.spyOn;
-import static com.android.internal.policy.TaskResizingAlgorithm.MIN_ASPECT;
-import static com.android.server.wm.WindowManagerService.dipToPixel;
-import static com.android.server.wm.WindowState.MINIMUM_VISIBLE_HEIGHT_IN_DP;
-import static com.android.server.wm.WindowState.MINIMUM_VISIBLE_WIDTH_IN_DP;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.verify;
-
-import android.graphics.Rect;
-import android.platform.test.annotations.Presubmit;
-import android.util.DisplayMetrics;
-import android.util.Log;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-/**
- * Tests for the {@link TaskPositioner} class.
- *
- * Build/Install/Run:
- * atest WmTests:TaskPositionerTests
- */
-@SmallTest
-@Presubmit
-@RunWith(WindowTestRunner.class)
-public class TaskPositionerTests extends WindowTestsBase {
-
- private static final boolean DEBUGGING = false;
- private static final String TAG = "TaskPositionerTest";
-
- private static final int MOUSE_DELTA_X = 5;
- private static final int MOUSE_DELTA_Y = 5;
-
- private int mMinVisibleWidth;
- private int mMinVisibleHeight;
- private TaskPositioner mPositioner;
-
- @Before
- public void setUp() {
- TaskPositioner.setFactory(null);
-
- final DisplayMetrics dm = mDisplayContent.getDisplayMetrics();
-
- // This should be the same calculation as the TaskPositioner uses.
- mMinVisibleWidth = dipToPixel(MINIMUM_VISIBLE_WIDTH_IN_DP, dm);
- mMinVisibleHeight = dipToPixel(MINIMUM_VISIBLE_HEIGHT_IN_DP, dm);
- removeGlobalMinSizeRestriction();
-
- final ActivityRecord activity = new ActivityBuilder(mAtm)
- .setCreateTask(true)
- .build();
- final WindowState win = createWindow(null, TYPE_BASE_APPLICATION, activity, "window");
- mPositioner = new TaskPositioner(mWm);
- mPositioner.register(mDisplayContent, win);
-
- win.getRootTask().setWindowingMode(WINDOWING_MODE_FREEFORM);
- }
-
- @After
- public void tearDown() {
- TaskPositioner.setFactory(null);
- }
-
- @Test
- public void testOverrideFactory() {
- final boolean[] created = new boolean[1];
- created[0] = false;
- TaskPositioner.setFactory(new TaskPositioner.Factory() {
- @Override
- public TaskPositioner create(WindowManagerService service) {
- created[0] = true;
- return null;
- }
- });
-
- assertNull(TaskPositioner.create(mWm));
- assertTrue(created[0]);
- }
-
- /** This tests that the window can move in all directions. */
- @Test
- public void testMoveWindow() {
- final Rect displayBounds = mDisplayContent.getBounds();
- final int windowSize = Math.min(displayBounds.width(), displayBounds.height()) / 2;
- final int left = displayBounds.centerX() - windowSize / 2;
- final int top = displayBounds.centerY() - windowSize / 2;
- final Rect r = new Rect(left, top, left + windowSize, top + windowSize);
- mPositioner.mTask.setBounds(r);
- mPositioner.startDrag(false /* resizing */, false /* preserveOrientation */, left, top);
-
- // Move upper left.
- mPositioner.notifyMoveLocked(left - MOUSE_DELTA_X, top - MOUSE_DELTA_Y);
- r.offset(-MOUSE_DELTA_X, -MOUSE_DELTA_Y);
- assertBoundsEquals(r, mPositioner.getWindowDragBounds());
-
- // Move bottom right.
- mPositioner.notifyMoveLocked(left, top);
- r.offset(MOUSE_DELTA_X, MOUSE_DELTA_Y);
- assertBoundsEquals(r, mPositioner.getWindowDragBounds());
- }
-
- /**
- * This tests that free resizing will allow to change the orientation as well
- * as does some basic tests (e.g. dragging in Y only will keep X stable).
- */
- @Test
- public void testBasicFreeWindowResizing() {
- final Rect r = new Rect(100, 220, 700, 520);
- final int midY = (r.top + r.bottom) / 2;
- mPositioner.mTask.setBounds(r, true);
-
- // Start a drag resize starting upper left.
- mPositioner.startDrag(true /* resizing */, false /* preserveOrientation */,
- r.left - MOUSE_DELTA_X, r.top - MOUSE_DELTA_Y);
- assertBoundsEquals(r, mPositioner.getWindowDragBounds());
-
- // Drag to a good landscape size.
- mPositioner.resizeDrag(0.0f, 0.0f);
- assertBoundsEquals(new Rect(MOUSE_DELTA_X, MOUSE_DELTA_Y, r.right, r.bottom),
- mPositioner.getWindowDragBounds());
-
- // Drag to a good portrait size.
- mPositioner.resizeDrag(400.0f, 0.0f);
- assertBoundsEquals(new Rect(400 + MOUSE_DELTA_X, MOUSE_DELTA_Y, r.right, r.bottom),
- mPositioner.getWindowDragBounds());
-
- // Drag to a too small size for the width.
- mPositioner.resizeDrag(2000.0f, r.top);
- assertBoundsEquals(
- new Rect(r.right - mMinVisibleWidth, r.top + MOUSE_DELTA_Y, r.right, r.bottom),
- mPositioner.getWindowDragBounds());
-
- // Drag to a too small size for the height.
- mPositioner.resizeDrag(r.left, 2000.0f);
- assertBoundsEquals(
- new Rect(r.left + MOUSE_DELTA_X, r.bottom - mMinVisibleHeight, r.right, r.bottom),
- mPositioner.getWindowDragBounds());
-
- // Start a drag resize left and see that only the left coord changes..
- mPositioner.startDrag(true /* resizing */, false /* preserveOrientation */,
- r.left - MOUSE_DELTA_X, midY);
-
- // Drag to the left.
- mPositioner.resizeDrag(0.0f, midY);
- assertBoundsEquals(new Rect(MOUSE_DELTA_X, r.top, r.right, r.bottom),
- mPositioner.getWindowDragBounds());
-
- // Drag to the right.
- mPositioner.resizeDrag(200.0f, midY);
- assertBoundsEquals(new Rect(200 + MOUSE_DELTA_X, r.top, r.right, r.bottom),
- mPositioner.getWindowDragBounds());
-
- // Drag to the top
- mPositioner.resizeDrag(r.left, 0.0f);
- assertBoundsEquals(new Rect(r.left + MOUSE_DELTA_X, r.top, r.right, r.bottom),
- mPositioner.getWindowDragBounds());
-
- // Drag to the bottom
- mPositioner.resizeDrag(r.left, 1000.0f);
- assertBoundsEquals(new Rect(r.left + MOUSE_DELTA_X, r.top, r.right, r.bottom),
- mPositioner.getWindowDragBounds());
- }
-
- /**
- * This tests that by dragging any edge, the fixed / opposite edge(s) remains anchored.
- */
- @Test
- public void testFreeWindowResizingTestAllEdges() {
- final Rect r = new Rect(100, 220, 700, 520);
- final int midX = (r.left + r.right) / 2;
- final int midY = (r.top + r.bottom) / 2;
- mPositioner.mTask.setBounds(r, true);
-
- // Drag upper left.
- mPositioner.startDrag(true /* resizing */, false /* preserveOrientation */,
- r.left - MOUSE_DELTA_X, r.top - MOUSE_DELTA_Y);
- mPositioner.resizeDrag(0.0f, 0.0f);
- assertNotEquals(r.left, mPositioner.getWindowDragBounds().left);
- assertEquals(r.right, mPositioner.getWindowDragBounds().right);
- assertNotEquals(r.top, mPositioner.getWindowDragBounds().top);
- assertEquals(r.bottom, mPositioner.getWindowDragBounds().bottom);
-
- // Drag upper.
- mPositioner.startDrag(true /* resizing */, false /* preserveOrientation */, midX,
- r.top - MOUSE_DELTA_Y);
- mPositioner.resizeDrag(0.0f, 0.0f);
- assertEquals(r.left, mPositioner.getWindowDragBounds().left);
- assertEquals(r.right, mPositioner.getWindowDragBounds().right);
- assertNotEquals(r.top, mPositioner.getWindowDragBounds().top);
- assertEquals(r.bottom, mPositioner.getWindowDragBounds().bottom);
-
- // Drag upper right.
- mPositioner.startDrag(true /* resizing */, false /* preserveOrientation */,
- r.right + MOUSE_DELTA_X, r.top - MOUSE_DELTA_Y);
- mPositioner.resizeDrag(r.right + 100, 0.0f);
- assertEquals(r.left, mPositioner.getWindowDragBounds().left);
- assertNotEquals(r.right, mPositioner.getWindowDragBounds().right);
- assertNotEquals(r.top, mPositioner.getWindowDragBounds().top);
- assertEquals(r.bottom, mPositioner.getWindowDragBounds().bottom);
-
- // Drag right.
- mPositioner.startDrag(true /* resizing */, false /* preserveOrientation */,
- r.right + MOUSE_DELTA_X, midY);
- mPositioner.resizeDrag(r.right + 100, 0.0f);
- assertEquals(r.left, mPositioner.getWindowDragBounds().left);
- assertNotEquals(r.right, mPositioner.getWindowDragBounds().right);
- assertEquals(r.top, mPositioner.getWindowDragBounds().top);
- assertEquals(r.bottom, mPositioner.getWindowDragBounds().bottom);
-
- // Drag bottom right.
- mPositioner.startDrag(true /* resizing */, false /* preserveOrientation */,
- r.right + MOUSE_DELTA_X, r.bottom + MOUSE_DELTA_Y);
- mPositioner.resizeDrag(r.right + 100, r.bottom + 100);
- assertEquals(r.left, mPositioner.getWindowDragBounds().left);
- assertNotEquals(r.right, mPositioner.getWindowDragBounds().right);
- assertEquals(r.top, mPositioner.getWindowDragBounds().top);
- assertNotEquals(r.bottom, mPositioner.getWindowDragBounds().bottom);
-
- // Drag bottom.
- mPositioner.startDrag(true /* resizing */, false /* preserveOrientation */, midX,
- r.bottom + MOUSE_DELTA_Y);
- mPositioner.resizeDrag(r.right + 100, r.bottom + 100);
- assertEquals(r.left, mPositioner.getWindowDragBounds().left);
- assertEquals(r.right, mPositioner.getWindowDragBounds().right);
- assertEquals(r.top, mPositioner.getWindowDragBounds().top);
- assertNotEquals(r.bottom, mPositioner.getWindowDragBounds().bottom);
-
- // Drag bottom left.
- mPositioner.startDrag(true /* resizing */, false /* preserveOrientation */,
- r.left - MOUSE_DELTA_X, r.bottom + MOUSE_DELTA_Y);
- mPositioner.resizeDrag(0.0f, r.bottom + 100);
- assertNotEquals(r.left, mPositioner.getWindowDragBounds().left);
- assertEquals(r.right, mPositioner.getWindowDragBounds().right);
- assertEquals(r.top, mPositioner.getWindowDragBounds().top);
- assertNotEquals(r.bottom, mPositioner.getWindowDragBounds().bottom);
-
- // Drag left.
- mPositioner.startDrag(true /* resizing */, false /* preserveOrientation */,
- r.left - MOUSE_DELTA_X, midY);
- mPositioner.resizeDrag(0.0f, r.bottom + 100);
- assertNotEquals(r.left, mPositioner.getWindowDragBounds().left);
- assertEquals(r.right, mPositioner.getWindowDragBounds().right);
- assertEquals(r.top, mPositioner.getWindowDragBounds().top);
- assertEquals(r.bottom, mPositioner.getWindowDragBounds().bottom);
- }
-
- /**
- * This tests that a constrained landscape window will keep the aspect and do the
- * right things upon resizing when dragged from the top left corner.
- */
- @Test
- public void testLandscapePreservedWindowResizingDragTopLeft() {
- final Rect r = new Rect(100, 220, 700, 520);
- mPositioner.mTask.setBounds(r, true);
-
- mPositioner.startDrag(true /* resizing */, true /* preserveOrientation */,
- r.left - MOUSE_DELTA_X, r.top - MOUSE_DELTA_Y);
- assertBoundsEquals(r, mPositioner.getWindowDragBounds());
-
- // Drag to a good landscape size.
- mPositioner.resizeDrag(0.0f, 0.0f);
- assertBoundsEquals(new Rect(MOUSE_DELTA_X, MOUSE_DELTA_Y, r.right, r.bottom),
- mPositioner.getWindowDragBounds());
-
- // Drag to a good portrait size.
- mPositioner.resizeDrag(400.0f, 0.0f);
- int width = Math.round((float) (r.bottom - MOUSE_DELTA_Y) * MIN_ASPECT);
- assertBoundsEquals(new Rect(r.right - width, MOUSE_DELTA_Y, r.right, r.bottom),
- mPositioner.getWindowDragBounds());
-
- // Drag to a too small size for the width.
- mPositioner.resizeDrag(2000.0f, r.top);
- final int w = mMinVisibleWidth;
- final int h = Math.round(w / MIN_ASPECT);
- assertBoundsEquals(new Rect(r.right - w, r.bottom - h, r.right, r.bottom),
- mPositioner.getWindowDragBounds());
-
- // Drag to a too small size for the height.
- mPositioner.resizeDrag(r.left, 2000.0f);
- assertBoundsEquals(
- new Rect(r.left + MOUSE_DELTA_X, r.bottom - mMinVisibleHeight, r.right, r.bottom),
- mPositioner.getWindowDragBounds());
- }
-
- /**
- * This tests that a constrained landscape window will keep the aspect and do the
- * right things upon resizing when dragged from the left corner.
- */
- @Test
- public void testLandscapePreservedWindowResizingDragLeft() {
- final Rect r = new Rect(100, 220, 700, 520);
- final int midY = (r.top + r.bottom) / 2;
- mPositioner.mTask.setBounds(r, true);
-
- mPositioner.startDrag(true /* resizing */, true /* preserveOrientation */,
- r.left - MOUSE_DELTA_X, midY);
-
- // Drag to the left.
- mPositioner.resizeDrag(0.0f, midY);
- assertBoundsEquals(new Rect(MOUSE_DELTA_X, r.top, r.right, r.bottom),
- mPositioner.getWindowDragBounds());
-
- // Drag to the right.
- mPositioner.resizeDrag(200.0f, midY);
- assertBoundsEquals(new Rect(200 + MOUSE_DELTA_X, r.top, r.right, r.bottom),
- mPositioner.getWindowDragBounds());
-
- // Drag all the way to the right and see the height also shrinking.
- mPositioner.resizeDrag(2000.0f, midY);
- final int w = mMinVisibleWidth;
- final int h = Math.round((float) w / MIN_ASPECT);
- assertBoundsEquals(new Rect(r.right - w, r.top, r.right, r.top + h),
- mPositioner.getWindowDragBounds());
-
- // Drag to the top.
- mPositioner.resizeDrag(r.left, 0.0f);
- assertBoundsEquals(new Rect(r.left + MOUSE_DELTA_X, r.top, r.right, r.bottom),
- mPositioner.getWindowDragBounds());
-
- // Drag to the bottom.
- mPositioner.resizeDrag(r.left, 1000.0f);
- assertBoundsEquals(new Rect(r.left + MOUSE_DELTA_X, r.top, r.right, r.bottom),
- mPositioner.getWindowDragBounds());
- }
-
- /**
- * This tests that a constrained landscape window will keep the aspect and do the
- * right things upon resizing when dragged from the top corner.
- */
- @Test
- public void testLandscapePreservedWindowResizingDragTop() {
- final Rect r = new Rect(100, 220, 700, 520);
- final int midX = (r.left + r.right) / 2;
- mPositioner.mTask.setBounds(r, true);
-
- mPositioner.startDrag(true /*resizing*/, true /*preserveOrientation*/, midX,
- r.top - MOUSE_DELTA_Y);
-
- // Drag to the left (no change).
- mPositioner.resizeDrag(0.0f, r.top);
- assertBoundsEquals(new Rect(r.left, r.top + MOUSE_DELTA_Y, r.right, r.bottom),
- mPositioner.getWindowDragBounds());
-
- // Drag to the right (no change).
- mPositioner.resizeDrag(2000.0f, r.top);
- assertBoundsEquals(new Rect(r.left , r.top + MOUSE_DELTA_Y, r.right, r.bottom),
- mPositioner.getWindowDragBounds());
-
- // Drag to the top.
- mPositioner.resizeDrag(300.0f, 0.0f);
- int h = r.bottom - MOUSE_DELTA_Y;
- int w = Math.max(r.right - r.left, Math.round(h * MIN_ASPECT));
- assertBoundsEquals(new Rect(r.left, MOUSE_DELTA_Y, r.left + w, r.bottom),
- mPositioner.getWindowDragBounds());
-
- // Drag to the bottom.
- mPositioner.resizeDrag(r.left, 1000.0f);
- h = mMinVisibleHeight;
- assertBoundsEquals(new Rect(r.left, r.bottom - h, r.right, r.bottom),
- mPositioner.getWindowDragBounds());
- }
-
- /**
- * This tests that a constrained portrait window will keep the aspect and do the
- * right things upon resizing when dragged from the top left corner.
- */
- @Test
- public void testPortraitPreservedWindowResizingDragTopLeft() {
- final Rect r = new Rect(330, 100, 630, 600);
- mPositioner.mTask.setBounds(r, true);
-
- mPositioner.startDrag(true /*resizing*/, true /*preserveOrientation*/,
- r.left - MOUSE_DELTA_X, r.top - MOUSE_DELTA_Y);
- assertBoundsEquals(r, mPositioner.getWindowDragBounds());
-
- // Drag to a good landscape size.
- mPositioner.resizeDrag(0.0f, 0.0f);
- int height = Math.round((float) (r.right - MOUSE_DELTA_X) * MIN_ASPECT);
- assertBoundsEquals(new Rect(MOUSE_DELTA_X, r.bottom - height, r.right, r.bottom),
- mPositioner.getWindowDragBounds());
-
- // Drag to a good portrait size.
- mPositioner.resizeDrag(400.0f, 0.0f);
- assertBoundsEquals(new Rect(400 + MOUSE_DELTA_X, MOUSE_DELTA_Y, r.right, r.bottom),
- mPositioner.getWindowDragBounds());
-
- // Drag to a too small size for the height and the the width shrinking.
- mPositioner.resizeDrag(r.left + MOUSE_DELTA_X, 2000.0f);
- final int w = Math.max(mMinVisibleWidth, Math.round(mMinVisibleHeight / MIN_ASPECT));
- final int h = Math.max(mMinVisibleHeight, Math.round(w * MIN_ASPECT));
- assertBoundsEquals(
- new Rect(r.right - w, r.bottom - h, r.right, r.bottom),
- mPositioner.getWindowDragBounds());
- }
-
- /**
- * This tests that a constrained portrait window will keep the aspect and do the
- * right things upon resizing when dragged from the left corner.
- */
- @Test
- public void testPortraitPreservedWindowResizingDragLeft() {
- final Rect r = new Rect(330, 100, 630, 600);
- final int midY = (r.top + r.bottom) / 2;
- mPositioner.mTask.setBounds(r, true);
-
- mPositioner.startDrag(true /* resizing */, true /* preserveOrientation */,
- r.left - MOUSE_DELTA_X, midY);
-
- // Drag to the left.
- mPositioner.resizeDrag(0.0f, midY);
- int w = r.right - MOUSE_DELTA_X;
- int h = Math.round(w * MIN_ASPECT);
- assertBoundsEquals(new Rect(MOUSE_DELTA_X, r.top, r.right, r.top + h),
- mPositioner.getWindowDragBounds());
-
- // Drag to the right.
- mPositioner.resizeDrag(450.0f, midY);
- assertBoundsEquals(new Rect(450 + MOUSE_DELTA_X, r.top, r.right, r.bottom),
- mPositioner.getWindowDragBounds());
-
- // Drag all the way to the right.
- mPositioner.resizeDrag(2000.0f, midY);
- w = mMinVisibleWidth;
- h = Math.max(Math.round((float) w * MIN_ASPECT), r.height());
- assertBoundsEquals(new Rect(r.right - w, r.top, r.right, r.top + h),
- mPositioner.getWindowDragBounds());
-
- // Drag to the top.
- mPositioner.resizeDrag(r.left, 0.0f);
- assertBoundsEquals(new Rect(r.left + MOUSE_DELTA_X, r.top, r.right, r.bottom),
- mPositioner.getWindowDragBounds());
-
- // Drag to the bottom.
- mPositioner.resizeDrag(r.left, 1000.0f);
- assertBoundsEquals(new Rect(r.left + MOUSE_DELTA_X, r.top, r.right, r.bottom),
- mPositioner.getWindowDragBounds());
- }
-
- /**
- * This tests that a constrained portrait window will keep the aspect and do the
- * right things upon resizing when dragged from the top corner.
- */
- @Test
- public void testPortraitPreservedWindowResizingDragTop() {
- final Rect r = new Rect(330, 100, 630, 600);
- final int midX = (r.left + r.right) / 2;
- mPositioner.mTask.setBounds(r, true);
-
- mPositioner.startDrag(true /* resizing */, true /* preserveOrientation */, midX,
- r.top - MOUSE_DELTA_Y);
-
- // Drag to the left (no change).
- mPositioner.resizeDrag(0.0f, r.top);
- assertBoundsEquals(new Rect(r.left, r.top + MOUSE_DELTA_Y, r.right, r.bottom),
- mPositioner.getWindowDragBounds());
-
- // Drag to the right (no change).
- mPositioner.resizeDrag(2000.0f, r.top);
- assertBoundsEquals(new Rect(r.left , r.top + MOUSE_DELTA_Y, r.right, r.bottom),
- mPositioner.getWindowDragBounds());
-
- // Drag to the top.
- mPositioner.resizeDrag(300.0f, 0.0f);
- int h = r.bottom - MOUSE_DELTA_Y;
- int w = Math.min(r.width(), Math.round(h / MIN_ASPECT));
- assertBoundsEquals(new Rect(r.left, MOUSE_DELTA_Y, r.left + w, r.bottom),
- mPositioner.getWindowDragBounds());
-
- // Drag to the bottom.
- mPositioner.resizeDrag(r.left, 1000.0f);
- h = Math.max(mMinVisibleHeight, Math.round(mMinVisibleWidth * MIN_ASPECT));
- w = Math.round(h / MIN_ASPECT);
- assertBoundsEquals(new Rect(r.left, r.bottom - h, r.left + w, r.bottom),
- mPositioner.getWindowDragBounds());
- }
-
- private static void assertBoundsEquals(Rect expected, Rect actual) {
- if (DEBUGGING) {
- if (!expected.equals(actual)) {
- Log.e(TAG, "rect(" + actual.toString() + ") != isRect(" + actual.toString()
- + ") " + Log.getStackTraceString(new Throwable()));
- }
- }
- assertEquals(expected, actual);
- }
-
- @Test
- public void testFinishingMovingWhenBinderDied() {
- spyOn(mWm.mTaskPositioningController);
-
- mPositioner.startDrag(false, false, 0 /* startX */, 0 /* startY */);
- verify(mWm.mTaskPositioningController, never()).finishTaskPositioning();
- mPositioner.binderDied();
- verify(mWm.mTaskPositioningController).finishTaskPositioning();
- }
-}
diff --git a/services/tests/wmtests/src/com/android/server/wm/TaskPositioningControllerTests.java b/services/tests/wmtests/src/com/android/server/wm/TaskPositioningControllerTests.java
deleted file mode 100644
index bfc13d3d2ef2..000000000000
--- a/services/tests/wmtests/src/com/android/server/wm/TaskPositioningControllerTests.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server.wm;
-
-import static android.content.pm.ActivityInfo.RESIZE_MODE_RESIZEABLE;
-import static android.content.pm.ActivityInfo.RESIZE_MODE_UNRESIZEABLE;
-import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION;
-
-import static com.android.dx.mockito.inline.extended.ExtendedMockito.any;
-import static com.android.dx.mockito.inline.extended.ExtendedMockito.anyInt;
-import static com.android.dx.mockito.inline.extended.ExtendedMockito.doReturn;
-import static com.android.dx.mockito.inline.extended.ExtendedMockito.mock;
-import static com.android.dx.mockito.inline.extended.ExtendedMockito.when;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
-import android.platform.test.annotations.Presubmit;
-import android.view.InputChannel;
-
-import androidx.test.filters.FlakyTest;
-import androidx.test.filters.SmallTest;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-/**
- * Tests for the {@link TaskPositioningController} class.
- *
- * Build/Install/Run:
- * atest WmTests:TaskPositioningControllerTests
- */
-@SmallTest
-@Presubmit
-@RunWith(WindowTestRunner.class)
-public class TaskPositioningControllerTests extends WindowTestsBase {
- private static final int TIMEOUT_MS = 1000;
-
- private TaskPositioningController mTarget;
- private WindowState mWindow;
-
- @Before
- public void setUp() throws Exception {
- assertNotNull(mWm.mTaskPositioningController);
- mTarget = mWm.mTaskPositioningController;
-
- when(mWm.mInputManager.transferTouchGesture(any(), any())).thenReturn(true);
-
- mWindow = createWindow(null, TYPE_BASE_APPLICATION, "window");
- mWindow.getTask().setResizeMode(RESIZE_MODE_RESIZEABLE);
- mWindow.mInputChannel = new InputChannel();
- mWm.mWindowMap.put(mWindow.mClient.asBinder(), mWindow);
- doReturn(mock(InputMonitor.class)).when(mDisplayContent).getInputMonitor();
- }
-
- @FlakyTest(bugId = 291067614)
- @Test
- public void testStartAndFinishPositioning() {
- assertFalse(mTarget.isPositioningLocked());
- assertNull(mTarget.getDragWindowHandleLocked());
-
- assertTrue(mTarget.startMovingTask(mWindow.mClient, 0, 0));
-
- assertTrue(mTarget.isPositioningLocked());
- assertNotNull(mTarget.getDragWindowHandleLocked());
-
- mTarget.finishTaskPositioning();
- // Wait until the looper processes finishTaskPositioning.
- assertTrue(waitHandlerIdle(mWm.mAnimationHandler, TIMEOUT_MS));
-
- assertFalse(mTarget.isPositioningLocked());
- assertNull(mTarget.getDragWindowHandleLocked());
- }
-
- @Test
- public void testFinishPositioningWhenAppRequested() {
- assertFalse(mTarget.isPositioningLocked());
- assertNull(mTarget.getDragWindowHandleLocked());
-
- assertTrue(mTarget.startMovingTask(mWindow.mClient, 0, 0));
-
- assertTrue(mTarget.isPositioningLocked());
- assertNotNull(mTarget.getDragWindowHandleLocked());
-
- mTarget.finishTaskPositioning(mWindow.mClient);
- // Wait until the looper processes finishTaskPositioning.
- assertTrue(waitHandlerIdle(mWm.mAnimationHandler, TIMEOUT_MS));
-
- assertFalse(mTarget.isPositioningLocked());
- assertNull(mTarget.getDragWindowHandleLocked());
- }
-
- @Test
- public void testHandleTapOutsideTask() {
- assertFalse(mTarget.isPositioningLocked());
- assertNull(mTarget.getDragWindowHandleLocked());
-
- final DisplayContent content = mock(DisplayContent.class);
- doReturn(mWindow.getTask()).when(content).findTaskForResizePoint(anyInt(), anyInt());
- assertNotNull(mWindow.getTask().getTopVisibleAppMainWindow());
-
- mTarget.handleTapOutsideTask(content, 0, 0);
- // Wait until the looper processes handleTapOutsideTask.
- assertTrue(waitHandlerIdle(mWm.mH, TIMEOUT_MS));
-
- assertTrue(mTarget.isPositioningLocked());
- assertNotNull(mTarget.getDragWindowHandleLocked());
-
- mTarget.finishTaskPositioning();
- // Wait until the looper processes finishTaskPositioning.
- assertTrue(waitHandlerIdle(mWm.mAnimationHandler, TIMEOUT_MS));
-
- assertFalse(mTarget.isPositioningLocked());
- assertNull(mTarget.getDragWindowHandleLocked());
- }
-
- @Test
- public void testHandleTapOutsideNonResizableTask() {
- assertFalse(mTarget.isPositioningLocked());
- assertNull(mTarget.getDragWindowHandleLocked());
-
- final DisplayContent content = mock(DisplayContent.class);
- doReturn(mWindow.getTask()).when(content).findTaskForResizePoint(anyInt(), anyInt());
- assertNotNull(mWindow.getTask().getTopVisibleAppMainWindow());
-
- mWindow.getTask().setResizeMode(RESIZE_MODE_UNRESIZEABLE);
-
- mTarget.handleTapOutsideTask(content, 0, 0);
- // Wait until the looper processes handleTapOutsideTask.
- assertTrue(waitHandlerIdle(mWm.mH, TIMEOUT_MS));
-
- assertFalse(mTarget.isPositioningLocked());
- }
-
-}
diff --git a/services/tests/wmtests/src/com/android/server/wm/TaskTests.java b/services/tests/wmtests/src/com/android/server/wm/TaskTests.java
index 4bc87b1237f0..0bf850afb30b 100644
--- a/services/tests/wmtests/src/com/android/server/wm/TaskTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/TaskTests.java
@@ -611,13 +611,14 @@ public class TaskTests extends WindowTestsBase {
.setWindowingMode(WINDOWING_MODE_FULLSCREEN).setDisplay(display).build();
final Task task = rootTask.getBottomMostTask();
final ActivityRecord root = task.getTopNonFinishingActivity();
- spyOn(mWm.mLetterboxConfiguration);
+ spyOn(mWm.mAppCompatConfiguration);
spyOn(root);
- spyOn(root.mLetterboxUiController);
+ spyOn(root.mAppCompatController.getAppCompatAspectRatioOverrides());
doReturn(true).when(root).fillsParent();
- doReturn(true).when(root.mLetterboxUiController)
- .shouldEnableUserAspectRatioSettings();
+ doReturn(true).when(
+ root.mAppCompatController.getAppCompatAspectRatioOverrides())
+ .shouldEnableUserAspectRatioSettings();
doReturn(false).when(root).inSizeCompatMode();
doReturn(task).when(root).getOrganizedTask();
@@ -626,12 +627,13 @@ public class TaskTests extends WindowTestsBase {
.appCompatTaskInfo.topActivityEligibleForUserAspectRatioButton);
// When shouldApplyUserMinAspectRatioOverride is disable the button is not enabled
- doReturn(false).when(root.mLetterboxUiController)
- .shouldEnableUserAspectRatioSettings();
+ doReturn(false).when(
+ root.mAppCompatController.getAppCompatAspectRatioOverrides())
+ .shouldEnableUserAspectRatioSettings();
assertFalse(task.getTaskInfo()
.appCompatTaskInfo.topActivityEligibleForUserAspectRatioButton);
- doReturn(true).when(root.mLetterboxUiController)
- .shouldEnableUserAspectRatioSettings();
+ doReturn(true).when(root.mAppCompatController
+ .getAppCompatAspectRatioOverrides()).shouldEnableUserAspectRatioSettings();
// When in size compat mode the button is not enabled
doReturn(true).when(root).inSizeCompatMode();
@@ -653,7 +655,7 @@ public class TaskTests extends WindowTestsBase {
.setWindowingMode(WINDOWING_MODE_FULLSCREEN).setDisplay(display).build();
final Task task = rootTask.getBottomMostTask();
final ActivityRecord root = task.getTopNonFinishingActivity();
- spyOn(mWm.mLetterboxConfiguration);
+ spyOn(mWm.mAppCompatConfiguration);
spyOn(root);
doReturn(false).when(root).fillsParent();
diff --git a/services/tests/wmtests/src/com/android/server/wm/TestWindowManagerPolicy.java b/services/tests/wmtests/src/com/android/server/wm/TestWindowManagerPolicy.java
index 00a8842c358e..4b0668f7a056 100644
--- a/services/tests/wmtests/src/com/android/server/wm/TestWindowManagerPolicy.java
+++ b/services/tests/wmtests/src/com/android/server/wm/TestWindowManagerPolicy.java
@@ -27,6 +27,7 @@ import android.os.PowerManager.GoToSleepReason;
import android.os.PowerManager.WakeReason;
import android.util.proto.ProtoOutputStream;
import android.view.KeyEvent;
+import android.view.KeyboardShortcutGroup;
import android.view.WindowManager;
import android.view.animation.Animation;
@@ -35,6 +36,7 @@ import com.android.internal.policy.IShortcutService;
import com.android.server.policy.WindowManagerPolicy;
import java.io.PrintWriter;
+import java.util.Collections;
class TestWindowManagerPolicy implements WindowManagerPolicy {
@@ -268,8 +270,8 @@ class TestWindowManagerPolicy implements WindowManagerPolicy {
}
@Override
- public boolean performHapticFeedback(int uid, String packageName, int effectId,
- boolean always, String reason, boolean fromIme) {
+ public boolean performHapticFeedback(int uid, String packageName, int effectId, String reason,
+ int flags, int privFlags) {
return false;
}
@@ -362,4 +364,9 @@ class TestWindowManagerPolicy implements WindowManagerPolicy {
public boolean isGlobalKey(int keyCode) {
return false;
}
+
+ @Override
+ public KeyboardShortcutGroup getApplicationLaunchKeyboardShortcuts(int deviceId) {
+ return new KeyboardShortcutGroup("", Collections.emptyList());
+ }
}
diff --git a/services/tests/wmtests/src/com/android/server/wm/TransitionTests.java b/services/tests/wmtests/src/com/android/server/wm/TransitionTests.java
index 95d37ebf4597..720457e24370 100644
--- a/services/tests/wmtests/src/com/android/server/wm/TransitionTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/TransitionTests.java
@@ -35,6 +35,7 @@ import static android.view.WindowManager.TRANSIT_CLOSE;
import static android.view.WindowManager.TRANSIT_OPEN;
import static android.view.WindowManager.TRANSIT_TO_BACK;
import static android.window.TransitionInfo.FLAG_CONFIG_AT_END;
+import static android.window.TransitionInfo.FLAG_CROSS_PROFILE_OWNER_THUMBNAIL;
import static android.window.TransitionInfo.FLAG_FILLS_TASK;
import static android.window.TransitionInfo.FLAG_IN_TASK_WITH_EMBEDDED_ACTIVITY;
import static android.window.TransitionInfo.FLAG_IS_BEHIND_STARTING_WINDOW;
@@ -77,13 +78,14 @@ import static java.lang.Integer.MAX_VALUE;
import android.app.ActivityManager;
import android.content.res.Configuration;
+import android.content.res.Resources;
import android.graphics.Color;
import android.graphics.Point;
import android.graphics.Rect;
import android.os.IBinder;
+import android.platform.test.annotations.DisableFlags;
import android.platform.test.annotations.EnableFlags;
import android.platform.test.annotations.Presubmit;
-import android.platform.test.flag.junit.SetFlagsRule;
import android.util.ArrayMap;
import android.util.ArraySet;
import android.view.SurfaceControl;
@@ -95,6 +97,7 @@ import android.window.ITaskOrganizer;
import android.window.ITransitionPlayer;
import android.window.RemoteTransition;
import android.window.SystemPerformanceHinter;
+import android.window.TaskFragmentAnimationParams;
import android.window.TaskFragmentOrganizer;
import android.window.TransitionInfo;
@@ -104,7 +107,6 @@ import androidx.test.filters.SmallTest;
import com.android.internal.graphics.ColorUtils;
import com.android.window.flags.Flags;
-import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
@@ -120,16 +122,15 @@ import java.util.function.Function;
* Build/Install/Run:
* atest WmTests:TransitionTests
*/
-@EnableFlags(Flags.FLAG_MOVE_ANIMATION_OPTIONS_TO_CHANGE)
@SmallTest
@Presubmit
@RunWith(WindowTestRunner.class)
public class TransitionTests extends WindowTestsBase {
final SurfaceControl.Transaction mMockT = mock(SurfaceControl.Transaction.class);
private BLASTSyncEngine mSyncEngine;
+ private Transition mTransition;
+ private TransitionInfo mInfo;
- @Rule
- public SetFlagsRule mRule = new SetFlagsRule();
private Transition createTestTransition(int transitType, TransitionController controller) {
final Transition transition = new Transition(transitType, 0 /* flags */, controller,
controller.mSyncEngine);
@@ -1572,7 +1573,8 @@ public class TransitionTests extends WindowTestsBase {
enteringAnimReports.clear();
doCallRealMethod().when(mWm.mRoot).ensureActivitiesVisible(any(), anyBoolean());
final boolean[] wasInFinishingTransition = { false };
- controller.registerLegacyListener(new WindowManagerInternal.AppTransitionListener() {
+ controller.registerLegacyListener(new WindowManagerInternal.AppTransitionListener(
+ mDisplayContent.mDisplayId) {
@Override
public void onAppTransitionFinishedLocked(IBinder token) {
final ActivityRecord r = ActivityRecord.forToken(token);
@@ -1581,6 +1583,14 @@ public class TransitionTests extends WindowTestsBase {
}
}
});
+ final boolean[] calledListenerOnOtherDisplay = { false };
+ controller.registerLegacyListener(new WindowManagerInternal.AppTransitionListener(
+ mDisplayContent.mDisplayId + 1234) {
+ @Override
+ public void onAppTransitionFinishedLocked(IBinder token) {
+ calledListenerOnOtherDisplay[0] = true;
+ }
+ });
assertTrue(activity1.isVisible());
doReturn(false).when(task1).isTranslucent(null);
doReturn(false).when(task1).isTranslucentForTransition();
@@ -1591,6 +1601,7 @@ public class TransitionTests extends WindowTestsBase {
controller.finishTransition(closeTransition);
assertTrue(wasInFinishingTransition[0]);
+ assertFalse(calledListenerOnOtherDisplay[0]);
assertNull(controller.mFinishingTransition);
assertTrue(activity2.isVisible());
@@ -1994,6 +2005,221 @@ public class TransitionTests extends WindowTestsBase {
assertEquals(expectedBackgroundColor, info.getChanges().get(1).getBackgroundColor());
}
+ @DisableFlags(Flags.FLAG_MOVE_ANIMATION_OPTIONS_TO_CHANGE)
+ @Test
+ public void testOverrideAnimationOptionsToInfoIfNecessary_disableAnimOptionsPerChange() {
+ initializeOverrideAnimationOptionsTest();
+ TransitionInfo.AnimationOptions options = TransitionInfo.AnimationOptions
+ .makeCommonAnimOptions("testPackage");
+ mTransition.setOverrideAnimation(options, null /* startCallback */,
+ null /* finishCallback */);
+
+ mTransition.overrideAnimationOptionsToInfoIfNecessary(mInfo);
+
+ assertEquals(options, mInfo.getAnimationOptions());
+ }
+
+ @EnableFlags(Flags.FLAG_MOVE_ANIMATION_OPTIONS_TO_CHANGE)
+ @Test
+ public void testOverrideAnimationOptionsToInfoIfNecessary_nonCustomAnimOptions() {
+ initializeOverrideAnimationOptionsTest();
+ TransitionInfo.AnimationOptions options = TransitionInfo.AnimationOptions
+ .makeCommonAnimOptions("testPackage");
+ mTransition.setOverrideAnimation(options, null /* startCallback */,
+ null /* finishCallback */);
+
+ mTransition.overrideAnimationOptionsToInfoIfNecessary(mInfo);
+
+ final TransitionInfo.Change displayChange = mInfo.getChanges().get(0);
+ final TransitionInfo.Change taskChange = mInfo.getChanges().get(1);
+ final TransitionInfo.Change embeddedTfChange = mInfo.getChanges().get(2);
+ final TransitionInfo.Change activityChange = mInfo.getChanges().get(3);
+
+ assertNull("Display change's AnimationOptions must not be overridden.",
+ displayChange.getAnimationOptions());
+ assertNull("Task change's AnimationOptions must not be overridden.",
+ taskChange.getAnimationOptions());
+ assertNull("Embedded TF change's AnimationOptions must not be overridden.",
+ embeddedTfChange.getAnimationOptions());
+ assertEquals("Activity change's AnimationOptions must be overridden.",
+ options, activityChange.getAnimationOptions());
+ }
+
+ @EnableFlags(Flags.FLAG_MOVE_ANIMATION_OPTIONS_TO_CHANGE)
+ @Test
+ public void testOverrideAnimationOptionsToInfoIfNecessary_crossProfileAnimOptions() {
+ initializeOverrideAnimationOptionsTest();
+ TransitionInfo.AnimationOptions options = TransitionInfo.AnimationOptions
+ .makeCrossProfileAnimOptions();
+ mTransition.setOverrideAnimation(options, null /* startCallback */,
+ null /* finishCallback */);
+
+ final TransitionInfo.Change displayChange = mInfo.getChanges().get(0);
+ final TransitionInfo.Change taskChange = mInfo.getChanges().get(1);
+ final TransitionInfo.Change embeddedTfChange = mInfo.getChanges().get(2);
+ final TransitionInfo.Change activityChange = mInfo.getChanges().get(3);
+ activityChange.setMode(TRANSIT_OPEN);
+
+ mTransition.overrideAnimationOptionsToInfoIfNecessary(mInfo);
+
+ assertNull("Display change's AnimationOptions must not be overridden.",
+ displayChange.getAnimationOptions());
+ assertNull("Task change's AnimationOptions must not be overridden.",
+ taskChange.getAnimationOptions());
+ assertNull("Embedded TF change's AnimationOptions must not be overridden.",
+ embeddedTfChange.getAnimationOptions());
+ assertEquals("Activity change's AnimationOptions must be overridden.",
+ options, activityChange.getAnimationOptions());
+ assertTrue(activityChange.hasFlags(FLAG_CROSS_PROFILE_OWNER_THUMBNAIL));
+ }
+
+ @EnableFlags(Flags.FLAG_MOVE_ANIMATION_OPTIONS_TO_CHANGE)
+ @Test
+ public void testOverrideAnimationOptionsToInfoIfNecessary_customAnimOptions() {
+ initializeOverrideAnimationOptionsTest();
+ TransitionInfo.AnimationOptions options = TransitionInfo.AnimationOptions
+ .makeCustomAnimOptions("testPackage", Resources.ID_NULL,
+ TransitionInfo.AnimationOptions.DEFAULT_ANIMATION_RESOURCES_ID,
+ TransitionInfo.AnimationOptions.DEFAULT_ANIMATION_RESOURCES_ID,
+ Color.GREEN, false /* overrideTaskTransition */);
+ mTransition.setOverrideAnimation(options, null /* startCallback */,
+ null /* finishCallback */);
+
+ mTransition.overrideAnimationOptionsToInfoIfNecessary(mInfo);
+
+ final TransitionInfo.Change displayChange = mInfo.getChanges().get(0);
+ final TransitionInfo.Change taskChange = mInfo.getChanges().get(1);
+ final TransitionInfo.Change embeddedTfChange = mInfo.getChanges().get(2);
+ final TransitionInfo.Change activityChange = mInfo.getChanges().get(3);
+
+ assertNull("Display change's AnimationOptions must not be overridden.",
+ displayChange.getAnimationOptions());
+ assertNull("Task change's AnimationOptions must not be overridden.",
+ taskChange.getAnimationOptions());
+ assertEquals("Embedded TF change's AnimationOptions must be overridden.",
+ options, embeddedTfChange.getAnimationOptions());
+ assertEquals("Embedded TF change's background color must not be overridden.",
+ 0, embeddedTfChange.getBackgroundColor());
+ assertEquals("Activity change's AnimationOptions must be overridden.",
+ options, activityChange.getAnimationOptions());
+ assertEquals("Activity change's background color must be overridden.",
+ options.getBackgroundColor(), activityChange.getBackgroundColor());
+ }
+
+ @EnableFlags(Flags.FLAG_MOVE_ANIMATION_OPTIONS_TO_CHANGE)
+ @Test
+ public void testOverrideAnimationOptionsToInfoIfNecessary_haveTaskFragmentAnimParams() {
+ initializeOverrideAnimationOptionsTest();
+
+ final TaskFragment embeddedTf = mTransition.mTargets.get(2).mContainer.asTaskFragment();
+ embeddedTf.setAnimationParams(new TaskFragmentAnimationParams.Builder()
+ .setAnimationBackgroundColor(Color.RED)
+ .setOpenAnimationResId(0x12345678)
+ .build());
+
+ TransitionInfo.AnimationOptions options = TransitionInfo.AnimationOptions
+ .makeCustomAnimOptions("testPackage", Resources.ID_NULL,
+ TransitionInfo.AnimationOptions.DEFAULT_ANIMATION_RESOURCES_ID,
+ TransitionInfo.AnimationOptions.DEFAULT_ANIMATION_RESOURCES_ID,
+ Color.GREEN, false /* overrideTaskTransition */);
+ mTransition.setOverrideAnimation(options, null /* startCallback */,
+ null /* finishCallback */);
+
+ final TransitionInfo.Change displayChange = mInfo.getChanges().get(0);
+ final TransitionInfo.Change taskChange = mInfo.getChanges().get(1);
+ final TransitionInfo.Change embeddedTfChange = mInfo.getChanges().get(2);
+ final TransitionInfo.Change activityChange = mInfo.getChanges().get(3);
+
+ final int expectedColor = embeddedTf.getAnimationParams().getAnimationBackgroundColor();
+ embeddedTfChange.setBackgroundColor(expectedColor);
+ final TransitionInfo.AnimationOptions expectedOptions = TransitionInfo.AnimationOptions
+ .makeCustomAnimOptions("testPackage", 0x12345678,
+ TransitionInfo.AnimationOptions.DEFAULT_ANIMATION_RESOURCES_ID,
+ TransitionInfo.AnimationOptions.DEFAULT_ANIMATION_RESOURCES_ID,
+ 0, false /* overrideTaskTransition */);
+ embeddedTfChange.setAnimationOptions(expectedOptions);
+
+ mTransition.overrideAnimationOptionsToInfoIfNecessary(mInfo);
+
+ assertNull("Display change's AnimationOptions must not be overridden.",
+ displayChange.getAnimationOptions());
+ assertNull("Task change's AnimationOptions must not be overridden.",
+ taskChange.getAnimationOptions());
+ assertEquals("Embedded TF change's AnimationOptions must be overridden.",
+ expectedOptions, embeddedTfChange.getAnimationOptions());
+ assertEquals("Embedded TF change's background color must not be overridden.",
+ expectedColor, embeddedTfChange.getBackgroundColor());
+ assertEquals("Activity change's AnimationOptions must be overridden.",
+ options, activityChange.getAnimationOptions());
+ assertEquals("Activity change's background color must be overridden.",
+ options.getBackgroundColor(), activityChange.getBackgroundColor());
+ }
+
+ @EnableFlags(Flags.FLAG_MOVE_ANIMATION_OPTIONS_TO_CHANGE)
+ @Test
+ public void testOverrideAnimationOptionsToInfoIfNecessary_customAnimOptionsWithTaskOverride() {
+ initializeOverrideAnimationOptionsTest();
+ TransitionInfo.AnimationOptions options = TransitionInfo.AnimationOptions
+ .makeCustomAnimOptions("testPackage", Resources.ID_NULL,
+ TransitionInfo.AnimationOptions.DEFAULT_ANIMATION_RESOURCES_ID,
+ TransitionInfo.AnimationOptions.DEFAULT_ANIMATION_RESOURCES_ID,
+ Color.GREEN, true /* overrideTaskTransition */);
+ mTransition.setOverrideAnimation(options, null /* startCallback */,
+ null /* finishCallback */);
+
+ mTransition.overrideAnimationOptionsToInfoIfNecessary(mInfo);
+
+ final TransitionInfo.Change displayChange = mInfo.getChanges().get(0);
+ final TransitionInfo.Change taskChange = mInfo.getChanges().get(1);
+ final TransitionInfo.Change embeddedTfChange = mInfo.getChanges().get(2);
+ final TransitionInfo.Change activityChange = mInfo.getChanges().get(3);
+
+ assertNull("Display change's AnimationOptions must not be overridden.",
+ displayChange.getAnimationOptions());
+ assertEquals("Task change's AnimationOptions must be overridden.",
+ options, taskChange.getAnimationOptions());
+ assertEquals("Task change's background color must be overridden.",
+ options.getBackgroundColor(), taskChange.getBackgroundColor());
+ assertEquals("Embedded TF change's AnimationOptions must be overridden.",
+ options, embeddedTfChange.getAnimationOptions());
+ assertEquals("Embedded TF change's background color must be overridden.",
+ 0, embeddedTfChange.getBackgroundColor());
+ assertEquals("Activity change's AnimationOptions must be overridden.",
+ options, activityChange.getAnimationOptions());
+ assertEquals("Activity change's background color must be overridden.",
+ options.getBackgroundColor(), activityChange.getBackgroundColor());
+ }
+
+ private void initializeOverrideAnimationOptionsTest() {
+ mTransition = createTestTransition(TRANSIT_OPEN);
+
+ // Test set AnimationOptions for Activity and Task.
+ final Task task = createTask(mDisplayContent);
+ // Create an embedded TaskFragment.
+ final TaskFragmentOrganizer organizer = new TaskFragmentOrganizer(Runnable::run);
+ registerTaskFragmentOrganizer(
+ ITaskFragmentOrganizer.Stub.asInterface(organizer.getOrganizerToken().asBinder()));
+ final TaskFragment embeddedTf = createTaskFragmentWithEmbeddedActivity(task, organizer);
+ final ActivityRecord nonEmbeddedActivity = createActivityRecord(task);
+ mWm.mCurrentUserId = nonEmbeddedActivity.mUserId;
+
+ mTransition.mTargets = new ArrayList<>();
+ mTransition.mTargets.add(new Transition.ChangeInfo(mDisplayContent));
+ mTransition.mTargets.add(new Transition.ChangeInfo(task));
+ mTransition.mTargets.add(new Transition.ChangeInfo(embeddedTf));
+ mTransition.mTargets.add(new Transition.ChangeInfo(nonEmbeddedActivity));
+
+ mInfo = new TransitionInfo(TRANSIT_OPEN, 0 /* flags */);
+ mInfo.addChange(new TransitionInfo.Change(mDisplayContent.mRemoteToken
+ .toWindowContainerToken(), mDisplayContent.getAnimationLeash()));
+ mInfo.addChange(new TransitionInfo.Change(task.mRemoteToken.toWindowContainerToken(),
+ task.getAnimationLeash()));
+ mInfo.addChange(new TransitionInfo.Change(embeddedTf.mRemoteToken.toWindowContainerToken(),
+ embeddedTf.getAnimationLeash()));
+ mInfo.addChange(new TransitionInfo.Change(null /* container */,
+ nonEmbeddedActivity.getAnimationLeash()));
+ }
+
@Test
public void testTransitionVisibleChange() {
registerTestTransitionPlayer();
diff --git a/services/tests/wmtests/src/com/android/server/wm/TransparentPolicyTest.java b/services/tests/wmtests/src/com/android/server/wm/TransparentPolicyTest.java
index f07b402c31b6..cbf17c408115 100644
--- a/services/tests/wmtests/src/com/android/server/wm/TransparentPolicyTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/TransparentPolicyTest.java
@@ -258,7 +258,7 @@ public class TransparentPolicyTest extends WindowTestsBase {
robot.transparentActivity((ta) -> {
ta.applyOnActivity((a) -> {
a.applyToTopActivity((topActivity) -> {
- topActivity.mWmService.mLetterboxConfiguration
+ topActivity.mWmService.mAppCompatConfiguration
.setLetterboxHorizontalPositionMultiplier(1.0f);
});
a.configureUnresizableTopActivity(SCREEN_ORIENTATION_PORTRAIT);
diff --git a/services/tests/wmtests/src/com/android/server/wm/WallpaperControllerTests.java b/services/tests/wmtests/src/com/android/server/wm/WallpaperControllerTests.java
index 9b48cb9d328c..c65b76efd614 100644
--- a/services/tests/wmtests/src/com/android/server/wm/WallpaperControllerTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/WallpaperControllerTests.java
@@ -31,7 +31,6 @@ import static android.view.WindowManager.TRANSIT_OPEN;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.doReturn;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.mock;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.spyOn;
-import static com.android.dx.mockito.inline.extended.ExtendedMockito.when;
import static com.android.window.flags.Flags.multiCrop;
import static com.google.common.truth.Truth.assertThat;
@@ -551,10 +550,9 @@ public class WallpaperControllerTests extends WindowTestsBase {
}
private static void makeWallpaperWindowShown(WindowState w) {
- final WindowSurfaceController windowSurfaceController = mock(WindowSurfaceController.class);
- w.mWinAnimator.mSurfaceController = windowSurfaceController;
w.mWinAnimator.mLastAlpha = 1;
- when(windowSurfaceController.getShown()).thenReturn(true);
+ spyOn(w.mWinAnimator);
+ doReturn(true).when(w.mWinAnimator).getShown();
}
private WindowState createWallpaperWindow(DisplayContent dc, int width, int height) {
diff --git a/services/tests/wmtests/src/com/android/server/wm/WindowContainerTests.java b/services/tests/wmtests/src/com/android/server/wm/WindowContainerTests.java
index a94b58690775..401964c2f597 100644
--- a/services/tests/wmtests/src/com/android/server/wm/WindowContainerTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/WindowContainerTests.java
@@ -22,6 +22,7 @@ import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSET;
import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
+import static android.view.InsetsSource.FLAG_FORCE_CONSUMING;
import static android.view.WindowInsets.Type.systemOverlays;
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION;
@@ -77,6 +78,7 @@ import android.os.Parcel;
import android.os.RemoteException;
import android.os.ResultReceiver;
import android.os.ShellCallback;
+import android.platform.test.annotations.EnableFlags;
import android.platform.test.annotations.Presubmit;
import android.view.IRemoteAnimationFinishedCallback;
import android.view.IRemoteAnimationRunner;
@@ -91,6 +93,8 @@ import android.view.WindowManager;
import androidx.test.filters.SmallTest;
+import com.android.window.flags.Flags;
+
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
@@ -801,18 +805,11 @@ public class WindowContainerTests extends WindowTestsBase {
final TestWindowContainer root2 = builder.setLayer(0).build();
+ assertEquals("Roots have the same z-order", 0, root.compareTo(root2));
assertEquals(0, root.compareTo(root));
assertEquals(-1, child1.compareTo(child2));
assertEquals(1, child2.compareTo(child1));
- boolean inTheSameTree = true;
- try {
- root.compareTo(root2);
- } catch (IllegalArgumentException e) {
- inTheSameTree = false;
- }
- assertFalse(inTheSameTree);
-
assertEquals(-1, child1.compareTo(child11));
assertEquals(1, child21.compareTo(root));
assertEquals(1, child21.compareTo(child12));
@@ -960,6 +957,25 @@ public class WindowContainerTests extends WindowTestsBase {
assertTrue(child.handlesOrientationChangeFromDescendant(orientation));
}
+ @Test
+ @EnableFlags(Flags.FLAG_ENABLE_CAPTION_COMPAT_INSET_FORCE_CONSUMPTION)
+ public void testAddLocalInsets_addsFlagsFromProvider() {
+ final Task rootTask = createTask(mDisplayContent);
+ final Task task = createTaskInRootTask(rootTask, 0 /* userId */);
+
+ final Binder owner = new Binder();
+ Rect insetsRect = new Rect(0, 200, 1080, 700);
+ final int flags = FLAG_FORCE_CONSUMING;
+ final InsetsFrameProvider provider =
+ new InsetsFrameProvider(owner, 1, WindowInsets.Type.captionBar())
+ .setArbitraryRectangle(insetsRect)
+ .setFlags(flags);
+ task.addLocalInsetsFrameProvider(provider, owner);
+
+ final int sourceFlags = task.mLocalInsetsSources.get(provider.getId()).getFlags();
+ assertEquals(flags, sourceFlags);
+ }
+
private static void addLocalInsets(WindowContainer wc) {
final Binder owner = new Binder();
Rect genericOverlayInsetsRect1 = new Rect(0, 200, 1080, 700);
diff --git a/services/tests/wmtests/src/com/android/server/wm/WindowContainerTraversalTests.java b/services/tests/wmtests/src/com/android/server/wm/WindowContainerTraversalTests.java
index 593e983f3d23..22def515a98e 100644
--- a/services/tests/wmtests/src/com/android/server/wm/WindowContainerTraversalTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/WindowContainerTraversalTests.java
@@ -23,6 +23,7 @@ import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.mock;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.verify;
+import static org.junit.Assert.assertTrue;
import static org.mockito.Matchers.eq;
import android.platform.test.annotations.Presubmit;
@@ -60,4 +61,24 @@ public class WindowContainerTraversalTests extends WindowTestsBase {
verify(c).accept(eq(mDockedDividerWindow));
verify(c).accept(eq(mImeWindow));
}
+
+ @android.platform.test.annotations.RequiresFlagsEnabled(
+ com.android.window.flags.Flags.FLAG_DO_NOT_SKIP_IME_BY_TARGET_VISIBILITY)
+ @SetupWindows(addWindows = { W_ACTIVITY, W_INPUT_METHOD })
+ @Test
+ public void testTraverseImeRegardlessOfImeTarget() {
+ mDisplayContent.setImeLayeringTarget(mAppWindow);
+ mDisplayContent.setImeInputTarget(mAppWindow);
+ mAppWindow.mHasSurface = false;
+ mAppWindow.mActivityRecord.setVisibleRequested(false);
+ mAppWindow.mActivityRecord.setVisible(false);
+
+ final boolean[] foundIme = { false };
+ mDisplayContent.forAllWindows(w -> {
+ if (w == mImeWindow) {
+ foundIme[0] = true;
+ }
+ }, true /* traverseTopToBottom */);
+ assertTrue("IME must be found", foundIme[0]);
+ }
}
diff --git a/services/tests/wmtests/src/com/android/server/wm/WindowManagerServiceTests.java b/services/tests/wmtests/src/com/android/server/wm/WindowManagerServiceTests.java
index fcf7a3fe79c1..39640fbc9422 100644
--- a/services/tests/wmtests/src/com/android/server/wm/WindowManagerServiceTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/WindowManagerServiceTests.java
@@ -47,10 +47,10 @@ import static com.android.dx.mockito.inline.extended.ExtendedMockito.doNothing;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.doReturn;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.never;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.spyOn;
-import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_BACKGROUND_APP_COLOR_BACKGROUND;
-import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_BACKGROUND_APP_COLOR_BACKGROUND_FLOATING;
-import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_BACKGROUND_SOLID_COLOR;
-import static com.android.server.wm.LetterboxConfiguration.LETTERBOX_BACKGROUND_WALLPAPER;
+import static com.android.server.wm.AppCompatConfiguration.LETTERBOX_BACKGROUND_APP_COLOR_BACKGROUND;
+import static com.android.server.wm.AppCompatConfiguration.LETTERBOX_BACKGROUND_APP_COLOR_BACKGROUND_FLOATING;
+import static com.android.server.wm.AppCompatConfiguration.LETTERBOX_BACKGROUND_SOLID_COLOR;
+import static com.android.server.wm.AppCompatConfiguration.LETTERBOX_BACKGROUND_WALLPAPER;
import static com.google.common.truth.Truth.assertThat;
@@ -253,22 +253,18 @@ public class WindowManagerServiceTests extends WindowTestsBase {
final Session session = createTestSession(mAtm, wpc.getPid(), wpc.mUid);
spyOn(session);
assertTrue(session.mCanAddInternalSystemWindow);
- final WindowSurfaceController winSurface = mock(WindowSurfaceController.class);
- session.onWindowSurfaceVisibilityChanged(winSurface, true /* visible */,
- LayoutParams.TYPE_PHONE);
+ final WindowState window = createWindow(null, LayoutParams.TYPE_PHONE, "win");
+ session.onWindowSurfaceVisibilityChanged(window, true /* visible */);
verify(session).setHasOverlayUi(true);
- session.onWindowSurfaceVisibilityChanged(winSurface, false /* visible */,
- LayoutParams.TYPE_PHONE);
+ session.onWindowSurfaceVisibilityChanged(window, false /* visible */);
verify(session).setHasOverlayUi(false);
}
@Test
public void testRelayoutExitingWindow() {
final WindowState win = createWindow(null, TYPE_BASE_APPLICATION, "appWin");
- final WindowSurfaceController surfaceController = mock(WindowSurfaceController.class);
- win.mWinAnimator.mSurfaceController = surfaceController;
win.mWinAnimator.mDrawState = WindowStateAnimator.HAS_DRAWN;
- doReturn(true).when(surfaceController).hasSurface();
+ win.mWinAnimator.mSurfaceControl = mock(SurfaceControl.class);
spyOn(win.mTransitionController);
doReturn(true).when(win.mTransitionController).isShellTransitionsEnabled();
doReturn(true).when(win.mTransitionController).inTransition(
@@ -306,7 +302,7 @@ public class WindowManagerServiceTests extends WindowTestsBase {
// and WMS#tryStartExitingAnimation() will destroy the surface directly.
assertFalse(win.mAnimatingExit);
assertFalse(win.mHasSurface);
- assertNull(win.mWinAnimator.mSurfaceController);
+ assertNull(win.mWinAnimator.mSurfaceControl);
// Invisible requested activity should not get the last config even if its view is visible.
mWm.relayoutWindow(win.mSession, win.mClient, win.mAttrs, w, h, View.VISIBLE, 0, 0, 0,
@@ -1294,8 +1290,6 @@ public class WindowManagerServiceTests extends WindowTestsBase {
@Test
public void testRelayout_appWindowSendActivityWindowInfo() {
- mSetFlagsRule.enableFlags(Flags.FLAG_ACTIVITY_WINDOW_INFO_FLAG);
-
// Skip unnecessary operations of relayout.
spyOn(mWm.mWindowPlacerLocked);
doNothing().when(mWm.mWindowPlacerLocked).performSurfacePlacement(anyBoolean());
@@ -1396,8 +1390,8 @@ public class WindowManagerServiceTests extends WindowTestsBase {
}
private boolean setupLetterboxConfigurationWithBackgroundType(
- @LetterboxConfiguration.LetterboxBackgroundType int letterboxBackgroundType) {
- mWm.mLetterboxConfiguration.setLetterboxBackgroundTypeOverride(letterboxBackgroundType);
+ @AppCompatConfiguration.LetterboxBackgroundType int letterboxBackgroundType) {
+ mWm.mAppCompatConfiguration.setLetterboxBackgroundTypeOverride(letterboxBackgroundType);
return mWm.isLetterboxBackgroundMultiColored();
}
}
diff --git a/services/tests/wmtests/src/com/android/server/wm/WindowOrganizerTests.java b/services/tests/wmtests/src/com/android/server/wm/WindowOrganizerTests.java
index d3504cc1bd28..fb81a52bce85 100644
--- a/services/tests/wmtests/src/com/android/server/wm/WindowOrganizerTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/WindowOrganizerTests.java
@@ -30,6 +30,7 @@ import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSET;
import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
import static android.content.res.Configuration.SCREEN_HEIGHT_DP_UNDEFINED;
import static android.content.res.Configuration.SCREEN_WIDTH_DP_UNDEFINED;
+import static android.view.InsetsSource.FLAG_FORCE_CONSUMING;
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION;
import static android.window.DisplayAreaOrganizer.FEATURE_VENDOR_FIRST;
@@ -75,10 +76,12 @@ import android.graphics.Rect;
import android.os.Binder;
import android.os.IBinder;
import android.os.RemoteException;
+import android.platform.test.annotations.EnableFlags;
import android.platform.test.annotations.Presubmit;
import android.util.ArrayMap;
import android.util.Rational;
import android.view.Display;
+import android.view.InsetsSource;
import android.view.SurfaceControl;
import android.view.WindowInsets;
import android.window.ITaskFragmentOrganizer;
@@ -904,7 +907,8 @@ public class WindowOrganizerTests extends WindowTestsBase {
0 /* index */,
WindowInsets.Type.systemOverlays(),
new Rect(0, 0, 1080, 200),
- null /* boundingRects */);
+ null /* boundingRects */,
+ 0 /* flags */);
mWm.mAtmService.mWindowOrganizerController.applyTransaction(wct);
assertThat(navigationBarInsetsReceiverTask.mLocalInsetsSources
@@ -930,7 +934,8 @@ public class WindowOrganizerTests extends WindowTestsBase {
0 /* index */,
WindowInsets.Type.systemOverlays(),
new Rect(0, 0, 1080, 200),
- boundingRects);
+ boundingRects,
+ 0 /* flags */);
mWm.mAtmService.mWindowOrganizerController.applyTransaction(wct);
assertArrayEquals(boundingRects, navigationBarInsetsReceiverTask.mLocalInsetsSources
@@ -938,6 +943,30 @@ public class WindowOrganizerTests extends WindowTestsBase {
}
@Test
+ @EnableFlags(Flags.FLAG_ENABLE_CAPTION_COMPAT_INSET_FORCE_CONSUMPTION)
+ public void testAddInsetsSource_withFlags() {
+ final Task rootTask = createTask(mDisplayContent);
+
+ final Task insetsReceiverTask = createTaskInRootTask(rootTask, 0);
+ insetsReceiverTask.getConfiguration().windowConfiguration
+ .setBounds(new Rect(0, 200, 1080, 700));
+
+ final @InsetsSource.Flags int flags = FLAG_FORCE_CONSUMING;
+ final WindowContainerTransaction wct = new WindowContainerTransaction();
+ wct.addInsetsSource(
+ insetsReceiverTask.mRemoteToken.toWindowContainerToken(),
+ new Binder(),
+ 0 /* index */,
+ WindowInsets.Type.systemOverlays(),
+ new Rect(0, 0, 1080, 200),
+ null /* boundingRects */,
+ flags);
+ mWm.mAtmService.mWindowOrganizerController.applyTransaction(wct);
+
+ assertEquals(flags, insetsReceiverTask.mLocalInsetsSources.valueAt(0).getFlags());
+ }
+
+ @Test
public void testRemoveInsetsSource() {
final Task rootTask = createTask(mDisplayContent);
@@ -952,7 +981,8 @@ public class WindowOrganizerTests extends WindowTestsBase {
0 /* index */,
WindowInsets.Type.systemOverlays(),
new Rect(0, 0, 1080, 200),
- null /* boundingRects */);
+ null /* boundingRects */,
+ 0 /* flags */);
mWm.mAtmService.mWindowOrganizerController.applyTransaction(wct);
final WindowContainerTransaction wct2 = new WindowContainerTransaction();
diff --git a/services/tests/wmtests/src/com/android/server/wm/WindowProcessControllerTests.java b/services/tests/wmtests/src/com/android/server/wm/WindowProcessControllerTests.java
index e6648dad4bbe..0cb22ad47355 100644
--- a/services/tests/wmtests/src/com/android/server/wm/WindowProcessControllerTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/WindowProcessControllerTests.java
@@ -18,6 +18,7 @@ package com.android.server.wm;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_UNDEFINED;
+import static android.content.pm.ActivityInfo.INSETS_DECOUPLED_CONFIGURATION_ENFORCED;
import static android.content.res.Configuration.GRAMMATICAL_GENDER_NOT_SPECIFIED;
import static android.content.res.Configuration.ORIENTATION_LANDSCAPE;
import static android.content.res.Configuration.ORIENTATION_PORTRAIT;
@@ -86,6 +87,7 @@ public class WindowProcessControllerTests extends WindowTestsBase {
ApplicationInfo info = mock(ApplicationInfo.class);
info.packageName = "test.package.name";
+ doReturn(true).when(info).isChangeEnabled(INSETS_DECOUPLED_CONFIGURATION_ENFORCED);
mWpc = new WindowProcessController(
mAtm, info, null, 0, -1, null, mMockListener);
mWpc.setThread(mock(IApplicationThread.class));
diff --git a/services/tests/wmtests/src/com/android/server/wm/WindowTestsBase.java b/services/tests/wmtests/src/com/android/server/wm/WindowTestsBase.java
index b512aa852ddb..ea2abf7ddcb8 100644
--- a/services/tests/wmtests/src/com/android/server/wm/WindowTestsBase.java
+++ b/services/tests/wmtests/src/com/android/server/wm/WindowTestsBase.java
@@ -141,8 +141,8 @@ import java.util.HashMap;
import java.util.List;
/** Common base class for window manager unit test classes. */
-class WindowTestsBase extends SystemServiceTestsBase {
- final Context mContext = getInstrumentation().getTargetContext();
+public class WindowTestsBase extends SystemServiceTestsBase {
+ protected final Context mContext = getInstrumentation().getTargetContext();
// Default package name
static final String DEFAULT_COMPONENT_PACKAGE_NAME = "com.foo";
@@ -262,34 +262,34 @@ class WindowTestsBase extends SystemServiceTestsBase {
// Ensure letterbox aspect ratio is not overridden on any device target.
// {@link com.android.internal.R.dimen.config_fixedOrientationLetterboxAspectRatio}, is set
// on some device form factors.
- mAtm.mWindowManager.mLetterboxConfiguration.setFixedOrientationLetterboxAspectRatio(0);
+ mAtm.mWindowManager.mAppCompatConfiguration.setFixedOrientationLetterboxAspectRatio(0);
// Ensure letterbox horizontal position multiplier is not overridden on any device target.
// {@link com.android.internal.R.dimen.config_letterboxHorizontalPositionMultiplier},
// may be set on some device form factors.
- mAtm.mWindowManager.mLetterboxConfiguration.setLetterboxHorizontalPositionMultiplier(0.5f);
+ mAtm.mWindowManager.mAppCompatConfiguration.setLetterboxHorizontalPositionMultiplier(0.5f);
// Ensure letterbox vertical position multiplier is not overridden on any device target.
// {@link com.android.internal.R.dimen.config_letterboxHorizontalPositionMultiplier},
// may be set on some device form factors.
- mAtm.mWindowManager.mLetterboxConfiguration.setLetterboxVerticalPositionMultiplier(0.0f);
+ mAtm.mWindowManager.mAppCompatConfiguration.setLetterboxVerticalPositionMultiplier(0.0f);
// Ensure letterbox horizontal reachability treatment isn't overridden on any device target.
// {@link com.android.internal.R.bool.config_letterboxIsHorizontalReachabilityEnabled},
// may be set on some device form factors.
- mAtm.mWindowManager.mLetterboxConfiguration.setIsHorizontalReachabilityEnabled(false);
+ mAtm.mWindowManager.mAppCompatConfiguration.setIsHorizontalReachabilityEnabled(false);
// Ensure letterbox vertical reachability treatment isn't overridden on any device target.
// {@link com.android.internal.R.bool.config_letterboxIsVerticalReachabilityEnabled},
// may be set on some device form factors.
- mAtm.mWindowManager.mLetterboxConfiguration.setIsVerticalReachabilityEnabled(false);
+ mAtm.mWindowManager.mAppCompatConfiguration.setIsVerticalReachabilityEnabled(false);
// Ensure aspect ratio for unresizable apps isn't overridden on any device target.
// {@link com.android.internal.R.bool
// .config_letterboxIsSplitScreenAspectRatioForUnresizableAppsEnabled}, may be set on some
// device form factors.
- mAtm.mWindowManager.mLetterboxConfiguration
+ mAtm.mWindowManager.mAppCompatConfiguration
.setIsSplitScreenAspectRatioForUnresizableAppsEnabled(false);
// Ensure aspect ratio for al apps isn't overridden on any device target.
// {@link com.android.internal.R.bool
// .config_letterboxIsDisplayAspectRatioForFixedOrientationLetterboxEnabled}, may be set on
// some device form factors.
- mAtm.mWindowManager.mLetterboxConfiguration
+ mAtm.mWindowManager.mAppCompatConfiguration
.setIsDisplayAspectRatioEnabledForFixedOrientationLetterbox(false);
// Setup WallpaperController crop utils with a simple center-align strategy
@@ -331,7 +331,7 @@ class WindowTestsBase extends SystemServiceTestsBase {
private void checkDeviceSpecificOverridesNotApplied() {
// Check global overrides
if (!sGlobalOverridesChecked) {
- assertEquals(0, mWm.mLetterboxConfiguration.getFixedOrientationLetterboxAspectRatio(),
+ assertEquals(0, mWm.mAppCompatConfiguration.getFixedOrientationLetterboxAspectRatio(),
0 /* delta */);
sGlobalOverridesChecked = true;
}
diff --git a/services/tests/wmtests/src/com/android/server/wm/WindowTracingTest.java b/services/tests/wmtests/src/com/android/server/wm/WindowTracingLegacyTest.java
index c1834037f791..48a8d5502c64 100644
--- a/services/tests/wmtests/src/com/android/server/wm/WindowTracingTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/WindowTracingLegacyTest.java
@@ -63,7 +63,7 @@ import java.nio.charset.StandardCharsets;
*/
@SmallTest
@Presubmit
-public class WindowTracingTest {
+public class WindowTracingLegacyTest {
private static final byte[] MAGIC_HEADER = new byte[]{
0x9, 0x57, 0x49, 0x4e, 0x54, 0x52, 0x41, 0x43, 0x45,
@@ -88,7 +88,7 @@ public class WindowTracingTest {
mFile = testContext.getFileStreamPath("tracing_test.dat");
mFile.delete();
- mWindowTracing = new WindowTracing(mFile, mWmMock, mChoreographer,
+ mWindowTracing = new WindowTracingLegacy(mFile, mWmMock, mChoreographer,
new WindowManagerGlobalLock(), 1024);
}
diff --git a/services/tests/wmtests/src/com/android/server/wm/utils/DesktopModeFlagsUtilTest.java b/services/tests/wmtests/src/com/android/server/wm/utils/DesktopModeFlagsUtilTest.java
new file mode 100644
index 000000000000..eda78cb40c5d
--- /dev/null
+++ b/services/tests/wmtests/src/com/android/server/wm/utils/DesktopModeFlagsUtilTest.java
@@ -0,0 +1,349 @@
+/*
+ * 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.server.wm.utils;
+
+import static com.android.server.wm.utils.DesktopModeFlagsUtil.DESKTOP_WINDOWING_MODE;
+import static com.android.server.wm.utils.DesktopModeFlagsUtil.ToggleOverride.OVERRIDE_OFF;
+import static com.android.server.wm.utils.DesktopModeFlagsUtil.ToggleOverride.OVERRIDE_ON;
+import static com.android.window.flags.Flags.FLAG_ENABLE_DESKTOP_WINDOWING_MODE;
+import static com.android.window.flags.Flags.FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY;
+import static com.android.window.flags.Flags.FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import android.content.ContentResolver;
+import android.platform.test.annotations.DisableFlags;
+import android.platform.test.annotations.EnableFlags;
+import android.platform.test.annotations.Presubmit;
+import android.platform.test.flag.junit.SetFlagsRule;
+import android.provider.Settings;
+
+import androidx.test.filters.SmallTest;
+
+import com.android.server.wm.WindowTestRunner;
+import com.android.server.wm.WindowTestsBase;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.lang.reflect.Field;
+
+/**
+ * Test class for [DesktopModeFlagsUtil]
+ *
+ * Build/Install/Run:
+ * atest WmTests:DesktopModeFlagsUtilTest
+ */
+@SmallTest
+@Presubmit
+@RunWith(WindowTestRunner.class)
+public class DesktopModeFlagsUtilTest extends WindowTestsBase {
+
+ @Rule
+ public SetFlagsRule setFlagsRule = new SetFlagsRule();
+
+ @Before
+ public void setUp() throws Exception {
+ resetCache();
+ }
+
+ @Test
+ @DisableFlags(FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION)
+ @EnableFlags(FLAG_ENABLE_DESKTOP_WINDOWING_MODE)
+ public void isEnabled_devOptionFlagDisabled_overrideOff_featureFlagOn_returnsTrue() {
+ setOverride(OVERRIDE_OFF.getSetting());
+ // In absence of dev options, follow flag
+ assertThat(DESKTOP_WINDOWING_MODE.isEnabled(mContext)).isTrue();
+ }
+
+
+ @Test
+ @DisableFlags({FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION, FLAG_ENABLE_DESKTOP_WINDOWING_MODE})
+ public void isEnabled_devOptionFlagDisabled_overrideOn_featureFlagOff_returnsFalse() {
+ setOverride(OVERRIDE_ON.getSetting());
+
+ assertThat(DESKTOP_WINDOWING_MODE.isEnabled(mContext)).isFalse();
+ }
+
+ @Test
+ @EnableFlags({FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION, FLAG_ENABLE_DESKTOP_WINDOWING_MODE})
+ public void isEnabled_overrideUnset_featureFlagOn_returnsTrue() {
+ setOverride(DesktopModeFlagsUtil.ToggleOverride.OVERRIDE_UNSET.getSetting());
+
+ // For overridableFlag, for unset overrides, follow flag
+ assertThat(DESKTOP_WINDOWING_MODE.isEnabled(mContext)).isTrue();
+ }
+
+ @Test
+ @EnableFlags(FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION)
+ @DisableFlags(FLAG_ENABLE_DESKTOP_WINDOWING_MODE)
+ public void isEnabled_overrideUnset_featureFlagOff_returnsFalse() {
+ setOverride(DesktopModeFlagsUtil.ToggleOverride.OVERRIDE_UNSET.getSetting());
+
+ // For overridableFlag, for unset overrides, follow flag
+ assertThat(DESKTOP_WINDOWING_MODE.isEnabled(mContext)).isFalse();
+ }
+
+ @Test
+ @EnableFlags({FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION, FLAG_ENABLE_DESKTOP_WINDOWING_MODE})
+ public void isEnabled_noOverride_featureFlagOn_returnsTrue() {
+ setOverride(null);
+
+ // For overridableFlag, in absence of overrides, follow flag
+ assertThat(DESKTOP_WINDOWING_MODE.isEnabled(mContext)).isTrue();
+ }
+
+ @Test
+ @EnableFlags(FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION)
+ @DisableFlags(FLAG_ENABLE_DESKTOP_WINDOWING_MODE)
+ public void isEnabled_noOverride_featureFlagOff_returnsFalse() {
+ setOverride(null);
+
+ // For overridableFlag, in absence of overrides, follow flag
+ assertThat(DESKTOP_WINDOWING_MODE.isEnabled(mContext)).isFalse();
+ }
+
+ @Test
+ @EnableFlags({FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION, FLAG_ENABLE_DESKTOP_WINDOWING_MODE})
+ public void isEnabled_unrecognizableOverride_featureFlagOn_returnsTrue() {
+ setOverride(-2);
+
+ // For overridableFlag, for unrecognized overrides, follow flag
+ assertThat(DESKTOP_WINDOWING_MODE.isEnabled(mContext)).isTrue();
+ }
+
+ @Test
+ @EnableFlags(FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION)
+ @DisableFlags(FLAG_ENABLE_DESKTOP_WINDOWING_MODE)
+ public void isEnabled_unrecognizableOverride_featureFlagOff_returnsFalse() {
+ setOverride(-2);
+
+ // For overridableFlag, for unrecognizable overrides, follow flag
+ assertThat(DESKTOP_WINDOWING_MODE.isEnabled(mContext)).isFalse();
+ }
+
+ @Test
+ @EnableFlags({FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION, FLAG_ENABLE_DESKTOP_WINDOWING_MODE})
+ public void isEnabled_overrideOff_featureFlagOn_returnsFalse() {
+ setOverride(OVERRIDE_OFF.getSetting());
+
+ // For overridableFlag, follow override if they exist
+ assertThat(DESKTOP_WINDOWING_MODE.isEnabled(mContext)).isFalse();
+ }
+
+ @Test
+ @EnableFlags(FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION)
+ @DisableFlags(FLAG_ENABLE_DESKTOP_WINDOWING_MODE)
+ public void isEnabled_overrideOn_featureFlagOff_returnsTrue() {
+ setOverride(OVERRIDE_ON.getSetting());
+
+ // For overridableFlag, follow override if they exist
+ assertThat(DESKTOP_WINDOWING_MODE.isEnabled(mContext)).isTrue();
+ }
+
+ @Test
+ @EnableFlags({FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION, FLAG_ENABLE_DESKTOP_WINDOWING_MODE})
+ public void isEnabled_overrideOffThenOn_featureFlagOn_returnsFalseAndFalse() {
+ setOverride(OVERRIDE_OFF.getSetting());
+
+ // For overridableFlag, follow override if they exist
+ assertThat(DESKTOP_WINDOWING_MODE.isEnabled(mContext)).isFalse();
+
+ setOverride(OVERRIDE_ON.getSetting());
+
+ // Keep overrides constant through the process
+ assertThat(DESKTOP_WINDOWING_MODE.isEnabled(mContext)).isFalse();
+ }
+
+ @Test
+ @EnableFlags(FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION)
+ @DisableFlags(FLAG_ENABLE_DESKTOP_WINDOWING_MODE)
+ public void isEnabled_overrideOnThenOff_featureFlagOff_returnsTrueAndTrue() {
+ setOverride(OVERRIDE_ON.getSetting());
+
+ // For overridableFlag, follow override if they exist
+ assertThat(DESKTOP_WINDOWING_MODE.isEnabled(mContext)).isTrue();
+
+ setOverride(OVERRIDE_OFF.getSetting());
+
+ // Keep overrides constant through the process
+ assertThat(DESKTOP_WINDOWING_MODE.isEnabled(mContext)).isTrue();
+ }
+
+ @Test
+ @EnableFlags({FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION, FLAG_ENABLE_DESKTOP_WINDOWING_MODE,
+ FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY})
+ public void isEnabled_dwFlagOn_overrideUnset_featureFlagOn_returnsTrue() {
+ setOverride(DesktopModeFlagsUtil.ToggleOverride.OVERRIDE_UNSET.getSetting());
+
+ // For unset overrides, follow flag
+ assertThat(DesktopModeFlagsUtil.WALLPAPER_ACTIVITY.isEnabled(mContext)).isTrue();
+ }
+
+ @Test
+ @EnableFlags({FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION, FLAG_ENABLE_DESKTOP_WINDOWING_MODE})
+ @DisableFlags(FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
+ public void isEnabled_dwFlagOn_overrideUnset_featureFlagOff_returnsFalse() {
+ setOverride(DesktopModeFlagsUtil.ToggleOverride.OVERRIDE_UNSET.getSetting());
+ // For unset overrides, follow flag
+ assertThat(DesktopModeFlagsUtil.WALLPAPER_ACTIVITY.isEnabled(mContext)).isFalse();
+ }
+
+ @Test
+ @EnableFlags({
+ FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION,
+ FLAG_ENABLE_DESKTOP_WINDOWING_MODE,
+ FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY
+ })
+ public void isEnabled_dwFlagOn_overrideOn_featureFlagOn_returnsTrue() {
+ setOverride(OVERRIDE_ON.getSetting());
+
+ // When toggle override matches its default state (dw flag), don't override flags
+ assertThat(DesktopModeFlagsUtil.WALLPAPER_ACTIVITY.isEnabled(mContext)).isTrue();
+ }
+
+ @Test
+ @EnableFlags({FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION, FLAG_ENABLE_DESKTOP_WINDOWING_MODE})
+ @DisableFlags(FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
+ public void isEnabled_dwFlagOn_overrideOn_featureFlagOff_returnsFalse() {
+ setOverride(OVERRIDE_ON.getSetting());
+
+ // When toggle override matches its default state (dw flag), don't override flags
+ assertThat(DesktopModeFlagsUtil.WALLPAPER_ACTIVITY.isEnabled(mContext)).isFalse();
+ }
+
+ @Test
+ @EnableFlags({
+ FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION,
+ FLAG_ENABLE_DESKTOP_WINDOWING_MODE,
+ FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY
+ })
+ public void isEnabled_dwFlagOn_overrideOff_featureFlagOn_returnsFalse() {
+ setOverride(OVERRIDE_OFF.getSetting());
+
+ // Follow override if they exist, and is not equal to default toggle state (dw flag)
+ assertThat(DesktopModeFlagsUtil.WALLPAPER_ACTIVITY.isEnabled(mContext)).isFalse();
+ }
+
+ @Test
+ @EnableFlags({FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION, FLAG_ENABLE_DESKTOP_WINDOWING_MODE})
+ @DisableFlags(FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY)
+ public void isEnabled_dwFlagOn_overrideOff_featureFlagOff_returnsFalse() {
+ setOverride(OVERRIDE_OFF.getSetting());
+
+ // Follow override if they exist, and is not equal to default toggle state (dw flag)
+ assertThat(DesktopModeFlagsUtil.WALLPAPER_ACTIVITY.isEnabled(mContext)).isFalse();
+ }
+
+ @Test
+ @EnableFlags({
+ FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION,
+ FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY
+ })
+ @DisableFlags(FLAG_ENABLE_DESKTOP_WINDOWING_MODE)
+ public void isEnabled_dwFlagOff_overrideUnset_featureFlagOn_returnsTrue() {
+ setOverride(DesktopModeFlagsUtil.ToggleOverride.OVERRIDE_UNSET.getSetting());
+
+ // For unset overrides, follow flag
+ assertThat(DesktopModeFlagsUtil.WALLPAPER_ACTIVITY.isEnabled(mContext)).isTrue();
+ }
+
+ @Test
+ @EnableFlags(FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION)
+ @DisableFlags({
+ FLAG_ENABLE_DESKTOP_WINDOWING_MODE,
+ FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY
+ })
+ public void isEnabled_dwFlagOff_overrideUnset_featureFlagOff_returnsFalse() {
+ setOverride(DesktopModeFlagsUtil.ToggleOverride.OVERRIDE_UNSET.getSetting());
+
+ // For unset overrides, follow flag
+ assertThat(DesktopModeFlagsUtil.WALLPAPER_ACTIVITY.isEnabled(mContext)).isFalse();
+ }
+
+ @Test
+ @EnableFlags({
+ FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION,
+ FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY
+ })
+ @DisableFlags(FLAG_ENABLE_DESKTOP_WINDOWING_MODE)
+ public void isEnabled_dwFlagOff_overrideOn_featureFlagOn_returnsTrue() {
+ setOverride(OVERRIDE_ON.getSetting());
+
+ // Follow override if they exist, and is not equal to default toggle state (dw flag)
+ assertThat(DesktopModeFlagsUtil.WALLPAPER_ACTIVITY.isEnabled(mContext)).isTrue();
+ }
+
+ @Test
+ @EnableFlags(FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION)
+ @DisableFlags({
+ FLAG_ENABLE_DESKTOP_WINDOWING_MODE,
+ FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY
+ })
+ public void isEnabled_dwFlagOff_overrideOn_featureFlagOff_returnTrue() {
+ setOverride(OVERRIDE_ON.getSetting());
+
+ // Follow override if they exist, and is not equal to default toggle state (dw flag)
+ assertThat(DesktopModeFlagsUtil.WALLPAPER_ACTIVITY.isEnabled(mContext)).isTrue();
+ }
+
+ @Test
+ @EnableFlags({
+ FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION,
+ FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY
+ })
+ @DisableFlags(FLAG_ENABLE_DESKTOP_WINDOWING_MODE)
+ public void isEnabled_dwFlagOff_overrideOff_featureFlagOn_returnsTrue() {
+ setOverride(OVERRIDE_OFF.getSetting());
+
+ // When toggle override matches its default state (dw flag), don't override flags
+ assertThat(DesktopModeFlagsUtil.WALLPAPER_ACTIVITY.isEnabled(mContext)).isTrue();
+ }
+
+ @Test
+ @EnableFlags(FLAG_SHOW_DESKTOP_WINDOWING_DEV_OPTION)
+ @DisableFlags({
+ FLAG_ENABLE_DESKTOP_WINDOWING_MODE,
+ FLAG_ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY
+ })
+ public void isEnabled_dwFlagOff_overrideOff_featureFlagOff_returnsFalse() {
+ setOverride(OVERRIDE_OFF.getSetting());
+
+ // When toggle override matches its default state (dw flag), don't override flags
+ assertThat(DesktopModeFlagsUtil.WALLPAPER_ACTIVITY.isEnabled(mContext)).isFalse();
+ }
+
+ private void setOverride(Integer setting) {
+ ContentResolver contentResolver = mContext.getContentResolver();
+ String key = Settings.Global.DEVELOPMENT_OVERRIDE_DESKTOP_MODE_FEATURES;
+
+ if (setting == null) {
+ Settings.Global.putString(contentResolver, key, null);
+ } else {
+ Settings.Global.putInt(contentResolver, key, setting);
+ }
+ }
+
+ private void resetCache() throws Exception {
+ Field cachedToggleOverride = DesktopModeFlagsUtil.class.getDeclaredField(
+ "sCachedToggleOverride");
+ cachedToggleOverride.setAccessible(true);
+ cachedToggleOverride.set(null, null);
+ }
+}
diff --git a/services/usage/java/com/android/server/usage/UsageStatsService.java b/services/usage/java/com/android/server/usage/UsageStatsService.java
index bf46154caf3e..010a32274dcd 100644
--- a/services/usage/java/com/android/server/usage/UsageStatsService.java
+++ b/services/usage/java/com/android/server/usage/UsageStatsService.java
@@ -1064,10 +1064,8 @@ public class UsageStatsService extends SystemService implements
synchronized (mReportedEvents) {
LinkedList<Event> events = mReportedEvents.get(userId);
if (events == null) {
- // TODO (b/347644400): callers of this API should verify that the userId passed to
- // this method exists - there is currently a known case where USER_ALL is passed
- // here and it would be added to the queue, never to be flushed correctly. The logic
- // below should only remain as a last-resort catch-all fix.
+ // Callers of this API should verify that the userId passed to this method exists.
+ // The logic below should only remain as a last-resort catch-all fix.
final UserManagerInternal umi = LocalServices.getService(UserManagerInternal.class);
if (umi == null || (umi != null && !umi.exists(userId))) {
// The userId passed is a non-existent user so don't report the event.
@@ -3239,6 +3237,18 @@ public class UsageStatsService extends SystemService implements
}
@Override
+ public void reportEventForAllUsers(String packageName, int eventType) {
+ if (packageName == null) {
+ Slog.w(TAG, "Event reported without a package name, eventType:" + eventType);
+ return;
+ }
+
+ Event event = new Event(eventType, SystemClock.elapsedRealtime());
+ event.mPackage = packageName;
+ reportEventToAllUserId(event);
+ }
+
+ @Override
public void reportConfigurationChange(Configuration config, int userId) {
if (config == null) {
Slog.w(TAG, "Configuration event reported with a null config");
diff --git a/services/usb/java/com/android/server/usb/UsbDeviceManager.java b/services/usb/java/com/android/server/usb/UsbDeviceManager.java
index 175a09db54e3..14044135eca7 100644
--- a/services/usb/java/com/android/server/usb/UsbDeviceManager.java
+++ b/services/usb/java/com/android/server/usb/UsbDeviceManager.java
@@ -16,6 +16,8 @@
package com.android.server.usb;
+import com.android.internal.annotations.Keep;
+
import static android.hardware.usb.UsbPortStatus.DATA_ROLE_DEVICE;
import static android.hardware.usb.UsbPortStatus.DATA_ROLE_HOST;
import static android.hardware.usb.UsbPortStatus.MODE_AUDIO_ACCESSORY;
@@ -82,6 +84,7 @@ import android.util.Pair;
import android.util.Slog;
import android.text.TextUtils;
+import com.android.internal.R;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.logging.MetricsLogger;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
@@ -147,6 +150,8 @@ public class UsbDeviceManager implements ActivityTaskManagerInternal.ScreenObser
"DEVPATH=/devices/virtual/android_usb/android0";
private static final String ACCESSORY_START_MATCH =
"DEVPATH=/devices/virtual/misc/usb_accessory";
+ private static final String UDC_SUBSYS_MATCH =
+ "SUBSYSTEM=udc";
private static final String FUNCTIONS_PATH =
"/sys/class/android_usb/android0/functions";
private static final String STATE_PATH =
@@ -226,6 +231,9 @@ public class UsbDeviceManager implements ActivityTaskManagerInternal.ScreenObser
private static UsbGadgetHal mUsbGadgetHal;
+ private final boolean mEnableUdcSysfsUsbStateUpdate;
+ private String mUdcName = "";
+
/**
* Counter for tracking UsbOperation operations.
*/
@@ -260,12 +268,9 @@ public class UsbDeviceManager implements ActivityTaskManagerInternal.ScreenObser
if (DEBUG) Slog.d(TAG, "sEventLogger == null");
}
- String state = event.get("USB_STATE");
String accessory = event.get("ACCESSORY");
- if (state != null) {
- mHandler.updateState(state);
- } else if ("GETPROTOCOL".equals(accessory)) {
+ if ("GETPROTOCOL".equals(accessory)) {
if (DEBUG) Slog.d(TAG, "got accessory get protocol");
mHandler.setAccessoryUEventTime(SystemClock.elapsedRealtime());
resetAccessoryHandshakeTimeoutHandler();
@@ -279,6 +284,24 @@ public class UsbDeviceManager implements ActivityTaskManagerInternal.ScreenObser
mHandler.setStartAccessoryTrue();
startAccessoryMode();
}
+
+ if (mEnableUdcSysfsUsbStateUpdate) {
+ if (!mUdcName.isEmpty()
+ && "udc".equals(event.get("SUBSYSTEM"))
+ && event.get("DEVPATH").contains(mUdcName)) {
+ String action = event.get("ACTION");
+ if ("add".equals(action)) {
+ nativeStartGadgetMonitor(mUdcName);
+ } else if ("remove".equals(action)) {
+ nativeStopGadgetMonitor();
+ }
+ }
+ } else {
+ String state = event.get("USB_STATE");
+ if (state != null) {
+ mHandler.updateState(state);
+ }
+ }
}
}
@@ -406,9 +429,28 @@ public class UsbDeviceManager implements ActivityTaskManagerInternal.ScreenObser
// Watch for USB configuration changes
mUEventObserver = new UsbUEventObserver();
- mUEventObserver.startObserving(USB_STATE_MATCH);
mUEventObserver.startObserving(ACCESSORY_START_MATCH);
+ mEnableUdcSysfsUsbStateUpdate =
+ android.hardware.usb.flags.Flags.enableUdcSysfsUsbStateUpdate()
+ && context.getResources().getBoolean(R.bool.config_enableUdcSysfsUsbStateUpdate);
+
+ if (mEnableUdcSysfsUsbStateUpdate) {
+ mUEventObserver.startObserving(UDC_SUBSYS_MATCH);
+ new Thread("GetUsbControllerSysprop") {
+ public void run() {
+ String udcName;
+ // blocking wait until usb controller sysprop is available
+ udcName = nativeWaitAndGetProperty(USB_CONTROLLER_NAME_PROPERTY);
+ nativeStartGadgetMonitor(udcName);
+ mUdcName = udcName;
+ Slog.v(TAG, "USB controller name " + udcName);
+ }
+ }.start();
+ } else {
+ mUEventObserver.startObserving(USB_STATE_MATCH);
+ }
+
sEventLogger = new EventLogger(DUMPSYS_LOG_BUFFER, "UsbDeviceManager activity");
}
@@ -2609,11 +2651,27 @@ public class UsbDeviceManager implements ActivityTaskManagerInternal.ScreenObser
dump.end(token);
}
+ /**
+ * Update usb state (Called by native code).
+ */
+ @Keep
+ private void updateGadgetState(String state) {
+ Slog.d(TAG, "Usb state update " + state);
+
+ mHandler.updateState(state);
+ }
+
private native String[] nativeGetAccessoryStrings();
private native ParcelFileDescriptor nativeOpenAccessory();
+ private native String nativeWaitAndGetProperty(String propName);
+
private native FileDescriptor nativeOpenControl(String usbFunction);
private native boolean nativeIsStartRequested();
+
+ private native boolean nativeStartGadgetMonitor(String udcName);
+
+ private native void nativeStopGadgetMonitor();
}
diff --git a/telecomm/java/android/telecom/CallAudioState.java b/telecomm/java/android/telecom/CallAudioState.java
index 49e9232ad535..14c9ea51c618 100644
--- a/telecomm/java/android/telecom/CallAudioState.java
+++ b/telecomm/java/android/telecom/CallAudioState.java
@@ -159,7 +159,7 @@ public final class CallAudioState implements Parcelable {
@Override
public String toString() {
String bluetoothDeviceList = supportedBluetoothDevices.stream()
- .map(BluetoothDevice::getAddress).collect(Collectors.joining(", "));
+ .map(BluetoothDevice::toString).collect(Collectors.joining(", "));
return String.format(Locale.US,
"[AudioState isMuted: %b, route: %s, supportedRouteMask: %s, " +
diff --git a/telephony/OWNERS b/telephony/OWNERS
index 7607c64150d8..92af034217a9 100644
--- a/telephony/OWNERS
+++ b/telephony/OWNERS
@@ -15,4 +15,4 @@ per-file CarrierConfigManager.java=set noparent
per-file CarrierConfigManager.java=amruthr@google.com,tgunn@google.com,rgreenwalt@google.com,satk@google.com
#Domain Selection is jointly owned, add additional owners for domain selection specific files
-per-file TransportSelectorCallback.java,WwanSelectorCallback.java,DomainSelectionService.java,DomainSelectionService.aidl,DomainSelector.java,EmergencyRegResult.java,EmergencyRegResult.aidl,IDomainSelectionServiceController.aidl,IDomainSelector.aidl,ITransportSelectorCallback.aidl,ITransportSelectorResultCallback.aidl,IWwanSelectorCallback.aidl,IWwanSelectorResultCallback.aidl=hwangoo@google.com,forestchoi@google.com,avinashmp@google.com,mkoon@google.com,seheele@google.com,radhikaagrawal@google.com,jdyou@google.com
+per-file TransportSelectorCallback.java,WwanSelectorCallback.java,DomainSelectionService.java,DomainSelectionService.aidl,DomainSelector.java,EmergencyRegResult.java,EmergencyRegResult.aidl,IDomainSelectionServiceController.aidl,IDomainSelector.aidl,ITransportSelectorCallback.aidl,ITransportSelectorResultCallback.aidl,IWwanSelectorCallback.aidl,IWwanSelectorResultCallback.aidl=hwangoo@google.com,jaesikkong@google.com,avinashmp@google.com,mkoon@google.com,seheele@google.com,radhikaagrawal@google.com,jdyou@google.com
diff --git a/telephony/common/android/telephony/LocationAccessPolicy.java b/telephony/common/android/telephony/LocationAccessPolicy.java
index d4b6c91eb7a0..feea55bff125 100644
--- a/telephony/common/android/telephony/LocationAccessPolicy.java
+++ b/telephony/common/android/telephony/LocationAccessPolicy.java
@@ -32,6 +32,8 @@ import android.os.UserHandle;
import android.util.Log;
import android.widget.Toast;
+import com.android.internal.telephony.TelephonyPermissions;
+import com.android.internal.telephony.flags.Flags;
import com.android.internal.telephony.util.TelephonyUtils;
/**
@@ -310,10 +312,18 @@ public final class LocationAccessPolicy {
// This avoid breaking legacy code that rely on public-facing APIs to access cell location,
// and it doesn't create an info leak risk because the cell location is stored in the phone
// process anyway, and the system server already has location access.
- if (query.callingUid == Process.PHONE_UID || query.callingUid == Process.SYSTEM_UID
- || query.callingUid == Process.NETWORK_STACK_UID
- || query.callingUid == Process.ROOT_UID) {
- return LocationPermissionResult.ALLOWED;
+ if (Flags.supportPhoneUidCheckForMultiuser()) {
+ if (TelephonyPermissions.isSystemOrPhone(query.callingUid)
+ || UserHandle.isSameApp(query.callingUid, Process.NETWORK_STACK_UID)
+ || UserHandle.isSameApp(query.callingUid, Process.ROOT_UID)) {
+ return LocationPermissionResult.ALLOWED;
+ }
+ } else {
+ if (query.callingUid == Process.PHONE_UID || query.callingUid == Process.SYSTEM_UID
+ || query.callingUid == Process.NETWORK_STACK_UID
+ || query.callingUid == Process.ROOT_UID) {
+ return LocationPermissionResult.ALLOWED;
+ }
}
// Check the system-wide requirements. If the location main switch is off and the caller is
diff --git a/telephony/java/android/telephony/satellite/ProvisionSubscriberId.java b/telephony/java/android/telephony/satellite/ProvisionSubscriberId.java
index 796c82dd4af7..3e6f743e8a93 100644
--- a/telephony/java/android/telephony/satellite/ProvisionSubscriberId.java
+++ b/telephony/java/android/telephony/satellite/ProvisionSubscriberId.java
@@ -43,12 +43,17 @@ public final class ProvisionSubscriberId implements Parcelable {
/** carrier id */
private int mCarrierId;
+ /** apn */
+ private String mNiddApn;
+
/**
* @hide
*/
- public ProvisionSubscriberId(@NonNull String subscriberId, @NonNull int carrierId) {
+ public ProvisionSubscriberId(@NonNull String subscriberId, @NonNull int carrierId,
+ @NonNull String niddApn) {
this.mCarrierId = carrierId;
this.mSubscriberId = subscriberId;
+ this.mNiddApn = niddApn;
}
private ProvisionSubscriberId(Parcel in) {
@@ -63,6 +68,7 @@ public final class ProvisionSubscriberId implements Parcelable {
public void writeToParcel(@NonNull Parcel out, int flags) {
out.writeString(mSubscriberId);
out.writeInt(mCarrierId);
+ out.writeString(mNiddApn);
}
@FlaggedApi(Flags.FLAG_CARRIER_ROAMING_NB_IOT_NTN)
@@ -89,7 +95,7 @@ public final class ProvisionSubscriberId implements Parcelable {
}
/**
- * @return token.
+ * @return provision subscriberId.
* @hide
*/
@FlaggedApi(Flags.FLAG_CARRIER_ROAMING_NB_IOT_NTN)
@@ -106,6 +112,15 @@ public final class ProvisionSubscriberId implements Parcelable {
return mCarrierId;
}
+ /**
+ * @return niddApn.
+ * @hide
+ */
+ @FlaggedApi(Flags.FLAG_CARRIER_ROAMING_NB_IOT_NTN)
+ public String getNiddApn() {
+ return mNiddApn;
+ }
+
@NonNull
@Override
public String toString() {
@@ -117,12 +132,16 @@ public final class ProvisionSubscriberId implements Parcelable {
sb.append("CarrierId:");
sb.append(mCarrierId);
+ sb.append(",");
+
+ sb.append("NiddApn:");
+ sb.append(mNiddApn);
return sb.toString();
}
@Override
public int hashCode() {
- return Objects.hash(mSubscriberId, mCarrierId);
+ return Objects.hash(mSubscriberId, mCarrierId, mNiddApn);
}
@Override
@@ -131,11 +150,12 @@ public final class ProvisionSubscriberId implements Parcelable {
if (o == null || getClass() != o.getClass()) return false;
ProvisionSubscriberId that = (ProvisionSubscriberId) o;
return mSubscriberId.equals(that.mSubscriberId) && mCarrierId
- == that.mCarrierId;
+ == that.mCarrierId && mNiddApn.equals(that.mNiddApn);
}
private void readFromParcel(Parcel in) {
mSubscriberId = in.readString();
mCarrierId = in.readInt();
+ mNiddApn = in.readString();
}
}
diff --git a/telephony/java/android/telephony/satellite/SatelliteManager.java b/telephony/java/android/telephony/satellite/SatelliteManager.java
index b518c60d09fd..4b83b65e435a 100644
--- a/telephony/java/android/telephony/satellite/SatelliteManager.java
+++ b/telephony/java/android/telephony/satellite/SatelliteManager.java
@@ -50,7 +50,6 @@ import java.lang.annotation.RetentionPolicy;
import java.time.Duration;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Objects;
@@ -1079,6 +1078,11 @@ public final class SatelliteManager {
* @hide
*/
public static final int DATAGRAM_TYPE_LAST_SOS_MESSAGE_NO_HELP_NEEDED = 5;
+ /**
+ * Datagram type indicating that the message to be sent or received is of type SMS.
+ * @hide
+ */
+ public static final int DATAGRAM_TYPE_SMS = 6;
/** @hide */
@IntDef(prefix = "DATAGRAM_TYPE_", value = {
@@ -1087,7 +1091,8 @@ public final class SatelliteManager {
DATAGRAM_TYPE_LOCATION_SHARING,
DATAGRAM_TYPE_KEEP_ALIVE,
DATAGRAM_TYPE_LAST_SOS_MESSAGE_STILL_NEED_HELP,
- DATAGRAM_TYPE_LAST_SOS_MESSAGE_NO_HELP_NEEDED
+ DATAGRAM_TYPE_LAST_SOS_MESSAGE_NO_HELP_NEEDED,
+ DATAGRAM_TYPE_SMS
})
@Retention(RetentionPolicy.SOURCE)
public @interface DatagramType {}
@@ -2636,9 +2641,9 @@ public final class SatelliteManager {
if (resultCode == SATELLITE_RESULT_SUCCESS) {
if (resultData.containsKey(KEY_REQUEST_PROVISION_SUBSCRIBER_ID_TOKEN)) {
List<ProvisionSubscriberId> list =
- Collections.singletonList(resultData.getParcelable(
+ resultData.getParcelableArrayList(
KEY_REQUEST_PROVISION_SUBSCRIBER_ID_TOKEN,
- ProvisionSubscriberId.class));
+ ProvisionSubscriberId.class);
executor.execute(() -> Binder.withCleanCallingIdentity(() ->
callback.onResult(list)));
} else {
@@ -2692,13 +2697,13 @@ public final class SatelliteManager {
@Override
protected void onReceiveResult(int resultCode, Bundle resultData) {
if (resultCode == SATELLITE_RESULT_SUCCESS) {
- if (resultData.containsKey(KEY_SATELLITE_PROVISIONED)) {
+ if (resultData.containsKey(KEY_IS_SATELLITE_PROVISIONED)) {
boolean isIsProvisioned =
- resultData.getBoolean(KEY_SATELLITE_PROVISIONED);
+ resultData.getBoolean(KEY_IS_SATELLITE_PROVISIONED);
executor.execute(() -> Binder.withCleanCallingIdentity(() ->
callback.onResult(isIsProvisioned)));
} else {
- loge("KEY_REQUEST_PROVISION_TOKENS does not exist.");
+ loge("KEY_IS_SATELLITE_PROVISIONED does not exist.");
executor.execute(() -> Binder.withCleanCallingIdentity(() ->
callback.onError(new SatelliteException(
SATELLITE_RESULT_REQUEST_FAILED))));
diff --git a/telephony/java/android/telephony/satellite/stub/ProvisionSubscriberId.aidl b/telephony/java/android/telephony/satellite/stub/ProvisionSubscriberId.aidl
index 2dc8ffba6e96..460de8c8113d 100644
--- a/telephony/java/android/telephony/satellite/stub/ProvisionSubscriberId.aidl
+++ b/telephony/java/android/telephony/satellite/stub/ProvisionSubscriberId.aidl
@@ -25,4 +25,7 @@ parcelable ProvisionSubscriberId {
/** carrier id */
int mCarrierId;
+
+ /** apn */
+ String mNiddApn;
}
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index 7be52ea62758..3dbda7ae10a3 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -3411,7 +3411,7 @@ interface ITelephony {
*/
@JavaPassthrough(annotation="@android.annotation.RequiresPermission("
+ "android.Manifest.permission.SATELLITE_COMMUNICATION)")
- void requestProvisionSubscriberIds(in ResultReceiver receiver);
+ void requestProvisionSubscriberIds(in ResultReceiver result);
/**
* Request to get provisioned status for given a satellite subscriber id.
diff --git a/tests/BatteryStatsPerfTest/src/com/android/internal/os/BatteryUsageStatsPerfTest.java b/tests/BatteryStatsPerfTest/src/com/android/internal/os/BatteryUsageStatsPerfTest.java
index 08430f2f2744..4143f595f9a0 100644
--- a/tests/BatteryStatsPerfTest/src/com/android/internal/os/BatteryUsageStatsPerfTest.java
+++ b/tests/BatteryStatsPerfTest/src/com/android/internal/os/BatteryUsageStatsPerfTest.java
@@ -159,7 +159,7 @@ public class BatteryUsageStatsPerfTest {
private static BatteryUsageStats buildBatteryUsageStats() {
final BatteryUsageStats.Builder builder =
- new BatteryUsageStats.Builder(new String[]{"FOO"}, true, false, 0)
+ new BatteryUsageStats.Builder(new String[]{"FOO"}, true, false, false, false, 0)
.setBatteryCapacity(4000)
.setDischargePercentage(20)
.setDischargedPowerRange(1000, 2000)
diff --git a/tests/FlickerTests/IME/Android.bp b/tests/FlickerTests/IME/Android.bp
index ccc3683f0b93..78d93e1cb32a 100644
--- a/tests/FlickerTests/IME/Android.bp
+++ b/tests/FlickerTests/IME/Android.bp
@@ -34,6 +34,11 @@ filegroup {
srcs: ["src/**/Close*"],
}
+filegroup {
+ name: "FlickerTestsIme2-src",
+ srcs: ["src/**/ShowImeOnAppStart*"],
+}
+
android_test {
name: "FlickerTestsIme",
defaults: ["FlickerTestsDefault"],
@@ -77,9 +82,23 @@ android_test {
defaults: ["FlickerTestsDefault"],
manifest: "AndroidManifest.xml",
test_config_template: "AndroidTestTemplate.xml",
+ srcs: [":FlickerTestsIme2-src"],
+ static_libs: [
+ "FlickerTestsBase",
+ "FlickerTestsImeCommon",
+ ],
+ data: ["trace_config/*"],
+}
+
+android_test {
+ name: "FlickerTestsIme3",
+ defaults: ["FlickerTestsDefault"],
+ manifest: "AndroidManifest.xml",
+ test_config_template: "AndroidTestTemplate.xml",
srcs: ["src/**/*"],
exclude_srcs: [
":FlickerTestsIme1-src",
+ ":FlickerTestsIme2-src",
":FlickerTestsImeCommon-src",
],
static_libs: [
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 9a5e88becf1e..8811e00f9661 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
@@ -17,6 +17,7 @@
package com.android.server.wm.flicker.helpers
import android.graphics.Rect
+import android.platform.uiautomator_helpers.DeviceHelpers
import android.tools.device.apphelpers.IStandardAppHelper
import android.tools.helpers.SYSTEMUI_PACKAGE
import android.tools.traces.parsers.WindowManagerStateHelper
@@ -26,6 +27,7 @@ import androidx.test.uiautomator.BySelector
import androidx.test.uiautomator.UiDevice
import androidx.test.uiautomator.UiObject2
import androidx.test.uiautomator.Until
+import java.time.Duration
/**
* Wrapper class around App helper classes. This class adds functionality to the apps that the
@@ -41,16 +43,6 @@ open class DesktopModeAppHelper(private val innerHelper: IStandardAppHelper) :
RIGHT_BOTTOM
}
- private val TIMEOUT_MS = 3_000L
- private val CAPTION = "desktop_mode_caption"
- private val CAPTION_HANDLE = "caption_handle"
- private val MAXIMIZE_BUTTON = "maximize_window"
- private val MAXIMIZE_BUTTON_VIEW = "maximize_button_view"
- private val CLOSE_BUTTON = "close_window"
-
- private val caption: BySelector
- get() = By.res(SYSTEMUI_PACKAGE, CAPTION)
-
/** Wait for an app moved to desktop to finish its transition. */
private fun waitForAppToMoveToDesktop(wmHelper: WindowManagerStateHelper) {
wmHelper
@@ -119,11 +111,11 @@ open class DesktopModeAppHelper(private val innerHelper: IStandardAppHelper) :
): UiObject2? {
if (
wmHelper.getWindow(innerHelper)?.windowingMode !=
- WindowingMode.WINDOWING_MODE_FREEFORM.value
+ WindowingMode.WINDOWING_MODE_FREEFORM.value
)
error("expected a freeform window with caption but window is not in freeform mode")
val captions =
- device.wait(Until.findObjects(caption), TIMEOUT_MS)
+ device.wait(Until.findObjects(caption), TIMEOUT.toMillis())
?: error("Unable to find view $caption\n")
return captions.find {
@@ -147,7 +139,17 @@ open class DesktopModeAppHelper(private val innerHelper: IStandardAppHelper) :
val endX = startX + horizontalChange
// drag the specified corner of the window to the end coordinate.
- device.drag(startX, startY, endX, endY, 100)
+ dragWindow(startX, startY, endX, endY, wmHelper, device)
+ }
+
+ /** Drag a window from a source coordinate to a destination coordinate. */
+ fun dragWindow(
+ startX: Int, startY: Int,
+ endX: Int, endY: Int,
+ wmHelper: WindowManagerStateHelper,
+ device: UiDevice
+ ) {
+ device.drag(startX, startY, endX, endY, /* steps= */ 100)
wmHelper
.StateSyncBuilder()
.withAppTransitionIdle()
@@ -165,4 +167,75 @@ open class DesktopModeAppHelper(private val innerHelper: IStandardAppHelper) :
Corners.RIGHT_BOTTOM -> Pair(windowRect.right, windowRect.bottom)
}
}
+
+ /** Exit desktop mode by dragging the app handle to the top drag zone. */
+ fun exitDesktopWithDragToTopDragZone(
+ wmHelper: WindowManagerStateHelper,
+ device: UiDevice,
+ ) {
+ dragAppWindowToTopDragZone(wmHelper, device)
+ waitForTransitionToFullscreen(wmHelper)
+ }
+
+ private fun dragAppWindowToTopDragZone(wmHelper: WindowManagerStateHelper, device: UiDevice) {
+ val windowRect = wmHelper.getWindowRegion(innerHelper).bounds
+ val displayRect =
+ wmHelper.currentState.wmState.getDefaultDisplay()?.displayRect
+ ?: throw IllegalStateException("Default display is null")
+
+ val startX = windowRect.centerX()
+ val endX = displayRect.centerX()
+ val startY = windowRect.top
+ val endY = 0 // top of the screen
+
+ // drag the app window to top drag zone
+ device.drag(startX, startY, endX, endY, 100)
+ }
+
+ fun enterDesktopModeFromAppHandleMenu(
+ wmHelper: WindowManagerStateHelper,
+ device: UiDevice) {
+ val windowRect = wmHelper.getWindowRegion(innerHelper).bounds
+ val startX = windowRect.centerX()
+ // Click a little under the top to prevent opening the notification shade.
+ val startY = 10
+
+ // Click on the app handle coordinates.
+ device.click(startX, startY)
+ wmHelper.StateSyncBuilder().withAppTransitionIdle().waitForAndVerify()
+
+ val pill = getAppHandlePillForWindow()
+ val desktopModeButton =
+ pill
+ ?.children
+ ?.find { it.resourceName.endsWith(DESKTOP_MODE_BUTTON) }
+
+ desktopModeButton?.click()
+ wmHelper.StateSyncBuilder().withAppTransitionIdle().waitForAndVerify()
+ }
+
+ private fun getAppHandlePillForWindow(): UiObject2? {
+ val pillContainer: BySelector = By.res(SYSTEMUI_PACKAGE, PILL_CONTAINER)
+ return DeviceHelpers.waitForObj(pillContainer, TIMEOUT)
+ }
+
+ /** Wait for transition to full screen to finish. */
+ private fun waitForTransitionToFullscreen(wmHelper: WindowManagerStateHelper) {
+ wmHelper
+ .StateSyncBuilder()
+ .withFullScreenApp(innerHelper)
+ .withAppTransitionIdle()
+ .waitForAndVerify()
+ }
+
+ private companion object {
+ val TIMEOUT = Duration.ofSeconds(3)
+ val CAPTION = "desktop_mode_caption"
+ val MAXIMIZE_BUTTON_VIEW = "maximize_button_view"
+ val CLOSE_BUTTON = "close_window"
+ val PILL_CONTAINER = "windowing_pill"
+ val DESKTOP_MODE_BUTTON = "desktop_button"
+ val caption: BySelector
+ get() = By.res(SYSTEMUI_PACKAGE, CAPTION)
+ }
}
diff --git a/tests/Input/Android.bp b/tests/Input/Android.bp
index f367c38b06e9..06c2651b604d 100644
--- a/tests/Input/Android.bp
+++ b/tests/Input/Android.bp
@@ -48,6 +48,7 @@ android_test {
"testables",
"testng",
"truth",
+ "ui-trace-collector",
],
libs: [
"android.test.mock",
diff --git a/tests/Input/AndroidTest.xml b/tests/Input/AndroidTest.xml
index 8db37058af2b..bc9322fbd3dc 100644
--- a/tests/Input/AndroidTest.xml
+++ b/tests/Input/AndroidTest.xml
@@ -22,6 +22,10 @@
<option name="shell-timeout" value="660s" />
<option name="test-timeout" value="600s" />
<option name="runner" value="androidx.test.runner.AndroidJUnitRunner" />
+ <option name="device-listeners" value="android.tools.collectors.DefaultUITraceListener"/>
+ <!-- DefaultUITraceListener args -->
+ <option name="instrumentation-arg" key="skip_test_success_metrics" value="true"/>
+ <option name="instrumentation-arg" key="per_class" value="true"/>
</test>
<object class="com.android.tradefed.testtype.suite.module.TestFailureModuleController"
type="module_controller">
@@ -31,7 +35,9 @@
<metrics_collector class="com.android.tradefed.device.metric.FilePullerLogCollector">
<option name="pull-pattern-keys" value="input_.*" />
<!-- Pull files created by tests, like the output of screenshot tests -->
- <option name="directory-keys" value="/storage/emulated/0/InputTests" />
+ <option name="directory-keys" value="/sdcard/Download/InputTests" />
+ <!-- Pull perfetto traces from DefaultUITraceListener -->
+ <option name="pull-pattern-keys" value="perfetto_file_path*" />
<option name="collect-on-run-ended-only" value="false" />
</metrics_collector>
</configuration>
diff --git a/tests/Input/src/com/android/test/input/PointerIconLoadingTest.kt b/tests/Input/src/com/android/test/input/PointerIconLoadingTest.kt
index e0f8c6d6ff4a..abfe549f3d22 100644
--- a/tests/Input/src/com/android/test/input/PointerIconLoadingTest.kt
+++ b/tests/Input/src/com/android/test/input/PointerIconLoadingTest.kt
@@ -19,7 +19,6 @@ package com.android.test.input
import android.content.Context
import android.content.res.Configuration
import android.content.res.Resources
-import android.os.Environment
import android.view.ContextThemeWrapper
import android.view.PointerIcon
import android.view.flags.Flags.enableVectorCursorA11ySettings
@@ -137,11 +136,20 @@ class PointerIconLoadingTest {
assumeTrue(enableVectorCursors())
assumeTrue(enableVectorCursorA11ySettings())
+ val theme: Resources.Theme = context.getResources().newTheme()
+ theme.setTo(context.getTheme())
+ theme.applyStyle(
+ PointerIcon.vectorFillStyleToResource(PointerIcon.POINTER_ICON_VECTOR_STYLE_FILL_BLACK),
+ /* force= */ true)
+ theme.applyStyle(
+ PointerIcon.vectorStrokeStyleToResource(
+ PointerIcon.POINTER_ICON_VECTOR_STYLE_STROKE_WHITE),
+ /* force= */ true)
val pointerScale = 2f
val pointerIcon =
PointerIcon.getLoadedSystemIcon(
- context,
+ ContextThemeWrapper(context, theme),
PointerIcon.TYPE_ARROW,
/* useLargeIcons= */ false,
pointerScale)
@@ -158,8 +166,7 @@ class PointerIconLoadingTest {
const val SCREEN_WIDTH_DP = 480
const val SCREEN_HEIGHT_DP = 800
const val ASSETS_PATH = "tests/input/assets"
- val TEST_OUTPUT_PATH = Environment.getExternalStorageDirectory().absolutePath +
- "/InputTests/" +
- PointerIconLoadingTest::class.java.simpleName
+ val TEST_OUTPUT_PATH =
+ "/sdcard/Download/InputTests/" + PointerIconLoadingTest::class.java.simpleName
}
}
diff --git a/tests/InputMethodStressTest/src/com/android/inputmethod/stresstest/AutoShowTest.java b/tests/InputMethodStressTest/src/com/android/inputmethod/stresstest/AutoShowTest.java
index e60d8efdbfa4..a2c3572eca9b 100644
--- a/tests/InputMethodStressTest/src/com/android/inputmethod/stresstest/AutoShowTest.java
+++ b/tests/InputMethodStressTest/src/com/android/inputmethod/stresstest/AutoShowTest.java
@@ -37,14 +37,14 @@ import android.content.res.Configuration;
import android.os.SystemClock;
import android.platform.test.annotations.RootPermissionTest;
import android.platform.test.rule.UnlockScreenRule;
-import android.support.test.uiautomator.By;
-import android.support.test.uiautomator.UiDevice;
-import android.support.test.uiautomator.UiObject2;
-import android.support.test.uiautomator.Until;
import android.view.WindowManager;
import android.widget.EditText;
import androidx.test.platform.app.InstrumentationRegistry;
+import androidx.test.uiautomator.By;
+import androidx.test.uiautomator.UiDevice;
+import androidx.test.uiautomator.UiObject2;
+import androidx.test.uiautomator.Until;
import org.junit.Rule;
import org.junit.Test;
diff --git a/tests/InputMethodStressTest/src/com/android/inputmethod/stresstest/DefaultImeVisibilityTest.java b/tests/InputMethodStressTest/src/com/android/inputmethod/stresstest/DefaultImeVisibilityTest.java
index 2ac25f2696d3..b994bfb00007 100644
--- a/tests/InputMethodStressTest/src/com/android/inputmethod/stresstest/DefaultImeVisibilityTest.java
+++ b/tests/InputMethodStressTest/src/com/android/inputmethod/stresstest/DefaultImeVisibilityTest.java
@@ -33,10 +33,10 @@ import static com.google.common.truth.Truth.assertWithMessage;
import android.content.Intent;
import android.platform.test.annotations.RootPermissionTest;
import android.platform.test.rule.UnlockScreenRule;
-import android.support.test.uiautomator.UiDevice;
import android.widget.EditText;
import androidx.test.platform.app.InstrumentationRegistry;
+import androidx.test.uiautomator.UiDevice;
import org.junit.Rule;
import org.junit.Test;
diff --git a/tests/InputMethodStressTest/src/com/android/inputmethod/stresstest/ImeOpenCloseStressTest.java b/tests/InputMethodStressTest/src/com/android/inputmethod/stresstest/ImeOpenCloseStressTest.java
index 5368025ff898..2128cbf90542 100644
--- a/tests/InputMethodStressTest/src/com/android/inputmethod/stresstest/ImeOpenCloseStressTest.java
+++ b/tests/InputMethodStressTest/src/com/android/inputmethod/stresstest/ImeOpenCloseStressTest.java
@@ -48,12 +48,12 @@ import android.os.Build;
import android.os.SystemClock;
import android.platform.test.annotations.RootPermissionTest;
import android.platform.test.rule.UnlockScreenRule;
-import android.support.test.uiautomator.UiDevice;
import android.util.Log;
import android.view.WindowManager;
import android.widget.EditText;
import androidx.test.platform.app.InstrumentationRegistry;
+import androidx.test.uiautomator.UiDevice;
import org.junit.Rule;
import org.junit.Test;
diff --git a/tests/InputMethodStressTest/src/com/android/inputmethod/stresstest/ImeStressTestRule.java b/tests/InputMethodStressTest/src/com/android/inputmethod/stresstest/ImeStressTestRule.java
index c7463218b646..1249a4564e8e 100644
--- a/tests/InputMethodStressTest/src/com/android/inputmethod/stresstest/ImeStressTestRule.java
+++ b/tests/InputMethodStressTest/src/com/android/inputmethod/stresstest/ImeStressTestRule.java
@@ -18,10 +18,10 @@ package com.android.inputmethod.stresstest;
import android.app.Instrumentation;
import android.os.RemoteException;
-import android.support.test.uiautomator.UiDevice;
import androidx.annotation.NonNull;
import androidx.test.platform.app.InstrumentationRegistry;
+import androidx.test.uiautomator.UiDevice;
import org.junit.rules.TestWatcher;
import org.junit.runner.Description;
diff --git a/tests/Internal/src/com/android/internal/protolog/LegacyProtoLogImplTest.java b/tests/Internal/src/com/android/internal/protolog/LegacyProtoLogImplTest.java
index 5a27593c7a36..5a48327e7576 100644
--- a/tests/Internal/src/com/android/internal/protolog/LegacyProtoLogImplTest.java
+++ b/tests/Internal/src/com/android/internal/protolog/LegacyProtoLogImplTest.java
@@ -59,7 +59,6 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.LinkedList;
-import java.util.TreeMap;
/**
* Test class for {@link ProtoLogImpl}.
@@ -90,7 +89,7 @@ public class LegacyProtoLogImplTest {
//noinspection ResultOfMethodCallIgnored
mFile.delete();
mProtoLog = new LegacyProtoLogImpl(mFile, mViewerConfigFilename,
- 1024 * 1024, mReader, 1024, new TreeMap<>(), () -> {});
+ 1024 * 1024, mReader, 1024, () -> {});
}
@After
@@ -142,7 +141,7 @@ public class LegacyProtoLogImplTest {
TestProtoLogGroup.TEST_GROUP.setLogToProto(false);
implSpy.log(
- LogLevel.INFO, TestProtoLogGroup.TEST_GROUP, 1234, 4321, null,
+ LogLevel.INFO, TestProtoLogGroup.TEST_GROUP, 1234, 4321,
new Object[]{true, 10000, 30000, "test", 0.000003});
verify(implSpy).passToLogcat(eq(TestProtoLogGroup.TEST_GROUP.getTag()), eq(
@@ -159,7 +158,7 @@ public class LegacyProtoLogImplTest {
TestProtoLogGroup.TEST_GROUP.setLogToProto(false);
implSpy.log(
- LogLevel.INFO, TestProtoLogGroup.TEST_GROUP, 1234, 4321, null,
+ LogLevel.INFO, TestProtoLogGroup.TEST_GROUP, 1234, 4321,
new Object[]{true, 10000, 0.0001, 0.00002, "test"});
verify(implSpy).passToLogcat(eq(TestProtoLogGroup.TEST_GROUP.getTag()), eq(
@@ -176,7 +175,7 @@ public class LegacyProtoLogImplTest {
TestProtoLogGroup.TEST_GROUP.setLogToProto(false);
implSpy.log(
- LogLevel.INFO, TestProtoLogGroup.TEST_GROUP, 1234, 4321, "test %d",
+ LogLevel.INFO, TestProtoLogGroup.TEST_GROUP, 1234, 4321,
new Object[]{5});
verify(implSpy).passToLogcat(eq(TestProtoLogGroup.TEST_GROUP.getTag()), eq(
@@ -192,7 +191,7 @@ public class LegacyProtoLogImplTest {
TestProtoLogGroup.TEST_GROUP.setLogToProto(false);
implSpy.log(
- LogLevel.INFO, TestProtoLogGroup.TEST_GROUP, 1234, 4321, null,
+ LogLevel.INFO, TestProtoLogGroup.TEST_GROUP, 1234, 4321,
new Object[]{5});
verify(implSpy).passToLogcat(eq(TestProtoLogGroup.TEST_GROUP.getTag()), eq(
@@ -208,7 +207,7 @@ public class LegacyProtoLogImplTest {
TestProtoLogGroup.TEST_GROUP.setLogToProto(false);
implSpy.log(
- LogLevel.INFO, TestProtoLogGroup.TEST_GROUP, 1234, 4321, "test %d",
+ LogLevel.INFO, TestProtoLogGroup.TEST_GROUP, 1234, 4321,
new Object[]{5});
verify(implSpy, never()).passToLogcat(any(), any(), any());
@@ -277,7 +276,7 @@ public class LegacyProtoLogImplTest {
long before = SystemClock.elapsedRealtimeNanos();
mProtoLog.log(
LogLevel.INFO, TestProtoLogGroup.TEST_GROUP, 1234,
- 0b1110101001010100, null,
+ 0b1110101001010100,
new Object[]{"test", 1, 2, 3, 0.4, 0.5, 0.6, true});
long after = SystemClock.elapsedRealtimeNanos();
mProtoLog.stopProtoLog(mock(PrintWriter.class), true);
@@ -302,7 +301,7 @@ public class LegacyProtoLogImplTest {
long before = SystemClock.elapsedRealtimeNanos();
mProtoLog.log(
LogLevel.INFO, TestProtoLogGroup.TEST_GROUP, 1234,
- 0b01100100, null,
+ 0b01100100,
new Object[]{"test", 1, 0.1, true});
long after = SystemClock.elapsedRealtimeNanos();
mProtoLog.stopProtoLog(mock(PrintWriter.class), true);
@@ -326,7 +325,7 @@ public class LegacyProtoLogImplTest {
TestProtoLogGroup.TEST_GROUP.setLogToProto(false);
mProtoLog.startProtoLog(mock(PrintWriter.class));
mProtoLog.log(LogLevel.INFO, TestProtoLogGroup.TEST_GROUP, 1234,
- 0b11, null, new Object[]{true});
+ 0b11, new Object[]{true});
mProtoLog.stopProtoLog(mock(PrintWriter.class), true);
try (InputStream is = new FileInputStream(mFile)) {
ProtoInputStream ip = new ProtoInputStream(is);
diff --git a/tests/Internal/src/com/android/internal/protolog/LegacyProtoLogViewerConfigReaderTest.java b/tests/Internal/src/com/android/internal/protolog/LegacyProtoLogViewerConfigReaderTest.java
new file mode 100644
index 000000000000..253965337824
--- /dev/null
+++ b/tests/Internal/src/com/android/internal/protolog/LegacyProtoLogViewerConfigReaderTest.java
@@ -0,0 +1,114 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.protolog;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+import android.platform.test.annotations.Presubmit;
+
+import androidx.test.filters.SmallTest;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.util.zip.GZIPOutputStream;
+
+@SmallTest
+@Presubmit
+@RunWith(JUnit4.class)
+public class LegacyProtoLogViewerConfigReaderTest {
+ private static final String TEST_VIEWER_CONFIG = "{\n"
+ + " \"version\": \"1.0.0\",\n"
+ + " \"messages\": {\n"
+ + " \"70933285\": {\n"
+ + " \"message\": \"Test completed successfully: %b\",\n"
+ + " \"level\": \"ERROR\",\n"
+ + " \"group\": \"GENERIC_WM\"\n"
+ + " },\n"
+ + " \"1792430067\": {\n"
+ + " \"message\": \"Attempted to add window to a display that does not exist: %d."
+ + " Aborting.\",\n"
+ + " \"level\": \"WARN\",\n"
+ + " \"group\": \"GENERIC_WM\"\n"
+ + " },\n"
+ + " \"1352021864\": {\n"
+ + " \"message\": \"Test 2\",\n"
+ + " \"level\": \"WARN\",\n"
+ + " \"group\": \"GENERIC_WM\"\n"
+ + " },\n"
+ + " \"409412266\": {\n"
+ + " \"message\": \"Window %s is already added\",\n"
+ + " \"level\": \"WARN\",\n"
+ + " \"group\": \"GENERIC_WM\"\n"
+ + " }\n"
+ + " },\n"
+ + " \"groups\": {\n"
+ + " \"GENERIC_WM\": {\n"
+ + " \"tag\": \"WindowManager\"\n"
+ + " }\n"
+ + " }\n"
+ + "}\n";
+
+
+ private LegacyProtoLogViewerConfigReader
+ mConfig = new LegacyProtoLogViewerConfigReader();
+ private File mTestViewerConfig;
+
+ @Before
+ public void setUp() throws IOException {
+ mTestViewerConfig = File.createTempFile("testConfig", ".json.gz");
+ OutputStreamWriter writer = new OutputStreamWriter(
+ new GZIPOutputStream(new FileOutputStream(mTestViewerConfig)));
+ writer.write(TEST_VIEWER_CONFIG);
+ writer.close();
+ }
+
+ @After
+ public void tearDown() {
+ //noinspection ResultOfMethodCallIgnored
+ mTestViewerConfig.delete();
+ }
+
+ @Test
+ public void getViewerString_notLoaded() {
+ assertNull(mConfig.getViewerString(1));
+ }
+
+ @Test
+ public void loadViewerConfig() {
+ mConfig.loadViewerConfig(msg -> {}, mTestViewerConfig.getAbsolutePath());
+ assertEquals("Test completed successfully: %b", mConfig.getViewerString(70933285));
+ assertEquals("Test 2", mConfig.getViewerString(1352021864));
+ assertEquals("Window %s is already added", mConfig.getViewerString(409412266));
+ assertNull(mConfig.getViewerString(1));
+ }
+
+ @Test
+ public void loadViewerConfig_invalidFile() {
+ mConfig.loadViewerConfig(msg -> {}, "/tmp/unknown/file/does/not/exist");
+ // No exception is thrown.
+ assertNull(mConfig.getViewerString(1));
+ }
+}
diff --git a/tests/Internal/src/com/android/internal/protolog/PerfettoProtoLogImplTest.java b/tests/Internal/src/com/android/internal/protolog/PerfettoProtoLogImplTest.java
index 1d7b6b348e10..fad94d45c85d 100644
--- a/tests/Internal/src/com/android/internal/protolog/PerfettoProtoLogImplTest.java
+++ b/tests/Internal/src/com/android/internal/protolog/PerfettoProtoLogImplTest.java
@@ -60,6 +60,9 @@ import org.junit.runners.JUnit4;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
+import perfetto.protos.Protolog;
+import perfetto.protos.ProtologCommon;
+
import java.io.File;
import java.io.IOException;
import java.util.List;
@@ -67,9 +70,6 @@ import java.util.Random;
import java.util.TreeMap;
import java.util.concurrent.atomic.AtomicInteger;
-import perfetto.protos.Protolog;
-import perfetto.protos.ProtologCommon;
-
/**
* Test class for {@link ProtoLogImpl}.
*/
@@ -111,6 +111,9 @@ public class PerfettoProtoLogImplTest {
//noinspection ResultOfMethodCallIgnored
mFile.delete();
+ TestProtoLogGroup.TEST_GROUP.setLogToLogcat(false);
+ TestProtoLogGroup.TEST_GROUP.setLogToProto(false);
+
mViewerConfigBuilder = Protolog.ProtoLogViewerConfig.newBuilder()
.addGroups(
Protolog.ProtoLogViewerConfig.Group.newBuilder()
@@ -157,8 +160,9 @@ public class PerfettoProtoLogImplTest {
mCacheUpdater = () -> {};
mReader = Mockito.spy(new ProtoLogViewerConfigReader(viewerConfigInputStreamProvider));
mProtoLog = new PerfettoProtoLogImpl(
- viewerConfigInputStreamProvider, mReader, new TreeMap<>(),
+ viewerConfigInputStreamProvider, mReader,
() -> mCacheUpdater.run());
+ mProtoLog.registerGroups(TestProtoLogGroup.values());
}
@After
@@ -210,15 +214,15 @@ public class PerfettoProtoLogImplTest {
// Shouldn't be logging anything except WTF unless explicitly requested in the group
// override.
mProtoLog.log(LogLevel.DEBUG, TestProtoLogGroup.TEST_GROUP, 1,
- LogDataType.BOOLEAN, null, new Object[]{true});
+ LogDataType.BOOLEAN, new Object[]{true});
mProtoLog.log(LogLevel.VERBOSE, TestProtoLogGroup.TEST_GROUP, 2,
- LogDataType.BOOLEAN, null, new Object[]{true});
+ LogDataType.BOOLEAN, new Object[]{true});
mProtoLog.log(LogLevel.WARN, TestProtoLogGroup.TEST_GROUP, 3,
- LogDataType.BOOLEAN, null, new Object[]{true});
+ LogDataType.BOOLEAN, new Object[]{true});
mProtoLog.log(LogLevel.ERROR, TestProtoLogGroup.TEST_GROUP, 4,
- LogDataType.BOOLEAN, null, new Object[]{true});
+ LogDataType.BOOLEAN, new Object[]{true});
mProtoLog.log(LogLevel.WTF, TestProtoLogGroup.TEST_GROUP, 5,
- LogDataType.BOOLEAN, null, new Object[]{true});
+ LogDataType.BOOLEAN, new Object[]{true});
} finally {
traceMonitor.stop(mWriter);
}
@@ -240,15 +244,15 @@ public class PerfettoProtoLogImplTest {
try {
traceMonitor.start();
mProtoLog.log(LogLevel.DEBUG, TestProtoLogGroup.TEST_GROUP, 1,
- LogDataType.BOOLEAN, null, new Object[]{true});
+ LogDataType.BOOLEAN, new Object[]{true});
mProtoLog.log(LogLevel.VERBOSE, TestProtoLogGroup.TEST_GROUP, 2,
- LogDataType.BOOLEAN, null, new Object[]{true});
+ LogDataType.BOOLEAN, new Object[]{true});
mProtoLog.log(LogLevel.WARN, TestProtoLogGroup.TEST_GROUP, 3,
- LogDataType.BOOLEAN, null, new Object[]{true});
+ LogDataType.BOOLEAN, new Object[]{true});
mProtoLog.log(LogLevel.ERROR, TestProtoLogGroup.TEST_GROUP, 4,
- LogDataType.BOOLEAN, null, new Object[]{true});
+ LogDataType.BOOLEAN, new Object[]{true});
mProtoLog.log(LogLevel.WTF, TestProtoLogGroup.TEST_GROUP, 5,
- LogDataType.BOOLEAN, null, new Object[]{true});
+ LogDataType.BOOLEAN, new Object[]{true});
} finally {
traceMonitor.stop(mWriter);
}
@@ -274,15 +278,15 @@ public class PerfettoProtoLogImplTest {
try {
traceMonitor.start();
mProtoLog.log(LogLevel.DEBUG, TestProtoLogGroup.TEST_GROUP, 1,
- LogDataType.BOOLEAN, null, new Object[]{true});
+ LogDataType.BOOLEAN, new Object[]{true});
mProtoLog.log(LogLevel.VERBOSE, TestProtoLogGroup.TEST_GROUP, 2,
- LogDataType.BOOLEAN, null, new Object[]{true});
+ LogDataType.BOOLEAN, new Object[]{true});
mProtoLog.log(LogLevel.WARN, TestProtoLogGroup.TEST_GROUP, 3,
- LogDataType.BOOLEAN, null, new Object[]{true});
+ LogDataType.BOOLEAN, new Object[]{true});
mProtoLog.log(LogLevel.ERROR, TestProtoLogGroup.TEST_GROUP, 4,
- LogDataType.BOOLEAN, null, new Object[]{true});
+ LogDataType.BOOLEAN, new Object[]{true});
mProtoLog.log(LogLevel.WTF, TestProtoLogGroup.TEST_GROUP, 5,
- LogDataType.BOOLEAN, null, new Object[]{true});
+ LogDataType.BOOLEAN, new Object[]{true});
} finally {
traceMonitor.stop(mWriter);
}
@@ -304,15 +308,15 @@ public class PerfettoProtoLogImplTest {
try {
traceMonitor.start();
mProtoLog.log(LogLevel.DEBUG, TestProtoLogGroup.TEST_GROUP, 1,
- LogDataType.BOOLEAN, null, new Object[]{true});
+ LogDataType.BOOLEAN, new Object[]{true});
mProtoLog.log(LogLevel.VERBOSE, TestProtoLogGroup.TEST_GROUP, 2,
- LogDataType.BOOLEAN, null, new Object[]{true});
+ LogDataType.BOOLEAN, new Object[]{true});
mProtoLog.log(LogLevel.WARN, TestProtoLogGroup.TEST_GROUP, 3,
- LogDataType.BOOLEAN, null, new Object[]{true});
+ LogDataType.BOOLEAN, new Object[]{true});
mProtoLog.log(LogLevel.ERROR, TestProtoLogGroup.TEST_GROUP, 4,
- LogDataType.BOOLEAN, null, new Object[]{true});
+ LogDataType.BOOLEAN, new Object[]{true});
mProtoLog.log(LogLevel.WTF, TestProtoLogGroup.TEST_GROUP, 5,
- LogDataType.BOOLEAN, null, new Object[]{true});
+ LogDataType.BOOLEAN, new Object[]{true});
} finally {
traceMonitor.stop(mWriter);
}
@@ -329,14 +333,14 @@ public class PerfettoProtoLogImplTest {
}
@Test
- public void log_logcatEnabledExternalMessage() {
+ public void log_logcatEnabled() {
when(mReader.getViewerString(anyLong())).thenReturn("test %b %d %% 0x%x %s %f");
PerfettoProtoLogImpl implSpy = Mockito.spy(mProtoLog);
TestProtoLogGroup.TEST_GROUP.setLogToLogcat(true);
TestProtoLogGroup.TEST_GROUP.setLogToProto(false);
implSpy.log(
- LogLevel.INFO, TestProtoLogGroup.TEST_GROUP, 1234, 4321, null,
+ LogLevel.INFO, TestProtoLogGroup.TEST_GROUP, 1234, 4321,
new Object[]{true, 10000, 30000, "test", 0.000003});
verify(implSpy).passToLogcat(eq(TestProtoLogGroup.TEST_GROUP.getTag()), eq(
@@ -353,32 +357,17 @@ public class PerfettoProtoLogImplTest {
TestProtoLogGroup.TEST_GROUP.setLogToProto(false);
implSpy.log(
- LogLevel.INFO, TestProtoLogGroup.TEST_GROUP, 1234, 4321, null,
+ LogLevel.INFO, TestProtoLogGroup.TEST_GROUP, 1234, 4321,
new Object[]{true, 10000, 0.0001, 0.00002, "test"});
verify(implSpy).passToLogcat(eq(TestProtoLogGroup.TEST_GROUP.getTag()), eq(
LogLevel.INFO),
- eq("UNKNOWN MESSAGE (1234) true 10000 1.0E-4 2.0E-5 test"));
+ eq("FORMAT_ERROR \"test %b %d %% %x %s %f\", "
+ + "args=(true, 10000, 1.0E-4, 2.0E-5, test)"));
verify(mReader).getViewerString(eq(1234L));
}
@Test
- public void log_logcatEnabledInlineMessage() {
- when(mReader.getViewerString(anyLong())).thenReturn("test %d");
- PerfettoProtoLogImpl implSpy = Mockito.spy(mProtoLog);
- TestProtoLogGroup.TEST_GROUP.setLogToLogcat(true);
- TestProtoLogGroup.TEST_GROUP.setLogToProto(false);
-
- implSpy.log(
- LogLevel.INFO, TestProtoLogGroup.TEST_GROUP, 1234, 4321, "test %d",
- new Object[]{5});
-
- verify(implSpy).passToLogcat(eq(TestProtoLogGroup.TEST_GROUP.getTag()), eq(
- LogLevel.INFO), eq("test 5"));
- verify(mReader, never()).getViewerString(anyLong());
- }
-
- @Test
public void log_logcatEnabledNoMessage() {
when(mReader.getViewerString(anyLong())).thenReturn(null);
PerfettoProtoLogImpl implSpy = Mockito.spy(mProtoLog);
@@ -386,11 +375,11 @@ public class PerfettoProtoLogImplTest {
TestProtoLogGroup.TEST_GROUP.setLogToProto(false);
implSpy.log(
- LogLevel.INFO, TestProtoLogGroup.TEST_GROUP, 1234, 4321, null,
+ LogLevel.INFO, TestProtoLogGroup.TEST_GROUP, 1234, 4321,
new Object[]{5});
verify(implSpy).passToLogcat(eq(TestProtoLogGroup.TEST_GROUP.getTag()), eq(
- LogLevel.INFO), eq("UNKNOWN MESSAGE (1234) 5"));
+ LogLevel.INFO), eq("UNKNOWN MESSAGE#1234 (5)"));
verify(mReader).getViewerString(eq(1234L));
}
@@ -401,7 +390,7 @@ public class PerfettoProtoLogImplTest {
TestProtoLogGroup.TEST_GROUP.setLogToLogcat(false);
implSpy.log(
- LogLevel.INFO, TestProtoLogGroup.TEST_GROUP, 1234, 4321, "test %d",
+ LogLevel.INFO, TestProtoLogGroup.TEST_GROUP, 1234, 4321,
new Object[]{5});
verify(implSpy, never()).passToLogcat(any(), any(), any());
@@ -425,7 +414,7 @@ public class PerfettoProtoLogImplTest {
before = SystemClock.elapsedRealtimeNanos();
mProtoLog.log(
LogLevel.INFO, TestProtoLogGroup.TEST_GROUP, messageHash,
- 0b1110101001010100, null,
+ 0b1110101001010100,
new Object[]{"test", 1, 2, 3, 0.4, 0.5, 0.6, true});
after = SystemClock.elapsedRealtimeNanos();
} finally {
@@ -444,6 +433,38 @@ public class PerfettoProtoLogImplTest {
.isEqualTo("My test message :: test, 2, 4, 6, 0.400000, 5.000000e-01, 0.6, true");
}
+ @Test
+ public void log_noProcessing() throws IOException {
+ PerfettoTraceMonitor traceMonitor =
+ PerfettoTraceMonitor.newBuilder().enableProtoLog().build();
+ long before;
+ long after;
+ try {
+ traceMonitor.start();
+ assertTrue(mProtoLog.isProtoEnabled());
+
+ before = SystemClock.elapsedRealtimeNanos();
+ mProtoLog.log(
+ LogLevel.INFO, TestProtoLogGroup.TEST_GROUP,
+ "My test message :: %s, %d, %o, %x, %f, %b",
+ "test", 1, 2, 3, 0.4, true);
+ after = SystemClock.elapsedRealtimeNanos();
+ } finally {
+ traceMonitor.stop(mWriter);
+ }
+
+ final ResultReader reader = new ResultReader(mWriter.write(), mTraceConfig);
+ final ProtoLogTrace protolog = reader.readProtoLogTrace();
+
+ Truth.assertThat(protolog.messages).hasSize(1);
+ Truth.assertThat(protolog.messages.getFirst().getTimestamp().getElapsedNanos())
+ .isAtLeast(before);
+ Truth.assertThat(protolog.messages.getFirst().getTimestamp().getElapsedNanos())
+ .isAtMost(after);
+ Truth.assertThat(protolog.messages.getFirst().getMessage())
+ .isEqualTo("My test message :: test, 2, 4, 6, 0.400000, true");
+ }
+
private long addMessageToConfig(ProtologCommon.ProtoLogLevel logLevel, String message) {
final long messageId = new Random().nextLong();
mViewerConfigBuilder.addMessages(Protolog.ProtoLogViewerConfig.MessageData.newBuilder()
@@ -470,7 +491,7 @@ public class PerfettoProtoLogImplTest {
before = SystemClock.elapsedRealtimeNanos();
mProtoLog.log(
LogLevel.INFO, TestProtoLogGroup.TEST_GROUP, messageHash,
- 0b01100100, null,
+ 0b01100100,
new Object[]{"test", 1, 0.1, true});
after = SystemClock.elapsedRealtimeNanos();
} finally {
@@ -488,7 +509,7 @@ public class PerfettoProtoLogImplTest {
try {
traceMonitor.start();
mProtoLog.log(LogLevel.DEBUG, TestProtoLogGroup.TEST_GROUP, 1,
- 0b11, null, new Object[]{true});
+ 0b11, new Object[]{true});
} finally {
traceMonitor.stop(mWriter);
}
@@ -512,7 +533,7 @@ public class PerfettoProtoLogImplTest {
ProtoLogImpl.setSingleInstance(mProtoLog);
ProtoLogImpl.d(TestProtoLogGroup.TEST_GROUP, 1,
- 0b11, null, true);
+ 0b11, true);
} finally {
traceMonitor.stop(mWriter);
}
@@ -586,7 +607,7 @@ public class PerfettoProtoLogImplTest {
.isFalse();
Truth.assertThat(mProtoLog.isEnabled(TestProtoLogGroup.TEST_GROUP, LogLevel.ERROR))
.isFalse();
- Truth.assertThat(mProtoLog.isEnabled(TestProtoLogGroup.TEST_GROUP, LogLevel.WTF)).isTrue();
+ Truth.assertThat(mProtoLog.isEnabled(TestProtoLogGroup.TEST_GROUP, LogLevel.WTF)).isFalse();
PerfettoTraceMonitor traceMonitor1 =
PerfettoTraceMonitor.newBuilder().enableProtoLog(true,
@@ -664,7 +685,53 @@ public class PerfettoProtoLogImplTest {
Truth.assertThat(mProtoLog.isEnabled(TestProtoLogGroup.TEST_GROUP, LogLevel.ERROR))
.isFalse();
Truth.assertThat(mProtoLog.isEnabled(TestProtoLogGroup.TEST_GROUP, LogLevel.WTF))
- .isTrue();
+ .isFalse();
+ }
+
+ @Test
+ public void supportsNullString() throws IOException {
+ PerfettoTraceMonitor traceMonitor =
+ PerfettoTraceMonitor.newBuilder().enableProtoLog(true)
+ .build();
+
+ try {
+ traceMonitor.start();
+
+ mProtoLog.log(LogLevel.DEBUG, TestProtoLogGroup.TEST_GROUP,
+ "My test null string: %s", (Object) null);
+ } finally {
+ traceMonitor.stop(mWriter);
+ }
+
+ final ResultReader reader = new ResultReader(mWriter.write(), mTraceConfig);
+ final ProtoLogTrace protolog = reader.readProtoLogTrace();
+
+ Truth.assertThat(protolog.messages).hasSize(1);
+ Truth.assertThat(protolog.messages.get(0).getMessage())
+ .isEqualTo("My test null string: null");
+ }
+
+ @Test
+ public void supportNullParams() throws IOException {
+ PerfettoTraceMonitor traceMonitor =
+ PerfettoTraceMonitor.newBuilder().enableProtoLog(true)
+ .build();
+
+ try {
+ traceMonitor.start();
+
+ mProtoLog.log(LogLevel.DEBUG, TestProtoLogGroup.TEST_GROUP,
+ "My null args: %d, %f, %b", null, null, null);
+ } finally {
+ traceMonitor.stop(mWriter);
+ }
+
+ final ResultReader reader = new ResultReader(mWriter.write(), mTraceConfig);
+ final ProtoLogTrace protolog = reader.readProtoLogTrace();
+
+ Truth.assertThat(protolog.messages).hasSize(1);
+ Truth.assertThat(protolog.messages.get(0).getMessage())
+ .isEqualTo("My null args: 0, 0, false");
}
private enum TestProtoLogGroup implements IProtoLogGroup {
diff --git a/tests/Internal/src/com/android/internal/protolog/ProtoLogImplTest.java b/tests/Internal/src/com/android/internal/protolog/ProtoLogImplTest.java
index 60456f9ea10f..0496240f01e4 100644
--- a/tests/Internal/src/com/android/internal/protolog/ProtoLogImplTest.java
+++ b/tests/Internal/src/com/android/internal/protolog/ProtoLogImplTest.java
@@ -58,51 +58,50 @@ public class ProtoLogImplTest {
public void d_logCalled() {
IProtoLog mockedProtoLog = mock(IProtoLog.class);
ProtoLogImpl.setSingleInstance(mockedProtoLog);
- ProtoLogImpl.d(TestProtoLogGroup.TEST_GROUP, 1234, 4321, "test %d");
+ ProtoLogImpl.d(TestProtoLogGroup.TEST_GROUP, 1234, 4321);
verify(mockedProtoLog).log(eq(LogLevel.DEBUG), eq(
TestProtoLogGroup.TEST_GROUP),
- eq(1234L), eq(4321), eq("test %d"), eq(new Object[]{}));
+ eq(1234L), eq(4321), eq(new Object[]{}));
}
@Test
public void v_logCalled() {
IProtoLog mockedProtoLog = mock(IProtoLog.class);
ProtoLogImpl.setSingleInstance(mockedProtoLog);
- ProtoLogImpl.v(TestProtoLogGroup.TEST_GROUP, 1234, 4321, "test %d");
+ ProtoLogImpl.v(TestProtoLogGroup.TEST_GROUP, 1234, 4321);
verify(mockedProtoLog).log(eq(LogLevel.VERBOSE), eq(
TestProtoLogGroup.TEST_GROUP),
- eq(1234L), eq(4321), eq("test %d"), eq(new Object[]{}));
+ eq(1234L), eq(4321), eq(new Object[]{}));
}
@Test
public void i_logCalled() {
IProtoLog mockedProtoLog = mock(IProtoLog.class);
ProtoLogImpl.setSingleInstance(mockedProtoLog);
- ProtoLogImpl.i(TestProtoLogGroup.TEST_GROUP, 1234, 4321, "test %d");
+ ProtoLogImpl.i(TestProtoLogGroup.TEST_GROUP, 1234, 4321);
verify(mockedProtoLog).log(eq(LogLevel.INFO), eq(
TestProtoLogGroup.TEST_GROUP),
- eq(1234L), eq(4321), eq("test %d"), eq(new Object[]{}));
+ eq(1234L), eq(4321), eq(new Object[]{}));
}
@Test
public void w_logCalled() {
IProtoLog mockedProtoLog = mock(IProtoLog.class);
ProtoLogImpl.setSingleInstance(mockedProtoLog);
- ProtoLogImpl.w(TestProtoLogGroup.TEST_GROUP, 1234,
- 4321, "test %d");
+ ProtoLogImpl.w(TestProtoLogGroup.TEST_GROUP, 1234, 4321);
verify(mockedProtoLog).log(eq(LogLevel.WARN), eq(
TestProtoLogGroup.TEST_GROUP),
- eq(1234L), eq(4321), eq("test %d"), eq(new Object[]{}));
+ eq(1234L), eq(4321), eq(new Object[]{}));
}
@Test
public void e_logCalled() {
IProtoLog mockedProtoLog = mock(IProtoLog.class);
ProtoLogImpl.setSingleInstance(mockedProtoLog);
- ProtoLogImpl.e(TestProtoLogGroup.TEST_GROUP, 1234, 4321, "test %d");
+ ProtoLogImpl.e(TestProtoLogGroup.TEST_GROUP, 1234, 4321);
verify(mockedProtoLog).log(eq(LogLevel.ERROR), eq(
TestProtoLogGroup.TEST_GROUP),
- eq(1234L), eq(4321), eq("test %d"), eq(new Object[]{}));
+ eq(1234L), eq(4321), eq(new Object[]{}));
}
@Test
@@ -110,10 +109,10 @@ public class ProtoLogImplTest {
IProtoLog mockedProtoLog = mock(IProtoLog.class);
ProtoLogImpl.setSingleInstance(mockedProtoLog);
ProtoLogImpl.wtf(TestProtoLogGroup.TEST_GROUP,
- 1234, 4321, "test %d");
+ 1234, 4321);
verify(mockedProtoLog).log(eq(LogLevel.WTF), eq(
TestProtoLogGroup.TEST_GROUP),
- eq(1234L), eq(4321), eq("test %d"), eq(new Object[]{}));
+ eq(1234L), eq(4321), eq(new Object[]{}));
}
private enum TestProtoLogGroup implements IProtoLogGroup {
diff --git a/tests/Internal/src/com/android/internal/protolog/ProtoLogViewerConfigReaderTest.java b/tests/Internal/src/com/android/internal/protolog/ProtoLogViewerConfigReaderTest.java
index dbd85d38b7f2..be0e8bc0fc07 100644
--- a/tests/Internal/src/com/android/internal/protolog/ProtoLogViewerConfigReaderTest.java
+++ b/tests/Internal/src/com/android/internal/protolog/ProtoLogViewerConfigReaderTest.java
@@ -20,75 +20,77 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import android.platform.test.annotations.Presubmit;
+import android.util.proto.ProtoInputStream;
-import androidx.test.filters.SmallTest;
-
-import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.util.zip.GZIPOutputStream;
+import perfetto.protos.Protolog;
+import perfetto.protos.ProtologCommon;
-@SmallTest
@Presubmit
@RunWith(JUnit4.class)
public class ProtoLogViewerConfigReaderTest {
- private static final String TEST_VIEWER_CONFIG = "{\n"
- + " \"version\": \"1.0.0\",\n"
- + " \"messages\": {\n"
- + " \"70933285\": {\n"
- + " \"message\": \"Test completed successfully: %b\",\n"
- + " \"level\": \"ERROR\",\n"
- + " \"group\": \"GENERIC_WM\"\n"
- + " },\n"
- + " \"1792430067\": {\n"
- + " \"message\": \"Attempted to add window to a display that does not exist: %d."
- + " Aborting.\",\n"
- + " \"level\": \"WARN\",\n"
- + " \"group\": \"GENERIC_WM\"\n"
- + " },\n"
- + " \"1352021864\": {\n"
- + " \"message\": \"Test 2\",\n"
- + " \"level\": \"WARN\",\n"
- + " \"group\": \"GENERIC_WM\"\n"
- + " },\n"
- + " \"409412266\": {\n"
- + " \"message\": \"Window %s is already added\",\n"
- + " \"level\": \"WARN\",\n"
- + " \"group\": \"GENERIC_WM\"\n"
- + " }\n"
- + " },\n"
- + " \"groups\": {\n"
- + " \"GENERIC_WM\": {\n"
- + " \"tag\": \"WindowManager\"\n"
- + " }\n"
- + " }\n"
- + "}\n";
+ private static final String TEST_GROUP_NAME = "MY_TEST_GROUP";
+ private static final String TEST_GROUP_TAG = "TEST";
+ private static final String OTHER_TEST_GROUP_NAME = "MY_OTHER_TEST_GROUP";
+ private static final String OTHER_TEST_GROUP_TAG = "OTHER_TEST";
- private LegacyProtoLogViewerConfigReader
- mConfig = new LegacyProtoLogViewerConfigReader();
- private File mTestViewerConfig;
+ private static final byte[] TEST_VIEWER_CONFIG =
+ perfetto.protos.Protolog.ProtoLogViewerConfig.newBuilder()
+ .addGroups(
+ perfetto.protos.Protolog.ProtoLogViewerConfig.Group.newBuilder()
+ .setId(1)
+ .setName(TEST_GROUP_NAME)
+ .setTag(TEST_GROUP_TAG)
+ ).addGroups(
+ perfetto.protos.Protolog.ProtoLogViewerConfig.Group.newBuilder()
+ .setId(1)
+ .setName(OTHER_TEST_GROUP_NAME)
+ .setTag(OTHER_TEST_GROUP_TAG)
+ ).addMessages(
+ perfetto.protos.Protolog.ProtoLogViewerConfig.MessageData.newBuilder()
+ .setMessageId(1)
+ .setMessage("My Test Log Message 1 %b")
+ .setLevel(ProtologCommon.ProtoLogLevel.PROTOLOG_LEVEL_DEBUG)
+ .setGroupId(1)
+ ).addMessages(
+ perfetto.protos.Protolog.ProtoLogViewerConfig.MessageData.newBuilder()
+ .setMessageId(2)
+ .setMessage("My Test Log Message 2 %b")
+ .setLevel(ProtologCommon.ProtoLogLevel.PROTOLOG_LEVEL_VERBOSE)
+ .setGroupId(1)
+ ).addMessages(
+ perfetto.protos.Protolog.ProtoLogViewerConfig.MessageData.newBuilder()
+ .setMessageId(3)
+ .setMessage("My Test Log Message 3 %b")
+ .setLevel(ProtologCommon.ProtoLogLevel.PROTOLOG_LEVEL_WARN)
+ .setGroupId(1)
+ ).addMessages(
+ perfetto.protos.Protolog.ProtoLogViewerConfig.MessageData.newBuilder()
+ .setMessageId(4)
+ .setMessage("My Test Log Message 4 %b")
+ .setLevel(ProtologCommon.ProtoLogLevel.PROTOLOG_LEVEL_ERROR)
+ .setGroupId(2)
+ ).addMessages(
+ perfetto.protos.Protolog.ProtoLogViewerConfig.MessageData.newBuilder()
+ .setMessageId(5)
+ .setMessage("My Test Log Message 5 %b")
+ .setLevel(ProtologCommon.ProtoLogLevel.PROTOLOG_LEVEL_WTF)
+ .setGroupId(2)
+ ).build().toByteArray();
- @Before
- public void setUp() throws IOException {
- mTestViewerConfig = File.createTempFile("testConfig", ".json.gz");
- OutputStreamWriter writer = new OutputStreamWriter(
- new GZIPOutputStream(new FileOutputStream(mTestViewerConfig)));
- writer.write(TEST_VIEWER_CONFIG);
- writer.close();
- }
+ private final ViewerConfigInputStreamProvider mViewerConfigInputStreamProvider =
+ () -> new ProtoInputStream(TEST_VIEWER_CONFIG);
+
+ private ProtoLogViewerConfigReader mConfig;
- @After
- public void tearDown() {
- //noinspection ResultOfMethodCallIgnored
- mTestViewerConfig.delete();
+ @Before
+ public void before() {
+ mConfig = new ProtoLogViewerConfigReader(mViewerConfigInputStreamProvider);
}
@Test
@@ -98,17 +100,26 @@ public class ProtoLogViewerConfigReaderTest {
@Test
public void loadViewerConfig() {
- mConfig.loadViewerConfig(msg -> {}, mTestViewerConfig.getAbsolutePath());
- assertEquals("Test completed successfully: %b", mConfig.getViewerString(70933285));
- assertEquals("Test 2", mConfig.getViewerString(1352021864));
- assertEquals("Window %s is already added", mConfig.getViewerString(409412266));
- assertNull(mConfig.getViewerString(1));
+ mConfig.loadViewerConfig(new String[] { TEST_GROUP_NAME });
+ assertEquals("My Test Log Message 1 %b", mConfig.getViewerString(1));
+ assertEquals("My Test Log Message 2 %b", mConfig.getViewerString(2));
+ assertEquals("My Test Log Message 3 %b", mConfig.getViewerString(3));
+ assertNull(mConfig.getViewerString(4));
+ assertNull(mConfig.getViewerString(5));
}
@Test
- public void loadViewerConfig_invalidFile() {
- mConfig.loadViewerConfig(msg -> {}, "/tmp/unknown/file/does/not/exist");
- // No exception is thrown.
+ public void unloadViewerConfig() {
+ mConfig.loadViewerConfig(new String[] { TEST_GROUP_NAME, OTHER_TEST_GROUP_NAME });
+ mConfig.unloadViewerConfig(new String[] { TEST_GROUP_NAME });
assertNull(mConfig.getViewerString(1));
+ assertNull(mConfig.getViewerString(2));
+ assertNull(mConfig.getViewerString(3));
+ assertEquals("My Test Log Message 4 %b", mConfig.getViewerString(4));
+ assertEquals("My Test Log Message 5 %b", mConfig.getViewerString(5));
+
+ mConfig.unloadViewerConfig(new String[] { OTHER_TEST_GROUP_NAME });
+ assertNull(mConfig.getViewerString(4));
+ assertNull(mConfig.getViewerString(5));
}
}
diff --git a/tests/Internal/src/com/android/internal/protolog/ProtologDataSourceTest.java b/tests/Internal/src/com/android/internal/protolog/ProtologDataSourceTest.java
index be9fb1b309f6..9a062e3b2f80 100644
--- a/tests/Internal/src/com/android/internal/protolog/ProtologDataSourceTest.java
+++ b/tests/Internal/src/com/android/internal/protolog/ProtologDataSourceTest.java
@@ -67,7 +67,7 @@ public class ProtologDataSourceTest {
@Test
public void allEnabledTraceMode() {
- final ProtoLogDataSource ds = new ProtoLogDataSource((c) -> {}, () -> {}, (c) -> {});
+ final ProtoLogDataSource ds = new ProtoLogDataSource((idx, c) -> {}, () -> {}, (idx, c) -> {});
final ProtoLogDataSource.TlsState tlsState = createTlsState(
DataSourceConfigOuterClass.DataSourceConfig.newBuilder().setProtologConfig(
@@ -154,7 +154,7 @@ public class ProtologDataSourceTest {
private ProtoLogDataSource.TlsState createTlsState(
DataSourceConfigOuterClass.DataSourceConfig config) {
final ProtoLogDataSource ds =
- Mockito.spy(new ProtoLogDataSource((c) -> {}, () -> {}, (c) -> {}));
+ Mockito.spy(new ProtoLogDataSource((idx, c) -> {}, () -> {}, (idx, c) -> {}));
ProtoInputStream configStream = new ProtoInputStream(config.toByteArray());
final ProtoLogDataSource.Instance dsInstance = Mockito.spy(
diff --git a/tests/PackageWatchdog/src/com/android/server/PackageWatchdogTest.java b/tests/PackageWatchdog/src/com/android/server/PackageWatchdogTest.java
index a8b383cd4274..ab406ef4632e 100644
--- a/tests/PackageWatchdog/src/com/android/server/PackageWatchdogTest.java
+++ b/tests/PackageWatchdog/src/com/android/server/PackageWatchdogTest.java
@@ -23,9 +23,12 @@ import static com.android.dx.mockito.inline.extended.ExtendedMockito.doAnswer;
import static com.google.common.truth.Truth.assertThat;
import static org.junit.Assert.assertTrue;
+import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.ArgumentMatchers.anyLong;
import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.reset;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
@@ -33,6 +36,7 @@ import static org.mockito.Mockito.when;
import android.Manifest;
import android.content.Context;
+import android.content.Intent;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.VersionedPackage;
@@ -116,6 +120,7 @@ public class PackageWatchdogTest {
private ConnectivityModuleConnector mConnectivityModuleConnector;
@Mock
private PackageManager mMockPackageManager;
+ @Mock Intent mMockIntent;
// Mock only sysprop apis
private PackageWatchdog.BootThreshold mSpyBootThreshold;
@Captor
@@ -1669,6 +1674,19 @@ public class PackageWatchdogTest {
PackageWatchdog.DEFAULT_TRIGGER_FAILURE_DURATION_MS);
}
+ /**
+ * Tests device config changes are propagated correctly.
+ */
+ @Test
+ public void testRegisterShutdownBroadcastReceiver() {
+ PackageWatchdog watchdog = createWatchdog();
+ doReturn(mMockIntent).when(mSpyContext)
+ .registerReceiverForAllUsers(any(), any(), any(), any());
+
+ watchdog.registerShutdownBroadcastReceiver();
+ verify(mSpyContext).registerReceiverForAllUsers(any(), any(), eq(null), eq(null));
+ }
+
private void adoptShellPermissions(String... permissions) {
InstrumentationRegistry
.getInstrumentation()
diff --git a/tests/TrustTests/src/android/trust/test/UnlockAttemptTest.kt b/tests/TrustTests/src/android/trust/test/UnlockAttemptTest.kt
index 2c9361df63fd..f9e004bcd29e 100644
--- a/tests/TrustTests/src/android/trust/test/UnlockAttemptTest.kt
+++ b/tests/TrustTests/src/android/trust/test/UnlockAttemptTest.kt
@@ -17,6 +17,7 @@ package android.trust.test
import android.app.trust.TrustManager
import android.content.Context
+import android.security.Flags.shouldTrustManagerListenForPrimaryAuth
import android.trust.BaseTrustAgentService
import android.trust.TrustTestActivity
import android.trust.test.lib.LockStateTrackingRule
@@ -154,13 +155,17 @@ class UnlockAttemptTest {
private fun triggerSuccessfulUnlock() {
screenLockRule.successfulScreenLockAttempt()
- trustAgentRule.reportSuccessfulUnlock()
+ if (!shouldTrustManagerListenForPrimaryAuth()) {
+ trustAgentRule.reportSuccessfulUnlock()
+ }
await()
}
private fun triggerFailedUnlock() {
screenLockRule.failedScreenLockAttempt()
- trustAgentRule.reportFailedUnlock()
+ if (!shouldTrustManagerListenForPrimaryAuth()) {
+ trustAgentRule.reportFailedUnlock()
+ }
await()
}
diff --git a/tests/inputmethod/ConcurrentMultiSessionImeTest/src/com/android/server/inputmethod/multisessiontest/ConcurrentMultiUserTest.java b/tests/inputmethod/ConcurrentMultiSessionImeTest/src/com/android/server/inputmethod/multisessiontest/ConcurrentMultiUserTest.java
index 0db0d954d14d..5f9a710c5f78 100644
--- a/tests/inputmethod/ConcurrentMultiSessionImeTest/src/com/android/server/inputmethod/multisessiontest/ConcurrentMultiUserTest.java
+++ b/tests/inputmethod/ConcurrentMultiSessionImeTest/src/com/android/server/inputmethod/multisessiontest/ConcurrentMultiUserTest.java
@@ -23,10 +23,15 @@ import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentat
import static com.android.compatibility.common.util.concurrentuser.ConcurrentUserActivityUtils.getResponderUserId;
import static com.android.compatibility.common.util.concurrentuser.ConcurrentUserActivityUtils.launchActivityAsUserSync;
import static com.android.compatibility.common.util.concurrentuser.ConcurrentUserActivityUtils.sendBundleAndWaitForReply;
+import static com.android.server.inputmethod.multisessiontest.TestRequestConstants.KEY_DISPLAY_ID;
+import static com.android.server.inputmethod.multisessiontest.TestRequestConstants.KEY_EDITTEXT_CENTER;
+import static com.android.server.inputmethod.multisessiontest.TestRequestConstants.KEY_IME_SHOWN;
import static com.android.server.inputmethod.multisessiontest.TestRequestConstants.KEY_REQUEST_CODE;
-import static com.android.server.inputmethod.multisessiontest.TestRequestConstants.KEY_RESULT_CODE;
-import static com.android.server.inputmethod.multisessiontest.TestRequestConstants.REPLY_IME_HIDDEN;
+import static com.android.server.inputmethod.multisessiontest.TestRequestConstants.REQUEST_DISPLAY_ID;
+import static com.android.server.inputmethod.multisessiontest.TestRequestConstants.REQUEST_EDITTEXT_POSITION;
+import static com.android.server.inputmethod.multisessiontest.TestRequestConstants.REQUEST_HIDE_IME;
import static com.android.server.inputmethod.multisessiontest.TestRequestConstants.REQUEST_IME_STATUS;
+import static com.android.server.inputmethod.multisessiontest.TestRequestConstants.REQUEST_SHOW_IME;
import static com.google.common.truth.Truth.assertWithMessage;
@@ -49,6 +54,7 @@ import com.android.compatibility.common.util.SystemUtil;
import org.junit.After;
import org.junit.Before;
import org.junit.ClassRule;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -96,7 +102,7 @@ public final class ConcurrentMultiUserTest {
}
@Test
- public void driverShowImeNotAffectPassenger() {
+ public void driverShowImeNotAffectPassenger() throws Exception {
assertDriverImeHidden();
assertPassengerImeHidden();
@@ -105,6 +111,34 @@ public final class ConcurrentMultiUserTest {
}
@Test
+ @Ignore("b/352823913")
+ public void passengerShowImeNotAffectDriver() throws Exception {
+ assertDriverImeHidden();
+ assertPassengerImeHidden();
+
+ showPassengerImeAndAssert();
+ assertDriverImeHidden();
+ }
+
+ @Test
+ public void driverHideImeNotAffectPassenger() throws Exception {
+ showDriverImeAndAssert();
+ showPassengerImeAndAssert();
+
+ hideDriverImeAndAssert();
+ assertPassengerImeShown();
+ }
+
+ @Test
+ public void passengerHideImeNotAffectDriver() throws Exception {
+ showDriverImeAndAssert();
+ showPassengerImeAndAssert();
+
+ hidePassengerImeAndAssert();
+ assertDriverImeShown();
+ }
+
+ @Test
public void imeListNotEmpty() {
List<InputMethodInfo> driverImeList = mInputMethodManager.getInputMethodList();
assertWithMessage("Driver IME list shouldn't be empty")
@@ -156,6 +190,11 @@ public final class ConcurrentMultiUserTest {
setImeForUser(passenger, driver);
}
+ private void assertDriverImeShown() {
+ assertWithMessage("Driver IME should be shown")
+ .that(mActivity.isMyImeVisible()).isTrue();
+ }
+
private void assertDriverImeHidden() {
assertWithMessage("Driver IME should be hidden")
.that(mActivity.isMyImeVisible()).isFalse();
@@ -167,13 +206,75 @@ public final class ConcurrentMultiUserTest {
Bundle receivedBundle = sendBundleAndWaitForReply(TEST_ACTIVITY.getPackageName(),
mPeerUserId, bundleToSend);
assertWithMessage("Passenger IME should be hidden")
- .that(receivedBundle.getInt(KEY_RESULT_CODE)).isEqualTo(REPLY_IME_HIDDEN);
+ .that(receivedBundle.getBoolean(KEY_IME_SHOWN, /* defaultValue= */ true)).isFalse();
+ }
+
+ private void assertPassengerImeShown() {
+ final Bundle bundleToSend = new Bundle();
+ bundleToSend.putInt(KEY_REQUEST_CODE, REQUEST_IME_STATUS);
+ Bundle receivedBundle = sendBundleAndWaitForReply(TEST_ACTIVITY.getPackageName(),
+ mPeerUserId, bundleToSend);
+ assertWithMessage("Passenger IME should be shown")
+ .that(receivedBundle.getBoolean(KEY_IME_SHOWN)).isTrue();
}
- private void showDriverImeAndAssert() {
+ private void showDriverImeAndAssert() throws Exception {
+ // WindowManagerInternal only allows the top focused display to show IME, so this method
+ // taps the driver display in case it is not the top focused display.
+ moveDriverDisplayToTop();
+
mActivity.showMyImeAndWait();
}
+ private void hideDriverImeAndAssert() {
+ mActivity.hideMyImeAndWait();
+ }
+
+ private void showPassengerImeAndAssert() throws Exception {
+ // WindowManagerInternal only allows the top focused display to show IME, so this method
+ // taps the passenger display in case it is not the top focused display.
+ movePassengerDisplayToTop();
+
+ Bundle bundleToSend = new Bundle();
+ bundleToSend.putInt(KEY_REQUEST_CODE, REQUEST_SHOW_IME);
+ Bundle receivedBundle = sendBundleAndWaitForReply(TEST_ACTIVITY.getPackageName(),
+ mPeerUserId, bundleToSend);
+
+ assertWithMessage("Passenger IME should be shown")
+ .that(receivedBundle.getBoolean(KEY_IME_SHOWN)).isTrue();
+ }
+
+ private void hidePassengerImeAndAssert() {
+ Bundle bundleToSend = new Bundle();
+ bundleToSend.putInt(KEY_REQUEST_CODE, REQUEST_HIDE_IME);
+ Bundle receivedBundle = sendBundleAndWaitForReply(TEST_ACTIVITY.getPackageName(),
+ mPeerUserId, bundleToSend);
+
+ assertWithMessage("Passenger IME should be hidden")
+ .that(receivedBundle.getBoolean(KEY_IME_SHOWN, /* defaultValue= */ true)).isFalse();
+ }
+
+ private void moveDriverDisplayToTop() throws Exception {
+ float[] driverEditTextCenter = mActivity.getEditTextCenter();
+ SystemUtil.runShellCommand(mUiAutomation, String.format("input tap %f %f",
+ driverEditTextCenter[0], driverEditTextCenter[1]));
+ }
+
+ private void movePassengerDisplayToTop() throws Exception {
+ final Bundle bundleToSend = new Bundle();
+ bundleToSend.putInt(KEY_REQUEST_CODE, REQUEST_EDITTEXT_POSITION);
+ Bundle receivedBundle = sendBundleAndWaitForReply(TEST_ACTIVITY.getPackageName(),
+ mPeerUserId, bundleToSend);
+ final float[] passengerEditTextCenter = receivedBundle.getFloatArray(KEY_EDITTEXT_CENTER);
+
+ bundleToSend.putInt(KEY_REQUEST_CODE, REQUEST_DISPLAY_ID);
+ receivedBundle = sendBundleAndWaitForReply(TEST_ACTIVITY.getPackageName(),
+ mPeerUserId, bundleToSend);
+ final int passengerDisplayId = receivedBundle.getInt(KEY_DISPLAY_ID);
+ SystemUtil.runShellCommand(mUiAutomation, String.format("input -d %d tap %f %f",
+ passengerDisplayId, passengerEditTextCenter[0], passengerEditTextCenter[1]));
+ }
+
/**
* Disables/enables IME for {@code user1}, then verifies that the IME settings for {@code user1}
* has changed as expected and {@code user2} stays the same.
diff --git a/tests/inputmethod/ConcurrentMultiSessionImeTest/src/com/android/server/inputmethod/multisessiontest/MainActivity.java b/tests/inputmethod/ConcurrentMultiSessionImeTest/src/com/android/server/inputmethod/multisessiontest/MainActivity.java
index 3c97b79b83c1..fa0aa19a8822 100644
--- a/tests/inputmethod/ConcurrentMultiSessionImeTest/src/com/android/server/inputmethod/multisessiontest/MainActivity.java
+++ b/tests/inputmethod/ConcurrentMultiSessionImeTest/src/com/android/server/inputmethod/multisessiontest/MainActivity.java
@@ -16,20 +16,25 @@
package com.android.server.inputmethod.multisessiontest;
+import static com.android.server.inputmethod.multisessiontest.TestRequestConstants.KEY_DISPLAY_ID;
+import static com.android.server.inputmethod.multisessiontest.TestRequestConstants.KEY_EDITTEXT_CENTER;
+import static com.android.server.inputmethod.multisessiontest.TestRequestConstants.KEY_IME_SHOWN;
import static com.android.server.inputmethod.multisessiontest.TestRequestConstants.KEY_REQUEST_CODE;
-import static com.android.server.inputmethod.multisessiontest.TestRequestConstants.KEY_RESULT_CODE;
-import static com.android.server.inputmethod.multisessiontest.TestRequestConstants.REPLY_IME_HIDDEN;
-import static com.android.server.inputmethod.multisessiontest.TestRequestConstants.REPLY_IME_SHOWN;
+import static com.android.server.inputmethod.multisessiontest.TestRequestConstants.REQUEST_DISPLAY_ID;
+import static com.android.server.inputmethod.multisessiontest.TestRequestConstants.REQUEST_EDITTEXT_POSITION;
+import static com.android.server.inputmethod.multisessiontest.TestRequestConstants.REQUEST_HIDE_IME;
import static com.android.server.inputmethod.multisessiontest.TestRequestConstants.REQUEST_IME_STATUS;
+import static com.android.server.inputmethod.multisessiontest.TestRequestConstants.REQUEST_SHOW_IME;
import android.app.Activity;
import android.os.Bundle;
import android.os.Process;
import android.util.Log;
-import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
+import androidx.annotation.WorkerThread;
import androidx.core.view.ViewCompat;
+import androidx.core.view.WindowCompat;
import androidx.core.view.WindowInsetsCompat;
import com.android.compatibility.common.util.PollingCheck;
@@ -43,7 +48,6 @@ public final class MainActivity extends ConcurrentUserActivityBase {
private static final long WAIT_IME_TIMEOUT_MS = 3000;
private EditText mEditor;
- private InputMethodManager mImm;
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -52,19 +56,56 @@ public final class MainActivity extends ConcurrentUserActivityBase {
+ Process.myUserHandle().getIdentifier() + " on display "
+ getDisplay().getDisplayId());
setContentView(R.layout.main_activity);
- mImm = getSystemService(InputMethodManager.class);
mEditor = requireViewById(R.id.edit_text);
}
@Override
+ protected void onResume() {
+ super.onResume();
+ Log.v(TAG, "onResume");
+ }
+
+ @Override
+ protected void onPause() {
+ super.onPause();
+ Log.v(TAG, "onPause");
+ }
+
+ @Override
+ protected void onStop() {
+ super.onStop();
+ Log.v(TAG, "onResume");
+ }
+
+ @Override
+ public void onWindowFocusChanged(boolean hasFocus) {
+ super.onWindowFocusChanged(hasFocus);
+ Log.v(TAG, "onWindowFocusChanged " + hasFocus);
+ }
+
+ @Override
+ @WorkerThread
protected Bundle onBundleReceived(Bundle receivedBundle) {
final int requestCode = receivedBundle.getInt(KEY_REQUEST_CODE);
Log.v(TAG, "onBundleReceived() with request code:" + requestCode);
final Bundle replyBundle = new Bundle();
switch (requestCode) {
case REQUEST_IME_STATUS:
- replyBundle.putInt(KEY_RESULT_CODE,
- isMyImeVisible() ? REPLY_IME_SHOWN : REPLY_IME_HIDDEN);
+ replyBundle.putBoolean(KEY_IME_SHOWN, isMyImeVisible());
+ break;
+ case REQUEST_SHOW_IME:
+ showMyImeAndWait();
+ replyBundle.putBoolean(KEY_IME_SHOWN, isMyImeVisible());
+ break;
+ case REQUEST_HIDE_IME:
+ hideMyImeAndWait();
+ replyBundle.putBoolean(KEY_IME_SHOWN, isMyImeVisible());
+ break;
+ case REQUEST_EDITTEXT_POSITION:
+ replyBundle.putFloatArray(KEY_EDITTEXT_CENTER, getEditTextCenter());
+ break;
+ case REQUEST_DISPLAY_ID:
+ replyBundle.putInt(KEY_DISPLAY_ID, getDisplay().getDisplayId());
break;
default:
throw new RuntimeException("Received undefined request code:" + requestCode);
@@ -77,23 +118,41 @@ public final class MainActivity extends ConcurrentUserActivityBase {
return insets == null ? false : insets.isVisible(WindowInsetsCompat.Type.ime());
}
+ float[] getEditTextCenter() {
+ final float editTextCenterX = mEditor.getX() + 0.5f * mEditor.getWidth();
+ final float editTextCenterY = mEditor.getY() + 0.5f * mEditor.getHeight();
+ return new float[]{editTextCenterX, editTextCenterY};
+ }
+
+ @WorkerThread
void showMyImeAndWait() {
- Log.v(TAG, "showSoftInput");
runOnUiThread(() -> {
- // requestFocus() must run on UI thread.
+ // View#requestFocus() and WindowInsetsControllerCompat#show() must run on UI thread.
if (!mEditor.requestFocus()) {
Log.e(TAG, "Failed to focus on mEditor");
return;
}
- if (!mImm.showSoftInput(mEditor, /* flags= */ 0)) {
- Log.e(TAG, String.format("Failed to show my IME as user %d, "
- + "mEditor:focused=%b,hasWindowFocus=%b",
- Process.myUserHandle().getIdentifier(),
- mEditor.isFocused(), mEditor.hasWindowFocus()));
- }
+ // Compared to mImm.showSoftInput(), the call below is the recommended way to show the
+ // keyboard because it is guaranteed to be scheduled after the window is focused.
+ Log.v(TAG, "showSoftInput");
+ WindowCompat.getInsetsController(getWindow(), mEditor).show(
+ WindowInsetsCompat.Type.ime());
});
PollingCheck.waitFor(WAIT_IME_TIMEOUT_MS, () -> isMyImeVisible(),
- String.format("My IME (user %d) didn't show up",
+ String.format("%s: My IME (user %d) didn't show up", TAG,
+ Process.myUserHandle().getIdentifier()));
+ }
+
+ @WorkerThread
+ void hideMyImeAndWait() {
+ runOnUiThread(() -> {
+ Log.v(TAG, "hideSoftInput");
+ // WindowInsetsControllerCompat#hide() must run on UI thread.
+ WindowCompat.getInsetsController(getWindow(), mEditor)
+ .hide(WindowInsetsCompat.Type.ime());
+ });
+ PollingCheck.waitFor(WAIT_IME_TIMEOUT_MS, () -> !isMyImeVisible(),
+ String.format("%s: My IME (user %d) is still shown", TAG,
Process.myUserHandle().getIdentifier()));
}
}
diff --git a/tests/inputmethod/ConcurrentMultiSessionImeTest/src/com/android/server/inputmethod/multisessiontest/TestRequestConstants.java b/tests/inputmethod/ConcurrentMultiSessionImeTest/src/com/android/server/inputmethod/multisessiontest/TestRequestConstants.java
index 1501bfb69c92..68c9d5403c0b 100644
--- a/tests/inputmethod/ConcurrentMultiSessionImeTest/src/com/android/server/inputmethod/multisessiontest/TestRequestConstants.java
+++ b/tests/inputmethod/ConcurrentMultiSessionImeTest/src/com/android/server/inputmethod/multisessiontest/TestRequestConstants.java
@@ -21,9 +21,13 @@ final class TestRequestConstants {
}
public static final String KEY_REQUEST_CODE = "key_request_code";
- public static final String KEY_RESULT_CODE = "key_result_code";
+ public static final String KEY_EDITTEXT_CENTER = "key_edittext_center";
+ public static final String KEY_DISPLAY_ID = "key_display_id";
+ public static final String KEY_IME_SHOWN = "key_ime_shown";
public static final int REQUEST_IME_STATUS = 1;
- public static final int REPLY_IME_SHOWN = 2;
- public static final int REPLY_IME_HIDDEN = 3;
+ public static final int REQUEST_SHOW_IME = 2;
+ public static final int REQUEST_HIDE_IME = 3;
+ public static final int REQUEST_EDITTEXT_POSITION = 4;
+ public static final int REQUEST_DISPLAY_ID = 5;
}
diff --git a/tools/aapt2/Resource.h b/tools/aapt2/Resource.h
index 7ba3277d2093..a274f047586c 100644
--- a/tools/aapt2/Resource.h
+++ b/tools/aapt2/Resource.h
@@ -69,6 +69,8 @@ enum class ResourceType {
kXml,
};
+enum class FlagStatus { NoFlag = 0, Disabled = 1, Enabled = 2 };
+
android::StringPiece to_string(ResourceType type);
/**
diff --git a/tools/aapt2/ResourceParser.cpp b/tools/aapt2/ResourceParser.cpp
index 6af39b739e9b..2df941834063 100644
--- a/tools/aapt2/ResourceParser.cpp
+++ b/tools/aapt2/ResourceParser.cpp
@@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
#include "ResourceParser.h"
#include <functional>
@@ -108,6 +107,7 @@ struct ParsedResource {
Visibility::Level visibility_level = Visibility::Level::kUndefined;
bool staged_api = false;
bool allow_new = false;
+ FlagStatus flag_status;
std::optional<OverlayableItem> overlayable_item;
std::optional<StagedId> staged_alias;
@@ -161,6 +161,8 @@ static bool AddResourcesToTable(ResourceTable* table, android::IDiagnostics* dia
res_builder.SetStagedId(res->staged_alias.value());
}
+ res_builder.SetFlagStatus(res->flag_status);
+
bool error = false;
if (!res->name.entry.empty()) {
if (!table->AddResource(res_builder.Build(), diag)) {
@@ -544,6 +546,30 @@ bool ResourceParser::ParseResource(xml::XmlPullParser* parser,
});
std::string resource_type = parser->element_name();
+ std::optional<StringPiece> flag =
+ xml::FindAttribute(parser, "http://schemas.android.com/apk/res/android", "featureFlag");
+ out_resource->flag_status = FlagStatus::NoFlag;
+ if (flag) {
+ auto flag_it = options_.feature_flag_values.find(flag.value());
+ if (flag_it == options_.feature_flag_values.end()) {
+ diag_->Error(android::DiagMessage(source_.WithLine(parser->line_number()))
+ << "Resource flag value undefined");
+ return false;
+ }
+ const auto& flag_properties = flag_it->second;
+ if (!flag_properties.read_only) {
+ diag_->Error(android::DiagMessage(source_.WithLine(parser->line_number()))
+ << "Only read only flags may be used with resources");
+ return false;
+ }
+ if (!flag_properties.enabled.has_value()) {
+ diag_->Error(android::DiagMessage(source_.WithLine(parser->line_number()))
+ << "Only flags with a value may be used with resources");
+ return false;
+ }
+ out_resource->flag_status =
+ flag_properties.enabled.value() ? FlagStatus::Enabled : FlagStatus::Disabled;
+ }
// The value format accepted for this resource.
uint32_t resource_format = 0u;
diff --git a/tools/aapt2/ResourceParser.h b/tools/aapt2/ResourceParser.h
index 012a056dccf3..45d41c193cb4 100644
--- a/tools/aapt2/ResourceParser.h
+++ b/tools/aapt2/ResourceParser.h
@@ -27,6 +27,7 @@
#include "androidfw/IDiagnostics.h"
#include "androidfw/StringPiece.h"
#include "androidfw/StringPool.h"
+#include "cmd/Util.h"
#include "xml/XmlPullParser.h"
namespace aapt {
@@ -54,6 +55,8 @@ struct ResourceParserOptions {
// If visibility was forced, we need to use it when creating a new resource and also error if we
// try to parse the <public>, <public-group>, <java-symbol> or <symbol> tags.
std::optional<Visibility::Level> visibility;
+
+ FeatureFlagValues feature_flag_values;
};
struct FlattenedXmlSubTree {
diff --git a/tools/aapt2/ResourceTable.cpp b/tools/aapt2/ResourceTable.cpp
index a3b0b45df5c3..1cdb71551d5d 100644
--- a/tools/aapt2/ResourceTable.cpp
+++ b/tools/aapt2/ResourceTable.cpp
@@ -231,6 +231,47 @@ bool ResourceEntry::HasDefaultValue() const {
return false;
}
+ResourceTable::CollisionResult ResourceTable::ResolveFlagCollision(FlagStatus existing,
+ FlagStatus incoming) {
+ switch (existing) {
+ case FlagStatus::NoFlag:
+ switch (incoming) {
+ case FlagStatus::NoFlag:
+ return CollisionResult::kConflict;
+ case FlagStatus::Disabled:
+ return CollisionResult::kKeepOriginal;
+ case FlagStatus::Enabled:
+ return CollisionResult::kTakeNew;
+ default:
+ return CollisionResult::kConflict;
+ }
+ case FlagStatus::Disabled:
+ switch (incoming) {
+ case FlagStatus::NoFlag:
+ return CollisionResult::kTakeNew;
+ case FlagStatus::Disabled:
+ return CollisionResult::kKeepOriginal;
+ case FlagStatus::Enabled:
+ return CollisionResult::kTakeNew;
+ default:
+ return CollisionResult::kConflict;
+ }
+ case FlagStatus::Enabled:
+ switch (incoming) {
+ case FlagStatus::NoFlag:
+ return CollisionResult::kKeepOriginal;
+ case FlagStatus::Disabled:
+ return CollisionResult::kKeepOriginal;
+ case FlagStatus::Enabled:
+ return CollisionResult::kConflict;
+ default:
+ return CollisionResult::kConflict;
+ }
+ default:
+ return CollisionResult::kConflict;
+ }
+}
+
// The default handler for collisions.
//
// Typically, a weak value will be overridden by a strong value. An existing weak
@@ -564,16 +605,21 @@ bool ResourceTable::AddResource(NewResource&& res, android::IDiagnostics* diag)
if (!config_value->value) {
// Resource does not exist, add it now.
config_value->value = std::move(res.value);
+ config_value->flag_status = res.flag_status;
} else {
// When validation is enabled, ensure that a resource cannot have multiple values defined for
- // the same configuration.
- auto result = validate ? ResolveValueCollision(config_value->value.get(), res.value.get())
+ // the same configuration unless protected by flags.
+ auto result = validate ? ResolveFlagCollision(config_value->flag_status, res.flag_status)
: CollisionResult::kKeepBoth;
+ if (result == CollisionResult::kConflict) {
+ result = ResolveValueCollision(config_value->value.get(), res.value.get());
+ }
switch (result) {
case CollisionResult::kKeepBoth:
// Insert the value ignoring for duplicate configurations
entry->values.push_back(util::make_unique<ResourceConfigValue>(res.config, res.product));
entry->values.back()->value = std::move(res.value);
+ entry->values.back()->flag_status = res.flag_status;
break;
case CollisionResult::kTakeNew:
@@ -735,6 +781,11 @@ NewResourceBuilder& NewResourceBuilder::SetAllowMangled(bool allow_mangled) {
return *this;
}
+NewResourceBuilder& NewResourceBuilder::SetFlagStatus(FlagStatus flag_status) {
+ res_.flag_status = flag_status;
+ return *this;
+}
+
NewResource NewResourceBuilder::Build() {
return std::move(res_);
}
diff --git a/tools/aapt2/ResourceTable.h b/tools/aapt2/ResourceTable.h
index 61e399c7ab68..9530c1750c79 100644
--- a/tools/aapt2/ResourceTable.h
+++ b/tools/aapt2/ResourceTable.h
@@ -104,6 +104,8 @@ class ResourceConfigValue {
// The actual Value.
std::unique_ptr<Value> value;
+ FlagStatus flag_status;
+
ResourceConfigValue(const android::ConfigDescription& config, android::StringPiece product)
: config(config), product(product) {
}
@@ -269,6 +271,7 @@ struct NewResource {
std::optional<AllowNew> allow_new;
std::optional<StagedId> staged_id;
bool allow_mangled = false;
+ FlagStatus flag_status;
};
struct NewResourceBuilder {
@@ -282,6 +285,7 @@ struct NewResourceBuilder {
NewResourceBuilder& SetAllowNew(AllowNew allow_new);
NewResourceBuilder& SetStagedId(StagedId id);
NewResourceBuilder& SetAllowMangled(bool allow_mangled);
+ NewResourceBuilder& SetFlagStatus(FlagStatus flag_status);
NewResource Build();
private:
@@ -330,7 +334,8 @@ class ResourceTable {
std::unique_ptr<ResourceTable> Clone() const;
- // When a collision of resources occurs, this method decides which value to keep.
+ // When a collision of resources occurs, these methods decide which value to keep.
+ static CollisionResult ResolveFlagCollision(FlagStatus existing, FlagStatus incoming);
static CollisionResult ResolveValueCollision(Value* existing, Value* incoming);
// The string pool used by this resource table. Values that reference strings must use
diff --git a/tools/aapt2/Resources.proto b/tools/aapt2/Resources.proto
index 1d7fd1d17dcd..2ecc82ae4792 100644
--- a/tools/aapt2/Resources.proto
+++ b/tools/aapt2/Resources.proto
@@ -246,6 +246,7 @@ message Entry {
message ConfigValue {
Configuration config = 1;
Value value = 2;
+ uint32 flag_status = 3;
}
// The generic meta-data for every value in a resource table.
diff --git a/tools/aapt2/SdkConstants.cpp b/tools/aapt2/SdkConstants.cpp
index 83f2eb31aa57..37b1687fd3f1 100644
--- a/tools/aapt2/SdkConstants.cpp
+++ b/tools/aapt2/SdkConstants.cpp
@@ -64,6 +64,12 @@ static constexpr std::pair<uint16_t, ApiVersion> sAttrIdMap[] = {
{0x0616, SDK_R},
{0x064b, SDK_S},
{0x064c, SDK_S_V2},
+ // TODO(zyy): add these when we need more rules for converting new attributes to the
+ // older ones, but don't bother for now as this would increase the array size for no
+ // real benefit
+ // {0x0672, SDK_TIRAMISU},
+ // {0x0687, SDK_UPSIDE_DOWN_CAKE},
+ // {0x06a3, SDK_VANILLA_ICE_CREAM},
};
static_assert(std::is_sorted(std::begin(sAttrIdMap), std::end(sAttrIdMap),
diff --git a/tools/aapt2/cmd/Compile.cpp b/tools/aapt2/cmd/Compile.cpp
index 9b8c3b3d549c..2a978a5153ca 100644
--- a/tools/aapt2/cmd/Compile.cpp
+++ b/tools/aapt2/cmd/Compile.cpp
@@ -171,6 +171,7 @@ static bool CompileTable(IAaptContext* context, const CompileOptions& options,
parser_options.error_on_positional_arguments = !options.legacy_mode;
parser_options.preserve_visibility_of_styleables = options.preserve_visibility_of_styleables;
parser_options.translatable = translatable_file;
+ parser_options.feature_flag_values = options.feature_flag_values;
// If visibility was forced, we need to use it when creating a new resource and also error if
// we try to parse the <public>, <public-group>, <java-symbol> or <symbol> tags.
diff --git a/tools/aapt2/cmd/Optimize.h b/tools/aapt2/cmd/Optimize.h
index ee53af107b17..012b0f230ca2 100644
--- a/tools/aapt2/cmd/Optimize.h
+++ b/tools/aapt2/cmd/Optimize.h
@@ -116,6 +116,10 @@ class OptimizeCommand : public Command {
"This decreases APK size at the cost of resource retrieval performance.\n"
"Applies sparse encoding to all resources regardless of minSdk.",
&options_.force_sparse_encoding);
+ AddOptionalSwitch(
+ "--enable-compact-entries",
+ "This decreases APK size by using compact resource entries for simple data types.",
+ &options_.table_flattener_options.use_compact_entries);
AddOptionalSwitch("--collapse-resource-names",
"Collapses resource names to a single value in the key string pool. Resources can \n"
"be exempted using the \"no_collapse\" directive in a file specified by "
diff --git a/tools/aapt2/cmd/Util.cpp b/tools/aapt2/cmd/Util.cpp
index e839fc1ceb0f..7739171b347f 100644
--- a/tools/aapt2/cmd/Util.cpp
+++ b/tools/aapt2/cmd/Util.cpp
@@ -137,22 +137,25 @@ bool ParseFeatureFlagsParameter(StringPiece arg, android::IDiagnostics* diag,
diag->Error(android::DiagMessage() << "No name given for one or more flags in: " << arg);
return false;
}
+
std::vector<std::string> name_parts = util::Split(flag_name, ':');
if (name_parts.size() > 2) {
diag->Error(android::DiagMessage()
<< "Invalid feature flag and optional value '" << flag_and_value
- << "'. Must be in the format 'flag_name[:ro][=true|false]");
+ << "'. Must be in the format 'flag_name[:READ_ONLY|READ_WRITE][=true|false]");
return false;
}
flag_name = name_parts[0];
bool read_only = false;
if (name_parts.size() == 2) {
- if (name_parts[1] == "ro") {
+ if (name_parts[1] == "ro" || name_parts[1] == "READ_ONLY") {
read_only = true;
+ } else if (name_parts[1] == "READ_WRITE") {
+ read_only = false;
} else {
diag->Error(android::DiagMessage()
<< "Invalid feature flag and optional value '" << flag_and_value
- << "'. Must be in the format 'flag_name[:ro][=true|false]");
+ << "'. Must be in the format 'flag_name[:READ_ONLY|READ_WRITE][=true|false]");
return false;
}
}
diff --git a/tools/aapt2/cmd/Util_test.cpp b/tools/aapt2/cmd/Util_test.cpp
index 35bc63714e58..78183409ad8f 100644
--- a/tools/aapt2/cmd/Util_test.cpp
+++ b/tools/aapt2/cmd/Util_test.cpp
@@ -383,7 +383,7 @@ TEST(UtilTest, ParseFeatureFlagsParameter_InvalidValue) {
TEST(UtilTest, ParseFeatureFlagsParameter_DuplicateFlag) {
auto diagnostics = test::ContextBuilder().Build()->GetDiagnostics();
FeatureFlagValues feature_flag_values;
- ASSERT_TRUE(ParseFeatureFlagsParameter("foo=true,bar=true,foo:ro=false", diagnostics,
+ ASSERT_TRUE(ParseFeatureFlagsParameter("foo=true,bar:READ_WRITE=true,foo:ro=false", diagnostics,
&feature_flag_values));
EXPECT_THAT(
feature_flag_values,
@@ -394,11 +394,11 @@ TEST(UtilTest, ParseFeatureFlagsParameter_DuplicateFlag) {
TEST(UtilTest, ParseFeatureFlagsParameter_Valid) {
auto diagnostics = test::ContextBuilder().Build()->GetDiagnostics();
FeatureFlagValues feature_flag_values;
- ASSERT_TRUE(ParseFeatureFlagsParameter("foo= true, bar:ro =FALSE,baz=, quux", diagnostics,
- &feature_flag_values));
+ ASSERT_TRUE(ParseFeatureFlagsParameter("foo:READ_ONLY= true, bar:ro =FALSE,baz:READ_WRITE=, quux",
+ diagnostics, &feature_flag_values));
EXPECT_THAT(
feature_flag_values,
- UnorderedElementsAre(Pair("foo", FeatureFlagProperties{false, std::optional<bool>(true)}),
+ UnorderedElementsAre(Pair("foo", FeatureFlagProperties{true, std::optional<bool>(true)}),
Pair("bar", FeatureFlagProperties{true, std::optional<bool>(false)}),
Pair("baz", FeatureFlagProperties{false, std::nullopt}),
Pair("quux", FeatureFlagProperties{false, std::nullopt})));
diff --git a/tools/aapt2/format/proto/ProtoDeserialize.cpp b/tools/aapt2/format/proto/ProtoDeserialize.cpp
index e1a3013c07bb..aaab3158f61e 100644
--- a/tools/aapt2/format/proto/ProtoDeserialize.cpp
+++ b/tools/aapt2/format/proto/ProtoDeserialize.cpp
@@ -16,6 +16,7 @@
#include "format/proto/ProtoDeserialize.h"
+#include "Resource.h"
#include "ResourceTable.h"
#include "ResourceUtils.h"
#include "ResourceValues.h"
@@ -533,6 +534,8 @@ static bool DeserializePackageFromPb(const pb::Package& pb_package, const ResStr
return false;
}
+ config_value->flag_status = (FlagStatus)pb_config_value.flag_status();
+
config_value->value = DeserializeValueFromPb(pb_config_value.value(), src_pool, config,
&out_table->string_pool, files, out_error);
if (config_value->value == nullptr) {
diff --git a/tools/aapt2/format/proto/ProtoSerialize.cpp b/tools/aapt2/format/proto/ProtoSerialize.cpp
index 0903205b5eb2..c1e15bcf9f70 100644
--- a/tools/aapt2/format/proto/ProtoSerialize.cpp
+++ b/tools/aapt2/format/proto/ProtoSerialize.cpp
@@ -426,6 +426,7 @@ void SerializeTableToPb(const ResourceTable& table, pb::ResourceTable* out_table
pb_config_value->mutable_config()->set_product(config_value->product);
SerializeValueToPb(*config_value->value, pb_config_value->mutable_value(),
source_pool.get());
+ pb_config_value->set_flag_status((uint32_t)config_value->flag_status);
}
}
}
diff --git a/tools/aapt2/link/ManifestFixer.cpp b/tools/aapt2/link/ManifestFixer.cpp
index 669cddb9af5a..382b088e4bba 100644
--- a/tools/aapt2/link/ManifestFixer.cpp
+++ b/tools/aapt2/link/ManifestFixer.cpp
@@ -18,9 +18,9 @@
#include <unordered_set>
-#include "android-base/logging.h"
-
#include "ResourceUtils.h"
+#include "android-base/logging.h"
+#include "process/SymbolTable.h"
#include "trace/TraceBuffer.h"
#include "util/Util.h"
#include "xml/XmlActionExecutor.h"
@@ -172,6 +172,59 @@ static bool RequiredNameIsJavaClassName(xml::Element* el, android::SourcePathDia
return NameIsJavaClassName(el, attr, diag);
}
+static bool UpdateConfigChangesIfNeeded(xml::Element* el, IAaptContext* context) {
+ xml::Attribute* attr = el->FindAttribute(xml::kSchemaAndroid, "configChanges");
+ if (attr == nullptr) {
+ return true;
+ }
+
+ if (attr->value != "allKnown" && attr->value.find("allKnown") != std::string::npos) {
+ context->GetDiagnostics()->Error(
+ android::DiagMessage(el->line_number)
+ << "If you want to declare 'allKnown' in attribute 'android:configChanges' in <" << el->name
+ << ">, " << attr->value << " is not allowed', allKnown has to be used "
+ << "by itself, for example: 'android:configChanges=allKnown', it cannot be combined with "
+ << "the other flags");
+ return false;
+ }
+
+ if (attr->value == "allKnown") {
+ SymbolTable* symbol_table = context->GetExternalSymbols();
+ const SymbolTable::Symbol* symbol =
+ symbol_table->FindByName(ResourceName("android", ResourceType::kAttr, "configChanges"));
+
+ if (symbol == nullptr) {
+ context->GetDiagnostics()->Error(
+ android::DiagMessage(el->line_number)
+ << "Cannot find symbol for android:configChanges with min sdk: "
+ << context->GetMinSdkVersion());
+ return false;
+ }
+
+ std::stringstream new_value;
+
+ const auto& symbols = symbol->attribute->symbols;
+ for (auto it = symbols.begin(); it != symbols.end(); ++it) {
+ // Skip 'resourcesUnused' which is the flag to fully disable activity restart specifically
+ // for games.
+ if (it->symbol.name.value().entry == "resourcesUnused") {
+ continue;
+ }
+ if (it != symbols.begin()) {
+ new_value << "|";
+ }
+ new_value << it->symbol.name.value().entry;
+ }
+ const auto& old_value = attr->value;
+ auto new_value_str = new_value.str();
+ context->GetDiagnostics()->Note(android::DiagMessage(el->line_number)
+ << "Updating value of 'android:configChanges' from "
+ << old_value << " to " << new_value_str);
+ attr->value = std::move(new_value_str);
+ }
+ return true;
+}
+
static bool RequiredNameIsJavaPackage(xml::Element* el, android::SourcePathDiagnostics* diag) {
xml::Attribute* attr = el->FindAttribute(xml::kSchemaAndroid, "name");
if (attr == nullptr) {
@@ -382,8 +435,9 @@ static void EnsureNamespaceIsDeclared(const std::string& prefix, const std::stri
}
}
-bool ManifestFixer::BuildRules(xml::XmlActionExecutor* executor, android::IDiagnostics* diag) {
+bool ManifestFixer::BuildRules(xml::XmlActionExecutor* executor, IAaptContext* context) {
// First verify some options.
+ android::IDiagnostics* diag = context->GetDiagnostics();
if (options_.rename_manifest_package) {
if (!util::IsJavaPackageName(options_.rename_manifest_package.value())) {
diag->Error(android::DiagMessage() << "invalid manifest package override '"
@@ -432,6 +486,8 @@ bool ManifestFixer::BuildRules(xml::XmlActionExecutor* executor, android::IDiagn
// Common component actions.
xml::XmlNodeAction component_action;
component_action.Action(RequiredNameIsJavaClassName);
+ component_action.Action(
+ [context](xml::Element* el) -> bool { return UpdateConfigChangesIfNeeded(el, context); });
component_action["intent-filter"] = intent_filter_action;
component_action["preferred"] = intent_filter_action;
component_action["meta-data"] = meta_data_action;
@@ -778,7 +834,7 @@ bool ManifestFixer::Consume(IAaptContext* context, xml::XmlResource* doc) {
}
xml::XmlActionExecutor executor;
- if (!BuildRules(&executor, context->GetDiagnostics())) {
+ if (!BuildRules(&executor, context)) {
return false;
}
diff --git a/tools/aapt2/link/ManifestFixer.h b/tools/aapt2/link/ManifestFixer.h
index df0ece6fe24a..748a82858175 100644
--- a/tools/aapt2/link/ManifestFixer.h
+++ b/tools/aapt2/link/ManifestFixer.h
@@ -110,7 +110,7 @@ class ManifestFixer : public IXmlResourceConsumer {
private:
DISALLOW_COPY_AND_ASSIGN(ManifestFixer);
- bool BuildRules(xml::XmlActionExecutor* executor, android::IDiagnostics* diag);
+ bool BuildRules(xml::XmlActionExecutor* executor, IAaptContext* context);
ManifestFixerOptions options_;
};
diff --git a/tools/aapt2/link/ManifestFixer_test.cpp b/tools/aapt2/link/ManifestFixer_test.cpp
index 3cfdf7832801..50086273a819 100644
--- a/tools/aapt2/link/ManifestFixer_test.cpp
+++ b/tools/aapt2/link/ManifestFixer_test.cpp
@@ -37,27 +37,30 @@ struct ManifestFixerTest : public ::testing::Test {
.SetCompilationPackage("android")
.SetPackageId(0x01)
.SetNameManglerPolicy(NameManglerPolicy{"android"})
- .AddSymbolSource(
- test::StaticSymbolSourceBuilder()
- .AddSymbol(
- "android:attr/package", ResourceId(0x01010000),
- test::AttributeBuilder()
- .SetTypeMask(android::ResTable_map::TYPE_STRING)
- .Build())
- .AddSymbol(
- "android:attr/minSdkVersion", ResourceId(0x01010001),
- test::AttributeBuilder()
- .SetTypeMask(android::ResTable_map::TYPE_STRING |
- android::ResTable_map::TYPE_INTEGER)
- .Build())
- .AddSymbol(
- "android:attr/targetSdkVersion", ResourceId(0x01010002),
- test::AttributeBuilder()
- .SetTypeMask(android::ResTable_map::TYPE_STRING |
- android::ResTable_map::TYPE_INTEGER)
- .Build())
- .AddSymbol("android:string/str", ResourceId(0x01060000))
- .Build())
+ .AddSymbolSource(test::StaticSymbolSourceBuilder()
+ .AddSymbol("android:attr/package", ResourceId(0x01010000),
+ test::AttributeBuilder()
+ .SetTypeMask(android::ResTable_map::TYPE_STRING)
+ .Build())
+ .AddSymbol("android:attr/minSdkVersion", ResourceId(0x01010001),
+ test::AttributeBuilder()
+ .SetTypeMask(android::ResTable_map::TYPE_STRING |
+ android::ResTable_map::TYPE_INTEGER)
+ .Build())
+ .AddSymbol("android:attr/targetSdkVersion", ResourceId(0x01010002),
+ test::AttributeBuilder()
+ .SetTypeMask(android::ResTable_map::TYPE_STRING |
+ android::ResTable_map::TYPE_INTEGER)
+ .Build())
+ .AddSymbol("android:string/str", ResourceId(0x01060000))
+ .AddSymbol("android:attr/configChanges", ResourceId(0x01010003),
+ test::AttributeBuilder()
+ .AddItem("testConfigChange1", 1)
+ .AddItem("testConfigChange2", 2)
+ .AddItem("resourcesUnused", 4)
+ .SetTypeMask(android::ResTable_map::TYPE_STRING)
+ .Build())
+ .Build())
.Build();
}
@@ -1591,4 +1594,72 @@ TEST_F(ManifestFixerTest, IntentFilterPathMustStartWithLeadingSlashOnDeepLinks)
</manifest>)";
EXPECT_THAT(Verify(input), NotNull());
}
+
+TEST_F(ManifestFixerTest, AllKnownNotDeclaredProperly) {
+ std::string input = R"(
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android">
+ <application>
+ <activity android:name=".MainActivity"
+ android:configChanges="allKnown|testConfigChange1">
+ </activity>
+ </application>
+ </manifest>)";
+ auto doc = Verify(input);
+ EXPECT_THAT(doc, IsNull());
+}
+
+TEST_F(ManifestFixerTest, ModifyAttributeValueForAllKnown) {
+ std::string input = R"(
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android">
+ <application>
+ <activity android:name=".MainActivity"
+ android:configChanges="allKnown">
+ </activity>
+ </application>
+ </manifest>)";
+ auto doc = Verify(input);
+ EXPECT_THAT(doc, NotNull());
+
+ xml::Element* el;
+ xml::Attribute* attr;
+
+ el = doc->root.get();
+ ASSERT_THAT(el, NotNull());
+ el = el->FindChild({}, "application");
+ ASSERT_THAT(el, NotNull());
+ el = el->FindChild({}, "activity");
+ ASSERT_THAT(el, NotNull());
+
+ attr = el->FindAttribute(xml::kSchemaAndroid, "configChanges");
+ ASSERT_THAT(attr->value, "testConfigChange1|testConfigChange2");
+}
+
+TEST_F(ManifestFixerTest, DoNothingForOtherConfigChanges) {
+ std::string input = R"(
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android">
+ <application>
+ <activity android:name=".MainActivity"
+ android:configChanges="testConfigChange2">
+ </activity>
+ </application>
+ </manifest>)";
+ auto doc = Verify(input);
+ EXPECT_THAT(doc, NotNull());
+
+ xml::Element* el;
+ xml::Attribute* attr;
+
+ el = doc->root.get();
+ ASSERT_THAT(el, NotNull());
+ el = el->FindChild({}, "application");
+ ASSERT_THAT(el, NotNull());
+ el = el->FindChild({}, "activity");
+ ASSERT_THAT(el, NotNull());
+
+ attr = el->FindAttribute(xml::kSchemaAndroid, "configChanges");
+ ASSERT_THAT(attr->value, "testConfigChange2");
+}
} // namespace aapt
diff --git a/tools/aapt2/util/Files.cpp b/tools/aapt2/util/Files.cpp
index 02e4beaed949..8ae55b8868c3 100644
--- a/tools/aapt2/util/Files.cpp
+++ b/tools/aapt2/util/Files.cpp
@@ -189,7 +189,7 @@ void AppendPath(std::string* base, StringPiece part) {
base->append(part.data(), part.size());
}
-std::string BuildPath(std::vector<const StringPiece>&& args) {
+std::string BuildPath(const std::vector<StringPiece>& args) {
if (args.empty()) {
return "";
}
diff --git a/tools/aapt2/util/Files.h b/tools/aapt2/util/Files.h
index 42eeaf2d2e2a..c1a42446ec3b 100644
--- a/tools/aapt2/util/Files.h
+++ b/tools/aapt2/util/Files.h
@@ -60,7 +60,7 @@ FileType GetFileType(const std::string& path);
void AppendPath(std::string* base, android::StringPiece part);
// Concatenates the list of paths and separates each part with the directory separator.
-std::string BuildPath(std::vector<const android::StringPiece>&& args);
+std::string BuildPath(const std::vector<android::StringPiece>& args);
// Makes all the directories in `path`. The last element in the path is interpreted as a directory.
bool mkdirs(const std::string& path);
diff --git a/tools/aapt2/xml/XmlPullParser.cpp b/tools/aapt2/xml/XmlPullParser.cpp
index 8abc26d67c1f..1527d68a6c3b 100644
--- a/tools/aapt2/xml/XmlPullParser.cpp
+++ b/tools/aapt2/xml/XmlPullParser.cpp
@@ -309,7 +309,14 @@ void XMLCALL XmlPullParser::EndCdataSectionHandler(void* user_data) {
}
std::optional<StringPiece> FindAttribute(const XmlPullParser* parser, StringPiece name) {
- auto iter = parser->FindAttribute("", name);
+ return FindAttribute(parser, "", name);
+}
+
+std::optional<android::StringPiece> FindAttribute(const XmlPullParser* parser,
+ android::StringPiece namespace_uri,
+ android::StringPiece name) {
+ auto iter = parser->FindAttribute(namespace_uri, name);
+
if (iter != parser->end_attributes()) {
return StringPiece(util::TrimWhitespace(iter->value));
}
diff --git a/tools/aapt2/xml/XmlPullParser.h b/tools/aapt2/xml/XmlPullParser.h
index 64274d032c61..d65ba6fb56e3 100644
--- a/tools/aapt2/xml/XmlPullParser.h
+++ b/tools/aapt2/xml/XmlPullParser.h
@@ -194,6 +194,13 @@ std::optional<android::StringPiece> FindAttribute(const XmlPullParser* parser,
android::StringPiece name);
/**
+ * Finds the attribute in the current element within the given namespace.
+ */
+std::optional<android::StringPiece> FindAttribute(const XmlPullParser* parser,
+ android::StringPiece namespace_uri,
+ android::StringPiece name);
+
+/**
* Finds the attribute in the current element within the global namespace. The
* attribute's value
* must not be the empty string.
diff --git a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/AslConverter.java b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/AslConverter.java
index 191f38d3df80..718d8987c13b 100644
--- a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/AslConverter.java
+++ b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/AslConverter.java
@@ -62,13 +62,11 @@ public class AslConverter {
XmlUtils.getSingleChildElement(
document, XmlUtils.HR_TAG_APP_METADATA_BUNDLES, true);
- return new AndroidSafetyLabelFactory()
- .createFromHrElements(XmlUtils.listOf(appMetadataBundles));
+ return new AndroidSafetyLabelFactory().createFromHrElement(appMetadataBundles);
case ON_DEVICE:
Element bundleEle =
XmlUtils.getSingleChildElement(document, XmlUtils.OD_TAG_BUNDLE, true);
- return new AndroidSafetyLabelFactory()
- .createFromOdElements(XmlUtils.listOf(bundleEle));
+ return new AndroidSafetyLabelFactory().createFromOdElement(bundleEle);
default:
throw new IllegalStateException("Unrecognized input format.");
}
@@ -91,14 +89,10 @@ public class AslConverter {
switch (format) {
case HUMAN_READABLE:
- for (var child : asl.toHrDomElements(document)) {
- document.appendChild(child);
- }
+ document.appendChild(asl.toHrDomElement(document));
break;
case ON_DEVICE:
- for (var child : asl.toOdDomElements(document)) {
- document.appendChild(child);
- }
+ document.appendChild(asl.toOdDomElement(document));
break;
default:
throw new IllegalStateException("Unrecognized input format.");
diff --git a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/AndroidSafetyLabel.java b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/AndroidSafetyLabel.java
index 72140a17297c..8b2fd93df889 100644
--- a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/AndroidSafetyLabel.java
+++ b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/AndroidSafetyLabel.java
@@ -21,8 +21,6 @@ import com.android.asllib.util.XmlUtils;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
-import java.util.List;
-
public class AndroidSafetyLabel implements AslMarshallable {
private final Long mVersion;
@@ -46,36 +44,34 @@ public class AndroidSafetyLabel implements AslMarshallable {
}
/** Creates an on-device DOM element from an {@link AndroidSafetyLabel} */
- @Override
- public List<Element> toOdDomElements(Document doc) {
+ public Element toOdDomElement(Document doc) {
Element aslEle = doc.createElement(XmlUtils.OD_TAG_BUNDLE);
aslEle.appendChild(XmlUtils.createOdLongEle(doc, XmlUtils.OD_NAME_VERSION, mVersion));
if (mSafetyLabels != null) {
- XmlUtils.appendChildren(aslEle, mSafetyLabels.toOdDomElements(doc));
+ aslEle.appendChild(mSafetyLabels.toOdDomElement(doc));
}
if (mSystemAppSafetyLabel != null) {
- XmlUtils.appendChildren(aslEle, mSystemAppSafetyLabel.toOdDomElements(doc));
+ aslEle.appendChild(mSystemAppSafetyLabel.toOdDomElement(doc));
}
if (mTransparencyInfo != null) {
- XmlUtils.appendChildren(aslEle, mTransparencyInfo.toOdDomElements(doc));
+ aslEle.appendChild(mTransparencyInfo.toOdDomElement(doc));
}
- return XmlUtils.listOf(aslEle);
+ return aslEle;
}
/** Creates the human-readable DOM elements from the AslMarshallable Java Object. */
- @Override
- public List<Element> toHrDomElements(Document doc) {
+ public Element toHrDomElement(Document doc) {
Element aslEle = doc.createElement(XmlUtils.HR_TAG_APP_METADATA_BUNDLES);
aslEle.setAttribute(XmlUtils.HR_ATTR_VERSION, String.valueOf(mVersion));
if (mSafetyLabels != null) {
- XmlUtils.appendChildren(aslEle, mSafetyLabels.toHrDomElements(doc));
+ aslEle.appendChild(mSafetyLabels.toHrDomElement(doc));
}
if (mSystemAppSafetyLabel != null) {
- XmlUtils.appendChildren(aslEle, mSystemAppSafetyLabel.toHrDomElements(doc));
+ aslEle.appendChild(mSystemAppSafetyLabel.toHrDomElement(doc));
}
if (mTransparencyInfo != null) {
- XmlUtils.appendChildren(aslEle, mTransparencyInfo.toHrDomElements(doc));
+ aslEle.appendChild(mTransparencyInfo.toHrDomElement(doc));
}
- return XmlUtils.listOf(aslEle);
+ return aslEle;
}
}
diff --git a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/AndroidSafetyLabelFactory.java b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/AndroidSafetyLabelFactory.java
index c53cbbf99a46..b9eb2a35e63b 100644
--- a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/AndroidSafetyLabelFactory.java
+++ b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/AndroidSafetyLabelFactory.java
@@ -21,65 +21,117 @@ import com.android.asllib.util.XmlUtils;
import org.w3c.dom.Element;
-import java.util.List;
+import java.util.Map;
+import java.util.Set;
public class AndroidSafetyLabelFactory implements AslMarshallableFactory<AndroidSafetyLabel> {
+ private final Map<Long, Set<String>> mRecognizedHrAttrs =
+ Map.ofEntries(Map.entry(1L, Set.of(XmlUtils.HR_ATTR_VERSION)));
+ private final Map<Long, Set<String>> mRequiredHrAttrs =
+ Map.ofEntries(Map.entry(1L, Set.of(XmlUtils.HR_ATTR_VERSION)));
+ private final Map<Long, Set<String>> mRecognizedHrEles =
+ Map.ofEntries(
+ Map.entry(
+ 1L,
+ Set.of(
+ XmlUtils.HR_TAG_SYSTEM_APP_SAFETY_LABEL,
+ XmlUtils.HR_TAG_SAFETY_LABELS,
+ XmlUtils.HR_TAG_TRANSPARENCY_INFO)));
+ private final Map<Long, Set<String>> mRequiredHrEles =
+ Map.ofEntries(
+ Map.entry(1L, Set.of()),
+ Map.entry(
+ 2L,
+ Set.of(
+ XmlUtils.HR_TAG_SYSTEM_APP_SAFETY_LABEL,
+ XmlUtils.HR_TAG_TRANSPARENCY_INFO)));
+ private final Map<Long, Set<String>> mRecognizedOdEleNames =
+ Map.ofEntries(
+ Map.entry(
+ 1L,
+ Set.of(
+ XmlUtils.OD_NAME_VERSION,
+ XmlUtils.OD_NAME_SAFETY_LABELS,
+ XmlUtils.OD_NAME_SYSTEM_APP_SAFETY_LABEL,
+ XmlUtils.OD_NAME_TRANSPARENCY_INFO)));
+ private final Map<Long, Set<String>> mRequiredOdEleNames =
+ Map.ofEntries(
+ Map.entry(1L, Set.of(XmlUtils.OD_NAME_VERSION)),
+ Map.entry(
+ 2L,
+ Set.of(
+ XmlUtils.OD_NAME_VERSION,
+ XmlUtils.OD_NAME_SYSTEM_APP_SAFETY_LABEL,
+ XmlUtils.OD_NAME_TRANSPARENCY_INFO)));
/** Creates an {@link AndroidSafetyLabel} from human-readable DOM element */
- @Override
- public AndroidSafetyLabel createFromHrElements(List<Element> appMetadataBundles)
+ public AndroidSafetyLabel createFromHrElement(Element appMetadataBundlesEle)
throws MalformedXmlException {
- Element appMetadataBundlesEle = XmlUtils.getSingleElement(appMetadataBundles);
long version = XmlUtils.tryGetVersion(appMetadataBundlesEle);
+ XmlUtils.throwIfExtraneousAttributes(
+ appMetadataBundlesEle, XmlUtils.getMostRecentVersion(mRecognizedHrAttrs, version));
+ XmlUtils.throwIfExtraneousChildrenHr(
+ appMetadataBundlesEle, XmlUtils.getMostRecentVersion(mRecognizedHrEles, version));
Element safetyLabelsEle =
XmlUtils.getSingleChildElement(
- appMetadataBundlesEle, XmlUtils.HR_TAG_SAFETY_LABELS, false);
+ appMetadataBundlesEle,
+ XmlUtils.HR_TAG_SAFETY_LABELS,
+ XmlUtils.getMostRecentVersion(mRequiredHrEles, version));
SafetyLabels safetyLabels =
- new SafetyLabelsFactory().createFromHrElements(XmlUtils.listOf(safetyLabelsEle));
+ new SafetyLabelsFactory().createFromHrElement(safetyLabelsEle, version);
Element systemAppSafetyLabelEle =
XmlUtils.getSingleChildElement(
- appMetadataBundlesEle, XmlUtils.HR_TAG_SYSTEM_APP_SAFETY_LABEL, false);
+ appMetadataBundlesEle,
+ XmlUtils.HR_TAG_SYSTEM_APP_SAFETY_LABEL,
+ XmlUtils.getMostRecentVersion(mRequiredHrEles, version));
SystemAppSafetyLabel systemAppSafetyLabel =
new SystemAppSafetyLabelFactory()
- .createFromHrElements(XmlUtils.listOf(systemAppSafetyLabelEle));
+ .createFromHrElement(systemAppSafetyLabelEle, version);
Element transparencyInfoEle =
XmlUtils.getSingleChildElement(
- appMetadataBundlesEle, XmlUtils.HR_TAG_TRANSPARENCY_INFO, false);
+ appMetadataBundlesEle,
+ XmlUtils.HR_TAG_TRANSPARENCY_INFO,
+ XmlUtils.getMostRecentVersion(mRequiredHrEles, version));
TransparencyInfo transparencyInfo =
- new TransparencyInfoFactory()
- .createFromHrElements(XmlUtils.listOf(transparencyInfoEle));
+ new TransparencyInfoFactory().createFromHrElement(transparencyInfoEle, version);
return new AndroidSafetyLabel(
version, systemAppSafetyLabel, safetyLabels, transparencyInfo);
}
/** Creates an {@link AndroidSafetyLabel} from on-device DOM elements */
- @Override
- public AndroidSafetyLabel createFromOdElements(List<Element> elements)
- throws MalformedXmlException {
- Element bundleEle = XmlUtils.getSingleElement(elements);
+ public AndroidSafetyLabel createFromOdElement(Element bundleEle) throws MalformedXmlException {
Long version = XmlUtils.getOdLongEle(bundleEle, XmlUtils.OD_NAME_VERSION, true);
+ XmlUtils.throwIfExtraneousChildrenOd(
+ bundleEle, XmlUtils.getMostRecentVersion(mRecognizedOdEleNames, version));
Element safetyLabelsEle =
- XmlUtils.getOdPbundleWithName(bundleEle, XmlUtils.OD_NAME_SAFETY_LABELS, false);
+ XmlUtils.getOdPbundleWithName(
+ bundleEle,
+ XmlUtils.OD_NAME_SAFETY_LABELS,
+ XmlUtils.getMostRecentVersion(mRequiredOdEleNames, version));
SafetyLabels safetyLabels =
- new SafetyLabelsFactory().createFromOdElements(XmlUtils.listOf(safetyLabelsEle));
+ new SafetyLabelsFactory().createFromOdElement(safetyLabelsEle, version);
Element systemAppSafetyLabelEle =
XmlUtils.getOdPbundleWithName(
- bundleEle, XmlUtils.OD_NAME_SYSTEM_APP_SAFETY_LABEL, false);
+ bundleEle,
+ XmlUtils.OD_NAME_SYSTEM_APP_SAFETY_LABEL,
+ XmlUtils.getMostRecentVersion(mRequiredOdEleNames, version));
SystemAppSafetyLabel systemAppSafetyLabel =
new SystemAppSafetyLabelFactory()
- .createFromOdElements(XmlUtils.listOf(systemAppSafetyLabelEle));
+ .createFromOdElement(systemAppSafetyLabelEle, version);
Element transparencyInfoEle =
- XmlUtils.getOdPbundleWithName(bundleEle, XmlUtils.OD_NAME_TRANSPARENCY_INFO, false);
+ XmlUtils.getOdPbundleWithName(
+ bundleEle,
+ XmlUtils.OD_NAME_TRANSPARENCY_INFO,
+ XmlUtils.getMostRecentVersion(mRequiredOdEleNames, version));
TransparencyInfo transparencyInfo =
- new TransparencyInfoFactory()
- .createFromOdElements(XmlUtils.listOf(transparencyInfoEle));
+ new TransparencyInfoFactory().createFromOdElement(transparencyInfoEle, version);
return new AndroidSafetyLabel(
version, systemAppSafetyLabel, safetyLabels, transparencyInfo);
diff --git a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/AppInfo.java b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/AppInfo.java
index f39722589a96..d2557aec5f82 100644
--- a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/AppInfo.java
+++ b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/AppInfo.java
@@ -25,36 +25,107 @@ import java.util.List;
/** AppInfo representation */
public class AppInfo implements AslMarshallable {
- private final Boolean mApsCompliant;
+ private final String mTitle;
+ private final String mDescription;
+ private final Boolean mContainsAds;
+ private final Boolean mObeyAps;
+ private final Boolean mAdsFingerprinting;
+ private final Boolean mSecurityFingerprinting;
private final String mPrivacyPolicy;
+ private final List<String> mSecurityEndpoints;
private final List<String> mFirstPartyEndpoints;
private final List<String> mServiceProviderEndpoints;
+ private final String mCategory;
+ private final String mEmail;
+ private final String mWebsite;
+
+ private final Boolean mApsCompliant;
+ private final String mDeveloperId;
+ private final String mApplicationId;
+
+ // private final String mPrivacyPolicy;
+ // private final List<String> mFirstPartyEndpoints;
+ // private final List<String> mServiceProviderEndpoints;
public AppInfo(
- Boolean apsCompliant,
+ String title,
+ String description,
+ Boolean containsAds,
+ Boolean obeyAps,
+ Boolean adsFingerprinting,
+ Boolean securityFingerprinting,
String privacyPolicy,
+ List<String> securityEndpoints,
List<String> firstPartyEndpoints,
- List<String> serviceProviderEndpoints) {
- this.mApsCompliant = apsCompliant;
+ List<String> serviceProviderEndpoints,
+ String category,
+ String email,
+ String website,
+ Boolean apsCompliant,
+ String developerId,
+ String applicationId) {
+ this.mTitle = title;
+ this.mDescription = description;
+ this.mContainsAds = containsAds;
+ this.mObeyAps = obeyAps;
+ this.mAdsFingerprinting = adsFingerprinting;
+ this.mSecurityFingerprinting = securityFingerprinting;
this.mPrivacyPolicy = privacyPolicy;
+ this.mSecurityEndpoints = securityEndpoints;
this.mFirstPartyEndpoints = firstPartyEndpoints;
this.mServiceProviderEndpoints = serviceProviderEndpoints;
+ this.mCategory = category;
+ this.mEmail = email;
+ this.mWebsite = website;
+ this.mApsCompliant = apsCompliant;
+ this.mDeveloperId = developerId;
+ this.mApplicationId = applicationId;
}
/** Creates an on-device DOM element from the {@link SafetyLabels}. */
- @Override
- public List<Element> toOdDomElements(Document doc) {
+ public Element toOdDomElement(Document doc) {
Element appInfoEle = XmlUtils.createPbundleEleWithName(doc, XmlUtils.OD_NAME_APP_INFO);
- if (this.mApsCompliant != null) {
+
+ if (this.mTitle != null) {
+ appInfoEle.appendChild(XmlUtils.createOdStringEle(doc, XmlUtils.OD_NAME_TITLE, mTitle));
+ }
+ if (this.mDescription != null) {
+ appInfoEle.appendChild(
+ XmlUtils.createOdStringEle(doc, XmlUtils.OD_NAME_DESCRIPTION, mDescription));
+ }
+ if (this.mContainsAds != null) {
+ appInfoEle.appendChild(
+ XmlUtils.createOdBooleanEle(doc, XmlUtils.OD_NAME_CONTAINS_ADS, mContainsAds));
+ }
+ if (this.mObeyAps != null) {
+ appInfoEle.appendChild(
+ XmlUtils.createOdBooleanEle(doc, XmlUtils.OD_NAME_OBEY_APS, mObeyAps));
+ }
+ if (this.mAdsFingerprinting != null) {
appInfoEle.appendChild(
XmlUtils.createOdBooleanEle(
- doc, XmlUtils.OD_NAME_APS_COMPLIANT, mApsCompliant));
+ doc, XmlUtils.OD_NAME_ADS_FINGERPRINTING, mAdsFingerprinting));
+ }
+ if (this.mSecurityFingerprinting != null) {
+ appInfoEle.appendChild(
+ XmlUtils.createOdBooleanEle(
+ doc,
+ XmlUtils.OD_NAME_SECURITY_FINGERPRINTING,
+ mSecurityFingerprinting));
}
if (this.mPrivacyPolicy != null) {
appInfoEle.appendChild(
XmlUtils.createOdStringEle(
doc, XmlUtils.OD_NAME_PRIVACY_POLICY, mPrivacyPolicy));
}
+ if (this.mSecurityEndpoints != null) {
+ appInfoEle.appendChild(
+ XmlUtils.createOdArray(
+ doc,
+ XmlUtils.OD_TAG_STRING_ARRAY,
+ XmlUtils.OD_NAME_SECURITY_ENDPOINTS,
+ mSecurityEndpoints));
+ }
if (this.mFirstPartyEndpoints != null) {
appInfoEle.appendChild(
XmlUtils.createOdArray(
@@ -71,27 +142,88 @@ public class AppInfo implements AslMarshallable {
XmlUtils.OD_NAME_SERVICE_PROVIDER_ENDPOINTS,
mServiceProviderEndpoints));
}
- return XmlUtils.listOf(appInfoEle);
+ if (this.mCategory != null) {
+ appInfoEle.appendChild(
+ XmlUtils.createOdStringEle(doc, XmlUtils.OD_NAME_CATEGORY, this.mCategory));
+ }
+ if (this.mEmail != null) {
+ appInfoEle.appendChild(
+ XmlUtils.createOdStringEle(doc, XmlUtils.OD_NAME_EMAIL, this.mEmail));
+ }
+ if (this.mWebsite != null) {
+ appInfoEle.appendChild(
+ XmlUtils.createOdStringEle(doc, XmlUtils.OD_NAME_WEBSITE, this.mWebsite));
+ }
+
+ if (this.mApsCompliant != null) {
+ appInfoEle.appendChild(
+ XmlUtils.createOdBooleanEle(
+ doc, XmlUtils.OD_NAME_APS_COMPLIANT, mApsCompliant));
+ }
+ if (this.mDeveloperId != null) {
+ appInfoEle.appendChild(
+ XmlUtils.createOdStringEle(doc, XmlUtils.OD_NAME_DEVELOPER_ID, mDeveloperId));
+ }
+ if (this.mApplicationId != null) {
+ appInfoEle.appendChild(
+ XmlUtils.createOdStringEle(
+ doc, XmlUtils.OD_NAME_APPLICATION_ID, mApplicationId));
+ }
+ return appInfoEle;
}
/** Creates the human-readable DOM elements from the AslMarshallable Java Object. */
- @Override
- public List<Element> toHrDomElements(Document doc) {
+ public Element toHrDomElement(Document doc) {
Element appInfoEle = doc.createElement(XmlUtils.HR_TAG_APP_INFO);
- if (this.mApsCompliant != null) {
+
+ if (this.mTitle != null) {
+ appInfoEle.setAttribute(XmlUtils.HR_ATTR_TITLE, this.mTitle);
+ }
+ if (this.mDescription != null) {
+ appInfoEle.setAttribute(XmlUtils.HR_ATTR_DESCRIPTION, this.mDescription);
+ }
+ if (this.mContainsAds != null) {
appInfoEle.setAttribute(
- XmlUtils.HR_ATTR_APS_COMPLIANT, String.valueOf(this.mApsCompliant));
+ XmlUtils.HR_ATTR_CONTAINS_ADS, String.valueOf(this.mContainsAds));
+ }
+ if (this.mObeyAps != null) {
+ appInfoEle.setAttribute(XmlUtils.HR_ATTR_OBEY_APS, String.valueOf(this.mObeyAps));
+ }
+ if (this.mAdsFingerprinting != null) {
+ appInfoEle.setAttribute(
+ XmlUtils.HR_ATTR_ADS_FINGERPRINTING, String.valueOf(this.mAdsFingerprinting));
+ }
+ if (this.mSecurityFingerprinting != null) {
+ appInfoEle.setAttribute(
+ XmlUtils.HR_ATTR_SECURITY_FINGERPRINTING,
+ String.valueOf(this.mSecurityFingerprinting));
}
if (this.mPrivacyPolicy != null) {
appInfoEle.setAttribute(XmlUtils.HR_ATTR_PRIVACY_POLICY, this.mPrivacyPolicy);
}
+ if (this.mSecurityEndpoints != null) {
+ appInfoEle.setAttribute(
+ XmlUtils.HR_ATTR_SECURITY_ENDPOINTS, String.join("|", this.mSecurityEndpoints));
+ }
+ if (this.mCategory != null) {
+ appInfoEle.setAttribute(XmlUtils.HR_ATTR_CATEGORY, this.mCategory);
+ }
+ if (this.mEmail != null) {
+ appInfoEle.setAttribute(XmlUtils.HR_ATTR_EMAIL, this.mEmail);
+ }
+ if (this.mWebsite != null) {
+ appInfoEle.setAttribute(XmlUtils.HR_ATTR_WEBSITE, this.mWebsite);
+ }
+ if (this.mApsCompliant != null) {
+ appInfoEle.setAttribute(
+ XmlUtils.HR_ATTR_APS_COMPLIANT, String.valueOf(this.mApsCompliant));
+ }
if (this.mFirstPartyEndpoints != null) {
appInfoEle.appendChild(
XmlUtils.createHrArray(
doc, XmlUtils.HR_TAG_FIRST_PARTY_ENDPOINTS, mFirstPartyEndpoints));
}
-
if (this.mServiceProviderEndpoints != null) {
appInfoEle.appendChild(
XmlUtils.createHrArray(
@@ -99,7 +231,13 @@ public class AppInfo implements AslMarshallable {
XmlUtils.HR_TAG_SERVICE_PROVIDER_ENDPOINTS,
mServiceProviderEndpoints));
}
+ if (this.mDeveloperId != null) {
+ appInfoEle.setAttribute(XmlUtils.HR_ATTR_DEVELOPER_ID, this.mDeveloperId);
+ }
+ if (this.mApplicationId != null) {
+ appInfoEle.setAttribute(XmlUtils.HR_ATTR_APPLICATION_ID, this.mApplicationId);
+ }
- return XmlUtils.listOf(appInfoEle);
+ return appInfoEle;
}
}
diff --git a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/AppInfoFactory.java b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/AppInfoFactory.java
index 6ad202765218..5ecf5cf0b723 100644
--- a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/AppInfoFactory.java
+++ b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/AppInfoFactory.java
@@ -16,60 +16,239 @@
package com.android.asllib.marshallable;
-import com.android.asllib.util.AslgenUtil;
import com.android.asllib.util.MalformedXmlException;
import com.android.asllib.util.XmlUtils;
import org.w3c.dom.Element;
import java.util.List;
+import java.util.Map;
+import java.util.Set;
public class AppInfoFactory implements AslMarshallableFactory<AppInfo> {
+ // We don't need to support V1 for HR.
+ private final Map<Long, Set<String>> mRecognizedHrAttrs =
+ Map.ofEntries(
+ Map.entry(
+ 2L,
+ Set.of(
+ XmlUtils.HR_ATTR_APS_COMPLIANT,
+ XmlUtils.HR_ATTR_PRIVACY_POLICY,
+ XmlUtils.HR_ATTR_DEVELOPER_ID,
+ XmlUtils.HR_ATTR_APPLICATION_ID)));
+ private final Map<Long, Set<String>> mRequiredHrAttrs =
+ Map.ofEntries(
+ Map.entry(
+ 2L,
+ Set.of(
+ XmlUtils.HR_ATTR_APS_COMPLIANT,
+ XmlUtils.HR_ATTR_PRIVACY_POLICY,
+ XmlUtils.HR_ATTR_DEVELOPER_ID,
+ XmlUtils.HR_ATTR_APPLICATION_ID)));
+ private final Map<Long, Set<String>> mRecognizedHrEles =
+ Map.ofEntries(
+ Map.entry(
+ 2L,
+ Set.of(
+ XmlUtils.HR_TAG_FIRST_PARTY_ENDPOINTS,
+ XmlUtils.HR_TAG_SERVICE_PROVIDER_ENDPOINTS)));
+ private final Map<Long, Set<String>> mRequiredHrEles =
+ Map.ofEntries(
+ Map.entry(
+ 2L,
+ Set.of(
+ XmlUtils.HR_TAG_FIRST_PARTY_ENDPOINTS,
+ XmlUtils.HR_TAG_SERVICE_PROVIDER_ENDPOINTS)));
+ private final Map<Long, Set<String>> mRecognizedOdEleNames =
+ Map.ofEntries(
+ Map.entry(
+ 1L,
+ Set.of(
+ XmlUtils.OD_NAME_TITLE,
+ XmlUtils.OD_NAME_DESCRIPTION,
+ XmlUtils.OD_NAME_CONTAINS_ADS,
+ XmlUtils.OD_NAME_OBEY_APS,
+ XmlUtils.OD_NAME_ADS_FINGERPRINTING,
+ XmlUtils.OD_NAME_SECURITY_FINGERPRINTING,
+ XmlUtils.OD_NAME_PRIVACY_POLICY,
+ XmlUtils.OD_NAME_SECURITY_ENDPOINTS,
+ XmlUtils.OD_NAME_FIRST_PARTY_ENDPOINTS,
+ XmlUtils.OD_NAME_SERVICE_PROVIDER_ENDPOINTS,
+ XmlUtils.OD_NAME_CATEGORY,
+ XmlUtils.OD_NAME_EMAIL,
+ XmlUtils.OD_NAME_WEBSITE)),
+ Map.entry(
+ 2L,
+ Set.of(
+ XmlUtils.OD_NAME_APS_COMPLIANT,
+ XmlUtils.OD_NAME_PRIVACY_POLICY,
+ XmlUtils.OD_NAME_FIRST_PARTY_ENDPOINTS,
+ XmlUtils.OD_NAME_SERVICE_PROVIDER_ENDPOINTS,
+ XmlUtils.OD_NAME_DEVELOPER_ID,
+ XmlUtils.OD_NAME_APPLICATION_ID)));
+ private final Map<Long, Set<String>> mRequiredOdEles =
+ Map.ofEntries(
+ Map.entry(
+ 1L,
+ Set.of(
+ XmlUtils.OD_NAME_TITLE,
+ XmlUtils.OD_NAME_DESCRIPTION,
+ XmlUtils.OD_NAME_CONTAINS_ADS,
+ XmlUtils.OD_NAME_OBEY_APS,
+ XmlUtils.OD_NAME_ADS_FINGERPRINTING,
+ XmlUtils.OD_NAME_SECURITY_FINGERPRINTING,
+ XmlUtils.OD_NAME_PRIVACY_POLICY,
+ XmlUtils.OD_NAME_SECURITY_ENDPOINTS,
+ XmlUtils.OD_NAME_FIRST_PARTY_ENDPOINTS,
+ XmlUtils.OD_NAME_SERVICE_PROVIDER_ENDPOINTS,
+ XmlUtils.OD_NAME_CATEGORY)),
+ Map.entry(
+ 2L,
+ Set.of(
+ XmlUtils.OD_NAME_APS_COMPLIANT,
+ XmlUtils.OD_NAME_PRIVACY_POLICY,
+ XmlUtils.OD_NAME_FIRST_PARTY_ENDPOINTS,
+ XmlUtils.OD_NAME_SERVICE_PROVIDER_ENDPOINTS,
+ XmlUtils.OD_NAME_DEVELOPER_ID,
+ XmlUtils.OD_NAME_APPLICATION_ID)));
/** Creates a {@link AppInfo} from the human-readable DOM element. */
- @Override
- public AppInfo createFromHrElements(List<Element> elements) throws MalformedXmlException {
- Element appInfoEle = XmlUtils.getSingleElement(elements);
+ public AppInfo createFromHrElement(Element appInfoEle, long version)
+ throws MalformedXmlException {
if (appInfoEle == null) {
- AslgenUtil.logI("No AppInfo found in hr format.");
return null;
}
+ XmlUtils.throwIfExtraneousAttributes(
+ appInfoEle, XmlUtils.getMostRecentVersion(mRecognizedHrAttrs, version));
+ XmlUtils.throwIfExtraneousChildrenHr(
+ appInfoEle, XmlUtils.getMostRecentVersion(mRecognizedHrEles, version));
- Boolean apsCompliant =
- XmlUtils.getBoolAttr(appInfoEle, XmlUtils.HR_ATTR_APS_COMPLIANT, true);
+ var requiredHrAttrs = XmlUtils.getMostRecentVersion(mRequiredHrAttrs, version);
+ var requiredHrEles = XmlUtils.getMostRecentVersion(mRequiredHrEles, version);
+
+ String title = XmlUtils.getStringAttr(appInfoEle, XmlUtils.HR_ATTR_TITLE, requiredHrAttrs);
+ String description =
+ XmlUtils.getStringAttr(appInfoEle, XmlUtils.HR_ATTR_DESCRIPTION, requiredHrAttrs);
+ Boolean containsAds =
+ XmlUtils.getBoolAttr(appInfoEle, XmlUtils.HR_ATTR_CONTAINS_ADS, requiredHrAttrs);
+ Boolean obeyAps =
+ XmlUtils.getBoolAttr(appInfoEle, XmlUtils.HR_ATTR_OBEY_APS, requiredHrAttrs);
+ Boolean adsFingerprinting =
+ XmlUtils.getBoolAttr(
+ appInfoEle, XmlUtils.HR_ATTR_ADS_FINGERPRINTING, requiredHrAttrs);
+ Boolean securityFingerprinting =
+ XmlUtils.getBoolAttr(
+ appInfoEle, XmlUtils.HR_ATTR_SECURITY_FINGERPRINTING, requiredHrAttrs);
String privacyPolicy =
- XmlUtils.getStringAttr(appInfoEle, XmlUtils.HR_ATTR_PRIVACY_POLICY, true);
+ XmlUtils.getStringAttr(
+ appInfoEle, XmlUtils.HR_ATTR_PRIVACY_POLICY, requiredHrAttrs);
+ List<String> securityEndpoints =
+ XmlUtils.getPipelineSplitAttr(
+ appInfoEle, XmlUtils.HR_ATTR_SECURITY_ENDPOINTS, requiredHrAttrs);
+ String category =
+ XmlUtils.getStringAttr(appInfoEle, XmlUtils.HR_ATTR_CATEGORY, requiredHrAttrs);
+ String email = XmlUtils.getStringAttr(appInfoEle, XmlUtils.HR_ATTR_EMAIL, requiredHrAttrs);
+ String website =
+ XmlUtils.getStringAttr(appInfoEle, XmlUtils.HR_ATTR_WEBSITE, requiredHrAttrs);
+ String developerId =
+ XmlUtils.getStringAttr(appInfoEle, XmlUtils.HR_ATTR_DEVELOPER_ID, requiredHrAttrs);
+ String applicationId =
+ XmlUtils.getStringAttr(
+ appInfoEle, XmlUtils.HR_ATTR_APPLICATION_ID, requiredHrAttrs);
+
+ Boolean apsCompliant =
+ XmlUtils.getBoolAttr(appInfoEle, XmlUtils.HR_ATTR_APS_COMPLIANT, requiredHrAttrs);
List<String> firstPartyEndpoints =
XmlUtils.getHrItemsAsStrings(
- appInfoEle, XmlUtils.HR_TAG_FIRST_PARTY_ENDPOINTS, true);
+ appInfoEle, XmlUtils.HR_TAG_FIRST_PARTY_ENDPOINTS, requiredHrEles);
List<String> serviceProviderEndpoints =
XmlUtils.getHrItemsAsStrings(
- appInfoEle, XmlUtils.HR_TAG_SERVICE_PROVIDER_ENDPOINTS, true);
+ appInfoEle, XmlUtils.HR_TAG_SERVICE_PROVIDER_ENDPOINTS, requiredHrEles);
return new AppInfo(
- apsCompliant, privacyPolicy, firstPartyEndpoints, serviceProviderEndpoints);
+ title,
+ description,
+ containsAds,
+ obeyAps,
+ adsFingerprinting,
+ securityFingerprinting,
+ privacyPolicy,
+ securityEndpoints,
+ firstPartyEndpoints,
+ serviceProviderEndpoints,
+ category,
+ email,
+ website,
+ apsCompliant,
+ developerId,
+ applicationId);
}
/** Creates an {@link AslMarshallableFactory} from on-device DOM elements */
- @Override
- public AppInfo createFromOdElements(List<Element> elements) throws MalformedXmlException {
- Element appInfoEle = XmlUtils.getSingleElement(elements);
+ public AppInfo createFromOdElement(Element appInfoEle, long version)
+ throws MalformedXmlException {
if (appInfoEle == null) {
- AslgenUtil.logI("No AppInfo found in od format.");
return null;
}
+ XmlUtils.throwIfExtraneousChildrenOd(
+ appInfoEle, XmlUtils.getMostRecentVersion(mRecognizedOdEleNames, version));
+ var requiredOdEles = XmlUtils.getMostRecentVersion(mRequiredOdEles, version);
- Boolean apsCompliant =
- XmlUtils.getOdBoolEle(appInfoEle, XmlUtils.OD_NAME_APS_COMPLIANT, true);
+ String title = XmlUtils.getOdStringEle(appInfoEle, XmlUtils.OD_NAME_TITLE, requiredOdEles);
+ String description =
+ XmlUtils.getOdStringEle(appInfoEle, XmlUtils.OD_NAME_DESCRIPTION, requiredOdEles);
+ Boolean containsAds =
+ XmlUtils.getOdBoolEle(appInfoEle, XmlUtils.OD_NAME_CONTAINS_ADS, requiredOdEles);
+ Boolean obeyAps =
+ XmlUtils.getOdBoolEle(appInfoEle, XmlUtils.OD_NAME_OBEY_APS, requiredOdEles);
+ Boolean adsFingerprinting =
+ XmlUtils.getOdBoolEle(
+ appInfoEle, XmlUtils.OD_NAME_ADS_FINGERPRINTING, requiredOdEles);
+ Boolean securityFingerprinting =
+ XmlUtils.getOdBoolEle(
+ appInfoEle, XmlUtils.OD_NAME_SECURITY_FINGERPRINTING, requiredOdEles);
String privacyPolicy =
- XmlUtils.getOdStringEle(appInfoEle, XmlUtils.OD_NAME_PRIVACY_POLICY, true);
+ XmlUtils.getOdStringEle(
+ appInfoEle, XmlUtils.OD_NAME_PRIVACY_POLICY, requiredOdEles);
+ List<String> securityEndpoints =
+ XmlUtils.getOdStringArray(
+ appInfoEle, XmlUtils.OD_NAME_SECURITY_ENDPOINTS, requiredOdEles);
+ String category =
+ XmlUtils.getOdStringEle(appInfoEle, XmlUtils.OD_NAME_CATEGORY, requiredOdEles);
+ String email = XmlUtils.getOdStringEle(appInfoEle, XmlUtils.OD_NAME_EMAIL, requiredOdEles);
+ String website =
+ XmlUtils.getOdStringEle(appInfoEle, XmlUtils.OD_NAME_WEBSITE, requiredOdEles);
+ String developerId =
+ XmlUtils.getOdStringEle(appInfoEle, XmlUtils.OD_NAME_DEVELOPER_ID, requiredOdEles);
+ String applicationId =
+ XmlUtils.getOdStringEle(
+ appInfoEle, XmlUtils.OD_NAME_APPLICATION_ID, requiredOdEles);
+
+ Boolean apsCompliant =
+ XmlUtils.getOdBoolEle(appInfoEle, XmlUtils.OD_NAME_APS_COMPLIANT, requiredOdEles);
List<String> firstPartyEndpoints =
- XmlUtils.getOdStringArray(appInfoEle, XmlUtils.OD_NAME_FIRST_PARTY_ENDPOINTS, true);
+ XmlUtils.getOdStringArray(
+ appInfoEle, XmlUtils.OD_NAME_FIRST_PARTY_ENDPOINTS, requiredOdEles);
List<String> serviceProviderEndpoints =
XmlUtils.getOdStringArray(
- appInfoEle, XmlUtils.OD_NAME_SERVICE_PROVIDER_ENDPOINTS, true);
+ appInfoEle, XmlUtils.OD_NAME_SERVICE_PROVIDER_ENDPOINTS, requiredOdEles);
return new AppInfo(
- apsCompliant, privacyPolicy, firstPartyEndpoints, serviceProviderEndpoints);
+ title,
+ description,
+ containsAds,
+ obeyAps,
+ adsFingerprinting,
+ securityFingerprinting,
+ privacyPolicy,
+ securityEndpoints,
+ firstPartyEndpoints,
+ serviceProviderEndpoints,
+ category,
+ email,
+ website,
+ apsCompliant,
+ developerId,
+ applicationId);
}
}
diff --git a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/AslMarshallable.java b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/AslMarshallable.java
index 0a70e7d0d74b..b6c789dc5ec7 100644
--- a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/AslMarshallable.java
+++ b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/AslMarshallable.java
@@ -16,16 +16,11 @@
package com.android.asllib.marshallable;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-import java.util.List;
-
public interface AslMarshallable {
/** Creates the on-device DOM elements from the AslMarshallable Java Object. */
- List<Element> toOdDomElements(Document doc);
+ // List<Element> toOdDomElements(Document doc);
/** Creates the human-readable DOM elements from the AslMarshallable Java Object. */
- List<Element> toHrDomElements(Document doc);
+ // List<Element> toHrDomElements(Document doc);
}
diff --git a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/AslMarshallableFactory.java b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/AslMarshallableFactory.java
index 39582900f3a0..67f106948e79 100644
--- a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/AslMarshallableFactory.java
+++ b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/AslMarshallableFactory.java
@@ -16,17 +16,11 @@
package com.android.asllib.marshallable;
-import com.android.asllib.util.MalformedXmlException;
-
-import org.w3c.dom.Element;
-
-import java.util.List;
-
public interface AslMarshallableFactory<T extends AslMarshallable> {
/** Creates an {@link AslMarshallableFactory} from human-readable DOM elements */
- T createFromHrElements(List<Element> elements) throws MalformedXmlException;
+ // T createFromHrElements(List<Element> elements) throws MalformedXmlException;
/** Creates an {@link AslMarshallableFactory} from on-device DOM elements */
- T createFromOdElements(List<Element> elements) throws MalformedXmlException;
+ // T createFromOdElements(List<Element> elements) throws MalformedXmlException;
}
diff --git a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/DataCategory.java b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/DataCategory.java
index c16d18b34360..501f170ad317 100644
--- a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/DataCategory.java
+++ b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/DataCategory.java
@@ -57,18 +57,16 @@ public class DataCategory implements AslMarshallable {
}
/** Creates on-device DOM element(s) from the {@link DataCategory}. */
- @Override
- public List<Element> toOdDomElements(Document doc) {
+ public Element toOdDomElement(Document doc) {
Element dataCategoryEle = XmlUtils.createPbundleEleWithName(doc, this.getCategoryName());
for (DataType dataType : mDataTypes.values()) {
- XmlUtils.appendChildren(dataCategoryEle, dataType.toOdDomElements(doc));
+ dataCategoryEle.appendChild(dataType.toOdDomElement(doc));
}
- return XmlUtils.listOf(dataCategoryEle);
+ return dataCategoryEle;
}
/** Creates the human-readable DOM elements from the AslMarshallable Java Object. */
- @Override
- public List<Element> toHrDomElements(Document doc) {
+ public List<Element> toHrDomElement(Document doc) {
throw new IllegalStateException(
"Turning DataCategory or DataType into human-readable DOM elements requires"
+ " visibility into parent elements. The logic resides in DataLabels.");
diff --git a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/DataCategoryFactory.java b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/DataCategoryFactory.java
index 724416285acd..fb84e508ff7f 100644
--- a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/DataCategoryFactory.java
+++ b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/DataCategoryFactory.java
@@ -23,13 +23,11 @@ import com.android.asllib.util.XmlUtils;
import org.w3c.dom.Element;
import java.util.LinkedHashMap;
-import java.util.List;
import java.util.Map;
public class DataCategoryFactory {
/** Creates an {@link AslMarshallableFactory} from on-device DOM elements */
- public DataCategory createFromOdElements(List<Element> elements) throws MalformedXmlException {
- Element dataCategoryEle = XmlUtils.getSingleElement(elements);
+ public DataCategory createFromOdElement(Element dataCategoryEle) throws MalformedXmlException {
Map<String, DataType> dataTypeMap = new LinkedHashMap<String, DataType>();
String categoryName = dataCategoryEle.getAttribute(XmlUtils.OD_ATTR_NAME);
var odDataTypes = XmlUtils.asElementList(dataCategoryEle.getChildNodes());
@@ -45,9 +43,7 @@ public class DataCategoryFactory {
"Unrecognized data type name %s for category %s",
dataTypeName, categoryName));
}
- dataTypeMap.put(
- dataTypeName,
- new DataTypeFactory().createFromOdElements(XmlUtils.listOf(odDataTypeEle)));
+ dataTypeMap.put(dataTypeName, new DataTypeFactory().createFromOdElement(odDataTypeEle));
}
return new DataCategory(categoryName, dataTypeMap);
diff --git a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/DataLabels.java b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/DataLabels.java
index 3c93c88cd060..2cf7c82fdb3e 100644
--- a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/DataLabels.java
+++ b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/DataLabels.java
@@ -22,7 +22,6 @@ import com.android.asllib.util.XmlUtils;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
-import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@@ -57,20 +56,18 @@ public class DataLabels implements AslMarshallable {
}
/** Gets the on-device DOM element for the {@link DataLabels}. */
- @Override
- public List<Element> toOdDomElements(Document doc) {
+ public Element toOdDomElement(Document doc) {
Element dataLabelsEle =
XmlUtils.createPbundleEleWithName(doc, XmlUtils.OD_NAME_DATA_LABELS);
maybeAppendDataUsages(doc, dataLabelsEle, mDataCollected, XmlUtils.OD_NAME_DATA_COLLECTED);
maybeAppendDataUsages(doc, dataLabelsEle, mDataShared, XmlUtils.OD_NAME_DATA_SHARED);
- return XmlUtils.listOf(dataLabelsEle);
+ return dataLabelsEle;
}
/** Creates the human-readable DOM elements from the AslMarshallable Java Object. */
- @Override
- public List<Element> toHrDomElements(Document doc) {
+ public Element toHrDomElement(Document doc) {
Element dataLabelsEle = doc.createElement(XmlUtils.HR_TAG_DATA_LABELS);
maybeAppendHrDataUsages(
doc, dataLabelsEle, mDataCollected, XmlUtils.HR_TAG_DATA_COLLECTED, false);
@@ -78,7 +75,7 @@ public class DataLabels implements AslMarshallable {
doc, dataLabelsEle, mDataCollected, XmlUtils.HR_TAG_DATA_COLLECTED_EPHEMERAL, true);
maybeAppendHrDataUsages(
doc, dataLabelsEle, mDataShared, XmlUtils.HR_TAG_DATA_SHARED, false);
- return XmlUtils.listOf(dataLabelsEle);
+ return dataLabelsEle;
}
private void maybeAppendDataUsages(
@@ -96,7 +93,7 @@ public class DataLabels implements AslMarshallable {
DataCategory dataCategory = dataCategoriesMap.get(dataCategoryName);
for (String dataTypeName : dataCategory.getDataTypes().keySet()) {
DataType dataType = dataCategory.getDataTypes().get(dataTypeName);
- XmlUtils.appendChildren(dataCategoryEle, dataType.toOdDomElements(doc));
+ dataCategoryEle.appendChild(dataType.toOdDomElement(doc));
}
dataUsageEle.appendChild(dataCategoryEle);
}
diff --git a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/DataLabelsFactory.java b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/DataLabelsFactory.java
index c4d88761835a..b1cf3ea0d39a 100644
--- a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/DataLabelsFactory.java
+++ b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/DataLabelsFactory.java
@@ -31,9 +31,7 @@ import java.util.Map;
public class DataLabelsFactory implements AslMarshallableFactory<DataLabels> {
/** Creates a {@link DataLabels} from the human-readable DOM element. */
- @Override
- public DataLabels createFromHrElements(List<Element> elements) throws MalformedXmlException {
- Element ele = XmlUtils.getSingleElement(elements);
+ public DataLabels createFromHrElement(Element ele) throws MalformedXmlException {
if (ele == null) {
AslgenUtil.logI("Found no DataLabels in hr format.");
return null;
@@ -83,9 +81,7 @@ public class DataLabelsFactory implements AslMarshallableFactory<DataLabels> {
}
/** Creates an {@link AslMarshallableFactory} from on-device DOM elements */
- @Override
- public DataLabels createFromOdElements(List<Element> elements) throws MalformedXmlException {
- Element dataLabelsEle = XmlUtils.getSingleElement(elements);
+ public DataLabels createFromOdElement(Element dataLabelsEle) throws MalformedXmlException {
if (dataLabelsEle == null) {
AslgenUtil.logI("Found no DataLabels in od format.");
return null;
@@ -111,7 +107,7 @@ public class DataLabelsFactory implements AslMarshallableFactory<DataLabels> {
for (Element dataCategoryEle : dataCategoryEles) {
String dataCategoryName = dataCategoryEle.getAttribute(XmlUtils.OD_ATTR_NAME);
DataCategory dataCategory =
- new DataCategoryFactory().createFromOdElements(List.of(dataCategoryEle));
+ new DataCategoryFactory().createFromOdElement(dataCategoryEle);
dataCategoryMap.put(dataCategoryName, dataCategory);
}
return dataCategoryMap;
diff --git a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/DataType.java b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/DataType.java
index 284a4b804435..83bb61144efa 100644
--- a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/DataType.java
+++ b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/DataType.java
@@ -172,8 +172,8 @@ public class DataType implements AslMarshallable {
return mEphemeral;
}
- @Override
- public List<Element> toOdDomElements(Document doc) {
+ /** Gets the on-device dom element */
+ public Element toOdDomElement(Document doc) {
Element dataTypeEle = XmlUtils.createPbundleEleWithName(doc, this.getDataTypeName());
if (!this.getPurposes().isEmpty()) {
dataTypeEle.appendChild(
@@ -197,11 +197,10 @@ public class DataType implements AslMarshallable {
this.getIsSharingOptional(),
XmlUtils.OD_NAME_IS_SHARING_OPTIONAL);
maybeAddBoolToOdElement(doc, dataTypeEle, this.getEphemeral(), XmlUtils.OD_NAME_EPHEMERAL);
- return XmlUtils.listOf(dataTypeEle);
+ return dataTypeEle;
}
/** Creates the human-readable DOM elements from the AslMarshallable Java Object. */
- @Override
public List<Element> toHrDomElements(Document doc) {
throw new IllegalStateException(
"Turning DataCategory or DataType into human-readable DOM elements requires"
diff --git a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/DataTypeFactory.java b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/DataTypeFactory.java
index a5559d801349..96a58fa34707 100644
--- a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/DataTypeFactory.java
+++ b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/DataTypeFactory.java
@@ -64,8 +64,7 @@ public class DataTypeFactory {
}
/** Creates an {@link AslMarshallableFactory} from on-device DOM elements */
- public DataType createFromOdElements(List<Element> elements) throws MalformedXmlException {
- Element odDataTypeEle = XmlUtils.getSingleElement(elements);
+ public DataType createFromOdElement(Element odDataTypeEle) throws MalformedXmlException {
String dataTypeName = odDataTypeEle.getAttribute(XmlUtils.OD_ATTR_NAME);
List<Integer> purposeInts =
XmlUtils.getOdIntArray(odDataTypeEle, XmlUtils.OD_NAME_PURPOSES, true);
diff --git a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/DeveloperInfo.java b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/DeveloperInfo.java
new file mode 100644
index 000000000000..96a64dc29526
--- /dev/null
+++ b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/DeveloperInfo.java
@@ -0,0 +1,167 @@
+/*
+ * 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.asllib.marshallable;
+
+import com.android.asllib.util.XmlUtils;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/** DeveloperInfo representation */
+public class DeveloperInfo implements AslMarshallable {
+ public enum DeveloperRelationship {
+ OEM(0),
+ ODM(1),
+ SOC(2),
+ OTA(3),
+ CARRIER(4),
+ AOSP(5),
+ OTHER(6);
+
+ private final int mValue;
+
+ DeveloperRelationship(int value) {
+ this.mValue = value;
+ }
+
+ /** Get the int value associated with the DeveloperRelationship. */
+ public int getValue() {
+ return mValue;
+ }
+
+ /** Get the DeveloperRelationship associated with the int value. */
+ public static DeveloperInfo.DeveloperRelationship forValue(int value) {
+ for (DeveloperInfo.DeveloperRelationship e : values()) {
+ if (e.getValue() == value) {
+ return e;
+ }
+ }
+ throw new IllegalArgumentException("No DeveloperRelationship enum for value: " + value);
+ }
+
+ /** Get the DeveloperRelationship associated with the human-readable String. */
+ public static DeveloperInfo.DeveloperRelationship forString(String s) {
+ for (DeveloperInfo.DeveloperRelationship e : values()) {
+ if (e.toString().equals(s)) {
+ return e;
+ }
+ }
+ throw new IllegalArgumentException("No DeveloperRelationship enum for str: " + s);
+ }
+
+ /** Human-readable String representation of DeveloperRelationship. */
+ public String toString() {
+ return this.name().toLowerCase();
+ }
+ }
+
+ private final String mName;
+ private final String mEmail;
+ private final String mAddress;
+ private final String mCountryRegion;
+ private final DeveloperRelationship mDeveloperRelationship;
+ private final String mWebsite;
+ private final String mAppDeveloperRegistryId;
+
+ public DeveloperInfo(
+ String name,
+ String email,
+ String address,
+ String countryRegion,
+ DeveloperRelationship developerRelationship,
+ String website,
+ String appDeveloperRegistryId) {
+ this.mName = name;
+ this.mEmail = email;
+ this.mAddress = address;
+ this.mCountryRegion = countryRegion;
+ this.mDeveloperRelationship = developerRelationship;
+ this.mWebsite = website;
+ this.mAppDeveloperRegistryId = appDeveloperRegistryId;
+ }
+
+ /** Creates an on-device DOM element from the {@link SafetyLabels}. */
+ public Element toOdDomElement(Document doc) {
+ Element developerInfoEle =
+ XmlUtils.createPbundleEleWithName(doc, XmlUtils.OD_NAME_DEVELOPER_INFO);
+ if (mName != null) {
+ developerInfoEle.appendChild(
+ XmlUtils.createOdStringEle(doc, XmlUtils.OD_NAME_NAME, mName));
+ }
+ if (mEmail != null) {
+ developerInfoEle.appendChild(
+ XmlUtils.createOdStringEle(doc, XmlUtils.OD_NAME_EMAIL, mEmail));
+ }
+ if (mAddress != null) {
+ developerInfoEle.appendChild(
+ XmlUtils.createOdStringEle(doc, XmlUtils.OD_NAME_ADDRESS, mAddress));
+ }
+ if (mCountryRegion != null) {
+ developerInfoEle.appendChild(
+ XmlUtils.createOdStringEle(
+ doc, XmlUtils.OD_NAME_COUNTRY_REGION, mCountryRegion));
+ }
+ if (mDeveloperRelationship != null) {
+ developerInfoEle.appendChild(
+ XmlUtils.createOdLongEle(
+ doc,
+ XmlUtils.OD_NAME_DEVELOPER_RELATIONSHIP,
+ mDeveloperRelationship.getValue()));
+ }
+ if (mWebsite != null) {
+ developerInfoEle.appendChild(
+ XmlUtils.createOdStringEle(doc, XmlUtils.OD_NAME_WEBSITE, mWebsite));
+ }
+ if (mAppDeveloperRegistryId != null) {
+ developerInfoEle.appendChild(
+ XmlUtils.createOdStringEle(
+ doc,
+ XmlUtils.OD_NAME_APP_DEVELOPER_REGISTRY_ID,
+ mAppDeveloperRegistryId));
+ }
+ return developerInfoEle;
+ }
+
+ /** Creates the human-readable DOM elements from the AslMarshallable Java Object. */
+ public Element toHrDomElement(Document doc) {
+ Element developerInfoEle = doc.createElement(XmlUtils.HR_TAG_DEVELOPER_INFO);
+ if (mName != null) {
+ developerInfoEle.setAttribute(XmlUtils.HR_ATTR_NAME, mName);
+ }
+ if (mEmail != null) {
+ developerInfoEle.setAttribute(XmlUtils.HR_ATTR_EMAIL, mEmail);
+ }
+ if (mAddress != null) {
+ developerInfoEle.setAttribute(XmlUtils.HR_ATTR_ADDRESS, mAddress);
+ }
+ if (mCountryRegion != null) {
+ developerInfoEle.setAttribute(XmlUtils.HR_ATTR_COUNTRY_REGION, mCountryRegion);
+ }
+ if (mDeveloperRelationship != null) {
+ developerInfoEle.setAttribute(
+ XmlUtils.HR_ATTR_DEVELOPER_RELATIONSHIP, mDeveloperRelationship.toString());
+ }
+ if (mWebsite != null) {
+ developerInfoEle.setAttribute(XmlUtils.HR_ATTR_WEBSITE, mWebsite);
+ }
+ if (mAppDeveloperRegistryId != null) {
+ developerInfoEle.setAttribute(
+ XmlUtils.HR_ATTR_APP_DEVELOPER_REGISTRY_ID, mAppDeveloperRegistryId);
+ }
+ return developerInfoEle;
+ }
+}
diff --git a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/DeveloperInfoFactory.java b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/DeveloperInfoFactory.java
new file mode 100644
index 000000000000..e82a53a53b25
--- /dev/null
+++ b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/DeveloperInfoFactory.java
@@ -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.asllib.marshallable;
+
+import com.android.asllib.util.AslgenUtil;
+import com.android.asllib.util.MalformedXmlException;
+import com.android.asllib.util.XmlUtils;
+
+import org.w3c.dom.Element;
+
+public class DeveloperInfoFactory implements AslMarshallableFactory<DeveloperInfo> {
+ /** Creates a {@link DeveloperInfo} from the human-readable DOM element. */
+ public DeveloperInfo createFromHrElement(Element developerInfoEle)
+ throws MalformedXmlException {
+ if (developerInfoEle == null) {
+ AslgenUtil.logI("No DeveloperInfo found in hr format.");
+ return null;
+ }
+ String name = XmlUtils.getStringAttr(developerInfoEle, XmlUtils.HR_ATTR_NAME, true);
+ String email = XmlUtils.getStringAttr(developerInfoEle, XmlUtils.HR_ATTR_EMAIL, true);
+ String address = XmlUtils.getStringAttr(developerInfoEle, XmlUtils.HR_ATTR_ADDRESS, true);
+ String countryRegion =
+ XmlUtils.getStringAttr(developerInfoEle, XmlUtils.HR_ATTR_COUNTRY_REGION, true);
+ DeveloperInfo.DeveloperRelationship developerRelationship =
+ DeveloperInfo.DeveloperRelationship.forString(
+ XmlUtils.getStringAttr(
+ developerInfoEle, XmlUtils.HR_ATTR_DEVELOPER_RELATIONSHIP, true));
+ String website = XmlUtils.getStringAttr(developerInfoEle, XmlUtils.HR_ATTR_WEBSITE, false);
+ String appDeveloperRegistryId =
+ XmlUtils.getStringAttr(
+ developerInfoEle, XmlUtils.HR_ATTR_APP_DEVELOPER_REGISTRY_ID, false);
+ return new DeveloperInfo(
+ name,
+ email,
+ address,
+ countryRegion,
+ developerRelationship,
+ website,
+ appDeveloperRegistryId);
+ }
+
+ /** Creates an {@link AslMarshallableFactory} from on-device DOM elements */
+ public DeveloperInfo createFromOdElement(Element developerInfoEle)
+ throws MalformedXmlException {
+ if (developerInfoEle == null) {
+ AslgenUtil.logI("No DeveloperInfo found in od format.");
+ return null;
+ }
+ String name = XmlUtils.getOdStringEle(developerInfoEle, XmlUtils.OD_NAME_NAME, true);
+ String email = XmlUtils.getOdStringEle(developerInfoEle, XmlUtils.OD_NAME_EMAIL, true);
+ String address = XmlUtils.getOdStringEle(developerInfoEle, XmlUtils.OD_NAME_ADDRESS, true);
+ String countryRegion =
+ XmlUtils.getOdStringEle(developerInfoEle, XmlUtils.OD_NAME_COUNTRY_REGION, true);
+ DeveloperInfo.DeveloperRelationship developerRelationship =
+ DeveloperInfo.DeveloperRelationship.forValue(
+ (int)
+ (long)
+ XmlUtils.getOdLongEle(
+ developerInfoEle,
+ XmlUtils.OD_NAME_DEVELOPER_RELATIONSHIP,
+ true));
+ String website = XmlUtils.getOdStringEle(developerInfoEle, XmlUtils.OD_NAME_WEBSITE, false);
+ String appDeveloperRegistryId =
+ XmlUtils.getOdStringEle(
+ developerInfoEle, XmlUtils.OD_NAME_APP_DEVELOPER_REGISTRY_ID, false);
+ return new DeveloperInfo(
+ name,
+ email,
+ address,
+ countryRegion,
+ developerRelationship,
+ website,
+ appDeveloperRegistryId);
+ }
+}
diff --git a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/SafetyLabels.java b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/SafetyLabels.java
index 2a4e130981af..1a83c02de3e4 100644
--- a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/SafetyLabels.java
+++ b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/SafetyLabels.java
@@ -21,40 +21,50 @@ import com.android.asllib.util.XmlUtils;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
-import java.util.List;
-
/** Safety Label representation containing zero or more {@link DataCategory} for data shared */
public class SafetyLabels implements AslMarshallable {
private final DataLabels mDataLabels;
+ private final SecurityLabels mSecurityLabels;
+ private final ThirdPartyVerification mThirdPartyVerification;
- public SafetyLabels(DataLabels dataLabels) {
+ public SafetyLabels(
+ DataLabels dataLabels,
+ SecurityLabels securityLabels,
+ ThirdPartyVerification thirdPartyVerification) {
this.mDataLabels = dataLabels;
- }
-
- /** Returns the data label for the safety label */
- public DataLabels getDataLabel() {
- return mDataLabels;
+ this.mSecurityLabels = securityLabels;
+ this.mThirdPartyVerification = thirdPartyVerification;
}
/** Creates an on-device DOM element from the {@link SafetyLabels}. */
- @Override
- public List<Element> toOdDomElements(Document doc) {
+ public Element toOdDomElement(Document doc) {
Element safetyLabelsEle =
XmlUtils.createPbundleEleWithName(doc, XmlUtils.OD_NAME_SAFETY_LABELS);
if (mDataLabels != null) {
- XmlUtils.appendChildren(safetyLabelsEle, mDataLabels.toOdDomElements(doc));
+ safetyLabelsEle.appendChild(mDataLabels.toOdDomElement(doc));
+ }
+ if (mSecurityLabels != null) {
+ safetyLabelsEle.appendChild(mSecurityLabels.toOdDomElement(doc));
}
- return XmlUtils.listOf(safetyLabelsEle);
+ if (mThirdPartyVerification != null) {
+ safetyLabelsEle.appendChild(mThirdPartyVerification.toOdDomElement(doc));
+ }
+ return safetyLabelsEle;
}
/** Creates the human-readable DOM elements from the AslMarshallable Java Object. */
- @Override
- public List<Element> toHrDomElements(Document doc) {
+ public Element toHrDomElement(Document doc) {
Element safetyLabelsEle = doc.createElement(XmlUtils.HR_TAG_SAFETY_LABELS);
if (mDataLabels != null) {
- XmlUtils.appendChildren(safetyLabelsEle, mDataLabels.toHrDomElements(doc));
+ safetyLabelsEle.appendChild(mDataLabels.toHrDomElement(doc));
+ }
+ if (mSecurityLabels != null) {
+ safetyLabelsEle.appendChild(mSecurityLabels.toHrDomElement(doc));
+ }
+ if (mThirdPartyVerification != null) {
+ safetyLabelsEle.appendChild(mThirdPartyVerification.toHrDomElement(doc));
}
- return XmlUtils.listOf(safetyLabelsEle);
+ return safetyLabelsEle;
}
}
diff --git a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/SafetyLabelsFactory.java b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/SafetyLabelsFactory.java
index 2738337b7080..35804d9351b4 100644
--- a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/SafetyLabelsFactory.java
+++ b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/SafetyLabelsFactory.java
@@ -16,54 +16,109 @@
package com.android.asllib.marshallable;
-import com.android.asllib.util.AslgenUtil;
import com.android.asllib.util.MalformedXmlException;
import com.android.asllib.util.XmlUtils;
import org.w3c.dom.Element;
-import java.util.List;
+import java.util.Map;
+import java.util.Set;
public class SafetyLabelsFactory implements AslMarshallableFactory<SafetyLabels> {
+ private final Map<Long, Set<String>> mRecognizedHrAttrs =
+ Map.ofEntries(Map.entry(1L, Set.of()));
+ private final Map<Long, Set<String>> mRequiredHrAttrs = Map.ofEntries(Map.entry(1L, Set.of()));
+ private final Map<Long, Set<String>> mRecognizedHrEles =
+ Map.ofEntries(
+ Map.entry(
+ 1L,
+ Set.of(
+ XmlUtils.HR_TAG_DATA_LABELS,
+ XmlUtils.HR_TAG_SECURITY_LABELS,
+ XmlUtils.HR_TAG_THIRD_PARTY_VERIFICATION)),
+ Map.entry(2L, Set.of(XmlUtils.HR_TAG_DATA_LABELS)));
+ private final Map<Long, Set<String>> mRequiredHrEles = Map.ofEntries(Map.entry(1L, Set.of()));
+ private final Map<Long, Set<String>> mRecognizedOdEleNames =
+ Map.ofEntries(
+ Map.entry(
+ 1L,
+ Set.of(
+ XmlUtils.OD_NAME_DATA_LABELS,
+ XmlUtils.OD_NAME_SECURITY_LABELS,
+ XmlUtils.OD_NAME_THIRD_PARTY_VERIFICATION)),
+ Map.entry(2L, Set.of(XmlUtils.OD_NAME_DATA_LABELS)));
+ private final Map<Long, Set<String>> mRequiredOdEles = Map.ofEntries(Map.entry(1L, Set.of()));
/** Creates a {@link SafetyLabels} from the human-readable DOM element. */
- @Override
- public SafetyLabels createFromHrElements(List<Element> elements) throws MalformedXmlException {
- Element safetyLabelsEle = XmlUtils.getSingleElement(elements);
+ public SafetyLabels createFromHrElement(Element safetyLabelsEle, long version)
+ throws MalformedXmlException {
if (safetyLabelsEle == null) {
- AslgenUtil.logI("No SafetyLabels found in hr format.");
return null;
}
+ XmlUtils.throwIfExtraneousAttributes(
+ safetyLabelsEle, XmlUtils.getMostRecentVersion(mRecognizedHrAttrs, version));
+ XmlUtils.throwIfExtraneousChildrenHr(
+ safetyLabelsEle, XmlUtils.getMostRecentVersion(mRecognizedHrEles, version));
+
+ var requiredHrEles = XmlUtils.getMostRecentVersion(mRequiredHrEles, version);
+
DataLabels dataLabels =
new DataLabelsFactory()
- .createFromHrElements(
- XmlUtils.listOf(
- XmlUtils.getSingleChildElement(
- safetyLabelsEle,
- XmlUtils.HR_TAG_DATA_LABELS,
- false)));
- return new SafetyLabels(dataLabels);
+ .createFromHrElement(
+ XmlUtils.getSingleChildElement(
+ safetyLabelsEle,
+ XmlUtils.HR_TAG_DATA_LABELS,
+ requiredHrEles));
+ SecurityLabels securityLabels =
+ new SecurityLabelsFactory()
+ .createFromHrElement(
+ XmlUtils.getSingleChildElement(
+ safetyLabelsEle,
+ XmlUtils.HR_TAG_SECURITY_LABELS,
+ requiredHrEles));
+ ThirdPartyVerification thirdPartyVerification =
+ new ThirdPartyVerificationFactory()
+ .createFromHrElement(
+ XmlUtils.getSingleChildElement(
+ safetyLabelsEle,
+ XmlUtils.HR_TAG_THIRD_PARTY_VERIFICATION,
+ requiredHrEles));
+ return new SafetyLabels(dataLabels, securityLabels, thirdPartyVerification);
}
/** Creates an {@link AslMarshallableFactory} from on-device DOM elements */
- @Override
- public SafetyLabels createFromOdElements(List<Element> elements) throws MalformedXmlException {
- Element safetyLabelsEle = XmlUtils.getSingleElement(elements);
+ public SafetyLabels createFromOdElement(Element safetyLabelsEle, long version)
+ throws MalformedXmlException {
if (safetyLabelsEle == null) {
- AslgenUtil.logI("No SafetyLabels found in od format.");
return null;
}
+ XmlUtils.throwIfExtraneousChildrenOd(
+ safetyLabelsEle, XmlUtils.getMostRecentVersion(mRecognizedOdEleNames, version));
+ var requiredOdEles = XmlUtils.getMostRecentVersion(mRequiredOdEles, version);
+
DataLabels dataLabels =
new DataLabelsFactory()
- .createFromOdElements(
- XmlUtils.listOf(
- XmlUtils.getOdPbundleWithName(
- safetyLabelsEle,
- XmlUtils.OD_NAME_DATA_LABELS,
- false)));
-
- return new SafetyLabels(dataLabels);
+ .createFromOdElement(
+ XmlUtils.getOdPbundleWithName(
+ safetyLabelsEle,
+ XmlUtils.OD_NAME_DATA_LABELS,
+ requiredOdEles));
+ SecurityLabels securityLabels =
+ new SecurityLabelsFactory()
+ .createFromOdElement(
+ XmlUtils.getOdPbundleWithName(
+ safetyLabelsEle,
+ XmlUtils.OD_NAME_SECURITY_LABELS,
+ requiredOdEles));
+ ThirdPartyVerification thirdPartyVerification =
+ new ThirdPartyVerificationFactory()
+ .createFromOdElement(
+ XmlUtils.getOdPbundleWithName(
+ safetyLabelsEle,
+ XmlUtils.OD_NAME_THIRD_PARTY_VERIFICATION,
+ requiredOdEles));
+ return new SafetyLabels(dataLabels, securityLabels, thirdPartyVerification);
}
}
diff --git a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/SecurityLabels.java b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/SecurityLabels.java
index 48643ba0e3ab..ccb84451c96f 100644
--- a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/SecurityLabels.java
+++ b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/SecurityLabels.java
@@ -21,8 +21,6 @@ import com.android.asllib.util.XmlUtils;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
-import java.util.List;
-
/** Security Labels representation */
public class SecurityLabels implements AslMarshallable {
@@ -35,8 +33,7 @@ public class SecurityLabels implements AslMarshallable {
}
/** Creates an on-device DOM element from the {@link SecurityLabels}. */
- @Override
- public List<Element> toOdDomElements(Document doc) {
+ public Element toOdDomElement(Document doc) {
Element ele = XmlUtils.createPbundleEleWithName(doc, XmlUtils.OD_NAME_SECURITY_LABELS);
if (mIsDataDeletable != null) {
ele.appendChild(
@@ -48,12 +45,11 @@ public class SecurityLabels implements AslMarshallable {
XmlUtils.createOdBooleanEle(
doc, XmlUtils.OD_NAME_IS_DATA_ENCRYPTED, mIsDataEncrypted));
}
- return XmlUtils.listOf(ele);
+ return ele;
}
/** Creates the human-readable DOM elements from the AslMarshallable Java Object. */
- @Override
- public List<Element> toHrDomElements(Document doc) {
+ public Element toHrDomElement(Document doc) {
Element ele = doc.createElement(XmlUtils.HR_TAG_SECURITY_LABELS);
if (mIsDataDeletable != null) {
ele.setAttribute(XmlUtils.HR_ATTR_IS_DATA_DELETABLE, String.valueOf(mIsDataDeletable));
@@ -61,6 +57,6 @@ public class SecurityLabels implements AslMarshallable {
if (mIsDataEncrypted != null) {
ele.setAttribute(XmlUtils.HR_ATTR_IS_DATA_ENCRYPTED, String.valueOf(mIsDataEncrypted));
}
- return XmlUtils.listOf(ele);
+ return ele;
}
}
diff --git a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/SecurityLabelsFactory.java b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/SecurityLabelsFactory.java
index 525a80388261..da98a4291b4a 100644
--- a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/SecurityLabelsFactory.java
+++ b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/SecurityLabelsFactory.java
@@ -22,15 +22,10 @@ import com.android.asllib.util.XmlUtils;
import org.w3c.dom.Element;
-import java.util.List;
-
public class SecurityLabelsFactory implements AslMarshallableFactory<SecurityLabels> {
/** Creates a {@link SecurityLabels} from the human-readable DOM element. */
- @Override
- public SecurityLabels createFromHrElements(List<Element> elements)
- throws MalformedXmlException {
- Element ele = XmlUtils.getSingleElement(elements);
+ public SecurityLabels createFromHrElement(Element ele) throws MalformedXmlException {
if (ele == null) {
AslgenUtil.logI("No SecurityLabels found in hr format.");
return null;
@@ -43,10 +38,7 @@ public class SecurityLabelsFactory implements AslMarshallableFactory<SecurityLab
}
/** Creates an {@link AslMarshallableFactory} from on-device DOM elements */
- @Override
- public SecurityLabels createFromOdElements(List<Element> elements)
- throws MalformedXmlException {
- Element ele = XmlUtils.getSingleElement(elements);
+ public SecurityLabels createFromOdElement(Element ele) throws MalformedXmlException {
if (ele == null) {
AslgenUtil.logI("No SecurityLabels found in od format.");
return null;
diff --git a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/SystemAppSafetyLabel.java b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/SystemAppSafetyLabel.java
index 242e7be66d76..10d6e1aaac7d 100644
--- a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/SystemAppSafetyLabel.java
+++ b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/SystemAppSafetyLabel.java
@@ -21,34 +21,43 @@ import com.android.asllib.util.XmlUtils;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
-import java.util.List;
-
/** Safety Label representation containing zero or more {@link DataCategory} for data shared */
public class SystemAppSafetyLabel implements AslMarshallable {
+ private final String mUrl;
private final Boolean mDeclaration;
- public SystemAppSafetyLabel(Boolean d) {
+ public SystemAppSafetyLabel(String url, Boolean d) {
this.mDeclaration = d;
+ this.mUrl = null;
}
/** Creates an on-device DOM element from the {@link SystemAppSafetyLabel}. */
- @Override
- public List<Element> toOdDomElements(Document doc) {
+ public Element toOdDomElement(Document doc) {
Element systemAppSafetyLabelEle =
XmlUtils.createPbundleEleWithName(doc, XmlUtils.OD_NAME_SYSTEM_APP_SAFETY_LABEL);
- systemAppSafetyLabelEle.appendChild(
- XmlUtils.createOdBooleanEle(doc, XmlUtils.OD_NAME_DECLARATION, mDeclaration));
- return XmlUtils.listOf(systemAppSafetyLabelEle);
+ if (mUrl != null) {
+ systemAppSafetyLabelEle.appendChild(
+ XmlUtils.createOdStringEle(doc, XmlUtils.OD_NAME_URL, mUrl));
+ }
+ if (mDeclaration != null) {
+ systemAppSafetyLabelEle.appendChild(
+ XmlUtils.createOdBooleanEle(doc, XmlUtils.OD_NAME_DECLARATION, mDeclaration));
+ }
+ return systemAppSafetyLabelEle;
}
/** Creates the human-readable DOM elements from the AslMarshallable Java Object. */
- @Override
- public List<Element> toHrDomElements(Document doc) {
+ public Element toHrDomElement(Document doc) {
Element systemAppSafetyLabelEle =
doc.createElement(XmlUtils.HR_TAG_SYSTEM_APP_SAFETY_LABEL);
- XmlUtils.maybeSetHrBoolAttr(
- systemAppSafetyLabelEle, XmlUtils.HR_ATTR_DECLARATION, mDeclaration);
- return XmlUtils.listOf(systemAppSafetyLabelEle);
+ if (mUrl != null) {
+ systemAppSafetyLabelEle.setAttribute(XmlUtils.HR_ATTR_URL, mUrl);
+ }
+ if (mDeclaration != null) {
+ systemAppSafetyLabelEle.setAttribute(
+ XmlUtils.HR_ATTR_DECLARATION, String.valueOf(mDeclaration));
+ }
+ return systemAppSafetyLabelEle;
}
}
diff --git a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/SystemAppSafetyLabelFactory.java b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/SystemAppSafetyLabelFactory.java
index 7f4aa7a3b690..971ae9296eb8 100644
--- a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/SystemAppSafetyLabelFactory.java
+++ b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/SystemAppSafetyLabelFactory.java
@@ -16,42 +16,77 @@
package com.android.asllib.marshallable;
-import com.android.asllib.util.AslgenUtil;
import com.android.asllib.util.MalformedXmlException;
import com.android.asllib.util.XmlUtils;
import org.w3c.dom.Element;
-import java.util.List;
+import java.util.Map;
+import java.util.Set;
public class SystemAppSafetyLabelFactory implements AslMarshallableFactory<SystemAppSafetyLabel> {
+ private final Map<Long, Set<String>> mRecognizedHrAttrs =
+ Map.ofEntries(
+ Map.entry(1L, Set.of(XmlUtils.HR_ATTR_URL)),
+ Map.entry(2L, Set.of(XmlUtils.HR_ATTR_DECLARATION)));
+ private final Map<Long, Set<String>> mRequiredHrAttrs =
+ Map.ofEntries(
+ Map.entry(1L, Set.of(XmlUtils.HR_ATTR_URL)),
+ Map.entry(2L, Set.of(XmlUtils.HR_ATTR_DECLARATION)));
+ private final Map<Long, Set<String>> mRecognizedHrEles = Map.ofEntries(Map.entry(1L, Set.of()));
+ private final Map<Long, Set<String>> mRecognizedOdEleNames =
+ Map.ofEntries(
+ Map.entry(1L, Set.of(XmlUtils.OD_NAME_URL)),
+ Map.entry(2L, Set.of(XmlUtils.OD_NAME_DECLARATION)));
+ private final Map<Long, Set<String>> mRequiredOdEleNames =
+ Map.ofEntries(
+ Map.entry(1L, Set.of(XmlUtils.OD_NAME_URL)),
+ Map.entry(2L, Set.of(XmlUtils.OD_NAME_DECLARATION)));
/** Creates a {@link SystemAppSafetyLabel} from the human-readable DOM element. */
- @Override
- public SystemAppSafetyLabel createFromHrElements(List<Element> elements)
+ public SystemAppSafetyLabel createFromHrElement(Element systemAppSafetyLabelEle, long version)
throws MalformedXmlException {
- Element systemAppSafetyLabelEle = XmlUtils.getSingleElement(elements);
if (systemAppSafetyLabelEle == null) {
- AslgenUtil.logI("No SystemAppSafetyLabel found in hr format.");
return null;
}
+ XmlUtils.throwIfExtraneousAttributes(
+ systemAppSafetyLabelEle,
+ XmlUtils.getMostRecentVersion(mRecognizedHrAttrs, version));
+ XmlUtils.throwIfExtraneousChildrenHr(
+ systemAppSafetyLabelEle, XmlUtils.getMostRecentVersion(mRecognizedHrEles, version));
+ String url =
+ XmlUtils.getStringAttr(
+ systemAppSafetyLabelEle,
+ XmlUtils.HR_ATTR_URL,
+ XmlUtils.getMostRecentVersion(mRequiredHrAttrs, version));
Boolean declaration =
- XmlUtils.getBoolAttr(systemAppSafetyLabelEle, XmlUtils.HR_ATTR_DECLARATION, true);
- return new SystemAppSafetyLabel(declaration);
+ XmlUtils.getBoolAttr(
+ systemAppSafetyLabelEle,
+ XmlUtils.HR_ATTR_DECLARATION,
+ XmlUtils.getMostRecentVersion(mRequiredHrAttrs, version));
+ return new SystemAppSafetyLabel(url, declaration);
}
/** Creates an {@link AslMarshallableFactory} from on-device DOM elements */
- @Override
- public SystemAppSafetyLabel createFromOdElements(List<Element> elements)
+ public SystemAppSafetyLabel createFromOdElement(Element systemAppSafetyLabelEle, long version)
throws MalformedXmlException {
- Element systemAppSafetyLabelEle = XmlUtils.getSingleElement(elements);
if (systemAppSafetyLabelEle == null) {
- AslgenUtil.logI("No SystemAppSafetyLabel found in od format.");
return null;
}
+ XmlUtils.throwIfExtraneousChildrenOd(
+ systemAppSafetyLabelEle,
+ XmlUtils.getMostRecentVersion(mRecognizedOdEleNames, version));
+ String url =
+ XmlUtils.getOdStringEle(
+ systemAppSafetyLabelEle,
+ XmlUtils.OD_NAME_URL,
+ XmlUtils.getMostRecentVersion(mRequiredOdEleNames, version));
Boolean declaration =
- XmlUtils.getOdBoolEle(systemAppSafetyLabelEle, XmlUtils.OD_NAME_DECLARATION, true);
- return new SystemAppSafetyLabel(declaration);
+ XmlUtils.getOdBoolEle(
+ systemAppSafetyLabelEle,
+ XmlUtils.OD_NAME_DECLARATION,
+ XmlUtils.getMostRecentVersion(mRequiredOdEleNames, version));
+ return new SystemAppSafetyLabel(url, declaration);
}
}
diff --git a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/ThirdPartyVerification.java b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/ThirdPartyVerification.java
index d74f3f062513..151cdb1e2f51 100644
--- a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/ThirdPartyVerification.java
+++ b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/ThirdPartyVerification.java
@@ -21,8 +21,6 @@ import com.android.asllib.util.XmlUtils;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
-import java.util.List;
-
/** ThirdPartyVerification representation. */
public class ThirdPartyVerification implements AslMarshallable {
@@ -33,19 +31,17 @@ public class ThirdPartyVerification implements AslMarshallable {
}
/** Creates an on-device DOM element from the {@link ThirdPartyVerification}. */
- @Override
- public List<Element> toOdDomElements(Document doc) {
+ public Element toOdDomElement(Document doc) {
Element ele =
XmlUtils.createPbundleEleWithName(doc, XmlUtils.OD_NAME_THIRD_PARTY_VERIFICATION);
ele.appendChild(XmlUtils.createOdStringEle(doc, XmlUtils.OD_NAME_URL, mUrl));
- return XmlUtils.listOf(ele);
+ return ele;
}
/** Creates the human-readable DOM elements from the AslMarshallable Java Object. */
- @Override
- public List<Element> toHrDomElements(Document doc) {
+ public Element toHrDomElement(Document doc) {
Element ele = doc.createElement(XmlUtils.HR_TAG_THIRD_PARTY_VERIFICATION);
ele.setAttribute(XmlUtils.HR_ATTR_URL, mUrl);
- return XmlUtils.listOf(ele);
+ return ele;
}
}
diff --git a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/ThirdPartyVerificationFactory.java b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/ThirdPartyVerificationFactory.java
index 197e7aa77743..f229ad6c861f 100644
--- a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/ThirdPartyVerificationFactory.java
+++ b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/ThirdPartyVerificationFactory.java
@@ -22,16 +22,11 @@ import com.android.asllib.util.XmlUtils;
import org.w3c.dom.Element;
-import java.util.List;
-
public class ThirdPartyVerificationFactory
implements AslMarshallableFactory<ThirdPartyVerification> {
/** Creates a {@link ThirdPartyVerification} from the human-readable DOM element. */
- @Override
- public ThirdPartyVerification createFromHrElements(List<Element> elements)
- throws MalformedXmlException {
- Element ele = XmlUtils.getSingleElement(elements);
+ public ThirdPartyVerification createFromHrElement(Element ele) throws MalformedXmlException {
if (ele == null) {
AslgenUtil.logI("No ThirdPartyVerification found in hr format.");
return null;
@@ -42,10 +37,7 @@ public class ThirdPartyVerificationFactory
}
/** Creates an {@link AslMarshallableFactory} from on-device DOM elements */
- @Override
- public ThirdPartyVerification createFromOdElements(List<Element> elements)
- throws MalformedXmlException {
- Element ele = XmlUtils.getSingleElement(elements);
+ public ThirdPartyVerification createFromOdElement(Element ele) throws MalformedXmlException {
if (ele == null) {
AslgenUtil.logI("No ThirdPartyVerification found in od format.");
return null;
diff --git a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/TransparencyInfo.java b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/TransparencyInfo.java
index 9f789f0b9c1c..f24e6bf58efb 100644
--- a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/TransparencyInfo.java
+++ b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/TransparencyInfo.java
@@ -21,39 +21,39 @@ import com.android.asllib.util.XmlUtils;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
-import java.util.List;
-
/** TransparencyInfo representation containing {@link AppInfo} */
public class TransparencyInfo implements AslMarshallable {
+
+ private final DeveloperInfo mDeveloperInfo;
private final AppInfo mAppInfo;
- public TransparencyInfo(AppInfo appInfo) {
+ public TransparencyInfo(DeveloperInfo developerInfo, AppInfo appInfo) {
+ this.mDeveloperInfo = developerInfo;
this.mAppInfo = appInfo;
}
- /** Gets the {@link AppInfo} of the {@link TransparencyInfo}. */
- public AppInfo getAppInfo() {
- return mAppInfo;
- }
-
/** Creates an on-device DOM element from the {@link TransparencyInfo}. */
- @Override
- public List<Element> toOdDomElements(Document doc) {
+ public Element toOdDomElement(Document doc) {
Element transparencyInfoEle =
XmlUtils.createPbundleEleWithName(doc, XmlUtils.OD_NAME_TRANSPARENCY_INFO);
+ if (mDeveloperInfo != null) {
+ transparencyInfoEle.appendChild(mDeveloperInfo.toOdDomElement(doc));
+ }
if (mAppInfo != null) {
- XmlUtils.appendChildren(transparencyInfoEle, mAppInfo.toOdDomElements(doc));
+ transparencyInfoEle.appendChild(mAppInfo.toOdDomElement(doc));
}
- return XmlUtils.listOf(transparencyInfoEle);
+ return transparencyInfoEle;
}
/** Creates the human-readable DOM elements from the AslMarshallable Java Object. */
- @Override
- public List<Element> toHrDomElements(Document doc) {
+ public Element toHrDomElement(Document doc) {
Element transparencyInfoEle = doc.createElement(XmlUtils.HR_TAG_TRANSPARENCY_INFO);
+ if (mDeveloperInfo != null) {
+ transparencyInfoEle.appendChild(mDeveloperInfo.toHrDomElement(doc));
+ }
if (mAppInfo != null) {
- XmlUtils.appendChildren(transparencyInfoEle, mAppInfo.toHrDomElements(doc));
+ transparencyInfoEle.appendChild(mAppInfo.toHrDomElement(doc));
}
- return XmlUtils.listOf(transparencyInfoEle);
+ return transparencyInfoEle;
}
}
diff --git a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/TransparencyInfoFactory.java b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/TransparencyInfoFactory.java
index 40f2872e4380..9e98941e0d6d 100644
--- a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/TransparencyInfoFactory.java
+++ b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/marshallable/TransparencyInfoFactory.java
@@ -16,47 +16,84 @@
package com.android.asllib.marshallable;
-import com.android.asllib.util.AslgenUtil;
import com.android.asllib.util.MalformedXmlException;
import com.android.asllib.util.XmlUtils;
import org.w3c.dom.Element;
-import java.util.List;
+import java.util.Map;
+import java.util.Set;
public class TransparencyInfoFactory implements AslMarshallableFactory<TransparencyInfo> {
+ private final Map<Long, Set<String>> mRecognizedHrAttrs =
+ Map.ofEntries(Map.entry(1L, Set.of()));
+ private final Map<Long, Set<String>> mRequiredHrAttrs = Map.ofEntries(Map.entry(1L, Set.of()));
+ private final Map<Long, Set<String>> mRecognizedHrEles =
+ Map.ofEntries(
+ Map.entry(1L, Set.of(XmlUtils.HR_TAG_DEVELOPER_INFO, XmlUtils.HR_TAG_APP_INFO)),
+ Map.entry(2L, Set.of(XmlUtils.HR_TAG_APP_INFO)));
+ private final Map<Long, Set<String>> mRequiredHrEles =
+ Map.ofEntries(Map.entry(1L, Set.of()), Map.entry(2L, Set.of(XmlUtils.HR_TAG_APP_INFO)));
+ private final Map<Long, Set<String>> mRecognizedOdEleNames =
+ Map.ofEntries(
+ Map.entry(
+ 1L, Set.of(XmlUtils.OD_NAME_DEVELOPER_INFO, XmlUtils.OD_NAME_APP_INFO)),
+ Map.entry(2L, Set.of(XmlUtils.OD_NAME_APP_INFO)));
+ private final Map<Long, Set<String>> mRequiredOdEles =
+ Map.ofEntries(
+ Map.entry(1L, Set.of()), Map.entry(2L, Set.of(XmlUtils.OD_NAME_APP_INFO)));
/** Creates a {@link TransparencyInfo} from the human-readable DOM element. */
- @Override
- public TransparencyInfo createFromHrElements(List<Element> elements)
+ public TransparencyInfo createFromHrElement(Element transparencyInfoEle, long version)
throws MalformedXmlException {
- Element transparencyInfoEle = XmlUtils.getSingleElement(elements);
if (transparencyInfoEle == null) {
- AslgenUtil.logI("No TransparencyInfo found in hr format.");
return null;
}
+ XmlUtils.throwIfExtraneousAttributes(
+ transparencyInfoEle, XmlUtils.getMostRecentVersion(mRecognizedHrAttrs, version));
+ XmlUtils.throwIfExtraneousChildrenHr(
+ transparencyInfoEle, XmlUtils.getMostRecentVersion(mRecognizedHrEles, version));
+ Element developerInfoEle =
+ XmlUtils.getSingleChildElement(
+ transparencyInfoEle,
+ XmlUtils.HR_TAG_DEVELOPER_INFO,
+ XmlUtils.getMostRecentVersion(mRequiredHrEles, version));
+ DeveloperInfo developerInfo =
+ new DeveloperInfoFactory().createFromHrElement(developerInfoEle);
Element appInfoEle =
- XmlUtils.getSingleChildElement(transparencyInfoEle, XmlUtils.HR_TAG_APP_INFO, true);
- AppInfo appInfo = new AppInfoFactory().createFromHrElements(XmlUtils.listOf(appInfoEle));
+ XmlUtils.getSingleChildElement(
+ transparencyInfoEle,
+ XmlUtils.HR_TAG_APP_INFO,
+ XmlUtils.getMostRecentVersion(mRequiredHrEles, version));
+ AppInfo appInfo = new AppInfoFactory().createFromHrElement(appInfoEle, version);
- return new TransparencyInfo(appInfo);
+ return new TransparencyInfo(developerInfo, appInfo);
}
/** Creates an {@link AslMarshallableFactory} from on-device DOM elements */
- @Override
- public TransparencyInfo createFromOdElements(List<Element> elements)
+ public TransparencyInfo createFromOdElement(Element transparencyInfoEle, long version)
throws MalformedXmlException {
- Element transparencyInfoEle = XmlUtils.getSingleElement(elements);
if (transparencyInfoEle == null) {
- AslgenUtil.logI("No TransparencyInfo found in od format.");
return null;
}
+ XmlUtils.throwIfExtraneousChildrenOd(
+ transparencyInfoEle, XmlUtils.getMostRecentVersion(mRecognizedOdEleNames, version));
+ Element developerInfoEle =
+ XmlUtils.getOdPbundleWithName(
+ transparencyInfoEle,
+ XmlUtils.OD_NAME_DEVELOPER_INFO,
+ XmlUtils.getMostRecentVersion(mRequiredOdEles, version));
+ DeveloperInfo developerInfo =
+ new DeveloperInfoFactory().createFromOdElement(developerInfoEle);
Element appInfoEle =
- XmlUtils.getOdPbundleWithName(transparencyInfoEle, XmlUtils.OD_NAME_APP_INFO, true);
- AppInfo appInfo = new AppInfoFactory().createFromOdElements(XmlUtils.listOf(appInfoEle));
+ XmlUtils.getOdPbundleWithName(
+ transparencyInfoEle,
+ XmlUtils.OD_NAME_APP_INFO,
+ XmlUtils.getMostRecentVersion(mRequiredOdEles, version));
+ AppInfo appInfo = new AppInfoFactory().createFromOdElement(appInfoEle, version);
- return new TransparencyInfo(appInfo);
+ return new TransparencyInfo(developerInfo, appInfo);
}
}
diff --git a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/util/XmlUtils.java b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/util/XmlUtils.java
index 2c1517bdf8ab..52c4390036f3 100644
--- a/tools/app_metadata_bundles/src/lib/java/com/android/asllib/util/XmlUtils.java
+++ b/tools/app_metadata_bundles/src/lib/java/com/android/asllib/util/XmlUtils.java
@@ -25,6 +25,8 @@ import org.w3c.dom.NodeList;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
+import java.util.Map;
+import java.util.Set;
import java.util.stream.Collectors;
public class XmlUtils {
@@ -70,6 +72,8 @@ public class XmlUtils {
public static final String HR_ATTR_ADS_FINGERPRINTING = "adsFingerprinting";
public static final String HR_ATTR_SECURITY_FINGERPRINTING = "securityFingerprinting";
public static final String HR_ATTR_PRIVACY_POLICY = "privacyPolicy";
+ public static final String HR_ATTR_DEVELOPER_ID = "developerId";
+ public static final String HR_ATTR_APPLICATION_ID = "applicationId";
public static final String HR_ATTR_SECURITY_ENDPOINTS = "securityEndpoints";
public static final String HR_TAG_FIRST_PARTY_ENDPOINTS = "first-party-endpoints";
public static final String HR_TAG_SERVICE_PROVIDER_ENDPOINTS = "service-provider-endpoints";
@@ -102,10 +106,12 @@ public class XmlUtils {
public static final String OD_NAME_CONTAINS_ADS = "contains_ads";
public static final String OD_NAME_OBEY_APS = "obey_aps";
public static final String OD_NAME_APS_COMPLIANT = "aps_compliant";
+ public static final String OD_NAME_DEVELOPER_ID = "developer_id";
+ public static final String OD_NAME_APPLICATION_ID = "application_id";
public static final String OD_NAME_ADS_FINGERPRINTING = "ads_fingerprinting";
public static final String OD_NAME_SECURITY_FINGERPRINTING = "security_fingerprinting";
public static final String OD_NAME_PRIVACY_POLICY = "privacy_policy";
- public static final String OD_NAME_SECURITY_ENDPOINT = "security_endpoints";
+ public static final String OD_NAME_SECURITY_ENDPOINTS = "security_endpoints";
public static final String OD_NAME_FIRST_PARTY_ENDPOINTS = "first_party_endpoints";
public static final String OD_NAME_SERVICE_PROVIDER_ENDPOINTS = "service_provider_endpoints";
public static final String OD_NAME_CATEGORY = "category";
@@ -140,6 +146,15 @@ public class XmlUtils {
/**
* Gets the single {@link Element} within {@param parentEle} and having the {@param tagName}.
*/
+ public static Element getSingleChildElement(
+ Node parentEle, String tagName, Set<String> requiredStrings)
+ throws MalformedXmlException {
+ return getSingleChildElement(parentEle, tagName, requiredStrings.contains(tagName));
+ }
+
+ /**
+ * Gets the single {@link Element} within {@param parentEle} and having the {@param tagName}.
+ */
public static Element getSingleChildElement(Node parentEle, String tagName, boolean required)
throws MalformedXmlException {
String parentTagNameForErrorMsg =
@@ -287,19 +302,36 @@ public class XmlUtils {
}
/** Gets a pipeline-split attribute. */
+ public static List<String> getPipelineSplitAttr(
+ Element ele, String attrName, Set<String> requiredNames) throws MalformedXmlException {
+ return getPipelineSplitAttr(ele, attrName, requiredNames.contains(attrName));
+ }
+
+ /** Gets a pipeline-split attribute. */
public static List<String> getPipelineSplitAttr(Element ele, String attrName, boolean required)
throws MalformedXmlException {
List<String> list =
Arrays.stream(ele.getAttribute(attrName).split("\\|")).collect(Collectors.toList());
- if ((list.isEmpty() || list.get(0).isEmpty()) && required) {
- throw new MalformedXmlException(
- String.format(
- "Delimited string %s was required but missing, in %s.",
- attrName, ele.getTagName()));
+ if ((list.isEmpty() || list.get(0).isEmpty())) {
+ if (required) {
+ throw new MalformedXmlException(
+ String.format(
+ "Delimited string %s was required but missing, in %s.",
+ attrName, ele.getTagName()));
+ }
+ return null;
}
return list;
}
+ /**
+ * Gets the single {@link Element} within {@param parentEle} and having the {@param tagName}.
+ */
+ public static Boolean getBoolAttr(Element ele, String attrName, Set<String> requiredStrings)
+ throws MalformedXmlException {
+ return getBoolAttr(ele, attrName, requiredStrings.contains(attrName));
+ }
+
/** Gets a Boolean attribute. */
public static Boolean getBoolAttr(Element ele, String attrName, boolean required)
throws MalformedXmlException {
@@ -314,6 +346,12 @@ public class XmlUtils {
}
/** Gets a Boolean attribute. */
+ public static Boolean getOdBoolEle(Element ele, String nameName, Set<String> requiredNames)
+ throws MalformedXmlException {
+ return getOdBoolEle(ele, nameName, requiredNames.contains(nameName));
+ }
+
+ /** Gets a Boolean attribute. */
public static Boolean getOdBoolEle(Element ele, String nameName, boolean required)
throws MalformedXmlException {
List<Element> boolEles =
@@ -376,6 +414,12 @@ public class XmlUtils {
}
/** Gets an on-device String attribute. */
+ public static String getOdStringEle(Element ele, String nameName, Set<String> requiredNames)
+ throws MalformedXmlException {
+ return getOdStringEle(ele, nameName, requiredNames.contains(nameName));
+ }
+
+ /** Gets an on-device String attribute. */
public static String getOdStringEle(Element ele, String nameName, boolean required)
throws MalformedXmlException {
List<Element> eles =
@@ -404,6 +448,13 @@ public class XmlUtils {
}
/** Gets a OD Pbundle Element attribute with the specified name. */
+ public static Element getOdPbundleWithName(
+ Element ele, String nameName, Set<String> requiredStrings)
+ throws MalformedXmlException {
+ return getOdPbundleWithName(ele, nameName, requiredStrings.contains(nameName));
+ }
+
+ /** Gets a OD Pbundle Element attribute with the specified name. */
public static Element getOdPbundleWithName(Element ele, String nameName, boolean required)
throws MalformedXmlException {
List<Element> eles =
@@ -425,6 +476,14 @@ public class XmlUtils {
return eles.get(0);
}
+ /**
+ * Gets the single {@link Element} within {@param parentEle} and having the {@param tagName}.
+ */
+ public static String getStringAttr(Element ele, String attrName, Set<String> requiredStrings)
+ throws MalformedXmlException {
+ return getStringAttr(ele, attrName, requiredStrings.contains(attrName));
+ }
+
/** Gets a required String attribute. */
public static String getStringAttr(Element ele, String attrName) throws MalformedXmlException {
return getStringAttr(ele, attrName, true);
@@ -476,6 +535,13 @@ public class XmlUtils {
/** Gets human-readable style String array. */
public static List<String> getHrItemsAsStrings(
+ Element parent, String elementName, Set<String> requiredNames)
+ throws MalformedXmlException {
+ return getHrItemsAsStrings(parent, elementName, requiredNames.contains(elementName));
+ }
+
+ /** Gets human-readable style String array. */
+ public static List<String> getHrItemsAsStrings(
Element parent, String elementName, boolean required) throws MalformedXmlException {
List<Element> arrayEles = XmlUtils.getChildrenByTagName(parent, elementName);
@@ -501,6 +567,12 @@ public class XmlUtils {
}
/** Gets on-device style String array. */
+ public static List<String> getOdStringArray(
+ Element ele, String nameName, Set<String> requiredNames) throws MalformedXmlException {
+ return getOdStringArray(ele, nameName, requiredNames.contains(nameName));
+ }
+
+ /** Gets on-device style String array. */
public static List<String> getOdStringArray(Element ele, String nameName, boolean required)
throws MalformedXmlException {
List<Element> arrayEles =
@@ -530,6 +602,73 @@ public class XmlUtils {
return strs;
}
+ /** Throws if extraneous child elements detected */
+ public static void throwIfExtraneousChildrenHr(Element ele, Set<String> expectedChildNames)
+ throws MalformedXmlException {
+ var childEles = XmlUtils.asElementList(ele.getChildNodes());
+ List<Element> extraneousEles =
+ childEles.stream()
+ .filter(e -> !expectedChildNames.contains(e.getTagName()))
+ .collect(Collectors.toList());
+ if (!extraneousEles.isEmpty()) {
+ throw new MalformedXmlException(
+ String.format(
+ "Unexpected element(s) %s in %s.",
+ extraneousEles.stream()
+ .map(Element::getTagName)
+ .collect(Collectors.joining(",")),
+ ele.getTagName()));
+ }
+ }
+
+ /** Throws if extraneous child elements detected */
+ public static void throwIfExtraneousChildrenOd(Element ele, Set<String> expectedChildNames)
+ throws MalformedXmlException {
+ var allChildElements = XmlUtils.asElementList(ele.getChildNodes());
+ List<Element> extraneousEles =
+ allChildElements.stream()
+ .filter(
+ e ->
+ !e.getAttribute(XmlUtils.OD_ATTR_NAME).isEmpty()
+ && !expectedChildNames.contains(
+ e.getAttribute(XmlUtils.OD_ATTR_NAME)))
+ .collect(Collectors.toList());
+ if (!extraneousEles.isEmpty()) {
+ throw new MalformedXmlException(
+ String.format(
+ "Unexpected element(s) in %s: %s",
+ ele.getTagName(),
+ extraneousEles.stream()
+ .map(
+ e ->
+ String.format(
+ "%s name=%s",
+ e.getTagName(),
+ e.getAttribute(XmlUtils.OD_ATTR_NAME)))
+ .collect(Collectors.joining(","))));
+ }
+ }
+
+ /** Throws if extraneous attributes detected */
+ public static void throwIfExtraneousAttributes(Element ele, Set<String> expectedAttrNames)
+ throws MalformedXmlException {
+ var attrs = ele.getAttributes();
+ List<String> attrNames = new ArrayList<>();
+ for (int i = 0; i < attrs.getLength(); i++) {
+ attrNames.add(attrs.item(i).getNodeName());
+ }
+ List<String> extraneousAttrs =
+ attrNames.stream()
+ .filter(s -> !expectedAttrNames.contains(s))
+ .collect(Collectors.toList());
+ if (!extraneousAttrs.isEmpty()) {
+ throw new MalformedXmlException(
+ String.format(
+ "Unexpected attr(s) %s in %s.",
+ String.join(",", extraneousAttrs), ele.getTagName()));
+ }
+ }
+
/**
* Utility method for making a List from one element, to support easier refactoring if needed.
* For example, List.of() doesn't support null elements.
@@ -537,4 +676,26 @@ public class XmlUtils {
public static List<Element> listOf(Element e) {
return Arrays.asList(e);
}
+
+ /**
+ * Gets the most recent version of fields in the mapping. This way when a new version is
+ * released, we only need to update the mappings that were modified. The rest will fall back to
+ * the most recent previous version.
+ */
+ public static Set<String> getMostRecentVersion(
+ Map<Long, Set<String>> versionToFieldsMapping, long version)
+ throws MalformedXmlException {
+ long bestVersion = 0;
+ Set<String> bestSet = null;
+ for (Map.Entry<Long, Set<String>> entry : versionToFieldsMapping.entrySet()) {
+ if (entry.getKey() > bestVersion && entry.getKey() <= version) {
+ bestVersion = entry.getKey();
+ bestSet = entry.getValue();
+ }
+ }
+ if (bestSet == null) {
+ throw new MalformedXmlException("Unexpected version: " + version);
+ }
+ return bestSet;
+ }
}
diff --git a/tools/app_metadata_bundles/src/test/java/com/android/asllib/AllTests.java b/tools/app_metadata_bundles/src/test/java/com/android/asllib/AllTests.java
index 14e65e5e5b2b..e3aa50a4cee2 100644
--- a/tools/app_metadata_bundles/src/test/java/com/android/asllib/AllTests.java
+++ b/tools/app_metadata_bundles/src/test/java/com/android/asllib/AllTests.java
@@ -20,8 +20,11 @@ import com.android.asllib.marshallable.AndroidSafetyLabelTest;
import com.android.asllib.marshallable.AppInfoTest;
import com.android.asllib.marshallable.DataLabelsTest;
import com.android.asllib.marshallable.DataTypeEqualityTest;
+import com.android.asllib.marshallable.DeveloperInfoTest;
import com.android.asllib.marshallable.SafetyLabelsTest;
+import com.android.asllib.marshallable.SecurityLabelsTest;
import com.android.asllib.marshallable.SystemAppSafetyLabelTest;
+import com.android.asllib.marshallable.ThirdPartyVerificationTest;
import com.android.asllib.marshallable.TransparencyInfoTest;
import org.junit.runner.RunWith;
@@ -36,6 +39,9 @@ import org.junit.runners.Suite;
DataTypeEqualityTest.class,
SafetyLabelsTest.class,
SystemAppSafetyLabelTest.class,
- TransparencyInfoTest.class
+ TransparencyInfoTest.class,
+ DeveloperInfoTest.class,
+ SecurityLabelsTest.class,
+ ThirdPartyVerificationTest.class
})
public class AllTests {}
diff --git a/tools/app_metadata_bundles/src/test/java/com/android/asllib/AslgenTests.java b/tools/app_metadata_bundles/src/test/java/com/android/asllib/AslgenTests.java
index 5d1d45a9a29b..262f76d52c90 100644
--- a/tools/app_metadata_bundles/src/test/java/com/android/asllib/AslgenTests.java
+++ b/tools/app_metadata_bundles/src/test/java/com/android/asllib/AslgenTests.java
@@ -41,6 +41,18 @@ public class AslgenTests {
/** Logic for setting up tests (empty if not yet needed). */
public static void main(String[] params) throws Exception {}
+ @Test
+ public void testValidOd() throws Exception {
+ System.out.println("start testing valid od.");
+ Path odPath = Paths.get(VALID_MAPPINGS_PATH, "general-v1", OD_XML_FILENAME);
+ InputStream odStream = getClass().getClassLoader().getResourceAsStream(odPath.toString());
+ String odContents =
+ TestUtils.getFormattedXml(
+ new String(odStream.readAllBytes(), StandardCharsets.UTF_8), false);
+ AndroidSafetyLabel unusedAsl =
+ AslConverter.readFromString(odContents, AslConverter.Format.ON_DEVICE);
+ }
+
/** Tests valid mappings between HR and OD. */
@Test
public void testValidMappings() throws Exception {
diff --git a/tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/AndroidSafetyLabelTest.java b/tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/AndroidSafetyLabelTest.java
index 61a78232801c..6470c060af87 100644
--- a/tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/AndroidSafetyLabelTest.java
+++ b/tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/AndroidSafetyLabelTest.java
@@ -16,12 +16,19 @@
package com.android.asllib.marshallable;
+import static org.junit.Assert.assertThrows;
+
import com.android.asllib.testutils.TestUtils;
+import com.android.asllib.util.MalformedXmlException;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
+import org.w3c.dom.Element;
+
+import java.nio.file.Paths;
+import java.util.List;
@RunWith(JUnit4.class)
public class AndroidSafetyLabelTest {
@@ -31,12 +38,16 @@ public class AndroidSafetyLabelTest {
"com/android/asllib/androidsafetylabel/od";
private static final String MISSING_VERSION_FILE_NAME = "missing-version.xml";
- private static final String VALID_EMPTY_FILE_NAME = "valid-empty.xml";
+ private static final String VALID_V2_FILE_NAME = "valid-empty.xml";
+ private static final String VALID_V1_FILE_NAME = "valid-v1.xml";
private static final String WITH_SAFETY_LABELS_FILE_NAME = "with-safety-labels.xml";
private static final String WITH_SYSTEM_APP_SAFETY_LABEL_FILE_NAME =
"with-system-app-safety-label.xml";
private static final String WITH_TRANSPARENCY_INFO_FILE_NAME = "with-transparency-info.xml";
+ public static final List<String> REQUIRED_FIELD_NAMES_OD_V2 =
+ List.of("system_app_safety_label", "transparency_info");
+
@Before
public void setUp() throws Exception {
System.out.println("set up.");
@@ -50,12 +61,12 @@ public class AndroidSafetyLabelTest {
odToHrExpectException(MISSING_VERSION_FILE_NAME);
}
- /** Test for android safety label valid empty. */
+ /** Test for android safety label valid v2. */
@Test
- public void testAndroidSafetyLabelValidEmptyFile() throws Exception {
- System.out.println("starting testAndroidSafetyLabelValidEmptyFile.");
- testHrToOdAndroidSafetyLabel(VALID_EMPTY_FILE_NAME);
- testOdToHrAndroidSafetyLabel(VALID_EMPTY_FILE_NAME);
+ public void testAndroidSafetyLabelValidV2File() throws Exception {
+ System.out.println("starting testAndroidSafetyLabelValidV2File.");
+ testHrToOdAndroidSafetyLabel(VALID_V2_FILE_NAME);
+ testOdToHrAndroidSafetyLabel(VALID_V2_FILE_NAME);
}
/** Test for android safety label with safety labels. */
@@ -66,47 +77,77 @@ public class AndroidSafetyLabelTest {
testOdToHrAndroidSafetyLabel(WITH_SAFETY_LABELS_FILE_NAME);
}
- /** Test for android safety label with system app safety label. */
+ /** Tests missing required fields fails, V2. */
@Test
- public void testAndroidSafetyLabelWithSystemAppSafetyLabel() throws Exception {
- System.out.println("starting testAndroidSafetyLabelWithSystemAppSafetyLabel.");
- testHrToOdAndroidSafetyLabel(WITH_SYSTEM_APP_SAFETY_LABEL_FILE_NAME);
- testOdToHrAndroidSafetyLabel(WITH_SYSTEM_APP_SAFETY_LABEL_FILE_NAME);
+ public void testMissingRequiredFieldsOdV2() throws Exception {
+ for (String reqField : REQUIRED_FIELD_NAMES_OD_V2) {
+ System.out.println("testing missing required field od v2: " + reqField);
+ var ele =
+ TestUtils.getElementFromResource(
+ Paths.get(ANDROID_SAFETY_LABEL_OD_PATH, VALID_V2_FILE_NAME));
+ TestUtils.removeOdChildEleWithName(ele, reqField);
+ assertThrows(
+ MalformedXmlException.class,
+ () -> new AndroidSafetyLabelFactory().createFromOdElement(ele));
+ }
}
- /** Test for android safety label with transparency info. */
+ /** Tests missing optional fields succeeds, V1. */
@Test
- public void testAndroidSafetyLabelWithTransparencyInfo() throws Exception {
- System.out.println("starting testAndroidSafetyLabelWithTransparencyInfo.");
- testHrToOdAndroidSafetyLabel(WITH_TRANSPARENCY_INFO_FILE_NAME);
- testOdToHrAndroidSafetyLabel(WITH_TRANSPARENCY_INFO_FILE_NAME);
+ public void testMissingOptionalFieldsOdV1() throws Exception {
+ for (String reqField : REQUIRED_FIELD_NAMES_OD_V2) {
+ System.out.println("testing missing optional field od v1: " + reqField);
+ var ele =
+ TestUtils.getElementFromResource(
+ Paths.get(ANDROID_SAFETY_LABEL_OD_PATH, VALID_V1_FILE_NAME));
+ TestUtils.removeOdChildEleWithName(ele, reqField);
+ var unused = new AndroidSafetyLabelFactory().createFromOdElement(ele);
+ }
}
private void hrToOdExpectException(String fileName) {
- TestUtils.hrToOdExpectException(
- new AndroidSafetyLabelFactory(), ANDROID_SAFETY_LABEL_HR_PATH, fileName);
+ assertThrows(
+ MalformedXmlException.class,
+ () -> {
+ new AndroidSafetyLabelFactory()
+ .createFromHrElement(
+ TestUtils.getElementFromResource(
+ Paths.get(ANDROID_SAFETY_LABEL_HR_PATH, fileName)));
+ });
}
private void odToHrExpectException(String fileName) {
- TestUtils.odToHrExpectException(
- new AndroidSafetyLabelFactory(), ANDROID_SAFETY_LABEL_OD_PATH, fileName);
+ assertThrows(
+ MalformedXmlException.class,
+ () -> {
+ new AndroidSafetyLabelFactory()
+ .createFromOdElement(
+ TestUtils.getElementFromResource(
+ Paths.get(ANDROID_SAFETY_LABEL_OD_PATH, fileName)));
+ });
}
private void testHrToOdAndroidSafetyLabel(String fileName) throws Exception {
- TestUtils.testHrToOd(
- TestUtils.document(),
- new AndroidSafetyLabelFactory(),
- ANDROID_SAFETY_LABEL_HR_PATH,
- ANDROID_SAFETY_LABEL_OD_PATH,
- fileName);
+ var doc = TestUtils.document();
+ AndroidSafetyLabel asl =
+ new AndroidSafetyLabelFactory()
+ .createFromHrElement(
+ TestUtils.getElementFromResource(
+ Paths.get(ANDROID_SAFETY_LABEL_HR_PATH, fileName)));
+ Element aslEle = asl.toOdDomElement(doc);
+ doc.appendChild(aslEle);
+ TestUtils.testFormatToFormat(doc, Paths.get(ANDROID_SAFETY_LABEL_OD_PATH, fileName));
}
private void testOdToHrAndroidSafetyLabel(String fileName) throws Exception {
- TestUtils.testOdToHr(
- TestUtils.document(),
- new AndroidSafetyLabelFactory(),
- ANDROID_SAFETY_LABEL_OD_PATH,
- ANDROID_SAFETY_LABEL_HR_PATH,
- fileName);
+ var doc = TestUtils.document();
+ AndroidSafetyLabel asl =
+ new AndroidSafetyLabelFactory()
+ .createFromOdElement(
+ TestUtils.getElementFromResource(
+ Paths.get(ANDROID_SAFETY_LABEL_OD_PATH, fileName)));
+ Element aslEle = asl.toHrDomElement(doc);
+ doc.appendChild(aslEle);
+ TestUtils.testFormatToFormat(doc, Paths.get(ANDROID_SAFETY_LABEL_HR_PATH, fileName));
}
}
diff --git a/tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/AppInfoTest.java b/tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/AppInfoTest.java
index d823c482adfe..7806061f00bb 100644
--- a/tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/AppInfoTest.java
+++ b/tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/AppInfoTest.java
@@ -26,12 +26,14 @@ import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
+import org.w3c.dom.Element;
import java.nio.file.Paths;
import java.util.List;
@RunWith(JUnit4.class)
public class AppInfoTest {
+ private static final long DEFAULT_VERSION = 2L;
private static final String APP_INFO_HR_PATH = "com/android/asllib/appinfo/hr";
private static final String APP_INFO_OD_PATH = "com/android/asllib/appinfo/od";
public static final List<String> REQUIRED_FIELD_NAMES =
@@ -45,7 +47,24 @@ public class AppInfoTest {
public static final List<String> OPTIONAL_FIELD_NAMES = List.of();
public static final List<String> OPTIONAL_FIELD_NAMES_OD = List.of();
+ public static final List<String> REQUIRED_FIELD_NAMES_OD_V1 =
+ List.of(
+ "title",
+ "description",
+ "contains_ads",
+ "obey_aps",
+ "ads_fingerprinting",
+ "security_fingerprinting",
+ "privacy_policy",
+ "security_endpoints",
+ "first_party_endpoints",
+ "service_provider_endpoints",
+ "category");
+ public static final List<String> OPTIONAL_FIELD_NAMES_OD_V1 = List.of("website", "email");
+
private static final String ALL_FIELDS_VALID_FILE_NAME = "all-fields-valid.xml";
+ private static final String ALL_FIELDS_VALID_V1_FILE_NAME = "all-fields-valid-v1.xml";
+ public static final String UNRECOGNIZED_V1_FILE_NAME = "unrecognized-v1.xml";
/** Logic for setting up tests (empty if not yet needed). */
public static void main(String[] params) throws Exception {}
@@ -63,6 +82,61 @@ public class AppInfoTest {
testOdToHrAppInfo(ALL_FIELDS_VALID_FILE_NAME);
}
+ /** Test for all fields valid v1. */
+ @Test
+ public void testAllFieldsValidV1() throws Exception {
+ System.out.println("starting testAllFieldsValidV1.");
+ new AppInfoFactory()
+ .createFromOdElement(
+ TestUtils.getElementFromResource(
+ Paths.get(APP_INFO_OD_PATH, ALL_FIELDS_VALID_V1_FILE_NAME)),
+ 1L);
+ }
+
+ /** Test for unrecognized field v1. */
+ @Test
+ public void testUnrecognizedFieldV1() throws Exception {
+ System.out.println("starting testUnrecognizedFieldV1.");
+ assertThrows(
+ MalformedXmlException.class,
+ () ->
+ new AppInfoFactory()
+ .createFromOdElement(
+ TestUtils.getElementFromResource(
+ Paths.get(
+ APP_INFO_OD_PATH,
+ UNRECOGNIZED_V1_FILE_NAME)),
+ 1L));
+ }
+
+ /** Tests missing required fields fails, V1. */
+ @Test
+ public void testMissingRequiredFieldsOdV1() throws Exception {
+ for (String reqField : REQUIRED_FIELD_NAMES_OD_V1) {
+ System.out.println("testing missing required field od v1: " + reqField);
+ var appInfoEle =
+ TestUtils.getElementFromResource(
+ Paths.get(APP_INFO_OD_PATH, ALL_FIELDS_VALID_V1_FILE_NAME));
+ TestUtils.removeOdChildEleWithName(appInfoEle, reqField);
+ assertThrows(
+ MalformedXmlException.class,
+ () -> new AppInfoFactory().createFromOdElement(appInfoEle, 1L));
+ }
+ }
+
+ /** Tests missing optional fields passes, V1. */
+ @Test
+ public void testMissingOptionalFieldsOdV1() throws Exception {
+ for (String optField : OPTIONAL_FIELD_NAMES_OD_V1) {
+ System.out.println("testing missing optional field od v1: " + optField);
+ var appInfoEle =
+ TestUtils.getElementFromResource(
+ Paths.get(APP_INFO_OD_PATH, ALL_FIELDS_VALID_V1_FILE_NAME));
+ TestUtils.removeOdChildEleWithName(appInfoEle, optField);
+ new AppInfoFactory().createFromOdElement(appInfoEle, 1L);
+ }
+ }
+
/** Tests missing required fields fails. */
@Test
public void testMissingRequiredFields() throws Exception {
@@ -70,24 +144,24 @@ public class AppInfoTest {
for (String reqField : REQUIRED_FIELD_NAMES) {
System.out.println("testing missing required field hr: " + reqField);
var appInfoEle =
- TestUtils.getElementsFromResource(
+ TestUtils.getElementFromResource(
Paths.get(APP_INFO_HR_PATH, ALL_FIELDS_VALID_FILE_NAME));
- appInfoEle.get(0).removeAttribute(reqField);
+ appInfoEle.removeAttribute(reqField);
assertThrows(
MalformedXmlException.class,
- () -> new AppInfoFactory().createFromHrElements(appInfoEle));
+ () -> new AppInfoFactory().createFromHrElement(appInfoEle, DEFAULT_VERSION));
}
for (String reqField : REQUIRED_FIELD_NAMES_OD) {
System.out.println("testing missing required field od: " + reqField);
var appInfoEle =
- TestUtils.getElementsFromResource(
+ TestUtils.getElementFromResource(
Paths.get(APP_INFO_OD_PATH, ALL_FIELDS_VALID_FILE_NAME));
- TestUtils.removeOdChildEleWithName(appInfoEle.get(0), reqField);
+ TestUtils.removeOdChildEleWithName(appInfoEle, reqField);
assertThrows(
MalformedXmlException.class,
- () -> new AppInfoFactory().createFromOdElements(appInfoEle));
+ () -> new AppInfoFactory().createFromOdElement(appInfoEle, DEFAULT_VERSION));
}
}
@@ -98,24 +172,24 @@ public class AppInfoTest {
for (String reqChildName : REQUIRED_CHILD_NAMES) {
System.out.println("testing missing required child hr: " + reqChildName);
var appInfoEle =
- TestUtils.getElementsFromResource(
+ TestUtils.getElementFromResource(
Paths.get(APP_INFO_HR_PATH, ALL_FIELDS_VALID_FILE_NAME));
- var child = XmlUtils.getChildrenByTagName(appInfoEle.get(0), reqChildName).get(0);
- appInfoEle.get(0).removeChild(child);
+ var child = XmlUtils.getChildrenByTagName(appInfoEle, reqChildName).get(0);
+ appInfoEle.removeChild(child);
assertThrows(
MalformedXmlException.class,
- () -> new AppInfoFactory().createFromHrElements(appInfoEle));
+ () -> new AppInfoFactory().createFromHrElement(appInfoEle, DEFAULT_VERSION));
}
for (String reqField : REQUIRED_CHILD_NAMES_OD) {
System.out.println("testing missing required child od: " + reqField);
var appInfoEle =
- TestUtils.getElementsFromResource(
+ TestUtils.getElementFromResource(
Paths.get(APP_INFO_OD_PATH, ALL_FIELDS_VALID_FILE_NAME));
- TestUtils.removeOdChildEleWithName(appInfoEle.get(0), reqField);
+ TestUtils.removeOdChildEleWithName(appInfoEle, reqField);
assertThrows(
MalformedXmlException.class,
- () -> new AppInfoFactory().createFromOdElements(appInfoEle));
+ () -> new AppInfoFactory().createFromOdElement(appInfoEle, DEFAULT_VERSION));
}
}
@@ -124,38 +198,51 @@ public class AppInfoTest {
public void testMissingOptionalFields() throws Exception {
for (String optField : OPTIONAL_FIELD_NAMES) {
var ele =
- TestUtils.getElementsFromResource(
+ TestUtils.getElementFromResource(
Paths.get(APP_INFO_HR_PATH, ALL_FIELDS_VALID_FILE_NAME));
- ele.get(0).removeAttribute(optField);
- AppInfo appInfo = new AppInfoFactory().createFromHrElements(ele);
- appInfo.toOdDomElements(TestUtils.document());
+ ele.removeAttribute(optField);
+ AppInfo appInfo = new AppInfoFactory().createFromHrElement(ele, DEFAULT_VERSION);
+ appInfo.toOdDomElement(TestUtils.document());
}
for (String optField : OPTIONAL_FIELD_NAMES_OD) {
var ele =
- TestUtils.getElementsFromResource(
+ TestUtils.getElementFromResource(
Paths.get(APP_INFO_OD_PATH, ALL_FIELDS_VALID_FILE_NAME));
- TestUtils.removeOdChildEleWithName(ele.get(0), optField);
- AppInfo appInfo = new AppInfoFactory().createFromOdElements(ele);
- appInfo.toHrDomElements(TestUtils.document());
+ TestUtils.removeOdChildEleWithName(ele, optField);
+ AppInfo appInfo = new AppInfoFactory().createFromOdElement(ele, DEFAULT_VERSION);
+ appInfo.toHrDomElement(TestUtils.document());
}
}
private void testHrToOdAppInfo(String fileName) throws Exception {
- TestUtils.testHrToOd(
- TestUtils.document(),
- new AppInfoFactory(),
- APP_INFO_HR_PATH,
- APP_INFO_OD_PATH,
- fileName);
+ var doc = TestUtils.document();
+ AppInfo appInfo =
+ new AppInfoFactory()
+ .createFromHrElement(
+ TestUtils.getElementFromResource(
+ Paths.get(APP_INFO_HR_PATH, fileName)),
+ DEFAULT_VERSION);
+ Element appInfoEle = appInfo.toOdDomElement(doc);
+ doc.appendChild(appInfoEle);
+ TestUtils.testFormatToFormat(doc, Paths.get(APP_INFO_OD_PATH, fileName));
}
+
private void testOdToHrAppInfo(String fileName) throws Exception {
- TestUtils.testOdToHr(
- TestUtils.document(),
- new AppInfoFactory(),
- APP_INFO_OD_PATH,
- APP_INFO_HR_PATH,
- fileName);
+ testOdToHrAppInfo(fileName, DEFAULT_VERSION);
+ }
+
+ private void testOdToHrAppInfo(String fileName, long version) throws Exception {
+ var doc = TestUtils.document();
+ AppInfo appInfo =
+ new AppInfoFactory()
+ .createFromOdElement(
+ TestUtils.getElementFromResource(
+ Paths.get(APP_INFO_OD_PATH, fileName)),
+ version);
+ Element appInfoEle = appInfo.toHrDomElement(doc);
+ doc.appendChild(appInfoEle);
+ TestUtils.testFormatToFormat(doc, Paths.get(APP_INFO_HR_PATH, fileName));
}
}
diff --git a/tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/DataLabelsTest.java b/tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/DataLabelsTest.java
index ff4374166dd3..cc58a61760f4 100644
--- a/tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/DataLabelsTest.java
+++ b/tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/DataLabelsTest.java
@@ -16,12 +16,22 @@
package com.android.asllib.marshallable;
+import static org.junit.Assert.assertThrows;
+
import com.android.asllib.testutils.TestUtils;
+import com.android.asllib.util.MalformedXmlException;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
+import org.w3c.dom.Element;
+import org.xml.sax.SAXException;
+
+import java.io.IOException;
+import java.nio.file.Paths;
+
+import javax.xml.parsers.ParserConfigurationException;
@RunWith(JUnit4.class)
public class DataLabelsTest {
@@ -297,29 +307,43 @@ public class DataLabelsTest {
odToHrExpectException(PERSONAL_EMPTY_PURPOSE_FILE_NAME);
}
- private void hrToOdExpectException(String fileName) {
- TestUtils.hrToOdExpectException(new DataLabelsFactory(), DATA_LABELS_HR_PATH, fileName);
+ private void hrToOdExpectException(String fileName)
+ throws ParserConfigurationException, IOException, SAXException {
+ var ele = TestUtils.getElementFromResource(Paths.get(DATA_LABELS_HR_PATH, fileName));
+ assertThrows(
+ MalformedXmlException.class,
+ () -> new DataLabelsFactory().createFromHrElement(ele));
}
- private void odToHrExpectException(String fileName) {
- TestUtils.odToHrExpectException(new DataLabelsFactory(), DATA_LABELS_OD_PATH, fileName);
+ private void odToHrExpectException(String fileName)
+ throws ParserConfigurationException, IOException, SAXException {
+ var ele = TestUtils.getElementFromResource(Paths.get(DATA_LABELS_OD_PATH, fileName));
+ assertThrows(
+ MalformedXmlException.class,
+ () -> new DataLabelsFactory().createFromOdElement(ele));
}
private void testHrToOdDataLabels(String fileName) throws Exception {
- TestUtils.testHrToOd(
- TestUtils.document(),
- new DataLabelsFactory(),
- DATA_LABELS_HR_PATH,
- DATA_LABELS_OD_PATH,
- fileName);
+ var doc = TestUtils.document();
+ DataLabels dataLabels =
+ new DataLabelsFactory()
+ .createFromHrElement(
+ TestUtils.getElementFromResource(
+ Paths.get(DATA_LABELS_HR_PATH, fileName)));
+ Element resultingEle = dataLabels.toOdDomElement(doc);
+ doc.appendChild(resultingEle);
+ TestUtils.testFormatToFormat(doc, Paths.get(DATA_LABELS_OD_PATH, fileName));
}
private void testOdToHrDataLabels(String fileName) throws Exception {
- TestUtils.testOdToHr(
- TestUtils.document(),
- new DataLabelsFactory(),
- DATA_LABELS_OD_PATH,
- DATA_LABELS_HR_PATH,
- fileName);
+ var doc = TestUtils.document();
+ DataLabels dataLabels =
+ new DataLabelsFactory()
+ .createFromOdElement(
+ TestUtils.getElementFromResource(
+ Paths.get(DATA_LABELS_OD_PATH, fileName)));
+ Element resultingEle = dataLabels.toHrDomElement(doc);
+ doc.appendChild(resultingEle);
+ TestUtils.testFormatToFormat(doc, Paths.get(DATA_LABELS_HR_PATH, fileName));
}
}
diff --git a/tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/DeveloperInfoTest.java b/tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/DeveloperInfoTest.java
new file mode 100644
index 000000000000..a4472b1b78e5
--- /dev/null
+++ b/tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/DeveloperInfoTest.java
@@ -0,0 +1,139 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.asllib.marshallable;
+
+import static org.junit.Assert.assertThrows;
+
+import com.android.asllib.testutils.TestUtils;
+import com.android.asllib.util.MalformedXmlException;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+import org.w3c.dom.Element;
+
+import java.nio.file.Paths;
+import java.util.List;
+
+@RunWith(JUnit4.class)
+public class DeveloperInfoTest {
+ private static final String DEVELOPER_INFO_HR_PATH = "com/android/asllib/developerinfo/hr";
+ private static final String DEVELOPER_INFO_OD_PATH = "com/android/asllib/developerinfo/od";
+ public static final List<String> REQUIRED_FIELD_NAMES =
+ List.of("address", "countryRegion", "email", "name", "relationship");
+ public static final List<String> REQUIRED_FIELD_NAMES_OD =
+ List.of("address", "country_region", "email", "name", "relationship");
+ public static final List<String> OPTIONAL_FIELD_NAMES = List.of("website", "registryId");
+ public static final List<String> OPTIONAL_FIELD_NAMES_OD =
+ List.of("website", "app_developer_registry_id");
+
+ private static final String ALL_FIELDS_VALID_FILE_NAME = "all-fields-valid.xml";
+
+ /** Logic for setting up tests (empty if not yet needed). */
+ public static void main(String[] params) throws Exception {}
+
+ @Before
+ public void setUp() throws Exception {
+ System.out.println("set up.");
+ }
+
+ /** Test for all fields valid. */
+ @Test
+ public void testAllFieldsValid() throws Exception {
+ System.out.println("starting testAllFieldsValid.");
+ testHrToOdDeveloperInfo(ALL_FIELDS_VALID_FILE_NAME);
+ testOdToHrDeveloperInfo(ALL_FIELDS_VALID_FILE_NAME);
+ }
+
+ /** Tests missing required fields fails. */
+ @Test
+ public void testMissingRequiredFields() throws Exception {
+ System.out.println("Starting testMissingRequiredFields");
+ for (String reqField : REQUIRED_FIELD_NAMES) {
+ System.out.println("testing missing required field: " + reqField);
+ var developerInfoEle =
+ TestUtils.getElementFromResource(
+ Paths.get(DEVELOPER_INFO_HR_PATH, ALL_FIELDS_VALID_FILE_NAME));
+ developerInfoEle.removeAttribute(reqField);
+
+ assertThrows(
+ MalformedXmlException.class,
+ () -> new DeveloperInfoFactory().createFromHrElement(developerInfoEle));
+ }
+
+ for (String reqField : REQUIRED_FIELD_NAMES_OD) {
+ System.out.println("testing missing required field od: " + reqField);
+ var developerInfoEle =
+ TestUtils.getElementFromResource(
+ Paths.get(DEVELOPER_INFO_OD_PATH, ALL_FIELDS_VALID_FILE_NAME));
+ TestUtils.removeOdChildEleWithName(developerInfoEle, reqField);
+
+ assertThrows(
+ MalformedXmlException.class,
+ () -> new DeveloperInfoFactory().createFromOdElement(developerInfoEle));
+ }
+ }
+
+ /** Tests missing optional fields passes. */
+ @Test
+ public void testMissingOptionalFields() throws Exception {
+ for (String optField : OPTIONAL_FIELD_NAMES) {
+ var developerInfoEle =
+ TestUtils.getElementFromResource(
+ Paths.get(DEVELOPER_INFO_HR_PATH, ALL_FIELDS_VALID_FILE_NAME));
+ developerInfoEle.removeAttribute(optField);
+ DeveloperInfo developerInfo =
+ new DeveloperInfoFactory().createFromHrElement(developerInfoEle);
+ developerInfo.toOdDomElement(TestUtils.document());
+ }
+
+ for (String optField : OPTIONAL_FIELD_NAMES_OD) {
+ var developerInfoEle =
+ TestUtils.getElementFromResource(
+ Paths.get(DEVELOPER_INFO_OD_PATH, ALL_FIELDS_VALID_FILE_NAME));
+ TestUtils.removeOdChildEleWithName(developerInfoEle, optField);
+ DeveloperInfo developerInfo =
+ new DeveloperInfoFactory().createFromOdElement(developerInfoEle);
+ developerInfo.toHrDomElement(TestUtils.document());
+ }
+ }
+
+ private void testHrToOdDeveloperInfo(String fileName) throws Exception {
+ var doc = TestUtils.document();
+ DeveloperInfo developerInfo =
+ new DeveloperInfoFactory()
+ .createFromHrElement(
+ TestUtils.getElementFromResource(
+ Paths.get(DEVELOPER_INFO_HR_PATH, fileName)));
+ Element developerInfoEle = developerInfo.toOdDomElement(doc);
+ doc.appendChild(developerInfoEle);
+ TestUtils.testFormatToFormat(doc, Paths.get(DEVELOPER_INFO_OD_PATH, fileName));
+ }
+
+ private void testOdToHrDeveloperInfo(String fileName) throws Exception {
+ var doc = TestUtils.document();
+ DeveloperInfo developerInfo =
+ new DeveloperInfoFactory()
+ .createFromOdElement(
+ TestUtils.getElementFromResource(
+ Paths.get(DEVELOPER_INFO_OD_PATH, fileName)));
+ Element developerInfoEle = developerInfo.toHrDomElement(doc);
+ doc.appendChild(developerInfoEle);
+ TestUtils.testFormatToFormat(doc, Paths.get(DEVELOPER_INFO_HR_PATH, fileName));
+ }
+}
diff --git a/tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/SafetyLabelsTest.java b/tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/SafetyLabelsTest.java
index 19d1626f7054..fc8ff00794ad 100644
--- a/tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/SafetyLabelsTest.java
+++ b/tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/SafetyLabelsTest.java
@@ -16,20 +16,30 @@
package com.android.asllib.marshallable;
+import static org.junit.Assert.assertThrows;
+
import com.android.asllib.testutils.TestUtils;
+import com.android.asllib.util.MalformedXmlException;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
+import org.w3c.dom.Element;
+
+import java.nio.file.Paths;
@RunWith(JUnit4.class)
public class SafetyLabelsTest {
+ private static final long DEFAULT_VERSION = 2L;
+
private static final String SAFETY_LABELS_HR_PATH = "com/android/asllib/safetylabels/hr";
private static final String SAFETY_LABELS_OD_PATH = "com/android/asllib/safetylabels/od";
private static final String VALID_EMPTY_FILE_NAME = "valid-empty.xml";
private static final String WITH_DATA_LABELS_FILE_NAME = "with-data-labels.xml";
+ private static final String VALID_V1_FILE_NAME = "valid-v1.xml";
+ private static final String UNRECOGNIZED_FIELD_V2_FILE_NAME = "unrecognized-field-v2.xml";
@Before
public void setUp() throws Exception {
@@ -40,41 +50,61 @@ public class SafetyLabelsTest {
@Test
public void testSafetyLabelsValidEmptyFile() throws Exception {
System.out.println("starting testSafetyLabelsValidEmptyFile.");
- testHrToOdSafetyLabels(VALID_EMPTY_FILE_NAME);
- testOdToHrSafetyLabels(VALID_EMPTY_FILE_NAME);
+ testHrToOdSafetyLabels(VALID_EMPTY_FILE_NAME, DEFAULT_VERSION);
+ testOdToHrSafetyLabels(VALID_EMPTY_FILE_NAME, DEFAULT_VERSION);
}
/** Test for safety labels with data labels. */
@Test
public void testSafetyLabelsWithDataLabels() throws Exception {
System.out.println("starting testSafetyLabelsWithDataLabels.");
- testHrToOdSafetyLabels(WITH_DATA_LABELS_FILE_NAME);
- testOdToHrSafetyLabels(WITH_DATA_LABELS_FILE_NAME);
+ testHrToOdSafetyLabels(WITH_DATA_LABELS_FILE_NAME, DEFAULT_VERSION);
+ testOdToHrSafetyLabels(WITH_DATA_LABELS_FILE_NAME, DEFAULT_VERSION);
}
- private void hrToOdExpectException(String fileName) {
- TestUtils.hrToOdExpectException(new SafetyLabelsFactory(), SAFETY_LABELS_HR_PATH, fileName);
+ /** Tests valid fields v1. */
+ @Test
+ public void testValidFieldsV1() throws Exception {
+ var ele =
+ TestUtils.getElementFromResource(
+ Paths.get(SAFETY_LABELS_OD_PATH, VALID_V1_FILE_NAME));
+ var unused = new SafetyLabelsFactory().createFromOdElement(ele, 1L);
}
- private void odToHrExpectException(String fileName) {
- TestUtils.odToHrExpectException(new SafetyLabelsFactory(), SAFETY_LABELS_OD_PATH, fileName);
+ /** Tests unrecognized field v2. */
+ @Test
+ public void testUnrecognizedFieldV2() throws Exception {
+ var ele =
+ TestUtils.getElementFromResource(
+ Paths.get(SAFETY_LABELS_OD_PATH, VALID_V1_FILE_NAME));
+ assertThrows(
+ MalformedXmlException.class,
+ () -> new SafetyLabelsFactory().createFromOdElement(ele, 2L));
}
- private void testHrToOdSafetyLabels(String fileName) throws Exception {
- TestUtils.testHrToOd(
- TestUtils.document(),
- new SafetyLabelsFactory(),
- SAFETY_LABELS_HR_PATH,
- SAFETY_LABELS_OD_PATH,
- fileName);
+ private void testHrToOdSafetyLabels(String fileName, long version) throws Exception {
+ var doc = TestUtils.document();
+ SafetyLabels safetyLabels =
+ new SafetyLabelsFactory()
+ .createFromHrElement(
+ TestUtils.getElementFromResource(
+ Paths.get(SAFETY_LABELS_HR_PATH, fileName)),
+ version);
+ Element appInfoEle = safetyLabels.toOdDomElement(doc);
+ doc.appendChild(appInfoEle);
+ TestUtils.testFormatToFormat(doc, Paths.get(SAFETY_LABELS_OD_PATH, fileName));
}
- private void testOdToHrSafetyLabels(String fileName) throws Exception {
- TestUtils.testOdToHr(
- TestUtils.document(),
- new SafetyLabelsFactory(),
- SAFETY_LABELS_OD_PATH,
- SAFETY_LABELS_HR_PATH,
- fileName);
+ private void testOdToHrSafetyLabels(String fileName, long version) throws Exception {
+ var doc = TestUtils.document();
+ SafetyLabels safetyLabels =
+ new SafetyLabelsFactory()
+ .createFromOdElement(
+ TestUtils.getElementFromResource(
+ Paths.get(SAFETY_LABELS_OD_PATH, fileName)),
+ version);
+ Element appInfoEle = safetyLabels.toHrDomElement(doc);
+ doc.appendChild(appInfoEle);
+ TestUtils.testFormatToFormat(doc, Paths.get(SAFETY_LABELS_HR_PATH, fileName));
}
}
diff --git a/tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/SecurityLabelsTest.java b/tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/SecurityLabelsTest.java
new file mode 100644
index 000000000000..9d197a2cf7f5
--- /dev/null
+++ b/tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/SecurityLabelsTest.java
@@ -0,0 +1,102 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.asllib.marshallable;
+
+import com.android.asllib.testutils.TestUtils;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+import org.w3c.dom.Element;
+
+import java.nio.file.Paths;
+import java.util.List;
+
+@RunWith(JUnit4.class)
+public class SecurityLabelsTest {
+ private static final String SECURITY_LABELS_HR_PATH = "com/android/asllib/securitylabels/hr";
+ private static final String SECURITY_LABELS_OD_PATH = "com/android/asllib/securitylabels/od";
+
+ public static final List<String> OPTIONAL_FIELD_NAMES =
+ List.of("isDataDeletable", "isDataEncrypted");
+ public static final List<String> OPTIONAL_FIELD_NAMES_OD =
+ List.of("is_data_deletable", "is_data_encrypted");
+
+ private static final String ALL_FIELDS_VALID_FILE_NAME = "all-fields-valid.xml";
+
+ /** Logic for setting up tests (empty if not yet needed). */
+ public static void main(String[] params) throws Exception {}
+
+ @Before
+ public void setUp() throws Exception {
+ System.out.println("set up.");
+ }
+
+ /** Test for all fields valid. */
+ @Test
+ public void testAllFieldsValid() throws Exception {
+ System.out.println("starting testAllFieldsValid.");
+ testHrToOdSecurityLabels(ALL_FIELDS_VALID_FILE_NAME);
+ testOdToHrSecurityLabels(ALL_FIELDS_VALID_FILE_NAME);
+ }
+
+ /** Tests missing optional fields passes. */
+ @Test
+ public void testMissingOptionalFields() throws Exception {
+ for (String optField : OPTIONAL_FIELD_NAMES) {
+ var ele =
+ TestUtils.getElementFromResource(
+ Paths.get(SECURITY_LABELS_HR_PATH, ALL_FIELDS_VALID_FILE_NAME));
+ ele.removeAttribute(optField);
+ SecurityLabels securityLabels = new SecurityLabelsFactory().createFromHrElement(ele);
+ securityLabels.toOdDomElement(TestUtils.document());
+ }
+ for (String optField : OPTIONAL_FIELD_NAMES_OD) {
+ var ele =
+ TestUtils.getElementFromResource(
+ Paths.get(SECURITY_LABELS_OD_PATH, ALL_FIELDS_VALID_FILE_NAME));
+ TestUtils.removeOdChildEleWithName(ele, optField);
+ SecurityLabels securityLabels = new SecurityLabelsFactory().createFromOdElement(ele);
+ securityLabels.toHrDomElement(TestUtils.document());
+ }
+ }
+
+ private void testHrToOdSecurityLabels(String fileName) throws Exception {
+ var doc = TestUtils.document();
+ SecurityLabels securityLabels =
+ new SecurityLabelsFactory()
+ .createFromHrElement(
+ TestUtils.getElementFromResource(
+ Paths.get(SECURITY_LABELS_HR_PATH, fileName)));
+ Element ele = securityLabels.toOdDomElement(doc);
+ doc.appendChild(ele);
+ TestUtils.testFormatToFormat(doc, Paths.get(SECURITY_LABELS_OD_PATH, fileName));
+ }
+
+ private void testOdToHrSecurityLabels(String fileName) throws Exception {
+ var doc = TestUtils.document();
+ SecurityLabels securityLabels =
+ new SecurityLabelsFactory()
+ .createFromOdElement(
+ TestUtils.getElementFromResource(
+ Paths.get(SECURITY_LABELS_OD_PATH, fileName)));
+ Element ele = securityLabels.toHrDomElement(doc);
+ doc.appendChild(ele);
+ TestUtils.testFormatToFormat(doc, Paths.get(SECURITY_LABELS_HR_PATH, fileName));
+ }
+}
diff --git a/tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/SystemAppSafetyLabelTest.java b/tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/SystemAppSafetyLabelTest.java
index 87d3e4499f5c..04bcd783a1dd 100644
--- a/tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/SystemAppSafetyLabelTest.java
+++ b/tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/SystemAppSafetyLabelTest.java
@@ -16,21 +16,34 @@
package com.android.asllib.marshallable;
+import static org.junit.Assert.assertThrows;
+
import com.android.asllib.testutils.TestUtils;
+import com.android.asllib.util.MalformedXmlException;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
+import org.w3c.dom.Element;
+import org.xml.sax.SAXException;
+
+import java.io.IOException;
+import java.nio.file.Paths;
+
+import javax.xml.parsers.ParserConfigurationException;
@RunWith(JUnit4.class)
public class SystemAppSafetyLabelTest {
+ private static final long DEFAULT_VERSION = 2L;
+
private static final String SYSTEM_APP_SAFETY_LABEL_HR_PATH =
"com/android/asllib/systemappsafetylabel/hr";
private static final String SYSTEM_APP_SAFETY_LABEL_OD_PATH =
"com/android/asllib/systemappsafetylabel/od";
private static final String VALID_FILE_NAME = "valid.xml";
+ private static final String VALID_V1_FILE_NAME = "valid-v1.xml";
private static final String MISSING_BOOL_FILE_NAME = "missing-bool.xml";
/** Logic for setting up tests (empty if not yet needed). */
@@ -45,43 +58,83 @@ public class SystemAppSafetyLabelTest {
@Test
public void testValid() throws Exception {
System.out.println("starting testValid.");
- testHrToOdSystemAppSafetyLabel(VALID_FILE_NAME);
- testOdToHrSystemAppSafetyLabel(VALID_FILE_NAME);
+ testHrToOdSystemAppSafetyLabel(VALID_FILE_NAME, DEFAULT_VERSION);
+ testOdToHrSystemAppSafetyLabel(VALID_FILE_NAME, DEFAULT_VERSION);
+ }
+
+ /** Test for valid v1. */
+ @Test
+ public void testValidV1() throws Exception {
+ System.out.println("starting testValidV1.");
+ var doc = TestUtils.document();
+ var unused =
+ new SystemAppSafetyLabelFactory()
+ .createFromOdElement(
+ TestUtils.getElementFromResource(
+ Paths.get(
+ SYSTEM_APP_SAFETY_LABEL_OD_PATH,
+ VALID_V1_FILE_NAME)),
+ 1L);
+ }
+
+ /** Test for testV1InvalidAsV2. */
+ @Test
+ public void testV1InvalidAsV2() throws Exception {
+ System.out.println("starting testV1InvalidAsV2.");
+ odToHrExpectException(VALID_V1_FILE_NAME, 2L);
}
/** Tests missing bool. */
@Test
public void testMissingBool() throws Exception {
System.out.println("starting testMissingBool.");
- hrToOdExpectException(MISSING_BOOL_FILE_NAME);
- odToHrExpectException(MISSING_BOOL_FILE_NAME);
+ hrToOdExpectException(MISSING_BOOL_FILE_NAME, DEFAULT_VERSION);
+ odToHrExpectException(MISSING_BOOL_FILE_NAME, DEFAULT_VERSION);
}
- private void hrToOdExpectException(String fileName) {
- TestUtils.hrToOdExpectException(
- new SystemAppSafetyLabelFactory(), SYSTEM_APP_SAFETY_LABEL_HR_PATH, fileName);
+ private void hrToOdExpectException(String fileName, long version)
+ throws ParserConfigurationException, IOException, SAXException {
+ var ele =
+ TestUtils.getElementFromResource(
+ Paths.get(SYSTEM_APP_SAFETY_LABEL_HR_PATH, fileName));
+ assertThrows(
+ MalformedXmlException.class,
+ () -> new SystemAppSafetyLabelFactory().createFromHrElement(ele, version));
}
- private void odToHrExpectException(String fileName) {
- TestUtils.odToHrExpectException(
- new SystemAppSafetyLabelFactory(), SYSTEM_APP_SAFETY_LABEL_OD_PATH, fileName);
+ private void odToHrExpectException(String fileName, long version)
+ throws ParserConfigurationException, IOException, SAXException {
+ var ele =
+ TestUtils.getElementFromResource(
+ Paths.get(SYSTEM_APP_SAFETY_LABEL_OD_PATH, fileName));
+ assertThrows(
+ MalformedXmlException.class,
+ () -> new SystemAppSafetyLabelFactory().createFromOdElement(ele, version));
}
- private void testHrToOdSystemAppSafetyLabel(String fileName) throws Exception {
- TestUtils.testHrToOd(
- TestUtils.document(),
- new SystemAppSafetyLabelFactory(),
- SYSTEM_APP_SAFETY_LABEL_HR_PATH,
- SYSTEM_APP_SAFETY_LABEL_OD_PATH,
- fileName);
+ private void testHrToOdSystemAppSafetyLabel(String fileName, long version) throws Exception {
+ var doc = TestUtils.document();
+ SystemAppSafetyLabel systemAppSafetyLabel =
+ new SystemAppSafetyLabelFactory()
+ .createFromHrElement(
+ TestUtils.getElementFromResource(
+ Paths.get(SYSTEM_APP_SAFETY_LABEL_HR_PATH, fileName)),
+ version);
+ Element resultingEle = systemAppSafetyLabel.toOdDomElement(doc);
+ doc.appendChild(resultingEle);
+ TestUtils.testFormatToFormat(doc, Paths.get(SYSTEM_APP_SAFETY_LABEL_OD_PATH, fileName));
}
- private void testOdToHrSystemAppSafetyLabel(String fileName) throws Exception {
- TestUtils.testOdToHr(
- TestUtils.document(),
- new SystemAppSafetyLabelFactory(),
- SYSTEM_APP_SAFETY_LABEL_OD_PATH,
- SYSTEM_APP_SAFETY_LABEL_HR_PATH,
- fileName);
+ private void testOdToHrSystemAppSafetyLabel(String fileName, long version) throws Exception {
+ var doc = TestUtils.document();
+ SystemAppSafetyLabel systemAppSafetyLabel =
+ new SystemAppSafetyLabelFactory()
+ .createFromOdElement(
+ TestUtils.getElementFromResource(
+ Paths.get(SYSTEM_APP_SAFETY_LABEL_OD_PATH, fileName)),
+ version);
+ Element resultingEle = systemAppSafetyLabel.toHrDomElement(doc);
+ doc.appendChild(resultingEle);
+ TestUtils.testFormatToFormat(doc, Paths.get(SYSTEM_APP_SAFETY_LABEL_HR_PATH, fileName));
}
}
diff --git a/tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/ThirdPartyVerificationTest.java b/tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/ThirdPartyVerificationTest.java
new file mode 100644
index 000000000000..ebb2e93af920
--- /dev/null
+++ b/tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/ThirdPartyVerificationTest.java
@@ -0,0 +1,111 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.asllib.marshallable;
+
+import static org.junit.Assert.assertThrows;
+
+import com.android.asllib.testutils.TestUtils;
+import com.android.asllib.util.MalformedXmlException;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+import org.w3c.dom.Element;
+
+import java.nio.file.Paths;
+
+@RunWith(JUnit4.class)
+public class ThirdPartyVerificationTest {
+ private static final String THIRD_PARTY_VERIFICATION_HR_PATH =
+ "com/android/asllib/thirdpartyverification/hr";
+ private static final String THIRD_PARTY_VERIFICATION_OD_PATH =
+ "com/android/asllib/thirdpartyverification/od";
+
+ private static final String VALID_FILE_NAME = "valid.xml";
+ private static final String MISSING_URL_FILE_NAME = "missing-url.xml";
+
+ /** Logic for setting up tests (empty if not yet needed). */
+ public static void main(String[] params) throws Exception {}
+
+ @Before
+ public void setUp() throws Exception {
+ System.out.println("set up.");
+ }
+
+ /** Test for valid. */
+ @Test
+ public void testValid() throws Exception {
+ System.out.println("starting testValid.");
+ testHrToOdThirdPartyVerification(VALID_FILE_NAME);
+ testOdToHrThirdPartyVerification(VALID_FILE_NAME);
+ }
+
+ /** Tests missing url. */
+ @Test
+ public void testMissingUrl() throws Exception {
+ System.out.println("starting testMissingUrl.");
+ hrToOdExpectException(MISSING_URL_FILE_NAME);
+ odToHrExpectException(MISSING_URL_FILE_NAME);
+ }
+
+ private void hrToOdExpectException(String fileName) {
+ assertThrows(
+ MalformedXmlException.class,
+ () -> {
+ new ThirdPartyVerificationFactory()
+ .createFromHrElement(
+ TestUtils.getElementFromResource(
+ Paths.get(THIRD_PARTY_VERIFICATION_HR_PATH, fileName)));
+ });
+ }
+
+ private void odToHrExpectException(String fileName) {
+ assertThrows(
+ MalformedXmlException.class,
+ () -> {
+ new ThirdPartyVerificationFactory()
+ .createFromOdElement(
+ TestUtils.getElementFromResource(
+ Paths.get(THIRD_PARTY_VERIFICATION_OD_PATH, fileName)));
+ });
+ }
+
+ private void testHrToOdThirdPartyVerification(String fileName) throws Exception {
+ var doc = TestUtils.document();
+ ThirdPartyVerification thirdPartyVerification =
+ new ThirdPartyVerificationFactory()
+ .createFromHrElement(
+ TestUtils.getElementFromResource(
+ Paths.get(THIRD_PARTY_VERIFICATION_HR_PATH, fileName)));
+ Element ele = thirdPartyVerification.toOdDomElement(doc);
+ doc.appendChild(ele);
+ TestUtils.testFormatToFormat(doc, Paths.get(THIRD_PARTY_VERIFICATION_OD_PATH, fileName));
+ }
+
+ private void testOdToHrThirdPartyVerification(String fileName) throws Exception {
+ var doc = TestUtils.document();
+ ThirdPartyVerification thirdPartyVerification =
+ new ThirdPartyVerificationFactory()
+ .createFromOdElement(
+ TestUtils.getElementFromResource(
+ Paths.get(THIRD_PARTY_VERIFICATION_OD_PATH, fileName)));
+ Element ele = thirdPartyVerification.toHrDomElement(doc);
+ doc.appendChild(ele);
+ TestUtils.testFormatToFormat(doc, Paths.get(THIRD_PARTY_VERIFICATION_HR_PATH, fileName));
+ }
+}
diff --git a/tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/TransparencyInfoTest.java b/tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/TransparencyInfoTest.java
index 8a0b35eac7c8..b27d6ddb6243 100644
--- a/tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/TransparencyInfoTest.java
+++ b/tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/TransparencyInfoTest.java
@@ -16,20 +16,36 @@
package com.android.asllib.marshallable;
+import static org.junit.Assert.assertThrows;
+
import com.android.asllib.testutils.TestUtils;
+import com.android.asllib.util.MalformedXmlException;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
+import org.w3c.dom.Element;
+import org.xml.sax.SAXException;
+
+import java.io.IOException;
+import java.nio.file.Paths;
+
+import javax.xml.parsers.ParserConfigurationException;
@RunWith(JUnit4.class)
public class TransparencyInfoTest {
+ private static final long DEFAULT_VERSION = 2L;
+
private static final String TRANSPARENCY_INFO_HR_PATH =
"com/android/asllib/transparencyinfo/hr";
private static final String TRANSPARENCY_INFO_OD_PATH =
"com/android/asllib/transparencyinfo/od";
private static final String WITH_APP_INFO_FILE_NAME = "with-app-info.xml";
+ private static final String VALID_EMPTY_V1_FILE_NAME = "valid-empty-v1.xml";
+ private static final String VALID_DEV_INFO_V1_FILE_NAME = "valid-dev-info-v1.xml";
+ private static final String WITH_APP_INFO_AND_DEV_INFO_FILE_NAME =
+ "with-app-info-v2-and-dev-info-v1.xml";
@Before
public void setUp() throws Exception {
@@ -40,25 +56,78 @@ public class TransparencyInfoTest {
@Test
public void testTransparencyInfoWithAppInfo() throws Exception {
System.out.println("starting testTransparencyInfoWithAppInfo.");
- testHrToOdTransparencyInfo(WITH_APP_INFO_FILE_NAME);
- testOdToHrTransparencyInfo(WITH_APP_INFO_FILE_NAME);
+ testHrToOdTransparencyInfo(WITH_APP_INFO_FILE_NAME, DEFAULT_VERSION);
+ testOdToHrTransparencyInfo(WITH_APP_INFO_FILE_NAME, DEFAULT_VERSION);
+ }
+
+ /** Test for testMissingAppInfoFailsInV2. */
+ @Test
+ public void testMissingAppInfoFailsInV2() throws Exception {
+ System.out.println("starting testMissingAppInfoFailsInV2.");
+ odToHrExpectException(VALID_EMPTY_V1_FILE_NAME, 2L);
+ }
+
+ /** Test for testMissingAppInfoPassesInV1. */
+ @Test
+ public void testMissingAppInfoPassesInV1() throws Exception {
+ System.out.println("starting testMissingAppInfoPassesInV1.");
+ testParseOdTransparencyInfo(VALID_EMPTY_V1_FILE_NAME, 1L);
+ }
+
+ /** Test for testDeveloperInfoExistencePassesInV1. */
+ @Test
+ public void testDeveloperInfoExistencePassesInV1() throws Exception {
+ System.out.println("starting testDeveloperInfoExistencePassesInV1.");
+ testParseOdTransparencyInfo(VALID_DEV_INFO_V1_FILE_NAME, 1L);
+ }
+
+ /** Test for testDeveloperInfoExistenceFailsInV2. */
+ @Test
+ public void testDeveloperInfoExistenceFailsInV2() throws Exception {
+ System.out.println("starting testDeveloperInfoExistenceFailsInV2.");
+ odToHrExpectException(WITH_APP_INFO_AND_DEV_INFO_FILE_NAME, 2L);
+ }
+
+ private void testHrToOdTransparencyInfo(String fileName, long version) throws Exception {
+ var doc = TestUtils.document();
+ TransparencyInfo transparencyInfo =
+ new TransparencyInfoFactory()
+ .createFromHrElement(
+ TestUtils.getElementFromResource(
+ Paths.get(TRANSPARENCY_INFO_HR_PATH, fileName)),
+ version);
+ Element resultingEle = transparencyInfo.toOdDomElement(doc);
+ doc.appendChild(resultingEle);
+ TestUtils.testFormatToFormat(doc, Paths.get(TRANSPARENCY_INFO_OD_PATH, fileName));
+ }
+
+ private void testParseOdTransparencyInfo(String fileName, long version) throws Exception {
+ var unused =
+ new TransparencyInfoFactory()
+ .createFromOdElement(
+ TestUtils.getElementFromResource(
+ Paths.get(TRANSPARENCY_INFO_OD_PATH, fileName)),
+ version);
}
- private void testHrToOdTransparencyInfo(String fileName) throws Exception {
- TestUtils.testHrToOd(
- TestUtils.document(),
- new TransparencyInfoFactory(),
- TRANSPARENCY_INFO_HR_PATH,
- TRANSPARENCY_INFO_OD_PATH,
- fileName);
+ private void testOdToHrTransparencyInfo(String fileName, long version) throws Exception {
+ var doc = TestUtils.document();
+ TransparencyInfo transparencyInfo =
+ new TransparencyInfoFactory()
+ .createFromOdElement(
+ TestUtils.getElementFromResource(
+ Paths.get(TRANSPARENCY_INFO_OD_PATH, fileName)),
+ version);
+ Element resultingEle = transparencyInfo.toHrDomElement(doc);
+ doc.appendChild(resultingEle);
+ TestUtils.testFormatToFormat(doc, Paths.get(TRANSPARENCY_INFO_HR_PATH, fileName));
}
- private void testOdToHrTransparencyInfo(String fileName) throws Exception {
- TestUtils.testOdToHr(
- TestUtils.document(),
- new TransparencyInfoFactory(),
- TRANSPARENCY_INFO_OD_PATH,
- TRANSPARENCY_INFO_HR_PATH,
- fileName);
+ private void odToHrExpectException(String fileName, long version)
+ throws ParserConfigurationException, IOException, SAXException {
+ var ele = TestUtils.getElementFromResource(Paths.get(TRANSPARENCY_INFO_OD_PATH, fileName));
+ assertThrows(
+ MalformedXmlException.class,
+ () -> new TransparencyInfoFactory().createFromOdElement(ele, version));
}
}
diff --git a/tools/app_metadata_bundles/src/test/java/com/android/asllib/testutils/TestUtils.java b/tools/app_metadata_bundles/src/test/java/com/android/asllib/testutils/TestUtils.java
index ea90993e0785..f8ef40a9c509 100644
--- a/tools/app_metadata_bundles/src/test/java/com/android/asllib/testutils/TestUtils.java
+++ b/tools/app_metadata_bundles/src/test/java/com/android/asllib/testutils/TestUtils.java
@@ -17,11 +17,8 @@
package com.android.asllib.testutils;
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThrows;
import com.android.asllib.marshallable.AslMarshallable;
-import com.android.asllib.marshallable.AslMarshallableFactory;
-import com.android.asllib.util.MalformedXmlException;
import com.android.asllib.util.XmlUtils;
import org.w3c.dom.Document;
@@ -36,7 +33,6 @@ import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.nio.file.Path;
-import java.nio.file.Paths;
import java.util.List;
import java.util.Optional;
@@ -60,7 +56,19 @@ public class TestUtils {
}
/** Gets List of Element from a path to an existing Resource. */
- public static List<Element> getElementsFromResource(Path filePath)
+ public static Element getElementFromResource(Path filePath)
+ throws ParserConfigurationException, IOException, SAXException {
+ String str = readStrFromResource(filePath);
+ InputStream stream = new ByteArrayInputStream(str.getBytes(StandardCharsets.UTF_8));
+
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ factory.setNamespaceAware(true);
+ Document document = factory.newDocumentBuilder().parse(stream);
+ return document.getDocumentElement();
+ }
+
+ /** Gets List of Element from a path to an existing Resource. */
+ public static List<Element> getChildElementsFromResource(Path filePath)
throws ParserConfigurationException, IOException, SAXException {
String str = readStrFromResource(filePath);
InputStream stream = new ByteArrayInputStream(str.getBytes(StandardCharsets.UTF_8));
@@ -69,16 +77,13 @@ public class TestUtils {
factory.setNamespaceAware(true);
Document document = factory.newDocumentBuilder().parse(stream);
Element root = document.getDocumentElement();
- if (root.getTagName().equals(HOLDER_TAG_NAME)) {
- String tagName =
- XmlUtils.asElementList(root.getChildNodes()).stream()
- .findFirst()
- .get()
- .getTagName();
- return XmlUtils.getChildrenByTagName(root, tagName);
- } else {
- return List.of(root);
- }
+
+ String tagName =
+ XmlUtils.asElementList(root.getChildNodes()).stream()
+ .findFirst()
+ .get()
+ .getTagName();
+ return XmlUtils.getChildrenByTagName(root, tagName);
}
/** Reads a Document into a String. */
@@ -130,86 +135,13 @@ public class TestUtils {
return DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
}
- /** Helper for testing human-readable to on-device conversion expecting exception */
- public static <T extends AslMarshallable> void hrToOdExpectException(
- AslMarshallableFactory<T> factory, String hrFolderPath, String fileName) {
- assertThrows(
- MalformedXmlException.class,
- () -> {
- factory.createFromHrElements(
- TestUtils.getElementsFromResource(Paths.get(hrFolderPath, fileName)));
- });
- }
-
- /** Helper for testing on-device to human-readable conversion expecting exception */
- public static <T extends AslMarshallable> void odToHrExpectException(
- AslMarshallableFactory<T> factory, String odFolderPath, String fileName) {
- assertThrows(
- MalformedXmlException.class,
- () -> {
- factory.createFromOdElements(
- TestUtils.getElementsFromResource(Paths.get(odFolderPath, fileName)));
- });
- }
-
- /** Helper for testing human-readable to on-device conversion */
- public static <T extends AslMarshallable> void testHrToOd(
- Document doc,
- AslMarshallableFactory<T> factory,
- String hrFolderPath,
- String odFolderPath,
- String fileName)
- throws Exception {
- testFormatToFormat(doc, factory, hrFolderPath, odFolderPath, fileName, true);
- }
-
- /** Helper for testing on-device to human-readable conversion */
- public static <T extends AslMarshallable> void testOdToHr(
- Document doc,
- AslMarshallableFactory<T> factory,
- String odFolderPath,
- String hrFolderPath,
- String fileName)
- throws Exception {
- testFormatToFormat(doc, factory, odFolderPath, hrFolderPath, fileName, false);
- }
-
/** Helper for testing format to format conversion */
- private static <T extends AslMarshallable> void testFormatToFormat(
- Document doc,
- AslMarshallableFactory<T> factory,
- String inFolderPath,
- String outFolderPath,
- String fileName,
- boolean hrToOd)
- throws Exception {
- AslMarshallable marshallable =
- hrToOd
- ? factory.createFromHrElements(
- TestUtils.getElementsFromResource(
- Paths.get(inFolderPath, fileName)))
- : factory.createFromOdElements(
- TestUtils.getElementsFromResource(
- Paths.get(inFolderPath, fileName)));
-
- List<Element> elements =
- hrToOd ? marshallable.toOdDomElements(doc) : marshallable.toHrDomElements(doc);
- if (elements.isEmpty()) {
- throw new IllegalStateException("elements was empty.");
- } else if (elements.size() == 1) {
- doc.appendChild(elements.get(0));
- } else {
- Element root = doc.createElement(TestUtils.HOLDER_TAG_NAME);
- for (var child : elements) {
- root.appendChild(child);
- }
- doc.appendChild(root);
- }
+ public static <T extends AslMarshallable> void testFormatToFormat(
+ Document doc, Path expectedOutPath) throws Exception {
String converted = TestUtils.getFormattedXml(TestUtils.docToStr(doc, true), true);
System.out.println("Converted: " + converted);
String expectedOutContents =
- TestUtils.getFormattedXml(
- TestUtils.readStrFromResource(Paths.get(outFolderPath, fileName)), true);
+ TestUtils.getFormattedXml(TestUtils.readStrFromResource(expectedOutPath), true);
System.out.println("Expected: " + expectedOutContents);
assertEquals(expectedOutContents, converted);
}
diff --git a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/hr/missing-version.xml b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/hr/missing-version.xml
index ec0cd702fd43..7478e39ce366 100644
--- a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/hr/missing-version.xml
+++ b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/hr/missing-version.xml
@@ -1,3 +1,17 @@
<app-metadata-bundles>
-
+ <system-app-safety-label declaration="true">
+ </system-app-safety-label>
+ <transparency-info>
+ <app-info
+ apsCompliant="false"
+ privacyPolicy="www.example.com" developerId="dev1" applicationId="app1">
+ <first-party-endpoints>
+ <item>url1</item>
+ </first-party-endpoints>
+ <service-provider-endpoints>
+ <item>url55</item>
+ <item>url56</item>
+ </service-provider-endpoints>
+ </app-info>
+ </transparency-info>
</app-metadata-bundles> \ No newline at end of file
diff --git a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/hr/valid-empty.xml b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/hr/valid-empty.xml
index 19bfd826f770..587c49add47e 100644
--- a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/hr/valid-empty.xml
+++ b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/hr/valid-empty.xml
@@ -1 +1,17 @@
-<app-metadata-bundles version="123456"></app-metadata-bundles> \ No newline at end of file
+<app-metadata-bundles version="2">
+ <system-app-safety-label declaration="true">
+ </system-app-safety-label>
+ <transparency-info>
+ <app-info
+ apsCompliant="false"
+ privacyPolicy="www.example.com" developerId="dev1" applicationId="app1">
+ <first-party-endpoints>
+ <item>url1</item>
+ </first-party-endpoints>
+ <service-provider-endpoints>
+ <item>url55</item>
+ <item>url56</item>
+ </service-provider-endpoints>
+ </app-info>
+ </transparency-info>
+</app-metadata-bundles> \ No newline at end of file
diff --git a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/hr/with-safety-labels.xml b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/hr/with-safety-labels.xml
index 03e71d28f4cc..9cfb8bc4d5da 100644
--- a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/hr/with-safety-labels.xml
+++ b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/hr/with-safety-labels.xml
@@ -1,4 +1,19 @@
-<app-metadata-bundles version="123456">
+<app-metadata-bundles version="2">
<safety-labels>
</safety-labels>
+ <system-app-safety-label declaration="true">
+ </system-app-safety-label>
+ <transparency-info>
+ <app-info
+ apsCompliant="false"
+ privacyPolicy="www.example.com" developerId="dev1" applicationId="app1">
+ <first-party-endpoints>
+ <item>url1</item>
+ </first-party-endpoints>
+ <service-provider-endpoints>
+ <item>url55</item>
+ <item>url56</item>
+ </service-provider-endpoints>
+ </app-info>
+ </transparency-info>
</app-metadata-bundles> \ No newline at end of file
diff --git a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/hr/with-system-app-safety-label.xml b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/hr/with-system-app-safety-label.xml
deleted file mode 100644
index afb048632bc6..000000000000
--- a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/hr/with-system-app-safety-label.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<app-metadata-bundles version="123456">
-<system-app-safety-label declaration="true">
-</system-app-safety-label>
-</app-metadata-bundles> \ No newline at end of file
diff --git a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/hr/with-transparency-info.xml b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/hr/with-transparency-info.xml
deleted file mode 100644
index a00ef6565cf4..000000000000
--- a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/hr/with-transparency-info.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<app-metadata-bundles version="123456">
- <transparency-info>
- <app-info
- apsCompliant="false"
- privacyPolicy="www.example.com">
- <first-party-endpoints>
- <item>url1</item>
- </first-party-endpoints>
- <service-provider-endpoints>
- <item>url55</item>
- <item>url56</item>
- </service-provider-endpoints>
- </app-info>
- </transparency-info>
-</app-metadata-bundles> \ No newline at end of file
diff --git a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/od/missing-version.xml b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/od/missing-version.xml
index 1aa3aa94ca6d..9adfa98f05a3 100644
--- a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/od/missing-version.xml
+++ b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/od/missing-version.xml
@@ -1,2 +1,20 @@
<bundle>
+ <pbundle_as_map name="system_app_safety_label">
+ <boolean name="declaration" value="true"/>
+ </pbundle_as_map>
+ <pbundle_as_map name="transparency_info">
+ <pbundle_as_map name="app_info">
+ <boolean name="aps_compliant" value="false"/>
+ <string name="privacy_policy" value="www.example.com"/>
+ <string-array name="first_party_endpoints" num="1">
+ <item value="url1"/>
+ </string-array>
+ <string-array name="service_provider_endpoints" num="2">
+ <item value="url55"/>
+ <item value="url56"/>
+ </string-array>
+ <string name="developer_id" value="dev1"/>
+ <string name="application_id" value="app1"/>
+ </pbundle_as_map>
+ </pbundle_as_map>
</bundle> \ No newline at end of file
diff --git a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/od/valid-empty.xml b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/od/valid-empty.xml
index 37bdfad4065f..7a4c82a9e65f 100644
--- a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/od/valid-empty.xml
+++ b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/od/valid-empty.xml
@@ -1,3 +1,21 @@
<bundle>
- <long name="version" value="123456"/>
+ <long name="version" value="2"/>
+ <pbundle_as_map name="system_app_safety_label">
+ <boolean name="declaration" value="true"/>
+ </pbundle_as_map>
+ <pbundle_as_map name="transparency_info">
+ <pbundle_as_map name="app_info">
+ <string name="privacy_policy" value="www.example.com"/>
+ <string-array name="first_party_endpoints" num="1">
+ <item value="url1"/>
+ </string-array>
+ <string-array name="service_provider_endpoints" num="2">
+ <item value="url55"/>
+ <item value="url56"/>
+ </string-array>
+ <boolean name="aps_compliant" value="false"/>
+ <string name="developer_id" value="dev1"/>
+ <string name="application_id" value="app1"/>
+ </pbundle_as_map>
+ </pbundle_as_map>
</bundle> \ No newline at end of file
diff --git a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/od/valid-v1.xml b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/od/valid-v1.xml
new file mode 100644
index 000000000000..7e984e333ceb
--- /dev/null
+++ b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/od/valid-v1.xml
@@ -0,0 +1,8 @@
+<bundle>
+ <long name="version" value="1"/>
+ <pbundle_as_map name="system_app_safety_label">
+ <string name="url" value="www.example.com"/>
+ </pbundle_as_map>
+ <pbundle_as_map name="transparency_info">
+ </pbundle_as_map>
+</bundle> \ No newline at end of file
diff --git a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/od/with-safety-labels.xml b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/od/with-safety-labels.xml
index f00fb26bf1ee..3a3e5d383ca9 100644
--- a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/od/with-safety-labels.xml
+++ b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/od/with-safety-labels.xml
@@ -1,5 +1,22 @@
<bundle>
- <long name="version" value="123456"/>
- <pbundle_as_map name="safety_labels">
+ <long name="version" value="2"/>
+ <pbundle_as_map name="safety_labels"/>
+ <pbundle_as_map name="system_app_safety_label">
+ <boolean name="declaration" value="true"/>
</pbundle_as_map>
-</bundle>
+ <pbundle_as_map name="transparency_info">
+ <pbundle_as_map name="app_info">
+ <string name="privacy_policy" value="www.example.com"/>
+ <string-array name="first_party_endpoints" num="1">
+ <item value="url1"/>
+ </string-array>
+ <string-array name="service_provider_endpoints" num="2">
+ <item value="url55"/>
+ <item value="url56"/>
+ </string-array>
+ <boolean name="aps_compliant" value="false"/>
+ <string name="developer_id" value="dev1"/>
+ <string name="application_id" value="app1"/>
+ </pbundle_as_map>
+ </pbundle_as_map>
+</bundle> \ No newline at end of file
diff --git a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/od/with-system-app-safety-label.xml b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/od/with-system-app-safety-label.xml
deleted file mode 100644
index e8640c4f0934..000000000000
--- a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/od/with-system-app-safety-label.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<bundle>
- <long name="version" value="123456"/>
- <pbundle_as_map name="system_app_safety_label">
- <boolean name="declaration" value="true"/>
- </pbundle_as_map>
-</bundle> \ No newline at end of file
diff --git a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/od/with-transparency-info.xml b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/od/with-transparency-info.xml
deleted file mode 100644
index d0c8668564bd..000000000000
--- a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/androidsafetylabel/od/with-transparency-info.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<bundle>
- <long name="version" value="123456"/>
- <pbundle_as_map name="transparency_info">
- <pbundle_as_map name="app_info">
- <boolean name="aps_compliant" value="false"/>
- <string name="privacy_policy" value="www.example.com"/>
- <string-array name="first_party_endpoints" num="1">
- <item value="url1"/>
- </string-array>
- <string-array name="service_provider_endpoints" num="2">
- <item value="url55"/>
- <item value="url56"/>
- </string-array>
- </pbundle_as_map>
- </pbundle_as_map>
-</bundle> \ No newline at end of file
diff --git a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/appinfo/hr/all-fields-valid.xml b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/appinfo/hr/all-fields-valid.xml
index 0d15efc4eac3..306e01533731 100644
--- a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/appinfo/hr/all-fields-valid.xml
+++ b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/appinfo/hr/all-fields-valid.xml
@@ -1,6 +1,6 @@
<app-info
apsCompliant="false"
- privacyPolicy="www.example.com">
+ privacyPolicy="www.example.com" developerId="dev1" applicationId="app1">
<first-party-endpoints>
<item>url1</item>
</first-party-endpoints>
diff --git a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/appinfo/od/all-fields-valid-v1.xml b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/appinfo/od/all-fields-valid-v1.xml
new file mode 100644
index 000000000000..b026cf33e5f0
--- /dev/null
+++ b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/appinfo/od/all-fields-valid-v1.xml
@@ -0,0 +1,24 @@
+<pbundle_as_map name="app_info">
+ <string name="title" value="beervision"/>
+ <string name="description" value="a beer app"/>
+ <boolean name="contains_ads" value="true"/>
+ <boolean name="obey_aps" value="false"/>
+ <boolean name="ads_fingerprinting" value="false"/>
+ <boolean name="security_fingerprinting" value="false"/>
+ <string name="privacy_policy" value="www.example.com"/>
+ <string-array name="security_endpoints" num="3">
+ <item value="url1"/>
+ <item value="url2"/>
+ <item value="url3"/>
+ </string-array>
+ <string-array name="first_party_endpoints" num="1">
+ <item value="url1"/>
+ </string-array>
+ <string-array name="service_provider_endpoints" num="2">
+ <item value="url55"/>
+ <item value="url56"/>
+ </string-array>
+ <string name="category" value="Food and drink"/>
+ <string name="email" value="max@maxloh.com"/>
+ <string name="website" value="www.example.com"/>
+</pbundle_as_map>
diff --git a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/appinfo/od/all-fields-valid.xml b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/appinfo/od/all-fields-valid.xml
index bce51799c7ff..7aae4a715b79 100644
--- a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/appinfo/od/all-fields-valid.xml
+++ b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/appinfo/od/all-fields-valid.xml
@@ -1,6 +1,5 @@
<pbundle_as_map name="app_info">
- <boolean name="aps_compliant" value="false"/>
<string name="privacy_policy" value="www.example.com"/>
<string-array name="first_party_endpoints" num="1">
<item value="url1"/>
@@ -9,4 +8,7 @@
<item value="url55"/>
<item value="url56"/>
</string-array>
+ <boolean name="aps_compliant" value="false"/>
+ <string name="developer_id" value="dev1"/>
+ <string name="application_id" value="app1"/>
</pbundle_as_map> \ No newline at end of file
diff --git a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/appinfo/od/unrecognized-v1.xml b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/appinfo/od/unrecognized-v1.xml
new file mode 100644
index 000000000000..01fd7180c3a6
--- /dev/null
+++ b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/appinfo/od/unrecognized-v1.xml
@@ -0,0 +1,25 @@
+<pbundle_as_map name="app_info">
+ <string name="title" value="beervision"/>
+ <string name="description" value="a beer app"/>
+ <boolean name="contains_ads" value="true"/>
+ <boolean name="obey_aps" value="false"/>
+ <boolean name="ads_fingerprinting" value="false"/>
+ <boolean name="security_fingerprinting" value="false"/>
+ <string name="privacy_policy" value="www.example.com"/>
+ <string-array name="security_endpoints" num="3">
+ <item value="url1"/>
+ <item value="url2"/>
+ <item value="url3"/>
+ </string-array>
+ <string-array name="first_party_endpoints" num="1">
+ <item value="url1"/>
+ </string-array>
+ <string-array name="service_provider_endpoints" num="2">
+ <item value="url55"/>
+ <item value="url56"/>
+ </string-array>
+ <string name="category" value="Food and drink"/>
+ <string name="email" value="max@maxloh.com"/>
+ <string name="website" value="www.example.com"/>
+ <boolean name="aps_compliant" value="false"/>
+</pbundle_as_map>
diff --git a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/safetylabels/od/valid-v1.xml b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/safetylabels/od/valid-v1.xml
new file mode 100644
index 000000000000..1384a2f6dd52
--- /dev/null
+++ b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/safetylabels/od/valid-v1.xml
@@ -0,0 +1,9 @@
+<pbundle_as_map name="safety_labels">
+ <pbundle_as_map name="security_labels">
+ <boolean name="is_data_deletable" value="true" />
+ <boolean name="is_data_encrypted" value="false" />
+ </pbundle_as_map>
+ <pbundle_as_map name="third_party_verification">
+ <string name="url" value="www.example.com"/>
+ </pbundle_as_map>
+</pbundle_as_map> \ No newline at end of file
diff --git a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/systemappsafetylabel/od/valid-v1.xml b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/systemappsafetylabel/od/valid-v1.xml
new file mode 100644
index 000000000000..f96535b4b49b
--- /dev/null
+++ b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/systemappsafetylabel/od/valid-v1.xml
@@ -0,0 +1,3 @@
+<pbundle_as_map name="system_app_safety_label">
+ <string name="url" value="www.example.com"/>
+</pbundle_as_map> \ No newline at end of file
diff --git a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/transparencyinfo/hr/with-app-info.xml b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/transparencyinfo/hr/with-app-info.xml
index 2512ca415d55..2c5cf866547a 100644
--- a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/transparencyinfo/hr/with-app-info.xml
+++ b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/transparencyinfo/hr/with-app-info.xml
@@ -2,7 +2,7 @@
<transparency-info>
<app-info
apsCompliant="false"
- privacyPolicy="www.example.com">
+ privacyPolicy="www.example.com" developerId="dev1" applicationId="app1">
<first-party-endpoints>
<item>url1</item>
</first-party-endpoints>
diff --git a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/transparencyinfo/hr/with-developer-info.xml b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/transparencyinfo/hr/with-developer-info.xml
index d16caaea320f..29c88d23abad 100644
--- a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/transparencyinfo/hr/with-developer-info.xml
+++ b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/transparencyinfo/hr/with-developer-info.xml
@@ -1,5 +1,16 @@
<transparency-info>
+ <app-info
+ apsCompliant="false"
+ privacyPolicy="www.example.com" developerId="dev1" applicationId="app1">
+ <first-party-endpoints>
+ <item>url1</item>
+ </first-party-endpoints>
+ <service-provider-endpoints>
+ <item>url55</item>
+ <item>url56</item>
+ </service-provider-endpoints>
+ </app-info>
<developer-info
name="max"
email="max@example.com"
diff --git a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/transparencyinfo/od/with-developer-info.xml b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/transparencyinfo/od/valid-dev-info-v1.xml
index d7a4e1a959b7..d7a4e1a959b7 100644
--- a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/transparencyinfo/od/with-developer-info.xml
+++ b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/transparencyinfo/od/valid-dev-info-v1.xml
diff --git a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/transparencyinfo/od/valid-empty.xml b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/transparencyinfo/od/valid-empty-v1.xml
index af574cf92b3a..af574cf92b3a 100644
--- a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/transparencyinfo/od/valid-empty.xml
+++ b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/transparencyinfo/od/valid-empty-v1.xml
diff --git a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/transparencyinfo/od/with-app-info-v2-and-dev-info-v1.xml b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/transparencyinfo/od/with-app-info-v2-and-dev-info-v1.xml
new file mode 100644
index 000000000000..b5e64b925ca5
--- /dev/null
+++ b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/transparencyinfo/od/with-app-info-v2-and-dev-info-v1.xml
@@ -0,0 +1,25 @@
+
+<pbundle_as_map name="transparency_info">
+ <pbundle_as_map name="app_info">
+ <string name="privacy_policy" value="www.example.com"/>
+ <string-array name="first_party_endpoints" num="1">
+ <item value="url1"/>
+ </string-array>
+ <string-array name="service_provider_endpoints" num="2">
+ <item value="url55"/>
+ <item value="url56"/>
+ </string-array>
+ <boolean name="aps_compliant" value="false"/>
+ <string name="developer_id" value="dev1"/>
+ <string name="application_id" value="app1"/>
+ </pbundle_as_map>
+ <pbundle_as_map name="developer_info">
+ <string name="name" value="max"/>
+ <string name="email" value="max@example.com"/>
+ <string name="address" value="111 blah lane"/>
+ <string name="country_region" value="US"/>
+ <long name="relationship" value="5"/>
+ <string name="website" value="example.com"/>
+ <string name="app_developer_registry_id" value="registry_id"/>
+ </pbundle_as_map>
+</pbundle_as_map> \ No newline at end of file
diff --git a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/transparencyinfo/od/with-app-info.xml b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/transparencyinfo/od/with-app-info.xml
index c7bdd97a356c..c46cec1da336 100644
--- a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/transparencyinfo/od/with-app-info.xml
+++ b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/transparencyinfo/od/with-app-info.xml
@@ -1,7 +1,6 @@
<pbundle_as_map name="transparency_info">
<pbundle_as_map name="app_info">
- <boolean name="aps_compliant" value="false"/>
<string name="privacy_policy" value="www.example.com"/>
<string-array name="first_party_endpoints" num="1">
<item value="url1"/>
@@ -10,5 +9,8 @@
<item value="url55"/>
<item value="url56"/>
</string-array>
+ <boolean name="aps_compliant" value="false"/>
+ <string name="developer_id" value="dev1"/>
+ <string name="application_id" value="app1"/>
</pbundle_as_map>
</pbundle_as_map> \ No newline at end of file
diff --git a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/validmappings/general-v1/od.xml b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/validmappings/general-v1/od.xml
new file mode 100644
index 000000000000..e8b0c17ecada
--- /dev/null
+++ b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/validmappings/general-v1/od.xml
@@ -0,0 +1,70 @@
+<bundle>
+ <long name="version" value="1"/>
+ <pbundle_as_map name="safety_labels">
+ <pbundle_as_map name="data_labels">
+ <pbundle_as_map name="data_shared">
+ <pbundle_as_map name="location">
+ <pbundle_as_map name="approx_location">
+ <int-array name="purposes" num="1">
+ <item value="1"/>
+ </int-array>
+ <boolean name="is_sharing_optional" value="false"/>
+ <boolean name="ephemeral" value="false"/>
+ </pbundle_as_map>
+ <pbundle_as_map name="precise_location">
+ <int-array name="purposes" num="2">
+ <item value="1"/>
+ <item value="2"/>
+ </int-array>
+ <boolean name="is_sharing_optional" value="true"/>
+ <boolean name="ephemeral" value="true"/>
+ </pbundle_as_map>
+ </pbundle_as_map>
+ </pbundle_as_map>
+ </pbundle_as_map>
+ <pbundle_as_map name="security_labels">
+ <boolean name="is_data_deletable" value="true"/>
+ <boolean name="is_data_encrypted" value="false"/>
+ </pbundle_as_map>
+ <pbundle_as_map name="third_party_verification">
+ <string name="url" value="www.example.com"/>
+ </pbundle_as_map>
+ </pbundle_as_map>
+ <pbundle_as_map name="system_app_safety_label">
+ <string name="url" value="www.example.com"/>
+ </pbundle_as_map>
+ <pbundle_as_map name="transparency_info">
+ <pbundle_as_map name="developer_info">
+ <string name="name" value="max"/>
+ <string name="email" value="max@example.com"/>
+ <string name="address" value="111 blah lane"/>
+ <string name="country_region" value="US"/>
+ <long name="relationship" value="5"/>
+ <string name="website" value="example.com"/>
+ <string name="app_developer_registry_id" value="registry_id"/>
+ </pbundle_as_map>
+ <pbundle_as_map name="app_info">
+ <string name="title" value="beervision"/>
+ <string name="description" value="a beer app"/>
+ <boolean name="contains_ads" value="true"/>
+ <boolean name="obey_aps" value="false"/>
+ <boolean name="ads_fingerprinting" value="false"/>
+ <boolean name="security_fingerprinting" value="false"/>
+ <string name="privacy_policy" value="www.example.com"/>
+ <string-array name="security_endpoints" num="3">
+ <item value="url1"/>
+ <item value="url2"/>
+ <item value="url3"/>
+ </string-array>
+ <string-array name="first_party_endpoints" num="1">
+ <item value="url1"/>
+ </string-array>
+ <string-array name="service_provider_endpoints" num="2">
+ <item value="url55"/>
+ <item value="url56"/>
+ </string-array>
+ <string name="category" value="Food and drink"/>
+ <string name="email" value="max@maxloh.com"/>
+ </pbundle_as_map>
+ </pbundle_as_map>
+</bundle> \ No newline at end of file
diff --git a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/validmappings/general/hr.xml b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/validmappings/general/hr.xml
index 592307937896..f93298286944 100644
--- a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/validmappings/general/hr.xml
+++ b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/validmappings/general/hr.xml
@@ -1,20 +1,13 @@
-<app-metadata-bundles version="123">
+<app-metadata-bundles version="2">
<safety-labels>
<data-labels>
- <data-shared
- dataType="location_data_type_approx_location"
- isSharingOptional="false"
- purposes="app_functionality" />
- <data-shared
- dataType="location_data_type_precise_location"
- isSharingOptional="true"
- purposes="app_functionality|analytics" />
+ <data-shared dataType="location_data_type_approx_location" isSharingOptional="false" purposes="app_functionality"/>
+ <data-shared dataType="location_data_type_precise_location" isSharingOptional="true" purposes="app_functionality|analytics"/>
</data-labels>
</safety-labels>
- <system-app-safety-label declaration="true">
- </system-app-safety-label>
+ <system-app-safety-label declaration="true"/>
<transparency-info>
- <app-info apsCompliant="false" privacyPolicy="www.example.com">
+ <app-info applicationId="app1" apsCompliant="false" developerId="dev1" privacyPolicy="www.example.com">
<first-party-endpoints>
<item>url1</item>
</first-party-endpoints>
diff --git a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/validmappings/general/od.xml b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/validmappings/general/od.xml
index c24087e483b6..c7def7227a34 100644
--- a/tools/app_metadata_bundles/src/test/resources/com/android/asllib/validmappings/general/od.xml
+++ b/tools/app_metadata_bundles/src/test/resources/com/android/asllib/validmappings/general/od.xml
@@ -1,5 +1,5 @@
<bundle>
- <long name="version" value="123"/>
+ <long name="version" value="2"/>
<pbundle_as_map name="safety_labels">
<pbundle_as_map name="data_labels">
<pbundle_as_map name="data_shared">
@@ -26,7 +26,6 @@
</pbundle_as_map>
<pbundle_as_map name="transparency_info">
<pbundle_as_map name="app_info">
- <boolean name="aps_compliant" value="false"/>
<string name="privacy_policy" value="www.example.com"/>
<string-array name="first_party_endpoints" num="1">
<item value="url1"/>
@@ -35,6 +34,9 @@
<item value="url55"/>
<item value="url56"/>
</string-array>
+ <boolean name="aps_compliant" value="false"/>
+ <string name="developer_id" value="dev1"/>
+ <string name="application_id" value="app1"/>
</pbundle_as_map>
</pbundle_as_map>
</bundle> \ No newline at end of file
diff --git a/tools/lint/fix/README.md b/tools/lint/fix/README.md
index a5ac2be1c18a..18bda9287a50 100644
--- a/tools/lint/fix/README.md
+++ b/tools/lint/fix/README.md
@@ -6,7 +6,7 @@ Inspiration: go/refactor-the-platform-with-lint\
It's a python script that runs the framework linter,
and then (optionally) copies modified files back into the source tree.\
-Why python, you ask? Because python is cool ¯\_(ツ)_/¯.
+Why python, you ask? Because python is cool ¯\\\_(ツ)\_/¯.
Incidentally, this exposes a much simpler way to run individual lint checks
against individual modules, so it's useful beyond applying fixes.
@@ -15,7 +15,7 @@ against individual modules, so it's useful beyond applying fixes.
Lint is not allowed to modify source files directly via lint's `--apply-suggestions` flag.
As a compromise, soong zips up the (potentially) modified sources and leaves them in an intermediate
-directory. This script runs the lint, unpacks those files, and copies them back into the tree.
+directory. This script runs the lint, unpacks those files, and copies them back into the tree.
## How do I run it?
**WARNING: You probably want to commit/stash any changes to your working tree before doing this...**
diff --git a/tools/protologtool/src/com/android/protolog/tool/ProtoLogCallProcessorImpl.kt b/tools/protologtool/src/com/android/protolog/tool/ProtoLogCallProcessorImpl.kt
index 1087ae6ee41d..3c99e68cd6a0 100644
--- a/tools/protologtool/src/com/android/protolog/tool/ProtoLogCallProcessorImpl.kt
+++ b/tools/protologtool/src/com/android/protolog/tool/ProtoLogCallProcessorImpl.kt
@@ -120,6 +120,8 @@ class ProtoLogCallProcessorImpl(
logCallVisitor?.processCall(call, messageString, getLevelForMethodName(
call.name.toString(), call, context), groupMap.getValue(groupName))
+ } else if (call.name.id == "initialize") {
+ // No processing
} else {
// Process non-log message calls
otherCallVisitor?.processCall(call)
diff --git a/tools/protologtool/src/com/android/protolog/tool/ProtoLogTool.kt b/tools/protologtool/src/com/android/protolog/tool/ProtoLogTool.kt
index 2d5b50b528a3..aa530050741b 100644
--- a/tools/protologtool/src/com/android/protolog/tool/ProtoLogTool.kt
+++ b/tools/protologtool/src/com/android/protolog/tool/ProtoLogTool.kt
@@ -443,10 +443,10 @@ object ProtoLogTool {
val command = CommandOptions(args)
invoke(command)
} catch (ex: InvalidCommandException) {
- println("\n${ex.message}\n")
+ println("InvalidCommandException: \n${ex.message}\n")
showHelpAndExit()
} catch (ex: CodeProcessingException) {
- println("\n${ex.message}\n")
+ println("CodeProcessingException: \n${ex.message}\n")
exitProcess(1)
}
}
diff --git a/tools/protologtool/src/com/android/protolog/tool/SourceTransformer.kt b/tools/protologtool/src/com/android/protolog/tool/SourceTransformer.kt
index 6a8a0717b2f1..c478f5844de6 100644
--- a/tools/protologtool/src/com/android/protolog/tool/SourceTransformer.kt
+++ b/tools/protologtool/src/com/android/protolog/tool/SourceTransformer.kt
@@ -130,28 +130,27 @@ class SourceTransformer(
val hash = CodeUtils.hash(packagePath, messageString, level, group)
val newCall = call.clone()
- if (!group.textEnabled) {
- // Remove message string if text logging is not enabled by default.
- // Out: ProtoLog.e(GROUP, null, arg)
- newCall.arguments[1].replace(NameExpr("null"))
- }
+ // Remove message string.
+ // Out: ProtoLog.e(GROUP, args)
+ newCall.arguments.removeAt(1)
// Insert message string hash as a second argument.
- // Out: ProtoLog.e(GROUP, 1234, null, arg)
+ // Out: ProtoLog.e(GROUP, 1234, args)
newCall.arguments.add(1, LongLiteralExpr("" + hash + "L"))
val argTypes = LogDataType.parseFormatString(messageString)
val typeMask = LogDataType.logDataTypesToBitMask(argTypes)
// Insert bitmap representing which Number parameters are to be considered as
// floating point numbers.
- // Out: ProtoLog.e(GROUP, 1234, 0, null, arg)
+ // Out: ProtoLog.e(GROUP, 1234, 0, args)
newCall.arguments.add(2, IntegerLiteralExpr(typeMask))
// Replace call to a stub method with an actual implementation.
- // Out: ProtoLogImpl.e(GROUP, 1234, null, arg)
+ // Out: ProtoLogImpl.e(GROUP, 1234, 0, args)
newCall.setScope(protoLogImplClassNode)
if (argTypes.size != call.arguments.size - 2) {
throw InvalidProtoLogCallException(
"Number of arguments (${argTypes.size} does not match format" +
" string in: $call", ParsingContext(path, call))
}
+ val argsOffset = 3
val blockStmt = BlockStmt()
if (argTypes.isNotEmpty()) {
// Assign every argument to a variable to check its type in compile time
@@ -160,9 +159,9 @@ class SourceTransformer(
argTypes.forEachIndexed { idx, type ->
val varName = "protoLogParam$idx"
val declaration = VariableDeclarator(getASTTypeForDataType(type), varName,
- getConversionForType(type)(newCall.arguments[idx + 4].clone()))
+ getConversionForType(type)(newCall.arguments[idx + argsOffset].clone()))
blockStmt.addStatement(ExpressionStmt(VariableDeclarationExpr(declaration)))
- newCall.setArgument(idx + 4, NameExpr(SimpleName(varName)))
+ newCall.setArgument(idx + argsOffset, NameExpr(SimpleName(varName)))
}
} else {
// Assign (Object[])null as the vararg parameter to prevent allocating an empty
diff --git a/tools/protologtool/tests/com/android/protolog/tool/EndToEndTest.kt b/tools/protologtool/tests/com/android/protolog/tool/EndToEndTest.kt
index 2a8367787ba1..0cbbd483fe59 100644
--- a/tools/protologtool/tests/com/android/protolog/tool/EndToEndTest.kt
+++ b/tools/protologtool/tests/com/android/protolog/tool/EndToEndTest.kt
@@ -60,7 +60,7 @@ class EndToEndTest {
.containsMatch(Pattern.compile("\\{ String protoLogParam0 = " +
"String\\.valueOf\\(argString\\); long protoLogParam1 = argInt; " +
"com\\.android\\.internal\\.protolog.ProtoLogImpl_.*\\.d\\(" +
- "GROUP, -6872339441335321086L, 4, null, protoLogParam0, protoLogParam1" +
+ "GROUP, -6872339441335321086L, 4, protoLogParam0, protoLogParam1" +
"\\); \\}"))
}
diff --git a/tools/protologtool/tests/com/android/protolog/tool/SourceTransformerTest.kt b/tools/protologtool/tests/com/android/protolog/tool/SourceTransformerTest.kt
index 82aa93da613b..6cde7a72db53 100644
--- a/tools/protologtool/tests/com/android/protolog/tool/SourceTransformerTest.kt
+++ b/tools/protologtool/tests/com/android/protolog/tool/SourceTransformerTest.kt
@@ -76,7 +76,7 @@ class SourceTransformerTest {
class Test {
void test() {
- if (org.example.ProtoLogImpl.Cache.TEST_GROUP_enabled[3]) { long protoLogParam0 = 100; double protoLogParam1 = 0.1; org.example.ProtoLogImpl.w(TEST_GROUP, -1473209266730422156L, 9, "test %d %f", protoLogParam0, protoLogParam1); }
+ if (org.example.ProtoLogImpl.Cache.TEST_GROUP_enabled[3]) { long protoLogParam0 = 100; double protoLogParam1 = 0.1; org.example.ProtoLogImpl.w(TEST_GROUP, -1473209266730422156L, 9, protoLogParam0, protoLogParam1); }
}
}
""".trimIndent()
@@ -86,7 +86,7 @@ class SourceTransformerTest {
class Test {
void test() {
- if (org.example.ProtoLogImpl.Cache.TEST_GROUP_enabled[3]) { long protoLogParam0 = 100; double protoLogParam1 = 0.1; String protoLogParam2 = String.valueOf("test"); org.example.ProtoLogImpl.w(TEST_GROUP, -4447034859795564700L, 9, "test %d %f " + "abc %s\n test", protoLogParam0, protoLogParam1, protoLogParam2);
+ if (org.example.ProtoLogImpl.Cache.TEST_GROUP_enabled[3]) { long protoLogParam0 = 100; double protoLogParam1 = 0.1; String protoLogParam2 = String.valueOf("test"); org.example.ProtoLogImpl.w(TEST_GROUP, -4447034859795564700L, 9, protoLogParam0, protoLogParam1, protoLogParam2);
}
}
@@ -98,8 +98,8 @@ class SourceTransformerTest {
class Test {
void test() {
- if (org.example.ProtoLogImpl.Cache.TEST_GROUP_enabled[3]) { long protoLogParam0 = 100; double protoLogParam1 = 0.1; org.example.ProtoLogImpl.w(TEST_GROUP, -1473209266730422156L, 9, "test %d %f", protoLogParam0, protoLogParam1); } /* ProtoLog.w(TEST_GROUP, "test %d %f", 100, 0.1); */ if (org.example.ProtoLogImpl.Cache.TEST_GROUP_enabled[3]) { long protoLogParam0 = 100; double protoLogParam1 = 0.1; org.example.ProtoLogImpl.w(TEST_GROUP, -1473209266730422156L, 9, "test %d %f", protoLogParam0, protoLogParam1); }
- if (org.example.ProtoLogImpl.Cache.TEST_GROUP_enabled[3]) { long protoLogParam0 = 100; double protoLogParam1 = 0.1; org.example.ProtoLogImpl.w(TEST_GROUP, -1473209266730422156L, 9, "test %d %f", protoLogParam0, protoLogParam1); }
+ if (org.example.ProtoLogImpl.Cache.TEST_GROUP_enabled[3]) { long protoLogParam0 = 100; double protoLogParam1 = 0.1; org.example.ProtoLogImpl.w(TEST_GROUP, -1473209266730422156L, 9, protoLogParam0, protoLogParam1); } /* ProtoLog.w(TEST_GROUP, "test %d %f", 100, 0.1); */ if (org.example.ProtoLogImpl.Cache.TEST_GROUP_enabled[3]) { long protoLogParam0 = 100; double protoLogParam1 = 0.1; org.example.ProtoLogImpl.w(TEST_GROUP, -1473209266730422156L, 9, protoLogParam0, protoLogParam1); }
+ if (org.example.ProtoLogImpl.Cache.TEST_GROUP_enabled[3]) { long protoLogParam0 = 100; double protoLogParam1 = 0.1; org.example.ProtoLogImpl.w(TEST_GROUP, -1473209266730422156L, 9, protoLogParam0, protoLogParam1); }
}
}
""".trimIndent()
@@ -109,7 +109,7 @@ class SourceTransformerTest {
class Test {
void test() {
- if (org.example.ProtoLogImpl.Cache.TEST_GROUP_enabled[3]) { org.example.ProtoLogImpl.w(TEST_GROUP, 3218600869538902408L, 0, "test", (Object[]) null); }
+ if (org.example.ProtoLogImpl.Cache.TEST_GROUP_enabled[3]) { org.example.ProtoLogImpl.w(TEST_GROUP, 3218600869538902408L, 0, (Object[]) null); }
}
}
""".trimIndent()
@@ -119,7 +119,7 @@ class SourceTransformerTest {
class Test {
void test() {
- if (org.example.ProtoLogImpl.Cache.TEST_GROUP_enabled[3]) { long protoLogParam0 = 100; double protoLogParam1 = 0.1; org.example.ProtoLogImpl.w(TEST_GROUP, -1473209266730422156L, 9, null, protoLogParam0, protoLogParam1); }
+ if (org.example.ProtoLogImpl.Cache.TEST_GROUP_enabled[3]) { long protoLogParam0 = 100; double protoLogParam1 = 0.1; org.example.ProtoLogImpl.w(TEST_GROUP, -1473209266730422156L, 9, protoLogParam0, protoLogParam1); }
}
}
""".trimIndent()
@@ -129,7 +129,7 @@ class SourceTransformerTest {
class Test {
void test() {
- if (org.example.ProtoLogImpl.Cache.TEST_GROUP_enabled[3]) { long protoLogParam0 = 100; double protoLogParam1 = 0.1; String protoLogParam2 = String.valueOf("test"); org.example.ProtoLogImpl.w(TEST_GROUP, -4447034859795564700L, 9, null, protoLogParam0, protoLogParam1, protoLogParam2);
+ if (org.example.ProtoLogImpl.Cache.TEST_GROUP_enabled[3]) { long protoLogParam0 = 100; double protoLogParam1 = 0.1; String protoLogParam2 = String.valueOf("test"); org.example.ProtoLogImpl.w(TEST_GROUP, -4447034859795564700L, 9, protoLogParam0, protoLogParam1, protoLogParam2);
}
}
@@ -172,13 +172,12 @@ class SourceTransformerTest {
Truth.assertThat(protoLogCalls).hasSize(1)
val methodCall = protoLogCalls[0] as MethodCallExpr
assertEquals("w", methodCall.name.asString())
- assertEquals(6, methodCall.arguments.size)
+ assertEquals(5, methodCall.arguments.size)
assertEquals("TEST_GROUP", methodCall.arguments[0].toString())
assertEquals("-1473209266730422156L", methodCall.arguments[1].toString())
assertEquals(0b1001.toString(), methodCall.arguments[2].toString())
- assertEquals("\"test %d %f\"", methodCall.arguments[3].toString())
- assertEquals("protoLogParam0", methodCall.arguments[4].toString())
- assertEquals("protoLogParam1", methodCall.arguments[5].toString())
+ assertEquals("protoLogParam0", methodCall.arguments[3].toString())
+ assertEquals("protoLogParam1", methodCall.arguments[4].toString())
assertEquals(TRANSFORMED_CODE_TEXT_ENABLED, out)
}
@@ -214,13 +213,12 @@ class SourceTransformerTest {
Truth.assertThat(protoLogCalls).hasSize(3)
val methodCall = protoLogCalls[0] as MethodCallExpr
assertEquals("w", methodCall.name.asString())
- assertEquals(6, methodCall.arguments.size)
+ assertEquals(5, methodCall.arguments.size)
assertEquals("TEST_GROUP", methodCall.arguments[0].toString())
assertEquals("-1473209266730422156L", methodCall.arguments[1].toString())
assertEquals(0b1001.toString(), methodCall.arguments[2].toString())
- assertEquals("\"test %d %f\"", methodCall.arguments[3].toString())
- assertEquals("protoLogParam0", methodCall.arguments[4].toString())
- assertEquals("protoLogParam1", methodCall.arguments[5].toString())
+ assertEquals("protoLogParam0", methodCall.arguments[3].toString())
+ assertEquals("protoLogParam1", methodCall.arguments[4].toString())
assertEquals(TRANSFORMED_CODE_MULTICALL_TEXT, out)
}
@@ -252,13 +250,13 @@ class SourceTransformerTest {
Truth.assertThat(protoLogCalls).hasSize(1)
val methodCall = protoLogCalls[0] as MethodCallExpr
assertEquals("w", methodCall.name.asString())
- assertEquals(7, methodCall.arguments.size)
+ assertEquals(6, methodCall.arguments.size)
assertEquals("TEST_GROUP", methodCall.arguments[0].toString())
assertEquals("-4447034859795564700L", methodCall.arguments[1].toString())
assertEquals(0b001001.toString(), methodCall.arguments[2].toString())
- assertEquals("protoLogParam0", methodCall.arguments[4].toString())
- assertEquals("protoLogParam1", methodCall.arguments[5].toString())
- assertEquals("protoLogParam2", methodCall.arguments[6].toString())
+ assertEquals("protoLogParam0", methodCall.arguments[3].toString())
+ assertEquals("protoLogParam1", methodCall.arguments[4].toString())
+ assertEquals("protoLogParam2", methodCall.arguments[5].toString())
assertEquals(TRANSFORMED_CODE_MULTILINE_TEXT_ENABLED, out)
}
@@ -289,7 +287,7 @@ class SourceTransformerTest {
Truth.assertThat(protoLogCalls).hasSize(1)
val methodCall = protoLogCalls[0] as MethodCallExpr
assertEquals("w", methodCall.name.asString())
- assertEquals(5, methodCall.arguments.size)
+ assertEquals(4, methodCall.arguments.size)
assertEquals("TEST_GROUP", methodCall.arguments[0].toString())
assertEquals("3218600869538902408L", methodCall.arguments[1].toString())
assertEquals(0.toString(), methodCall.arguments[2].toString())
@@ -323,13 +321,12 @@ class SourceTransformerTest {
Truth.assertThat(protoLogCalls).hasSize(1)
val methodCall = protoLogCalls[0] as MethodCallExpr
assertEquals("w", methodCall.name.asString())
- assertEquals(6, methodCall.arguments.size)
+ assertEquals(5, methodCall.arguments.size)
assertEquals("TEST_GROUP", methodCall.arguments[0].toString())
assertEquals("-1473209266730422156L", methodCall.arguments[1].toString())
assertEquals(0b1001.toString(), methodCall.arguments[2].toString())
- assertEquals("null", methodCall.arguments[3].toString())
- assertEquals("protoLogParam0", methodCall.arguments[4].toString())
- assertEquals("protoLogParam1", methodCall.arguments[5].toString())
+ assertEquals("protoLogParam0", methodCall.arguments[3].toString())
+ assertEquals("protoLogParam1", methodCall.arguments[4].toString())
assertEquals(TRANSFORMED_CODE_TEXT_DISABLED, out)
}
@@ -361,14 +358,13 @@ class SourceTransformerTest {
Truth.assertThat(protoLogCalls).hasSize(1)
val methodCall = protoLogCalls[0] as MethodCallExpr
assertEquals("w", methodCall.name.asString())
- assertEquals(7, methodCall.arguments.size)
+ assertEquals(6, methodCall.arguments.size)
assertEquals("TEST_GROUP", methodCall.arguments[0].toString())
assertEquals("-4447034859795564700L", methodCall.arguments[1].toString())
assertEquals(0b001001.toString(), methodCall.arguments[2].toString())
- assertEquals("null", methodCall.arguments[3].toString())
- assertEquals("protoLogParam0", methodCall.arguments[4].toString())
- assertEquals("protoLogParam1", methodCall.arguments[5].toString())
- assertEquals("protoLogParam2", methodCall.arguments[6].toString())
+ assertEquals("protoLogParam0", methodCall.arguments[3].toString())
+ assertEquals("protoLogParam1", methodCall.arguments[4].toString())
+ assertEquals("protoLogParam2", methodCall.arguments[5].toString())
assertEquals(TRANSFORMED_CODE_MULTILINE_TEXT_DISABLED, out)
}
}
diff --git a/wifi/wifi.aconfig b/wifi/wifi.aconfig
index c1effe148e5c..f7162f6b7746 100644
--- a/wifi/wifi.aconfig
+++ b/wifi/wifi.aconfig
@@ -25,3 +25,13 @@ flag {
description: "Add API to migrate all values from Legacy Keystore to the new Wifi Blobstore database"
bug: "332560152"
}
+
+flag {
+ name: "hotspot_network_unknown_status_resets_connecting_state"
+ namespace: "wifi"
+ description: "Reset the connecting state flags when the hotspot network updates to unknown."
+ bug: "329670511"
+ metadata {
+ purpose: PURPOSE_BUGFIX
+ }
+}